siesa-ui-kit 1.0.3 → 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 +28 -54
- package/claude/agents/siesa-ui-kit-specialist.md +2401 -0
- package/claude/prompts/component-template.md +121 -0
- package/claude/settings.local.json +61 -0
- package/docs/border-radius.md +1261 -0
- package/docs/colors.md +832 -0
- package/docs/dark-mode-guide.md +1426 -0
- package/docs/filters.md +1243 -0
- package/docs/icons.md +1283 -0
- package/docs/shadows.md +1377 -0
- package/docs/spacing.md +1684 -0
- package/docs/typography.md +1268 -0
- package/package.json +14 -34
- package/postcss.config.cjs +6 -0
- package/public/,Business Logo.png +0 -0
- package/public/.Siesa Logo.png +0 -0
- package/public/bg_siesa.png +0 -0
- package/public/siesa_logo_mobile.png +0 -0
- package/public/vite.svg +1 -0
- package/src/App.css +42 -0
- package/src/App.tsx +8 -0
- package/src/ButtonTest.tsx +147 -0
- package/src/assets/fonts/README.md +261 -0
- package/src/assets/fonts/SiesaBT/SiesaBT-Bold.otf +0 -0
- package/src/assets/fonts/SiesaBT/SiesaBT-Light.otf +0 -0
- package/src/assets/fonts/SiesaBT/SiesaBT-Regular.otf +0 -0
- package/src/assets/react.svg +1 -0
- package/src/components/Alert/Alert.stories.tsx +332 -0
- package/src/components/Alert/Alert.tsx +106 -0
- package/src/components/Alert/Alert.types.ts +54 -0
- package/src/components/Avatar/Avatar.stories.tsx +494 -0
- package/src/components/Avatar/Avatar.tsx +143 -0
- package/src/components/Avatar/Avatar.types.ts +53 -0
- package/src/components/Badge/Badge.stories.tsx +339 -0
- package/src/components/Badge/Badge.tsx +278 -0
- package/src/components/Badge/Badge.types.ts +58 -0
- package/src/components/Button/Button.stories.tsx +950 -0
- package/src/components/Button/Button.tsx +337 -0
- package/src/components/Button/Button.types.ts +180 -0
- package/src/components/Button/icons.tsx +87 -0
- package/{dist/components/Button/index.d.ts → src/components/Button/index.ts} +3 -4
- package/src/components/Checkbox/Checkbox.stories.tsx +453 -0
- package/src/components/Checkbox/Checkbox.tsx +208 -0
- package/src/components/Checkbox/Checkbox.types.ts +61 -0
- package/src/components/DescriptionList/DescriptionList.stories.tsx +250 -0
- package/src/components/DescriptionList/DescriptionList.tsx +96 -0
- package/src/components/DescriptionList/DescriptionList.types.ts +29 -0
- package/src/components/Divider/Divider.stories.tsx +263 -0
- package/src/components/Divider/Divider.tsx +80 -0
- package/src/components/Divider/Divider.types.ts +24 -0
- package/src/components/Dropdown/Dropdown.stories.tsx +552 -0
- package/src/components/Dropdown/Dropdown.tsx +422 -0
- package/src/components/Dropdown/Dropdown.types.ts +146 -0
- package/src/components/Dropdown/README.md +266 -0
- package/src/components/Dropdown/icons.tsx +72 -0
- package/{dist/components/Dropdown/index.d.ts → src/components/Dropdown/index.ts} +8 -4
- package/src/components/Input/Input.stories.tsx +583 -0
- package/src/components/Input/Input.tsx +204 -0
- package/src/components/Input/Input.types.ts +80 -0
- package/src/components/Input/icons.tsx +145 -0
- package/{dist/components/Input/index.d.ts → src/components/Input/index.ts} +2 -3
- package/src/components/LoginView/LoginView.stories.tsx +148 -0
- package/src/components/LoginView/LoginView.tsx +426 -0
- package/src/components/LoginView/LoginView.types.ts +52 -0
- package/src/components/LoginView/README.md +396 -0
- package/src/components/LoginView/icons.tsx +85 -0
- package/{dist/components/LoginView/index.d.ts → src/components/LoginView/index.ts} +3 -4
- package/src/components/Navbar/Navbar.stories.tsx +810 -0
- package/src/components/Navbar/Navbar.tsx +755 -0
- package/src/components/Navbar/Navbar.types.ts +219 -0
- package/src/components/Navbar/README.md +279 -0
- package/src/components/Navbar/icons.tsx +102 -0
- package/src/components/Navbar/index.ts +8 -0
- package/src/components/NavigationBar/NavigationBar.stories.tsx +406 -0
- package/src/components/NavigationBar/NavigationBar.tsx +246 -0
- package/src/components/NavigationBar/NavigationBar.types.ts +74 -0
- package/src/components/NavigationBar/README.md +469 -0
- package/{dist/components/NavigationBar/index.d.ts → src/components/NavigationBar/index.ts} +2 -3
- package/src/components/NavigationRail/NavigationRail.stories.tsx +417 -0
- package/src/components/NavigationRail/NavigationRail.tsx +418 -0
- package/src/components/NavigationRail/NavigationRail.types.ts +109 -0
- package/src/components/NavigationRail/README.md +224 -0
- package/{dist/components/NavigationRail/index.d.ts → src/components/NavigationRail/index.ts} +2 -3
- package/src/components/Notification/Notification.stories.tsx +513 -0
- package/src/components/Notification/Notification.tsx +145 -0
- package/src/components/Notification/Notification.types.ts +142 -0
- package/src/components/Notification/README.md +409 -0
- package/{dist/components/Notification/index.d.ts → src/components/Notification/index.ts} +3 -3
- package/src/components/POSConvention/POSConvention.stories.tsx +235 -0
- package/src/components/POSConvention/POSConvention.tsx +129 -0
- package/{dist/components/POSConvention/POSConvention.types.d.ts → src/components/POSConvention/POSConvention.types.ts} +38 -37
- package/src/components/POSConvention/README.md +123 -0
- package/src/components/POSConvention/icons.tsx +45 -0
- package/{dist/components/POSConvention/index.d.ts → src/components/POSConvention/index.ts} +3 -4
- package/src/components/POSLocationButton/POSLocationButton.stories.tsx +531 -0
- package/src/components/POSLocationButton/POSLocationButton.tsx +247 -0
- package/src/components/POSLocationButton/POSLocationButton.types.ts +87 -0
- package/src/components/POSLocationButton/README.md +253 -0
- package/src/components/POSLocationButton/icons.tsx +120 -0
- package/src/components/POSLocationButton/index.ts +14 -0
- package/src/components/POSNumberButton/POSNumberButton.stories.tsx +415 -0
- package/src/components/POSNumberButton/POSNumberButton.tsx +179 -0
- package/src/components/POSNumberButton/POSNumberButton.types.ts +51 -0
- package/src/components/POSNumberButton/README.md +321 -0
- package/{dist/components/POSNumberButton/index.d.ts → src/components/POSNumberButton/index.ts} +3 -3
- package/src/components/POSProductButton/POSProductButton.stories.tsx +318 -0
- package/src/components/POSProductButton/POSProductButton.tsx +152 -0
- package/src/components/POSProductButton/POSProductButton.types.ts +46 -0
- package/src/components/POSProductButton/README.md +269 -0
- package/{dist/components/POSProductButton/index.d.ts → src/components/POSProductButton/index.ts} +2 -3
- package/src/components/POSProductCard/POSProductCard.stories.tsx +642 -0
- package/src/components/POSProductCard/POSProductCard.tsx +208 -0
- package/src/components/POSProductCard/POSProductCard.types.ts +76 -0
- package/src/components/POSProductCard/README.md +179 -0
- package/src/components/POSProductCard/icons.tsx +26 -0
- package/{dist/components/POSProductCard/index.d.ts → src/components/POSProductCard/index.ts} +2 -3
- package/src/components/POSProductSidebarItems/POSProductSidebarItems.stories.tsx +753 -0
- package/src/components/POSProductSidebarItems/POSProductSidebarItems.tsx +332 -0
- package/src/components/POSProductSidebarItems/POSProductSidebarItems.types.ts +119 -0
- package/src/components/POSProductSidebarItems/README.md +198 -0
- package/src/components/POSProductSidebarItems/icons.tsx +21 -0
- package/{dist/components/POSProductSidebarItems/index.d.ts → src/components/POSProductSidebarItems/index.ts} +3 -4
- package/src/components/POSTable/POSTable.stories.tsx +737 -0
- package/src/components/POSTable/POSTable.tsx +401 -0
- package/src/components/POSTable/POSTable.types.ts +83 -0
- package/src/components/POSTable/README.md +286 -0
- package/src/components/POSTable/index.ts +7 -0
- package/src/components/Pagination/Pagination.stories.tsx +555 -0
- package/src/components/Pagination/Pagination.tsx +286 -0
- package/src/components/Pagination/Pagination.types.ts +93 -0
- package/src/components/Pagination/README.md +298 -0
- package/src/components/Pagination/icons.tsx +47 -0
- package/{dist/components/Pagination/index.d.ts → src/components/Pagination/index.ts} +3 -4
- package/src/components/Quantity/Quantity.stories.tsx +457 -0
- package/src/components/Quantity/Quantity.tsx +289 -0
- package/src/components/Quantity/Quantity.types.ts +70 -0
- package/src/components/Radio/Radio.stories.tsx +523 -0
- package/src/components/Radio/Radio.tsx +170 -0
- package/src/components/Radio/Radio.types.ts +122 -0
- package/src/components/Select/README.md +299 -0
- package/src/components/Select/Select.stories.tsx +673 -0
- package/src/components/Select/Select.tsx +454 -0
- package/src/components/Select/Select.types.ts +148 -0
- package/src/components/Select/icons.tsx +50 -0
- package/{dist/components/Select/index.d.ts → src/components/Select/index.ts} +3 -4
- package/src/components/SignUpView/SignUpView.stories.tsx +129 -0
- package/src/components/SignUpView/SignUpView.tsx +503 -0
- package/src/components/SignUpView/SignUpView.types.ts +58 -0
- package/src/components/SignUpView/icons.tsx +71 -0
- package/{dist/components/SignUpView/index.d.ts → src/components/SignUpView/index.ts} +3 -4
- package/src/components/Switch/README.md +112 -0
- package/src/components/Switch/Switch.stories.tsx +550 -0
- package/src/components/Switch/Switch.tsx +246 -0
- package/src/components/Switch/Switch.types.ts +67 -0
- package/src/components/Table/README.md +369 -0
- package/src/components/Table/Table.stories.tsx +805 -0
- package/src/components/Table/Table.tsx +688 -0
- package/src/components/Table/Table.types.ts +204 -0
- package/src/components/Table/index.ts +9 -0
- package/src/components/Tabs/README.md +201 -0
- package/src/components/Tabs/Tabs.stories.tsx +580 -0
- package/src/components/Tabs/Tabs.tsx +356 -0
- package/src/components/Tabs/Tabs.types.ts +127 -0
- package/src/components/Tabs/icons.tsx +129 -0
- package/src/components/Tabs/index.ts +11 -0
- package/src/components/Textarea/Textarea.stories.tsx +535 -0
- package/src/components/Textarea/Textarea.tsx +188 -0
- package/src/components/Textarea/Textarea.types.ts +54 -0
- package/src/context/ThemeContext.tsx +99 -0
- package/{dist/context/index.d.ts → src/context/index.ts} +1 -2
- package/src/index.css +29 -0
- package/src/index.ts +39 -0
- package/src/main.tsx +10 -0
- package/src/views/ProductsView/ProductsView.stories.tsx +344 -0
- package/src/views/ProductsView/ProductsView.tsx +480 -0
- package/src/views/ProductsView/ProductsView.types.ts +238 -0
- package/src/views/ProductsView/README.md +312 -0
- package/src/views/ProductsView/icons.tsx +38 -0
- package/src/views/ProductsView/index.ts +8 -0
- package/src/views/RecoverPasswordView/README.md +269 -0
- package/src/views/RecoverPasswordView/RecoverPasswordView.stories.tsx +131 -0
- package/src/views/RecoverPasswordView/RecoverPasswordView.tsx +376 -0
- package/src/views/RecoverPasswordView/RecoverPasswordView.types.ts +56 -0
- package/src/views/RecoverPasswordView/icons.tsx +17 -0
- package/{dist/views/RecoverPasswordView/index.d.ts → src/views/RecoverPasswordView/index.ts} +2 -3
- package/src/views/TableLayoutView/README.md +268 -0
- package/src/views/TableLayoutView/TableLayoutView.stories.tsx +235 -0
- package/src/views/TableLayoutView/TableLayoutView.tsx +461 -0
- package/src/views/TableLayoutView/TableLayoutView.types.ts +209 -0
- package/src/views/TableLayoutView/icons.tsx +113 -0
- package/src/views/TableLayoutView/index.ts +6 -0
- package/storybook/main.ts +20 -0
- package/storybook/preview.tsx +84 -0
- package/storybook/vitest.setup.ts +7 -0
- package/tailwind.config.js +128 -0
- 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 -26
- package/dist/components/Button/icons.d.ts.map +0 -1
- 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.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 -95
- 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.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.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.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.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 -155
- 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 -111
- package/dist/components/NavigationRailTypes/NavigationRailTypes.types.d.ts.map +0 -1
- package/dist/components/NavigationRailTypes/icons.d.ts +0 -58
- 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.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.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.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.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.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.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.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.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 -16
- package/dist/components/Select/icons.d.ts.map +0 -1
- 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.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.map +0 -1
- package/dist/index.d.ts +0 -56
- package/dist/index.d.ts.map +0 -1
- package/dist/siesa-ui-kit.cjs +0 -1260
- package/dist/siesa-ui-kit.cjs.map +0 -1
- package/dist/siesa-ui-kit.mjs +0 -4496
- package/dist/siesa-ui-kit.mjs.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.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
|
@@ -0,0 +1,1261 @@
|
|
|
1
|
+
# Sistema de Border Radius - Siesa UI Kit
|
|
2
|
+
|
|
3
|
+
## 📋 Tabla de Contenidos
|
|
4
|
+
|
|
5
|
+
1. [Introducción](#introducción)
|
|
6
|
+
2. [Escala de Border Radius](#escala-de-border-radius)
|
|
7
|
+
3. [Guía de Uso](#guía-de-uso)
|
|
8
|
+
4. [Componentes del Sistema](#componentes-del-sistema)
|
|
9
|
+
5. [Ejemplos de Código](#ejemplos-de-código)
|
|
10
|
+
6. [Mejores Prácticas](#mejores-prácticas)
|
|
11
|
+
7. [Dark Mode](#dark-mode)
|
|
12
|
+
8. [Referencia Rápida](#referencia-rápida)
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Introducción
|
|
17
|
+
|
|
18
|
+
El sistema de border radius de Siesa UI Kit proporciona una escala consistente de bordes redondeados que ayuda a crear una jerarquía visual clara y mantener la coherencia en toda la interfaz.
|
|
19
|
+
|
|
20
|
+
### Objetivos del Sistema
|
|
21
|
+
|
|
22
|
+
- **Consistencia Visual**: Escalas bien definidas para todos los elementos de UI
|
|
23
|
+
- **Jerarquía Clara**: Diferentes niveles de redondeo según la importancia del componente
|
|
24
|
+
- **Flexibilidad**: Escalas adaptables desde bordes rectos hasta completamente circulares
|
|
25
|
+
- **Armonía**: Progresión coherente entre valores
|
|
26
|
+
|
|
27
|
+
### Principios de Diseño
|
|
28
|
+
|
|
29
|
+
1. **Progresión Geométrica**: Incrementos lógicos entre escalas (2px → 4px → 6px → 8px → 12px → 16px → 24px)
|
|
30
|
+
2. **Propósito Semántico**: Cada escala tiene casos de uso específicos
|
|
31
|
+
3. **Adaptabilidad**: Compatible con diferentes tamaños de componentes
|
|
32
|
+
4. **Accesibilidad**: Bordes redondeados que no comprometen la usabilidad
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Escala de Border Radius
|
|
37
|
+
|
|
38
|
+
El sistema incluye **9 escalas** que van desde bordes completamente rectos hasta completamente circulares.
|
|
39
|
+
|
|
40
|
+
### Tabla Completa de Escalas
|
|
41
|
+
|
|
42
|
+
| Clase Tailwind | Valor | CSS | Uso Principal | Componentes |
|
|
43
|
+
|----------------|-------|-----|---------------|-------------|
|
|
44
|
+
| `rounded-none` | 0px | `border-radius: 0px` | Sin redondeo | Dividers, líneas |
|
|
45
|
+
| `rounded-sm` | 2px | `border-radius: 2px` | Redondeo mínimo | Badges pequeños, tags |
|
|
46
|
+
| `rounded` | 4px | `border-radius: 4px` | Redondeo sutil | Pequeños elementos |
|
|
47
|
+
| `rounded-md` | 6px | `border-radius: 6px` | **Botones, inputs** | Button, Input, Select |
|
|
48
|
+
| `rounded-lg` | 8px | `border-radius: 8px` | Cards pequeños | Card, Dropdown items |
|
|
49
|
+
| `rounded-xl` | 12px | `border-radius: 12px` | Cards medianos | Card, Modal pequeño |
|
|
50
|
+
| `rounded-2xl` | 16px | `border-radius: 16px` | **Cards grandes** | Card principal, Panel |
|
|
51
|
+
| `rounded-3xl` | 24px | `border-radius: 24px` | Containers grandes | Hero cards, Modal grande |
|
|
52
|
+
| `rounded-full` | 9999px | `border-radius: 9999px` | **Círculos perfectos** | Avatar, Badge circular |
|
|
53
|
+
|
|
54
|
+
### Valores Más Comunes
|
|
55
|
+
|
|
56
|
+
En el 80% de los casos, usarás estos 3 valores:
|
|
57
|
+
|
|
58
|
+
1. **`rounded-md` (6px)**: Botones, inputs, dropdowns
|
|
59
|
+
2. **`rounded-2xl` (16px)**: Cards, paneles, modales
|
|
60
|
+
3. **`rounded-full` (9999px)**: Avatares, badges circulares, botones circulares
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Guía de Uso
|
|
65
|
+
|
|
66
|
+
### Por Tipo de Componente
|
|
67
|
+
|
|
68
|
+
#### 1. Botones y Controles (6px - `rounded-md`)
|
|
69
|
+
|
|
70
|
+
```tsx
|
|
71
|
+
// Botones
|
|
72
|
+
<Button className="rounded-md">Guardar</Button>
|
|
73
|
+
|
|
74
|
+
// Inputs
|
|
75
|
+
<input className="rounded-md border px-3 py-2" />
|
|
76
|
+
|
|
77
|
+
// Select
|
|
78
|
+
<select className="rounded-md border px-3 py-2">
|
|
79
|
+
<option>Seleccionar</option>
|
|
80
|
+
</select>
|
|
81
|
+
|
|
82
|
+
// Checkbox personalizado (pequeño)
|
|
83
|
+
<div className="rounded border w-5 h-5" />
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
**Razón**: 6px proporciona el equilibrio perfecto entre suavidad y nitidez para controles interactivos.
|
|
87
|
+
|
|
88
|
+
#### 2. Cards y Contenedores (16px - `rounded-2xl`)
|
|
89
|
+
|
|
90
|
+
```tsx
|
|
91
|
+
// Card estándar
|
|
92
|
+
<div className="rounded-2xl border bg-white p-6">
|
|
93
|
+
<h3>Título del Card</h3>
|
|
94
|
+
<p>Contenido...</p>
|
|
95
|
+
</div>
|
|
96
|
+
|
|
97
|
+
// Panel
|
|
98
|
+
<div className="rounded-2xl border bg-bg-primary p-8">
|
|
99
|
+
{/* Contenido del panel */}
|
|
100
|
+
</div>
|
|
101
|
+
|
|
102
|
+
// Modal
|
|
103
|
+
<div className="rounded-2xl bg-white shadow-lg p-6 max-w-md">
|
|
104
|
+
{/* Contenido del modal */}
|
|
105
|
+
</div>
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
**Razón**: 16px crea una apariencia amigable y moderna para contenedores grandes.
|
|
109
|
+
|
|
110
|
+
#### 3. Avatares y Elementos Circulares (9999px - `rounded-full`)
|
|
111
|
+
|
|
112
|
+
```tsx
|
|
113
|
+
// Avatar
|
|
114
|
+
<img
|
|
115
|
+
src="/avatar.jpg"
|
|
116
|
+
alt="Usuario"
|
|
117
|
+
className="rounded-full w-12 h-12"
|
|
118
|
+
/>
|
|
119
|
+
|
|
120
|
+
// Badge circular
|
|
121
|
+
<span className="rounded-full bg-red-500 text-white w-6 h-6 flex items-center justify-center text-xs">
|
|
122
|
+
3
|
|
123
|
+
</span>
|
|
124
|
+
|
|
125
|
+
// Botón circular icon-only
|
|
126
|
+
<button className="rounded-full bg-primary-custom-600 p-3">
|
|
127
|
+
<PlusIcon />
|
|
128
|
+
</button>
|
|
129
|
+
|
|
130
|
+
// Indicador de estado
|
|
131
|
+
<div className="rounded-full bg-green-500 w-3 h-3" />
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
**Razón**: `rounded-full` garantiza círculos perfectos independientemente del tamaño.
|
|
135
|
+
|
|
136
|
+
#### 4. Badges y Tags (2-8px)
|
|
137
|
+
|
|
138
|
+
```tsx
|
|
139
|
+
// Badge pequeño - rounded-sm (2px)
|
|
140
|
+
<span className="rounded-sm bg-blue-100 text-blue-800 px-2 py-0.5 text-xs font-bold">
|
|
141
|
+
NUEVO
|
|
142
|
+
</span>
|
|
143
|
+
|
|
144
|
+
// Badge mediano - rounded (4px)
|
|
145
|
+
<span className="rounded bg-green-100 text-green-800 px-2 py-1 text-sm font-bold">
|
|
146
|
+
ACTIVO
|
|
147
|
+
</span>
|
|
148
|
+
|
|
149
|
+
// Badge grande - rounded-lg (8px)
|
|
150
|
+
<span className="rounded-lg bg-purple-100 text-purple-800 px-3 py-1.5 text-sm font-bold">
|
|
151
|
+
PREMIUM
|
|
152
|
+
</span>
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
**Razón**: Los badges más pequeños necesitan menos redondeo para mantener proporciones visuales correctas.
|
|
156
|
+
|
|
157
|
+
#### 5. Tooltips y Popovers (8-12px)
|
|
158
|
+
|
|
159
|
+
```tsx
|
|
160
|
+
// Tooltip - rounded-lg (8px)
|
|
161
|
+
<div className="rounded-lg bg-gray-900 text-white px-3 py-2 text-sm">
|
|
162
|
+
Este es un tooltip
|
|
163
|
+
</div>
|
|
164
|
+
|
|
165
|
+
// Popover - rounded-xl (12px)
|
|
166
|
+
<div className="rounded-xl bg-white border shadow-lg p-4">
|
|
167
|
+
<h4 className="font-bold mb-2">Información</h4>
|
|
168
|
+
<p className="text-sm">Contenido del popover...</p>
|
|
169
|
+
</div>
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
**Razón**: Redondeo suave que no compite visualmente con los elementos principales.
|
|
173
|
+
|
|
174
|
+
### Por Tamaño de Elemento
|
|
175
|
+
|
|
176
|
+
| Tamaño del Elemento | Border Radius Recomendado |
|
|
177
|
+
|---------------------|---------------------------|
|
|
178
|
+
| **Muy pequeño** (< 32px) | `rounded-sm` (2px) o `rounded` (4px) |
|
|
179
|
+
| **Pequeño** (32-48px) | `rounded-md` (6px) |
|
|
180
|
+
| **Mediano** (48-96px) | `rounded-lg` (8px) o `rounded-xl` (12px) |
|
|
181
|
+
| **Grande** (96-200px) | `rounded-2xl` (16px) |
|
|
182
|
+
| **Muy grande** (> 200px) | `rounded-3xl` (24px) |
|
|
183
|
+
| **Circular** (cualquier tamaño) | `rounded-full` (9999px) |
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## Componentes del Sistema
|
|
188
|
+
|
|
189
|
+
### Configuración Actual
|
|
190
|
+
|
|
191
|
+
Según el tailwind.config.js y las especificaciones de Figma:
|
|
192
|
+
|
|
193
|
+
```javascript
|
|
194
|
+
// tailwind.config.js
|
|
195
|
+
borderRadius: {
|
|
196
|
+
'none': '0px', // Tailwind default
|
|
197
|
+
'sm': '2px', // Tailwind default
|
|
198
|
+
'DEFAULT': '4px', // Tailwind default (rounded)
|
|
199
|
+
'md': '6px', // ⚠️ PERSONALIZADO - Botones e inputs
|
|
200
|
+
'lg': '8px', // Tailwind default
|
|
201
|
+
'xl': '12px', // Tailwind default
|
|
202
|
+
'2xl': '16px', // ⚠️ PERSONALIZADO - Cards
|
|
203
|
+
'3xl': '24px', // ⚠️ PERSONALIZADO - Containers grandes
|
|
204
|
+
'full': '9999px', // Tailwind default
|
|
205
|
+
}
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
### Valores Personalizados del Sistema
|
|
209
|
+
|
|
210
|
+
**Importante**: Siesa UI Kit sobrescribe 3 valores de Tailwind por defecto:
|
|
211
|
+
|
|
212
|
+
| Clase | Tailwind Default | Siesa UI Kit | Razón |
|
|
213
|
+
|-------|------------------|--------------|-------|
|
|
214
|
+
| `rounded-md` | 6px (0.375rem) | **6px** | ✅ Igual - Diseñado para botones |
|
|
215
|
+
| `rounded-2xl` | 24px (1.5rem) | **16px** | ⚠️ Diferente - Ajustado para cards |
|
|
216
|
+
| `rounded-3xl` | 32px (2rem) | **24px** | ⚠️ Diferente - Ajustado para containers |
|
|
217
|
+
|
|
218
|
+
**Nota**: Si migras código de otros proyectos Tailwind, ten en cuenta estas diferencias.
|
|
219
|
+
|
|
220
|
+
### Uso en Componentes Actuales
|
|
221
|
+
|
|
222
|
+
| Componente | Border Radius | Ubicación |
|
|
223
|
+
|------------|---------------|-----------|
|
|
224
|
+
| **Button** | `rounded-md` (6px) | Button.tsx:108 |
|
|
225
|
+
| **Input** | `rounded-md` (6px) | (a implementar) |
|
|
226
|
+
| **Card** | `rounded-2xl` (16px) | (a implementar) |
|
|
227
|
+
| **Badge** | `rounded` (4px) o `rounded-full` | (a implementar) |
|
|
228
|
+
| **Avatar** | `rounded-full` (9999px) | (a implementar) |
|
|
229
|
+
| **Modal** | `rounded-2xl` (16px) o `rounded-3xl` (24px) | (a implementar) |
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
## Ejemplos de Código
|
|
234
|
+
|
|
235
|
+
### Ejemplo 1: Dashboard con Cards
|
|
236
|
+
|
|
237
|
+
```tsx
|
|
238
|
+
export const Dashboard = () => {
|
|
239
|
+
return (
|
|
240
|
+
<div className="p-8 space-y-6">
|
|
241
|
+
{/* Título sin border radius */}
|
|
242
|
+
<h1 className="text-4xl font-bold">Dashboard</h1>
|
|
243
|
+
|
|
244
|
+
{/* Grid de Cards con rounded-2xl */}
|
|
245
|
+
<div className="grid grid-cols-3 gap-6">
|
|
246
|
+
<div className="rounded-2xl border border-border-primary bg-white p-6">
|
|
247
|
+
<div className="flex items-center gap-4 mb-4">
|
|
248
|
+
{/* Avatar circular */}
|
|
249
|
+
<img
|
|
250
|
+
src="/avatar.jpg"
|
|
251
|
+
alt="Usuario"
|
|
252
|
+
className="rounded-full w-12 h-12"
|
|
253
|
+
/>
|
|
254
|
+
<div>
|
|
255
|
+
<h3 className="text-xl font-bold">Ventas</h3>
|
|
256
|
+
{/* Badge con rounded-sm */}
|
|
257
|
+
<span className="rounded-sm bg-green-100 text-green-800 px-2 py-0.5 text-xs font-bold">
|
|
258
|
+
+12.5%
|
|
259
|
+
</span>
|
|
260
|
+
</div>
|
|
261
|
+
</div>
|
|
262
|
+
<p className="text-3xl font-bold">$125,430</p>
|
|
263
|
+
</div>
|
|
264
|
+
|
|
265
|
+
<div className="rounded-2xl border border-border-primary bg-white p-6">
|
|
266
|
+
<h3 className="text-xl font-bold mb-4">Clientes</h3>
|
|
267
|
+
<p className="text-3xl font-bold">1,234</p>
|
|
268
|
+
</div>
|
|
269
|
+
|
|
270
|
+
<div className="rounded-2xl border border-border-primary bg-white p-6">
|
|
271
|
+
<h3 className="text-xl font-bold mb-4">Pedidos</h3>
|
|
272
|
+
<p className="text-3xl font-bold">456</p>
|
|
273
|
+
</div>
|
|
274
|
+
</div>
|
|
275
|
+
|
|
276
|
+
{/* Card grande con rounded-3xl */}
|
|
277
|
+
<div className="rounded-3xl border border-border-primary bg-white p-8">
|
|
278
|
+
<h2 className="text-2xl font-bold mb-6">Actividad Reciente</h2>
|
|
279
|
+
{/* Contenido */}
|
|
280
|
+
</div>
|
|
281
|
+
</div>
|
|
282
|
+
);
|
|
283
|
+
};
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
### Ejemplo 2: Formulario Completo
|
|
287
|
+
|
|
288
|
+
```tsx
|
|
289
|
+
export const ProfileForm = () => {
|
|
290
|
+
return (
|
|
291
|
+
<form className="max-w-2xl mx-auto p-6">
|
|
292
|
+
{/* Container del formulario - rounded-2xl */}
|
|
293
|
+
<div className="rounded-2xl border border-border-primary bg-white p-8 space-y-6">
|
|
294
|
+
<h2 className="text-3xl font-bold">Editar Perfil</h2>
|
|
295
|
+
|
|
296
|
+
{/* Avatar upload */}
|
|
297
|
+
<div className="flex items-center gap-6">
|
|
298
|
+
<img
|
|
299
|
+
src="/avatar.jpg"
|
|
300
|
+
alt="Avatar"
|
|
301
|
+
className="rounded-full w-24 h-24"
|
|
302
|
+
/>
|
|
303
|
+
<button className="rounded-md bg-primary-custom-600 text-white px-4 py-2 font-bold hover:bg-primary-custom-500">
|
|
304
|
+
Cambiar Foto
|
|
305
|
+
</button>
|
|
306
|
+
</div>
|
|
307
|
+
|
|
308
|
+
{/* Inputs con rounded-md */}
|
|
309
|
+
<div className="space-y-4">
|
|
310
|
+
<div>
|
|
311
|
+
<label className="text-sm font-bold mb-2 block">Nombre</label>
|
|
312
|
+
<input
|
|
313
|
+
type="text"
|
|
314
|
+
className="rounded-md border border-border-primary px-4 py-2 w-full focus:ring-2 focus:ring-primary-custom-400"
|
|
315
|
+
placeholder="Juan Pérez"
|
|
316
|
+
/>
|
|
317
|
+
</div>
|
|
318
|
+
|
|
319
|
+
<div>
|
|
320
|
+
<label className="text-sm font-bold mb-2 block">Email</label>
|
|
321
|
+
<input
|
|
322
|
+
type="email"
|
|
323
|
+
className="rounded-md border border-border-primary px-4 py-2 w-full focus:ring-2 focus:ring-primary-custom-400"
|
|
324
|
+
placeholder="juan@ejemplo.com"
|
|
325
|
+
/>
|
|
326
|
+
</div>
|
|
327
|
+
|
|
328
|
+
<div>
|
|
329
|
+
<label className="text-sm font-bold mb-2 block">Rol</label>
|
|
330
|
+
<select className="rounded-md border border-border-primary px-4 py-2 w-full focus:ring-2 focus:ring-primary-custom-400">
|
|
331
|
+
<option>Administrador</option>
|
|
332
|
+
<option>Usuario</option>
|
|
333
|
+
</select>
|
|
334
|
+
</div>
|
|
335
|
+
</div>
|
|
336
|
+
|
|
337
|
+
{/* Botones */}
|
|
338
|
+
<div className="flex gap-4">
|
|
339
|
+
<button
|
|
340
|
+
type="submit"
|
|
341
|
+
className="rounded-md bg-primary-custom-600 text-white px-6 py-2 font-bold hover:bg-primary-custom-500"
|
|
342
|
+
>
|
|
343
|
+
Guardar Cambios
|
|
344
|
+
</button>
|
|
345
|
+
<button
|
|
346
|
+
type="button"
|
|
347
|
+
className="rounded-md border border-border-primary bg-white px-6 py-2 font-bold hover:bg-gray-50"
|
|
348
|
+
>
|
|
349
|
+
Cancelar
|
|
350
|
+
</button>
|
|
351
|
+
</div>
|
|
352
|
+
</div>
|
|
353
|
+
</form>
|
|
354
|
+
);
|
|
355
|
+
};
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
### Ejemplo 3: Lista con Avatares y Badges
|
|
359
|
+
|
|
360
|
+
```tsx
|
|
361
|
+
export const UserList = ({ users }) => {
|
|
362
|
+
return (
|
|
363
|
+
<div className="rounded-2xl border border-border-primary bg-white">
|
|
364
|
+
<div className="p-6 border-b border-border-primary">
|
|
365
|
+
<h2 className="text-2xl font-bold">Equipo</h2>
|
|
366
|
+
</div>
|
|
367
|
+
|
|
368
|
+
<ul className="divide-y divide-border-primary">
|
|
369
|
+
{users.map((user) => (
|
|
370
|
+
<li key={user.id} className="p-6 hover:bg-gray-50 transition-colors">
|
|
371
|
+
<div className="flex items-center justify-between">
|
|
372
|
+
<div className="flex items-center gap-4">
|
|
373
|
+
{/* Avatar */}
|
|
374
|
+
<div className="relative">
|
|
375
|
+
<img
|
|
376
|
+
src={user.avatar}
|
|
377
|
+
alt={user.name}
|
|
378
|
+
className="rounded-full w-12 h-12"
|
|
379
|
+
/>
|
|
380
|
+
{/* Indicador de estado online */}
|
|
381
|
+
{user.online && (
|
|
382
|
+
<div className="rounded-full bg-green-500 w-3 h-3 absolute bottom-0 right-0 border-2 border-white" />
|
|
383
|
+
)}
|
|
384
|
+
</div>
|
|
385
|
+
|
|
386
|
+
<div>
|
|
387
|
+
<h3 className="font-bold text-base">{user.name}</h3>
|
|
388
|
+
<p className="text-sm text-content-secondary">{user.email}</p>
|
|
389
|
+
</div>
|
|
390
|
+
</div>
|
|
391
|
+
|
|
392
|
+
<div className="flex items-center gap-3">
|
|
393
|
+
{/* Badge de rol */}
|
|
394
|
+
<span className={`rounded px-3 py-1 text-sm font-bold ${
|
|
395
|
+
user.role === 'admin'
|
|
396
|
+
? 'bg-purple-100 text-purple-800'
|
|
397
|
+
: 'bg-gray-100 text-gray-800'
|
|
398
|
+
}`}>
|
|
399
|
+
{user.role}
|
|
400
|
+
</span>
|
|
401
|
+
|
|
402
|
+
{/* Badge circular de notificaciones */}
|
|
403
|
+
{user.notifications > 0 && (
|
|
404
|
+
<span className="rounded-full bg-red-500 text-white w-6 h-6 flex items-center justify-center text-xs font-bold">
|
|
405
|
+
{user.notifications}
|
|
406
|
+
</span>
|
|
407
|
+
)}
|
|
408
|
+
|
|
409
|
+
{/* Botón de acción circular */}
|
|
410
|
+
<button className="rounded-full hover:bg-gray-100 p-2">
|
|
411
|
+
<MoreIcon />
|
|
412
|
+
</button>
|
|
413
|
+
</div>
|
|
414
|
+
</div>
|
|
415
|
+
</li>
|
|
416
|
+
))}
|
|
417
|
+
</ul>
|
|
418
|
+
</div>
|
|
419
|
+
);
|
|
420
|
+
};
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+
### Ejemplo 4: Modal y Overlay
|
|
424
|
+
|
|
425
|
+
```tsx
|
|
426
|
+
export const Modal = ({ isOpen, onClose, children }) => {
|
|
427
|
+
if (!isOpen) return null;
|
|
428
|
+
|
|
429
|
+
return (
|
|
430
|
+
<div className="fixed inset-0 z-50 flex items-center justify-center p-4">
|
|
431
|
+
{/* Overlay sin border radius */}
|
|
432
|
+
<div
|
|
433
|
+
className="absolute inset-0 bg-black/50"
|
|
434
|
+
onClick={onClose}
|
|
435
|
+
/>
|
|
436
|
+
|
|
437
|
+
{/* Modal con rounded-3xl */}
|
|
438
|
+
<div className="rounded-3xl bg-white shadow-2xl max-w-lg w-full relative z-10">
|
|
439
|
+
{/* Header */}
|
|
440
|
+
<div className="flex items-center justify-between p-6 border-b border-border-primary">
|
|
441
|
+
<h2 className="text-2xl font-bold">Confirmar Acción</h2>
|
|
442
|
+
<button
|
|
443
|
+
onClick={onClose}
|
|
444
|
+
className="rounded-full hover:bg-gray-100 p-2"
|
|
445
|
+
>
|
|
446
|
+
<XIcon />
|
|
447
|
+
</button>
|
|
448
|
+
</div>
|
|
449
|
+
|
|
450
|
+
{/* Body */}
|
|
451
|
+
<div className="p-6">
|
|
452
|
+
{children}
|
|
453
|
+
</div>
|
|
454
|
+
|
|
455
|
+
{/* Footer */}
|
|
456
|
+
<div className="flex gap-3 justify-end p-6 border-t border-border-primary">
|
|
457
|
+
<button
|
|
458
|
+
onClick={onClose}
|
|
459
|
+
className="rounded-md border border-border-primary bg-white px-4 py-2 font-bold hover:bg-gray-50"
|
|
460
|
+
>
|
|
461
|
+
Cancelar
|
|
462
|
+
</button>
|
|
463
|
+
<button className="rounded-md bg-primary-custom-600 text-white px-4 py-2 font-bold hover:bg-primary-custom-500">
|
|
464
|
+
Confirmar
|
|
465
|
+
</button>
|
|
466
|
+
</div>
|
|
467
|
+
</div>
|
|
468
|
+
</div>
|
|
469
|
+
);
|
|
470
|
+
};
|
|
471
|
+
```
|
|
472
|
+
|
|
473
|
+
### Ejemplo 5: Navegación con Pills
|
|
474
|
+
|
|
475
|
+
```tsx
|
|
476
|
+
export const Navigation = () => {
|
|
477
|
+
const [activeTab, setActiveTab] = useState('dashboard');
|
|
478
|
+
|
|
479
|
+
return (
|
|
480
|
+
<nav className="rounded-2xl border border-border-primary bg-white p-2">
|
|
481
|
+
<ul className="flex gap-2">
|
|
482
|
+
<li>
|
|
483
|
+
<button
|
|
484
|
+
onClick={() => setActiveTab('dashboard')}
|
|
485
|
+
className={`rounded-lg px-4 py-2 font-bold transition-all ${
|
|
486
|
+
activeTab === 'dashboard'
|
|
487
|
+
? 'bg-primary-custom-600 text-white'
|
|
488
|
+
: 'text-content-primary hover:bg-gray-100'
|
|
489
|
+
}`}
|
|
490
|
+
>
|
|
491
|
+
Dashboard
|
|
492
|
+
</button>
|
|
493
|
+
</li>
|
|
494
|
+
<li>
|
|
495
|
+
<button
|
|
496
|
+
onClick={() => setActiveTab('analytics')}
|
|
497
|
+
className={`rounded-lg px-4 py-2 font-bold transition-all ${
|
|
498
|
+
activeTab === 'analytics'
|
|
499
|
+
? 'bg-primary-custom-600 text-white'
|
|
500
|
+
: 'text-content-primary hover:bg-gray-100'
|
|
501
|
+
}`}
|
|
502
|
+
>
|
|
503
|
+
Analíticas
|
|
504
|
+
</button>
|
|
505
|
+
</li>
|
|
506
|
+
<li>
|
|
507
|
+
<button
|
|
508
|
+
onClick={() => setActiveTab('settings')}
|
|
509
|
+
className={`rounded-lg px-4 py-2 font-bold transition-all ${
|
|
510
|
+
activeTab === 'settings'
|
|
511
|
+
? 'bg-primary-custom-600 text-white'
|
|
512
|
+
: 'text-content-primary hover:bg-gray-100'
|
|
513
|
+
}`}
|
|
514
|
+
>
|
|
515
|
+
Configuración
|
|
516
|
+
</button>
|
|
517
|
+
</li>
|
|
518
|
+
</ul>
|
|
519
|
+
</nav>
|
|
520
|
+
);
|
|
521
|
+
};
|
|
522
|
+
```
|
|
523
|
+
|
|
524
|
+
---
|
|
525
|
+
|
|
526
|
+
## Mejores Prácticas
|
|
527
|
+
|
|
528
|
+
### ✅ Hacer
|
|
529
|
+
|
|
530
|
+
1. **Usar valores consistentes del sistema**
|
|
531
|
+
```tsx
|
|
532
|
+
// ✅ CORRECTO - Usar las escalas definidas
|
|
533
|
+
<div className="rounded-md">Botón</div>
|
|
534
|
+
<div className="rounded-2xl">Card</div>
|
|
535
|
+
```
|
|
536
|
+
|
|
537
|
+
2. **Mantener jerarquía visual**
|
|
538
|
+
```tsx
|
|
539
|
+
// ✅ CORRECTO - Elementos hijos menos redondeados que padres
|
|
540
|
+
<div className="rounded-2xl p-6">
|
|
541
|
+
<button className="rounded-md">Acción</button>
|
|
542
|
+
</div>
|
|
543
|
+
```
|
|
544
|
+
|
|
545
|
+
3. **Usar rounded-full para círculos perfectos**
|
|
546
|
+
```tsx
|
|
547
|
+
// ✅ CORRECTO - Garantiza círculo perfecto
|
|
548
|
+
<div className="rounded-full w-12 h-12">Avatar</div>
|
|
549
|
+
```
|
|
550
|
+
|
|
551
|
+
4. **Adaptar el radio al tamaño del componente**
|
|
552
|
+
```tsx
|
|
553
|
+
// ✅ CORRECTO - Radio proporcional
|
|
554
|
+
<span className="rounded-sm px-2 py-0.5 text-xs">Badge pequeño</span>
|
|
555
|
+
<div className="rounded-3xl p-12 text-2xl">Container grande</div>
|
|
556
|
+
```
|
|
557
|
+
|
|
558
|
+
5. **Agrupar elementos relacionados con el mismo radio**
|
|
559
|
+
```tsx
|
|
560
|
+
// ✅ CORRECTO - Consistencia en el grupo
|
|
561
|
+
<div className="flex gap-2">
|
|
562
|
+
<button className="rounded-md">Guardar</button>
|
|
563
|
+
<button className="rounded-md">Cancelar</button>
|
|
564
|
+
<button className="rounded-md">Eliminar</button>
|
|
565
|
+
</div>
|
|
566
|
+
```
|
|
567
|
+
|
|
568
|
+
### ❌ Evitar
|
|
569
|
+
|
|
570
|
+
1. **No usar valores arbitrarios**
|
|
571
|
+
```tsx
|
|
572
|
+
// ❌ INCORRECTO - Valor personalizado
|
|
573
|
+
<div className="rounded-[10px]">Card</div>
|
|
574
|
+
|
|
575
|
+
// ✅ CORRECTO - Usar escala del sistema
|
|
576
|
+
<div className="rounded-xl">Card</div>
|
|
577
|
+
```
|
|
578
|
+
|
|
579
|
+
2. **No mezclar diferentes radios sin propósito**
|
|
580
|
+
```tsx
|
|
581
|
+
// ❌ INCORRECTO - Inconsistencia visual
|
|
582
|
+
<div className="flex gap-2">
|
|
583
|
+
<button className="rounded-sm">Acción 1</button>
|
|
584
|
+
<button className="rounded-xl">Acción 2</button>
|
|
585
|
+
<button className="rounded-full">Acción 3</button>
|
|
586
|
+
</div>
|
|
587
|
+
|
|
588
|
+
// ✅ CORRECTO - Consistencia
|
|
589
|
+
<div className="flex gap-2">
|
|
590
|
+
<button className="rounded-md">Acción 1</button>
|
|
591
|
+
<button className="rounded-md">Acción 2</button>
|
|
592
|
+
<button className="rounded-md">Acción 3</button>
|
|
593
|
+
</div>
|
|
594
|
+
```
|
|
595
|
+
|
|
596
|
+
3. **No usar radios grandes en elementos pequeños**
|
|
597
|
+
```tsx
|
|
598
|
+
// ❌ INCORRECTO - Radio desproporcionado
|
|
599
|
+
<span className="rounded-3xl px-2 py-0.5 text-xs">Badge</span>
|
|
600
|
+
|
|
601
|
+
// ✅ CORRECTO - Radio proporcional
|
|
602
|
+
<span className="rounded px-2 py-0.5 text-xs">Badge</span>
|
|
603
|
+
```
|
|
604
|
+
|
|
605
|
+
4. **No usar rounded-full en elementos no cuadrados**
|
|
606
|
+
```tsx
|
|
607
|
+
// ❌ INCORRECTO - No será un círculo perfecto
|
|
608
|
+
<div className="rounded-full w-20 h-8">Rectángulo</div>
|
|
609
|
+
|
|
610
|
+
// ✅ CORRECTO - Para rectángulos usar radio fijo
|
|
611
|
+
<div className="rounded-full w-8 h-8">Círculo</div>
|
|
612
|
+
```
|
|
613
|
+
|
|
614
|
+
5. **No omitir border radius en componentes interactivos**
|
|
615
|
+
```tsx
|
|
616
|
+
// ❌ INCORRECTO - Botón sin redondeo se ve rígido
|
|
617
|
+
<button className="bg-primary-custom-600 text-white px-4 py-2">
|
|
618
|
+
Guardar
|
|
619
|
+
</button>
|
|
620
|
+
|
|
621
|
+
// ✅ CORRECTO - rounded-md para botones
|
|
622
|
+
<button className="rounded-md bg-primary-custom-600 text-white px-4 py-2">
|
|
623
|
+
Guardar
|
|
624
|
+
</button>
|
|
625
|
+
```
|
|
626
|
+
|
|
627
|
+
### Accesibilidad
|
|
628
|
+
|
|
629
|
+
1. **Los bordes redondeados no deben afectar el área clickeable**
|
|
630
|
+
```tsx
|
|
631
|
+
// ✅ CORRECTO - El padding compensa el redondeo
|
|
632
|
+
<button className="rounded-md px-4 py-2">
|
|
633
|
+
Texto del botón
|
|
634
|
+
</button>
|
|
635
|
+
```
|
|
636
|
+
|
|
637
|
+
2. **Mantener contraste suficiente en los bordes**
|
|
638
|
+
```tsx
|
|
639
|
+
// ✅ CORRECTO - Borde visible
|
|
640
|
+
<input className="rounded-md border-2 border-border-primary" />
|
|
641
|
+
```
|
|
642
|
+
|
|
643
|
+
3. **Considerar usuarios con baja visión**
|
|
644
|
+
- Radios muy grandes pueden hacer difícil distinguir los límites
|
|
645
|
+
- Radios muy pequeños pueden parecer demasiado rígidos
|
|
646
|
+
|
|
647
|
+
### Performance
|
|
648
|
+
|
|
649
|
+
- ✅ Las propiedades `border-radius` son muy eficientes
|
|
650
|
+
- ✅ No requieren cálculos complejos del navegador
|
|
651
|
+
- ✅ Se pueden animar suavemente si es necesario
|
|
652
|
+
|
|
653
|
+
```tsx
|
|
654
|
+
// ✅ Transición suave de border radius
|
|
655
|
+
<button className="rounded-md hover:rounded-lg transition-all">
|
|
656
|
+
Hover me
|
|
657
|
+
</button>
|
|
658
|
+
```
|
|
659
|
+
|
|
660
|
+
---
|
|
661
|
+
|
|
662
|
+
## Dark Mode
|
|
663
|
+
|
|
664
|
+
El border radius se mantiene consistente entre light y dark mode, pero es importante ajustar los colores de fondo y borde para que los componentes redondeados se vean correctamente en ambos modos.
|
|
665
|
+
|
|
666
|
+
### Configuración de Tailwind CSS
|
|
667
|
+
|
|
668
|
+
El modo oscuro en Siesa UI Kit se basa en la estrategia de clases de Tailwind CSS:
|
|
669
|
+
|
|
670
|
+
```javascript
|
|
671
|
+
// tailwind.config.js
|
|
672
|
+
module.exports = {
|
|
673
|
+
darkMode: 'class', // ✅ Estrategia basada en clases (NO 'media')
|
|
674
|
+
// ...resto de la configuración
|
|
675
|
+
}
|
|
676
|
+
```
|
|
677
|
+
|
|
678
|
+
Con esta configuración, el modo oscuro se activa añadiendo la clase `.dark` al elemento `<html>`:
|
|
679
|
+
|
|
680
|
+
```html
|
|
681
|
+
<!-- Modo claro -->
|
|
682
|
+
<html>
|
|
683
|
+
<body>
|
|
684
|
+
<!-- Contenido en modo claro -->
|
|
685
|
+
</body>
|
|
686
|
+
</html>
|
|
687
|
+
|
|
688
|
+
<!-- Modo oscuro -->
|
|
689
|
+
<html class="dark">
|
|
690
|
+
<body>
|
|
691
|
+
<!-- Contenido en modo oscuro -->
|
|
692
|
+
</body>
|
|
693
|
+
</html>
|
|
694
|
+
```
|
|
695
|
+
|
|
696
|
+
### El Modificador `dark:`
|
|
697
|
+
|
|
698
|
+
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>`).
|
|
699
|
+
|
|
700
|
+
#### Sintaxis Básica
|
|
701
|
+
|
|
702
|
+
```tsx
|
|
703
|
+
// Patrón básico para border radius + colores
|
|
704
|
+
<div className="
|
|
705
|
+
rounded-2xl
|
|
706
|
+
bg-white dark:bg-dark-bg-primary
|
|
707
|
+
border border-border-primary dark:border-dark-border-primary
|
|
708
|
+
p-6
|
|
709
|
+
">
|
|
710
|
+
Card adaptable
|
|
711
|
+
</div>
|
|
712
|
+
|
|
713
|
+
// El border-radius NO cambia, pero los colores SÍ:
|
|
714
|
+
// - bg-white en modo claro → bg-dark-bg-primary en modo oscuro
|
|
715
|
+
// - border-border-primary en claro → border-dark-border-primary en oscuro
|
|
716
|
+
```
|
|
717
|
+
|
|
718
|
+
### Principios de Dark Mode con Border Radius
|
|
719
|
+
|
|
720
|
+
**Regla de Oro**: Los valores de `border-radius` no cambian entre modos, pero la combinación con colores sí:
|
|
721
|
+
|
|
722
|
+
```tsx
|
|
723
|
+
// ✅ CORRECTO - Border radius consistente, colores adaptativos
|
|
724
|
+
<div className="rounded-2xl bg-white dark:bg-dark-bg-primary border border-border-primary dark:border-dark-border-primary p-6">
|
|
725
|
+
Card con esquinas redondeadas que se adapta al modo
|
|
726
|
+
</div>
|
|
727
|
+
|
|
728
|
+
// ❌ INCORRECTO - Cambiar border radius en dark mode
|
|
729
|
+
<div className="rounded-2xl dark:rounded-md">
|
|
730
|
+
NO hacer esto - mantener border radius consistente
|
|
731
|
+
</div>
|
|
732
|
+
```
|
|
733
|
+
|
|
734
|
+
### Combinando con Estados Interactivos
|
|
735
|
+
|
|
736
|
+
El modificador `dark:` se puede combinar con hover, focus, y otros estados:
|
|
737
|
+
|
|
738
|
+
```tsx
|
|
739
|
+
// Dark mode + Hover en border
|
|
740
|
+
<div className="
|
|
741
|
+
rounded-2xl
|
|
742
|
+
border border-border-primary dark:border-dark-border-primary
|
|
743
|
+
hover:border-primary-custom-300 dark:hover:border-dark-border-custom
|
|
744
|
+
transition-colors
|
|
745
|
+
p-6
|
|
746
|
+
">
|
|
747
|
+
Card interactiva
|
|
748
|
+
</div>
|
|
749
|
+
|
|
750
|
+
// Dark mode + Hover en background
|
|
751
|
+
<button className="
|
|
752
|
+
rounded-md
|
|
753
|
+
bg-background-secondary dark:bg-dark-bg-primary
|
|
754
|
+
hover:bg-primary-custom-100 dark:hover:bg-dark-border-custom
|
|
755
|
+
px-4 py-2
|
|
756
|
+
">
|
|
757
|
+
Botón con hover
|
|
758
|
+
</button>
|
|
759
|
+
|
|
760
|
+
// Dark mode + Focus en inputs
|
|
761
|
+
<input className="
|
|
762
|
+
rounded-md
|
|
763
|
+
border border-border-primary dark:border-dark-border-primary
|
|
764
|
+
focus:border-primary-custom-400 dark:focus:border-dark-border-custom
|
|
765
|
+
focus:ring-2 focus:ring-primary-custom-400/20 dark:focus:ring-dark-border-custom/20
|
|
766
|
+
" />
|
|
767
|
+
```
|
|
768
|
+
|
|
769
|
+
### Orden de Modificadores
|
|
770
|
+
|
|
771
|
+
Tailwind CSS recomienda un orden específico para los modificadores:
|
|
772
|
+
|
|
773
|
+
**Formato**: `{responsive}:{dark}:{state}:{utility}`
|
|
774
|
+
|
|
775
|
+
```tsx
|
|
776
|
+
// ✅ CORRECTO - Orden: responsive → dark → state → utility
|
|
777
|
+
<div className="
|
|
778
|
+
rounded-2xl
|
|
779
|
+
md:rounded-3xl
|
|
780
|
+
border
|
|
781
|
+
border-border-primary
|
|
782
|
+
md:dark:border-dark-border-custom
|
|
783
|
+
md:dark:hover:border-blue-400
|
|
784
|
+
p-6
|
|
785
|
+
">
|
|
786
|
+
Card con orden correcto
|
|
787
|
+
</div>
|
|
788
|
+
|
|
789
|
+
// ❌ INCORRECTO - Orden equivocado
|
|
790
|
+
<div className="
|
|
791
|
+
dark:md:hover:border-blue-400
|
|
792
|
+
rounded-2xl
|
|
793
|
+
">
|
|
794
|
+
Orden confuso
|
|
795
|
+
</div>
|
|
796
|
+
```
|
|
797
|
+
|
|
798
|
+
### Tabla de Estados con Border Radius
|
|
799
|
+
|
|
800
|
+
| Estado | Light Mode | Dark Mode | Descripción |
|
|
801
|
+
|--------|------------|-----------|-------------|
|
|
802
|
+
| **Default Border** | `border-border-primary` | `dark:border-dark-border-primary` | Borde estándar |
|
|
803
|
+
| **Default BG** | `bg-white` | `dark:bg-dark-bg-primary` | Fondo estándar |
|
|
804
|
+
| **Hover Border** | `hover:border-primary-custom-300` | `dark:hover:border-dark-border-custom` | Borde al hover |
|
|
805
|
+
| **Hover BG** | `hover:bg-background-secondary` | `dark:hover:bg-dark-bg-primary` | Fondo al hover |
|
|
806
|
+
| **Focus Border** | `focus:border-primary-custom-400` | `dark:focus:border-dark-border-custom` | Borde al focus (inputs) |
|
|
807
|
+
| **Focus Ring** | `focus:ring-primary-custom-400/20` | `dark:focus:ring-dark-border-custom/20` | Ring de focus |
|
|
808
|
+
| **Active BG** | `active:bg-primary-custom-700` | `dark:active:bg-dark-bg-inverse/90` | Fondo al hacer clic |
|
|
809
|
+
|
|
810
|
+
### Ejemplos de Componentes en Dark Mode
|
|
811
|
+
|
|
812
|
+
#### 1. Cards con Border Radius
|
|
813
|
+
|
|
814
|
+
```tsx
|
|
815
|
+
// Card estándar adaptable
|
|
816
|
+
<div className="rounded-2xl bg-white dark:bg-dark-bg-primary border border-border-primary dark:border-dark-border-primary p-6 shadow-base">
|
|
817
|
+
<h3 className="text-content-primary dark:text-dark-content-primary font-bold text-lg mb-2">
|
|
818
|
+
Card Title
|
|
819
|
+
</h3>
|
|
820
|
+
<p className="text-content-secondary dark:text-content-secondary">
|
|
821
|
+
Card content que funciona en ambos modos
|
|
822
|
+
</p>
|
|
823
|
+
</div>
|
|
824
|
+
|
|
825
|
+
// Card con hover effect
|
|
826
|
+
<div className="rounded-2xl bg-white dark:bg-dark-bg-primary border border-border-primary dark:border-dark-border-primary p-6 hover:border-primary-custom-300 dark:hover:border-dark-border-custom transition-colors">
|
|
827
|
+
Card interactiva
|
|
828
|
+
</div>
|
|
829
|
+
```
|
|
830
|
+
|
|
831
|
+
#### 2. Botones Redondeados
|
|
832
|
+
|
|
833
|
+
```tsx
|
|
834
|
+
// Botón primary
|
|
835
|
+
<button className="rounded-md bg-primary-custom-600 dark:bg-dark-bg-inverse text-primary-inverse-content dark:text-dark-content-inverse px-4 py-2 font-bold">
|
|
836
|
+
Primary Button
|
|
837
|
+
</button>
|
|
838
|
+
|
|
839
|
+
// Botón outline
|
|
840
|
+
<button className="rounded-md border border-border-primary dark:border-dark-border-custom text-content-primary dark:text-dark-content-primary px-4 py-2 font-bold hover:bg-background-secondary dark:hover:bg-dark-bg-primary">
|
|
841
|
+
Outline Button
|
|
842
|
+
</button>
|
|
843
|
+
|
|
844
|
+
// Botón circular (iconos)
|
|
845
|
+
<button className="rounded-full w-10 h-10 flex items-center justify-center bg-background-secondary dark:bg-dark-bg-primary border border-border-primary dark:border-dark-border-primary hover:bg-primary-custom-100 dark:hover:bg-dark-border-custom">
|
|
846
|
+
<Icon />
|
|
847
|
+
</button>
|
|
848
|
+
```
|
|
849
|
+
|
|
850
|
+
#### 3. Inputs con Border Radius
|
|
851
|
+
|
|
852
|
+
```tsx
|
|
853
|
+
// Input estándar
|
|
854
|
+
<input
|
|
855
|
+
type="text"
|
|
856
|
+
className="rounded-md w-full px-3 py-2 border border-border-primary dark:border-dark-border-primary bg-white dark:bg-dark-bg-primary text-content-primary dark:text-dark-content-primary focus:border-primary-custom-400 dark:focus:border-dark-border-custom"
|
|
857
|
+
placeholder="Escribe aquí..."
|
|
858
|
+
/>
|
|
859
|
+
|
|
860
|
+
// Input con error
|
|
861
|
+
<input
|
|
862
|
+
type="email"
|
|
863
|
+
className="rounded-md w-full px-3 py-2 border border-error-border bg-error-bg dark:bg-dark-bg-primary text-content-primary dark:text-dark-content-primary"
|
|
864
|
+
/>
|
|
865
|
+
```
|
|
866
|
+
|
|
867
|
+
#### 4. Modales con Border Radius
|
|
868
|
+
|
|
869
|
+
```tsx
|
|
870
|
+
export const ModalDarkMode = ({ isOpen, onClose }) => {
|
|
871
|
+
if (!isOpen) return null;
|
|
872
|
+
|
|
873
|
+
return (
|
|
874
|
+
<div className="fixed inset-0 z-50 flex items-center justify-center p-4">
|
|
875
|
+
<div
|
|
876
|
+
className="absolute inset-0 bg-black/50 backdrop-blur-lg"
|
|
877
|
+
onClick={onClose}
|
|
878
|
+
/>
|
|
879
|
+
|
|
880
|
+
<div className="relative z-10 rounded-3xl bg-white dark:bg-dark-bg-primary border border-border-primary dark:border-dark-border-primary shadow-2xl max-w-md w-full">
|
|
881
|
+
{/* Header */}
|
|
882
|
+
<div className="flex items-center justify-between p-6 border-b border-border-primary dark:border-dark-border-primary">
|
|
883
|
+
<h2 className="text-content-primary dark:text-dark-content-primary font-bold text-2xl">
|
|
884
|
+
Modal Title
|
|
885
|
+
</h2>
|
|
886
|
+
<button
|
|
887
|
+
onClick={onClose}
|
|
888
|
+
className="rounded-full p-2 hover:bg-background-secondary dark:hover:bg-dark-bg-primary"
|
|
889
|
+
>
|
|
890
|
+
<XIcon className="w-5 h-5" />
|
|
891
|
+
</button>
|
|
892
|
+
</div>
|
|
893
|
+
|
|
894
|
+
{/* Body */}
|
|
895
|
+
<div className="p-6">
|
|
896
|
+
<p className="text-content-secondary dark:text-content-secondary">
|
|
897
|
+
Modal content adaptado para dark mode
|
|
898
|
+
</p>
|
|
899
|
+
</div>
|
|
900
|
+
|
|
901
|
+
{/* Footer */}
|
|
902
|
+
<div className="flex gap-3 justify-end p-6 border-t border-border-primary dark:border-dark-border-primary">
|
|
903
|
+
<button
|
|
904
|
+
onClick={onClose}
|
|
905
|
+
className="rounded-md border border-border-primary dark:border-dark-border-custom px-4 py-2 font-bold text-content-primary dark:text-dark-content-primary"
|
|
906
|
+
>
|
|
907
|
+
Cancel
|
|
908
|
+
</button>
|
|
909
|
+
<button className="rounded-md bg-primary-custom-600 dark:bg-dark-bg-inverse text-primary-inverse-content dark:text-dark-content-inverse px-4 py-2 font-bold">
|
|
910
|
+
Confirm
|
|
911
|
+
</button>
|
|
912
|
+
</div>
|
|
913
|
+
</div>
|
|
914
|
+
</div>
|
|
915
|
+
);
|
|
916
|
+
};
|
|
917
|
+
```
|
|
918
|
+
|
|
919
|
+
#### 5. Badges y Tags
|
|
920
|
+
|
|
921
|
+
```tsx
|
|
922
|
+
// Badge pill (rounded-full)
|
|
923
|
+
<span className="rounded-full bg-primary-custom-100 dark:bg-dark-border-custom text-primary-custom-600 dark:text-dark-content-primary px-3 py-1 text-xs font-bold">
|
|
924
|
+
New
|
|
925
|
+
</span>
|
|
926
|
+
|
|
927
|
+
// Badge redondeado (rounded-md)
|
|
928
|
+
<span className="rounded-md bg-background-secondary dark:bg-dark-bg-primary border border-border-primary dark:border-dark-border-primary px-2 py-1 text-xs font-bold text-content-primary dark:text-dark-content-primary">
|
|
929
|
+
Tag
|
|
930
|
+
</span>
|
|
931
|
+
```
|
|
932
|
+
|
|
933
|
+
### Mejores Prácticas para Dark Mode
|
|
934
|
+
|
|
935
|
+
#### 1. Mantener Consistencia de Border Radius
|
|
936
|
+
|
|
937
|
+
```tsx
|
|
938
|
+
// ✅ CORRECTO - Mismo border radius en ambos modos
|
|
939
|
+
<div className="rounded-2xl bg-white dark:bg-dark-bg-primary">
|
|
940
|
+
Consistente
|
|
941
|
+
</div>
|
|
942
|
+
|
|
943
|
+
// ❌ INCORRECTO - Cambiar border radius en dark mode
|
|
944
|
+
<div className="rounded-2xl dark:rounded-md">
|
|
945
|
+
Inconsistente
|
|
946
|
+
</div>
|
|
947
|
+
```
|
|
948
|
+
|
|
949
|
+
#### 2. Combinar Border Radius con Colores Adaptativos
|
|
950
|
+
|
|
951
|
+
```tsx
|
|
952
|
+
// ✅ CORRECTO - Todos los colores se adaptan
|
|
953
|
+
<div className="rounded-2xl bg-white dark:bg-dark-bg-primary border border-border-primary dark:border-dark-border-primary shadow-base">
|
|
954
|
+
<h3 className="text-content-primary dark:text-dark-content-primary">Title</h3>
|
|
955
|
+
<p className="text-content-secondary dark:text-content-secondary">Content</p>
|
|
956
|
+
</div>
|
|
957
|
+
|
|
958
|
+
// ❌ INCORRECTO - Fondo no se adapta
|
|
959
|
+
<div className="rounded-2xl bg-white border border-border-primary dark:border-dark-border-primary">
|
|
960
|
+
<p className="text-content-primary dark:text-dark-content-primary">Content</p>
|
|
961
|
+
</div>
|
|
962
|
+
```
|
|
963
|
+
|
|
964
|
+
#### 3. Hover States en Dark Mode
|
|
965
|
+
|
|
966
|
+
```tsx
|
|
967
|
+
// ✅ CORRECTO - Hover states para ambos modos
|
|
968
|
+
<button className="rounded-md bg-background-secondary dark:bg-dark-bg-primary hover:bg-primary-custom-100 dark:hover:bg-dark-border-custom px-4 py-2">
|
|
969
|
+
Button
|
|
970
|
+
</button>
|
|
971
|
+
|
|
972
|
+
// Con border en hover
|
|
973
|
+
<div className="rounded-2xl border border-border-primary dark:border-dark-border-primary hover:border-primary-custom-300 dark:hover:border-dark-border-custom transition-colors p-6">
|
|
974
|
+
Interactive card
|
|
975
|
+
</div>
|
|
976
|
+
```
|
|
977
|
+
|
|
978
|
+
#### 4. Focus States en Inputs
|
|
979
|
+
|
|
980
|
+
```tsx
|
|
981
|
+
// ✅ CORRECTO - Focus ring adaptado
|
|
982
|
+
<input
|
|
983
|
+
type="text"
|
|
984
|
+
className="rounded-md border border-border-primary dark:border-dark-border-primary focus:border-primary-custom-400 focus:ring-2 focus:ring-primary-custom-400/20 dark:focus:border-dark-border-custom dark:focus:ring-dark-border-custom/20"
|
|
985
|
+
/>
|
|
986
|
+
```
|
|
987
|
+
|
|
988
|
+
### Ejemplo Completo: Card System con Dark Mode
|
|
989
|
+
|
|
990
|
+
```tsx
|
|
991
|
+
export const CardSystemDarkMode = () => {
|
|
992
|
+
return (
|
|
993
|
+
<div className="min-h-screen bg-bg-primary dark:bg-dark-bg-primary p-8">
|
|
994
|
+
<div className="max-w-4xl mx-auto space-y-6">
|
|
995
|
+
{/* Card con rounded-2xl */}
|
|
996
|
+
<div className="rounded-2xl bg-white dark:bg-dark-bg-primary border border-border-primary dark:border-dark-border-primary p-6 shadow-base">
|
|
997
|
+
<h2 className="text-content-primary dark:text-dark-content-primary font-bold text-xl mb-4">
|
|
998
|
+
Standard Card (rounded-2xl)
|
|
999
|
+
</h2>
|
|
1000
|
+
<p className="text-content-secondary dark:text-content-secondary mb-4">
|
|
1001
|
+
Esta card usa rounded-2xl (16px) y se adapta perfectamente a dark mode.
|
|
1002
|
+
</p>
|
|
1003
|
+
<div className="flex gap-3">
|
|
1004
|
+
<button className="rounded-md bg-primary-custom-600 dark:bg-dark-bg-inverse text-primary-inverse-content dark:text-dark-content-inverse px-4 py-2 font-bold">
|
|
1005
|
+
Primary Action
|
|
1006
|
+
</button>
|
|
1007
|
+
<button className="rounded-md border border-border-primary dark:border-dark-border-custom text-content-primary dark:text-dark-content-primary px-4 py-2 font-bold">
|
|
1008
|
+
Secondary
|
|
1009
|
+
</button>
|
|
1010
|
+
</div>
|
|
1011
|
+
</div>
|
|
1012
|
+
|
|
1013
|
+
{/* Card con rounded-3xl */}
|
|
1014
|
+
<div className="rounded-3xl bg-white dark:bg-dark-bg-primary border border-border-primary dark:border-dark-border-primary p-8 shadow-lg">
|
|
1015
|
+
<div className="flex items-center gap-4 mb-4">
|
|
1016
|
+
<div className="rounded-full w-16 h-16 bg-primary-custom-100 dark:bg-dark-border-custom flex items-center justify-center">
|
|
1017
|
+
<span className="text-2xl">🎨</span>
|
|
1018
|
+
</div>
|
|
1019
|
+
<div>
|
|
1020
|
+
<h2 className="text-content-primary dark:text-dark-content-primary font-bold text-2xl">
|
|
1021
|
+
Premium Card (rounded-3xl)
|
|
1022
|
+
</h2>
|
|
1023
|
+
<p className="text-content-secondary dark:text-content-secondary">
|
|
1024
|
+
Con más padding y border radius
|
|
1025
|
+
</p>
|
|
1026
|
+
</div>
|
|
1027
|
+
</div>
|
|
1028
|
+
<p className="text-content-secondary dark:text-content-secondary mb-6">
|
|
1029
|
+
Esta card premium usa rounded-3xl (24px) para un look más suave y moderno.
|
|
1030
|
+
</p>
|
|
1031
|
+
<div className="flex gap-2">
|
|
1032
|
+
<span className="rounded-full bg-primary-custom-100 dark:bg-dark-border-custom text-primary-custom-600 dark:text-dark-content-primary px-3 py-1 text-xs font-bold">
|
|
1033
|
+
Premium
|
|
1034
|
+
</span>
|
|
1035
|
+
<span className="rounded-md bg-background-secondary dark:bg-dark-bg-primary border border-border-primary dark:border-dark-border-primary px-2 py-1 text-xs font-bold">
|
|
1036
|
+
Featured
|
|
1037
|
+
</span>
|
|
1038
|
+
</div>
|
|
1039
|
+
</div>
|
|
1040
|
+
|
|
1041
|
+
{/* Grid de cards pequeñas */}
|
|
1042
|
+
<div className="grid grid-cols-3 gap-4">
|
|
1043
|
+
{['Design', 'Development', 'Marketing'].map((title) => (
|
|
1044
|
+
<div
|
|
1045
|
+
key={title}
|
|
1046
|
+
className="rounded-xl bg-white dark:bg-dark-bg-primary border border-border-primary dark:border-dark-border-primary p-4 hover:border-primary-custom-300 dark:hover:border-dark-border-custom transition-colors"
|
|
1047
|
+
>
|
|
1048
|
+
<h3 className="text-content-primary dark:text-dark-content-primary font-bold mb-2">
|
|
1049
|
+
{title}
|
|
1050
|
+
</h3>
|
|
1051
|
+
<p className="text-content-secondary dark:text-content-secondary text-sm">
|
|
1052
|
+
Descripción breve
|
|
1053
|
+
</p>
|
|
1054
|
+
</div>
|
|
1055
|
+
))}
|
|
1056
|
+
</div>
|
|
1057
|
+
</div>
|
|
1058
|
+
</div>
|
|
1059
|
+
);
|
|
1060
|
+
};
|
|
1061
|
+
```
|
|
1062
|
+
|
|
1063
|
+
### Tokens de Color para Border Radius + Dark Mode
|
|
1064
|
+
|
|
1065
|
+
Referencia rápida para combinar border radius con colores en dark mode:
|
|
1066
|
+
|
|
1067
|
+
| Elemento | Light Mode | Dark Mode |
|
|
1068
|
+
|----------|------------|-----------|
|
|
1069
|
+
| **Background** | `bg-white` | `dark:bg-dark-bg-primary` |
|
|
1070
|
+
| **Border** | `border-border-primary` | `dark:border-dark-border-primary` |
|
|
1071
|
+
| **Border (custom)** | `border-primary-custom-300` | `dark:border-dark-border-custom` |
|
|
1072
|
+
| **Hover BG** | `hover:bg-background-secondary` | `dark:hover:bg-dark-bg-primary` |
|
|
1073
|
+
| **Hover Border** | `hover:border-primary-custom-300` | `dark:hover:border-dark-border-custom` |
|
|
1074
|
+
| **Button Primary BG** | `bg-primary-custom-600` | `dark:bg-dark-bg-inverse` |
|
|
1075
|
+
| **Button Primary Text** | `text-primary-inverse-content` | `dark:text-dark-content-inverse` |
|
|
1076
|
+
|
|
1077
|
+
### Recursos Adicionales sobre Dark Mode
|
|
1078
|
+
|
|
1079
|
+
Para más información sobre el modo oscuro:
|
|
1080
|
+
- Ver `docs/dark-mode-guide.md` - Guía completa de Dark Mode en Tailwind CSS
|
|
1081
|
+
- Ver `docs/colors.md` - Sistema de colores completo con tokens dark mode
|
|
1082
|
+
- Ver `docs/icons.md` - Sistema de iconos con ejemplos de dark mode
|
|
1083
|
+
- Ver `docs/typography.md` - Sistema tipográfico adaptado a dark mode
|
|
1084
|
+
- [Documentación oficial de Tailwind Dark Mode](https://tailwindcss.com/docs/dark-mode)
|
|
1085
|
+
|
|
1086
|
+
---
|
|
1087
|
+
|
|
1088
|
+
## Referencia Rápida
|
|
1089
|
+
|
|
1090
|
+
### Cheat Sheet: Por Componente
|
|
1091
|
+
|
|
1092
|
+
```tsx
|
|
1093
|
+
// ===== BOTONES Y CONTROLES (6px) =====
|
|
1094
|
+
<button className="rounded-md">Button</button>
|
|
1095
|
+
<input className="rounded-md" />
|
|
1096
|
+
<select className="rounded-md">...</select>
|
|
1097
|
+
|
|
1098
|
+
// ===== CARDS Y CONTAINERS (16px) =====
|
|
1099
|
+
<div className="rounded-2xl">Card</div>
|
|
1100
|
+
<div className="rounded-2xl">Panel</div>
|
|
1101
|
+
<div className="rounded-2xl">Modal pequeño</div>
|
|
1102
|
+
|
|
1103
|
+
// ===== CONTAINERS GRANDES (24px) =====
|
|
1104
|
+
<div className="rounded-3xl">Hero Card</div>
|
|
1105
|
+
<div className="rounded-3xl">Modal grande</div>
|
|
1106
|
+
|
|
1107
|
+
// ===== BADGES (2-8px) =====
|
|
1108
|
+
<span className="rounded-sm">Badge pequeño</span>
|
|
1109
|
+
<span className="rounded">Badge mediano</span>
|
|
1110
|
+
<span className="rounded-lg">Badge grande</span>
|
|
1111
|
+
|
|
1112
|
+
// ===== ELEMENTOS CIRCULARES (9999px) =====
|
|
1113
|
+
<img className="rounded-full" />
|
|
1114
|
+
<div className="rounded-full">Avatar</div>
|
|
1115
|
+
<button className="rounded-full">Icon button</button>
|
|
1116
|
+
<span className="rounded-full">Badge circular</span>
|
|
1117
|
+
```
|
|
1118
|
+
|
|
1119
|
+
### Cheat Sheet: Todas las Escalas
|
|
1120
|
+
|
|
1121
|
+
| Clase | Valor | Uso Común |
|
|
1122
|
+
|-------|-------|-----------|
|
|
1123
|
+
| `rounded-none` | 0px | Dividers, líneas horizontales |
|
|
1124
|
+
| `rounded-sm` | 2px | Badges muy pequeños |
|
|
1125
|
+
| `rounded` | 4px | Tags, badges pequeños |
|
|
1126
|
+
| `rounded-md` | 6px | **Botones, inputs, selects** ⭐ |
|
|
1127
|
+
| `rounded-lg` | 8px | Cards pequeños, tabs |
|
|
1128
|
+
| `rounded-xl` | 12px | Cards medianos, tooltips |
|
|
1129
|
+
| `rounded-2xl` | 16px | **Cards, paneles, modales** ⭐ |
|
|
1130
|
+
| `rounded-3xl` | 24px | Containers muy grandes |
|
|
1131
|
+
| `rounded-full` | 9999px | **Avatares, badges circulares** ⭐ |
|
|
1132
|
+
|
|
1133
|
+
### Cheat Sheet: Por Tamaño
|
|
1134
|
+
|
|
1135
|
+
```tsx
|
|
1136
|
+
// XS (< 32px) - rounded-sm o rounded
|
|
1137
|
+
<span className="rounded-sm w-4 h-4" />
|
|
1138
|
+
|
|
1139
|
+
// SM (32-48px) - rounded-md
|
|
1140
|
+
<button className="rounded-md h-8" />
|
|
1141
|
+
|
|
1142
|
+
// MD (48-96px) - rounded-lg o rounded-xl
|
|
1143
|
+
<div className="rounded-xl w-20 h-20" />
|
|
1144
|
+
|
|
1145
|
+
// LG (96-200px) - rounded-2xl
|
|
1146
|
+
<div className="rounded-2xl w-40 h-40" />
|
|
1147
|
+
|
|
1148
|
+
// XL (> 200px) - rounded-3xl
|
|
1149
|
+
<div className="rounded-3xl w-80" />
|
|
1150
|
+
|
|
1151
|
+
// Circular - rounded-full
|
|
1152
|
+
<div className="rounded-full w-12 h-12" />
|
|
1153
|
+
```
|
|
1154
|
+
|
|
1155
|
+
### Cheat Sheet: Configuración Tailwind
|
|
1156
|
+
|
|
1157
|
+
```javascript
|
|
1158
|
+
// tailwind.config.js
|
|
1159
|
+
module.exports = {
|
|
1160
|
+
theme: {
|
|
1161
|
+
extend: {
|
|
1162
|
+
borderRadius: {
|
|
1163
|
+
'md': '6px', // Personalizado (default Tailwind: 6px ✅)
|
|
1164
|
+
'2xl': '16px', // Personalizado (default Tailwind: 24px ⚠️)
|
|
1165
|
+
'3xl': '24px', // Personalizado (default Tailwind: 32px ⚠️)
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
}
|
|
1169
|
+
}
|
|
1170
|
+
```
|
|
1171
|
+
|
|
1172
|
+
### Cheat Sheet: Variantes Direccionales
|
|
1173
|
+
|
|
1174
|
+
Tailwind permite aplicar border radius a esquinas específicas:
|
|
1175
|
+
|
|
1176
|
+
```tsx
|
|
1177
|
+
// Top
|
|
1178
|
+
<div className="rounded-t-2xl">Solo arriba</div>
|
|
1179
|
+
|
|
1180
|
+
// Bottom
|
|
1181
|
+
<div className="rounded-b-2xl">Solo abajo</div>
|
|
1182
|
+
|
|
1183
|
+
// Left
|
|
1184
|
+
<div className="rounded-l-2xl">Solo izquierda</div>
|
|
1185
|
+
|
|
1186
|
+
// Right
|
|
1187
|
+
<div className="rounded-r-2xl">Solo derecha</div>
|
|
1188
|
+
|
|
1189
|
+
// Esquinas individuales
|
|
1190
|
+
<div className="rounded-tl-2xl">Top-left</div>
|
|
1191
|
+
<div className="rounded-tr-2xl">Top-right</div>
|
|
1192
|
+
<div className="rounded-br-2xl">Bottom-right</div>
|
|
1193
|
+
<div className="rounded-bl-2xl">Bottom-left</div>
|
|
1194
|
+
```
|
|
1195
|
+
|
|
1196
|
+
**Ejemplo práctico**: Modal con esquinas redondeadas solo arriba
|
|
1197
|
+
|
|
1198
|
+
```tsx
|
|
1199
|
+
<div className="fixed inset-0 flex items-end">
|
|
1200
|
+
<div className="rounded-t-3xl bg-white w-full p-6">
|
|
1201
|
+
{/* Modal que sube desde abajo */}
|
|
1202
|
+
</div>
|
|
1203
|
+
</div>
|
|
1204
|
+
```
|
|
1205
|
+
|
|
1206
|
+
---
|
|
1207
|
+
|
|
1208
|
+
## Recursos Adicionales
|
|
1209
|
+
|
|
1210
|
+
### Enlaces Útiles
|
|
1211
|
+
|
|
1212
|
+
- **Tailwind Border Radius**: https://tailwindcss.com/docs/border-radius
|
|
1213
|
+
- **CSS border-radius**: https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius
|
|
1214
|
+
- **Border Radius Generator**: https://border-radius.com
|
|
1215
|
+
|
|
1216
|
+
### Archivos Relacionados
|
|
1217
|
+
|
|
1218
|
+
- `tailwind.config.js` - Configuración de borderRadius (líneas 96-101)
|
|
1219
|
+
- `src/components/Button/Button.tsx` - Ejemplo de uso (línea 108)
|
|
1220
|
+
- `docs/colors.md` - Sistema de colores
|
|
1221
|
+
- `docs/typography.md` - Sistema tipográfico
|
|
1222
|
+
- `docs/icons.md` - Sistema de iconos
|
|
1223
|
+
|
|
1224
|
+
### Herramientas de Testing
|
|
1225
|
+
|
|
1226
|
+
```tsx
|
|
1227
|
+
// Componente para visualizar todas las escalas
|
|
1228
|
+
export const BorderRadiusDemo = () => {
|
|
1229
|
+
const scales = [
|
|
1230
|
+
{ name: 'rounded-none', value: '0px' },
|
|
1231
|
+
{ name: 'rounded-sm', value: '2px' },
|
|
1232
|
+
{ name: 'rounded', value: '4px' },
|
|
1233
|
+
{ name: 'rounded-md', value: '6px' },
|
|
1234
|
+
{ name: 'rounded-lg', value: '8px' },
|
|
1235
|
+
{ name: 'rounded-xl', value: '12px' },
|
|
1236
|
+
{ name: 'rounded-2xl', value: '16px' },
|
|
1237
|
+
{ name: 'rounded-3xl', value: '24px' },
|
|
1238
|
+
{ name: 'rounded-full', value: '9999px' },
|
|
1239
|
+
];
|
|
1240
|
+
|
|
1241
|
+
return (
|
|
1242
|
+
<div className="grid grid-cols-3 gap-6 p-8">
|
|
1243
|
+
{scales.map((scale) => (
|
|
1244
|
+
<div key={scale.name} className="text-center">
|
|
1245
|
+
<div
|
|
1246
|
+
className={`${scale.name} bg-primary-custom-600 w-24 h-24 mx-auto mb-4`}
|
|
1247
|
+
/>
|
|
1248
|
+
<p className="font-bold">{scale.name}</p>
|
|
1249
|
+
<p className="text-sm text-content-secondary">{scale.value}</p>
|
|
1250
|
+
</div>
|
|
1251
|
+
))}
|
|
1252
|
+
</div>
|
|
1253
|
+
);
|
|
1254
|
+
};
|
|
1255
|
+
```
|
|
1256
|
+
|
|
1257
|
+
---
|
|
1258
|
+
|
|
1259
|
+
**Última actualización**: 2025-11-11
|
|
1260
|
+
**Versión**: 1.0.0
|
|
1261
|
+
**Mantenedor**: Siesa UI Kit Team
|