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.
- package/README.md +89 -115
- package/bin/install.cjs +502 -502
- package/bin/prepare-publish.cjs +28 -28
- package/bin/restore-folders.cjs +28 -28
- package/claude/agents/siesa-ui-kit-specialist.md +2401 -2445
- package/claude/prompts/component-template.md +121 -121
- package/claude/settings.local.json +61 -72
- package/docs/border-radius.md +1261 -1261
- package/docs/colors.md +832 -832
- package/docs/dark-mode-guide.md +1426 -1426
- package/docs/filters.md +1243 -1243
- package/docs/icons.md +1283 -1264
- package/docs/shadows.md +1377 -1377
- package/docs/spacing.md +1684 -1684
- package/docs/typography.md +1268 -1268
- package/package.json +83 -111
- package/postcss.config.cjs +6 -6
- package/src/App.css +42 -42
- package/src/App.tsx +8 -8
- package/src/ButtonTest.tsx +147 -147
- package/src/assets/fonts/README.md +261 -261
- package/src/components/Alert/Alert.stories.tsx +332 -332
- package/src/components/Alert/Alert.tsx +106 -106
- package/src/components/Alert/Alert.types.ts +54 -54
- package/src/components/Avatar/Avatar.stories.tsx +494 -494
- package/src/components/Avatar/Avatar.tsx +143 -143
- package/src/components/Avatar/Avatar.types.ts +53 -53
- package/src/components/Badge/Badge.stories.tsx +339 -339
- package/src/components/Badge/Badge.tsx +278 -278
- package/src/components/Badge/Badge.types.ts +58 -58
- package/src/components/Button/Button.stories.tsx +950 -950
- package/src/components/Button/Button.tsx +337 -337
- package/src/components/Button/Button.types.ts +180 -180
- package/src/components/Button/icons.tsx +87 -48
- package/src/components/Button/index.ts +3 -3
- package/src/components/Checkbox/Checkbox.stories.tsx +453 -453
- package/src/components/Checkbox/Checkbox.tsx +208 -208
- package/src/components/Checkbox/Checkbox.types.ts +61 -61
- package/src/components/DescriptionList/DescriptionList.stories.tsx +250 -250
- package/src/components/DescriptionList/DescriptionList.tsx +96 -96
- package/src/components/DescriptionList/DescriptionList.types.ts +29 -29
- package/src/components/Divider/Divider.stories.tsx +263 -263
- package/src/components/Divider/Divider.tsx +80 -80
- package/src/components/Divider/Divider.types.ts +24 -24
- package/src/components/Dropdown/Dropdown.stories.tsx +552 -552
- package/src/components/Dropdown/Dropdown.tsx +422 -422
- package/src/components/Dropdown/Dropdown.types.ts +146 -146
- package/src/components/Dropdown/README.md +266 -266
- package/src/components/Dropdown/icons.tsx +72 -72
- package/src/components/Dropdown/index.ts +8 -8
- package/src/components/Input/Input.stories.tsx +583 -583
- package/src/components/Input/Input.tsx +204 -204
- package/src/components/Input/Input.types.ts +80 -80
- package/src/components/Input/icons.tsx +145 -145
- package/src/components/Input/index.ts +2 -2
- package/src/components/LoginView/LoginView.stories.tsx +148 -148
- package/src/components/LoginView/LoginView.tsx +426 -426
- package/src/components/LoginView/LoginView.types.ts +52 -52
- package/src/components/LoginView/README.md +396 -396
- package/src/components/LoginView/icons.tsx +85 -85
- package/src/components/LoginView/index.ts +3 -3
- package/src/components/Navbar/Navbar.stories.tsx +810 -810
- package/src/components/Navbar/Navbar.tsx +755 -755
- package/src/components/Navbar/Navbar.types.ts +219 -219
- package/src/components/Navbar/README.md +279 -279
- package/src/components/Navbar/icons.tsx +102 -102
- package/src/components/Navbar/index.ts +8 -8
- package/src/components/NavigationBar/NavigationBar.stories.tsx +406 -406
- package/src/components/NavigationBar/NavigationBar.tsx +246 -246
- package/src/components/NavigationBar/NavigationBar.types.ts +74 -74
- package/src/components/NavigationBar/README.md +469 -469
- package/src/components/NavigationBar/index.ts +2 -2
- package/src/components/NavigationRail/NavigationRail.stories.tsx +417 -417
- package/src/components/NavigationRail/NavigationRail.tsx +418 -418
- package/src/components/NavigationRail/NavigationRail.types.ts +109 -109
- package/src/components/NavigationRail/README.md +224 -224
- package/src/components/NavigationRail/index.ts +2 -2
- package/src/components/Notification/Notification.stories.tsx +513 -513
- package/src/components/Notification/Notification.tsx +145 -145
- package/src/components/Notification/Notification.types.ts +142 -142
- package/src/components/Notification/README.md +409 -409
- package/src/components/Notification/index.ts +3 -3
- package/src/components/POSConvention/POSConvention.stories.tsx +235 -235
- package/src/components/POSConvention/POSConvention.tsx +129 -129
- package/src/components/POSConvention/POSConvention.types.ts +38 -38
- package/src/components/POSConvention/README.md +123 -123
- package/src/components/POSConvention/icons.tsx +45 -45
- package/src/components/POSConvention/index.ts +3 -3
- package/src/components/POSLocationButton/POSLocationButton.stories.tsx +531 -531
- package/src/components/POSLocationButton/POSLocationButton.tsx +247 -247
- package/src/components/POSLocationButton/POSLocationButton.types.ts +87 -87
- package/src/components/POSLocationButton/README.md +253 -253
- package/src/components/POSLocationButton/icons.tsx +120 -120
- package/src/components/POSLocationButton/index.ts +14 -14
- package/src/components/POSNumberButton/POSNumberButton.stories.tsx +415 -415
- package/src/components/POSNumberButton/POSNumberButton.tsx +179 -179
- package/src/components/POSNumberButton/POSNumberButton.types.ts +51 -51
- package/src/components/POSNumberButton/README.md +321 -321
- package/src/components/POSNumberButton/index.ts +3 -3
- package/src/components/POSProductButton/POSProductButton.stories.tsx +318 -318
- package/src/components/POSProductButton/POSProductButton.tsx +152 -152
- package/src/components/POSProductButton/POSProductButton.types.ts +46 -46
- package/src/components/POSProductButton/README.md +269 -269
- package/src/components/POSProductButton/index.ts +2 -2
- package/src/components/POSProductCard/POSProductCard.stories.tsx +642 -642
- package/src/components/POSProductCard/POSProductCard.tsx +208 -208
- package/src/components/POSProductCard/POSProductCard.types.ts +76 -76
- package/src/components/POSProductCard/README.md +179 -179
- package/src/components/POSProductCard/icons.tsx +26 -26
- package/src/components/POSProductCard/index.ts +2 -2
- package/src/components/POSProductSidebarItems/POSProductSidebarItems.stories.tsx +753 -753
- package/src/components/POSProductSidebarItems/POSProductSidebarItems.tsx +332 -332
- package/src/components/POSProductSidebarItems/POSProductSidebarItems.types.ts +119 -119
- package/src/components/POSProductSidebarItems/README.md +198 -198
- package/src/components/POSProductSidebarItems/icons.tsx +21 -21
- package/src/components/POSProductSidebarItems/index.ts +3 -3
- package/src/components/POSTable/POSTable.stories.tsx +737 -737
- package/src/components/POSTable/POSTable.tsx +401 -401
- package/src/components/POSTable/POSTable.types.ts +83 -83
- package/src/components/POSTable/README.md +286 -286
- package/src/components/POSTable/index.ts +7 -7
- package/src/components/Pagination/Pagination.stories.tsx +555 -555
- package/src/components/Pagination/Pagination.tsx +286 -286
- package/src/components/Pagination/Pagination.types.ts +93 -93
- package/src/components/Pagination/README.md +298 -298
- package/src/components/Pagination/icons.tsx +47 -47
- package/src/components/Pagination/index.ts +3 -3
- package/src/components/Quantity/Quantity.stories.tsx +457 -457
- package/src/components/Quantity/Quantity.tsx +289 -289
- package/src/components/Quantity/Quantity.types.ts +70 -70
- package/src/components/Radio/Radio.stories.tsx +523 -523
- package/src/components/Radio/Radio.tsx +170 -170
- package/src/components/Radio/Radio.types.ts +122 -122
- package/src/components/Select/README.md +299 -299
- package/src/components/Select/Select.stories.tsx +673 -705
- package/src/components/Select/Select.tsx +454 -457
- package/src/components/Select/Select.types.ts +148 -148
- package/src/components/Select/icons.tsx +50 -25
- package/src/components/Select/index.ts +3 -3
- package/src/components/SignUpView/SignUpView.stories.tsx +129 -129
- package/src/components/SignUpView/SignUpView.tsx +503 -503
- package/src/components/SignUpView/SignUpView.types.ts +58 -58
- package/src/components/SignUpView/icons.tsx +71 -71
- package/src/components/SignUpView/index.ts +3 -3
- package/src/components/Switch/README.md +112 -112
- package/src/components/Switch/Switch.stories.tsx +550 -550
- package/src/components/Switch/Switch.tsx +246 -246
- package/src/components/Switch/Switch.types.ts +67 -67
- package/src/components/Table/README.md +369 -369
- package/src/components/Table/Table.stories.tsx +805 -805
- package/src/components/Table/Table.tsx +688 -688
- package/src/components/Table/Table.types.ts +204 -204
- package/src/components/Table/index.ts +9 -9
- package/src/components/Tabs/README.md +201 -201
- package/src/components/Tabs/Tabs.stories.tsx +580 -580
- package/src/components/Tabs/Tabs.tsx +356 -356
- package/src/components/Tabs/Tabs.types.ts +127 -127
- package/src/components/Tabs/icons.tsx +129 -129
- package/src/components/Tabs/index.ts +11 -11
- package/src/components/Textarea/Textarea.stories.tsx +535 -535
- package/src/components/Textarea/Textarea.tsx +188 -188
- package/src/components/Textarea/Textarea.types.ts +54 -54
- package/src/context/ThemeContext.tsx +99 -99
- package/src/context/index.ts +1 -1
- package/src/index.css +29 -29
- package/src/index.ts +39 -133
- package/src/main.tsx +10 -10
- package/src/views/ProductsView/ProductsView.stories.tsx +344 -344
- package/src/views/ProductsView/ProductsView.tsx +480 -480
- package/src/views/ProductsView/ProductsView.types.ts +238 -238
- package/src/views/ProductsView/README.md +312 -312
- package/src/views/ProductsView/icons.tsx +38 -38
- package/src/views/ProductsView/index.ts +8 -8
- package/src/views/RecoverPasswordView/README.md +269 -269
- package/src/views/RecoverPasswordView/RecoverPasswordView.stories.tsx +131 -131
- package/src/views/RecoverPasswordView/RecoverPasswordView.tsx +376 -376
- package/src/views/RecoverPasswordView/RecoverPasswordView.types.ts +56 -56
- package/src/views/RecoverPasswordView/icons.tsx +17 -17
- package/src/views/RecoverPasswordView/index.ts +2 -2
- package/src/views/TableLayoutView/README.md +268 -268
- package/src/views/TableLayoutView/TableLayoutView.stories.tsx +235 -235
- package/src/views/TableLayoutView/TableLayoutView.tsx +461 -461
- package/src/views/TableLayoutView/TableLayoutView.types.ts +209 -209
- package/src/views/TableLayoutView/icons.tsx +113 -113
- package/src/views/TableLayoutView/index.ts +6 -6
- package/storybook/main.ts +19 -19
- package/storybook/preview.tsx +84 -84
- package/storybook/vitest.setup.ts +6 -6
- package/tailwind.config.js +128 -128
- package/claude/prompts/siesa-ui-kit.md +0 -28
- package/dist/ButtonTest.d.ts +0 -6
- package/dist/ButtonTest.d.ts.map +0 -1
- package/dist/components/Alert/Alert.d.ts +0 -23
- package/dist/components/Alert/Alert.d.ts.map +0 -1
- package/dist/components/Alert/Alert.types.d.ts +0 -46
- package/dist/components/Alert/Alert.types.d.ts.map +0 -1
- package/dist/components/Avatar/Avatar.d.ts +0 -41
- package/dist/components/Avatar/Avatar.d.ts.map +0 -1
- package/dist/components/Avatar/Avatar.types.d.ts +0 -46
- package/dist/components/Avatar/Avatar.types.d.ts.map +0 -1
- package/dist/components/Badge/Badge.d.ts +0 -42
- package/dist/components/Badge/Badge.d.ts.map +0 -1
- package/dist/components/Badge/Badge.types.d.ts +0 -32
- package/dist/components/Badge/Badge.types.d.ts.map +0 -1
- package/dist/components/Button/Button.d.ts +0 -84
- package/dist/components/Button/Button.d.ts.map +0 -1
- package/dist/components/Button/Button.types.d.ts +0 -162
- package/dist/components/Button/Button.types.d.ts.map +0 -1
- package/dist/components/Button/icons.d.ts +0 -27
- package/dist/components/Button/icons.d.ts.map +0 -1
- package/dist/components/Button/index.d.ts +0 -4
- package/dist/components/Button/index.d.ts.map +0 -1
- package/dist/components/Checkbox/Checkbox.d.ts +0 -31
- package/dist/components/Checkbox/Checkbox.d.ts.map +0 -1
- package/dist/components/Checkbox/Checkbox.types.d.ts +0 -53
- package/dist/components/Checkbox/Checkbox.types.d.ts.map +0 -1
- package/dist/components/DescriptionList/DescriptionList.d.ts +0 -38
- package/dist/components/DescriptionList/DescriptionList.d.ts.map +0 -1
- package/dist/components/DescriptionList/DescriptionList.types.d.ts +0 -27
- package/dist/components/DescriptionList/DescriptionList.types.d.ts.map +0 -1
- package/dist/components/Divider/Divider.d.ts +0 -33
- package/dist/components/Divider/Divider.d.ts.map +0 -1
- package/dist/components/Divider/Divider.types.d.ts +0 -22
- package/dist/components/Divider/Divider.types.d.ts.map +0 -1
- package/dist/components/Dropdown/Dropdown.d.ts +0 -66
- package/dist/components/Dropdown/Dropdown.d.ts.map +0 -1
- package/dist/components/Dropdown/Dropdown.types.d.ts +0 -124
- package/dist/components/Dropdown/Dropdown.types.d.ts.map +0 -1
- package/dist/components/Dropdown/icons.d.ts +0 -10
- package/dist/components/Dropdown/icons.d.ts.map +0 -1
- package/dist/components/Dropdown/index.d.ts +0 -4
- package/dist/components/Dropdown/index.d.ts.map +0 -1
- package/dist/components/DropdownItemCollapsible/DropdownItemCollapsible.d.ts +0 -101
- package/dist/components/DropdownItemCollapsible/DropdownItemCollapsible.d.ts.map +0 -1
- package/dist/components/DropdownItemCollapsible/DropdownItemCollapsible.types.d.ts +0 -116
- package/dist/components/DropdownItemCollapsible/DropdownItemCollapsible.types.d.ts.map +0 -1
- package/dist/components/DropdownItemCollapsible/icons.d.ts +0 -19
- package/dist/components/DropdownItemCollapsible/icons.d.ts.map +0 -1
- package/dist/components/DropdownItemCollapsible/index.d.ts +0 -9
- package/dist/components/DropdownItemCollapsible/index.d.ts.map +0 -1
- package/dist/components/DropdownItemHeading/DropdownItemHeading.d.ts +0 -75
- package/dist/components/DropdownItemHeading/DropdownItemHeading.d.ts.map +0 -1
- package/dist/components/DropdownItemHeading/DropdownItemHeading.types.d.ts +0 -85
- package/dist/components/DropdownItemHeading/DropdownItemHeading.types.d.ts.map +0 -1
- package/dist/components/DropdownItemHeading/icons.d.ts +0 -48
- package/dist/components/DropdownItemHeading/icons.d.ts.map +0 -1
- package/dist/components/DropdownItemHeading/index.d.ts +0 -4
- package/dist/components/DropdownItemHeading/index.d.ts.map +0 -1
- package/dist/components/Input/Input.d.ts +0 -40
- package/dist/components/Input/Input.d.ts.map +0 -1
- package/dist/components/Input/Input.types.d.ts +0 -71
- package/dist/components/Input/Input.types.d.ts.map +0 -1
- package/dist/components/Input/icons.d.ts +0 -15
- package/dist/components/Input/icons.d.ts.map +0 -1
- package/dist/components/Input/index.d.ts +0 -3
- package/dist/components/Input/index.d.ts.map +0 -1
- package/dist/components/LoginView/LoginView.d.ts +0 -36
- package/dist/components/LoginView/LoginView.d.ts.map +0 -1
- package/dist/components/LoginView/LoginView.types.d.ts +0 -46
- package/dist/components/LoginView/LoginView.types.d.ts.map +0 -1
- package/dist/components/LoginView/icons.d.ts +0 -18
- package/dist/components/LoginView/icons.d.ts.map +0 -1
- package/dist/components/LoginView/index.d.ts +0 -4
- package/dist/components/LoginView/index.d.ts.map +0 -1
- package/dist/components/Navbar/Navbar.d.ts +0 -63
- package/dist/components/Navbar/Navbar.d.ts.map +0 -1
- package/dist/components/Navbar/Navbar.types.d.ts +0 -194
- package/dist/components/Navbar/Navbar.types.d.ts.map +0 -1
- package/dist/components/Navbar/icons.d.ts +0 -12
- package/dist/components/Navbar/icons.d.ts.map +0 -1
- package/dist/components/Navbar/index.d.ts +0 -4
- package/dist/components/Navbar/index.d.ts.map +0 -1
- package/dist/components/NavigationBar/NavigationBar.d.ts +0 -75
- package/dist/components/NavigationBar/NavigationBar.d.ts.map +0 -1
- package/dist/components/NavigationBar/NavigationBar.types.d.ts +0 -63
- package/dist/components/NavigationBar/NavigationBar.types.d.ts.map +0 -1
- package/dist/components/NavigationBar/index.d.ts +0 -3
- package/dist/components/NavigationBar/index.d.ts.map +0 -1
- package/dist/components/NavigationRail/NavigationRail.d.ts +0 -7
- package/dist/components/NavigationRail/NavigationRail.d.ts.map +0 -1
- package/dist/components/NavigationRail/NavigationRail.types.d.ts +0 -92
- package/dist/components/NavigationRail/NavigationRail.types.d.ts.map +0 -1
- package/dist/components/NavigationRail/index.d.ts +0 -3
- package/dist/components/NavigationRail/index.d.ts.map +0 -1
- package/dist/components/NavigationRailCommercial/NavigationRailCommercial.d.ts +0 -122
- package/dist/components/NavigationRailCommercial/NavigationRailCommercial.d.ts.map +0 -1
- package/dist/components/NavigationRailCommercial/NavigationRailCommercial.types.d.ts +0 -139
- package/dist/components/NavigationRailCommercial/NavigationRailCommercial.types.d.ts.map +0 -1
- package/dist/components/NavigationRailCommercial/icons.d.ts +0 -33
- package/dist/components/NavigationRailCommercial/icons.d.ts.map +0 -1
- package/dist/components/NavigationRailCommercial/index.d.ts +0 -4
- package/dist/components/NavigationRailCommercial/index.d.ts.map +0 -1
- package/dist/components/NavigationRailItem/NavigationRailItem.d.ts +0 -90
- package/dist/components/NavigationRailItem/NavigationRailItem.d.ts.map +0 -1
- package/dist/components/NavigationRailItem/NavigationRailItem.types.d.ts +0 -162
- package/dist/components/NavigationRailItem/NavigationRailItem.types.d.ts.map +0 -1
- package/dist/components/NavigationRailItem/index.d.ts +0 -3
- package/dist/components/NavigationRailItem/index.d.ts.map +0 -1
- package/dist/components/NavigationRailPanel/NavigationRailPanel.d.ts +0 -124
- package/dist/components/NavigationRailPanel/NavigationRailPanel.d.ts.map +0 -1
- package/dist/components/NavigationRailPanel/NavigationRailPanel.types.d.ts +0 -154
- package/dist/components/NavigationRailPanel/NavigationRailPanel.types.d.ts.map +0 -1
- package/dist/components/NavigationRailPanel/index.d.ts +0 -3
- package/dist/components/NavigationRailPanel/index.d.ts.map +0 -1
- package/dist/components/NavigationRailTypes/NavigationRailTypes.d.ts +0 -99
- package/dist/components/NavigationRailTypes/NavigationRailTypes.d.ts.map +0 -1
- package/dist/components/NavigationRailTypes/NavigationRailTypes.types.d.ts +0 -152
- package/dist/components/NavigationRailTypes/NavigationRailTypes.types.d.ts.map +0 -1
- package/dist/components/NavigationRailTypes/icons.d.ts +0 -44
- package/dist/components/NavigationRailTypes/icons.d.ts.map +0 -1
- package/dist/components/NavigationRailTypes/index.d.ts +0 -4
- package/dist/components/NavigationRailTypes/index.d.ts.map +0 -1
- package/dist/components/Notification/Notification.d.ts +0 -52
- package/dist/components/Notification/Notification.d.ts.map +0 -1
- package/dist/components/Notification/Notification.types.d.ts +0 -138
- package/dist/components/Notification/Notification.types.d.ts.map +0 -1
- package/dist/components/Notification/index.d.ts +0 -3
- package/dist/components/Notification/index.d.ts.map +0 -1
- package/dist/components/POSConvention/POSConvention.d.ts +0 -55
- package/dist/components/POSConvention/POSConvention.d.ts.map +0 -1
- package/dist/components/POSConvention/POSConvention.types.d.ts +0 -37
- package/dist/components/POSConvention/POSConvention.types.d.ts.map +0 -1
- package/dist/components/POSConvention/icons.d.ts +0 -21
- package/dist/components/POSConvention/icons.d.ts.map +0 -1
- package/dist/components/POSConvention/index.d.ts +0 -4
- package/dist/components/POSConvention/index.d.ts.map +0 -1
- package/dist/components/POSLocationButton/POSLocationButton.d.ts +0 -73
- package/dist/components/POSLocationButton/POSLocationButton.d.ts.map +0 -1
- package/dist/components/POSLocationButton/POSLocationButton.types.d.ts +0 -75
- package/dist/components/POSLocationButton/POSLocationButton.types.d.ts.map +0 -1
- package/dist/components/POSLocationButton/icons.d.ts +0 -37
- package/dist/components/POSLocationButton/icons.d.ts.map +0 -1
- package/dist/components/POSLocationButton/index.d.ts +0 -4
- package/dist/components/POSLocationButton/index.d.ts.map +0 -1
- package/dist/components/POSNumberButton/POSNumberButton.d.ts +0 -61
- package/dist/components/POSNumberButton/POSNumberButton.d.ts.map +0 -1
- package/dist/components/POSNumberButton/POSNumberButton.types.d.ts +0 -43
- package/dist/components/POSNumberButton/POSNumberButton.types.d.ts.map +0 -1
- package/dist/components/POSNumberButton/index.d.ts +0 -3
- package/dist/components/POSNumberButton/index.d.ts.map +0 -1
- package/dist/components/POSProductButton/POSProductButton.d.ts +0 -59
- package/dist/components/POSProductButton/POSProductButton.d.ts.map +0 -1
- package/dist/components/POSProductButton/POSProductButton.types.d.ts +0 -40
- package/dist/components/POSProductButton/POSProductButton.types.d.ts.map +0 -1
- package/dist/components/POSProductButton/index.d.ts +0 -3
- package/dist/components/POSProductButton/index.d.ts.map +0 -1
- package/dist/components/POSProductCard/POSProductCard.d.ts +0 -68
- package/dist/components/POSProductCard/POSProductCard.d.ts.map +0 -1
- package/dist/components/POSProductCard/POSProductCard.types.d.ts +0 -67
- package/dist/components/POSProductCard/POSProductCard.types.d.ts.map +0 -1
- package/dist/components/POSProductCard/icons.d.ts +0 -10
- package/dist/components/POSProductCard/icons.d.ts.map +0 -1
- package/dist/components/POSProductCard/index.d.ts +0 -3
- package/dist/components/POSProductCard/index.d.ts.map +0 -1
- package/dist/components/POSProductSidebarItems/POSProductSidebarItems.d.ts +0 -57
- package/dist/components/POSProductSidebarItems/POSProductSidebarItems.d.ts.map +0 -1
- package/dist/components/POSProductSidebarItems/POSProductSidebarItems.types.d.ts +0 -85
- package/dist/components/POSProductSidebarItems/POSProductSidebarItems.types.d.ts.map +0 -1
- package/dist/components/POSProductSidebarItems/icons.d.ts +0 -9
- package/dist/components/POSProductSidebarItems/icons.d.ts.map +0 -1
- package/dist/components/POSProductSidebarItems/index.d.ts +0 -4
- package/dist/components/POSProductSidebarItems/index.d.ts.map +0 -1
- package/dist/components/POSTable/POSTable.d.ts +0 -75
- package/dist/components/POSTable/POSTable.d.ts.map +0 -1
- package/dist/components/POSTable/POSTable.types.d.ts +0 -71
- package/dist/components/POSTable/POSTable.types.d.ts.map +0 -1
- package/dist/components/POSTable/index.d.ts +0 -3
- package/dist/components/POSTable/index.d.ts.map +0 -1
- package/dist/components/Pagination/Pagination.d.ts +0 -29
- package/dist/components/Pagination/Pagination.d.ts.map +0 -1
- package/dist/components/Pagination/Pagination.types.d.ts +0 -79
- package/dist/components/Pagination/Pagination.types.d.ts.map +0 -1
- package/dist/components/Pagination/icons.d.ts +0 -18
- package/dist/components/Pagination/icons.d.ts.map +0 -1
- package/dist/components/Pagination/index.d.ts +0 -4
- package/dist/components/Pagination/index.d.ts.map +0 -1
- package/dist/components/Quantity/Quantity.d.ts +0 -38
- package/dist/components/Quantity/Quantity.d.ts.map +0 -1
- package/dist/components/Quantity/Quantity.types.d.ts +0 -59
- package/dist/components/Quantity/Quantity.types.d.ts.map +0 -1
- package/dist/components/Radio/Radio.d.ts +0 -45
- package/dist/components/Radio/Radio.d.ts.map +0 -1
- package/dist/components/Radio/Radio.types.d.ts +0 -115
- package/dist/components/Radio/Radio.types.d.ts.map +0 -1
- package/dist/components/Select/Select.d.ts +0 -37
- package/dist/components/Select/Select.d.ts.map +0 -1
- package/dist/components/Select/Select.types.d.ts +0 -124
- package/dist/components/Select/Select.types.d.ts.map +0 -1
- package/dist/components/Select/icons.d.ts +0 -20
- package/dist/components/Select/icons.d.ts.map +0 -1
- package/dist/components/Select/index.d.ts +0 -4
- package/dist/components/Select/index.d.ts.map +0 -1
- package/dist/components/SignUpView/SignUpView.d.ts +0 -38
- package/dist/components/SignUpView/SignUpView.d.ts.map +0 -1
- package/dist/components/SignUpView/SignUpView.types.d.ts +0 -51
- package/dist/components/SignUpView/SignUpView.types.d.ts.map +0 -1
- package/dist/components/SignUpView/icons.d.ts +0 -18
- package/dist/components/SignUpView/icons.d.ts.map +0 -1
- package/dist/components/SignUpView/index.d.ts +0 -4
- package/dist/components/SignUpView/index.d.ts.map +0 -1
- package/dist/components/Switch/Switch.d.ts +0 -46
- package/dist/components/Switch/Switch.d.ts.map +0 -1
- package/dist/components/Switch/Switch.types.d.ts +0 -58
- package/dist/components/Switch/Switch.types.d.ts.map +0 -1
- package/dist/components/Table/Table.d.ts +0 -64
- package/dist/components/Table/Table.d.ts.map +0 -1
- package/dist/components/Table/Table.types.d.ts +0 -173
- package/dist/components/Table/Table.types.d.ts.map +0 -1
- package/dist/components/Table/index.d.ts +0 -3
- package/dist/components/Table/index.d.ts.map +0 -1
- package/dist/components/Tabs/Tabs.d.ts +0 -76
- package/dist/components/Tabs/Tabs.d.ts.map +0 -1
- package/dist/components/Tabs/Tabs.types.d.ts +0 -107
- package/dist/components/Tabs/Tabs.types.d.ts.map +0 -1
- package/dist/components/Tabs/icons.d.ts +0 -45
- package/dist/components/Tabs/icons.d.ts.map +0 -1
- package/dist/components/Tabs/index.d.ts +0 -4
- package/dist/components/Tabs/index.d.ts.map +0 -1
- package/dist/components/Textarea/Textarea.d.ts +0 -38
- package/dist/components/Textarea/Textarea.d.ts.map +0 -1
- package/dist/components/Textarea/Textarea.types.d.ts +0 -46
- package/dist/components/Textarea/Textarea.types.d.ts.map +0 -1
- package/dist/context/ThemeContext.d.ts +0 -46
- package/dist/context/ThemeContext.d.ts.map +0 -1
- package/dist/context/index.d.ts +0 -2
- package/dist/context/index.d.ts.map +0 -1
- package/dist/index.d.ts +0 -88
- package/dist/index.d.ts.map +0 -1
- package/dist/siesa-ui-kit.cjs +0 -1474
- package/dist/siesa-ui-kit.cjs.map +0 -1
- package/dist/siesa-ui-kit.mjs +0 -9580
- package/dist/siesa-ui-kit.mjs.map +0 -1
- package/dist/views/LayoutCommercial/LayoutCommercial.d.ts +0 -48
- package/dist/views/LayoutCommercial/LayoutCommercial.d.ts.map +0 -1
- package/dist/views/LayoutCommercial/LayoutCommercial.types.d.ts +0 -49
- package/dist/views/LayoutCommercial/LayoutCommercial.types.d.ts.map +0 -1
- package/dist/views/LayoutCommercial/index.d.ts +0 -3
- package/dist/views/LayoutCommercial/index.d.ts.map +0 -1
- package/dist/views/ListView/ListView.d.ts +0 -47
- package/dist/views/ListView/ListView.d.ts.map +0 -1
- package/dist/views/ListView/ListView.types.d.ts +0 -177
- package/dist/views/ListView/ListView.types.d.ts.map +0 -1
- package/dist/views/ListView/icons.d.ts +0 -60
- package/dist/views/ListView/icons.d.ts.map +0 -1
- package/dist/views/ListView/index.d.ts +0 -3
- package/dist/views/ListView/index.d.ts.map +0 -1
- package/dist/views/LoginView/LoginView.d.ts +0 -36
- package/dist/views/LoginView/LoginView.d.ts.map +0 -1
- package/dist/views/LoginView/LoginView.types.d.ts +0 -46
- package/dist/views/LoginView/LoginView.types.d.ts.map +0 -1
- package/dist/views/LoginView/icons.d.ts +0 -18
- package/dist/views/LoginView/icons.d.ts.map +0 -1
- package/dist/views/LoginView/index.d.ts +0 -4
- package/dist/views/LoginView/index.d.ts.map +0 -1
- package/dist/views/ProductsView/ProductsView.d.ts +0 -56
- package/dist/views/ProductsView/ProductsView.d.ts.map +0 -1
- package/dist/views/ProductsView/ProductsView.types.d.ts +0 -184
- package/dist/views/ProductsView/ProductsView.types.d.ts.map +0 -1
- package/dist/views/ProductsView/icons.d.ts +0 -12
- package/dist/views/ProductsView/icons.d.ts.map +0 -1
- package/dist/views/ProductsView/index.d.ts +0 -3
- package/dist/views/ProductsView/index.d.ts.map +0 -1
- package/dist/views/RecoverPasswordView/RecoverPasswordView.d.ts +0 -34
- package/dist/views/RecoverPasswordView/RecoverPasswordView.d.ts.map +0 -1
- package/dist/views/RecoverPasswordView/RecoverPasswordView.types.d.ts +0 -50
- package/dist/views/RecoverPasswordView/RecoverPasswordView.types.d.ts.map +0 -1
- package/dist/views/RecoverPasswordView/icons.d.ts +0 -9
- package/dist/views/RecoverPasswordView/icons.d.ts.map +0 -1
- package/dist/views/RecoverPasswordView/index.d.ts +0 -3
- package/dist/views/RecoverPasswordView/index.d.ts.map +0 -1
- package/dist/views/SignUpView/SignUpView.d.ts +0 -38
- package/dist/views/SignUpView/SignUpView.d.ts.map +0 -1
- package/dist/views/SignUpView/SignUpView.types.d.ts +0 -51
- package/dist/views/SignUpView/SignUpView.types.d.ts.map +0 -1
- package/dist/views/SignUpView/icons.d.ts +0 -18
- package/dist/views/SignUpView/icons.d.ts.map +0 -1
- package/dist/views/SignUpView/index.d.ts +0 -4
- package/dist/views/SignUpView/index.d.ts.map +0 -1
- package/dist/views/TableLayoutView/TableLayoutView.d.ts +0 -46
- package/dist/views/TableLayoutView/TableLayoutView.d.ts.map +0 -1
- package/dist/views/TableLayoutView/TableLayoutView.types.d.ts +0 -170
- package/dist/views/TableLayoutView/TableLayoutView.types.d.ts.map +0 -1
- package/dist/views/TableLayoutView/icons.d.ts +0 -27
- package/dist/views/TableLayoutView/icons.d.ts.map +0 -1
- package/dist/views/TableLayoutView/index.d.ts +0 -3
- package/dist/views/TableLayoutView/index.d.ts.map +0 -1
- package/src/components/DropdownItemCollapsible/DropdownItemCollapsible.stories.tsx +0 -317
- package/src/components/DropdownItemCollapsible/DropdownItemCollapsible.tsx +0 -307
- package/src/components/DropdownItemCollapsible/DropdownItemCollapsible.types.ts +0 -136
- package/src/components/DropdownItemCollapsible/README.md +0 -264
- package/src/components/DropdownItemCollapsible/icons.tsx +0 -57
- package/src/components/DropdownItemCollapsible/index.ts +0 -12
- package/src/components/DropdownItemHeading/DropdownItemHeading.stories.tsx +0 -386
- package/src/components/DropdownItemHeading/DropdownItemHeading.tsx +0 -216
- package/src/components/DropdownItemHeading/DropdownItemHeading.types.ts +0 -93
- package/src/components/DropdownItemHeading/README.md +0 -573
- package/src/components/DropdownItemHeading/icons.tsx +0 -125
- package/src/components/DropdownItemHeading/index.ts +0 -3
- package/src/components/NavigationRailCommercial/NavigationRailCommercial.stories.tsx +0 -464
- package/src/components/NavigationRailCommercial/NavigationRailCommercial.tsx +0 -301
- package/src/components/NavigationRailCommercial/NavigationRailCommercial.types.ts +0 -162
- package/src/components/NavigationRailCommercial/README.md +0 -251
- package/src/components/NavigationRailCommercial/icons.tsx +0 -54
- package/src/components/NavigationRailCommercial/index.ts +0 -6
- package/src/components/NavigationRailItem/NavigationRailItem.stories.tsx +0 -667
- package/src/components/NavigationRailItem/NavigationRailItem.tsx +0 -314
- package/src/components/NavigationRailItem/NavigationRailItem.types.ts +0 -175
- package/src/components/NavigationRailItem/README.md +0 -476
- package/src/components/NavigationRailItem/index.ts +0 -2
- package/src/components/NavigationRailPanel/NavigationRailPanel.stories.tsx +0 -462
- package/src/components/NavigationRailPanel/NavigationRailPanel.tsx +0 -332
- package/src/components/NavigationRailPanel/NavigationRailPanel.types.ts +0 -178
- package/src/components/NavigationRailPanel/README.md +0 -461
- package/src/components/NavigationRailPanel/index.ts +0 -6
- package/src/components/NavigationRailTypes/NavigationRailTypes.stories.tsx +0 -682
- package/src/components/NavigationRailTypes/NavigationRailTypes.tsx +0 -363
- package/src/components/NavigationRailTypes/NavigationRailTypes.types.ts +0 -178
- package/src/components/NavigationRailTypes/README.md +0 -573
- package/src/components/NavigationRailTypes/icons.tsx +0 -76
- package/src/components/NavigationRailTypes/index.ts +0 -7
- package/src/views/LayoutCommercial/LayoutCommercial.stories.tsx +0 -374
- package/src/views/LayoutCommercial/LayoutCommercial.tsx +0 -125
- package/src/views/LayoutCommercial/LayoutCommercial.types.ts +0 -54
- package/src/views/LayoutCommercial/README.md +0 -286
- package/src/views/LayoutCommercial/index.ts +0 -2
- package/src/views/ListView/ListView.stories.tsx +0 -329
- package/src/views/ListView/ListView.tsx +0 -570
- package/src/views/ListView/ListView.types.ts +0 -211
- package/src/views/ListView/icons.tsx +0 -282
- package/src/views/ListView/index.ts +0 -11
- package/src/views/LoginView/LoginView.stories.tsx +0 -148
- package/src/views/LoginView/LoginView.tsx +0 -426
- package/src/views/LoginView/LoginView.types.ts +0 -52
- package/src/views/LoginView/README.md +0 -396
- package/src/views/LoginView/icons.tsx +0 -85
- package/src/views/LoginView/index.ts +0 -3
- package/src/views/SignUpView/SignUpView.stories.tsx +0 -129
- package/src/views/SignUpView/SignUpView.tsx +0 -503
- package/src/views/SignUpView/SignUpView.types.ts +0 -58
- package/src/views/SignUpView/icons.tsx +0 -71
- package/src/views/SignUpView/index.ts +0 -3
package/docs/typography.md
CHANGED
|
@@ -1,1268 +1,1268 @@
|
|
|
1
|
-
# Sistema de Tipografía - Siesa UI Kit
|
|
2
|
-
|
|
3
|
-
## 📋 Tabla de Contenidos
|
|
4
|
-
|
|
5
|
-
1. [Introducción](#introducción)
|
|
6
|
-
2. [Familia Tipográfica](#familia-tipográfica)
|
|
7
|
-
3. [Escala Tipográfica](#escala-tipográfica)
|
|
8
|
-
4. [Display](#display)
|
|
9
|
-
5. [Heading](#heading)
|
|
10
|
-
6. [Label](#label)
|
|
11
|
-
7. [Paragraph](#paragraph)
|
|
12
|
-
8. [Guía de Uso](#guía-de-uso)
|
|
13
|
-
9. [Pesos Tipográficos](#pesos-tipográficos)
|
|
14
|
-
10. [Ejemplos de Código](#ejemplos-de-código)
|
|
15
|
-
11. [Mejores Prácticas](#mejores-prácticas)
|
|
16
|
-
12. [Dark Mode](#dark-mode)
|
|
17
|
-
13. [Referencia Rápida](#referencia-rápida)
|
|
18
|
-
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
## Introducción
|
|
22
|
-
|
|
23
|
-
El sistema tipográfico de Siesa UI Kit está diseñado para proporcionar una jerarquía visual clara y consistente en todas las interfaces. Utilizamos la familia tipográfica personalizada **SiesaBT** con un sistema de escalas bien definido que abarca desde títulos grandes hasta textos pequeños.
|
|
24
|
-
|
|
25
|
-
### Objetivos del Sistema Tipográfico
|
|
26
|
-
|
|
27
|
-
- **Jerarquía Clara**: Escalas bien definidas para organizar la información
|
|
28
|
-
- **Legibilidad**: Tamaños y alturas de línea optimizados para lectura
|
|
29
|
-
- **Consistencia**: Uso uniforme de pesos y estilos en todo el sistema
|
|
30
|
-
- **Flexibilidad**: Escalas adaptables para diferentes contextos
|
|
31
|
-
- **Accesibilidad**: Cumplimiento de estándares WCAG para contraste y tamaño
|
|
32
|
-
|
|
33
|
-
### Principios de Diseño
|
|
34
|
-
|
|
35
|
-
1. **Escalas Semánticas**: Cada escala tiene un propósito claro (Display, Heading, Label, Paragraph)
|
|
36
|
-
2. **Proporciones Armónicas**: Progresión coherente entre tamaños
|
|
37
|
-
3. **Espaciado Vertical**: Line-height optimizado para cada tamaño
|
|
38
|
-
4. **Peso Apropiado**: Bold para títulos y labels, Regular para párrafos
|
|
39
|
-
|
|
40
|
-
---
|
|
41
|
-
|
|
42
|
-
## Familia Tipográfica
|
|
43
|
-
|
|
44
|
-
### SiesaBT
|
|
45
|
-
|
|
46
|
-
**SiesaBT** es la familia tipográfica corporativa de Siesa, diseñada específicamente para reflejar la identidad de marca.
|
|
47
|
-
|
|
48
|
-
#### Pesos Disponibles
|
|
49
|
-
|
|
50
|
-
| Peso | Font-Weight | Archivo | Uso Principal |
|
|
51
|
-
|------|-------------|---------|---------------|
|
|
52
|
-
| **Light** | 300 | SiesaBT-Light.otf | Textos decorativos, énfasis suave |
|
|
53
|
-
| **Regular** | 400 | SiesaBT-Regular.otf | **Párrafos, contenido principal** |
|
|
54
|
-
| **Bold** | 700 | SiesaBT-Bold.otf | **Títulos, labels, botones** |
|
|
55
|
-
|
|
56
|
-
#### Configuración
|
|
57
|
-
|
|
58
|
-
```css
|
|
59
|
-
/* src/index.css */
|
|
60
|
-
@font-face {
|
|
61
|
-
font-family: 'SiesaBT';
|
|
62
|
-
src: url('./assets/fonts/SiesaBT/SiesaBT-Regular.otf') format('opentype');
|
|
63
|
-
font-weight: 400;
|
|
64
|
-
font-style: normal;
|
|
65
|
-
font-display: swap;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
@font-face {
|
|
69
|
-
font-family: 'SiesaBT';
|
|
70
|
-
src: url('./assets/fonts/SiesaBT/SiesaBT-Light.otf') format('opentype');
|
|
71
|
-
font-weight: 300;
|
|
72
|
-
font-style: normal;
|
|
73
|
-
font-display: swap;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
@font-face {
|
|
77
|
-
font-family: 'SiesaBT';
|
|
78
|
-
src: url('./assets/fonts/SiesaBT/SiesaBT-Bold.otf') format('opentype');
|
|
79
|
-
font-weight: 700;
|
|
80
|
-
font-style: normal;
|
|
81
|
-
font-display: swap;
|
|
82
|
-
}
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
```javascript
|
|
86
|
-
// tailwind.config.js
|
|
87
|
-
fontFamily: {
|
|
88
|
-
sans: ['SiesaBT', 'Inter', 'sans-serif'],
|
|
89
|
-
}
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
#### Fallbacks
|
|
93
|
-
|
|
94
|
-
- **Primario**: SiesaBT
|
|
95
|
-
- **Secundario**: Inter (sans-serif moderna)
|
|
96
|
-
- **Terciario**: sans-serif (sistema)
|
|
97
|
-
|
|
98
|
-
---
|
|
99
|
-
|
|
100
|
-
## Escala Tipográfica
|
|
101
|
-
|
|
102
|
-
El sistema tipográfico se organiza en **4 categorías semánticas** con **17 escalas totales**:
|
|
103
|
-
|
|
104
|
-
| Categoría | Escalas | Peso | Letter Spacing | Uso |
|
|
105
|
-
|-----------|---------|------|----------------|-----|
|
|
106
|
-
| **Display** | 5 tamaños | Bold (700) | -2.5% | Heros, títulos muy grandes |
|
|
107
|
-
| **Heading** | 4 tamaños | Bold (700) | -2.5% | Títulos de secciones |
|
|
108
|
-
| **Label** | 4 tamaños | Bold (700) | 0% | Labels, botones, badges |
|
|
109
|
-
| **Paragraph** | 4 tamaños | Regular (400) | 0% | Contenido, textos largos |
|
|
110
|
-
|
|
111
|
-
---
|
|
112
|
-
|
|
113
|
-
## Display
|
|
114
|
-
|
|
115
|
-
**Uso**: Títulos hero, landing pages, banners principales, presentaciones impactantes.
|
|
116
|
-
|
|
117
|
-
**Características**:
|
|
118
|
-
- Font-weight: 700 (Bold)
|
|
119
|
-
- Letter-spacing: -2.5% (tracking más cerrado)
|
|
120
|
-
- Line-height: Igual al font-size (leading compacto)
|
|
121
|
-
|
|
122
|
-
### Escalas Display
|
|
123
|
-
|
|
124
|
-
| Nombre | Tailwind Class | Font Size | Line Height | Tracking | Uso |
|
|
125
|
-
|--------|---------------|-----------|-------------|----------|-----|
|
|
126
|
-
| **Extra Large** | `text-9xl` | 128px (8rem) | 128px (8rem) | -2.5% | Máximo impacto |
|
|
127
|
-
| **Large** | `text-8xl` | 96px (6rem) | 96px (6rem) | -2.5% | Hero sections |
|
|
128
|
-
| **Medium** | `text-7xl` | 72px (4.5rem) | 72px (4.5rem) | -2.5% | Títulos grandes |
|
|
129
|
-
| **Small** | `text-6xl` | 60px (3.75rem) | 60px (3.75rem) | -2.5% | Sub-heros |
|
|
130
|
-
| **Tiny** | `text-5xl` | 48px (3rem) | 48px (3rem) | -2.5% | Títulos medianos |
|
|
131
|
-
|
|
132
|
-
### Código Display
|
|
133
|
-
|
|
134
|
-
```tsx
|
|
135
|
-
// Extra Large Display
|
|
136
|
-
<h1 className="text-9xl font-bold tracking-tighter">
|
|
137
|
-
Bienvenido a Siesa
|
|
138
|
-
</h1>
|
|
139
|
-
|
|
140
|
-
// Large Display
|
|
141
|
-
<h1 className="text-8xl font-bold tracking-tighter">
|
|
142
|
-
Soluciones Empresariales
|
|
143
|
-
</h1>
|
|
144
|
-
|
|
145
|
-
// Medium Display
|
|
146
|
-
<h2 className="text-7xl font-bold tracking-tighter">
|
|
147
|
-
Innovación Digital
|
|
148
|
-
</h2>
|
|
149
|
-
|
|
150
|
-
// Small Display
|
|
151
|
-
<h2 className="text-6xl font-bold tracking-tighter">
|
|
152
|
-
Transformación
|
|
153
|
-
</h2>
|
|
154
|
-
|
|
155
|
-
// Tiny Display
|
|
156
|
-
<h3 className="text-5xl font-bold tracking-tighter">
|
|
157
|
-
Nuevas Funcionalidades
|
|
158
|
-
</h3>
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
---
|
|
162
|
-
|
|
163
|
-
## Heading
|
|
164
|
-
|
|
165
|
-
**Uso**: Títulos de secciones, encabezados de páginas, títulos de cards, subtítulos importantes.
|
|
166
|
-
|
|
167
|
-
**Características**:
|
|
168
|
-
- Font-weight: 700 (Bold)
|
|
169
|
-
- Letter-spacing: -2.5% (tracking más cerrado)
|
|
170
|
-
- Line-height: Mayor que font-size (mejor legibilidad)
|
|
171
|
-
|
|
172
|
-
### Escalas Heading
|
|
173
|
-
|
|
174
|
-
| Nombre | Tailwind Class | Font Size | Line Height | Tracking | Uso |
|
|
175
|
-
|--------|---------------|-----------|-------------|----------|-----|
|
|
176
|
-
| **Large** | `text-4xl` | 36px (2.25rem) | 40px (2.5rem) | -2.5% | Títulos principales |
|
|
177
|
-
| **Medium** | `text-3xl` | 30px (1.875rem) | 36px (2.25rem) | -2.5% | Títulos secundarios |
|
|
178
|
-
| **Small** | `text-2xl` | 24px (1.5rem) | 32px (2rem) | -2.5% | Subtítulos |
|
|
179
|
-
| **Tiny** | `text-xl` | 20px (1.25rem) | 28px (1.75rem) | -2.5% | Títulos pequeños |
|
|
180
|
-
|
|
181
|
-
### Código Heading
|
|
182
|
-
|
|
183
|
-
```tsx
|
|
184
|
-
// Large Heading - Título de página
|
|
185
|
-
<h1 className="text-4xl font-bold tracking-tighter">
|
|
186
|
-
Panel de Control
|
|
187
|
-
</h1>
|
|
188
|
-
|
|
189
|
-
// Medium Heading - Título de sección
|
|
190
|
-
<h2 className="text-3xl font-bold tracking-tighter">
|
|
191
|
-
Estadísticas del Mes
|
|
192
|
-
</h2>
|
|
193
|
-
|
|
194
|
-
// Small Heading - Título de card
|
|
195
|
-
<h3 className="text-2xl font-bold tracking-tighter">
|
|
196
|
-
Ventas Totales
|
|
197
|
-
</h3>
|
|
198
|
-
|
|
199
|
-
// Tiny Heading - Subtítulo
|
|
200
|
-
<h4 className="text-xl font-bold tracking-tighter">
|
|
201
|
-
Resumen Semanal
|
|
202
|
-
</h4>
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
---
|
|
206
|
-
|
|
207
|
-
## Label
|
|
208
|
-
|
|
209
|
-
**Uso**: Labels de formularios, texto de botones, badges, tabs, tooltips, texto enfatizado.
|
|
210
|
-
|
|
211
|
-
**Características**:
|
|
212
|
-
- Font-weight: 700 (Bold)
|
|
213
|
-
- Letter-spacing: 0% (tracking normal)
|
|
214
|
-
- Line-height: Proporcionado para buena legibilidad
|
|
215
|
-
|
|
216
|
-
### Escalas Label
|
|
217
|
-
|
|
218
|
-
| Nombre | Tailwind Class | Font Size | Line Height | Tracking | Uso |
|
|
219
|
-
|--------|---------------|-----------|-------------|----------|-----|
|
|
220
|
-
| **Large** | `text-lg font-bold` | 18px (1.125rem) | 28px (1.75rem) | 0% | Labels grandes |
|
|
221
|
-
| **Base** | `text-base font-bold` | 16px (1rem) | 24px (1.5rem) | 0% | Labels estándar |
|
|
222
|
-
| **Small** | `text-sm font-bold` | 14px (0.875rem) | 20px (1.25rem) | 0% | **Labels comunes, botones** |
|
|
223
|
-
| **Tiny** | `text-xs font-bold` | 12px (0.75rem) | 16px (1rem) | 0% | Badges, tags |
|
|
224
|
-
|
|
225
|
-
### Código Label
|
|
226
|
-
|
|
227
|
-
```tsx
|
|
228
|
-
// Large Label
|
|
229
|
-
<label className="text-lg font-bold text-content-primary">
|
|
230
|
-
Nombre del Proyecto
|
|
231
|
-
</label>
|
|
232
|
-
|
|
233
|
-
// Base Label
|
|
234
|
-
<label className="text-base font-bold text-content-primary">
|
|
235
|
-
Correo Electrónico
|
|
236
|
-
</label>
|
|
237
|
-
|
|
238
|
-
// Small Label - MÁS COMÚN en formularios y botones
|
|
239
|
-
<label className="text-sm font-bold text-content-primary">
|
|
240
|
-
Usuario
|
|
241
|
-
</label>
|
|
242
|
-
|
|
243
|
-
// Tiny Label - Badges
|
|
244
|
-
<span className="text-xs font-bold text-primary-custom-600">
|
|
245
|
-
NUEVO
|
|
246
|
-
</span>
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
---
|
|
250
|
-
|
|
251
|
-
## Paragraph
|
|
252
|
-
|
|
253
|
-
**Uso**: Contenido principal, textos descriptivos, párrafos largos, ayudas contextuales.
|
|
254
|
-
|
|
255
|
-
**Características**:
|
|
256
|
-
- Font-weight: 400 (Regular)
|
|
257
|
-
- Letter-spacing: 0% (tracking normal)
|
|
258
|
-
- Line-height: Generoso para facilitar lectura
|
|
259
|
-
|
|
260
|
-
### Escalas Paragraph
|
|
261
|
-
|
|
262
|
-
| Nombre | Tailwind Class | Font Size | Line Height | Tracking | Uso |
|
|
263
|
-
|--------|---------------|-----------|-------------|----------|-----|
|
|
264
|
-
| **Large** | `text-lg` | 18px (1.125rem) | 28px (1.75rem) | 0% | Contenido destacado |
|
|
265
|
-
| **Base** | `text-base` | 16px (1rem) | 24px (1.5rem) | 0% | **Párrafos estándar** |
|
|
266
|
-
| **Small** | `text-sm` | 14px (0.875rem) | 20px (1.25rem) | 0% | Textos secundarios |
|
|
267
|
-
| **Tiny** | `text-xs` | 12px (0.75rem) | 16px (1rem) | 0% | Notas, disclaimers |
|
|
268
|
-
|
|
269
|
-
### Código Paragraph
|
|
270
|
-
|
|
271
|
-
```tsx
|
|
272
|
-
// Large Paragraph - Intro destacada
|
|
273
|
-
<p className="text-lg text-content-primary">
|
|
274
|
-
Bienvenido al sistema de gestión empresarial.
|
|
275
|
-
Esta plataforma te permite administrar todos los aspectos de tu negocio.
|
|
276
|
-
</p>
|
|
277
|
-
|
|
278
|
-
// Base Paragraph - Contenido estándar
|
|
279
|
-
<p className="text-base text-content-primary">
|
|
280
|
-
El panel de control muestra un resumen de las métricas más importantes
|
|
281
|
-
de tu organización en tiempo real.
|
|
282
|
-
</p>
|
|
283
|
-
|
|
284
|
-
// Small Paragraph - Descripción secundaria
|
|
285
|
-
<p className="text-sm text-content-secondary">
|
|
286
|
-
Última actualización: hace 5 minutos
|
|
287
|
-
</p>
|
|
288
|
-
|
|
289
|
-
// Tiny Paragraph - Nota al pie
|
|
290
|
-
<p className="text-xs text-content-tertiary">
|
|
291
|
-
* Los datos se actualizan cada 15 minutos
|
|
292
|
-
</p>
|
|
293
|
-
```
|
|
294
|
-
|
|
295
|
-
---
|
|
296
|
-
|
|
297
|
-
## Guía de Uso
|
|
298
|
-
|
|
299
|
-
### Cuándo Usar Cada Categoría
|
|
300
|
-
|
|
301
|
-
#### Display
|
|
302
|
-
- ✅ Landing pages principales
|
|
303
|
-
- ✅ Páginas de marketing
|
|
304
|
-
- ✅ Secciones hero
|
|
305
|
-
- ✅ Presentaciones impactantes
|
|
306
|
-
- ❌ Interfaces de aplicación (demasiado grande)
|
|
307
|
-
- ❌ Dashboards (poco práctico)
|
|
308
|
-
|
|
309
|
-
#### Heading
|
|
310
|
-
- ✅ Títulos de páginas (text-4xl)
|
|
311
|
-
- ✅ Títulos de secciones (text-3xl)
|
|
312
|
-
- ✅ Títulos de cards (text-2xl)
|
|
313
|
-
- ✅ Subtítulos (text-xl)
|
|
314
|
-
- ✅ **Uso más común en aplicaciones**
|
|
315
|
-
|
|
316
|
-
#### Label
|
|
317
|
-
- ✅ Labels de formularios (text-sm o text-base)
|
|
318
|
-
- ✅ Texto de botones (text-sm)
|
|
319
|
-
- ✅ Tabs y navegación
|
|
320
|
-
- ✅ Badges y tags (text-xs)
|
|
321
|
-
- ✅ Tooltips (text-xs o text-sm)
|
|
322
|
-
- ✅ **Siempre usar font-bold**
|
|
323
|
-
|
|
324
|
-
#### Paragraph
|
|
325
|
-
- ✅ Contenido principal (text-base)
|
|
326
|
-
- ✅ Descripciones largas
|
|
327
|
-
- ✅ Textos de ayuda (text-sm)
|
|
328
|
-
- ✅ Notas al pie (text-xs)
|
|
329
|
-
- ✅ **Siempre usar font-normal (Regular)**
|
|
330
|
-
|
|
331
|
-
### Jerarquía Visual Recomendada
|
|
332
|
-
|
|
333
|
-
```tsx
|
|
334
|
-
// Página de Dashboard
|
|
335
|
-
<div className="space-y-6">
|
|
336
|
-
{/* Título Principal - Heading Large */}
|
|
337
|
-
<h1 className="text-4xl font-bold tracking-tighter">
|
|
338
|
-
Dashboard Ejecutivo
|
|
339
|
-
</h1>
|
|
340
|
-
|
|
341
|
-
{/* Sección */}
|
|
342
|
-
<section className="space-y-4">
|
|
343
|
-
{/* Título de Sección - Heading Medium */}
|
|
344
|
-
<h2 className="text-3xl font-bold tracking-tighter">
|
|
345
|
-
Métricas de Ventas
|
|
346
|
-
</h2>
|
|
347
|
-
|
|
348
|
-
{/* Párrafo Descriptivo - Paragraph Base */}
|
|
349
|
-
<p className="text-base text-content-secondary">
|
|
350
|
-
Resumen de las ventas del último mes comparado con el período anterior.
|
|
351
|
-
</p>
|
|
352
|
-
|
|
353
|
-
{/* Card */}
|
|
354
|
-
<div className="border rounded-lg p-4">
|
|
355
|
-
{/* Título de Card - Heading Small */}
|
|
356
|
-
<h3 className="text-2xl font-bold tracking-tighter mb-2">
|
|
357
|
-
Total de Ventas
|
|
358
|
-
</h3>
|
|
359
|
-
|
|
360
|
-
{/* Contenido - Paragraph Small */}
|
|
361
|
-
<p className="text-sm text-content-tertiary">
|
|
362
|
-
Comparado con el mes anterior
|
|
363
|
-
</p>
|
|
364
|
-
</div>
|
|
365
|
-
</section>
|
|
366
|
-
</div>
|
|
367
|
-
```
|
|
368
|
-
|
|
369
|
-
---
|
|
370
|
-
|
|
371
|
-
## Pesos Tipográficos
|
|
372
|
-
|
|
373
|
-
### Mapa de Clases de Peso
|
|
374
|
-
|
|
375
|
-
```tsx
|
|
376
|
-
// Light (300) - Uso limitado
|
|
377
|
-
<p className="font-light">Texto decorativo</p>
|
|
378
|
-
|
|
379
|
-
// Regular (400) - Default para párrafos
|
|
380
|
-
<p className="font-normal">Contenido principal</p>
|
|
381
|
-
|
|
382
|
-
// Bold (700) - Títulos y labels
|
|
383
|
-
<h1 className="font-bold">Título Principal</h1>
|
|
384
|
-
```
|
|
385
|
-
|
|
386
|
-
### Uso Semántico de Pesos
|
|
387
|
-
|
|
388
|
-
| Peso | Clase | Cuándo Usar | Ejemplos |
|
|
389
|
-
|------|-------|-------------|----------|
|
|
390
|
-
| **300** | `font-light` | Decorativo, énfasis suave | Citas, texto hero decorativo |
|
|
391
|
-
| **400** | `font-normal` | **Párrafos, contenido** | Todo el contenido de lectura |
|
|
392
|
-
| **700** | `font-bold` | **Títulos, labels, botones** | H1-H6, labels, botones, badges |
|
|
393
|
-
|
|
394
|
-
### Reglas de Oro
|
|
395
|
-
|
|
396
|
-
1. **Párrafos**: Siempre `font-normal` (Regular 400)
|
|
397
|
-
2. **Títulos**: Siempre `font-bold` (Bold 700)
|
|
398
|
-
3. **Labels**: Siempre `font-bold` (Bold 700)
|
|
399
|
-
4. **Botones**: Siempre `font-bold` (Bold 700)
|
|
400
|
-
5. **Badges/Tags**: Siempre `font-bold` (Bold 700)
|
|
401
|
-
|
|
402
|
-
---
|
|
403
|
-
|
|
404
|
-
## Ejemplos de Código
|
|
405
|
-
|
|
406
|
-
### Ejemplo 1: Formulario Completo
|
|
407
|
-
|
|
408
|
-
```tsx
|
|
409
|
-
import { Input } from '@/components/Input';
|
|
410
|
-
import { Button } from '@/components/Button';
|
|
411
|
-
|
|
412
|
-
export const RegistrationForm = () => {
|
|
413
|
-
return (
|
|
414
|
-
<form className="space-y-6 max-w-md">
|
|
415
|
-
{/* Título - Heading Large */}
|
|
416
|
-
<h1 className="text-4xl font-bold tracking-tighter text-content-primary">
|
|
417
|
-
Crear Cuenta
|
|
418
|
-
</h1>
|
|
419
|
-
|
|
420
|
-
{/* Descripción - Paragraph Base */}
|
|
421
|
-
<p className="text-base text-content-secondary">
|
|
422
|
-
Completa el formulario para registrarte en la plataforma.
|
|
423
|
-
</p>
|
|
424
|
-
|
|
425
|
-
{/* Campo con Label Small */}
|
|
426
|
-
<div className="space-y-2">
|
|
427
|
-
<label className="text-sm font-bold text-content-primary">
|
|
428
|
-
Nombre Completo
|
|
429
|
-
</label>
|
|
430
|
-
<Input placeholder="Juan Pérez" />
|
|
431
|
-
<p className="text-xs text-content-tertiary">
|
|
432
|
-
Ingresa tu nombre como aparece en tu documento
|
|
433
|
-
</p>
|
|
434
|
-
</div>
|
|
435
|
-
|
|
436
|
-
{/* Campo con Label Base */}
|
|
437
|
-
<div className="space-y-2">
|
|
438
|
-
<label className="text-base font-bold text-content-primary">
|
|
439
|
-
Correo Electrónico
|
|
440
|
-
</label>
|
|
441
|
-
<Input type="email" placeholder="correo@ejemplo.com" />
|
|
442
|
-
</div>
|
|
443
|
-
|
|
444
|
-
{/* Botón - Label Small (interno) */}
|
|
445
|
-
<Button type="default" size="base" fullWidth>
|
|
446
|
-
Registrarse
|
|
447
|
-
</Button>
|
|
448
|
-
|
|
449
|
-
{/* Nota al pie - Paragraph Tiny */}
|
|
450
|
-
<p className="text-xs text-content-tertiary">
|
|
451
|
-
Al registrarte, aceptas nuestros términos y condiciones.
|
|
452
|
-
</p>
|
|
453
|
-
</form>
|
|
454
|
-
);
|
|
455
|
-
};
|
|
456
|
-
```
|
|
457
|
-
|
|
458
|
-
### Ejemplo 2: Card de Estadística
|
|
459
|
-
|
|
460
|
-
```tsx
|
|
461
|
-
export const StatCard = ({ title, value, description, trend }) => {
|
|
462
|
-
return (
|
|
463
|
-
<div className="border border-border-primary rounded-lg p-6 space-y-3">
|
|
464
|
-
{/* Título - Heading Small */}
|
|
465
|
-
<h3 className="text-2xl font-bold tracking-tighter text-content-primary">
|
|
466
|
-
{title}
|
|
467
|
-
</h3>
|
|
468
|
-
|
|
469
|
-
{/* Valor Principal - Display Tiny */}
|
|
470
|
-
<p className="text-5xl font-bold tracking-tighter text-primary-custom-600">
|
|
471
|
-
{value}
|
|
472
|
-
</p>
|
|
473
|
-
|
|
474
|
-
{/* Descripción - Paragraph Small */}
|
|
475
|
-
<p className="text-sm text-content-secondary">
|
|
476
|
-
{description}
|
|
477
|
-
</p>
|
|
478
|
-
|
|
479
|
-
{/* Badge - Label Tiny */}
|
|
480
|
-
<span className="inline-flex items-center px-2 py-1 rounded text-xs font-bold bg-green-100 text-green-800">
|
|
481
|
-
{trend}
|
|
482
|
-
</span>
|
|
483
|
-
</div>
|
|
484
|
-
);
|
|
485
|
-
};
|
|
486
|
-
|
|
487
|
-
// Uso
|
|
488
|
-
<StatCard
|
|
489
|
-
title="Ventas Totales"
|
|
490
|
-
value="$125,430"
|
|
491
|
-
description="Este mes"
|
|
492
|
-
trend="+12.5%"
|
|
493
|
-
/>
|
|
494
|
-
```
|
|
495
|
-
|
|
496
|
-
### Ejemplo 3: Hero Section
|
|
497
|
-
|
|
498
|
-
```tsx
|
|
499
|
-
export const HeroSection = () => {
|
|
500
|
-
return (
|
|
501
|
-
<section className="py-20 px-6 text-center space-y-6">
|
|
502
|
-
{/* Título Hero - Display Large */}
|
|
503
|
-
<h1 className="text-8xl font-bold tracking-tighter text-content-primary">
|
|
504
|
-
Siesa Cloud
|
|
505
|
-
</h1>
|
|
506
|
-
|
|
507
|
-
{/* Subtítulo - Heading Large */}
|
|
508
|
-
<h2 className="text-4xl font-bold tracking-tighter text-content-secondary">
|
|
509
|
-
Gestión Empresarial Inteligente
|
|
510
|
-
</h2>
|
|
511
|
-
|
|
512
|
-
{/* Descripción - Paragraph Large */}
|
|
513
|
-
<p className="text-lg text-content-tertiary max-w-2xl mx-auto">
|
|
514
|
-
La plataforma todo-en-uno para administrar tu empresa de manera
|
|
515
|
-
eficiente, con herramientas diseñadas para impulsar tu crecimiento.
|
|
516
|
-
</p>
|
|
517
|
-
|
|
518
|
-
{/* CTAs */}
|
|
519
|
-
<div className="flex gap-4 justify-center">
|
|
520
|
-
<Button type="default" size="l">
|
|
521
|
-
Comenzar Ahora
|
|
522
|
-
</Button>
|
|
523
|
-
<Button type="outline" size="l">
|
|
524
|
-
Ver Demo
|
|
525
|
-
</Button>
|
|
526
|
-
</div>
|
|
527
|
-
|
|
528
|
-
{/* Nota - Paragraph Tiny */}
|
|
529
|
-
<p className="text-xs text-content-tertiary">
|
|
530
|
-
Prueba gratuita de 30 días • No requiere tarjeta de crédito
|
|
531
|
-
</p>
|
|
532
|
-
</section>
|
|
533
|
-
);
|
|
534
|
-
};
|
|
535
|
-
```
|
|
536
|
-
|
|
537
|
-
### Ejemplo 4: Lista de Artículos
|
|
538
|
-
|
|
539
|
-
```tsx
|
|
540
|
-
export const ArticleList = ({ articles }) => {
|
|
541
|
-
return (
|
|
542
|
-
<div className="space-y-8">
|
|
543
|
-
{/* Título de Sección - Heading Large */}
|
|
544
|
-
<h2 className="text-4xl font-bold tracking-tighter text-content-primary">
|
|
545
|
-
Últimas Noticias
|
|
546
|
-
</h2>
|
|
547
|
-
|
|
548
|
-
{articles.map((article) => (
|
|
549
|
-
<article key={article.id} className="border-b pb-6 space-y-3">
|
|
550
|
-
{/* Título del Artículo - Heading Medium */}
|
|
551
|
-
<h3 className="text-3xl font-bold tracking-tighter text-content-primary">
|
|
552
|
-
{article.title}
|
|
553
|
-
</h3>
|
|
554
|
-
|
|
555
|
-
{/* Meta información - Label Tiny */}
|
|
556
|
-
<div className="flex gap-4 text-xs font-bold text-content-tertiary">
|
|
557
|
-
<span>{article.author}</span>
|
|
558
|
-
<span>•</span>
|
|
559
|
-
<span>{article.date}</span>
|
|
560
|
-
<span>•</span>
|
|
561
|
-
<span>{article.readTime} min lectura</span>
|
|
562
|
-
</div>
|
|
563
|
-
|
|
564
|
-
{/* Extracto - Paragraph Base */}
|
|
565
|
-
<p className="text-base text-content-secondary">
|
|
566
|
-
{article.excerpt}
|
|
567
|
-
</p>
|
|
568
|
-
|
|
569
|
-
{/* Categoría - Label Small */}
|
|
570
|
-
<span className="inline-block px-3 py-1 text-sm font-bold text-primary-custom-600 bg-primary-custom-100 rounded">
|
|
571
|
-
{article.category}
|
|
572
|
-
</span>
|
|
573
|
-
</article>
|
|
574
|
-
))}
|
|
575
|
-
</div>
|
|
576
|
-
);
|
|
577
|
-
};
|
|
578
|
-
```
|
|
579
|
-
|
|
580
|
-
---
|
|
581
|
-
|
|
582
|
-
## Mejores Prácticas
|
|
583
|
-
|
|
584
|
-
### ✅ Hacer
|
|
585
|
-
|
|
586
|
-
1. **Usar la escala apropiada para cada contexto**
|
|
587
|
-
```tsx
|
|
588
|
-
// ✅ CORRECTO - Título de página
|
|
589
|
-
<h1 className="text-4xl font-bold tracking-tighter">Dashboard</h1>
|
|
590
|
-
|
|
591
|
-
// ✅ CORRECTO - Contenido
|
|
592
|
-
<p className="text-base text-content-primary">Contenido...</p>
|
|
593
|
-
```
|
|
594
|
-
|
|
595
|
-
2. **Mantener jerarquía visual clara**
|
|
596
|
-
```tsx
|
|
597
|
-
// ✅ CORRECTO - Jerarquía clara
|
|
598
|
-
<h1 className="text-4xl">Título Principal</h1>
|
|
599
|
-
<h2 className="text-3xl">Subtítulo</h2>
|
|
600
|
-
<p className="text-base">Contenido</p>
|
|
601
|
-
```
|
|
602
|
-
|
|
603
|
-
3. **Usar tracking apropiado**
|
|
604
|
-
```tsx
|
|
605
|
-
// ✅ CORRECTO - Display/Heading con tracking-tighter
|
|
606
|
-
<h1 className="text-5xl font-bold tracking-tighter">Hero</h1>
|
|
607
|
-
|
|
608
|
-
// ✅ CORRECTO - Label/Paragraph sin tracking
|
|
609
|
-
<p className="text-base">Contenido normal</p>
|
|
610
|
-
```
|
|
611
|
-
|
|
612
|
-
4. **Combinar con pesos semánticos**
|
|
613
|
-
```tsx
|
|
614
|
-
// ✅ CORRECTO - Bold para títulos
|
|
615
|
-
<h2 className="text-3xl font-bold">Título</h2>
|
|
616
|
-
|
|
617
|
-
// ✅ CORRECTO - Regular para párrafos
|
|
618
|
-
<p className="text-base font-normal">Párrafo</p>
|
|
619
|
-
```
|
|
620
|
-
|
|
621
|
-
5. **Usar colores apropiados**
|
|
622
|
-
```tsx
|
|
623
|
-
// ✅ CORRECTO - Jerarquía de colores
|
|
624
|
-
<h1 className="text-4xl font-bold text-content-primary">Principal</h1>
|
|
625
|
-
<p className="text-base text-content-secondary">Secundario</p>
|
|
626
|
-
<span className="text-sm text-content-tertiary">Terciario</span>
|
|
627
|
-
```
|
|
628
|
-
|
|
629
|
-
### ❌ Evitar
|
|
630
|
-
|
|
631
|
-
1. **No mezclar categorías sin propósito**
|
|
632
|
-
```tsx
|
|
633
|
-
// ❌ INCORRECTO - Display para contenido normal
|
|
634
|
-
<p className="text-7xl">Texto normal</p>
|
|
635
|
-
|
|
636
|
-
// ✅ CORRECTO
|
|
637
|
-
<p className="text-base">Texto normal</p>
|
|
638
|
-
```
|
|
639
|
-
|
|
640
|
-
2. **No omitir font-bold en títulos**
|
|
641
|
-
```tsx
|
|
642
|
-
// ❌ INCORRECTO - Título sin bold
|
|
643
|
-
<h1 className="text-4xl">Título</h1>
|
|
644
|
-
|
|
645
|
-
// ✅ CORRECTO
|
|
646
|
-
<h1 className="text-4xl font-bold">Título</h1>
|
|
647
|
-
```
|
|
648
|
-
|
|
649
|
-
3. **No usar bold en párrafos largos**
|
|
650
|
-
```tsx
|
|
651
|
-
// ❌ INCORRECTO - Párrafo en bold
|
|
652
|
-
<p className="text-base font-bold">
|
|
653
|
-
Este es un párrafo muy largo que se vuelve
|
|
654
|
-
difícil de leer cuando está en negrita...
|
|
655
|
-
</p>
|
|
656
|
-
|
|
657
|
-
// ✅ CORRECTO
|
|
658
|
-
<p className="text-base">Contenido legible...</p>
|
|
659
|
-
```
|
|
660
|
-
|
|
661
|
-
4. **No saltar demasiados niveles de jerarquía**
|
|
662
|
-
```tsx
|
|
663
|
-
// ❌ INCORRECTO - Salto abrupto
|
|
664
|
-
<h1 className="text-8xl">Hero</h1>
|
|
665
|
-
<p className="text-xs">Texto diminuto</p>
|
|
666
|
-
|
|
667
|
-
// ✅ CORRECTO - Transición gradual
|
|
668
|
-
<h1 className="text-8xl">Hero</h1>
|
|
669
|
-
<h2 className="text-4xl">Subtítulo</h2>
|
|
670
|
-
<p className="text-base">Contenido</p>
|
|
671
|
-
```
|
|
672
|
-
|
|
673
|
-
5. **No usar Display en UI de aplicación**
|
|
674
|
-
```tsx
|
|
675
|
-
// ❌ INCORRECTO - Display en dashboard
|
|
676
|
-
<h1 className="text-9xl">Dashboard</h1>
|
|
677
|
-
|
|
678
|
-
// ✅ CORRECTO - Heading en dashboard
|
|
679
|
-
<h1 className="text-4xl font-bold tracking-tighter">Dashboard</h1>
|
|
680
|
-
```
|
|
681
|
-
|
|
682
|
-
### Accesibilidad
|
|
683
|
-
|
|
684
|
-
1. **Tamaño mínimo para contenido**: text-sm (14px) o mayor
|
|
685
|
-
2. **Contraste**: Usar colores con contraste WCAG AA mínimo (4.5:1)
|
|
686
|
-
3. **Jerarquía HTML**: Usar etiquetas semánticas (h1-h6, p, etc.)
|
|
687
|
-
4. **Responsive**: Ajustar tamaños en móviles
|
|
688
|
-
|
|
689
|
-
```tsx
|
|
690
|
-
// ✅ CORRECTO - Responsive
|
|
691
|
-
<h1 className="text-3xl md:text-4xl lg:text-5xl font-bold">
|
|
692
|
-
Título Adaptable
|
|
693
|
-
</h1>
|
|
694
|
-
|
|
695
|
-
// ✅ CORRECTO - Contraste
|
|
696
|
-
<p className="text-base text-content-primary"> {/* #18181b - buen contraste */}
|
|
697
|
-
Contenido legible
|
|
698
|
-
</p>
|
|
699
|
-
```
|
|
700
|
-
|
|
701
|
-
### Performance
|
|
702
|
-
|
|
703
|
-
1. **Font-display: swap**: Ya configurado en @font-face
|
|
704
|
-
2. **Preload fonts**: Considerar para fonts críticos
|
|
705
|
-
3. **Subset fonts**: Solo caracteres necesarios (español)
|
|
706
|
-
|
|
707
|
-
```html
|
|
708
|
-
<!-- Preload font crítico -->
|
|
709
|
-
<link
|
|
710
|
-
rel="preload"
|
|
711
|
-
href="/src/assets/fonts/SiesaBT/SiesaBT-Bold.otf"
|
|
712
|
-
as="font"
|
|
713
|
-
type="font/otf"
|
|
714
|
-
crossorigin
|
|
715
|
-
/>
|
|
716
|
-
```
|
|
717
|
-
|
|
718
|
-
---
|
|
719
|
-
|
|
720
|
-
## Dark Mode
|
|
721
|
-
|
|
722
|
-
La tipografía en dark mode mantiene las mismas escalas y pesos, pero es importante ajustar el contraste visual para garantizar la legibilidad en fondos oscuros.
|
|
723
|
-
|
|
724
|
-
### Configuración de Tailwind CSS
|
|
725
|
-
|
|
726
|
-
El modo oscuro en Siesa UI Kit se basa en la estrategia de clases de Tailwind CSS:
|
|
727
|
-
|
|
728
|
-
```javascript
|
|
729
|
-
// tailwind.config.js
|
|
730
|
-
module.exports = {
|
|
731
|
-
darkMode: 'class', // ✅ Estrategia basada en clases (NO 'media')
|
|
732
|
-
// ...resto de la configuración
|
|
733
|
-
}
|
|
734
|
-
```
|
|
735
|
-
|
|
736
|
-
Con esta configuración, el modo oscuro se activa añadiendo la clase `.dark` al elemento `<html>`:
|
|
737
|
-
|
|
738
|
-
```html
|
|
739
|
-
<!-- Modo claro -->
|
|
740
|
-
<html>
|
|
741
|
-
<body>
|
|
742
|
-
<!-- Contenido en modo claro -->
|
|
743
|
-
</body>
|
|
744
|
-
</html>
|
|
745
|
-
|
|
746
|
-
<!-- Modo oscuro -->
|
|
747
|
-
<html class="dark">
|
|
748
|
-
<body>
|
|
749
|
-
<!-- Contenido en modo oscuro -->
|
|
750
|
-
</body>
|
|
751
|
-
</html>
|
|
752
|
-
```
|
|
753
|
-
|
|
754
|
-
### El Modificador `dark:`
|
|
755
|
-
|
|
756
|
-
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>`).
|
|
757
|
-
|
|
758
|
-
#### Sintaxis Básica
|
|
759
|
-
|
|
760
|
-
```tsx
|
|
761
|
-
// Patrón básico para texto
|
|
762
|
-
<h1 className="text-content-primary dark:text-dark-content-primary">
|
|
763
|
-
Título adaptable
|
|
764
|
-
</h1>
|
|
765
|
-
|
|
766
|
-
// El título usa:
|
|
767
|
-
// - text-content-primary (#18181b - casi negro) en modo claro
|
|
768
|
-
// - text-dark-content-primary (#ffffff - blanco) en modo oscuro
|
|
769
|
-
```
|
|
770
|
-
|
|
771
|
-
### Colores de Texto en Dark Mode
|
|
772
|
-
|
|
773
|
-
```tsx
|
|
774
|
-
// Texto principal en dark mode
|
|
775
|
-
<p className="text-content-primary dark:text-dark-content-primary">
|
|
776
|
-
Texto que se adapta automáticamente
|
|
777
|
-
</p>
|
|
778
|
-
|
|
779
|
-
// Usando colores personalizados para dark mode
|
|
780
|
-
<h1 className="text-content-primary dark:text-dark-content-primary">
|
|
781
|
-
#18181b en light → #93d1fd en dark
|
|
782
|
-
</h1>
|
|
783
|
-
|
|
784
|
-
// Texto secundario
|
|
785
|
-
<p className="text-content-secondary dark:text-content-secondary">
|
|
786
|
-
Texto secundario adaptable (#a1a1aa en ambos modos)
|
|
787
|
-
</p>
|
|
788
|
-
|
|
789
|
-
// Texto terciario
|
|
790
|
-
<span className="text-content-tertiary dark:text-content-tertiary">
|
|
791
|
-
Placeholders y hints (#71717a en ambos modos)
|
|
792
|
-
</span>
|
|
793
|
-
```
|
|
794
|
-
|
|
795
|
-
### Combinando con Otros Modificadores
|
|
796
|
-
|
|
797
|
-
El modificador `dark:` se puede combinar con hover, focus, y responsive:
|
|
798
|
-
|
|
799
|
-
```tsx
|
|
800
|
-
// Dark mode + Hover
|
|
801
|
-
<a className="
|
|
802
|
-
text-primary-custom-600 hover:text-primary-custom-500
|
|
803
|
-
dark:text-blue-400 dark:hover:text-blue-300
|
|
804
|
-
">
|
|
805
|
-
Enlace con hover
|
|
806
|
-
</a>
|
|
807
|
-
|
|
808
|
-
// Dark mode + Focus
|
|
809
|
-
<button className="
|
|
810
|
-
text-content-primary focus:text-primary-custom-600
|
|
811
|
-
dark:text-dark-content-primary dark:focus:text-blue-400
|
|
812
|
-
">
|
|
813
|
-
Botón con focus
|
|
814
|
-
</button>
|
|
815
|
-
|
|
816
|
-
// Dark mode + Responsive
|
|
817
|
-
<h1 className="
|
|
818
|
-
text-3xl md:text-4xl lg:text-5xl
|
|
819
|
-
text-content-primary
|
|
820
|
-
dark:text-dark-content-primary
|
|
821
|
-
">
|
|
822
|
-
Título responsive y adaptable
|
|
823
|
-
</h1>
|
|
824
|
-
|
|
825
|
-
// Dark mode + Group hover
|
|
826
|
-
<div className="group">
|
|
827
|
-
<h3 className="
|
|
828
|
-
text-content-primary
|
|
829
|
-
group-hover:text-primary-custom-600
|
|
830
|
-
dark:text-dark-content-primary
|
|
831
|
-
dark:group-hover:text-blue-400
|
|
832
|
-
">
|
|
833
|
-
Título que cambia al hover del grupo
|
|
834
|
-
</h3>
|
|
835
|
-
</div>
|
|
836
|
-
```
|
|
837
|
-
|
|
838
|
-
### Orden de Modificadores
|
|
839
|
-
|
|
840
|
-
Tailwind CSS recomienda un orden específico para los modificadores:
|
|
841
|
-
|
|
842
|
-
**Formato**: `{responsive}:{dark}:{state}:{utility}`
|
|
843
|
-
|
|
844
|
-
```tsx
|
|
845
|
-
// ✅ CORRECTO - Orden: responsive → dark → state → utility
|
|
846
|
-
<h1 className="
|
|
847
|
-
text-3xl
|
|
848
|
-
md:text-4xl
|
|
849
|
-
md:dark:text-dark-content-primary
|
|
850
|
-
md:dark:hover:text-blue-400
|
|
851
|
-
">
|
|
852
|
-
Título con orden correcto
|
|
853
|
-
</h1>
|
|
854
|
-
|
|
855
|
-
// ❌ INCORRECTO - Orden equivocado
|
|
856
|
-
<h1 className="
|
|
857
|
-
dark:md:hover:text-blue-400
|
|
858
|
-
">
|
|
859
|
-
Orden confuso
|
|
860
|
-
</h1>
|
|
861
|
-
```
|
|
862
|
-
|
|
863
|
-
### Tabla de Colores de Texto por Estado
|
|
864
|
-
|
|
865
|
-
| Estado | Light Mode | Dark Mode | Descripción |
|
|
866
|
-
|--------|------------|-----------|-------------|
|
|
867
|
-
| **Texto Principal** | `text-content-primary` (#18181b) | `dark:text-dark-content-primary` (#ffffff) | Títulos y contenido principal |
|
|
868
|
-
| **Texto Secundario** | `text-content-secondary` (#a1a1aa) | `dark:text-content-secondary` (#a1a1aa) | Descripciones, metadata |
|
|
869
|
-
| **Texto Terciario** | `text-content-tertiary` (#71717a) | `dark:text-content-tertiary` (#71717a) | Placeholders, hints |
|
|
870
|
-
| **Enlaces** | `text-primary-custom-600` (#0e79fd) | `dark:text-blue-400` | Enlaces y CTAs |
|
|
871
|
-
| **Enlaces Hover** | `hover:text-primary-custom-500` | `dark:hover:text-blue-300` | Estado hover de enlaces |
|
|
872
|
-
| **Texto Deshabilitado** | `text-content-tertiary opacity-50` | `dark:text-dark-content-tertiary opacity-50` | Elementos inactivos |
|
|
873
|
-
|
|
874
|
-
### Implementación del Toggle Dark Mode
|
|
875
|
-
|
|
876
|
-
#### Script de Inicialización (Prevenir FOUC)
|
|
877
|
-
|
|
878
|
-
```html
|
|
879
|
-
<!-- index.html - En el <head> antes de cargar React -->
|
|
880
|
-
<head>
|
|
881
|
-
<script>
|
|
882
|
-
// Aplicar tema inmediatamente antes del render
|
|
883
|
-
(function() {
|
|
884
|
-
const theme = localStorage.getItem('theme');
|
|
885
|
-
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
|
886
|
-
|
|
887
|
-
if (theme === 'dark' || (!theme && prefersDark)) {
|
|
888
|
-
document.documentElement.classList.add('dark');
|
|
889
|
-
}
|
|
890
|
-
})();
|
|
891
|
-
</script>
|
|
892
|
-
</head>
|
|
893
|
-
```
|
|
894
|
-
|
|
895
|
-
#### Toggle Component
|
|
896
|
-
|
|
897
|
-
```tsx
|
|
898
|
-
import { useState, useEffect } from 'react';
|
|
899
|
-
|
|
900
|
-
export const DarkModeToggle = () => {
|
|
901
|
-
const [darkMode, setDarkMode] = useState(false);
|
|
902
|
-
|
|
903
|
-
useEffect(() => {
|
|
904
|
-
// Leer preferencia del usuario
|
|
905
|
-
const isDark = localStorage.getItem('theme') === 'dark';
|
|
906
|
-
setDarkMode(isDark);
|
|
907
|
-
|
|
908
|
-
if (isDark) {
|
|
909
|
-
document.documentElement.classList.add('dark');
|
|
910
|
-
}
|
|
911
|
-
}, []);
|
|
912
|
-
|
|
913
|
-
const toggleDarkMode = () => {
|
|
914
|
-
const newDarkMode = !darkMode;
|
|
915
|
-
setDarkMode(newDarkMode);
|
|
916
|
-
|
|
917
|
-
// Guardar preferencia
|
|
918
|
-
localStorage.setItem('theme', newDarkMode ? 'dark' : 'light');
|
|
919
|
-
|
|
920
|
-
// Aplicar clase
|
|
921
|
-
if (newDarkMode) {
|
|
922
|
-
document.documentElement.classList.add('dark');
|
|
923
|
-
} else {
|
|
924
|
-
document.documentElement.classList.remove('dark');
|
|
925
|
-
}
|
|
926
|
-
};
|
|
927
|
-
|
|
928
|
-
return (
|
|
929
|
-
<button
|
|
930
|
-
onClick={toggleDarkMode}
|
|
931
|
-
className="
|
|
932
|
-
p-2 rounded-md
|
|
933
|
-
border border-border-primary dark:border-dark-border-primary
|
|
934
|
-
hover:bg-background-secondary dark:hover:bg-dark-bg-primary
|
|
935
|
-
text-sm font-bold
|
|
936
|
-
"
|
|
937
|
-
aria-label="Toggle dark mode"
|
|
938
|
-
>
|
|
939
|
-
{darkMode ? '☀️ Light' : '🌙 Dark'}
|
|
940
|
-
</button>
|
|
941
|
-
);
|
|
942
|
-
};
|
|
943
|
-
```
|
|
944
|
-
|
|
945
|
-
### Mejores Prácticas para Dark Mode
|
|
946
|
-
|
|
947
|
-
#### 1. Contraste Adecuado
|
|
948
|
-
|
|
949
|
-
```tsx
|
|
950
|
-
// ✅ CORRECTO - Buen contraste en ambos modos
|
|
951
|
-
<div className="bg-white dark:bg-dark-bg-primary">
|
|
952
|
-
<h1 className="text-content-primary dark:text-dark-content-primary font-bold text-4xl">
|
|
953
|
-
Título legible
|
|
954
|
-
</h1>
|
|
955
|
-
<p className="text-content-secondary dark:text-content-secondary">
|
|
956
|
-
Contenido secundario con buen contraste
|
|
957
|
-
</p>
|
|
958
|
-
</div>
|
|
959
|
-
|
|
960
|
-
// ❌ INCORRECTO - Mismo color en ambos modos
|
|
961
|
-
<h1 className="text-gray-900 font-bold">
|
|
962
|
-
Difícil de leer en dark mode
|
|
963
|
-
</h1>
|
|
964
|
-
```
|
|
965
|
-
|
|
966
|
-
#### 2. Uso de Tokens de Color
|
|
967
|
-
|
|
968
|
-
```tsx
|
|
969
|
-
// ✅ CORRECTO - Usar tokens del sistema que se adaptan
|
|
970
|
-
<article>
|
|
971
|
-
<h2 className="text-content-primary dark:text-dark-content-primary font-bold text-2xl mb-4">
|
|
972
|
-
Título del Artículo
|
|
973
|
-
</h2>
|
|
974
|
-
<p className="text-content-primary dark:text-dark-content-primary mb-4">
|
|
975
|
-
Contenido principal que se adapta automáticamente al modo oscuro.
|
|
976
|
-
</p>
|
|
977
|
-
<p className="text-content-secondary dark:text-content-secondary text-sm">
|
|
978
|
-
Metadata o texto secundario
|
|
979
|
-
</p>
|
|
980
|
-
</article>
|
|
981
|
-
|
|
982
|
-
// ❌ INCORRECTO - Colores hardcodeados
|
|
983
|
-
<article>
|
|
984
|
-
<h2 className="text-black font-bold text-2xl">Título</h2>
|
|
985
|
-
<p className="text-gray-900">Contenido</p>
|
|
986
|
-
</article>
|
|
987
|
-
```
|
|
988
|
-
|
|
989
|
-
#### 3. Fondos con Texto
|
|
990
|
-
|
|
991
|
-
```tsx
|
|
992
|
-
// ✅ CORRECTO - Fondo y texto se adaptan
|
|
993
|
-
<div className="bg-bg-primary dark:bg-dark-bg-primary p-6 rounded-2xl">
|
|
994
|
-
<h3 className="text-content-primary dark:text-dark-content-primary font-bold">
|
|
995
|
-
Card Title
|
|
996
|
-
</h3>
|
|
997
|
-
<p className="text-content-secondary dark:text-content-secondary">
|
|
998
|
-
Card description
|
|
999
|
-
</p>
|
|
1000
|
-
</div>
|
|
1001
|
-
|
|
1002
|
-
// Para botones primarios con fondo custom
|
|
1003
|
-
<button className="bg-primary-custom-600 dark:bg-dark-bg-inverse text-primary-inverse-content dark:text-dark-content-inverse px-4 py-2 rounded-md font-bold text-sm">
|
|
1004
|
-
Primary Button
|
|
1005
|
-
</button>
|
|
1006
|
-
```
|
|
1007
|
-
|
|
1008
|
-
#### 4. Consistencia en Componentes
|
|
1009
|
-
|
|
1010
|
-
```tsx
|
|
1011
|
-
// ✅ CORRECTO - Componente que funciona en ambos modos
|
|
1012
|
-
export const Card = ({ title, description }) => {
|
|
1013
|
-
return (
|
|
1014
|
-
<div className="bg-white dark:bg-dark-bg-primary border border-border-primary dark:border-dark-border-primary rounded-2xl p-6">
|
|
1015
|
-
<h3 className="text-content-primary dark:text-dark-content-primary font-bold text-xl mb-2">
|
|
1016
|
-
{title}
|
|
1017
|
-
</h3>
|
|
1018
|
-
<p className="text-content-secondary dark:text-content-secondary">
|
|
1019
|
-
{description}
|
|
1020
|
-
</p>
|
|
1021
|
-
</div>
|
|
1022
|
-
);
|
|
1023
|
-
};
|
|
1024
|
-
```
|
|
1025
|
-
|
|
1026
|
-
### Ejemplo Completo: Hero Section con Dark Mode
|
|
1027
|
-
|
|
1028
|
-
```tsx
|
|
1029
|
-
export const HeroWithDarkMode = () => {
|
|
1030
|
-
return (
|
|
1031
|
-
<section className="bg-bg-primary dark:bg-dark-bg-primary px-6 py-16 md:py-24">
|
|
1032
|
-
<div className="max-w-4xl mx-auto text-center">
|
|
1033
|
-
{/* Hero title */}
|
|
1034
|
-
<h1 className="text-content-primary dark:text-dark-content-primary font-bold text-5xl md:text-7xl tracking-tighter mb-6">
|
|
1035
|
-
Bienvenido a Siesa UI Kit
|
|
1036
|
-
</h1>
|
|
1037
|
-
|
|
1038
|
-
{/* Hero description */}
|
|
1039
|
-
<p className="text-content-secondary dark:text-content-secondary text-lg md:text-xl mb-8 max-w-2xl mx-auto">
|
|
1040
|
-
Un sistema de diseño moderno y completo con soporte nativo para
|
|
1041
|
-
dark mode. Crea interfaces hermosas que funcionan en cualquier modo.
|
|
1042
|
-
</p>
|
|
1043
|
-
|
|
1044
|
-
{/* CTA buttons */}
|
|
1045
|
-
<div className="flex gap-4 justify-center">
|
|
1046
|
-
<button className="bg-primary-custom-600 dark:bg-dark-bg-inverse text-primary-inverse-content dark:text-dark-content-inverse px-6 py-3 rounded-md font-bold">
|
|
1047
|
-
Comenzar
|
|
1048
|
-
</button>
|
|
1049
|
-
<button className="border border-border-primary dark:border-dark-border-custom text-content-primary dark:text-dark-content-primary px-6 py-3 rounded-md font-bold hover:bg-background-secondary dark:hover:bg-dark-bg-primary">
|
|
1050
|
-
Documentación
|
|
1051
|
-
</button>
|
|
1052
|
-
</div>
|
|
1053
|
-
|
|
1054
|
-
{/* Feature list */}
|
|
1055
|
-
<div className="mt-16 grid grid-cols-1 md:grid-cols-3 gap-6">
|
|
1056
|
-
{[
|
|
1057
|
-
{ title: 'Tipografía Escalable', desc: '17 escalas de texto' },
|
|
1058
|
-
{ title: 'Dark Mode Nativo', desc: 'Soporte completo' },
|
|
1059
|
-
{ title: 'Accessible', desc: 'WCAG 2.1 AAA' },
|
|
1060
|
-
].map((feature) => (
|
|
1061
|
-
<div key={feature.title} className="p-6 border border-border-primary dark:border-dark-border-primary rounded-2xl bg-white dark:bg-dark-bg-primary">
|
|
1062
|
-
<h3 className="text-content-primary dark:text-dark-content-primary font-bold text-lg mb-2">
|
|
1063
|
-
{feature.title}
|
|
1064
|
-
</h3>
|
|
1065
|
-
<p className="text-content-secondary dark:text-content-secondary text-sm">
|
|
1066
|
-
{feature.desc}
|
|
1067
|
-
</p>
|
|
1068
|
-
</div>
|
|
1069
|
-
))}
|
|
1070
|
-
</div>
|
|
1071
|
-
</div>
|
|
1072
|
-
</section>
|
|
1073
|
-
);
|
|
1074
|
-
};
|
|
1075
|
-
```
|
|
1076
|
-
|
|
1077
|
-
### Toggle de Dark Mode
|
|
1078
|
-
|
|
1079
|
-
```tsx
|
|
1080
|
-
import { useState, useEffect } from 'react';
|
|
1081
|
-
|
|
1082
|
-
export const DarkModeToggle = () => {
|
|
1083
|
-
const [darkMode, setDarkMode] = useState(false);
|
|
1084
|
-
|
|
1085
|
-
useEffect(() => {
|
|
1086
|
-
// Leer preferencia del usuario
|
|
1087
|
-
const isDark = localStorage.getItem('darkMode') === 'true';
|
|
1088
|
-
setDarkMode(isDark);
|
|
1089
|
-
|
|
1090
|
-
if (isDark) {
|
|
1091
|
-
document.documentElement.classList.add('dark');
|
|
1092
|
-
}
|
|
1093
|
-
}, []);
|
|
1094
|
-
|
|
1095
|
-
const toggleDarkMode = () => {
|
|
1096
|
-
const newDarkMode = !darkMode;
|
|
1097
|
-
setDarkMode(newDarkMode);
|
|
1098
|
-
|
|
1099
|
-
// Guardar preferencia
|
|
1100
|
-
localStorage.setItem('darkMode', String(newDarkMode));
|
|
1101
|
-
|
|
1102
|
-
// Aplicar clase
|
|
1103
|
-
if (newDarkMode) {
|
|
1104
|
-
document.documentElement.classList.add('dark');
|
|
1105
|
-
} else {
|
|
1106
|
-
document.documentElement.classList.remove('dark');
|
|
1107
|
-
}
|
|
1108
|
-
};
|
|
1109
|
-
|
|
1110
|
-
return (
|
|
1111
|
-
<button
|
|
1112
|
-
onClick={toggleDarkMode}
|
|
1113
|
-
className="p-2 rounded-md border border-border-primary dark:border-dark-border-primary hover:bg-background-secondary dark:hover:bg-dark-bg-primary"
|
|
1114
|
-
aria-label="Toggle dark mode"
|
|
1115
|
-
>
|
|
1116
|
-
{darkMode ? '☀️' : '🌙'}
|
|
1117
|
-
</button>
|
|
1118
|
-
);
|
|
1119
|
-
};
|
|
1120
|
-
```
|
|
1121
|
-
|
|
1122
|
-
### Tokens de Color para Tipografía
|
|
1123
|
-
|
|
1124
|
-
Referencia rápida de colores de texto para dark mode:
|
|
1125
|
-
|
|
1126
|
-
| Token Light | Hex Light | Token Dark | Hex Dark | Uso |
|
|
1127
|
-
|-------------|-----------|------------|----------|-----|
|
|
1128
|
-
| `text-content-primary` | `#18181b` | `dark:text-dark-content-primary` | `#93d1fd` | Texto principal |
|
|
1129
|
-
| `text-content-secondary` | `#a1a1aa` | `dark:text-content-secondary` | `#a1a1aa` | Texto secundario |
|
|
1130
|
-
| `text-content-tertiary` | `#71717a` | `dark:text-content-tertiary` | `#71717a` | Placeholders, hints |
|
|
1131
|
-
| `text-primary-custom-600` | `#0e79fd` | `dark:text-dark-content-primary` | `#93d1fd` | Enlaces, CTA text |
|
|
1132
|
-
|
|
1133
|
-
### Recursos Adicionales sobre Dark Mode
|
|
1134
|
-
|
|
1135
|
-
Para más información sobre el modo oscuro:
|
|
1136
|
-
- Ver `docs/dark-mode-guide.md` - Guía completa de Dark Mode en Tailwind CSS
|
|
1137
|
-
- Ver `docs/colors.md` - Sistema de colores completo con tokens dark mode
|
|
1138
|
-
- Ver `docs/icons.md` - Sistema de iconos con ejemplos de dark mode
|
|
1139
|
-
- [Documentación oficial de Tailwind Dark Mode](https://tailwindcss.com/docs/dark-mode)
|
|
1140
|
-
|
|
1141
|
-
---
|
|
1142
|
-
|
|
1143
|
-
## Referencia Rápida
|
|
1144
|
-
|
|
1145
|
-
### Cheat Sheet: Escalas por Contexto
|
|
1146
|
-
|
|
1147
|
-
| Contexto | Clase Recomendada | Font-Weight |
|
|
1148
|
-
|----------|-------------------|-------------|
|
|
1149
|
-
| **Hero principal** | `text-8xl font-bold tracking-tighter` | 700 |
|
|
1150
|
-
| **Título de página** | `text-4xl font-bold tracking-tighter` | 700 |
|
|
1151
|
-
| **Título de sección** | `text-3xl font-bold tracking-tighter` | 700 |
|
|
1152
|
-
| **Título de card** | `text-2xl font-bold tracking-tighter` | 700 |
|
|
1153
|
-
| **Subtítulo** | `text-xl font-bold tracking-tighter` | 700 |
|
|
1154
|
-
| **Label de formulario** | `text-sm font-bold` o `text-base font-bold` | 700 |
|
|
1155
|
-
| **Texto de botón** | `text-sm font-bold` | 700 |
|
|
1156
|
-
| **Badge/Tag** | `text-xs font-bold` | 700 |
|
|
1157
|
-
| **Contenido principal** | `text-base` | 400 |
|
|
1158
|
-
| **Contenido destacado** | `text-lg` | 400 |
|
|
1159
|
-
| **Texto secundario** | `text-sm text-content-secondary` | 400 |
|
|
1160
|
-
| **Nota al pie** | `text-xs text-content-tertiary` | 400 |
|
|
1161
|
-
|
|
1162
|
-
### Cheat Sheet: Todas las Escalas
|
|
1163
|
-
|
|
1164
|
-
```tsx
|
|
1165
|
-
// ===== DISPLAY (Bold + tracking-tighter) =====
|
|
1166
|
-
<h1 className="text-9xl font-bold tracking-tighter">128px</h1>
|
|
1167
|
-
<h1 className="text-8xl font-bold tracking-tighter">96px</h1>
|
|
1168
|
-
<h1 className="text-7xl font-bold tracking-tighter">72px</h1>
|
|
1169
|
-
<h1 className="text-6xl font-bold tracking-tighter">60px</h1>
|
|
1170
|
-
<h1 className="text-5xl font-bold tracking-tighter">48px</h1>
|
|
1171
|
-
|
|
1172
|
-
// ===== HEADING (Bold + tracking-tighter) =====
|
|
1173
|
-
<h1 className="text-4xl font-bold tracking-tighter">36px</h1>
|
|
1174
|
-
<h2 className="text-3xl font-bold tracking-tighter">30px</h2>
|
|
1175
|
-
<h3 className="text-2xl font-bold tracking-tighter">24px</h3>
|
|
1176
|
-
<h4 className="text-xl font-bold tracking-tighter">20px</h4>
|
|
1177
|
-
|
|
1178
|
-
// ===== LABEL (Bold) =====
|
|
1179
|
-
<label className="text-lg font-bold">18px</label>
|
|
1180
|
-
<label className="text-base font-bold">16px</label>
|
|
1181
|
-
<label className="text-sm font-bold">14px</label> {/* MÁS COMÚN */}
|
|
1182
|
-
<span className="text-xs font-bold">12px</span>
|
|
1183
|
-
|
|
1184
|
-
// ===== PARAGRAPH (Regular) =====
|
|
1185
|
-
<p className="text-lg">18px</p>
|
|
1186
|
-
<p className="text-base">16px</p> {/* MÁS COMÚN */}
|
|
1187
|
-
<p className="text-sm">14px</p>
|
|
1188
|
-
<p className="text-xs">12px</p>
|
|
1189
|
-
```
|
|
1190
|
-
|
|
1191
|
-
### Cheat Sheet: Configuración Tailwind
|
|
1192
|
-
|
|
1193
|
-
```javascript
|
|
1194
|
-
// tailwind.config.js - fontSize
|
|
1195
|
-
fontSize: {
|
|
1196
|
-
// Display
|
|
1197
|
-
'9xl': ['8rem', { lineHeight: '8rem', letterSpacing: '-0.025em', fontWeight: '700' }],
|
|
1198
|
-
'8xl': ['6rem', { lineHeight: '6rem', letterSpacing: '-0.025em', fontWeight: '700' }],
|
|
1199
|
-
'7xl': ['4.5rem', { lineHeight: '4.5rem', letterSpacing: '-0.025em', fontWeight: '700' }],
|
|
1200
|
-
'6xl': ['3.75rem', { lineHeight: '3.75rem', letterSpacing: '-0.025em', fontWeight: '700' }],
|
|
1201
|
-
'5xl': ['3rem', { lineHeight: '3rem', letterSpacing: '-0.025em', fontWeight: '700' }],
|
|
1202
|
-
|
|
1203
|
-
// Heading
|
|
1204
|
-
'4xl': ['2.25rem', { lineHeight: '2.5rem', letterSpacing: '-0.025em', fontWeight: '700' }],
|
|
1205
|
-
'3xl': ['1.875rem', { lineHeight: '2.25rem', letterSpacing: '-0.025em', fontWeight: '700' }],
|
|
1206
|
-
'2xl': ['1.5rem', { lineHeight: '2rem', letterSpacing: '-0.025em', fontWeight: '700' }],
|
|
1207
|
-
'xl': ['1.25rem', { lineHeight: '1.75rem', letterSpacing: '-0.025em', fontWeight: '700' }],
|
|
1208
|
-
|
|
1209
|
-
// Label & Paragraph
|
|
1210
|
-
'lg': ['1.125rem', { lineHeight: '1.75rem' }],
|
|
1211
|
-
'base': ['1rem', { lineHeight: '1.5rem' }],
|
|
1212
|
-
'sm': ['0.875rem', { lineHeight: '1.25rem' }],
|
|
1213
|
-
'xs': ['0.75rem', { lineHeight: '1rem' }],
|
|
1214
|
-
},
|
|
1215
|
-
|
|
1216
|
-
letterSpacing: {
|
|
1217
|
-
'tighter': '-0.025em', // -2.5%
|
|
1218
|
-
},
|
|
1219
|
-
```
|
|
1220
|
-
|
|
1221
|
-
### Cheat Sheet: Componentes del Sistema
|
|
1222
|
-
|
|
1223
|
-
| Componente | Tipografía Usada | Ubicación |
|
|
1224
|
-
|------------|------------------|-----------|
|
|
1225
|
-
| **Button** | Label Small (14px Bold) | Button.tsx:52-58 |
|
|
1226
|
-
| **Input Label** | Label Small/Base (14-16px Bold) | - |
|
|
1227
|
-
| **Input Placeholder** | Paragraph Small (14px Regular) | - |
|
|
1228
|
-
| **Card Title** | Heading Small (24px Bold) | - |
|
|
1229
|
-
| **Badge** | Label Tiny (12px Bold) | - |
|
|
1230
|
-
| **Tooltip** | Paragraph Tiny (12px Regular) | - |
|
|
1231
|
-
|
|
1232
|
-
---
|
|
1233
|
-
|
|
1234
|
-
## Recursos Adicionales
|
|
1235
|
-
|
|
1236
|
-
### Enlaces Útiles
|
|
1237
|
-
|
|
1238
|
-
- **Tailwind Typography**: https://tailwindcss.com/docs/font-size
|
|
1239
|
-
- **WCAG Guidelines**: https://www.w3.org/WAI/WCAG21/quickref/#text-spacing
|
|
1240
|
-
- **Type Scale Calculator**: https://type-scale.com
|
|
1241
|
-
- **Modular Scale**: https://www.modularscale.com
|
|
1242
|
-
|
|
1243
|
-
### Archivos Relacionados
|
|
1244
|
-
|
|
1245
|
-
- `src/index.css` - Declaraciones @font-face (líneas 1-24)
|
|
1246
|
-
- `tailwind.config.js` - Configuración de fontSize (líneas 74-94)
|
|
1247
|
-
- `src/components/Button/Button.tsx` - Ejemplo de uso de Label Small
|
|
1248
|
-
- `docs/colors.md` - Sistema de colores para tipografía
|
|
1249
|
-
- `docs/icons.md` - Sistema de iconos
|
|
1250
|
-
|
|
1251
|
-
### Herramientas de Testing
|
|
1252
|
-
|
|
1253
|
-
```bash
|
|
1254
|
-
# Verificar que las fuentes estén cargando correctamente
|
|
1255
|
-
# En DevTools > Network > Filter: Font
|
|
1256
|
-
|
|
1257
|
-
# Verificar contraste de texto
|
|
1258
|
-
# https://webaim.org/resources/contrastchecker/
|
|
1259
|
-
|
|
1260
|
-
# Verificar legibilidad
|
|
1261
|
-
# https://www.webfx.com/tools/read-able/
|
|
1262
|
-
```
|
|
1263
|
-
|
|
1264
|
-
---
|
|
1265
|
-
|
|
1266
|
-
**Última actualización**: 2025-11-11
|
|
1267
|
-
**Versión**: 1.0.0
|
|
1268
|
-
**Mantenedor**: Siesa UI Kit Team
|
|
1
|
+
# Sistema de Tipografía - Siesa UI Kit
|
|
2
|
+
|
|
3
|
+
## 📋 Tabla de Contenidos
|
|
4
|
+
|
|
5
|
+
1. [Introducción](#introducción)
|
|
6
|
+
2. [Familia Tipográfica](#familia-tipográfica)
|
|
7
|
+
3. [Escala Tipográfica](#escala-tipográfica)
|
|
8
|
+
4. [Display](#display)
|
|
9
|
+
5. [Heading](#heading)
|
|
10
|
+
6. [Label](#label)
|
|
11
|
+
7. [Paragraph](#paragraph)
|
|
12
|
+
8. [Guía de Uso](#guía-de-uso)
|
|
13
|
+
9. [Pesos Tipográficos](#pesos-tipográficos)
|
|
14
|
+
10. [Ejemplos de Código](#ejemplos-de-código)
|
|
15
|
+
11. [Mejores Prácticas](#mejores-prácticas)
|
|
16
|
+
12. [Dark Mode](#dark-mode)
|
|
17
|
+
13. [Referencia Rápida](#referencia-rápida)
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Introducción
|
|
22
|
+
|
|
23
|
+
El sistema tipográfico de Siesa UI Kit está diseñado para proporcionar una jerarquía visual clara y consistente en todas las interfaces. Utilizamos la familia tipográfica personalizada **SiesaBT** con un sistema de escalas bien definido que abarca desde títulos grandes hasta textos pequeños.
|
|
24
|
+
|
|
25
|
+
### Objetivos del Sistema Tipográfico
|
|
26
|
+
|
|
27
|
+
- **Jerarquía Clara**: Escalas bien definidas para organizar la información
|
|
28
|
+
- **Legibilidad**: Tamaños y alturas de línea optimizados para lectura
|
|
29
|
+
- **Consistencia**: Uso uniforme de pesos y estilos en todo el sistema
|
|
30
|
+
- **Flexibilidad**: Escalas adaptables para diferentes contextos
|
|
31
|
+
- **Accesibilidad**: Cumplimiento de estándares WCAG para contraste y tamaño
|
|
32
|
+
|
|
33
|
+
### Principios de Diseño
|
|
34
|
+
|
|
35
|
+
1. **Escalas Semánticas**: Cada escala tiene un propósito claro (Display, Heading, Label, Paragraph)
|
|
36
|
+
2. **Proporciones Armónicas**: Progresión coherente entre tamaños
|
|
37
|
+
3. **Espaciado Vertical**: Line-height optimizado para cada tamaño
|
|
38
|
+
4. **Peso Apropiado**: Bold para títulos y labels, Regular para párrafos
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Familia Tipográfica
|
|
43
|
+
|
|
44
|
+
### SiesaBT
|
|
45
|
+
|
|
46
|
+
**SiesaBT** es la familia tipográfica corporativa de Siesa, diseñada específicamente para reflejar la identidad de marca.
|
|
47
|
+
|
|
48
|
+
#### Pesos Disponibles
|
|
49
|
+
|
|
50
|
+
| Peso | Font-Weight | Archivo | Uso Principal |
|
|
51
|
+
|------|-------------|---------|---------------|
|
|
52
|
+
| **Light** | 300 | SiesaBT-Light.otf | Textos decorativos, énfasis suave |
|
|
53
|
+
| **Regular** | 400 | SiesaBT-Regular.otf | **Párrafos, contenido principal** |
|
|
54
|
+
| **Bold** | 700 | SiesaBT-Bold.otf | **Títulos, labels, botones** |
|
|
55
|
+
|
|
56
|
+
#### Configuración
|
|
57
|
+
|
|
58
|
+
```css
|
|
59
|
+
/* src/index.css */
|
|
60
|
+
@font-face {
|
|
61
|
+
font-family: 'SiesaBT';
|
|
62
|
+
src: url('./assets/fonts/SiesaBT/SiesaBT-Regular.otf') format('opentype');
|
|
63
|
+
font-weight: 400;
|
|
64
|
+
font-style: normal;
|
|
65
|
+
font-display: swap;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
@font-face {
|
|
69
|
+
font-family: 'SiesaBT';
|
|
70
|
+
src: url('./assets/fonts/SiesaBT/SiesaBT-Light.otf') format('opentype');
|
|
71
|
+
font-weight: 300;
|
|
72
|
+
font-style: normal;
|
|
73
|
+
font-display: swap;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@font-face {
|
|
77
|
+
font-family: 'SiesaBT';
|
|
78
|
+
src: url('./assets/fonts/SiesaBT/SiesaBT-Bold.otf') format('opentype');
|
|
79
|
+
font-weight: 700;
|
|
80
|
+
font-style: normal;
|
|
81
|
+
font-display: swap;
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
```javascript
|
|
86
|
+
// tailwind.config.js
|
|
87
|
+
fontFamily: {
|
|
88
|
+
sans: ['SiesaBT', 'Inter', 'sans-serif'],
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
#### Fallbacks
|
|
93
|
+
|
|
94
|
+
- **Primario**: SiesaBT
|
|
95
|
+
- **Secundario**: Inter (sans-serif moderna)
|
|
96
|
+
- **Terciario**: sans-serif (sistema)
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Escala Tipográfica
|
|
101
|
+
|
|
102
|
+
El sistema tipográfico se organiza en **4 categorías semánticas** con **17 escalas totales**:
|
|
103
|
+
|
|
104
|
+
| Categoría | Escalas | Peso | Letter Spacing | Uso |
|
|
105
|
+
|-----------|---------|------|----------------|-----|
|
|
106
|
+
| **Display** | 5 tamaños | Bold (700) | -2.5% | Heros, títulos muy grandes |
|
|
107
|
+
| **Heading** | 4 tamaños | Bold (700) | -2.5% | Títulos de secciones |
|
|
108
|
+
| **Label** | 4 tamaños | Bold (700) | 0% | Labels, botones, badges |
|
|
109
|
+
| **Paragraph** | 4 tamaños | Regular (400) | 0% | Contenido, textos largos |
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## Display
|
|
114
|
+
|
|
115
|
+
**Uso**: Títulos hero, landing pages, banners principales, presentaciones impactantes.
|
|
116
|
+
|
|
117
|
+
**Características**:
|
|
118
|
+
- Font-weight: 700 (Bold)
|
|
119
|
+
- Letter-spacing: -2.5% (tracking más cerrado)
|
|
120
|
+
- Line-height: Igual al font-size (leading compacto)
|
|
121
|
+
|
|
122
|
+
### Escalas Display
|
|
123
|
+
|
|
124
|
+
| Nombre | Tailwind Class | Font Size | Line Height | Tracking | Uso |
|
|
125
|
+
|--------|---------------|-----------|-------------|----------|-----|
|
|
126
|
+
| **Extra Large** | `text-9xl` | 128px (8rem) | 128px (8rem) | -2.5% | Máximo impacto |
|
|
127
|
+
| **Large** | `text-8xl` | 96px (6rem) | 96px (6rem) | -2.5% | Hero sections |
|
|
128
|
+
| **Medium** | `text-7xl` | 72px (4.5rem) | 72px (4.5rem) | -2.5% | Títulos grandes |
|
|
129
|
+
| **Small** | `text-6xl` | 60px (3.75rem) | 60px (3.75rem) | -2.5% | Sub-heros |
|
|
130
|
+
| **Tiny** | `text-5xl` | 48px (3rem) | 48px (3rem) | -2.5% | Títulos medianos |
|
|
131
|
+
|
|
132
|
+
### Código Display
|
|
133
|
+
|
|
134
|
+
```tsx
|
|
135
|
+
// Extra Large Display
|
|
136
|
+
<h1 className="text-9xl font-bold tracking-tighter">
|
|
137
|
+
Bienvenido a Siesa
|
|
138
|
+
</h1>
|
|
139
|
+
|
|
140
|
+
// Large Display
|
|
141
|
+
<h1 className="text-8xl font-bold tracking-tighter">
|
|
142
|
+
Soluciones Empresariales
|
|
143
|
+
</h1>
|
|
144
|
+
|
|
145
|
+
// Medium Display
|
|
146
|
+
<h2 className="text-7xl font-bold tracking-tighter">
|
|
147
|
+
Innovación Digital
|
|
148
|
+
</h2>
|
|
149
|
+
|
|
150
|
+
// Small Display
|
|
151
|
+
<h2 className="text-6xl font-bold tracking-tighter">
|
|
152
|
+
Transformación
|
|
153
|
+
</h2>
|
|
154
|
+
|
|
155
|
+
// Tiny Display
|
|
156
|
+
<h3 className="text-5xl font-bold tracking-tighter">
|
|
157
|
+
Nuevas Funcionalidades
|
|
158
|
+
</h3>
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## Heading
|
|
164
|
+
|
|
165
|
+
**Uso**: Títulos de secciones, encabezados de páginas, títulos de cards, subtítulos importantes.
|
|
166
|
+
|
|
167
|
+
**Características**:
|
|
168
|
+
- Font-weight: 700 (Bold)
|
|
169
|
+
- Letter-spacing: -2.5% (tracking más cerrado)
|
|
170
|
+
- Line-height: Mayor que font-size (mejor legibilidad)
|
|
171
|
+
|
|
172
|
+
### Escalas Heading
|
|
173
|
+
|
|
174
|
+
| Nombre | Tailwind Class | Font Size | Line Height | Tracking | Uso |
|
|
175
|
+
|--------|---------------|-----------|-------------|----------|-----|
|
|
176
|
+
| **Large** | `text-4xl` | 36px (2.25rem) | 40px (2.5rem) | -2.5% | Títulos principales |
|
|
177
|
+
| **Medium** | `text-3xl` | 30px (1.875rem) | 36px (2.25rem) | -2.5% | Títulos secundarios |
|
|
178
|
+
| **Small** | `text-2xl` | 24px (1.5rem) | 32px (2rem) | -2.5% | Subtítulos |
|
|
179
|
+
| **Tiny** | `text-xl` | 20px (1.25rem) | 28px (1.75rem) | -2.5% | Títulos pequeños |
|
|
180
|
+
|
|
181
|
+
### Código Heading
|
|
182
|
+
|
|
183
|
+
```tsx
|
|
184
|
+
// Large Heading - Título de página
|
|
185
|
+
<h1 className="text-4xl font-bold tracking-tighter">
|
|
186
|
+
Panel de Control
|
|
187
|
+
</h1>
|
|
188
|
+
|
|
189
|
+
// Medium Heading - Título de sección
|
|
190
|
+
<h2 className="text-3xl font-bold tracking-tighter">
|
|
191
|
+
Estadísticas del Mes
|
|
192
|
+
</h2>
|
|
193
|
+
|
|
194
|
+
// Small Heading - Título de card
|
|
195
|
+
<h3 className="text-2xl font-bold tracking-tighter">
|
|
196
|
+
Ventas Totales
|
|
197
|
+
</h3>
|
|
198
|
+
|
|
199
|
+
// Tiny Heading - Subtítulo
|
|
200
|
+
<h4 className="text-xl font-bold tracking-tighter">
|
|
201
|
+
Resumen Semanal
|
|
202
|
+
</h4>
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## Label
|
|
208
|
+
|
|
209
|
+
**Uso**: Labels de formularios, texto de botones, badges, tabs, tooltips, texto enfatizado.
|
|
210
|
+
|
|
211
|
+
**Características**:
|
|
212
|
+
- Font-weight: 700 (Bold)
|
|
213
|
+
- Letter-spacing: 0% (tracking normal)
|
|
214
|
+
- Line-height: Proporcionado para buena legibilidad
|
|
215
|
+
|
|
216
|
+
### Escalas Label
|
|
217
|
+
|
|
218
|
+
| Nombre | Tailwind Class | Font Size | Line Height | Tracking | Uso |
|
|
219
|
+
|--------|---------------|-----------|-------------|----------|-----|
|
|
220
|
+
| **Large** | `text-lg font-bold` | 18px (1.125rem) | 28px (1.75rem) | 0% | Labels grandes |
|
|
221
|
+
| **Base** | `text-base font-bold` | 16px (1rem) | 24px (1.5rem) | 0% | Labels estándar |
|
|
222
|
+
| **Small** | `text-sm font-bold` | 14px (0.875rem) | 20px (1.25rem) | 0% | **Labels comunes, botones** |
|
|
223
|
+
| **Tiny** | `text-xs font-bold` | 12px (0.75rem) | 16px (1rem) | 0% | Badges, tags |
|
|
224
|
+
|
|
225
|
+
### Código Label
|
|
226
|
+
|
|
227
|
+
```tsx
|
|
228
|
+
// Large Label
|
|
229
|
+
<label className="text-lg font-bold text-content-primary">
|
|
230
|
+
Nombre del Proyecto
|
|
231
|
+
</label>
|
|
232
|
+
|
|
233
|
+
// Base Label
|
|
234
|
+
<label className="text-base font-bold text-content-primary">
|
|
235
|
+
Correo Electrónico
|
|
236
|
+
</label>
|
|
237
|
+
|
|
238
|
+
// Small Label - MÁS COMÚN en formularios y botones
|
|
239
|
+
<label className="text-sm font-bold text-content-primary">
|
|
240
|
+
Usuario
|
|
241
|
+
</label>
|
|
242
|
+
|
|
243
|
+
// Tiny Label - Badges
|
|
244
|
+
<span className="text-xs font-bold text-primary-custom-600">
|
|
245
|
+
NUEVO
|
|
246
|
+
</span>
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
---
|
|
250
|
+
|
|
251
|
+
## Paragraph
|
|
252
|
+
|
|
253
|
+
**Uso**: Contenido principal, textos descriptivos, párrafos largos, ayudas contextuales.
|
|
254
|
+
|
|
255
|
+
**Características**:
|
|
256
|
+
- Font-weight: 400 (Regular)
|
|
257
|
+
- Letter-spacing: 0% (tracking normal)
|
|
258
|
+
- Line-height: Generoso para facilitar lectura
|
|
259
|
+
|
|
260
|
+
### Escalas Paragraph
|
|
261
|
+
|
|
262
|
+
| Nombre | Tailwind Class | Font Size | Line Height | Tracking | Uso |
|
|
263
|
+
|--------|---------------|-----------|-------------|----------|-----|
|
|
264
|
+
| **Large** | `text-lg` | 18px (1.125rem) | 28px (1.75rem) | 0% | Contenido destacado |
|
|
265
|
+
| **Base** | `text-base` | 16px (1rem) | 24px (1.5rem) | 0% | **Párrafos estándar** |
|
|
266
|
+
| **Small** | `text-sm` | 14px (0.875rem) | 20px (1.25rem) | 0% | Textos secundarios |
|
|
267
|
+
| **Tiny** | `text-xs` | 12px (0.75rem) | 16px (1rem) | 0% | Notas, disclaimers |
|
|
268
|
+
|
|
269
|
+
### Código Paragraph
|
|
270
|
+
|
|
271
|
+
```tsx
|
|
272
|
+
// Large Paragraph - Intro destacada
|
|
273
|
+
<p className="text-lg text-content-primary">
|
|
274
|
+
Bienvenido al sistema de gestión empresarial.
|
|
275
|
+
Esta plataforma te permite administrar todos los aspectos de tu negocio.
|
|
276
|
+
</p>
|
|
277
|
+
|
|
278
|
+
// Base Paragraph - Contenido estándar
|
|
279
|
+
<p className="text-base text-content-primary">
|
|
280
|
+
El panel de control muestra un resumen de las métricas más importantes
|
|
281
|
+
de tu organización en tiempo real.
|
|
282
|
+
</p>
|
|
283
|
+
|
|
284
|
+
// Small Paragraph - Descripción secundaria
|
|
285
|
+
<p className="text-sm text-content-secondary">
|
|
286
|
+
Última actualización: hace 5 minutos
|
|
287
|
+
</p>
|
|
288
|
+
|
|
289
|
+
// Tiny Paragraph - Nota al pie
|
|
290
|
+
<p className="text-xs text-content-tertiary">
|
|
291
|
+
* Los datos se actualizan cada 15 minutos
|
|
292
|
+
</p>
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
297
|
+
## Guía de Uso
|
|
298
|
+
|
|
299
|
+
### Cuándo Usar Cada Categoría
|
|
300
|
+
|
|
301
|
+
#### Display
|
|
302
|
+
- ✅ Landing pages principales
|
|
303
|
+
- ✅ Páginas de marketing
|
|
304
|
+
- ✅ Secciones hero
|
|
305
|
+
- ✅ Presentaciones impactantes
|
|
306
|
+
- ❌ Interfaces de aplicación (demasiado grande)
|
|
307
|
+
- ❌ Dashboards (poco práctico)
|
|
308
|
+
|
|
309
|
+
#### Heading
|
|
310
|
+
- ✅ Títulos de páginas (text-4xl)
|
|
311
|
+
- ✅ Títulos de secciones (text-3xl)
|
|
312
|
+
- ✅ Títulos de cards (text-2xl)
|
|
313
|
+
- ✅ Subtítulos (text-xl)
|
|
314
|
+
- ✅ **Uso más común en aplicaciones**
|
|
315
|
+
|
|
316
|
+
#### Label
|
|
317
|
+
- ✅ Labels de formularios (text-sm o text-base)
|
|
318
|
+
- ✅ Texto de botones (text-sm)
|
|
319
|
+
- ✅ Tabs y navegación
|
|
320
|
+
- ✅ Badges y tags (text-xs)
|
|
321
|
+
- ✅ Tooltips (text-xs o text-sm)
|
|
322
|
+
- ✅ **Siempre usar font-bold**
|
|
323
|
+
|
|
324
|
+
#### Paragraph
|
|
325
|
+
- ✅ Contenido principal (text-base)
|
|
326
|
+
- ✅ Descripciones largas
|
|
327
|
+
- ✅ Textos de ayuda (text-sm)
|
|
328
|
+
- ✅ Notas al pie (text-xs)
|
|
329
|
+
- ✅ **Siempre usar font-normal (Regular)**
|
|
330
|
+
|
|
331
|
+
### Jerarquía Visual Recomendada
|
|
332
|
+
|
|
333
|
+
```tsx
|
|
334
|
+
// Página de Dashboard
|
|
335
|
+
<div className="space-y-6">
|
|
336
|
+
{/* Título Principal - Heading Large */}
|
|
337
|
+
<h1 className="text-4xl font-bold tracking-tighter">
|
|
338
|
+
Dashboard Ejecutivo
|
|
339
|
+
</h1>
|
|
340
|
+
|
|
341
|
+
{/* Sección */}
|
|
342
|
+
<section className="space-y-4">
|
|
343
|
+
{/* Título de Sección - Heading Medium */}
|
|
344
|
+
<h2 className="text-3xl font-bold tracking-tighter">
|
|
345
|
+
Métricas de Ventas
|
|
346
|
+
</h2>
|
|
347
|
+
|
|
348
|
+
{/* Párrafo Descriptivo - Paragraph Base */}
|
|
349
|
+
<p className="text-base text-content-secondary">
|
|
350
|
+
Resumen de las ventas del último mes comparado con el período anterior.
|
|
351
|
+
</p>
|
|
352
|
+
|
|
353
|
+
{/* Card */}
|
|
354
|
+
<div className="border rounded-lg p-4">
|
|
355
|
+
{/* Título de Card - Heading Small */}
|
|
356
|
+
<h3 className="text-2xl font-bold tracking-tighter mb-2">
|
|
357
|
+
Total de Ventas
|
|
358
|
+
</h3>
|
|
359
|
+
|
|
360
|
+
{/* Contenido - Paragraph Small */}
|
|
361
|
+
<p className="text-sm text-content-tertiary">
|
|
362
|
+
Comparado con el mes anterior
|
|
363
|
+
</p>
|
|
364
|
+
</div>
|
|
365
|
+
</section>
|
|
366
|
+
</div>
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
---
|
|
370
|
+
|
|
371
|
+
## Pesos Tipográficos
|
|
372
|
+
|
|
373
|
+
### Mapa de Clases de Peso
|
|
374
|
+
|
|
375
|
+
```tsx
|
|
376
|
+
// Light (300) - Uso limitado
|
|
377
|
+
<p className="font-light">Texto decorativo</p>
|
|
378
|
+
|
|
379
|
+
// Regular (400) - Default para párrafos
|
|
380
|
+
<p className="font-normal">Contenido principal</p>
|
|
381
|
+
|
|
382
|
+
// Bold (700) - Títulos y labels
|
|
383
|
+
<h1 className="font-bold">Título Principal</h1>
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
### Uso Semántico de Pesos
|
|
387
|
+
|
|
388
|
+
| Peso | Clase | Cuándo Usar | Ejemplos |
|
|
389
|
+
|------|-------|-------------|----------|
|
|
390
|
+
| **300** | `font-light` | Decorativo, énfasis suave | Citas, texto hero decorativo |
|
|
391
|
+
| **400** | `font-normal` | **Párrafos, contenido** | Todo el contenido de lectura |
|
|
392
|
+
| **700** | `font-bold` | **Títulos, labels, botones** | H1-H6, labels, botones, badges |
|
|
393
|
+
|
|
394
|
+
### Reglas de Oro
|
|
395
|
+
|
|
396
|
+
1. **Párrafos**: Siempre `font-normal` (Regular 400)
|
|
397
|
+
2. **Títulos**: Siempre `font-bold` (Bold 700)
|
|
398
|
+
3. **Labels**: Siempre `font-bold` (Bold 700)
|
|
399
|
+
4. **Botones**: Siempre `font-bold` (Bold 700)
|
|
400
|
+
5. **Badges/Tags**: Siempre `font-bold` (Bold 700)
|
|
401
|
+
|
|
402
|
+
---
|
|
403
|
+
|
|
404
|
+
## Ejemplos de Código
|
|
405
|
+
|
|
406
|
+
### Ejemplo 1: Formulario Completo
|
|
407
|
+
|
|
408
|
+
```tsx
|
|
409
|
+
import { Input } from '@/components/Input';
|
|
410
|
+
import { Button } from '@/components/Button';
|
|
411
|
+
|
|
412
|
+
export const RegistrationForm = () => {
|
|
413
|
+
return (
|
|
414
|
+
<form className="space-y-6 max-w-md">
|
|
415
|
+
{/* Título - Heading Large */}
|
|
416
|
+
<h1 className="text-4xl font-bold tracking-tighter text-content-primary">
|
|
417
|
+
Crear Cuenta
|
|
418
|
+
</h1>
|
|
419
|
+
|
|
420
|
+
{/* Descripción - Paragraph Base */}
|
|
421
|
+
<p className="text-base text-content-secondary">
|
|
422
|
+
Completa el formulario para registrarte en la plataforma.
|
|
423
|
+
</p>
|
|
424
|
+
|
|
425
|
+
{/* Campo con Label Small */}
|
|
426
|
+
<div className="space-y-2">
|
|
427
|
+
<label className="text-sm font-bold text-content-primary">
|
|
428
|
+
Nombre Completo
|
|
429
|
+
</label>
|
|
430
|
+
<Input placeholder="Juan Pérez" />
|
|
431
|
+
<p className="text-xs text-content-tertiary">
|
|
432
|
+
Ingresa tu nombre como aparece en tu documento
|
|
433
|
+
</p>
|
|
434
|
+
</div>
|
|
435
|
+
|
|
436
|
+
{/* Campo con Label Base */}
|
|
437
|
+
<div className="space-y-2">
|
|
438
|
+
<label className="text-base font-bold text-content-primary">
|
|
439
|
+
Correo Electrónico
|
|
440
|
+
</label>
|
|
441
|
+
<Input type="email" placeholder="correo@ejemplo.com" />
|
|
442
|
+
</div>
|
|
443
|
+
|
|
444
|
+
{/* Botón - Label Small (interno) */}
|
|
445
|
+
<Button type="default" size="base" fullWidth>
|
|
446
|
+
Registrarse
|
|
447
|
+
</Button>
|
|
448
|
+
|
|
449
|
+
{/* Nota al pie - Paragraph Tiny */}
|
|
450
|
+
<p className="text-xs text-content-tertiary">
|
|
451
|
+
Al registrarte, aceptas nuestros términos y condiciones.
|
|
452
|
+
</p>
|
|
453
|
+
</form>
|
|
454
|
+
);
|
|
455
|
+
};
|
|
456
|
+
```
|
|
457
|
+
|
|
458
|
+
### Ejemplo 2: Card de Estadística
|
|
459
|
+
|
|
460
|
+
```tsx
|
|
461
|
+
export const StatCard = ({ title, value, description, trend }) => {
|
|
462
|
+
return (
|
|
463
|
+
<div className="border border-border-primary rounded-lg p-6 space-y-3">
|
|
464
|
+
{/* Título - Heading Small */}
|
|
465
|
+
<h3 className="text-2xl font-bold tracking-tighter text-content-primary">
|
|
466
|
+
{title}
|
|
467
|
+
</h3>
|
|
468
|
+
|
|
469
|
+
{/* Valor Principal - Display Tiny */}
|
|
470
|
+
<p className="text-5xl font-bold tracking-tighter text-primary-custom-600">
|
|
471
|
+
{value}
|
|
472
|
+
</p>
|
|
473
|
+
|
|
474
|
+
{/* Descripción - Paragraph Small */}
|
|
475
|
+
<p className="text-sm text-content-secondary">
|
|
476
|
+
{description}
|
|
477
|
+
</p>
|
|
478
|
+
|
|
479
|
+
{/* Badge - Label Tiny */}
|
|
480
|
+
<span className="inline-flex items-center px-2 py-1 rounded text-xs font-bold bg-green-100 text-green-800">
|
|
481
|
+
{trend}
|
|
482
|
+
</span>
|
|
483
|
+
</div>
|
|
484
|
+
);
|
|
485
|
+
};
|
|
486
|
+
|
|
487
|
+
// Uso
|
|
488
|
+
<StatCard
|
|
489
|
+
title="Ventas Totales"
|
|
490
|
+
value="$125,430"
|
|
491
|
+
description="Este mes"
|
|
492
|
+
trend="+12.5%"
|
|
493
|
+
/>
|
|
494
|
+
```
|
|
495
|
+
|
|
496
|
+
### Ejemplo 3: Hero Section
|
|
497
|
+
|
|
498
|
+
```tsx
|
|
499
|
+
export const HeroSection = () => {
|
|
500
|
+
return (
|
|
501
|
+
<section className="py-20 px-6 text-center space-y-6">
|
|
502
|
+
{/* Título Hero - Display Large */}
|
|
503
|
+
<h1 className="text-8xl font-bold tracking-tighter text-content-primary">
|
|
504
|
+
Siesa Cloud
|
|
505
|
+
</h1>
|
|
506
|
+
|
|
507
|
+
{/* Subtítulo - Heading Large */}
|
|
508
|
+
<h2 className="text-4xl font-bold tracking-tighter text-content-secondary">
|
|
509
|
+
Gestión Empresarial Inteligente
|
|
510
|
+
</h2>
|
|
511
|
+
|
|
512
|
+
{/* Descripción - Paragraph Large */}
|
|
513
|
+
<p className="text-lg text-content-tertiary max-w-2xl mx-auto">
|
|
514
|
+
La plataforma todo-en-uno para administrar tu empresa de manera
|
|
515
|
+
eficiente, con herramientas diseñadas para impulsar tu crecimiento.
|
|
516
|
+
</p>
|
|
517
|
+
|
|
518
|
+
{/* CTAs */}
|
|
519
|
+
<div className="flex gap-4 justify-center">
|
|
520
|
+
<Button type="default" size="l">
|
|
521
|
+
Comenzar Ahora
|
|
522
|
+
</Button>
|
|
523
|
+
<Button type="outline" size="l">
|
|
524
|
+
Ver Demo
|
|
525
|
+
</Button>
|
|
526
|
+
</div>
|
|
527
|
+
|
|
528
|
+
{/* Nota - Paragraph Tiny */}
|
|
529
|
+
<p className="text-xs text-content-tertiary">
|
|
530
|
+
Prueba gratuita de 30 días • No requiere tarjeta de crédito
|
|
531
|
+
</p>
|
|
532
|
+
</section>
|
|
533
|
+
);
|
|
534
|
+
};
|
|
535
|
+
```
|
|
536
|
+
|
|
537
|
+
### Ejemplo 4: Lista de Artículos
|
|
538
|
+
|
|
539
|
+
```tsx
|
|
540
|
+
export const ArticleList = ({ articles }) => {
|
|
541
|
+
return (
|
|
542
|
+
<div className="space-y-8">
|
|
543
|
+
{/* Título de Sección - Heading Large */}
|
|
544
|
+
<h2 className="text-4xl font-bold tracking-tighter text-content-primary">
|
|
545
|
+
Últimas Noticias
|
|
546
|
+
</h2>
|
|
547
|
+
|
|
548
|
+
{articles.map((article) => (
|
|
549
|
+
<article key={article.id} className="border-b pb-6 space-y-3">
|
|
550
|
+
{/* Título del Artículo - Heading Medium */}
|
|
551
|
+
<h3 className="text-3xl font-bold tracking-tighter text-content-primary">
|
|
552
|
+
{article.title}
|
|
553
|
+
</h3>
|
|
554
|
+
|
|
555
|
+
{/* Meta información - Label Tiny */}
|
|
556
|
+
<div className="flex gap-4 text-xs font-bold text-content-tertiary">
|
|
557
|
+
<span>{article.author}</span>
|
|
558
|
+
<span>•</span>
|
|
559
|
+
<span>{article.date}</span>
|
|
560
|
+
<span>•</span>
|
|
561
|
+
<span>{article.readTime} min lectura</span>
|
|
562
|
+
</div>
|
|
563
|
+
|
|
564
|
+
{/* Extracto - Paragraph Base */}
|
|
565
|
+
<p className="text-base text-content-secondary">
|
|
566
|
+
{article.excerpt}
|
|
567
|
+
</p>
|
|
568
|
+
|
|
569
|
+
{/* Categoría - Label Small */}
|
|
570
|
+
<span className="inline-block px-3 py-1 text-sm font-bold text-primary-custom-600 bg-primary-custom-100 rounded">
|
|
571
|
+
{article.category}
|
|
572
|
+
</span>
|
|
573
|
+
</article>
|
|
574
|
+
))}
|
|
575
|
+
</div>
|
|
576
|
+
);
|
|
577
|
+
};
|
|
578
|
+
```
|
|
579
|
+
|
|
580
|
+
---
|
|
581
|
+
|
|
582
|
+
## Mejores Prácticas
|
|
583
|
+
|
|
584
|
+
### ✅ Hacer
|
|
585
|
+
|
|
586
|
+
1. **Usar la escala apropiada para cada contexto**
|
|
587
|
+
```tsx
|
|
588
|
+
// ✅ CORRECTO - Título de página
|
|
589
|
+
<h1 className="text-4xl font-bold tracking-tighter">Dashboard</h1>
|
|
590
|
+
|
|
591
|
+
// ✅ CORRECTO - Contenido
|
|
592
|
+
<p className="text-base text-content-primary">Contenido...</p>
|
|
593
|
+
```
|
|
594
|
+
|
|
595
|
+
2. **Mantener jerarquía visual clara**
|
|
596
|
+
```tsx
|
|
597
|
+
// ✅ CORRECTO - Jerarquía clara
|
|
598
|
+
<h1 className="text-4xl">Título Principal</h1>
|
|
599
|
+
<h2 className="text-3xl">Subtítulo</h2>
|
|
600
|
+
<p className="text-base">Contenido</p>
|
|
601
|
+
```
|
|
602
|
+
|
|
603
|
+
3. **Usar tracking apropiado**
|
|
604
|
+
```tsx
|
|
605
|
+
// ✅ CORRECTO - Display/Heading con tracking-tighter
|
|
606
|
+
<h1 className="text-5xl font-bold tracking-tighter">Hero</h1>
|
|
607
|
+
|
|
608
|
+
// ✅ CORRECTO - Label/Paragraph sin tracking
|
|
609
|
+
<p className="text-base">Contenido normal</p>
|
|
610
|
+
```
|
|
611
|
+
|
|
612
|
+
4. **Combinar con pesos semánticos**
|
|
613
|
+
```tsx
|
|
614
|
+
// ✅ CORRECTO - Bold para títulos
|
|
615
|
+
<h2 className="text-3xl font-bold">Título</h2>
|
|
616
|
+
|
|
617
|
+
// ✅ CORRECTO - Regular para párrafos
|
|
618
|
+
<p className="text-base font-normal">Párrafo</p>
|
|
619
|
+
```
|
|
620
|
+
|
|
621
|
+
5. **Usar colores apropiados**
|
|
622
|
+
```tsx
|
|
623
|
+
// ✅ CORRECTO - Jerarquía de colores
|
|
624
|
+
<h1 className="text-4xl font-bold text-content-primary">Principal</h1>
|
|
625
|
+
<p className="text-base text-content-secondary">Secundario</p>
|
|
626
|
+
<span className="text-sm text-content-tertiary">Terciario</span>
|
|
627
|
+
```
|
|
628
|
+
|
|
629
|
+
### ❌ Evitar
|
|
630
|
+
|
|
631
|
+
1. **No mezclar categorías sin propósito**
|
|
632
|
+
```tsx
|
|
633
|
+
// ❌ INCORRECTO - Display para contenido normal
|
|
634
|
+
<p className="text-7xl">Texto normal</p>
|
|
635
|
+
|
|
636
|
+
// ✅ CORRECTO
|
|
637
|
+
<p className="text-base">Texto normal</p>
|
|
638
|
+
```
|
|
639
|
+
|
|
640
|
+
2. **No omitir font-bold en títulos**
|
|
641
|
+
```tsx
|
|
642
|
+
// ❌ INCORRECTO - Título sin bold
|
|
643
|
+
<h1 className="text-4xl">Título</h1>
|
|
644
|
+
|
|
645
|
+
// ✅ CORRECTO
|
|
646
|
+
<h1 className="text-4xl font-bold">Título</h1>
|
|
647
|
+
```
|
|
648
|
+
|
|
649
|
+
3. **No usar bold en párrafos largos**
|
|
650
|
+
```tsx
|
|
651
|
+
// ❌ INCORRECTO - Párrafo en bold
|
|
652
|
+
<p className="text-base font-bold">
|
|
653
|
+
Este es un párrafo muy largo que se vuelve
|
|
654
|
+
difícil de leer cuando está en negrita...
|
|
655
|
+
</p>
|
|
656
|
+
|
|
657
|
+
// ✅ CORRECTO
|
|
658
|
+
<p className="text-base">Contenido legible...</p>
|
|
659
|
+
```
|
|
660
|
+
|
|
661
|
+
4. **No saltar demasiados niveles de jerarquía**
|
|
662
|
+
```tsx
|
|
663
|
+
// ❌ INCORRECTO - Salto abrupto
|
|
664
|
+
<h1 className="text-8xl">Hero</h1>
|
|
665
|
+
<p className="text-xs">Texto diminuto</p>
|
|
666
|
+
|
|
667
|
+
// ✅ CORRECTO - Transición gradual
|
|
668
|
+
<h1 className="text-8xl">Hero</h1>
|
|
669
|
+
<h2 className="text-4xl">Subtítulo</h2>
|
|
670
|
+
<p className="text-base">Contenido</p>
|
|
671
|
+
```
|
|
672
|
+
|
|
673
|
+
5. **No usar Display en UI de aplicación**
|
|
674
|
+
```tsx
|
|
675
|
+
// ❌ INCORRECTO - Display en dashboard
|
|
676
|
+
<h1 className="text-9xl">Dashboard</h1>
|
|
677
|
+
|
|
678
|
+
// ✅ CORRECTO - Heading en dashboard
|
|
679
|
+
<h1 className="text-4xl font-bold tracking-tighter">Dashboard</h1>
|
|
680
|
+
```
|
|
681
|
+
|
|
682
|
+
### Accesibilidad
|
|
683
|
+
|
|
684
|
+
1. **Tamaño mínimo para contenido**: text-sm (14px) o mayor
|
|
685
|
+
2. **Contraste**: Usar colores con contraste WCAG AA mínimo (4.5:1)
|
|
686
|
+
3. **Jerarquía HTML**: Usar etiquetas semánticas (h1-h6, p, etc.)
|
|
687
|
+
4. **Responsive**: Ajustar tamaños en móviles
|
|
688
|
+
|
|
689
|
+
```tsx
|
|
690
|
+
// ✅ CORRECTO - Responsive
|
|
691
|
+
<h1 className="text-3xl md:text-4xl lg:text-5xl font-bold">
|
|
692
|
+
Título Adaptable
|
|
693
|
+
</h1>
|
|
694
|
+
|
|
695
|
+
// ✅ CORRECTO - Contraste
|
|
696
|
+
<p className="text-base text-content-primary"> {/* #18181b - buen contraste */}
|
|
697
|
+
Contenido legible
|
|
698
|
+
</p>
|
|
699
|
+
```
|
|
700
|
+
|
|
701
|
+
### Performance
|
|
702
|
+
|
|
703
|
+
1. **Font-display: swap**: Ya configurado en @font-face
|
|
704
|
+
2. **Preload fonts**: Considerar para fonts críticos
|
|
705
|
+
3. **Subset fonts**: Solo caracteres necesarios (español)
|
|
706
|
+
|
|
707
|
+
```html
|
|
708
|
+
<!-- Preload font crítico -->
|
|
709
|
+
<link
|
|
710
|
+
rel="preload"
|
|
711
|
+
href="/src/assets/fonts/SiesaBT/SiesaBT-Bold.otf"
|
|
712
|
+
as="font"
|
|
713
|
+
type="font/otf"
|
|
714
|
+
crossorigin
|
|
715
|
+
/>
|
|
716
|
+
```
|
|
717
|
+
|
|
718
|
+
---
|
|
719
|
+
|
|
720
|
+
## Dark Mode
|
|
721
|
+
|
|
722
|
+
La tipografía en dark mode mantiene las mismas escalas y pesos, pero es importante ajustar el contraste visual para garantizar la legibilidad en fondos oscuros.
|
|
723
|
+
|
|
724
|
+
### Configuración de Tailwind CSS
|
|
725
|
+
|
|
726
|
+
El modo oscuro en Siesa UI Kit se basa en la estrategia de clases de Tailwind CSS:
|
|
727
|
+
|
|
728
|
+
```javascript
|
|
729
|
+
// tailwind.config.js
|
|
730
|
+
module.exports = {
|
|
731
|
+
darkMode: 'class', // ✅ Estrategia basada en clases (NO 'media')
|
|
732
|
+
// ...resto de la configuración
|
|
733
|
+
}
|
|
734
|
+
```
|
|
735
|
+
|
|
736
|
+
Con esta configuración, el modo oscuro se activa añadiendo la clase `.dark` al elemento `<html>`:
|
|
737
|
+
|
|
738
|
+
```html
|
|
739
|
+
<!-- Modo claro -->
|
|
740
|
+
<html>
|
|
741
|
+
<body>
|
|
742
|
+
<!-- Contenido en modo claro -->
|
|
743
|
+
</body>
|
|
744
|
+
</html>
|
|
745
|
+
|
|
746
|
+
<!-- Modo oscuro -->
|
|
747
|
+
<html class="dark">
|
|
748
|
+
<body>
|
|
749
|
+
<!-- Contenido en modo oscuro -->
|
|
750
|
+
</body>
|
|
751
|
+
</html>
|
|
752
|
+
```
|
|
753
|
+
|
|
754
|
+
### El Modificador `dark:`
|
|
755
|
+
|
|
756
|
+
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>`).
|
|
757
|
+
|
|
758
|
+
#### Sintaxis Básica
|
|
759
|
+
|
|
760
|
+
```tsx
|
|
761
|
+
// Patrón básico para texto
|
|
762
|
+
<h1 className="text-content-primary dark:text-dark-content-primary">
|
|
763
|
+
Título adaptable
|
|
764
|
+
</h1>
|
|
765
|
+
|
|
766
|
+
// El título usa:
|
|
767
|
+
// - text-content-primary (#18181b - casi negro) en modo claro
|
|
768
|
+
// - text-dark-content-primary (#ffffff - blanco) en modo oscuro
|
|
769
|
+
```
|
|
770
|
+
|
|
771
|
+
### Colores de Texto en Dark Mode
|
|
772
|
+
|
|
773
|
+
```tsx
|
|
774
|
+
// Texto principal en dark mode
|
|
775
|
+
<p className="text-content-primary dark:text-dark-content-primary">
|
|
776
|
+
Texto que se adapta automáticamente
|
|
777
|
+
</p>
|
|
778
|
+
|
|
779
|
+
// Usando colores personalizados para dark mode
|
|
780
|
+
<h1 className="text-content-primary dark:text-dark-content-primary">
|
|
781
|
+
#18181b en light → #93d1fd en dark
|
|
782
|
+
</h1>
|
|
783
|
+
|
|
784
|
+
// Texto secundario
|
|
785
|
+
<p className="text-content-secondary dark:text-content-secondary">
|
|
786
|
+
Texto secundario adaptable (#a1a1aa en ambos modos)
|
|
787
|
+
</p>
|
|
788
|
+
|
|
789
|
+
// Texto terciario
|
|
790
|
+
<span className="text-content-tertiary dark:text-content-tertiary">
|
|
791
|
+
Placeholders y hints (#71717a en ambos modos)
|
|
792
|
+
</span>
|
|
793
|
+
```
|
|
794
|
+
|
|
795
|
+
### Combinando con Otros Modificadores
|
|
796
|
+
|
|
797
|
+
El modificador `dark:` se puede combinar con hover, focus, y responsive:
|
|
798
|
+
|
|
799
|
+
```tsx
|
|
800
|
+
// Dark mode + Hover
|
|
801
|
+
<a className="
|
|
802
|
+
text-primary-custom-600 hover:text-primary-custom-500
|
|
803
|
+
dark:text-blue-400 dark:hover:text-blue-300
|
|
804
|
+
">
|
|
805
|
+
Enlace con hover
|
|
806
|
+
</a>
|
|
807
|
+
|
|
808
|
+
// Dark mode + Focus
|
|
809
|
+
<button className="
|
|
810
|
+
text-content-primary focus:text-primary-custom-600
|
|
811
|
+
dark:text-dark-content-primary dark:focus:text-blue-400
|
|
812
|
+
">
|
|
813
|
+
Botón con focus
|
|
814
|
+
</button>
|
|
815
|
+
|
|
816
|
+
// Dark mode + Responsive
|
|
817
|
+
<h1 className="
|
|
818
|
+
text-3xl md:text-4xl lg:text-5xl
|
|
819
|
+
text-content-primary
|
|
820
|
+
dark:text-dark-content-primary
|
|
821
|
+
">
|
|
822
|
+
Título responsive y adaptable
|
|
823
|
+
</h1>
|
|
824
|
+
|
|
825
|
+
// Dark mode + Group hover
|
|
826
|
+
<div className="group">
|
|
827
|
+
<h3 className="
|
|
828
|
+
text-content-primary
|
|
829
|
+
group-hover:text-primary-custom-600
|
|
830
|
+
dark:text-dark-content-primary
|
|
831
|
+
dark:group-hover:text-blue-400
|
|
832
|
+
">
|
|
833
|
+
Título que cambia al hover del grupo
|
|
834
|
+
</h3>
|
|
835
|
+
</div>
|
|
836
|
+
```
|
|
837
|
+
|
|
838
|
+
### Orden de Modificadores
|
|
839
|
+
|
|
840
|
+
Tailwind CSS recomienda un orden específico para los modificadores:
|
|
841
|
+
|
|
842
|
+
**Formato**: `{responsive}:{dark}:{state}:{utility}`
|
|
843
|
+
|
|
844
|
+
```tsx
|
|
845
|
+
// ✅ CORRECTO - Orden: responsive → dark → state → utility
|
|
846
|
+
<h1 className="
|
|
847
|
+
text-3xl
|
|
848
|
+
md:text-4xl
|
|
849
|
+
md:dark:text-dark-content-primary
|
|
850
|
+
md:dark:hover:text-blue-400
|
|
851
|
+
">
|
|
852
|
+
Título con orden correcto
|
|
853
|
+
</h1>
|
|
854
|
+
|
|
855
|
+
// ❌ INCORRECTO - Orden equivocado
|
|
856
|
+
<h1 className="
|
|
857
|
+
dark:md:hover:text-blue-400
|
|
858
|
+
">
|
|
859
|
+
Orden confuso
|
|
860
|
+
</h1>
|
|
861
|
+
```
|
|
862
|
+
|
|
863
|
+
### Tabla de Colores de Texto por Estado
|
|
864
|
+
|
|
865
|
+
| Estado | Light Mode | Dark Mode | Descripción |
|
|
866
|
+
|--------|------------|-----------|-------------|
|
|
867
|
+
| **Texto Principal** | `text-content-primary` (#18181b) | `dark:text-dark-content-primary` (#ffffff) | Títulos y contenido principal |
|
|
868
|
+
| **Texto Secundario** | `text-content-secondary` (#a1a1aa) | `dark:text-content-secondary` (#a1a1aa) | Descripciones, metadata |
|
|
869
|
+
| **Texto Terciario** | `text-content-tertiary` (#71717a) | `dark:text-content-tertiary` (#71717a) | Placeholders, hints |
|
|
870
|
+
| **Enlaces** | `text-primary-custom-600` (#0e79fd) | `dark:text-blue-400` | Enlaces y CTAs |
|
|
871
|
+
| **Enlaces Hover** | `hover:text-primary-custom-500` | `dark:hover:text-blue-300` | Estado hover de enlaces |
|
|
872
|
+
| **Texto Deshabilitado** | `text-content-tertiary opacity-50` | `dark:text-dark-content-tertiary opacity-50` | Elementos inactivos |
|
|
873
|
+
|
|
874
|
+
### Implementación del Toggle Dark Mode
|
|
875
|
+
|
|
876
|
+
#### Script de Inicialización (Prevenir FOUC)
|
|
877
|
+
|
|
878
|
+
```html
|
|
879
|
+
<!-- index.html - En el <head> antes de cargar React -->
|
|
880
|
+
<head>
|
|
881
|
+
<script>
|
|
882
|
+
// Aplicar tema inmediatamente antes del render
|
|
883
|
+
(function() {
|
|
884
|
+
const theme = localStorage.getItem('theme');
|
|
885
|
+
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
|
886
|
+
|
|
887
|
+
if (theme === 'dark' || (!theme && prefersDark)) {
|
|
888
|
+
document.documentElement.classList.add('dark');
|
|
889
|
+
}
|
|
890
|
+
})();
|
|
891
|
+
</script>
|
|
892
|
+
</head>
|
|
893
|
+
```
|
|
894
|
+
|
|
895
|
+
#### Toggle Component
|
|
896
|
+
|
|
897
|
+
```tsx
|
|
898
|
+
import { useState, useEffect } from 'react';
|
|
899
|
+
|
|
900
|
+
export const DarkModeToggle = () => {
|
|
901
|
+
const [darkMode, setDarkMode] = useState(false);
|
|
902
|
+
|
|
903
|
+
useEffect(() => {
|
|
904
|
+
// Leer preferencia del usuario
|
|
905
|
+
const isDark = localStorage.getItem('theme') === 'dark';
|
|
906
|
+
setDarkMode(isDark);
|
|
907
|
+
|
|
908
|
+
if (isDark) {
|
|
909
|
+
document.documentElement.classList.add('dark');
|
|
910
|
+
}
|
|
911
|
+
}, []);
|
|
912
|
+
|
|
913
|
+
const toggleDarkMode = () => {
|
|
914
|
+
const newDarkMode = !darkMode;
|
|
915
|
+
setDarkMode(newDarkMode);
|
|
916
|
+
|
|
917
|
+
// Guardar preferencia
|
|
918
|
+
localStorage.setItem('theme', newDarkMode ? 'dark' : 'light');
|
|
919
|
+
|
|
920
|
+
// Aplicar clase
|
|
921
|
+
if (newDarkMode) {
|
|
922
|
+
document.documentElement.classList.add('dark');
|
|
923
|
+
} else {
|
|
924
|
+
document.documentElement.classList.remove('dark');
|
|
925
|
+
}
|
|
926
|
+
};
|
|
927
|
+
|
|
928
|
+
return (
|
|
929
|
+
<button
|
|
930
|
+
onClick={toggleDarkMode}
|
|
931
|
+
className="
|
|
932
|
+
p-2 rounded-md
|
|
933
|
+
border border-border-primary dark:border-dark-border-primary
|
|
934
|
+
hover:bg-background-secondary dark:hover:bg-dark-bg-primary
|
|
935
|
+
text-sm font-bold
|
|
936
|
+
"
|
|
937
|
+
aria-label="Toggle dark mode"
|
|
938
|
+
>
|
|
939
|
+
{darkMode ? '☀️ Light' : '🌙 Dark'}
|
|
940
|
+
</button>
|
|
941
|
+
);
|
|
942
|
+
};
|
|
943
|
+
```
|
|
944
|
+
|
|
945
|
+
### Mejores Prácticas para Dark Mode
|
|
946
|
+
|
|
947
|
+
#### 1. Contraste Adecuado
|
|
948
|
+
|
|
949
|
+
```tsx
|
|
950
|
+
// ✅ CORRECTO - Buen contraste en ambos modos
|
|
951
|
+
<div className="bg-white dark:bg-dark-bg-primary">
|
|
952
|
+
<h1 className="text-content-primary dark:text-dark-content-primary font-bold text-4xl">
|
|
953
|
+
Título legible
|
|
954
|
+
</h1>
|
|
955
|
+
<p className="text-content-secondary dark:text-content-secondary">
|
|
956
|
+
Contenido secundario con buen contraste
|
|
957
|
+
</p>
|
|
958
|
+
</div>
|
|
959
|
+
|
|
960
|
+
// ❌ INCORRECTO - Mismo color en ambos modos
|
|
961
|
+
<h1 className="text-gray-900 font-bold">
|
|
962
|
+
Difícil de leer en dark mode
|
|
963
|
+
</h1>
|
|
964
|
+
```
|
|
965
|
+
|
|
966
|
+
#### 2. Uso de Tokens de Color
|
|
967
|
+
|
|
968
|
+
```tsx
|
|
969
|
+
// ✅ CORRECTO - Usar tokens del sistema que se adaptan
|
|
970
|
+
<article>
|
|
971
|
+
<h2 className="text-content-primary dark:text-dark-content-primary font-bold text-2xl mb-4">
|
|
972
|
+
Título del Artículo
|
|
973
|
+
</h2>
|
|
974
|
+
<p className="text-content-primary dark:text-dark-content-primary mb-4">
|
|
975
|
+
Contenido principal que se adapta automáticamente al modo oscuro.
|
|
976
|
+
</p>
|
|
977
|
+
<p className="text-content-secondary dark:text-content-secondary text-sm">
|
|
978
|
+
Metadata o texto secundario
|
|
979
|
+
</p>
|
|
980
|
+
</article>
|
|
981
|
+
|
|
982
|
+
// ❌ INCORRECTO - Colores hardcodeados
|
|
983
|
+
<article>
|
|
984
|
+
<h2 className="text-black font-bold text-2xl">Título</h2>
|
|
985
|
+
<p className="text-gray-900">Contenido</p>
|
|
986
|
+
</article>
|
|
987
|
+
```
|
|
988
|
+
|
|
989
|
+
#### 3. Fondos con Texto
|
|
990
|
+
|
|
991
|
+
```tsx
|
|
992
|
+
// ✅ CORRECTO - Fondo y texto se adaptan
|
|
993
|
+
<div className="bg-bg-primary dark:bg-dark-bg-primary p-6 rounded-2xl">
|
|
994
|
+
<h3 className="text-content-primary dark:text-dark-content-primary font-bold">
|
|
995
|
+
Card Title
|
|
996
|
+
</h3>
|
|
997
|
+
<p className="text-content-secondary dark:text-content-secondary">
|
|
998
|
+
Card description
|
|
999
|
+
</p>
|
|
1000
|
+
</div>
|
|
1001
|
+
|
|
1002
|
+
// Para botones primarios con fondo custom
|
|
1003
|
+
<button className="bg-primary-custom-600 dark:bg-dark-bg-inverse text-primary-inverse-content dark:text-dark-content-inverse px-4 py-2 rounded-md font-bold text-sm">
|
|
1004
|
+
Primary Button
|
|
1005
|
+
</button>
|
|
1006
|
+
```
|
|
1007
|
+
|
|
1008
|
+
#### 4. Consistencia en Componentes
|
|
1009
|
+
|
|
1010
|
+
```tsx
|
|
1011
|
+
// ✅ CORRECTO - Componente que funciona en ambos modos
|
|
1012
|
+
export const Card = ({ title, description }) => {
|
|
1013
|
+
return (
|
|
1014
|
+
<div className="bg-white dark:bg-dark-bg-primary border border-border-primary dark:border-dark-border-primary rounded-2xl p-6">
|
|
1015
|
+
<h3 className="text-content-primary dark:text-dark-content-primary font-bold text-xl mb-2">
|
|
1016
|
+
{title}
|
|
1017
|
+
</h3>
|
|
1018
|
+
<p className="text-content-secondary dark:text-content-secondary">
|
|
1019
|
+
{description}
|
|
1020
|
+
</p>
|
|
1021
|
+
</div>
|
|
1022
|
+
);
|
|
1023
|
+
};
|
|
1024
|
+
```
|
|
1025
|
+
|
|
1026
|
+
### Ejemplo Completo: Hero Section con Dark Mode
|
|
1027
|
+
|
|
1028
|
+
```tsx
|
|
1029
|
+
export const HeroWithDarkMode = () => {
|
|
1030
|
+
return (
|
|
1031
|
+
<section className="bg-bg-primary dark:bg-dark-bg-primary px-6 py-16 md:py-24">
|
|
1032
|
+
<div className="max-w-4xl mx-auto text-center">
|
|
1033
|
+
{/* Hero title */}
|
|
1034
|
+
<h1 className="text-content-primary dark:text-dark-content-primary font-bold text-5xl md:text-7xl tracking-tighter mb-6">
|
|
1035
|
+
Bienvenido a Siesa UI Kit
|
|
1036
|
+
</h1>
|
|
1037
|
+
|
|
1038
|
+
{/* Hero description */}
|
|
1039
|
+
<p className="text-content-secondary dark:text-content-secondary text-lg md:text-xl mb-8 max-w-2xl mx-auto">
|
|
1040
|
+
Un sistema de diseño moderno y completo con soporte nativo para
|
|
1041
|
+
dark mode. Crea interfaces hermosas que funcionan en cualquier modo.
|
|
1042
|
+
</p>
|
|
1043
|
+
|
|
1044
|
+
{/* CTA buttons */}
|
|
1045
|
+
<div className="flex gap-4 justify-center">
|
|
1046
|
+
<button className="bg-primary-custom-600 dark:bg-dark-bg-inverse text-primary-inverse-content dark:text-dark-content-inverse px-6 py-3 rounded-md font-bold">
|
|
1047
|
+
Comenzar
|
|
1048
|
+
</button>
|
|
1049
|
+
<button className="border border-border-primary dark:border-dark-border-custom text-content-primary dark:text-dark-content-primary px-6 py-3 rounded-md font-bold hover:bg-background-secondary dark:hover:bg-dark-bg-primary">
|
|
1050
|
+
Documentación
|
|
1051
|
+
</button>
|
|
1052
|
+
</div>
|
|
1053
|
+
|
|
1054
|
+
{/* Feature list */}
|
|
1055
|
+
<div className="mt-16 grid grid-cols-1 md:grid-cols-3 gap-6">
|
|
1056
|
+
{[
|
|
1057
|
+
{ title: 'Tipografía Escalable', desc: '17 escalas de texto' },
|
|
1058
|
+
{ title: 'Dark Mode Nativo', desc: 'Soporte completo' },
|
|
1059
|
+
{ title: 'Accessible', desc: 'WCAG 2.1 AAA' },
|
|
1060
|
+
].map((feature) => (
|
|
1061
|
+
<div key={feature.title} className="p-6 border border-border-primary dark:border-dark-border-primary rounded-2xl bg-white dark:bg-dark-bg-primary">
|
|
1062
|
+
<h3 className="text-content-primary dark:text-dark-content-primary font-bold text-lg mb-2">
|
|
1063
|
+
{feature.title}
|
|
1064
|
+
</h3>
|
|
1065
|
+
<p className="text-content-secondary dark:text-content-secondary text-sm">
|
|
1066
|
+
{feature.desc}
|
|
1067
|
+
</p>
|
|
1068
|
+
</div>
|
|
1069
|
+
))}
|
|
1070
|
+
</div>
|
|
1071
|
+
</div>
|
|
1072
|
+
</section>
|
|
1073
|
+
);
|
|
1074
|
+
};
|
|
1075
|
+
```
|
|
1076
|
+
|
|
1077
|
+
### Toggle de Dark Mode
|
|
1078
|
+
|
|
1079
|
+
```tsx
|
|
1080
|
+
import { useState, useEffect } from 'react';
|
|
1081
|
+
|
|
1082
|
+
export const DarkModeToggle = () => {
|
|
1083
|
+
const [darkMode, setDarkMode] = useState(false);
|
|
1084
|
+
|
|
1085
|
+
useEffect(() => {
|
|
1086
|
+
// Leer preferencia del usuario
|
|
1087
|
+
const isDark = localStorage.getItem('darkMode') === 'true';
|
|
1088
|
+
setDarkMode(isDark);
|
|
1089
|
+
|
|
1090
|
+
if (isDark) {
|
|
1091
|
+
document.documentElement.classList.add('dark');
|
|
1092
|
+
}
|
|
1093
|
+
}, []);
|
|
1094
|
+
|
|
1095
|
+
const toggleDarkMode = () => {
|
|
1096
|
+
const newDarkMode = !darkMode;
|
|
1097
|
+
setDarkMode(newDarkMode);
|
|
1098
|
+
|
|
1099
|
+
// Guardar preferencia
|
|
1100
|
+
localStorage.setItem('darkMode', String(newDarkMode));
|
|
1101
|
+
|
|
1102
|
+
// Aplicar clase
|
|
1103
|
+
if (newDarkMode) {
|
|
1104
|
+
document.documentElement.classList.add('dark');
|
|
1105
|
+
} else {
|
|
1106
|
+
document.documentElement.classList.remove('dark');
|
|
1107
|
+
}
|
|
1108
|
+
};
|
|
1109
|
+
|
|
1110
|
+
return (
|
|
1111
|
+
<button
|
|
1112
|
+
onClick={toggleDarkMode}
|
|
1113
|
+
className="p-2 rounded-md border border-border-primary dark:border-dark-border-primary hover:bg-background-secondary dark:hover:bg-dark-bg-primary"
|
|
1114
|
+
aria-label="Toggle dark mode"
|
|
1115
|
+
>
|
|
1116
|
+
{darkMode ? '☀️' : '🌙'}
|
|
1117
|
+
</button>
|
|
1118
|
+
);
|
|
1119
|
+
};
|
|
1120
|
+
```
|
|
1121
|
+
|
|
1122
|
+
### Tokens de Color para Tipografía
|
|
1123
|
+
|
|
1124
|
+
Referencia rápida de colores de texto para dark mode:
|
|
1125
|
+
|
|
1126
|
+
| Token Light | Hex Light | Token Dark | Hex Dark | Uso |
|
|
1127
|
+
|-------------|-----------|------------|----------|-----|
|
|
1128
|
+
| `text-content-primary` | `#18181b` | `dark:text-dark-content-primary` | `#93d1fd` | Texto principal |
|
|
1129
|
+
| `text-content-secondary` | `#a1a1aa` | `dark:text-content-secondary` | `#a1a1aa` | Texto secundario |
|
|
1130
|
+
| `text-content-tertiary` | `#71717a` | `dark:text-content-tertiary` | `#71717a` | Placeholders, hints |
|
|
1131
|
+
| `text-primary-custom-600` | `#0e79fd` | `dark:text-dark-content-primary` | `#93d1fd` | Enlaces, CTA text |
|
|
1132
|
+
|
|
1133
|
+
### Recursos Adicionales sobre Dark Mode
|
|
1134
|
+
|
|
1135
|
+
Para más información sobre el modo oscuro:
|
|
1136
|
+
- Ver `docs/dark-mode-guide.md` - Guía completa de Dark Mode en Tailwind CSS
|
|
1137
|
+
- Ver `docs/colors.md` - Sistema de colores completo con tokens dark mode
|
|
1138
|
+
- Ver `docs/icons.md` - Sistema de iconos con ejemplos de dark mode
|
|
1139
|
+
- [Documentación oficial de Tailwind Dark Mode](https://tailwindcss.com/docs/dark-mode)
|
|
1140
|
+
|
|
1141
|
+
---
|
|
1142
|
+
|
|
1143
|
+
## Referencia Rápida
|
|
1144
|
+
|
|
1145
|
+
### Cheat Sheet: Escalas por Contexto
|
|
1146
|
+
|
|
1147
|
+
| Contexto | Clase Recomendada | Font-Weight |
|
|
1148
|
+
|----------|-------------------|-------------|
|
|
1149
|
+
| **Hero principal** | `text-8xl font-bold tracking-tighter` | 700 |
|
|
1150
|
+
| **Título de página** | `text-4xl font-bold tracking-tighter` | 700 |
|
|
1151
|
+
| **Título de sección** | `text-3xl font-bold tracking-tighter` | 700 |
|
|
1152
|
+
| **Título de card** | `text-2xl font-bold tracking-tighter` | 700 |
|
|
1153
|
+
| **Subtítulo** | `text-xl font-bold tracking-tighter` | 700 |
|
|
1154
|
+
| **Label de formulario** | `text-sm font-bold` o `text-base font-bold` | 700 |
|
|
1155
|
+
| **Texto de botón** | `text-sm font-bold` | 700 |
|
|
1156
|
+
| **Badge/Tag** | `text-xs font-bold` | 700 |
|
|
1157
|
+
| **Contenido principal** | `text-base` | 400 |
|
|
1158
|
+
| **Contenido destacado** | `text-lg` | 400 |
|
|
1159
|
+
| **Texto secundario** | `text-sm text-content-secondary` | 400 |
|
|
1160
|
+
| **Nota al pie** | `text-xs text-content-tertiary` | 400 |
|
|
1161
|
+
|
|
1162
|
+
### Cheat Sheet: Todas las Escalas
|
|
1163
|
+
|
|
1164
|
+
```tsx
|
|
1165
|
+
// ===== DISPLAY (Bold + tracking-tighter) =====
|
|
1166
|
+
<h1 className="text-9xl font-bold tracking-tighter">128px</h1>
|
|
1167
|
+
<h1 className="text-8xl font-bold tracking-tighter">96px</h1>
|
|
1168
|
+
<h1 className="text-7xl font-bold tracking-tighter">72px</h1>
|
|
1169
|
+
<h1 className="text-6xl font-bold tracking-tighter">60px</h1>
|
|
1170
|
+
<h1 className="text-5xl font-bold tracking-tighter">48px</h1>
|
|
1171
|
+
|
|
1172
|
+
// ===== HEADING (Bold + tracking-tighter) =====
|
|
1173
|
+
<h1 className="text-4xl font-bold tracking-tighter">36px</h1>
|
|
1174
|
+
<h2 className="text-3xl font-bold tracking-tighter">30px</h2>
|
|
1175
|
+
<h3 className="text-2xl font-bold tracking-tighter">24px</h3>
|
|
1176
|
+
<h4 className="text-xl font-bold tracking-tighter">20px</h4>
|
|
1177
|
+
|
|
1178
|
+
// ===== LABEL (Bold) =====
|
|
1179
|
+
<label className="text-lg font-bold">18px</label>
|
|
1180
|
+
<label className="text-base font-bold">16px</label>
|
|
1181
|
+
<label className="text-sm font-bold">14px</label> {/* MÁS COMÚN */}
|
|
1182
|
+
<span className="text-xs font-bold">12px</span>
|
|
1183
|
+
|
|
1184
|
+
// ===== PARAGRAPH (Regular) =====
|
|
1185
|
+
<p className="text-lg">18px</p>
|
|
1186
|
+
<p className="text-base">16px</p> {/* MÁS COMÚN */}
|
|
1187
|
+
<p className="text-sm">14px</p>
|
|
1188
|
+
<p className="text-xs">12px</p>
|
|
1189
|
+
```
|
|
1190
|
+
|
|
1191
|
+
### Cheat Sheet: Configuración Tailwind
|
|
1192
|
+
|
|
1193
|
+
```javascript
|
|
1194
|
+
// tailwind.config.js - fontSize
|
|
1195
|
+
fontSize: {
|
|
1196
|
+
// Display
|
|
1197
|
+
'9xl': ['8rem', { lineHeight: '8rem', letterSpacing: '-0.025em', fontWeight: '700' }],
|
|
1198
|
+
'8xl': ['6rem', { lineHeight: '6rem', letterSpacing: '-0.025em', fontWeight: '700' }],
|
|
1199
|
+
'7xl': ['4.5rem', { lineHeight: '4.5rem', letterSpacing: '-0.025em', fontWeight: '700' }],
|
|
1200
|
+
'6xl': ['3.75rem', { lineHeight: '3.75rem', letterSpacing: '-0.025em', fontWeight: '700' }],
|
|
1201
|
+
'5xl': ['3rem', { lineHeight: '3rem', letterSpacing: '-0.025em', fontWeight: '700' }],
|
|
1202
|
+
|
|
1203
|
+
// Heading
|
|
1204
|
+
'4xl': ['2.25rem', { lineHeight: '2.5rem', letterSpacing: '-0.025em', fontWeight: '700' }],
|
|
1205
|
+
'3xl': ['1.875rem', { lineHeight: '2.25rem', letterSpacing: '-0.025em', fontWeight: '700' }],
|
|
1206
|
+
'2xl': ['1.5rem', { lineHeight: '2rem', letterSpacing: '-0.025em', fontWeight: '700' }],
|
|
1207
|
+
'xl': ['1.25rem', { lineHeight: '1.75rem', letterSpacing: '-0.025em', fontWeight: '700' }],
|
|
1208
|
+
|
|
1209
|
+
// Label & Paragraph
|
|
1210
|
+
'lg': ['1.125rem', { lineHeight: '1.75rem' }],
|
|
1211
|
+
'base': ['1rem', { lineHeight: '1.5rem' }],
|
|
1212
|
+
'sm': ['0.875rem', { lineHeight: '1.25rem' }],
|
|
1213
|
+
'xs': ['0.75rem', { lineHeight: '1rem' }],
|
|
1214
|
+
},
|
|
1215
|
+
|
|
1216
|
+
letterSpacing: {
|
|
1217
|
+
'tighter': '-0.025em', // -2.5%
|
|
1218
|
+
},
|
|
1219
|
+
```
|
|
1220
|
+
|
|
1221
|
+
### Cheat Sheet: Componentes del Sistema
|
|
1222
|
+
|
|
1223
|
+
| Componente | Tipografía Usada | Ubicación |
|
|
1224
|
+
|------------|------------------|-----------|
|
|
1225
|
+
| **Button** | Label Small (14px Bold) | Button.tsx:52-58 |
|
|
1226
|
+
| **Input Label** | Label Small/Base (14-16px Bold) | - |
|
|
1227
|
+
| **Input Placeholder** | Paragraph Small (14px Regular) | - |
|
|
1228
|
+
| **Card Title** | Heading Small (24px Bold) | - |
|
|
1229
|
+
| **Badge** | Label Tiny (12px Bold) | - |
|
|
1230
|
+
| **Tooltip** | Paragraph Tiny (12px Regular) | - |
|
|
1231
|
+
|
|
1232
|
+
---
|
|
1233
|
+
|
|
1234
|
+
## Recursos Adicionales
|
|
1235
|
+
|
|
1236
|
+
### Enlaces Útiles
|
|
1237
|
+
|
|
1238
|
+
- **Tailwind Typography**: https://tailwindcss.com/docs/font-size
|
|
1239
|
+
- **WCAG Guidelines**: https://www.w3.org/WAI/WCAG21/quickref/#text-spacing
|
|
1240
|
+
- **Type Scale Calculator**: https://type-scale.com
|
|
1241
|
+
- **Modular Scale**: https://www.modularscale.com
|
|
1242
|
+
|
|
1243
|
+
### Archivos Relacionados
|
|
1244
|
+
|
|
1245
|
+
- `src/index.css` - Declaraciones @font-face (líneas 1-24)
|
|
1246
|
+
- `tailwind.config.js` - Configuración de fontSize (líneas 74-94)
|
|
1247
|
+
- `src/components/Button/Button.tsx` - Ejemplo de uso de Label Small
|
|
1248
|
+
- `docs/colors.md` - Sistema de colores para tipografía
|
|
1249
|
+
- `docs/icons.md` - Sistema de iconos
|
|
1250
|
+
|
|
1251
|
+
### Herramientas de Testing
|
|
1252
|
+
|
|
1253
|
+
```bash
|
|
1254
|
+
# Verificar que las fuentes estén cargando correctamente
|
|
1255
|
+
# En DevTools > Network > Filter: Font
|
|
1256
|
+
|
|
1257
|
+
# Verificar contraste de texto
|
|
1258
|
+
# https://webaim.org/resources/contrastchecker/
|
|
1259
|
+
|
|
1260
|
+
# Verificar legibilidad
|
|
1261
|
+
# https://www.webfx.com/tools/read-able/
|
|
1262
|
+
```
|
|
1263
|
+
|
|
1264
|
+
---
|
|
1265
|
+
|
|
1266
|
+
**Última actualización**: 2025-11-11
|
|
1267
|
+
**Versión**: 1.0.0
|
|
1268
|
+
**Mantenedor**: Siesa UI Kit Team
|