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
package/dist/siesa-ui-kit.cjs
DELETED
|
@@ -1,1260 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),y=require("react"),q=({type:t="default",size:s="base",iconOnly:n=!1,leftIcon:r,rightIcon:a,children:o,disabled:l=!1,className:c="",onClick:d,htmlType:p="button",fullWidth:i=!1,ariaLabel:b,badge:x=!1,badgeCount:g,badgeColor:m="red",...v})=>{const u={xs:n?"h-6 w-6 p-1":"h-6 py-1 px-2 gap-2",sm:n?"h-7 w-7 p-1.5":"h-7 py-1 px-2 gap-2",base:n?"h-8 w-8 p-2":"h-8 py-1.5 px-2.5 gap-2",l:n?"h-9 w-9 p-2.5":"h-9 py-2 px-3 gap-3",xl:n?"h-10 w-10 p-3":"h-10 py-2 px-4 gap-3"},h={xs:"w-4 h-4",sm:"w-4 h-4",base:"w-4 h-4",l:"w-4 h-4",xl:"w-4 h-4"},w={xs:"text-xs",sm:"text-sm",base:"text-sm",l:"text-sm",xl:"text-sm"},f={default:`
|
|
2
|
-
bg-primary-custom-600
|
|
3
|
-
text-primary-inverse-content
|
|
4
|
-
border
|
|
5
|
-
border-primary-inverse-border
|
|
6
|
-
shadow-button-inset
|
|
7
|
-
hover:bg-primary-custom-500
|
|
8
|
-
active:scale-95
|
|
9
|
-
transition-all
|
|
10
|
-
duration-150
|
|
11
|
-
dark:bg-dark-bg-inverse
|
|
12
|
-
dark:text-dark-content-inverse
|
|
13
|
-
dark:border-dark-border-inverse
|
|
14
|
-
dark:hover:bg-dark-bg-inverse/90
|
|
15
|
-
`,outline:`
|
|
16
|
-
bg-transparent
|
|
17
|
-
text-primary-custom-600
|
|
18
|
-
border
|
|
19
|
-
border-primary-custom-300
|
|
20
|
-
shadow-sm
|
|
21
|
-
hover:bg-primary-custom-100
|
|
22
|
-
active:scale-95
|
|
23
|
-
transition-all
|
|
24
|
-
duration-150
|
|
25
|
-
dark:text-dark-content-custom
|
|
26
|
-
dark:border-dark-border-custom
|
|
27
|
-
dark:hover:bg-dark-bg-custom/20
|
|
28
|
-
`,plain:`
|
|
29
|
-
bg-transparent
|
|
30
|
-
text-primary-custom-600
|
|
31
|
-
border
|
|
32
|
-
border-transparent
|
|
33
|
-
hover:bg-hover-overlay
|
|
34
|
-
active:scale-95
|
|
35
|
-
transition-all
|
|
36
|
-
duration-150
|
|
37
|
-
dark:text-dark-content-custom
|
|
38
|
-
dark:hover:bg-hover-overlay-dark
|
|
39
|
-
`},k=`
|
|
40
|
-
inline-flex
|
|
41
|
-
items-center
|
|
42
|
-
justify-center
|
|
43
|
-
rounded-md
|
|
44
|
-
font-bold
|
|
45
|
-
whitespace-nowrap
|
|
46
|
-
focus:outline-none
|
|
47
|
-
focus:ring-4
|
|
48
|
-
focus:ring-primary-custom-400
|
|
49
|
-
focus:ring-offset-2
|
|
50
|
-
focus:ring-offset-primary-custom-100
|
|
51
|
-
dark:focus:ring-dark-border-custom
|
|
52
|
-
dark:focus:ring-offset-dark-bg-primary
|
|
53
|
-
disabled:opacity-50
|
|
54
|
-
disabled:cursor-not-allowed
|
|
55
|
-
disabled:pointer-events-none
|
|
56
|
-
`,j=i?"w-full":"",C=[k,u[s],f[t],j,c].join(" ").replace(/\s+/g," ").trim(),B=M=>M?e.jsx("span",{className:`inline-flex items-center justify-center ${h[s]}`,children:M}):null,R=()=>n?B(r):e.jsxs(e.Fragment,{children:[r&&B(r),o&&e.jsx("span",{className:w[s],children:o}),a&&B(a)]}),_={zinc:{bg:"bg-zinc-600",text:"text-white"},red:{bg:"bg-red-700",text:"text-white"},orange:{bg:"bg-orange-700",text:"text-white"},amber:{bg:"bg-amber-700",text:"text-white"},yellow:{bg:"bg-yellow-700",text:"text-white"},lime:{bg:"bg-lime-700",text:"text-white"},green:{bg:"bg-green-700",text:"text-white"},emerald:{bg:"bg-emerald-700",text:"text-white"},teal:{bg:"bg-teal-700",text:"text-white"},cyan:{bg:"bg-cyan-700",text:"text-white"},sky:{bg:"bg-sky-700",text:"text-white"},blue:{bg:"bg-blue-700",text:"text-white"},indigo:{bg:"bg-indigo-700",text:"text-white"},violet:{bg:"bg-violet-700",text:"text-white"},purple:{bg:"bg-purple-700",text:"text-white"},fuchsia:{bg:"bg-fuchsia-700",text:"text-white"},pink:{bg:"bg-pink-700",text:"text-white"},rose:{bg:"bg-rose-700",text:"text-white"},primary:{bg:"bg-primary-custom-600",text:"text-white"},secondary:{bg:"bg-zinc-600",text:"text-white"},tertiary:{bg:"bg-zinc-600",text:"text-white"}},I=_[m]||_.red,z=()=>!x&&g===void 0?null:g!==void 0?e.jsx("span",{className:`
|
|
57
|
-
absolute
|
|
58
|
-
-top-1
|
|
59
|
-
-right-1
|
|
60
|
-
flex
|
|
61
|
-
items-center
|
|
62
|
-
justify-center
|
|
63
|
-
min-w-[16px]
|
|
64
|
-
h-4
|
|
65
|
-
px-1
|
|
66
|
-
rounded-full
|
|
67
|
-
text-[10px]
|
|
68
|
-
font-bold
|
|
69
|
-
leading-none
|
|
70
|
-
${I.bg}
|
|
71
|
-
${I.text}
|
|
72
|
-
pointer-events-none
|
|
73
|
-
`.trim().replace(/\s+/g," "),"aria-label":`${g} notificaciones`,children:g>99?"99+":g}):e.jsx("span",{className:`
|
|
74
|
-
absolute
|
|
75
|
-
-top-1
|
|
76
|
-
-right-1
|
|
77
|
-
w-2
|
|
78
|
-
h-2
|
|
79
|
-
rounded-full
|
|
80
|
-
${I.bg}
|
|
81
|
-
pointer-events-none
|
|
82
|
-
`.trim().replace(/\s+/g," "),"aria-label":"Notificación"});return e.jsxs("button",{type:p,className:`${C} ${x||g!==void 0?"relative":""}`,disabled:l,onClick:d,"aria-label":b,...v,children:[R(),z()]})},Y=y.forwardRef(({label:t,labelSecondary:s,helperText:n,error:r=!1,errorMessage:a,leftIcon:o,rightIcon:l,fullWidth:c=!1,className:d="",disabled:p=!1,id:i,...b},x)=>{const g=i||`input-${Math.random().toString(36).substr(2,9)}`,m=`
|
|
83
|
-
w-full
|
|
84
|
-
px-3
|
|
85
|
-
py-1.5
|
|
86
|
-
text-sm
|
|
87
|
-
leading-6
|
|
88
|
-
font-normal
|
|
89
|
-
text-content-primary
|
|
90
|
-
bg-bg-primary
|
|
91
|
-
border
|
|
92
|
-
border-border-primary
|
|
93
|
-
rounded-md
|
|
94
|
-
outline-none
|
|
95
|
-
transition-all
|
|
96
|
-
duration-150
|
|
97
|
-
placeholder:text-content-tertiary
|
|
98
|
-
dark:bg-dark-bg-primary
|
|
99
|
-
dark:border-dark-border-primary
|
|
100
|
-
dark:text-dark-content-primary
|
|
101
|
-
dark:placeholder:text-dark-content-tertiary
|
|
102
|
-
`,v=p?`
|
|
103
|
-
opacity-50
|
|
104
|
-
cursor-not-allowed
|
|
105
|
-
bg-bg-secondary
|
|
106
|
-
dark:bg-dark-bg-secondary
|
|
107
|
-
`:`
|
|
108
|
-
hover:border-primary-custom-600
|
|
109
|
-
focus:border-primary-custom-600
|
|
110
|
-
focus:ring-2
|
|
111
|
-
focus:ring-primary-custom-400
|
|
112
|
-
focus:ring-offset-2
|
|
113
|
-
dark:hover:border-dark-border-custom
|
|
114
|
-
dark:focus:border-dark-border-custom
|
|
115
|
-
dark:focus:ring-dark-border-custom
|
|
116
|
-
dark:focus:ring-offset-dark-bg-primary
|
|
117
|
-
`,u=r?`
|
|
118
|
-
!border-error-border
|
|
119
|
-
focus:!ring-error-border/30
|
|
120
|
-
focus:!ring-offset-2
|
|
121
|
-
dark:!border-error-border
|
|
122
|
-
dark:focus:!ring-error-border/30
|
|
123
|
-
dark:focus:!ring-offset-dark-bg-primary
|
|
124
|
-
`:"",h=c?"w-full":"w-[265px]",w=f=>{if(!f)return null;const k=f.props.className||"";return y.cloneElement(f,{className:`w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary ${k}`})};return e.jsxs("div",{className:`flex flex-col gap-2 ${h} ${d}`,children:[t&&e.jsxs("label",{htmlFor:g,className:"flex items-center w-full font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:[e.jsx("span",{className:"flex-1",children:t}),s&&e.jsx("span",{className:"text-xs leading-4 text-primary-custom-600 dark:text-primary-custom-600",children:s})]}),e.jsxs("div",{className:"relative flex items-center",children:[o&&e.jsx("div",{className:"absolute left-3 pointer-events-none",children:w(o)}),e.jsx("input",{ref:x,id:g,disabled:p,className:`
|
|
125
|
-
${m}
|
|
126
|
-
${v}
|
|
127
|
-
${u}
|
|
128
|
-
${o?"pl-9":""}
|
|
129
|
-
${l?"pr-9":""}
|
|
130
|
-
`.trim().replace(/\s+/g," "),...b}),l&&e.jsx("div",{className:"absolute right-3 pointer-events-none",children:w(l)})]}),(n||a)&&e.jsx("p",{className:`
|
|
131
|
-
text-xs
|
|
132
|
-
leading-5
|
|
133
|
-
${r?"text-error-content dark:text-error-content":"text-content-tertiary dark:text-dark-content-tertiary"}
|
|
134
|
-
`.trim().replace(/\s+/g," "),children:r&&a?a:n})]})});Y.displayName="Input";const ee=y.forwardRef(({label:t,description:s,helperText:n,error:r=!1,errorMessage:a,fullWidth:o=!1,resize:l="vertical",className:c="",disabled:d=!1,id:p,rows:i=4,...b},x)=>{const g=p||`textarea-${Math.random().toString(36).substr(2,9)}`,m=`
|
|
135
|
-
w-full
|
|
136
|
-
px-3
|
|
137
|
-
pr-1.5
|
|
138
|
-
py-1.5
|
|
139
|
-
text-base
|
|
140
|
-
leading-6
|
|
141
|
-
font-normal
|
|
142
|
-
bg-bg-primary
|
|
143
|
-
border
|
|
144
|
-
border-border-primary
|
|
145
|
-
rounded-lg
|
|
146
|
-
outline-none
|
|
147
|
-
transition-all
|
|
148
|
-
duration-150
|
|
149
|
-
placeholder:text-content-tertiary
|
|
150
|
-
dark:bg-dark-bg-primary
|
|
151
|
-
dark:border-dark-border-primary
|
|
152
|
-
dark:text-dark-content-primary
|
|
153
|
-
dark:placeholder:text-dark-content-tertiary
|
|
154
|
-
`,v=d?`
|
|
155
|
-
opacity-50
|
|
156
|
-
cursor-not-allowed
|
|
157
|
-
bg-bg-secondary
|
|
158
|
-
dark:bg-dark-bg-secondary
|
|
159
|
-
`:`
|
|
160
|
-
hover:border-zinc-400
|
|
161
|
-
focus:border-2
|
|
162
|
-
focus:border-primary-custom-600
|
|
163
|
-
dark:hover:border-zinc-500
|
|
164
|
-
dark:focus:border-2
|
|
165
|
-
dark:focus:border-dark-border-custom
|
|
166
|
-
`,u=r?`
|
|
167
|
-
!border-error-border
|
|
168
|
-
focus:!border-2
|
|
169
|
-
focus:!border-error-border
|
|
170
|
-
dark:!border-error-border
|
|
171
|
-
dark:focus:!border-2
|
|
172
|
-
dark:focus:!border-error-border
|
|
173
|
-
`:"",h=l==="none"?"resize-none":l==="vertical"?"resize-y":l==="horizontal"?"resize-x":"resize",w=o?"w-full":"w-[312px]";return e.jsxs("div",{className:`flex flex-col gap-2 ${w} ${c}`,children:[(t||s)&&e.jsxs("div",{className:"flex flex-col gap-1 w-full",children:[t&&e.jsx("label",{htmlFor:g,className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:t}),s&&e.jsx("p",{className:"text-sm leading-5 text-content-secondary dark:text-dark-content-secondary",children:s})]}),e.jsx("textarea",{ref:x,id:g,disabled:d,rows:i,className:`
|
|
174
|
-
${m}
|
|
175
|
-
${v}
|
|
176
|
-
${u}
|
|
177
|
-
${h}
|
|
178
|
-
`.trim().replace(/\s+/g," "),...b}),(n||a)&&e.jsx("p",{className:`
|
|
179
|
-
text-sm
|
|
180
|
-
leading-5
|
|
181
|
-
text-content-tertiary
|
|
182
|
-
dark:text-dark-content-tertiary
|
|
183
|
-
`.trim().replace(/\s+/g," "),children:r&&a?a:n})]})});ee.displayName="Textarea";const re=y.forwardRef(({label:t,description:s,checked:n=!1,indeterminate:r=!1,disabled:a=!1,className:o="",id:l,onChange:c,...d},p)=>{const i=y.useRef(null),b=p||i,x=l||`checkbox-${Math.random().toString(36).substr(2,9)}`;y.useEffect(()=>{b.current&&(b.current.indeterminate=r)},[r,b]);const u=[`
|
|
184
|
-
w-4
|
|
185
|
-
h-4
|
|
186
|
-
rounded
|
|
187
|
-
border
|
|
188
|
-
border-border-primary
|
|
189
|
-
bg-bg-primary
|
|
190
|
-
transition-all
|
|
191
|
-
duration-150
|
|
192
|
-
flex
|
|
193
|
-
items-center
|
|
194
|
-
justify-center
|
|
195
|
-
dark:bg-dark-bg-primary
|
|
196
|
-
dark:border-dark-border-primary
|
|
197
|
-
`,a?`
|
|
198
|
-
opacity-50
|
|
199
|
-
cursor-not-allowed
|
|
200
|
-
`:n||r?`
|
|
201
|
-
peer-hover:border-[#50a5f7]
|
|
202
|
-
peer-focus:ring-2
|
|
203
|
-
peer-focus:ring-primary-custom-400/20
|
|
204
|
-
peer-focus:border-primary-custom-600
|
|
205
|
-
dark:peer-hover:border-[#50a5f7]
|
|
206
|
-
dark:peer-focus:border-dark-border-custom
|
|
207
|
-
dark:peer-focus:ring-dark-border-custom/20
|
|
208
|
-
`:`
|
|
209
|
-
peer-hover:border-[#b6b6b9]
|
|
210
|
-
peer-focus:ring-2
|
|
211
|
-
peer-focus:ring-primary-custom-400/20
|
|
212
|
-
peer-focus:border-primary-custom-600
|
|
213
|
-
dark:peer-hover:border-[#b6b6b9]
|
|
214
|
-
dark:peer-focus:border-dark-border-custom
|
|
215
|
-
dark:peer-focus:ring-dark-border-custom/20
|
|
216
|
-
`,n||r?`
|
|
217
|
-
!bg-primary-custom-600
|
|
218
|
-
!border-primary-custom-500
|
|
219
|
-
shadow-button-inset
|
|
220
|
-
dark:!bg-dark-bg-inverse
|
|
221
|
-
dark:!border-dark-bg-inverse
|
|
222
|
-
`:"",a?"cursor-not-allowed":"cursor-pointer"].join(" ").replace(/\s+/g," ").trim();return e.jsxs("div",{className:`inline-flex gap-3 items-start ${o}`,children:[e.jsxs("div",{className:"flex items-center justify-center h-5 w-4 shrink-0",children:[e.jsx("input",{ref:b,type:"checkbox",id:x,checked:n,disabled:a,onChange:c,className:"peer sr-only",...d}),e.jsxs("label",{htmlFor:x,className:u,children:[n&&!r&&e.jsx("svg",{className:"w-3 h-3 text-primary-inverse-content pointer-events-none",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M10 3L4.5 8.5L2 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),r&&e.jsx("svg",{className:"w-3 h-3 text-primary-inverse-content pointer-events-none",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M2 6H10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})]})]}),(t||s)&&e.jsxs("label",{htmlFor:x,className:`flex-1 flex flex-col gap-1 text-sm leading-5 ${a?"cursor-not-allowed opacity-50":"cursor-pointer"}`,children:[t&&e.jsx("span",{className:"font-bold text-content-primary dark:text-dark-content-primary",children:t}),s&&e.jsx("span",{className:"font-normal text-content-secondary dark:text-content-secondary",children:s})]})]})});re.displayName="Checkbox";const te=y.forwardRef(({label:t,description:s,checked:n=!1,disabled:r=!1,className:a="",id:o,onChange:l,value:c,name:d,...p},i)=>{const b=o||`radio-${Math.random().toString(36).substr(2,9)}`,x=`
|
|
223
|
-
w-4
|
|
224
|
-
h-4
|
|
225
|
-
rounded-full
|
|
226
|
-
border
|
|
227
|
-
border-border-primary
|
|
228
|
-
bg-bg-primary
|
|
229
|
-
transition-all
|
|
230
|
-
duration-150
|
|
231
|
-
flex
|
|
232
|
-
items-center
|
|
233
|
-
justify-center
|
|
234
|
-
dark:bg-dark-bg-primary
|
|
235
|
-
dark:border-dark-border-primary
|
|
236
|
-
`,g=r?`
|
|
237
|
-
opacity-50
|
|
238
|
-
cursor-not-allowed
|
|
239
|
-
`:`
|
|
240
|
-
peer-hover:border-primary-custom-600
|
|
241
|
-
peer-focus:ring-2
|
|
242
|
-
peer-focus:ring-primary-custom-400
|
|
243
|
-
peer-focus:border-primary-custom-600
|
|
244
|
-
dark:peer-hover:border-dark-border-custom
|
|
245
|
-
dark:peer-focus:ring-dark-border-custom
|
|
246
|
-
dark:peer-focus:border-dark-border-custom
|
|
247
|
-
`,m=n?`
|
|
248
|
-
!bg-primary-custom-600
|
|
249
|
-
!border-primary-inverse-border
|
|
250
|
-
shadow-[0px_2px_0px_0px_inset_rgba(255,255,255,0.15)]
|
|
251
|
-
dark:!bg-dark-bg-inverse
|
|
252
|
-
dark:!border-dark-bg-inverse
|
|
253
|
-
`:"";return e.jsxs("div",{className:`flex gap-3 items-start ${a}`,children:[e.jsxs("div",{className:"flex items-center justify-center h-5 w-4 shrink-0",children:[e.jsx("input",{ref:i,type:"radio",id:b,checked:n,disabled:r,onChange:l,value:c,name:d,className:"peer sr-only",...p}),e.jsx("label",{htmlFor:b,className:`
|
|
254
|
-
${x}
|
|
255
|
-
${g}
|
|
256
|
-
${m}
|
|
257
|
-
${r?"cursor-not-allowed":"cursor-pointer"}
|
|
258
|
-
`.trim().replace(/\s+/g," "),children:n&&e.jsx("div",{className:"w-1.5 h-1.5 bg-white rounded-full dark:bg-dark-content-inverse"})})]}),(t||s)&&e.jsxs("label",{htmlFor:b,className:`flex-1 flex flex-col gap-1 text-sm leading-5 ${r?"cursor-not-allowed opacity-50":"cursor-pointer"}`,children:[t&&e.jsx("span",{className:"font-bold text-content-primary dark:text-dark-content-primary",children:t}),s&&e.jsx("span",{className:"font-normal text-content-secondary dark:text-content-secondary",children:s})]})]})});te.displayName="Radio";const se=y.forwardRef(({label:t,description:s,labelPosition:n="leading",checked:r=!1,disabled:a=!1,className:o="",id:l,onChange:c,ariaLabel:d,...p},i)=>{const b=l||`switch-${Math.random().toString(36).substr(2,9)}`,x=`
|
|
259
|
-
w-8
|
|
260
|
-
h-5
|
|
261
|
-
rounded-xl
|
|
262
|
-
border
|
|
263
|
-
overflow-hidden
|
|
264
|
-
relative
|
|
265
|
-
transition-all
|
|
266
|
-
duration-200
|
|
267
|
-
`,g=()=>a?r?`
|
|
268
|
-
bg-primary-custom-600
|
|
269
|
-
border-primary-inverse-border
|
|
270
|
-
opacity-50
|
|
271
|
-
cursor-not-allowed
|
|
272
|
-
dark:bg-primary-custom-600
|
|
273
|
-
dark:border-primary-inverse-border
|
|
274
|
-
`:`
|
|
275
|
-
bg-[#fafafa]
|
|
276
|
-
border-border-primary
|
|
277
|
-
opacity-50
|
|
278
|
-
cursor-not-allowed
|
|
279
|
-
dark:bg-dark-bg-primary
|
|
280
|
-
dark:border-dark-border-primary
|
|
281
|
-
`:r?`
|
|
282
|
-
bg-primary-custom-600
|
|
283
|
-
border-primary-inverse-border
|
|
284
|
-
cursor-pointer
|
|
285
|
-
peer-hover:border-[#307cc5]
|
|
286
|
-
peer-focus:shadow-[0px_0px_0px_2px_#dbeefe,0px_1px_2px_0px_rgba(0,0,0,0.05),0px_0px_0px_4px_#60b6fa]
|
|
287
|
-
dark:bg-primary-custom-600
|
|
288
|
-
dark:border-primary-inverse-border
|
|
289
|
-
dark:peer-hover:border-[#307cc5]
|
|
290
|
-
dark:peer-focus:shadow-[0px_0px_0px_2px_#dbeefe,0px_1px_2px_0px_rgba(0,0,0,0.05),0px_0px_0px_4px_#60b6fa]
|
|
291
|
-
`:`
|
|
292
|
-
bg-[#fafafa]
|
|
293
|
-
border-border-primary
|
|
294
|
-
cursor-pointer
|
|
295
|
-
peer-hover:border-[#b6b6b9]
|
|
296
|
-
peer-focus:shadow-[0px_0px_0px_2px_#dbeefe,0px_1px_2px_0px_rgba(0,0,0,0.05),0px_0px_0px_4px_#60b6fa]
|
|
297
|
-
dark:bg-dark-bg-primary
|
|
298
|
-
dark:border-dark-border-primary
|
|
299
|
-
dark:peer-hover:border-[#b6b6b9]
|
|
300
|
-
dark:peer-focus:shadow-[0px_0px_0px_2px_#dbeefe,0px_1px_2px_0px_rgba(0,0,0,0.05),0px_0px_0px_4px_#60b6fa]
|
|
301
|
-
`,m=()=>{const f=`
|
|
302
|
-
absolute
|
|
303
|
-
w-4
|
|
304
|
-
h-4
|
|
305
|
-
bg-white
|
|
306
|
-
rounded-[10px]
|
|
307
|
-
border
|
|
308
|
-
top-1/2
|
|
309
|
-
-translate-y-1/2
|
|
310
|
-
transition-all
|
|
311
|
-
duration-200
|
|
312
|
-
`,k=r?"left-[13px]":"left-px";return a?`${f} ${k} ${r?"border-primary-inverse-border dark:border-primary-inverse-border":"border-border-primary dark:border-dark-border-primary"}`:`${f} ${k} ${r?`
|
|
313
|
-
border-primary-inverse-border
|
|
314
|
-
peer-hover:border-[#307cc5]
|
|
315
|
-
dark:border-primary-inverse-border
|
|
316
|
-
dark:peer-hover:border-[#307cc5]
|
|
317
|
-
`:`
|
|
318
|
-
border-border-primary
|
|
319
|
-
peer-hover:border-[#b6b6b9]
|
|
320
|
-
dark:border-dark-border-primary
|
|
321
|
-
dark:peer-hover:border-[#b6b6b9]
|
|
322
|
-
`}`},v=[x,g()].join(" ").replace(/\s+/g," ").trim(),u=m().replace(/\s+/g," ").trim(),h=t||s?e.jsxs("label",{htmlFor:b,className:`flex-1 flex flex-col gap-1 text-sm leading-5 ${a?"cursor-not-allowed opacity-50":"cursor-pointer"}`,children:[t&&e.jsx("span",{className:"font-bold text-content-primary dark:text-dark-content-primary",children:t}),s&&e.jsx("span",{className:"font-normal text-content-secondary dark:text-content-secondary",children:s})]}):null,w=e.jsxs("div",{className:"flex items-center justify-center shrink-0",children:[e.jsx("input",{ref:i,type:"checkbox",id:b,checked:r,disabled:a,onChange:c,className:"peer sr-only","aria-label":d||t,...p}),e.jsx("label",{htmlFor:b,className:v,"aria-hidden":"true",children:e.jsx("div",{className:u})})]});return e.jsx("div",{className:`flex gap-2 items-center w-[344px] ${o}`,children:n==="leading"?e.jsxs(e.Fragment,{children:[h,w]}):e.jsxs(e.Fragment,{children:[w,h]})})});se.displayName="Switch";const ae=y.forwardRef(({size:t="10",type:s="circular",src:n,alt:r="",initials:a,className:o="",...l},c)=>{const d={4:"w-5 h-5",6:"w-6 h-6",8:"w-8 h-8",10:"w-10 h-10"},p={4:"text-xs",6:"text-xs",8:"text-sm",10:"text-base"},i={circular:"rounded-full",rounded:"rounded-md"},b=`
|
|
323
|
-
relative
|
|
324
|
-
inline-flex
|
|
325
|
-
items-center
|
|
326
|
-
justify-center
|
|
327
|
-
overflow-hidden
|
|
328
|
-
${d[t]}
|
|
329
|
-
${i[s]}
|
|
330
|
-
`;return n?e.jsx("div",{ref:c,className:`${b} ${o}`.trim().replace(/\s+/g," "),children:e.jsx("img",{src:n,alt:r,className:"w-full h-full object-cover",...l})}):a?e.jsx("div",{ref:c,className:`
|
|
331
|
-
${b}
|
|
332
|
-
${p[t]}
|
|
333
|
-
bg-content-primary
|
|
334
|
-
text-white
|
|
335
|
-
font-normal
|
|
336
|
-
dark:bg-dark-bg-inverse
|
|
337
|
-
dark:text-dark-content-inverse
|
|
338
|
-
${o}
|
|
339
|
-
`.trim().replace(/\s+/g," "),children:e.jsx("span",{className:"leading-none",children:a})}):e.jsx("div",{ref:c,className:`
|
|
340
|
-
${b}
|
|
341
|
-
bg-background-secondary
|
|
342
|
-
dark:bg-dark-bg-primary
|
|
343
|
-
${o}
|
|
344
|
-
`.trim().replace(/\s+/g," ")})});ae.displayName="Avatar";const ne=y.forwardRef(({type:t="default",className:s="",...n},r)=>{const l=["w-full h-px border-0",{default:"bg-border-primary dark:bg-dark-border-primary",soft:"bg-border-secondary dark:bg-gray-700"}[t],s].join(" ").replace(/\s+/g," ").trim();return e.jsx("hr",{ref:r,className:l,...n})});ne.displayName="Divider";const oe=y.forwardRef(({term:t,details:s,className:n="",...r},a)=>{const o=`
|
|
345
|
-
flex
|
|
346
|
-
flex-wrap
|
|
347
|
-
gap-1
|
|
348
|
-
items-start
|
|
349
|
-
py-2.5
|
|
350
|
-
border-b
|
|
351
|
-
border-border-secondary
|
|
352
|
-
dark:border-gray-700
|
|
353
|
-
`,l="flex-1 min-w-[180px]",c=[o,n].join(" ").replace(/\s+/g," ").trim();return e.jsxs("div",{ref:a,className:c,...r,children:[e.jsx("div",{className:l,children:e.jsx("p",{className:"text-sm leading-5 text-content-secondary dark:text-gray-400 font-normal",children:t})}),e.jsx("div",{className:l,children:e.jsx("p",{className:"text-sm leading-5 text-content-primary dark:text-dark-content-primary font-normal",children:s})})]})});oe.displayName="DescriptionList";const ie=y.forwardRef(({title:t,description:s,children:n,actions:r,onCancel:a,onConfirm:o,cancelText:l="Cancelar",confirmText:c="Confirmar",className:d="",...p},i)=>{const b=r||e.jsxs(e.Fragment,{children:[a&&e.jsx(q,{type:"plain",size:"base",onClick:a,children:l}),o&&e.jsx(q,{type:"default",size:"base",onClick:o,children:c})]});return e.jsx("div",{ref:i,className:`
|
|
354
|
-
w-[512px]
|
|
355
|
-
bg-white
|
|
356
|
-
dark:bg-dark-bg-primary
|
|
357
|
-
border
|
|
358
|
-
border-border-primary
|
|
359
|
-
dark:border-dark-border-primary
|
|
360
|
-
rounded-xl
|
|
361
|
-
${d}
|
|
362
|
-
`.trim().replace(/\s+/g," "),...p,children:e.jsxs("div",{className:"p-6 flex flex-col gap-4",children:[e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx("p",{className:"text-sm leading-5 font-bold text-content-primary dark:text-dark-content-primary",children:t}),s&&e.jsx("p",{className:"text-sm leading-5 font-normal text-content-tertiary dark:text-content-tertiary",children:s})]}),n&&e.jsx("div",{className:"flex flex-col gap-3",children:n}),e.jsx("div",{className:"flex flex-wrap gap-3 items-center justify-end",children:b})]})})});ie.displayName="Alert";const O=y.forwardRef(({color:t="zinc",leftIcon:s,label:n,count:r,className:a="",...o},l)=>{const d={zinc:{bg:"bg-zinc-100",text:"text-zinc-600",hover:"hover:bg-zinc-200",notificationBg:"bg-zinc-600",notificationText:"text-zinc-100"},red:{bg:"bg-red-100",text:"text-red-700",hover:"hover:bg-red-200",notificationBg:"bg-red-700",notificationText:"text-red-100"},orange:{bg:"bg-orange-100",text:"text-orange-700",hover:"hover:bg-orange-200",notificationBg:"bg-orange-700",notificationText:"text-orange-100"},amber:{bg:"bg-amber-100",text:"text-amber-700",hover:"hover:bg-amber-200",notificationBg:"bg-amber-700",notificationText:"text-amber-100"},yellow:{bg:"bg-yellow-100",text:"text-yellow-700",hover:"hover:bg-yellow-200",notificationBg:"bg-yellow-700",notificationText:"text-yellow-100"},lime:{bg:"bg-lime-100",text:"text-lime-700",hover:"hover:bg-lime-200",notificationBg:"bg-lime-700",notificationText:"text-lime-100"},green:{bg:"bg-green-100",text:"text-green-700",hover:"hover:bg-green-200",notificationBg:"bg-green-700",notificationText:"text-green-100"},emerald:{bg:"bg-emerald-100",text:"text-emerald-700",hover:"hover:bg-emerald-200",notificationBg:"bg-emerald-700",notificationText:"text-emerald-100"},teal:{bg:"bg-teal-100",text:"text-teal-700",hover:"hover:bg-teal-200",notificationBg:"bg-teal-700",notificationText:"text-teal-100"},cyan:{bg:"bg-cyan-100",text:"text-cyan-700",hover:"hover:bg-cyan-200",notificationBg:"bg-cyan-700",notificationText:"text-cyan-100"},sky:{bg:"bg-sky-100",text:"text-sky-700",hover:"hover:bg-sky-200",notificationBg:"bg-sky-700",notificationText:"text-sky-100"},blue:{bg:"bg-blue-100",text:"text-blue-700",hover:"hover:bg-blue-200",notificationBg:"bg-blue-700",notificationText:"text-blue-100"},indigo:{bg:"bg-indigo-100",text:"text-indigo-700",hover:"hover:bg-indigo-200",notificationBg:"bg-indigo-700",notificationText:"text-indigo-100"},violet:{bg:"bg-violet-100",text:"text-violet-700",hover:"hover:bg-violet-200",notificationBg:"bg-violet-700",notificationText:"text-violet-100"},purple:{bg:"bg-purple-100",text:"text-purple-700",hover:"hover:bg-purple-200",notificationBg:"bg-purple-700",notificationText:"text-purple-100"},fuchsia:{bg:"bg-fuchsia-100",text:"text-fuchsia-700",hover:"hover:bg-fuchsia-200",notificationBg:"bg-fuchsia-700",notificationText:"text-fuchsia-100"},pink:{bg:"bg-pink-100",text:"text-pink-700",hover:"hover:bg-pink-200",notificationBg:"bg-pink-700",notificationText:"text-pink-100"},rose:{bg:"bg-rose-100",text:"text-rose-700",hover:"hover:bg-rose-200",notificationBg:"bg-rose-700",notificationText:"text-rose-100"},primary:{bg:"bg-primary-custom-100",text:"text-primary-custom-600",hover:"hover:bg-primary-custom-200",notificationBg:"bg-primary-custom-600",notificationText:"text-primary-custom-100"},secondary:{bg:"bg-zinc-100",text:"text-zinc-600",hover:"hover:bg-zinc-200",notificationBg:"bg-zinc-600",notificationText:"text-zinc-100"},tertiary:{bg:"bg-zinc-100",text:"text-zinc-600",hover:"hover:bg-zinc-200",notificationBg:"bg-zinc-600",notificationText:"text-zinc-100"}}[t],p=b=>{const x=b.props.className||"";return y.cloneElement(b,{className:`w-3 h-3 ${x}`.trim()})},i=["inline-flex","items-center","gap-1","px-1.5","py-1","rounded-md","font-sans",d.bg,d.hover,"transition-colors","duration-200",a].filter(Boolean).join(" ").replace(/\s+/g," ").trim();return e.jsxs("div",{ref:l,className:i,...o,children:[s&&e.jsx("div",{className:`flex items-center justify-center ${d.text}`,children:p(s)}),e.jsx("span",{className:`font-sans text-xs leading-4 ${d.text}`,children:n}),r!==void 0&&e.jsx("div",{className:`
|
|
363
|
-
h-3
|
|
364
|
-
flex
|
|
365
|
-
items-center
|
|
366
|
-
justify-center
|
|
367
|
-
px-0.5
|
|
368
|
-
rounded-sm
|
|
369
|
-
min-w-[12px]
|
|
370
|
-
${d.notificationBg}
|
|
371
|
-
`.trim().replace(/\s+/g," "),children:e.jsx("span",{className:`font-sans text-xs leading-4 ${d.notificationText}`,children:r})})]})});O.displayName="Badge";const G=y.forwardRef(({value:t,defaultValue:s=0,onChange:n,min:r=0,max:a,label:o,linkText:l,onLinkClick:c,helperText:d,error:p=!1,disabled:i=!1,className:b="",...x},g)=>{const[m,v]=y.useState(s),u=t!==void 0,h=u?t:m;y.useEffect(()=>{u||v(s)},[s,u]);const w=M=>{let T=M;r!==void 0&&T<r&&(T=r),a!==void 0&&T>a&&(T=a),u||v(T),n?.(T)},f=()=>{i||w(h-1)},k=()=>{i||w(h+1)},j=i||r!==void 0&&h<=r,C=i||a!==void 0&&h>=a,B=()=>e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M3 8H13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),R=()=>e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M8 3V13M3 8H13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),_=p?"border-error-border dark:border-error-border":"border-border-primary dark:border-dark-border-primary",I=!i&&!p?"hover:border-[#f9f9f9] dark:hover:border-[#f9f9f9]":"",z=!i&&!p?"focus-within:border-2 focus-within:border-[#329cff] dark:focus-within:border-[#329cff]":"";return e.jsxs("div",{ref:g,className:`flex flex-col gap-2 ${b}`.trim(),...x,children:[o&&e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("label",{className:"text-sm leading-5 font-bold text-content-primary dark:text-dark-content-primary",children:o}),l&&e.jsx("button",{type:"button",onClick:c,disabled:i,className:`
|
|
372
|
-
text-xs leading-4
|
|
373
|
-
text-primary-custom-600
|
|
374
|
-
hover:underline
|
|
375
|
-
dark:text-primary-custom-600
|
|
376
|
-
${i?"opacity-50 cursor-not-allowed":"cursor-pointer"}
|
|
377
|
-
transition-colors
|
|
378
|
-
duration-200
|
|
379
|
-
`.trim().replace(/\s+/g," "),children:l})]}),e.jsxs("div",{className:`
|
|
380
|
-
flex
|
|
381
|
-
items-center
|
|
382
|
-
gap-2
|
|
383
|
-
px-3
|
|
384
|
-
py-1.5
|
|
385
|
-
bg-white
|
|
386
|
-
dark:bg-dark-bg-primary
|
|
387
|
-
border
|
|
388
|
-
${_}
|
|
389
|
-
${I}
|
|
390
|
-
${z}
|
|
391
|
-
rounded-lg
|
|
392
|
-
transition-colors
|
|
393
|
-
duration-200
|
|
394
|
-
${i?"opacity-50 cursor-not-allowed":""}
|
|
395
|
-
`.trim().replace(/\s+/g," "),children:[e.jsx("button",{type:"button",onClick:f,disabled:j,className:`
|
|
396
|
-
flex
|
|
397
|
-
items-center
|
|
398
|
-
justify-center
|
|
399
|
-
w-4
|
|
400
|
-
h-4
|
|
401
|
-
${j?"text-content-tertiary dark:text-content-tertiary cursor-not-allowed":"text-content-primary dark:text-dark-content-primary hover:text-content-secondary dark:hover:text-content-secondary cursor-pointer"}
|
|
402
|
-
transition-colors
|
|
403
|
-
duration-200
|
|
404
|
-
`.trim().replace(/\s+/g," "),"aria-label":"Decrementar",children:e.jsx(B,{})}),e.jsx("div",{className:"flex-1 text-center",children:e.jsx("span",{className:`
|
|
405
|
-
text-base leading-6
|
|
406
|
-
${h===0?"text-content-tertiary dark:text-content-tertiary":"text-content-primary dark:text-dark-content-primary"}
|
|
407
|
-
`.trim().replace(/\s+/g," "),children:h})}),e.jsx("button",{type:"button",onClick:k,disabled:C,className:`
|
|
408
|
-
flex
|
|
409
|
-
items-center
|
|
410
|
-
justify-center
|
|
411
|
-
w-4
|
|
412
|
-
h-4
|
|
413
|
-
${C?"text-content-tertiary dark:text-content-tertiary cursor-not-allowed":"text-content-primary dark:text-dark-content-primary hover:text-content-secondary dark:hover:text-content-secondary cursor-pointer"}
|
|
414
|
-
transition-colors
|
|
415
|
-
duration-200
|
|
416
|
-
`.trim().replace(/\s+/g," "),"aria-label":"Incrementar",children:e.jsx(R,{})})]}),d&&e.jsx("p",{className:`
|
|
417
|
-
text-sm leading-5
|
|
418
|
-
${p?"text-error-content dark:text-error-content":"text-content-tertiary dark:text-content-tertiary"}
|
|
419
|
-
`.trim().replace(/\s+/g," "),children:d})]})});G.displayName="Quantity";const he=()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className:"w-4 h-4",children:e.jsx("path",{fillRule:"evenodd",d:"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"})}),ke=({variant:t="default",children:s,items:n,open:r,onOpenChange:a,disabled:o=!1,className:l="",menuClassName:c="",ariaLabel:d,placeholder:p="Options"})=>{const[i,b]=y.useState(!1),x=y.useRef(null),g=r!==void 0,m=g?r:i,v=()=>{if(o)return;const f=!m;g||b(f),a?.(f)};y.useEffect(()=>{const f=k=>{x.current&&!x.current.contains(k.target)&&(g||b(!1),a?.(!1))};if(m)return document.addEventListener("mousedown",f),()=>{document.removeEventListener("mousedown",f)}},[m,g,a]),y.useEffect(()=>{const f=k=>{k.key==="Escape"&&m&&(g||b(!1),a?.(!1))};if(m)return document.addEventListener("keydown",f),()=>{document.removeEventListener("keydown",f)}},[m,g,a]);const u=f=>{f.disabled||f.isDivider||f.isHeading||(f.onClick&&f.onClick({}),g||b(!1),a?.(!1))},h=["inline-flex","items-center","justify-center","rounded-lg","font-bold","text-sm","whitespace-nowrap","transition-all","duration-150",t==="icon-only"?"w-9 h-9":"gap-3 px-3 py-2","bg-bg-primary","text-content-secondary","border","border-border-primary","hover:bg-background-secondary","active:scale-95","dark:bg-dark-bg-primary","dark:text-content-secondary","dark:border-dark-border-primary","dark:hover:bg-dark-bg-primary","focus:outline-none","focus:ring-2","focus:ring-primary-custom-400","focus:ring-offset-2","dark:focus:ring-dark-border-custom","dark:focus:ring-offset-dark-bg-primary",o&&"opacity-50",o&&"cursor-not-allowed",o&&"pointer-events-none",l].filter(Boolean).join(" ").replace(/\s+/g," ").trim(),w=["absolute","top-full","left-0","mt-2","min-w-[182px]","rounded-xl","p-1","border","z-50","bg-background-secondary","border-border-primary","dark:bg-dark-bg-primary","dark:border-dark-border-primary","shadow-menu",c].filter(Boolean).join(" ").replace(/\s+/g," ").trim();return e.jsxs("div",{ref:x,className:"relative inline-block",children:[e.jsxs("button",{type:"button",className:h,onClick:v,disabled:o,"aria-label":d||(t==="icon-only"?"Abrir menú":void 0),"aria-haspopup":"true","aria-expanded":m,children:[t==="default"&&e.jsx("span",{children:s||p}),e.jsx(he,{})]}),m&&e.jsx("div",{className:w,children:n.map((f,k)=>f.isDivider?e.jsx(we,{className:f.className},k):f.isHeading?e.jsx(ye,{className:f.className,children:f.children},k):e.jsx(ve,{...f,onClick:()=>u(f)},k))})]})},ve=({children:t,icon:s,description:n,shortcut:r,disabled:a=!1,selected:o=!1,onClick:l,className:c=""})=>{const d=["flex","items-center","gap-3","px-4","py-2","rounded-lg","text-sm","w-full","text-left","transition-colors","duration-150","text-content-primary",!a&&"hover:bg-white",o&&"bg-white","dark:text-dark-content-primary",!a&&"dark:hover:bg-dark-bg-primary",o&&"dark:bg-dark-bg-primary",a&&"opacity-50",a&&"cursor-not-allowed",!a&&"cursor-pointer",c].filter(Boolean).join(" ").replace(/\s+/g," ").trim();return e.jsxs("button",{type:"button",className:d,onClick:l,disabled:a,children:[s&&e.jsx("span",{className:"inline-flex items-center justify-center w-4 h-4 text-content-secondary dark:text-content-secondary",children:s}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"text-content-primary dark:text-dark-content-primary",children:t}),n&&e.jsx("div",{className:"text-xs text-content-secondary dark:text-content-secondary mt-0.5",children:n})]}),r&&e.jsx("span",{className:"text-xs text-content-secondary dark:text-content-secondary ml-auto whitespace-nowrap",children:r})]})},ye=({children:t,className:s=""})=>{const n=["px-4","py-1","text-xs","font-normal","text-content-tertiary","dark:text-content-tertiary",s].filter(Boolean).join(" ").replace(/\s+/g," ").trim();return e.jsx("div",{className:n,children:t})},we=({className:t=""})=>{const s=["px-4","py-1",t].filter(Boolean).join(" ").replace(/\s+/g," ").trim();return e.jsx("div",{className:s,children:e.jsx("div",{className:"h-px bg-border-primary dark:bg-dark-border-primary"})})},je=({count:t,color:s="red",className:n="",ariaLabel:r})=>{const a={zinc:{bg:"bg-zinc-600",text:"text-white"},red:{bg:"bg-content-extensions-red",text:"text-white"},orange:{bg:"bg-orange-700",text:"text-white"},amber:{bg:"bg-amber-700",text:"text-white"},yellow:{bg:"bg-yellow-700",text:"text-white"},lime:{bg:"bg-lime-700",text:"text-white"},green:{bg:"bg-green-700",text:"text-white"},emerald:{bg:"bg-emerald-700",text:"text-white"},teal:{bg:"bg-teal-700",text:"text-white"},cyan:{bg:"bg-cyan-700",text:"text-white"},sky:{bg:"bg-sky-700",text:"text-white"},blue:{bg:"bg-blue-700",text:"text-white"},indigo:{bg:"bg-indigo-700",text:"text-white"},violet:{bg:"bg-violet-700",text:"text-white"},purple:{bg:"bg-purple-700",text:"text-white"},fuchsia:{bg:"bg-fuchsia-700",text:"text-white"},pink:{bg:"bg-pink-700",text:"text-white"},rose:{bg:"bg-rose-700",text:"text-white"},primary:{bg:"bg-primary-custom-600",text:"text-white"},secondary:{bg:"bg-zinc-600",text:"text-white"},tertiary:{bg:"bg-zinc-600",text:"text-white"}},o=a[s]||a.red,l=r||(t!==void 0&&t>0?`${t} notificaci${t===1?"ón":"ones"}`:"Notificación pendiente");if(t!==void 0&&t>0){const c=t>99?"99+":t.toString();return e.jsx("span",{className:`
|
|
420
|
-
inline-flex
|
|
421
|
-
items-center
|
|
422
|
-
justify-center
|
|
423
|
-
min-w-[16px]
|
|
424
|
-
h-4
|
|
425
|
-
px-1
|
|
426
|
-
rounded-full
|
|
427
|
-
text-[10px]
|
|
428
|
-
font-bold
|
|
429
|
-
leading-none
|
|
430
|
-
${o.bg}
|
|
431
|
-
${o.text}
|
|
432
|
-
pointer-events-none
|
|
433
|
-
dark:${o.bg}
|
|
434
|
-
dark:${o.text}
|
|
435
|
-
${n}
|
|
436
|
-
`.trim().replace(/\s+/g," "),role:"status","aria-label":l,children:c})}return e.jsx("span",{className:`
|
|
437
|
-
inline-block
|
|
438
|
-
w-2
|
|
439
|
-
h-2
|
|
440
|
-
rounded-full
|
|
441
|
-
${o.bg}
|
|
442
|
-
pointer-events-none
|
|
443
|
-
dark:${o.bg}
|
|
444
|
-
${n}
|
|
445
|
-
`.trim().replace(/\s+/g," "),role:"status","aria-label":l})},Ce=({className:t=""})=>e.jsx("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{fillRule:"evenodd",d:"M9.78 4.22a.75.75 0 0 1 0 1.06L7.06 8l2.72 2.72a.75.75 0 1 1-1.06 1.06L5.47 8.53a.75.75 0 0 1 0-1.06l3.25-3.25a.75.75 0 0 1 1.06 0Z",clipRule:"evenodd"})}),Ne=({className:t=""})=>e.jsx("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{fillRule:"evenodd",d:"M6.22 4.22a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1 0 1.06l-3.25 3.25a.75.75 0 0 1-1.06-1.06L8.94 8 6.22 5.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"})}),$e=({currentPage:t=1,totalPages:s,onPageChange:n,backText:r="Atrás",nextText:a="Siguiente",siblingCount:o=1,showBackButton:l=!0,showNextButton:c=!0,className:d="",ariaLabel:p="Paginación"})=>{const i=y.useMemo(()=>{const v=o*2+3+2;if(s<=v)return Array.from({length:s},(C,B)=>B+1);const u=Math.max(t-o,1),h=Math.min(t+o,s),w=u>2,f=h<s-1,k=1,j=s;if(!w&&f){const C=3+2*o;return[...Array.from({length:C},(R,_)=>_+1),"...",s]}if(w&&!f){const C=3+2*o,B=Array.from({length:C},(R,_)=>s-C+_+1);return[k,"...",...B]}if(w&&f){const C=Array.from({length:h-u+1},(B,R)=>u+R);return[k,"...",...C,"...",j]}return[]},[t,s,o]),b=m=>{m>=1&&m<=s&&m!==t&&n?.(m)},x=({page:m,isActive:v=!1,disabled:u=!1,onClick:h,ariaLabel:w})=>{const f=m==="...",B=[`
|
|
446
|
-
inline-flex
|
|
447
|
-
items-center
|
|
448
|
-
justify-center
|
|
449
|
-
gap-3
|
|
450
|
-
px-3
|
|
451
|
-
py-2
|
|
452
|
-
rounded-md
|
|
453
|
-
font-bold
|
|
454
|
-
text-sm
|
|
455
|
-
whitespace-nowrap
|
|
456
|
-
transition-all
|
|
457
|
-
duration-150
|
|
458
|
-
`,f?`
|
|
459
|
-
text-primary-custom-600
|
|
460
|
-
dark:text-primary-custom-600
|
|
461
|
-
cursor-default
|
|
462
|
-
pointer-events-none
|
|
463
|
-
`:v?`
|
|
464
|
-
bg-primary-custom-100
|
|
465
|
-
text-primary-custom-600
|
|
466
|
-
dark:bg-primary-custom-100
|
|
467
|
-
dark:text-primary-custom-600
|
|
468
|
-
`:`
|
|
469
|
-
text-primary-custom-600
|
|
470
|
-
hover:bg-primary-custom-100
|
|
471
|
-
active:scale-95
|
|
472
|
-
dark:text-primary-custom-600
|
|
473
|
-
dark:hover:bg-primary-custom-100
|
|
474
|
-
dark:active:scale-95
|
|
475
|
-
`,u?`
|
|
476
|
-
opacity-50
|
|
477
|
-
cursor-not-allowed
|
|
478
|
-
pointer-events-none
|
|
479
|
-
`:""].join(" ").replace(/\s+/g," ").trim();return e.jsx("button",{type:"button",className:B,onClick:h,disabled:u||f,"aria-label":w,"aria-current":v?"page":void 0,children:m})},g=`
|
|
480
|
-
inline-flex
|
|
481
|
-
items-center
|
|
482
|
-
justify-between
|
|
483
|
-
gap-0
|
|
484
|
-
${d}
|
|
485
|
-
`.replace(/\s+/g," ").trim();return e.jsxs("nav",{className:g,"aria-label":p,role:"navigation",children:[l&&e.jsxs("button",{type:"button",className:`
|
|
486
|
-
inline-flex
|
|
487
|
-
items-center
|
|
488
|
-
justify-center
|
|
489
|
-
gap-3
|
|
490
|
-
px-3
|
|
491
|
-
py-2
|
|
492
|
-
rounded-md
|
|
493
|
-
font-bold
|
|
494
|
-
text-sm
|
|
495
|
-
text-primary-custom-600
|
|
496
|
-
hover:bg-primary-custom-100
|
|
497
|
-
active:scale-95
|
|
498
|
-
dark:text-primary-custom-600
|
|
499
|
-
dark:hover:bg-primary-custom-100
|
|
500
|
-
dark:active:scale-95
|
|
501
|
-
transition-all
|
|
502
|
-
duration-150
|
|
503
|
-
${t===1?"opacity-50 cursor-not-allowed pointer-events-none":""}
|
|
504
|
-
`.replace(/\s+/g," ").trim(),onClick:()=>b(t-1),disabled:t===1,"aria-label":`${r} page`,children:[e.jsx(Ce,{className:"w-4 h-4"}),r]}),e.jsx("div",{className:"inline-flex items-center",children:i.map((m,v)=>e.jsx(x,{page:m,isActive:m===t,onClick:()=>typeof m=="number"&&b(m),ariaLabel:typeof m=="number"?`Go to page ${m}`:`Page ${m}`},`${m}-${v}`))}),c&&e.jsxs("button",{type:"button",className:`
|
|
505
|
-
inline-flex
|
|
506
|
-
items-center
|
|
507
|
-
justify-center
|
|
508
|
-
gap-3
|
|
509
|
-
px-3
|
|
510
|
-
py-2
|
|
511
|
-
rounded-md
|
|
512
|
-
font-bold
|
|
513
|
-
text-sm
|
|
514
|
-
text-primary-custom-600
|
|
515
|
-
hover:bg-primary-custom-100
|
|
516
|
-
active:scale-95
|
|
517
|
-
dark:text-primary-custom-600
|
|
518
|
-
dark:hover:bg-primary-custom-100
|
|
519
|
-
dark:active:scale-95
|
|
520
|
-
transition-all
|
|
521
|
-
duration-150
|
|
522
|
-
${t===s?"opacity-50 cursor-not-allowed pointer-events-none":""}
|
|
523
|
-
`.replace(/\s+/g," ").trim(),onClick:()=>b(t+1),disabled:t===s,"aria-label":`${a} page`,children:[a,e.jsx(Ne,{className:"w-4 h-4"})]})]})},Be=({className:t=""})=>e.jsxs("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:[e.jsx("path",{fillRule:"evenodd",d:"M11.78 9.78a.75.75 0 0 1-1.06 0L8 7.06 5.28 9.78a.75.75 0 0 1-1.06-1.06l3.25-3.25a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1 0 1.06Z",clipRule:"evenodd"}),e.jsx("path",{fillRule:"evenodd",d:"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"})]}),Se=({className:t=""})=>e.jsx("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{fillRule:"evenodd",d:"M12.416 3.376a.75.75 0 0 1 .208 1.04l-5 7.5a.75.75 0 0 1-1.154.114l-3-3a.75.75 0 0 1 1.06-1.06l2.353 2.353 4.493-6.74a.75.75 0 0 1 1.04-.207Z",clipRule:"evenodd"})}),_e=({options:t=[],value:s,defaultValue:n,placeholder:r="Seleccionar...",disabled:a=!1,error:o=!1,label:l,description:c,showLabel:d=!0,showDescription:p=!0,menuHeader:i,onChange:b,className:x="",triggerClassName:g="",menuClassName:m="",ariaLabel:v,id:u,name:h,required:w=!1,menuPosition:f="bottom",fullWidth:k=!1})=>{const[j,C]=y.useState(!1),[B,R]=y.useState(s!==void 0?s:n),[_,I]=y.useState(-1),z=y.useRef(null),M=y.useRef(null),T=y.useRef(null);y.useEffect(()=>{s!==void 0&&R(s)},[s]),y.useEffect(()=>{const $=D=>{z.current&&!z.current.contains(D.target)&&C(!1)};if(j)return document.addEventListener("mousedown",$),()=>{document.removeEventListener("mousedown",$)}},[j]),y.useEffect(()=>{const $=D=>{if(j)switch(D.key){case"Escape":C(!1),M.current?.focus();break;case"ArrowDown":D.preventDefault(),I(F=>F<t.length-1?F+1:0);break;case"ArrowUp":D.preventDefault(),I(F=>F>0?F-1:t.length-1);break;case"Enter":D.preventDefault(),_>=0&&_<t.length&&L(t[_]);break}};if(j)return document.addEventListener("keydown",$),()=>{document.removeEventListener("keydown",$)}},[j,_,t]);const Z=t.find($=>$.value===B),S=()=>{a||(C(!j),I(-1))},L=$=>{$.disabled||(R($.value),C(!1),b?.($.value),setTimeout(()=>{M.current?.focus()},0))},A=[`
|
|
524
|
-
inline-flex
|
|
525
|
-
items-center
|
|
526
|
-
justify-between
|
|
527
|
-
gap-3
|
|
528
|
-
w-full
|
|
529
|
-
px-3
|
|
530
|
-
py-2
|
|
531
|
-
text-sm
|
|
532
|
-
font-normal
|
|
533
|
-
leading-5
|
|
534
|
-
rounded-lg
|
|
535
|
-
border
|
|
536
|
-
transition-all
|
|
537
|
-
duration-150
|
|
538
|
-
`,k?"w-full":"min-w-[200px]",o?`
|
|
539
|
-
border-error-border
|
|
540
|
-
bg-error-bg
|
|
541
|
-
text-content-primary
|
|
542
|
-
dark:border-error-border
|
|
543
|
-
dark:bg-error-bg
|
|
544
|
-
dark:text-dark-content-primary
|
|
545
|
-
`:`
|
|
546
|
-
bg-bg-primary
|
|
547
|
-
border-border-primary
|
|
548
|
-
text-content-primary
|
|
549
|
-
dark:bg-dark-bg-primary
|
|
550
|
-
dark:border-dark-border-primary
|
|
551
|
-
dark:text-dark-content-primary
|
|
552
|
-
`,!a&&!o?`
|
|
553
|
-
hover:bg-[rgba(255,255,255,1)]
|
|
554
|
-
hover:bg-[linear-gradient(90deg,rgba(0,0,0,0.024)_0%,rgba(0,0,0,0.024)_100%)]
|
|
555
|
-
dark:hover:bg-[rgba(17,45,87,1)]
|
|
556
|
-
dark:hover:bg-[linear-gradient(90deg,rgba(255,255,255,0.1)_0%,rgba(255,255,255,0.1)_100%)]
|
|
557
|
-
`:"",a?"":`
|
|
558
|
-
focus:outline-none
|
|
559
|
-
focus:ring-2
|
|
560
|
-
focus:ring-primary-custom-400
|
|
561
|
-
focus:ring-offset-2
|
|
562
|
-
dark:focus:ring-dark-border-custom
|
|
563
|
-
dark:focus:ring-offset-dark-bg-primary
|
|
564
|
-
`,a?`
|
|
565
|
-
opacity-50
|
|
566
|
-
cursor-not-allowed
|
|
567
|
-
`:"",g].join(" ").replace(/\s+/g," ").trim(),de=[`
|
|
568
|
-
absolute
|
|
569
|
-
z-50
|
|
570
|
-
w-full
|
|
571
|
-
min-w-[200px]
|
|
572
|
-
max-h-40
|
|
573
|
-
overflow-y-auto
|
|
574
|
-
p-1
|
|
575
|
-
rounded-md
|
|
576
|
-
border-0
|
|
577
|
-
transition-all
|
|
578
|
-
duration-150
|
|
579
|
-
`,f==="top"?"bottom-full mb-1":"top-full mt-1",`
|
|
580
|
-
bg-background-secondary
|
|
581
|
-
dark:bg-dark-bg-primary
|
|
582
|
-
`,j?"opacity-100 visible":"opacity-0 invisible",m].join(" ").replace(/\s+/g," ").trim(),xe=`
|
|
583
|
-
flex
|
|
584
|
-
items-center
|
|
585
|
-
cursor-pointer
|
|
586
|
-
rounded-md
|
|
587
|
-
transition-all
|
|
588
|
-
duration-150
|
|
589
|
-
pl-2
|
|
590
|
-
pr-2.5
|
|
591
|
-
py-0.5
|
|
592
|
-
gap-0.5
|
|
593
|
-
text-[10px]
|
|
594
|
-
leading-[12px]
|
|
595
|
-
font-bold
|
|
596
|
-
`,be=($,D)=>{const F=$.value===B,K=D===_,ge=F&&!K?"text-content-primary dark:text-dark-content-primary":K||F&&K?"bg-primary-custom-600 text-primary-inverse-content dark:bg-primary-custom-600 dark:text-primary-inverse-content":"text-content-primary dark:text-dark-content-primary",ue=$.disabled?"":"hover:bg-primary-custom-600 hover:text-primary-inverse-content dark:hover:bg-primary-custom-600 dark:hover:text-primary-inverse-content",fe=$.disabled?"opacity-50 cursor-not-allowed":"";return[xe,ge,ue,fe].join(" ").replace(/\s+/g," ").trim()},me=["flex-shrink-0","transition-transform","duration-150",j&&"rotate-180",a?"text-content-tertiary dark:text-content-tertiary":"text-content-secondary dark:text-content-secondary"].filter(Boolean).join(" ").replace(/\s+/g," ").trim(),pe="flex-shrink-0 w-4 h-4";return e.jsxs("div",{className:`relative ${k?"w-full":""} ${x}`,ref:z,children:[d&&l||p&&c?e.jsxs("div",{className:"flex flex-col gap-1 mb-1 w-full",children:[d&&l&&e.jsxs("label",{htmlFor:u,className:"text-sm font-bold leading-5 text-content-primary dark:text-dark-content-primary",children:[l,w&&e.jsx("span",{className:"ml-1 text-error-content",children:"*"})]}),p&&c&&e.jsx("p",{className:"text-sm font-normal leading-5 text-content-tertiary dark:text-content-tertiary",children:c})]}):null,e.jsxs("button",{ref:M,type:"button",className:A,onClick:S,disabled:a,"aria-label":v||l,"aria-haspopup":"listbox","aria-expanded":j,id:u,children:[e.jsx("span",{className:Z?"":"text-content-secondary dark:text-content-secondary",children:Z?Z.label:r}),e.jsx(Be,{className:me})]}),h&&e.jsx("input",{type:"hidden",name:h,value:B!==void 0?String(B):""}),j&&e.jsxs("div",{ref:T,className:de,role:"listbox",children:[i&&e.jsx("div",{className:"flex items-center gap-0.5 px-6 py-0.5 rounded-[5px]",children:e.jsx("span",{className:"text-[10px] font-bold leading-[12px] text-content-tertiary dark:text-content-tertiary",children:i})}),t.length===0&&e.jsx("div",{className:"px-2 py-1.5 text-[10px] leading-[12px] text-content-secondary dark:text-content-secondary",children:"No hay opciones disponibles"}),t.map(($,D)=>e.jsxs("div",{className:be($,D),onClick:()=>L($),onMouseEnter:()=>I(D),role:"option","aria-selected":$.value===B,"aria-disabled":$.disabled,children:[e.jsx("div",{className:"w-4 flex items-center justify-center",children:$.value===B&&e.jsx(Se,{className:pe})}),$.icon&&e.jsx("span",{className:"flex-shrink-0 w-4 h-4",children:$.icon}),e.jsx("span",{className:"flex-1 text-left",children:$.label})]},$.value))]})]})},Le=()=>e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"transition-transform",children:e.jsx("path",{d:"M12 10L8 6L4 10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),Me=()=>e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"transition-transform",children:e.jsx("path",{d:"M4 6L8 10L12 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),Re=()=>e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M14 8H2M2 8L6.5 3.5M2 8L6.5 12.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Ie=()=>e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M2 8H14M14 8L9.5 3.5M14 8L9.5 12.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Te=({column:t,sortable:s,sorted:n,sortDirection:r,onSort:a})=>{const d=[`
|
|
597
|
-
flex
|
|
598
|
-
items-center
|
|
599
|
-
gap-3
|
|
600
|
-
px-6
|
|
601
|
-
py-2.5
|
|
602
|
-
min-h-[40px]
|
|
603
|
-
border-b
|
|
604
|
-
border-border-primary
|
|
605
|
-
dark:border-dark-border-primary
|
|
606
|
-
transition-colors
|
|
607
|
-
duration-150
|
|
608
|
-
`,s?`
|
|
609
|
-
cursor-pointer
|
|
610
|
-
hover:bg-background-secondary
|
|
611
|
-
dark:hover:bg-dark-bg-primary/50
|
|
612
|
-
select-none
|
|
613
|
-
`:"",{left:"justify-start",center:"justify-center",right:"justify-end"}[t.align||"left"]].join(" ").replace(/\s+/g," ").trim();return e.jsxs("div",{className:d,onClick:s?a:void 0,role:s?"button":void 0,tabIndex:s?0:void 0,onKeyDown:s?p=>{(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),a())}:void 0,style:{width:t.width},children:[e.jsx("span",{className:`
|
|
614
|
-
text-sm
|
|
615
|
-
font-bold
|
|
616
|
-
text-content-secondary
|
|
617
|
-
dark:text-content-secondary
|
|
618
|
-
overflow-ellipsis
|
|
619
|
-
overflow-hidden
|
|
620
|
-
whitespace-nowrap
|
|
621
|
-
`,children:t.header}),s&&e.jsxs("span",{className:"flex-shrink-0 text-content-secondary dark:text-content-secondary",children:[n&&r==="asc"&&e.jsx(Le,{}),n&&r==="desc"&&e.jsx(Me,{}),!n&&e.jsx("div",{className:"w-4 h-4"})]})]})},Q=({children:t,align:s="left",width:n,isStriped:r=!1,rowIndex:a=0})=>{const o={left:"justify-start text-left",center:"justify-center text-center",right:"justify-end text-right"},l=r&&a%2===1?"bg-background-secondary dark:bg-dark-bg-primary/30":"";return e.jsx("div",{className:`
|
|
622
|
-
flex
|
|
623
|
-
flex-col
|
|
624
|
-
${o[s]}
|
|
625
|
-
px-6
|
|
626
|
-
py-4
|
|
627
|
-
min-h-[56px]
|
|
628
|
-
border-b
|
|
629
|
-
border-border-secondary
|
|
630
|
-
dark:border-dark-border-primary
|
|
631
|
-
${l}
|
|
632
|
-
`,style:{width:n},children:e.jsx("span",{className:`
|
|
633
|
-
text-sm
|
|
634
|
-
text-content-primary
|
|
635
|
-
dark:text-dark-content-primary
|
|
636
|
-
overflow-ellipsis
|
|
637
|
-
overflow-hidden
|
|
638
|
-
w-full
|
|
639
|
-
`,children:t})})},De=({currentPage:t,totalPages:s,onPageChange:n,previousLabel:r="Anterior",nextLabel:a="Siguiente"})=>{const l=(()=>{const c=[];if(s<=7)for(let p=1;p<=s;p++)c.push(p);else c.push(1),t<=3?c.push(2,3):t>=s-2?(c.push("..."),c.push(s-2,s-1)):(c.push("..."),c.push(t),c.push("...")),s>1&&c.push(s);return c})();return e.jsxs("div",{className:"flex items-center justify-between w-full h-9",children:[e.jsxs("button",{onClick:()=>t>1&&n(t-1),disabled:t===1,className:`
|
|
640
|
-
flex
|
|
641
|
-
items-center
|
|
642
|
-
gap-3
|
|
643
|
-
px-3
|
|
644
|
-
py-2
|
|
645
|
-
rounded-md
|
|
646
|
-
text-sm
|
|
647
|
-
font-bold
|
|
648
|
-
text-primary-custom-600
|
|
649
|
-
dark:text-primary-custom-600
|
|
650
|
-
hover:bg-blue-50
|
|
651
|
-
dark:hover:bg-blue-900/20
|
|
652
|
-
disabled:opacity-50
|
|
653
|
-
disabled:cursor-not-allowed
|
|
654
|
-
transition-colors
|
|
655
|
-
duration-150
|
|
656
|
-
`,children:[e.jsx(Re,{}),e.jsx("span",{children:r})]}),e.jsx("div",{className:"flex items-center gap-0",children:l.map((c,d)=>{if(c==="...")return e.jsx("div",{className:`
|
|
657
|
-
flex
|
|
658
|
-
items-center
|
|
659
|
-
justify-center
|
|
660
|
-
px-3
|
|
661
|
-
py-2
|
|
662
|
-
text-sm
|
|
663
|
-
font-bold
|
|
664
|
-
text-primary-custom-600
|
|
665
|
-
dark:text-primary-custom-600
|
|
666
|
-
`,children:c},`ellipsis-${d}`);const p=c===t;return e.jsx("button",{onClick:()=>n(c),className:`
|
|
667
|
-
flex
|
|
668
|
-
items-center
|
|
669
|
-
justify-center
|
|
670
|
-
px-3
|
|
671
|
-
py-2
|
|
672
|
-
rounded-md
|
|
673
|
-
text-sm
|
|
674
|
-
font-bold
|
|
675
|
-
text-primary-custom-600
|
|
676
|
-
dark:text-primary-custom-600
|
|
677
|
-
transition-colors
|
|
678
|
-
duration-150
|
|
679
|
-
${p?"bg-blue-100 dark:bg-blue-900/30":"hover:bg-blue-50 dark:hover:bg-blue-900/20"}
|
|
680
|
-
`,children:c},c)})}),e.jsxs("button",{onClick:()=>t<s&&n(t+1),disabled:t===s,className:`
|
|
681
|
-
flex
|
|
682
|
-
items-center
|
|
683
|
-
gap-3
|
|
684
|
-
px-3
|
|
685
|
-
py-2
|
|
686
|
-
rounded-md
|
|
687
|
-
text-sm
|
|
688
|
-
font-bold
|
|
689
|
-
text-primary-custom-600
|
|
690
|
-
dark:text-primary-custom-600
|
|
691
|
-
hover:bg-blue-50
|
|
692
|
-
dark:hover:bg-blue-900/20
|
|
693
|
-
disabled:opacity-50
|
|
694
|
-
disabled:cursor-not-allowed
|
|
695
|
-
transition-colors
|
|
696
|
-
duration-150
|
|
697
|
-
`,children:[e.jsx("span",{children:a}),e.jsx(Ie,{})]})]})},ze=({title:t,columns:s,data:n,variant:r="basic",showBorder:a=!0,showShadow:o=!0,onSort:l,sortColumn:c,sortDirection:d,fullWidth:p=!1,emptyMessage:i="No hay datos disponibles",loading:b=!1,loadingRows:x=5,pagination:g,className:m="",id:v})=>{const[u,h]=y.useState(null),[w,f]=y.useState(null),k=c!==void 0?c:u,j=d!==void 0?d:w,C=S=>{let L="asc";k===S&&(j==="asc"?L="desc":j==="desc"&&(L=null)),l?l(S,L):(h(L?S:null),f(L))},B=(S,L)=>typeof L=="function"?L(S):S[L],T=[`
|
|
698
|
-
flex
|
|
699
|
-
flex-col
|
|
700
|
-
gap-4
|
|
701
|
-
bg-white
|
|
702
|
-
dark:bg-dark-bg-primary
|
|
703
|
-
rounded-xl
|
|
704
|
-
transition-all
|
|
705
|
-
duration-150
|
|
706
|
-
`,a?"border border-border-primary dark:border-dark-border-primary":"",o?"shadow-base":"","p-8",p||r==="fullWidth"?"w-full":"",m].join(" ").replace(/\s+/g," ").trim(),Z=r==="grid"?`
|
|
707
|
-
border
|
|
708
|
-
border-border-primary
|
|
709
|
-
dark:border-dark-border-primary
|
|
710
|
-
rounded-lg
|
|
711
|
-
overflow-hidden
|
|
712
|
-
`:"";return e.jsxs("div",{className:T,id:v,children:[t&&e.jsx("div",{className:"flex items-center justify-center w-full",children:e.jsx("h3",{className:`
|
|
713
|
-
text-base
|
|
714
|
-
font-bold
|
|
715
|
-
text-content-primary
|
|
716
|
-
dark:text-dark-content-primary
|
|
717
|
-
overflow-ellipsis
|
|
718
|
-
overflow-hidden
|
|
719
|
-
whitespace-nowrap
|
|
720
|
-
`,children:t})}),e.jsx("div",{className:`flex w-full overflow-x-auto ${Z}`,children:s.map((S,L)=>{const V=typeof S.accessor=="function"?`column_${L}`:String(S.accessor);return e.jsxs("div",{className:"flex flex-col flex-1 min-w-0",children:[e.jsx(Te,{column:S,sortable:S.sortable||!1,sorted:k===V,sortDirection:k===V?j:null,onSort:()=>C(V)}),b&&e.jsx(e.Fragment,{children:Array.from({length:x}).map((H,E)=>e.jsx(Q,{align:S.align,width:S.width,isStriped:r==="striped",rowIndex:E,children:e.jsx("div",{className:`
|
|
721
|
-
h-4
|
|
722
|
-
bg-background-secondary
|
|
723
|
-
dark:bg-dark-border-primary
|
|
724
|
-
rounded
|
|
725
|
-
animate-pulse
|
|
726
|
-
`})},`loading-${E}`))}),!b&&n.length>0&&e.jsx(e.Fragment,{children:n.map((H,E)=>{const P=B(H,S.accessor),W=S.render?S.render(P,H,E):P;return e.jsx(Q,{align:S.align,width:S.width,isStriped:r==="striped",rowIndex:E,children:W},E)})}),!b&&n.length===0&&L===0&&e.jsx("div",{className:`
|
|
727
|
-
flex
|
|
728
|
-
items-center
|
|
729
|
-
justify-center
|
|
730
|
-
px-6
|
|
731
|
-
py-12
|
|
732
|
-
text-sm
|
|
733
|
-
text-content-secondary
|
|
734
|
-
dark:text-content-secondary
|
|
735
|
-
`,style:{gridColumn:`1 / ${s.length+1}`},children:i})]},V)})}),g&&e.jsx(De,{currentPage:g.currentPage,totalPages:g.totalPages,onPageChange:g.onPageChange,previousLabel:g.previousLabel,nextLabel:g.nextLabel})]})},Ae=({label:t,active:s=!1,icon:n,badge:r,disabled:a=!1,onClick:o,className:l="",ariaLabel:c})=>{const d=`
|
|
736
|
-
relative
|
|
737
|
-
flex
|
|
738
|
-
flex-col
|
|
739
|
-
items-center
|
|
740
|
-
cursor-pointer
|
|
741
|
-
outline-none
|
|
742
|
-
transition-all
|
|
743
|
-
duration-150
|
|
744
|
-
p-0
|
|
745
|
-
border-0
|
|
746
|
-
bg-transparent
|
|
747
|
-
`,i=a?"opacity-50 cursor-not-allowed pointer-events-none":"",b=`
|
|
748
|
-
flex
|
|
749
|
-
items-center
|
|
750
|
-
justify-center
|
|
751
|
-
gap-1
|
|
752
|
-
p-2
|
|
753
|
-
rounded-lg
|
|
754
|
-
overflow-hidden
|
|
755
|
-
transition-all
|
|
756
|
-
duration-150
|
|
757
|
-
w-full
|
|
758
|
-
`,x=a?"":`
|
|
759
|
-
group-hover:bg-[rgba(0,0,0,0.03)]
|
|
760
|
-
group-focus-visible:bg-[rgba(0,0,0,0.03)]
|
|
761
|
-
group-focus-visible:shadow-[0px_0px_0px_2px_#dbeefe,0px_1px_2px_0px_rgba(0,0,0,0.05),0px_0px_0px_4px_#60b6fa]
|
|
762
|
-
dark:group-hover:bg-white/5
|
|
763
|
-
dark:group-focus-visible:bg-white/5
|
|
764
|
-
dark:group-focus-visible:shadow-[0px_0px_0px_2px_#1e3a5f,0px_1px_2px_0px_rgba(0,0,0,0.05),0px_0px_0px_4px_#0f6ae3]
|
|
765
|
-
`,g=s?`
|
|
766
|
-
text-primary-custom-600
|
|
767
|
-
dark:text-primary-custom-600
|
|
768
|
-
`:`
|
|
769
|
-
text-content-primary
|
|
770
|
-
dark:text-dark-content-primary
|
|
771
|
-
`,m=`
|
|
772
|
-
w-3
|
|
773
|
-
h-3
|
|
774
|
-
flex-shrink-0
|
|
775
|
-
`,v=s?`
|
|
776
|
-
bg-primary-custom-600
|
|
777
|
-
dark:bg-primary-custom-600
|
|
778
|
-
`:`
|
|
779
|
-
bg-content-primary
|
|
780
|
-
dark:bg-dark-content-primary
|
|
781
|
-
`,u=s?`
|
|
782
|
-
absolute
|
|
783
|
-
-bottom-2.5
|
|
784
|
-
left-0
|
|
785
|
-
right-0
|
|
786
|
-
h-0.5
|
|
787
|
-
rounded-full
|
|
788
|
-
bg-primary-custom-600
|
|
789
|
-
dark:bg-primary-custom-600
|
|
790
|
-
z-10
|
|
791
|
-
`:"hidden",h=[d,"",i,"group",l].join(" ").replace(/\s+/g," ").trim(),w=[b,x].join(" ").replace(/\s+/g," ").trim();return e.jsxs("button",{type:"button",role:"tab","aria-selected":s,"aria-disabled":a,"aria-label":c||t,tabIndex:a?-1:0,className:h,onClick:a?void 0:o,disabled:a,children:[e.jsxs("div",{className:w,children:[n&&e.jsx("span",{className:`${m} ${g}`.trim(),children:n}),e.jsx("span",{className:`
|
|
792
|
-
text-sm
|
|
793
|
-
font-bold
|
|
794
|
-
leading-5
|
|
795
|
-
whitespace-nowrap
|
|
796
|
-
${g}
|
|
797
|
-
`.replace(/\s+/g," ").trim(),children:t}),r!==void 0&&r>0&&e.jsx("span",{className:`
|
|
798
|
-
flex
|
|
799
|
-
items-center
|
|
800
|
-
justify-center
|
|
801
|
-
h-3
|
|
802
|
-
min-w-[12px]
|
|
803
|
-
px-0.5
|
|
804
|
-
rounded-sm
|
|
805
|
-
text-xs
|
|
806
|
-
font-normal
|
|
807
|
-
leading-4
|
|
808
|
-
text-primary-inverse-content
|
|
809
|
-
dark:text-dark-bg-primary
|
|
810
|
-
${v}
|
|
811
|
-
`.replace(/\s+/g," ").trim(),"aria-label":`${r} notificaciones`,children:r>99?"99+":r})]}),e.jsx("div",{className:u})]})},Ee=({items:t,activeId:s,defaultActiveId:n,onChange:r,className:a="",fullWidth:o=!1,size:l="base",showBorder:c=!0})=>{const[d,p]=y.useState(n||(t.length>0?t[0].id:"")),i=s!==void 0,b=i?s:d,x=h=>{i||p(h),r?.(h)},m=`
|
|
812
|
-
flex
|
|
813
|
-
items-end
|
|
814
|
-
pb-2.5
|
|
815
|
-
${{sm:"gap-0",base:"gap-1",lg:"gap-2"}[l]}
|
|
816
|
-
${o?"w-full":""}
|
|
817
|
-
${c?"border-b border-border-primary dark:border-dark-border-primary":""}
|
|
818
|
-
`,v=o?"flex-1":"",u=[m,a].join(" ").replace(/\s+/g," ").trim();return e.jsx("div",{role:"tablist","aria-label":"Pestañas de navegación",className:u,children:t.map(h=>e.jsx(Ae,{label:h.label,active:b===h.id,icon:h.icon,badge:h.badge,disabled:h.disabled,onClick:()=>x(h.id),className:v},h.id))})},Fe=()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",width:"16",height:"16",children:e.jsx("path",{d:"M1.75 1.002a.75.75 0 1 0 0 1.5h1.035l1.38 5.514a2.75 2.75 0 0 0 2.658 2.048h5.355a2.75 2.75 0 0 0 2.658-2.048l.9-3.597a.75.75 0 0 0-.728-.919H4.655l-.22-.88A.75.75 0 0 0 3.71 2H1.75ZM5 13a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0ZM11.5 13a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0Z"})}),Ze=()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",width:"16",height:"16",children:e.jsx("path",{fillRule:"evenodd",d:"M12 5a4 4 0 0 0-8 0v2.379a1.5 1.5 0 0 1-.44 1.06L2.294 9.707a1 1 0 0 0-.293.707V11a1 1 0 0 0 1 1h2a3 3 0 1 0 6 0h2a1 1 0 0 0 1-1v-.586a1 1 0 0 0-.293-.707L12.44 8.44A1.5 1.5 0 0 1 12 7.38V5Zm-5.5 7a1.5 1.5 0 0 0 3 0h-3Z",clipRule:"evenodd"})}),X=()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",width:"16",height:"16",children:e.jsx("path",{fillRule:"evenodd",d:"M9.965 11.026a5 5 0 1 1 1.06-1.06l2.755 2.754a.75.75 0 1 1-1.06 1.06l-2.755-2.754ZM10.5 7a3.5 3.5 0 1 1-7 0 3.5 3.5 0 0 1 7 0Z",clipRule:"evenodd"})}),J=()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",width:"16",height:"16",children:e.jsx("path",{fillRule:"evenodd",d:"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"})}),U=()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",width:"16",height:"16",children:e.jsx("path",{fillRule:"evenodd",d:"M6.701 2.25c.577-1 2.02-1 2.598 0l5.196 9a1.5 1.5 0 0 1-1.299 2.25H2.804a1.5 1.5 0 0 1-1.3-2.25l5.197-9ZM8 4a.75.75 0 0 1 .75.75v3a.75.75 0 1 1-1.5 0v-3A.75.75 0 0 1 8 4Zm0 7.25a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"})}),Ve=()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",width:"16",height:"16",children:e.jsx("path",{fillRule:"evenodd",d:"M14 4.75A2.75 2.75 0 0 0 11.25 2h-3A2.75 2.75 0 0 0 5.5 4.75v.5a.75.75 0 0 0 1.5 0v-.5c0-.69.56-1.25 1.25-1.25h3c.69 0 1.25.56 1.25 1.25v6.5c0 .69-.56 1.25-1.25 1.25h-3c-.69 0-1.25-.56-1.25-1.25v-.5a.75.75 0 0 0-1.5 0v.5A2.75 2.75 0 0 0 8.25 14h3A2.75 2.75 0 0 0 14 11.25v-6.5Zm-9.47.47a.75.75 0 0 0-1.06 0L1.22 7.47a.75.75 0 0 0 0 1.06l2.25 2.25a.75.75 0 1 0 1.06-1.06l-.97-.97h5.69a.75.75 0 0 0 0-1.5H3.56l.97-.97a.75.75 0 0 0 0-1.06Z",clipRule:"evenodd"})}),He=({logo:t,productName:s="Nombre Producto",environmentBadge:n,userDropdown:r,actions:a,notifications:o,className:l="",variant:c="responsive",hideActionButtons:d=!1,leadingAction:p,siesaLogo:i,showBusinessLogo:b=!1,showSiesaLogoLeading:x=!0,showSiesaLogoTrailing:g=!1,onNavigationClick:m,onSearchClick:v,onCartClick:u,onNotificationsClick:h})=>{const w=`
|
|
819
|
-
box-border
|
|
820
|
-
flex
|
|
821
|
-
flex-col
|
|
822
|
-
items-center
|
|
823
|
-
justify-center
|
|
824
|
-
p-1
|
|
825
|
-
relative
|
|
826
|
-
rounded-md
|
|
827
|
-
shrink-0
|
|
828
|
-
text-primary-custom-600
|
|
829
|
-
hover:bg-background-secondary
|
|
830
|
-
active:scale-95
|
|
831
|
-
focus:outline-none
|
|
832
|
-
focus:ring-2
|
|
833
|
-
focus:ring-primary-custom-400
|
|
834
|
-
focus:ring-offset-2
|
|
835
|
-
dark:text-primary-custom-600
|
|
836
|
-
dark:hover:bg-dark-bg-secondary
|
|
837
|
-
dark:active:scale-95
|
|
838
|
-
dark:focus:ring-dark-border-custom
|
|
839
|
-
dark:focus:ring-offset-dark-bg-primary
|
|
840
|
-
transition-all
|
|
841
|
-
duration-150
|
|
842
|
-
`,f=`
|
|
843
|
-
bg-primary-custom-600
|
|
844
|
-
text-primary-inverse-content
|
|
845
|
-
border
|
|
846
|
-
border-primary-custom-600
|
|
847
|
-
shadow-button-inset
|
|
848
|
-
hover:bg-primary-custom-500
|
|
849
|
-
active:scale-95
|
|
850
|
-
focus:outline-none
|
|
851
|
-
focus:ring-2
|
|
852
|
-
focus:ring-primary-custom-400
|
|
853
|
-
focus:ring-offset-2
|
|
854
|
-
dark:bg-dark-bg-inverse
|
|
855
|
-
dark:text-dark-content-inverse
|
|
856
|
-
dark:border-dark-bg-inverse
|
|
857
|
-
dark:hover:bg-dark-bg-inverse/90
|
|
858
|
-
dark:active:scale-95
|
|
859
|
-
dark:focus:ring-dark-border-custom
|
|
860
|
-
dark:focus:ring-offset-dark-bg-primary
|
|
861
|
-
box-border
|
|
862
|
-
flex
|
|
863
|
-
flex-col
|
|
864
|
-
items-center
|
|
865
|
-
justify-center
|
|
866
|
-
p-3
|
|
867
|
-
relative
|
|
868
|
-
rounded-md
|
|
869
|
-
shrink-0
|
|
870
|
-
transition-all
|
|
871
|
-
duration-150
|
|
872
|
-
`,k=c==="mobile",j=c==="desktop",C=c==="tablet",B=c==="responsive",R=()=>{if(k)return null;const N=e.jsx("div",{className:"overflow-hidden relative shrink-0 w-4 h-4",children:e.jsx(Ve,{})});return j||C?e.jsx("button",{className:f,"aria-label":"Volver",onClick:m,children:N}):e.jsx("button",{className:`hidden md:flex ${f}`,"aria-label":"Volver",onClick:m,children:N})},_=()=>{if(k||!b)return null;const N=e.jsx("img",{src:"/,Business Logo.png",alt:"Business Logo",className:"w-full h-full object-contain"});return j?e.jsx("div",{className:"overflow-hidden relative shrink-0 w-[168px] h-[30px]",children:N}):C?e.jsx("div",{className:"overflow-hidden relative shrink-0 w-[140px] h-[25px]",children:N}):e.jsx("div",{className:"hidden md:block overflow-hidden relative shrink-0 w-[140px] lg:w-[168px] h-[25px] lg:h-[30px]",children:N})},I=()=>{const N=e.jsx("img",{src:"/.Siesa Logo.png",alt:"Siesa",className:"w-full h-full object-contain"}),A=e.jsx("img",{src:"/siesa_logo_mobile.png",alt:"Siesa",className:"w-full h-full object-contain"});return k?e.jsx("div",{className:"overflow-hidden relative shrink-0 w-[30px] h-[30px]",children:A}):x?j?e.jsx("div",{className:"overflow-hidden relative shrink-0 w-[120px] h-[30px]",children:N}):C?e.jsx("div",{className:"overflow-hidden relative shrink-0 w-[100px] h-[25px]",children:N}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"md:hidden overflow-hidden relative shrink-0 w-[30px] h-[30px]",children:A}),x&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"hidden md:block lg:hidden overflow-hidden relative shrink-0 w-[100px] h-[25px]",children:N}),e.jsx("div",{className:"hidden lg:block overflow-hidden relative shrink-0 w-[120px] h-[30px]",children:N})]})]}):null},z=()=>{if(!g||k)return null;const N=e.jsx("img",{src:"/.Siesa Logo.png",alt:"Siesa",className:"w-full h-full object-contain"});return j?e.jsx("div",{className:"overflow-hidden relative shrink-0 w-[120px] h-[30px]",children:N}):C?e.jsx("div",{className:"overflow-hidden relative shrink-0 w-[100px] h-[25px]",children:N}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"hidden md:block lg:hidden overflow-hidden relative shrink-0 w-[100px] h-[25px]",children:N}),e.jsx("div",{className:"hidden lg:block overflow-hidden relative shrink-0 w-[120px] h-[30px]",children:N})]})},M=({responsive:N=!0})=>{const A=e.jsx("div",{className:"grow shrink-0 w-px min-h-px bg-border-primary dark:bg-dark-border-primary"});return k?null:j||C?e.jsx("div",{className:"flex flex-col gap-2 h-8 items-start px-0 py-1 relative shrink-0",children:A}):N?e.jsx("div",{className:"hidden md:flex flex-col gap-2 h-8 items-start px-0 py-1 relative shrink-0",children:A}):null},T=()=>{if(k||!s)return null;const N=e.jsx("p",{className:"font-bold leading-7 text-xl text-content-primary dark:text-dark-content-primary tracking-[-0.5px] whitespace-nowrap",children:s});return j||C?N:e.jsx("p",{className:"hidden md:block font-bold leading-7 text-xl text-content-primary dark:text-dark-content-primary tracking-[-0.5px] whitespace-nowrap",children:s})},Z=()=>n?k?e.jsx(O,{color:"yellow",leftIcon:e.jsx(U,{}),label:"Pruebas"}):j||C?e.jsx(O,{color:"yellow",leftIcon:e.jsx(U,{}),label:n}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"md:hidden",children:e.jsx(O,{color:"yellow",leftIcon:e.jsx(U,{}),label:"Pruebas"})}),e.jsx("div",{className:"hidden md:block",children:e.jsx(O,{color:"yellow",leftIcon:e.jsx(U,{}),label:n})})]}):null,S=()=>d?null:k?e.jsx("button",{className:w,"aria-label":"Buscar",onClick:v,children:e.jsx("div",{className:"overflow-hidden relative shrink-0 w-4 h-4",children:e.jsx(X,{})})}):B?e.jsx("button",{className:`md:hidden ${w}`,"aria-label":"Buscar",onClick:v,children:e.jsx("div",{className:"overflow-hidden relative shrink-0 w-4 h-4",children:e.jsx(X,{})})}):null,L=()=>d?null:e.jsxs("div",{className:"relative",children:[e.jsx("button",{className:w,"aria-label":"Carrito de compras",onClick:u,children:e.jsx("div",{className:"overflow-hidden relative shrink-0 w-4 h-4",children:e.jsx(Fe,{})})}),o?.cart!==void 0&&o.cart>0&&e.jsx("div",{className:"absolute bg-error-content dark:bg-error-content flex flex-col gap-2.5 h-4 items-center justify-center left-[calc(50%+8px)] px-1 py-0 rounded-full top-[calc(50%-8px)] -translate-x-1/2 -translate-y-1/2 pointer-events-none min-w-[16px]",children:e.jsx("p",{className:"font-bold leading-3 text-[10px] text-white text-center whitespace-nowrap",children:o.cart>99?"+99":o.cart})})]}),V=()=>d?null:e.jsxs("div",{className:"relative",children:[e.jsx("button",{className:w,"aria-label":"Notificaciones",onClick:h,children:e.jsx("div",{className:"overflow-hidden relative shrink-0 w-4 h-4",children:e.jsx(Ze,{})})}),o?.bell&&e.jsx("div",{className:"absolute w-2 h-2 bg-error-content dark:bg-error-content rounded-full left-[calc(50%+4px)] top-[calc(50%-8px)] -translate-x-1/2 pointer-events-none"})]}),H=()=>{if(!r)return null;const N=`
|
|
873
|
-
box-border
|
|
874
|
-
flex
|
|
875
|
-
items-center
|
|
876
|
-
justify-center
|
|
877
|
-
overflow-hidden
|
|
878
|
-
p-0
|
|
879
|
-
relative
|
|
880
|
-
shrink-0
|
|
881
|
-
hover:bg-background-secondary
|
|
882
|
-
active:scale-95
|
|
883
|
-
focus:outline-none
|
|
884
|
-
focus:ring-2
|
|
885
|
-
focus:ring-primary-custom-400
|
|
886
|
-
focus:ring-offset-2
|
|
887
|
-
dark:hover:bg-dark-bg-secondary
|
|
888
|
-
dark:active:scale-95
|
|
889
|
-
dark:focus:ring-dark-border-custom
|
|
890
|
-
dark:focus:ring-offset-dark-bg-primary
|
|
891
|
-
rounded-lg
|
|
892
|
-
transition-all
|
|
893
|
-
duration-150
|
|
894
|
-
`;if(k)return e.jsx("button",{className:N,onClick:r.onMenuClick,"aria-label":"Menú de usuario",children:e.jsx("div",{className:"relative rounded-full shrink-0 w-8 h-8",children:e.jsx("img",{alt:r.name,className:"absolute inset-0 max-w-none object-center object-cover pointer-events-none rounded-full w-full h-full",src:r.avatar})})});const A=()=>e.jsx("button",{className:N,onClick:r.onMenuClick,"aria-label":"Menú de usuario",children:e.jsxs("div",{className:"box-border flex gap-3 items-center justify-center overflow-hidden px-3 py-2 relative rounded-lg shrink-0",children:[e.jsxs("div",{className:"flex gap-3 items-center justify-center relative shrink-0",children:[e.jsx("div",{className:"flex items-center justify-center relative shrink-0",children:e.jsx("div",{className:"relative rounded-md shrink-0 w-10 h-10",children:e.jsx("img",{alt:r.name,className:"absolute inset-0 max-w-none object-center object-cover pointer-events-none rounded-md w-full h-full",src:r.avatar})})}),e.jsxs("div",{className:"flex flex-col gap-0.5 items-start justify-center relative shrink-0 w-[123px]",children:[e.jsx("p",{className:"leading-5 relative shrink-0 text-sm text-content-primary dark:text-dark-content-primary whitespace-nowrap font-normal",children:r.name}),(r.email||r.role)&&e.jsx("p",{className:"leading-4 min-w-full relative shrink-0 text-xs text-content-secondary dark:text-content-secondary w-min whitespace-nowrap overflow-hidden text-ellipsis",children:r.email||r.role})]})]}),e.jsx("div",{className:"overflow-hidden relative shrink-0 w-5 h-5 text-content-secondary dark:text-content-secondary",children:e.jsx(J,{})})]})});return j||C?A():e.jsxs(e.Fragment,{children:[e.jsx("button",{className:`md:hidden ${N}`,onClick:r.onMenuClick,"aria-label":"Menú de usuario",children:e.jsx("div",{className:"relative rounded-full shrink-0 w-8 h-8",children:e.jsx("img",{alt:r.name,className:"absolute inset-0 max-w-none object-center object-cover pointer-events-none rounded-full w-full h-full",src:r.avatar})})}),e.jsx("button",{className:`hidden md:flex ${N}`,onClick:r.onMenuClick,"aria-label":"Menú de usuario",children:e.jsxs("div",{className:"box-border flex gap-3 items-center justify-center overflow-hidden px-3 py-2 relative rounded-lg shrink-0",children:[e.jsxs("div",{className:"flex gap-3 items-center justify-center relative shrink-0",children:[e.jsx("div",{className:"flex items-center justify-center relative shrink-0",children:e.jsx("div",{className:"relative rounded-md shrink-0 w-10 h-10",children:e.jsx("img",{alt:r.name,className:"absolute inset-0 max-w-none object-center object-cover pointer-events-none rounded-md w-full h-full",src:r.avatar})})}),e.jsxs("div",{className:"flex flex-col gap-0.5 items-start justify-center relative shrink-0 w-[123px]",children:[e.jsx("p",{className:"leading-5 relative shrink-0 text-sm text-content-primary dark:text-dark-content-primary whitespace-nowrap font-normal",children:r.name}),(r.email||r.role)&&e.jsx("p",{className:"leading-4 min-w-full relative shrink-0 text-xs text-content-secondary dark:text-content-secondary w-min whitespace-nowrap overflow-hidden text-ellipsis",children:r.email||r.role})]})]}),e.jsx("div",{className:"overflow-hidden relative shrink-0 w-5 h-5 text-content-secondary dark:text-content-secondary",children:e.jsx(J,{})})]})})]})},W=[`
|
|
895
|
-
box-border
|
|
896
|
-
flex
|
|
897
|
-
gap-8
|
|
898
|
-
items-center
|
|
899
|
-
px-4
|
|
900
|
-
py-1
|
|
901
|
-
relative
|
|
902
|
-
w-full
|
|
903
|
-
bg-background-primary
|
|
904
|
-
dark:bg-dark-bg-primary
|
|
905
|
-
`,{responsive:"h-[40px] md:h-16",desktop:"h-16",tablet:"h-16",mobile:"h-[40px]"}[c],l].join(" ").replace(/\s+/g," ").trim();return e.jsxs("nav",{className:W,children:[e.jsxs("div",{className:"flex gap-4 items-center relative shrink-0",children:[!k&&(p||e.jsx(R,{})),t||e.jsx(_,{}),b&&x&&!k&&e.jsx(M,{}),i||e.jsx(I,{}),s&&x&&!k&&e.jsx(M,{}),e.jsx(T,{})]}),e.jsxs("div",{className:"flex gap-4 items-center justify-end grow min-h-px min-w-px relative shrink-0",children:[e.jsx(Z,{}),e.jsx(S,{}),e.jsx(L,{}),e.jsx(V,{}),r&&!d&&e.jsx(M,{}),e.jsx(H,{}),g&&r&&!k&&e.jsx(M,{}),e.jsx(z,{}),a&&e.jsx("div",{className:"flex gap-2 items-center",children:a})]})]})},Oe=({items:t,activeItemId:s,onItemClick:n,className:r="",ariaLabel:a="Navegación Principal"})=>{t.length>5&&console.warn("NavigationBar: Se recomienda un máximo de 5 ítems para mejor UX");const o=i=>{i.disabled||(i.onClick&&i.onClick(i.id),n&&n(i.id))},l=i=>{const b=i.active||i.id===s,x=`
|
|
906
|
-
flex-1
|
|
907
|
-
flex
|
|
908
|
-
flex-col
|
|
909
|
-
items-center
|
|
910
|
-
gap-1
|
|
911
|
-
px-0.5
|
|
912
|
-
py-0
|
|
913
|
-
min-w-0
|
|
914
|
-
cursor-pointer
|
|
915
|
-
transition-all
|
|
916
|
-
duration-150
|
|
917
|
-
${i.disabled?"opacity-50 cursor-not-allowed pointer-events-none":""}
|
|
918
|
-
`.replace(/\s+/g," ").trim(),g=`
|
|
919
|
-
flex
|
|
920
|
-
items-center
|
|
921
|
-
justify-center
|
|
922
|
-
px-4
|
|
923
|
-
py-1
|
|
924
|
-
rounded-full
|
|
925
|
-
overflow-hidden
|
|
926
|
-
transition-all
|
|
927
|
-
duration-150
|
|
928
|
-
${b?"bg-primary-custom-100 dark:bg-primary-custom-100":"bg-transparent hover:bg-hover-overlay dark:hover:bg-hover-overlay-dark"}
|
|
929
|
-
`.replace(/\s+/g," ").trim(),m=`
|
|
930
|
-
font-['SiesaBT:Bold',sans-serif]
|
|
931
|
-
text-[10px]
|
|
932
|
-
leading-[12px]
|
|
933
|
-
font-bold
|
|
934
|
-
text-center
|
|
935
|
-
w-full
|
|
936
|
-
min-w-0
|
|
937
|
-
text-content-primary
|
|
938
|
-
dark:text-dark-content-primary
|
|
939
|
-
transition-colors
|
|
940
|
-
duration-150
|
|
941
|
-
`.replace(/\s+/g," ").trim(),v=`
|
|
942
|
-
w-4
|
|
943
|
-
h-4
|
|
944
|
-
shrink-0
|
|
945
|
-
text-content-primary
|
|
946
|
-
dark:text-dark-content-primary
|
|
947
|
-
transition-colors
|
|
948
|
-
duration-150
|
|
949
|
-
`.replace(/\s+/g," ").trim();return e.jsxs("button",{type:"button",className:x,onClick:()=>o(i),disabled:i.disabled,"aria-label":i.ariaLabel||i.label,"aria-current":b?"page":void 0,children:[e.jsx("div",{className:g,children:e.jsx("span",{className:v,children:i.icon})}),e.jsx("span",{className:m,children:i.label})]},i.id)},c=`
|
|
950
|
-
bg-bg-primary
|
|
951
|
-
dark:bg-dark-bg-primary
|
|
952
|
-
p-4
|
|
953
|
-
w-full
|
|
954
|
-
transition-colors
|
|
955
|
-
duration-150
|
|
956
|
-
`.replace(/\s+/g," ").trim(),d=`
|
|
957
|
-
flex
|
|
958
|
-
items-start
|
|
959
|
-
justify-center
|
|
960
|
-
w-full
|
|
961
|
-
`.replace(/\s+/g," ").trim(),p=`
|
|
962
|
-
flex-1
|
|
963
|
-
flex
|
|
964
|
-
items-start
|
|
965
|
-
gap-2
|
|
966
|
-
min-h-0
|
|
967
|
-
min-w-0
|
|
968
|
-
`.replace(/\s+/g," ").trim();return e.jsx("nav",{className:`${c} ${r}`.trim(),role:"navigation","aria-label":a,children:e.jsx("div",{className:d,children:e.jsx("div",{className:p,children:t.map(i=>l(i))})})})},Pe=({lightColor:t,darkColor:s,className:n=""})=>e.jsxs("svg",{className:`w-4 h-4 shrink-0 ${n}`.trim(),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16","aria-hidden":"true",children:[e.jsx("circle",{cx:"8",cy:"8",r:"8",fill:t,className:"dark:hidden"}),e.jsx("circle",{cx:"8",cy:"8",r:"8",fill:s,className:"hidden dark:block"})]}),We=({status:t="available",className:s=""})=>{const r={available:{lightColor:"#0e79fd",darkColor:"#93d1fd",label:"Disponible"},occupied:{lightColor:"#af460e",darkColor:"#f5a927",label:"Ocupada"},reserved:{lightColor:"#7e22ce",darkColor:"#c084fc",label:"Reservada"},outOfService:{lightColor:"#3f3f46",darkColor:"#a1a1aa",label:"Fuera de Servicio"}}[t],o=[`
|
|
969
|
-
inline-flex
|
|
970
|
-
items-center
|
|
971
|
-
gap-1
|
|
972
|
-
shrink-0
|
|
973
|
-
`,s].join(" ").replace(/\s+/g," ").trim();return e.jsxs("div",{className:o,role:"presentation","aria-label":`Estado: ${r.label}`,children:[e.jsx(Pe,{lightColor:r.lightColor,darkColor:r.darkColor}),e.jsx("span",{className:`
|
|
974
|
-
text-xs
|
|
975
|
-
leading-4
|
|
976
|
-
font-normal
|
|
977
|
-
text-content-primary
|
|
978
|
-
dark:text-dark-content-primary
|
|
979
|
-
whitespace-nowrap
|
|
980
|
-
`.replace(/\s+/g," ").trim(),children:r.label})]})},Ue=({className:t=""})=>e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:e.jsx("path",{d:"M10 3L4.5 8.5L2 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),qe=({className:t=""})=>e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:e.jsx("path",{d:"M9 3L3 9M3 3L9 9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Ke=({className:t=""})=>e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:e.jsx("path",{d:"M10.5 5H1.5M8.5 1V3M3.5 1V3M3.25 11H8.75C9.57843 11 10.25 10.3284 10.25 9.5V3.5C10.25 2.67157 9.57843 2 8.75 2H3.25C2.42157 2 1.75 2.67157 1.75 3.5V9.5C1.75 10.3284 2.42157 11 3.25 11Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Ge=({className:t=""})=>e.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[e.jsx("path",{d:"M10.5 6C10.5 8.48528 8.48528 10.5 6 10.5C3.51472 10.5 1.5 8.48528 1.5 6C1.5 3.51472 3.51472 1.5 6 1.5C8.48528 1.5 10.5 3.51472 10.5 6Z",stroke:"currentColor",strokeWidth:"1.5"}),e.jsx("path",{d:"M9.18198 2.81802L2.81802 9.18198",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),Qe=({className:t=""})=>e.jsx("svg",{width:"13",height:"10",viewBox:"0 0 13 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:e.jsx("path",{d:"M9.25 9V8C9.25 6.89543 8.35457 6 7.25 6H2.75C1.64543 6 0.75 6.89543 0.75 8V9M12.25 9V8C12.25 6.89543 11.3546 6 10.25 6H9.75M7 2.5C7 3.60457 6.10457 4.5 5 4.5C3.89543 4.5 3 3.60457 3 2.5C3 1.39543 3.89543 0.5 5 0.5C6.10457 0.5 7 1.39543 7 2.5ZM10 2C10 2.82843 9.32843 3.5 8.5 3.5C7.67157 3.5 7 2.82843 7 2C7 1.17157 7.67157 0.5 8.5 0.5C9.32843 0.5 10 1.17157 10 2Z",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round"})}),Xe=({locationName:t,status:s="available",state:n="enabled",capacity:r,onClick:a,disabled:o=!1,className:l="",ariaLabel:c,fullWidth:d=!0})=>{const i={available:{textColor:"text-primary-custom-600 dark:text-primary-custom-600",badgeBg:"bg-primary-custom-100 dark:bg-blue-900/30",badgeText:"text-primary-custom-600 dark:text-blue-400",activedBg:"bg-primary-custom-100 dark:bg-blue-900/30",icon:Ue,badgeLabel:"Disponible"},occupied:{textColor:"text-[#af460e] dark:text-orange-400",badgeBg:"bg-[#fcedc9] dark:bg-yellow-900/30",badgeText:"text-[#af460e] dark:text-orange-400",activedBg:"bg-[#fcedc9] dark:bg-yellow-900/30",icon:qe,badgeLabel:"Ocupada"},reserved:{textColor:"text-[#7e22ce] dark:text-fuchsia-400",badgeBg:"bg-[#f3e8ff] dark:bg-purple-900/30",badgeText:"text-[#7e22ce] dark:text-purple-400",activedBg:"bg-[#f3e8ff] dark:bg-purple-900/30",icon:Ke,badgeLabel:"Reservada"},outOfService:{textColor:"text-[#3f3f46] dark:text-zinc-400",badgeBg:"bg-[#f4f4f5] dark:bg-zinc-800/30",badgeText:"text-content-tertiary dark:text-zinc-400",activedBg:"bg-[#f4f4f5] dark:bg-zinc-800/30",icon:Ge,badgeLabel:"F. de Servicio"}}[s],b=i.icon,x=n==="actived"?i.activedBg:"bg-white dark:bg-dark-bg-primary",v=[`
|
|
981
|
-
flex
|
|
982
|
-
flex-col
|
|
983
|
-
items-stretch
|
|
984
|
-
justify-between
|
|
985
|
-
${d?"w-full":"w-[189px]"}
|
|
986
|
-
h-[68px]
|
|
987
|
-
p-2
|
|
988
|
-
rounded-lg
|
|
989
|
-
cursor-pointer
|
|
990
|
-
transition-all
|
|
991
|
-
duration-150
|
|
992
|
-
focus:outline-none
|
|
993
|
-
focus:ring-2
|
|
994
|
-
focus:ring-primary-custom-400
|
|
995
|
-
focus:ring-offset-2
|
|
996
|
-
dark:focus:ring-dark-border-custom
|
|
997
|
-
dark:focus:ring-offset-dark-bg-primary
|
|
998
|
-
hover:shadow-md
|
|
999
|
-
active:scale-[0.98]
|
|
1000
|
-
disabled:opacity-50
|
|
1001
|
-
disabled:cursor-not-allowed
|
|
1002
|
-
disabled:pointer-events-none
|
|
1003
|
-
`,x,l].join(" ").replace(/\s+/g," ").trim(),u=r?`${r.current}/${r.total} mesas`:null;return e.jsxs("button",{className:v,onClick:a,disabled:o,"aria-label":c||`${t} - ${i.badgeLabel}`,type:"button",children:[e.jsx("div",{className:`
|
|
1004
|
-
text-base
|
|
1005
|
-
font-bold
|
|
1006
|
-
leading-6
|
|
1007
|
-
${i.textColor}
|
|
1008
|
-
`.replace(/\s+/g," ").trim(),children:t}),e.jsxs("div",{className:"flex items-center justify-between",children:[u&&e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(Qe,{className:i.textColor}),e.jsx("span",{className:`
|
|
1009
|
-
text-[10px]
|
|
1010
|
-
leading-[12px]
|
|
1011
|
-
${i.textColor}
|
|
1012
|
-
`.replace(/\s+/g," ").trim(),children:u})]}),e.jsxs("div",{className:`
|
|
1013
|
-
inline-flex
|
|
1014
|
-
items-center
|
|
1015
|
-
gap-1
|
|
1016
|
-
px-1.5
|
|
1017
|
-
py-1
|
|
1018
|
-
rounded-md
|
|
1019
|
-
${i.badgeBg}
|
|
1020
|
-
`.replace(/\s+/g," ").trim(),children:[e.jsx(b,{className:i.badgeText}),e.jsx("span",{className:`
|
|
1021
|
-
text-xs
|
|
1022
|
-
leading-4
|
|
1023
|
-
${i.badgeText}
|
|
1024
|
-
`.replace(/\s+/g," ").trim(),children:i.badgeLabel})]})]})]})},Je=({size:t="l",border:s=!1,children:n,disabled:r=!1,className:a="",onClick:o,ariaLabel:l,htmlType:c="button",...d})=>{const p={s:"w-10 h-10",m:"w-[65px] h-[65px]",l:"w-20 h-20"},i={s:"text-2xl",m:"text-5xl",l:"text-5xl"},m=[`
|
|
1025
|
-
inline-flex
|
|
1026
|
-
items-center
|
|
1027
|
-
justify-center
|
|
1028
|
-
rounded-lg
|
|
1029
|
-
font-bold
|
|
1030
|
-
tracking-tighter
|
|
1031
|
-
whitespace-nowrap
|
|
1032
|
-
cursor-pointer
|
|
1033
|
-
focus:outline-none
|
|
1034
|
-
focus:ring-2
|
|
1035
|
-
focus:ring-primary-custom-400
|
|
1036
|
-
focus:ring-offset-2
|
|
1037
|
-
dark:focus:ring-dark-border-custom
|
|
1038
|
-
dark:focus:ring-offset-dark-bg-primary
|
|
1039
|
-
disabled:opacity-50
|
|
1040
|
-
disabled:cursor-not-allowed
|
|
1041
|
-
disabled:pointer-events-none
|
|
1042
|
-
transition-all
|
|
1043
|
-
duration-150
|
|
1044
|
-
`,p[t],i[t],s?`
|
|
1045
|
-
bg-white
|
|
1046
|
-
text-content-primary
|
|
1047
|
-
border
|
|
1048
|
-
border-border-primary
|
|
1049
|
-
hover:bg-primary-custom-600
|
|
1050
|
-
hover:text-primary-inverse-content
|
|
1051
|
-
hover:border-primary-inverse-border
|
|
1052
|
-
active:bg-primary-custom-600
|
|
1053
|
-
active:text-primary-inverse-content
|
|
1054
|
-
active:border-primary-inverse-border
|
|
1055
|
-
active:scale-95
|
|
1056
|
-
dark:bg-dark-bg-primary
|
|
1057
|
-
dark:text-dark-content-primary
|
|
1058
|
-
dark:border-dark-border-primary
|
|
1059
|
-
dark:hover:bg-dark-bg-inverse
|
|
1060
|
-
dark:hover:text-dark-content-inverse
|
|
1061
|
-
dark:hover:border-primary-inverse-border
|
|
1062
|
-
dark:active:bg-dark-bg-inverse
|
|
1063
|
-
dark:active:text-dark-content-inverse
|
|
1064
|
-
dark:active:border-primary-inverse-border
|
|
1065
|
-
dark:active:scale-95
|
|
1066
|
-
`:`
|
|
1067
|
-
bg-white
|
|
1068
|
-
text-content-primary
|
|
1069
|
-
hover:bg-primary-custom-600
|
|
1070
|
-
hover:text-primary-inverse-content
|
|
1071
|
-
active:bg-primary-custom-600
|
|
1072
|
-
active:text-primary-inverse-content
|
|
1073
|
-
active:scale-95
|
|
1074
|
-
dark:bg-dark-bg-primary
|
|
1075
|
-
dark:text-dark-content-primary
|
|
1076
|
-
dark:hover:bg-dark-bg-inverse
|
|
1077
|
-
dark:hover:text-dark-content-inverse
|
|
1078
|
-
dark:active:bg-dark-bg-inverse
|
|
1079
|
-
dark:active:text-dark-content-inverse
|
|
1080
|
-
dark:active:scale-95
|
|
1081
|
-
`,a].join(" ").replace(/\s+/g," ").trim();return e.jsx("button",{type:c,className:m,disabled:r,onClick:o,"aria-label":l||`Número ${n}`,...d,children:n})},Ye=({image:t,label:s,active:n=!1,disabled:r=!1,onClick:a,className:o="",ariaLabel:l})=>{const p=[`
|
|
1082
|
-
flex
|
|
1083
|
-
flex-col
|
|
1084
|
-
gap-2
|
|
1085
|
-
p-3
|
|
1086
|
-
rounded-lg
|
|
1087
|
-
font-bold
|
|
1088
|
-
text-sm
|
|
1089
|
-
transition-all
|
|
1090
|
-
duration-150
|
|
1091
|
-
focus:outline-none
|
|
1092
|
-
focus:ring-2
|
|
1093
|
-
focus:ring-primary-custom-400
|
|
1094
|
-
focus:ring-offset-2
|
|
1095
|
-
dark:focus:ring-dark-border-custom
|
|
1096
|
-
dark:focus:ring-offset-dark-bg-primary
|
|
1097
|
-
`,r?`
|
|
1098
|
-
bg-white
|
|
1099
|
-
text-content-primary
|
|
1100
|
-
opacity-55
|
|
1101
|
-
cursor-not-allowed
|
|
1102
|
-
pointer-events-none
|
|
1103
|
-
dark:bg-dark-bg-primary
|
|
1104
|
-
dark:text-dark-content-primary
|
|
1105
|
-
`:n?`
|
|
1106
|
-
bg-primary-custom-100
|
|
1107
|
-
text-primary-custom-600
|
|
1108
|
-
cursor-pointer
|
|
1109
|
-
hover:bg-primary-custom-100
|
|
1110
|
-
active:scale-95
|
|
1111
|
-
dark:bg-primary-custom-100/20
|
|
1112
|
-
dark:text-primary-custom-600
|
|
1113
|
-
dark:hover:bg-primary-custom-100/30
|
|
1114
|
-
dark:active:scale-95
|
|
1115
|
-
`:`
|
|
1116
|
-
bg-white
|
|
1117
|
-
text-content-primary
|
|
1118
|
-
cursor-pointer
|
|
1119
|
-
hover:bg-background-secondary
|
|
1120
|
-
active:scale-95
|
|
1121
|
-
dark:bg-dark-bg-primary
|
|
1122
|
-
dark:text-dark-content-primary
|
|
1123
|
-
dark:hover:bg-dark-bg-primary/80
|
|
1124
|
-
dark:active:scale-95
|
|
1125
|
-
`,o].join(" ").replace(/\s+/g," ").trim();return e.jsxs("button",{type:"button",className:p,disabled:r,onClick:a,"aria-label":l||s,"aria-pressed":n,children:[e.jsx("div",{className:"aspect-[158/80] w-full rounded-lg overflow-hidden",children:e.jsx("img",{src:t,alt:s,className:"w-full h-full object-cover"})}),e.jsx("div",{className:"w-full text-left leading-5",children:s})]})},er=({className:t=""})=>e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,"aria-hidden":"true",children:e.jsx("path",{d:"M8 3V13M3 8H13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),rr=({image:t,productName:s,price:n,buttonText:r="Agregar",active:a=!1,disabled:o=!1,onAddClick:l,onCardClick:c,className:d="",ariaLabel:p})=>{const i=`
|
|
1126
|
-
flex
|
|
1127
|
-
flex-col
|
|
1128
|
-
gap-2
|
|
1129
|
-
p-3
|
|
1130
|
-
rounded-lg
|
|
1131
|
-
w-[170px]
|
|
1132
|
-
transition-all
|
|
1133
|
-
duration-150
|
|
1134
|
-
focus:outline-none
|
|
1135
|
-
focus:ring-2
|
|
1136
|
-
focus:ring-primary-custom-400
|
|
1137
|
-
focus:ring-offset-2
|
|
1138
|
-
dark:focus:ring-dark-border-custom
|
|
1139
|
-
dark:focus:ring-offset-dark-bg-primary
|
|
1140
|
-
`,b=o?`
|
|
1141
|
-
bg-white
|
|
1142
|
-
opacity-55
|
|
1143
|
-
cursor-not-allowed
|
|
1144
|
-
dark:bg-dark-bg-primary
|
|
1145
|
-
`:a?`
|
|
1146
|
-
bg-primary-custom-100
|
|
1147
|
-
cursor-pointer
|
|
1148
|
-
dark:bg-dark-bg-custom
|
|
1149
|
-
`:`
|
|
1150
|
-
bg-white
|
|
1151
|
-
cursor-pointer
|
|
1152
|
-
dark:bg-dark-bg-primary
|
|
1153
|
-
`,x=o?`
|
|
1154
|
-
text-content-primary
|
|
1155
|
-
dark:text-dark-content-primary
|
|
1156
|
-
`:a?`
|
|
1157
|
-
text-primary-custom-600
|
|
1158
|
-
dark:text-dark-content-custom
|
|
1159
|
-
`:`
|
|
1160
|
-
text-content-primary
|
|
1161
|
-
dark:text-dark-content-primary
|
|
1162
|
-
`,g=[i,b,d].join(" ").replace(/\s+/g," ").trim(),m=u=>{o||u.target.closest("button")||c?.(u)},v=u=>{u.stopPropagation(),!o&&l?.(u)};return e.jsxs("div",{className:g,onClick:m,role:"article","aria-label":p||`${s} - ${n}`,tabIndex:o?-1:0,children:[e.jsxs("div",{className:"flex flex-col gap-3 w-full",children:[e.jsx("div",{className:"h-[88px] w-full rounded-lg overflow-hidden",children:e.jsx("img",{src:t,alt:s,className:"w-full h-full object-cover"})}),e.jsxs("div",{className:`flex flex-col w-full font-bold ${x}`.trim().replace(/\s+/g," "),children:[e.jsx("div",{className:"text-sm leading-5",children:s}),e.jsx("div",{className:"text-2xl leading-8 tracking-tighter",children:n})]})]}),e.jsx(q,{type:"default",size:"sm",leftIcon:e.jsx(er,{className:"w-4 h-4"}),onClick:v,disabled:o,fullWidth:!0,ariaLabel:`${r} ${s}`,children:r})]})},tr=({className:t=""})=>e.jsx("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{fillRule:"evenodd",d:"M5 3.25V4H2.75a.75.75 0 0 0 0 1.5h.3l.815 8.15A1.5 1.5 0 0 0 5.357 15h5.285a1.5 1.5 0 0 0 1.493-1.35l.815-8.15h.3a.75.75 0 0 0 0-1.5H11v-.75A2.25 2.25 0 0 0 8.75 1h-1.5A2.25 2.25 0 0 0 5 3.25Zm2.25-.75a.75.75 0 0 0-.75.75V4h3v-.75a.75.75 0 0 0-.75-.75h-1.5ZM6.05 6a.75.75 0 0 1 .787.713l.275 5.5a.75.75 0 0 1-1.498.075l-.275-5.5A.75.75 0 0 1 6.05 6Zm3.9 0a.75.75 0 0 1 .712.787l-.275 5.5a.75.75 0 0 1-1.498-.075l.275-5.5a.75.75 0 0 1 .786-.711Z",clipRule:"evenodd"})}),le=({categoryLabel:t,categoryColor:s="lime",productRef:n,price:r,productName:a,descriptionItems:o=[],showDescription:l=!0,quantity:c=0,minQuantity:d=0,maxQuantity:p,onQuantityChange:i,onDelete:b,disabled:x=!1,className:g="",deleteIcon:m})=>{const v={lime:{bg:"bg-lime-100 dark:bg-lime-900/40",text:"text-lime-700 dark:text-lime-300"},red:{bg:"bg-red-100 dark:bg-red-900/40",text:"text-red-700 dark:text-red-300"},orange:{bg:"bg-orange-100 dark:bg-orange-900/40",text:"text-orange-700 dark:text-orange-300"},amber:{bg:"bg-amber-100 dark:bg-amber-900/40",text:"text-amber-700 dark:text-amber-300"},yellow:{bg:"bg-yellow-100 dark:bg-yellow-900/40",text:"text-yellow-700 dark:text-yellow-300"},green:{bg:"bg-green-100 dark:bg-green-900/40",text:"text-green-700 dark:text-green-300"},emerald:{bg:"bg-emerald-100 dark:bg-emerald-900/40",text:"text-emerald-700 dark:text-emerald-300"},teal:{bg:"bg-teal-100 dark:bg-teal-900/40",text:"text-teal-700 dark:text-teal-300"},cyan:{bg:"bg-cyan-100 dark:bg-cyan-900/40",text:"text-cyan-700 dark:text-cyan-300"},sky:{bg:"bg-sky-100 dark:bg-sky-900/40",text:"text-sky-700 dark:text-sky-300"},blue:{bg:"bg-blue-100 dark:bg-blue-900/40",text:"text-blue-700 dark:text-blue-300"},indigo:{bg:"bg-indigo-100 dark:bg-indigo-900/40",text:"text-indigo-700 dark:text-indigo-300"},violet:{bg:"bg-violet-100 dark:bg-violet-900/40",text:"text-violet-700 dark:text-violet-300"},purple:{bg:"bg-purple-100 dark:bg-purple-900/40",text:"text-purple-700 dark:text-purple-300"},fuchsia:{bg:"bg-fuchsia-100 dark:bg-fuchsia-900/40",text:"text-fuchsia-700 dark:text-fuchsia-300"},pink:{bg:"bg-pink-100 dark:bg-pink-900/40",text:"text-pink-700 dark:text-pink-300"},rose:{bg:"bg-rose-100 dark:bg-rose-900/40",text:"text-rose-700 dark:text-rose-300"},zinc:{bg:"bg-zinc-100 dark:bg-zinc-800/50",text:"text-zinc-600 dark:text-zinc-300"},primary:{bg:"bg-primary-custom-100 dark:bg-primary-custom-600/30",text:"text-primary-custom-600 dark:text-primary-custom-300"}},u=v[s]||v.lime,h=f=>{!x&&i&&i(f)},w=()=>{!x&&b&&b()};return e.jsxs("div",{className:`
|
|
1163
|
-
flex
|
|
1164
|
-
flex-col
|
|
1165
|
-
gap-2
|
|
1166
|
-
w-full
|
|
1167
|
-
${x?"opacity-50 pointer-events-none":""}
|
|
1168
|
-
${g}
|
|
1169
|
-
`.trim().replace(/\s+/g," "),"data-component":"POSProductSidebarItems",children:[e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("div",{className:"flex flex-col gap-1 w-full",children:[e.jsxs("div",{className:"flex items-center gap-1 w-full",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[e.jsx("div",{className:`
|
|
1170
|
-
inline-flex
|
|
1171
|
-
items-center
|
|
1172
|
-
px-1.5
|
|
1173
|
-
py-1
|
|
1174
|
-
rounded-md
|
|
1175
|
-
transition-colors
|
|
1176
|
-
duration-150
|
|
1177
|
-
${u.bg}
|
|
1178
|
-
`.trim().replace(/\s+/g," "),children:e.jsx("span",{className:`
|
|
1179
|
-
text-xs
|
|
1180
|
-
leading-4
|
|
1181
|
-
font-normal
|
|
1182
|
-
text-center
|
|
1183
|
-
whitespace-nowrap
|
|
1184
|
-
${u.text}
|
|
1185
|
-
`.trim().replace(/\s+/g," "),children:t})}),e.jsx("span",{className:"text-[10px] leading-3 font-normal text-content-primary dark:text-dark-content-primary whitespace-nowrap",children:n})]}),e.jsx("div",{className:"flex items-center shrink-0",children:e.jsx("span",{className:"text-xs leading-4 font-bold text-content-primary dark:text-dark-content-primary whitespace-nowrap text-right",children:r})})]}),e.jsx("div",{className:"flex items-start w-full",children:e.jsx("span",{className:"text-xs leading-4 font-bold text-content-primary dark:text-dark-content-primary flex-1 min-w-0",children:a})})]}),l&&o.length>0&&e.jsx("div",{className:`
|
|
1186
|
-
flex
|
|
1187
|
-
flex-col
|
|
1188
|
-
gap-2
|
|
1189
|
-
p-2
|
|
1190
|
-
rounded-lg
|
|
1191
|
-
bg-background-secondary
|
|
1192
|
-
dark:bg-zinc-700
|
|
1193
|
-
w-full
|
|
1194
|
-
transition-colors
|
|
1195
|
-
duration-150
|
|
1196
|
-
`.trim().replace(/\s+/g," "),children:o.map((f,k)=>e.jsxs("div",{className:"flex items-center gap-1 w-full",children:[e.jsx("span",{className:"flex-1 min-w-0 text-xs leading-3 font-normal text-content-primary dark:text-dark-content-primary",children:f.description}),e.jsx("span",{className:"text-xs leading-3 font-bold text-content-primary dark:text-dark-content-primary whitespace-nowrap text-right shrink-0",children:f.price})]},k))})]}),e.jsxs("div",{className:"flex items-center justify-between w-full",children:[e.jsx("div",{className:"w-[118px]",children:e.jsx(G,{value:c,min:d,max:p,onChange:h,disabled:x})}),e.jsx("button",{type:"button",onClick:w,disabled:x,className:`
|
|
1197
|
-
flex
|
|
1198
|
-
items-center
|
|
1199
|
-
justify-center
|
|
1200
|
-
w-6
|
|
1201
|
-
h-6
|
|
1202
|
-
rounded-md
|
|
1203
|
-
text-red-700
|
|
1204
|
-
dark:text-red-500
|
|
1205
|
-
hover:text-red-800
|
|
1206
|
-
dark:hover:text-red-400
|
|
1207
|
-
hover:bg-red-50
|
|
1208
|
-
dark:hover:bg-red-900/20
|
|
1209
|
-
focus:outline-none
|
|
1210
|
-
focus:ring-2
|
|
1211
|
-
focus:ring-red-500/50
|
|
1212
|
-
dark:focus:ring-red-400/50
|
|
1213
|
-
focus:ring-offset-1
|
|
1214
|
-
focus:ring-offset-white
|
|
1215
|
-
dark:focus:ring-offset-dark-bg-primary
|
|
1216
|
-
active:scale-95
|
|
1217
|
-
transition-all
|
|
1218
|
-
duration-150
|
|
1219
|
-
${x?"cursor-not-allowed opacity-50":"cursor-pointer"}
|
|
1220
|
-
`.trim().replace(/\s+/g," "),"aria-label":"Eliminar producto",children:m||e.jsx(tr,{className:"w-[18px] h-[21px]"})})]})]})};le.displayName="POSProductSidebarItems";const sr=({tableNumber:t,status:s="available",shape:n="square",chairs:r=4,showChairs:a=!0,isActive:o=!1,onClick:l,className:c="",disabled:d=!1,children:p})=>{const i={available:{border:"border-[#0e79fd]",borderDark:"dark:border-[#93d1fd]",bgEnabled:"bg-transparent",bgEnabledDark:"dark:bg-transparent",bgActive:"bg-[#dbeefe]",bgActiveDark:"dark:bg-[#1e3a5f]",borderActive:"border-[#bce4ff]",borderActiveDark:"dark:border-[#1e3a5f]",table:"bg-[#0e79fd]",tableDark:"dark:bg-[#93d1fd]",chair:"bg-[#0e79fd]",chairDark:"dark:bg-[#93d1fd]",text:"text-[#0e79fd]",textDark:"dark:text-[#93d1fd]",focusRing:"focus:ring-[#93d1fd]",focusRingDark:"dark:focus:ring-[#0e79fd]"},busy:{border:"border-[#af460e]",borderDark:"dark:border-[#f5a927]",bgEnabled:"bg-transparent",bgEnabledDark:"dark:bg-transparent",bgActive:"bg-[#fed7aa]",bgActiveDark:"dark:bg-[#5c3a1e]",borderActive:"border-[#fed7aa]",borderActiveDark:"dark:border-[#5c3a1e]",table:"bg-[#af460e]",tableDark:"dark:bg-[#f5a927]",chair:"bg-[#af460e]",chairDark:"dark:bg-[#f5a927]",text:"text-[#af460e]",textDark:"dark:text-[#f5a927]",focusRing:"focus:ring-[#f5a927]",focusRingDark:"dark:focus:ring-[#af460e]"},reserved:{border:"border-[#7e22ce]",borderDark:"dark:border-[#c084fc]",bgEnabled:"bg-transparent",bgEnabledDark:"dark:bg-transparent",bgActive:"bg-[#e9d5ff]",bgActiveDark:"dark:bg-[#3b1f5c]",borderActive:"border-[#e9d5ff]",borderActiveDark:"dark:border-[#3b1f5c]",table:"bg-[#7e22ce]",tableDark:"dark:bg-[#c084fc]",chair:"bg-[#7e22ce]",chairDark:"dark:bg-[#c084fc]",text:"text-[#7e22ce]",textDark:"dark:text-[#c084fc]",focusRing:"focus:ring-[#c084fc]",focusRingDark:"dark:focus:ring-[#7e22ce]"}},b={square:{container:"rounded-[4px]",table:"w-[64px] h-[64px] rounded-[4px]"},circle:{container:"rounded-[9999px]",table:"w-[64px] h-[64px] rounded-[9999px]"},rectangle:{container:"rounded-[4px]",table:"w-[80px] h-[64px] rounded-[4px]"},oval:{container:"rounded-[24px]",table:"w-[80px] h-[64px] rounded-[24px]"}},x=({rotation:u})=>e.jsxs("div",{className:"w-[28px] h-[22px]",style:{transform:`rotate(${u}deg)`},"aria-hidden":"true",children:[e.jsx("div",{className:`
|
|
1221
|
-
absolute
|
|
1222
|
-
top-0
|
|
1223
|
-
left-0
|
|
1224
|
-
right-0
|
|
1225
|
-
h-[16px]
|
|
1226
|
-
rounded-t-[4px]
|
|
1227
|
-
${i[s].chair}
|
|
1228
|
-
${i[s].chairDark}
|
|
1229
|
-
`}),e.jsx("div",{className:`
|
|
1230
|
-
absolute
|
|
1231
|
-
bottom-0
|
|
1232
|
-
left-[7.14%]
|
|
1233
|
-
right-[7.14%]
|
|
1234
|
-
h-[14px]
|
|
1235
|
-
rounded-b-[4px]
|
|
1236
|
-
${i[s].chair}
|
|
1237
|
-
${i[s].chairDark}
|
|
1238
|
-
`})]}),g=()=>{!d&&l&&l()},m=u=>{(u.key==="Enter"||u.key===" ")&&!d&&l&&(u.preventDefault(),l())},v=["w-[160px]","h-[160px]","shrink-0","relative","flex","flex-col","items-center","justify-center","p-0","border-2","box-border","rounded-[8px]",o?i[s].borderActive:i[s].border,o?i[s].borderActiveDark:i[s].borderDark,o?i[s].bgActive:i[s].bgEnabled,o?i[s].bgActiveDark:i[s].bgEnabledDark,"focus:outline-none","focus:ring-2",i[s].focusRing,i[s].focusRingDark,"focus:ring-offset-2","dark:focus:ring-offset-dark-bg-primary","transition-all","duration-150",l&&!d?"cursor-pointer":"",l&&!d?"hover:scale-105":"",l&&!d?"active:scale-95":"",d?"opacity-50 cursor-not-allowed":"",c].filter(Boolean).join(" ").replace(/\s+/g," ").trim();return e.jsxs("button",{className:v,onClick:g,onKeyDown:m,disabled:d,type:"button","aria-label":`Mesa ${t} - ${s==="available"?"Disponible":s==="busy"?"Ocupada":"Reservada"}`,children:[e.jsxs("div",{className:"flex flex-col gap-[4px] items-center justify-center w-[134px] h-[134px] shrink-0",children:[a&&(r===2||r===4||r===6||r===8)&&e.jsxs("div",{className:"flex gap-[4px] items-center justify-center shrink-0",children:[r>=6&&e.jsxs(e.Fragment,{children:[e.jsx(x,{rotation:0}),e.jsx(x,{rotation:0})]}),r===2&&e.jsx(x,{rotation:0}),r===4&&e.jsx(x,{rotation:0})]}),e.jsxs("div",{className:"flex gap-[4px] items-center justify-center shrink-0",children:[a&&(r===4||r===6||r===8)&&e.jsxs("div",{className:"flex flex-col gap-[4px] items-start justify-center shrink-0",children:[r>=8&&e.jsxs(e.Fragment,{children:[e.jsx(x,{rotation:270}),e.jsx(x,{rotation:270})]}),(r===4||r===6)&&e.jsx(x,{rotation:270})]}),e.jsx("div",{className:"flex flex-col gap-[4px] items-start justify-center shrink-0",children:e.jsx("div",{className:"flex items-center shrink-0",children:e.jsx("div",{className:`
|
|
1239
|
-
${b[n].table}
|
|
1240
|
-
${i[s].table}
|
|
1241
|
-
${i[s].tableDark}
|
|
1242
|
-
shrink-0
|
|
1243
|
-
`})})}),a&&(r===4||r===6||r===8)&&e.jsxs("div",{className:"flex flex-col gap-[4px] items-start justify-center shrink-0",children:[r>=8&&e.jsxs(e.Fragment,{children:[e.jsx(x,{rotation:90}),e.jsx(x,{rotation:90})]}),(r===4||r===6)&&e.jsx(x,{rotation:90})]})]}),a&&(r===2||r===4||r===6||r===8)&&e.jsxs("div",{className:"flex gap-[4px] items-center justify-center shrink-0",children:[r>=6&&e.jsxs(e.Fragment,{children:[e.jsx(x,{rotation:180}),e.jsx(x,{rotation:180})]}),r===2&&e.jsx(x,{rotation:180}),r===4&&e.jsx(x,{rotation:180})]})]}),e.jsxs("div",{className:`
|
|
1244
|
-
flex
|
|
1245
|
-
flex-col
|
|
1246
|
-
justify-center
|
|
1247
|
-
leading-[0]
|
|
1248
|
-
not-italic
|
|
1249
|
-
overflow-ellipsis
|
|
1250
|
-
overflow-hidden
|
|
1251
|
-
min-w-full
|
|
1252
|
-
text-center
|
|
1253
|
-
whitespace-nowrap
|
|
1254
|
-
shrink-0
|
|
1255
|
-
text-[10px]
|
|
1256
|
-
font-normal
|
|
1257
|
-
${i[s].text}
|
|
1258
|
-
${i[s].textDark}
|
|
1259
|
-
`,children:[e.jsxs("p",{className:"leading-[12px] overflow-ellipsis overflow-hidden",children:["Mesa ",t]}),p]})]})},ce=y.createContext(void 0),ar=({children:t,defaultTheme:s="light"})=>{const[n,r]=y.useState(()=>typeof window<"u"&&localStorage.getItem("siesa-ui-theme")||s);y.useEffect(()=>{const l=window.document.documentElement;n==="dark"?l.classList.add("dark"):l.classList.remove("dark"),localStorage.setItem("siesa-ui-theme",n)},[n]);const a=()=>{r(l=>l==="light"?"dark":"light")},o=l=>{r(l)};return e.jsx(ce.Provider,{value:{theme:n,toggleTheme:a,setTheme:o},children:t})},nr=()=>{const t=y.useContext(ce);if(t===void 0)throw new Error("useTheme debe ser usado dentro de un ThemeProvider");return t};exports.Alert=ie;exports.Avatar=ae;exports.Badge=O;exports.Button=q;exports.Checkbox=re;exports.DescriptionList=oe;exports.Divider=ne;exports.Dropdown=ke;exports.Input=Y;exports.Navbar=He;exports.NavigationBar=Oe;exports.Notification=je;exports.POSConvention=We;exports.POSLocationButton=Xe;exports.POSNumberButton=Je;exports.POSProductButton=Ye;exports.POSProductCard=rr;exports.POSProductSidebarItems=le;exports.POSTable=sr;exports.Pagination=$e;exports.Quantity=G;exports.Radio=te;exports.Select=_e;exports.Switch=se;exports.Table=ze;exports.Tabs=Ee;exports.Textarea=ee;exports.ThemeProvider=ar;exports.useTheme=nr;
|
|
1260
|
-
//# sourceMappingURL=siesa-ui-kit.cjs.map
|