@darkfrost-1107/scaff-z-react 0.1.7
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/LICENSE.md +5 -0
- package/README.md +75 -0
- package/dist/_virtual/_rolldown/runtime.cjs +1 -0
- package/dist/action-processor.d.ts +2 -0
- package/dist/app/config/sqlite.registry.cjs +1 -0
- package/dist/app/config/sqlite.registry.esm +37 -0
- package/dist/app.config.d.ts +1 -0
- package/dist/async-combobox.input.d.ts +4 -0
- package/dist/async-multi-select.input.d.ts +4 -0
- package/dist/async-select.input.d.ts +4 -0
- package/dist/audit-view.d.ts +2 -0
- package/dist/back-button.action.d.ts +6 -0
- package/dist/badge.d.ts +2 -0
- package/dist/base.connector.d.ts +4 -0
- package/dist/base.entity.d.ts +2 -0
- package/dist/base.node.d.ts +2 -0
- package/dist/base.service.d.ts +4 -0
- package/dist/breadcrumb.d.ts +2 -0
- package/dist/build.router.d.ts +4 -0
- package/dist/builder-device.guard.d.ts +2 -0
- package/dist/builder.d.ts +2 -0
- package/dist/button.d.ts +2 -0
- package/dist/calendar.d.ts +2 -0
- package/dist/canvas-view.layout.d.ts +2 -0
- package/dist/card.d.ts +2 -0
- package/dist/checkbox-inline.input.d.ts +4 -0
- package/dist/checkbox.d.ts +2 -0
- package/dist/checkbox.input.d.ts +4 -0
- package/dist/code.input.d.ts +4 -0
- package/dist/color.input.d.ts +4 -0
- package/dist/combobox.d.ts +2 -0
- package/dist/combobox.input.d.ts +4 -0
- package/dist/command.d.ts +2 -0
- package/dist/component.factory.d.ts +4 -0
- package/dist/component.guard.d.ts +2 -0
- package/dist/components.registry.d.ts +2 -0
- package/dist/context.guard.d.ts +2 -0
- package/dist/context.verifier.d.ts +2 -0
- package/dist/crypto.service.d.ts +2 -0
- package/dist/dark.style.d.ts +2 -0
- package/dist/data-table.component.d.ts +2 -0
- package/dist/data-table.provider.d.ts +1 -0
- package/dist/date.input.d.ts +2 -0
- package/dist/deckgl-overlay.d.ts +2 -0
- package/dist/detail-tabs.layout.d.ts +6 -0
- package/dist/detail-view.layout.d.ts +6 -0
- package/dist/device-artifact.guard.d.ts +2 -0
- package/dist/device.guard.d.ts +2 -0
- package/dist/device.verifier.registry.d.ts +2 -0
- package/dist/dialog.d.ts +2 -0
- package/dist/dnd.provider.d.ts +2 -0
- package/dist/draggeable.d.ts +2 -0
- package/dist/droppable.d.ts +2 -0
- package/dist/droppeable.d.ts +2 -0
- package/dist/dynamic-device.guard.d.ts +2 -0
- package/dist/dynamic-icon.d.ts +6 -0
- package/dist/email.input.d.ts +4 -0
- package/dist/enum.verifier.d.ts +2 -0
- package/dist/env.manager.d.ts +2 -0
- package/dist/feedback.layout.d.ts +2 -0
- package/dist/field.d.ts +2 -0
- package/dist/file.input.d.ts +4 -0
- package/dist/flow-canvas.d.ts +2 -0
- package/dist/flow.renderer.d.ts +2 -0
- package/dist/flow.types.d.ts +1 -0
- package/dist/form-dialog-layout.d.ts +4 -0
- package/dist/form-tab-layout.d.ts +4 -0
- package/dist/form.component.d.ts +2 -0
- package/dist/grid.layout.d.ts +2 -0
- package/dist/guard.d.ts +2 -0
- package/dist/hover.d.ts +2 -0
- package/dist/icon-box.d.ts +2 -0
- package/dist/icon-button.d.ts +2 -0
- package/dist/image.input.d.ts +4 -0
- package/dist/index.d.ts +2 -0
- package/dist/indexeddb.service.d.ts +6 -0
- package/dist/input-group.d.ts +2 -0
- package/dist/input.d.ts +2 -0
- package/dist/interceptor.builder.d.ts +2 -0
- package/dist/label.d.ts +2 -0
- package/dist/language-toggle.d.ts +2 -0
- package/dist/list-select.input.d.ts +4 -0
- package/dist/logger.d.ts +2 -0
- package/dist/main.connector.d.ts +2 -0
- package/dist/main.service.d.ts +6 -0
- package/dist/maps.renderer.d.ts +4 -0
- package/dist/marker.factory.d.ts +2 -0
- package/dist/marker.guard.d.ts +2 -0
- package/dist/markers.meta.d.ts +1 -0
- package/dist/modules/actions/entities/action.entity.cjs +1 -0
- package/dist/modules/actions/entities/action.entity.esm +139 -0
- package/dist/modules/artifacts/entities/artifact.entity.cjs +1 -0
- package/dist/modules/artifacts/entities/artifact.entity.esm +82 -0
- package/dist/modules/integrations/entities/integration.entity.cjs +1 -0
- package/dist/modules/integrations/entities/integration.entity.esm +75 -0
- package/dist/modules/inventory/entities/category.entity.cjs +1 -0
- package/dist/modules/inventory/entities/category.entity.esm +50 -0
- package/dist/modules/inventory/entities/inventory-item.entity.cjs +1 -0
- package/dist/modules/inventory/entities/inventory-item.entity.esm +68 -0
- package/dist/modules/inventory/entities/product-item.entity.cjs +1 -0
- package/dist/modules/inventory/entities/product-item.entity.esm +69 -0
- package/dist/modules/inventory/entities/zone.entity.cjs +1 -0
- package/dist/modules/inventory/entities/zone.entity.esm +50 -0
- package/dist/modules/memberships/entities/membership.entity.cjs +1 -0
- package/dist/modules/memberships/entities/membership.entity.esm +53 -0
- package/dist/modules/organizations/entities/organization.entity.cjs +1 -0
- package/dist/modules/organizations/entities/organization.entity.esm +75 -0
- package/dist/modules/projects/entities/project.entity.cjs +1 -0
- package/dist/modules/projects/entities/project.entity.esm +100 -0
- package/dist/modules/test/entities/experiment.entity.cjs +1 -0
- package/dist/modules/test/entities/experiment.entity.esm +71 -0
- package/dist/modules/tickets/entities/ticket.entity.cjs +1 -0
- package/dist/modules/tickets/entities/ticket.entity.esm +92 -0
- package/dist/modules/tools/entities/tool.entity.cjs +1 -0
- package/dist/modules/tools/entities/tool.entity.esm +129 -0
- package/dist/modules/users/entities/user-role.enum.cjs +1 -0
- package/dist/modules/users/entities/user-role.enum.esm +6 -0
- package/dist/modules/users/entities/user.entity.cjs +1 -0
- package/dist/modules/users/entities/user.entity.esm +88 -0
- package/dist/nfc.service.d.ts +6 -0
- package/dist/nosql.repo.d.ts +2 -0
- package/dist/nosql.repo.service.d.ts +4 -0
- package/dist/packages/capacitor/app.config.cjs +1 -0
- package/dist/packages/capacitor/app.config.d.ts +1 -0
- package/dist/packages/capacitor/app.config.esm +7 -0
- package/dist/packages/crypto/crypto.service.cjs +1 -0
- package/dist/packages/crypto/crypto.service.d.ts +6 -0
- package/dist/packages/crypto/crypto.service.esm +17 -0
- package/dist/packages/crypto/index.cjs +1 -0
- package/dist/packages/crypto/index.d.ts +1 -0
- package/dist/packages/crypto/index.esm +2 -0
- package/dist/packages/dnd/dnd.provider.cjs +1 -0
- package/dist/packages/dnd/dnd.provider.d.ts +3 -0
- package/dist/packages/dnd/dnd.provider.esm +8 -0
- package/dist/packages/dnd/draggeable.cjs +1 -0
- package/dist/packages/dnd/draggeable.d.ts +4 -0
- package/dist/packages/dnd/draggeable.esm +12 -0
- package/dist/packages/dnd/droppable.cjs +1 -0
- package/dist/packages/dnd/droppable.d.ts +8 -0
- package/dist/packages/dnd/droppable.esm +14 -0
- package/dist/packages/dnd/droppeable.cjs +1 -0
- package/dist/packages/dnd/droppeable.d.ts +5 -0
- package/dist/packages/dnd/droppeable.esm +13 -0
- package/dist/packages/dnd/sortable.cjs +1 -0
- package/dist/packages/dnd/sortable.d.ts +11 -0
- package/dist/packages/dnd/sortable.esm +18 -0
- package/dist/packages/env/env.manager.cjs +1 -0
- package/dist/packages/env/env.manager.d.ts +11 -0
- package/dist/packages/env/env.manager.esm +69 -0
- package/dist/packages/env/index.cjs +1 -0
- package/dist/packages/env/index.d.ts +1 -0
- package/dist/packages/env/index.esm +2 -0
- package/dist/packages/flow/flow.renderer.cjs +1 -0
- package/dist/packages/flow/flow.renderer.d.ts +13 -0
- package/dist/packages/flow/flow.renderer.esm +50 -0
- package/dist/packages/flow/flow.types.cjs +0 -0
- package/dist/packages/flow/flow.types.d.ts +30 -0
- package/dist/packages/flow/flow.types.esm +0 -0
- package/dist/packages/formatters/qr-code/qr.encoder.service.cjs +1 -0
- package/dist/packages/formatters/qr-code/qr.encoder.service.d.ts +5 -0
- package/dist/packages/formatters/qr-code/qr.encoder.service.esm +17 -0
- package/dist/packages/formatters/qr-code/qr.renderer.cjs +1 -0
- package/dist/packages/formatters/qr-code/qr.renderer.d.ts +3 -0
- package/dist/packages/formatters/qr-code/qr.renderer.esm +16 -0
- package/dist/packages/formatters/text-code/text-coder.service.cjs +1 -0
- package/dist/packages/formatters/text-code/text-coder.service.d.ts +9 -0
- package/dist/packages/formatters/text-code/text-coder.service.esm +36 -0
- package/dist/packages/i18n/index.cjs +1 -0
- package/dist/packages/i18n/index.d.ts +10 -0
- package/dist/packages/i18n/index.esm +18 -0
- package/dist/packages/i18n/language-toggle.cjs +1 -0
- package/dist/packages/i18n/language-toggle.d.ts +9 -0
- package/dist/packages/i18n/language-toggle.esm +73 -0
- package/dist/packages/indexeddb/builder.cjs +1 -0
- package/dist/packages/indexeddb/builder.d.ts +13 -0
- package/dist/packages/indexeddb/builder.esm +35 -0
- package/dist/packages/indexeddb/index.cjs +1 -0
- package/dist/packages/indexeddb/index.d.ts +5 -0
- package/dist/packages/indexeddb/index.esm +5 -0
- package/dist/packages/indexeddb/indexeddb.service.cjs +1 -0
- package/dist/packages/indexeddb/indexeddb.service.d.ts +21 -0
- package/dist/packages/indexeddb/indexeddb.service.esm +59 -0
- package/dist/packages/indexeddb/nosql.repo.cjs +1 -0
- package/dist/packages/indexeddb/nosql.repo.d.ts +33 -0
- package/dist/packages/indexeddb/nosql.repo.esm +69 -0
- package/dist/packages/indexeddb/nosql.repo.service.cjs +1 -0
- package/dist/packages/indexeddb/nosql.repo.service.d.ts +46 -0
- package/dist/packages/indexeddb/nosql.repo.service.esm +87 -0
- package/dist/packages/indexeddb/registry.cjs +1 -0
- package/dist/packages/indexeddb/registry.d.ts +21 -0
- package/dist/packages/indexeddb/registry.esm +22 -0
- package/dist/packages/indexeddb/types.cjs +0 -0
- package/dist/packages/indexeddb/types.d.ts +33 -0
- package/dist/packages/indexeddb/types.esm +0 -0
- package/dist/packages/logger/index.cjs +1 -0
- package/dist/packages/logger/index.d.ts +2 -0
- package/dist/packages/logger/index.esm +3 -0
- package/dist/packages/logger/logger.cjs +1 -0
- package/dist/packages/logger/logger.d.ts +137 -0
- package/dist/packages/logger/logger.esm +186 -0
- package/dist/packages/logger/registry.cjs +1 -0
- package/dist/packages/logger/registry.d.ts +9 -0
- package/dist/packages/logger/registry.esm +17 -0
- package/dist/packages/maps/deckgl-overlay.cjs +1 -0
- package/dist/packages/maps/deckgl-overlay.d.ts +9 -0
- package/dist/packages/maps/deckgl-overlay.esm +12 -0
- package/dist/packages/maps/maps.renderer.cjs +1 -0
- package/dist/packages/maps/maps.renderer.d.ts +19 -0
- package/dist/packages/maps/maps.renderer.esm +25 -0
- package/dist/packages/maps/markers/marker.factory.cjs +1 -0
- package/dist/packages/maps/markers/marker.factory.d.ts +8 -0
- package/dist/packages/maps/markers/marker.factory.esm +58 -0
- package/dist/packages/maps/markers/marker.guard.cjs +1 -0
- package/dist/packages/maps/markers/marker.guard.d.ts +22 -0
- package/dist/packages/maps/markers/marker.guard.esm +37 -0
- package/dist/packages/maps/markers/markers.meta.cjs +0 -0
- package/dist/packages/maps/markers/markers.meta.d.ts +12 -0
- package/dist/packages/maps/markers/markers.meta.esm +0 -0
- package/dist/packages/maps/styles/dark.style.cjs +1 -0
- package/dist/packages/maps/styles/dark.style.d.ts +1 -0
- package/dist/packages/maps/styles/dark.style.esm +93 -0
- package/dist/packages/nfc/nfc.service.cjs +1 -0
- package/dist/packages/nfc/nfc.service.d.ts +41 -0
- package/dist/packages/nfc/nfc.service.esm +104 -0
- package/dist/packages/requests/axios/base.connector.cjs +1 -0
- package/dist/packages/requests/axios/base.connector.d.ts +37 -0
- package/dist/packages/requests/axios/base.connector.esm +25 -0
- package/dist/packages/requests/axios/base.service.cjs +1 -0
- package/dist/packages/requests/axios/base.service.d.ts +41 -0
- package/dist/packages/requests/axios/base.service.esm +11 -0
- package/dist/packages/requests/axios/interceptor.builder.cjs +1 -0
- package/dist/packages/requests/axios/interceptor.builder.d.ts +26 -0
- package/dist/packages/requests/axios/interceptor.builder.esm +20 -0
- package/dist/packages/router/build.router.cjs +1 -0
- package/dist/packages/router/build.router.d.ts +6 -0
- package/dist/packages/router/build.router.esm +9 -0
- package/dist/packages/router/route.builder.cjs +1 -0
- package/dist/packages/router/route.builder.d.ts +46 -0
- package/dist/packages/router/route.builder.esm +50 -0
- package/dist/packages/scanner/scanner.formats.cjs +1 -0
- package/dist/packages/scanner/scanner.formats.d.ts +51 -0
- package/dist/packages/scanner/scanner.formats.esm +96 -0
- package/dist/packages/scanner/scanner.service.cjs +1 -0
- package/dist/packages/scanner/scanner.service.d.ts +32 -0
- package/dist/packages/scanner/scanner.service.esm +32 -0
- package/dist/packages/sheets/index.cjs +1 -0
- package/dist/packages/sheets/index.d.ts +2 -0
- package/dist/packages/sheets/index.esm +3 -0
- package/dist/packages/sheets/sheets.connector.cjs +1 -0
- package/dist/packages/sheets/sheets.connector.d.ts +6 -0
- package/dist/packages/sheets/sheets.connector.esm +21 -0
- package/dist/packages/sheets/sheets.service.cjs +1 -0
- package/dist/packages/sheets/sheets.service.d.ts +21 -0
- package/dist/packages/sheets/sheets.service.esm +38 -0
- package/dist/packages/sqlite/base/base.entity.cjs +1 -0
- package/dist/packages/sqlite/base/base.entity.d.ts +5 -0
- package/dist/packages/sqlite/base/base.entity.esm +41 -0
- package/dist/packages/sqlite/repo.service.cjs +1 -0
- package/dist/packages/sqlite/repo.service.d.ts +22 -0
- package/dist/packages/sqlite/repo.service.esm +52 -0
- package/dist/packages/sqlite/sqlite.service.cjs +1 -0
- package/dist/packages/sqlite/sqlite.service.d.ts +40 -0
- package/dist/packages/sqlite/sqlite.service.esm +77 -0
- package/dist/packages/sqlite/templates/test.entity.cjs +1 -0
- package/dist/packages/sqlite/templates/test.entity.d.ts +6 -0
- package/dist/packages/sqlite/templates/test.entity.esm +62 -0
- package/dist/packages/sqlite/templates/test.repo.service.cjs +1 -0
- package/dist/packages/sqlite/templates/test.repo.service.d.ts +8 -0
- package/dist/packages/sqlite/templates/test.repo.service.esm +26 -0
- package/dist/packages/stores/storage.service.cjs +1 -0
- package/dist/packages/stores/storage.service.d.ts +5 -0
- package/dist/packages/stores/storage.service.esm +22 -0
- package/dist/packages/stores/store.hook.cjs +1 -0
- package/dist/packages/stores/store.hook.d.ts +23 -0
- package/dist/packages/stores/store.hook.esm +22 -0
- package/dist/packages/stores/store.service.cjs +1 -0
- package/dist/packages/stores/store.service.d.ts +12 -0
- package/dist/packages/stores/store.service.esm +48 -0
- package/dist/packages/theme/theme-builder.cjs +1 -0
- package/dist/packages/theme/theme-builder.d.ts +19 -0
- package/dist/packages/theme/theme-builder.esm +25 -0
- package/dist/packages/theme/theme-provider.cjs +1 -0
- package/dist/packages/theme/theme-provider.d.ts +7 -0
- package/dist/packages/theme/theme-provider.esm +17 -0
- package/dist/packages/theme/theme-toggle.cjs +1 -0
- package/dist/packages/theme/theme-toggle.d.ts +6 -0
- package/dist/packages/theme/theme-toggle.esm +33 -0
- package/dist/packages/w3/tron/index.cjs +1 -0
- package/dist/packages/w3/tron/index.d.ts +4 -0
- package/dist/packages/w3/tron/index.esm +4 -0
- package/dist/packages/w3/tron/tron-assets.service.cjs +1 -0
- package/dist/packages/w3/tron/tron-assets.service.d.ts +38 -0
- package/dist/packages/w3/tron/tron-assets.service.esm +116 -0
- package/dist/packages/w3/tron/tron-wallet.entity.cjs +1 -0
- package/dist/packages/w3/tron/tron-wallet.entity.d.ts +15 -0
- package/dist/packages/w3/tron/tron-wallet.entity.esm +88 -0
- package/dist/packages/w3/tron/tron-wallet.repo.cjs +1 -0
- package/dist/packages/w3/tron/tron-wallet.repo.d.ts +30 -0
- package/dist/packages/w3/tron/tron-wallet.repo.esm +52 -0
- package/dist/packages/w3/tron/tron.service.cjs +1 -0
- package/dist/packages/w3/tron/tron.service.d.ts +124 -0
- package/dist/packages/w3/tron/tron.service.esm +406 -0
- package/dist/packages/w3/tron/tron.types.cjs +0 -0
- package/dist/packages/w3/tron/tron.types.d.ts +129 -0
- package/dist/packages/w3/tron/tron.types.esm +0 -0
- package/dist/page-container.d.ts +2 -0
- package/dist/popover.d.ts +2 -0
- package/dist/qr.encoder.service.d.ts +4 -0
- package/dist/qr.renderer.d.ts +4 -0
- package/dist/registry.d.ts +2 -0
- package/dist/repo.service.d.ts +4 -0
- package/dist/repository.contract.d.ts +1 -0
- package/dist/route.builder.d.ts +4 -0
- package/dist/scanner.formats.d.ts +2 -0
- package/dist/scanner.service.d.ts +2 -0
- package/dist/scroll-area.d.ts +2 -0
- package/dist/secret.input.d.ts +4 -0
- package/dist/select.d.ts +2 -0
- package/dist/select.input.d.ts +4 -0
- package/dist/separator.d.ts +2 -0
- package/dist/shared/assets/social-icons.cjs +1 -0
- package/dist/shared/assets/social-icons.d.ts +2 -0
- package/dist/shared/assets/social-icons.esm +30 -0
- package/dist/shared/constants/connectors/main.connector.cjs +1 -0
- package/dist/shared/constants/connectors/main.connector.d.ts +8 -0
- package/dist/shared/constants/connectors/main.connector.esm +38 -0
- package/dist/shared/constants/services/main.service.cjs +1 -0
- package/dist/shared/constants/services/main.service.d.ts +7 -0
- package/dist/shared/constants/services/main.service.esm +26 -0
- package/dist/shared/contracts/repository.contract.cjs +0 -0
- package/dist/shared/contracts/repository.contract.d.ts +26 -0
- package/dist/shared/contracts/repository.contract.esm +0 -0
- package/dist/shared/custom/actions/back-button.action.cjs +1 -0
- package/dist/shared/custom/actions/back-button.action.d.ts +13 -0
- package/dist/shared/custom/actions/back-button.action.esm +20 -0
- package/dist/shared/custom/audit/audit-view.cjs +1 -0
- package/dist/shared/custom/audit/audit-view.d.ts +46 -0
- package/dist/shared/custom/audit/audit-view.esm +73 -0
- package/dist/shared/custom/confirm/use-confirm.cjs +1 -0
- package/dist/shared/custom/confirm/use-confirm.d.ts +15 -0
- package/dist/shared/custom/confirm/use-confirm.esm +57 -0
- package/dist/shared/custom/data-table/data-table.component.cjs +1 -0
- package/dist/shared/custom/data-table/data-table.component.d.ts +9 -0
- package/dist/shared/custom/data-table/data-table.component.esm +26 -0
- package/dist/shared/custom/data-table/data-table.provider.cjs +0 -0
- package/dist/shared/custom/data-table/data-table.provider.d.ts +1 -0
- package/dist/shared/custom/data-table/data-table.provider.esm +0 -0
- package/dist/shared/custom/flow/flow-canvas.cjs +1 -0
- package/dist/shared/custom/flow/flow-canvas.d.ts +10 -0
- package/dist/shared/custom/flow/flow-canvas.esm +23 -0
- package/dist/shared/custom/flow/nodes/base.node.cjs +1 -0
- package/dist/shared/custom/flow/nodes/base.node.d.ts +9 -0
- package/dist/shared/custom/flow/nodes/base.node.esm +51 -0
- package/dist/shared/custom/form/form.component.cjs +1 -0
- package/dist/shared/custom/form/form.component.d.ts +13 -0
- package/dist/shared/custom/form/form.component.esm +26 -0
- package/dist/shared/custom/form/index.cjs +1 -0
- package/dist/shared/custom/form/index.d.ts +17 -0
- package/dist/shared/custom/form/index.esm +2 -0
- package/dist/shared/custom/form/inputs/async-combobox.input.cjs +1 -0
- package/dist/shared/custom/form/inputs/async-combobox.input.d.ts +18 -0
- package/dist/shared/custom/form/inputs/async-combobox.input.esm +91 -0
- package/dist/shared/custom/form/inputs/async-multi-select.input.cjs +1 -0
- package/dist/shared/custom/form/inputs/async-multi-select.input.d.ts +20 -0
- package/dist/shared/custom/form/inputs/async-multi-select.input.esm +127 -0
- package/dist/shared/custom/form/inputs/async-select.input.cjs +1 -0
- package/dist/shared/custom/form/inputs/async-select.input.d.ts +15 -0
- package/dist/shared/custom/form/inputs/async-select.input.esm +71 -0
- package/dist/shared/custom/form/inputs/checkbox-inline.input.cjs +1 -0
- package/dist/shared/custom/form/inputs/checkbox-inline.input.d.ts +15 -0
- package/dist/shared/custom/form/inputs/checkbox-inline.input.esm +41 -0
- package/dist/shared/custom/form/inputs/checkbox.input.cjs +1 -0
- package/dist/shared/custom/form/inputs/checkbox.input.d.ts +21 -0
- package/dist/shared/custom/form/inputs/checkbox.input.esm +50 -0
- package/dist/shared/custom/form/inputs/code.input.cjs +1 -0
- package/dist/shared/custom/form/inputs/code.input.d.ts +11 -0
- package/dist/shared/custom/form/inputs/code.input.esm +58 -0
- package/dist/shared/custom/form/inputs/color.input.cjs +1 -0
- package/dist/shared/custom/form/inputs/color.input.d.ts +11 -0
- package/dist/shared/custom/form/inputs/color.input.esm +47 -0
- package/dist/shared/custom/form/inputs/combobox.input.cjs +1 -0
- package/dist/shared/custom/form/inputs/combobox.input.d.ts +18 -0
- package/dist/shared/custom/form/inputs/combobox.input.esm +73 -0
- package/dist/shared/custom/form/inputs/date.input.cjs +1 -0
- package/dist/shared/custom/form/inputs/date.input.d.ts +11 -0
- package/dist/shared/custom/form/inputs/date.input.esm +52 -0
- package/dist/shared/custom/form/inputs/email.input.cjs +1 -0
- package/dist/shared/custom/form/inputs/email.input.d.ts +12 -0
- package/dist/shared/custom/form/inputs/email.input.esm +47 -0
- package/dist/shared/custom/form/inputs/file.input.cjs +1 -0
- package/dist/shared/custom/form/inputs/file.input.d.ts +11 -0
- package/dist/shared/custom/form/inputs/file.input.esm +95 -0
- package/dist/shared/custom/form/inputs/image.input.cjs +1 -0
- package/dist/shared/custom/form/inputs/image.input.d.ts +11 -0
- package/dist/shared/custom/form/inputs/image.input.esm +90 -0
- package/dist/shared/custom/form/inputs/list-select.input.cjs +1 -0
- package/dist/shared/custom/form/inputs/list-select.input.d.ts +17 -0
- package/dist/shared/custom/form/inputs/list-select.input.esm +53 -0
- package/dist/shared/custom/form/inputs/secret.input.cjs +1 -0
- package/dist/shared/custom/form/inputs/secret.input.d.ts +11 -0
- package/dist/shared/custom/form/inputs/secret.input.esm +53 -0
- package/dist/shared/custom/form/inputs/select.input.cjs +1 -0
- package/dist/shared/custom/form/inputs/select.input.d.ts +17 -0
- package/dist/shared/custom/form/inputs/select.input.esm +44 -0
- package/dist/shared/custom/form/inputs/tags.input.cjs +1 -0
- package/dist/shared/custom/form/inputs/tags.input.d.ts +16 -0
- package/dist/shared/custom/form/inputs/tags.input.esm +80 -0
- package/dist/shared/custom/form/inputs/text.input.cjs +1 -0
- package/dist/shared/custom/form/inputs/text.input.d.ts +13 -0
- package/dist/shared/custom/form/inputs/text.input.esm +47 -0
- package/dist/shared/custom/form/inputs/textarea.input.cjs +1 -0
- package/dist/shared/custom/form/inputs/textarea.input.d.ts +12 -0
- package/dist/shared/custom/form/inputs/textarea.input.esm +36 -0
- package/dist/shared/custom/form/layout/form-dialog-layout.cjs +1 -0
- package/dist/shared/custom/form/layout/form-dialog-layout.d.ts +25 -0
- package/dist/shared/custom/form/layout/form-dialog-layout.esm +37 -0
- package/dist/shared/custom/form/layout/form-tab-layout.cjs +1 -0
- package/dist/shared/custom/form/layout/form-tab-layout.d.ts +30 -0
- package/dist/shared/custom/form/layout/form-tab-layout.esm +69 -0
- package/dist/shared/custom/hover/hover.cjs +1 -0
- package/dist/shared/custom/hover/hover.d.ts +6 -0
- package/dist/shared/custom/hover/hover.esm +20 -0
- package/dist/shared/custom/layouts/canvas-view.layout.cjs +1 -0
- package/dist/shared/custom/layouts/canvas-view.layout.d.ts +18 -0
- package/dist/shared/custom/layouts/canvas-view.layout.esm +15 -0
- package/dist/shared/custom/layouts/detail-tabs.layout.cjs +1 -0
- package/dist/shared/custom/layouts/detail-tabs.layout.d.ts +27 -0
- package/dist/shared/custom/layouts/detail-tabs.layout.esm +32 -0
- package/dist/shared/custom/layouts/detail-view.layout.cjs +1 -0
- package/dist/shared/custom/layouts/detail-view.layout.d.ts +33 -0
- package/dist/shared/custom/layouts/detail-view.layout.esm +64 -0
- package/dist/shared/custom/layouts/feedback.layout.cjs +1 -0
- package/dist/shared/custom/layouts/feedback.layout.d.ts +14 -0
- package/dist/shared/custom/layouts/feedback.layout.esm +20 -0
- package/dist/shared/custom/layouts/grid.layout.cjs +1 -0
- package/dist/shared/custom/layouts/grid.layout.d.ts +38 -0
- package/dist/shared/custom/layouts/grid.layout.esm +39 -0
- package/dist/shared/custom/layouts/page-container.cjs +1 -0
- package/dist/shared/custom/layouts/page-container.d.ts +6 -0
- package/dist/shared/custom/layouts/page-container.esm +12 -0
- package/dist/shared/custom/ui/icon-box.cjs +1 -0
- package/dist/shared/custom/ui/icon-box.d.ts +12 -0
- package/dist/shared/custom/ui/icon-box.esm +21 -0
- package/dist/shared/custom/ui/typography.cjs +1 -0
- package/dist/shared/custom/ui/typography.d.ts +11 -0
- package/dist/shared/custom/ui/typography.esm +30 -0
- package/dist/shared/hooks/use-device.cjs +1 -0
- package/dist/shared/hooks/use-device.d.ts +10 -0
- package/dist/shared/hooks/use-device.esm +37 -0
- package/dist/shared/hooks/use-i18n.cjs +1 -0
- package/dist/shared/hooks/use-i18n.d.ts +10 -0
- package/dist/shared/hooks/use-i18n.esm +15 -0
- package/dist/shared/hooks/use-mobile.cjs +1 -0
- package/dist/shared/hooks/use-mobile.d.ts +1 -0
- package/dist/shared/hooks/use-mobile.esm +14 -0
- package/dist/shared/lib/utils.cjs +1 -0
- package/dist/shared/lib/utils.d.ts +2 -0
- package/dist/shared/lib/utils.esm +8 -0
- package/dist/shared/logic/action/action-processor.cjs +1 -0
- package/dist/shared/logic/action/action-processor.d.ts +86 -0
- package/dist/shared/logic/action/action-processor.esm +30 -0
- package/dist/shared/logic/components/components.registry.cjs +1 -0
- package/dist/shared/logic/components/components.registry.d.ts +16 -0
- package/dist/shared/logic/components/components.registry.esm +26 -0
- package/dist/shared/logic/events/startable.cjs +1 -0
- package/dist/shared/logic/events/startable.d.ts +7 -0
- package/dist/shared/logic/events/startable.esm +32 -0
- package/dist/shared/logic/events/use-on-start.hook.cjs +1 -0
- package/dist/shared/logic/events/use-on-start.hook.d.ts +12 -0
- package/dist/shared/logic/events/use-on-start.hook.esm +15 -0
- package/dist/shared/logic/factory/component.factory.cjs +1 -0
- package/dist/shared/logic/factory/component.factory.d.ts +9 -0
- package/dist/shared/logic/factory/component.factory.esm +28 -0
- package/dist/shared/logic/guards/builder-device.guard.cjs +1 -0
- package/dist/shared/logic/guards/builder-device.guard.d.ts +5 -0
- package/dist/shared/logic/guards/builder-device.guard.esm +10 -0
- package/dist/shared/logic/guards/component.guard.cjs +1 -0
- package/dist/shared/logic/guards/component.guard.d.ts +5 -0
- package/dist/shared/logic/guards/component.guard.esm +13 -0
- package/dist/shared/logic/guards/context.guard.cjs +1 -0
- package/dist/shared/logic/guards/context.guard.d.ts +13 -0
- package/dist/shared/logic/guards/context.guard.esm +9 -0
- package/dist/shared/logic/guards/device-artifact.guard.cjs +1 -0
- package/dist/shared/logic/guards/device-artifact.guard.d.ts +16 -0
- package/dist/shared/logic/guards/device-artifact.guard.esm +44 -0
- package/dist/shared/logic/guards/device.guard.cjs +1 -0
- package/dist/shared/logic/guards/device.guard.d.ts +17 -0
- package/dist/shared/logic/guards/device.guard.esm +40 -0
- package/dist/shared/logic/guards/dynamic-device.guard.cjs +1 -0
- package/dist/shared/logic/guards/dynamic-device.guard.d.ts +5 -0
- package/dist/shared/logic/guards/dynamic-device.guard.esm +10 -0
- package/dist/shared/logic/guards/guard.cjs +1 -0
- package/dist/shared/logic/guards/guard.d.ts +24 -0
- package/dist/shared/logic/guards/guard.esm +18 -0
- package/dist/shared/logic/service/base.service.cjs +1 -0
- package/dist/shared/logic/service/base.service.d.ts +3 -0
- package/dist/shared/logic/service/base.service.esm +5 -0
- package/dist/shared/logic/verifiers/context.verifier.cjs +1 -0
- package/dist/shared/logic/verifiers/context.verifier.d.ts +7 -0
- package/dist/shared/logic/verifiers/context.verifier.esm +31 -0
- package/dist/shared/logic/verifiers/device.verifier.registry.cjs +1 -0
- package/dist/shared/logic/verifiers/device.verifier.registry.d.ts +13 -0
- package/dist/shared/logic/verifiers/device.verifier.registry.esm +36 -0
- package/dist/shared/logic/verifiers/enum.verifier.cjs +1 -0
- package/dist/shared/logic/verifiers/enum.verifier.d.ts +4 -0
- package/dist/shared/logic/verifiers/enum.verifier.esm +9 -0
- package/dist/shared/logic/verifiers/value.verifier.cjs +1 -0
- package/dist/shared/logic/verifiers/value.verifier.d.ts +5 -0
- package/dist/shared/logic/verifiers/value.verifier.esm +9 -0
- package/dist/shared/ui/badge.cjs +1 -0
- package/dist/shared/ui/badge.d.ts +9 -0
- package/dist/shared/ui/badge.esm +27 -0
- package/dist/shared/ui/breadcrumb.cjs +1 -0
- package/dist/shared/ui/breadcrumb.d.ts +11 -0
- package/dist/shared/ui/breadcrumb.esm +70 -0
- package/dist/shared/ui/button.cjs +1 -0
- package/dist/shared/ui/button.d.ts +11 -0
- package/dist/shared/ui/button.esm +47 -0
- package/dist/shared/ui/calendar.cjs +1 -0
- package/dist/shared/ui/calendar.d.ts +10 -0
- package/dist/shared/ui/calendar.esm +92 -0
- package/dist/shared/ui/card.cjs +1 -0
- package/dist/shared/ui/card.d.ts +11 -0
- package/dist/shared/ui/card.esm +56 -0
- package/dist/shared/ui/checkbox.cjs +1 -0
- package/dist/shared/ui/checkbox.d.ts +4 -0
- package/dist/shared/ui/checkbox.esm +20 -0
- package/dist/shared/ui/combobox.cjs +1 -0
- package/dist/shared/ui/combobox.d.ts +24 -0
- package/dist/shared/ui/combobox.esm +163 -0
- package/dist/shared/ui/command.cjs +1 -0
- package/dist/shared/ui/command.d.ts +18 -0
- package/dist/shared/ui/command.esm +87 -0
- package/dist/shared/ui/custom/dynamic-icon.cjs +1 -0
- package/dist/shared/ui/custom/dynamic-icon.d.ts +13 -0
- package/dist/shared/ui/custom/dynamic-icon.esm +15 -0
- package/dist/shared/ui/dialog.cjs +1 -0
- package/dist/shared/ui/dialog.d.ts +17 -0
- package/dist/shared/ui/dialog.esm +95 -0
- package/dist/shared/ui/field.cjs +1 -0
- package/dist/shared/ui/field.d.ts +24 -0
- package/dist/shared/ui/field.esm +107 -0
- package/dist/shared/ui/icon-button.cjs +1 -0
- package/dist/shared/ui/icon-button.d.ts +6 -0
- package/dist/shared/ui/icon-button.esm +14 -0
- package/dist/shared/ui/index.cjs +1 -0
- package/dist/shared/ui/index.d.ts +23 -0
- package/dist/shared/ui/index.esm +24 -0
- package/dist/shared/ui/input-group.cjs +1 -0
- package/dist/shared/ui/input-group.d.ts +16 -0
- package/dist/shared/ui/input-group.esm +77 -0
- package/dist/shared/ui/input.cjs +1 -0
- package/dist/shared/ui/input.d.ts +3 -0
- package/dist/shared/ui/input.esm +14 -0
- package/dist/shared/ui/label.cjs +1 -0
- package/dist/shared/ui/label.d.ts +4 -0
- package/dist/shared/ui/label.esm +14 -0
- package/dist/shared/ui/popover.cjs +1 -0
- package/dist/shared/ui/popover.d.ts +7 -0
- package/dist/shared/ui/popover.esm +35 -0
- package/dist/shared/ui/scroll-area.cjs +1 -0
- package/dist/shared/ui/scroll-area.d.ts +5 -0
- package/dist/shared/ui/scroll-area.esm +36 -0
- package/dist/shared/ui/select.cjs +1 -0
- package/dist/shared/ui/select.d.ts +15 -0
- package/dist/shared/ui/select.esm +99 -0
- package/dist/shared/ui/separator.cjs +1 -0
- package/dist/shared/ui/separator.d.ts +4 -0
- package/dist/shared/ui/separator.esm +16 -0
- package/dist/shared/ui/sheet.cjs +1 -0
- package/dist/shared/ui/sheet.d.ts +14 -0
- package/dist/shared/ui/sheet.esm +89 -0
- package/dist/shared/ui/sidebar.cjs +1 -0
- package/dist/shared/ui/sidebar.d.ts +69 -0
- package/dist/shared/ui/sidebar.esm +348 -0
- package/dist/shared/ui/skeleton.cjs +1 -0
- package/dist/shared/ui/skeleton.d.ts +2 -0
- package/dist/shared/ui/skeleton.esm +12 -0
- package/dist/shared/ui/sonner.cjs +1 -0
- package/dist/shared/ui/sonner.d.ts +3 -0
- package/dist/shared/ui/sonner.esm +29 -0
- package/dist/shared/ui/table.cjs +1 -0
- package/dist/shared/ui/table.d.ts +10 -0
- package/dist/shared/ui/table.esm +66 -0
- package/dist/shared/ui/tabs.cjs +1 -0
- package/dist/shared/ui/tabs.d.ts +11 -0
- package/dist/shared/ui/tabs.esm +45 -0
- package/dist/shared/ui/textarea.cjs +1 -0
- package/dist/shared/ui/textarea.d.ts +3 -0
- package/dist/shared/ui/textarea.esm +13 -0
- package/dist/shared/ui/tooltip.cjs +1 -0
- package/dist/shared/ui/tooltip.d.ts +7 -0
- package/dist/shared/ui/tooltip.esm +36 -0
- package/dist/sheet.d.ts +2 -0
- package/dist/sheets.connector.d.ts +2 -0
- package/dist/sheets.service.d.ts +2 -0
- package/dist/sidebar.d.ts +2 -0
- package/dist/skeleton.d.ts +2 -0
- package/dist/social-icons.d.ts +2 -0
- package/dist/sonner.d.ts +2 -0
- package/dist/sortable.d.ts +2 -0
- package/dist/sqlite.service.d.ts +6 -0
- package/dist/startable.d.ts +4 -0
- package/dist/storage.service.d.ts +4 -0
- package/dist/store.hook.d.ts +4 -0
- package/dist/store.service.d.ts +4 -0
- package/dist/table.d.ts +2 -0
- package/dist/tabs.d.ts +2 -0
- package/dist/tags.input.d.ts +4 -0
- package/dist/test.entity.d.ts +2 -0
- package/dist/test.repo.service.d.ts +6 -0
- package/dist/text-coder.service.d.ts +2 -0
- package/dist/text.input.d.ts +4 -0
- package/dist/textarea.d.ts +2 -0
- package/dist/textarea.input.d.ts +4 -0
- package/dist/theme-builder.d.ts +2 -0
- package/dist/theme-provider.d.ts +2 -0
- package/dist/theme-toggle.d.ts +2 -0
- package/dist/tooltip.d.ts +2 -0
- package/dist/tron-assets.service.d.ts +2 -0
- package/dist/tron-wallet.entity.d.ts +2 -0
- package/dist/tron-wallet.repo.d.ts +2 -0
- package/dist/tron.service.d.ts +2 -0
- package/dist/tron.types.d.ts +1 -0
- package/dist/types.d.ts +1 -0
- package/dist/typography.d.ts +2 -0
- package/dist/use-confirm.d.ts +2 -0
- package/dist/use-device.d.ts +2 -0
- package/dist/use-i18n.d.ts +2 -0
- package/dist/use-mobile.d.ts +2 -0
- package/dist/use-on-start.hook.d.ts +2 -0
- package/dist/utils.d.ts +2 -0
- package/dist/value.verifier.d.ts +4 -0
- package/package.json +155 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FieldValues, Path } from 'react-hook-form';
|
|
2
|
+
import { FormInputProps } from '../form.component';
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
interface ComboboxInputProps<T, TFieldValues extends FieldValues> extends FormInputProps<TFieldValues> {
|
|
5
|
+
name: Path<TFieldValues>;
|
|
6
|
+
label?: string;
|
|
7
|
+
helper?: string;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
items: T[];
|
|
10
|
+
itemFactory: (item: T) => React.ReactNode;
|
|
11
|
+
keyExtractor: (item: T) => string;
|
|
12
|
+
multiple?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Input de Combobox (Dropdown con búsqueda) para selección simple o múltiple.
|
|
16
|
+
*/
|
|
17
|
+
export default function ComboboxInput<T, TFieldValues extends FieldValues>({ form, name, label, helper, placeholder, items, itemFactory, keyExtractor, multiple, }: ComboboxInputProps<T, TFieldValues>): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { Field as e, FieldError as t, FieldLabel as n } from "../../../ui/field.esm";
|
|
2
|
+
import { Hover as r } from "../../hover/hover.esm";
|
|
3
|
+
import { Combobox as i, ComboboxChip as a, ComboboxChips as o, ComboboxChipsInput as s, ComboboxContent as c, ComboboxEmpty as l, ComboboxInput as u, ComboboxItem as d, ComboboxList as f, useComboboxAnchor as p } from "../../../ui/combobox.esm";
|
|
4
|
+
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
5
|
+
import "react";
|
|
6
|
+
import { Controller as g } from "react-hook-form";
|
|
7
|
+
//#region src/shared/custom/form/inputs/combobox.input.tsx
|
|
8
|
+
function _({ form: _, name: v, label: y, helper: b, placeholder: x, items: S, itemFactory: C, keyExtractor: w, multiple: T = !1 }) {
|
|
9
|
+
return /* @__PURE__ */ m(g, {
|
|
10
|
+
control: _.control,
|
|
11
|
+
name: v,
|
|
12
|
+
render: ({ field: { value: g, onChange: _ }, fieldState: v }) => {
|
|
13
|
+
let E = T ? Array.isArray(g) ? g : [] : g || "", D = p();
|
|
14
|
+
return /* @__PURE__ */ h(e, {
|
|
15
|
+
"data-invalid": v.invalid,
|
|
16
|
+
children: [
|
|
17
|
+
/* @__PURE__ */ h("div", {
|
|
18
|
+
className: "flex items-center gap-2 mb-2",
|
|
19
|
+
children: [y && /* @__PURE__ */ m(n, {
|
|
20
|
+
className: "text-sm font-medium",
|
|
21
|
+
children: y
|
|
22
|
+
}), b && /* @__PURE__ */ m(r, { children: b })]
|
|
23
|
+
}),
|
|
24
|
+
/* @__PURE__ */ h(i, {
|
|
25
|
+
multiple: T,
|
|
26
|
+
value: E,
|
|
27
|
+
onValueChange: (e) => {
|
|
28
|
+
_(e);
|
|
29
|
+
},
|
|
30
|
+
items: S,
|
|
31
|
+
children: [T ? /* @__PURE__ */ m("div", {
|
|
32
|
+
ref: D,
|
|
33
|
+
className: "w-full",
|
|
34
|
+
children: /* @__PURE__ */ h(o, {
|
|
35
|
+
className: "bg-background border-border w-full",
|
|
36
|
+
children: [E.map((e) => {
|
|
37
|
+
let t = S.find((t) => w(t) === e);
|
|
38
|
+
return /* @__PURE__ */ m(a, {
|
|
39
|
+
value: e,
|
|
40
|
+
children: t ? C(t) : e
|
|
41
|
+
}, e);
|
|
42
|
+
}), /* @__PURE__ */ m(s, { placeholder: E.length > 0 ? "" : x || "Seleccionar..." })]
|
|
43
|
+
})
|
|
44
|
+
}) : /* @__PURE__ */ m("div", {
|
|
45
|
+
ref: D,
|
|
46
|
+
className: "relative group/combobox w-full",
|
|
47
|
+
children: /* @__PURE__ */ m(u, {
|
|
48
|
+
placeholder: x || "Seleccionar...",
|
|
49
|
+
className: "w-full bg-background border-border flex flex-row items-center"
|
|
50
|
+
})
|
|
51
|
+
}), /* @__PURE__ */ h(c, {
|
|
52
|
+
anchor: D.current,
|
|
53
|
+
className: "bg-card border-border shadow-matte",
|
|
54
|
+
children: [/* @__PURE__ */ m(l, { children: "No se encontraron resultados" }), /* @__PURE__ */ m(f, {
|
|
55
|
+
className: "custom-scrollbar",
|
|
56
|
+
children: S.map((e) => /* @__PURE__ */ m(d, {
|
|
57
|
+
value: w(e),
|
|
58
|
+
children: C(e)
|
|
59
|
+
}, w(e)))
|
|
60
|
+
})]
|
|
61
|
+
})]
|
|
62
|
+
}),
|
|
63
|
+
v.invalid && v.error && /* @__PURE__ */ m(t, {
|
|
64
|
+
errors: [v.error],
|
|
65
|
+
className: "mt-2"
|
|
66
|
+
})
|
|
67
|
+
]
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
//#endregion
|
|
73
|
+
export { _ as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../../lib/utils.cjs`),t=require(`../../../ui/button.cjs`),n=require(`../../../ui/field.cjs`),r=require(`../../hover/hover.cjs`),i=require(`../../../ui/popover.cjs`),a=require(`../../../ui/calendar.cjs`);let o=require(`react/jsx-runtime`),s=require(`lucide-react`),c=require(`react-hook-form`),l=require(`date-fns`),u=require(`date-fns/locale`);function d({form:d,name:f,label:p,placeholder:m=`Seleccionar fecha`,helper:h,id:g}){let _=g||`date-input-${String(f)}`;return(0,o.jsx)(c.Controller,{control:d.control,name:f,render:({field:c,fieldState:d})=>(0,o.jsxs)(n.Field,{"data-invalid":d.invalid,children:[(0,o.jsxs)(`div`,{className:`flex items-center gap-2`,children:[p&&(0,o.jsx)(n.FieldLabel,{htmlFor:_,children:p}),h&&(0,o.jsx)(r.Hover,{children:h})]}),(0,o.jsxs)(i.Popover,{children:[(0,o.jsx)(i.PopoverTrigger,{asChild:!0,children:(0,o.jsxs)(t.Button,{id:_,variant:`outline`,className:e.cn(`w-full justify-start text-left font-normal bg-card`,!c.value&&`text-muted-foreground`,d.invalid&&`border-destructive focus-visible:ring-destructive`),children:[(0,o.jsx)(s.CalendarIcon,{className:`mr-2 h-4 w-4 opacity-50`}),c.value?(0,l.format)(c.value,`PPP`,{locale:u.es}):(0,o.jsx)(`span`,{children:m})]})}),(0,o.jsx)(i.PopoverContent,{className:`w-auto p-0`,align:`start`,children:(0,o.jsx)(a.Calendar,{mode:`single`,selected:c.value,onSelect:c.onChange,initialFocus:!0})})]}),d.invalid&&d.error&&(0,o.jsx)(n.FieldError,{errors:[d.error]})]})})}exports.DateInput=d;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FieldValues, Path } from 'react-hook-form';
|
|
2
|
+
import { FormInputProps } from '../form.component';
|
|
3
|
+
interface DateInputProps<T extends FieldValues> extends FormInputProps<T> {
|
|
4
|
+
name: Path<T>;
|
|
5
|
+
label?: string;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
helper?: string;
|
|
8
|
+
id?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function DateInput<T extends FieldValues>({ form, name, label, placeholder, helper, id }: DateInputProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { cn as e } from "../../../lib/utils.esm";
|
|
2
|
+
import { Button as t } from "../../../ui/button.esm";
|
|
3
|
+
import { Field as n, FieldError as r, FieldLabel as i } from "../../../ui/field.esm";
|
|
4
|
+
import { Hover as a } from "../../hover/hover.esm";
|
|
5
|
+
import { Popover as o, PopoverContent as s, PopoverTrigger as c } from "../../../ui/popover.esm";
|
|
6
|
+
import { Calendar as l } from "../../../ui/calendar.esm";
|
|
7
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
8
|
+
import { CalendarIcon as f } from "lucide-react";
|
|
9
|
+
import { Controller as p } from "react-hook-form";
|
|
10
|
+
import { format as m } from "date-fns";
|
|
11
|
+
import { es as h } from "date-fns/locale";
|
|
12
|
+
//#region src/shared/custom/form/inputs/date.input.tsx
|
|
13
|
+
function g({ form: g, name: _, label: v, placeholder: y = "Seleccionar fecha", helper: b, id: x }) {
|
|
14
|
+
let S = x || `date-input-${String(_)}`;
|
|
15
|
+
return /* @__PURE__ */ u(p, {
|
|
16
|
+
control: g.control,
|
|
17
|
+
name: _,
|
|
18
|
+
render: ({ field: p, fieldState: g }) => /* @__PURE__ */ d(n, {
|
|
19
|
+
"data-invalid": g.invalid,
|
|
20
|
+
children: [
|
|
21
|
+
/* @__PURE__ */ d("div", {
|
|
22
|
+
className: "flex items-center gap-2",
|
|
23
|
+
children: [v && /* @__PURE__ */ u(i, {
|
|
24
|
+
htmlFor: S,
|
|
25
|
+
children: v
|
|
26
|
+
}), b && /* @__PURE__ */ u(a, { children: b })]
|
|
27
|
+
}),
|
|
28
|
+
/* @__PURE__ */ d(o, { children: [/* @__PURE__ */ u(c, {
|
|
29
|
+
asChild: !0,
|
|
30
|
+
children: /* @__PURE__ */ d(t, {
|
|
31
|
+
id: S,
|
|
32
|
+
variant: "outline",
|
|
33
|
+
className: e("w-full justify-start text-left font-normal bg-card", !p.value && "text-muted-foreground", g.invalid && "border-destructive focus-visible:ring-destructive"),
|
|
34
|
+
children: [/* @__PURE__ */ u(f, { className: "mr-2 h-4 w-4 opacity-50" }), p.value ? m(p.value, "PPP", { locale: h }) : /* @__PURE__ */ u("span", { children: y })]
|
|
35
|
+
})
|
|
36
|
+
}), /* @__PURE__ */ u(s, {
|
|
37
|
+
className: "w-auto p-0",
|
|
38
|
+
align: "start",
|
|
39
|
+
children: /* @__PURE__ */ u(l, {
|
|
40
|
+
mode: "single",
|
|
41
|
+
selected: p.value,
|
|
42
|
+
onSelect: p.onChange,
|
|
43
|
+
initialFocus: !0
|
|
44
|
+
})
|
|
45
|
+
})] }),
|
|
46
|
+
g.invalid && g.error && /* @__PURE__ */ u(r, { errors: [g.error] })
|
|
47
|
+
]
|
|
48
|
+
})
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
//#endregion
|
|
52
|
+
export { g as DateInput };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../../ui/field.cjs`),t=require(`../../../ui/input.cjs`),n=require(`../../hover/hover.cjs`),r=require(`../../../ui/input-group.cjs`);let i=require(`react/jsx-runtime`),a=require(`react-hook-form`);function o({form:o,name:s,label:c,placeholder:l,helper:u,id:d,icon:f}){let p=d||`email-${String(s)}`;return(0,i.jsx)(a.Controller,{control:o.control,name:s,render:({field:a,fieldState:o})=>(0,i.jsxs)(e.Field,{"data-invalid":o.invalid,children:[(0,i.jsxs)(`div`,{className:`flex items-center gap-2`,children:[c&&(0,i.jsx)(e.FieldLabel,{htmlFor:p,children:c}),u&&(0,i.jsx)(n.Hover,{children:u})]}),f?(0,i.jsxs)(r.InputGroup,{children:[(0,i.jsx)(r.InputGroupAddon,{align:`inline-start`,children:f}),(0,i.jsx)(r.InputGroupInput,{...a,type:`email`,id:p,"aria-invalid":o.invalid,placeholder:l||`ejemplo@correo.com`,autoComplete:`email`})]}):(0,i.jsx)(t.Input,{...a,type:`email`,id:p,"aria-invalid":o.invalid,placeholder:l||`ejemplo@correo.com`,autoComplete:`email`}),o.invalid&&o.error&&(0,i.jsx)(e.FieldError,{errors:[o.error]})]})})}module.exports=o;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FieldValues, Path } from 'react-hook-form';
|
|
2
|
+
import { FormInputProps } from '../form.component';
|
|
3
|
+
interface EmailInputProps<T extends FieldValues> extends FormInputProps<T> {
|
|
4
|
+
name: Path<T>;
|
|
5
|
+
label?: string;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
helper?: string;
|
|
8
|
+
id?: string;
|
|
9
|
+
icon?: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export default function EmailInput<T extends FieldValues>({ form, name, label, placeholder, helper, id, icon }: EmailInputProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Field as e, FieldError as t, FieldLabel as n } from "../../../ui/field.esm";
|
|
2
|
+
import { Input as r } from "../../../ui/input.esm";
|
|
3
|
+
import { Hover as i } from "../../hover/hover.esm";
|
|
4
|
+
import { InputGroup as a, InputGroupAddon as o, InputGroupInput as s } from "../../../ui/input-group.esm";
|
|
5
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
6
|
+
import { Controller as u } from "react-hook-form";
|
|
7
|
+
//#region src/shared/custom/form/inputs/email.input.tsx
|
|
8
|
+
function d({ form: d, name: f, label: p, placeholder: m, helper: h, id: g, icon: _ }) {
|
|
9
|
+
let v = g || `email-${String(f)}`;
|
|
10
|
+
return /* @__PURE__ */ c(u, {
|
|
11
|
+
control: d.control,
|
|
12
|
+
name: f,
|
|
13
|
+
render: ({ field: u, fieldState: d }) => /* @__PURE__ */ l(e, {
|
|
14
|
+
"data-invalid": d.invalid,
|
|
15
|
+
children: [
|
|
16
|
+
/* @__PURE__ */ l("div", {
|
|
17
|
+
className: "flex items-center gap-2",
|
|
18
|
+
children: [p && /* @__PURE__ */ c(n, {
|
|
19
|
+
htmlFor: v,
|
|
20
|
+
children: p
|
|
21
|
+
}), h && /* @__PURE__ */ c(i, { children: h })]
|
|
22
|
+
}),
|
|
23
|
+
_ ? /* @__PURE__ */ l(a, { children: [/* @__PURE__ */ c(o, {
|
|
24
|
+
align: "inline-start",
|
|
25
|
+
children: _
|
|
26
|
+
}), /* @__PURE__ */ c(s, {
|
|
27
|
+
...u,
|
|
28
|
+
type: "email",
|
|
29
|
+
id: v,
|
|
30
|
+
"aria-invalid": d.invalid,
|
|
31
|
+
placeholder: m || "ejemplo@correo.com",
|
|
32
|
+
autoComplete: "email"
|
|
33
|
+
})] }) : /* @__PURE__ */ c(r, {
|
|
34
|
+
...u,
|
|
35
|
+
type: "email",
|
|
36
|
+
id: v,
|
|
37
|
+
"aria-invalid": d.invalid,
|
|
38
|
+
placeholder: m || "ejemplo@correo.com",
|
|
39
|
+
autoComplete: "email"
|
|
40
|
+
}),
|
|
41
|
+
d.invalid && d.error && /* @__PURE__ */ c(t, { errors: [d.error] })
|
|
42
|
+
]
|
|
43
|
+
})
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
47
|
+
export { d as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../../lib/utils.cjs`),t=require(`../../../ui/button.cjs`),n=require(`../../../ui/field.cjs`),r=require(`../../hover/hover.cjs`);let i=require(`react/jsx-runtime`),a=require(`react`),o=require(`lucide-react`),s=require(`react-hook-form`);function c({form:c,name:l,label:u,helper:d,id:f,accept:p=`*`}){let m=(0,a.useRef)(null),h=f||`file-input-${String(l)}`,g=(e,t)=>{let n=e.target.files?.[0];n&&t(n)},_=(e,t)=>{e.stopPropagation(),t(null),m.current&&(m.current.value=``)},v=e=>{if(e===0)return`0 Bytes`;let t=1024,n=[`Bytes`,`KB`,`MB`,`GB`],r=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/t**+r).toFixed(2))+` `+n[r]};return(0,i.jsx)(s.Controller,{control:c.control,name:l,render:({field:a,fieldState:s})=>{let c=a.value;return(0,i.jsxs)(n.Field,{"data-invalid":s.invalid,children:[(0,i.jsxs)(`div`,{className:`flex items-center gap-2`,children:[u&&(0,i.jsx)(n.FieldLabel,{htmlFor:h,children:u}),d&&(0,i.jsx)(r.Hover,{children:d})]}),(0,i.jsxs)(`div`,{className:e.cn(`relative w-full rounded-xl border-2 border-dashed transition-all duration-300`,`bg-muted/30 hover:bg-muted/50 p-4`,c?`border-primary/40 bg-primary/5`:`border-input`,s.invalid&&`border-destructive ring-3 ring-destructive/20`),children:[(0,i.jsx)(`input`,{ref:m,id:h,type:`file`,accept:p,className:`hidden`,onChange:e=>g(e,a.onChange)}),c?(0,i.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,i.jsx)(`div`,{className:`p-2 rounded-lg bg-primary/10 text-primary`,children:(0,i.jsx)(o.FileIcon,{className:`h-6 w-6`})}),(0,i.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,i.jsx)(`p`,{className:`text-sm font-medium truncate`,children:c.name}),(0,i.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:v(c.size)})]}),(0,i.jsx)(t.Button,{type:`button`,variant:`outline`,size:`icon`,className:`h-8 w-8 rounded-full border-muted-foreground/30 hover:border-destructive hover:text-destructive`,onClick:e=>_(e,a.onChange),children:(0,i.jsx)(o.X,{className:`h-4 w-4`})})]}):(0,i.jsxs)(`div`,{className:`flex flex-col items-center gap-2 cursor-pointer`,onClick:()=>m.current?.click(),children:[(0,i.jsx)(`div`,{className:`p-2 rounded-full bg-primary/10 text-primary`,children:(0,i.jsx)(o.Upload,{className:`h-5 w-5`})}),(0,i.jsx)(`p`,{className:`text-sm font-medium`,children:`Subir archivo`})]})]}),s.invalid&&s.error&&(0,i.jsx)(n.FieldError,{errors:[s.error]})]})}})}module.exports=c;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FieldValues, Path } from 'react-hook-form';
|
|
2
|
+
import { FormInputProps } from '../form.component';
|
|
3
|
+
interface FileInputProps<T extends FieldValues> extends FormInputProps<T> {
|
|
4
|
+
name: Path<T>;
|
|
5
|
+
label?: string;
|
|
6
|
+
helper?: string;
|
|
7
|
+
id?: string;
|
|
8
|
+
accept?: string;
|
|
9
|
+
}
|
|
10
|
+
export default function FileInput<T extends FieldValues>({ form, name, label, helper, id, accept }: FileInputProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { cn as e } from "../../../lib/utils.esm";
|
|
2
|
+
import { Button as t } from "../../../ui/button.esm";
|
|
3
|
+
import { Field as n, FieldError as r, FieldLabel as i } from "../../../ui/field.esm";
|
|
4
|
+
import { Hover as a } from "../../hover/hover.esm";
|
|
5
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
6
|
+
import { useRef as c } from "react";
|
|
7
|
+
import { FileIcon as l, Upload as u, X as d } from "lucide-react";
|
|
8
|
+
import { Controller as f } from "react-hook-form";
|
|
9
|
+
//#region src/shared/custom/form/inputs/file.input.tsx
|
|
10
|
+
function p({ form: p, name: m, label: h, helper: g, id: _, accept: v = "*" }) {
|
|
11
|
+
let y = c(null), b = _ || `file-input-${String(m)}`, x = (e, t) => {
|
|
12
|
+
let n = e.target.files?.[0];
|
|
13
|
+
n && t(n);
|
|
14
|
+
}, S = (e, t) => {
|
|
15
|
+
e.stopPropagation(), t(null), y.current && (y.current.value = "");
|
|
16
|
+
}, C = (e) => {
|
|
17
|
+
if (e === 0) return "0 Bytes";
|
|
18
|
+
let t = 1024, n = [
|
|
19
|
+
"Bytes",
|
|
20
|
+
"KB",
|
|
21
|
+
"MB",
|
|
22
|
+
"GB"
|
|
23
|
+
], r = Math.floor(Math.log(e) / Math.log(t));
|
|
24
|
+
return parseFloat((e / t ** +r).toFixed(2)) + " " + n[r];
|
|
25
|
+
};
|
|
26
|
+
return /* @__PURE__ */ o(f, {
|
|
27
|
+
control: p.control,
|
|
28
|
+
name: m,
|
|
29
|
+
render: ({ field: c, fieldState: f }) => {
|
|
30
|
+
let p = c.value;
|
|
31
|
+
return /* @__PURE__ */ s(n, {
|
|
32
|
+
"data-invalid": f.invalid,
|
|
33
|
+
children: [
|
|
34
|
+
/* @__PURE__ */ s("div", {
|
|
35
|
+
className: "flex items-center gap-2",
|
|
36
|
+
children: [h && /* @__PURE__ */ o(i, {
|
|
37
|
+
htmlFor: b,
|
|
38
|
+
children: h
|
|
39
|
+
}), g && /* @__PURE__ */ o(a, { children: g })]
|
|
40
|
+
}),
|
|
41
|
+
/* @__PURE__ */ s("div", {
|
|
42
|
+
className: e("relative w-full rounded-xl border-2 border-dashed transition-all duration-300", "bg-muted/30 hover:bg-muted/50 p-4", p ? "border-primary/40 bg-primary/5" : "border-input", f.invalid && "border-destructive ring-3 ring-destructive/20"),
|
|
43
|
+
children: [/* @__PURE__ */ o("input", {
|
|
44
|
+
ref: y,
|
|
45
|
+
id: b,
|
|
46
|
+
type: "file",
|
|
47
|
+
accept: v,
|
|
48
|
+
className: "hidden",
|
|
49
|
+
onChange: (e) => x(e, c.onChange)
|
|
50
|
+
}), p ? /* @__PURE__ */ s("div", {
|
|
51
|
+
className: "flex items-center gap-3",
|
|
52
|
+
children: [
|
|
53
|
+
/* @__PURE__ */ o("div", {
|
|
54
|
+
className: "p-2 rounded-lg bg-primary/10 text-primary",
|
|
55
|
+
children: /* @__PURE__ */ o(l, { className: "h-6 w-6" })
|
|
56
|
+
}),
|
|
57
|
+
/* @__PURE__ */ s("div", {
|
|
58
|
+
className: "flex-1 min-w-0",
|
|
59
|
+
children: [/* @__PURE__ */ o("p", {
|
|
60
|
+
className: "text-sm font-medium truncate",
|
|
61
|
+
children: p.name
|
|
62
|
+
}), /* @__PURE__ */ o("p", {
|
|
63
|
+
className: "text-xs text-muted-foreground",
|
|
64
|
+
children: C(p.size)
|
|
65
|
+
})]
|
|
66
|
+
}),
|
|
67
|
+
/* @__PURE__ */ o(t, {
|
|
68
|
+
type: "button",
|
|
69
|
+
variant: "outline",
|
|
70
|
+
size: "icon",
|
|
71
|
+
className: "h-8 w-8 rounded-full border-muted-foreground/30 hover:border-destructive hover:text-destructive",
|
|
72
|
+
onClick: (e) => S(e, c.onChange),
|
|
73
|
+
children: /* @__PURE__ */ o(d, { className: "h-4 w-4" })
|
|
74
|
+
})
|
|
75
|
+
]
|
|
76
|
+
}) : /* @__PURE__ */ s("div", {
|
|
77
|
+
className: "flex flex-col items-center gap-2 cursor-pointer",
|
|
78
|
+
onClick: () => y.current?.click(),
|
|
79
|
+
children: [/* @__PURE__ */ o("div", {
|
|
80
|
+
className: "p-2 rounded-full bg-primary/10 text-primary",
|
|
81
|
+
children: /* @__PURE__ */ o(u, { className: "h-5 w-5" })
|
|
82
|
+
}), /* @__PURE__ */ o("p", {
|
|
83
|
+
className: "text-sm font-medium",
|
|
84
|
+
children: "Subir archivo"
|
|
85
|
+
})]
|
|
86
|
+
})]
|
|
87
|
+
}),
|
|
88
|
+
f.invalid && f.error && /* @__PURE__ */ o(r, { errors: [f.error] })
|
|
89
|
+
]
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
//#endregion
|
|
95
|
+
export { p as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../../lib/utils.cjs`),t=require(`../../../ui/button.cjs`),n=require(`../../../ui/field.cjs`),r=require(`../../hover/hover.cjs`);let i=require(`react/jsx-runtime`),a=require(`react`),o=require(`lucide-react`),s=require(`react-hook-form`);function c({form:e,name:t,label:o,helper:c,id:u,className:d}){let f=(0,a.useRef)(null),p=u||`image-input-${String(t)}`;return(0,i.jsx)(s.Controller,{control:e.control,name:t,render:({field:e,fieldState:t})=>(0,i.jsxs)(n.Field,{"data-invalid":t.invalid,className:d,children:[(0,i.jsxs)(`div`,{className:`flex items-center gap-2`,children:[o&&(0,i.jsx)(n.FieldLabel,{htmlFor:p,children:o}),c&&(0,i.jsx)(r.Hover,{children:c})]}),(0,i.jsx)(l,{value:e.value,inputId:p,invalid:t.invalid,onChange:e.onChange,fileInputRef:f}),t.invalid&&t.error&&(0,i.jsx)(n.FieldError,{errors:[t.error]})]})})}function l({value:n,inputId:r,invalid:s,onChange:c,fileInputRef:l}){let[u,d]=(0,a.useState)(null);return(0,a.useEffect)(()=>{if(n&&n instanceof File){let e=URL.createObjectURL(n);return d(e),()=>URL.revokeObjectURL(e)}else typeof n==`string`&&n.startsWith(`http`)?d(n):d(null)},[n]),(0,i.jsxs)(`div`,{className:e.cn(`relative group cursor-pointer overflow-hidden rounded-xl border-2 border-dashed transition-all duration-300`,`flex flex-col items-center justify-center bg-muted/30 hover:bg-muted/50`,`min-h-[160px] w-full`,u?`border-primary/50`:`border-input`,s&&`border-destructive ring-3 ring-destructive/20`),onClick:()=>l.current?.click(),children:[(0,i.jsx)(`input`,{ref:l,id:r,type:`file`,accept:`image/*`,className:`hidden`,onChange:e=>{let t=e.target.files?.[0];t&&c(t)}}),u?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`img`,{src:u,alt:`Preview`,className:`h-full w-full object-contain p-2 transition-transform duration-500 group-hover:scale-105`}),(0,i.jsx)(`div`,{className:`absolute inset-0 bg-black/40 opacity-0 group-hover:opacity-100 transition-opacity flex flex-col items-center justify-center gap-2`,children:(0,i.jsxs)(t.Button,{type:`button`,variant:`destructive`,size:`sm`,className:`rounded-full flex items-center gap-2 px-4 shadow-lg hover:scale-105 transition-transform`,onClick:e=>{e.stopPropagation(),c(null),l.current&&(l.current.value=``),d(null)},children:[(0,i.jsx)(o.X,{className:`h-4 w-4`}),(0,i.jsx)(`span`,{children:`Borrar Imagen`})]})})]}):(0,i.jsxs)(`div`,{className:`flex flex-col items-center gap-3 p-6 text-center animate-in fade-in duration-300`,children:[(0,i.jsx)(`div`,{className:`p-3 rounded-full bg-primary/10 text-primary group-hover:bg-primary/20 transition-colors`,children:(0,i.jsx)(o.UploadCloud,{className:`h-8 w-8`})}),(0,i.jsxs)(`div`,{children:[(0,i.jsx)(`p`,{className:`text-sm font-medium`,children:`Haz clic para subir una imagen`}),(0,i.jsx)(`p`,{className:`text-xs text-muted-foreground mt-1`,children:`PNG, JPG o WEBP (Máx. 5MB)`})]})]})]})}module.exports=c;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FieldValues, Path } from 'react-hook-form';
|
|
2
|
+
import { FormInputProps } from '../form.component';
|
|
3
|
+
interface ImageInputProps<T extends FieldValues> extends FormInputProps<T> {
|
|
4
|
+
name: Path<T>;
|
|
5
|
+
label?: string;
|
|
6
|
+
helper?: string;
|
|
7
|
+
id?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
export default function ImageInput<T extends FieldValues>({ form, name, label, helper, id, className }: ImageInputProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { cn as e } from "../../../lib/utils.esm";
|
|
2
|
+
import { Button as t } from "../../../ui/button.esm";
|
|
3
|
+
import { Field as n, FieldError as r, FieldLabel as i } from "../../../ui/field.esm";
|
|
4
|
+
import { Hover as a } from "../../hover/hover.esm";
|
|
5
|
+
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
6
|
+
import { useEffect as l, useRef as u, useState as d } from "react";
|
|
7
|
+
import { UploadCloud as f, X as p } from "lucide-react";
|
|
8
|
+
import { Controller as m } from "react-hook-form";
|
|
9
|
+
//#region src/shared/custom/form/inputs/image.input.tsx
|
|
10
|
+
function h({ form: e, name: t, label: o, helper: l, id: d, className: f }) {
|
|
11
|
+
let p = u(null), h = d || `image-input-${String(t)}`;
|
|
12
|
+
return /* @__PURE__ */ s(m, {
|
|
13
|
+
control: e.control,
|
|
14
|
+
name: t,
|
|
15
|
+
render: ({ field: e, fieldState: t }) => /* @__PURE__ */ c(n, {
|
|
16
|
+
"data-invalid": t.invalid,
|
|
17
|
+
className: f,
|
|
18
|
+
children: [
|
|
19
|
+
/* @__PURE__ */ c("div", {
|
|
20
|
+
className: "flex items-center gap-2",
|
|
21
|
+
children: [o && /* @__PURE__ */ s(i, {
|
|
22
|
+
htmlFor: h,
|
|
23
|
+
children: o
|
|
24
|
+
}), l && /* @__PURE__ */ s(a, { children: l })]
|
|
25
|
+
}),
|
|
26
|
+
/* @__PURE__ */ s(g, {
|
|
27
|
+
value: e.value,
|
|
28
|
+
inputId: h,
|
|
29
|
+
invalid: t.invalid,
|
|
30
|
+
onChange: e.onChange,
|
|
31
|
+
fileInputRef: p
|
|
32
|
+
}),
|
|
33
|
+
t.invalid && t.error && /* @__PURE__ */ s(r, { errors: [t.error] })
|
|
34
|
+
]
|
|
35
|
+
})
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
function g({ value: n, inputId: r, invalid: i, onChange: a, fileInputRef: u }) {
|
|
39
|
+
let [m, h] = d(null);
|
|
40
|
+
return l(() => {
|
|
41
|
+
if (n && n instanceof File) {
|
|
42
|
+
let e = URL.createObjectURL(n);
|
|
43
|
+
return h(e), () => URL.revokeObjectURL(e);
|
|
44
|
+
} else typeof n == "string" && n.startsWith("http") ? h(n) : h(null);
|
|
45
|
+
}, [n]), /* @__PURE__ */ c("div", {
|
|
46
|
+
className: e("relative group cursor-pointer overflow-hidden rounded-xl border-2 border-dashed transition-all duration-300", "flex flex-col items-center justify-center bg-muted/30 hover:bg-muted/50", "min-h-[160px] w-full", m ? "border-primary/50" : "border-input", i && "border-destructive ring-3 ring-destructive/20"),
|
|
47
|
+
onClick: () => u.current?.click(),
|
|
48
|
+
children: [/* @__PURE__ */ s("input", {
|
|
49
|
+
ref: u,
|
|
50
|
+
id: r,
|
|
51
|
+
type: "file",
|
|
52
|
+
accept: "image/*",
|
|
53
|
+
className: "hidden",
|
|
54
|
+
onChange: (e) => {
|
|
55
|
+
let t = e.target.files?.[0];
|
|
56
|
+
t && a(t);
|
|
57
|
+
}
|
|
58
|
+
}), m ? /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s("img", {
|
|
59
|
+
src: m,
|
|
60
|
+
alt: "Preview",
|
|
61
|
+
className: "h-full w-full object-contain p-2 transition-transform duration-500 group-hover:scale-105"
|
|
62
|
+
}), /* @__PURE__ */ s("div", {
|
|
63
|
+
className: "absolute inset-0 bg-black/40 opacity-0 group-hover:opacity-100 transition-opacity flex flex-col items-center justify-center gap-2",
|
|
64
|
+
children: /* @__PURE__ */ c(t, {
|
|
65
|
+
type: "button",
|
|
66
|
+
variant: "destructive",
|
|
67
|
+
size: "sm",
|
|
68
|
+
className: "rounded-full flex items-center gap-2 px-4 shadow-lg hover:scale-105 transition-transform",
|
|
69
|
+
onClick: (e) => {
|
|
70
|
+
e.stopPropagation(), a(null), u.current && (u.current.value = ""), h(null);
|
|
71
|
+
},
|
|
72
|
+
children: [/* @__PURE__ */ s(p, { className: "h-4 w-4" }), /* @__PURE__ */ s("span", { children: "Borrar Imagen" })]
|
|
73
|
+
})
|
|
74
|
+
})] }) : /* @__PURE__ */ c("div", {
|
|
75
|
+
className: "flex flex-col items-center gap-3 p-6 text-center animate-in fade-in duration-300",
|
|
76
|
+
children: [/* @__PURE__ */ s("div", {
|
|
77
|
+
className: "p-3 rounded-full bg-primary/10 text-primary group-hover:bg-primary/20 transition-colors",
|
|
78
|
+
children: /* @__PURE__ */ s(f, { className: "h-8 w-8" })
|
|
79
|
+
}), /* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("p", {
|
|
80
|
+
className: "text-sm font-medium",
|
|
81
|
+
children: "Haz clic para subir una imagen"
|
|
82
|
+
}), /* @__PURE__ */ s("p", {
|
|
83
|
+
className: "text-xs text-muted-foreground mt-1",
|
|
84
|
+
children: "PNG, JPG o WEBP (Máx. 5MB)"
|
|
85
|
+
})] })]
|
|
86
|
+
})]
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
//#endregion
|
|
90
|
+
export { h as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../../../../_virtual/_rolldown/runtime.cjs`),t=require(`../../../lib/utils.cjs`),n=require(`../../../ui/field.cjs`),r=require(`../../hover/hover.cjs`);let i=require(`react/jsx-runtime`),a=require(`react`);a=e.__toESM(a);let o=require(`lucide-react`),s=require(`react-hook-form`);function c({form:e,name:a,label:c,helper:l,items:u,itemFactory:d,keyExtractor:f,multiple:p=!0}){return(0,i.jsx)(s.Controller,{control:e.control,name:a,render:({field:{value:e,onChange:a},fieldState:s})=>{let m=Array.isArray(e)?e:e?[e]:[],h=e=>{a(p?m.includes(e)?m.filter(t=>t!==e):[...m,e]:e)};return(0,i.jsxs)(n.Field,{"data-invalid":s.invalid,className:`flex flex-col gap-3`,children:[(0,i.jsxs)(`div`,{className:`flex items-center gap-2`,children:[c&&(0,i.jsx)(n.FieldLabel,{className:`text-sm font-medium`,children:c}),l&&(0,i.jsx)(r.Hover,{children:l})]}),(0,i.jsx)(`div`,{className:`flex flex-col gap-2`,children:u.map(e=>{let n=f(e),r=m.includes(n);return(0,i.jsxs)(`button`,{type:`button`,onClick:()=>h(n),className:t.cn(`group flex items-center justify-between p-4 rounded-2xl border transition-all duration-300 text-left`,r?`bg-primary/10 border-primary text-primary shadow-matte`:`bg-muted/30 border-border text-muted-foreground hover:border-primary/40 hover:bg-muted/50`),children:[(0,i.jsx)(`div`,{className:t.cn(`flex-1 transition-colors`,r?`text-foreground`:``),children:d(e)}),(0,i.jsx)(`div`,{className:t.cn(`p-1 rounded-full transition-all duration-500 transform`,r?`bg-primary text-primary-foreground scale-110 opacity-100`:`bg-border/30 text-transparent scale-75 opacity-0`),children:(0,i.jsx)(o.CheckCircle2,{className:`w-4 h-4`})})]},n)})}),s.invalid&&s.error&&(0,i.jsx)(n.FieldError,{errors:[s.error]})]})}})}module.exports=c;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FieldValues, Path } from 'react-hook-form';
|
|
2
|
+
import { FormInputProps } from '../form.component';
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
interface ListSelectInputProps<T, TFieldValues extends FieldValues> extends FormInputProps<TFieldValues> {
|
|
5
|
+
name: Path<TFieldValues>;
|
|
6
|
+
label?: string;
|
|
7
|
+
helper?: string;
|
|
8
|
+
items: T[];
|
|
9
|
+
itemFactory: (item: T) => React.ReactNode;
|
|
10
|
+
keyExtractor: (item: T) => string;
|
|
11
|
+
multiple?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Input de Lista Interactiva para selección simple o múltiple.
|
|
15
|
+
*/
|
|
16
|
+
export default function ListSelectInput<T, TFieldValues extends FieldValues>({ form, name, label, helper, items, itemFactory, keyExtractor, multiple }: ListSelectInputProps<T, TFieldValues>): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { cn as e } from "../../../lib/utils.esm";
|
|
2
|
+
import { Field as t, FieldError as n, FieldLabel as r } from "../../../ui/field.esm";
|
|
3
|
+
import { Hover as i } from "../../hover/hover.esm";
|
|
4
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
5
|
+
import "react";
|
|
6
|
+
import { CheckCircle2 as s } from "lucide-react";
|
|
7
|
+
import { Controller as c } from "react-hook-form";
|
|
8
|
+
//#region src/shared/custom/form/inputs/list-select.input.tsx
|
|
9
|
+
function l({ form: l, name: u, label: d, helper: f, items: p, itemFactory: m, keyExtractor: h, multiple: g = !0 }) {
|
|
10
|
+
return /* @__PURE__ */ a(c, {
|
|
11
|
+
control: l.control,
|
|
12
|
+
name: u,
|
|
13
|
+
render: ({ field: { value: c, onChange: l }, fieldState: u }) => {
|
|
14
|
+
let _ = Array.isArray(c) ? c : c ? [c] : [], v = (e) => {
|
|
15
|
+
l(g ? _.includes(e) ? _.filter((t) => t !== e) : [..._, e] : e);
|
|
16
|
+
};
|
|
17
|
+
return /* @__PURE__ */ o(t, {
|
|
18
|
+
"data-invalid": u.invalid,
|
|
19
|
+
className: "flex flex-col gap-3",
|
|
20
|
+
children: [
|
|
21
|
+
/* @__PURE__ */ o("div", {
|
|
22
|
+
className: "flex items-center gap-2",
|
|
23
|
+
children: [d && /* @__PURE__ */ a(r, {
|
|
24
|
+
className: "text-sm font-medium",
|
|
25
|
+
children: d
|
|
26
|
+
}), f && /* @__PURE__ */ a(i, { children: f })]
|
|
27
|
+
}),
|
|
28
|
+
/* @__PURE__ */ a("div", {
|
|
29
|
+
className: "flex flex-col gap-2",
|
|
30
|
+
children: p.map((t) => {
|
|
31
|
+
let n = h(t), r = _.includes(n);
|
|
32
|
+
return /* @__PURE__ */ o("button", {
|
|
33
|
+
type: "button",
|
|
34
|
+
onClick: () => v(n),
|
|
35
|
+
className: e("group flex items-center justify-between p-4 rounded-2xl border transition-all duration-300 text-left", r ? "bg-primary/10 border-primary text-primary shadow-matte" : "bg-muted/30 border-border text-muted-foreground hover:border-primary/40 hover:bg-muted/50"),
|
|
36
|
+
children: [/* @__PURE__ */ a("div", {
|
|
37
|
+
className: e("flex-1 transition-colors", r ? "text-foreground" : ""),
|
|
38
|
+
children: m(t)
|
|
39
|
+
}), /* @__PURE__ */ a("div", {
|
|
40
|
+
className: e("p-1 rounded-full transition-all duration-500 transform", r ? "bg-primary text-primary-foreground scale-110 opacity-100" : "bg-border/30 text-transparent scale-75 opacity-0"),
|
|
41
|
+
children: /* @__PURE__ */ a(s, { className: "w-4 h-4" })
|
|
42
|
+
})]
|
|
43
|
+
}, n);
|
|
44
|
+
})
|
|
45
|
+
}),
|
|
46
|
+
u.invalid && u.error && /* @__PURE__ */ a(n, { errors: [u.error] })
|
|
47
|
+
]
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
//#endregion
|
|
53
|
+
export { l as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../../ui/button.cjs`),t=require(`../../../ui/field.cjs`),n=require(`../../../ui/input.cjs`),r=require(`../../hover/hover.cjs`);let i=require(`react/jsx-runtime`),a=require(`react`),o=require(`lucide-react`),s=require(`react-hook-form`);function c({form:c,name:l,label:u,placeholder:d,helper:f,id:p}){let[m,h]=(0,a.useState)(!1),g=p||`secret-input-${String(l)}`,_=()=>h(!m);return(0,i.jsx)(s.Controller,{control:c.control,name:l,render:({field:a,fieldState:s})=>(0,i.jsxs)(t.Field,{"data-invalid":s.invalid,children:[(0,i.jsxs)(`div`,{className:`flex items-center gap-2`,children:[u&&(0,i.jsx)(t.FieldLabel,{htmlFor:g,children:u}),f&&(0,i.jsx)(r.Hover,{children:f})]}),(0,i.jsxs)(`div`,{className:`relative flex items-center`,children:[(0,i.jsx)(n.Input,{...a,id:g,type:m?`text`:`password`,"aria-invalid":s.invalid,placeholder:d,autoComplete:`current-password`,className:`pr-10`}),(0,i.jsxs)(e.Button,{type:`button`,variant:`ghost`,size:`icon`,className:`absolute right-0 h-full w-10 text-muted-foreground hover:bg-transparent`,onClick:_,children:[m?(0,i.jsx)(o.EyeOff,{className:`h-4 w-4`}):(0,i.jsx)(o.Eye,{className:`h-4 w-4`}),(0,i.jsx)(`span`,{className:`sr-only`,children:m?`Ocultar contraseña`:`Mostrar contraseña`})]})]}),s.invalid&&s.error&&(0,i.jsx)(t.FieldError,{errors:[s.error]})]})})}module.exports=c;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FieldValues, Path } from 'react-hook-form';
|
|
2
|
+
import { FormInputProps } from '../form.component';
|
|
3
|
+
interface SecretInputProps<T extends FieldValues> extends FormInputProps<T> {
|
|
4
|
+
name: Path<T>;
|
|
5
|
+
label?: string;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
helper?: string;
|
|
8
|
+
id?: string;
|
|
9
|
+
}
|
|
10
|
+
export default function SecretInput<T extends FieldValues>({ form, name, label, placeholder, helper, id }: SecretInputProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Button as e } from "../../../ui/button.esm";
|
|
2
|
+
import { Field as t, FieldError as n, FieldLabel as r } from "../../../ui/field.esm";
|
|
3
|
+
import { Input as i } from "../../../ui/input.esm";
|
|
4
|
+
import { Hover as a } from "../../hover/hover.esm";
|
|
5
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
6
|
+
import { useState as c } from "react";
|
|
7
|
+
import { Eye as l, EyeOff as u } from "lucide-react";
|
|
8
|
+
import { Controller as d } from "react-hook-form";
|
|
9
|
+
//#region src/shared/custom/form/inputs/secret.input.tsx
|
|
10
|
+
function f({ form: f, name: p, label: m, placeholder: h, helper: g, id: _ }) {
|
|
11
|
+
let [v, y] = c(!1), b = _ || `secret-input-${String(p)}`, x = () => y(!v);
|
|
12
|
+
return /* @__PURE__ */ o(d, {
|
|
13
|
+
control: f.control,
|
|
14
|
+
name: p,
|
|
15
|
+
render: ({ field: c, fieldState: d }) => /* @__PURE__ */ s(t, {
|
|
16
|
+
"data-invalid": d.invalid,
|
|
17
|
+
children: [
|
|
18
|
+
/* @__PURE__ */ s("div", {
|
|
19
|
+
className: "flex items-center gap-2",
|
|
20
|
+
children: [m && /* @__PURE__ */ o(r, {
|
|
21
|
+
htmlFor: b,
|
|
22
|
+
children: m
|
|
23
|
+
}), g && /* @__PURE__ */ o(a, { children: g })]
|
|
24
|
+
}),
|
|
25
|
+
/* @__PURE__ */ s("div", {
|
|
26
|
+
className: "relative flex items-center",
|
|
27
|
+
children: [/* @__PURE__ */ o(i, {
|
|
28
|
+
...c,
|
|
29
|
+
id: b,
|
|
30
|
+
type: v ? "text" : "password",
|
|
31
|
+
"aria-invalid": d.invalid,
|
|
32
|
+
placeholder: h,
|
|
33
|
+
autoComplete: "current-password",
|
|
34
|
+
className: "pr-10"
|
|
35
|
+
}), /* @__PURE__ */ s(e, {
|
|
36
|
+
type: "button",
|
|
37
|
+
variant: "ghost",
|
|
38
|
+
size: "icon",
|
|
39
|
+
className: "absolute right-0 h-full w-10 text-muted-foreground hover:bg-transparent",
|
|
40
|
+
onClick: x,
|
|
41
|
+
children: [o(v ? u : l, { className: "h-4 w-4" }), /* @__PURE__ */ o("span", {
|
|
42
|
+
className: "sr-only",
|
|
43
|
+
children: v ? "Ocultar contraseña" : "Mostrar contraseña"
|
|
44
|
+
})]
|
|
45
|
+
})]
|
|
46
|
+
}),
|
|
47
|
+
d.invalid && d.error && /* @__PURE__ */ o(n, { errors: [d.error] })
|
|
48
|
+
]
|
|
49
|
+
})
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
//#endregion
|
|
53
|
+
export { f as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../../ui/select.cjs`),t=require(`../../../ui/field.cjs`),n=require(`../../hover/hover.cjs`);let r=require(`react/jsx-runtime`),i=require(`react-hook-form`);function a({form:a,name:o,label:s,helper:c,placeholder:l,options:u}){return(0,r.jsx)(i.Controller,{control:a.control,name:o,render:({field:{value:i,onChange:a},fieldState:o})=>(0,r.jsxs)(t.Field,{"data-invalid":o.invalid,children:[(0,r.jsxs)(`div`,{className:`flex items-center gap-2 mb-2`,children:[s&&(0,r.jsx)(t.FieldLabel,{className:`text-sm font-medium`,children:s}),c&&(0,r.jsx)(n.Hover,{children:c})]}),(0,r.jsxs)(e.Select,{value:i,onValueChange:a,children:[(0,r.jsx)(e.SelectTrigger,{className:`w-full bg-background border-border`,children:(0,r.jsx)(e.SelectValue,{placeholder:l||`Seleccionar...`})}),(0,r.jsx)(e.SelectContent,{className:`bg-card border-border shadow-matte`,children:(0,r.jsx)(e.SelectGroup,{children:u.map(t=>(0,r.jsx)(e.SelectItem,{value:t.value,children:t.label},t.value))})})]}),o.invalid&&o.error&&(0,r.jsx)(t.FieldError,{errors:[o.error],className:`mt-2`})]})})}module.exports=a;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FieldValues, Path } from 'react-hook-form';
|
|
2
|
+
import { FormInputProps } from '../form.component';
|
|
3
|
+
interface SelectInputProps<TFieldValues extends FieldValues> extends FormInputProps<TFieldValues> {
|
|
4
|
+
name: Path<TFieldValues>;
|
|
5
|
+
label?: string;
|
|
6
|
+
helper?: string;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
options: {
|
|
9
|
+
label: string;
|
|
10
|
+
value: string;
|
|
11
|
+
}[];
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Input de Selección Estándar para formularios.
|
|
15
|
+
*/
|
|
16
|
+
export default function SelectInput<TFieldValues extends FieldValues>({ form, name, label, helper, placeholder, options, }: SelectInputProps<TFieldValues>): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|