siesa-ui-kit 1.0.2 → 1.0.4
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 +115 -115
- package/bin/install.cjs +502 -502
- package/bin/prepare-publish.cjs +28 -28
- package/bin/restore-folders.cjs +28 -28
- package/claude/agents/siesa-ui-kit-specialist.md +2445 -0
- package/claude/prompts/component-template.md +121 -0
- package/claude/prompts/siesa-ui-kit.md +28 -0
- package/claude/settings.local.json +67 -2
- package/dist/components/Button/icons.d.ts +6 -5
- package/dist/components/Button/icons.d.ts.map +1 -1
- package/dist/components/DropdownItemCollapsible/DropdownItemCollapsible.d.ts.map +1 -1
- package/dist/components/DropdownItemCollapsible/DropdownItemCollapsible.types.d.ts +21 -0
- package/dist/components/DropdownItemCollapsible/DropdownItemCollapsible.types.d.ts.map +1 -1
- package/dist/components/NavigationRailCommercial/NavigationRailCommercial.d.ts +122 -0
- package/dist/components/NavigationRailCommercial/NavigationRailCommercial.d.ts.map +1 -0
- package/dist/components/NavigationRailCommercial/NavigationRailCommercial.types.d.ts +139 -0
- package/dist/components/NavigationRailCommercial/NavigationRailCommercial.types.d.ts.map +1 -0
- package/dist/components/NavigationRailCommercial/icons.d.ts +33 -0
- package/dist/components/NavigationRailCommercial/icons.d.ts.map +1 -0
- package/dist/components/NavigationRailCommercial/index.d.ts +4 -0
- package/dist/components/NavigationRailCommercial/index.d.ts.map +1 -0
- package/dist/components/NavigationRailItem/NavigationRailItem.d.ts.map +1 -1
- package/dist/components/NavigationRailItem/NavigationRailItem.types.d.ts +7 -0
- package/dist/components/NavigationRailItem/NavigationRailItem.types.d.ts.map +1 -1
- package/dist/components/NavigationRailTypes/NavigationRailTypes.d.ts.map +1 -1
- package/dist/components/NavigationRailTypes/NavigationRailTypes.types.d.ts +41 -0
- package/dist/components/NavigationRailTypes/NavigationRailTypes.types.d.ts.map +1 -1
- package/dist/components/NavigationRailTypes/icons.d.ts +15 -29
- package/dist/components/NavigationRailTypes/icons.d.ts.map +1 -1
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Select/icons.d.ts +6 -2
- package/dist/components/Select/icons.d.ts.map +1 -1
- package/dist/index.d.ts +32 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/siesa-ui-kit.cjs +404 -190
- package/dist/siesa-ui-kit.cjs.map +1 -1
- package/dist/siesa-ui-kit.mjs +6590 -1506
- package/dist/siesa-ui-kit.mjs.map +1 -1
- package/dist/views/LayoutCommercial/LayoutCommercial.d.ts +48 -0
- package/dist/views/LayoutCommercial/LayoutCommercial.d.ts.map +1 -0
- package/dist/views/LayoutCommercial/LayoutCommercial.types.d.ts +49 -0
- package/dist/views/LayoutCommercial/LayoutCommercial.types.d.ts.map +1 -0
- package/dist/views/LayoutCommercial/index.d.ts +3 -0
- package/dist/views/LayoutCommercial/index.d.ts.map +1 -0
- package/docs/icons.md +12 -31
- package/package.json +111 -110
- package/src/components/Avatar/Avatar.stories.tsx +494 -494
- package/src/components/Button/Button.stories.tsx +950 -950
- package/src/components/Button/Button.tsx +337 -337
- package/src/components/Button/Button.types.ts +180 -180
- package/src/components/Button/icons.tsx +23 -62
- package/src/components/DescriptionList/DescriptionList.stories.tsx +250 -250
- package/src/components/Divider/Divider.stories.tsx +263 -263
- package/src/components/DropdownItemCollapsible/DropdownItemCollapsible.stories.tsx +317 -317
- package/src/components/DropdownItemCollapsible/DropdownItemCollapsible.tsx +307 -287
- package/src/components/DropdownItemCollapsible/DropdownItemCollapsible.types.ts +136 -111
- package/src/components/DropdownItemCollapsible/README.md +264 -264
- package/src/components/DropdownItemCollapsible/icons.tsx +57 -57
- package/src/components/DropdownItemCollapsible/index.ts +12 -12
- package/src/components/DropdownItemHeading/DropdownItemHeading.stories.tsx +386 -386
- package/src/components/DropdownItemHeading/DropdownItemHeading.tsx +216 -216
- package/src/components/DropdownItemHeading/DropdownItemHeading.types.ts +93 -93
- package/src/components/DropdownItemHeading/README.md +573 -573
- package/src/components/DropdownItemHeading/icons.tsx +125 -125
- package/src/components/DropdownItemHeading/index.ts +3 -3
- package/src/components/Input/Input.stories.tsx +583 -583
- package/src/components/LoginView/LoginView.stories.tsx +148 -148
- package/src/components/LoginView/LoginView.tsx +426 -426
- package/src/components/LoginView/LoginView.types.ts +52 -52
- package/src/components/LoginView/README.md +396 -396
- package/src/components/LoginView/icons.tsx +85 -85
- package/src/components/LoginView/index.ts +3 -3
- package/src/components/Navbar/Navbar.stories.tsx +810 -810
- package/src/components/Navbar/Navbar.tsx +755 -755
- package/src/components/Navbar/Navbar.types.ts +219 -219
- package/src/components/Navbar/README.md +279 -279
- package/src/components/Navbar/index.ts +8 -8
- package/src/components/NavigationRailCommercial/NavigationRailCommercial.stories.tsx +464 -0
- package/src/components/NavigationRailCommercial/NavigationRailCommercial.tsx +301 -0
- package/src/components/NavigationRailCommercial/NavigationRailCommercial.types.ts +162 -0
- package/src/components/NavigationRailCommercial/README.md +251 -0
- package/src/components/NavigationRailCommercial/icons.tsx +54 -0
- package/src/components/NavigationRailCommercial/index.ts +6 -0
- package/src/components/NavigationRailItem/NavigationRailItem.stories.tsx +667 -667
- package/src/components/NavigationRailItem/NavigationRailItem.tsx +314 -313
- package/src/components/NavigationRailItem/NavigationRailItem.types.ts +175 -167
- package/src/components/NavigationRailItem/README.md +476 -476
- package/src/components/NavigationRailItem/index.ts +2 -2
- package/src/components/NavigationRailPanel/NavigationRailPanel.stories.tsx +462 -462
- package/src/components/NavigationRailPanel/NavigationRailPanel.tsx +332 -332
- package/src/components/NavigationRailPanel/NavigationRailPanel.types.ts +178 -178
- package/src/components/NavigationRailPanel/README.md +461 -461
- package/src/components/NavigationRailPanel/index.ts +6 -6
- package/src/components/NavigationRailTypes/NavigationRailTypes.stories.tsx +682 -528
- package/src/components/NavigationRailTypes/NavigationRailTypes.tsx +363 -378
- package/src/components/NavigationRailTypes/NavigationRailTypes.types.ts +178 -130
- package/src/components/NavigationRailTypes/README.md +573 -573
- package/src/components/NavigationRailTypes/icons.tsx +76 -141
- package/src/components/NavigationRailTypes/index.ts +7 -7
- package/src/components/Notification/Notification.stories.tsx +513 -513
- package/src/components/Notification/Notification.tsx +145 -145
- package/src/components/Notification/Notification.types.ts +142 -142
- package/src/components/Notification/README.md +409 -409
- package/src/components/POSConvention/POSConvention.stories.tsx +235 -235
- package/src/components/POSConvention/POSConvention.tsx +129 -129
- package/src/components/POSConvention/POSConvention.types.ts +38 -38
- package/src/components/POSConvention/README.md +123 -123
- package/src/components/POSConvention/icons.tsx +45 -45
- package/src/components/POSConvention/index.ts +3 -3
- package/src/components/POSLocationButton/POSLocationButton.stories.tsx +531 -531
- package/src/components/POSLocationButton/POSLocationButton.tsx +247 -247
- package/src/components/POSLocationButton/POSLocationButton.types.ts +87 -87
- package/src/components/POSLocationButton/README.md +253 -253
- package/src/components/POSLocationButton/icons.tsx +120 -120
- package/src/components/POSLocationButton/index.ts +14 -14
- package/src/components/POSNumberButton/POSNumberButton.stories.tsx +415 -415
- package/src/components/POSNumberButton/POSNumberButton.tsx +179 -179
- package/src/components/POSNumberButton/POSNumberButton.types.ts +51 -51
- package/src/components/POSNumberButton/README.md +321 -321
- package/src/components/POSNumberButton/index.ts +3 -3
- package/src/components/POSProductButton/POSProductButton.stories.tsx +318 -318
- package/src/components/POSProductCard/POSProductCard.stories.tsx +642 -642
- package/src/components/POSProductCard/POSProductCard.tsx +208 -208
- package/src/components/POSProductCard/POSProductCard.types.ts +76 -76
- package/src/components/POSProductCard/README.md +179 -179
- package/src/components/POSProductCard/icons.tsx +26 -26
- package/src/components/POSProductCard/index.ts +2 -2
- package/src/components/POSProductSidebarItems/POSProductSidebarItems.stories.tsx +753 -753
- package/src/components/POSProductSidebarItems/POSProductSidebarItems.tsx +332 -332
- package/src/components/POSProductSidebarItems/POSProductSidebarItems.types.ts +119 -119
- package/src/components/POSProductSidebarItems/README.md +198 -198
- package/src/components/POSProductSidebarItems/icons.tsx +21 -21
- package/src/components/POSProductSidebarItems/index.ts +3 -3
- package/src/components/POSTable/POSTable.stories.tsx +737 -737
- package/src/components/POSTable/POSTable.tsx +401 -401
- package/src/components/POSTable/README.md +286 -286
- package/src/components/Quantity/Quantity.stories.tsx +457 -457
- package/src/components/Radio/Radio.stories.tsx +523 -523
- package/src/components/Radio/Radio.tsx +1 -1
- package/src/components/Select/Select.stories.tsx +32 -0
- package/src/components/Select/Select.tsx +457 -454
- package/src/components/Select/icons.tsx +16 -41
- package/src/components/SignUpView/SignUpView.stories.tsx +129 -129
- package/src/components/SignUpView/SignUpView.tsx +503 -503
- package/src/components/SignUpView/SignUpView.types.ts +58 -58
- package/src/components/SignUpView/icons.tsx +71 -71
- package/src/components/SignUpView/index.ts +3 -3
- package/src/components/Switch/README.md +112 -112
- package/src/components/Switch/Switch.stories.tsx +550 -550
- package/src/components/Switch/Switch.tsx +246 -246
- package/src/components/Switch/Switch.types.ts +67 -67
- package/src/components/Table/Table.stories.tsx +805 -805
- package/src/components/Tabs/README.md +201 -201
- package/src/components/Tabs/Tabs.stories.tsx +580 -580
- package/src/components/Tabs/Tabs.tsx +356 -356
- package/src/components/Tabs/Tabs.types.ts +127 -127
- package/src/components/Tabs/icons.tsx +129 -129
- package/src/components/Tabs/index.ts +11 -11
- package/src/components/Textarea/Textarea.stories.tsx +535 -535
- package/src/index.ts +133 -102
- package/src/views/LayoutCommercial/LayoutCommercial.stories.tsx +374 -0
- package/src/views/LayoutCommercial/LayoutCommercial.tsx +125 -0
- package/src/views/LayoutCommercial/LayoutCommercial.types.ts +54 -0
- package/src/views/LayoutCommercial/README.md +286 -0
- package/src/views/LayoutCommercial/index.ts +2 -0
- package/src/views/ListView/ListView.stories.tsx +329 -329
- package/src/views/ListView/ListView.tsx +570 -570
- package/src/views/ListView/ListView.types.ts +211 -211
- package/src/views/ListView/icons.tsx +282 -282
- package/src/views/ListView/index.ts +11 -11
- package/src/views/LoginView/LoginView.tsx +426 -426
- package/src/views/ProductsView/ProductsView.stories.tsx +344 -344
- package/src/views/ProductsView/ProductsView.tsx +480 -480
- package/src/views/ProductsView/ProductsView.types.ts +238 -238
- package/src/views/ProductsView/README.md +312 -312
- package/src/views/ProductsView/icons.tsx +38 -38
- package/src/views/ProductsView/index.ts +8 -8
- package/src/views/RecoverPasswordView/RecoverPasswordView.tsx +376 -376
- package/src/views/SignUpView/SignUpView.tsx +503 -503
- package/src/views/TableLayoutView/README.md +268 -268
- package/src/views/TableLayoutView/TableLayoutView.stories.tsx +235 -235
- package/src/views/TableLayoutView/TableLayoutView.tsx +461 -461
- package/src/views/TableLayoutView/TableLayoutView.types.ts +209 -209
- package/src/views/TableLayoutView/icons.tsx +113 -113
- package/src/views/TableLayoutView/index.ts +6 -6
- package/storybook/main.ts +19 -19
- package/storybook/preview.tsx +84 -84
- package/storybook/vitest.setup.ts +6 -6
- package/tailwind.config.js +128 -128
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# 🎯 Prompt Template: Crear/Corregir Componentes
|
|
2
|
+
|
|
3
|
+
## ✅ Crear Componente Nuevo
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
Usando el agente @.claude\agents\siesa-ui-kit-specialist.md CREA el componente [NOMBRE_COMPONENTE]
|
|
7
|
+
|
|
8
|
+
**Figma:** [LINK_FIGMA o "No disponible"]
|
|
9
|
+
|
|
10
|
+
**Proceso completo:**
|
|
11
|
+
1. Si hay Figma: extrae specs (colores, tamaños, espaciados, estados)
|
|
12
|
+
2. Revisa docs necesarias (colors.md, typography.md, spacing.md, shadows.md)
|
|
13
|
+
3. Usa Button como referencia de implementación
|
|
14
|
+
4. Genera estructura completa en src/components/[NOMBRE_COMPONENTE]/
|
|
15
|
+
5. Implementa usando tokens del sistema
|
|
16
|
+
6. Asegura dark mode completo en TODOS los elementos
|
|
17
|
+
7. Valida con npm run build
|
|
18
|
+
8. Crea stories con todos los estados y ejemplos
|
|
19
|
+
9. Genera README del componente
|
|
20
|
+
|
|
21
|
+
**Checklist obligatorio:**
|
|
22
|
+
- [ ] Todos los archivos necesarios (.tsx, .types.ts, .stories.tsx, index.ts, README.md)
|
|
23
|
+
- [ ] JSDoc completo con Usando el agente @see references
|
|
24
|
+
- [ ] Dark mode en todos los estados (hover, focus, active, disabled)
|
|
25
|
+
- [ ] Focus rings adaptativos
|
|
26
|
+
- [ ] Props con defaults y tipos estrictos
|
|
27
|
+
- [ ] Tokens del sistema (NO colores hardcodeados)
|
|
28
|
+
- [ ] Build sin errores
|
|
29
|
+
- [ ] Stories con ejemplos completos
|
|
30
|
+
- [ ] Pixel-perfect vs Figma (si aplica)
|
|
31
|
+
|
|
32
|
+
Reporta detalladamente todos los cambios realizados.
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## 🔧 Corregir Componente Existente
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
Usando el agente @.claude\agents\siesa-ui-kit-specialist.md CORRIGE el componente [NOMBRE_COMPONENTE]
|
|
41
|
+
|
|
42
|
+
**Figma:** [LINK_FIGMA o "No disponible"]
|
|
43
|
+
|
|
44
|
+
**Proceso completo:**
|
|
45
|
+
1. Si hay Figma: extrae specs (colores, tamaños, espaciados, estados)
|
|
46
|
+
2. Revisa docs necesarias (colors.md, typography.md, spacing.md, shadows.md)
|
|
47
|
+
3. Usa Button como referencia de implementación
|
|
48
|
+
4. Compara con implementación actual en src/components/[NOMBRE_COMPONENTE]/
|
|
49
|
+
5. Corrige usando tokens del sistema
|
|
50
|
+
6. Asegura dark mode completo en TODOS los elementos
|
|
51
|
+
7. Valida con npm run build
|
|
52
|
+
8. Actualiza stories con todos los estados y ejemplos
|
|
53
|
+
9. Actualiza README del componente si es necesario
|
|
54
|
+
|
|
55
|
+
**Checklist obligatorio:**
|
|
56
|
+
- [ ] Todos los archivos actualizados (.tsx, .types.ts, .stories.tsx)
|
|
57
|
+
- [ ] JSDoc completo con Usando el agente @see references
|
|
58
|
+
- [ ] Dark mode en todos los estados (hover, focus, active, disabled)
|
|
59
|
+
- [ ] Focus rings adaptativos
|
|
60
|
+
- [ ] Props con defaults y tipos estrictos
|
|
61
|
+
- [ ] Tokens del sistema (NO colores hardcodeados)
|
|
62
|
+
- [ ] Build sin errores
|
|
63
|
+
- [ ] Stories con ejemplos completos
|
|
64
|
+
- [ ] Pixel-perfect vs Figma (si aplica)
|
|
65
|
+
|
|
66
|
+
Reporta detalladamente todos los cambios realizados.
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## 🖼️ Crear/Corregir Vista (Página Completa)
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
Usando el agente @.claude\agents\siesa-ui-kit-specialist.md CREA la vista [NOMBRE_VISTA]
|
|
75
|
+
|
|
76
|
+
**Figma:** [LINK_FIGMA]
|
|
77
|
+
|
|
78
|
+
**Descripción:** [Breve descripción de la vista/página]
|
|
79
|
+
|
|
80
|
+
**Proceso completo:**
|
|
81
|
+
1. Analiza el diseño de Figma en detalle (layout, composición, espaciado)
|
|
82
|
+
2. Identifica componentes existentes en src/components/ que se pueden reutilizar
|
|
83
|
+
3. Si faltan componentes, créalos primero siguiendo el template de componentes
|
|
84
|
+
4. Revisa docs de layout patterns (si existen) o usa principios de spacing.md
|
|
85
|
+
5. Crea estructura en src/views/[NOMBRE_VISTA]/ con:
|
|
86
|
+
- [NombreVista].tsx (componente principal)
|
|
87
|
+
- [NombreVista].stories.tsx (Storybook)
|
|
88
|
+
- index.ts (exports)
|
|
89
|
+
- README.md (documentación)
|
|
90
|
+
6. Compone la vista usando componentes del Storybook
|
|
91
|
+
7. Aplica responsive design (mobile-first)
|
|
92
|
+
8. Asegura dark mode completo
|
|
93
|
+
9. Valida con npm run build y npm run storybook
|
|
94
|
+
10. Documenta uso y props en README
|
|
95
|
+
|
|
96
|
+
**Checklist obligatorio:**
|
|
97
|
+
- [ ] Análisis completo de Figma (secciones, componentes, layout)
|
|
98
|
+
- [ ] Todos los componentes necesarios existen o fueron creados
|
|
99
|
+
- [ ] Composición correcta con componentes del sistema
|
|
100
|
+
- [ ] Responsive design (breakpoints: sm, md, lg, xl)
|
|
101
|
+
- [ ] Dark mode en toda la vista
|
|
102
|
+
- [ ] Tokens del sistema para espaciado y colores
|
|
103
|
+
- [ ] Stories con diferentes estados (empty, loading, error, success)
|
|
104
|
+
- [ ] README con capturas y ejemplos de uso
|
|
105
|
+
- [ ] Build sin errores
|
|
106
|
+
- [ ] Pixel-perfect vs Figma
|
|
107
|
+
|
|
108
|
+
**Estructura esperada:**
|
|
109
|
+
src/views/[NombreVista]/
|
|
110
|
+
├── [NombreVista].tsx
|
|
111
|
+
├── [NombreVista].stories.tsx
|
|
112
|
+
├── index.ts
|
|
113
|
+
└── README.md
|
|
114
|
+
|
|
115
|
+
Reporta detalladamente la composición y componentes utilizados.
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
**Versión**: 1.1.0
|
|
121
|
+
**Última actualización**: 2025-11-12
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# 🎯 Prompt Templates
|
|
2
|
+
|
|
3
|
+
> **Nota:** El agente `@siesa-ui-kit-specialist` contiene toda la documentación técnica detallada (tokens, dark mode, patrones, checklists, etc.). Estos prompts son atajos concisos.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## ✅ Crear Componente
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
@siesa-ui-kit-specialist CREA el componente [NOMBRE]
|
|
11
|
+
|
|
12
|
+
Figma: [LINK o "No disponible"]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## 🖼️ Crear Vista
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
@siesa-ui-kit-specialist CREA la vista [NOMBRE]
|
|
21
|
+
|
|
22
|
+
Figma: [LINK o "No disponible"]
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
**Versión**: 2.0.0
|
|
28
|
+
**Última actualización**: 2025-12-09
|
|
@@ -1,7 +1,72 @@
|
|
|
1
1
|
{
|
|
2
2
|
"permissions": {
|
|
3
3
|
"allow": [
|
|
4
|
-
"Bash(
|
|
5
|
-
|
|
4
|
+
"Bash(claude mcp add:*)",
|
|
5
|
+
"Bash(where:*)",
|
|
6
|
+
"Bash(set CLAUDE_CODE_GIT_BASH_PATH=C:UsersssanchezeAppDataLocalProgramsGitusrbinbash.exe)",
|
|
7
|
+
"Bash(setx CLAUDE_CODE_GIT_BASH_PATH \"C:\\Users\\ssancheze\\AppData\\Local\\Programs\\Git\\usr\\bin\\bash.exe\")",
|
|
8
|
+
"Bash($env:CLAUDE_CODE_GIT_BASH_PATH=\"C:\\Users\\ssancheze\\AppData\\Local\\Programs\\Git\\usr\\bin\\bash.exe\")",
|
|
9
|
+
"Bash(export CLAUDE_CODE_GIT_BASH_PATH=\"C:\\Users\\ssancheze\\AppData\\Local\\Programs\\Git\\usr\\bin\\bash.exe\")",
|
|
10
|
+
"Bash(claude mcp list:*)",
|
|
11
|
+
"Bash(claude mcp)",
|
|
12
|
+
"Bash(nul)",
|
|
13
|
+
"WebSearch",
|
|
14
|
+
"Bash(cmd /c npx -y figma-developer-mcp --help)",
|
|
15
|
+
"Bash(npx -y figma-developer-mcp:*)",
|
|
16
|
+
"Bash(claude mcp get:*)",
|
|
17
|
+
"Bash(npm install:*)",
|
|
18
|
+
"Bash(npx tailwindcss init:*)",
|
|
19
|
+
"Bash(npm run storybook:*)",
|
|
20
|
+
"Bash(taskkill:*)",
|
|
21
|
+
"Bash(npx kill-port:*)",
|
|
22
|
+
"Bash(cmd /c claude mcp add --transport http figma-desktop http://127.0.0.1:3845/mcp)",
|
|
23
|
+
"Bash(dir \"C:\\Users\\ssancheze\\AppData\\Local\\Programs\\Git\")",
|
|
24
|
+
"Bash(dir /B:*)",
|
|
25
|
+
"WebFetch(domain:www.figma.com)",
|
|
26
|
+
"mcp__figma-desktop__get_design_context",
|
|
27
|
+
"mcp__figma-desktop__get_variable_defs",
|
|
28
|
+
"mcp__figma-desktop__get_screenshot",
|
|
29
|
+
"Bash(npm run build:*)",
|
|
30
|
+
"Bash(timeout 10 npm run dev:*)",
|
|
31
|
+
"Bash(npm run dev:*)",
|
|
32
|
+
"mcp__figma-desktop__get_metadata",
|
|
33
|
+
"Bash(netstat:*)",
|
|
34
|
+
"Bash(findstr:*)",
|
|
35
|
+
"WebFetch(domain:storybook.js.org)",
|
|
36
|
+
"Bash(if not exist docs mkdir docs)",
|
|
37
|
+
"Bash(npm uninstall:*)",
|
|
38
|
+
"Bash(move postcss.config.js postcss.config.cjs)",
|
|
39
|
+
"Bash(del .storybookpreview.ts)",
|
|
40
|
+
"Bash(python update_stories.py:*)",
|
|
41
|
+
"Bash(del update_stories.py)",
|
|
42
|
+
"Bash(timeout /t 15 /nobreak:*)",
|
|
43
|
+
"Bash(dir:*)",
|
|
44
|
+
"Bash(git mv:*)",
|
|
45
|
+
"mcp__figma__get_metadata",
|
|
46
|
+
"mcp__figma__get_design_context",
|
|
47
|
+
"mcp__figma__get_screenshot",
|
|
48
|
+
"Bash(if not exist \"C:\\Users\\ssancheze\\Desktop\\Dev\\SiesaUIKit\\src\\components\\Navbar\" mkdir \"C:\\Users\\ssancheze\\Desktop\\Dev\\SiesaUIKit\\src\\components\\Navbar\")",
|
|
49
|
+
"Bash(timeout:*)",
|
|
50
|
+
"Bash(ping:*)",
|
|
51
|
+
"Bash(if not exist \"public\" mkdir \"public\")",
|
|
52
|
+
"Bash(if not exist \"C:\\Users\\ssancheze\\Desktop\\Dev\\SiesaUIKit\\src\\components\\NavigationRail\" mkdir \"C:\\Users\\ssancheze\\Desktop\\Dev\\SiesaUIKit\\src\\components\\NavigationRail\")",
|
|
53
|
+
"Bash(mkdir:*)",
|
|
54
|
+
"Bash(find:*)",
|
|
55
|
+
"Bash(curl:*)",
|
|
56
|
+
"mcp__figma__get_variable_defs",
|
|
57
|
+
"Bash(move:*)",
|
|
58
|
+
"Bash(cmd /c move:*)",
|
|
59
|
+
"Bash(cmd /c:*)",
|
|
60
|
+
"Bash(cat:*)",
|
|
61
|
+
"Bash(git config:*)",
|
|
62
|
+
"Bash(cmdkey /list:*)",
|
|
63
|
+
"Bash(git credential:*)",
|
|
64
|
+
"Bash(git credential-manager:*)",
|
|
65
|
+
"Bash(printf:*)",
|
|
66
|
+
"Bash(if not exist \"C:\\Users\\ssancheze\\Desktop\\Dev\\SiesaUIKit\\src\\views\\ListView\" mkdir \"C:\\Users\\ssancheze\\Desktop\\Dev\\SiesaUIKit\\src\\views\\ListView\")",
|
|
67
|
+
"Bash(npm run build:lib:*)"
|
|
68
|
+
],
|
|
69
|
+
"deny": [],
|
|
70
|
+
"ask": []
|
|
6
71
|
}
|
|
7
72
|
}
|
|
@@ -3,23 +3,24 @@ interface IconProps {
|
|
|
3
3
|
className?: string;
|
|
4
4
|
}
|
|
5
5
|
/**
|
|
6
|
-
* Icono Plus (heroicons
|
|
6
|
+
* Icono Plus (heroicons/plus)
|
|
7
7
|
*/
|
|
8
8
|
export declare const PlusIcon: React.FC<IconProps>;
|
|
9
9
|
/**
|
|
10
|
-
* Icono ChevronDown (heroicons
|
|
10
|
+
* Icono ChevronDown (heroicons/chevron-down)
|
|
11
11
|
*/
|
|
12
12
|
export declare const ChevronDownIcon: React.FC<IconProps>;
|
|
13
13
|
/**
|
|
14
|
-
* Icono ArrowRight (heroicons
|
|
14
|
+
* Icono ArrowRight (heroicons/arrow-right)
|
|
15
|
+
* @param {string} className Clases de Tailwind
|
|
15
16
|
*/
|
|
16
17
|
export declare const ArrowRightIcon: React.FC<IconProps>;
|
|
17
18
|
/**
|
|
18
|
-
* Icono Check (heroicons
|
|
19
|
+
* Icono Check (heroicons/check)
|
|
19
20
|
*/
|
|
20
21
|
export declare const CheckIcon: React.FC<IconProps>;
|
|
21
22
|
/**
|
|
22
|
-
* Icono X (heroicons
|
|
23
|
+
* Icono X (heroicons/x-mark)
|
|
23
24
|
*/
|
|
24
25
|
export declare const XIcon: React.FC<IconProps>;
|
|
25
26
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../../src/components/Button/icons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../../src/components/Button/icons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,UAAU,SAAS;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAExC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAE/C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAE9C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAEzC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAErC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownItemCollapsible.d.ts","sourceRoot":"","sources":["../../../src/components/DropdownItemCollapsible/DropdownItemCollapsible.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,KAAK,EACV,4BAA4B,EAE7B,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"DropdownItemCollapsible.d.ts","sourceRoot":"","sources":["../../../src/components/DropdownItemCollapsible/DropdownItemCollapsible.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,KAAK,EACV,4BAA4B,EAE7B,MAAM,iCAAiC,CAAC;AAIzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+FG;AACH,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,4BAA4B,CAwM1E,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
|
|
@@ -61,6 +61,27 @@ export interface DropdownItemCollapsibleProps {
|
|
|
61
61
|
* @default true
|
|
62
62
|
*/
|
|
63
63
|
showDivider?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Si el item está seleccionado (activo)
|
|
66
|
+
* Útil para NavigationRailTypes en modo expandido
|
|
67
|
+
* @default false
|
|
68
|
+
*/
|
|
69
|
+
selected?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Si mostrar un badge de notificación (dot rojo)
|
|
72
|
+
* @default false
|
|
73
|
+
*/
|
|
74
|
+
badge?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Número a mostrar en el badge (máximo 99+)
|
|
77
|
+
* Si se proporciona, se muestra en lugar del dot rojo
|
|
78
|
+
*/
|
|
79
|
+
badgeCount?: number;
|
|
80
|
+
/**
|
|
81
|
+
* Color del badge ('red', 'blue', etc.)
|
|
82
|
+
* @default 'red'
|
|
83
|
+
*/
|
|
84
|
+
badgeColor?: 'red' | 'blue' | 'amber' | 'green' | 'purple';
|
|
64
85
|
/**
|
|
65
86
|
* Clases CSS adicionales
|
|
66
87
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownItemCollapsible.types.d.ts","sourceRoot":"","sources":["../../../src/components/DropdownItemCollapsible/DropdownItemCollapsible.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;;;GAIG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,iCAAiC,EAAE,CAAC;IAE/C;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAEvC;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAE3D;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,iCAAiC;IAChD;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IAExD;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
1
|
+
{"version":3,"file":"DropdownItemCollapsible.types.d.ts","sourceRoot":"","sources":["../../../src/components/DropdownItemCollapsible/DropdownItemCollapsible.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;;;GAIG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,iCAAiC,EAAE,CAAC;IAE/C;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAEvC;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAE3D;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,UAAU,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAC;IAE3D;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,iCAAiC;IAChD;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IAExD;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { NavigationRailCommercialProps } from './NavigationRailCommercial.types';
|
|
3
|
+
/**
|
|
4
|
+
* NavigationRailCommercial del sistema de diseño Siesa
|
|
5
|
+
*
|
|
6
|
+
* Componente de navegación lateral especializado para aplicaciones comerciales
|
|
7
|
+
* que combina NavigationRailTypes y NavigationRailPanel para crear una experiencia
|
|
8
|
+
* de navegación completa con múltiples estados:
|
|
9
|
+
*
|
|
10
|
+
* - **Collapsed**: Barra compacta de 80px con solo iconos
|
|
11
|
+
* - **Expanded**: Barra expandida de 215px con labels
|
|
12
|
+
* - **Hover**: Panel lateral con submenú del item (se muestra al hacer hover)
|
|
13
|
+
* - **Searcher**: Panel lateral con búsqueda y recientes
|
|
14
|
+
*
|
|
15
|
+
* **Características:**
|
|
16
|
+
* - Reutiliza NavigationRailTypes para la barra lateral principal
|
|
17
|
+
* - Reutiliza NavigationRailPanel para los paneles de hover y búsqueda
|
|
18
|
+
* - Gestión de estado integrada (collapsed, expanded, hover, searcher)
|
|
19
|
+
* - Dark mode completo en todos los elementos
|
|
20
|
+
* - Focus rings adaptativos
|
|
21
|
+
* - Transiciones suaves entre estados
|
|
22
|
+
*
|
|
23
|
+
* **Especificaciones de Figma:**
|
|
24
|
+
* - NavigationRailTypes: 80px (collapsed) / 215px (expanded)
|
|
25
|
+
* - NavigationRailPanel: 248px width, altura variable
|
|
26
|
+
* - Posición panel: left 80px desde el rail
|
|
27
|
+
* - Transiciones: 300ms ease-in-out
|
|
28
|
+
*
|
|
29
|
+
* **Estructura:**
|
|
30
|
+
* ```
|
|
31
|
+
* ┌────────────────────────────────────┐
|
|
32
|
+
* │ NavigationRailCommercial │
|
|
33
|
+
* │ ┌──────────┬─────────────────┐ │
|
|
34
|
+
* │ │ Rail │ Panel │ │
|
|
35
|
+
* │ │ Types │ (hover/search) │ │
|
|
36
|
+
* │ │ (base) │ (opcional) │ │
|
|
37
|
+
* │ └──────────┴─────────────────┘ │
|
|
38
|
+
* └────────────────────────────────────┘
|
|
39
|
+
* ```
|
|
40
|
+
*
|
|
41
|
+
* **Estados de Items:**
|
|
42
|
+
* - `default`: Sin interacción
|
|
43
|
+
* - `hover`: Muestra panel con submenú (si tiene children)
|
|
44
|
+
* - `active`: Item seleccionado, fondo custom-primary
|
|
45
|
+
* - `disabled`: Opacity 50%, sin interacción
|
|
46
|
+
*
|
|
47
|
+
* **Colores (Light Mode):**
|
|
48
|
+
* - Background rail: #ffffff (bg-primary)
|
|
49
|
+
* - Background panel: #ffffff (bg-primary)
|
|
50
|
+
* - Borders: #e4e4e7 (border-primary)
|
|
51
|
+
* - Text: #18181b (content-primary)
|
|
52
|
+
* - Icons: #a1a1aa (content-secondary)
|
|
53
|
+
* - Search button: #0e79fd (primary-custom-600)
|
|
54
|
+
*
|
|
55
|
+
* **Colores (Dark Mode):**
|
|
56
|
+
* - Background rail: #18181b (dark-bg-primary)
|
|
57
|
+
* - Background panel: #18181b (dark-bg-primary)
|
|
58
|
+
* - Borders: #71717a (dark-border-primary)
|
|
59
|
+
* - Text: #f4f4f5 (dark-content-primary)
|
|
60
|
+
* - Icons: #a1a1aa (content-secondary)
|
|
61
|
+
*
|
|
62
|
+
* **Tipografía:**
|
|
63
|
+
* - Items: Paragraph/Small (14px Regular, line-height 20px)
|
|
64
|
+
* - Panel heading: Label/Small (14px Bold)
|
|
65
|
+
* - Section headings: Paragraph/Tiny (12px Regular)
|
|
66
|
+
*
|
|
67
|
+
* **Implementación de Estados:**
|
|
68
|
+
* - `collapsed` + hover en item → state='hover' + muestra panel
|
|
69
|
+
* - `collapsed` + click en search → state='searcher' + muestra panel búsqueda
|
|
70
|
+
* - `expanded` → NavigationRailTypes expandido con Input integrado
|
|
71
|
+
* - Click en "Colapsar" → vuelve a collapsed
|
|
72
|
+
*
|
|
73
|
+
* @see docs/colors.md - Sistema de colores
|
|
74
|
+
* @see docs/typography.md - Sistema tipográfico
|
|
75
|
+
* @see docs/spacing.md - Sistema de espaciado
|
|
76
|
+
* @see ../NavigationRailTypes - Componente reutilizado para barra lateral
|
|
77
|
+
* @see ../NavigationRailPanel - Componente reutilizado para paneles
|
|
78
|
+
* @see https://www.figma.com/design/5XNqf2YTxvwemxwo1LMQ6j/Siesa-UI-Kit?node-id=6146-34487
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* ```tsx
|
|
82
|
+
* // Uso básico en modo collapsed
|
|
83
|
+
* const items = [
|
|
84
|
+
* {
|
|
85
|
+
* id: 'admin',
|
|
86
|
+
* label: 'Administración',
|
|
87
|
+
* icon: <Cog6ToothIcon />,
|
|
88
|
+
* isCollapsible: true,
|
|
89
|
+
* children: [
|
|
90
|
+
* { id: 'users', label: 'Usuarios' },
|
|
91
|
+
* { id: 'roles', label: 'Roles' },
|
|
92
|
+
* ],
|
|
93
|
+
* },
|
|
94
|
+
* {
|
|
95
|
+
* id: 'sales',
|
|
96
|
+
* label: 'Ventas',
|
|
97
|
+
* icon: <ShoppingCartIcon />,
|
|
98
|
+
* },
|
|
99
|
+
* ];
|
|
100
|
+
*
|
|
101
|
+
* <NavigationRailCommercial
|
|
102
|
+
* state="collapsed"
|
|
103
|
+
* items={items}
|
|
104
|
+
* onItemClick={(item) => console.log('Clicked:', item.label)}
|
|
105
|
+
* onItemHover={(item) => console.log('Hover:', item.label)}
|
|
106
|
+
* />
|
|
107
|
+
*
|
|
108
|
+
* // Uso con control de estado externo
|
|
109
|
+
* const [state, setState] = useState('collapsed');
|
|
110
|
+
*
|
|
111
|
+
* <NavigationRailCommercial
|
|
112
|
+
* state={state}
|
|
113
|
+
* items={items}
|
|
114
|
+
* onStateChange={setState}
|
|
115
|
+
* />
|
|
116
|
+
* ```
|
|
117
|
+
*
|
|
118
|
+
* @see NavigationRailCommercial.types.ts - Props e interfaces
|
|
119
|
+
*/
|
|
120
|
+
export declare const NavigationRailCommercial: React.ForwardRefExoticComponent<NavigationRailCommercialProps & React.RefAttributes<HTMLDivElement>>;
|
|
121
|
+
export default NavigationRailCommercial;
|
|
122
|
+
//# sourceMappingURL=NavigationRailCommercial.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavigationRailCommercial.d.ts","sourceRoot":"","sources":["../../../src/components/NavigationRailCommercial/NavigationRailCommercial.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,KAAK,EACV,6BAA6B,EAE9B,MAAM,kCAAkC,CAAC;AAK1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoHG;AACH,eAAO,MAAM,wBAAwB,sGA0KpC,CAAC;AAIF,eAAe,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Definición de un item de menú para el NavigationRailCommercial
|
|
4
|
+
*/
|
|
5
|
+
export interface NavigationRailCommercialMenuItem {
|
|
6
|
+
/**
|
|
7
|
+
* Identificador único del item
|
|
8
|
+
*/
|
|
9
|
+
id: string;
|
|
10
|
+
/**
|
|
11
|
+
* Etiqueta/texto del item (visible en modo expanded)
|
|
12
|
+
*/
|
|
13
|
+
label: string;
|
|
14
|
+
/**
|
|
15
|
+
* Icono del item (16x16px recomendado)
|
|
16
|
+
*/
|
|
17
|
+
icon: ReactNode;
|
|
18
|
+
/**
|
|
19
|
+
* Si el item es colapsable (tiene submenu)
|
|
20
|
+
* @default false
|
|
21
|
+
*/
|
|
22
|
+
isCollapsible?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Items hijos (solo si isCollapsible es true)
|
|
25
|
+
*/
|
|
26
|
+
children?: NavigationRailCommercialMenuItem[];
|
|
27
|
+
/**
|
|
28
|
+
* Si el item colapsable está abierto por defecto (solo si isCollapsible es true)
|
|
29
|
+
* @default false
|
|
30
|
+
*/
|
|
31
|
+
defaultOpen?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Si el item está seleccionado/activo
|
|
34
|
+
* @default false
|
|
35
|
+
*/
|
|
36
|
+
active?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Si el item está deshabilitado
|
|
39
|
+
* @default false
|
|
40
|
+
*/
|
|
41
|
+
disabled?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Callback cuando se hace click en el item
|
|
44
|
+
*/
|
|
45
|
+
onClick?: () => void;
|
|
46
|
+
/**
|
|
47
|
+
* Badge de notificación
|
|
48
|
+
* @default false
|
|
49
|
+
*/
|
|
50
|
+
badge?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Contador de notificaciones (si badge es true)
|
|
53
|
+
*/
|
|
54
|
+
badgeCount?: number;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Props del componente NavigationRailCommercial
|
|
58
|
+
*
|
|
59
|
+
* @see https://www.figma.com/design/5XNqf2YTxvwemxwo1LMQ6j/Siesa-UI-Kit?node-id=6146-34487
|
|
60
|
+
*/
|
|
61
|
+
export interface NavigationRailCommercialProps {
|
|
62
|
+
/**
|
|
63
|
+
* Estado del rail:
|
|
64
|
+
* - `collapsed`: 80px width, solo iconos
|
|
65
|
+
* - `expanded`: 215px width, con labels
|
|
66
|
+
* - `hover`: muestra panel lateral con submenu (estado temporal)
|
|
67
|
+
* - `searcher`: muestra panel lateral con búsqueda (estado temporal)
|
|
68
|
+
* @default 'collapsed'
|
|
69
|
+
*/
|
|
70
|
+
state?: 'collapsed' | 'expanded' | 'hover' | 'searcher';
|
|
71
|
+
/**
|
|
72
|
+
* Items de menú a mostrar en la barra
|
|
73
|
+
*/
|
|
74
|
+
items?: NavigationRailCommercialMenuItem[];
|
|
75
|
+
/**
|
|
76
|
+
* Panel lateral que se muestra en estados hover/searcher
|
|
77
|
+
* Contiene el menú detallado del item seleccionado
|
|
78
|
+
*/
|
|
79
|
+
panelContent?: {
|
|
80
|
+
/**
|
|
81
|
+
* Título del panel (ej: "Administración")
|
|
82
|
+
*/
|
|
83
|
+
heading?: string;
|
|
84
|
+
/**
|
|
85
|
+
* Items del panel
|
|
86
|
+
*/
|
|
87
|
+
items?: NavigationRailCommercialMenuItem[];
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* Callback cuando cambia el estado del rail
|
|
91
|
+
* @param state - nuevo estado
|
|
92
|
+
*/
|
|
93
|
+
onStateChange?: (state: NavigationRailCommercialProps['state']) => void;
|
|
94
|
+
/**
|
|
95
|
+
* Callback cuando se hace click en un item
|
|
96
|
+
* @param item - item clickeado
|
|
97
|
+
*/
|
|
98
|
+
onItemClick?: (item: NavigationRailCommercialMenuItem) => void;
|
|
99
|
+
/**
|
|
100
|
+
* Callback cuando se hace hover en un item (para mostrar panel)
|
|
101
|
+
* @param item - item con hover
|
|
102
|
+
*/
|
|
103
|
+
onItemHover?: (item: NavigationRailCommercialMenuItem) => void;
|
|
104
|
+
/**
|
|
105
|
+
* Labels de internacionalización
|
|
106
|
+
*/
|
|
107
|
+
labels?: {
|
|
108
|
+
/**
|
|
109
|
+
* Placeholder del input de búsqueda
|
|
110
|
+
* @default 'Buscar módulo'
|
|
111
|
+
*/
|
|
112
|
+
searchPlaceholder?: string;
|
|
113
|
+
/**
|
|
114
|
+
* Label del botón colapsar
|
|
115
|
+
* @default 'Colapsar'
|
|
116
|
+
*/
|
|
117
|
+
collapseButton?: string;
|
|
118
|
+
/**
|
|
119
|
+
* Label sección recientes (panel búsqueda)
|
|
120
|
+
* @default 'Recientes'
|
|
121
|
+
*/
|
|
122
|
+
recentSection?: string;
|
|
123
|
+
/**
|
|
124
|
+
* Label sección opciones frecuentes (panel búsqueda)
|
|
125
|
+
* @default 'Opciones frecuentes'
|
|
126
|
+
*/
|
|
127
|
+
frequentSection?: string;
|
|
128
|
+
};
|
|
129
|
+
/**
|
|
130
|
+
* Clases CSS adicionales
|
|
131
|
+
*/
|
|
132
|
+
className?: string;
|
|
133
|
+
/**
|
|
134
|
+
* Si mostrar el botón de búsqueda (en modo collapsed)
|
|
135
|
+
* @default true
|
|
136
|
+
*/
|
|
137
|
+
showSearchButton?: boolean;
|
|
138
|
+
}
|
|
139
|
+
//# sourceMappingURL=NavigationRailCommercial.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavigationRailCommercial.types.d.ts","sourceRoot":"","sources":["../../../src/components/NavigationRailCommercial/NavigationRailCommercial.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAC/C;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,IAAI,EAAE,SAAS,CAAC;IAEhB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,QAAQ,CAAC,EAAE,gCAAgC,EAAE,CAAC;IAE9C;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,WAAW,GAAG,UAAU,GAAG,OAAO,GAAG,UAAU,CAAC;IAExD;;OAEG;IACH,KAAK,CAAC,EAAE,gCAAgC,EAAE,CAAC;IAE3C;;;OAGG;IACH,YAAY,CAAC,EAAE;QACb;;WAEG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;QAEjB;;WAEG;QACH,KAAK,CAAC,EAAE,gCAAgC,EAAE,CAAC;KAC5C,CAAC;IAEF;;;OAGG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,6BAA6B,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IAExE;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,gCAAgC,KAAK,IAAI,CAAC;IAE/D;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,gCAAgC,KAAK,IAAI,CAAC;IAE/D;;OAEG;IACH,MAAM,CAAC,EAAE;QACP;;;WAGG;QACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAE3B;;;WAGG;QACH,cAAc,CAAC,EAAE,MAAM,CAAC;QAExB;;;WAGG;QACH,aAAa,CAAC,EAAE,MAAM,CAAC;QAEvB;;;WAGG;QACH,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B,CAAC;IAEF;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Iconos estándar para NavigationRailCommercial
|
|
4
|
+
* Basados en Heroicons 20x20 solid (excepto ClockIcon que es 24x24 outline)
|
|
5
|
+
* Consistente con NavigationRailTypes
|
|
6
|
+
*
|
|
7
|
+
* @see docs/icons.md - Sistema de iconos del proyecto
|
|
8
|
+
*/
|
|
9
|
+
export declare const MagnifyingGlassIcon: React.FC<{
|
|
10
|
+
className?: string;
|
|
11
|
+
}>;
|
|
12
|
+
export declare const ChevronRightIcon: React.FC<{
|
|
13
|
+
className?: string;
|
|
14
|
+
}>;
|
|
15
|
+
export declare const ChevronLeftIcon: React.FC<{
|
|
16
|
+
className?: string;
|
|
17
|
+
}>;
|
|
18
|
+
export declare const Cog6ToothIcon: React.FC<{
|
|
19
|
+
className?: string;
|
|
20
|
+
}>;
|
|
21
|
+
export declare const ShoppingCartIcon: React.FC<{
|
|
22
|
+
className?: string;
|
|
23
|
+
}>;
|
|
24
|
+
export declare const CubeIcon: React.FC<{
|
|
25
|
+
className?: string;
|
|
26
|
+
}>;
|
|
27
|
+
export declare const DocumentIcon: React.FC<{
|
|
28
|
+
className?: string;
|
|
29
|
+
}>;
|
|
30
|
+
export declare const ClockIcon: React.FC<{
|
|
31
|
+
className?: string;
|
|
32
|
+
}>;
|
|
33
|
+
//# sourceMappingURL=icons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../../src/components/NavigationRailCommercial/icons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAe1B;;;;;;GAMG;AAEH,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAEhE,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAE7D,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAE5D,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAE1D,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAE7D,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAErD,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAEzD,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAEtD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/NavigationRailCommercial/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,YAAY,EACV,6BAA6B,EAC7B,gCAAgC,GACjC,MAAM,kCAAkC,CAAC;AAC1C,cAAc,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationRailItem.d.ts","sourceRoot":"","sources":["../../../src/components/NavigationRailItem/NavigationRailItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAE1E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqFG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,
|
|
1
|
+
{"version":3,"file":"NavigationRailItem.d.ts","sourceRoot":"","sources":["../../../src/components/NavigationRailItem/NavigationRailItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAE1E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqFG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CA8NhE,CAAC"}
|
|
@@ -100,6 +100,13 @@ export interface NavigationRailItemProps {
|
|
|
100
100
|
* incluso si está en estado selected.
|
|
101
101
|
*/
|
|
102
102
|
onClick?: () => void;
|
|
103
|
+
/**
|
|
104
|
+
* Handler para evento mouse enter del item
|
|
105
|
+
*
|
|
106
|
+
* Se ejecuta cuando el cursor entra en el área del item.
|
|
107
|
+
* Útil para mostrar paneles o menús contextuales.
|
|
108
|
+
*/
|
|
109
|
+
onMouseEnter?: () => void;
|
|
103
110
|
/**
|
|
104
111
|
* Label para accesibilidad (ARIA-label)
|
|
105
112
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationRailItem.types.d.ts","sourceRoot":"","sources":["../../../src/components/NavigationRailItem/NavigationRailItem.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;;;;;;;;OAUG;IACH,IAAI,EAAE,SAAS,CAAC;IAEhB;;;;;;OAMG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;;;;;;OASG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;;;;;;;;;OAUG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;;;;OAQG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,uBAAuB,GAAG,SAAS,GAAG,OAAO,GAAG,UAAU,GAAG,OAAO,GAAG,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"NavigationRailItem.types.d.ts","sourceRoot":"","sources":["../../../src/components/NavigationRailItem/NavigationRailItem.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;;;;;;;;OAUG;IACH,IAAI,EAAE,SAAS,CAAC;IAEhB;;;;;;OAMG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;;;;;;OASG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;;;;;;;;;OAUG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAE1B;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;;;;OAQG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,uBAAuB,GAAG,SAAS,GAAG,OAAO,GAAG,UAAU,GAAG,OAAO,GAAG,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationRailTypes.d.ts","sourceRoot":"","sources":["../../../src/components/NavigationRailTypes/NavigationRailTypes.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,KAAK,EAAE,wBAAwB,EAAsB,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"NavigationRailTypes.d.ts","sourceRoot":"","sources":["../../../src/components/NavigationRailTypes/NavigationRailTypes.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,KAAK,EAAE,wBAAwB,EAAsB,MAAM,6BAA6B,CAAC;AAQhG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6FG;AACH,eAAO,MAAM,mBAAmB,iGA+P/B,CAAC;AAIF,eAAe,mBAAmB,CAAC"}
|