siesa-ui-kit 1.0.4 → 1.0.5

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 (541) hide show
  1. package/README.md +89 -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 +2401 -2445
  6. package/claude/prompts/component-template.md +121 -121
  7. package/claude/settings.local.json +61 -72
  8. package/docs/border-radius.md +1261 -1261
  9. package/docs/colors.md +832 -832
  10. package/docs/dark-mode-guide.md +1426 -1426
  11. package/docs/filters.md +1243 -1243
  12. package/docs/icons.md +1283 -1264
  13. package/docs/shadows.md +1377 -1377
  14. package/docs/spacing.md +1684 -1684
  15. package/docs/typography.md +1268 -1268
  16. package/package.json +83 -111
  17. package/postcss.config.cjs +6 -6
  18. package/src/App.css +42 -42
  19. package/src/App.tsx +8 -8
  20. package/src/ButtonTest.tsx +147 -147
  21. package/src/assets/fonts/README.md +261 -261
  22. package/src/components/Alert/Alert.stories.tsx +332 -332
  23. package/src/components/Alert/Alert.tsx +106 -106
  24. package/src/components/Alert/Alert.types.ts +54 -54
  25. package/src/components/Avatar/Avatar.stories.tsx +494 -494
  26. package/src/components/Avatar/Avatar.tsx +143 -143
  27. package/src/components/Avatar/Avatar.types.ts +53 -53
  28. package/src/components/Badge/Badge.stories.tsx +339 -339
  29. package/src/components/Badge/Badge.tsx +278 -278
  30. package/src/components/Badge/Badge.types.ts +58 -58
  31. package/src/components/Button/Button.stories.tsx +950 -950
  32. package/src/components/Button/Button.tsx +337 -337
  33. package/src/components/Button/Button.types.ts +180 -180
  34. package/src/components/Button/icons.tsx +87 -48
  35. package/src/components/Button/index.ts +3 -3
  36. package/src/components/Checkbox/Checkbox.stories.tsx +453 -453
  37. package/src/components/Checkbox/Checkbox.tsx +208 -208
  38. package/src/components/Checkbox/Checkbox.types.ts +61 -61
  39. package/src/components/DescriptionList/DescriptionList.stories.tsx +250 -250
  40. package/src/components/DescriptionList/DescriptionList.tsx +96 -96
  41. package/src/components/DescriptionList/DescriptionList.types.ts +29 -29
  42. package/src/components/Divider/Divider.stories.tsx +263 -263
  43. package/src/components/Divider/Divider.tsx +80 -80
  44. package/src/components/Divider/Divider.types.ts +24 -24
  45. package/src/components/Dropdown/Dropdown.stories.tsx +552 -552
  46. package/src/components/Dropdown/Dropdown.tsx +422 -422
  47. package/src/components/Dropdown/Dropdown.types.ts +146 -146
  48. package/src/components/Dropdown/README.md +266 -266
  49. package/src/components/Dropdown/icons.tsx +72 -72
  50. package/src/components/Dropdown/index.ts +8 -8
  51. package/src/components/Input/Input.stories.tsx +583 -583
  52. package/src/components/Input/Input.tsx +204 -204
  53. package/src/components/Input/Input.types.ts +80 -80
  54. package/src/components/Input/icons.tsx +145 -145
  55. package/src/components/Input/index.ts +2 -2
  56. package/src/components/LoginView/LoginView.stories.tsx +148 -148
  57. package/src/components/LoginView/LoginView.tsx +426 -426
  58. package/src/components/LoginView/LoginView.types.ts +52 -52
  59. package/src/components/LoginView/README.md +396 -396
  60. package/src/components/LoginView/icons.tsx +85 -85
  61. package/src/components/LoginView/index.ts +3 -3
  62. package/src/components/Navbar/Navbar.stories.tsx +810 -810
  63. package/src/components/Navbar/Navbar.tsx +755 -755
  64. package/src/components/Navbar/Navbar.types.ts +219 -219
  65. package/src/components/Navbar/README.md +279 -279
  66. package/src/components/Navbar/icons.tsx +102 -102
  67. package/src/components/Navbar/index.ts +8 -8
  68. package/src/components/NavigationBar/NavigationBar.stories.tsx +406 -406
  69. package/src/components/NavigationBar/NavigationBar.tsx +246 -246
  70. package/src/components/NavigationBar/NavigationBar.types.ts +74 -74
  71. package/src/components/NavigationBar/README.md +469 -469
  72. package/src/components/NavigationBar/index.ts +2 -2
  73. package/src/components/NavigationRail/NavigationRail.stories.tsx +417 -417
  74. package/src/components/NavigationRail/NavigationRail.tsx +418 -418
  75. package/src/components/NavigationRail/NavigationRail.types.ts +109 -109
  76. package/src/components/NavigationRail/README.md +224 -224
  77. package/src/components/NavigationRail/index.ts +2 -2
  78. package/src/components/Notification/Notification.stories.tsx +513 -513
  79. package/src/components/Notification/Notification.tsx +145 -145
  80. package/src/components/Notification/Notification.types.ts +142 -142
  81. package/src/components/Notification/README.md +409 -409
  82. package/src/components/Notification/index.ts +3 -3
  83. package/src/components/POSConvention/POSConvention.stories.tsx +235 -235
  84. package/src/components/POSConvention/POSConvention.tsx +129 -129
  85. package/src/components/POSConvention/POSConvention.types.ts +38 -38
  86. package/src/components/POSConvention/README.md +123 -123
  87. package/src/components/POSConvention/icons.tsx +45 -45
  88. package/src/components/POSConvention/index.ts +3 -3
  89. package/src/components/POSLocationButton/POSLocationButton.stories.tsx +531 -531
  90. package/src/components/POSLocationButton/POSLocationButton.tsx +247 -247
  91. package/src/components/POSLocationButton/POSLocationButton.types.ts +87 -87
  92. package/src/components/POSLocationButton/README.md +253 -253
  93. package/src/components/POSLocationButton/icons.tsx +120 -120
  94. package/src/components/POSLocationButton/index.ts +14 -14
  95. package/src/components/POSNumberButton/POSNumberButton.stories.tsx +415 -415
  96. package/src/components/POSNumberButton/POSNumberButton.tsx +179 -179
  97. package/src/components/POSNumberButton/POSNumberButton.types.ts +51 -51
  98. package/src/components/POSNumberButton/README.md +321 -321
  99. package/src/components/POSNumberButton/index.ts +3 -3
  100. package/src/components/POSProductButton/POSProductButton.stories.tsx +318 -318
  101. package/src/components/POSProductButton/POSProductButton.tsx +152 -152
  102. package/src/components/POSProductButton/POSProductButton.types.ts +46 -46
  103. package/src/components/POSProductButton/README.md +269 -269
  104. package/src/components/POSProductButton/index.ts +2 -2
  105. package/src/components/POSProductCard/POSProductCard.stories.tsx +642 -642
  106. package/src/components/POSProductCard/POSProductCard.tsx +208 -208
  107. package/src/components/POSProductCard/POSProductCard.types.ts +76 -76
  108. package/src/components/POSProductCard/README.md +179 -179
  109. package/src/components/POSProductCard/icons.tsx +26 -26
  110. package/src/components/POSProductCard/index.ts +2 -2
  111. package/src/components/POSProductSidebarItems/POSProductSidebarItems.stories.tsx +753 -753
  112. package/src/components/POSProductSidebarItems/POSProductSidebarItems.tsx +332 -332
  113. package/src/components/POSProductSidebarItems/POSProductSidebarItems.types.ts +119 -119
  114. package/src/components/POSProductSidebarItems/README.md +198 -198
  115. package/src/components/POSProductSidebarItems/icons.tsx +21 -21
  116. package/src/components/POSProductSidebarItems/index.ts +3 -3
  117. package/src/components/POSTable/POSTable.stories.tsx +737 -737
  118. package/src/components/POSTable/POSTable.tsx +401 -401
  119. package/src/components/POSTable/POSTable.types.ts +83 -83
  120. package/src/components/POSTable/README.md +286 -286
  121. package/src/components/POSTable/index.ts +7 -7
  122. package/src/components/Pagination/Pagination.stories.tsx +555 -555
  123. package/src/components/Pagination/Pagination.tsx +286 -286
  124. package/src/components/Pagination/Pagination.types.ts +93 -93
  125. package/src/components/Pagination/README.md +298 -298
  126. package/src/components/Pagination/icons.tsx +47 -47
  127. package/src/components/Pagination/index.ts +3 -3
  128. package/src/components/Quantity/Quantity.stories.tsx +457 -457
  129. package/src/components/Quantity/Quantity.tsx +289 -289
  130. package/src/components/Quantity/Quantity.types.ts +70 -70
  131. package/src/components/Radio/Radio.stories.tsx +523 -523
  132. package/src/components/Radio/Radio.tsx +170 -170
  133. package/src/components/Radio/Radio.types.ts +122 -122
  134. package/src/components/Select/README.md +299 -299
  135. package/src/components/Select/Select.stories.tsx +673 -705
  136. package/src/components/Select/Select.tsx +454 -457
  137. package/src/components/Select/Select.types.ts +148 -148
  138. package/src/components/Select/icons.tsx +50 -25
  139. package/src/components/Select/index.ts +3 -3
  140. package/src/components/SignUpView/SignUpView.stories.tsx +129 -129
  141. package/src/components/SignUpView/SignUpView.tsx +503 -503
  142. package/src/components/SignUpView/SignUpView.types.ts +58 -58
  143. package/src/components/SignUpView/icons.tsx +71 -71
  144. package/src/components/SignUpView/index.ts +3 -3
  145. package/src/components/Switch/README.md +112 -112
  146. package/src/components/Switch/Switch.stories.tsx +550 -550
  147. package/src/components/Switch/Switch.tsx +246 -246
  148. package/src/components/Switch/Switch.types.ts +67 -67
  149. package/src/components/Table/README.md +369 -369
  150. package/src/components/Table/Table.stories.tsx +805 -805
  151. package/src/components/Table/Table.tsx +688 -688
  152. package/src/components/Table/Table.types.ts +204 -204
  153. package/src/components/Table/index.ts +9 -9
  154. package/src/components/Tabs/README.md +201 -201
  155. package/src/components/Tabs/Tabs.stories.tsx +580 -580
  156. package/src/components/Tabs/Tabs.tsx +356 -356
  157. package/src/components/Tabs/Tabs.types.ts +127 -127
  158. package/src/components/Tabs/icons.tsx +129 -129
  159. package/src/components/Tabs/index.ts +11 -11
  160. package/src/components/Textarea/Textarea.stories.tsx +535 -535
  161. package/src/components/Textarea/Textarea.tsx +188 -188
  162. package/src/components/Textarea/Textarea.types.ts +54 -54
  163. package/src/context/ThemeContext.tsx +99 -99
  164. package/src/context/index.ts +1 -1
  165. package/src/index.css +29 -29
  166. package/src/index.ts +39 -133
  167. package/src/main.tsx +10 -10
  168. package/src/views/ProductsView/ProductsView.stories.tsx +344 -344
  169. package/src/views/ProductsView/ProductsView.tsx +480 -480
  170. package/src/views/ProductsView/ProductsView.types.ts +238 -238
  171. package/src/views/ProductsView/README.md +312 -312
  172. package/src/views/ProductsView/icons.tsx +38 -38
  173. package/src/views/ProductsView/index.ts +8 -8
  174. package/src/views/RecoverPasswordView/README.md +269 -269
  175. package/src/views/RecoverPasswordView/RecoverPasswordView.stories.tsx +131 -131
  176. package/src/views/RecoverPasswordView/RecoverPasswordView.tsx +376 -376
  177. package/src/views/RecoverPasswordView/RecoverPasswordView.types.ts +56 -56
  178. package/src/views/RecoverPasswordView/icons.tsx +17 -17
  179. package/src/views/RecoverPasswordView/index.ts +2 -2
  180. package/src/views/TableLayoutView/README.md +268 -268
  181. package/src/views/TableLayoutView/TableLayoutView.stories.tsx +235 -235
  182. package/src/views/TableLayoutView/TableLayoutView.tsx +461 -461
  183. package/src/views/TableLayoutView/TableLayoutView.types.ts +209 -209
  184. package/src/views/TableLayoutView/icons.tsx +113 -113
  185. package/src/views/TableLayoutView/index.ts +6 -6
  186. package/storybook/main.ts +19 -19
  187. package/storybook/preview.tsx +84 -84
  188. package/storybook/vitest.setup.ts +6 -6
  189. package/tailwind.config.js +128 -128
  190. package/claude/prompts/siesa-ui-kit.md +0 -28
  191. package/dist/ButtonTest.d.ts +0 -6
  192. package/dist/ButtonTest.d.ts.map +0 -1
  193. package/dist/components/Alert/Alert.d.ts +0 -23
  194. package/dist/components/Alert/Alert.d.ts.map +0 -1
  195. package/dist/components/Alert/Alert.types.d.ts +0 -46
  196. package/dist/components/Alert/Alert.types.d.ts.map +0 -1
  197. package/dist/components/Avatar/Avatar.d.ts +0 -41
  198. package/dist/components/Avatar/Avatar.d.ts.map +0 -1
  199. package/dist/components/Avatar/Avatar.types.d.ts +0 -46
  200. package/dist/components/Avatar/Avatar.types.d.ts.map +0 -1
  201. package/dist/components/Badge/Badge.d.ts +0 -42
  202. package/dist/components/Badge/Badge.d.ts.map +0 -1
  203. package/dist/components/Badge/Badge.types.d.ts +0 -32
  204. package/dist/components/Badge/Badge.types.d.ts.map +0 -1
  205. package/dist/components/Button/Button.d.ts +0 -84
  206. package/dist/components/Button/Button.d.ts.map +0 -1
  207. package/dist/components/Button/Button.types.d.ts +0 -162
  208. package/dist/components/Button/Button.types.d.ts.map +0 -1
  209. package/dist/components/Button/icons.d.ts +0 -27
  210. package/dist/components/Button/icons.d.ts.map +0 -1
  211. package/dist/components/Button/index.d.ts +0 -4
  212. package/dist/components/Button/index.d.ts.map +0 -1
  213. package/dist/components/Checkbox/Checkbox.d.ts +0 -31
  214. package/dist/components/Checkbox/Checkbox.d.ts.map +0 -1
  215. package/dist/components/Checkbox/Checkbox.types.d.ts +0 -53
  216. package/dist/components/Checkbox/Checkbox.types.d.ts.map +0 -1
  217. package/dist/components/DescriptionList/DescriptionList.d.ts +0 -38
  218. package/dist/components/DescriptionList/DescriptionList.d.ts.map +0 -1
  219. package/dist/components/DescriptionList/DescriptionList.types.d.ts +0 -27
  220. package/dist/components/DescriptionList/DescriptionList.types.d.ts.map +0 -1
  221. package/dist/components/Divider/Divider.d.ts +0 -33
  222. package/dist/components/Divider/Divider.d.ts.map +0 -1
  223. package/dist/components/Divider/Divider.types.d.ts +0 -22
  224. package/dist/components/Divider/Divider.types.d.ts.map +0 -1
  225. package/dist/components/Dropdown/Dropdown.d.ts +0 -66
  226. package/dist/components/Dropdown/Dropdown.d.ts.map +0 -1
  227. package/dist/components/Dropdown/Dropdown.types.d.ts +0 -124
  228. package/dist/components/Dropdown/Dropdown.types.d.ts.map +0 -1
  229. package/dist/components/Dropdown/icons.d.ts +0 -10
  230. package/dist/components/Dropdown/icons.d.ts.map +0 -1
  231. package/dist/components/Dropdown/index.d.ts +0 -4
  232. package/dist/components/Dropdown/index.d.ts.map +0 -1
  233. package/dist/components/DropdownItemCollapsible/DropdownItemCollapsible.d.ts +0 -101
  234. package/dist/components/DropdownItemCollapsible/DropdownItemCollapsible.d.ts.map +0 -1
  235. package/dist/components/DropdownItemCollapsible/DropdownItemCollapsible.types.d.ts +0 -116
  236. package/dist/components/DropdownItemCollapsible/DropdownItemCollapsible.types.d.ts.map +0 -1
  237. package/dist/components/DropdownItemCollapsible/icons.d.ts +0 -19
  238. package/dist/components/DropdownItemCollapsible/icons.d.ts.map +0 -1
  239. package/dist/components/DropdownItemCollapsible/index.d.ts +0 -9
  240. package/dist/components/DropdownItemCollapsible/index.d.ts.map +0 -1
  241. package/dist/components/DropdownItemHeading/DropdownItemHeading.d.ts +0 -75
  242. package/dist/components/DropdownItemHeading/DropdownItemHeading.d.ts.map +0 -1
  243. package/dist/components/DropdownItemHeading/DropdownItemHeading.types.d.ts +0 -85
  244. package/dist/components/DropdownItemHeading/DropdownItemHeading.types.d.ts.map +0 -1
  245. package/dist/components/DropdownItemHeading/icons.d.ts +0 -48
  246. package/dist/components/DropdownItemHeading/icons.d.ts.map +0 -1
  247. package/dist/components/DropdownItemHeading/index.d.ts +0 -4
  248. package/dist/components/DropdownItemHeading/index.d.ts.map +0 -1
  249. package/dist/components/Input/Input.d.ts +0 -40
  250. package/dist/components/Input/Input.d.ts.map +0 -1
  251. package/dist/components/Input/Input.types.d.ts +0 -71
  252. package/dist/components/Input/Input.types.d.ts.map +0 -1
  253. package/dist/components/Input/icons.d.ts +0 -15
  254. package/dist/components/Input/icons.d.ts.map +0 -1
  255. package/dist/components/Input/index.d.ts +0 -3
  256. package/dist/components/Input/index.d.ts.map +0 -1
  257. package/dist/components/LoginView/LoginView.d.ts +0 -36
  258. package/dist/components/LoginView/LoginView.d.ts.map +0 -1
  259. package/dist/components/LoginView/LoginView.types.d.ts +0 -46
  260. package/dist/components/LoginView/LoginView.types.d.ts.map +0 -1
  261. package/dist/components/LoginView/icons.d.ts +0 -18
  262. package/dist/components/LoginView/icons.d.ts.map +0 -1
  263. package/dist/components/LoginView/index.d.ts +0 -4
  264. package/dist/components/LoginView/index.d.ts.map +0 -1
  265. package/dist/components/Navbar/Navbar.d.ts +0 -63
  266. package/dist/components/Navbar/Navbar.d.ts.map +0 -1
  267. package/dist/components/Navbar/Navbar.types.d.ts +0 -194
  268. package/dist/components/Navbar/Navbar.types.d.ts.map +0 -1
  269. package/dist/components/Navbar/icons.d.ts +0 -12
  270. package/dist/components/Navbar/icons.d.ts.map +0 -1
  271. package/dist/components/Navbar/index.d.ts +0 -4
  272. package/dist/components/Navbar/index.d.ts.map +0 -1
  273. package/dist/components/NavigationBar/NavigationBar.d.ts +0 -75
  274. package/dist/components/NavigationBar/NavigationBar.d.ts.map +0 -1
  275. package/dist/components/NavigationBar/NavigationBar.types.d.ts +0 -63
  276. package/dist/components/NavigationBar/NavigationBar.types.d.ts.map +0 -1
  277. package/dist/components/NavigationBar/index.d.ts +0 -3
  278. package/dist/components/NavigationBar/index.d.ts.map +0 -1
  279. package/dist/components/NavigationRail/NavigationRail.d.ts +0 -7
  280. package/dist/components/NavigationRail/NavigationRail.d.ts.map +0 -1
  281. package/dist/components/NavigationRail/NavigationRail.types.d.ts +0 -92
  282. package/dist/components/NavigationRail/NavigationRail.types.d.ts.map +0 -1
  283. package/dist/components/NavigationRail/index.d.ts +0 -3
  284. package/dist/components/NavigationRail/index.d.ts.map +0 -1
  285. package/dist/components/NavigationRailCommercial/NavigationRailCommercial.d.ts +0 -122
  286. package/dist/components/NavigationRailCommercial/NavigationRailCommercial.d.ts.map +0 -1
  287. package/dist/components/NavigationRailCommercial/NavigationRailCommercial.types.d.ts +0 -139
  288. package/dist/components/NavigationRailCommercial/NavigationRailCommercial.types.d.ts.map +0 -1
  289. package/dist/components/NavigationRailCommercial/icons.d.ts +0 -33
  290. package/dist/components/NavigationRailCommercial/icons.d.ts.map +0 -1
  291. package/dist/components/NavigationRailCommercial/index.d.ts +0 -4
  292. package/dist/components/NavigationRailCommercial/index.d.ts.map +0 -1
  293. package/dist/components/NavigationRailItem/NavigationRailItem.d.ts +0 -90
  294. package/dist/components/NavigationRailItem/NavigationRailItem.d.ts.map +0 -1
  295. package/dist/components/NavigationRailItem/NavigationRailItem.types.d.ts +0 -162
  296. package/dist/components/NavigationRailItem/NavigationRailItem.types.d.ts.map +0 -1
  297. package/dist/components/NavigationRailItem/index.d.ts +0 -3
  298. package/dist/components/NavigationRailItem/index.d.ts.map +0 -1
  299. package/dist/components/NavigationRailPanel/NavigationRailPanel.d.ts +0 -124
  300. package/dist/components/NavigationRailPanel/NavigationRailPanel.d.ts.map +0 -1
  301. package/dist/components/NavigationRailPanel/NavigationRailPanel.types.d.ts +0 -154
  302. package/dist/components/NavigationRailPanel/NavigationRailPanel.types.d.ts.map +0 -1
  303. package/dist/components/NavigationRailPanel/index.d.ts +0 -3
  304. package/dist/components/NavigationRailPanel/index.d.ts.map +0 -1
  305. package/dist/components/NavigationRailTypes/NavigationRailTypes.d.ts +0 -99
  306. package/dist/components/NavigationRailTypes/NavigationRailTypes.d.ts.map +0 -1
  307. package/dist/components/NavigationRailTypes/NavigationRailTypes.types.d.ts +0 -152
  308. package/dist/components/NavigationRailTypes/NavigationRailTypes.types.d.ts.map +0 -1
  309. package/dist/components/NavigationRailTypes/icons.d.ts +0 -44
  310. package/dist/components/NavigationRailTypes/icons.d.ts.map +0 -1
  311. package/dist/components/NavigationRailTypes/index.d.ts +0 -4
  312. package/dist/components/NavigationRailTypes/index.d.ts.map +0 -1
  313. package/dist/components/Notification/Notification.d.ts +0 -52
  314. package/dist/components/Notification/Notification.d.ts.map +0 -1
  315. package/dist/components/Notification/Notification.types.d.ts +0 -138
  316. package/dist/components/Notification/Notification.types.d.ts.map +0 -1
  317. package/dist/components/Notification/index.d.ts +0 -3
  318. package/dist/components/Notification/index.d.ts.map +0 -1
  319. package/dist/components/POSConvention/POSConvention.d.ts +0 -55
  320. package/dist/components/POSConvention/POSConvention.d.ts.map +0 -1
  321. package/dist/components/POSConvention/POSConvention.types.d.ts +0 -37
  322. package/dist/components/POSConvention/POSConvention.types.d.ts.map +0 -1
  323. package/dist/components/POSConvention/icons.d.ts +0 -21
  324. package/dist/components/POSConvention/icons.d.ts.map +0 -1
  325. package/dist/components/POSConvention/index.d.ts +0 -4
  326. package/dist/components/POSConvention/index.d.ts.map +0 -1
  327. package/dist/components/POSLocationButton/POSLocationButton.d.ts +0 -73
  328. package/dist/components/POSLocationButton/POSLocationButton.d.ts.map +0 -1
  329. package/dist/components/POSLocationButton/POSLocationButton.types.d.ts +0 -75
  330. package/dist/components/POSLocationButton/POSLocationButton.types.d.ts.map +0 -1
  331. package/dist/components/POSLocationButton/icons.d.ts +0 -37
  332. package/dist/components/POSLocationButton/icons.d.ts.map +0 -1
  333. package/dist/components/POSLocationButton/index.d.ts +0 -4
  334. package/dist/components/POSLocationButton/index.d.ts.map +0 -1
  335. package/dist/components/POSNumberButton/POSNumberButton.d.ts +0 -61
  336. package/dist/components/POSNumberButton/POSNumberButton.d.ts.map +0 -1
  337. package/dist/components/POSNumberButton/POSNumberButton.types.d.ts +0 -43
  338. package/dist/components/POSNumberButton/POSNumberButton.types.d.ts.map +0 -1
  339. package/dist/components/POSNumberButton/index.d.ts +0 -3
  340. package/dist/components/POSNumberButton/index.d.ts.map +0 -1
  341. package/dist/components/POSProductButton/POSProductButton.d.ts +0 -59
  342. package/dist/components/POSProductButton/POSProductButton.d.ts.map +0 -1
  343. package/dist/components/POSProductButton/POSProductButton.types.d.ts +0 -40
  344. package/dist/components/POSProductButton/POSProductButton.types.d.ts.map +0 -1
  345. package/dist/components/POSProductButton/index.d.ts +0 -3
  346. package/dist/components/POSProductButton/index.d.ts.map +0 -1
  347. package/dist/components/POSProductCard/POSProductCard.d.ts +0 -68
  348. package/dist/components/POSProductCard/POSProductCard.d.ts.map +0 -1
  349. package/dist/components/POSProductCard/POSProductCard.types.d.ts +0 -67
  350. package/dist/components/POSProductCard/POSProductCard.types.d.ts.map +0 -1
  351. package/dist/components/POSProductCard/icons.d.ts +0 -10
  352. package/dist/components/POSProductCard/icons.d.ts.map +0 -1
  353. package/dist/components/POSProductCard/index.d.ts +0 -3
  354. package/dist/components/POSProductCard/index.d.ts.map +0 -1
  355. package/dist/components/POSProductSidebarItems/POSProductSidebarItems.d.ts +0 -57
  356. package/dist/components/POSProductSidebarItems/POSProductSidebarItems.d.ts.map +0 -1
  357. package/dist/components/POSProductSidebarItems/POSProductSidebarItems.types.d.ts +0 -85
  358. package/dist/components/POSProductSidebarItems/POSProductSidebarItems.types.d.ts.map +0 -1
  359. package/dist/components/POSProductSidebarItems/icons.d.ts +0 -9
  360. package/dist/components/POSProductSidebarItems/icons.d.ts.map +0 -1
  361. package/dist/components/POSProductSidebarItems/index.d.ts +0 -4
  362. package/dist/components/POSProductSidebarItems/index.d.ts.map +0 -1
  363. package/dist/components/POSTable/POSTable.d.ts +0 -75
  364. package/dist/components/POSTable/POSTable.d.ts.map +0 -1
  365. package/dist/components/POSTable/POSTable.types.d.ts +0 -71
  366. package/dist/components/POSTable/POSTable.types.d.ts.map +0 -1
  367. package/dist/components/POSTable/index.d.ts +0 -3
  368. package/dist/components/POSTable/index.d.ts.map +0 -1
  369. package/dist/components/Pagination/Pagination.d.ts +0 -29
  370. package/dist/components/Pagination/Pagination.d.ts.map +0 -1
  371. package/dist/components/Pagination/Pagination.types.d.ts +0 -79
  372. package/dist/components/Pagination/Pagination.types.d.ts.map +0 -1
  373. package/dist/components/Pagination/icons.d.ts +0 -18
  374. package/dist/components/Pagination/icons.d.ts.map +0 -1
  375. package/dist/components/Pagination/index.d.ts +0 -4
  376. package/dist/components/Pagination/index.d.ts.map +0 -1
  377. package/dist/components/Quantity/Quantity.d.ts +0 -38
  378. package/dist/components/Quantity/Quantity.d.ts.map +0 -1
  379. package/dist/components/Quantity/Quantity.types.d.ts +0 -59
  380. package/dist/components/Quantity/Quantity.types.d.ts.map +0 -1
  381. package/dist/components/Radio/Radio.d.ts +0 -45
  382. package/dist/components/Radio/Radio.d.ts.map +0 -1
  383. package/dist/components/Radio/Radio.types.d.ts +0 -115
  384. package/dist/components/Radio/Radio.types.d.ts.map +0 -1
  385. package/dist/components/Select/Select.d.ts +0 -37
  386. package/dist/components/Select/Select.d.ts.map +0 -1
  387. package/dist/components/Select/Select.types.d.ts +0 -124
  388. package/dist/components/Select/Select.types.d.ts.map +0 -1
  389. package/dist/components/Select/icons.d.ts +0 -20
  390. package/dist/components/Select/icons.d.ts.map +0 -1
  391. package/dist/components/Select/index.d.ts +0 -4
  392. package/dist/components/Select/index.d.ts.map +0 -1
  393. package/dist/components/SignUpView/SignUpView.d.ts +0 -38
  394. package/dist/components/SignUpView/SignUpView.d.ts.map +0 -1
  395. package/dist/components/SignUpView/SignUpView.types.d.ts +0 -51
  396. package/dist/components/SignUpView/SignUpView.types.d.ts.map +0 -1
  397. package/dist/components/SignUpView/icons.d.ts +0 -18
  398. package/dist/components/SignUpView/icons.d.ts.map +0 -1
  399. package/dist/components/SignUpView/index.d.ts +0 -4
  400. package/dist/components/SignUpView/index.d.ts.map +0 -1
  401. package/dist/components/Switch/Switch.d.ts +0 -46
  402. package/dist/components/Switch/Switch.d.ts.map +0 -1
  403. package/dist/components/Switch/Switch.types.d.ts +0 -58
  404. package/dist/components/Switch/Switch.types.d.ts.map +0 -1
  405. package/dist/components/Table/Table.d.ts +0 -64
  406. package/dist/components/Table/Table.d.ts.map +0 -1
  407. package/dist/components/Table/Table.types.d.ts +0 -173
  408. package/dist/components/Table/Table.types.d.ts.map +0 -1
  409. package/dist/components/Table/index.d.ts +0 -3
  410. package/dist/components/Table/index.d.ts.map +0 -1
  411. package/dist/components/Tabs/Tabs.d.ts +0 -76
  412. package/dist/components/Tabs/Tabs.d.ts.map +0 -1
  413. package/dist/components/Tabs/Tabs.types.d.ts +0 -107
  414. package/dist/components/Tabs/Tabs.types.d.ts.map +0 -1
  415. package/dist/components/Tabs/icons.d.ts +0 -45
  416. package/dist/components/Tabs/icons.d.ts.map +0 -1
  417. package/dist/components/Tabs/index.d.ts +0 -4
  418. package/dist/components/Tabs/index.d.ts.map +0 -1
  419. package/dist/components/Textarea/Textarea.d.ts +0 -38
  420. package/dist/components/Textarea/Textarea.d.ts.map +0 -1
  421. package/dist/components/Textarea/Textarea.types.d.ts +0 -46
  422. package/dist/components/Textarea/Textarea.types.d.ts.map +0 -1
  423. package/dist/context/ThemeContext.d.ts +0 -46
  424. package/dist/context/ThemeContext.d.ts.map +0 -1
  425. package/dist/context/index.d.ts +0 -2
  426. package/dist/context/index.d.ts.map +0 -1
  427. package/dist/index.d.ts +0 -88
  428. package/dist/index.d.ts.map +0 -1
  429. package/dist/siesa-ui-kit.cjs +0 -1474
  430. package/dist/siesa-ui-kit.cjs.map +0 -1
  431. package/dist/siesa-ui-kit.mjs +0 -9580
  432. package/dist/siesa-ui-kit.mjs.map +0 -1
  433. package/dist/views/LayoutCommercial/LayoutCommercial.d.ts +0 -48
  434. package/dist/views/LayoutCommercial/LayoutCommercial.d.ts.map +0 -1
  435. package/dist/views/LayoutCommercial/LayoutCommercial.types.d.ts +0 -49
  436. package/dist/views/LayoutCommercial/LayoutCommercial.types.d.ts.map +0 -1
  437. package/dist/views/LayoutCommercial/index.d.ts +0 -3
  438. package/dist/views/LayoutCommercial/index.d.ts.map +0 -1
  439. package/dist/views/ListView/ListView.d.ts +0 -47
  440. package/dist/views/ListView/ListView.d.ts.map +0 -1
  441. package/dist/views/ListView/ListView.types.d.ts +0 -177
  442. package/dist/views/ListView/ListView.types.d.ts.map +0 -1
  443. package/dist/views/ListView/icons.d.ts +0 -60
  444. package/dist/views/ListView/icons.d.ts.map +0 -1
  445. package/dist/views/ListView/index.d.ts +0 -3
  446. package/dist/views/ListView/index.d.ts.map +0 -1
  447. package/dist/views/LoginView/LoginView.d.ts +0 -36
  448. package/dist/views/LoginView/LoginView.d.ts.map +0 -1
  449. package/dist/views/LoginView/LoginView.types.d.ts +0 -46
  450. package/dist/views/LoginView/LoginView.types.d.ts.map +0 -1
  451. package/dist/views/LoginView/icons.d.ts +0 -18
  452. package/dist/views/LoginView/icons.d.ts.map +0 -1
  453. package/dist/views/LoginView/index.d.ts +0 -4
  454. package/dist/views/LoginView/index.d.ts.map +0 -1
  455. package/dist/views/ProductsView/ProductsView.d.ts +0 -56
  456. package/dist/views/ProductsView/ProductsView.d.ts.map +0 -1
  457. package/dist/views/ProductsView/ProductsView.types.d.ts +0 -184
  458. package/dist/views/ProductsView/ProductsView.types.d.ts.map +0 -1
  459. package/dist/views/ProductsView/icons.d.ts +0 -12
  460. package/dist/views/ProductsView/icons.d.ts.map +0 -1
  461. package/dist/views/ProductsView/index.d.ts +0 -3
  462. package/dist/views/ProductsView/index.d.ts.map +0 -1
  463. package/dist/views/RecoverPasswordView/RecoverPasswordView.d.ts +0 -34
  464. package/dist/views/RecoverPasswordView/RecoverPasswordView.d.ts.map +0 -1
  465. package/dist/views/RecoverPasswordView/RecoverPasswordView.types.d.ts +0 -50
  466. package/dist/views/RecoverPasswordView/RecoverPasswordView.types.d.ts.map +0 -1
  467. package/dist/views/RecoverPasswordView/icons.d.ts +0 -9
  468. package/dist/views/RecoverPasswordView/icons.d.ts.map +0 -1
  469. package/dist/views/RecoverPasswordView/index.d.ts +0 -3
  470. package/dist/views/RecoverPasswordView/index.d.ts.map +0 -1
  471. package/dist/views/SignUpView/SignUpView.d.ts +0 -38
  472. package/dist/views/SignUpView/SignUpView.d.ts.map +0 -1
  473. package/dist/views/SignUpView/SignUpView.types.d.ts +0 -51
  474. package/dist/views/SignUpView/SignUpView.types.d.ts.map +0 -1
  475. package/dist/views/SignUpView/icons.d.ts +0 -18
  476. package/dist/views/SignUpView/icons.d.ts.map +0 -1
  477. package/dist/views/SignUpView/index.d.ts +0 -4
  478. package/dist/views/SignUpView/index.d.ts.map +0 -1
  479. package/dist/views/TableLayoutView/TableLayoutView.d.ts +0 -46
  480. package/dist/views/TableLayoutView/TableLayoutView.d.ts.map +0 -1
  481. package/dist/views/TableLayoutView/TableLayoutView.types.d.ts +0 -170
  482. package/dist/views/TableLayoutView/TableLayoutView.types.d.ts.map +0 -1
  483. package/dist/views/TableLayoutView/icons.d.ts +0 -27
  484. package/dist/views/TableLayoutView/icons.d.ts.map +0 -1
  485. package/dist/views/TableLayoutView/index.d.ts +0 -3
  486. package/dist/views/TableLayoutView/index.d.ts.map +0 -1
  487. package/src/components/DropdownItemCollapsible/DropdownItemCollapsible.stories.tsx +0 -317
  488. package/src/components/DropdownItemCollapsible/DropdownItemCollapsible.tsx +0 -307
  489. package/src/components/DropdownItemCollapsible/DropdownItemCollapsible.types.ts +0 -136
  490. package/src/components/DropdownItemCollapsible/README.md +0 -264
  491. package/src/components/DropdownItemCollapsible/icons.tsx +0 -57
  492. package/src/components/DropdownItemCollapsible/index.ts +0 -12
  493. package/src/components/DropdownItemHeading/DropdownItemHeading.stories.tsx +0 -386
  494. package/src/components/DropdownItemHeading/DropdownItemHeading.tsx +0 -216
  495. package/src/components/DropdownItemHeading/DropdownItemHeading.types.ts +0 -93
  496. package/src/components/DropdownItemHeading/README.md +0 -573
  497. package/src/components/DropdownItemHeading/icons.tsx +0 -125
  498. package/src/components/DropdownItemHeading/index.ts +0 -3
  499. package/src/components/NavigationRailCommercial/NavigationRailCommercial.stories.tsx +0 -464
  500. package/src/components/NavigationRailCommercial/NavigationRailCommercial.tsx +0 -301
  501. package/src/components/NavigationRailCommercial/NavigationRailCommercial.types.ts +0 -162
  502. package/src/components/NavigationRailCommercial/README.md +0 -251
  503. package/src/components/NavigationRailCommercial/icons.tsx +0 -54
  504. package/src/components/NavigationRailCommercial/index.ts +0 -6
  505. package/src/components/NavigationRailItem/NavigationRailItem.stories.tsx +0 -667
  506. package/src/components/NavigationRailItem/NavigationRailItem.tsx +0 -314
  507. package/src/components/NavigationRailItem/NavigationRailItem.types.ts +0 -175
  508. package/src/components/NavigationRailItem/README.md +0 -476
  509. package/src/components/NavigationRailItem/index.ts +0 -2
  510. package/src/components/NavigationRailPanel/NavigationRailPanel.stories.tsx +0 -462
  511. package/src/components/NavigationRailPanel/NavigationRailPanel.tsx +0 -332
  512. package/src/components/NavigationRailPanel/NavigationRailPanel.types.ts +0 -178
  513. package/src/components/NavigationRailPanel/README.md +0 -461
  514. package/src/components/NavigationRailPanel/index.ts +0 -6
  515. package/src/components/NavigationRailTypes/NavigationRailTypes.stories.tsx +0 -682
  516. package/src/components/NavigationRailTypes/NavigationRailTypes.tsx +0 -363
  517. package/src/components/NavigationRailTypes/NavigationRailTypes.types.ts +0 -178
  518. package/src/components/NavigationRailTypes/README.md +0 -573
  519. package/src/components/NavigationRailTypes/icons.tsx +0 -76
  520. package/src/components/NavigationRailTypes/index.ts +0 -7
  521. package/src/views/LayoutCommercial/LayoutCommercial.stories.tsx +0 -374
  522. package/src/views/LayoutCommercial/LayoutCommercial.tsx +0 -125
  523. package/src/views/LayoutCommercial/LayoutCommercial.types.ts +0 -54
  524. package/src/views/LayoutCommercial/README.md +0 -286
  525. package/src/views/LayoutCommercial/index.ts +0 -2
  526. package/src/views/ListView/ListView.stories.tsx +0 -329
  527. package/src/views/ListView/ListView.tsx +0 -570
  528. package/src/views/ListView/ListView.types.ts +0 -211
  529. package/src/views/ListView/icons.tsx +0 -282
  530. package/src/views/ListView/index.ts +0 -11
  531. package/src/views/LoginView/LoginView.stories.tsx +0 -148
  532. package/src/views/LoginView/LoginView.tsx +0 -426
  533. package/src/views/LoginView/LoginView.types.ts +0 -52
  534. package/src/views/LoginView/README.md +0 -396
  535. package/src/views/LoginView/icons.tsx +0 -85
  536. package/src/views/LoginView/index.ts +0 -3
  537. package/src/views/SignUpView/SignUpView.stories.tsx +0 -129
  538. package/src/views/SignUpView/SignUpView.tsx +0 -503
  539. package/src/views/SignUpView/SignUpView.types.ts +0 -58
  540. package/src/views/SignUpView/icons.tsx +0 -71
  541. package/src/views/SignUpView/index.ts +0 -3
package/docs/filters.md CHANGED
@@ -1,1243 +1,1243 @@
1
- # Sistema de Filtros - Siesa UI Kit
2
-
3
- ## 📋 Tabla de Contenidos
4
-
5
- 1. [Introducción](#introducción)
6
- 2. [Blur (Desenfoque)](#blur-desenfoque)
7
- 3. [Backdrop Blur](#backdrop-blur)
8
- 4. [Guía de Uso](#guía-de-uso)
9
- 5. [Ejemplos de Código](#ejemplos-de-código)
10
- 6. [Mejores Prácticas](#mejores-prácticas)
11
- 7. [Dark Mode](#dark-mode)
12
- 8. [Referencia Rápida](#referencia-rápida)
13
-
14
- ---
15
-
16
- ## Introducción
17
-
18
- El sistema de filtros de Siesa UI Kit proporciona efectos de desenfoque (blur) para crear profundidad visual y enfatizar contenido. Los filtros son especialmente útiles para overlays, modales y efectos glassmorphism modernos.
19
-
20
- ### Objetivos del Sistema
21
-
22
- - **Enfoque Visual**: Dirigir la atención del usuario desenfocando contenido secundario
23
- - **Efectos Modernos**: Crear interfaces con glassmorphism y efectos de vidrio esmerilado
24
- - **Jerarquía**: Establecer capas visuales claras
25
- - **Performance**: Valores optimizados para rendimiento en navegadores modernos
26
-
27
- ### Principios de Diseño
28
-
29
- 1. **Usar con Moderación**: El blur es costoso en performance, usar solo cuando aporte valor
30
- 2. **Progresión Suave**: Escalas progresivas desde desenfoque sutil hasta intenso
31
- 3. **Backdrop para Overlays**: Usar backdrop-blur para modales y overlays semi-transparentes
32
- 4. **Blur para Efectos**: Usar blur regular para desenfocar contenido completo
33
-
34
- ---
35
-
36
- ## Blur (Desenfoque)
37
-
38
- El filtro `blur` aplica desenfoque a todo el elemento, incluyendo su contenido y bordes.
39
-
40
- ### Escala de Blur
41
-
42
- | Clase Tailwind | Valor CSS | Blur Radius | Uso Principal |
43
- |----------------|-----------|-------------|---------------|
44
- | `blur-none` | `filter: blur(0px)` | 0px | Sin desenfoque |
45
- | `blur-sm` | `filter: blur(2px)` | 2px | Desenfoque mínimo |
46
- | `blur` o `blur-base` | `filter: blur(4px)` | 4px | **Desenfoque sutil** |
47
- | `blur-md` | `filter: blur(6px)` | 6px | Desenfoque medio-bajo |
48
- | `blur-lg` | `filter: blur(8px)` | 8px | **Desenfoque medio** |
49
- | `blur-xl` | `filter: blur(12px)` | 12px | Desenfoque alto |
50
- | `blur-2xl` | `filter: blur(20px)` | 20px | Desenfoque muy alto |
51
- | `blur-3xl` | `filter: blur(32px)` | 32px | Desenfoque máximo |
52
-
53
- ### Cuándo Usar Blur
54
-
55
- ```tsx
56
- // ✅ Imágenes de fondo
57
- <div className="blur-lg">
58
- <img src="/background.jpg" alt="Background" />
59
- </div>
60
-
61
- // ✅ Placeholders de carga
62
- <div className="blur-md animate-pulse">
63
- Loading content...
64
- </div>
65
-
66
- // ✅ Contenido spoiler
67
- <div className={revealed ? 'blur-none' : 'blur-xl'}>
68
- Spoiler content
69
- </div>
70
- ```
71
-
72
- ### Valores Más Comunes
73
-
74
- - **`blur` (4px)**: Desenfoque sutil para fondos
75
- - **`blur-lg` (8px)**: Desenfoque medio para overlays
76
- - **`blur-xl` (12px)**: Desenfoque alto para efectos dramáticos
77
-
78
- ---
79
-
80
- ## Backdrop Blur
81
-
82
- El filtro `backdrop-blur` aplica desenfoque **solo al fondo** detrás del elemento, no al contenido del elemento. Es ideal para overlays semi-transparentes.
83
-
84
- ### Escala de Backdrop Blur
85
-
86
- | Clase Tailwind | Valor CSS | Blur Radius | Uso Principal |
87
- |----------------|-----------|-------------|---------------|
88
- | `backdrop-blur-none` | `backdrop-filter: blur(0px)` | 0px | Sin desenfoque de fondo |
89
- | `backdrop-blur-sm` | `backdrop-filter: blur(2px)` | 2px | Glassmorphism sutil |
90
- | `backdrop-blur` o `backdrop-blur-base` | `backdrop-filter: blur(4px)` | 4px | **Glassmorphism estándar** |
91
- | `backdrop-blur-md` | `backdrop-filter: blur(6px)` | 6px | Overlay medio |
92
- | `backdrop-blur-lg` | `backdrop-filter: blur(8px)` | 8px | **Overlay modal** |
93
- | `backdrop-blur-xl` | `backdrop-filter: blur(12px)` | 12px | Overlay intenso |
94
- | `backdrop-blur-2xl` | `backdrop-filter: blur(20px)` | 20px | Efecto de vidrio esmerilado |
95
- | `backdrop-blur-3xl` | `backdrop-filter: blur(32px)` | 32px | Efecto máximo |
96
-
97
- ### Cuándo Usar Backdrop Blur
98
-
99
- ```tsx
100
- // ✅ Modal overlays
101
- <div className="backdrop-blur-lg bg-black/50">
102
- <div className="modal-content">...</div>
103
- </div>
104
-
105
- // ✅ Glassmorphism cards
106
- <div className="backdrop-blur-md bg-white/30 rounded-2xl">
107
- Card content visible, background blurred
108
- </div>
109
-
110
- // ✅ Navigation bars semi-transparentes
111
- <nav className="backdrop-blur-sm bg-white/80 sticky top-0">
112
- Navigation items
113
- </nav>
114
- ```
115
-
116
- ### Valores Más Comunes
117
-
118
- - **`backdrop-blur` (4px)**: Glassmorphism sutil
119
- - **`backdrop-blur-lg` (8px)**: Overlays de modales
120
- - **`backdrop-blur-xl` (12px)**: Efectos de vidrio intensos
121
-
122
- ### Diferencia entre Blur y Backdrop Blur
123
-
124
- ```tsx
125
- // blur - Desenfoca TODO el elemento
126
- <div className="blur-lg bg-white/50">
127
- <p>Este texto está desenfocado ❌</p>
128
- </div>
129
-
130
- // backdrop-blur - Solo desenfoca el FONDO
131
- <div className="backdrop-blur-lg bg-white/50">
132
- <p>Este texto está nítido ✅</p>
133
- </div>
134
- ```
135
-
136
- ---
137
-
138
- ## Guía de Uso
139
-
140
- ### Por Caso de Uso
141
-
142
- #### 1. Overlays de Modales
143
-
144
- ```tsx
145
- // Overlay con backdrop-blur
146
- <div className="fixed inset-0 backdrop-blur-lg bg-black/50 flex items-center justify-center">
147
- {/* Modal content */}
148
- <div className="rounded-3xl bg-white shadow-xl p-8">
149
- <h2>Modal Title</h2>
150
- <p>Modal content is clear, background is blurred</p>
151
- </div>
152
- </div>
153
- ```
154
-
155
- **Recomendación**: `backdrop-blur-lg` + `bg-black/50` para overlays oscuros
156
-
157
- #### 2. Glassmorphism Cards
158
-
159
- ```tsx
160
- // Card con efecto de vidrio
161
- <div className="backdrop-blur-md bg-white/30 border border-white/50 rounded-2xl p-6 shadow-xl">
162
- <h3 className="font-bold text-lg">Glassmorphism Card</h3>
163
- <p>Content is visible, background behind card is blurred</p>
164
- </div>
165
- ```
166
-
167
- **Recomendación**: `backdrop-blur-md` + `bg-white/30` para efecto de vidrio
168
-
169
- #### 3. Navigation Bar Flotante
170
-
171
- ```tsx
172
- // Navbar que desenfoca el fondo mientras se desplaza
173
- <nav className="sticky top-0 z-50 backdrop-blur-sm bg-white/80 border-b border-border-primary">
174
- <div className="container mx-auto px-6 py-4">
175
- <ul className="flex gap-6">
176
- <li>Home</li>
177
- <li>About</li>
178
- <li>Contact</li>
179
- </ul>
180
- </div>
181
- </nav>
182
- ```
183
-
184
- **Recomendación**: `backdrop-blur-sm` + `bg-white/80` para navbars
185
-
186
- #### 4. Loading States
187
-
188
- ```tsx
189
- // Skeleton con blur mientras carga
190
- <div className={isLoading ? 'blur-md animate-pulse' : 'blur-none'}>
191
- <img src={imageSrc} alt="Content" />
192
- <p>Content description</p>
193
- </div>
194
- ```
195
-
196
- **Recomendación**: `blur-md` para estados de carga
197
-
198
- #### 5. Spoiler/Hidden Content
199
-
200
- ```tsx
201
- // Contenido que se revela al hacer click
202
- const [revealed, setRevealed] = useState(false);
203
-
204
- <div
205
- onClick={() => setRevealed(true)}
206
- className={`cursor-pointer transition-all duration-300 ${
207
- revealed ? 'blur-none' : 'blur-xl'
208
- }`}
209
- >
210
- <p>Click to reveal spoiler content!</p>
211
- </div>
212
- ```
213
-
214
- **Recomendación**: `blur-xl` para contenido oculto, transición a `blur-none`
215
-
216
- #### 6. Imágenes de Fondo
217
-
218
- ```tsx
219
- // Hero section con imagen de fondo desenfocada
220
- <div className="relative h-screen">
221
- <div className="absolute inset-0 blur-2xl opacity-50">
222
- <img src="/hero-bg.jpg" alt="" className="w-full h-full object-cover" />
223
- </div>
224
- <div className="relative z-10 flex items-center justify-center h-full">
225
- <h1 className="text-6xl font-bold text-white">
226
- Hero Title
227
- </h1>
228
- </div>
229
- </div>
230
- ```
231
-
232
- **Recomendación**: `blur-2xl` + `opacity-50` para fondos decorativos
233
-
234
- ---
235
-
236
- ## Ejemplos de Código
237
-
238
- ### Ejemplo 1: Modal con Backdrop Blur
239
-
240
- ```tsx
241
- export const GlassModal = ({ isOpen, onClose, children }) => {
242
- if (!isOpen) return null;
243
-
244
- return (
245
- <div className="fixed inset-0 z-50 flex items-center justify-center p-4">
246
- {/* Overlay con backdrop-blur */}
247
- <div
248
- className="absolute inset-0 backdrop-blur-lg bg-black/50 transition-all"
249
- onClick={onClose}
250
- />
251
-
252
- {/* Modal content - nítido */}
253
- <div className="relative z-10 rounded-3xl bg-white shadow-2xl max-w-2xl w-full">
254
- {/* Header */}
255
- <div className="flex items-center justify-between p-6 border-b border-border-primary">
256
- <h2 className="text-2xl font-bold">Modal con Backdrop Blur</h2>
257
- <button
258
- onClick={onClose}
259
- className="rounded-full hover:bg-gray-100 p-2"
260
- >
261
- <XIcon />
262
- </button>
263
- </div>
264
-
265
- {/* Body */}
266
- <div className="p-6">
267
- {children}
268
- </div>
269
-
270
- {/* Footer */}
271
- <div className="flex gap-3 justify-end p-6 border-t border-border-primary">
272
- <button
273
- onClick={onClose}
274
- className="rounded-md border border-border-primary px-4 py-2 font-bold"
275
- >
276
- Cancelar
277
- </button>
278
- <button className="rounded-md bg-primary-custom-600 text-white px-4 py-2 font-bold">
279
- Confirmar
280
- </button>
281
- </div>
282
- </div>
283
- </div>
284
- );
285
- };
286
- ```
287
-
288
- ### Ejemplo 2: Glassmorphism Card Grid
289
-
290
- ```tsx
291
- export const GlassCardGrid = () => {
292
- const cards = [
293
- { title: 'Analytics', value: '1,234', icon: <ChartIcon /> },
294
- { title: 'Users', value: '5,678', icon: <UserIcon /> },
295
- { title: 'Revenue', value: '$12.5k', icon: <DollarIcon /> },
296
- ];
297
-
298
- return (
299
- <div
300
- className="min-h-screen p-8"
301
- style={{
302
- backgroundImage: 'url(/gradient-bg.jpg)',
303
- backgroundSize: 'cover',
304
- }}
305
- >
306
- <div className="grid grid-cols-3 gap-6">
307
- {cards.map((card) => (
308
- <div
309
- key={card.title}
310
- className="backdrop-blur-md bg-white/30 border border-white/50 rounded-2xl p-6 shadow-xl hover:bg-white/40 transition-all"
311
- >
312
- <div className="flex items-center gap-4 mb-4">
313
- <div className="w-12 h-12 rounded-full bg-primary-custom-600/20 flex items-center justify-center">
314
- {card.icon}
315
- </div>
316
- <h3 className="font-bold text-lg">{card.title}</h3>
317
- </div>
318
- <p className="text-4xl font-bold">{card.value}</p>
319
- </div>
320
- ))}
321
- </div>
322
- </div>
323
- );
324
- };
325
- ```
326
-
327
- ### Ejemplo 3: Floating Navigation Bar
328
-
329
- ```tsx
330
- export const FloatingNav = () => {
331
- const [scrolled, setScrolled] = useState(false);
332
-
333
- useEffect(() => {
334
- const handleScroll = () => {
335
- setScrolled(window.scrollY > 50);
336
- };
337
-
338
- window.addEventListener('scroll', handleScroll);
339
- return () => window.removeEventListener('scroll', handleScroll);
340
- }, []);
341
-
342
- return (
343
- <nav
344
- className={`sticky top-0 z-50 transition-all duration-300 ${
345
- scrolled
346
- ? 'backdrop-blur-md bg-white/80 shadow-md'
347
- : 'bg-transparent'
348
- }`}
349
- >
350
- <div className="container mx-auto px-6 py-4">
351
- <div className="flex items-center justify-between">
352
- <div className="font-bold text-xl">Logo</div>
353
- <ul className="flex gap-6 font-bold">
354
- <li>
355
- <a href="#home" className="hover:text-primary-custom-600">
356
- Home
357
- </a>
358
- </li>
359
- <li>
360
- <a href="#about" className="hover:text-primary-custom-600">
361
- About
362
- </a>
363
- </li>
364
- <li>
365
- <a href="#contact" className="hover:text-primary-custom-600">
366
- Contact
367
- </a>
368
- </li>
369
- </ul>
370
- </div>
371
- </div>
372
- </nav>
373
- );
374
- };
375
- ```
376
-
377
- ### Ejemplo 4: Image Gallery con Blur Hover
378
-
379
- ```tsx
380
- export const BlurImageGallery = ({ images }) => {
381
- return (
382
- <div className="grid grid-cols-4 gap-4 p-8">
383
- {images.map((image, index) => (
384
- <div
385
- key={index}
386
- className="group relative aspect-square overflow-hidden rounded-xl cursor-pointer"
387
- >
388
- {/* Imagen */}
389
- <img
390
- src={image.src}
391
- alt={image.alt}
392
- className="w-full h-full object-cover transition-all duration-300 group-hover:blur-sm group-hover:scale-110"
393
- />
394
-
395
- {/* Overlay que aparece en hover */}
396
- <div className="absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity bg-black/30 backdrop-blur-none">
397
- <button className="rounded-md bg-white px-4 py-2 font-bold shadow-lg">
398
- Ver Detalles
399
- </button>
400
- </div>
401
- </div>
402
- ))}
403
- </div>
404
- );
405
- };
406
- ```
407
-
408
- ### Ejemplo 5: Loading Skeleton con Blur
409
-
410
- ```tsx
411
- export const ContentLoader = ({ isLoading, children }) => {
412
- return (
413
- <div className="relative">
414
- {/* Contenido real */}
415
- <div
416
- className={`transition-all duration-500 ${
417
- isLoading ? 'blur-md opacity-50' : 'blur-none opacity-100'
418
- }`}
419
- >
420
- {children}
421
- </div>
422
-
423
- {/* Indicador de carga */}
424
- {isLoading && (
425
- <div className="absolute inset-0 flex items-center justify-center">
426
- <div className="rounded-full bg-white p-4 shadow-lg">
427
- <div className="animate-spin w-8 h-8 border-4 border-primary-custom-600 border-t-transparent rounded-full" />
428
- </div>
429
- </div>
430
- )}
431
- </div>
432
- );
433
- };
434
-
435
- // Uso
436
- <ContentLoader isLoading={isLoading}>
437
- <div className="space-y-4">
438
- <h2 className="text-2xl font-bold">Article Title</h2>
439
- <p>Article content...</p>
440
- </div>
441
- </ContentLoader>
442
- ```
443
-
444
- ---
445
-
446
- ## Mejores Prácticas
447
-
448
- ### ✅ Hacer
449
-
450
- 1. **Usar backdrop-blur para overlays**
451
- ```tsx
452
- // ✅ CORRECTO - backdrop-blur mantiene el contenido nítido
453
- <div className="backdrop-blur-lg bg-black/50">
454
- <p className="text-white">Texto nítido</p>
455
- </div>
456
- ```
457
-
458
- 2. **Combinar con opacidad para mejores efectos**
459
- ```tsx
460
- // ✅ CORRECTO - backdrop-blur + opacidad
461
- <div className="backdrop-blur-md bg-white/30 border border-white/50">
462
- Glassmorphism effect
463
- </div>
464
- ```
465
-
466
- 3. **Usar transiciones para cambios suaves**
467
- ```tsx
468
- // ✅ CORRECTO - transición suave
469
- <div className={`transition-all duration-300 ${blur ? 'blur-xl' : 'blur-none'}`}>
470
- Content
471
- </div>
472
- ```
473
-
474
- 4. **Optimizar performance con will-change**
475
- ```tsx
476
- // ✅ CORRECTO - optimización para animaciones
477
- <div className="backdrop-blur-lg" style={{ willChange: 'backdrop-filter' }}>
478
- Optimized blur
479
- </div>
480
- ```
481
-
482
- 5. **Usar valores moderados por defecto**
483
- ```tsx
484
- // ✅ CORRECTO - blur moderado
485
- <div className="backdrop-blur-md">Modal overlay</div>
486
- ```
487
-
488
- ### ❌ Evitar
489
-
490
- 1. **No usar blur regular para overlays**
491
- ```tsx
492
- // ❌ INCORRECTO - blur desenfoca el contenido también
493
- <div className="blur-lg bg-black/50">
494
- <p>Texto desenfocado (no legible) ❌</p>
495
- </div>
496
-
497
- // ✅ CORRECTO - backdrop-blur solo desenfoca el fondo
498
- <div className="backdrop-blur-lg bg-black/50">
499
- <p>Texto nítido (legible) ✅</p>
500
- </div>
501
- ```
502
-
503
- 2. **No aplicar blur muy alto a elementos interactivos**
504
- ```tsx
505
- // ❌ INCORRECTO - botón ilegible
506
- <button className="blur-2xl">Click me</button>
507
-
508
- // ✅ CORRECTO - botón nítido
509
- <button className="backdrop-blur-md bg-white/30">Click me</button>
510
- ```
511
-
512
- 3. **No apilar múltiples blurs innecesariamente**
513
- ```tsx
514
- // ❌ INCORRECTO - performance cost alto
515
- <div className="backdrop-blur-lg">
516
- <div className="backdrop-blur-lg">
517
- <div className="backdrop-blur-lg">Content</div>
518
- </div>
519
- </div>
520
-
521
- // ✅ CORRECTO - un solo blur en el nivel apropiado
522
- <div className="backdrop-blur-lg">
523
- <div>
524
- <div>Content</div>
525
- </div>
526
- </div>
527
- ```
528
-
529
- 4. **No usar blur sin opacidad en fondos**
530
- ```tsx
531
- // ❌ INCORRECTO - blur sin ver el fondo
532
- <div className="backdrop-blur-lg bg-white">
533
- No se ve el efecto de blur
534
- </div>
535
-
536
- // ✅ CORRECTO - blur con transparencia
537
- <div className="backdrop-blur-lg bg-white/30">
538
- Se ve el efecto de blur
539
- </div>
540
- ```
541
-
542
- 5. **No olvidar fallbacks para navegadores antiguos**
543
- ```tsx
544
- // ❌ INCORRECTO - sin fallback
545
- <div className="backdrop-blur-lg bg-white/30">
546
- Content
547
- </div>
548
-
549
- // ✅ CORRECTO - con fallback
550
- <div className="backdrop-blur-lg bg-white/30 supports-[backdrop-filter]:bg-white/30 supports-[not_backdrop-filter]:bg-white/80">
551
- Content
552
- </div>
553
- ```
554
-
555
- ### Performance
556
-
557
- 1. **Backdrop-filter es costoso**: Usar con moderación
558
- 2. **Evitar blur en scroll**: Puede causar lag en móviles
559
- 3. **Usar will-change para animaciones**: Optimiza rendering
560
- 4. **Limitar áreas con blur**: No aplicar a toda la página
561
-
562
- ```tsx
563
- // ✅ BUENA PRÁCTICA - will-change para performance
564
- <div
565
- className="backdrop-blur-lg transition-all"
566
- style={{ willChange: 'backdrop-filter' }}
567
- >
568
- Animated blur
569
- </div>
570
- ```
571
-
572
- ### Accesibilidad
573
-
574
- 1. **No depender solo de blur para ocultar contenido sensible**
575
- - Usar blur + técnicas adicionales de ocultamiento
576
-
577
- 2. **Asegurar contraste suficiente**
578
- - El blur puede reducir el contraste del texto
579
-
580
- 3. **Proveer alternativas sin blur**
581
- - Algunos usuarios pueden tener problemas con efectos visuales
582
-
583
- ```tsx
584
- // ✅ CORRECTO - modo reducido de movimiento
585
- <div className={`
586
- ${prefersReducedMotion ? 'bg-black/80' : 'backdrop-blur-lg bg-black/50'}
587
- `}>
588
- Content
589
- </div>
590
- ```
591
-
592
- ---
593
-
594
- ## Dark Mode
595
-
596
- Los filtros de blur y backdrop-blur funcionan de la misma manera en light y dark mode, pero es crucial combinarlos con colores y opacidades apropiadas para cada modo para mantener la legibilidad y la estética.
597
-
598
- ### Configuración de Tailwind CSS
599
-
600
- El modo oscuro en Siesa UI Kit se basa en la estrategia de clases de Tailwind CSS:
601
-
602
- ```javascript
603
- // tailwind.config.js
604
- module.exports = {
605
- darkMode: 'class', // ✅ Estrategia basada en clases (NO 'media')
606
- // ...resto de la configuración
607
- }
608
- ```
609
-
610
- Con esta configuración, el modo oscuro se activa añadiendo la clase `.dark` al elemento `<html>`:
611
-
612
- ```html
613
- <!-- Modo claro -->
614
- <html>
615
- <body>
616
- <!-- Contenido en modo claro -->
617
- </body>
618
- </html>
619
-
620
- <!-- Modo oscuro -->
621
- <html class="dark">
622
- <body>
623
- <!-- Contenido en modo oscuro -->
624
- </body>
625
- </html>
626
- ```
627
-
628
- ### El Modificador `dark:`
629
-
630
- El modificador `dark:` de Tailwind funciona como un **prefijo condicional** que aplica estilos solo cuando la clase `.dark` está presente en un elemento padre (típicamente `<html>`).
631
-
632
- #### Sintaxis Básica para Filtros
633
-
634
- ```tsx
635
- // Patrón básico - Backdrop blur con colores adaptativos
636
- <div className="backdrop-blur-lg bg-white/50 dark:bg-black/50 p-6">
637
- Glassmorphism adaptado a dark mode
638
- </div>
639
-
640
- // Los valores de blur NO cambian, pero los colores SÍ:
641
- // - bg-white/50 en modo claro → bg-black/50 en modo oscuro
642
- ```
643
-
644
- ### Principios de Filtros en Dark Mode
645
-
646
- **Regla de Oro**: Los valores de blur y backdrop-blur permanecen iguales, pero los colores de fondo y las opacidades deben adaptarse:
647
-
648
- ```tsx
649
- // ✅ CORRECTO - Backdrop blur con colores adaptativos
650
- <div className="backdrop-blur-lg bg-white/50 dark:bg-black/50">
651
- Glassmorphism adaptado a dark mode
652
- </div>
653
-
654
- // ✅ CORRECTO - Modal overlay con mayor opacidad en dark
655
- <div className="backdrop-blur-lg bg-black/50 dark:bg-black/70">
656
- Overlay con mayor opacidad en dark mode para mejor contraste
657
- </div>
658
-
659
- // ❌ INCORRECTO - Cambiar valor de blur en dark mode
660
- <div className="backdrop-blur-lg dark:backdrop-blur-sm">
661
- NO hacer esto - mantener blur consistente
662
- </div>
663
- ```
664
-
665
- ### Combinando Filtros con Estados Interactivos
666
-
667
- El modificador `dark:` se puede combinar con hover y otros estados:
668
-
669
- ```tsx
670
- // Dark mode + Hover
671
- <button className="
672
- backdrop-blur-md
673
- bg-white/30 dark:bg-white/10
674
- hover:bg-white/40 dark:hover:bg-white/20
675
- border border-white/50 dark:border-white/20
676
- rounded-md
677
- px-4 py-2
678
- ">
679
- Glass button con hover
680
- </button>
681
-
682
- // Dark mode + Focus
683
- <input className="
684
- backdrop-blur-sm
685
- bg-white/80 dark:bg-dark-bg-primary/80
686
- focus:backdrop-blur-md
687
- border border-border-primary dark:border-dark-border-primary
688
- rounded-md
689
- " />
690
- ```
691
-
692
- ### Orden de Modificadores
693
-
694
- Tailwind CSS recomienda un orden específico:
695
-
696
- **Formato**: `{responsive}:{dark}:{state}:{utility}`
697
-
698
- ```tsx
699
- // ✅ CORRECTO - Orden: responsive → dark → state → utility
700
- <div className="
701
- backdrop-blur-md
702
- md:backdrop-blur-lg
703
- bg-white/30
704
- md:dark:bg-white/10
705
- md:dark:hover:bg-white/20
706
- ">
707
- Card con orden correcto
708
- </div>
709
-
710
- // ❌ INCORRECTO - Orden equivocado
711
- <div className="
712
- dark:md:hover:bg-white/20
713
- backdrop-blur-md
714
- ">
715
- Orden confuso
716
- </div>
717
- ```
718
-
719
- ### Glassmorphism en Dark Mode
720
-
721
- El efecto glassmorphism necesita ajustes especiales para dark mode:
722
-
723
- ```tsx
724
- // Glassmorphism Card - Light Mode
725
- <div className="backdrop-blur-md bg-white/30 border border-white/50 rounded-2xl p-6">
726
- <h3 className="text-content-primary font-bold">Light Mode Glass</h3>
727
- <p className="text-content-secondary">Contenido con efecto de vidrio</p>
728
- </div>
729
-
730
- // Glassmorphism Card - Dark Mode adaptado
731
- <div className="backdrop-blur-md bg-white/30 dark:bg-white/10 border border-white/50 dark:border-white/20 rounded-2xl p-6">
732
- <h3 className="text-content-primary dark:text-dark-content-primary font-bold">
733
- Adaptive Glass
734
- </h3>
735
- <p className="text-content-secondary dark:text-content-secondary">
736
- Efecto de vidrio que se adapta
737
- </p>
738
- </div>
739
- ```
740
-
741
- ### Ejemplos de Componentes con Filtros en Dark Mode
742
-
743
- #### 1. Modal con Backdrop Blur Adaptado
744
-
745
- ```tsx
746
- export const ModalDarkModeBlur = ({ isOpen, onClose, children }) => {
747
- if (!isOpen) return null;
748
-
749
- return (
750
- <div className="fixed inset-0 z-50 flex items-center justify-center p-4">
751
- {/* Overlay adaptado - más opaco en dark mode */}
752
- <div
753
- className="absolute inset-0 backdrop-blur-lg bg-black/50 dark:bg-black/70 transition-all"
754
- onClick={onClose}
755
- />
756
-
757
- {/* Modal content */}
758
- <div className="relative z-10 rounded-3xl bg-white dark:bg-dark-bg-primary shadow-2xl max-w-2xl w-full">
759
- <div className="flex items-center justify-between p-6 border-b border-border-primary dark:border-dark-border-primary">
760
- <h2 className="text-content-primary dark:text-dark-content-primary text-2xl font-bold">
761
- Modal Title
762
- </h2>
763
- <button
764
- onClick={onClose}
765
- className="rounded-full hover:bg-background-secondary dark:hover:bg-dark-bg-primary p-2"
766
- >
767
- <XIcon />
768
- </button>
769
- </div>
770
-
771
- <div className="p-6">
772
- <div className="text-content-primary dark:text-dark-content-primary">
773
- {children}
774
- </div>
775
- </div>
776
-
777
- <div className="flex gap-3 justify-end p-6 border-t border-border-primary dark:border-dark-border-primary">
778
- <button
779
- onClick={onClose}
780
- className="rounded-md border border-border-primary dark:border-dark-border-custom px-4 py-2 font-bold text-content-primary dark:text-dark-content-primary"
781
- >
782
- Cancelar
783
- </button>
784
- <button className="rounded-md bg-primary-custom-600 dark:bg-dark-bg-inverse text-primary-inverse-content dark:text-dark-content-inverse px-4 py-2 font-bold">
785
- Confirmar
786
- </button>
787
- </div>
788
- </div>
789
- </div>
790
- );
791
- };
792
- ```
793
-
794
- #### 2. Glassmorphism Navigation Bar
795
-
796
- ```tsx
797
- export const GlassNavDarkMode = () => {
798
- const [scrolled, setScrolled] = useState(false);
799
-
800
- useEffect(() => {
801
- const handleScroll = () => {
802
- setScrolled(window.scrollY > 50);
803
- };
804
-
805
- window.addEventListener('scroll', handleScroll);
806
- return () => window.removeEventListener('scroll', handleScroll);
807
- }, []);
808
-
809
- return (
810
- <nav
811
- className={`sticky top-0 z-50 transition-all duration-300 ${
812
- scrolled
813
- ? 'backdrop-blur-md bg-white/80 dark:bg-dark-bg-primary/80 shadow-md'
814
- : 'bg-transparent'
815
- }`}
816
- >
817
- <div className="container mx-auto px-6 py-4">
818
- <div className="flex items-center justify-between">
819
- <div className="font-bold text-xl text-content-primary dark:text-dark-content-primary">
820
- Logo
821
- </div>
822
- <ul className="flex gap-6 font-bold text-content-primary dark:text-dark-content-primary">
823
- <li>
824
- <a href="#home" className="hover:text-primary-custom-600 dark:hover:text-dark-content-primary">
825
- Home
826
- </a>
827
- </li>
828
- <li>
829
- <a href="#about" className="hover:text-primary-custom-600 dark:hover:text-dark-content-primary">
830
- About
831
- </a>
832
- </li>
833
- <li>
834
- <a href="#contact" className="hover:text-primary-custom-600 dark:hover:text-dark-content-primary">
835
- Contact
836
- </a>
837
- </li>
838
- </ul>
839
- </div>
840
- </div>
841
- </nav>
842
- );
843
- };
844
- ```
845
-
846
- #### 3. Glassmorphism Card Grid
847
-
848
- ```tsx
849
- export const GlassCardGridDarkMode = () => {
850
- const cards = [
851
- { id: 1, title: 'Analytics', value: '1,234', icon: '📊' },
852
- { id: 2, title: 'Users', value: '5,678', icon: '👥' },
853
- { id: 3, title: 'Revenue', value: '$12.5k', icon: '💰' },
854
- ];
855
-
856
- return (
857
- <div
858
- className="min-h-screen p-8 bg-gradient-to-br from-primary-custom-600 to-purple-600 dark:from-dark-bg-primary dark:to-gray-900"
859
- style={{
860
- backgroundImage: 'url(/gradient-bg.jpg)',
861
- backgroundSize: 'cover',
862
- }}
863
- >
864
- <div className="grid grid-cols-3 gap-6">
865
- {cards.map((card) => (
866
- <div
867
- key={card.id}
868
- className="backdrop-blur-md bg-white/30 dark:bg-white/10 border border-white/50 dark:border-white/20 rounded-2xl p-6 shadow-xl hover:bg-white/40 dark:hover:bg-white/15 transition-all"
869
- >
870
- <div className="flex items-center gap-4 mb-4">
871
- <div className="w-12 h-12 rounded-full bg-primary-custom-600/20 dark:bg-white/10 flex items-center justify-center text-2xl">
872
- {card.icon}
873
- </div>
874
- <h3 className="font-bold text-lg text-content-primary dark:text-white">
875
- {card.title}
876
- </h3>
877
- </div>
878
- <p className="text-4xl font-bold text-content-primary dark:text-white">
879
- {card.value}
880
- </p>
881
- </div>
882
- ))}
883
- </div>
884
- </div>
885
- );
886
- };
887
- ```
888
-
889
- #### 4. Loading State con Blur
890
-
891
- ```tsx
892
- export const ContentLoaderDarkMode = ({ isLoading, children }) => {
893
- return (
894
- <div className="relative">
895
- {/* Contenido real */}
896
- <div
897
- className={`transition-all duration-500 ${
898
- isLoading
899
- ? 'blur-md opacity-50'
900
- : 'blur-none opacity-100'
901
- }`}
902
- >
903
- <div className="text-content-primary dark:text-dark-content-primary">
904
- {children}
905
- </div>
906
- </div>
907
-
908
- {/* Indicador de carga */}
909
- {isLoading && (
910
- <div className="absolute inset-0 flex items-center justify-center">
911
- <div className="rounded-full bg-white dark:bg-dark-bg-primary border border-border-primary dark:border-dark-border-primary p-4 shadow-lg">
912
- <div className="animate-spin w-8 h-8 border-4 border-primary-custom-600 dark:border-dark-content-primary border-t-transparent rounded-full" />
913
- </div>
914
- </div>
915
- )}
916
- </div>
917
- );
918
- };
919
- ```
920
-
921
- ### Mejores Prácticas para Filtros en Dark Mode
922
-
923
- #### 1. Ajustar Opacidades para Mejor Contraste
924
-
925
- ```tsx
926
- // ✅ CORRECTO - Opacidad mayor en dark mode para mantener contraste
927
- <div className="backdrop-blur-lg bg-white/50 dark:bg-black/70">
928
- Overlay con buen contraste en ambos modos
929
- </div>
930
-
931
- // ❌ INCORRECTO - Misma opacidad en ambos modos
932
- <div className="backdrop-blur-lg bg-black/50">
933
- Puede verse mal en dark mode
934
- </div>
935
- ```
936
-
937
- #### 2. Glassmorphism Adaptativo
938
-
939
- ```tsx
940
- // ✅ CORRECTO - Glassmorphism adaptado
941
- <div className="backdrop-blur-md bg-white/30 dark:bg-white/10 border border-white/50 dark:border-white/20">
942
- <h3 className="text-content-primary dark:text-white">Title</h3>
943
- </div>
944
-
945
- // ❌ INCORRECTO - No se adapta a dark mode
946
- <div className="backdrop-blur-md bg-white/30 border border-white/50">
947
- <h3 className="text-gray-900">Title</h3>
948
- </div>
949
- ```
950
-
951
- #### 3. Combinar con Colores de Texto Apropiados
952
-
953
- ```tsx
954
- // ✅ CORRECTO - Texto adaptado para mantener legibilidad sobre blur
955
- <div className="backdrop-blur-lg bg-black/50 dark:bg-black/70 rounded-2xl p-6">
956
- <h2 className="text-white font-bold text-2xl mb-2">
957
- Texto claramente legible
958
- </h2>
959
- <p className="text-white/80">
960
- Contenido secundario también legible
961
- </p>
962
- </div>
963
-
964
- // ✅ CORRECTO - Para glassmorphism, usar colores del sistema
965
- <div className="backdrop-blur-md bg-white/30 dark:bg-white/10 rounded-2xl p-6">
966
- <h3 className="text-content-primary dark:text-white font-bold">
967
- Título
968
- </h3>
969
- <p className="text-content-secondary dark:text-white/70">
970
- Descripción
971
- </p>
972
- </div>
973
- ```
974
-
975
- #### 4. Modal Overlays con Backdrop Blur
976
-
977
- ```tsx
978
- // ✅ CORRECTO - Overlay más oscuro en dark mode
979
- <div className="backdrop-blur-lg bg-black/50 dark:bg-black/70">
980
- Modal overlay adaptado
981
- </div>
982
-
983
- // Para overlays claros (menos común)
984
- <div className="backdrop-blur-lg bg-white/50 dark:bg-black/50">
985
- Overlay que cambia completamente en dark mode
986
- </div>
987
- ```
988
-
989
- ### Ejemplo Completo: Hero con Glassmorphism Adaptado
990
-
991
- ```tsx
992
- export const GlassHeroDarkMode = () => {
993
- return (
994
- <div
995
- className="relative min-h-screen flex items-center justify-center p-8 bg-gradient-to-br from-blue-500 to-purple-600 dark:from-gray-900 dark:to-black"
996
- style={{
997
- backgroundImage: 'url(/hero-bg.jpg)',
998
- backgroundSize: 'cover',
999
- backgroundPosition: 'center',
1000
- }}
1001
- >
1002
- {/* Glassmorphism card con contenido */}
1003
- <div className="backdrop-blur-xl bg-white/30 dark:bg-black/30 border border-white/50 dark:border-white/10 rounded-3xl p-12 max-w-3xl shadow-2xl">
1004
- {/* Title */}
1005
- <h1 className="text-white font-bold text-6xl tracking-tighter mb-6 text-center">
1006
- Bienvenido a Siesa UI Kit
1007
- </h1>
1008
-
1009
- {/* Description */}
1010
- <p className="text-white/90 text-xl mb-8 text-center max-w-2xl mx-auto">
1011
- Sistema de diseño moderno con soporte completo para glassmorphism
1012
- y dark mode. Crea interfaces hermosas que funcionan perfectamente
1013
- en cualquier entorno.
1014
- </p>
1015
-
1016
- {/* CTA buttons */}
1017
- <div className="flex gap-4 justify-center mb-8">
1018
- <button className="backdrop-blur-md bg-white/20 dark:bg-white/10 hover:bg-white/30 dark:hover:bg-white/20 border border-white/50 dark:border-white/30 text-white px-6 py-3 rounded-xl font-bold transition-all">
1019
- Comenzar
1020
- </button>
1021
- <button className="bg-white dark:bg-dark-bg-inverse text-primary-custom-600 dark:text-dark-content-inverse px-6 py-3 rounded-xl font-bold hover:bg-white/90 transition-all">
1022
- Documentación
1023
- </button>
1024
- </div>
1025
-
1026
- {/* Stats */}
1027
- <div className="grid grid-cols-3 gap-4 pt-8 border-t border-white/30 dark:border-white/10">
1028
- {[
1029
- { label: 'Components', value: '50+' },
1030
- { label: 'Themes', value: '2' },
1031
- { label: 'Icons', value: '1000+' },
1032
- ].map((stat) => (
1033
- <div key={stat.label} className="text-center">
1034
- <p className="text-white font-bold text-3xl mb-1">{stat.value}</p>
1035
- <p className="text-white/70 text-sm">{stat.label}</p>
1036
- </div>
1037
- ))}
1038
- </div>
1039
- </div>
1040
- </div>
1041
- );
1042
- };
1043
- ```
1044
-
1045
- ### Guía de Opacidades para Dark Mode
1046
-
1047
- Opacidades recomendadas para diferentes casos:
1048
-
1049
- | Caso de Uso | Light Mode | Dark Mode | Razón |
1050
- |-------------|------------|-----------|-------|
1051
- | **Modal Overlay** | `bg-black/50` | `bg-black/70` | Mayor opacidad para mejor contraste |
1052
- | **Glassmorphism Card** | `bg-white/30` | `bg-white/10` | Menos opacidad para evitar brillantez |
1053
- | **Glass Navigation** | `bg-white/80` | `bg-black/80` | Alta opacidad para legibilidad |
1054
- | **Glass Border** | `border-white/50` | `border-white/20` | Bordes más sutiles en dark mode |
1055
- | **Hover State** | `bg-white/40` | `bg-white/15` | Progresión proporcional |
1056
-
1057
- ### Recursos Adicionales sobre Dark Mode
1058
-
1059
- Para más información sobre el modo oscuro:
1060
- - Ver `docs/dark-mode-guide.md` - Guía completa de Dark Mode en Tailwind CSS
1061
- - Ver `docs/colors.md` - Sistema de colores completo con tokens dark mode
1062
- - Ver `docs/border-radius.md` - Border radius con ejemplos de dark mode
1063
- - Ver `docs/shadows.md` - Sombras adaptadas a dark mode
1064
- - Ver `docs/typography.md` - Sistema tipográfico adaptado a dark mode
1065
- - [Documentación oficial de Tailwind Dark Mode](https://tailwindcss.com/docs/dark-mode)
1066
-
1067
- ---
1068
-
1069
- ## Referencia Rápida
1070
-
1071
- ### Cheat Sheet: Por Caso de Uso
1072
-
1073
- ```tsx
1074
- // ===== OVERLAYS DE MODALES =====
1075
- <div className="backdrop-blur-lg bg-black/50">Modal</div>
1076
-
1077
- // ===== GLASSMORPHISM CARDS =====
1078
- <div className="backdrop-blur-md bg-white/30 border border-white/50">Glass Card</div>
1079
-
1080
- // ===== NAVIGATION BARS =====
1081
- <nav className="backdrop-blur-sm bg-white/80 sticky top-0">Nav</nav>
1082
-
1083
- // ===== LOADING STATES =====
1084
- <div className="blur-md animate-pulse">Loading...</div>
1085
-
1086
- // ===== SPOILER CONTENT =====
1087
- <div className={revealed ? 'blur-none' : 'blur-xl'}>Spoiler</div>
1088
-
1089
- // ===== BACKGROUND IMAGES =====
1090
- <div className="blur-2xl opacity-50">
1091
- <img src="/bg.jpg" />
1092
- </div>
1093
- ```
1094
-
1095
- ### Cheat Sheet: Todas las Escalas
1096
-
1097
- **Blur (desenfoca elemento completo)**
1098
- ```css
1099
- blur-none → blur(0px)
1100
- blur-sm → blur(2px)
1101
- blur → blur(4px) /* blur-base */
1102
- blur-md → blur(6px)
1103
- blur-lg → blur(8px)
1104
- blur-xl → blur(12px)
1105
- blur-2xl → blur(20px)
1106
- blur-3xl → blur(32px)
1107
- ```
1108
-
1109
- **Backdrop Blur (desenfoca solo el fondo)**
1110
- ```css
1111
- backdrop-blur-none → backdrop-filter: blur(0px)
1112
- backdrop-blur-sm → backdrop-filter: blur(2px)
1113
- backdrop-blur → backdrop-filter: blur(4px) /* backdrop-blur-base */
1114
- backdrop-blur-md → backdrop-filter: blur(6px)
1115
- backdrop-blur-lg → backdrop-filter: blur(8px)
1116
- backdrop-blur-xl → backdrop-filter: blur(12px)
1117
- backdrop-blur-2xl → backdrop-filter: blur(20px)
1118
- backdrop-blur-3xl → backdrop-filter: blur(32px)
1119
- ```
1120
-
1121
- ### Cheat Sheet: Combinaciones Comunes
1122
-
1123
- ```tsx
1124
- // Modal overlay oscuro
1125
- className="backdrop-blur-lg bg-black/50"
1126
-
1127
- // Modal overlay claro
1128
- className="backdrop-blur-lg bg-white/50"
1129
-
1130
- // Glass card oscuro
1131
- className="backdrop-blur-md bg-black/30 border border-white/20"
1132
-
1133
- // Glass card claro
1134
- className="backdrop-blur-md bg-white/30 border border-white/50"
1135
-
1136
- // Navbar flotante
1137
- className="backdrop-blur-sm bg-white/80"
1138
-
1139
- // Hero background
1140
- className="blur-2xl opacity-50"
1141
-
1142
- // Loading state
1143
- className="blur-md animate-pulse"
1144
-
1145
- // Spoiler hide
1146
- className="blur-xl"
1147
- ```
1148
-
1149
- ### Cheat Sheet: Transiciones
1150
-
1151
- ```tsx
1152
- // Transición básica de blur
1153
- <div className="blur-none hover:blur-md transition-all">...</div>
1154
-
1155
- // Transición con duración
1156
- <div className="blur-none hover:blur-lg transition-all duration-500">...</div>
1157
-
1158
- // Toggle blur con estado
1159
- <div className={`transition-all duration-300 ${isBlurred ? 'blur-xl' : 'blur-none'}`}>...</div>
1160
-
1161
- // Backdrop blur animado
1162
- <div className={`transition-all ${show ? 'backdrop-blur-lg' : 'backdrop-blur-none'}`}>...</div>
1163
- ```
1164
-
1165
- ---
1166
-
1167
- ## Recursos Adicionales
1168
-
1169
- ### Soporte de Navegadores
1170
-
1171
- **backdrop-filter** (Backdrop Blur):
1172
- - ✅ Chrome/Edge: 76+
1173
- - ✅ Firefox: 103+
1174
- - ✅ Safari: 9+ (con -webkit-prefix hasta v14)
1175
- - ❌ IE: No soportado
1176
-
1177
- **filter: blur** (Blur regular):
1178
- - ✅ Excelente soporte en todos los navegadores modernos
1179
- - ✅ IE: 10+ (con limitaciones)
1180
-
1181
- ### Fallbacks para Navegadores Antiguos
1182
-
1183
- ```tsx
1184
- // Con fallback para navegadores sin backdrop-filter
1185
- <div className="
1186
- backdrop-blur-lg
1187
- bg-white/30
1188
- [@supports(backdrop-filter:blur(0))]:bg-white/30
1189
- [@supports(not(backdrop-filter:blur(0)))]:bg-white/80
1190
- ">
1191
- Content con fallback
1192
- </div>
1193
- ```
1194
-
1195
- ### Enlaces Útiles
1196
-
1197
- - **CSS backdrop-filter**: https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter
1198
- - **CSS filter**: https://developer.mozilla.org/en-US/docs/Web/CSS/filter
1199
- - **Tailwind Blur**: https://tailwindcss.com/docs/blur
1200
- - **Tailwind Backdrop Blur**: https://tailwindcss.com/docs/backdrop-blur
1201
- - **Can I Use backdrop-filter**: https://caniuse.com/css-backdrop-filter
1202
-
1203
- ### Archivos Relacionados
1204
-
1205
- - `docs/shadows.md` - Sistema de sombras (se combina bien con blur)
1206
- - `docs/colors.md` - Sistema de colores (para fondos con opacidad)
1207
- - `docs/border-radius.md` - Border radius (para glassmorphism cards)
1208
-
1209
- ### Performance Tips
1210
-
1211
- ```tsx
1212
- // ✅ Optimizar con will-change
1213
- <div
1214
- className="backdrop-blur-lg"
1215
- style={{ willChange: 'backdrop-filter' }}
1216
- >
1217
- Optimized
1218
- </div>
1219
-
1220
- // ✅ Usar transform: translateZ para hardware acceleration
1221
- <div
1222
- className="backdrop-blur-lg"
1223
- style={{ transform: 'translateZ(0)' }}
1224
- >
1225
- Hardware accelerated
1226
- </div>
1227
-
1228
- // ✅ Limitar el área con blur
1229
- <div className="backdrop-blur-lg max-w-2xl">
1230
- Limited area
1231
- </div>
1232
-
1233
- // ❌ Evitar blur en toda la página
1234
- <body className="backdrop-blur-lg"> {/* No recomendado */}
1235
- ...
1236
- </body>
1237
- ```
1238
-
1239
- ---
1240
-
1241
- **Última actualización**: 2025-11-11
1242
- **Versión**: 1.0.0
1243
- **Mantenedor**: Siesa UI Kit Team
1
+ # Sistema de Filtros - Siesa UI Kit
2
+
3
+ ## 📋 Tabla de Contenidos
4
+
5
+ 1. [Introducción](#introducción)
6
+ 2. [Blur (Desenfoque)](#blur-desenfoque)
7
+ 3. [Backdrop Blur](#backdrop-blur)
8
+ 4. [Guía de Uso](#guía-de-uso)
9
+ 5. [Ejemplos de Código](#ejemplos-de-código)
10
+ 6. [Mejores Prácticas](#mejores-prácticas)
11
+ 7. [Dark Mode](#dark-mode)
12
+ 8. [Referencia Rápida](#referencia-rápida)
13
+
14
+ ---
15
+
16
+ ## Introducción
17
+
18
+ El sistema de filtros de Siesa UI Kit proporciona efectos de desenfoque (blur) para crear profundidad visual y enfatizar contenido. Los filtros son especialmente útiles para overlays, modales y efectos glassmorphism modernos.
19
+
20
+ ### Objetivos del Sistema
21
+
22
+ - **Enfoque Visual**: Dirigir la atención del usuario desenfocando contenido secundario
23
+ - **Efectos Modernos**: Crear interfaces con glassmorphism y efectos de vidrio esmerilado
24
+ - **Jerarquía**: Establecer capas visuales claras
25
+ - **Performance**: Valores optimizados para rendimiento en navegadores modernos
26
+
27
+ ### Principios de Diseño
28
+
29
+ 1. **Usar con Moderación**: El blur es costoso en performance, usar solo cuando aporte valor
30
+ 2. **Progresión Suave**: Escalas progresivas desde desenfoque sutil hasta intenso
31
+ 3. **Backdrop para Overlays**: Usar backdrop-blur para modales y overlays semi-transparentes
32
+ 4. **Blur para Efectos**: Usar blur regular para desenfocar contenido completo
33
+
34
+ ---
35
+
36
+ ## Blur (Desenfoque)
37
+
38
+ El filtro `blur` aplica desenfoque a todo el elemento, incluyendo su contenido y bordes.
39
+
40
+ ### Escala de Blur
41
+
42
+ | Clase Tailwind | Valor CSS | Blur Radius | Uso Principal |
43
+ |----------------|-----------|-------------|---------------|
44
+ | `blur-none` | `filter: blur(0px)` | 0px | Sin desenfoque |
45
+ | `blur-sm` | `filter: blur(2px)` | 2px | Desenfoque mínimo |
46
+ | `blur` o `blur-base` | `filter: blur(4px)` | 4px | **Desenfoque sutil** |
47
+ | `blur-md` | `filter: blur(6px)` | 6px | Desenfoque medio-bajo |
48
+ | `blur-lg` | `filter: blur(8px)` | 8px | **Desenfoque medio** |
49
+ | `blur-xl` | `filter: blur(12px)` | 12px | Desenfoque alto |
50
+ | `blur-2xl` | `filter: blur(20px)` | 20px | Desenfoque muy alto |
51
+ | `blur-3xl` | `filter: blur(32px)` | 32px | Desenfoque máximo |
52
+
53
+ ### Cuándo Usar Blur
54
+
55
+ ```tsx
56
+ // ✅ Imágenes de fondo
57
+ <div className="blur-lg">
58
+ <img src="/background.jpg" alt="Background" />
59
+ </div>
60
+
61
+ // ✅ Placeholders de carga
62
+ <div className="blur-md animate-pulse">
63
+ Loading content...
64
+ </div>
65
+
66
+ // ✅ Contenido spoiler
67
+ <div className={revealed ? 'blur-none' : 'blur-xl'}>
68
+ Spoiler content
69
+ </div>
70
+ ```
71
+
72
+ ### Valores Más Comunes
73
+
74
+ - **`blur` (4px)**: Desenfoque sutil para fondos
75
+ - **`blur-lg` (8px)**: Desenfoque medio para overlays
76
+ - **`blur-xl` (12px)**: Desenfoque alto para efectos dramáticos
77
+
78
+ ---
79
+
80
+ ## Backdrop Blur
81
+
82
+ El filtro `backdrop-blur` aplica desenfoque **solo al fondo** detrás del elemento, no al contenido del elemento. Es ideal para overlays semi-transparentes.
83
+
84
+ ### Escala de Backdrop Blur
85
+
86
+ | Clase Tailwind | Valor CSS | Blur Radius | Uso Principal |
87
+ |----------------|-----------|-------------|---------------|
88
+ | `backdrop-blur-none` | `backdrop-filter: blur(0px)` | 0px | Sin desenfoque de fondo |
89
+ | `backdrop-blur-sm` | `backdrop-filter: blur(2px)` | 2px | Glassmorphism sutil |
90
+ | `backdrop-blur` o `backdrop-blur-base` | `backdrop-filter: blur(4px)` | 4px | **Glassmorphism estándar** |
91
+ | `backdrop-blur-md` | `backdrop-filter: blur(6px)` | 6px | Overlay medio |
92
+ | `backdrop-blur-lg` | `backdrop-filter: blur(8px)` | 8px | **Overlay modal** |
93
+ | `backdrop-blur-xl` | `backdrop-filter: blur(12px)` | 12px | Overlay intenso |
94
+ | `backdrop-blur-2xl` | `backdrop-filter: blur(20px)` | 20px | Efecto de vidrio esmerilado |
95
+ | `backdrop-blur-3xl` | `backdrop-filter: blur(32px)` | 32px | Efecto máximo |
96
+
97
+ ### Cuándo Usar Backdrop Blur
98
+
99
+ ```tsx
100
+ // ✅ Modal overlays
101
+ <div className="backdrop-blur-lg bg-black/50">
102
+ <div className="modal-content">...</div>
103
+ </div>
104
+
105
+ // ✅ Glassmorphism cards
106
+ <div className="backdrop-blur-md bg-white/30 rounded-2xl">
107
+ Card content visible, background blurred
108
+ </div>
109
+
110
+ // ✅ Navigation bars semi-transparentes
111
+ <nav className="backdrop-blur-sm bg-white/80 sticky top-0">
112
+ Navigation items
113
+ </nav>
114
+ ```
115
+
116
+ ### Valores Más Comunes
117
+
118
+ - **`backdrop-blur` (4px)**: Glassmorphism sutil
119
+ - **`backdrop-blur-lg` (8px)**: Overlays de modales
120
+ - **`backdrop-blur-xl` (12px)**: Efectos de vidrio intensos
121
+
122
+ ### Diferencia entre Blur y Backdrop Blur
123
+
124
+ ```tsx
125
+ // blur - Desenfoca TODO el elemento
126
+ <div className="blur-lg bg-white/50">
127
+ <p>Este texto está desenfocado ❌</p>
128
+ </div>
129
+
130
+ // backdrop-blur - Solo desenfoca el FONDO
131
+ <div className="backdrop-blur-lg bg-white/50">
132
+ <p>Este texto está nítido ✅</p>
133
+ </div>
134
+ ```
135
+
136
+ ---
137
+
138
+ ## Guía de Uso
139
+
140
+ ### Por Caso de Uso
141
+
142
+ #### 1. Overlays de Modales
143
+
144
+ ```tsx
145
+ // Overlay con backdrop-blur
146
+ <div className="fixed inset-0 backdrop-blur-lg bg-black/50 flex items-center justify-center">
147
+ {/* Modal content */}
148
+ <div className="rounded-3xl bg-white shadow-xl p-8">
149
+ <h2>Modal Title</h2>
150
+ <p>Modal content is clear, background is blurred</p>
151
+ </div>
152
+ </div>
153
+ ```
154
+
155
+ **Recomendación**: `backdrop-blur-lg` + `bg-black/50` para overlays oscuros
156
+
157
+ #### 2. Glassmorphism Cards
158
+
159
+ ```tsx
160
+ // Card con efecto de vidrio
161
+ <div className="backdrop-blur-md bg-white/30 border border-white/50 rounded-2xl p-6 shadow-xl">
162
+ <h3 className="font-bold text-lg">Glassmorphism Card</h3>
163
+ <p>Content is visible, background behind card is blurred</p>
164
+ </div>
165
+ ```
166
+
167
+ **Recomendación**: `backdrop-blur-md` + `bg-white/30` para efecto de vidrio
168
+
169
+ #### 3. Navigation Bar Flotante
170
+
171
+ ```tsx
172
+ // Navbar que desenfoca el fondo mientras se desplaza
173
+ <nav className="sticky top-0 z-50 backdrop-blur-sm bg-white/80 border-b border-border-primary">
174
+ <div className="container mx-auto px-6 py-4">
175
+ <ul className="flex gap-6">
176
+ <li>Home</li>
177
+ <li>About</li>
178
+ <li>Contact</li>
179
+ </ul>
180
+ </div>
181
+ </nav>
182
+ ```
183
+
184
+ **Recomendación**: `backdrop-blur-sm` + `bg-white/80` para navbars
185
+
186
+ #### 4. Loading States
187
+
188
+ ```tsx
189
+ // Skeleton con blur mientras carga
190
+ <div className={isLoading ? 'blur-md animate-pulse' : 'blur-none'}>
191
+ <img src={imageSrc} alt="Content" />
192
+ <p>Content description</p>
193
+ </div>
194
+ ```
195
+
196
+ **Recomendación**: `blur-md` para estados de carga
197
+
198
+ #### 5. Spoiler/Hidden Content
199
+
200
+ ```tsx
201
+ // Contenido que se revela al hacer click
202
+ const [revealed, setRevealed] = useState(false);
203
+
204
+ <div
205
+ onClick={() => setRevealed(true)}
206
+ className={`cursor-pointer transition-all duration-300 ${
207
+ revealed ? 'blur-none' : 'blur-xl'
208
+ }`}
209
+ >
210
+ <p>Click to reveal spoiler content!</p>
211
+ </div>
212
+ ```
213
+
214
+ **Recomendación**: `blur-xl` para contenido oculto, transición a `blur-none`
215
+
216
+ #### 6. Imágenes de Fondo
217
+
218
+ ```tsx
219
+ // Hero section con imagen de fondo desenfocada
220
+ <div className="relative h-screen">
221
+ <div className="absolute inset-0 blur-2xl opacity-50">
222
+ <img src="/hero-bg.jpg" alt="" className="w-full h-full object-cover" />
223
+ </div>
224
+ <div className="relative z-10 flex items-center justify-center h-full">
225
+ <h1 className="text-6xl font-bold text-white">
226
+ Hero Title
227
+ </h1>
228
+ </div>
229
+ </div>
230
+ ```
231
+
232
+ **Recomendación**: `blur-2xl` + `opacity-50` para fondos decorativos
233
+
234
+ ---
235
+
236
+ ## Ejemplos de Código
237
+
238
+ ### Ejemplo 1: Modal con Backdrop Blur
239
+
240
+ ```tsx
241
+ export const GlassModal = ({ isOpen, onClose, children }) => {
242
+ if (!isOpen) return null;
243
+
244
+ return (
245
+ <div className="fixed inset-0 z-50 flex items-center justify-center p-4">
246
+ {/* Overlay con backdrop-blur */}
247
+ <div
248
+ className="absolute inset-0 backdrop-blur-lg bg-black/50 transition-all"
249
+ onClick={onClose}
250
+ />
251
+
252
+ {/* Modal content - nítido */}
253
+ <div className="relative z-10 rounded-3xl bg-white shadow-2xl max-w-2xl w-full">
254
+ {/* Header */}
255
+ <div className="flex items-center justify-between p-6 border-b border-border-primary">
256
+ <h2 className="text-2xl font-bold">Modal con Backdrop Blur</h2>
257
+ <button
258
+ onClick={onClose}
259
+ className="rounded-full hover:bg-gray-100 p-2"
260
+ >
261
+ <XIcon />
262
+ </button>
263
+ </div>
264
+
265
+ {/* Body */}
266
+ <div className="p-6">
267
+ {children}
268
+ </div>
269
+
270
+ {/* Footer */}
271
+ <div className="flex gap-3 justify-end p-6 border-t border-border-primary">
272
+ <button
273
+ onClick={onClose}
274
+ className="rounded-md border border-border-primary px-4 py-2 font-bold"
275
+ >
276
+ Cancelar
277
+ </button>
278
+ <button className="rounded-md bg-primary-custom-600 text-white px-4 py-2 font-bold">
279
+ Confirmar
280
+ </button>
281
+ </div>
282
+ </div>
283
+ </div>
284
+ );
285
+ };
286
+ ```
287
+
288
+ ### Ejemplo 2: Glassmorphism Card Grid
289
+
290
+ ```tsx
291
+ export const GlassCardGrid = () => {
292
+ const cards = [
293
+ { title: 'Analytics', value: '1,234', icon: <ChartIcon /> },
294
+ { title: 'Users', value: '5,678', icon: <UserIcon /> },
295
+ { title: 'Revenue', value: '$12.5k', icon: <DollarIcon /> },
296
+ ];
297
+
298
+ return (
299
+ <div
300
+ className="min-h-screen p-8"
301
+ style={{
302
+ backgroundImage: 'url(/gradient-bg.jpg)',
303
+ backgroundSize: 'cover',
304
+ }}
305
+ >
306
+ <div className="grid grid-cols-3 gap-6">
307
+ {cards.map((card) => (
308
+ <div
309
+ key={card.title}
310
+ className="backdrop-blur-md bg-white/30 border border-white/50 rounded-2xl p-6 shadow-xl hover:bg-white/40 transition-all"
311
+ >
312
+ <div className="flex items-center gap-4 mb-4">
313
+ <div className="w-12 h-12 rounded-full bg-primary-custom-600/20 flex items-center justify-center">
314
+ {card.icon}
315
+ </div>
316
+ <h3 className="font-bold text-lg">{card.title}</h3>
317
+ </div>
318
+ <p className="text-4xl font-bold">{card.value}</p>
319
+ </div>
320
+ ))}
321
+ </div>
322
+ </div>
323
+ );
324
+ };
325
+ ```
326
+
327
+ ### Ejemplo 3: Floating Navigation Bar
328
+
329
+ ```tsx
330
+ export const FloatingNav = () => {
331
+ const [scrolled, setScrolled] = useState(false);
332
+
333
+ useEffect(() => {
334
+ const handleScroll = () => {
335
+ setScrolled(window.scrollY > 50);
336
+ };
337
+
338
+ window.addEventListener('scroll', handleScroll);
339
+ return () => window.removeEventListener('scroll', handleScroll);
340
+ }, []);
341
+
342
+ return (
343
+ <nav
344
+ className={`sticky top-0 z-50 transition-all duration-300 ${
345
+ scrolled
346
+ ? 'backdrop-blur-md bg-white/80 shadow-md'
347
+ : 'bg-transparent'
348
+ }`}
349
+ >
350
+ <div className="container mx-auto px-6 py-4">
351
+ <div className="flex items-center justify-between">
352
+ <div className="font-bold text-xl">Logo</div>
353
+ <ul className="flex gap-6 font-bold">
354
+ <li>
355
+ <a href="#home" className="hover:text-primary-custom-600">
356
+ Home
357
+ </a>
358
+ </li>
359
+ <li>
360
+ <a href="#about" className="hover:text-primary-custom-600">
361
+ About
362
+ </a>
363
+ </li>
364
+ <li>
365
+ <a href="#contact" className="hover:text-primary-custom-600">
366
+ Contact
367
+ </a>
368
+ </li>
369
+ </ul>
370
+ </div>
371
+ </div>
372
+ </nav>
373
+ );
374
+ };
375
+ ```
376
+
377
+ ### Ejemplo 4: Image Gallery con Blur Hover
378
+
379
+ ```tsx
380
+ export const BlurImageGallery = ({ images }) => {
381
+ return (
382
+ <div className="grid grid-cols-4 gap-4 p-8">
383
+ {images.map((image, index) => (
384
+ <div
385
+ key={index}
386
+ className="group relative aspect-square overflow-hidden rounded-xl cursor-pointer"
387
+ >
388
+ {/* Imagen */}
389
+ <img
390
+ src={image.src}
391
+ alt={image.alt}
392
+ className="w-full h-full object-cover transition-all duration-300 group-hover:blur-sm group-hover:scale-110"
393
+ />
394
+
395
+ {/* Overlay que aparece en hover */}
396
+ <div className="absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity bg-black/30 backdrop-blur-none">
397
+ <button className="rounded-md bg-white px-4 py-2 font-bold shadow-lg">
398
+ Ver Detalles
399
+ </button>
400
+ </div>
401
+ </div>
402
+ ))}
403
+ </div>
404
+ );
405
+ };
406
+ ```
407
+
408
+ ### Ejemplo 5: Loading Skeleton con Blur
409
+
410
+ ```tsx
411
+ export const ContentLoader = ({ isLoading, children }) => {
412
+ return (
413
+ <div className="relative">
414
+ {/* Contenido real */}
415
+ <div
416
+ className={`transition-all duration-500 ${
417
+ isLoading ? 'blur-md opacity-50' : 'blur-none opacity-100'
418
+ }`}
419
+ >
420
+ {children}
421
+ </div>
422
+
423
+ {/* Indicador de carga */}
424
+ {isLoading && (
425
+ <div className="absolute inset-0 flex items-center justify-center">
426
+ <div className="rounded-full bg-white p-4 shadow-lg">
427
+ <div className="animate-spin w-8 h-8 border-4 border-primary-custom-600 border-t-transparent rounded-full" />
428
+ </div>
429
+ </div>
430
+ )}
431
+ </div>
432
+ );
433
+ };
434
+
435
+ // Uso
436
+ <ContentLoader isLoading={isLoading}>
437
+ <div className="space-y-4">
438
+ <h2 className="text-2xl font-bold">Article Title</h2>
439
+ <p>Article content...</p>
440
+ </div>
441
+ </ContentLoader>
442
+ ```
443
+
444
+ ---
445
+
446
+ ## Mejores Prácticas
447
+
448
+ ### ✅ Hacer
449
+
450
+ 1. **Usar backdrop-blur para overlays**
451
+ ```tsx
452
+ // ✅ CORRECTO - backdrop-blur mantiene el contenido nítido
453
+ <div className="backdrop-blur-lg bg-black/50">
454
+ <p className="text-white">Texto nítido</p>
455
+ </div>
456
+ ```
457
+
458
+ 2. **Combinar con opacidad para mejores efectos**
459
+ ```tsx
460
+ // ✅ CORRECTO - backdrop-blur + opacidad
461
+ <div className="backdrop-blur-md bg-white/30 border border-white/50">
462
+ Glassmorphism effect
463
+ </div>
464
+ ```
465
+
466
+ 3. **Usar transiciones para cambios suaves**
467
+ ```tsx
468
+ // ✅ CORRECTO - transición suave
469
+ <div className={`transition-all duration-300 ${blur ? 'blur-xl' : 'blur-none'}`}>
470
+ Content
471
+ </div>
472
+ ```
473
+
474
+ 4. **Optimizar performance con will-change**
475
+ ```tsx
476
+ // ✅ CORRECTO - optimización para animaciones
477
+ <div className="backdrop-blur-lg" style={{ willChange: 'backdrop-filter' }}>
478
+ Optimized blur
479
+ </div>
480
+ ```
481
+
482
+ 5. **Usar valores moderados por defecto**
483
+ ```tsx
484
+ // ✅ CORRECTO - blur moderado
485
+ <div className="backdrop-blur-md">Modal overlay</div>
486
+ ```
487
+
488
+ ### ❌ Evitar
489
+
490
+ 1. **No usar blur regular para overlays**
491
+ ```tsx
492
+ // ❌ INCORRECTO - blur desenfoca el contenido también
493
+ <div className="blur-lg bg-black/50">
494
+ <p>Texto desenfocado (no legible) ❌</p>
495
+ </div>
496
+
497
+ // ✅ CORRECTO - backdrop-blur solo desenfoca el fondo
498
+ <div className="backdrop-blur-lg bg-black/50">
499
+ <p>Texto nítido (legible) ✅</p>
500
+ </div>
501
+ ```
502
+
503
+ 2. **No aplicar blur muy alto a elementos interactivos**
504
+ ```tsx
505
+ // ❌ INCORRECTO - botón ilegible
506
+ <button className="blur-2xl">Click me</button>
507
+
508
+ // ✅ CORRECTO - botón nítido
509
+ <button className="backdrop-blur-md bg-white/30">Click me</button>
510
+ ```
511
+
512
+ 3. **No apilar múltiples blurs innecesariamente**
513
+ ```tsx
514
+ // ❌ INCORRECTO - performance cost alto
515
+ <div className="backdrop-blur-lg">
516
+ <div className="backdrop-blur-lg">
517
+ <div className="backdrop-blur-lg">Content</div>
518
+ </div>
519
+ </div>
520
+
521
+ // ✅ CORRECTO - un solo blur en el nivel apropiado
522
+ <div className="backdrop-blur-lg">
523
+ <div>
524
+ <div>Content</div>
525
+ </div>
526
+ </div>
527
+ ```
528
+
529
+ 4. **No usar blur sin opacidad en fondos**
530
+ ```tsx
531
+ // ❌ INCORRECTO - blur sin ver el fondo
532
+ <div className="backdrop-blur-lg bg-white">
533
+ No se ve el efecto de blur
534
+ </div>
535
+
536
+ // ✅ CORRECTO - blur con transparencia
537
+ <div className="backdrop-blur-lg bg-white/30">
538
+ Se ve el efecto de blur
539
+ </div>
540
+ ```
541
+
542
+ 5. **No olvidar fallbacks para navegadores antiguos**
543
+ ```tsx
544
+ // ❌ INCORRECTO - sin fallback
545
+ <div className="backdrop-blur-lg bg-white/30">
546
+ Content
547
+ </div>
548
+
549
+ // ✅ CORRECTO - con fallback
550
+ <div className="backdrop-blur-lg bg-white/30 supports-[backdrop-filter]:bg-white/30 supports-[not_backdrop-filter]:bg-white/80">
551
+ Content
552
+ </div>
553
+ ```
554
+
555
+ ### Performance
556
+
557
+ 1. **Backdrop-filter es costoso**: Usar con moderación
558
+ 2. **Evitar blur en scroll**: Puede causar lag en móviles
559
+ 3. **Usar will-change para animaciones**: Optimiza rendering
560
+ 4. **Limitar áreas con blur**: No aplicar a toda la página
561
+
562
+ ```tsx
563
+ // ✅ BUENA PRÁCTICA - will-change para performance
564
+ <div
565
+ className="backdrop-blur-lg transition-all"
566
+ style={{ willChange: 'backdrop-filter' }}
567
+ >
568
+ Animated blur
569
+ </div>
570
+ ```
571
+
572
+ ### Accesibilidad
573
+
574
+ 1. **No depender solo de blur para ocultar contenido sensible**
575
+ - Usar blur + técnicas adicionales de ocultamiento
576
+
577
+ 2. **Asegurar contraste suficiente**
578
+ - El blur puede reducir el contraste del texto
579
+
580
+ 3. **Proveer alternativas sin blur**
581
+ - Algunos usuarios pueden tener problemas con efectos visuales
582
+
583
+ ```tsx
584
+ // ✅ CORRECTO - modo reducido de movimiento
585
+ <div className={`
586
+ ${prefersReducedMotion ? 'bg-black/80' : 'backdrop-blur-lg bg-black/50'}
587
+ `}>
588
+ Content
589
+ </div>
590
+ ```
591
+
592
+ ---
593
+
594
+ ## Dark Mode
595
+
596
+ Los filtros de blur y backdrop-blur funcionan de la misma manera en light y dark mode, pero es crucial combinarlos con colores y opacidades apropiadas para cada modo para mantener la legibilidad y la estética.
597
+
598
+ ### Configuración de Tailwind CSS
599
+
600
+ El modo oscuro en Siesa UI Kit se basa en la estrategia de clases de Tailwind CSS:
601
+
602
+ ```javascript
603
+ // tailwind.config.js
604
+ module.exports = {
605
+ darkMode: 'class', // ✅ Estrategia basada en clases (NO 'media')
606
+ // ...resto de la configuración
607
+ }
608
+ ```
609
+
610
+ Con esta configuración, el modo oscuro se activa añadiendo la clase `.dark` al elemento `<html>`:
611
+
612
+ ```html
613
+ <!-- Modo claro -->
614
+ <html>
615
+ <body>
616
+ <!-- Contenido en modo claro -->
617
+ </body>
618
+ </html>
619
+
620
+ <!-- Modo oscuro -->
621
+ <html class="dark">
622
+ <body>
623
+ <!-- Contenido en modo oscuro -->
624
+ </body>
625
+ </html>
626
+ ```
627
+
628
+ ### El Modificador `dark:`
629
+
630
+ El modificador `dark:` de Tailwind funciona como un **prefijo condicional** que aplica estilos solo cuando la clase `.dark` está presente en un elemento padre (típicamente `<html>`).
631
+
632
+ #### Sintaxis Básica para Filtros
633
+
634
+ ```tsx
635
+ // Patrón básico - Backdrop blur con colores adaptativos
636
+ <div className="backdrop-blur-lg bg-white/50 dark:bg-black/50 p-6">
637
+ Glassmorphism adaptado a dark mode
638
+ </div>
639
+
640
+ // Los valores de blur NO cambian, pero los colores SÍ:
641
+ // - bg-white/50 en modo claro → bg-black/50 en modo oscuro
642
+ ```
643
+
644
+ ### Principios de Filtros en Dark Mode
645
+
646
+ **Regla de Oro**: Los valores de blur y backdrop-blur permanecen iguales, pero los colores de fondo y las opacidades deben adaptarse:
647
+
648
+ ```tsx
649
+ // ✅ CORRECTO - Backdrop blur con colores adaptativos
650
+ <div className="backdrop-blur-lg bg-white/50 dark:bg-black/50">
651
+ Glassmorphism adaptado a dark mode
652
+ </div>
653
+
654
+ // ✅ CORRECTO - Modal overlay con mayor opacidad en dark
655
+ <div className="backdrop-blur-lg bg-black/50 dark:bg-black/70">
656
+ Overlay con mayor opacidad en dark mode para mejor contraste
657
+ </div>
658
+
659
+ // ❌ INCORRECTO - Cambiar valor de blur en dark mode
660
+ <div className="backdrop-blur-lg dark:backdrop-blur-sm">
661
+ NO hacer esto - mantener blur consistente
662
+ </div>
663
+ ```
664
+
665
+ ### Combinando Filtros con Estados Interactivos
666
+
667
+ El modificador `dark:` se puede combinar con hover y otros estados:
668
+
669
+ ```tsx
670
+ // Dark mode + Hover
671
+ <button className="
672
+ backdrop-blur-md
673
+ bg-white/30 dark:bg-white/10
674
+ hover:bg-white/40 dark:hover:bg-white/20
675
+ border border-white/50 dark:border-white/20
676
+ rounded-md
677
+ px-4 py-2
678
+ ">
679
+ Glass button con hover
680
+ </button>
681
+
682
+ // Dark mode + Focus
683
+ <input className="
684
+ backdrop-blur-sm
685
+ bg-white/80 dark:bg-dark-bg-primary/80
686
+ focus:backdrop-blur-md
687
+ border border-border-primary dark:border-dark-border-primary
688
+ rounded-md
689
+ " />
690
+ ```
691
+
692
+ ### Orden de Modificadores
693
+
694
+ Tailwind CSS recomienda un orden específico:
695
+
696
+ **Formato**: `{responsive}:{dark}:{state}:{utility}`
697
+
698
+ ```tsx
699
+ // ✅ CORRECTO - Orden: responsive → dark → state → utility
700
+ <div className="
701
+ backdrop-blur-md
702
+ md:backdrop-blur-lg
703
+ bg-white/30
704
+ md:dark:bg-white/10
705
+ md:dark:hover:bg-white/20
706
+ ">
707
+ Card con orden correcto
708
+ </div>
709
+
710
+ // ❌ INCORRECTO - Orden equivocado
711
+ <div className="
712
+ dark:md:hover:bg-white/20
713
+ backdrop-blur-md
714
+ ">
715
+ Orden confuso
716
+ </div>
717
+ ```
718
+
719
+ ### Glassmorphism en Dark Mode
720
+
721
+ El efecto glassmorphism necesita ajustes especiales para dark mode:
722
+
723
+ ```tsx
724
+ // Glassmorphism Card - Light Mode
725
+ <div className="backdrop-blur-md bg-white/30 border border-white/50 rounded-2xl p-6">
726
+ <h3 className="text-content-primary font-bold">Light Mode Glass</h3>
727
+ <p className="text-content-secondary">Contenido con efecto de vidrio</p>
728
+ </div>
729
+
730
+ // Glassmorphism Card - Dark Mode adaptado
731
+ <div className="backdrop-blur-md bg-white/30 dark:bg-white/10 border border-white/50 dark:border-white/20 rounded-2xl p-6">
732
+ <h3 className="text-content-primary dark:text-dark-content-primary font-bold">
733
+ Adaptive Glass
734
+ </h3>
735
+ <p className="text-content-secondary dark:text-content-secondary">
736
+ Efecto de vidrio que se adapta
737
+ </p>
738
+ </div>
739
+ ```
740
+
741
+ ### Ejemplos de Componentes con Filtros en Dark Mode
742
+
743
+ #### 1. Modal con Backdrop Blur Adaptado
744
+
745
+ ```tsx
746
+ export const ModalDarkModeBlur = ({ isOpen, onClose, children }) => {
747
+ if (!isOpen) return null;
748
+
749
+ return (
750
+ <div className="fixed inset-0 z-50 flex items-center justify-center p-4">
751
+ {/* Overlay adaptado - más opaco en dark mode */}
752
+ <div
753
+ className="absolute inset-0 backdrop-blur-lg bg-black/50 dark:bg-black/70 transition-all"
754
+ onClick={onClose}
755
+ />
756
+
757
+ {/* Modal content */}
758
+ <div className="relative z-10 rounded-3xl bg-white dark:bg-dark-bg-primary shadow-2xl max-w-2xl w-full">
759
+ <div className="flex items-center justify-between p-6 border-b border-border-primary dark:border-dark-border-primary">
760
+ <h2 className="text-content-primary dark:text-dark-content-primary text-2xl font-bold">
761
+ Modal Title
762
+ </h2>
763
+ <button
764
+ onClick={onClose}
765
+ className="rounded-full hover:bg-background-secondary dark:hover:bg-dark-bg-primary p-2"
766
+ >
767
+ <XIcon />
768
+ </button>
769
+ </div>
770
+
771
+ <div className="p-6">
772
+ <div className="text-content-primary dark:text-dark-content-primary">
773
+ {children}
774
+ </div>
775
+ </div>
776
+
777
+ <div className="flex gap-3 justify-end p-6 border-t border-border-primary dark:border-dark-border-primary">
778
+ <button
779
+ onClick={onClose}
780
+ className="rounded-md border border-border-primary dark:border-dark-border-custom px-4 py-2 font-bold text-content-primary dark:text-dark-content-primary"
781
+ >
782
+ Cancelar
783
+ </button>
784
+ <button className="rounded-md bg-primary-custom-600 dark:bg-dark-bg-inverse text-primary-inverse-content dark:text-dark-content-inverse px-4 py-2 font-bold">
785
+ Confirmar
786
+ </button>
787
+ </div>
788
+ </div>
789
+ </div>
790
+ );
791
+ };
792
+ ```
793
+
794
+ #### 2. Glassmorphism Navigation Bar
795
+
796
+ ```tsx
797
+ export const GlassNavDarkMode = () => {
798
+ const [scrolled, setScrolled] = useState(false);
799
+
800
+ useEffect(() => {
801
+ const handleScroll = () => {
802
+ setScrolled(window.scrollY > 50);
803
+ };
804
+
805
+ window.addEventListener('scroll', handleScroll);
806
+ return () => window.removeEventListener('scroll', handleScroll);
807
+ }, []);
808
+
809
+ return (
810
+ <nav
811
+ className={`sticky top-0 z-50 transition-all duration-300 ${
812
+ scrolled
813
+ ? 'backdrop-blur-md bg-white/80 dark:bg-dark-bg-primary/80 shadow-md'
814
+ : 'bg-transparent'
815
+ }`}
816
+ >
817
+ <div className="container mx-auto px-6 py-4">
818
+ <div className="flex items-center justify-between">
819
+ <div className="font-bold text-xl text-content-primary dark:text-dark-content-primary">
820
+ Logo
821
+ </div>
822
+ <ul className="flex gap-6 font-bold text-content-primary dark:text-dark-content-primary">
823
+ <li>
824
+ <a href="#home" className="hover:text-primary-custom-600 dark:hover:text-dark-content-primary">
825
+ Home
826
+ </a>
827
+ </li>
828
+ <li>
829
+ <a href="#about" className="hover:text-primary-custom-600 dark:hover:text-dark-content-primary">
830
+ About
831
+ </a>
832
+ </li>
833
+ <li>
834
+ <a href="#contact" className="hover:text-primary-custom-600 dark:hover:text-dark-content-primary">
835
+ Contact
836
+ </a>
837
+ </li>
838
+ </ul>
839
+ </div>
840
+ </div>
841
+ </nav>
842
+ );
843
+ };
844
+ ```
845
+
846
+ #### 3. Glassmorphism Card Grid
847
+
848
+ ```tsx
849
+ export const GlassCardGridDarkMode = () => {
850
+ const cards = [
851
+ { id: 1, title: 'Analytics', value: '1,234', icon: '📊' },
852
+ { id: 2, title: 'Users', value: '5,678', icon: '👥' },
853
+ { id: 3, title: 'Revenue', value: '$12.5k', icon: '💰' },
854
+ ];
855
+
856
+ return (
857
+ <div
858
+ className="min-h-screen p-8 bg-gradient-to-br from-primary-custom-600 to-purple-600 dark:from-dark-bg-primary dark:to-gray-900"
859
+ style={{
860
+ backgroundImage: 'url(/gradient-bg.jpg)',
861
+ backgroundSize: 'cover',
862
+ }}
863
+ >
864
+ <div className="grid grid-cols-3 gap-6">
865
+ {cards.map((card) => (
866
+ <div
867
+ key={card.id}
868
+ className="backdrop-blur-md bg-white/30 dark:bg-white/10 border border-white/50 dark:border-white/20 rounded-2xl p-6 shadow-xl hover:bg-white/40 dark:hover:bg-white/15 transition-all"
869
+ >
870
+ <div className="flex items-center gap-4 mb-4">
871
+ <div className="w-12 h-12 rounded-full bg-primary-custom-600/20 dark:bg-white/10 flex items-center justify-center text-2xl">
872
+ {card.icon}
873
+ </div>
874
+ <h3 className="font-bold text-lg text-content-primary dark:text-white">
875
+ {card.title}
876
+ </h3>
877
+ </div>
878
+ <p className="text-4xl font-bold text-content-primary dark:text-white">
879
+ {card.value}
880
+ </p>
881
+ </div>
882
+ ))}
883
+ </div>
884
+ </div>
885
+ );
886
+ };
887
+ ```
888
+
889
+ #### 4. Loading State con Blur
890
+
891
+ ```tsx
892
+ export const ContentLoaderDarkMode = ({ isLoading, children }) => {
893
+ return (
894
+ <div className="relative">
895
+ {/* Contenido real */}
896
+ <div
897
+ className={`transition-all duration-500 ${
898
+ isLoading
899
+ ? 'blur-md opacity-50'
900
+ : 'blur-none opacity-100'
901
+ }`}
902
+ >
903
+ <div className="text-content-primary dark:text-dark-content-primary">
904
+ {children}
905
+ </div>
906
+ </div>
907
+
908
+ {/* Indicador de carga */}
909
+ {isLoading && (
910
+ <div className="absolute inset-0 flex items-center justify-center">
911
+ <div className="rounded-full bg-white dark:bg-dark-bg-primary border border-border-primary dark:border-dark-border-primary p-4 shadow-lg">
912
+ <div className="animate-spin w-8 h-8 border-4 border-primary-custom-600 dark:border-dark-content-primary border-t-transparent rounded-full" />
913
+ </div>
914
+ </div>
915
+ )}
916
+ </div>
917
+ );
918
+ };
919
+ ```
920
+
921
+ ### Mejores Prácticas para Filtros en Dark Mode
922
+
923
+ #### 1. Ajustar Opacidades para Mejor Contraste
924
+
925
+ ```tsx
926
+ // ✅ CORRECTO - Opacidad mayor en dark mode para mantener contraste
927
+ <div className="backdrop-blur-lg bg-white/50 dark:bg-black/70">
928
+ Overlay con buen contraste en ambos modos
929
+ </div>
930
+
931
+ // ❌ INCORRECTO - Misma opacidad en ambos modos
932
+ <div className="backdrop-blur-lg bg-black/50">
933
+ Puede verse mal en dark mode
934
+ </div>
935
+ ```
936
+
937
+ #### 2. Glassmorphism Adaptativo
938
+
939
+ ```tsx
940
+ // ✅ CORRECTO - Glassmorphism adaptado
941
+ <div className="backdrop-blur-md bg-white/30 dark:bg-white/10 border border-white/50 dark:border-white/20">
942
+ <h3 className="text-content-primary dark:text-white">Title</h3>
943
+ </div>
944
+
945
+ // ❌ INCORRECTO - No se adapta a dark mode
946
+ <div className="backdrop-blur-md bg-white/30 border border-white/50">
947
+ <h3 className="text-gray-900">Title</h3>
948
+ </div>
949
+ ```
950
+
951
+ #### 3. Combinar con Colores de Texto Apropiados
952
+
953
+ ```tsx
954
+ // ✅ CORRECTO - Texto adaptado para mantener legibilidad sobre blur
955
+ <div className="backdrop-blur-lg bg-black/50 dark:bg-black/70 rounded-2xl p-6">
956
+ <h2 className="text-white font-bold text-2xl mb-2">
957
+ Texto claramente legible
958
+ </h2>
959
+ <p className="text-white/80">
960
+ Contenido secundario también legible
961
+ </p>
962
+ </div>
963
+
964
+ // ✅ CORRECTO - Para glassmorphism, usar colores del sistema
965
+ <div className="backdrop-blur-md bg-white/30 dark:bg-white/10 rounded-2xl p-6">
966
+ <h3 className="text-content-primary dark:text-white font-bold">
967
+ Título
968
+ </h3>
969
+ <p className="text-content-secondary dark:text-white/70">
970
+ Descripción
971
+ </p>
972
+ </div>
973
+ ```
974
+
975
+ #### 4. Modal Overlays con Backdrop Blur
976
+
977
+ ```tsx
978
+ // ✅ CORRECTO - Overlay más oscuro en dark mode
979
+ <div className="backdrop-blur-lg bg-black/50 dark:bg-black/70">
980
+ Modal overlay adaptado
981
+ </div>
982
+
983
+ // Para overlays claros (menos común)
984
+ <div className="backdrop-blur-lg bg-white/50 dark:bg-black/50">
985
+ Overlay que cambia completamente en dark mode
986
+ </div>
987
+ ```
988
+
989
+ ### Ejemplo Completo: Hero con Glassmorphism Adaptado
990
+
991
+ ```tsx
992
+ export const GlassHeroDarkMode = () => {
993
+ return (
994
+ <div
995
+ className="relative min-h-screen flex items-center justify-center p-8 bg-gradient-to-br from-blue-500 to-purple-600 dark:from-gray-900 dark:to-black"
996
+ style={{
997
+ backgroundImage: 'url(/hero-bg.jpg)',
998
+ backgroundSize: 'cover',
999
+ backgroundPosition: 'center',
1000
+ }}
1001
+ >
1002
+ {/* Glassmorphism card con contenido */}
1003
+ <div className="backdrop-blur-xl bg-white/30 dark:bg-black/30 border border-white/50 dark:border-white/10 rounded-3xl p-12 max-w-3xl shadow-2xl">
1004
+ {/* Title */}
1005
+ <h1 className="text-white font-bold text-6xl tracking-tighter mb-6 text-center">
1006
+ Bienvenido a Siesa UI Kit
1007
+ </h1>
1008
+
1009
+ {/* Description */}
1010
+ <p className="text-white/90 text-xl mb-8 text-center max-w-2xl mx-auto">
1011
+ Sistema de diseño moderno con soporte completo para glassmorphism
1012
+ y dark mode. Crea interfaces hermosas que funcionan perfectamente
1013
+ en cualquier entorno.
1014
+ </p>
1015
+
1016
+ {/* CTA buttons */}
1017
+ <div className="flex gap-4 justify-center mb-8">
1018
+ <button className="backdrop-blur-md bg-white/20 dark:bg-white/10 hover:bg-white/30 dark:hover:bg-white/20 border border-white/50 dark:border-white/30 text-white px-6 py-3 rounded-xl font-bold transition-all">
1019
+ Comenzar
1020
+ </button>
1021
+ <button className="bg-white dark:bg-dark-bg-inverse text-primary-custom-600 dark:text-dark-content-inverse px-6 py-3 rounded-xl font-bold hover:bg-white/90 transition-all">
1022
+ Documentación
1023
+ </button>
1024
+ </div>
1025
+
1026
+ {/* Stats */}
1027
+ <div className="grid grid-cols-3 gap-4 pt-8 border-t border-white/30 dark:border-white/10">
1028
+ {[
1029
+ { label: 'Components', value: '50+' },
1030
+ { label: 'Themes', value: '2' },
1031
+ { label: 'Icons', value: '1000+' },
1032
+ ].map((stat) => (
1033
+ <div key={stat.label} className="text-center">
1034
+ <p className="text-white font-bold text-3xl mb-1">{stat.value}</p>
1035
+ <p className="text-white/70 text-sm">{stat.label}</p>
1036
+ </div>
1037
+ ))}
1038
+ </div>
1039
+ </div>
1040
+ </div>
1041
+ );
1042
+ };
1043
+ ```
1044
+
1045
+ ### Guía de Opacidades para Dark Mode
1046
+
1047
+ Opacidades recomendadas para diferentes casos:
1048
+
1049
+ | Caso de Uso | Light Mode | Dark Mode | Razón |
1050
+ |-------------|------------|-----------|-------|
1051
+ | **Modal Overlay** | `bg-black/50` | `bg-black/70` | Mayor opacidad para mejor contraste |
1052
+ | **Glassmorphism Card** | `bg-white/30` | `bg-white/10` | Menos opacidad para evitar brillantez |
1053
+ | **Glass Navigation** | `bg-white/80` | `bg-black/80` | Alta opacidad para legibilidad |
1054
+ | **Glass Border** | `border-white/50` | `border-white/20` | Bordes más sutiles en dark mode |
1055
+ | **Hover State** | `bg-white/40` | `bg-white/15` | Progresión proporcional |
1056
+
1057
+ ### Recursos Adicionales sobre Dark Mode
1058
+
1059
+ Para más información sobre el modo oscuro:
1060
+ - Ver `docs/dark-mode-guide.md` - Guía completa de Dark Mode en Tailwind CSS
1061
+ - Ver `docs/colors.md` - Sistema de colores completo con tokens dark mode
1062
+ - Ver `docs/border-radius.md` - Border radius con ejemplos de dark mode
1063
+ - Ver `docs/shadows.md` - Sombras adaptadas a dark mode
1064
+ - Ver `docs/typography.md` - Sistema tipográfico adaptado a dark mode
1065
+ - [Documentación oficial de Tailwind Dark Mode](https://tailwindcss.com/docs/dark-mode)
1066
+
1067
+ ---
1068
+
1069
+ ## Referencia Rápida
1070
+
1071
+ ### Cheat Sheet: Por Caso de Uso
1072
+
1073
+ ```tsx
1074
+ // ===== OVERLAYS DE MODALES =====
1075
+ <div className="backdrop-blur-lg bg-black/50">Modal</div>
1076
+
1077
+ // ===== GLASSMORPHISM CARDS =====
1078
+ <div className="backdrop-blur-md bg-white/30 border border-white/50">Glass Card</div>
1079
+
1080
+ // ===== NAVIGATION BARS =====
1081
+ <nav className="backdrop-blur-sm bg-white/80 sticky top-0">Nav</nav>
1082
+
1083
+ // ===== LOADING STATES =====
1084
+ <div className="blur-md animate-pulse">Loading...</div>
1085
+
1086
+ // ===== SPOILER CONTENT =====
1087
+ <div className={revealed ? 'blur-none' : 'blur-xl'}>Spoiler</div>
1088
+
1089
+ // ===== BACKGROUND IMAGES =====
1090
+ <div className="blur-2xl opacity-50">
1091
+ <img src="/bg.jpg" />
1092
+ </div>
1093
+ ```
1094
+
1095
+ ### Cheat Sheet: Todas las Escalas
1096
+
1097
+ **Blur (desenfoca elemento completo)**
1098
+ ```css
1099
+ blur-none → blur(0px)
1100
+ blur-sm → blur(2px)
1101
+ blur → blur(4px) /* blur-base */
1102
+ blur-md → blur(6px)
1103
+ blur-lg → blur(8px)
1104
+ blur-xl → blur(12px)
1105
+ blur-2xl → blur(20px)
1106
+ blur-3xl → blur(32px)
1107
+ ```
1108
+
1109
+ **Backdrop Blur (desenfoca solo el fondo)**
1110
+ ```css
1111
+ backdrop-blur-none → backdrop-filter: blur(0px)
1112
+ backdrop-blur-sm → backdrop-filter: blur(2px)
1113
+ backdrop-blur → backdrop-filter: blur(4px) /* backdrop-blur-base */
1114
+ backdrop-blur-md → backdrop-filter: blur(6px)
1115
+ backdrop-blur-lg → backdrop-filter: blur(8px)
1116
+ backdrop-blur-xl → backdrop-filter: blur(12px)
1117
+ backdrop-blur-2xl → backdrop-filter: blur(20px)
1118
+ backdrop-blur-3xl → backdrop-filter: blur(32px)
1119
+ ```
1120
+
1121
+ ### Cheat Sheet: Combinaciones Comunes
1122
+
1123
+ ```tsx
1124
+ // Modal overlay oscuro
1125
+ className="backdrop-blur-lg bg-black/50"
1126
+
1127
+ // Modal overlay claro
1128
+ className="backdrop-blur-lg bg-white/50"
1129
+
1130
+ // Glass card oscuro
1131
+ className="backdrop-blur-md bg-black/30 border border-white/20"
1132
+
1133
+ // Glass card claro
1134
+ className="backdrop-blur-md bg-white/30 border border-white/50"
1135
+
1136
+ // Navbar flotante
1137
+ className="backdrop-blur-sm bg-white/80"
1138
+
1139
+ // Hero background
1140
+ className="blur-2xl opacity-50"
1141
+
1142
+ // Loading state
1143
+ className="blur-md animate-pulse"
1144
+
1145
+ // Spoiler hide
1146
+ className="blur-xl"
1147
+ ```
1148
+
1149
+ ### Cheat Sheet: Transiciones
1150
+
1151
+ ```tsx
1152
+ // Transición básica de blur
1153
+ <div className="blur-none hover:blur-md transition-all">...</div>
1154
+
1155
+ // Transición con duración
1156
+ <div className="blur-none hover:blur-lg transition-all duration-500">...</div>
1157
+
1158
+ // Toggle blur con estado
1159
+ <div className={`transition-all duration-300 ${isBlurred ? 'blur-xl' : 'blur-none'}`}>...</div>
1160
+
1161
+ // Backdrop blur animado
1162
+ <div className={`transition-all ${show ? 'backdrop-blur-lg' : 'backdrop-blur-none'}`}>...</div>
1163
+ ```
1164
+
1165
+ ---
1166
+
1167
+ ## Recursos Adicionales
1168
+
1169
+ ### Soporte de Navegadores
1170
+
1171
+ **backdrop-filter** (Backdrop Blur):
1172
+ - ✅ Chrome/Edge: 76+
1173
+ - ✅ Firefox: 103+
1174
+ - ✅ Safari: 9+ (con -webkit-prefix hasta v14)
1175
+ - ❌ IE: No soportado
1176
+
1177
+ **filter: blur** (Blur regular):
1178
+ - ✅ Excelente soporte en todos los navegadores modernos
1179
+ - ✅ IE: 10+ (con limitaciones)
1180
+
1181
+ ### Fallbacks para Navegadores Antiguos
1182
+
1183
+ ```tsx
1184
+ // Con fallback para navegadores sin backdrop-filter
1185
+ <div className="
1186
+ backdrop-blur-lg
1187
+ bg-white/30
1188
+ [@supports(backdrop-filter:blur(0))]:bg-white/30
1189
+ [@supports(not(backdrop-filter:blur(0)))]:bg-white/80
1190
+ ">
1191
+ Content con fallback
1192
+ </div>
1193
+ ```
1194
+
1195
+ ### Enlaces Útiles
1196
+
1197
+ - **CSS backdrop-filter**: https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter
1198
+ - **CSS filter**: https://developer.mozilla.org/en-US/docs/Web/CSS/filter
1199
+ - **Tailwind Blur**: https://tailwindcss.com/docs/blur
1200
+ - **Tailwind Backdrop Blur**: https://tailwindcss.com/docs/backdrop-blur
1201
+ - **Can I Use backdrop-filter**: https://caniuse.com/css-backdrop-filter
1202
+
1203
+ ### Archivos Relacionados
1204
+
1205
+ - `docs/shadows.md` - Sistema de sombras (se combina bien con blur)
1206
+ - `docs/colors.md` - Sistema de colores (para fondos con opacidad)
1207
+ - `docs/border-radius.md` - Border radius (para glassmorphism cards)
1208
+
1209
+ ### Performance Tips
1210
+
1211
+ ```tsx
1212
+ // ✅ Optimizar con will-change
1213
+ <div
1214
+ className="backdrop-blur-lg"
1215
+ style={{ willChange: 'backdrop-filter' }}
1216
+ >
1217
+ Optimized
1218
+ </div>
1219
+
1220
+ // ✅ Usar transform: translateZ para hardware acceleration
1221
+ <div
1222
+ className="backdrop-blur-lg"
1223
+ style={{ transform: 'translateZ(0)' }}
1224
+ >
1225
+ Hardware accelerated
1226
+ </div>
1227
+
1228
+ // ✅ Limitar el área con blur
1229
+ <div className="backdrop-blur-lg max-w-2xl">
1230
+ Limited area
1231
+ </div>
1232
+
1233
+ // ❌ Evitar blur en toda la página
1234
+ <body className="backdrop-blur-lg"> {/* No recomendado */}
1235
+ ...
1236
+ </body>
1237
+ ```
1238
+
1239
+ ---
1240
+
1241
+ **Última actualización**: 2025-11-11
1242
+ **Versión**: 1.0.0
1243
+ **Mantenedor**: Siesa UI Kit Team