siesa-ui-kit 1.0.3 → 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.
Files changed (290) hide show
  1. package/README.md +115 -115
  2. package/bin/install.cjs +502 -502
  3. package/bin/prepare-publish.cjs +28 -28
  4. package/bin/restore-folders.cjs +28 -28
  5. package/claude/agents/siesa-ui-kit-specialist.md +2445 -0
  6. package/claude/prompts/component-template.md +121 -0
  7. package/claude/prompts/siesa-ui-kit.md +28 -0
  8. package/claude/settings.local.json +72 -0
  9. package/dist/components/Button/icons.d.ts +6 -5
  10. package/dist/components/Button/icons.d.ts.map +1 -1
  11. package/dist/components/DropdownItemCollapsible/DropdownItemCollapsible.d.ts.map +1 -1
  12. package/dist/components/DropdownItemCollapsible/DropdownItemCollapsible.types.d.ts +21 -0
  13. package/dist/components/DropdownItemCollapsible/DropdownItemCollapsible.types.d.ts.map +1 -1
  14. package/dist/components/NavigationRailCommercial/NavigationRailCommercial.d.ts +122 -0
  15. package/dist/components/NavigationRailCommercial/NavigationRailCommercial.d.ts.map +1 -0
  16. package/dist/components/NavigationRailCommercial/NavigationRailCommercial.types.d.ts +139 -0
  17. package/dist/components/NavigationRailCommercial/NavigationRailCommercial.types.d.ts.map +1 -0
  18. package/dist/components/NavigationRailCommercial/icons.d.ts +33 -0
  19. package/dist/components/NavigationRailCommercial/icons.d.ts.map +1 -0
  20. package/dist/components/NavigationRailCommercial/index.d.ts +4 -0
  21. package/dist/components/NavigationRailCommercial/index.d.ts.map +1 -0
  22. package/dist/components/NavigationRailItem/NavigationRailItem.d.ts.map +1 -1
  23. package/dist/components/NavigationRailItem/NavigationRailItem.types.d.ts +7 -0
  24. package/dist/components/NavigationRailItem/NavigationRailItem.types.d.ts.map +1 -1
  25. package/dist/components/NavigationRailTypes/NavigationRailTypes.d.ts.map +1 -1
  26. package/dist/components/NavigationRailTypes/NavigationRailTypes.types.d.ts +41 -0
  27. package/dist/components/NavigationRailTypes/NavigationRailTypes.types.d.ts.map +1 -1
  28. package/dist/components/NavigationRailTypes/icons.d.ts +15 -29
  29. package/dist/components/NavigationRailTypes/icons.d.ts.map +1 -1
  30. package/dist/components/Select/Select.d.ts.map +1 -1
  31. package/dist/components/Select/icons.d.ts +6 -2
  32. package/dist/components/Select/icons.d.ts.map +1 -1
  33. package/dist/index.d.ts +32 -0
  34. package/dist/index.d.ts.map +1 -1
  35. package/dist/siesa-ui-kit.cjs +404 -190
  36. package/dist/siesa-ui-kit.cjs.map +1 -1
  37. package/dist/siesa-ui-kit.mjs +6590 -1506
  38. package/dist/siesa-ui-kit.mjs.map +1 -1
  39. package/dist/views/LayoutCommercial/LayoutCommercial.d.ts +48 -0
  40. package/dist/views/LayoutCommercial/LayoutCommercial.d.ts.map +1 -0
  41. package/dist/views/LayoutCommercial/LayoutCommercial.types.d.ts +49 -0
  42. package/dist/views/LayoutCommercial/LayoutCommercial.types.d.ts.map +1 -0
  43. package/dist/views/LayoutCommercial/index.d.ts +3 -0
  44. package/dist/views/LayoutCommercial/index.d.ts.map +1 -0
  45. package/docs/border-radius.md +1261 -0
  46. package/docs/colors.md +832 -0
  47. package/docs/dark-mode-guide.md +1426 -0
  48. package/docs/filters.md +1243 -0
  49. package/docs/icons.md +1264 -0
  50. package/docs/shadows.md +1377 -0
  51. package/docs/spacing.md +1684 -0
  52. package/docs/typography.md +1268 -0
  53. package/package.json +111 -103
  54. package/postcss.config.cjs +6 -0
  55. package/public/,Business Logo.png +0 -0
  56. package/public/.Siesa Logo.png +0 -0
  57. package/public/bg_siesa.png +0 -0
  58. package/public/siesa_logo_mobile.png +0 -0
  59. package/public/vite.svg +1 -0
  60. package/src/App.css +42 -0
  61. package/src/App.tsx +8 -0
  62. package/src/ButtonTest.tsx +147 -0
  63. package/src/assets/fonts/README.md +261 -0
  64. package/src/assets/fonts/SiesaBT/SiesaBT-Bold.otf +0 -0
  65. package/src/assets/fonts/SiesaBT/SiesaBT-Light.otf +0 -0
  66. package/src/assets/fonts/SiesaBT/SiesaBT-Regular.otf +0 -0
  67. package/src/assets/react.svg +1 -0
  68. package/src/components/Alert/Alert.stories.tsx +332 -0
  69. package/src/components/Alert/Alert.tsx +106 -0
  70. package/src/components/Alert/Alert.types.ts +54 -0
  71. package/src/components/Avatar/Avatar.stories.tsx +494 -0
  72. package/src/components/Avatar/Avatar.tsx +143 -0
  73. package/src/components/Avatar/Avatar.types.ts +53 -0
  74. package/src/components/Badge/Badge.stories.tsx +339 -0
  75. package/src/components/Badge/Badge.tsx +278 -0
  76. package/src/components/Badge/Badge.types.ts +58 -0
  77. package/src/components/Button/Button.stories.tsx +950 -0
  78. package/src/components/Button/Button.tsx +337 -0
  79. package/src/components/Button/Button.types.ts +180 -0
  80. package/src/components/Button/icons.tsx +48 -0
  81. package/src/components/Button/index.ts +3 -0
  82. package/src/components/Checkbox/Checkbox.stories.tsx +453 -0
  83. package/src/components/Checkbox/Checkbox.tsx +208 -0
  84. package/src/components/Checkbox/Checkbox.types.ts +61 -0
  85. package/src/components/DescriptionList/DescriptionList.stories.tsx +250 -0
  86. package/src/components/DescriptionList/DescriptionList.tsx +96 -0
  87. package/src/components/DescriptionList/DescriptionList.types.ts +29 -0
  88. package/src/components/Divider/Divider.stories.tsx +263 -0
  89. package/src/components/Divider/Divider.tsx +80 -0
  90. package/src/components/Divider/Divider.types.ts +24 -0
  91. package/src/components/Dropdown/Dropdown.stories.tsx +552 -0
  92. package/src/components/Dropdown/Dropdown.tsx +422 -0
  93. package/src/components/Dropdown/Dropdown.types.ts +146 -0
  94. package/src/components/Dropdown/README.md +266 -0
  95. package/src/components/Dropdown/icons.tsx +72 -0
  96. package/src/components/Dropdown/index.ts +8 -0
  97. package/src/components/DropdownItemCollapsible/DropdownItemCollapsible.stories.tsx +317 -0
  98. package/src/components/DropdownItemCollapsible/DropdownItemCollapsible.tsx +307 -0
  99. package/src/components/DropdownItemCollapsible/DropdownItemCollapsible.types.ts +136 -0
  100. package/src/components/DropdownItemCollapsible/README.md +264 -0
  101. package/src/components/DropdownItemCollapsible/icons.tsx +57 -0
  102. package/src/components/DropdownItemCollapsible/index.ts +12 -0
  103. package/src/components/DropdownItemHeading/DropdownItemHeading.stories.tsx +386 -0
  104. package/src/components/DropdownItemHeading/DropdownItemHeading.tsx +216 -0
  105. package/src/components/DropdownItemHeading/DropdownItemHeading.types.ts +93 -0
  106. package/src/components/DropdownItemHeading/README.md +573 -0
  107. package/src/components/DropdownItemHeading/icons.tsx +125 -0
  108. package/src/components/DropdownItemHeading/index.ts +3 -0
  109. package/src/components/Input/Input.stories.tsx +583 -0
  110. package/src/components/Input/Input.tsx +204 -0
  111. package/src/components/Input/Input.types.ts +80 -0
  112. package/src/components/Input/icons.tsx +145 -0
  113. package/src/components/Input/index.ts +2 -0
  114. package/src/components/LoginView/LoginView.stories.tsx +148 -0
  115. package/src/components/LoginView/LoginView.tsx +426 -0
  116. package/src/components/LoginView/LoginView.types.ts +52 -0
  117. package/src/components/LoginView/README.md +396 -0
  118. package/src/components/LoginView/icons.tsx +85 -0
  119. package/src/components/LoginView/index.ts +3 -0
  120. package/src/components/Navbar/Navbar.stories.tsx +810 -0
  121. package/src/components/Navbar/Navbar.tsx +755 -0
  122. package/src/components/Navbar/Navbar.types.ts +219 -0
  123. package/src/components/Navbar/README.md +279 -0
  124. package/src/components/Navbar/icons.tsx +102 -0
  125. package/src/components/Navbar/index.ts +8 -0
  126. package/src/components/NavigationBar/NavigationBar.stories.tsx +406 -0
  127. package/src/components/NavigationBar/NavigationBar.tsx +246 -0
  128. package/src/components/NavigationBar/NavigationBar.types.ts +74 -0
  129. package/src/components/NavigationBar/README.md +469 -0
  130. package/src/components/NavigationBar/index.ts +2 -0
  131. package/src/components/NavigationRail/NavigationRail.stories.tsx +417 -0
  132. package/src/components/NavigationRail/NavigationRail.tsx +418 -0
  133. package/src/components/NavigationRail/NavigationRail.types.ts +109 -0
  134. package/src/components/NavigationRail/README.md +224 -0
  135. package/src/components/NavigationRail/index.ts +2 -0
  136. package/src/components/NavigationRailCommercial/NavigationRailCommercial.stories.tsx +464 -0
  137. package/src/components/NavigationRailCommercial/NavigationRailCommercial.tsx +301 -0
  138. package/src/components/NavigationRailCommercial/NavigationRailCommercial.types.ts +162 -0
  139. package/src/components/NavigationRailCommercial/README.md +251 -0
  140. package/src/components/NavigationRailCommercial/icons.tsx +54 -0
  141. package/src/components/NavigationRailCommercial/index.ts +6 -0
  142. package/src/components/NavigationRailItem/NavigationRailItem.stories.tsx +667 -0
  143. package/src/components/NavigationRailItem/NavigationRailItem.tsx +314 -0
  144. package/src/components/NavigationRailItem/NavigationRailItem.types.ts +175 -0
  145. package/src/components/NavigationRailItem/README.md +476 -0
  146. package/src/components/NavigationRailItem/index.ts +2 -0
  147. package/src/components/NavigationRailPanel/NavigationRailPanel.stories.tsx +462 -0
  148. package/src/components/NavigationRailPanel/NavigationRailPanel.tsx +332 -0
  149. package/src/components/NavigationRailPanel/NavigationRailPanel.types.ts +178 -0
  150. package/src/components/NavigationRailPanel/README.md +461 -0
  151. package/src/components/NavigationRailPanel/index.ts +6 -0
  152. package/src/components/NavigationRailTypes/NavigationRailTypes.stories.tsx +682 -0
  153. package/src/components/NavigationRailTypes/NavigationRailTypes.tsx +363 -0
  154. package/src/components/NavigationRailTypes/NavigationRailTypes.types.ts +178 -0
  155. package/src/components/NavigationRailTypes/README.md +573 -0
  156. package/src/components/NavigationRailTypes/icons.tsx +76 -0
  157. package/src/components/NavigationRailTypes/index.ts +7 -0
  158. package/src/components/Notification/Notification.stories.tsx +513 -0
  159. package/src/components/Notification/Notification.tsx +145 -0
  160. package/src/components/Notification/Notification.types.ts +142 -0
  161. package/src/components/Notification/README.md +409 -0
  162. package/src/components/Notification/index.ts +3 -0
  163. package/src/components/POSConvention/POSConvention.stories.tsx +235 -0
  164. package/src/components/POSConvention/POSConvention.tsx +129 -0
  165. package/src/components/POSConvention/POSConvention.types.ts +38 -0
  166. package/src/components/POSConvention/README.md +123 -0
  167. package/src/components/POSConvention/icons.tsx +45 -0
  168. package/src/components/POSConvention/index.ts +3 -0
  169. package/src/components/POSLocationButton/POSLocationButton.stories.tsx +531 -0
  170. package/src/components/POSLocationButton/POSLocationButton.tsx +247 -0
  171. package/src/components/POSLocationButton/POSLocationButton.types.ts +87 -0
  172. package/src/components/POSLocationButton/README.md +253 -0
  173. package/src/components/POSLocationButton/icons.tsx +120 -0
  174. package/src/components/POSLocationButton/index.ts +14 -0
  175. package/src/components/POSNumberButton/POSNumberButton.stories.tsx +415 -0
  176. package/src/components/POSNumberButton/POSNumberButton.tsx +179 -0
  177. package/src/components/POSNumberButton/POSNumberButton.types.ts +51 -0
  178. package/src/components/POSNumberButton/README.md +321 -0
  179. package/src/components/POSNumberButton/index.ts +3 -0
  180. package/src/components/POSProductButton/POSProductButton.stories.tsx +318 -0
  181. package/src/components/POSProductButton/POSProductButton.tsx +152 -0
  182. package/src/components/POSProductButton/POSProductButton.types.ts +46 -0
  183. package/src/components/POSProductButton/README.md +269 -0
  184. package/src/components/POSProductButton/index.ts +2 -0
  185. package/src/components/POSProductCard/POSProductCard.stories.tsx +642 -0
  186. package/src/components/POSProductCard/POSProductCard.tsx +208 -0
  187. package/src/components/POSProductCard/POSProductCard.types.ts +76 -0
  188. package/src/components/POSProductCard/README.md +179 -0
  189. package/src/components/POSProductCard/icons.tsx +26 -0
  190. package/src/components/POSProductCard/index.ts +2 -0
  191. package/src/components/POSProductSidebarItems/POSProductSidebarItems.stories.tsx +753 -0
  192. package/src/components/POSProductSidebarItems/POSProductSidebarItems.tsx +332 -0
  193. package/src/components/POSProductSidebarItems/POSProductSidebarItems.types.ts +119 -0
  194. package/src/components/POSProductSidebarItems/README.md +198 -0
  195. package/src/components/POSProductSidebarItems/icons.tsx +21 -0
  196. package/src/components/POSProductSidebarItems/index.ts +3 -0
  197. package/src/components/POSTable/POSTable.stories.tsx +737 -0
  198. package/src/components/POSTable/POSTable.tsx +401 -0
  199. package/src/components/POSTable/POSTable.types.ts +83 -0
  200. package/src/components/POSTable/README.md +286 -0
  201. package/src/components/POSTable/index.ts +7 -0
  202. package/src/components/Pagination/Pagination.stories.tsx +555 -0
  203. package/src/components/Pagination/Pagination.tsx +286 -0
  204. package/src/components/Pagination/Pagination.types.ts +93 -0
  205. package/src/components/Pagination/README.md +298 -0
  206. package/src/components/Pagination/icons.tsx +47 -0
  207. package/src/components/Pagination/index.ts +3 -0
  208. package/src/components/Quantity/Quantity.stories.tsx +457 -0
  209. package/src/components/Quantity/Quantity.tsx +289 -0
  210. package/src/components/Quantity/Quantity.types.ts +70 -0
  211. package/src/components/Radio/Radio.stories.tsx +523 -0
  212. package/src/components/Radio/Radio.tsx +170 -0
  213. package/src/components/Radio/Radio.types.ts +122 -0
  214. package/src/components/Select/README.md +299 -0
  215. package/src/components/Select/Select.stories.tsx +705 -0
  216. package/src/components/Select/Select.tsx +457 -0
  217. package/src/components/Select/Select.types.ts +148 -0
  218. package/src/components/Select/icons.tsx +25 -0
  219. package/src/components/Select/index.ts +3 -0
  220. package/src/components/SignUpView/SignUpView.stories.tsx +129 -0
  221. package/src/components/SignUpView/SignUpView.tsx +503 -0
  222. package/src/components/SignUpView/SignUpView.types.ts +58 -0
  223. package/src/components/SignUpView/icons.tsx +71 -0
  224. package/src/components/SignUpView/index.ts +3 -0
  225. package/src/components/Switch/README.md +112 -0
  226. package/src/components/Switch/Switch.stories.tsx +550 -0
  227. package/src/components/Switch/Switch.tsx +246 -0
  228. package/src/components/Switch/Switch.types.ts +67 -0
  229. package/src/components/Table/README.md +369 -0
  230. package/src/components/Table/Table.stories.tsx +805 -0
  231. package/src/components/Table/Table.tsx +688 -0
  232. package/src/components/Table/Table.types.ts +204 -0
  233. package/src/components/Table/index.ts +9 -0
  234. package/src/components/Tabs/README.md +201 -0
  235. package/src/components/Tabs/Tabs.stories.tsx +580 -0
  236. package/src/components/Tabs/Tabs.tsx +356 -0
  237. package/src/components/Tabs/Tabs.types.ts +127 -0
  238. package/src/components/Tabs/icons.tsx +129 -0
  239. package/src/components/Tabs/index.ts +11 -0
  240. package/src/components/Textarea/Textarea.stories.tsx +535 -0
  241. package/src/components/Textarea/Textarea.tsx +188 -0
  242. package/src/components/Textarea/Textarea.types.ts +54 -0
  243. package/src/context/ThemeContext.tsx +99 -0
  244. package/src/context/index.ts +1 -0
  245. package/src/index.css +29 -0
  246. package/src/index.ts +133 -0
  247. package/src/main.tsx +10 -0
  248. package/src/views/LayoutCommercial/LayoutCommercial.stories.tsx +374 -0
  249. package/src/views/LayoutCommercial/LayoutCommercial.tsx +125 -0
  250. package/src/views/LayoutCommercial/LayoutCommercial.types.ts +54 -0
  251. package/src/views/LayoutCommercial/README.md +286 -0
  252. package/src/views/LayoutCommercial/index.ts +2 -0
  253. package/src/views/ListView/ListView.stories.tsx +329 -0
  254. package/src/views/ListView/ListView.tsx +570 -0
  255. package/src/views/ListView/ListView.types.ts +211 -0
  256. package/src/views/ListView/icons.tsx +282 -0
  257. package/src/views/ListView/index.ts +11 -0
  258. package/src/views/LoginView/LoginView.stories.tsx +148 -0
  259. package/src/views/LoginView/LoginView.tsx +426 -0
  260. package/src/views/LoginView/LoginView.types.ts +52 -0
  261. package/src/views/LoginView/README.md +396 -0
  262. package/src/views/LoginView/icons.tsx +85 -0
  263. package/src/views/LoginView/index.ts +3 -0
  264. package/src/views/ProductsView/ProductsView.stories.tsx +344 -0
  265. package/src/views/ProductsView/ProductsView.tsx +480 -0
  266. package/src/views/ProductsView/ProductsView.types.ts +238 -0
  267. package/src/views/ProductsView/README.md +312 -0
  268. package/src/views/ProductsView/icons.tsx +38 -0
  269. package/src/views/ProductsView/index.ts +8 -0
  270. package/src/views/RecoverPasswordView/README.md +269 -0
  271. package/src/views/RecoverPasswordView/RecoverPasswordView.stories.tsx +131 -0
  272. package/src/views/RecoverPasswordView/RecoverPasswordView.tsx +376 -0
  273. package/src/views/RecoverPasswordView/RecoverPasswordView.types.ts +56 -0
  274. package/src/views/RecoverPasswordView/icons.tsx +17 -0
  275. package/src/views/RecoverPasswordView/index.ts +2 -0
  276. package/src/views/SignUpView/SignUpView.stories.tsx +129 -0
  277. package/src/views/SignUpView/SignUpView.tsx +503 -0
  278. package/src/views/SignUpView/SignUpView.types.ts +58 -0
  279. package/src/views/SignUpView/icons.tsx +71 -0
  280. package/src/views/SignUpView/index.ts +3 -0
  281. package/src/views/TableLayoutView/README.md +268 -0
  282. package/src/views/TableLayoutView/TableLayoutView.stories.tsx +235 -0
  283. package/src/views/TableLayoutView/TableLayoutView.tsx +461 -0
  284. package/src/views/TableLayoutView/TableLayoutView.types.ts +209 -0
  285. package/src/views/TableLayoutView/icons.tsx +113 -0
  286. package/src/views/TableLayoutView/index.ts +6 -0
  287. package/storybook/main.ts +20 -0
  288. package/storybook/preview.tsx +84 -0
  289. package/storybook/vitest.setup.ts +7 -0
  290. package/tailwind.config.js +128 -0
@@ -0,0 +1,261 @@
1
+ # Fuentes del Siesa UI Kit
2
+
3
+ ## 📋 Estructura
4
+
5
+ ```
6
+ fonts/
7
+ └── SiesaBT/ # Familia tipográfica Siesa BT
8
+ ├── SiesaBT-Regular.otf # 400 - Peso normal
9
+ ├── SiesaBT-Light.otf # 300 - Peso ligero
10
+ └── SiesaBT-Bold.otf # 700 - Peso negrita
11
+ ```
12
+
13
+ ## 🎨 Familia Tipográfica: SiesaBT
14
+
15
+ ### Variantes Disponibles
16
+
17
+ | Archivo | Peso | font-weight | Uso Principal |
18
+ |---------|------|-------------|---------------|
19
+ | **SiesaBT-Light.otf** | Light | 300 | Textos extensos, párrafos largos |
20
+ | **SiesaBT-Regular.otf** | Regular | 400 | Texto base, contenido general |
21
+ | **SiesaBT-Bold.otf** | Bold | 700 | Títulos, labels, botones, énfasis |
22
+
23
+ ## 📦 Configuración
24
+
25
+ ### En `src/index.css`:
26
+
27
+ ```css
28
+ @font-face {
29
+ font-family: 'SiesaBT';
30
+ src: url('./assets/fonts/SiesaBT/SiesaBT-Regular.otf') format('opentype');
31
+ font-weight: 400;
32
+ font-style: normal;
33
+ font-display: swap;
34
+ }
35
+
36
+ @font-face {
37
+ font-family: 'SiesaBT';
38
+ src: url('./assets/fonts/SiesaBT/SiesaBT-Light.otf') format('opentype');
39
+ font-weight: 300;
40
+ font-style: normal;
41
+ font-display: swap;
42
+ }
43
+
44
+ @font-face {
45
+ font-family: 'SiesaBT';
46
+ src: url('./assets/fonts/SiesaBT/SiesaBT-Bold.otf') format('opentype');
47
+ font-weight: 700;
48
+ font-style: normal;
49
+ font-display: swap;
50
+ }
51
+ ```
52
+
53
+ ### En `tailwind.config.js`:
54
+
55
+ ```javascript
56
+ fontFamily: {
57
+ sans: ['SiesaBT', 'system-ui', 'sans-serif'],
58
+ },
59
+ ```
60
+
61
+ ## 🚀 Uso en Componentes
62
+
63
+ ### Con Tailwind CSS:
64
+
65
+ ```tsx
66
+ // Regular (400)
67
+ <p className="font-normal">
68
+ Texto con peso regular
69
+ </p>
70
+
71
+ // Light (300)
72
+ <p className="font-light">
73
+ Texto con peso ligero
74
+ </p>
75
+
76
+ // Bold (700)
77
+ <h1 className="font-bold">
78
+ Título con peso negrita
79
+ </h1>
80
+ ```
81
+
82
+ ### Directamente con CSS:
83
+
84
+ ```css
85
+ .my-text {
86
+ font-family: 'SiesaBT', sans-serif;
87
+ font-weight: 400; /* Regular */
88
+ }
89
+
90
+ .my-title {
91
+ font-family: 'SiesaBT', sans-serif;
92
+ font-weight: 700; /* Bold */
93
+ }
94
+ ```
95
+
96
+ ## 📐 Sistema Tipográfico
97
+
98
+ El proyecto utiliza un sistema tipográfico estructurado basado en Tailwind:
99
+
100
+ ### Escalas de Tamaño
101
+
102
+ ```tsx
103
+ text-xs // 12px - Label Tiny
104
+ text-sm // 14px - Label Small
105
+ text-base // 16px - Body Base
106
+ text-lg // 18px - Body Large
107
+ text-xl // 20px - Heading Small
108
+ text-2xl // 24px - Heading Medium
109
+ text-3xl // 30px - Heading Large
110
+ text-4xl // 36px - Display Small
111
+ ```
112
+
113
+ ### Combinaciones Comunes
114
+
115
+ ```tsx
116
+ // Botones
117
+ <button className="font-bold text-sm">Button</button>
118
+
119
+ // Títulos de sección
120
+ <h2 className="font-bold text-2xl">Section Title</h2>
121
+
122
+ // Párrafos
123
+ <p className="font-normal text-base">Regular text content</p>
124
+
125
+ // Labels
126
+ <label className="font-bold text-xs">Input Label</label>
127
+ ```
128
+
129
+ ## ⚡ Optimización
130
+
131
+ ### Font Display Strategy
132
+
133
+ Todas las fuentes usan `font-display: swap` para:
134
+ - Mostrar texto inmediatamente con fuente fallback
135
+ - Cambiar a la fuente personalizada cuando cargue
136
+ - Evitar FOIT (Flash of Invisible Text)
137
+
138
+ ### Preload (Opcional)
139
+
140
+ Para fonts críticos que se usan inmediatamente:
141
+
142
+ ```html
143
+ <!-- En index.html -->
144
+ <link
145
+ rel="preload"
146
+ href="/src/assets/fonts/SiesaBT/SiesaBT-Bold.otf"
147
+ as="font"
148
+ type="font/otf"
149
+ crossorigin
150
+ />
151
+ ```
152
+
153
+ ## 🔄 Proceso de Build
154
+
155
+ Durante el build de Vite:
156
+ 1. Las fuentes son detectadas automáticamente
157
+ 2. Se copian a `dist/assets/` con hash de versión
158
+ 3. Las referencias en CSS se actualizan automáticamente
159
+
160
+ ```
161
+ dist/
162
+ └── assets/
163
+ ├── SiesaBT-Bold-[hash].otf
164
+ ├── SiesaBT-Light-[hash].otf
165
+ ├── SiesaBT-Regular-[hash].otf
166
+ └── index-[hash].css (con referencias actualizadas)
167
+ ```
168
+
169
+ ## 📚 Documentación Relacionada
170
+
171
+ Para más información sobre el sistema tipográfico completo:
172
+ - `docs/typography.md` - Guía completa de tipografía
173
+ - `tailwind.config.js` - Configuración de fuentes en Tailwind
174
+ - `src/index.css` - Declaraciones @font-face
175
+
176
+ ## 🆕 Agregar Nuevas Fuentes
177
+
178
+ Si necesitas agregar una nueva familia tipográfica:
179
+
180
+ 1. **Crear carpeta**:
181
+ ```
182
+ src/assets/fonts/NuevaFuente/
183
+ ```
184
+
185
+ 2. **Agregar archivos**:
186
+ ```
187
+ NuevaFuente-Regular.otf
188
+ NuevaFuente-Bold.otf
189
+ etc.
190
+ ```
191
+
192
+ 3. **Declarar en `src/index.css`**:
193
+ ```css
194
+ @font-face {
195
+ font-family: 'NuevaFuente';
196
+ src: url('./assets/fonts/NuevaFuente/NuevaFuente-Regular.otf') format('opentype');
197
+ font-weight: 400;
198
+ font-style: normal;
199
+ font-display: swap;
200
+ }
201
+ ```
202
+
203
+ 4. **Configurar en `tailwind.config.js`**:
204
+ ```javascript
205
+ fontFamily: {
206
+ nueva: ['NuevaFuente', 'sans-serif'],
207
+ },
208
+ ```
209
+
210
+ 5. **Usar en código**:
211
+ ```tsx
212
+ <p className="font-nueva">Texto con nueva fuente</p>
213
+ ```
214
+
215
+ ## 📏 Mejores Prácticas
216
+
217
+ ### ✅ Hacer
218
+
219
+ - Usar los pesos definidos (300, 400, 700)
220
+ - Mantener consistencia con el sistema tipográfico
221
+ - Usar Tailwind utilities cuando sea posible
222
+ - Incluir fallback fonts (`sans-serif`)
223
+ - Usar `font-display: swap`
224
+
225
+ ### ❌ Evitar
226
+
227
+ - Agregar pesos de fuente no disponibles
228
+ - Usar `font-display: block` (causa FOIT)
229
+ - Referencias absolutas a fuentes
230
+ - Cargar fuentes innecesarias
231
+ - Múltiples declaraciones de la misma fuente
232
+
233
+ ## 🔍 Troubleshooting
234
+
235
+ ### Fuente no se carga
236
+
237
+ 1. Verificar ruta en `src/index.css`
238
+ 2. Verificar que el archivo existe en `src/assets/fonts/SiesaBT/`
239
+ 3. Limpiar build: `rm -rf dist && npm run build`
240
+ 4. Verificar consola del navegador
241
+
242
+ ### Peso incorrecto
243
+
244
+ Verificar que uses el `font-weight` correcto:
245
+ ```css
246
+ font-weight: 300; /* Light */
247
+ font-weight: 400; /* Regular */
248
+ font-weight: 700; /* Bold */
249
+ ```
250
+
251
+ ### Build falla
252
+
253
+ Si el build falla después de mover fuentes:
254
+ 1. Limpiar caché: `rm -rf node_modules/.vite`
255
+ 2. Rebuild: `npm run build`
256
+
257
+ ---
258
+
259
+ **Última actualización**: 2025-11-11
260
+ **Versión**: 1.0.0
261
+ **Mantenedor**: Siesa UI Kit Team
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="35.93" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 228"><path fill="#00D8FF" d="M210.483 73.824a171.49 171.49 0 0 0-8.24-2.597c.465-1.9.893-3.777 1.273-5.621c6.238-30.281 2.16-54.676-11.769-62.708c-13.355-7.7-35.196.329-57.254 19.526a171.23 171.23 0 0 0-6.375 5.848a155.866 155.866 0 0 0-4.241-3.917C100.759 3.829 77.587-4.822 63.673 3.233C50.33 10.957 46.379 33.89 51.995 62.588a170.974 170.974 0 0 0 1.892 8.48c-3.28.932-6.445 1.924-9.474 2.98C17.309 83.498 0 98.307 0 113.668c0 15.865 18.582 31.778 46.812 41.427a145.52 145.52 0 0 0 6.921 2.165a167.467 167.467 0 0 0-2.01 9.138c-5.354 28.2-1.173 50.591 12.134 58.266c13.744 7.926 36.812-.22 59.273-19.855a145.567 145.567 0 0 0 5.342-4.923a168.064 168.064 0 0 0 6.92 6.314c21.758 18.722 43.246 26.282 56.54 18.586c13.731-7.949 18.194-32.003 12.4-61.268a145.016 145.016 0 0 0-1.535-6.842c1.62-.48 3.21-.974 4.76-1.488c29.348-9.723 48.443-25.443 48.443-41.52c0-15.417-17.868-30.326-45.517-39.844Zm-6.365 70.984c-1.4.463-2.836.91-4.3 1.345c-3.24-10.257-7.612-21.163-12.963-32.432c5.106-11 9.31-21.767 12.459-31.957c2.619.758 5.16 1.557 7.61 2.4c23.69 8.156 38.14 20.213 38.14 29.504c0 9.896-15.606 22.743-40.946 31.14Zm-10.514 20.834c2.562 12.94 2.927 24.64 1.23 33.787c-1.524 8.219-4.59 13.698-8.382 15.893c-8.067 4.67-25.32-1.4-43.927-17.412a156.726 156.726 0 0 1-6.437-5.87c7.214-7.889 14.423-17.06 21.459-27.246c12.376-1.098 24.068-2.894 34.671-5.345a134.17 134.17 0 0 1 1.386 6.193ZM87.276 214.515c-7.882 2.783-14.16 2.863-17.955.675c-8.075-4.657-11.432-22.636-6.853-46.752a156.923 156.923 0 0 1 1.869-8.499c10.486 2.32 22.093 3.988 34.498 4.994c7.084 9.967 14.501 19.128 21.976 27.15a134.668 134.668 0 0 1-4.877 4.492c-9.933 8.682-19.886 14.842-28.658 17.94ZM50.35 144.747c-12.483-4.267-22.792-9.812-29.858-15.863c-6.35-5.437-9.555-10.836-9.555-15.216c0-9.322 13.897-21.212 37.076-29.293c2.813-.98 5.757-1.905 8.812-2.773c3.204 10.42 7.406 21.315 12.477 32.332c-5.137 11.18-9.399 22.249-12.634 32.792a134.718 134.718 0 0 1-6.318-1.979Zm12.378-84.26c-4.811-24.587-1.616-43.134 6.425-47.789c8.564-4.958 27.502 2.111 47.463 19.835a144.318 144.318 0 0 1 3.841 3.545c-7.438 7.987-14.787 17.08-21.808 26.988c-12.04 1.116-23.565 2.908-34.161 5.309a160.342 160.342 0 0 1-1.76-7.887Zm110.427 27.268a347.8 347.8 0 0 0-7.785-12.803c8.168 1.033 15.994 2.404 23.343 4.08c-2.206 7.072-4.956 14.465-8.193 22.045a381.151 381.151 0 0 0-7.365-13.322Zm-45.032-43.861c5.044 5.465 10.096 11.566 15.065 18.186a322.04 322.04 0 0 0-30.257-.006c4.974-6.559 10.069-12.652 15.192-18.18ZM82.802 87.83a323.167 323.167 0 0 0-7.227 13.238c-3.184-7.553-5.909-14.98-8.134-22.152c7.304-1.634 15.093-2.97 23.209-3.984a321.524 321.524 0 0 0-7.848 12.897Zm8.081 65.352c-8.385-.936-16.291-2.203-23.593-3.793c2.26-7.3 5.045-14.885 8.298-22.6a321.187 321.187 0 0 0 7.257 13.246c2.594 4.48 5.28 8.868 8.038 13.147Zm37.542 31.03c-5.184-5.592-10.354-11.779-15.403-18.433c4.902.192 9.899.29 14.978.29c5.218 0 10.376-.117 15.453-.343c-4.985 6.774-10.018 12.97-15.028 18.486Zm52.198-57.817c3.422 7.8 6.306 15.345 8.596 22.52c-7.422 1.694-15.436 3.058-23.88 4.071a382.417 382.417 0 0 0 7.859-13.026a347.403 347.403 0 0 0 7.425-13.565Zm-16.898 8.101a358.557 358.557 0 0 1-12.281 19.815a329.4 329.4 0 0 1-23.444.823c-7.967 0-15.716-.248-23.178-.732a310.202 310.202 0 0 1-12.513-19.846h.001a307.41 307.41 0 0 1-10.923-20.627a310.278 310.278 0 0 1 10.89-20.637l-.001.001a307.318 307.318 0 0 1 12.413-19.761c7.613-.576 15.42-.876 23.31-.876H128c7.926 0 15.743.303 23.354.883a329.357 329.357 0 0 1 12.335 19.695a358.489 358.489 0 0 1 11.036 20.54a329.472 329.472 0 0 1-11 20.722Zm22.56-122.124c8.572 4.944 11.906 24.881 6.52 51.026c-.344 1.668-.73 3.367-1.15 5.09c-10.622-2.452-22.155-4.275-34.23-5.408c-7.034-10.017-14.323-19.124-21.64-27.008a160.789 160.789 0 0 1 5.888-5.4c18.9-16.447 36.564-22.941 44.612-18.3ZM128 90.808c12.625 0 22.86 10.235 22.86 22.86s-10.235 22.86-22.86 22.86s-22.86-10.235-22.86-22.86s10.235-22.86 22.86-22.86Z"></path></svg>
@@ -0,0 +1,332 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { Alert } from './Alert';
3
+ import { Input } from '../Input/Input';
4
+ import { useState } from 'react';
5
+
6
+ /**
7
+ * Alert - Componente de alerta/diálogo del sistema de diseño Siesa
8
+ *
9
+ * Sistema completo para mostrar diálogos de confirmación con soporte para:
10
+ * - **Título y descripción**: Texto principal y secundario
11
+ * - **Contenido personalizado**: Children para inputs, placeholders, etc.
12
+ * - **Botones de acción**: Personalizables o por defecto
13
+ * - **Dark mode**: Adaptación completa al tema oscuro
14
+ */
15
+ const meta = {
16
+ title: 'Siesa UI Kit/Alert',
17
+ component: Alert,
18
+ parameters: {
19
+ layout: 'centered',
20
+ docs: {
21
+ description: {
22
+ component:
23
+ 'Componente para mostrar diálogos de confirmación y alertas. Ideal para confirmaciones de acciones destructivas, advertencias, o cualquier acción que requiera confirmación del usuario.',
24
+ },
25
+ },
26
+ backgrounds: {
27
+ default: 'light',
28
+ values: [
29
+ { name: 'light', value: '#ffffff' },
30
+ { name: 'gray', value: '#f3f4f6' },
31
+ { name: 'dark', value: '#1f2937' },
32
+ ],
33
+ },
34
+ },
35
+ tags: ['autodocs'],
36
+ argTypes: {
37
+ title: {
38
+ control: 'text',
39
+ description: 'Título del alert (texto principal)',
40
+ table: {
41
+ type: { summary: 'string' },
42
+ category: 'Content',
43
+ },
44
+ },
45
+ description: {
46
+ control: 'text',
47
+ description: 'Descripción opcional (texto secundario)',
48
+ table: {
49
+ type: { summary: 'string' },
50
+ category: 'Content',
51
+ },
52
+ },
53
+ children: {
54
+ control: false,
55
+ description: 'Contenido opcional del body',
56
+ table: {
57
+ type: { summary: 'ReactNode' },
58
+ category: 'Content',
59
+ },
60
+ },
61
+ cancelText: {
62
+ control: 'text',
63
+ description: 'Texto del botón de cancelar',
64
+ table: {
65
+ type: { summary: 'string' },
66
+ defaultValue: { summary: 'Cancelar' },
67
+ category: 'Actions',
68
+ },
69
+ },
70
+ confirmText: {
71
+ control: 'text',
72
+ description: 'Texto del botón de confirmar',
73
+ table: {
74
+ type: { summary: 'string' },
75
+ defaultValue: { summary: 'Confirmar' },
76
+ category: 'Actions',
77
+ },
78
+ },
79
+ onCancel: {
80
+ action: 'cancelled',
81
+ description: 'Callback cuando se hace click en Cancel',
82
+ table: {
83
+ type: { summary: '() => void' },
84
+ category: 'Actions',
85
+ },
86
+ },
87
+ onConfirm: {
88
+ action: 'confirmed',
89
+ description: 'Callback cuando se hace click en Confirm',
90
+ table: {
91
+ type: { summary: '() => void' },
92
+ category: 'Actions',
93
+ },
94
+ },
95
+ },
96
+ } satisfies Meta<typeof Alert>;
97
+
98
+ export default meta;
99
+ type Story = StoryObj<typeof meta>;
100
+
101
+ // ============================================
102
+ // 1. PLAYGROUND INTERACTIVO
103
+ // ============================================
104
+
105
+ /**
106
+ * Playground Interactivo
107
+ *
108
+ * Usa los controles para experimentar con el Alert en tiempo real.
109
+ */
110
+ export const Playground: Story = {
111
+ name: 'Playground',
112
+ args: {
113
+ title: '¿Está seguro de que desea reembolsar este pago?',
114
+ description:
115
+ 'El reembolso se reflejará en la cuenta bancaria del cliente de 2 a 3 días hábiles después del procesamiento.',
116
+ cancelText: 'Cancelar',
117
+ confirmText: 'Reembolsar',
118
+ },
119
+ };
120
+
121
+ // ============================================
122
+ // 2. TODAS LAS VARIANTES
123
+ // ============================================
124
+
125
+ /**
126
+ * Todas las Variantes
127
+ *
128
+ * Vista de todas las variantes del Alert según Figma.
129
+ */
130
+ export const AllVariants: Story = {
131
+ name: 'Todas las Variantes',
132
+ args: {
133
+ title: '',
134
+ description: '',
135
+ },
136
+ render: () => (
137
+ <div className="space-y-6">
138
+ {/* 1. Con descripción */}
139
+ <div>
140
+ <h3 className="text-sm font-bold mb-4 text-gray-700 dark:text-white">Con Descripción</h3>
141
+ <Alert
142
+ title="¿Está seguro de que desea reembolsar este pago?"
143
+ description="El reembolso se reflejará en la cuenta bancaria del cliente de 2 a 3 días hábiles después del procesamiento."
144
+ onCancel={() => console.log('Cancelled')}
145
+ onConfirm={() => console.log('Confirmed')}
146
+ confirmText="Reembolsar"
147
+ />
148
+ </div>
149
+
150
+ {/* 2. Sin descripción */}
151
+ <div>
152
+ <h3 className="text-sm font-bold mb-4 text-gray-700 dark:text-white">Sin Descripción</h3>
153
+ <Alert
154
+ title="¿Está seguro de que desea reembolsar este pago?"
155
+ onCancel={() => console.log('Cancelled')}
156
+ onConfirm={() => console.log('Confirmed')}
157
+ confirmText="Reembolsar"
158
+ />
159
+ </div>
160
+
161
+ {/* 3. Con placeholder */}
162
+ <div>
163
+ <h3 className="text-sm font-bold mb-4 text-gray-700 dark:text-white">Con Placeholder</h3>
164
+ <Alert
165
+ title="¿Está seguro de que desea reembolsar este pago?"
166
+ description="El reembolso se reflejará en la cuenta bancaria del cliente de 2 a 3 días hábiles después del procesamiento."
167
+ onCancel={() => console.log('Cancelled')}
168
+ onConfirm={() => console.log('Confirmed')}
169
+ confirmText="Reembolsar"
170
+ >
171
+ <div className="bg-background-secondary dark:bg-gray-700 border border-border-primary dark:border-dark-border-primary border-dashed h-16 rounded flex items-center justify-center">
172
+ <p className="text-xs font-bold text-content-tertiary dark:text-content-tertiary">
173
+ Marcador de Posición
174
+ </p>
175
+ </div>
176
+ </Alert>
177
+ </div>
178
+
179
+ {/* 4. Con input */}
180
+ <div>
181
+ <h3 className="text-sm font-bold mb-4 text-gray-700 dark:text-white">Con Input</h3>
182
+ <Alert
183
+ title="¿Está seguro de que desea reembolsar este pago?"
184
+ description="El reembolso se reflejará en la cuenta bancaria del cliente de 2 a 3 días hábiles después del procesamiento."
185
+ onCancel={() => console.log('Cancelled')}
186
+ onConfirm={() => console.log('Confirmed')}
187
+ confirmText="Reembolsar"
188
+ >
189
+ <Input placeholder="****" fullWidth />
190
+ </Alert>
191
+ </div>
192
+ </div>
193
+ ),
194
+ };
195
+
196
+ // ============================================
197
+ // 3. CON INPUT INTERACTIVO
198
+ // ============================================
199
+
200
+ /**
201
+ * Con Input Interactivo
202
+ *
203
+ * Ejemplo de Alert con un campo de input funcional.
204
+ */
205
+ export const WithInput: Story = {
206
+ name: 'Con Input Interactivo',
207
+ args: {
208
+ title: '',
209
+ description: '',
210
+ },
211
+ render: () => {
212
+ const InteractiveAlert = () => {
213
+ const [value, setValue] = useState('');
214
+
215
+ return (
216
+ <Alert
217
+ title="Ingrese el código de confirmación"
218
+ description="Por favor ingrese el código de 4 dígitos enviado a su correo electrónico."
219
+ onCancel={() => console.log('Cancelled')}
220
+ onConfirm={() => console.log('Confirmed with value:', value)}
221
+ confirmText="Verificar"
222
+ >
223
+ <Input
224
+ placeholder="Ingrese el código"
225
+ value={value}
226
+ onChange={(e) => setValue(e.target.value)}
227
+ fullWidth
228
+ />
229
+ </Alert>
230
+ );
231
+ };
232
+
233
+ return <InteractiveAlert />;
234
+ },
235
+ };
236
+
237
+ // ============================================
238
+ // 4. CASOS DE USO REALES
239
+ // ============================================
240
+
241
+ /**
242
+ * Casos de Uso Reales
243
+ *
244
+ * Ejemplos prácticos de cómo usar Alert en situaciones reales.
245
+ */
246
+ export const UseCases: Story = {
247
+ name: 'Casos de Uso Reales',
248
+ args: {
249
+ title: '',
250
+ description: '',
251
+ },
252
+ render: () => (
253
+ <div className="space-y-6">
254
+ {/* Delete Confirmation */}
255
+ <div>
256
+ <h3 className="text-sm font-bold mb-4 text-gray-700 dark:text-white">Confirmación de Eliminación</h3>
257
+ <Alert
258
+ title="¿Eliminar este elemento permanentemente?"
259
+ description="Esta acción no se puede deshacer. Todos los datos asociados con este elemento serán eliminados permanentemente."
260
+ onCancel={() => console.log('Cancelled')}
261
+ onConfirm={() => console.log('Deleted')}
262
+ cancelText="Cancelar"
263
+ confirmText="Eliminar"
264
+ />
265
+ </div>
266
+
267
+ {/* Logout Confirmation */}
268
+ <div>
269
+ <h3 className="text-sm font-bold mb-4 text-gray-700 dark:text-white">Confirmación de Cierre de Sesión</h3>
270
+ <Alert
271
+ title="¿Está seguro de que desea cerrar sesión?"
272
+ onCancel={() => console.log('Cancelled')}
273
+ onConfirm={() => console.log('Logged out')}
274
+ cancelText="Permanecer"
275
+ confirmText="Cerrar Sesión"
276
+ />
277
+ </div>
278
+
279
+ {/* Save Changes */}
280
+ <div>
281
+ <h3 className="text-sm font-bold mb-4 text-gray-700 dark:text-white">Guardar Cambios</h3>
282
+ <Alert
283
+ title="¿Guardar cambios antes de salir?"
284
+ description="Tiene cambios sin guardar. ¿Desea guardarlos antes de salir de esta página?"
285
+ onCancel={() => console.log('Discarded')}
286
+ onConfirm={() => console.log('Saved')}
287
+ cancelText="Descartar"
288
+ confirmText="Guardar"
289
+ />
290
+ </div>
291
+
292
+ {/* Cancel Subscription */}
293
+ <div>
294
+ <h3 className="text-sm font-bold mb-4 text-gray-700 dark:text-white">Cancelar Suscripción</h3>
295
+ <Alert
296
+ title="¿Cancelar su suscripción?"
297
+ description="Su suscripción permanecerá activa hasta el final de su período de facturación actual."
298
+ onCancel={() => console.log('Keep subscription')}
299
+ onConfirm={() => console.log('Cancelled subscription')}
300
+ cancelText="Mantener Suscripción"
301
+ confirmText="Cancelar Suscripción"
302
+ />
303
+ </div>
304
+
305
+ {/* Reset Settings */}
306
+ <div>
307
+ <h3 className="text-sm font-bold mb-4 text-gray-700 dark:text-white">Restablecer Configuración</h3>
308
+ <Alert
309
+ title="¿Restablecer toda la configuración a los valores predeterminados?"
310
+ description="Esto restablecerá todas sus preferencias y configuraciones a sus valores predeterminados."
311
+ onCancel={() => console.log('Cancelled')}
312
+ onConfirm={() => console.log('Reset')}
313
+ cancelText="Cancelar"
314
+ confirmText="Restablecer"
315
+ />
316
+ </div>
317
+
318
+ {/* Archive Item */}
319
+ <div>
320
+ <h3 className="text-sm font-bold mb-4 text-gray-700 dark:text-white">Archivar Elemento</h3>
321
+ <Alert
322
+ title="¿Archivar este proyecto?"
323
+ description="Los proyectos archivados pueden restaurarse más tarde desde la sección de archivos."
324
+ onCancel={() => console.log('Cancelled')}
325
+ onConfirm={() => console.log('Archived')}
326
+ cancelText="Cancelar"
327
+ confirmText="Archivar"
328
+ />
329
+ </div>
330
+ </div>
331
+ ),
332
+ };