@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,91 @@
|
|
|
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 * as g from "react";
|
|
6
|
+
import { Loader2 as _ } from "lucide-react";
|
|
7
|
+
import { Controller as v } from "react-hook-form";
|
|
8
|
+
//#region src/shared/custom/form/inputs/async-combobox.input.tsx
|
|
9
|
+
function y({ form: y, name: b, label: x, helper: S, placeholder: C, service: w, itemFactory: T, keyExtractor: E, multiple: D = !1 }) {
|
|
10
|
+
let [O, k] = g.useState([]), [A, j] = g.useState(!0);
|
|
11
|
+
return g.useEffect(() => {
|
|
12
|
+
let e = !0;
|
|
13
|
+
return (async () => {
|
|
14
|
+
j(!0);
|
|
15
|
+
try {
|
|
16
|
+
let t = await w();
|
|
17
|
+
e && k(t);
|
|
18
|
+
} finally {
|
|
19
|
+
e && j(!1);
|
|
20
|
+
}
|
|
21
|
+
})(), () => {
|
|
22
|
+
e = !1;
|
|
23
|
+
};
|
|
24
|
+
}, [w]), /* @__PURE__ */ m(v, {
|
|
25
|
+
control: y.control,
|
|
26
|
+
name: b,
|
|
27
|
+
render: ({ field: { value: g, onChange: v }, fieldState: y }) => {
|
|
28
|
+
let b = D ? Array.isArray(g) ? g : [] : g || "", w = p();
|
|
29
|
+
return /* @__PURE__ */ h(e, {
|
|
30
|
+
"data-invalid": y.invalid,
|
|
31
|
+
children: [
|
|
32
|
+
/* @__PURE__ */ h("div", {
|
|
33
|
+
className: "flex items-center gap-2 mb-2",
|
|
34
|
+
children: [
|
|
35
|
+
x && /* @__PURE__ */ m(n, {
|
|
36
|
+
className: "text-sm font-medium",
|
|
37
|
+
children: x
|
|
38
|
+
}),
|
|
39
|
+
S && /* @__PURE__ */ m(r, { children: S }),
|
|
40
|
+
A && /* @__PURE__ */ m(_, { className: "size-3 animate-spin opacity-50" })
|
|
41
|
+
]
|
|
42
|
+
}),
|
|
43
|
+
/* @__PURE__ */ h(i, {
|
|
44
|
+
multiple: D,
|
|
45
|
+
value: b,
|
|
46
|
+
onValueChange: v,
|
|
47
|
+
items: O,
|
|
48
|
+
disabled: A,
|
|
49
|
+
children: [D ? /* @__PURE__ */ m("div", {
|
|
50
|
+
ref: w,
|
|
51
|
+
className: "w-full",
|
|
52
|
+
children: /* @__PURE__ */ h(o, {
|
|
53
|
+
className: "bg-background border-border w-full min-h-10",
|
|
54
|
+
children: [b.map((e) => {
|
|
55
|
+
let t = O.find((t) => E(t) === e);
|
|
56
|
+
return /* @__PURE__ */ m(a, {
|
|
57
|
+
value: e,
|
|
58
|
+
children: t ? T(t) : e
|
|
59
|
+
}, e);
|
|
60
|
+
}), /* @__PURE__ */ m(s, { placeholder: b.length > 0 ? "" : A ? "Cargando..." : C || "Seleccionar..." })]
|
|
61
|
+
})
|
|
62
|
+
}) : /* @__PURE__ */ m("div", {
|
|
63
|
+
ref: w,
|
|
64
|
+
className: "relative group/combobox w-full",
|
|
65
|
+
children: /* @__PURE__ */ m(u, {
|
|
66
|
+
placeholder: A ? "Cargando..." : C || "Seleccionar...",
|
|
67
|
+
className: "w-full bg-background border-border flex flex-row items-center"
|
|
68
|
+
})
|
|
69
|
+
}), /* @__PURE__ */ h(c, {
|
|
70
|
+
anchor: w.current,
|
|
71
|
+
className: "bg-card border-border shadow-matte",
|
|
72
|
+
children: [/* @__PURE__ */ m(l, { children: "No se encontraron resultados" }), /* @__PURE__ */ m(f, {
|
|
73
|
+
className: "custom-scrollbar",
|
|
74
|
+
children: O.map((e) => /* @__PURE__ */ m(d, {
|
|
75
|
+
value: E(e),
|
|
76
|
+
children: T(e)
|
|
77
|
+
}, E(e)))
|
|
78
|
+
})]
|
|
79
|
+
})]
|
|
80
|
+
}),
|
|
81
|
+
y.invalid && y.error && /* @__PURE__ */ m(t, {
|
|
82
|
+
errors: [y.error],
|
|
83
|
+
className: "mt-2"
|
|
84
|
+
})
|
|
85
|
+
]
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
//#endregion
|
|
91
|
+
export { y as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";const e=require(`../../../../_virtual/_rolldown/runtime.cjs`),t=require(`../../../lib/utils.cjs`),n=require(`../../../ui/field.cjs`),r=require(`../../hover/hover.cjs`),i=require(`../../../ui/badge.cjs`),a=require(`../../../ui/command.cjs`),o=require(`../../../ui/popover.cjs`);let s=require(`react/jsx-runtime`),c=require(`react`);c=e.__toESM(c);let l=require(`lucide-react`),u=require(`react-hook-form`);function d({form:e,name:d,label:f,helper:p,placeholder:m=`Seleccionar opciones...`,service:h,itemFactory:g,keyExtractor:_}){let[v,y]=c.useState(!1),[b,x]=c.useState([]),[S,C]=c.useState(!1),[w,T]=c.useState(null);return c.useEffect(()=>{let e=!0;return(async()=>{C(!0),T(null);try{let t=await h();e&&x(t)}catch{e&&T(`Error al cargar datos.`)}finally{e&&C(!1)}})(),()=>{e=!1}},[h]),(0,s.jsx)(u.Controller,{control:e.control,name:d,render:({field:{value:e,onChange:c},fieldState:u})=>{let d=Array.isArray(e)?e:[],h=e=>{c(d.includes(e)?d.filter(t=>t!==e):[...d,e])},x=e=>{c(d.filter(t=>t!==e))};return(0,s.jsxs)(n.Field,{"data-invalid":u.invalid,children:[(0,s.jsxs)(`div`,{className:`flex items-center gap-2 mb-2`,children:[f&&(0,s.jsx)(n.FieldLabel,{className:`text-sm font-medium`,children:f}),p&&(0,s.jsx)(r.Hover,{children:p}),S&&(0,s.jsx)(l.Loader2,{className:`size-3 animate-spin opacity-50`})]}),(0,s.jsxs)(o.Popover,{open:v,onOpenChange:y,children:[(0,s.jsx)(o.PopoverTrigger,{asChild:!0,children:(0,s.jsxs)(`div`,{className:t.cn(`relative flex min-h-11 w-full flex-wrap gap-1.5 rounded-xl border p-2 cursor-pointer transition-all duration-300`,`t-card-base hover:border-(--t-border) focus-within:ring-2 focus-within:ring-(--t-accent)/10`,u.invalid?`border-destructive/50`:`border-border/50`,v&&`ring-2 ring-(--t-accent)/10 border-(--t-accent-border)`),children:[d.length>0?(0,s.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:d.map(e=>{let t=b.find(t=>_(t)===e);return(0,s.jsxs)(i.Badge,{variant:`secondary`,className:`t-badge h-7 pl-2 pr-1 animate-in zoom-in-95 duration-200`,children:[(0,s.jsx)(`span`,{className:`text-xs truncate max-w-[150px]`,children:t?g(t):e}),(0,s.jsx)(`button`,{type:`button`,onClick:t=>{t.stopPropagation(),x(e)},className:`ml-1 rounded-full p-0.5 hover:bg-(--t-accent)/20 t-accent-text transition-colors`,children:(0,s.jsx)(l.X,{className:`size-3`})})]},e)})}):(0,s.jsx)(`span`,{className:`text-sm text-muted-foreground px-1 py-1.5`,children:S?`Cargando...`:m}),(0,s.jsx)(`div`,{className:`ml-auto flex items-center pr-1`,children:(0,s.jsx)(l.ChevronDown,{className:t.cn(`size-4 opacity-50 transition-transform duration-200`,v&&`rotate-180`)})})]})}),(0,s.jsx)(o.PopoverContent,{className:`w-[--radix-popover-trigger-width] p-0 shadow-matte border-border/50 overflow-hidden`,align:`start`,children:(0,s.jsxs)(a.Command,{className:`w-full`,children:[(0,s.jsx)(a.CommandInput,{placeholder:`Buscar...`,className:`h-9`}),(0,s.jsxs)(a.CommandList,{className:`max-h-64 custom-scrollbar`,children:[(0,s.jsx)(a.CommandEmpty,{children:`No se encontraron resultados.`}),(0,s.jsx)(a.CommandGroup,{children:b.map(e=>{let t=_(e),n=d.includes(t);return(0,s.jsxs)(a.CommandItem,{onSelect:()=>h(t),className:`flex items-center justify-between py-2 px-3 cursor-pointer`,children:[(0,s.jsx)(`div`,{className:`flex-1 truncate`,children:g(e)}),n&&(0,s.jsx)(l.Check,{className:`size-4 text-primary animate-in zoom-in-50`})]},t)})})]})]})})]}),u.invalid&&u.error&&(0,s.jsx)(n.FieldError,{errors:[u.error],className:`mt-2`}),w&&(0,s.jsx)(`p`,{className:`mt-1 text-xs text-destructive font-medium`,children:w})]})}})}module.exports=d;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { FieldValues, Path } from 'react-hook-form';
|
|
2
|
+
import { FormInputProps } from '../form.component';
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
interface AsyncMultiSelectInputProps<T, TFieldValues extends FieldValues> extends FormInputProps<TFieldValues> {
|
|
5
|
+
name: Path<TFieldValues>;
|
|
6
|
+
label?: string;
|
|
7
|
+
helper?: string;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
service: () => Promise<T[]>;
|
|
10
|
+
itemFactory: (item: T) => React.ReactNode;
|
|
11
|
+
keyExtractor: (item: T) => string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* AsyncMultiSelectInput
|
|
15
|
+
*
|
|
16
|
+
* Un componente de selección múltiple asíncrono utilizando Radix UI y cmdk.
|
|
17
|
+
* Diseñado para ser visualmente premium y altamente funcional.
|
|
18
|
+
*/
|
|
19
|
+
export default function AsyncMultiSelectInput<T, TFieldValues extends FieldValues>({ form, name, label, helper, placeholder, service, itemFactory, keyExtractor, }: AsyncMultiSelectInputProps<T, TFieldValues>): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../../lib/utils.esm";
|
|
3
|
+
import { Field as t, FieldError as n, FieldLabel as r } from "../../../ui/field.esm";
|
|
4
|
+
import { Hover as i } from "../../hover/hover.esm";
|
|
5
|
+
import { Badge as a } from "../../../ui/badge.esm";
|
|
6
|
+
import { Command as o, CommandEmpty as s, CommandGroup as c, CommandInput as l, CommandItem as u, CommandList as d } from "../../../ui/command.esm";
|
|
7
|
+
import { Popover as f, PopoverContent as p, PopoverTrigger as m } from "../../../ui/popover.esm";
|
|
8
|
+
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
9
|
+
import * as _ from "react";
|
|
10
|
+
import { Check as v, ChevronDown as y, Loader2 as b, X as x } from "lucide-react";
|
|
11
|
+
import { Controller as S } from "react-hook-form";
|
|
12
|
+
//#region src/shared/custom/form/inputs/async-multi-select.input.tsx
|
|
13
|
+
function C({ form: C, name: w, label: T, helper: E, placeholder: D = "Seleccionar opciones...", service: O, itemFactory: k, keyExtractor: A }) {
|
|
14
|
+
let [j, M] = _.useState(!1), [N, P] = _.useState([]), [F, I] = _.useState(!1), [L, R] = _.useState(null);
|
|
15
|
+
return _.useEffect(() => {
|
|
16
|
+
let e = !0;
|
|
17
|
+
return (async () => {
|
|
18
|
+
I(!0), R(null);
|
|
19
|
+
try {
|
|
20
|
+
let t = await O();
|
|
21
|
+
e && P(t);
|
|
22
|
+
} catch {
|
|
23
|
+
e && R("Error al cargar datos.");
|
|
24
|
+
} finally {
|
|
25
|
+
e && I(!1);
|
|
26
|
+
}
|
|
27
|
+
})(), () => {
|
|
28
|
+
e = !1;
|
|
29
|
+
};
|
|
30
|
+
}, [O]), /* @__PURE__ */ h(S, {
|
|
31
|
+
control: C.control,
|
|
32
|
+
name: w,
|
|
33
|
+
render: ({ field: { value: _, onChange: S }, fieldState: C }) => {
|
|
34
|
+
let w = Array.isArray(_) ? _ : [], O = (e) => {
|
|
35
|
+
S(w.includes(e) ? w.filter((t) => t !== e) : [...w, e]);
|
|
36
|
+
}, P = (e) => {
|
|
37
|
+
S(w.filter((t) => t !== e));
|
|
38
|
+
};
|
|
39
|
+
return /* @__PURE__ */ g(t, {
|
|
40
|
+
"data-invalid": C.invalid,
|
|
41
|
+
children: [
|
|
42
|
+
/* @__PURE__ */ g("div", {
|
|
43
|
+
className: "flex items-center gap-2 mb-2",
|
|
44
|
+
children: [
|
|
45
|
+
T && /* @__PURE__ */ h(r, {
|
|
46
|
+
className: "text-sm font-medium",
|
|
47
|
+
children: T
|
|
48
|
+
}),
|
|
49
|
+
E && /* @__PURE__ */ h(i, { children: E }),
|
|
50
|
+
F && /* @__PURE__ */ h(b, { className: "size-3 animate-spin opacity-50" })
|
|
51
|
+
]
|
|
52
|
+
}),
|
|
53
|
+
/* @__PURE__ */ g(f, {
|
|
54
|
+
open: j,
|
|
55
|
+
onOpenChange: M,
|
|
56
|
+
children: [/* @__PURE__ */ h(m, {
|
|
57
|
+
asChild: !0,
|
|
58
|
+
children: /* @__PURE__ */ g("div", {
|
|
59
|
+
className: e("relative flex min-h-11 w-full flex-wrap gap-1.5 rounded-xl border p-2 cursor-pointer transition-all duration-300", "t-card-base hover:border-(--t-border) focus-within:ring-2 focus-within:ring-(--t-accent)/10", C.invalid ? "border-destructive/50" : "border-border/50", j && "ring-2 ring-(--t-accent)/10 border-(--t-accent-border)"),
|
|
60
|
+
children: [w.length > 0 ? /* @__PURE__ */ h("div", {
|
|
61
|
+
className: "flex flex-wrap gap-1.5",
|
|
62
|
+
children: w.map((e) => {
|
|
63
|
+
let t = N.find((t) => A(t) === e);
|
|
64
|
+
return /* @__PURE__ */ g(a, {
|
|
65
|
+
variant: "secondary",
|
|
66
|
+
className: "t-badge h-7 pl-2 pr-1 animate-in zoom-in-95 duration-200",
|
|
67
|
+
children: [/* @__PURE__ */ h("span", {
|
|
68
|
+
className: "text-xs truncate max-w-[150px]",
|
|
69
|
+
children: t ? k(t) : e
|
|
70
|
+
}), /* @__PURE__ */ h("button", {
|
|
71
|
+
type: "button",
|
|
72
|
+
onClick: (t) => {
|
|
73
|
+
t.stopPropagation(), P(e);
|
|
74
|
+
},
|
|
75
|
+
className: "ml-1 rounded-full p-0.5 hover:bg-(--t-accent)/20 t-accent-text transition-colors",
|
|
76
|
+
children: /* @__PURE__ */ h(x, { className: "size-3" })
|
|
77
|
+
})]
|
|
78
|
+
}, e);
|
|
79
|
+
})
|
|
80
|
+
}) : /* @__PURE__ */ h("span", {
|
|
81
|
+
className: "text-sm text-muted-foreground px-1 py-1.5",
|
|
82
|
+
children: F ? "Cargando..." : D
|
|
83
|
+
}), /* @__PURE__ */ h("div", {
|
|
84
|
+
className: "ml-auto flex items-center pr-1",
|
|
85
|
+
children: /* @__PURE__ */ h(y, { className: e("size-4 opacity-50 transition-transform duration-200", j && "rotate-180") })
|
|
86
|
+
})]
|
|
87
|
+
})
|
|
88
|
+
}), /* @__PURE__ */ h(p, {
|
|
89
|
+
className: "w-[--radix-popover-trigger-width] p-0 shadow-matte border-border/50 overflow-hidden",
|
|
90
|
+
align: "start",
|
|
91
|
+
children: /* @__PURE__ */ g(o, {
|
|
92
|
+
className: "w-full",
|
|
93
|
+
children: [/* @__PURE__ */ h(l, {
|
|
94
|
+
placeholder: "Buscar...",
|
|
95
|
+
className: "h-9"
|
|
96
|
+
}), /* @__PURE__ */ g(d, {
|
|
97
|
+
className: "max-h-64 custom-scrollbar",
|
|
98
|
+
children: [/* @__PURE__ */ h(s, { children: "No se encontraron resultados." }), /* @__PURE__ */ h(c, { children: N.map((e) => {
|
|
99
|
+
let t = A(e), n = w.includes(t);
|
|
100
|
+
return /* @__PURE__ */ g(u, {
|
|
101
|
+
onSelect: () => O(t),
|
|
102
|
+
className: "flex items-center justify-between py-2 px-3 cursor-pointer",
|
|
103
|
+
children: [/* @__PURE__ */ h("div", {
|
|
104
|
+
className: "flex-1 truncate",
|
|
105
|
+
children: k(e)
|
|
106
|
+
}), n && /* @__PURE__ */ h(v, { className: "size-4 text-primary animate-in zoom-in-50" })]
|
|
107
|
+
}, t);
|
|
108
|
+
}) })]
|
|
109
|
+
})]
|
|
110
|
+
})
|
|
111
|
+
})]
|
|
112
|
+
}),
|
|
113
|
+
C.invalid && C.error && /* @__PURE__ */ h(n, {
|
|
114
|
+
errors: [C.error],
|
|
115
|
+
className: "mt-2"
|
|
116
|
+
}),
|
|
117
|
+
L && /* @__PURE__ */ h("p", {
|
|
118
|
+
className: "mt-1 text-xs text-destructive font-medium",
|
|
119
|
+
children: L
|
|
120
|
+
})
|
|
121
|
+
]
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
//#endregion
|
|
127
|
+
export { C as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../../../../_virtual/_rolldown/runtime.cjs`),t=require(`../../../ui/select.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:c,label:l,helper:u,id:d,placeholder:f,service:p,itemFactory:m,keyExtractor:h}){let[g,_]=a.useState([]),[v,y]=a.useState(!0),[b,x]=a.useState(null),S=d||`async-select-${String(c)}`;return a.useEffect(()=>{let e=!0;return(async()=>{y(!0),x(null);try{let t=await p();e&&_(t)}catch{e&&x(`Error al cargar los datos.`)}finally{e&&y(!1)}})(),()=>{e=!1}},[p]),(0,i.jsx)(s.Controller,{control:e.control,name:c,render:({field:{value:e,onChange:a},fieldState:s})=>(0,i.jsxs)(n.Field,{"data-invalid":s.invalid,children:[(0,i.jsxs)(`div`,{className:`flex items-center gap-2`,children:[l&&(0,i.jsx)(n.FieldLabel,{htmlFor:S,children:l}),u&&(0,i.jsx)(r.Hover,{children:u})]}),(0,i.jsxs)(t.Select,{value:e,onValueChange:a,disabled:v,children:[(0,i.jsx)(t.SelectTrigger,{id:S,className:`w-full`,children:(0,i.jsxs)(t.SelectValue,{placeholder:v?`Cargando...`:f||`Seleccionar...`,children:[v&&(0,i.jsx)(o.Loader2,{className:`mr-2 h-4 w-4 animate-spin inline`}),!v&&g.find(t=>h(t)===e)?m(g.find(t=>h(t)===e)):void 0]})}),(0,i.jsxs)(t.SelectContent,{children:[g.map(e=>(0,i.jsx)(t.SelectItem,{value:h(e),children:m(e)},h(e))),g.length===0&&!v&&(0,i.jsx)(`div`,{className:`px-2 py-4 text-center text-sm text-gray-500`,children:`No se encontraron resultados`}),b&&(0,i.jsx)(`div`,{className:`px-2 py-4 text-center text-sm text-red-400`,children:b})]})]}),s.invalid&&s.error&&(0,i.jsx)(n.FieldError,{errors:[s.error]})]})})}module.exports=c;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FieldValues, Path } from 'react-hook-form';
|
|
2
|
+
import { FormInputProps } from '../form.component';
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
interface AsyncSelectInputProps<T, TFieldValues extends FieldValues> extends FormInputProps<TFieldValues> {
|
|
5
|
+
name: Path<TFieldValues>;
|
|
6
|
+
label?: string;
|
|
7
|
+
helper?: string;
|
|
8
|
+
id?: string;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
service: () => Promise<T[]>;
|
|
11
|
+
itemFactory: (item: T) => React.ReactNode;
|
|
12
|
+
keyExtractor: (item: T) => string;
|
|
13
|
+
}
|
|
14
|
+
export default function AsyncSelectInput<T, TFieldValues extends FieldValues>({ form, name, label, helper, id, placeholder, service, itemFactory, keyExtractor, }: AsyncSelectInputProps<T, TFieldValues>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { Select as e, SelectContent as t, SelectItem as n, SelectTrigger as r, SelectValue as i } from "../../../ui/select.esm";
|
|
2
|
+
import { Field as a, FieldError as o, FieldLabel as s } from "../../../ui/field.esm";
|
|
3
|
+
import { Hover as c } from "../../hover/hover.esm";
|
|
4
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
5
|
+
import * as d from "react";
|
|
6
|
+
import { Loader2 as f } from "lucide-react";
|
|
7
|
+
import { Controller as p } from "react-hook-form";
|
|
8
|
+
//#region src/shared/custom/form/inputs/async-select.input.tsx
|
|
9
|
+
function m({ form: m, name: h, label: g, helper: _, id: v, placeholder: y, service: b, itemFactory: x, keyExtractor: S }) {
|
|
10
|
+
let [C, w] = d.useState([]), [T, E] = d.useState(!0), [D, O] = d.useState(null), k = v || `async-select-${String(h)}`;
|
|
11
|
+
return d.useEffect(() => {
|
|
12
|
+
let e = !0;
|
|
13
|
+
return (async () => {
|
|
14
|
+
E(!0), O(null);
|
|
15
|
+
try {
|
|
16
|
+
let t = await b();
|
|
17
|
+
e && w(t);
|
|
18
|
+
} catch {
|
|
19
|
+
e && O("Error al cargar los datos.");
|
|
20
|
+
} finally {
|
|
21
|
+
e && E(!1);
|
|
22
|
+
}
|
|
23
|
+
})(), () => {
|
|
24
|
+
e = !1;
|
|
25
|
+
};
|
|
26
|
+
}, [b]), /* @__PURE__ */ l(p, {
|
|
27
|
+
control: m.control,
|
|
28
|
+
name: h,
|
|
29
|
+
render: ({ field: { value: d, onChange: p }, fieldState: m }) => /* @__PURE__ */ u(a, {
|
|
30
|
+
"data-invalid": m.invalid,
|
|
31
|
+
children: [
|
|
32
|
+
/* @__PURE__ */ u("div", {
|
|
33
|
+
className: "flex items-center gap-2",
|
|
34
|
+
children: [g && /* @__PURE__ */ l(s, {
|
|
35
|
+
htmlFor: k,
|
|
36
|
+
children: g
|
|
37
|
+
}), _ && /* @__PURE__ */ l(c, { children: _ })]
|
|
38
|
+
}),
|
|
39
|
+
/* @__PURE__ */ u(e, {
|
|
40
|
+
value: d,
|
|
41
|
+
onValueChange: p,
|
|
42
|
+
disabled: T,
|
|
43
|
+
children: [/* @__PURE__ */ l(r, {
|
|
44
|
+
id: k,
|
|
45
|
+
className: "w-full",
|
|
46
|
+
children: /* @__PURE__ */ u(i, {
|
|
47
|
+
placeholder: T ? "Cargando..." : y || "Seleccionar...",
|
|
48
|
+
children: [T && /* @__PURE__ */ l(f, { className: "mr-2 h-4 w-4 animate-spin inline" }), !T && C.find((e) => S(e) === d) ? x(C.find((e) => S(e) === d)) : void 0]
|
|
49
|
+
})
|
|
50
|
+
}), /* @__PURE__ */ u(t, { children: [
|
|
51
|
+
C.map((e) => /* @__PURE__ */ l(n, {
|
|
52
|
+
value: S(e),
|
|
53
|
+
children: x(e)
|
|
54
|
+
}, S(e))),
|
|
55
|
+
C.length === 0 && !T && /* @__PURE__ */ l("div", {
|
|
56
|
+
className: "px-2 py-4 text-center text-sm text-gray-500",
|
|
57
|
+
children: "No se encontraron resultados"
|
|
58
|
+
}),
|
|
59
|
+
D && /* @__PURE__ */ l("div", {
|
|
60
|
+
className: "px-2 py-4 text-center text-sm text-red-400",
|
|
61
|
+
children: D
|
|
62
|
+
})
|
|
63
|
+
] })]
|
|
64
|
+
}),
|
|
65
|
+
m.invalid && m.error && /* @__PURE__ */ l(o, { errors: [m.error] })
|
|
66
|
+
]
|
|
67
|
+
})
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
//#endregion
|
|
71
|
+
export { m as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../../lib/utils.cjs`),t=require(`../../../ui/field.cjs`),n=require(`../../hover/hover.cjs`),r=require(`../../../ui/checkbox.cjs`);let i=require(`react/jsx-runtime`),a=require(`react-hook-form`);function o({form:o,name:s,label:c,helper:l,id:u,className:d}){let f=u||`checkbox-inline-${String(s)}`;return(0,i.jsx)(a.Controller,{control:o.control,name:s,render:({field:{value:a,onChange:o,...s},fieldState:u})=>(0,i.jsxs)(t.Field,{"data-invalid":u.invalid,orientation:`horizontal`,className:e.cn(`items-center py-2 gap-3`,d),children:[(0,i.jsx)(`div`,{className:`shrink-0`,children:(0,i.jsx)(r.Checkbox,{...s,id:f,checked:!!a,onCheckedChange:o,"aria-invalid":u.invalid})}),(0,i.jsxs)(`div`,{className:`flex flex-col gap-1 min-w-0 flex-1`,children:[(0,i.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[c&&(0,i.jsx)(t.FieldLabel,{htmlFor:f,className:`cursor-pointer text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70`,children:c}),l&&(0,i.jsx)(n.Hover,{children:l})]}),u.invalid&&u.error&&(0,i.jsx)(t.FieldError,{errors:[u.error]})]})]})})}module.exports=o;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FieldValues, Path } from 'react-hook-form';
|
|
2
|
+
import { FormInputProps } from '../form.component';
|
|
3
|
+
interface CheckboxInlineInputProps<T extends FieldValues> extends FormInputProps<T> {
|
|
4
|
+
name: Path<T>;
|
|
5
|
+
label?: string;
|
|
6
|
+
helper?: string;
|
|
7
|
+
id?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Input de Checkbox Tradicional (Inline).
|
|
12
|
+
* Muestra el cuadro del checkbox al lado de su etiqueta.
|
|
13
|
+
*/
|
|
14
|
+
export default function CheckboxInlineInput<T extends FieldValues>({ form, name, label, helper, id, className }: CheckboxInlineInputProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
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 { Checkbox as a } from "../../../ui/checkbox.esm";
|
|
5
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
6
|
+
import { Controller as c } from "react-hook-form";
|
|
7
|
+
//#region src/shared/custom/form/inputs/checkbox-inline.input.tsx
|
|
8
|
+
function l({ form: l, name: u, label: d, helper: f, id: p, className: m }) {
|
|
9
|
+
let h = p || `checkbox-inline-${String(u)}`;
|
|
10
|
+
return /* @__PURE__ */ o(c, {
|
|
11
|
+
control: l.control,
|
|
12
|
+
name: u,
|
|
13
|
+
render: ({ field: { value: c, onChange: l, ...u }, fieldState: p }) => /* @__PURE__ */ s(t, {
|
|
14
|
+
"data-invalid": p.invalid,
|
|
15
|
+
orientation: "horizontal",
|
|
16
|
+
className: e("items-center py-2 gap-3", m),
|
|
17
|
+
children: [/* @__PURE__ */ o("div", {
|
|
18
|
+
className: "shrink-0",
|
|
19
|
+
children: /* @__PURE__ */ o(a, {
|
|
20
|
+
...u,
|
|
21
|
+
id: h,
|
|
22
|
+
checked: !!c,
|
|
23
|
+
onCheckedChange: l,
|
|
24
|
+
"aria-invalid": p.invalid
|
|
25
|
+
})
|
|
26
|
+
}), /* @__PURE__ */ s("div", {
|
|
27
|
+
className: "flex flex-col gap-1 min-w-0 flex-1",
|
|
28
|
+
children: [/* @__PURE__ */ s("div", {
|
|
29
|
+
className: "flex items-center gap-2 flex-wrap",
|
|
30
|
+
children: [d && /* @__PURE__ */ o(r, {
|
|
31
|
+
htmlFor: h,
|
|
32
|
+
className: "cursor-pointer text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
33
|
+
children: d
|
|
34
|
+
}), f && /* @__PURE__ */ o(i, { children: f })]
|
|
35
|
+
}), p.invalid && p.error && /* @__PURE__ */ o(n, { errors: [p.error] })]
|
|
36
|
+
})]
|
|
37
|
+
})
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
41
|
+
export { l 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(`react-hook-form`);function s({form:e,name:a,label:s,helper:c,id:l,children:u,className:d}){let f=l||`checkbox-custom-${String(a)}`;return(0,i.jsx)(o.Controller,{control:e.control,name:a,render:({field:{value:e,onChange:a},fieldState:o})=>{let l=!!e,p=(0,i.jsx)(`button`,{type:`button`,onClick:()=>a(!l),className:t.cn(`w-full text-left rounded-2xl border transition-all duration-300 overflow-hidden outline-none bg-muted/20 border-border hover:border-primary/30 hover:bg-muted/40`,l&&`bg-primary/5 border-primary shadow-matte`),children:typeof u==`function`?u(l):u});return(0,i.jsxs)(n.Field,{"data-invalid":o.invalid,orientation:`vertical`,className:t.cn(`gap-2 flex-col`,d),children:[s&&(0,i.jsxs)(`div`,{className:`flex items-center gap-2 mb-1`,children:[(0,i.jsx)(n.FieldLabel,{htmlFor:f,className:`cursor-pointer text-sm font-semibold tracking-tight text-foreground/90`,children:s}),c&&(0,i.jsx)(r.Hover,{children:c})]}),(0,i.jsx)(`div`,{className:`relative w-full group`,children:!s&&c?(0,i.jsx)(r.Hover,{Trigger:p,children:c}):p}),o.invalid&&o.error&&(0,i.jsx)(n.FieldError,{errors:[o.error],className:`mt-1`})]})}})}module.exports=s;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { FieldValues, Path } from 'react-hook-form';
|
|
2
|
+
import { FormInputProps } from '../form.component';
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
interface CheckboxInputProps<T extends FieldValues> extends FormInputProps<T> {
|
|
5
|
+
name: Path<T>;
|
|
6
|
+
label?: string;
|
|
7
|
+
helper?: string;
|
|
8
|
+
id?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Contenido personalizado para renderizar el checkbox como una "Card interactiva".
|
|
11
|
+
* Si es una función, recibe el estado `checked`.
|
|
12
|
+
*/
|
|
13
|
+
children: React.ReactNode | ((checked: boolean) => React.ReactNode);
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Input de Checkbox Customizado (Card).
|
|
18
|
+
* Utiliza un componente completo como activador interactivo.
|
|
19
|
+
*/
|
|
20
|
+
export default function CheckboxInput<T extends FieldValues>({ form, name, label, helper, id, children, className }: CheckboxInputProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,50 @@
|
|
|
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 { Controller as s } from "react-hook-form";
|
|
7
|
+
//#region src/shared/custom/form/inputs/checkbox.input.tsx
|
|
8
|
+
function c({ form: c, name: l, label: u, helper: d, id: f, children: p, className: m }) {
|
|
9
|
+
let h = f || `checkbox-custom-${String(l)}`;
|
|
10
|
+
return /* @__PURE__ */ a(s, {
|
|
11
|
+
control: c.control,
|
|
12
|
+
name: l,
|
|
13
|
+
render: ({ field: { value: s, onChange: c }, fieldState: l }) => {
|
|
14
|
+
let f = !!s, g = /* @__PURE__ */ a("button", {
|
|
15
|
+
type: "button",
|
|
16
|
+
onClick: () => c(!f),
|
|
17
|
+
className: e("w-full text-left rounded-2xl border transition-all duration-300 overflow-hidden outline-none bg-muted/20 border-border hover:border-primary/30 hover:bg-muted/40", f && "bg-primary/5 border-primary shadow-matte"),
|
|
18
|
+
children: typeof p == "function" ? p(f) : p
|
|
19
|
+
});
|
|
20
|
+
return /* @__PURE__ */ o(t, {
|
|
21
|
+
"data-invalid": l.invalid,
|
|
22
|
+
orientation: "vertical",
|
|
23
|
+
className: e("gap-2 flex-col", m),
|
|
24
|
+
children: [
|
|
25
|
+
u && /* @__PURE__ */ o("div", {
|
|
26
|
+
className: "flex items-center gap-2 mb-1",
|
|
27
|
+
children: [/* @__PURE__ */ a(r, {
|
|
28
|
+
htmlFor: h,
|
|
29
|
+
className: "cursor-pointer text-sm font-semibold tracking-tight text-foreground/90",
|
|
30
|
+
children: u
|
|
31
|
+
}), d && /* @__PURE__ */ a(i, { children: d })]
|
|
32
|
+
}),
|
|
33
|
+
/* @__PURE__ */ a("div", {
|
|
34
|
+
className: "relative w-full group",
|
|
35
|
+
children: !u && d ? /* @__PURE__ */ a(i, {
|
|
36
|
+
Trigger: g,
|
|
37
|
+
children: d
|
|
38
|
+
}) : g
|
|
39
|
+
}),
|
|
40
|
+
l.invalid && l.error && /* @__PURE__ */ a(n, {
|
|
41
|
+
errors: [l.error],
|
|
42
|
+
className: "mt-1"
|
|
43
|
+
})
|
|
44
|
+
]
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
export { c as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../../lib/utils.cjs`),t=require(`../../../ui/field.cjs`),n=require(`../../hover/hover.cjs`);let r=require(`react/jsx-runtime`),i=require(`react`),a=require(`react-hook-form`);function o({form:o,name:s,label:c,helper:l,id:u,length:d=6}){let f=(0,i.useRef)(null),p=u||`code-input-${String(s)}`,m=()=>{f.current?.focus()};return(0,r.jsx)(a.Controller,{control:o.control,name:s,render:({field:i,fieldState:a})=>{let o=i.value||``,s=o.split(``).slice(0,d),u=Array.from({length:d},(e,t)=>s[t]||``);return(0,r.jsxs)(t.Field,{"data-invalid":a.invalid,children:[(0,r.jsxs)(`div`,{className:`flex items-center gap-2`,children:[c&&(0,r.jsx)(t.FieldLabel,{htmlFor:p,children:c}),l&&(0,r.jsx)(n.Hover,{children:l})]}),(0,r.jsxs)(`div`,{className:`relative`,children:[(0,r.jsx)(`input`,{...i,ref:f,id:p,type:`text`,maxLength:d,className:`absolute inset-0 opacity-0 cursor-default`,autoComplete:`one-time-code`,value:o,onChange:e=>{let t=e.target.value.replace(/[^a-zA-Z0-9]/g,``).toUpperCase();i.onChange(t)}}),(0,r.jsx)(`div`,{className:`flex gap-2`,onClick:m,children:u.map((t,n)=>(0,r.jsx)(`div`,{className:e.cn(`flex h-12 w-10 items-center justify-center rounded-lg border-2 bg-background text-lg font-bold transition-all`,`border-input shadow-xs sm:h-14 sm:w-12 sm:text-xl`,i.value?.length===n&&!a.invalid&&`border-ring ring-3 ring-ring/20`,a.invalid&&`border-destructive ring-3 ring-destructive/20`,t&&`border-primary/50 bg-primary/5`),children:t},n))})]}),a.invalid&&a.error&&(0,r.jsx)(t.FieldError,{errors:[a.error]})]})}})}module.exports=o;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FieldValues, Path } from 'react-hook-form';
|
|
2
|
+
import { FormInputProps } from '../form.component';
|
|
3
|
+
interface CodeInputProps<T extends FieldValues> extends FormInputProps<T> {
|
|
4
|
+
name: Path<T>;
|
|
5
|
+
label?: string;
|
|
6
|
+
helper?: string;
|
|
7
|
+
id?: string;
|
|
8
|
+
length?: number;
|
|
9
|
+
}
|
|
10
|
+
export default function CodeInput<T extends FieldValues>({ form, name, label, helper, id, length }: CodeInputProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,58 @@
|
|
|
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 { useRef as s } from "react";
|
|
6
|
+
import { Controller as c } from "react-hook-form";
|
|
7
|
+
//#region src/shared/custom/form/inputs/code.input.tsx
|
|
8
|
+
function l({ form: l, name: u, label: d, helper: f, id: p, length: m = 6 }) {
|
|
9
|
+
let h = s(null), g = p || `code-input-${String(u)}`, _ = () => {
|
|
10
|
+
h.current?.focus();
|
|
11
|
+
};
|
|
12
|
+
return /* @__PURE__ */ a(c, {
|
|
13
|
+
control: l.control,
|
|
14
|
+
name: u,
|
|
15
|
+
render: ({ field: s, fieldState: c }) => {
|
|
16
|
+
let l = s.value || "", u = l.split("").slice(0, m), p = Array.from({ length: m }, (e, t) => u[t] || "");
|
|
17
|
+
return /* @__PURE__ */ o(t, {
|
|
18
|
+
"data-invalid": c.invalid,
|
|
19
|
+
children: [
|
|
20
|
+
/* @__PURE__ */ o("div", {
|
|
21
|
+
className: "flex items-center gap-2",
|
|
22
|
+
children: [d && /* @__PURE__ */ a(r, {
|
|
23
|
+
htmlFor: g,
|
|
24
|
+
children: d
|
|
25
|
+
}), f && /* @__PURE__ */ a(i, { children: f })]
|
|
26
|
+
}),
|
|
27
|
+
/* @__PURE__ */ o("div", {
|
|
28
|
+
className: "relative",
|
|
29
|
+
children: [/* @__PURE__ */ a("input", {
|
|
30
|
+
...s,
|
|
31
|
+
ref: h,
|
|
32
|
+
id: g,
|
|
33
|
+
type: "text",
|
|
34
|
+
maxLength: m,
|
|
35
|
+
className: "absolute inset-0 opacity-0 cursor-default",
|
|
36
|
+
autoComplete: "one-time-code",
|
|
37
|
+
value: l,
|
|
38
|
+
onChange: (e) => {
|
|
39
|
+
let t = e.target.value.replace(/[^a-zA-Z0-9]/g, "").toUpperCase();
|
|
40
|
+
s.onChange(t);
|
|
41
|
+
}
|
|
42
|
+
}), /* @__PURE__ */ a("div", {
|
|
43
|
+
className: "flex gap-2",
|
|
44
|
+
onClick: _,
|
|
45
|
+
children: p.map((t, n) => /* @__PURE__ */ a("div", {
|
|
46
|
+
className: e("flex h-12 w-10 items-center justify-center rounded-lg border-2 bg-background text-lg font-bold transition-all", "border-input shadow-xs sm:h-14 sm:w-12 sm:text-xl", s.value?.length === n && !c.invalid && "border-ring ring-3 ring-ring/20", c.invalid && "border-destructive ring-3 ring-destructive/20", t && "border-primary/50 bg-primary/5"),
|
|
47
|
+
children: t
|
|
48
|
+
}, n))
|
|
49
|
+
})]
|
|
50
|
+
}),
|
|
51
|
+
c.invalid && c.error && /* @__PURE__ */ a(n, { errors: [c.error] })
|
|
52
|
+
]
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
//#endregion
|
|
58
|
+
export { l as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../../lib/utils.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-hook-form`);function o({form:o,name:s,label:c,helper:l,id:u,hideText:d}){let f=u||`input-${String(s)}`;return(0,i.jsx)(a.Controller,{control:o.control,name:s,render:({field:a,fieldState:o})=>(0,i.jsxs)(t.Field,{"data-invalid":o.invalid,children:[(0,i.jsxs)(`div`,{className:`flex items-center gap-2`,children:[c&&(0,i.jsx)(t.FieldLabel,{htmlFor:f,children:c}),l&&(0,i.jsx)(r.Hover,{children:l})]}),(0,i.jsxs)(`div`,{className:`flex gap-2 items-center`,children:[(0,i.jsx)(n.Input,{...a,type:`color`,id:`${f}-color`,"aria-invalid":o.invalid,className:e.cn(`w-10 h-10 p-0 cursor-pointer overflow-hidden border-none shrink-0`,`[&::-webkit-color-swatch-wrapper]:p-0`,`[&::-webkit-color-swatch]:border-none`,`[&::-moz-color-swatch]:border-none`)}),!d&&(0,i.jsx)(n.Input,{...a,id:f,type:`text`,placeholder:`#000000`,"aria-invalid":o.invalid,className:`flex-1`,autoComplete:`off`})]}),o.invalid&&o.error&&(0,i.jsx)(t.FieldError,{errors:[o.error]})]})})}module.exports=o;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FieldValues, Path } from 'react-hook-form';
|
|
2
|
+
import { FormInputProps } from '../form.component';
|
|
3
|
+
interface InputProps<T extends FieldValues> extends FormInputProps<T> {
|
|
4
|
+
name: Path<T>;
|
|
5
|
+
label?: string;
|
|
6
|
+
helper?: string;
|
|
7
|
+
id?: string;
|
|
8
|
+
hideText?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export default function ColorInput<T extends FieldValues>({ form, name, label, helper, id, hideText }: InputProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
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 { 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 { Controller as c } from "react-hook-form";
|
|
7
|
+
//#region src/shared/custom/form/inputs/color.input.tsx
|
|
8
|
+
function l({ form: l, name: u, label: d, helper: f, id: p, hideText: m }) {
|
|
9
|
+
let h = p || `input-${String(u)}`;
|
|
10
|
+
return /* @__PURE__ */ o(c, {
|
|
11
|
+
control: l.control,
|
|
12
|
+
name: u,
|
|
13
|
+
render: ({ field: c, fieldState: l }) => /* @__PURE__ */ s(t, {
|
|
14
|
+
"data-invalid": l.invalid,
|
|
15
|
+
children: [
|
|
16
|
+
/* @__PURE__ */ s("div", {
|
|
17
|
+
className: "flex items-center gap-2",
|
|
18
|
+
children: [d && /* @__PURE__ */ o(r, {
|
|
19
|
+
htmlFor: h,
|
|
20
|
+
children: d
|
|
21
|
+
}), f && /* @__PURE__ */ o(a, { children: f })]
|
|
22
|
+
}),
|
|
23
|
+
/* @__PURE__ */ s("div", {
|
|
24
|
+
className: "flex gap-2 items-center",
|
|
25
|
+
children: [/* @__PURE__ */ o(i, {
|
|
26
|
+
...c,
|
|
27
|
+
type: "color",
|
|
28
|
+
id: `${h}-color`,
|
|
29
|
+
"aria-invalid": l.invalid,
|
|
30
|
+
className: e("w-10 h-10 p-0 cursor-pointer overflow-hidden border-none shrink-0", "[&::-webkit-color-swatch-wrapper]:p-0", "[&::-webkit-color-swatch]:border-none", "[&::-moz-color-swatch]:border-none")
|
|
31
|
+
}), !m && /* @__PURE__ */ o(i, {
|
|
32
|
+
...c,
|
|
33
|
+
id: h,
|
|
34
|
+
type: "text",
|
|
35
|
+
placeholder: "#000000",
|
|
36
|
+
"aria-invalid": l.invalid,
|
|
37
|
+
className: "flex-1",
|
|
38
|
+
autoComplete: "off"
|
|
39
|
+
})]
|
|
40
|
+
}),
|
|
41
|
+
l.invalid && l.error && /* @__PURE__ */ o(n, { errors: [l.error] })
|
|
42
|
+
]
|
|
43
|
+
})
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
47
|
+
export { l as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../../../../_virtual/_rolldown/runtime.cjs`),t=require(`../../../ui/field.cjs`),n=require(`../../hover/hover.cjs`),r=require(`../../../ui/combobox.cjs`);let i=require(`react/jsx-runtime`),a=require(`react`);a=e.__toESM(a);let o=require(`react-hook-form`);function s({form:e,name:a,label:s,helper:c,placeholder:l,items:u,itemFactory:d,keyExtractor:f,multiple:p=!1}){return(0,i.jsx)(o.Controller,{control:e.control,name:a,render:({field:{value:e,onChange:a},fieldState:o})=>{let m=p?Array.isArray(e)?e:[]:e||``,h=r.useComboboxAnchor();return(0,i.jsxs)(t.Field,{"data-invalid":o.invalid,children:[(0,i.jsxs)(`div`,{className:`flex items-center gap-2 mb-2`,children:[s&&(0,i.jsx)(t.FieldLabel,{className:`text-sm font-medium`,children:s}),c&&(0,i.jsx)(n.Hover,{children:c})]}),(0,i.jsxs)(r.Combobox,{multiple:p,value:m,onValueChange:e=>{a(e)},items:u,children:[p?(0,i.jsx)(`div`,{ref:h,className:`w-full`,children:(0,i.jsxs)(r.ComboboxChips,{className:`bg-background border-border w-full`,children:[m.map(e=>{let t=u.find(t=>f(t)===e);return(0,i.jsx)(r.ComboboxChip,{value:e,children:t?d(t):e},e)}),(0,i.jsx)(r.ComboboxChipsInput,{placeholder:m.length>0?``:l||`Seleccionar...`})]})}):(0,i.jsx)(`div`,{ref:h,className:`relative group/combobox w-full`,children:(0,i.jsx)(r.ComboboxInput,{placeholder:l||`Seleccionar...`,className:`w-full bg-background border-border flex flex-row items-center`})}),(0,i.jsxs)(r.ComboboxContent,{anchor:h.current,className:`bg-card border-border shadow-matte`,children:[(0,i.jsx)(r.ComboboxEmpty,{children:`No se encontraron resultados`}),(0,i.jsx)(r.ComboboxList,{className:`custom-scrollbar`,children:u.map(e=>(0,i.jsx)(r.ComboboxItem,{value:f(e),children:d(e)},f(e)))})]})]}),o.invalid&&o.error&&(0,i.jsx)(t.FieldError,{errors:[o.error],className:`mt-2`})]})}})}module.exports=s;
|