@jmruthers/pace-core 0.2.7 → 0.4.1
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/CHANGELOG.md +1 -26
- package/README.md +229 -231
- package/dist/{DataTable-EEUDXPE5.js → DataTable-2LB6HI6V.js} +17 -10
- package/dist/{DataTable-C1AEm9Cx.d.ts → DataTable-BDBqkU-i.d.ts} +51 -23
- package/dist/{PublicLoadingSpinner-DztrzuJr.d.ts → Table-CIm9IWqk.d.ts} +122 -635
- package/dist/UnifiedAuthProvider-V7y63NjT.d.ts +88 -0
- package/dist/{api-ETQ6YJ3C.js → api-AIJ3IJX3.js} +4 -6
- package/dist/{appConfig-BVGyuvI7.d.ts → appConfig-fB1pP_v3.d.ts} +1 -1
- package/dist/{audit-BUW3LMJB.js → audit-PD5L5ZSC.js} +3 -3
- package/dist/{chunk-ETEJVKYK.js → chunk-4MCJAK7J.js} +4927 -504
- package/dist/chunk-4MCJAK7J.js.map +1 -0
- package/dist/{chunk-CDQ3PX7L.js → chunk-4ZTIEYU2.js} +1 -1
- package/dist/chunk-4ZTIEYU2.js.map +1 -0
- package/dist/{chunk-PLDDJCW6.js → chunk-DC5AMYBS.js} +5 -15
- package/dist/{chunk-HEMJ4SUJ.js → chunk-H4PZ4B3Y.js} +27 -124
- package/dist/chunk-H4PZ4B3Y.js.map +1 -0
- package/dist/{chunk-HNDFPXUU.js → chunk-IOX76PSM.js} +28 -270
- package/dist/chunk-IOX76PSM.js.map +1 -0
- package/dist/{chunk-TIVL4UQ7.js → chunk-JUUNUW3O.js} +5 -14
- package/dist/chunk-JUUNUW3O.js.map +1 -0
- package/dist/chunk-KK6WIDK6.js +63 -0
- package/dist/chunk-KK6WIDK6.js.map +1 -0
- package/dist/chunk-U7DY5T33.js +11 -0
- package/dist/chunk-U7DY5T33.js.map +1 -0
- package/dist/{chunk-SS3E6QLB.js → chunk-WHLSWC6W.js} +61 -16
- package/dist/chunk-WHLSWC6W.js.map +1 -0
- package/dist/chunk-XI7QFSSC.js +790 -0
- package/dist/chunk-XI7QFSSC.js.map +1 -0
- package/dist/chunk-XIJMMBDD.js +73 -0
- package/dist/chunk-XIJMMBDD.js.map +1 -0
- package/dist/{chunk-7BNPOCLL.js → chunk-YNU5QJ4S.js} +5 -22
- package/dist/chunk-YNU5QJ4S.js.map +1 -0
- package/dist/chunk-YWYCNGWH.js +2070 -0
- package/dist/chunk-YWYCNGWH.js.map +1 -0
- package/dist/chunk-ZJ3UKPIW.js +952 -0
- package/dist/chunk-ZJ3UKPIW.js.map +1 -0
- package/dist/components.d.ts +10 -906
- package/dist/components.js +77 -3255
- package/dist/components.js.map +1 -1
- package/dist/{database-C3Szpi5J.d.ts → database-CAMsquLm.d.ts} +11 -28
- package/dist/hooks.d.ts +6 -7
- package/dist/hooks.js +11 -35
- package/dist/hooks.js.map +1 -1
- package/dist/index.d.ts +111 -245
- package/dist/index.js +178 -187
- package/dist/index.js.map +1 -1
- package/dist/{organisation-CO3Sh3_D.d.ts → organisation-DLNNQhPB.d.ts} +1 -1
- package/dist/providers.d.ts +4 -4
- package/dist/providers.js +5 -19
- package/dist/rbac/index.d.ts +5 -61
- package/dist/rbac/index.js +93 -256
- package/dist/rbac/index.js.map +1 -1
- package/dist/{types-DiRQsGJs.d.ts → types-Bavn44NW.d.ts} +36 -71
- package/dist/types.d.ts +5 -5
- package/dist/types.js +2 -7
- package/dist/types.js.map +1 -1
- package/dist/{unified-CM7T0aTK.d.ts → unified-BtRpPbmp.d.ts} +2 -1
- package/dist/useAppConfig-CZNJJsT_.d.ts +148 -0
- package/dist/utils.d.ts +60 -83
- package/dist/utils.js +55633 -277
- package/dist/utils.js.map +1 -1
- package/dist/validation.d.ts +1 -1
- package/dist/validation.js +1 -1
- package/docs/README.md +32 -46
- package/docs/api/README.md +229 -231
- package/docs/api/classes/ErrorBoundary.md +1 -1
- package/docs/api/interfaces/AggregateConfig.md +4 -4
- package/docs/api/interfaces/ButtonProps.md +2 -2
- package/docs/api/interfaces/CardProps.md +2 -2
- package/docs/api/interfaces/ColorPalette.md +1 -1
- package/docs/api/interfaces/ColorShade.md +1 -1
- package/docs/api/interfaces/DataTableAction.md +7 -85
- package/docs/api/interfaces/DataTableColumn.md +12 -131
- package/docs/api/interfaces/DataTableProps.md +274 -64
- package/docs/api/interfaces/DataTableToolbarButton.md +7 -7
- package/docs/api/interfaces/EmptyStateConfig.md +5 -5
- package/docs/api/interfaces/EventContextType.md +7 -7
- package/docs/api/interfaces/EventProviderProps.md +2 -2
- package/docs/api/interfaces/FooterProps.md +1 -1
- package/docs/api/interfaces/InputProps.md +2 -2
- package/docs/api/interfaces/LabelProps.md +1 -1
- package/docs/api/interfaces/LoginFormProps.md +1 -1
- package/docs/api/interfaces/NavigationItem.md +1 -1
- package/docs/api/interfaces/NavigationMenuProps.md +1 -1
- package/docs/api/interfaces/Organisation.md +1 -1
- package/docs/api/interfaces/OrganisationContextType.md +1 -1
- package/docs/api/interfaces/OrganisationMembership.md +1 -1
- package/docs/api/interfaces/OrganisationProviderProps.md +1 -1
- package/docs/api/interfaces/OrganisationSecurityError.md +1 -1
- package/docs/api/interfaces/PaceAppLayoutProps.md +26 -26
- package/docs/api/interfaces/PaceLoginPageProps.md +1 -1
- package/docs/api/interfaces/PaletteData.md +1 -1
- package/docs/api/interfaces/StyleImport.md +2 -2
- package/docs/api/interfaces/ToastActionElement.md +1 -1
- package/docs/api/interfaces/ToastProps.md +1 -1
- package/docs/api/interfaces/UnifiedAuthContextType.md +46 -447
- package/docs/api/interfaces/UnifiedAuthProviderProps.md +9 -95
- package/docs/api/interfaces/UserEventAccess.md +14 -14
- package/docs/api/interfaces/UserMenuProps.md +6 -6
- package/docs/api/interfaces/UserProfile.md +1 -1
- package/docs/api/modules.md +773 -1631
- package/docs/api-reference/components.md +43 -761
- package/docs/api-reference/hooks.md +0 -126
- package/docs/api-reference/providers.md +65 -141
- package/docs/api-reference/types.md +36 -66
- package/docs/api-reference/utilities.md +1 -1
- package/docs/architecture/README.md +2 -1
- package/docs/consuming-app-example.md +96 -42
- package/docs/core-concepts/events.md +3 -3
- package/docs/core-concepts/organisations.md +1 -0
- package/docs/core-concepts/rbac-system.md +10 -23
- package/docs/documentation-style-checklist.md +2 -8
- package/docs/getting-started/examples/README.md +1 -15
- package/docs/getting-started/examples/basic-auth-app.md +119 -444
- package/docs/getting-started/examples/full-featured-app.md +6 -6
- package/docs/getting-started/installation.md +52 -231
- package/docs/getting-started/quick-start.md +24 -121
- package/docs/implementation-guides/app-layout.md +108 -133
- package/docs/implementation-guides/data-tables.md +29 -1011
- package/docs/implementation-guides/forms.md +3 -3
- package/docs/implementation-guides/large-datasets.md +2 -2
- package/docs/implementation-guides/navigation.md +1 -1
- package/docs/implementation-guides/permission-enforcement.md +4 -4
- package/docs/migration/README.md +8 -18
- package/docs/migration/rbac-migration.md +0 -50
- package/docs/migration-guide.md +104 -51
- package/docs/performance/README.md +4 -1
- package/docs/quick-reference.md +36 -53
- package/docs/rbac/README.md +69 -136
- package/docs/rbac/api-reference.md +8 -39
- package/docs/rbac/examples.md +66 -237
- package/docs/rbac/getting-started.md +16 -131
- package/docs/rbac/quick-start.md +323 -499
- package/docs/rbac/troubleshooting.md +262 -240
- package/docs/security/README.md +1 -50
- package/docs/styles/README.md +117 -143
- package/docs/testing/README.md +10 -6
- package/docs/troubleshooting/common-issues.md +14 -604
- package/docs/usage.md +90 -28
- package/docs/visual-testing.md +7 -0
- package/package.json +24 -43
- package/dist/UnifiedAuthProvider-w66zSCUf.d.ts +0 -160
- package/dist/appNameResolver-7GHF5ED2.js +0 -22
- package/dist/chunk-2V3Y6YBC.js +0 -114
- package/dist/chunk-2V3Y6YBC.js.map +0 -1
- package/dist/chunk-7BNPOCLL.js.map +0 -1
- package/dist/chunk-BEZRLNK3.js +0 -1744
- package/dist/chunk-BEZRLNK3.js.map +0 -1
- package/dist/chunk-C5G2A4PO.js +0 -1349
- package/dist/chunk-C5G2A4PO.js.map +0 -1
- package/dist/chunk-CDQ3PX7L.js.map +0 -1
- package/dist/chunk-ETEJVKYK.js.map +0 -1
- package/dist/chunk-EWKPTNPO.js +0 -5139
- package/dist/chunk-EWKPTNPO.js.map +0 -1
- package/dist/chunk-HEMJ4SUJ.js.map +0 -1
- package/dist/chunk-HNDFPXUU.js.map +0 -1
- package/dist/chunk-MZBUOP4P.js +0 -119
- package/dist/chunk-MZBUOP4P.js.map +0 -1
- package/dist/chunk-N2EUGZRW.js +0 -98
- package/dist/chunk-N2EUGZRW.js.map +0 -1
- package/dist/chunk-NQ4TOOO6.js +0 -20
- package/dist/chunk-NQ4TOOO6.js.map +0 -1
- package/dist/chunk-OHXGNT3K.js +0 -21
- package/dist/chunk-OHXGNT3K.js.map +0 -1
- package/dist/chunk-PLDDJCW6.js.map +0 -1
- package/dist/chunk-RRUYHORU.js +0 -3431
- package/dist/chunk-RRUYHORU.js.map +0 -1
- package/dist/chunk-SS3E6QLB.js.map +0 -1
- package/dist/chunk-TIVL4UQ7.js.map +0 -1
- package/dist/chunk-VYG4AXYW.js +0 -388
- package/dist/chunk-VYG4AXYW.js.map +0 -1
- package/dist/chunk-YDJW5XTN.js +0 -84
- package/dist/chunk-YDJW5XTN.js.map +0 -1
- package/dist/styles/core.css +0 -422
- package/dist/styles/fonts/georama-italic.woff2 +0 -0
- package/dist/styles/fonts/georama.woff2 +0 -0
- package/dist/styles/fonts/open-sans-italic.woff2 +0 -0
- package/dist/styles/fonts/open-sans.woff2 +0 -0
- package/dist/styles/fonts/reddit-mono.woff2 +0 -0
- package/dist/styles/index.d.ts +0 -36
- package/dist/styles/index.js +0 -24
- package/dist/styles/index.js.map +0 -1
- package/dist/theming/runtime.d.ts +0 -73
- package/dist/theming/runtime.js +0 -16
- package/dist/theming/runtime.js.map +0 -1
- package/dist/usePublicRouteParams-B6i0KtXW.d.ts +0 -477
- package/docs/INDEX.md +0 -192
- package/docs/api/classes/PublicErrorBoundary.md +0 -132
- package/docs/api/interfaces/EventLogoProps.md +0 -152
- package/docs/api/interfaces/FileSizeLimits.md +0 -7
- package/docs/api/interfaces/FileUploadProps.md +0 -154
- package/docs/api/interfaces/InactivityWarningModalProps.md +0 -115
- package/docs/api/interfaces/PublicErrorBoundaryProps.md +0 -94
- package/docs/api/interfaces/PublicErrorBoundaryState.md +0 -68
- package/docs/api/interfaces/PublicLoadingSpinnerProps.md +0 -86
- package/docs/api/interfaces/PublicPageFooterProps.md +0 -112
- package/docs/api/interfaces/PublicPageHeaderProps.md +0 -138
- package/docs/api/interfaces/PublicPageLayoutProps.md +0 -138
- package/docs/api/interfaces/StorageConfig.md +0 -41
- package/docs/api/interfaces/StorageFileInfo.md +0 -74
- package/docs/api/interfaces/StorageFileMetadata.md +0 -140
- package/docs/api/interfaces/StorageListOptions.md +0 -86
- package/docs/api/interfaces/StorageListResult.md +0 -41
- package/docs/api/interfaces/StorageUploadOptions.md +0 -88
- package/docs/api/interfaces/StorageUploadResult.md +0 -63
- package/docs/api/interfaces/StorageUrlOptions.md +0 -47
- package/docs/api/interfaces/UseInactivityTrackerOptions.md +0 -136
- package/docs/api/interfaces/UseInactivityTrackerReturn.md +0 -123
- package/docs/api/interfaces/UsePublicEventLogoOptions.md +0 -87
- package/docs/api/interfaces/UsePublicEventLogoReturn.md +0 -81
- package/docs/api/interfaces/UsePublicEventOptions.md +0 -34
- package/docs/api/interfaces/UsePublicEventReturn.md +0 -68
- package/docs/api/interfaces/UsePublicRouteParamsReturn.md +0 -94
- package/docs/best-practices/README.md +0 -400
- package/docs/consuming-app-vite-config.md +0 -233
- package/docs/examples/navigation-menu-auth-fix.md +0 -344
- package/docs/implementation-guides/hierarchical-datatable.md +0 -850
- package/docs/implementation-guides/public-pages.md +0 -752
- package/docs/migration/quick-migration-guide.md +0 -320
- package/docs/migration/v0.4.15-tailwind-scanning.md +0 -272
- package/docs/migration/v0.4.16-css-first-approach.md +0 -306
- package/docs/migration/v0.4.17-source-path-fix.md +0 -229
- package/docs/print-components/README.md +0 -258
- package/docs/print-components/api-reference.md +0 -636
- package/docs/print-components/examples/README.md +0 -204
- package/docs/print-components/examples/basic-report.tsx +0 -92
- package/docs/print-components/examples/card-catalog.tsx +0 -149
- package/docs/print-components/examples/cover-page-report.tsx +0 -163
- package/docs/print-components/quick-start.md +0 -363
- package/docs/troubleshooting/README.md +0 -497
- package/docs/troubleshooting/styling-issues.md +0 -219
- package/docs/troubleshooting/tailwind-content-scanning.md +0 -213
- package/src/__mocks__/lucide-react.ts +0 -181
- package/src/__tests__/README.md +0 -404
- package/src/__tests__/debug-provider.unit.test.tsx +0 -67
- package/src/__tests__/e2e/workflows.test.tsx +0 -373
- package/src/__tests__/hybridPermissions.unit.test.tsx +0 -474
- package/src/__tests__/index.integration.test.ts +0 -491
- package/src/__tests__/mocks/MockAuthProvider-standalone.tsx +0 -47
- package/src/__tests__/mocks/MockAuthProvider.tsx +0 -63
- package/src/__tests__/mocks/enhancedSupabaseMock.ts +0 -252
- package/src/__tests__/mocks/index.test.ts +0 -23
- package/src/__tests__/mocks/index.ts +0 -16
- package/src/__tests__/mocks/mockAuth.ts +0 -155
- package/src/__tests__/mocks/mockSupabase.ts +0 -83
- package/src/__tests__/mocks/mockSupabaseClient.ts +0 -63
- package/src/__tests__/mocks/providers.tsx +0 -22
- package/src/__tests__/patterns/__tests__/testPatterns.test.ts +0 -394
- package/src/__tests__/patterns/testPatterns.ts +0 -124
- package/src/__tests__/performance/componentPerformance.performance.test.ts +0 -27
- package/src/__tests__/performance/index.ts +0 -24
- package/src/__tests__/performance/performanceValidation.performance.test.ts +0 -15
- package/src/__tests__/security/security.unit.test.tsx +0 -7
- package/src/__tests__/security/securityValidation.security.test.tsx +0 -153
- package/src/__tests__/setup.ts +0 -259
- package/src/__tests__/setupTests.d.ts +0 -1
- package/src/__tests__/shared/componentTestUtils.tsx +0 -475
- package/src/__tests__/shared/errorHandlingTestUtils.ts +0 -107
- package/src/__tests__/shared/index.ts +0 -81
- package/src/__tests__/shared/integrationTestUtils.tsx +0 -375
- package/src/__tests__/shared/performanceTestUtils.tsx +0 -476
- package/src/__tests__/shared/testUtils.optimized.tsx +0 -685
- package/src/__tests__/simple.test.tsx +0 -20
- package/src/__tests__/templates/accessibility.test.template.tsx +0 -279
- package/src/__tests__/templates/component.test.template.tsx +0 -122
- package/src/__tests__/templates/integration.test.template.tsx +0 -199
- package/src/__tests__/test-utils/dataFactories.ts +0 -60
- package/src/__tests__/test-utils/index.ts +0 -6
- package/src/__tests__/typeSafety.unit.test.ts +0 -65
- package/src/__tests__/unifiedAuth.unit.test.tsx +0 -151
- package/src/__tests__/utils/accessibilityHelpers.ts +0 -254
- package/src/__tests__/utils/assertions.ts +0 -50
- package/src/__tests__/utils/deterministicHelpers.ts +0 -31
- package/src/__tests__/utils/edgeCaseConfig.test.ts +0 -75
- package/src/__tests__/utils/edgeCaseConfig.ts +0 -98
- package/src/__tests__/utils/mockHelpers.ts +0 -149
- package/src/__tests__/utils/mockLoader.ts +0 -101
- package/src/__tests__/utils/performanceHelpers.ts +0 -55
- package/src/__tests__/utils/performanceTestHelpers.ts +0 -68
- package/src/__tests__/utils/testDataFactories.ts +0 -28
- package/src/__tests__/utils/testIsolation.ts +0 -67
- package/src/__tests__/utils/visualTestHelpers.ts +0 -20
- package/src/__tests__/visual/__snapshots__/componentSnapshots.visual.test.tsx.snap +0 -68
- package/src/__tests__/visual/__snapshots__/componentVisuals.visual.test.tsx.snap +0 -14
- package/src/__tests__/visual/__snapshots__/visualRegression.test.tsx.snap +0 -217
- package/src/__tests__/visual/__snapshots__/visualRegression.visual.test.tsx.snap +0 -24
- package/src/__tests__/visual/componentSnapshots.visual.test.tsx +0 -33
- package/src/__tests__/visual/componentVisuals.visual.test.tsx +0 -12
- package/src/__tests__/visual/visualRegression.visual.test.tsx +0 -20
- package/src/components/Alert/Alert.tsx +0 -134
- package/src/components/Alert/__tests__/Alert.unit.test.tsx +0 -381
- package/src/components/Alert/index.ts +0 -2
- package/src/components/Avatar/Avatar.tsx +0 -84
- package/src/components/Avatar/__tests__/Avatar.unit.test.tsx +0 -232
- package/src/components/Avatar/index.ts +0 -2
- package/src/components/Button/Button.tsx +0 -270
- package/src/components/Button/__tests__/Button.accessibility.test.tsx +0 -131
- package/src/components/Button/__tests__/Button.comprehensive.test.tsx +0 -721
- package/src/components/Button/__tests__/Button.unit.test.tsx +0 -189
- package/src/components/Button/__tests__/EventSelector.integration.test.tsx +0 -285
- package/src/components/Button/index.ts +0 -2
- package/src/components/Card/Card.tsx +0 -271
- package/src/components/Card/__tests__/Card.accessibility.test.tsx +0 -394
- package/src/components/Card/__tests__/Card.comprehensive.test.tsx +0 -599
- package/src/components/Card/__tests__/Card.integration.test.tsx +0 -673
- package/src/components/Card/__tests__/Card.performance.test.tsx +0 -546
- package/src/components/Card/__tests__/Card.unit.test.tsx +0 -330
- package/src/components/Card/__tests__/Card.visual.test.tsx +0 -599
- package/src/components/Card/__tests__/README.md +0 -211
- package/src/components/Card/index.ts +0 -1
- package/src/components/Checkbox/Checkbox.tsx +0 -75
- package/src/components/Checkbox/__mocks__/Checkbox.tsx +0 -2
- package/src/components/Checkbox/__tests__/Checkbox.unit.test.tsx +0 -520
- package/src/components/Checkbox/index.ts +0 -2
- package/src/components/DataTable/DataTable.tsx +0 -438
- package/src/components/DataTable/__tests__/DataTable.errorHandling.test.tsx +0 -251
- package/src/components/DataTable/__tests__/DataTable.hierarchical.test.tsx +0 -680
- package/src/components/DataTable/__tests__/DataTable.infinite-loop.test.tsx +0 -323
- package/src/components/DataTable/__tests__/DataTable.integration.test.tsx +0 -716
- package/src/components/DataTable/__tests__/DataTable.performance.test.tsx +0 -589
- package/src/components/DataTable/__tests__/DataTable.permissions.test.tsx +0 -316
- package/src/components/DataTable/__tests__/DataTable.regressionFixes.test.tsx +0 -546
- package/src/components/DataTable/__tests__/DataTable.selection.controlled.test.tsx +0 -386
- package/src/components/DataTable/__tests__/DataTable.selection.test.tsx +0 -338
- package/src/components/DataTable/__tests__/DataTable.sorting.test.tsx +0 -321
- package/src/components/DataTable/__tests__/DataTable.userWorkflows.test.tsx +0 -320
- package/src/components/DataTable/__tests__/DataTable.workflowValidation.test.tsx +0 -583
- package/src/components/DataTable/__tests__/DataTable.workflows.test.tsx +0 -711
- package/src/components/DataTable/__tests__/README.md +0 -145
- package/src/components/DataTable/__tests__/mocks/MockRBACProvider.tsx +0 -66
- package/src/components/DataTable/__tests__/performance-regression.test.tsx +0 -777
- package/src/components/DataTable/__tests__/performance.test.tsx +0 -365
- package/src/components/DataTable/__tests__/test-utils/dataFactories.ts +0 -103
- package/src/components/DataTable/__tests__/test-utils/sharedTestUtils.tsx +0 -381
- package/src/components/DataTable/__tests__/test-utils.ts +0 -94
- package/src/components/DataTable/components/ActionButtons.tsx +0 -177
- package/src/components/DataTable/components/BulkOperationsDropdown.tsx +0 -160
- package/src/components/DataTable/components/ColumnFilter.tsx +0 -114
- package/src/components/DataTable/components/ColumnVisibilityDropdown.tsx +0 -100
- package/src/components/DataTable/components/DataTableBody.tsx +0 -461
- package/src/components/DataTable/components/DataTableCore.tsx +0 -941
- package/src/components/DataTable/components/DataTableErrorBoundary.tsx +0 -214
- package/src/components/DataTable/components/DataTableModals.tsx +0 -87
- package/src/components/DataTable/components/DataTableToolbar.tsx +0 -250
- package/src/components/DataTable/components/DraggableColumnHeader.tsx +0 -144
- package/src/components/DataTable/components/EditableRow.tsx +0 -159
- package/src/components/DataTable/components/EmptyState.tsx +0 -64
- package/src/components/DataTable/components/ExpandButton.tsx +0 -113
- package/src/components/DataTable/components/FilterRow.tsx +0 -100
- package/src/components/DataTable/components/GroupHeader.tsx +0 -42
- package/src/components/DataTable/components/GroupingDropdown.tsx +0 -96
- package/src/components/DataTable/components/ImportModal.tsx +0 -345
- package/src/components/DataTable/components/LoadingState.tsx +0 -12
- package/src/components/DataTable/components/PaginationControls.tsx +0 -332
- package/src/components/DataTable/components/UnifiedTableBody.tsx +0 -713
- package/src/components/DataTable/components/ViewRowModal.tsx +0 -68
- package/src/components/DataTable/components/VirtualizedDataTable.tsx +0 -513
- package/src/components/DataTable/components/__tests__/ActionButtons.unit.test.tsx +0 -150
- package/src/components/DataTable/components/__tests__/BulkOperationsDropdown.test.tsx +0 -224
- package/src/components/DataTable/components/__tests__/ColumnVisibilityDropdown.unit.test.tsx +0 -244
- package/src/components/DataTable/components/__tests__/DataTable.accessibility.test.tsx +0 -629
- package/src/components/DataTable/components/__tests__/DataTable.integration.test.tsx +0 -470
- package/src/components/DataTable/components/__tests__/DataTable.performance.test.tsx +0 -160
- package/src/components/DataTable/components/__tests__/DataTable.real.test.tsx +0 -251
- package/src/components/DataTable/components/__tests__/DataTable.security.test.tsx +0 -171
- package/src/components/DataTable/components/__tests__/DataTable.unit.test.tsx +0 -290
- package/src/components/DataTable/components/__tests__/DataTableBody.unit.test.tsx +0 -147
- package/src/components/DataTable/components/__tests__/DataTableErrorBoundary.unit.test.tsx +0 -182
- package/src/components/DataTable/components/__tests__/DataTableModals.unit.test.tsx +0 -123
- package/src/components/DataTable/components/__tests__/EditableRow.unit.test.tsx +0 -660
- package/src/components/DataTable/components/__tests__/EmptyState.unit.test.tsx +0 -256
- package/src/components/DataTable/components/__tests__/ExpandButton.test.tsx +0 -498
- package/src/components/DataTable/components/__tests__/FilterRow.unit.test.tsx +0 -112
- package/src/components/DataTable/components/__tests__/FilteringToggle.unit.test.tsx +0 -133
- package/src/components/DataTable/components/__tests__/GroupHeader.unit.test.tsx +0 -172
- package/src/components/DataTable/components/__tests__/GroupingDropdown.unit.test.tsx +0 -222
- package/src/components/DataTable/components/__tests__/ImportModal.unit.test.tsx +0 -780
- package/src/components/DataTable/components/__tests__/LoadingState.unit.test.tsx +0 -65
- package/src/components/DataTable/components/__tests__/PaginationControls.unit.test.tsx +0 -634
- package/src/components/DataTable/components/__tests__/StateComponents.unit.test.tsx +0 -48
- package/src/components/DataTable/components/__tests__/UnifiedTableBody.hierarchical.test.tsx +0 -541
- package/src/components/DataTable/components/__tests__/ViewRowModal.unit.test.tsx +0 -228
- package/src/components/DataTable/components/__tests__/VirtualizedDataTable.unit.test.tsx +0 -568
- package/src/components/DataTable/components/index.ts +0 -16
- package/src/components/DataTable/context/DataTableContext.tsx +0 -97
- package/src/components/DataTable/core/ActionManager.ts +0 -235
- package/src/components/DataTable/core/ColumnFactory.ts +0 -268
- package/src/components/DataTable/core/ColumnManager.ts +0 -205
- package/src/components/DataTable/core/DataManager.ts +0 -188
- package/src/components/DataTable/core/DataTableContext.tsx +0 -181
- package/src/components/DataTable/core/LocalDataAdapter.ts +0 -264
- package/src/components/DataTable/core/PluginRegistry.ts +0 -229
- package/src/components/DataTable/core/StateManager.ts +0 -311
- package/src/components/DataTable/core/__tests__/ActionManager.unit.test.ts +0 -405
- package/src/components/DataTable/core/__tests__/ArchitectureIntegration.unit.test.tsx +0 -445
- package/src/components/DataTable/core/__tests__/ColumnFactory.unit.test.ts +0 -288
- package/src/components/DataTable/core/__tests__/ColumnManager.unit.test.ts +0 -623
- package/src/components/DataTable/core/__tests__/DataManager.unit.test.ts +0 -431
- package/src/components/DataTable/core/__tests__/DataTableContext.unit.test.tsx +0 -433
- package/src/components/DataTable/core/__tests__/LocalDataAdapter.unit.test.ts +0 -422
- package/src/components/DataTable/core/__tests__/PluginRegistry.unit.test.tsx +0 -207
- package/src/components/DataTable/core/__tests__/StateManager.unit.test.ts +0 -278
- package/src/components/DataTable/core/index.ts +0 -8
- package/src/components/DataTable/core/interfaces.ts +0 -338
- package/src/components/DataTable/examples/HierarchicalActionsExample.tsx +0 -418
- package/src/components/DataTable/examples/HierarchicalExample.tsx +0 -472
- package/src/components/DataTable/examples/InitialPageSizeExample.tsx +0 -173
- package/src/components/DataTable/examples/PerformanceExample.tsx +0 -502
- package/src/components/DataTable/examples/__tests__/PerformanceExample.unit.test.tsx +0 -281
- package/src/components/DataTable/hooks/__tests__/useColumnOrderPersistence.unit.test.ts +0 -407
- package/src/components/DataTable/hooks/__tests__/useColumnReordering.unit.test.ts +0 -679
- package/src/components/DataTable/hooks/useColumnOrderPersistence.ts +0 -95
- package/src/components/DataTable/hooks/useColumnReordering.ts +0 -110
- package/src/components/DataTable/hooks/useDataTableState.ts +0 -325
- package/src/components/DataTable/hooks/useHierarchicalState.ts +0 -174
- package/src/components/DataTable/index.ts +0 -68
- package/src/components/DataTable/styles.ts +0 -171
- package/src/components/DataTable/types.ts +0 -473
- package/src/components/DataTable/utils/__tests__/debugTools.unit.test.ts +0 -267
- package/src/components/DataTable/utils/__tests__/errorHandling.unit.test.ts +0 -467
- package/src/components/DataTable/utils/__tests__/exportUtils.unit.test.ts +0 -380
- package/src/components/DataTable/utils/__tests__/flexibleImport.unit.test.ts +0 -233
- package/src/components/DataTable/utils/__tests__/performanceUtils.unit.test.ts +0 -414
- package/src/components/DataTable/utils/debugTools.ts +0 -583
- package/src/components/DataTable/utils/errorHandling.ts +0 -494
- package/src/components/DataTable/utils/exportUtils.ts +0 -126
- package/src/components/DataTable/utils/flexibleImport.ts +0 -510
- package/src/components/DataTable/utils/hierarchicalSorting.ts +0 -151
- package/src/components/DataTable/utils/hierarchicalUtils.ts +0 -218
- package/src/components/DataTable/utils/index.ts +0 -1
- package/src/components/DataTable/utils/performanceUtils.ts +0 -351
- package/src/components/Dialog/Dialog.tsx +0 -782
- package/src/components/Dialog/README.md +0 -804
- package/src/components/Dialog/__tests__/Dialog.accessibility.test.tsx +0 -521
- package/src/components/Dialog/__tests__/Dialog.auto-size.example.tsx +0 -157
- package/src/components/Dialog/__tests__/Dialog.enhanced.test.tsx +0 -538
- package/src/components/Dialog/__tests__/Dialog.unit.test.tsx +0 -1373
- package/src/components/Dialog/examples/BasicHtmlTest.tsx +0 -55
- package/src/components/Dialog/examples/DebugHtmlExample.tsx +0 -68
- package/src/components/Dialog/examples/HtmlDialogExample.tsx +0 -202
- package/src/components/Dialog/examples/SimpleHtmlTest.tsx +0 -61
- package/src/components/Dialog/examples/SmartDialogExample.tsx +0 -322
- package/src/components/Dialog/examples/__tests__/SmartDialogExample.unit.test.tsx +0 -151
- package/src/components/Dialog/index.ts +0 -12
- package/src/components/Dialog/utils/__tests__/safeHtml.unit.test.ts +0 -611
- package/src/components/Dialog/utils/safeHtml.ts +0 -185
- package/src/components/ErrorBoundary/ErrorBoundary.tsx +0 -312
- package/src/components/ErrorBoundary/__tests__/ErrorBoundary.accessibility.test.tsx +0 -517
- package/src/components/ErrorBoundary/__tests__/ErrorBoundary.integration.test.tsx +0 -572
- package/src/components/ErrorBoundary/__tests__/ErrorBoundary.unit.test.tsx +0 -579
- package/src/components/ErrorBoundary/index.ts +0 -8
- package/src/components/EventSelector/EventSelector.tsx +0 -360
- package/src/components/EventSelector/__tests__/EventSelector.test.tsx +0 -528
- package/src/components/EventSelector/index.ts +0 -3
- package/src/components/EventSelector/types.ts +0 -79
- package/src/components/FileUpload/FileUpload.example.tsx +0 -218
- package/src/components/FileUpload/FileUpload.tsx +0 -237
- package/src/components/FileUpload/__tests__/FileUpload.integration.test.tsx +0 -992
- package/src/components/FileUpload/__tests__/FileUpload.real.test.tsx +0 -927
- package/src/components/FileUpload/__tests__/FileUpload.test.tsx +0 -855
- package/src/components/FileUpload/__tests__/FileUpload.unit.test.tsx +0 -1311
- package/src/components/FileUpload/__tests__/FileUpload.unmocked.test.tsx +0 -937
- package/src/components/FileUpload/index.ts +0 -6
- package/src/components/Footer/Footer.tsx +0 -197
- package/src/components/Footer/__tests__/Footer.accessibility.test.tsx +0 -359
- package/src/components/Footer/__tests__/Footer.integration.test.tsx +0 -353
- package/src/components/Footer/__tests__/Footer.performance.test.tsx +0 -309
- package/src/components/Footer/__tests__/Footer.unit.test.tsx +0 -309
- package/src/components/Footer/__tests__/Footer.visual.test.tsx +0 -335
- package/src/components/Footer/index.ts +0 -17
- package/src/components/Form/Form.tsx +0 -166
- package/src/components/Form/FormErrorSummary.tsx +0 -113
- package/src/components/Form/FormField.tsx +0 -249
- package/src/components/Form/FormFieldset.tsx +0 -127
- package/src/components/Form/FormLiveRegion.tsx +0 -198
- package/src/components/Form/__tests__/Form.accessibility.test.tsx +0 -820
- package/src/components/Form/__tests__/Form.unit.test.tsx +0 -305
- package/src/components/Form/__tests__/FormErrorSummary.unit.test.tsx +0 -285
- package/src/components/Form/__tests__/FormFieldset.unit.test.tsx +0 -241
- package/src/components/Form/index.ts +0 -26
- package/src/components/Header/Header.tsx +0 -301
- package/src/components/Header/__tests__/Header.accessibility.test.tsx +0 -382
- package/src/components/Header/__tests__/Header.comprehensive.test.tsx +0 -509
- package/src/components/Header/__tests__/Header.unit.test.tsx +0 -335
- package/src/components/Header/index.ts +0 -4
- package/src/components/InactivityWarningModal/InactivityWarningModal.test.tsx +0 -196
- package/src/components/InactivityWarningModal/InactivityWarningModal.tsx +0 -164
- package/src/components/InactivityWarningModal/__tests__/InactivityWarningModal.unit.test.tsx +0 -224
- package/src/components/InactivityWarningModal/index.ts +0 -9
- package/src/components/Input/Input.tsx +0 -201
- package/src/components/Input/__mocks__/Input.tsx +0 -2
- package/src/components/Input/__tests__/Input.accessibility.test.tsx +0 -632
- package/src/components/Input/__tests__/Input.unit.test.tsx +0 -1121
- package/src/components/Input/index.ts +0 -9
- package/src/components/Label/Label.tsx +0 -186
- package/src/components/Label/__tests__/Label.accessibility.test.tsx +0 -239
- package/src/components/Label/__tests__/Label.unit.test.tsx +0 -331
- package/src/components/Label/index.ts +0 -2
- package/src/components/LoadingSpinner/LoadingSpinner.tsx +0 -98
- package/src/components/LoadingSpinner/__tests__/LoadingSpinner.accessibility.test.tsx +0 -116
- package/src/components/LoadingSpinner/__tests__/LoadingSpinner.unit.test.tsx +0 -144
- package/src/components/LoadingSpinner/index.ts +0 -3
- package/src/components/LoginForm/LoginForm.tsx +0 -273
- package/src/components/LoginForm/__tests__/LoginForm.accessibility.test.tsx +0 -201
- package/src/components/LoginForm/__tests__/LoginForm.unit.test.tsx +0 -119
- package/src/components/LoginForm/index.ts +0 -3
- package/src/components/NavigationMenu/NavigationMenu.tsx +0 -698
- package/src/components/NavigationMenu/__tests__/NavigationMenu.accessibility.test.tsx +0 -378
- package/src/components/NavigationMenu/__tests__/NavigationMenu.enhanced.test.tsx +0 -768
- package/src/components/NavigationMenu/__tests__/NavigationMenu.integration.test.tsx +0 -576
- package/src/components/NavigationMenu/__tests__/NavigationMenu.performance.test.tsx +0 -585
- package/src/components/NavigationMenu/__tests__/NavigationMenu.real.component.test.tsx +0 -783
- package/src/components/NavigationMenu/__tests__/NavigationMenu.security.enhanced.test.tsx +0 -810
- package/src/components/NavigationMenu/__tests__/NavigationMenu.security.test.tsx +0 -494
- package/src/components/NavigationMenu/__tests__/NavigationMenu.unit.test.tsx +0 -331
- package/src/components/NavigationMenu/__tests__/NavigationMenu.userWorkflows.test.tsx +0 -347
- package/src/components/NavigationMenu/__tests__/NavigationMenu.workflows.test.tsx +0 -584
- package/src/components/NavigationMenu/index.ts +0 -10
- package/src/components/NavigationMenu/types.ts +0 -85
- package/src/components/OrganisationSelector/OrganisationSelector.tsx +0 -304
- package/src/components/OrganisationSelector/__tests__/OrganisationSelector.unit.test.tsx +0 -664
- package/src/components/OrganisationSelector/index.ts +0 -9
- package/src/components/PaceAppLayout/PaceAppLayout.tsx +0 -699
- package/src/components/PaceAppLayout/README.md +0 -278
- package/src/components/PaceAppLayout/__tests__/PaceAppLayout.accessibility.test.tsx +0 -288
- package/src/components/PaceAppLayout/__tests__/PaceAppLayout.integration.test.tsx +0 -893
- package/src/components/PaceAppLayout/__tests__/PaceAppLayout.performance.test.tsx +0 -629
- package/src/components/PaceAppLayout/__tests__/PaceAppLayout.security.test.tsx +0 -782
- package/src/components/PaceAppLayout/__tests__/PaceAppLayout.unit.test.tsx +0 -904
- package/src/components/PaceAppLayout/index.ts +0 -1
- package/src/components/PaceLoginPage/PaceLoginPage.tsx +0 -221
- package/src/components/PaceLoginPage/__tests__/PaceLoginPage.accessibility.test.tsx +0 -463
- package/src/components/PaceLoginPage/__tests__/PaceLoginPage.integration.test.tsx +0 -586
- package/src/components/PaceLoginPage/__tests__/PaceLoginPage.unit.test.tsx +0 -533
- package/src/components/PaceLoginPage/index.ts +0 -1
- package/src/components/PasswordReset/PasswordChangeForm.tsx +0 -186
- package/src/components/PasswordReset/PasswordResetForm.tsx +0 -201
- package/src/components/PasswordReset/__tests__/PasswordChangeForm.accessibility.test.tsx +0 -408
- package/src/components/PasswordReset/__tests__/PasswordChangeForm.unit.test.tsx +0 -561
- package/src/components/PasswordReset/__tests__/PasswordReset.integration.test.tsx +0 -304
- package/src/components/PasswordReset/__tests__/PasswordResetForm.accessibility.test.tsx +0 -20
- package/src/components/PasswordReset/__tests__/PasswordResetForm.unit.test.tsx +0 -523
- package/src/components/PasswordReset/__tests__/__mocks__/UnifiedAuthProvider.ts +0 -29
- package/src/components/PasswordReset/index.ts +0 -4
- package/src/components/Print/__tests__/Print.comprehensive.test.tsx +0 -331
- package/src/components/PrintButton/PrintButton.tsx +0 -321
- package/src/components/PrintButton/PrintButtonGroup.tsx +0 -84
- package/src/components/PrintButton/PrintToolbar.tsx +0 -94
- package/src/components/PrintButton/__tests__/PrintButton.unit.test.tsx +0 -429
- package/src/components/PrintButton/__tests__/PrintButtonGroup.unit.test.tsx +0 -277
- package/src/components/PrintButton/__tests__/PrintToolbar.unit.test.tsx +0 -264
- package/src/components/PrintButton/examples/PrintButtonShowcase.tsx +0 -438
- package/src/components/PrintButton/index.ts +0 -33
- package/src/components/PrintButton/types.ts +0 -173
- package/src/components/PrintCard/PrintCard.tsx +0 -154
- package/src/components/PrintCard/PrintCardContent.tsx +0 -57
- package/src/components/PrintCard/PrintCardFooter.tsx +0 -60
- package/src/components/PrintCard/PrintCardGrid.tsx +0 -91
- package/src/components/PrintCard/PrintCardHeader.tsx +0 -78
- package/src/components/PrintCard/PrintCardImage.tsx +0 -81
- package/src/components/PrintCard/__tests__/PrintCard.unit.test.tsx +0 -233
- package/src/components/PrintCard/__tests__/PrintCardContent.test.tsx +0 -284
- package/src/components/PrintCard/__tests__/PrintCardGrid.unit.test.tsx +0 -214
- package/src/components/PrintCard/__tests__/PrintCardImage.unit.test.tsx +0 -264
- package/src/components/PrintCard/examples/PrintCardShowcase.tsx +0 -239
- package/src/components/PrintCard/index.ts +0 -34
- package/src/components/PrintCard/types.ts +0 -171
- package/src/components/PrintDataTable/PrintDataTable.tsx +0 -215
- package/src/components/PrintDataTable/PrintTableGroup.tsx +0 -90
- package/src/components/PrintDataTable/PrintTableRow.tsx +0 -76
- package/src/components/PrintDataTable/__tests__/PrintDataTable.unit.test.tsx +0 -361
- package/src/components/PrintDataTable/__tests__/PrintTableGroup.unit.test.tsx +0 -314
- package/src/components/PrintDataTable/__tests__/PrintTableRow.unit.test.tsx +0 -362
- package/src/components/PrintDataTable/index.ts +0 -25
- package/src/components/PrintDataTable/types.ts +0 -67
- package/src/components/PrintFooter/PrintFooter.tsx +0 -183
- package/src/components/PrintFooter/PrintFooterContent.tsx +0 -71
- package/src/components/PrintFooter/PrintFooterInfo.tsx +0 -86
- package/src/components/PrintFooter/PrintPageNumber.tsx +0 -90
- package/src/components/PrintFooter/__tests__/PrintFooter.unit.test.tsx +0 -500
- package/src/components/PrintFooter/__tests__/PrintFooterContent.unit.test.tsx +0 -321
- package/src/components/PrintFooter/__tests__/PrintFooterInfo.unit.test.tsx +0 -335
- package/src/components/PrintFooter/__tests__/PrintPageNumber.unit.test.tsx +0 -340
- package/src/components/PrintFooter/examples/PrintFooterShowcase.tsx +0 -390
- package/src/components/PrintFooter/index.ts +0 -30
- package/src/components/PrintFooter/types.ts +0 -149
- package/src/components/PrintGrid/PrintGrid.tsx +0 -180
- package/src/components/PrintGrid/PrintGridBreakpoint.tsx +0 -109
- package/src/components/PrintGrid/PrintGridContainer.tsx +0 -128
- package/src/components/PrintGrid/PrintGridItem.tsx +0 -220
- package/src/components/PrintGrid/__tests__/PrintGrid.unit.test.tsx +0 -340
- package/src/components/PrintGrid/__tests__/PrintGridBreakpoint.unit.test.tsx +0 -261
- package/src/components/PrintGrid/__tests__/PrintGridContainer.unit.test.tsx +0 -338
- package/src/components/PrintGrid/__tests__/PrintGridItem.unit.test.tsx +0 -338
- package/src/components/PrintGrid/examples/PrintGridShowcase.tsx +0 -359
- package/src/components/PrintGrid/index.ts +0 -31
- package/src/components/PrintGrid/types.ts +0 -159
- package/src/components/PrintHeader/PrintCoverHeader.tsx +0 -230
- package/src/components/PrintHeader/PrintHeader.tsx +0 -150
- package/src/components/PrintHeader/__tests__/PrintCoverHeader.unit.test.tsx +0 -309
- package/src/components/PrintHeader/__tests__/PrintHeader.unit.test.tsx +0 -202
- package/src/components/PrintHeader/index.ts +0 -17
- package/src/components/PrintHeader/types.ts +0 -42
- package/src/components/PrintLayout/PrintLayout.tsx +0 -122
- package/src/components/PrintLayout/PrintLayoutContext.tsx +0 -66
- package/src/components/PrintLayout/PrintPageBreak.tsx +0 -52
- package/src/components/PrintLayout/__tests__/PrintLayout.unit.test.tsx +0 -238
- package/src/components/PrintLayout/examples/PrintShowcase.tsx +0 -230
- package/src/components/PrintLayout/index.ts +0 -19
- package/src/components/PrintLayout/types.ts +0 -37
- package/src/components/PrintPageBreak/PrintPageBreak.tsx +0 -120
- package/src/components/PrintPageBreak/PrintPageBreakGroup.tsx +0 -90
- package/src/components/PrintPageBreak/PrintPageBreakIndicator.tsx +0 -112
- package/src/components/PrintPageBreak/__tests__/PrintPageBreak.unit.test.tsx +0 -263
- package/src/components/PrintPageBreak/__tests__/PrintPageBreakGroup.unit.test.tsx +0 -239
- package/src/components/PrintPageBreak/__tests__/PrintPageBreakIndicator.unit.test.tsx +0 -235
- package/src/components/PrintPageBreak/examples/PrintPageBreakShowcase.tsx +0 -279
- package/src/components/PrintPageBreak/index.ts +0 -23
- package/src/components/PrintPageBreak/types.ts +0 -94
- package/src/components/PrintSection/PrintColumn.tsx +0 -104
- package/src/components/PrintSection/PrintDivider.tsx +0 -101
- package/src/components/PrintSection/PrintSection.tsx +0 -129
- package/src/components/PrintSection/PrintSectionContent.tsx +0 -75
- package/src/components/PrintSection/PrintSectionHeader.tsx +0 -97
- package/src/components/PrintSection/__tests__/PrintColumn.unit.test.tsx +0 -385
- package/src/components/PrintSection/__tests__/PrintDivider.unit.test.tsx +0 -373
- package/src/components/PrintSection/__tests__/PrintSection.unit.test.tsx +0 -390
- package/src/components/PrintSection/__tests__/PrintSectionContent.unit.test.tsx +0 -321
- package/src/components/PrintSection/__tests__/PrintSectionHeader.unit.test.tsx +0 -334
- package/src/components/PrintSection/examples/PrintSectionShowcase.tsx +0 -258
- package/src/components/PrintSection/index.ts +0 -33
- package/src/components/PrintSection/types.ts +0 -155
- package/src/components/PrintText/PrintText.tsx +0 -116
- package/src/components/PrintText/__tests__/PrintText.unit.test.tsx +0 -351
- package/src/components/PrintText/index.ts +0 -16
- package/src/components/PrintText/types.ts +0 -24
- package/src/components/Progress/Progress.tsx +0 -116
- package/src/components/Progress/__tests__/Progress.accessibility.test.tsx +0 -240
- package/src/components/Progress/__tests__/Progress.unit.test.tsx +0 -242
- package/src/components/Progress/index.ts +0 -3
- package/src/components/PublicLayout/EventLogo.tsx +0 -287
- package/src/components/PublicLayout/PublicErrorBoundary.tsx +0 -279
- package/src/components/PublicLayout/PublicLoadingSpinner.tsx +0 -208
- package/src/components/PublicLayout/PublicPageContextChecker.tsx +0 -130
- package/src/components/PublicLayout/PublicPageDebugger.tsx +0 -104
- package/src/components/PublicLayout/PublicPageDiagnostic.tsx +0 -162
- package/src/components/PublicLayout/PublicPageFooter.tsx +0 -124
- package/src/components/PublicLayout/PublicPageHeader.tsx +0 -178
- package/src/components/PublicLayout/PublicPageLayout.tsx +0 -232
- package/src/components/PublicLayout/PublicPageProvider.tsx +0 -137
- package/src/components/PublicLayout/__tests__/EventLogo.test.tsx +0 -761
- package/src/components/PublicLayout/__tests__/PublicErrorBoundary.simplified.test.tsx +0 -228
- package/src/components/PublicLayout/__tests__/PublicErrorBoundary.test.tsx +0 -228
- package/src/components/PublicLayout/__tests__/PublicLoadingSpinner.test.tsx +0 -459
- package/src/components/PublicLayout/__tests__/PublicPageFooter.test.tsx +0 -362
- package/src/components/PublicLayout/__tests__/PublicPageHeader.test.tsx +0 -522
- package/src/components/PublicLayout/__tests__/PublicPageLayout.test.tsx +0 -599
- package/src/components/PublicLayout/__tests__/PublicPageProvider.test.tsx +0 -513
- package/src/components/PublicLayout/index.ts +0 -51
- package/src/components/RBAC/PagePermissionGuard.tsx +0 -287
- package/src/components/RBAC/RBACGuard.tsx +0 -143
- package/src/components/RBAC/RBACProvider.tsx +0 -186
- package/src/components/RBAC/RoleBasedContent.tsx +0 -129
- package/src/components/RBAC/__tests__/PagePermissionGuard.unit.test.tsx +0 -683
- package/src/components/RBAC/__tests__/RBAC.integration.test.tsx +0 -573
- package/src/components/RBAC/__tests__/RBACGuard.unit.test.tsx +0 -467
- package/src/components/RBAC/__tests__/RBACProvider.accessibility.test.tsx +0 -475
- package/src/components/RBAC/__tests__/RBACProvider.advanced.test.tsx +0 -569
- package/src/components/RBAC/__tests__/RBACProvider.integration.test.tsx +0 -352
- package/src/components/RBAC/__tests__/RBACProvider.unit.test.tsx +0 -128
- package/src/components/RBAC/__tests__/RoleBasedContent.unit.test.tsx +0 -657
- package/src/components/RBAC/index.ts +0 -23
- package/src/components/Select/Select.tsx +0 -660
- package/src/components/Select/__tests__/SearchableSelect.unit.test.tsx +0 -437
- package/src/components/Select/__tests__/Select.accessibility.test.tsx +0 -1202
- package/src/components/Select/__tests__/Select.actual.test.tsx +0 -774
- package/src/components/Select/__tests__/Select.comprehensive.test.tsx +0 -837
- package/src/components/Select/__tests__/Select.enhanced.test.tsx +0 -1101
- package/src/components/Select/__tests__/Select.integration.test.tsx +0 -772
- package/src/components/Select/__tests__/Select.performance.test.tsx +0 -695
- package/src/components/Select/__tests__/Select.real-world.test.tsx +0 -1046
- package/src/components/Select/__tests__/Select.search-algorithms.test.tsx +0 -968
- package/src/components/Select/__tests__/Select.unit.test.tsx +0 -647
- package/src/components/Select/__tests__/Select.utils.test.tsx +0 -890
- package/src/components/Select/index.ts +0 -1
- package/src/components/SuperAdminGuard.tsx +0 -116
- package/src/components/Table/Table.tsx +0 -222
- package/src/components/Table/__tests__/Table.accessibility.test.tsx +0 -233
- package/src/components/Table/__tests__/Table.unit.test.tsx +0 -235
- package/src/components/Table/index.ts +0 -11
- package/src/components/Toast/Toast.tsx +0 -339
- package/src/components/Toast/__tests__/Toast.accessibility.test.tsx +0 -238
- package/src/components/Toast/__tests__/Toast.integration.test.tsx +0 -699
- package/src/components/Toast/__tests__/Toast.unit.test.tsx +0 -750
- package/src/components/Toast/index.ts +0 -14
- package/src/components/Tooltip/Tooltip.tsx +0 -167
- package/src/components/Tooltip/__tests__/Tooltip.accessibility.test.tsx +0 -121
- package/src/components/Tooltip/__tests__/Tooltip.unit.test.tsx +0 -185
- package/src/components/Tooltip/index.ts +0 -7
- package/src/components/UserMenu/UserMenu.tsx +0 -243
- package/src/components/UserMenu/__tests__/UserMenu.accessibility.test.tsx +0 -139
- package/src/components/UserMenu/__tests__/UserMenu.integration.test.tsx +0 -188
- package/src/components/UserMenu/__tests__/UserMenu.unit.test.tsx +0 -458
- package/src/components/UserMenu/index.ts +0 -3
- package/src/components/__tests__/EdgeCaseTesting.enhanced.test.tsx +0 -524
- package/src/components/__tests__/ErrorTesting.enhanced.test.tsx +0 -455
- package/src/components/__tests__/SuperAdminGuard.test.tsx +0 -456
- package/src/components/__tests__/SuperAdminGuard.unit.test.tsx +0 -456
- package/src/components/examples/PermissionExample.tsx +0 -150
- package/src/components/examples/__tests__/PermissionExample.unit.test.tsx +0 -360
- package/src/components/index.ts +0 -434
- package/src/components.ts +0 -19
- package/src/constants/performance.ts +0 -14
- package/src/examples/CorrectPublicPageImplementation.tsx +0 -301
- package/src/examples/PublicEventPage.tsx +0 -274
- package/src/examples/PublicPageApp.tsx +0 -308
- package/src/examples/PublicPageUsageExample.tsx +0 -216
- package/src/hooks/__tests__/hooks.integration.test.tsx +0 -575
- package/src/hooks/__tests__/useApiFetch.unit.test.ts +0 -115
- package/src/hooks/__tests__/useComponentPerformance.unit.test.tsx +0 -133
- package/src/hooks/__tests__/useDebounce.unit.test.ts +0 -82
- package/src/hooks/__tests__/useFocusTrap.unit.test.tsx +0 -293
- package/src/hooks/__tests__/useInactivityTracker.unit.test.ts +0 -385
- package/src/hooks/__tests__/useOrganisationPermissions.unit.test.tsx +0 -286
- package/src/hooks/__tests__/useOrganisationSecurity.unit.test.tsx +0 -838
- package/src/hooks/__tests__/usePermissionCache.unit.test.ts +0 -627
- package/src/hooks/__tests__/useRBAC.unit.test.ts +0 -911
- package/src/hooks/__tests__/useSecureDataAccess.unit.test.tsx +0 -537
- package/src/hooks/__tests__/useToast.unit.test.tsx +0 -62
- package/src/hooks/__tests__/useZodForm.unit.test.tsx +0 -37
- package/src/hooks/index.ts +0 -56
- package/src/hooks/public/__tests__/usePublicEvent.test.tsx +0 -397
- package/src/hooks/public/__tests__/usePublicEventLogo.test.tsx +0 -690
- package/src/hooks/public/__tests__/usePublicRouteParams.test.tsx +0 -449
- package/src/hooks/public/index.ts +0 -34
- package/src/hooks/public/usePublicEvent.ts +0 -261
- package/src/hooks/public/usePublicEventLogo.ts +0 -285
- package/src/hooks/public/usePublicRouteParams.ts +0 -259
- package/src/hooks/useAppConfig.ts +0 -94
- package/src/hooks/useComponentPerformance.ts +0 -39
- package/src/hooks/useDataTablePerformance.ts +0 -387
- package/src/hooks/useDataTableState.ts +0 -110
- package/src/hooks/useDebounce.ts +0 -18
- package/src/hooks/useFocusManagement.ts +0 -161
- package/src/hooks/useFocusTrap.ts +0 -155
- package/src/hooks/useInactivityTracker.ts +0 -372
- package/src/hooks/useIsMobile.ts +0 -42
- package/src/hooks/useKeyboardShortcuts.ts +0 -237
- package/src/hooks/useOrganisationPermissions.ts +0 -208
- package/src/hooks/useOrganisationSecurity.ts +0 -262
- package/src/hooks/usePerformanceMonitor.ts +0 -128
- package/src/hooks/usePermissionCache.ts +0 -455
- package/src/hooks/useRBAC.ts +0 -262
- package/src/hooks/useSecureDataAccess.ts +0 -586
- package/src/hooks/useStorage.ts +0 -274
- package/src/hooks/useToast.ts +0 -242
- package/src/hooks/useZodForm.ts +0 -28
- package/src/index.ts +0 -200
- package/src/providers/AuthProvider.tsx +0 -369
- package/src/providers/EventProvider.tsx +0 -324
- package/src/providers/InactivityProvider.tsx +0 -238
- package/src/providers/OrganisationProvider.tsx +0 -588
- package/src/providers/RBACProvider.tsx +0 -634
- package/src/providers/UnifiedAuthProvider.tsx +0 -327
- package/src/providers/__tests__/EventProvider.unit.test.tsx +0 -768
- package/src/providers/__tests__/OrganisationProvider.basic.test.tsx +0 -116
- package/src/providers/__tests__/OrganisationProvider.unit.test.tsx +0 -1312
- package/src/providers/__tests__/UnifiedAuthProvider.inactivity.test.tsx +0 -601
- package/src/providers/__tests__/UnifiedAuthProvider.unit.test.tsx +0 -683
- package/src/providers/__tests__/index.unit.test.ts +0 -78
- package/src/providers/index.ts +0 -15
- package/src/rbac/README.md +0 -885
- package/src/rbac/__tests__/PagePermissionGuard.test.tsx +0 -673
- package/src/rbac/__tests__/README.md +0 -170
- package/src/rbac/__tests__/RoleBasedRouter.test.tsx +0 -709
- package/src/rbac/__tests__/TestContext.tsx +0 -72
- package/src/rbac/__tests__/__mocks__/cache.ts +0 -144
- package/src/rbac/__tests__/__mocks__/supabase.ts +0 -152
- package/src/rbac/__tests__/adapters-hooks-comprehensive.test.tsx +0 -782
- package/src/rbac/__tests__/adapters-hooks.test.tsx +0 -561
- package/src/rbac/__tests__/adapters.comprehensive.test.tsx +0 -963
- package/src/rbac/__tests__/adapters.test.tsx +0 -444
- package/src/rbac/__tests__/api.test.ts +0 -620
- package/src/rbac/__tests__/audit-observability-comprehensive.test.ts +0 -792
- package/src/rbac/__tests__/audit-observability.test.ts +0 -549
- package/src/rbac/__tests__/audit.test.ts +0 -616
- package/src/rbac/__tests__/build-contract-compliance-simple.test.ts +0 -230
- package/src/rbac/__tests__/cache-invalidation-comprehensive.test.ts +0 -889
- package/src/rbac/__tests__/cache-invalidation.test.ts +0 -457
- package/src/rbac/__tests__/cache.test.ts +0 -458
- package/src/rbac/__tests__/components-navigation-guard.enhanced.test.tsx +0 -859
- package/src/rbac/__tests__/components-navigation-guard.test.tsx +0 -895
- package/src/rbac/__tests__/components-navigation-provider.test.tsx +0 -692
- package/src/rbac/__tests__/components-page-permission-guard.test.tsx +0 -673
- package/src/rbac/__tests__/components-page-permission-provider.test.tsx +0 -614
- package/src/rbac/__tests__/components-permission-enforcer.enhanced.fixed.test.tsx +0 -836
- package/src/rbac/__tests__/components-permission-enforcer.enhanced.test.tsx +0 -837
- package/src/rbac/__tests__/components-permission-enforcer.test.tsx +0 -825
- package/src/rbac/__tests__/components-role-based-router.test.tsx +0 -709
- package/src/rbac/__tests__/components-secure-data-provider.test.tsx +0 -607
- package/src/rbac/__tests__/config.test.ts +0 -583
- package/src/rbac/__tests__/core-logic-unit.test.ts +0 -190
- package/src/rbac/__tests__/core-permission-logic-comprehensive.test.ts +0 -1467
- package/src/rbac/__tests__/core-permission-logic-fixed.test.ts +0 -151
- package/src/rbac/__tests__/core-permission-logic-simple.test.ts +0 -968
- package/src/rbac/__tests__/core-permission-logic.test.ts +0 -966
- package/src/rbac/__tests__/edge-cases-comprehensive.test.ts +0 -988
- package/src/rbac/__tests__/edge-cases.test.ts +0 -654
- package/src/rbac/__tests__/engine.test.ts +0 -361
- package/src/rbac/__tests__/engine.unit.test.ts +0 -361
- package/src/rbac/__tests__/hooks.enhanced.test.tsx +0 -979
- package/src/rbac/__tests__/hooks.fixed.test.tsx +0 -475
- package/src/rbac/__tests__/hooks.test.tsx +0 -385
- package/src/rbac/__tests__/index.test.ts +0 -269
- package/src/rbac/__tests__/integration.enhanced.test.tsx +0 -824
- package/src/rbac/__tests__/page-permission-guard-super-admin.test.tsx +0 -261
- package/src/rbac/__tests__/performance.enhanced.test.tsx +0 -724
- package/src/rbac/__tests__/permissions.test.ts +0 -383
- package/src/rbac/__tests__/requires-event.test.ts +0 -330
- package/src/rbac/__tests__/scope-isolation-comprehensive.test.ts +0 -1349
- package/src/rbac/__tests__/scope-isolation.test.ts +0 -755
- package/src/rbac/__tests__/secure-client-rls-comprehensive.test.ts +0 -592
- package/src/rbac/__tests__/secure-client-rls.test.ts +0 -377
- package/src/rbac/__tests__/security.test.ts +0 -296
- package/src/rbac/__tests__/setup.ts +0 -228
- package/src/rbac/__tests__/test-utils-enhanced.tsx +0 -400
- package/src/rbac/__tests__/types.test.ts +0 -685
- package/src/rbac/adapters.tsx +0 -726
- package/src/rbac/api.ts +0 -339
- package/src/rbac/audit-enhanced.ts +0 -339
- package/src/rbac/audit.ts +0 -338
- package/src/rbac/cache.ts +0 -215
- package/src/rbac/components/EnhancedNavigationMenu.tsx +0 -294
- package/src/rbac/components/NavigationGuard.tsx +0 -294
- package/src/rbac/components/NavigationProvider.tsx +0 -314
- package/src/rbac/components/PagePermissionGuard.tsx +0 -430
- package/src/rbac/components/PagePermissionProvider.tsx +0 -274
- package/src/rbac/components/PermissionEnforcer.tsx +0 -307
- package/src/rbac/components/RoleBasedRouter.tsx +0 -425
- package/src/rbac/components/SecureDataProvider.tsx +0 -319
- package/src/rbac/components/__tests__/EnhancedNavigationMenu.test.tsx +0 -631
- package/src/rbac/components/__tests__/NavigationProvider.test.tsx +0 -667
- package/src/rbac/components/__tests__/PagePermissionProvider.test.tsx +0 -647
- package/src/rbac/components/__tests__/SecureDataProvider.test.tsx +0 -496
- package/src/rbac/components/index.ts +0 -64
- package/src/rbac/config.ts +0 -133
- package/src/rbac/docs/event-based-apps.md +0 -285
- package/src/rbac/engine.ts +0 -1026
- package/src/rbac/eslint-rules.js +0 -285
- package/src/rbac/examples/CompleteRBACExample.tsx +0 -323
- package/src/rbac/examples/EventBasedApp.tsx +0 -238
- package/src/rbac/hooks.ts +0 -570
- package/src/rbac/index.ts +0 -114
- package/src/rbac/permissions.ts +0 -293
- package/src/rbac/secureClient.ts +0 -244
- package/src/rbac/security.ts +0 -346
- package/src/rbac/testing/__tests__/index.test.tsx +0 -342
- package/src/rbac/testing/index.tsx +0 -340
- package/src/rbac/types.ts +0 -343
- package/src/rbac/utils/__tests__/eventContext.test.ts +0 -428
- package/src/rbac/utils/__tests__/eventContext.unit.test.ts +0 -428
- package/src/rbac/utils/eventContext.ts +0 -83
- package/src/styles/__tests__/styles.unit.test.ts +0 -164
- package/src/styles/core.css +0 -422
- package/src/styles/index.ts +0 -51
- package/src/test-dom-cleanup.test.tsx +0 -38
- package/src/theming/__tests__/README.md +0 -335
- package/src/theming/__tests__/runtime.accessibility.test.ts +0 -474
- package/src/theming/__tests__/runtime.error.test.ts +0 -616
- package/src/theming/__tests__/runtime.integration.test.ts +0 -376
- package/src/theming/__tests__/runtime.performance.test.ts +0 -411
- package/src/theming/__tests__/runtime.unit.test.ts +0 -470
- package/src/theming/runtime.ts +0 -187
- package/src/types/__tests__/database.unit.test.ts +0 -489
- package/src/types/__tests__/guards.unit.test.ts +0 -146
- package/src/types/__tests__/index.unit.test.ts +0 -77
- package/src/types/__tests__/organisation.unit.test.ts +0 -713
- package/src/types/__tests__/rbac.unit.test.ts +0 -621
- package/src/types/__tests__/security.unit.test.ts +0 -347
- package/src/types/__tests__/supabase.unit.test.ts +0 -658
- package/src/types/__tests__/theme.unit.test.ts +0 -218
- package/src/types/__tests__/unified.unit.test.ts +0 -537
- package/src/types/__tests__/validation.unit.test.ts +0 -616
- package/src/types/database.ts +0 -472
- package/src/types/guards.ts +0 -30
- package/src/types/index.ts +0 -25
- package/src/types/organisation.ts +0 -184
- package/src/types/security.ts +0 -70
- package/src/types/supabase.ts +0 -166
- package/src/types/theme.ts +0 -6
- package/src/types/unified.ts +0 -262
- package/src/types/validation.ts +0 -164
- package/src/types/vitest-globals.d.ts +0 -43
- package/src/utils/__mocks__/supabaseMock.ts +0 -75
- package/src/utils/__mocks__/supabaseMock.tsx +0 -198
- package/src/utils/__tests__/appConfig.unit.test.ts +0 -55
- package/src/utils/__tests__/appNameResolver.unit.test.ts +0 -137
- package/src/utils/__tests__/audit.unit.test.ts +0 -69
- package/src/utils/__tests__/auth-utils.unit.test.ts +0 -70
- package/src/utils/__tests__/bundleAnalysis.unit.test.ts +0 -317
- package/src/utils/__tests__/cn.unit.test.ts +0 -34
- package/src/utils/__tests__/deviceFingerprint.unit.test.ts +0 -480
- package/src/utils/__tests__/dynamicUtils.unit.test.ts +0 -322
- package/src/utils/__tests__/formatDate.unit.test.ts +0 -109
- package/src/utils/__tests__/formatting.unit.test.ts +0 -66
- package/src/utils/__tests__/index.unit.test.ts +0 -251
- package/src/utils/__tests__/lazyLoad.unit.test.tsx +0 -304
- package/src/utils/__tests__/organisationContext.unit.test.ts +0 -192
- package/src/utils/__tests__/performanceBudgets.unit.test.ts +0 -259
- package/src/utils/__tests__/permissionTypes.unit.test.ts +0 -250
- package/src/utils/__tests__/permissionUtils.unit.test.ts +0 -362
- package/src/utils/__tests__/sanitization.unit.test.ts +0 -346
- package/src/utils/__tests__/schemaUtils.unit.test.ts +0 -441
- package/src/utils/__tests__/secureDataAccess.unit.test.ts +0 -334
- package/src/utils/__tests__/secureErrors.unit.test.ts +0 -377
- package/src/utils/__tests__/secureStorage.unit.test.ts +0 -293
- package/src/utils/__tests__/security.unit.test.ts +0 -127
- package/src/utils/__tests__/securityMonitor.unit.test.ts +0 -280
- package/src/utils/__tests__/sessionTracking.unit.test.ts +0 -370
- package/src/utils/__tests__/validation.unit.test.ts +0 -84
- package/src/utils/__tests__/validationUtils.unit.test.ts +0 -571
- package/src/utils/appConfig.ts +0 -47
- package/src/utils/appIdResolver.ts +0 -130
- package/src/utils/appNameResolver.ts +0 -190
- package/src/utils/audit.ts +0 -127
- package/src/utils/auth-utils.ts +0 -96
- package/src/utils/bundleAnalysis.ts +0 -129
- package/src/utils/cn.ts +0 -7
- package/src/utils/debugLogger.ts +0 -46
- package/src/utils/deviceFingerprint.ts +0 -215
- package/src/utils/dynamicUtils.ts +0 -105
- package/src/utils/formatting.ts +0 -77
- package/src/utils/index.ts +0 -145
- package/src/utils/lazyLoad.tsx +0 -44
- package/src/utils/organisationContext.ts +0 -135
- package/src/utils/performanceBenchmark.ts +0 -64
- package/src/utils/performanceBudgets.ts +0 -111
- package/src/utils/permissionTypes.ts +0 -37
- package/src/utils/permissionUtils.ts +0 -31
- package/src/utils/print/PrintDataProcessor.ts +0 -390
- package/src/utils/print/__tests__/PrintDataProcessor.unit.test.ts +0 -219
- package/src/utils/print/__tests__/usePrintOptimization.unit.test.tsx +0 -353
- package/src/utils/print/examples/PrintUtilitiesShowcase.tsx +0 -397
- package/src/utils/print/index.ts +0 -29
- package/src/utils/print/types.ts +0 -196
- package/src/utils/print/usePrintOptimization.ts +0 -272
- package/src/utils/sanitization.ts +0 -264
- package/src/utils/schemaUtils.ts +0 -37
- package/src/utils/secureDataAccess.ts +0 -361
- package/src/utils/secureErrors.ts +0 -79
- package/src/utils/secureStorage.ts +0 -244
- package/src/utils/security.ts +0 -156
- package/src/utils/securityMonitor.ts +0 -45
- package/src/utils/sessionTracking.ts +0 -170
- package/src/utils/storage/README.md +0 -348
- package/src/utils/storage/__tests__/config.unit.test.ts +0 -206
- package/src/utils/storage/__tests__/helpers.unit.test.ts +0 -648
- package/src/utils/storage/__tests__/index.unit.test.ts +0 -167
- package/src/utils/storage/__tests__/types.unit.test.ts +0 -441
- package/src/utils/storage/config.ts +0 -100
- package/src/utils/storage/helpers.ts +0 -359
- package/src/utils/storage/index.ts +0 -36
- package/src/utils/storage/types.ts +0 -90
- package/src/utils/validation.ts +0 -111
- package/src/utils/validationUtils.ts +0 -120
- package/src/validation/__tests__/common.unit.test.ts +0 -101
- package/src/validation/__tests__/csrf.unit.test.ts +0 -302
- package/src/validation/__tests__/passwordSchema.unit.test.ts +0 -98
- package/src/validation/__tests__/sqlInjectionProtection.unit.test.ts +0 -466
- package/src/validation/common.ts +0 -53
- package/src/validation/csrf.ts +0 -214
- package/src/validation/index.ts +0 -43
- package/src/validation/passwordSchema.ts +0 -125
- package/src/validation/sanitization.ts +0 -96
- package/src/validation/schemaUtils.ts +0 -42
- package/src/validation/sqlInjectionProtection.ts +0 -242
- package/src/validation/user.ts +0 -34
- package/dist/{DataTable-EEUDXPE5.js.map → DataTable-2LB6HI6V.js.map} +0 -0
- package/dist/{api-ETQ6YJ3C.js.map → api-AIJ3IJX3.js.map} +0 -0
- package/dist/{appNameResolver-7GHF5ED2.js.map → audit-PD5L5ZSC.js.map} +0 -0
- package/dist/{audit-BUW3LMJB.js.map → chunk-DC5AMYBS.js.map} +0 -0
- package/dist/{validation-PM_iOaTI.d.ts → validation-D2-NNCCE.d.ts} +6 -6
package/dist/components.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
+
Alert,
|
|
3
|
+
AlertDescription,
|
|
4
|
+
AlertTitle,
|
|
2
5
|
Avatar,
|
|
3
6
|
AvatarFallback,
|
|
4
7
|
AvatarImage,
|
|
@@ -10,11 +13,7 @@ import {
|
|
|
10
13
|
CardHeader,
|
|
11
14
|
CardTitle,
|
|
12
15
|
ErrorBoundary,
|
|
13
|
-
EventLogo,
|
|
14
|
-
EventLogoCompact,
|
|
15
|
-
EventLogoLarge,
|
|
16
16
|
EventSelector,
|
|
17
|
-
FileUpload,
|
|
18
17
|
Footer,
|
|
19
18
|
Form,
|
|
20
19
|
Header,
|
|
@@ -26,23 +25,6 @@ import {
|
|
|
26
25
|
PaceLoginPage,
|
|
27
26
|
PasswordResetForm,
|
|
28
27
|
Progress,
|
|
29
|
-
PublicLoadingSkeleton,
|
|
30
|
-
PublicLoadingSpinner,
|
|
31
|
-
PublicLoadingSpinnerFullPage,
|
|
32
|
-
PublicPageContextChecker,
|
|
33
|
-
PublicPageDebugger,
|
|
34
|
-
PublicPageDiagnostic,
|
|
35
|
-
PublicPageFooter,
|
|
36
|
-
PublicPageHeader,
|
|
37
|
-
PublicPageLayout,
|
|
38
|
-
Table,
|
|
39
|
-
TableBody,
|
|
40
|
-
TableCaption,
|
|
41
|
-
TableCell,
|
|
42
|
-
TableFooter,
|
|
43
|
-
TableHead,
|
|
44
|
-
TableHeader,
|
|
45
|
-
TableRow,
|
|
46
28
|
Toast,
|
|
47
29
|
ToastAction,
|
|
48
30
|
ToastClose,
|
|
@@ -52,51 +34,12 @@ import {
|
|
|
52
34
|
ToastViewport,
|
|
53
35
|
Toaster,
|
|
54
36
|
UserMenu,
|
|
55
|
-
useFileUpload,
|
|
56
|
-
usePublicPageContext as usePublicPageContext2,
|
|
57
|
-
useStorage,
|
|
58
37
|
useToast
|
|
59
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-YWYCNGWH.js";
|
|
60
39
|
import {
|
|
61
|
-
|
|
62
|
-
AlertDescription,
|
|
63
|
-
AlertTitle,
|
|
40
|
+
Button,
|
|
64
41
|
Checkbox,
|
|
65
42
|
DataTable,
|
|
66
|
-
Input,
|
|
67
|
-
Select,
|
|
68
|
-
SelectContent,
|
|
69
|
-
SelectGroup,
|
|
70
|
-
SelectItem,
|
|
71
|
-
SelectLabel,
|
|
72
|
-
SelectSeparator,
|
|
73
|
-
SelectTrigger,
|
|
74
|
-
SelectValue
|
|
75
|
-
} from "./chunk-EWKPTNPO.js";
|
|
76
|
-
import "./chunk-C5G2A4PO.js";
|
|
77
|
-
import "./chunk-7BNPOCLL.js";
|
|
78
|
-
import {
|
|
79
|
-
init_EventProvider,
|
|
80
|
-
useEvents
|
|
81
|
-
} from "./chunk-HEMJ4SUJ.js";
|
|
82
|
-
import {
|
|
83
|
-
DefaultPublicErrorFallback,
|
|
84
|
-
PublicErrorBoundary,
|
|
85
|
-
PublicPageProvider,
|
|
86
|
-
useErrorBoundary,
|
|
87
|
-
useIsPublicPage,
|
|
88
|
-
usePublicPageContext
|
|
89
|
-
} from "./chunk-VYG4AXYW.js";
|
|
90
|
-
import "./chunk-SS3E6QLB.js";
|
|
91
|
-
import {
|
|
92
|
-
UnifiedAuthProvider,
|
|
93
|
-
init_OrganisationProvider,
|
|
94
|
-
init_UnifiedAuthProvider,
|
|
95
|
-
useOrganisations,
|
|
96
|
-
useUnifiedAuth
|
|
97
|
-
} from "./chunk-BEZRLNK3.js";
|
|
98
|
-
import {
|
|
99
|
-
Button,
|
|
100
43
|
Dialog,
|
|
101
44
|
DialogBody,
|
|
102
45
|
DialogClose,
|
|
@@ -108,33 +51,67 @@ import {
|
|
|
108
51
|
DialogPortal,
|
|
109
52
|
DialogTitle,
|
|
110
53
|
DialogTrigger,
|
|
54
|
+
DropdownMenu,
|
|
55
|
+
DropdownMenuCheckboxItem,
|
|
56
|
+
DropdownMenuContent,
|
|
57
|
+
DropdownMenuGroup,
|
|
58
|
+
DropdownMenuItem,
|
|
59
|
+
DropdownMenuLabel,
|
|
60
|
+
DropdownMenuPortal,
|
|
61
|
+
DropdownMenuRadioGroup,
|
|
62
|
+
DropdownMenuRadioItem,
|
|
63
|
+
DropdownMenuSeparator,
|
|
64
|
+
DropdownMenuShortcut,
|
|
65
|
+
DropdownMenuSub,
|
|
66
|
+
DropdownMenuSubContent,
|
|
67
|
+
DropdownMenuSubTrigger,
|
|
68
|
+
DropdownMenuTrigger,
|
|
69
|
+
Input,
|
|
70
|
+
Select,
|
|
71
|
+
SelectContent,
|
|
72
|
+
SelectGroup,
|
|
73
|
+
SelectItem,
|
|
74
|
+
SelectLabel,
|
|
75
|
+
SelectSeparator,
|
|
76
|
+
SelectTrigger,
|
|
77
|
+
SelectValue,
|
|
78
|
+
Table,
|
|
79
|
+
TableBody,
|
|
80
|
+
TableCaption,
|
|
81
|
+
TableCell,
|
|
82
|
+
TableFooter,
|
|
83
|
+
TableHead,
|
|
84
|
+
TableHeader,
|
|
85
|
+
TableRow,
|
|
111
86
|
Tooltip,
|
|
112
87
|
TooltipContent,
|
|
113
88
|
TooltipProvider,
|
|
114
89
|
TooltipRoot,
|
|
115
|
-
TooltipTrigger
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
90
|
+
TooltipTrigger
|
|
91
|
+
} from "./chunk-4MCJAK7J.js";
|
|
92
|
+
import {
|
|
93
|
+
useEvents
|
|
94
|
+
} from "./chunk-H4PZ4B3Y.js";
|
|
95
|
+
import "./chunk-WHLSWC6W.js";
|
|
120
96
|
import {
|
|
121
97
|
LoadingSpinner
|
|
122
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-4ZTIEYU2.js";
|
|
99
|
+
import {
|
|
100
|
+
cn
|
|
101
|
+
} from "./chunk-U7DY5T33.js";
|
|
123
102
|
import "./chunk-74C6SNEC.js";
|
|
124
|
-
import "./chunk-
|
|
103
|
+
import "./chunk-XI7QFSSC.js";
|
|
104
|
+
import "./chunk-YNU5QJ4S.js";
|
|
125
105
|
import {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
init_Dialog();
|
|
134
|
-
init_Tooltip();
|
|
106
|
+
UnifiedAuthProvider,
|
|
107
|
+
useOrganisations,
|
|
108
|
+
useUnifiedAuth
|
|
109
|
+
} from "./chunk-ZJ3UKPIW.js";
|
|
110
|
+
import "./chunk-XIJMMBDD.js";
|
|
111
|
+
import "./chunk-KK6WIDK6.js";
|
|
112
|
+
import "./chunk-DC5AMYBS.js";
|
|
135
113
|
|
|
136
114
|
// src/components/Form/FormField.tsx
|
|
137
|
-
init_cn();
|
|
138
115
|
import { useFormContext, Controller } from "react-hook-form";
|
|
139
116
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
140
117
|
function FormField({
|
|
@@ -209,7 +186,6 @@ function FormErrorSummary({
|
|
|
209
186
|
}
|
|
210
187
|
|
|
211
188
|
// src/components/Form/FormLiveRegion.tsx
|
|
212
|
-
init_cn();
|
|
213
189
|
import { useEffect, useState } from "react";
|
|
214
190
|
import { Fragment, jsx as jsx3 } from "react/jsx-runtime";
|
|
215
191
|
function FormLiveRegion({
|
|
@@ -293,7 +269,6 @@ function FormLiveRegion({
|
|
|
293
269
|
}
|
|
294
270
|
|
|
295
271
|
// src/components/Form/FormFieldset.tsx
|
|
296
|
-
init_cn();
|
|
297
272
|
import React2 from "react";
|
|
298
273
|
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
299
274
|
var FormFieldset = React2.forwardRef(
|
|
@@ -321,12 +296,9 @@ var FormFieldset = React2.forwardRef(
|
|
|
321
296
|
FormFieldset.displayName = "FormFieldset";
|
|
322
297
|
|
|
323
298
|
// src/hooks/useRBAC.ts
|
|
324
|
-
init_UnifiedAuthProvider();
|
|
325
|
-
init_OrganisationProvider();
|
|
326
|
-
init_EventProvider();
|
|
327
299
|
import { useState as useState2, useEffect as useEffect2, useCallback, useMemo } from "react";
|
|
328
300
|
function useRBAC(pageId) {
|
|
329
|
-
const { user,
|
|
301
|
+
const { user, supabase, appName } = useUnifiedAuth();
|
|
330
302
|
const { selectedOrganisation } = useOrganisations();
|
|
331
303
|
let selectedEvent = null;
|
|
332
304
|
try {
|
|
@@ -342,8 +314,7 @@ function useRBAC(pageId) {
|
|
|
342
314
|
const [isLoading, setIsLoading] = useState2(false);
|
|
343
315
|
const [error, setError] = useState2(null);
|
|
344
316
|
const loadRBACContext = useCallback(async () => {
|
|
345
|
-
if (!user || !
|
|
346
|
-
console.log("[useRBAC] Missing required dependencies, clearing RBAC state");
|
|
317
|
+
if (!user || !supabase || !appName) {
|
|
347
318
|
setGlobalRole(null);
|
|
348
319
|
setOrganisationRole(null);
|
|
349
320
|
setEventAppRole(null);
|
|
@@ -353,15 +324,9 @@ function useRBAC(pageId) {
|
|
|
353
324
|
setIsLoading(true);
|
|
354
325
|
setError(null);
|
|
355
326
|
try {
|
|
356
|
-
const { data: appData, error: appError } = await supabase.from("rbac_apps").select("id").eq("name", appName).eq("is_active", true).single();
|
|
357
|
-
if (appError || !appData) {
|
|
358
|
-
console.warn("App not found or inactive:", appName);
|
|
359
|
-
setIsLoading(false);
|
|
360
|
-
return;
|
|
361
|
-
}
|
|
362
327
|
const { data, error: rpcError } = await supabase.rpc("get_rbac_permissions", {
|
|
363
328
|
p_user_id: user.id,
|
|
364
|
-
|
|
329
|
+
p_app_name: appName,
|
|
365
330
|
p_event_id: selectedEvent?.event_id || null,
|
|
366
331
|
p_organisation_id: selectedOrganisation?.id || null,
|
|
367
332
|
p_page_id: pageId || null
|
|
@@ -387,21 +352,16 @@ function useRBAC(pageId) {
|
|
|
387
352
|
} finally {
|
|
388
353
|
setIsLoading(false);
|
|
389
354
|
}
|
|
390
|
-
}, [user?.id,
|
|
355
|
+
}, [user?.id, supabase, appName, selectedEvent?.event_id, selectedOrganisation?.id, pageId]);
|
|
391
356
|
const hasPermission = useCallback(async (operation, targetPageId) => {
|
|
392
|
-
if (!user || !
|
|
357
|
+
if (!user || !supabase || !appName) return false;
|
|
393
358
|
if (globalRole === "super_admin") {
|
|
394
359
|
return true;
|
|
395
360
|
}
|
|
396
361
|
try {
|
|
397
|
-
const { data: appData, error: appError } = await supabase.from("rbac_apps").select("id").eq("name", appName).eq("is_active", true).single();
|
|
398
|
-
if (appError || !appData) {
|
|
399
|
-
console.warn("App not found or inactive:", appName);
|
|
400
|
-
return false;
|
|
401
|
-
}
|
|
402
362
|
const { data, error: error2 } = await supabase.rpc("check_page_permission", {
|
|
403
363
|
p_user_id: user.id,
|
|
404
|
-
|
|
364
|
+
p_app_name: appName,
|
|
405
365
|
p_page_id: targetPageId || pageId || "default",
|
|
406
366
|
p_operation: operation,
|
|
407
367
|
p_event_id: selectedEvent?.event_id,
|
|
@@ -519,3103 +479,6 @@ function SuperAdminDebugPanel() {
|
|
|
519
479
|
] })
|
|
520
480
|
] });
|
|
521
481
|
}
|
|
522
|
-
|
|
523
|
-
// src/components/PrintLayout/PrintLayout.tsx
|
|
524
|
-
init_cn();
|
|
525
|
-
|
|
526
|
-
// src/components/PrintLayout/PrintLayoutContext.tsx
|
|
527
|
-
import { createContext, useContext, useState as useState3, useEffect as useEffect3 } from "react";
|
|
528
|
-
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
529
|
-
var PrintLayoutContext = createContext(void 0);
|
|
530
|
-
function PrintLayoutProvider({
|
|
531
|
-
children,
|
|
532
|
-
pageSize,
|
|
533
|
-
orientation,
|
|
534
|
-
hasFirstPageHeader,
|
|
535
|
-
hasSubsequentPageHeader
|
|
536
|
-
}) {
|
|
537
|
-
const [isFirstPage, setIsFirstPage] = useState3(true);
|
|
538
|
-
useEffect3(() => {
|
|
539
|
-
const handleResize = () => {
|
|
540
|
-
setIsFirstPage(true);
|
|
541
|
-
};
|
|
542
|
-
window.addEventListener("resize", handleResize);
|
|
543
|
-
return () => window.removeEventListener("resize", handleResize);
|
|
544
|
-
}, []);
|
|
545
|
-
const value = {
|
|
546
|
-
isFirstPage,
|
|
547
|
-
pageSize,
|
|
548
|
-
orientation,
|
|
549
|
-
hasFirstPageHeader,
|
|
550
|
-
hasSubsequentPageHeader
|
|
551
|
-
};
|
|
552
|
-
return /* @__PURE__ */ jsx6(PrintLayoutContext.Provider, { value, children });
|
|
553
|
-
}
|
|
554
|
-
function usePrintLayout() {
|
|
555
|
-
const context = useContext(PrintLayoutContext);
|
|
556
|
-
if (context === void 0) {
|
|
557
|
-
throw new Error("usePrintLayout must be used within a PrintLayoutProvider");
|
|
558
|
-
}
|
|
559
|
-
return context;
|
|
560
|
-
}
|
|
561
|
-
|
|
562
|
-
// src/components/PrintLayout/PrintLayout.tsx
|
|
563
|
-
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
564
|
-
function PrintLayout({
|
|
565
|
-
children,
|
|
566
|
-
orientation = "portrait",
|
|
567
|
-
pageSize = "A4",
|
|
568
|
-
showHeader = true,
|
|
569
|
-
showFooter = true,
|
|
570
|
-
firstPageHeader,
|
|
571
|
-
subsequentPageHeader,
|
|
572
|
-
className,
|
|
573
|
-
...props
|
|
574
|
-
}) {
|
|
575
|
-
const hasFirstPageHeader = Boolean(firstPageHeader);
|
|
576
|
-
const hasSubsequentPageHeader = Boolean(subsequentPageHeader);
|
|
577
|
-
const getPageSizeClass = () => {
|
|
578
|
-
if (pageSize === "A4") {
|
|
579
|
-
return orientation === "landscape" ? "print-a4-landscape" : "print-a4-portrait";
|
|
580
|
-
}
|
|
581
|
-
return "print-a4-portrait";
|
|
582
|
-
};
|
|
583
|
-
const getHeaderClass = () => {
|
|
584
|
-
if (hasFirstPageHeader && hasSubsequentPageHeader) {
|
|
585
|
-
return "print-first-page-header print-subsequent-header";
|
|
586
|
-
}
|
|
587
|
-
if (hasFirstPageHeader) {
|
|
588
|
-
return "print-first-page-header";
|
|
589
|
-
}
|
|
590
|
-
if (hasSubsequentPageHeader) {
|
|
591
|
-
return "print-subsequent-header";
|
|
592
|
-
}
|
|
593
|
-
return "";
|
|
594
|
-
};
|
|
595
|
-
return /* @__PURE__ */ jsx7(
|
|
596
|
-
PrintLayoutProvider,
|
|
597
|
-
{
|
|
598
|
-
pageSize,
|
|
599
|
-
orientation,
|
|
600
|
-
hasFirstPageHeader,
|
|
601
|
-
hasSubsequentPageHeader,
|
|
602
|
-
children: /* @__PURE__ */ jsxs5(
|
|
603
|
-
"div",
|
|
604
|
-
{
|
|
605
|
-
className: cn(
|
|
606
|
-
"print-layout",
|
|
607
|
-
getPageSizeClass(),
|
|
608
|
-
getHeaderClass(),
|
|
609
|
-
className
|
|
610
|
-
),
|
|
611
|
-
...props,
|
|
612
|
-
children: [
|
|
613
|
-
hasFirstPageHeader && /* @__PURE__ */ jsx7("div", { className: "print-first-page-only", children: firstPageHeader }),
|
|
614
|
-
hasSubsequentPageHeader && /* @__PURE__ */ jsx7("div", { className: "print-subsequent-pages-only", children: subsequentPageHeader }),
|
|
615
|
-
/* @__PURE__ */ jsx7("div", { className: "print-text", children })
|
|
616
|
-
]
|
|
617
|
-
}
|
|
618
|
-
)
|
|
619
|
-
}
|
|
620
|
-
);
|
|
621
|
-
}
|
|
622
|
-
|
|
623
|
-
// src/components/PrintHeader/PrintHeader.tsx
|
|
624
|
-
init_cn();
|
|
625
|
-
|
|
626
|
-
// src/components/PrintText/PrintText.tsx
|
|
627
|
-
init_cn();
|
|
628
|
-
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
629
|
-
function PrintText({
|
|
630
|
-
children,
|
|
631
|
-
variant = "body",
|
|
632
|
-
weight = "normal",
|
|
633
|
-
color = "primary",
|
|
634
|
-
printOptimized = true,
|
|
635
|
-
className,
|
|
636
|
-
as: Component = "p",
|
|
637
|
-
...props
|
|
638
|
-
}) {
|
|
639
|
-
const getVariantClasses = (variant2) => {
|
|
640
|
-
const baseClasses = "print-text";
|
|
641
|
-
switch (variant2) {
|
|
642
|
-
case "heading":
|
|
643
|
-
return cn(baseClasses, "text-2xl leading-tight");
|
|
644
|
-
case "subheading":
|
|
645
|
-
return cn(baseClasses, "text-xl leading-snug");
|
|
646
|
-
case "body":
|
|
647
|
-
return cn(baseClasses, "text-base leading-relaxed");
|
|
648
|
-
case "caption":
|
|
649
|
-
return cn(baseClasses, "text-sm leading-normal");
|
|
650
|
-
case "small":
|
|
651
|
-
return cn(baseClasses, "text-xs leading-tight");
|
|
652
|
-
default:
|
|
653
|
-
return baseClasses;
|
|
654
|
-
}
|
|
655
|
-
};
|
|
656
|
-
const getWeightClasses = (weight2) => {
|
|
657
|
-
switch (weight2) {
|
|
658
|
-
case "normal":
|
|
659
|
-
return "font-normal";
|
|
660
|
-
case "medium":
|
|
661
|
-
return "font-medium";
|
|
662
|
-
case "semibold":
|
|
663
|
-
return "font-semibold";
|
|
664
|
-
case "bold":
|
|
665
|
-
return "font-bold";
|
|
666
|
-
default:
|
|
667
|
-
return "font-normal";
|
|
668
|
-
}
|
|
669
|
-
};
|
|
670
|
-
const getColorClasses = (color2) => {
|
|
671
|
-
switch (color2) {
|
|
672
|
-
case "primary":
|
|
673
|
-
return "text-foreground";
|
|
674
|
-
case "secondary":
|
|
675
|
-
return "text-secondary-foreground";
|
|
676
|
-
case "muted":
|
|
677
|
-
return "text-muted-foreground";
|
|
678
|
-
case "accent":
|
|
679
|
-
return "text-accent-foreground";
|
|
680
|
-
default:
|
|
681
|
-
return "text-foreground";
|
|
682
|
-
}
|
|
683
|
-
};
|
|
684
|
-
const getPrintOptimizedClasses = () => {
|
|
685
|
-
if (!printOptimized) return "";
|
|
686
|
-
return cn(
|
|
687
|
-
"print-text",
|
|
688
|
-
// Print-specific font sizing
|
|
689
|
-
"print:text-sm print:leading-tight",
|
|
690
|
-
// High contrast for print
|
|
691
|
-
"print:text-black print:bg-white"
|
|
692
|
-
);
|
|
693
|
-
};
|
|
694
|
-
return /* @__PURE__ */ jsx8(
|
|
695
|
-
Component,
|
|
696
|
-
{
|
|
697
|
-
className: cn(
|
|
698
|
-
getVariantClasses(variant),
|
|
699
|
-
getWeightClasses(weight),
|
|
700
|
-
getColorClasses(color),
|
|
701
|
-
getPrintOptimizedClasses(),
|
|
702
|
-
className
|
|
703
|
-
),
|
|
704
|
-
...props,
|
|
705
|
-
children
|
|
706
|
-
}
|
|
707
|
-
);
|
|
708
|
-
}
|
|
709
|
-
|
|
710
|
-
// src/components/PrintHeader/PrintHeader.tsx
|
|
711
|
-
import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
712
|
-
function PrintHeader({
|
|
713
|
-
title,
|
|
714
|
-
subtitle,
|
|
715
|
-
branding,
|
|
716
|
-
metadata = [],
|
|
717
|
-
printDate = true,
|
|
718
|
-
className
|
|
719
|
-
}) {
|
|
720
|
-
const formatPrintDate = () => {
|
|
721
|
-
return (/* @__PURE__ */ new Date()).toLocaleDateString("en-AU", {
|
|
722
|
-
year: "numeric",
|
|
723
|
-
month: "long",
|
|
724
|
-
day: "numeric"
|
|
725
|
-
});
|
|
726
|
-
};
|
|
727
|
-
const renderBranding = (branding2) => {
|
|
728
|
-
const { logo, companyName, projectName, version, tagline } = branding2;
|
|
729
|
-
return /* @__PURE__ */ jsxs6("div", { className: "flex items-center space-x-4 mb-4", children: [
|
|
730
|
-
logo && /* @__PURE__ */ jsx9(
|
|
731
|
-
"img",
|
|
732
|
-
{
|
|
733
|
-
src: logo,
|
|
734
|
-
alt: companyName || "Company Logo",
|
|
735
|
-
className: "h-8 w-auto print:h-6"
|
|
736
|
-
}
|
|
737
|
-
),
|
|
738
|
-
/* @__PURE__ */ jsxs6("div", { className: "flex-1", children: [
|
|
739
|
-
companyName && /* @__PURE__ */ jsx9(PrintText, { variant: "subheading", weight: "semibold", className: "mb-1", children: companyName }),
|
|
740
|
-
projectName && /* @__PURE__ */ jsx9(PrintText, { variant: "body", color: "muted", className: "mb-1", children: projectName }),
|
|
741
|
-
version && /* @__PURE__ */ jsx9(PrintText, { variant: "small", color: "muted", children: version }),
|
|
742
|
-
tagline && /* @__PURE__ */ jsx9(PrintText, { variant: "small", color: "muted", className: "italic", children: tagline })
|
|
743
|
-
] })
|
|
744
|
-
] });
|
|
745
|
-
};
|
|
746
|
-
const renderMetadata = (metadata2) => {
|
|
747
|
-
if (metadata2.length === 0) return null;
|
|
748
|
-
return /* @__PURE__ */ jsx9("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 mb-4", children: metadata2.map((item, index) => /* @__PURE__ */ jsxs6("div", { className: "flex items-center space-x-2", children: [
|
|
749
|
-
item.icon && /* @__PURE__ */ jsx9(item.icon, { className: "h-4 w-4 text-muted-foreground print:h-3 print:w-3" }),
|
|
750
|
-
/* @__PURE__ */ jsxs6("div", { children: [
|
|
751
|
-
/* @__PURE__ */ jsx9(PrintText, { variant: "small", color: "muted", className: "block", children: item.label }),
|
|
752
|
-
/* @__PURE__ */ jsx9(PrintText, { variant: "body", weight: "medium", className: "block", children: item.value })
|
|
753
|
-
] })
|
|
754
|
-
] }, index)) });
|
|
755
|
-
};
|
|
756
|
-
return /* @__PURE__ */ jsxs6("header", { className: cn("print-header border-b border-border pb-4 mb-6", className), children: [
|
|
757
|
-
branding && renderBranding(branding),
|
|
758
|
-
/* @__PURE__ */ jsxs6("div", { className: "mb-4", children: [
|
|
759
|
-
/* @__PURE__ */ jsx9(PrintText, { variant: "heading", className: "mb-2", children: title }),
|
|
760
|
-
subtitle && /* @__PURE__ */ jsx9(PrintText, { variant: "subheading", color: "muted", children: subtitle })
|
|
761
|
-
] }),
|
|
762
|
-
metadata.length > 0 && renderMetadata(metadata),
|
|
763
|
-
printDate && /* @__PURE__ */ jsx9("div", { className: "flex justify-end", children: /* @__PURE__ */ jsxs6(PrintText, { variant: "small", color: "muted", children: [
|
|
764
|
-
"Printed on ",
|
|
765
|
-
formatPrintDate()
|
|
766
|
-
] }) })
|
|
767
|
-
] });
|
|
768
|
-
}
|
|
769
|
-
|
|
770
|
-
// src/components/PrintHeader/PrintCoverHeader.tsx
|
|
771
|
-
init_cn();
|
|
772
|
-
import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
773
|
-
function PrintCoverHeader({
|
|
774
|
-
title,
|
|
775
|
-
subtitle,
|
|
776
|
-
branding,
|
|
777
|
-
metadata = [],
|
|
778
|
-
printDate = true,
|
|
779
|
-
coverStyle = true,
|
|
780
|
-
logoSize = "medium",
|
|
781
|
-
titleSize = "large",
|
|
782
|
-
showDivider = false,
|
|
783
|
-
backgroundImage,
|
|
784
|
-
backgroundColor,
|
|
785
|
-
className
|
|
786
|
-
}) {
|
|
787
|
-
const formatPrintDate = () => {
|
|
788
|
-
return (/* @__PURE__ */ new Date()).toLocaleDateString("en-AU", {
|
|
789
|
-
year: "numeric",
|
|
790
|
-
month: "long",
|
|
791
|
-
day: "numeric"
|
|
792
|
-
});
|
|
793
|
-
};
|
|
794
|
-
const getLogoSizeClasses = (size) => {
|
|
795
|
-
switch (size) {
|
|
796
|
-
case "small":
|
|
797
|
-
return "h-16 w-auto print:h-12";
|
|
798
|
-
case "medium":
|
|
799
|
-
return "h-24 w-auto print:h-20";
|
|
800
|
-
case "large":
|
|
801
|
-
return "h-32 w-auto print:h-24";
|
|
802
|
-
default:
|
|
803
|
-
return "h-24 w-auto print:h-20";
|
|
804
|
-
}
|
|
805
|
-
};
|
|
806
|
-
const getTitleSizeClasses = (size) => {
|
|
807
|
-
switch (size) {
|
|
808
|
-
case "small":
|
|
809
|
-
return "text-3xl print:text-2xl";
|
|
810
|
-
case "medium":
|
|
811
|
-
return "text-4xl print:text-3xl";
|
|
812
|
-
case "large":
|
|
813
|
-
return "text-5xl print:text-4xl";
|
|
814
|
-
case "xl":
|
|
815
|
-
return "text-6xl print:text-5xl";
|
|
816
|
-
default:
|
|
817
|
-
return "text-4xl print:text-3xl";
|
|
818
|
-
}
|
|
819
|
-
};
|
|
820
|
-
const getBackgroundStyle = () => {
|
|
821
|
-
const style = {};
|
|
822
|
-
if (backgroundImage) {
|
|
823
|
-
style.backgroundImage = `url(${backgroundImage})`;
|
|
824
|
-
style.backgroundSize = "cover";
|
|
825
|
-
style.backgroundPosition = "center";
|
|
826
|
-
style.backgroundRepeat = "no-repeat";
|
|
827
|
-
}
|
|
828
|
-
if (backgroundColor) {
|
|
829
|
-
style.backgroundColor = backgroundColor;
|
|
830
|
-
}
|
|
831
|
-
return style;
|
|
832
|
-
};
|
|
833
|
-
const renderBranding = () => {
|
|
834
|
-
if (!branding) return null;
|
|
835
|
-
const { logo, companyName, projectName, version, tagline } = branding;
|
|
836
|
-
return /* @__PURE__ */ jsxs7("div", { className: "flex flex-col items-center text-center mb-8", children: [
|
|
837
|
-
logo && /* @__PURE__ */ jsx10(
|
|
838
|
-
"img",
|
|
839
|
-
{
|
|
840
|
-
src: logo,
|
|
841
|
-
alt: companyName || "Company Logo",
|
|
842
|
-
className: cn(
|
|
843
|
-
getLogoSizeClasses(logoSize),
|
|
844
|
-
"mb-4"
|
|
845
|
-
)
|
|
846
|
-
}
|
|
847
|
-
),
|
|
848
|
-
companyName && /* @__PURE__ */ jsx10(PrintText, { variant: "subheading", weight: "semibold", className: "mb-2", children: companyName }),
|
|
849
|
-
projectName && /* @__PURE__ */ jsx10(PrintText, { variant: "body", color: "muted", className: "mb-2", children: projectName }),
|
|
850
|
-
version && /* @__PURE__ */ jsx10(PrintText, { variant: "small", color: "muted", className: "mb-2", children: version }),
|
|
851
|
-
tagline && /* @__PURE__ */ jsx10(PrintText, { variant: "small", color: "muted", className: "italic", children: tagline })
|
|
852
|
-
] });
|
|
853
|
-
};
|
|
854
|
-
const renderMetadata = () => {
|
|
855
|
-
if (metadata.length === 0) return null;
|
|
856
|
-
return /* @__PURE__ */ jsx10("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-6 mb-8", children: metadata.map((item, index) => /* @__PURE__ */ jsxs7("div", { className: "flex items-center space-x-3", children: [
|
|
857
|
-
item.icon && /* @__PURE__ */ jsx10(item.icon, { className: "h-5 w-5 text-muted-foreground print:h-4 print:w-4" }),
|
|
858
|
-
/* @__PURE__ */ jsxs7("div", { children: [
|
|
859
|
-
/* @__PURE__ */ jsx10(PrintText, { variant: "small", color: "muted", className: "block", children: item.label }),
|
|
860
|
-
/* @__PURE__ */ jsx10(PrintText, { variant: "body", weight: "medium", className: "block", children: item.value })
|
|
861
|
-
] })
|
|
862
|
-
] }, index)) });
|
|
863
|
-
};
|
|
864
|
-
return /* @__PURE__ */ jsxs7(
|
|
865
|
-
"header",
|
|
866
|
-
{
|
|
867
|
-
className: cn(
|
|
868
|
-
"print-cover-header min-h-[400px] flex flex-col justify-center px-8 py-12",
|
|
869
|
-
"print:min-h-[300px] print:px-6 print:py-8",
|
|
870
|
-
className
|
|
871
|
-
),
|
|
872
|
-
style: getBackgroundStyle(),
|
|
873
|
-
children: [
|
|
874
|
-
renderBranding(),
|
|
875
|
-
/* @__PURE__ */ jsxs7("div", { className: "text-center mb-8", children: [
|
|
876
|
-
/* @__PURE__ */ jsx10(
|
|
877
|
-
PrintText,
|
|
878
|
-
{
|
|
879
|
-
variant: "heading",
|
|
880
|
-
className: cn(
|
|
881
|
-
"mb-4",
|
|
882
|
-
getTitleSizeClasses(titleSize)
|
|
883
|
-
),
|
|
884
|
-
children: title
|
|
885
|
-
}
|
|
886
|
-
),
|
|
887
|
-
subtitle && /* @__PURE__ */ jsx10(PrintText, { variant: "subheading", color: "muted", className: "max-w-3xl mx-auto", children: subtitle })
|
|
888
|
-
] }),
|
|
889
|
-
showDivider && /* @__PURE__ */ jsx10("div", { className: "w-24 h-1 bg-primary mx-auto mb-8" }),
|
|
890
|
-
renderMetadata(),
|
|
891
|
-
printDate && /* @__PURE__ */ jsx10("div", { className: "flex justify-center mt-auto", children: /* @__PURE__ */ jsxs7(PrintText, { variant: "small", color: "muted", children: [
|
|
892
|
-
"Printed on ",
|
|
893
|
-
formatPrintDate()
|
|
894
|
-
] }) })
|
|
895
|
-
]
|
|
896
|
-
}
|
|
897
|
-
);
|
|
898
|
-
}
|
|
899
|
-
|
|
900
|
-
// src/components/PrintDataTable/PrintDataTable.tsx
|
|
901
|
-
init_cn();
|
|
902
|
-
|
|
903
|
-
// src/components/PrintDataTable/PrintTableGroup.tsx
|
|
904
|
-
init_cn();
|
|
905
|
-
|
|
906
|
-
// src/components/PrintDataTable/PrintTableRow.tsx
|
|
907
|
-
init_cn();
|
|
908
|
-
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
909
|
-
function PrintTableRow({
|
|
910
|
-
row,
|
|
911
|
-
columns,
|
|
912
|
-
styling = {
|
|
913
|
-
headerStyle: "solid",
|
|
914
|
-
rowStyle: "striped",
|
|
915
|
-
cellPadding: "normal"
|
|
916
|
-
},
|
|
917
|
-
printOptimized = true,
|
|
918
|
-
isEven = false
|
|
919
|
-
}) {
|
|
920
|
-
const getRowClasses = () => {
|
|
921
|
-
const baseClasses = "border-b border-border";
|
|
922
|
-
switch (styling.rowStyle) {
|
|
923
|
-
case "striped":
|
|
924
|
-
return cn(baseClasses, isEven ? "bg-muted/30" : "bg-background");
|
|
925
|
-
case "solid":
|
|
926
|
-
return cn(baseClasses, "bg-background");
|
|
927
|
-
case "bordered":
|
|
928
|
-
return cn(baseClasses, "border border-border bg-background");
|
|
929
|
-
default:
|
|
930
|
-
return baseClasses;
|
|
931
|
-
}
|
|
932
|
-
};
|
|
933
|
-
const getCellPaddingClasses = () => {
|
|
934
|
-
switch (styling.cellPadding) {
|
|
935
|
-
case "compact":
|
|
936
|
-
return "px-2 py-1 print:px-1 print:py-0.5";
|
|
937
|
-
case "spacious":
|
|
938
|
-
return "px-6 py-4 print:px-4 print:py-2";
|
|
939
|
-
case "normal":
|
|
940
|
-
default:
|
|
941
|
-
return "px-4 py-2 print:px-2 print:py-1";
|
|
942
|
-
}
|
|
943
|
-
};
|
|
944
|
-
return /* @__PURE__ */ jsx11("tr", { className: getRowClasses(), children: columns.map((column) => /* @__PURE__ */ jsx11(
|
|
945
|
-
"td",
|
|
946
|
-
{
|
|
947
|
-
className: cn(
|
|
948
|
-
getCellPaddingClasses(),
|
|
949
|
-
"text-left",
|
|
950
|
-
column.align === "center" && "text-center",
|
|
951
|
-
column.align === "right" && "text-right",
|
|
952
|
-
column.printBreak === "avoid" && "print-break-avoid"
|
|
953
|
-
),
|
|
954
|
-
children: /* @__PURE__ */ jsx11(PrintText, { variant: "small", children: column.render ? column.render(row[column.key], row) : row[column.key] ?? "" })
|
|
955
|
-
},
|
|
956
|
-
column.key
|
|
957
|
-
)) });
|
|
958
|
-
}
|
|
959
|
-
|
|
960
|
-
// src/components/PrintDataTable/PrintTableGroup.tsx
|
|
961
|
-
import { Fragment as Fragment2, jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
962
|
-
function PrintTableGroup({
|
|
963
|
-
groupKey,
|
|
964
|
-
groupData,
|
|
965
|
-
columns,
|
|
966
|
-
groupHeader,
|
|
967
|
-
styling = {
|
|
968
|
-
headerStyle: "solid",
|
|
969
|
-
rowStyle: "striped",
|
|
970
|
-
cellPadding: "normal"
|
|
971
|
-
},
|
|
972
|
-
printOptimized = true
|
|
973
|
-
}) {
|
|
974
|
-
const getGroupHeaderClasses = () => {
|
|
975
|
-
const baseClasses = "bg-muted text-muted-foreground font-semibold";
|
|
976
|
-
if (printOptimized) {
|
|
977
|
-
return cn(
|
|
978
|
-
baseClasses,
|
|
979
|
-
"print:bg-gray-100 print:text-black print:font-bold"
|
|
980
|
-
);
|
|
981
|
-
}
|
|
982
|
-
return baseClasses;
|
|
983
|
-
};
|
|
984
|
-
const getCellPaddingClasses = () => {
|
|
985
|
-
switch (styling.cellPadding) {
|
|
986
|
-
case "compact":
|
|
987
|
-
return "px-2 py-1 print:px-1 print:py-0.5";
|
|
988
|
-
case "spacious":
|
|
989
|
-
return "px-6 py-4 print:px-4 print:py-2";
|
|
990
|
-
case "normal":
|
|
991
|
-
default:
|
|
992
|
-
return "px-4 py-2 print:px-2 print:py-1";
|
|
993
|
-
}
|
|
994
|
-
};
|
|
995
|
-
return /* @__PURE__ */ jsxs8(Fragment2, { children: [
|
|
996
|
-
/* @__PURE__ */ jsx12("tr", { className: getGroupHeaderClasses(), children: /* @__PURE__ */ jsx12(
|
|
997
|
-
"td",
|
|
998
|
-
{
|
|
999
|
-
colSpan: columns.length,
|
|
1000
|
-
className: cn(
|
|
1001
|
-
getCellPaddingClasses(),
|
|
1002
|
-
"print-break-avoid"
|
|
1003
|
-
),
|
|
1004
|
-
children: groupHeader ? groupHeader(groupKey) : /* @__PURE__ */ jsx12(PrintText, { variant: "small", weight: "semibold", children: groupKey })
|
|
1005
|
-
}
|
|
1006
|
-
) }),
|
|
1007
|
-
groupData.map((row, index) => /* @__PURE__ */ jsx12(
|
|
1008
|
-
PrintTableRow,
|
|
1009
|
-
{
|
|
1010
|
-
row,
|
|
1011
|
-
columns,
|
|
1012
|
-
styling,
|
|
1013
|
-
printOptimized,
|
|
1014
|
-
isEven: index % 2 === 0
|
|
1015
|
-
},
|
|
1016
|
-
index
|
|
1017
|
-
))
|
|
1018
|
-
] });
|
|
1019
|
-
}
|
|
1020
|
-
|
|
1021
|
-
// src/components/PrintDataTable/PrintDataTable.tsx
|
|
1022
|
-
import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1023
|
-
function PrintDataTable({
|
|
1024
|
-
data,
|
|
1025
|
-
columns,
|
|
1026
|
-
title,
|
|
1027
|
-
showTitle = true,
|
|
1028
|
-
grouping,
|
|
1029
|
-
styling = {
|
|
1030
|
-
headerStyle: "solid",
|
|
1031
|
-
rowStyle: "striped",
|
|
1032
|
-
cellPadding: "normal"
|
|
1033
|
-
},
|
|
1034
|
-
printOptimized = true,
|
|
1035
|
-
className,
|
|
1036
|
-
...props
|
|
1037
|
-
}) {
|
|
1038
|
-
const getTableClasses = () => {
|
|
1039
|
-
const baseClasses = "w-full border-collapse";
|
|
1040
|
-
if (printOptimized) {
|
|
1041
|
-
return cn(
|
|
1042
|
-
baseClasses,
|
|
1043
|
-
"print:text-xs print:leading-tight",
|
|
1044
|
-
"print:border-black print:border-solid"
|
|
1045
|
-
);
|
|
1046
|
-
}
|
|
1047
|
-
return baseClasses;
|
|
1048
|
-
};
|
|
1049
|
-
const getHeaderClasses = () => {
|
|
1050
|
-
const baseClasses = "text-left font-semibold";
|
|
1051
|
-
switch (styling.headerStyle) {
|
|
1052
|
-
case "solid":
|
|
1053
|
-
return cn(baseClasses, "bg-primary text-primary-foreground");
|
|
1054
|
-
case "outline":
|
|
1055
|
-
return cn(baseClasses, "border-2 border-primary text-primary");
|
|
1056
|
-
default:
|
|
1057
|
-
return baseClasses;
|
|
1058
|
-
}
|
|
1059
|
-
};
|
|
1060
|
-
const getRowClasses = (isEven) => {
|
|
1061
|
-
const baseClasses = "border-b border-border";
|
|
1062
|
-
switch (styling.rowStyle) {
|
|
1063
|
-
case "striped":
|
|
1064
|
-
return cn(baseClasses, isEven ? "bg-muted/30" : "bg-background");
|
|
1065
|
-
case "solid":
|
|
1066
|
-
return cn(baseClasses, "bg-background");
|
|
1067
|
-
case "bordered":
|
|
1068
|
-
return cn(baseClasses, "border border-border bg-background");
|
|
1069
|
-
default:
|
|
1070
|
-
return baseClasses;
|
|
1071
|
-
}
|
|
1072
|
-
};
|
|
1073
|
-
const getCellPaddingClasses = () => {
|
|
1074
|
-
switch (styling.cellPadding) {
|
|
1075
|
-
case "compact":
|
|
1076
|
-
return "px-2 py-1 print:px-1 print:py-0.5";
|
|
1077
|
-
case "spacious":
|
|
1078
|
-
return "px-6 py-4 print:px-4 print:py-2";
|
|
1079
|
-
case "normal":
|
|
1080
|
-
default:
|
|
1081
|
-
return "px-4 py-2 print:px-2 print:py-1";
|
|
1082
|
-
}
|
|
1083
|
-
};
|
|
1084
|
-
const renderTableHeader = () => /* @__PURE__ */ jsx13("thead", { children: /* @__PURE__ */ jsx13("tr", { className: getHeaderClasses(), children: columns.map((column) => /* @__PURE__ */ jsx13(
|
|
1085
|
-
"th",
|
|
1086
|
-
{
|
|
1087
|
-
className: cn(
|
|
1088
|
-
getCellPaddingClasses(),
|
|
1089
|
-
"text-left",
|
|
1090
|
-
column.align === "center" && "text-center",
|
|
1091
|
-
column.align === "right" && "text-right",
|
|
1092
|
-
column.printBreak === "avoid" && "print-break-avoid",
|
|
1093
|
-
column.printBreak === "always" && "print-break-before"
|
|
1094
|
-
),
|
|
1095
|
-
style: { width: column.width },
|
|
1096
|
-
children: /* @__PURE__ */ jsx13(PrintText, { variant: "small", weight: "semibold", children: column.header })
|
|
1097
|
-
},
|
|
1098
|
-
column.key
|
|
1099
|
-
)) }) });
|
|
1100
|
-
const renderTableBody = () => {
|
|
1101
|
-
if (grouping?.enabled) {
|
|
1102
|
-
const groupedData = groupDataByField(data, grouping.groupBy);
|
|
1103
|
-
return /* @__PURE__ */ jsx13("tbody", { children: Object.entries(groupedData).map(([groupKey, groupData], groupIndex) => /* @__PURE__ */ jsx13(
|
|
1104
|
-
PrintTableGroup,
|
|
1105
|
-
{
|
|
1106
|
-
groupKey,
|
|
1107
|
-
groupData,
|
|
1108
|
-
columns,
|
|
1109
|
-
groupHeader: grouping.groupHeader,
|
|
1110
|
-
styling,
|
|
1111
|
-
printOptimized
|
|
1112
|
-
},
|
|
1113
|
-
groupKey
|
|
1114
|
-
)) });
|
|
1115
|
-
}
|
|
1116
|
-
return /* @__PURE__ */ jsx13("tbody", { children: data.map((row, index) => /* @__PURE__ */ jsx13(
|
|
1117
|
-
"tr",
|
|
1118
|
-
{
|
|
1119
|
-
className: getRowClasses(index % 2 === 0),
|
|
1120
|
-
children: columns.map((column) => /* @__PURE__ */ jsx13(
|
|
1121
|
-
"td",
|
|
1122
|
-
{
|
|
1123
|
-
className: cn(
|
|
1124
|
-
getCellPaddingClasses(),
|
|
1125
|
-
"text-left",
|
|
1126
|
-
column.align === "center" && "text-center",
|
|
1127
|
-
column.align === "right" && "text-right",
|
|
1128
|
-
column.printBreak === "avoid" && "print-break-avoid"
|
|
1129
|
-
),
|
|
1130
|
-
children: /* @__PURE__ */ jsx13(PrintText, { variant: "small", children: column.render ? column.render(row[column.key], row) : row[column.key] })
|
|
1131
|
-
},
|
|
1132
|
-
column.key
|
|
1133
|
-
))
|
|
1134
|
-
},
|
|
1135
|
-
index
|
|
1136
|
-
)) });
|
|
1137
|
-
};
|
|
1138
|
-
return /* @__PURE__ */ jsxs9("div", { className: cn("print-data-table", className), ...props, children: [
|
|
1139
|
-
title && showTitle && /* @__PURE__ */ jsx13("div", { className: "mb-4", children: /* @__PURE__ */ jsx13(PrintText, { variant: "subheading", weight: "semibold", children: title }) }),
|
|
1140
|
-
/* @__PURE__ */ jsx13("div", { className: "overflow-x-auto print:overflow-visible", children: /* @__PURE__ */ jsxs9("table", { className: getTableClasses(), children: [
|
|
1141
|
-
renderTableHeader(),
|
|
1142
|
-
renderTableBody()
|
|
1143
|
-
] }) })
|
|
1144
|
-
] });
|
|
1145
|
-
}
|
|
1146
|
-
function groupDataByField(data, field) {
|
|
1147
|
-
return data.reduce((groups, item) => {
|
|
1148
|
-
const key = item[field] || "Unknown";
|
|
1149
|
-
if (!groups[key]) {
|
|
1150
|
-
groups[key] = [];
|
|
1151
|
-
}
|
|
1152
|
-
groups[key].push(item);
|
|
1153
|
-
return groups;
|
|
1154
|
-
}, {});
|
|
1155
|
-
}
|
|
1156
|
-
|
|
1157
|
-
// src/components/PrintCard/PrintCard.tsx
|
|
1158
|
-
init_cn();
|
|
1159
|
-
import { jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1160
|
-
function PrintCard({
|
|
1161
|
-
children,
|
|
1162
|
-
title,
|
|
1163
|
-
subtitle,
|
|
1164
|
-
variant = "default",
|
|
1165
|
-
size = "md",
|
|
1166
|
-
layout = "vertical",
|
|
1167
|
-
showBorder = true,
|
|
1168
|
-
backgroundColor = "white",
|
|
1169
|
-
textColor = "primary",
|
|
1170
|
-
printOptimized = true,
|
|
1171
|
-
className,
|
|
1172
|
-
...props
|
|
1173
|
-
}) {
|
|
1174
|
-
const getVariantClasses = (variant2) => {
|
|
1175
|
-
switch (variant2) {
|
|
1176
|
-
case "outlined":
|
|
1177
|
-
return "border-2 border-border bg-transparent";
|
|
1178
|
-
case "filled":
|
|
1179
|
-
return "border-0 bg-muted";
|
|
1180
|
-
case "elevated":
|
|
1181
|
-
return "shadow-lg border-0 bg-background";
|
|
1182
|
-
default:
|
|
1183
|
-
return "border border-border bg-background";
|
|
1184
|
-
}
|
|
1185
|
-
};
|
|
1186
|
-
const getSizeClasses = (size2) => {
|
|
1187
|
-
switch (size2) {
|
|
1188
|
-
case "sm":
|
|
1189
|
-
return "p-3";
|
|
1190
|
-
case "lg":
|
|
1191
|
-
return "p-6";
|
|
1192
|
-
case "xl":
|
|
1193
|
-
return "p-8";
|
|
1194
|
-
default:
|
|
1195
|
-
return "p-4";
|
|
1196
|
-
}
|
|
1197
|
-
};
|
|
1198
|
-
const getLayoutClasses = (layout2) => {
|
|
1199
|
-
switch (layout2) {
|
|
1200
|
-
case "horizontal":
|
|
1201
|
-
return "flex-row items-center";
|
|
1202
|
-
case "compact":
|
|
1203
|
-
return "p-2";
|
|
1204
|
-
default:
|
|
1205
|
-
return "flex-col";
|
|
1206
|
-
}
|
|
1207
|
-
};
|
|
1208
|
-
const getBackgroundClasses = (backgroundColor2, variant2) => {
|
|
1209
|
-
if (variant2 === "outlined" && backgroundColor2 === "white") {
|
|
1210
|
-
return "bg-transparent";
|
|
1211
|
-
}
|
|
1212
|
-
switch (backgroundColor2) {
|
|
1213
|
-
case "gray":
|
|
1214
|
-
return "bg-muted";
|
|
1215
|
-
case "primary":
|
|
1216
|
-
return "bg-primary text-primary-foreground";
|
|
1217
|
-
case "secondary":
|
|
1218
|
-
return "bg-secondary text-secondary-foreground";
|
|
1219
|
-
case "accent":
|
|
1220
|
-
return "bg-accent text-accent-foreground";
|
|
1221
|
-
default:
|
|
1222
|
-
return "";
|
|
1223
|
-
}
|
|
1224
|
-
};
|
|
1225
|
-
const getTextColorClasses = (textColor2, backgroundColor2) => {
|
|
1226
|
-
if (backgroundColor2 === "primary") {
|
|
1227
|
-
return "text-primary-foreground";
|
|
1228
|
-
}
|
|
1229
|
-
if (backgroundColor2 === "secondary") {
|
|
1230
|
-
return "text-secondary-foreground";
|
|
1231
|
-
}
|
|
1232
|
-
if (backgroundColor2 === "accent") {
|
|
1233
|
-
return "text-accent-foreground";
|
|
1234
|
-
}
|
|
1235
|
-
switch (textColor2) {
|
|
1236
|
-
case "secondary":
|
|
1237
|
-
return "text-secondary-foreground";
|
|
1238
|
-
case "muted":
|
|
1239
|
-
return "text-muted-foreground";
|
|
1240
|
-
case "accent":
|
|
1241
|
-
return "text-accent-foreground";
|
|
1242
|
-
case "destructive":
|
|
1243
|
-
return "text-destructive-foreground";
|
|
1244
|
-
default:
|
|
1245
|
-
return "text-foreground";
|
|
1246
|
-
}
|
|
1247
|
-
};
|
|
1248
|
-
const getPrintOptimizedClasses = () => {
|
|
1249
|
-
if (!printOptimized) return "";
|
|
1250
|
-
return cn(
|
|
1251
|
-
"print:break-inside-avoid",
|
|
1252
|
-
"print:shadow-none",
|
|
1253
|
-
"print:border-black",
|
|
1254
|
-
"print:bg-white",
|
|
1255
|
-
"print:text-black"
|
|
1256
|
-
);
|
|
1257
|
-
};
|
|
1258
|
-
return /* @__PURE__ */ jsxs10(
|
|
1259
|
-
"div",
|
|
1260
|
-
{
|
|
1261
|
-
className: cn(
|
|
1262
|
-
"print-card",
|
|
1263
|
-
"flex",
|
|
1264
|
-
"rounded-lg",
|
|
1265
|
-
getVariantClasses(variant),
|
|
1266
|
-
getBackgroundClasses(backgroundColor, variant),
|
|
1267
|
-
getTextColorClasses(textColor, backgroundColor),
|
|
1268
|
-
getSizeClasses(size),
|
|
1269
|
-
getLayoutClasses(layout),
|
|
1270
|
-
getPrintOptimizedClasses(),
|
|
1271
|
-
className
|
|
1272
|
-
),
|
|
1273
|
-
...props,
|
|
1274
|
-
children: [
|
|
1275
|
-
title && /* @__PURE__ */ jsxs10("div", { className: "mb-2", children: [
|
|
1276
|
-
/* @__PURE__ */ jsx14(PrintText, { variant: "heading", weight: "semibold", children: title }),
|
|
1277
|
-
subtitle && /* @__PURE__ */ jsx14(PrintText, { variant: "caption", color: "muted", className: "mt-1", children: subtitle })
|
|
1278
|
-
] }),
|
|
1279
|
-
children
|
|
1280
|
-
]
|
|
1281
|
-
}
|
|
1282
|
-
);
|
|
1283
|
-
}
|
|
1284
|
-
|
|
1285
|
-
// src/components/PrintCard/PrintCardHeader.tsx
|
|
1286
|
-
init_cn();
|
|
1287
|
-
import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1288
|
-
function PrintCardHeader({
|
|
1289
|
-
children,
|
|
1290
|
-
title,
|
|
1291
|
-
subtitle,
|
|
1292
|
-
actions,
|
|
1293
|
-
align = "left",
|
|
1294
|
-
printOptimized = true,
|
|
1295
|
-
className,
|
|
1296
|
-
...props
|
|
1297
|
-
}) {
|
|
1298
|
-
const getAlignmentClasses = (align2) => {
|
|
1299
|
-
switch (align2) {
|
|
1300
|
-
case "center":
|
|
1301
|
-
return "text-center";
|
|
1302
|
-
case "right":
|
|
1303
|
-
return "text-right";
|
|
1304
|
-
default:
|
|
1305
|
-
return "text-left";
|
|
1306
|
-
}
|
|
1307
|
-
};
|
|
1308
|
-
const getPrintOptimizedClasses = () => {
|
|
1309
|
-
if (!printOptimized) return "";
|
|
1310
|
-
return cn(
|
|
1311
|
-
"print:break-after-avoid",
|
|
1312
|
-
"print:mb-2"
|
|
1313
|
-
);
|
|
1314
|
-
};
|
|
1315
|
-
return /* @__PURE__ */ jsxs11(
|
|
1316
|
-
"div",
|
|
1317
|
-
{
|
|
1318
|
-
className: cn(
|
|
1319
|
-
"print-card-header",
|
|
1320
|
-
"flex",
|
|
1321
|
-
"items-center",
|
|
1322
|
-
"justify-between",
|
|
1323
|
-
"mb-4",
|
|
1324
|
-
getAlignmentClasses(align),
|
|
1325
|
-
getPrintOptimizedClasses(),
|
|
1326
|
-
className
|
|
1327
|
-
),
|
|
1328
|
-
...props,
|
|
1329
|
-
children: [
|
|
1330
|
-
/* @__PURE__ */ jsxs11("div", { className: "flex-1", children: [
|
|
1331
|
-
title && /* @__PURE__ */ jsx15(PrintText, { variant: "heading", weight: "semibold", children: title }),
|
|
1332
|
-
subtitle && /* @__PURE__ */ jsx15(PrintText, { variant: "caption", color: "muted", className: "mt-1", children: subtitle }),
|
|
1333
|
-
children
|
|
1334
|
-
] }),
|
|
1335
|
-
actions && /* @__PURE__ */ jsx15("div", { className: "ml-4 flex-shrink-0", children: actions })
|
|
1336
|
-
]
|
|
1337
|
-
}
|
|
1338
|
-
);
|
|
1339
|
-
}
|
|
1340
|
-
|
|
1341
|
-
// src/components/PrintCard/PrintCardContent.tsx
|
|
1342
|
-
init_cn();
|
|
1343
|
-
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
1344
|
-
function PrintCardContent({
|
|
1345
|
-
children,
|
|
1346
|
-
padding = "md",
|
|
1347
|
-
printOptimized = true,
|
|
1348
|
-
className,
|
|
1349
|
-
...props
|
|
1350
|
-
}) {
|
|
1351
|
-
const getPaddingClasses = (padding2) => {
|
|
1352
|
-
switch (padding2) {
|
|
1353
|
-
case "none":
|
|
1354
|
-
return "p-0";
|
|
1355
|
-
case "sm":
|
|
1356
|
-
return "p-2";
|
|
1357
|
-
case "lg":
|
|
1358
|
-
return "p-6";
|
|
1359
|
-
default:
|
|
1360
|
-
return "p-4";
|
|
1361
|
-
}
|
|
1362
|
-
};
|
|
1363
|
-
const getPrintOptimizedClasses = () => {
|
|
1364
|
-
if (!printOptimized) return "";
|
|
1365
|
-
return cn(
|
|
1366
|
-
"print:break-inside-avoid",
|
|
1367
|
-
"print:text-sm",
|
|
1368
|
-
"print:leading-tight"
|
|
1369
|
-
);
|
|
1370
|
-
};
|
|
1371
|
-
return /* @__PURE__ */ jsx16(
|
|
1372
|
-
"div",
|
|
1373
|
-
{
|
|
1374
|
-
"data-testid": "print-card-content",
|
|
1375
|
-
className: cn(
|
|
1376
|
-
"print-card-content",
|
|
1377
|
-
getPaddingClasses(padding),
|
|
1378
|
-
getPrintOptimizedClasses(),
|
|
1379
|
-
className
|
|
1380
|
-
),
|
|
1381
|
-
...props,
|
|
1382
|
-
children
|
|
1383
|
-
}
|
|
1384
|
-
);
|
|
1385
|
-
}
|
|
1386
|
-
|
|
1387
|
-
// src/components/PrintCard/PrintCardFooter.tsx
|
|
1388
|
-
init_cn();
|
|
1389
|
-
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1390
|
-
function PrintCardFooter({
|
|
1391
|
-
children,
|
|
1392
|
-
align = "left",
|
|
1393
|
-
printOptimized = true,
|
|
1394
|
-
className,
|
|
1395
|
-
...props
|
|
1396
|
-
}) {
|
|
1397
|
-
const getAlignmentClasses = (align2) => {
|
|
1398
|
-
switch (align2) {
|
|
1399
|
-
case "center":
|
|
1400
|
-
return "text-center";
|
|
1401
|
-
case "right":
|
|
1402
|
-
return "text-right";
|
|
1403
|
-
default:
|
|
1404
|
-
return "text-left";
|
|
1405
|
-
}
|
|
1406
|
-
};
|
|
1407
|
-
const getPrintOptimizedClasses = () => {
|
|
1408
|
-
if (!printOptimized) return "";
|
|
1409
|
-
return cn(
|
|
1410
|
-
"print:break-before-avoid",
|
|
1411
|
-
"print:mt-2",
|
|
1412
|
-
"print:pt-2",
|
|
1413
|
-
"print:border-t",
|
|
1414
|
-
"print:border-gray-300"
|
|
1415
|
-
);
|
|
1416
|
-
};
|
|
1417
|
-
return /* @__PURE__ */ jsx17(
|
|
1418
|
-
"div",
|
|
1419
|
-
{
|
|
1420
|
-
className: cn(
|
|
1421
|
-
"print-card-footer",
|
|
1422
|
-
"mt-4",
|
|
1423
|
-
"pt-4",
|
|
1424
|
-
"border-t",
|
|
1425
|
-
"border-border",
|
|
1426
|
-
getAlignmentClasses(align),
|
|
1427
|
-
getPrintOptimizedClasses(),
|
|
1428
|
-
className
|
|
1429
|
-
),
|
|
1430
|
-
...props,
|
|
1431
|
-
children
|
|
1432
|
-
}
|
|
1433
|
-
);
|
|
1434
|
-
}
|
|
1435
|
-
|
|
1436
|
-
// src/components/PrintCard/PrintCardImage.tsx
|
|
1437
|
-
init_cn();
|
|
1438
|
-
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
1439
|
-
function PrintCardImage({
|
|
1440
|
-
src,
|
|
1441
|
-
alt,
|
|
1442
|
-
width,
|
|
1443
|
-
height,
|
|
1444
|
-
aspectRatio = "auto",
|
|
1445
|
-
objectFit = "cover",
|
|
1446
|
-
printOptimized = true,
|
|
1447
|
-
className,
|
|
1448
|
-
...props
|
|
1449
|
-
}) {
|
|
1450
|
-
const getAspectRatioClasses = (aspectRatio2) => {
|
|
1451
|
-
switch (aspectRatio2) {
|
|
1452
|
-
case "square":
|
|
1453
|
-
return "aspect-square";
|
|
1454
|
-
case "portrait":
|
|
1455
|
-
return "aspect-[3/4]";
|
|
1456
|
-
case "landscape":
|
|
1457
|
-
return "aspect-[4/3]";
|
|
1458
|
-
default:
|
|
1459
|
-
return "";
|
|
1460
|
-
}
|
|
1461
|
-
};
|
|
1462
|
-
const getObjectFitClasses = (objectFit2) => {
|
|
1463
|
-
switch (objectFit2) {
|
|
1464
|
-
case "contain":
|
|
1465
|
-
return "object-contain";
|
|
1466
|
-
case "fill":
|
|
1467
|
-
return "object-fill";
|
|
1468
|
-
case "none":
|
|
1469
|
-
return "object-none";
|
|
1470
|
-
case "scale-down":
|
|
1471
|
-
return "object-scale-down";
|
|
1472
|
-
default:
|
|
1473
|
-
return "object-cover";
|
|
1474
|
-
}
|
|
1475
|
-
};
|
|
1476
|
-
const getPrintOptimizedClasses = () => {
|
|
1477
|
-
if (!printOptimized) return "";
|
|
1478
|
-
return cn(
|
|
1479
|
-
"print:max-w-full",
|
|
1480
|
-
"print:h-auto",
|
|
1481
|
-
"print:break-inside-avoid"
|
|
1482
|
-
);
|
|
1483
|
-
};
|
|
1484
|
-
return /* @__PURE__ */ jsx18(
|
|
1485
|
-
"img",
|
|
1486
|
-
{
|
|
1487
|
-
src,
|
|
1488
|
-
alt,
|
|
1489
|
-
width,
|
|
1490
|
-
height,
|
|
1491
|
-
className: cn(
|
|
1492
|
-
"print-card-image",
|
|
1493
|
-
"w-full",
|
|
1494
|
-
"h-auto",
|
|
1495
|
-
"rounded-md",
|
|
1496
|
-
getAspectRatioClasses(aspectRatio),
|
|
1497
|
-
getObjectFitClasses(objectFit),
|
|
1498
|
-
getPrintOptimizedClasses(),
|
|
1499
|
-
className
|
|
1500
|
-
),
|
|
1501
|
-
...props
|
|
1502
|
-
}
|
|
1503
|
-
);
|
|
1504
|
-
}
|
|
1505
|
-
|
|
1506
|
-
// src/components/PrintCard/PrintCardGrid.tsx
|
|
1507
|
-
init_cn();
|
|
1508
|
-
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
1509
|
-
function PrintCardGrid({
|
|
1510
|
-
children,
|
|
1511
|
-
columns = 3,
|
|
1512
|
-
gap = "md",
|
|
1513
|
-
rowGap = "md",
|
|
1514
|
-
printOptimized = true,
|
|
1515
|
-
className,
|
|
1516
|
-
...props
|
|
1517
|
-
}) {
|
|
1518
|
-
const getColumnClasses = (columns2) => {
|
|
1519
|
-
switch (columns2) {
|
|
1520
|
-
case 1:
|
|
1521
|
-
return "grid-cols-1";
|
|
1522
|
-
case 2:
|
|
1523
|
-
return "grid-cols-2";
|
|
1524
|
-
case 4:
|
|
1525
|
-
return "grid-cols-4";
|
|
1526
|
-
case 5:
|
|
1527
|
-
return "grid-cols-5";
|
|
1528
|
-
case 6:
|
|
1529
|
-
return "grid-cols-6";
|
|
1530
|
-
default:
|
|
1531
|
-
return "grid-cols-3";
|
|
1532
|
-
}
|
|
1533
|
-
};
|
|
1534
|
-
const getGapClasses = (gap2) => {
|
|
1535
|
-
switch (gap2) {
|
|
1536
|
-
case "sm":
|
|
1537
|
-
return "gap-2";
|
|
1538
|
-
case "lg":
|
|
1539
|
-
return "gap-6";
|
|
1540
|
-
case "xl":
|
|
1541
|
-
return "gap-8";
|
|
1542
|
-
default:
|
|
1543
|
-
return "gap-4";
|
|
1544
|
-
}
|
|
1545
|
-
};
|
|
1546
|
-
const getRowGapClasses = (rowGap2) => {
|
|
1547
|
-
switch (rowGap2) {
|
|
1548
|
-
case "sm":
|
|
1549
|
-
return "gap-y-2";
|
|
1550
|
-
case "lg":
|
|
1551
|
-
return "gap-y-6";
|
|
1552
|
-
case "xl":
|
|
1553
|
-
return "gap-y-8";
|
|
1554
|
-
default:
|
|
1555
|
-
return "gap-y-4";
|
|
1556
|
-
}
|
|
1557
|
-
};
|
|
1558
|
-
const getPrintOptimizedClasses = () => {
|
|
1559
|
-
if (!printOptimized) return "";
|
|
1560
|
-
return cn(
|
|
1561
|
-
"print:grid-cols-2",
|
|
1562
|
-
"print:gap-2",
|
|
1563
|
-
"print:break-inside-avoid"
|
|
1564
|
-
);
|
|
1565
|
-
};
|
|
1566
|
-
return /* @__PURE__ */ jsx19(
|
|
1567
|
-
"div",
|
|
1568
|
-
{
|
|
1569
|
-
className: cn(
|
|
1570
|
-
"print-card-grid",
|
|
1571
|
-
"grid",
|
|
1572
|
-
getColumnClasses(columns),
|
|
1573
|
-
getGapClasses(gap),
|
|
1574
|
-
getRowGapClasses(rowGap),
|
|
1575
|
-
getPrintOptimizedClasses(),
|
|
1576
|
-
className
|
|
1577
|
-
),
|
|
1578
|
-
...props,
|
|
1579
|
-
children
|
|
1580
|
-
}
|
|
1581
|
-
);
|
|
1582
|
-
}
|
|
1583
|
-
|
|
1584
|
-
// src/components/PrintSection/PrintSection.tsx
|
|
1585
|
-
init_cn();
|
|
1586
|
-
import { jsx as jsx20, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1587
|
-
function PrintSection({
|
|
1588
|
-
children,
|
|
1589
|
-
title,
|
|
1590
|
-
subtitle,
|
|
1591
|
-
layout = "single",
|
|
1592
|
-
gap = "md",
|
|
1593
|
-
spacing = "md",
|
|
1594
|
-
showBorder = false,
|
|
1595
|
-
background = "transparent",
|
|
1596
|
-
printOptimized = true,
|
|
1597
|
-
className,
|
|
1598
|
-
...props
|
|
1599
|
-
}) {
|
|
1600
|
-
const getLayoutClasses = (layout2) => {
|
|
1601
|
-
switch (layout2) {
|
|
1602
|
-
case "two-column":
|
|
1603
|
-
return "grid grid-cols-2";
|
|
1604
|
-
case "three-column":
|
|
1605
|
-
return "grid grid-cols-3";
|
|
1606
|
-
case "four-column":
|
|
1607
|
-
return "grid grid-cols-4";
|
|
1608
|
-
default:
|
|
1609
|
-
return "block";
|
|
1610
|
-
}
|
|
1611
|
-
};
|
|
1612
|
-
const getGapClasses = (gap2) => {
|
|
1613
|
-
switch (gap2) {
|
|
1614
|
-
case "sm":
|
|
1615
|
-
return "gap-2";
|
|
1616
|
-
case "lg":
|
|
1617
|
-
return "gap-6";
|
|
1618
|
-
case "xl":
|
|
1619
|
-
return "gap-8";
|
|
1620
|
-
default:
|
|
1621
|
-
return "gap-4";
|
|
1622
|
-
}
|
|
1623
|
-
};
|
|
1624
|
-
const getSpacingClasses = (spacing2) => {
|
|
1625
|
-
switch (spacing2) {
|
|
1626
|
-
case "none":
|
|
1627
|
-
return "py-0";
|
|
1628
|
-
case "sm":
|
|
1629
|
-
return "py-2";
|
|
1630
|
-
case "lg":
|
|
1631
|
-
return "py-6";
|
|
1632
|
-
case "xl":
|
|
1633
|
-
return "py-8";
|
|
1634
|
-
default:
|
|
1635
|
-
return "py-4";
|
|
1636
|
-
}
|
|
1637
|
-
};
|
|
1638
|
-
const getBackgroundClasses = (background2) => {
|
|
1639
|
-
switch (background2) {
|
|
1640
|
-
case "white":
|
|
1641
|
-
return "bg-background";
|
|
1642
|
-
case "gray":
|
|
1643
|
-
return "bg-muted";
|
|
1644
|
-
case "primary":
|
|
1645
|
-
return "bg-primary text-primary-foreground";
|
|
1646
|
-
case "secondary":
|
|
1647
|
-
return "bg-secondary text-secondary-foreground";
|
|
1648
|
-
default:
|
|
1649
|
-
return "bg-transparent";
|
|
1650
|
-
}
|
|
1651
|
-
};
|
|
1652
|
-
const getBorderClasses = () => {
|
|
1653
|
-
if (!showBorder) return "";
|
|
1654
|
-
return "border border-border rounded-lg p-4";
|
|
1655
|
-
};
|
|
1656
|
-
const getPrintOptimizedClasses = () => {
|
|
1657
|
-
if (!printOptimized) return "";
|
|
1658
|
-
return cn(
|
|
1659
|
-
"print:break-inside-avoid",
|
|
1660
|
-
"print:mb-4",
|
|
1661
|
-
"print:border-black",
|
|
1662
|
-
"print:bg-white",
|
|
1663
|
-
"print:text-black"
|
|
1664
|
-
);
|
|
1665
|
-
};
|
|
1666
|
-
return /* @__PURE__ */ jsxs12(
|
|
1667
|
-
"section",
|
|
1668
|
-
{
|
|
1669
|
-
className: cn(
|
|
1670
|
-
"print-section",
|
|
1671
|
-
getLayoutClasses(layout),
|
|
1672
|
-
getGapClasses(gap),
|
|
1673
|
-
getSpacingClasses(spacing),
|
|
1674
|
-
getBackgroundClasses(background),
|
|
1675
|
-
getBorderClasses(),
|
|
1676
|
-
getPrintOptimizedClasses(),
|
|
1677
|
-
className
|
|
1678
|
-
),
|
|
1679
|
-
...props,
|
|
1680
|
-
children: [
|
|
1681
|
-
title && /* @__PURE__ */ jsxs12("div", { className: "mb-4", children: [
|
|
1682
|
-
/* @__PURE__ */ jsx20(PrintText, { variant: "heading", weight: "semibold", children: title }),
|
|
1683
|
-
subtitle && /* @__PURE__ */ jsx20(PrintText, { variant: "caption", color: "muted", className: "mt-1", children: subtitle })
|
|
1684
|
-
] }),
|
|
1685
|
-
children
|
|
1686
|
-
]
|
|
1687
|
-
}
|
|
1688
|
-
);
|
|
1689
|
-
}
|
|
1690
|
-
|
|
1691
|
-
// src/components/PrintSection/PrintSectionHeader.tsx
|
|
1692
|
-
init_cn();
|
|
1693
|
-
import { jsx as jsx21, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1694
|
-
function PrintSectionHeader({
|
|
1695
|
-
children,
|
|
1696
|
-
title,
|
|
1697
|
-
subtitle,
|
|
1698
|
-
level = 2,
|
|
1699
|
-
align = "left",
|
|
1700
|
-
showDivider = false,
|
|
1701
|
-
printOptimized = true,
|
|
1702
|
-
className,
|
|
1703
|
-
...props
|
|
1704
|
-
}) {
|
|
1705
|
-
const getAlignmentClasses = (align2) => {
|
|
1706
|
-
switch (align2) {
|
|
1707
|
-
case "center":
|
|
1708
|
-
return "text-center";
|
|
1709
|
-
case "right":
|
|
1710
|
-
return "text-right";
|
|
1711
|
-
default:
|
|
1712
|
-
return "text-left";
|
|
1713
|
-
}
|
|
1714
|
-
};
|
|
1715
|
-
const getDividerClasses = () => {
|
|
1716
|
-
if (!showDivider) return "";
|
|
1717
|
-
return "border-b border-border pb-2 mb-4";
|
|
1718
|
-
};
|
|
1719
|
-
const getPrintOptimizedClasses = () => {
|
|
1720
|
-
if (!printOptimized) return "";
|
|
1721
|
-
return cn(
|
|
1722
|
-
"print:break-after-avoid",
|
|
1723
|
-
"print:mb-2",
|
|
1724
|
-
"print:border-black"
|
|
1725
|
-
);
|
|
1726
|
-
};
|
|
1727
|
-
const getHeadingVariant = (level2) => {
|
|
1728
|
-
switch (level2) {
|
|
1729
|
-
case 1:
|
|
1730
|
-
return "heading";
|
|
1731
|
-
case 2:
|
|
1732
|
-
return "heading";
|
|
1733
|
-
case 3:
|
|
1734
|
-
return "subheading";
|
|
1735
|
-
case 4:
|
|
1736
|
-
return "subheading";
|
|
1737
|
-
case 5:
|
|
1738
|
-
return "body";
|
|
1739
|
-
case 6:
|
|
1740
|
-
return "body";
|
|
1741
|
-
default:
|
|
1742
|
-
return "heading";
|
|
1743
|
-
}
|
|
1744
|
-
};
|
|
1745
|
-
const HeadingTag = `h${level}`;
|
|
1746
|
-
return /* @__PURE__ */ jsxs13(
|
|
1747
|
-
HeadingTag,
|
|
1748
|
-
{
|
|
1749
|
-
className: cn(
|
|
1750
|
-
"print-section-header",
|
|
1751
|
-
"mb-4",
|
|
1752
|
-
getAlignmentClasses(align),
|
|
1753
|
-
getDividerClasses(),
|
|
1754
|
-
getPrintOptimizedClasses(),
|
|
1755
|
-
className
|
|
1756
|
-
),
|
|
1757
|
-
...props,
|
|
1758
|
-
children: [
|
|
1759
|
-
title && /* @__PURE__ */ jsx21(PrintText, { variant: getHeadingVariant(level), weight: "semibold", children: title }),
|
|
1760
|
-
subtitle && /* @__PURE__ */ jsx21(PrintText, { variant: "caption", color: "muted", className: "mt-1", children: subtitle }),
|
|
1761
|
-
children
|
|
1762
|
-
]
|
|
1763
|
-
}
|
|
1764
|
-
);
|
|
1765
|
-
}
|
|
1766
|
-
|
|
1767
|
-
// src/components/PrintSection/PrintSectionContent.tsx
|
|
1768
|
-
init_cn();
|
|
1769
|
-
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
1770
|
-
function PrintSectionContent({
|
|
1771
|
-
children,
|
|
1772
|
-
padding = "md",
|
|
1773
|
-
background = "transparent",
|
|
1774
|
-
printOptimized = true,
|
|
1775
|
-
className,
|
|
1776
|
-
...props
|
|
1777
|
-
}) {
|
|
1778
|
-
const getPaddingClasses = (padding2) => {
|
|
1779
|
-
switch (padding2) {
|
|
1780
|
-
case "none":
|
|
1781
|
-
return "p-0";
|
|
1782
|
-
case "sm":
|
|
1783
|
-
return "p-2";
|
|
1784
|
-
case "lg":
|
|
1785
|
-
return "p-6";
|
|
1786
|
-
default:
|
|
1787
|
-
return "p-4";
|
|
1788
|
-
}
|
|
1789
|
-
};
|
|
1790
|
-
const getBackgroundClasses = (background2) => {
|
|
1791
|
-
switch (background2) {
|
|
1792
|
-
case "white":
|
|
1793
|
-
return "bg-background";
|
|
1794
|
-
case "gray":
|
|
1795
|
-
return "bg-muted";
|
|
1796
|
-
case "primary":
|
|
1797
|
-
return "bg-primary text-primary-foreground";
|
|
1798
|
-
case "secondary":
|
|
1799
|
-
return "bg-secondary text-secondary-foreground";
|
|
1800
|
-
default:
|
|
1801
|
-
return "bg-transparent";
|
|
1802
|
-
}
|
|
1803
|
-
};
|
|
1804
|
-
const getPrintOptimizedClasses = () => {
|
|
1805
|
-
if (!printOptimized) return "";
|
|
1806
|
-
return cn(
|
|
1807
|
-
"print:break-inside-avoid",
|
|
1808
|
-
"print:text-sm",
|
|
1809
|
-
"print:leading-tight",
|
|
1810
|
-
"print:bg-white",
|
|
1811
|
-
"print:text-black"
|
|
1812
|
-
);
|
|
1813
|
-
};
|
|
1814
|
-
return /* @__PURE__ */ jsx22(
|
|
1815
|
-
"div",
|
|
1816
|
-
{
|
|
1817
|
-
className: cn(
|
|
1818
|
-
"print-section-content",
|
|
1819
|
-
getPaddingClasses(padding),
|
|
1820
|
-
getBackgroundClasses(background),
|
|
1821
|
-
getPrintOptimizedClasses(),
|
|
1822
|
-
className
|
|
1823
|
-
),
|
|
1824
|
-
...props,
|
|
1825
|
-
children
|
|
1826
|
-
}
|
|
1827
|
-
);
|
|
1828
|
-
}
|
|
1829
|
-
|
|
1830
|
-
// src/components/PrintSection/PrintColumn.tsx
|
|
1831
|
-
init_cn();
|
|
1832
|
-
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
1833
|
-
function PrintColumn({
|
|
1834
|
-
children,
|
|
1835
|
-
width = "auto",
|
|
1836
|
-
align = "left",
|
|
1837
|
-
verticalAlign = "top",
|
|
1838
|
-
padding = "md",
|
|
1839
|
-
printOptimized = true,
|
|
1840
|
-
className,
|
|
1841
|
-
...props
|
|
1842
|
-
}) {
|
|
1843
|
-
const getWidthClasses = (width2) => {
|
|
1844
|
-
switch (width2) {
|
|
1845
|
-
case "1/2":
|
|
1846
|
-
return "col-span-1";
|
|
1847
|
-
case "1/3":
|
|
1848
|
-
return "col-span-1";
|
|
1849
|
-
case "2/3":
|
|
1850
|
-
return "col-span-2";
|
|
1851
|
-
case "1/4":
|
|
1852
|
-
return "col-span-1";
|
|
1853
|
-
case "3/4":
|
|
1854
|
-
return "col-span-3";
|
|
1855
|
-
case "full":
|
|
1856
|
-
return "col-span-full";
|
|
1857
|
-
default:
|
|
1858
|
-
return "";
|
|
1859
|
-
}
|
|
1860
|
-
};
|
|
1861
|
-
const getAlignmentClasses = (align2) => {
|
|
1862
|
-
switch (align2) {
|
|
1863
|
-
case "center":
|
|
1864
|
-
return "text-center";
|
|
1865
|
-
case "right":
|
|
1866
|
-
return "text-right";
|
|
1867
|
-
default:
|
|
1868
|
-
return "text-left";
|
|
1869
|
-
}
|
|
1870
|
-
};
|
|
1871
|
-
const getVerticalAlignmentClasses = (verticalAlign2) => {
|
|
1872
|
-
switch (verticalAlign2) {
|
|
1873
|
-
case "middle":
|
|
1874
|
-
return "flex items-center";
|
|
1875
|
-
case "bottom":
|
|
1876
|
-
return "flex items-end";
|
|
1877
|
-
default:
|
|
1878
|
-
return "flex items-start";
|
|
1879
|
-
}
|
|
1880
|
-
};
|
|
1881
|
-
const getPaddingClasses = (padding2) => {
|
|
1882
|
-
switch (padding2) {
|
|
1883
|
-
case "none":
|
|
1884
|
-
return "p-0";
|
|
1885
|
-
case "sm":
|
|
1886
|
-
return "p-2";
|
|
1887
|
-
case "lg":
|
|
1888
|
-
return "p-6";
|
|
1889
|
-
default:
|
|
1890
|
-
return "p-4";
|
|
1891
|
-
}
|
|
1892
|
-
};
|
|
1893
|
-
const getPrintOptimizedClasses = () => {
|
|
1894
|
-
if (!printOptimized) return "";
|
|
1895
|
-
return cn(
|
|
1896
|
-
"print:break-inside-avoid",
|
|
1897
|
-
"print:mb-2",
|
|
1898
|
-
"print:text-sm",
|
|
1899
|
-
"print:leading-tight"
|
|
1900
|
-
);
|
|
1901
|
-
};
|
|
1902
|
-
return /* @__PURE__ */ jsx23(
|
|
1903
|
-
"div",
|
|
1904
|
-
{
|
|
1905
|
-
className: cn(
|
|
1906
|
-
"print-column",
|
|
1907
|
-
getWidthClasses(width),
|
|
1908
|
-
getAlignmentClasses(align),
|
|
1909
|
-
getVerticalAlignmentClasses(verticalAlign),
|
|
1910
|
-
getPaddingClasses(padding),
|
|
1911
|
-
getPrintOptimizedClasses(),
|
|
1912
|
-
className
|
|
1913
|
-
),
|
|
1914
|
-
...props,
|
|
1915
|
-
children
|
|
1916
|
-
}
|
|
1917
|
-
);
|
|
1918
|
-
}
|
|
1919
|
-
|
|
1920
|
-
// src/components/PrintSection/PrintDivider.tsx
|
|
1921
|
-
init_cn();
|
|
1922
|
-
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
1923
|
-
function PrintDivider({
|
|
1924
|
-
style = "solid",
|
|
1925
|
-
color = "default",
|
|
1926
|
-
thickness = "thin",
|
|
1927
|
-
spacing = "md",
|
|
1928
|
-
printOptimized = true,
|
|
1929
|
-
className,
|
|
1930
|
-
...props
|
|
1931
|
-
}) {
|
|
1932
|
-
const getStyleClasses = (style2) => {
|
|
1933
|
-
switch (style2) {
|
|
1934
|
-
case "dashed":
|
|
1935
|
-
return "border-dashed";
|
|
1936
|
-
case "dotted":
|
|
1937
|
-
return "border-dotted";
|
|
1938
|
-
case "thick":
|
|
1939
|
-
return "border-solid border-4";
|
|
1940
|
-
default:
|
|
1941
|
-
return "border-solid";
|
|
1942
|
-
}
|
|
1943
|
-
};
|
|
1944
|
-
const getColorClasses = (color2) => {
|
|
1945
|
-
switch (color2) {
|
|
1946
|
-
case "muted":
|
|
1947
|
-
return "border-muted-foreground";
|
|
1948
|
-
case "primary":
|
|
1949
|
-
return "border-primary";
|
|
1950
|
-
case "secondary":
|
|
1951
|
-
return "border-secondary";
|
|
1952
|
-
case "accent":
|
|
1953
|
-
return "border-accent";
|
|
1954
|
-
default:
|
|
1955
|
-
return "border-border";
|
|
1956
|
-
}
|
|
1957
|
-
};
|
|
1958
|
-
const getThicknessClasses = (thickness2, style2) => {
|
|
1959
|
-
if (style2 === "thick") return "";
|
|
1960
|
-
switch (thickness2) {
|
|
1961
|
-
case "medium":
|
|
1962
|
-
return "border-2";
|
|
1963
|
-
case "thick":
|
|
1964
|
-
return "border-4";
|
|
1965
|
-
default:
|
|
1966
|
-
return "border";
|
|
1967
|
-
}
|
|
1968
|
-
};
|
|
1969
|
-
const getSpacingClasses = (spacing2) => {
|
|
1970
|
-
switch (spacing2) {
|
|
1971
|
-
case "none":
|
|
1972
|
-
return "my-0";
|
|
1973
|
-
case "sm":
|
|
1974
|
-
return "my-2";
|
|
1975
|
-
case "lg":
|
|
1976
|
-
return "my-6";
|
|
1977
|
-
default:
|
|
1978
|
-
return "my-4";
|
|
1979
|
-
}
|
|
1980
|
-
};
|
|
1981
|
-
const getPrintOptimizedClasses = () => {
|
|
1982
|
-
if (!printOptimized) return "";
|
|
1983
|
-
return cn(
|
|
1984
|
-
"print:border-black",
|
|
1985
|
-
"print:break-inside-avoid"
|
|
1986
|
-
);
|
|
1987
|
-
};
|
|
1988
|
-
return /* @__PURE__ */ jsx24(
|
|
1989
|
-
"hr",
|
|
1990
|
-
{
|
|
1991
|
-
className: cn(
|
|
1992
|
-
"print-divider",
|
|
1993
|
-
"border-t",
|
|
1994
|
-
getStyleClasses(style),
|
|
1995
|
-
getColorClasses(color),
|
|
1996
|
-
getThicknessClasses(thickness, style),
|
|
1997
|
-
getSpacingClasses(spacing),
|
|
1998
|
-
getPrintOptimizedClasses(),
|
|
1999
|
-
className
|
|
2000
|
-
),
|
|
2001
|
-
...props
|
|
2002
|
-
}
|
|
2003
|
-
);
|
|
2004
|
-
}
|
|
2005
|
-
|
|
2006
|
-
// src/components/PrintButton/PrintButton.tsx
|
|
2007
|
-
init_cn();
|
|
2008
|
-
import { useState as useState4 } from "react";
|
|
2009
|
-
import { jsx as jsx25, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2010
|
-
function PrintButton({
|
|
2011
|
-
children,
|
|
2012
|
-
variant = "primary",
|
|
2013
|
-
size = "md",
|
|
2014
|
-
shape = "default",
|
|
2015
|
-
state = "default",
|
|
2016
|
-
printFunction = "print",
|
|
2017
|
-
printSelector,
|
|
2018
|
-
printOptions = {},
|
|
2019
|
-
onClick,
|
|
2020
|
-
onPrint,
|
|
2021
|
-
onPrintStart,
|
|
2022
|
-
onPrintEnd,
|
|
2023
|
-
showIcon = true,
|
|
2024
|
-
icon,
|
|
2025
|
-
iconPosition = "left",
|
|
2026
|
-
fullWidth = false,
|
|
2027
|
-
printOptimized = true,
|
|
2028
|
-
className,
|
|
2029
|
-
...props
|
|
2030
|
-
}) {
|
|
2031
|
-
const [isPrinting, setIsPrinting] = useState4(false);
|
|
2032
|
-
const getVariantClasses = (variant2) => {
|
|
2033
|
-
switch (variant2) {
|
|
2034
|
-
case "secondary":
|
|
2035
|
-
return "bg-secondary text-secondary-foreground hover:bg-secondary/80";
|
|
2036
|
-
case "outline":
|
|
2037
|
-
return "border border-input bg-background hover:bg-accent hover:text-accent-foreground";
|
|
2038
|
-
case "ghost":
|
|
2039
|
-
return "hover:bg-accent hover:text-accent-foreground";
|
|
2040
|
-
case "destructive":
|
|
2041
|
-
return "bg-destructive text-destructive-foreground hover:bg-destructive/90";
|
|
2042
|
-
default:
|
|
2043
|
-
return "bg-primary text-primary-foreground hover:bg-primary/90";
|
|
2044
|
-
}
|
|
2045
|
-
};
|
|
2046
|
-
const getSizeClasses = (size2) => {
|
|
2047
|
-
switch (size2) {
|
|
2048
|
-
case "sm":
|
|
2049
|
-
return "h-8 px-3 text-xs";
|
|
2050
|
-
case "lg":
|
|
2051
|
-
return "h-12 px-8 text-base";
|
|
2052
|
-
case "xl":
|
|
2053
|
-
return "h-14 px-10 text-lg";
|
|
2054
|
-
default:
|
|
2055
|
-
return "h-10 px-4 text-sm";
|
|
2056
|
-
}
|
|
2057
|
-
};
|
|
2058
|
-
const getShapeClasses = (shape2) => {
|
|
2059
|
-
switch (shape2) {
|
|
2060
|
-
case "rounded":
|
|
2061
|
-
return "rounded-lg";
|
|
2062
|
-
case "pill":
|
|
2063
|
-
return "rounded-full";
|
|
2064
|
-
case "square":
|
|
2065
|
-
return "rounded-none";
|
|
2066
|
-
default:
|
|
2067
|
-
return "rounded-md";
|
|
2068
|
-
}
|
|
2069
|
-
};
|
|
2070
|
-
const getStateClasses = (state2) => {
|
|
2071
|
-
switch (state2) {
|
|
2072
|
-
case "loading":
|
|
2073
|
-
return "opacity-50 cursor-not-allowed";
|
|
2074
|
-
case "disabled":
|
|
2075
|
-
return "opacity-50 cursor-not-allowed pointer-events-none";
|
|
2076
|
-
default:
|
|
2077
|
-
return "cursor-pointer";
|
|
2078
|
-
}
|
|
2079
|
-
};
|
|
2080
|
-
const getPrintOptimizedClasses = () => {
|
|
2081
|
-
if (!printOptimized) return "";
|
|
2082
|
-
return cn(
|
|
2083
|
-
"print:hidden",
|
|
2084
|
-
"print:opacity-0",
|
|
2085
|
-
"print:pointer-events-none"
|
|
2086
|
-
);
|
|
2087
|
-
};
|
|
2088
|
-
const getDefaultIcon = () => {
|
|
2089
|
-
if (icon) return icon;
|
|
2090
|
-
switch (printFunction) {
|
|
2091
|
-
case "printSelection":
|
|
2092
|
-
return "\u{1F4C4}";
|
|
2093
|
-
case "printPage":
|
|
2094
|
-
return "\u{1F4C3}";
|
|
2095
|
-
case "printElement":
|
|
2096
|
-
return "\u{1F3AF}";
|
|
2097
|
-
default:
|
|
2098
|
-
return "\u{1F5A8}\uFE0F";
|
|
2099
|
-
}
|
|
2100
|
-
};
|
|
2101
|
-
const handlePrint = async () => {
|
|
2102
|
-
if (isPrinting || state === "disabled" || state === "loading") return;
|
|
2103
|
-
setIsPrinting(true);
|
|
2104
|
-
onPrintStart?.();
|
|
2105
|
-
try {
|
|
2106
|
-
switch (printFunction) {
|
|
2107
|
-
case "print":
|
|
2108
|
-
await printDocument(printOptions);
|
|
2109
|
-
break;
|
|
2110
|
-
case "printSelection":
|
|
2111
|
-
if (printSelector) {
|
|
2112
|
-
await printSelection(printSelector, printOptions);
|
|
2113
|
-
}
|
|
2114
|
-
break;
|
|
2115
|
-
case "printPage":
|
|
2116
|
-
await printPage(printOptions);
|
|
2117
|
-
break;
|
|
2118
|
-
case "printElement":
|
|
2119
|
-
if (printSelector) {
|
|
2120
|
-
await printElement(printSelector, printOptions);
|
|
2121
|
-
}
|
|
2122
|
-
break;
|
|
2123
|
-
}
|
|
2124
|
-
onPrint?.(true);
|
|
2125
|
-
} catch (error) {
|
|
2126
|
-
onPrint?.(false, error);
|
|
2127
|
-
} finally {
|
|
2128
|
-
setIsPrinting(false);
|
|
2129
|
-
onPrintEnd?.();
|
|
2130
|
-
}
|
|
2131
|
-
};
|
|
2132
|
-
const handleClick = (event) => {
|
|
2133
|
-
if (printFunction) {
|
|
2134
|
-
event.preventDefault();
|
|
2135
|
-
handlePrint();
|
|
2136
|
-
}
|
|
2137
|
-
onClick?.(event);
|
|
2138
|
-
};
|
|
2139
|
-
const isDisabled = state === "disabled" || state === "loading" || isPrinting;
|
|
2140
|
-
return /* @__PURE__ */ jsxs14(
|
|
2141
|
-
"button",
|
|
2142
|
-
{
|
|
2143
|
-
type: "button",
|
|
2144
|
-
className: cn(
|
|
2145
|
-
"print-button",
|
|
2146
|
-
"inline-flex",
|
|
2147
|
-
"items-center",
|
|
2148
|
-
"justify-center",
|
|
2149
|
-
"whitespace-nowrap",
|
|
2150
|
-
"font-medium",
|
|
2151
|
-
"ring-offset-background",
|
|
2152
|
-
"transition-colors",
|
|
2153
|
-
"focus-visible:outline-none",
|
|
2154
|
-
"focus-visible:ring-2",
|
|
2155
|
-
"focus-visible:ring-ring",
|
|
2156
|
-
"focus-visible:ring-offset-2",
|
|
2157
|
-
"disabled:pointer-events-none",
|
|
2158
|
-
"disabled:opacity-50",
|
|
2159
|
-
getVariantClasses(variant),
|
|
2160
|
-
getSizeClasses(size),
|
|
2161
|
-
getShapeClasses(shape),
|
|
2162
|
-
getStateClasses(state),
|
|
2163
|
-
fullWidth && "w-full",
|
|
2164
|
-
getPrintOptimizedClasses(),
|
|
2165
|
-
className
|
|
2166
|
-
),
|
|
2167
|
-
disabled: isDisabled,
|
|
2168
|
-
onClick: handleClick,
|
|
2169
|
-
...props,
|
|
2170
|
-
children: [
|
|
2171
|
-
showIcon && iconPosition === "left" && /* @__PURE__ */ jsx25("span", { className: "mr-2", children: getDefaultIcon() }),
|
|
2172
|
-
children,
|
|
2173
|
-
showIcon && iconPosition === "right" && /* @__PURE__ */ jsx25("span", { className: "ml-2", children: getDefaultIcon() })
|
|
2174
|
-
]
|
|
2175
|
-
}
|
|
2176
|
-
);
|
|
2177
|
-
}
|
|
2178
|
-
async function printDocument(options) {
|
|
2179
|
-
return new Promise((resolve, reject) => {
|
|
2180
|
-
try {
|
|
2181
|
-
if (options.stylesheetUrl) {
|
|
2182
|
-
const link = document.createElement("link");
|
|
2183
|
-
link.rel = "stylesheet";
|
|
2184
|
-
link.href = options.stylesheetUrl;
|
|
2185
|
-
link.media = options.mediaQuery || "print";
|
|
2186
|
-
document.head.appendChild(link);
|
|
2187
|
-
}
|
|
2188
|
-
const printWindow = window.open("", "_blank");
|
|
2189
|
-
if (!printWindow) {
|
|
2190
|
-
reject(new Error("Unable to open print window"));
|
|
2191
|
-
return;
|
|
2192
|
-
}
|
|
2193
|
-
printWindow.document.write(`
|
|
2194
|
-
<html>
|
|
2195
|
-
<head>
|
|
2196
|
-
<title>${options.title || "Print Document"}</title>
|
|
2197
|
-
<style>
|
|
2198
|
-
@page {
|
|
2199
|
-
margin: ${options.margins?.top || "0.5in"} ${options.margins?.right || "0.5in"} ${options.margins?.bottom || "0.5in"} ${options.margins?.left || "0.5in"};
|
|
2200
|
-
size: ${options.orientation === "landscape" ? "A4 landscape" : "A4 portrait"};
|
|
2201
|
-
}
|
|
2202
|
-
body {
|
|
2203
|
-
font-family: Arial, sans-serif;
|
|
2204
|
-
line-height: 1.4;
|
|
2205
|
-
color: #000;
|
|
2206
|
-
background: #fff;
|
|
2207
|
-
}
|
|
2208
|
-
@media print {
|
|
2209
|
-
* { -webkit-print-color-adjust: ${options.colorAdjust || "exact"}; }
|
|
2210
|
-
}
|
|
2211
|
-
</style>
|
|
2212
|
-
</head>
|
|
2213
|
-
<body>
|
|
2214
|
-
${document.documentElement.outerHTML}
|
|
2215
|
-
</body>
|
|
2216
|
-
</html>
|
|
2217
|
-
`);
|
|
2218
|
-
printWindow.document.close();
|
|
2219
|
-
printWindow.focus();
|
|
2220
|
-
printWindow.print();
|
|
2221
|
-
printWindow.close();
|
|
2222
|
-
resolve();
|
|
2223
|
-
} catch (error) {
|
|
2224
|
-
reject(error);
|
|
2225
|
-
}
|
|
2226
|
-
});
|
|
2227
|
-
}
|
|
2228
|
-
async function printSelection(selector, options) {
|
|
2229
|
-
const element = document.querySelector(selector);
|
|
2230
|
-
if (!element) {
|
|
2231
|
-
throw new Error(`Element with selector "${selector}" not found`);
|
|
2232
|
-
}
|
|
2233
|
-
return printElement(selector, options);
|
|
2234
|
-
}
|
|
2235
|
-
async function printPage(options) {
|
|
2236
|
-
return printDocument(options);
|
|
2237
|
-
}
|
|
2238
|
-
async function printElement(selector, options) {
|
|
2239
|
-
const element = document.querySelector(selector);
|
|
2240
|
-
if (!element) {
|
|
2241
|
-
throw new Error(`Element with selector "${selector}" not found`);
|
|
2242
|
-
}
|
|
2243
|
-
return new Promise((resolve, reject) => {
|
|
2244
|
-
try {
|
|
2245
|
-
const printWindow = window.open("", "_blank");
|
|
2246
|
-
if (!printWindow) {
|
|
2247
|
-
reject(new Error("Unable to open print window"));
|
|
2248
|
-
return;
|
|
2249
|
-
}
|
|
2250
|
-
printWindow.document.write(`
|
|
2251
|
-
<html>
|
|
2252
|
-
<head>
|
|
2253
|
-
<title>${options.title || "Print Element"}</title>
|
|
2254
|
-
<style>
|
|
2255
|
-
@page {
|
|
2256
|
-
margin: ${options.margins?.top || "0.5in"} ${options.margins?.right || "0.5in"} ${options.margins?.bottom || "0.5in"} ${options.margins?.left || "0.5in"};
|
|
2257
|
-
size: ${options.orientation === "landscape" ? "A4 landscape" : "A4 portrait"};
|
|
2258
|
-
}
|
|
2259
|
-
body {
|
|
2260
|
-
font-family: Arial, sans-serif;
|
|
2261
|
-
line-height: 1.4;
|
|
2262
|
-
color: #000;
|
|
2263
|
-
background: #fff;
|
|
2264
|
-
}
|
|
2265
|
-
@media print {
|
|
2266
|
-
* { -webkit-print-color-adjust: ${options.colorAdjust || "exact"}; }
|
|
2267
|
-
}
|
|
2268
|
-
</style>
|
|
2269
|
-
</head>
|
|
2270
|
-
<body>
|
|
2271
|
-
${element.outerHTML}
|
|
2272
|
-
</body>
|
|
2273
|
-
</html>
|
|
2274
|
-
`);
|
|
2275
|
-
printWindow.document.close();
|
|
2276
|
-
printWindow.focus();
|
|
2277
|
-
printWindow.print();
|
|
2278
|
-
printWindow.close();
|
|
2279
|
-
resolve();
|
|
2280
|
-
} catch (error) {
|
|
2281
|
-
reject(error);
|
|
2282
|
-
}
|
|
2283
|
-
});
|
|
2284
|
-
}
|
|
2285
|
-
|
|
2286
|
-
// src/components/PrintButton/PrintButtonGroup.tsx
|
|
2287
|
-
init_cn();
|
|
2288
|
-
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
2289
|
-
function PrintButtonGroup({
|
|
2290
|
-
children,
|
|
2291
|
-
orientation = "horizontal",
|
|
2292
|
-
spacing = "md",
|
|
2293
|
-
align = "left",
|
|
2294
|
-
printOptimized = true,
|
|
2295
|
-
className,
|
|
2296
|
-
...props
|
|
2297
|
-
}) {
|
|
2298
|
-
const getOrientationClasses = (orientation2) => {
|
|
2299
|
-
switch (orientation2) {
|
|
2300
|
-
case "vertical":
|
|
2301
|
-
return "flex-col";
|
|
2302
|
-
default:
|
|
2303
|
-
return "flex-row";
|
|
2304
|
-
}
|
|
2305
|
-
};
|
|
2306
|
-
const getSpacingClasses = (spacing2) => {
|
|
2307
|
-
switch (spacing2) {
|
|
2308
|
-
case "none":
|
|
2309
|
-
return "gap-0";
|
|
2310
|
-
case "sm":
|
|
2311
|
-
return "gap-2";
|
|
2312
|
-
case "lg":
|
|
2313
|
-
return "gap-6";
|
|
2314
|
-
default:
|
|
2315
|
-
return "gap-4";
|
|
2316
|
-
}
|
|
2317
|
-
};
|
|
2318
|
-
const getAlignmentClasses = (align2) => {
|
|
2319
|
-
switch (align2) {
|
|
2320
|
-
case "center":
|
|
2321
|
-
return "justify-center";
|
|
2322
|
-
case "right":
|
|
2323
|
-
return "justify-end";
|
|
2324
|
-
case "stretch":
|
|
2325
|
-
return "justify-stretch";
|
|
2326
|
-
default:
|
|
2327
|
-
return "justify-start";
|
|
2328
|
-
}
|
|
2329
|
-
};
|
|
2330
|
-
const getPrintOptimizedClasses = () => {
|
|
2331
|
-
if (!printOptimized) return "";
|
|
2332
|
-
return cn(
|
|
2333
|
-
"print:hidden",
|
|
2334
|
-
"print:opacity-0",
|
|
2335
|
-
"print:pointer-events-none"
|
|
2336
|
-
);
|
|
2337
|
-
};
|
|
2338
|
-
return /* @__PURE__ */ jsx26(
|
|
2339
|
-
"div",
|
|
2340
|
-
{
|
|
2341
|
-
className: cn(
|
|
2342
|
-
"print-button-group",
|
|
2343
|
-
"flex",
|
|
2344
|
-
"items-center",
|
|
2345
|
-
getOrientationClasses(orientation),
|
|
2346
|
-
getSpacingClasses(spacing),
|
|
2347
|
-
getAlignmentClasses(align),
|
|
2348
|
-
getPrintOptimizedClasses(),
|
|
2349
|
-
className
|
|
2350
|
-
),
|
|
2351
|
-
...props,
|
|
2352
|
-
children
|
|
2353
|
-
}
|
|
2354
|
-
);
|
|
2355
|
-
}
|
|
2356
|
-
|
|
2357
|
-
// src/components/PrintButton/PrintToolbar.tsx
|
|
2358
|
-
init_cn();
|
|
2359
|
-
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
2360
|
-
function PrintToolbar({
|
|
2361
|
-
children,
|
|
2362
|
-
position = "top",
|
|
2363
|
-
align = "left",
|
|
2364
|
-
showOnPrint = false,
|
|
2365
|
-
printOptimized = true,
|
|
2366
|
-
className,
|
|
2367
|
-
...props
|
|
2368
|
-
}) {
|
|
2369
|
-
const getPositionClasses = (position2) => {
|
|
2370
|
-
switch (position2) {
|
|
2371
|
-
case "bottom":
|
|
2372
|
-
return "fixed bottom-0 left-0 right-0";
|
|
2373
|
-
case "fixed":
|
|
2374
|
-
return "fixed top-4 right-4";
|
|
2375
|
-
default:
|
|
2376
|
-
return "relative";
|
|
2377
|
-
}
|
|
2378
|
-
};
|
|
2379
|
-
const getAlignmentClasses = (align2) => {
|
|
2380
|
-
switch (align2) {
|
|
2381
|
-
case "center":
|
|
2382
|
-
return "justify-center";
|
|
2383
|
-
case "right":
|
|
2384
|
-
return "justify-end";
|
|
2385
|
-
default:
|
|
2386
|
-
return "justify-start";
|
|
2387
|
-
}
|
|
2388
|
-
};
|
|
2389
|
-
const getPrintOptimizedClasses = () => {
|
|
2390
|
-
if (!printOptimized) return "";
|
|
2391
|
-
if (showOnPrint) {
|
|
2392
|
-
return cn(
|
|
2393
|
-
"print:block",
|
|
2394
|
-
"print:opacity-100",
|
|
2395
|
-
"print:pointer-events-auto"
|
|
2396
|
-
);
|
|
2397
|
-
} else {
|
|
2398
|
-
return cn(
|
|
2399
|
-
"print:hidden",
|
|
2400
|
-
"print:opacity-0",
|
|
2401
|
-
"print:pointer-events-none"
|
|
2402
|
-
);
|
|
2403
|
-
}
|
|
2404
|
-
};
|
|
2405
|
-
const getZIndexClasses = () => {
|
|
2406
|
-
if (position === "fixed" || position === "bottom") {
|
|
2407
|
-
return "z-50";
|
|
2408
|
-
}
|
|
2409
|
-
return "";
|
|
2410
|
-
};
|
|
2411
|
-
return /* @__PURE__ */ jsx27(
|
|
2412
|
-
"div",
|
|
2413
|
-
{
|
|
2414
|
-
className: cn(
|
|
2415
|
-
"print-toolbar",
|
|
2416
|
-
"flex",
|
|
2417
|
-
"items-center",
|
|
2418
|
-
"gap-2",
|
|
2419
|
-
"p-4",
|
|
2420
|
-
"bg-background",
|
|
2421
|
-
"border",
|
|
2422
|
-
"border-border",
|
|
2423
|
-
"rounded-lg",
|
|
2424
|
-
"shadow-lg",
|
|
2425
|
-
getPositionClasses(position),
|
|
2426
|
-
getAlignmentClasses(align),
|
|
2427
|
-
getZIndexClasses(),
|
|
2428
|
-
getPrintOptimizedClasses(),
|
|
2429
|
-
className
|
|
2430
|
-
),
|
|
2431
|
-
...props,
|
|
2432
|
-
children
|
|
2433
|
-
}
|
|
2434
|
-
);
|
|
2435
|
-
}
|
|
2436
|
-
|
|
2437
|
-
// src/components/PrintGrid/PrintGrid.tsx
|
|
2438
|
-
init_cn();
|
|
2439
|
-
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
2440
|
-
function PrintGrid({
|
|
2441
|
-
children,
|
|
2442
|
-
columns = 12,
|
|
2443
|
-
gap = "md",
|
|
2444
|
-
rowGap,
|
|
2445
|
-
columnGap,
|
|
2446
|
-
align = "stretch",
|
|
2447
|
-
justify = "start",
|
|
2448
|
-
printColumns,
|
|
2449
|
-
printGap,
|
|
2450
|
-
printRowGap,
|
|
2451
|
-
printColumnGap,
|
|
2452
|
-
printOptimized = true,
|
|
2453
|
-
className,
|
|
2454
|
-
...props
|
|
2455
|
-
}) {
|
|
2456
|
-
const getColumnsClasses = (cols) => {
|
|
2457
|
-
switch (cols) {
|
|
2458
|
-
case 1:
|
|
2459
|
-
return "grid-cols-1";
|
|
2460
|
-
case 2:
|
|
2461
|
-
return "grid-cols-2";
|
|
2462
|
-
case 3:
|
|
2463
|
-
return "grid-cols-3";
|
|
2464
|
-
case 4:
|
|
2465
|
-
return "grid-cols-4";
|
|
2466
|
-
case 5:
|
|
2467
|
-
return "grid-cols-5";
|
|
2468
|
-
case 6:
|
|
2469
|
-
return "grid-cols-6";
|
|
2470
|
-
case 12:
|
|
2471
|
-
return "grid-cols-12";
|
|
2472
|
-
default:
|
|
2473
|
-
return "grid-cols-12";
|
|
2474
|
-
}
|
|
2475
|
-
};
|
|
2476
|
-
const getGapClasses = (gap2) => {
|
|
2477
|
-
switch (gap2) {
|
|
2478
|
-
case "none":
|
|
2479
|
-
return "gap-0";
|
|
2480
|
-
case "sm":
|
|
2481
|
-
return "gap-2";
|
|
2482
|
-
case "lg":
|
|
2483
|
-
return "gap-6";
|
|
2484
|
-
case "xl":
|
|
2485
|
-
return "gap-8";
|
|
2486
|
-
default:
|
|
2487
|
-
return "gap-4";
|
|
2488
|
-
}
|
|
2489
|
-
};
|
|
2490
|
-
const getRowGapClasses = (gap2) => {
|
|
2491
|
-
switch (gap2) {
|
|
2492
|
-
case "none":
|
|
2493
|
-
return "gap-y-0";
|
|
2494
|
-
case "sm":
|
|
2495
|
-
return "gap-y-2";
|
|
2496
|
-
case "lg":
|
|
2497
|
-
return "gap-y-6";
|
|
2498
|
-
case "xl":
|
|
2499
|
-
return "gap-y-8";
|
|
2500
|
-
default:
|
|
2501
|
-
return "gap-y-4";
|
|
2502
|
-
}
|
|
2503
|
-
};
|
|
2504
|
-
const getColumnGapClasses = (gap2) => {
|
|
2505
|
-
switch (gap2) {
|
|
2506
|
-
case "none":
|
|
2507
|
-
return "gap-x-0";
|
|
2508
|
-
case "sm":
|
|
2509
|
-
return "gap-x-2";
|
|
2510
|
-
case "lg":
|
|
2511
|
-
return "gap-x-6";
|
|
2512
|
-
case "xl":
|
|
2513
|
-
return "gap-x-8";
|
|
2514
|
-
default:
|
|
2515
|
-
return "gap-x-4";
|
|
2516
|
-
}
|
|
2517
|
-
};
|
|
2518
|
-
const getAlignmentClasses = (align2) => {
|
|
2519
|
-
switch (align2) {
|
|
2520
|
-
case "start":
|
|
2521
|
-
return "items-start";
|
|
2522
|
-
case "center":
|
|
2523
|
-
return "items-center";
|
|
2524
|
-
case "end":
|
|
2525
|
-
return "items-end";
|
|
2526
|
-
default:
|
|
2527
|
-
return "items-stretch";
|
|
2528
|
-
}
|
|
2529
|
-
};
|
|
2530
|
-
const getJustifyClasses = (justify2) => {
|
|
2531
|
-
switch (justify2) {
|
|
2532
|
-
case "center":
|
|
2533
|
-
return "justify-center";
|
|
2534
|
-
case "end":
|
|
2535
|
-
return "justify-end";
|
|
2536
|
-
case "between":
|
|
2537
|
-
return "justify-between";
|
|
2538
|
-
case "around":
|
|
2539
|
-
return "justify-around";
|
|
2540
|
-
case "evenly":
|
|
2541
|
-
return "justify-evenly";
|
|
2542
|
-
default:
|
|
2543
|
-
return "justify-start";
|
|
2544
|
-
}
|
|
2545
|
-
};
|
|
2546
|
-
const getPrintOptimizedClasses = () => {
|
|
2547
|
-
if (!printOptimized) return "";
|
|
2548
|
-
return cn(
|
|
2549
|
-
"print:break-inside-avoid",
|
|
2550
|
-
"print:mb-4"
|
|
2551
|
-
);
|
|
2552
|
-
};
|
|
2553
|
-
const getPrintColumnsClasses = () => {
|
|
2554
|
-
if (!printColumns) return "";
|
|
2555
|
-
return cn(
|
|
2556
|
-
"print:grid",
|
|
2557
|
-
`print:${getColumnsClasses(printColumns)}`
|
|
2558
|
-
);
|
|
2559
|
-
};
|
|
2560
|
-
const getPrintGapClasses = () => {
|
|
2561
|
-
if (!printGap) return "";
|
|
2562
|
-
return `print:${getGapClasses(printGap)}`;
|
|
2563
|
-
};
|
|
2564
|
-
const getPrintRowGapClasses = () => {
|
|
2565
|
-
if (!printRowGap) return "";
|
|
2566
|
-
return `print:${getRowGapClasses(printRowGap)}`;
|
|
2567
|
-
};
|
|
2568
|
-
const getPrintColumnGapClasses = () => {
|
|
2569
|
-
if (!printColumnGap) return "";
|
|
2570
|
-
return `print:${getColumnGapClasses(printColumnGap)}`;
|
|
2571
|
-
};
|
|
2572
|
-
return /* @__PURE__ */ jsx28(
|
|
2573
|
-
"div",
|
|
2574
|
-
{
|
|
2575
|
-
className: cn(
|
|
2576
|
-
"print-grid",
|
|
2577
|
-
"grid",
|
|
2578
|
-
getColumnsClasses(columns),
|
|
2579
|
-
getGapClasses(gap),
|
|
2580
|
-
rowGap && getRowGapClasses(rowGap),
|
|
2581
|
-
columnGap && getColumnGapClasses(columnGap),
|
|
2582
|
-
getAlignmentClasses(align),
|
|
2583
|
-
getJustifyClasses(justify),
|
|
2584
|
-
getPrintOptimizedClasses(),
|
|
2585
|
-
getPrintColumnsClasses(),
|
|
2586
|
-
getPrintGapClasses(),
|
|
2587
|
-
getPrintRowGapClasses(),
|
|
2588
|
-
getPrintColumnGapClasses(),
|
|
2589
|
-
className
|
|
2590
|
-
),
|
|
2591
|
-
...props,
|
|
2592
|
-
children
|
|
2593
|
-
}
|
|
2594
|
-
);
|
|
2595
|
-
}
|
|
2596
|
-
|
|
2597
|
-
// src/components/PrintGrid/PrintGridItem.tsx
|
|
2598
|
-
init_cn();
|
|
2599
|
-
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
2600
|
-
function PrintGridItem({
|
|
2601
|
-
children,
|
|
2602
|
-
colSpan = 1,
|
|
2603
|
-
rowSpan = 1,
|
|
2604
|
-
colStart,
|
|
2605
|
-
rowStart,
|
|
2606
|
-
align = "stretch",
|
|
2607
|
-
justify = "start",
|
|
2608
|
-
printColSpan,
|
|
2609
|
-
printRowSpan,
|
|
2610
|
-
printColStart,
|
|
2611
|
-
printRowStart,
|
|
2612
|
-
printOptimized = true,
|
|
2613
|
-
className,
|
|
2614
|
-
...props
|
|
2615
|
-
}) {
|
|
2616
|
-
const getColSpanClasses = (span) => {
|
|
2617
|
-
if (span === "full") return "col-span-full";
|
|
2618
|
-
switch (span) {
|
|
2619
|
-
case 1:
|
|
2620
|
-
return "col-span-1";
|
|
2621
|
-
case 2:
|
|
2622
|
-
return "col-span-2";
|
|
2623
|
-
case 3:
|
|
2624
|
-
return "col-span-3";
|
|
2625
|
-
case 4:
|
|
2626
|
-
return "col-span-4";
|
|
2627
|
-
case 5:
|
|
2628
|
-
return "col-span-5";
|
|
2629
|
-
case 6:
|
|
2630
|
-
return "col-span-6";
|
|
2631
|
-
case 12:
|
|
2632
|
-
return "col-span-12";
|
|
2633
|
-
default:
|
|
2634
|
-
return "col-span-1";
|
|
2635
|
-
}
|
|
2636
|
-
};
|
|
2637
|
-
const getRowSpanClasses = (span) => {
|
|
2638
|
-
if (span === "full") return "row-span-full";
|
|
2639
|
-
switch (span) {
|
|
2640
|
-
case 1:
|
|
2641
|
-
return "row-span-1";
|
|
2642
|
-
case 2:
|
|
2643
|
-
return "row-span-2";
|
|
2644
|
-
case 3:
|
|
2645
|
-
return "row-span-3";
|
|
2646
|
-
case 4:
|
|
2647
|
-
return "row-span-4";
|
|
2648
|
-
case 5:
|
|
2649
|
-
return "row-span-5";
|
|
2650
|
-
case 6:
|
|
2651
|
-
return "row-span-6";
|
|
2652
|
-
default:
|
|
2653
|
-
return "row-span-1";
|
|
2654
|
-
}
|
|
2655
|
-
};
|
|
2656
|
-
const getColStartClasses = (start) => {
|
|
2657
|
-
if (start === "auto") return "col-start-auto";
|
|
2658
|
-
switch (start) {
|
|
2659
|
-
case 1:
|
|
2660
|
-
return "col-start-1";
|
|
2661
|
-
case 2:
|
|
2662
|
-
return "col-start-2";
|
|
2663
|
-
case 3:
|
|
2664
|
-
return "col-start-3";
|
|
2665
|
-
case 4:
|
|
2666
|
-
return "col-start-4";
|
|
2667
|
-
case 5:
|
|
2668
|
-
return "col-start-5";
|
|
2669
|
-
case 6:
|
|
2670
|
-
return "col-start-6";
|
|
2671
|
-
case 7:
|
|
2672
|
-
return "col-start-7";
|
|
2673
|
-
case 8:
|
|
2674
|
-
return "col-start-8";
|
|
2675
|
-
case 9:
|
|
2676
|
-
return "col-start-9";
|
|
2677
|
-
case 10:
|
|
2678
|
-
return "col-start-10";
|
|
2679
|
-
case 11:
|
|
2680
|
-
return "col-start-11";
|
|
2681
|
-
case 12:
|
|
2682
|
-
return "col-start-12";
|
|
2683
|
-
case 13:
|
|
2684
|
-
return "col-start-13";
|
|
2685
|
-
default:
|
|
2686
|
-
return "col-start-auto";
|
|
2687
|
-
}
|
|
2688
|
-
};
|
|
2689
|
-
const getRowStartClasses = (start) => {
|
|
2690
|
-
if (start === "auto") return "row-start-auto";
|
|
2691
|
-
switch (start) {
|
|
2692
|
-
case 1:
|
|
2693
|
-
return "row-start-1";
|
|
2694
|
-
case 2:
|
|
2695
|
-
return "row-start-2";
|
|
2696
|
-
case 3:
|
|
2697
|
-
return "row-start-3";
|
|
2698
|
-
case 4:
|
|
2699
|
-
return "row-start-4";
|
|
2700
|
-
case 5:
|
|
2701
|
-
return "row-start-5";
|
|
2702
|
-
case 6:
|
|
2703
|
-
return "row-start-6";
|
|
2704
|
-
case 7:
|
|
2705
|
-
return "row-start-7";
|
|
2706
|
-
case 8:
|
|
2707
|
-
return "row-start-8";
|
|
2708
|
-
case 9:
|
|
2709
|
-
return "row-start-9";
|
|
2710
|
-
case 10:
|
|
2711
|
-
return "row-start-10";
|
|
2712
|
-
case 11:
|
|
2713
|
-
return "row-start-11";
|
|
2714
|
-
case 12:
|
|
2715
|
-
return "row-start-12";
|
|
2716
|
-
case 13:
|
|
2717
|
-
return "row-start-13";
|
|
2718
|
-
default:
|
|
2719
|
-
return "row-start-auto";
|
|
2720
|
-
}
|
|
2721
|
-
};
|
|
2722
|
-
const getAlignmentClasses = (align2) => {
|
|
2723
|
-
switch (align2) {
|
|
2724
|
-
case "start":
|
|
2725
|
-
return "self-start";
|
|
2726
|
-
case "center":
|
|
2727
|
-
return "self-center";
|
|
2728
|
-
case "end":
|
|
2729
|
-
return "self-end";
|
|
2730
|
-
default:
|
|
2731
|
-
return "self-stretch";
|
|
2732
|
-
}
|
|
2733
|
-
};
|
|
2734
|
-
const getJustifyClasses = (justify2) => {
|
|
2735
|
-
switch (justify2) {
|
|
2736
|
-
case "center":
|
|
2737
|
-
return "justify-self-center";
|
|
2738
|
-
case "end":
|
|
2739
|
-
return "justify-self-end";
|
|
2740
|
-
case "stretch":
|
|
2741
|
-
return "justify-self-stretch";
|
|
2742
|
-
default:
|
|
2743
|
-
return "justify-self-start";
|
|
2744
|
-
}
|
|
2745
|
-
};
|
|
2746
|
-
const getPrintOptimizedClasses = () => {
|
|
2747
|
-
if (!printOptimized) return "";
|
|
2748
|
-
return cn(
|
|
2749
|
-
"print:break-inside-avoid",
|
|
2750
|
-
"print:mb-2"
|
|
2751
|
-
);
|
|
2752
|
-
};
|
|
2753
|
-
const getPrintColSpanClasses = () => {
|
|
2754
|
-
if (!printColSpan) return "";
|
|
2755
|
-
return `print:${getColSpanClasses(printColSpan)}`;
|
|
2756
|
-
};
|
|
2757
|
-
const getPrintRowSpanClasses = () => {
|
|
2758
|
-
if (!printRowSpan) return "";
|
|
2759
|
-
return `print:${getRowSpanClasses(printRowSpan)}`;
|
|
2760
|
-
};
|
|
2761
|
-
const getPrintColStartClasses = () => {
|
|
2762
|
-
if (!printColStart) return "";
|
|
2763
|
-
return `print:${getColStartClasses(printColStart)}`;
|
|
2764
|
-
};
|
|
2765
|
-
const getPrintRowStartClasses = () => {
|
|
2766
|
-
if (!printRowStart) return "";
|
|
2767
|
-
return `print:${getRowStartClasses(printRowStart)}`;
|
|
2768
|
-
};
|
|
2769
|
-
return /* @__PURE__ */ jsx29(
|
|
2770
|
-
"div",
|
|
2771
|
-
{
|
|
2772
|
-
className: cn(
|
|
2773
|
-
"print-grid-item",
|
|
2774
|
-
getColSpanClasses(colSpan),
|
|
2775
|
-
getRowSpanClasses(rowSpan),
|
|
2776
|
-
colStart && getColStartClasses(colStart),
|
|
2777
|
-
rowStart && getRowStartClasses(rowStart),
|
|
2778
|
-
getAlignmentClasses(align),
|
|
2779
|
-
getJustifyClasses(justify),
|
|
2780
|
-
getPrintOptimizedClasses(),
|
|
2781
|
-
getPrintColSpanClasses(),
|
|
2782
|
-
getPrintRowSpanClasses(),
|
|
2783
|
-
getPrintColStartClasses(),
|
|
2784
|
-
getPrintRowStartClasses(),
|
|
2785
|
-
className
|
|
2786
|
-
),
|
|
2787
|
-
...props,
|
|
2788
|
-
children
|
|
2789
|
-
}
|
|
2790
|
-
);
|
|
2791
|
-
}
|
|
2792
|
-
|
|
2793
|
-
// src/components/PrintGrid/PrintGridContainer.tsx
|
|
2794
|
-
init_cn();
|
|
2795
|
-
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
2796
|
-
function PrintGridContainer({
|
|
2797
|
-
children,
|
|
2798
|
-
maxWidth = "full",
|
|
2799
|
-
padding = "md",
|
|
2800
|
-
margin = "none",
|
|
2801
|
-
background = "transparent",
|
|
2802
|
-
printOptimized = true,
|
|
2803
|
-
className,
|
|
2804
|
-
...props
|
|
2805
|
-
}) {
|
|
2806
|
-
const getMaxWidthClasses = (maxWidth2) => {
|
|
2807
|
-
switch (maxWidth2) {
|
|
2808
|
-
case "sm":
|
|
2809
|
-
return "max-w-sm";
|
|
2810
|
-
case "md":
|
|
2811
|
-
return "max-w-md";
|
|
2812
|
-
case "lg":
|
|
2813
|
-
return "max-w-lg";
|
|
2814
|
-
case "xl":
|
|
2815
|
-
return "max-w-xl";
|
|
2816
|
-
case "2xl":
|
|
2817
|
-
return "max-w-2xl";
|
|
2818
|
-
case "3xl":
|
|
2819
|
-
return "max-w-3xl";
|
|
2820
|
-
case "4xl":
|
|
2821
|
-
return "max-w-4xl";
|
|
2822
|
-
case "5xl":
|
|
2823
|
-
return "max-w-5xl";
|
|
2824
|
-
case "6xl":
|
|
2825
|
-
return "max-w-6xl";
|
|
2826
|
-
case "7xl":
|
|
2827
|
-
return "max-w-7xl";
|
|
2828
|
-
case "full":
|
|
2829
|
-
return "max-w-full";
|
|
2830
|
-
default:
|
|
2831
|
-
return "max-w-full";
|
|
2832
|
-
}
|
|
2833
|
-
};
|
|
2834
|
-
const getPaddingClasses = (padding2) => {
|
|
2835
|
-
switch (padding2) {
|
|
2836
|
-
case "none":
|
|
2837
|
-
return "p-0";
|
|
2838
|
-
case "sm":
|
|
2839
|
-
return "p-2";
|
|
2840
|
-
case "lg":
|
|
2841
|
-
return "p-6";
|
|
2842
|
-
case "xl":
|
|
2843
|
-
return "p-8";
|
|
2844
|
-
default:
|
|
2845
|
-
return "p-4";
|
|
2846
|
-
}
|
|
2847
|
-
};
|
|
2848
|
-
const getMarginClasses = (margin2) => {
|
|
2849
|
-
switch (margin2) {
|
|
2850
|
-
case "none":
|
|
2851
|
-
return "m-0";
|
|
2852
|
-
case "sm":
|
|
2853
|
-
return "m-2";
|
|
2854
|
-
case "md":
|
|
2855
|
-
return "m-4";
|
|
2856
|
-
case "lg":
|
|
2857
|
-
return "m-6";
|
|
2858
|
-
case "xl":
|
|
2859
|
-
return "m-8";
|
|
2860
|
-
case "auto":
|
|
2861
|
-
return "mx-auto";
|
|
2862
|
-
default:
|
|
2863
|
-
return "m-0";
|
|
2864
|
-
}
|
|
2865
|
-
};
|
|
2866
|
-
const getBackgroundClasses = (background2) => {
|
|
2867
|
-
switch (background2) {
|
|
2868
|
-
case "white":
|
|
2869
|
-
return "bg-background";
|
|
2870
|
-
case "gray":
|
|
2871
|
-
return "bg-muted";
|
|
2872
|
-
case "primary":
|
|
2873
|
-
return "bg-primary text-primary-foreground";
|
|
2874
|
-
case "secondary":
|
|
2875
|
-
return "bg-secondary text-secondary-foreground";
|
|
2876
|
-
default:
|
|
2877
|
-
return "bg-transparent";
|
|
2878
|
-
}
|
|
2879
|
-
};
|
|
2880
|
-
const getPrintOptimizedClasses = () => {
|
|
2881
|
-
if (!printOptimized) return "";
|
|
2882
|
-
return cn(
|
|
2883
|
-
"print:max-w-full",
|
|
2884
|
-
"print:break-inside-avoid",
|
|
2885
|
-
"print:mb-4"
|
|
2886
|
-
);
|
|
2887
|
-
};
|
|
2888
|
-
return /* @__PURE__ */ jsx30(
|
|
2889
|
-
"div",
|
|
2890
|
-
{
|
|
2891
|
-
className: cn(
|
|
2892
|
-
"print-grid-container",
|
|
2893
|
-
"w-full",
|
|
2894
|
-
getMaxWidthClasses(maxWidth),
|
|
2895
|
-
getPaddingClasses(padding),
|
|
2896
|
-
getMarginClasses(margin),
|
|
2897
|
-
getBackgroundClasses(background),
|
|
2898
|
-
getPrintOptimizedClasses(),
|
|
2899
|
-
className
|
|
2900
|
-
),
|
|
2901
|
-
...props,
|
|
2902
|
-
children
|
|
2903
|
-
}
|
|
2904
|
-
);
|
|
2905
|
-
}
|
|
2906
|
-
|
|
2907
|
-
// src/components/PrintGrid/PrintGridBreakpoint.tsx
|
|
2908
|
-
init_cn();
|
|
2909
|
-
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
2910
|
-
function PrintGridBreakpoint({
|
|
2911
|
-
children,
|
|
2912
|
-
size = "md",
|
|
2913
|
-
columns = 12,
|
|
2914
|
-
gap = "md",
|
|
2915
|
-
printOptimized = true,
|
|
2916
|
-
className,
|
|
2917
|
-
...props
|
|
2918
|
-
}) {
|
|
2919
|
-
const getSizeClasses = (size2) => {
|
|
2920
|
-
switch (size2) {
|
|
2921
|
-
case "sm":
|
|
2922
|
-
return "sm:";
|
|
2923
|
-
case "md":
|
|
2924
|
-
return "md:";
|
|
2925
|
-
case "lg":
|
|
2926
|
-
return "lg:";
|
|
2927
|
-
case "xl":
|
|
2928
|
-
return "xl:";
|
|
2929
|
-
case "2xl":
|
|
2930
|
-
return "2xl:";
|
|
2931
|
-
default:
|
|
2932
|
-
return "md:";
|
|
2933
|
-
}
|
|
2934
|
-
};
|
|
2935
|
-
const getColumnsClasses = (cols) => {
|
|
2936
|
-
switch (cols) {
|
|
2937
|
-
case 1:
|
|
2938
|
-
return "grid-cols-1";
|
|
2939
|
-
case 2:
|
|
2940
|
-
return "grid-cols-2";
|
|
2941
|
-
case 3:
|
|
2942
|
-
return "grid-cols-3";
|
|
2943
|
-
case 4:
|
|
2944
|
-
return "grid-cols-4";
|
|
2945
|
-
case 5:
|
|
2946
|
-
return "grid-cols-5";
|
|
2947
|
-
case 6:
|
|
2948
|
-
return "grid-cols-6";
|
|
2949
|
-
case 12:
|
|
2950
|
-
return "grid-cols-12";
|
|
2951
|
-
default:
|
|
2952
|
-
return "grid-cols-12";
|
|
2953
|
-
}
|
|
2954
|
-
};
|
|
2955
|
-
const getGapClasses = (gap2) => {
|
|
2956
|
-
switch (gap2) {
|
|
2957
|
-
case "none":
|
|
2958
|
-
return "gap-0";
|
|
2959
|
-
case "sm":
|
|
2960
|
-
return "gap-2";
|
|
2961
|
-
case "lg":
|
|
2962
|
-
return "gap-6";
|
|
2963
|
-
case "xl":
|
|
2964
|
-
return "gap-8";
|
|
2965
|
-
default:
|
|
2966
|
-
return "gap-4";
|
|
2967
|
-
}
|
|
2968
|
-
};
|
|
2969
|
-
const getPrintOptimizedClasses = () => {
|
|
2970
|
-
if (!printOptimized) return "";
|
|
2971
|
-
return cn(
|
|
2972
|
-
"print:break-inside-avoid",
|
|
2973
|
-
"print:mb-4"
|
|
2974
|
-
);
|
|
2975
|
-
};
|
|
2976
|
-
const getResponsiveClasses = () => {
|
|
2977
|
-
const sizePrefix = getSizeClasses(size);
|
|
2978
|
-
const columnsClass = getColumnsClasses(columns);
|
|
2979
|
-
const gapClass = getGapClasses(gap);
|
|
2980
|
-
return cn(
|
|
2981
|
-
`${sizePrefix}grid`,
|
|
2982
|
-
`${sizePrefix}${columnsClass}`,
|
|
2983
|
-
`${sizePrefix}${gapClass}`
|
|
2984
|
-
);
|
|
2985
|
-
};
|
|
2986
|
-
return /* @__PURE__ */ jsx31(
|
|
2987
|
-
"div",
|
|
2988
|
-
{
|
|
2989
|
-
className: cn(
|
|
2990
|
-
"print-grid-breakpoint",
|
|
2991
|
-
getResponsiveClasses(),
|
|
2992
|
-
getPrintOptimizedClasses(),
|
|
2993
|
-
className
|
|
2994
|
-
),
|
|
2995
|
-
...props,
|
|
2996
|
-
children
|
|
2997
|
-
}
|
|
2998
|
-
);
|
|
2999
|
-
}
|
|
3000
|
-
|
|
3001
|
-
// src/components/PrintFooter/PrintFooter.tsx
|
|
3002
|
-
init_cn();
|
|
3003
|
-
|
|
3004
|
-
// src/components/PrintFooter/PrintPageNumber.tsx
|
|
3005
|
-
init_cn();
|
|
3006
|
-
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
3007
|
-
function PrintPageNumber({
|
|
3008
|
-
children,
|
|
3009
|
-
format = "1",
|
|
3010
|
-
template,
|
|
3011
|
-
position = "right",
|
|
3012
|
-
showTotal = false,
|
|
3013
|
-
currentPage = 1,
|
|
3014
|
-
totalPages = 1,
|
|
3015
|
-
printOptimized = true,
|
|
3016
|
-
className,
|
|
3017
|
-
...props
|
|
3018
|
-
}) {
|
|
3019
|
-
const getPositionClasses = (position2) => {
|
|
3020
|
-
switch (position2) {
|
|
3021
|
-
case "left":
|
|
3022
|
-
return "justify-start";
|
|
3023
|
-
case "center":
|
|
3024
|
-
return "justify-center";
|
|
3025
|
-
default:
|
|
3026
|
-
return "justify-end";
|
|
3027
|
-
}
|
|
3028
|
-
};
|
|
3029
|
-
const getPrintOptimizedClasses = () => {
|
|
3030
|
-
if (!printOptimized) return "";
|
|
3031
|
-
return cn(
|
|
3032
|
-
"print:break-inside-avoid",
|
|
3033
|
-
"print:text-sm",
|
|
3034
|
-
"print:font-medium"
|
|
3035
|
-
);
|
|
3036
|
-
};
|
|
3037
|
-
const formatPageNumber = () => {
|
|
3038
|
-
if (template) {
|
|
3039
|
-
return template.replace("{current}", currentPage.toString()).replace("{total}", totalPages.toString()).replace("{page}", currentPage.toString());
|
|
3040
|
-
}
|
|
3041
|
-
switch (format) {
|
|
3042
|
-
case "1 of 5":
|
|
3043
|
-
return `${currentPage} of ${totalPages}`;
|
|
3044
|
-
case "Page 1":
|
|
3045
|
-
return `Page ${currentPage}`;
|
|
3046
|
-
case "Page 1 of 5":
|
|
3047
|
-
return `Page ${currentPage} of ${totalPages}`;
|
|
3048
|
-
case "1/5":
|
|
3049
|
-
return `${currentPage}/${totalPages}`;
|
|
3050
|
-
case "custom":
|
|
3051
|
-
return template || currentPage.toString();
|
|
3052
|
-
default:
|
|
3053
|
-
return currentPage.toString();
|
|
3054
|
-
}
|
|
3055
|
-
};
|
|
3056
|
-
return /* @__PURE__ */ jsx32(
|
|
3057
|
-
"div",
|
|
3058
|
-
{
|
|
3059
|
-
className: cn(
|
|
3060
|
-
"print-page-number",
|
|
3061
|
-
"flex",
|
|
3062
|
-
"items-center",
|
|
3063
|
-
getPositionClasses(position),
|
|
3064
|
-
getPrintOptimizedClasses(),
|
|
3065
|
-
className
|
|
3066
|
-
),
|
|
3067
|
-
...props,
|
|
3068
|
-
children: children || /* @__PURE__ */ jsx32(PrintText, { variant: "small", color: "muted", children: formatPageNumber() })
|
|
3069
|
-
}
|
|
3070
|
-
);
|
|
3071
|
-
}
|
|
3072
|
-
|
|
3073
|
-
// src/components/PrintFooter/PrintFooter.tsx
|
|
3074
|
-
import { jsx as jsx33, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
3075
|
-
function PrintFooter({
|
|
3076
|
-
children,
|
|
3077
|
-
text,
|
|
3078
|
-
position = "relative",
|
|
3079
|
-
align = "center",
|
|
3080
|
-
showPageNumbers = false,
|
|
3081
|
-
pageNumberFormat = "1",
|
|
3082
|
-
pageNumberTemplate,
|
|
3083
|
-
pageNumberPosition = "right",
|
|
3084
|
-
showTotalPages = false,
|
|
3085
|
-
background = "transparent",
|
|
3086
|
-
showBorder = false,
|
|
3087
|
-
padding = "md",
|
|
3088
|
-
margin = "none",
|
|
3089
|
-
height = "auto",
|
|
3090
|
-
printOptimized = true,
|
|
3091
|
-
className,
|
|
3092
|
-
...props
|
|
3093
|
-
}) {
|
|
3094
|
-
const getPositionClasses = (position2) => {
|
|
3095
|
-
switch (position2) {
|
|
3096
|
-
case "fixed":
|
|
3097
|
-
return "fixed bottom-0 left-0 right-0";
|
|
3098
|
-
case "absolute":
|
|
3099
|
-
return "absolute bottom-0 left-0 right-0";
|
|
3100
|
-
case "sticky":
|
|
3101
|
-
return "sticky bottom-0";
|
|
3102
|
-
default:
|
|
3103
|
-
return "relative";
|
|
3104
|
-
}
|
|
3105
|
-
};
|
|
3106
|
-
const getAlignmentClasses = (align2) => {
|
|
3107
|
-
switch (align2) {
|
|
3108
|
-
case "left":
|
|
3109
|
-
return "justify-start";
|
|
3110
|
-
case "center":
|
|
3111
|
-
return "justify-center";
|
|
3112
|
-
case "right":
|
|
3113
|
-
return "justify-end";
|
|
3114
|
-
case "between":
|
|
3115
|
-
return "justify-between";
|
|
3116
|
-
case "around":
|
|
3117
|
-
return "justify-around";
|
|
3118
|
-
case "evenly":
|
|
3119
|
-
return "justify-evenly";
|
|
3120
|
-
default:
|
|
3121
|
-
return "justify-center";
|
|
3122
|
-
}
|
|
3123
|
-
};
|
|
3124
|
-
const getBackgroundClasses = (background2) => {
|
|
3125
|
-
switch (background2) {
|
|
3126
|
-
case "white":
|
|
3127
|
-
return "bg-background";
|
|
3128
|
-
case "gray":
|
|
3129
|
-
return "bg-muted";
|
|
3130
|
-
case "primary":
|
|
3131
|
-
return "bg-primary text-primary-foreground";
|
|
3132
|
-
case "secondary":
|
|
3133
|
-
return "bg-secondary text-secondary-foreground";
|
|
3134
|
-
default:
|
|
3135
|
-
return "bg-transparent";
|
|
3136
|
-
}
|
|
3137
|
-
};
|
|
3138
|
-
const getPaddingClasses = (padding2) => {
|
|
3139
|
-
switch (padding2) {
|
|
3140
|
-
case "none":
|
|
3141
|
-
return "p-0";
|
|
3142
|
-
case "sm":
|
|
3143
|
-
return "p-2";
|
|
3144
|
-
case "lg":
|
|
3145
|
-
return "p-6";
|
|
3146
|
-
case "xl":
|
|
3147
|
-
return "p-8";
|
|
3148
|
-
default:
|
|
3149
|
-
return "p-4";
|
|
3150
|
-
}
|
|
3151
|
-
};
|
|
3152
|
-
const getMarginClasses = (margin2) => {
|
|
3153
|
-
switch (margin2) {
|
|
3154
|
-
case "none":
|
|
3155
|
-
return "m-0";
|
|
3156
|
-
case "sm":
|
|
3157
|
-
return "m-2";
|
|
3158
|
-
case "md":
|
|
3159
|
-
return "m-4";
|
|
3160
|
-
case "lg":
|
|
3161
|
-
return "m-6";
|
|
3162
|
-
case "xl":
|
|
3163
|
-
return "m-8";
|
|
3164
|
-
default:
|
|
3165
|
-
return "m-0";
|
|
3166
|
-
}
|
|
3167
|
-
};
|
|
3168
|
-
const getHeightClasses = (height2) => {
|
|
3169
|
-
switch (height2) {
|
|
3170
|
-
case "sm":
|
|
3171
|
-
return "h-8";
|
|
3172
|
-
case "md":
|
|
3173
|
-
return "h-12";
|
|
3174
|
-
case "lg":
|
|
3175
|
-
return "h-16";
|
|
3176
|
-
case "xl":
|
|
3177
|
-
return "h-20";
|
|
3178
|
-
default:
|
|
3179
|
-
return "h-auto";
|
|
3180
|
-
}
|
|
3181
|
-
};
|
|
3182
|
-
const getPrintOptimizedClasses = () => {
|
|
3183
|
-
if (!printOptimized) return "";
|
|
3184
|
-
return cn(
|
|
3185
|
-
"print:break-inside-avoid",
|
|
3186
|
-
"print:mb-4",
|
|
3187
|
-
"print:border-black",
|
|
3188
|
-
"print:bg-white",
|
|
3189
|
-
"print:text-black"
|
|
3190
|
-
);
|
|
3191
|
-
};
|
|
3192
|
-
const getBorderClasses = () => {
|
|
3193
|
-
if (!showBorder) return "";
|
|
3194
|
-
return "border-t border-border";
|
|
3195
|
-
};
|
|
3196
|
-
return /* @__PURE__ */ jsxs15(
|
|
3197
|
-
"footer",
|
|
3198
|
-
{
|
|
3199
|
-
className: cn(
|
|
3200
|
-
"print-footer",
|
|
3201
|
-
"flex",
|
|
3202
|
-
"items-center",
|
|
3203
|
-
"w-full",
|
|
3204
|
-
getPositionClasses(position),
|
|
3205
|
-
getAlignmentClasses(align),
|
|
3206
|
-
getBackgroundClasses(background),
|
|
3207
|
-
getPaddingClasses(padding),
|
|
3208
|
-
getMarginClasses(margin),
|
|
3209
|
-
getHeightClasses(height),
|
|
3210
|
-
getBorderClasses(),
|
|
3211
|
-
getPrintOptimizedClasses(),
|
|
3212
|
-
className
|
|
3213
|
-
),
|
|
3214
|
-
...props,
|
|
3215
|
-
children: [
|
|
3216
|
-
text && /* @__PURE__ */ jsx33(PrintText, { variant: "small", color: "muted", children: text }),
|
|
3217
|
-
children,
|
|
3218
|
-
showPageNumbers && /* @__PURE__ */ jsx33(
|
|
3219
|
-
PrintPageNumber,
|
|
3220
|
-
{
|
|
3221
|
-
format: pageNumberFormat,
|
|
3222
|
-
template: pageNumberTemplate,
|
|
3223
|
-
position: pageNumberPosition,
|
|
3224
|
-
showTotal: showTotalPages,
|
|
3225
|
-
printOptimized
|
|
3226
|
-
}
|
|
3227
|
-
)
|
|
3228
|
-
]
|
|
3229
|
-
}
|
|
3230
|
-
);
|
|
3231
|
-
}
|
|
3232
|
-
|
|
3233
|
-
// src/components/PrintFooter/PrintFooterContent.tsx
|
|
3234
|
-
init_cn();
|
|
3235
|
-
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
3236
|
-
function PrintFooterContent({
|
|
3237
|
-
children,
|
|
3238
|
-
align = "left",
|
|
3239
|
-
padding = "none",
|
|
3240
|
-
printOptimized = true,
|
|
3241
|
-
className,
|
|
3242
|
-
...props
|
|
3243
|
-
}) {
|
|
3244
|
-
const getAlignmentClasses = (align2) => {
|
|
3245
|
-
switch (align2) {
|
|
3246
|
-
case "center":
|
|
3247
|
-
return "text-center";
|
|
3248
|
-
case "right":
|
|
3249
|
-
return "text-right";
|
|
3250
|
-
default:
|
|
3251
|
-
return "text-left";
|
|
3252
|
-
}
|
|
3253
|
-
};
|
|
3254
|
-
const getPaddingClasses = (padding2) => {
|
|
3255
|
-
switch (padding2) {
|
|
3256
|
-
case "none":
|
|
3257
|
-
return "p-0";
|
|
3258
|
-
case "sm":
|
|
3259
|
-
return "p-2";
|
|
3260
|
-
case "lg":
|
|
3261
|
-
return "p-6";
|
|
3262
|
-
case "xl":
|
|
3263
|
-
return "p-8";
|
|
3264
|
-
default:
|
|
3265
|
-
return "p-4";
|
|
3266
|
-
}
|
|
3267
|
-
};
|
|
3268
|
-
const getPrintOptimizedClasses = () => {
|
|
3269
|
-
if (!printOptimized) return "";
|
|
3270
|
-
return cn(
|
|
3271
|
-
"print:break-inside-avoid",
|
|
3272
|
-
"print:text-sm",
|
|
3273
|
-
"print:leading-tight"
|
|
3274
|
-
);
|
|
3275
|
-
};
|
|
3276
|
-
return /* @__PURE__ */ jsx34(
|
|
3277
|
-
"div",
|
|
3278
|
-
{
|
|
3279
|
-
className: cn(
|
|
3280
|
-
"print-footer-content",
|
|
3281
|
-
getAlignmentClasses(align),
|
|
3282
|
-
getPaddingClasses(padding),
|
|
3283
|
-
getPrintOptimizedClasses(),
|
|
3284
|
-
className
|
|
3285
|
-
),
|
|
3286
|
-
...props,
|
|
3287
|
-
children
|
|
3288
|
-
}
|
|
3289
|
-
);
|
|
3290
|
-
}
|
|
3291
|
-
|
|
3292
|
-
// src/components/PrintFooter/PrintFooterInfo.tsx
|
|
3293
|
-
init_cn();
|
|
3294
|
-
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
3295
|
-
function PrintFooterInfo({
|
|
3296
|
-
children,
|
|
3297
|
-
align = "left",
|
|
3298
|
-
background = "transparent",
|
|
3299
|
-
showBorder = false,
|
|
3300
|
-
printOptimized = true,
|
|
3301
|
-
className,
|
|
3302
|
-
...props
|
|
3303
|
-
}) {
|
|
3304
|
-
const getAlignmentClasses = (align2) => {
|
|
3305
|
-
switch (align2) {
|
|
3306
|
-
case "center":
|
|
3307
|
-
return "text-center";
|
|
3308
|
-
case "right":
|
|
3309
|
-
return "text-right";
|
|
3310
|
-
default:
|
|
3311
|
-
return "text-left";
|
|
3312
|
-
}
|
|
3313
|
-
};
|
|
3314
|
-
const getBackgroundClasses = (background2) => {
|
|
3315
|
-
switch (background2) {
|
|
3316
|
-
case "white":
|
|
3317
|
-
return "bg-background";
|
|
3318
|
-
case "gray":
|
|
3319
|
-
return "bg-muted";
|
|
3320
|
-
case "primary":
|
|
3321
|
-
return "bg-primary text-primary-foreground";
|
|
3322
|
-
case "secondary":
|
|
3323
|
-
return "bg-secondary text-secondary-foreground";
|
|
3324
|
-
default:
|
|
3325
|
-
return "bg-transparent";
|
|
3326
|
-
}
|
|
3327
|
-
};
|
|
3328
|
-
const getBorderClasses = () => {
|
|
3329
|
-
if (!showBorder) return "";
|
|
3330
|
-
return "border border-border rounded";
|
|
3331
|
-
};
|
|
3332
|
-
const getPrintOptimizedClasses = () => {
|
|
3333
|
-
if (!printOptimized) return "";
|
|
3334
|
-
return cn(
|
|
3335
|
-
"print:break-inside-avoid",
|
|
3336
|
-
"print:text-sm",
|
|
3337
|
-
"print:leading-tight",
|
|
3338
|
-
"print:border-black",
|
|
3339
|
-
"print:bg-white",
|
|
3340
|
-
"print:text-black"
|
|
3341
|
-
);
|
|
3342
|
-
};
|
|
3343
|
-
return /* @__PURE__ */ jsx35(
|
|
3344
|
-
"div",
|
|
3345
|
-
{
|
|
3346
|
-
className: cn(
|
|
3347
|
-
"print-footer-info",
|
|
3348
|
-
"p-3",
|
|
3349
|
-
"rounded",
|
|
3350
|
-
getAlignmentClasses(align),
|
|
3351
|
-
getBackgroundClasses(background),
|
|
3352
|
-
getBorderClasses(),
|
|
3353
|
-
getPrintOptimizedClasses(),
|
|
3354
|
-
className
|
|
3355
|
-
),
|
|
3356
|
-
...props,
|
|
3357
|
-
children: /* @__PURE__ */ jsx35(PrintText, { variant: "small", color: "muted", children })
|
|
3358
|
-
}
|
|
3359
|
-
);
|
|
3360
|
-
}
|
|
3361
|
-
|
|
3362
|
-
// src/components/PrintPageBreak/PrintPageBreak.tsx
|
|
3363
|
-
init_cn();
|
|
3364
|
-
|
|
3365
|
-
// src/components/PrintPageBreak/PrintPageBreakIndicator.tsx
|
|
3366
|
-
init_cn();
|
|
3367
|
-
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
3368
|
-
function PrintPageBreakIndicator({
|
|
3369
|
-
children,
|
|
3370
|
-
type = "line",
|
|
3371
|
-
color = "default",
|
|
3372
|
-
size = "md",
|
|
3373
|
-
printOptimized = true,
|
|
3374
|
-
className,
|
|
3375
|
-
...props
|
|
3376
|
-
}) {
|
|
3377
|
-
const getTypeClasses = () => {
|
|
3378
|
-
switch (type) {
|
|
3379
|
-
case "dotted":
|
|
3380
|
-
return "border-dotted";
|
|
3381
|
-
case "dashed":
|
|
3382
|
-
return "border-dashed";
|
|
3383
|
-
case "text":
|
|
3384
|
-
return "text-center";
|
|
3385
|
-
case "icon":
|
|
3386
|
-
return "text-center";
|
|
3387
|
-
default:
|
|
3388
|
-
return "border-solid";
|
|
3389
|
-
}
|
|
3390
|
-
};
|
|
3391
|
-
const getColorClasses = () => {
|
|
3392
|
-
switch (color) {
|
|
3393
|
-
case "primary":
|
|
3394
|
-
return "border-primary text-primary";
|
|
3395
|
-
case "secondary":
|
|
3396
|
-
return "border-secondary text-secondary";
|
|
3397
|
-
case "muted":
|
|
3398
|
-
return "border-muted-foreground text-muted-foreground";
|
|
3399
|
-
case "accent":
|
|
3400
|
-
return "border-accent text-accent";
|
|
3401
|
-
default:
|
|
3402
|
-
return "border-border text-foreground";
|
|
3403
|
-
}
|
|
3404
|
-
};
|
|
3405
|
-
const getSizeClasses = () => {
|
|
3406
|
-
switch (size) {
|
|
3407
|
-
case "sm":
|
|
3408
|
-
return "h-1 text-xs";
|
|
3409
|
-
case "lg":
|
|
3410
|
-
return "h-3 text-lg";
|
|
3411
|
-
default:
|
|
3412
|
-
return "h-2 text-sm";
|
|
3413
|
-
}
|
|
3414
|
-
};
|
|
3415
|
-
const getPrintOptimizedClasses = () => {
|
|
3416
|
-
if (!printOptimized) return "";
|
|
3417
|
-
return cn(
|
|
3418
|
-
"print:border-black",
|
|
3419
|
-
"print:text-black"
|
|
3420
|
-
);
|
|
3421
|
-
};
|
|
3422
|
-
const renderContent = () => {
|
|
3423
|
-
if (children) {
|
|
3424
|
-
return children;
|
|
3425
|
-
}
|
|
3426
|
-
switch (type) {
|
|
3427
|
-
case "text":
|
|
3428
|
-
return "--- Page Break ---";
|
|
3429
|
-
case "icon":
|
|
3430
|
-
return "\u{1F4C4}";
|
|
3431
|
-
case "line":
|
|
3432
|
-
return "--- Page Break ---";
|
|
3433
|
-
default:
|
|
3434
|
-
return "--- Page Break ---";
|
|
3435
|
-
}
|
|
3436
|
-
};
|
|
3437
|
-
const isLineType = type === "line" || type === "dotted" || type === "dashed";
|
|
3438
|
-
return /* @__PURE__ */ jsx36(
|
|
3439
|
-
"div",
|
|
3440
|
-
{
|
|
3441
|
-
className: cn(
|
|
3442
|
-
"print-page-break-indicator",
|
|
3443
|
-
"flex",
|
|
3444
|
-
"items-center",
|
|
3445
|
-
"justify-center",
|
|
3446
|
-
"w-full",
|
|
3447
|
-
getTypeClasses(),
|
|
3448
|
-
getColorClasses(),
|
|
3449
|
-
getSizeClasses(),
|
|
3450
|
-
isLineType && "border-t",
|
|
3451
|
-
getPrintOptimizedClasses(),
|
|
3452
|
-
className
|
|
3453
|
-
),
|
|
3454
|
-
...props,
|
|
3455
|
-
children: renderContent()
|
|
3456
|
-
}
|
|
3457
|
-
);
|
|
3458
|
-
}
|
|
3459
|
-
|
|
3460
|
-
// src/components/PrintPageBreak/PrintPageBreak.tsx
|
|
3461
|
-
import { jsx as jsx37, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3462
|
-
function PrintPageBreak({
|
|
3463
|
-
type = "auto",
|
|
3464
|
-
strength = "normal",
|
|
3465
|
-
showIndicator = false,
|
|
3466
|
-
indicator,
|
|
3467
|
-
label,
|
|
3468
|
-
description,
|
|
3469
|
-
printOptimized = true,
|
|
3470
|
-
className,
|
|
3471
|
-
...props
|
|
3472
|
-
}) {
|
|
3473
|
-
const getBreakClass = () => {
|
|
3474
|
-
const baseClass = "print-page-break";
|
|
3475
|
-
switch (type) {
|
|
3476
|
-
case "before":
|
|
3477
|
-
return cn(baseClass, "print-break-before");
|
|
3478
|
-
case "after":
|
|
3479
|
-
return cn(baseClass, "print-break-after");
|
|
3480
|
-
case "avoid":
|
|
3481
|
-
return cn(baseClass, "print-break-avoid");
|
|
3482
|
-
case "always":
|
|
3483
|
-
return cn(baseClass, "print-break-before print-break-after");
|
|
3484
|
-
case "left":
|
|
3485
|
-
return cn(baseClass, "print-break-before", "print:page-break-before:left");
|
|
3486
|
-
case "right":
|
|
3487
|
-
return cn(baseClass, "print-break-before", "print:page-break-before:right");
|
|
3488
|
-
default:
|
|
3489
|
-
return baseClass;
|
|
3490
|
-
}
|
|
3491
|
-
};
|
|
3492
|
-
const getStrengthClass = () => {
|
|
3493
|
-
switch (strength) {
|
|
3494
|
-
case "weak":
|
|
3495
|
-
return "print:page-break-inside:avoid";
|
|
3496
|
-
case "strong":
|
|
3497
|
-
return "print:page-break-inside:avoid print:break-inside-avoid";
|
|
3498
|
-
default:
|
|
3499
|
-
return "";
|
|
3500
|
-
}
|
|
3501
|
-
};
|
|
3502
|
-
const getPrintOptimizedClasses = () => {
|
|
3503
|
-
if (!printOptimized) return "";
|
|
3504
|
-
return cn(
|
|
3505
|
-
"print:break-inside-avoid",
|
|
3506
|
-
"print:mb-4"
|
|
3507
|
-
);
|
|
3508
|
-
};
|
|
3509
|
-
const renderIndicator = () => {
|
|
3510
|
-
if (!showIndicator) return null;
|
|
3511
|
-
if (indicator) {
|
|
3512
|
-
return indicator;
|
|
3513
|
-
}
|
|
3514
|
-
return /* @__PURE__ */ jsx37(
|
|
3515
|
-
PrintPageBreakIndicator,
|
|
3516
|
-
{
|
|
3517
|
-
type: "line",
|
|
3518
|
-
color: "muted",
|
|
3519
|
-
size: "md",
|
|
3520
|
-
printOptimized
|
|
3521
|
-
}
|
|
3522
|
-
);
|
|
3523
|
-
};
|
|
3524
|
-
const renderLabel = () => {
|
|
3525
|
-
if (!label) return null;
|
|
3526
|
-
return /* @__PURE__ */ jsx37(PrintText, { variant: "small", color: "muted", className: "text-center", children: label });
|
|
3527
|
-
};
|
|
3528
|
-
const renderDescription = () => {
|
|
3529
|
-
if (!description) return null;
|
|
3530
|
-
return /* @__PURE__ */ jsx37(PrintText, { variant: "small", color: "muted", className: "text-center mt-1", children: description });
|
|
3531
|
-
};
|
|
3532
|
-
return /* @__PURE__ */ jsxs16(
|
|
3533
|
-
"div",
|
|
3534
|
-
{
|
|
3535
|
-
className: cn(
|
|
3536
|
-
getBreakClass(),
|
|
3537
|
-
getStrengthClass(),
|
|
3538
|
-
getPrintOptimizedClasses(),
|
|
3539
|
-
className
|
|
3540
|
-
),
|
|
3541
|
-
"aria-hidden": "true",
|
|
3542
|
-
...props,
|
|
3543
|
-
children: [
|
|
3544
|
-
renderIndicator(),
|
|
3545
|
-
renderLabel(),
|
|
3546
|
-
renderDescription()
|
|
3547
|
-
]
|
|
3548
|
-
}
|
|
3549
|
-
);
|
|
3550
|
-
}
|
|
3551
|
-
|
|
3552
|
-
// src/components/PrintPageBreak/PrintPageBreakGroup.tsx
|
|
3553
|
-
init_cn();
|
|
3554
|
-
import { jsx as jsx38, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
3555
|
-
function PrintPageBreakGroup({
|
|
3556
|
-
children,
|
|
3557
|
-
type = "auto",
|
|
3558
|
-
strength = "normal",
|
|
3559
|
-
label,
|
|
3560
|
-
description,
|
|
3561
|
-
printOptimized = true,
|
|
3562
|
-
className,
|
|
3563
|
-
...props
|
|
3564
|
-
}) {
|
|
3565
|
-
const getBreakClass = () => {
|
|
3566
|
-
const baseClass = "print-page-break-group";
|
|
3567
|
-
switch (type) {
|
|
3568
|
-
case "before":
|
|
3569
|
-
return cn(baseClass, "print-break-before");
|
|
3570
|
-
case "after":
|
|
3571
|
-
return cn(baseClass, "print-break-after");
|
|
3572
|
-
case "avoid":
|
|
3573
|
-
return cn(baseClass, "print-break-avoid");
|
|
3574
|
-
case "always":
|
|
3575
|
-
return cn(baseClass, "print-break-before print-break-after");
|
|
3576
|
-
case "left":
|
|
3577
|
-
return cn(baseClass, "print-break-before", "print:page-break-before:left");
|
|
3578
|
-
case "right":
|
|
3579
|
-
return cn(baseClass, "print-break-before", "print:page-break-before:right");
|
|
3580
|
-
default:
|
|
3581
|
-
return baseClass;
|
|
3582
|
-
}
|
|
3583
|
-
};
|
|
3584
|
-
const getStrengthClass = () => {
|
|
3585
|
-
switch (strength) {
|
|
3586
|
-
case "weak":
|
|
3587
|
-
return "print:page-break-inside:avoid";
|
|
3588
|
-
case "strong":
|
|
3589
|
-
return "print:page-break-inside:avoid print:break-inside-avoid";
|
|
3590
|
-
default:
|
|
3591
|
-
return "";
|
|
3592
|
-
}
|
|
3593
|
-
};
|
|
3594
|
-
const getPrintOptimizedClasses = () => {
|
|
3595
|
-
if (!printOptimized) return "";
|
|
3596
|
-
return cn(
|
|
3597
|
-
"print:break-inside-avoid",
|
|
3598
|
-
"print:mb-4"
|
|
3599
|
-
);
|
|
3600
|
-
};
|
|
3601
|
-
return /* @__PURE__ */ jsxs17(
|
|
3602
|
-
"div",
|
|
3603
|
-
{
|
|
3604
|
-
className: cn(
|
|
3605
|
-
getBreakClass(),
|
|
3606
|
-
getStrengthClass(),
|
|
3607
|
-
getPrintOptimizedClasses(),
|
|
3608
|
-
className
|
|
3609
|
-
),
|
|
3610
|
-
...props,
|
|
3611
|
-
children: [
|
|
3612
|
-
label && /* @__PURE__ */ jsx38(PrintText, { variant: "small", color: "muted", className: "mb-2", children: label }),
|
|
3613
|
-
children,
|
|
3614
|
-
description && /* @__PURE__ */ jsx38(PrintText, { variant: "small", color: "muted", className: "mt-2", children: description })
|
|
3615
|
-
]
|
|
3616
|
-
}
|
|
3617
|
-
);
|
|
3618
|
-
}
|
|
3619
482
|
export {
|
|
3620
483
|
Alert,
|
|
3621
484
|
AlertDescription,
|
|
@@ -3633,7 +496,6 @@ export {
|
|
|
3633
496
|
CardTitle,
|
|
3634
497
|
Checkbox,
|
|
3635
498
|
DataTable,
|
|
3636
|
-
DefaultPublicErrorFallback,
|
|
3637
499
|
Dialog,
|
|
3638
500
|
DialogBody,
|
|
3639
501
|
DialogClose,
|
|
@@ -3645,12 +507,23 @@ export {
|
|
|
3645
507
|
DialogPortal,
|
|
3646
508
|
DialogTitle,
|
|
3647
509
|
DialogTrigger,
|
|
510
|
+
DropdownMenu,
|
|
511
|
+
DropdownMenuCheckboxItem,
|
|
512
|
+
DropdownMenuContent,
|
|
513
|
+
DropdownMenuGroup,
|
|
514
|
+
DropdownMenuItem,
|
|
515
|
+
DropdownMenuLabel,
|
|
516
|
+
DropdownMenuPortal,
|
|
517
|
+
DropdownMenuRadioGroup,
|
|
518
|
+
DropdownMenuRadioItem,
|
|
519
|
+
DropdownMenuSeparator,
|
|
520
|
+
DropdownMenuShortcut,
|
|
521
|
+
DropdownMenuSub,
|
|
522
|
+
DropdownMenuSubContent,
|
|
523
|
+
DropdownMenuSubTrigger,
|
|
524
|
+
DropdownMenuTrigger,
|
|
3648
525
|
ErrorBoundary,
|
|
3649
|
-
EventLogo,
|
|
3650
|
-
EventLogoCompact,
|
|
3651
|
-
EventLogoLarge,
|
|
3652
526
|
EventSelector,
|
|
3653
|
-
FileUpload,
|
|
3654
527
|
Footer,
|
|
3655
528
|
Form,
|
|
3656
529
|
FormErrorSummary,
|
|
@@ -3667,51 +540,7 @@ export {
|
|
|
3667
540
|
PaceAppLayout,
|
|
3668
541
|
PaceLoginPage,
|
|
3669
542
|
PasswordResetForm,
|
|
3670
|
-
PrintButton,
|
|
3671
|
-
PrintButtonGroup,
|
|
3672
|
-
PrintCard,
|
|
3673
|
-
PrintCardContent,
|
|
3674
|
-
PrintCardFooter,
|
|
3675
|
-
PrintCardGrid,
|
|
3676
|
-
PrintCardHeader,
|
|
3677
|
-
PrintCardImage,
|
|
3678
|
-
PrintColumn,
|
|
3679
|
-
PrintCoverHeader,
|
|
3680
|
-
PrintDataTable,
|
|
3681
|
-
PrintDivider,
|
|
3682
|
-
PrintFooter,
|
|
3683
|
-
PrintFooterContent,
|
|
3684
|
-
PrintFooterInfo,
|
|
3685
|
-
PrintGrid,
|
|
3686
|
-
PrintGridBreakpoint,
|
|
3687
|
-
PrintGridContainer,
|
|
3688
|
-
PrintGridItem,
|
|
3689
|
-
PrintHeader,
|
|
3690
|
-
PrintLayout,
|
|
3691
|
-
PrintLayoutProvider,
|
|
3692
|
-
PrintPageBreak,
|
|
3693
|
-
PrintPageBreakGroup,
|
|
3694
|
-
PrintPageBreakIndicator,
|
|
3695
|
-
PrintPageNumber,
|
|
3696
|
-
PrintSection,
|
|
3697
|
-
PrintSectionContent,
|
|
3698
|
-
PrintSectionHeader,
|
|
3699
|
-
PrintTableGroup,
|
|
3700
|
-
PrintTableRow,
|
|
3701
|
-
PrintText,
|
|
3702
|
-
PrintToolbar,
|
|
3703
543
|
Progress,
|
|
3704
|
-
PublicErrorBoundary,
|
|
3705
|
-
PublicLoadingSkeleton,
|
|
3706
|
-
PublicLoadingSpinner,
|
|
3707
|
-
PublicLoadingSpinnerFullPage,
|
|
3708
|
-
PublicPageContextChecker,
|
|
3709
|
-
PublicPageDebugger,
|
|
3710
|
-
PublicPageDiagnostic,
|
|
3711
|
-
PublicPageFooter,
|
|
3712
|
-
PublicPageHeader,
|
|
3713
|
-
PublicPageLayout,
|
|
3714
|
-
PublicPageProvider,
|
|
3715
544
|
Select,
|
|
3716
545
|
SelectContent,
|
|
3717
546
|
SelectGroup,
|
|
@@ -3746,13 +575,6 @@ export {
|
|
|
3746
575
|
TooltipTrigger,
|
|
3747
576
|
UnifiedAuthProvider,
|
|
3748
577
|
UserMenu,
|
|
3749
|
-
useErrorBoundary,
|
|
3750
|
-
useFileUpload,
|
|
3751
|
-
useIsPublicPage,
|
|
3752
|
-
usePrintLayout,
|
|
3753
|
-
usePublicPageContext2 as usePublicPageContext,
|
|
3754
|
-
usePublicPageContext as usePublicPageProviderContext,
|
|
3755
|
-
useStorage,
|
|
3756
578
|
useToast,
|
|
3757
579
|
useUnifiedAuth
|
|
3758
580
|
};
|