From 6c1f4283a996fd8904767d8d8fc1120f16578b1b Mon Sep 17 00:00:00 2001 From: Gao Sun Date: Wed, 24 Jul 2024 17:47:02 +0800 Subject: [PATCH] refactor(console): use vite --- package.json | 3 +- packages/console/.eslintrc.cjs | 12 + packages/console/.parcelrc | 19 - packages/console/.parcelrc.arm64 | 23 - packages/console/{src => }/index.html | 2 +- packages/console/package.json | 43 +- packages/console/parcel-transformer-mdx2.js | 61 - .../console/src/assets/docs/guides/index.tsx | 66 +- .../components/ClientBasics/index.tsx | 2 +- packages/console/src/cloud/AppRoutes.tsx | 2 +- .../cloud/pages/Main/InvitationList/index.tsx | 4 +- .../TenantLandingPageContent/index.tsx | 8 +- .../pages/Main/TenantLandingPage/index.tsx | 2 +- .../cloud/pages/SocialDemoCallback/index.tsx | 6 +- .../src/components/ActionBar/index.tsx | 2 +- .../src/components/ActionsButton/index.tsx | 8 +- .../console/src/components/AppError/index.tsx | 10 +- .../src/components/AppLoading/index.tsx | 4 +- .../ApplicationCreation/CreateForm/index.tsx | 4 +- .../src/components/ApplicationName/index.tsx | 2 +- .../components/EventName/index.tsx | 6 +- .../src/components/AuditLogTable/index.tsx | 2 +- .../src/components/BasicWebhookForm/index.tsx | 2 +- .../console/src/components/BillInfo/index.tsx | 4 +- .../src/components/Breakable/index.tsx | 2 +- .../ConnectorForm/BasicForm/index.tsx | 4 +- .../ConfigForm/ConfigFormFields/index.tsx | 2 +- .../ConnectorForm/ConfigForm/index.tsx | 2 +- .../ConnectorForm/GoogleOneTapCard/index.tsx | 2 +- .../src/components/ConnectorLogo/index.tsx | 2 +- .../src/components/ConnectorTester/index.tsx | 2 +- .../ConnectorRadio/index.tsx | 2 +- .../ConnectorRadioGroup/index.tsx | 2 +- .../PlatformSelector/index.tsx | 2 +- .../CreateConnectorForm/Skeleton/index.tsx | 6 +- .../components/CreateConnectorForm/index.tsx | 4 +- .../EnvTagOptionContent/index.tsx | 2 +- .../FeaturedPlanContent/index.tsx | 6 +- .../PlanCardItem/index.tsx | 4 +- .../SelectTenantPlanModal/index.tsx | 4 +- .../components/CreateTenantModal/index.tsx | 8 +- .../CustomUiAssetsUploader/index.tsx | 4 +- .../src/components/DetailsForm/index.tsx | 2 +- .../DetailsPage/DetailsPageHeader/index.tsx | 4 +- .../components/DetailsPage/Skeleton/index.tsx | 2 +- .../src/components/DetailsPage/index.tsx | 4 +- .../console/src/components/Drawer/index.tsx | 4 +- .../src/components/EditScopeModal/index.tsx | 2 +- .../components/EmptyDataPlaceholder/index.tsx | 6 +- .../components/EntityItem/index.tsx | 2 +- .../components/SourceEntitiesBox/index.tsx | 6 +- .../components/SourceEntityItem/index.tsx | 2 +- .../components/TargetEntitiesBox/index.tsx | 4 +- .../components/TargetEntityItem/index.tsx | 4 +- .../src/components/EntitiesTransfer/index.tsx | 4 +- .../src/components/FeatureTag/BetaTag.tsx | 2 +- .../src/components/FeatureTag/index.tsx | 2 +- .../console/src/components/FileIcon/index.tsx | 4 +- .../FormCard/FormCardLayout/index.tsx | 2 +- .../components/FormCard/Skeleton/index.tsx | 2 +- .../console/src/components/FormCard/index.tsx | 2 +- .../src/components/Guide/GuideCard/index.tsx | 2 +- .../components/Guide/GuideCardGroup/index.tsx | 2 +- .../components/Guide/ModalFooter/index.tsx | 2 +- .../Guide/ModalHeader/RequestForm.tsx | 2 +- .../components/Guide/ModalHeader/index.tsx | 4 +- .../components/Guide/StepsSkeleton/index.tsx | 2 +- .../console/src/components/Guide/index.tsx | 2 +- .../src/components/ImageInputs/index.tsx | 2 +- .../console/src/components/Index/index.tsx | 4 +- .../src/components/InlineUpsell/index.tsx | 2 +- .../ItemPreview/ApplicationPreview.tsx | 2 +- .../src/components/ItemPreview/index.tsx | 2 +- .../console/src/components/ListPage/index.tsx | 4 +- .../components/LivePreviewButton/index.tsx | 4 +- .../index.tsx | 2 +- .../console/src/components/Markdown/index.tsx | 2 +- .../src/components/MauExceededModal/index.tsx | 4 +- .../src/components/MfaFactorTitle/index.tsx | 10 +- .../src/components/MultiOptionInput/index.tsx | 4 +- .../components/MultiTextInputField/index.tsx | 2 +- .../src/components/OpenExternalLink/index.tsx | 2 +- .../src/components/OrganizationList/index.tsx | 6 +- .../OrganizationRolesSelect/index.tsx | 4 +- .../components/PaymentOverdueModal/index.tsx | 4 +- .../src/components/PermissionsTable/index.tsx | 8 +- .../src/components/PlanUsage/index.tsx | 2 +- .../src/components/ProgressBar/index.tsx | 2 +- .../src/components/QuotaGuardFooter/index.tsx | 2 +- .../console/src/components/Region/index.tsx | 2 +- .../src/components/RequestDataError/index.tsx | 6 +- .../components/RoleAssignmentModal/index.tsx | 4 +- .../console/src/components/RoleIcon/index.tsx | 4 +- .../components/ResourceItem/index.tsx | 6 +- .../components/SourceScopeItem/index.tsx | 2 +- .../components/SourceScopesBox/index.tsx | 6 +- .../components/TargetScopeItem/index.tsx | 4 +- .../components/TargetScopesBox/index.tsx | 4 +- .../components/RoleScopesTransfer/index.tsx | 4 +- .../SourceRolesBox/SourceRoleItem/index.tsx | 2 +- .../RolesTransfer/SourceRolesBox/index.tsx | 6 +- .../TargetRolesBox/TargetRoleItem/index.tsx | 4 +- .../RolesTransfer/TargetRolesBox/index.tsx | 4 +- .../components/RoleInformation/index.tsx | 4 +- .../src/components/RolesTransfer/index.tsx | 6 +- .../components/ToggleUiThemeButton/index.tsx | 6 +- .../SignInExperiencePreview/index.tsx | 4 +- .../SubmitFormChangesActionBar/index.tsx | 2 +- .../src/components/TemplateTable/index.tsx | 6 +- .../src/components/TenantEnvTag/index.tsx | 2 +- .../src/components/ThemedIcon/index.tsx | 2 +- .../components/Topbar/ContactModal/hook.tsx | 14 +- .../components/Topbar/ContactModal/index.tsx | 4 +- .../TenantDropdownItem/index.tsx | 4 +- .../TenantInvitationDropdownItem/index.tsx | 2 +- .../Topbar/TenantSelector/index.tsx | 6 +- .../Topbar/UserInfo/SubMenu/index.tsx | 6 +- .../UserInfo/UserInfoSkeleton/index.tsx | 2 +- .../src/components/Topbar/UserInfo/index.tsx | 12 +- .../src/components/Topbar/index.module.scss | 6 +- .../console/src/components/Topbar/index.tsx | 12 +- .../UnsavedChangesAlertModal/index.tsx | 2 +- .../UserAccountInformation/index.tsx | 6 +- .../src/components/UserAvatar/index.tsx | 4 +- .../src/components/UserInfoCard/index.tsx | 2 +- .../console/src/components/UserName/index.tsx | 2 +- .../VerificationCodeInput/index.tsx | 2 +- packages/console/src/consts/applications.ts | 24 +- packages/console/src/consts/connectors.ts | 4 +- packages/console/src/consts/env.ts | 11 +- .../CreateProductionTenantBanner/index.tsx | 2 +- .../TenantEnvMigrationModal/index.tsx | 10 +- .../AppContent/TenantSuspendedPage/index.tsx | 6 +- .../src/containers/AppContent/index.tsx | 2 +- .../Sidebar/components/Item/index.tsx | 2 +- .../Sidebar/components/Section/index.tsx | 2 +- .../ConsoleContent/Sidebar/hook.tsx | 34 +- .../ConsoleContent/Sidebar/index.module.scss | 6 + .../ConsoleContent/Sidebar/index.tsx | 6 +- .../ConsoleContent/index.module.scss | 11 +- .../src/containers/ConsoleContent/index.tsx | 14 +- .../src/contexts/AppThemeProvider/index.tsx | 8 +- .../src/ds-components/ActionMenu/index.tsx | 2 +- .../src/ds-components/Button/index.tsx | 2 +- .../console/src/ds-components/Card/index.tsx | 2 +- .../src/ds-components/CardTitle/index.tsx | 2 +- .../CategorizedCheckboxGroup/index.tsx | 2 +- .../ds-components/Checkbox/Checkbox/index.tsx | 2 +- .../Checkbox/CheckboxGroup/index.tsx | 2 +- .../src/ds-components/CodeEditor/index.tsx | 2 +- .../src/ds-components/ColorPicker/index.tsx | 2 +- .../src/ds-components/ConfirmModal/index.tsx | 4 +- .../ds-components/CopyToClipboard/index.tsx | 8 +- .../DataTransferBox/SourceDataItem/index.tsx | 2 +- .../DataTransferBox/SourceGroupItem/index.tsx | 6 +- .../DataTransferBox/SourcePanel/index.tsx | 6 +- .../DataTransferBox/TargetDataItem/index.tsx | 4 +- .../DataTransferBox/TargetPanel/index.tsx | 4 +- .../ds-components/DataTransferBox/index.tsx | 4 +- .../src/ds-components/Divider/index.tsx | 2 +- .../DragDrop/DragDropProvider.tsx | 2 +- .../ds-components/Dropdown/DropdownItem.tsx | 2 +- .../src/ds-components/Dropdown/index.tsx | 2 +- .../src/ds-components/FormField/Skeleton.tsx | 2 +- .../src/ds-components/FormField/index.tsx | 4 +- .../src/ds-components/IconButton/index.tsx | 2 +- .../ImageWithErrorFallback/index.tsx | 4 +- .../InlineNotification/index.tsx | 10 +- .../KeyValueInputField/index.tsx | 6 +- .../src/ds-components/ModalHeader/index.tsx | 4 +- .../src/ds-components/ModalLayout/index.tsx | 4 +- .../ds-components/MultiTextInput/index.tsx | 6 +- .../src/ds-components/Pagination/index.tsx | 2 +- .../src/ds-components/RadioGroup/Radio.tsx | 2 +- .../src/ds-components/RadioGroup/index.tsx | 2 +- .../src/ds-components/Search/index.tsx | 4 +- .../src/ds-components/Select/MultiSelect.tsx | 4 +- .../src/ds-components/Select/index.tsx | 10 +- .../src/ds-components/Spacer/index.tsx | 2 +- .../src/ds-components/Spinner/index.tsx | 2 +- .../src/ds-components/Switch/index.tsx | 2 +- .../src/ds-components/TabNav/TabNavItem.tsx | 2 +- .../src/ds-components/TabNav/index.tsx | 2 +- .../src/ds-components/TabWrapper/index.tsx | 2 +- .../ds-components/Table/Skeleton/index.tsx | 2 +- .../ds-components/Table/TableEmptyWrapper.tsx | 2 +- .../src/ds-components/Table/TableError.tsx | 6 +- .../ds-components/Table/TablePlaceholder.tsx | 2 +- .../console/src/ds-components/Table/index.tsx | 2 +- .../console/src/ds-components/Tag/index.tsx | 6 +- .../ds-components/TextInput/NumericInput.tsx | 6 +- .../src/ds-components/TextInput/index.tsx | 6 +- .../src/ds-components/TextLink/index.tsx | 2 +- .../src/ds-components/Textarea/index.tsx | 2 +- .../src/ds-components/Tip/TipBubble/index.tsx | 2 +- .../src/ds-components/Tip/ToggleTip/index.tsx | 4 +- .../src/ds-components/Tip/Tooltip/index.tsx | 2 +- .../console/src/ds-components/Toast/index.tsx | 6 +- .../Uploader/FileUploader/index.tsx | 4 +- .../Uploader/ImageUploader/index.tsx | 4 +- .../Uploader/ImageUploaderField/index.tsx | 2 +- .../src/hooks/use-console-routes/index.tsx | 9 +- .../routes/api-resources.tsx | 14 +- .../routes/applications.tsx | 8 +- .../use-console-routes/routes/audit-logs.tsx | 5 +- .../use-console-routes/routes/connectors.tsx | 6 +- .../routes/customize-jwt.tsx | 5 +- .../routes/enterprise-sso.tsx | 6 +- .../hooks/use-console-routes/routes/mfa.tsx | 3 +- .../routes/organization-template.tsx | 18 +- .../routes/organizations.tsx | 12 +- .../use-console-routes/routes/profile.tsx | 15 +- .../hooks/use-console-routes/routes/roles.tsx | 14 +- .../routes/sign-in-experience.tsx | 4 +- .../routes/tenant-settings.tsx | 21 +- .../hooks/use-console-routes/routes/users.tsx | 16 +- .../use-console-routes/routes/webhooks.tsx | 12 +- .../src/icons/ConnectorPlatformIcon.tsx | 6 +- packages/console/src/include.d/react-app.d.ts | 65 - .../src/include.d/react-router-dom.d.ts | 1 - packages/console/src/include.d/vite-env.d.ts | 6 + .../ApplicationCredentials/index.tsx | 2 +- .../mdx-components/DetailsSummary/index.tsx | 4 +- .../src/mdx-components/Mermaid/index.tsx | 5 +- .../mdx-components/OidcCallbackUri/index.tsx | 2 +- .../src/mdx-components/Sample/index.tsx | 2 +- .../SsoSamlSpMetadata/index.tsx | 2 +- .../console/src/mdx-components/Step/index.tsx | 2 +- .../src/mdx-components/Steps/index.tsx | 2 +- .../console/src/mdx-components/Tabs/index.tsx | 2 +- .../mdx-components/UriInputField/index.tsx | 2 +- .../MultiCardSelector/CardItem.tsx | 2 +- .../CardSelector/MultiCardSelector/index.tsx | 2 +- .../components/DemoConnectorNotice/index.tsx | 2 +- .../onboarding/components/Topbar/index.tsx | 4 +- packages/console/src/onboarding/index.tsx | 2 +- .../onboarding/pages/CreateTenant/index.tsx | 6 +- .../SignInExperience/InspireMe/index.tsx | 6 +- .../Preview/PlatformTabs/PlatformTab.tsx | 2 +- .../Preview/PlatformTabs/index.tsx | 6 +- .../pages/SignInExperience/Preview/index.tsx | 2 +- .../pages/SignInExperience/Skeleton/index.tsx | 6 +- .../pages/SignInExperience/index.tsx | 6 +- .../pages/SignInExperience/options.tsx | 18 +- .../src/onboarding/pages/Welcome/index.tsx | 6 +- .../src/onboarding/pages/Welcome/options.tsx | 4 +- .../AcceptInvitation/SwitchAccount/index.tsx | 4 +- .../CreatePermissionModal/index.tsx | 2 +- .../components/GuideDrawer/index.tsx | 6 +- .../components/GuideModal/index.tsx | 4 +- .../src/pages/ApiResourceDetails/index.tsx | 14 +- .../components/CreateForm/index.tsx | 2 +- .../components/GuideLibrary/index.tsx | 2 +- .../components/GuideLibraryModal/index.tsx | 4 +- .../console/src/pages/ApiResources/index.tsx | 10 +- .../Branding/index.tsx | 2 +- .../CreateSecretModal.tsx | 2 +- .../EndpointsAndCredentials.tsx | 10 +- .../GuideDrawer/index.tsx | 6 +- .../MachineLogs/index.tsx | 2 +- .../index.tsx | 6 +- .../index.tsx | 2 +- .../Permissions/PermissionsCard/index.tsx | 2 +- .../PermissionsCard/use-scopes-table.tsx | 4 +- .../Permissions/index.tsx | 2 +- .../components/SessionForm.tsx | 2 +- .../ProtectedAppSettings/index.tsx | 4 +- .../ApplicationDetailsContent/index.tsx | 6 +- .../ApplicationDetails/GuideModal/index.tsx | 4 +- .../components/GuideLibrary/index.tsx | 4 +- .../components/GuideLibraryModal/index.tsx | 4 +- .../components/ProtectedAppCard/index.tsx | 6 +- .../components/ProtectedAppForm/index.tsx | 2 +- .../components/ProtectedAppModal/index.tsx | 2 +- .../components/TypeDescription/index.tsx | 2 +- .../console/src/pages/Applications/index.tsx | 6 +- .../components/EventIcon/index.tsx | 6 +- .../src/pages/AuditLogDetails/index.tsx | 2 +- .../console/src/pages/AuditLogs/index.tsx | 2 +- .../EmailServiceConnectorForm/index.tsx | 2 +- .../ConnectorDetails/ConnectorTabs/index.tsx | 2 +- .../ConnectorDetails/EmailUsage/index.tsx | 8 +- .../src/pages/ConnectorDetails/index.tsx | 8 +- .../ConnectorDeleteButton/index.tsx | 2 +- .../pages/Connectors/ConnectorName/index.tsx | 2 +- .../Connectors/ConnectorStatusField/index.tsx | 4 +- .../src/pages/Connectors/Guide/index.tsx | 6 +- .../SignInExperienceSetupNotice/index.tsx | 2 +- .../console/src/pages/Connectors/index.tsx | 8 +- .../CustomizeJwt/CustomizerItem/index.tsx | 6 +- .../console/src/pages/CustomizeJwt/index.tsx | 2 +- .../ActionButton/CodeRestoreButton.tsx | 4 +- .../MonacoCodeEditor/Dashboard/index.tsx | 4 +- .../MainContent/MonacoCodeEditor/index.tsx | 2 +- .../ScriptSection/ErrorContent/index.tsx | 2 +- .../MainContent/ScriptSection/index.tsx | 4 +- .../InstructionTab/GuideCard/index.tsx | 4 +- .../SettingsSection/InstructionTab/index.tsx | 4 +- .../SettingsSection/TestTab/index.tsx | 4 +- .../MainContent/SettingsSection/index.tsx | 6 +- .../CustomizeJwtDetails/MainContent/index.tsx | 2 +- .../PageLoadingSkeleton/index.tsx | 2 +- .../src/pages/CustomizeJwtDetails/index.tsx | 2 +- .../CustomizeJwtDetails/utils/config.tsx | 4 +- .../src/pages/Dashboard/components/Block.tsx | 8 +- .../components/ChartTooltip/index.tsx | 2 +- .../Dashboard/components/Skeleton/index.tsx | 2 +- .../console/src/pages/Dashboard/index.tsx | 2 +- .../EnterpriseSso/SsoConnectorLogo/index.tsx | 2 +- .../SsoConnectorRadio/index.tsx | 2 +- .../SsoConnectorRadioGroup/index.tsx | 2 +- .../EnterpriseSso/SsoCreationModal/index.tsx | 4 +- .../console/src/pages/EnterpriseSso/index.tsx | 8 +- .../Connection/FileReader/index.tsx | 10 +- .../ParsedConfigPreview/index.tsx | 2 +- .../Connection/OidcMetadataForm/index.tsx | 2 +- .../Connection/SamlAttributeMapping/index.tsx | 2 +- .../Connection/SamlConnectorForm.tsx | 2 +- .../ParsedConfigPreview/index.tsx | 2 +- .../SwitchFormatButton/index.tsx | 6 +- .../Connection/SamlMetadataForm/index.tsx | 2 +- .../Experience/DomainsInput/index.tsx | 4 +- .../Experience/LogosUploader/index.tsx | 2 +- .../EnterpriseSsoDetails/Experience/index.tsx | 2 +- .../EnterpriseSsoDetails/SsoGuide/index.tsx | 2 +- .../src/pages/EnterpriseSsoDetails/index.tsx | 6 +- .../ProtectedAppCreationForm/index.tsx | 2 +- .../console/src/pages/GetStarted/index.tsx | 14 +- .../FactorLabel/WebAuthnTipContent/index.tsx | 2 +- .../pages/Mfa/MfaForm/FactorLabel/index.tsx | 2 +- .../console/src/pages/Mfa/MfaForm/index.tsx | 2 +- .../src/pages/Mfa/PageWrapper/index.tsx | 2 +- .../console/src/pages/Mfa/Skeleton/index.tsx | 2 +- packages/console/src/pages/NotFound/index.tsx | 6 +- .../EditOrganizationRolesModal/index.tsx | 2 +- .../AddAppsToOrganization.tsx | 2 +- .../MachineToMachine/index.tsx | 4 +- .../Members/AddMembersToOrganization.tsx | 2 +- .../OrganizationDetails/Members/index.tsx | 4 +- .../Settings/JitSettings.tsx | 8 +- .../OrganizationDetails/Settings/index.tsx | 2 +- .../src/pages/OrganizationDetails/index.tsx | 8 +- .../Permissions/ResourceName/index.tsx | 4 +- .../Permissions/index.tsx | 4 +- .../pages/OrganizationRoleDetails/index.tsx | 6 +- .../OrganizationPermissions/index.tsx | 8 +- .../CreateOrganizationRoleModal.tsx | 4 +- .../OrganizationRoles/index.tsx | 10 +- .../src/pages/OrganizationTemplate/index.tsx | 8 +- .../CreateOrganizationModal/index.tsx | 2 +- .../Introduction/components/FlexBox/index.tsx | 2 +- .../components/InteractiveDiagram/index.tsx | 2 +- .../Introduction/components/Panel/index.tsx | 2 +- .../components/Permission/index.tsx | 2 +- .../Introduction/components/Role/index.tsx | 2 +- .../Introduction/components/Section/index.tsx | 2 +- .../Introduction/components/User/index.tsx | 4 +- .../Introduction/components/Vector/John.tsx | 2 +- .../Introduction/components/Vector/Sarah.tsx | 2 +- .../Organizations/Introduction/index.tsx | 6 +- .../EmptyDataPlaceholder/index.tsx | 8 +- .../OrganizationsTable/index.tsx | 4 +- .../console/src/pages/Organizations/index.tsx | 6 +- .../Profile/components/CardContent/index.tsx | 2 +- .../components/ExperienceLikeModal/index.tsx | 6 +- .../components/LinkAccountSection/index.tsx | 4 +- .../pages/Profile/components/NotSet/index.tsx | 2 +- .../Profile/components/Skeleton/index.tsx | 2 +- .../BasicUserInfoUpdateModal/index.tsx | 2 +- .../containers/ChangePasswordModal/index.tsx | 2 +- .../DeletionConfirmationModal/index.tsx | 2 +- .../FinalConfirmationModal/index.tsx | 4 +- .../components/TenantsIssuesModal/index.tsx | 2 +- .../components/TenantsList/index.tsx | 2 +- .../containers/DeleteAccountModal/index.tsx | 2 +- .../VerificationCodeModal/index.tsx | 4 +- .../containers/VerifyPasswordModal/index.tsx | 8 +- packages/console/src/pages/Profile/index.tsx | 4 +- .../RoleDetails/RoleApplications/index.tsx | 6 +- .../AssignPermissionsModal/index.tsx | 2 +- .../src/pages/RoleDetails/RoleUsers/index.tsx | 6 +- .../console/src/pages/RoleDetails/index.tsx | 4 +- .../components/AssignRoleModal/index.tsx | 2 +- .../components/AssignedEntities/index.tsx | 2 +- .../Roles/components/CreateRoleForm/index.tsx | 2 +- .../components/CreateRoleModal/index.tsx | 2 +- packages/console/src/pages/Roles/index.tsx | 6 +- .../Branding/BrandingForm/index.tsx | 2 +- .../Branding/CustomUiForm/index.tsx | 2 +- .../LanguageEditor/AddLanguageSelector.tsx | 6 +- .../LanguageEditor/LanguageDetails.tsx | 6 +- .../LanguageEditor/LanguageItem.tsx | 2 +- .../LanguageEditor/LanguageNav.tsx | 2 +- .../ManageLanguage/LanguageEditor/index.tsx | 4 +- .../Content/LanguagesForm/index.tsx | 2 +- .../PageContent/PasswordPolicy/index.tsx | 2 +- .../SignUpAndSignIn/AdvancedOptions/index.tsx | 2 +- .../SignInMethodEditBox/AddButton.tsx | 6 +- .../SignInMethodEditBox/SignInMethodItem.tsx | 8 +- .../SignInForm/SignInMethodEditBox/index.tsx | 2 +- .../SignUpAndSignIn/SignUpForm/index.tsx | 2 +- .../AddButton/index.tsx | 6 +- .../SelectedConnectorItem/index.tsx | 6 +- .../SocialConnectorEditBox/index.tsx | 2 +- .../ConnectorSetupWarning/index.tsx | 2 +- .../DiffSegment.tsx | 2 +- .../SignInDiffSection.tsx | 2 +- .../SignUpDiffSection.tsx | 2 +- .../SocialTargetsDiffSection.tsx | 2 +- .../SignUpAndSignInChangePreview/index.tsx | 2 +- .../components/FormFieldDescription/index.tsx | 2 +- .../components/FormSectionTitle/index.tsx | 2 +- .../SignInExperienceTabWrapper/index.tsx | 2 +- .../SignInExperience/PageContent/index.tsx | 2 +- .../pages/SignInExperience/Skeleton/index.tsx | 6 +- .../SignInExperience/Welcome/GuideModal.tsx | 6 +- .../pages/SignInExperience/Welcome/index.tsx | 6 +- .../components/Preview/index.tsx | 2 +- .../src/pages/SignInExperience/index.tsx | 2 +- .../SigningKeys/SigningKeyFormCard/index.tsx | 4 +- .../console/src/pages/SigningKeys/index.tsx | 2 +- .../Subscription/CurrentPlan/index.tsx | 2 +- .../PlanQuotaList/DiffQuotaItem/index.tsx | 6 +- .../PlanQuotaDiffCard/PlanQuotaList/index.tsx | 2 +- .../PlanQuotaDiffCard/index.tsx | 2 +- .../DowngradeConfirmModalContent/index.tsx | 2 +- .../TableDataContent/index.tsx | 4 +- .../TableDataWrapper/index.tsx | 4 +- .../PlanComparisonTable/index.tsx | 2 +- .../SwitchPlanActionBar/index.tsx | 2 +- .../TenantSettings/Subscription/index.tsx | 2 +- .../TenantBasicSettings/DeleteCard/index.tsx | 2 +- .../TenantBasicSettings/DeleteModal/index.tsx | 2 +- .../TenantBasicSettings/LeaveCard/index.tsx | 2 +- .../ProfileForm/TenantEnvironment/index.tsx | 2 +- .../ProfileForm/TenantRegion/index.tsx | 2 +- .../TenantBasicSettings/index.tsx | 2 +- .../AddDomainForm/index.tsx | 2 +- .../DnsRecordsTable/index.tsx | 2 +- .../ActivationProcess/Step/index.tsx | 6 +- .../CustomDomain/ActivationProcess/index.tsx | 2 +- .../CustomDomain/CustomDomainHeader/index.tsx | 6 +- .../CustomDomain/index.tsx | 2 +- .../DefaultDomain/index.tsx | 2 +- .../TenantDomainSettings/index.tsx | 2 +- .../TenantMembers/EditMemberModal/index.tsx | 4 +- .../TenantMembers/Invitations/index.tsx | 14 +- .../TenantMembers/InviteEmailsInput/index.tsx | 4 +- .../InviteMemberModal/Footer/index.tsx | 2 +- .../TenantMembers/InviteMemberModal/index.tsx | 4 +- .../TenantSettings/TenantMembers/index.tsx | 8 +- .../index.tsx | 2 +- .../components/Skeleton/index.tsx | 2 +- .../src/pages/TenantSettings/index.tsx | 2 +- .../src/pages/UserDetails/UserLogs/index.tsx | 2 +- .../src/pages/UserDetails/UserRoles/index.tsx | 6 +- .../UserMfaVerifications/index.tsx | 2 +- .../components/UserSocialIdentities/index.tsx | 2 +- .../components/UserSsoIdentities/index.tsx | 2 +- .../console/src/pages/UserDetails/index.tsx | 12 +- .../Users/components/CreateForm/index.tsx | 4 +- packages/console/src/pages/Users/index.tsx | 6 +- .../WebhookDetails/WebhookLogs/index.tsx | 2 +- .../WebhookSettings/SigningKeyField/index.tsx | 4 +- .../WebhookSettings/TestWebhook/index.tsx | 2 +- .../src/pages/WebhookDetails/index.tsx | 12 +- .../pages/Webhooks/CreateFormModal/index.tsx | 2 +- packages/console/src/pages/Webhooks/index.tsx | 12 +- packages/console/src/pages/Welcome/index.tsx | 4 +- packages/console/svgo.config.json | 13 - packages/console/tsconfig.json | 6 +- packages/console/vite.config.ts | 55 + packages/core/src/app/init.ts | 7 +- .../src/middleware/koa-security-headers.ts | 4 +- packages/core/src/middleware/koa-spa-proxy.ts | 12 +- packages/demo-app/package.json | 3 - packages/demo-app/src/App.tsx | 2 +- packages/demo-app/src/DevPanel.tsx | 2 +- packages/demo-app/vite.config.ts | 44 +- packages/phrases-experience/package.json | 1 - pnpm-lock.yaml | 1179 ++++++++++++----- vite.shared.config.ts | 39 + 482 files changed, 2026 insertions(+), 1547 deletions(-) delete mode 100644 packages/console/.parcelrc delete mode 100644 packages/console/.parcelrc.arm64 rename packages/console/{src => }/index.html (85%) delete mode 100644 packages/console/parcel-transformer-mdx2.js delete mode 100644 packages/console/src/include.d/react-app.d.ts create mode 100644 packages/console/src/include.d/vite-env.d.ts delete mode 100644 packages/console/svgo.config.json create mode 100644 packages/console/vite.config.ts create mode 100644 vite.shared.config.ts diff --git a/package.json b/package.json index 51d09398705..dcdf6ccb111 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,8 @@ "@types/pg": "^8.6.6", "husky": "^9.0.0", "pg": "^8.8.0", - "typescript": "^5.0.0" + "typescript": "^5.0.0", + "vite": "^5.3.4" }, "engines": { "node": "^20.9.0", diff --git a/packages/console/.eslintrc.cjs b/packages/console/.eslintrc.cjs index f2cffeab3db..a350201e77d 100644 --- a/packages/console/.eslintrc.cjs +++ b/packages/console/.eslintrc.cjs @@ -49,5 +49,17 @@ module.exports = { ], }, }, + { + files: ['*.config.js', '*.config.ts', '*.d.ts'], + rules: { + 'import/no-unused-modules': 'off', + }, + }, + { + files: ['*.d.ts'], + rules: { + 'import/no-unassigned-import': 'off', + }, + }, ], }; diff --git a/packages/console/.parcelrc b/packages/console/.parcelrc deleted file mode 100644 index eeade8d2890..00000000000 --- a/packages/console/.parcelrc +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": "@parcel/config-default", - "transformers": { - "raw:*": ["@parcel/transformer-raw"], - "**/assets/**/*.svg": [ - "@parcel/transformer-svg-react" - ], - "*.{md,mdx}": [ - "./parcel-transformer-mdx2.js" - ] - }, - "compressors": { - "*.{html,css,js,svg,map}": [ - "...", - "@parcel/compressor-gzip", - "@parcel/compressor-brotli" - ] - } -} diff --git a/packages/console/.parcelrc.arm64 b/packages/console/.parcelrc.arm64 deleted file mode 100644 index c31f639e17b..00000000000 --- a/packages/console/.parcelrc.arm64 +++ /dev/null @@ -1,23 +0,0 @@ -{ - "extends": "@parcel/config-default", - "optimizers": { - // Disable optimizers in arm64 arch https://github.com/parcel-bundler/parcel/issues/7402 - "*.{jpg,jpeg,png}": [] - }, - "transformers": { - "raw:*": ["@parcel/transformer-raw"], - "**/assets/**/*.svg": [ - "@parcel/transformer-svg-react" - ], - "*.{md,mdx}": [ - "./parcel-transformer-mdx2.js" - ] - }, - "compressors": { - "*.{html,css,js,svg,map}": [ - "...", - "@parcel/compressor-gzip", - "@parcel/compressor-brotli" - ] - } -} diff --git a/packages/console/src/index.html b/packages/console/index.html similarity index 85% rename from packages/console/src/index.html rename to packages/console/index.html index 91e6965ac8c..c20b63d96c2 100644 --- a/packages/console/src/index.html +++ b/packages/console/index.html @@ -10,7 +10,7 @@
- + diff --git a/packages/console/package.json b/packages/console/package.json index e5075e13850..0257eaed539 100644 --- a/packages/console/package.json +++ b/packages/console/package.json @@ -14,10 +14,10 @@ "prepack": "pnpm generate", "generate": "./generate.sh", "precommit": "lint-staged", - "start": "parcel src/index.html", - "dev": "cross-env PORT=5002 parcel src/index.html --public-url ${CONSOLE_PUBLIC_URL:-/console} --no-cache --hmr-port 6002", + "start": "vite", + "dev": "vite", "check": "tsc --noEmit", - "build": "pnpm generate && pnpm check && rm -rf dist && parcel build src/index.html --no-autoinstall --no-cache --public-url ${CONSOLE_PUBLIC_URL:-/console}", + "build": "pnpm generate && pnpm check && vite build", "lint": "eslint --ext .ts --ext .tsx src", "lint:report": "pnpm lint --format json --output-file report.json", "stylelint": "stylelint \"src/**/*.scss\"", @@ -39,12 +39,8 @@ "@logto/shared": "workspace:^3.1.1", "@mdx-js/mdx": "^3.0.1", "@mdx-js/react": "^3.0.1", + "@mdx-js/rollup": "^3.0.1", "@monaco-editor/react": "^4.6.0", - "@parcel/compressor-brotli": "2.9.3", - "@parcel/compressor-gzip": "2.9.3", - "@parcel/core": "2.9.3", - "@parcel/transformer-sass": "2.9.3", - "@parcel/transformer-svg-react": "2.9.3", "@silverhand/eslint-config": "6.0.1", "@silverhand/eslint-config-react": "6.0.2", "@silverhand/essentials": "^2.9.1", @@ -63,20 +59,19 @@ "@types/react-helmet": "^6.1.6", "@types/react-modal": "^3.13.1", "@types/react-syntax-highlighter": "^15.5.1", + "@vitejs/plugin-react": "^4.3.1", "@withtyped/client": "^0.8.7", - "buffer": "^6.0.0", "classnames": "^2.3.1", "clean-deep": "^3.4.0", - "cross-env": "^7.0.3", - "csstype": "^3.0.11", "date-fns": "^2.29.3", "dayjs": "^1.10.5", "debug": "^4.3.4", "deep-object-diff": "^1.1.9", "deepmerge": "^4.2.2", "dnd-core": "^16.0.0", + "dotenv": "^16.4.5", "eslint": "^8.56.0", - "history": "^5.3.0", + "find-up": "^7.0.0", "i18next": "^22.4.15", "i18next-browser-languagedetector": "^8.0.0", "identity-obj-proxy": "^3.0.0", @@ -92,11 +87,9 @@ "nanoid": "^5.0.1", "overlayscrollbars": "^2.0.2", "overlayscrollbars-react": "^0.5.0", - "parcel": "2.9.3", - "postcss": "^8.4.31", + "postcss": "^8.4.39", "postcss-modules": "^4.3.0", "prettier": "^3.0.0", - "process": "^0.11.10", "prop-types": "^15.8.1", "property-information": "^6.2.0", "react": "^18.3.1", @@ -114,7 +107,7 @@ "react-markdown": "^9.0.0", "react-modal": "^3.15.1", "react-paginate": "^8.1.3", - "react-router-dom": "^6.10.0", + "react-router-dom": "^6.25.1", "react-syntax-highlighter": "^15.5.0", "react-timer-hook": "^3.0.5", "recharts": "^2.1.13", @@ -122,27 +115,17 @@ "remark-gfm": "^4.0.0", "stylelint": "^15.0.0", "swr": "^2.2.0", - "ts-node": "^10.9.2", - "tslib": "^2.4.1", "typescript": "^5.5.3", + "vite": "^5.3.4", + "vite-plugin-compression": "^0.5.1", + "vite-plugin-prebundle": "^0.0.4", + "vite-plugin-svgr": "^4.2.0", "zod": "^3.23.8", "zod-to-ts": "^1.2.0" }, "engines": { "node": "^20.9.0" }, - "//": "https://github.com/parcel-bundler/parcel/issues/7636", - "targets": { - "default": { - "engines": { - "browsers": "defaults" - } - } - }, - "alias": { - "@/*": "./src/$1", - "@cloud/*": "./src/cloud/$1" - }, "stylelint": { "extends": "@silverhand/eslint-config-react/.stylelintrc" }, diff --git a/packages/console/parcel-transformer-mdx2.js b/packages/console/parcel-transformer-mdx2.js deleted file mode 100644 index bd005897575..00000000000 --- a/packages/console/parcel-transformer-mdx2.js +++ /dev/null @@ -1,61 +0,0 @@ -// https://github.com/parcel-bundler/parcel/pull/7922#issuecomment-1750704973 - -import { compile } from '@mdx-js/mdx'; -import { default as ThrowableDiagnostic } from '@parcel/diagnostic'; -import { Transformer } from '@parcel/plugin'; -import rehypeMdxCodeProps from 'rehype-mdx-code-props'; -import remarkGfm from 'remark-gfm'; - -export default new Transformer({ - async transform({ asset }) { - const source = await asset.getCode(); - - let codeVFile; - - try { - codeVFile = await compile(source, { - development: true, - jsx: true, - providerImportSource: '@mdx-js/react', - remarkPlugins: [remarkGfm], - rehypePlugins: [[rehypeMdxCodeProps, { tagName: 'code' }]], - }); - } catch (error) { - const { start, end } = error.position; - - const highlight = { - message: error.reason, - start, - end, - }; - - if (!(end.line && end.column)) { - highlight.end = { ...start }; - } - - // Adjust for parser and reporter differences - highlight.start.column -= 1; - highlight.end.column -= 1; - - throw new ThrowableDiagnostic({ - diagnostic: { - message: 'Unable to compile MDX', - codeFrames: [ - { - filePath: asset.filePath, - code: source, - codeHighlights: [highlight], - }, - ], - }, - }); - } - - const code = String(codeVFile); - - asset.type = 'jsx'; - asset.setCode(code); - - return [asset]; - }, -}); diff --git a/packages/console/src/assets/docs/guides/index.tsx b/packages/console/src/assets/docs/guides/index.tsx index d83d09817d4..3f93b2c7411 100644 --- a/packages/console/src/assets/docs/guides/index.tsx +++ b/packages/console/src/assets/docs/guides/index.tsx @@ -43,126 +43,126 @@ export const guides: Readonly = Object.freeze([ { order: 1, id: 'web-next-app-router', - Logo: lazy(async () => import('./web-next-app-router/logo.svg')), + Logo: lazy(async () => import('./web-next-app-router/logo.svg?react')), Component: lazy(async () => import('./web-next-app-router/README.mdx')), metadata: webNextAppRouter, }, { order: 1.1, id: 'native-expo', - Logo: lazy(async () => import('./native-expo/logo.svg')), + Logo: lazy(async () => import('./native-expo/logo.svg?react')), Component: lazy(async () => import('./native-expo/README.mdx')), metadata: nativeExpo, }, { order: 1.1, id: 'spa-angular', - Logo: lazy(async () => import('./spa-angular/logo.svg')), + Logo: lazy(async () => import('./spa-angular/logo.svg?react')), Component: lazy(async () => import('./spa-angular/README.mdx')), metadata: spaAngular, }, { order: 1.1, id: 'spa-chrome-extension', - Logo: lazy(async () => import('./spa-chrome-extension/logo.svg')), + Logo: lazy(async () => import('./spa-chrome-extension/logo.svg?react')), Component: lazy(async () => import('./spa-chrome-extension/README.mdx')), metadata: spaChromeExtension, }, { order: 1.1, id: 'spa-react', - Logo: lazy(async () => import('./spa-react/logo.svg')), + Logo: lazy(async () => import('./spa-react/logo.svg?react')), Component: lazy(async () => import('./spa-react/README.mdx')), metadata: spaReact, }, { order: 1.2, id: 'm2m-general', - Logo: lazy(async () => import('./m2m-general/logo.svg')), + Logo: lazy(async () => import('./m2m-general/logo.svg?react')), Component: lazy(async () => import('./m2m-general/README.mdx')), metadata: m2mGeneral, }, { order: 1.2, id: 'web-express', - Logo: lazy(async () => import('./web-express/logo.svg')), + Logo: lazy(async () => import('./web-express/logo.svg?react')), Component: lazy(async () => import('./web-express/README.mdx')), metadata: webExpress, }, { order: 1.2, id: 'web-next', - Logo: lazy(async () => import('./web-next/logo.svg')), + Logo: lazy(async () => import('./web-next/logo.svg?react')), Component: lazy(async () => import('./web-next/README.mdx')), metadata: webNext, }, { order: 1.2, id: 'web-sveltekit', - Logo: lazy(async () => import('./web-sveltekit/logo.svg')), + Logo: lazy(async () => import('./web-sveltekit/logo.svg?react')), Component: lazy(async () => import('./web-sveltekit/README.mdx')), metadata: webSveltekit, }, { order: 1.3, id: 'web-go', - Logo: lazy(async () => import('./web-go/logo.svg')), + Logo: lazy(async () => import('./web-go/logo.svg?react')), Component: lazy(async () => import('./web-go/README.mdx')), metadata: webGo, }, { order: 1.3, id: 'web-next-auth', - Logo: lazy(async () => import('./web-next-auth/logo.svg')), + Logo: lazy(async () => import('./web-next-auth/logo.svg?react')), Component: lazy(async () => import('./web-next-auth/README.mdx')), metadata: webNextAuth, }, { order: 1.4, id: 'web-java-spring-boot', - Logo: lazy(async () => import('./web-java-spring-boot/logo.svg')), + Logo: lazy(async () => import('./web-java-spring-boot/logo.svg?react')), Component: lazy(async () => import('./web-java-spring-boot/README.mdx')), metadata: webJavaSpringBoot, }, { order: 1.6, id: 'spa-vue', - Logo: lazy(async () => import('./spa-vue/logo.svg')), + Logo: lazy(async () => import('./spa-vue/logo.svg?react')), Component: lazy(async () => import('./spa-vue/README.mdx')), metadata: spaVue, }, { order: 1.7, id: 'native-ios-swift', - Logo: lazy(async () => import('./native-ios-swift/logo.svg')), + Logo: lazy(async () => import('./native-ios-swift/logo.svg?react')), Component: lazy(async () => import('./native-ios-swift/README.mdx')), metadata: nativeIosSwift, }, { order: 2, id: 'native-android', - Logo: lazy(async () => import('./native-android/logo.svg')), + Logo: lazy(async () => import('./native-android/logo.svg?react')), Component: lazy(async () => import('./native-android/README.mdx')), metadata: nativeAndroid, }, { order: 2, id: 'spa-vanilla', - Logo: lazy(async () => import('./spa-vanilla/logo.svg')), + Logo: lazy(async () => import('./spa-vanilla/logo.svg?react')), Component: lazy(async () => import('./spa-vanilla/README.mdx')), metadata: spaVanilla, }, { order: 2, id: 'web-nuxt', - Logo: lazy(async () => import('./web-nuxt/logo.svg')), + Logo: lazy(async () => import('./web-nuxt/logo.svg?react')), Component: lazy(async () => import('./web-nuxt/README.mdx')), metadata: webNuxt, }, { order: 2, id: 'web-php', - Logo: lazy(async () => import('./web-php/logo.svg')), + Logo: lazy(async () => import('./web-php/logo.svg?react')), Component: lazy(async () => import('./web-php/README.mdx')), metadata: webPhp, }, @@ -178,105 +178,105 @@ export const guides: Readonly = Object.freeze([ { order: 2.1, id: 'spa-webflow', - Logo: lazy(async () => import('./spa-webflow/logo.svg')), + Logo: lazy(async () => import('./spa-webflow/logo.svg?react')), Component: lazy(async () => import('./spa-webflow/README.mdx')), metadata: spaWebflow, }, { order: 2.2, id: 'web-wordpress', - Logo: lazy(async () => import('./web-wordpress/logo.svg')), + Logo: lazy(async () => import('./web-wordpress/logo.svg?react')), Component: lazy(async () => import('./web-wordpress/README.mdx')), metadata: webWordpress, }, { order: 3, id: 'web-python', - Logo: lazy(async () => import('./web-python/logo.svg')), + Logo: lazy(async () => import('./web-python/logo.svg?react')), Component: lazy(async () => import('./web-python/README.mdx')), metadata: webPython, }, { order: 4, id: 'native-capacitor', - Logo: lazy(async () => import('./native-capacitor/logo.svg')), + Logo: lazy(async () => import('./native-capacitor/logo.svg?react')), Component: lazy(async () => import('./native-capacitor/README.mdx')), metadata: nativeCapacitor, }, { order: 5, id: 'native-flutter', - Logo: lazy(async () => import('./native-flutter/logo.svg')), + Logo: lazy(async () => import('./native-flutter/logo.svg?react')), Component: lazy(async () => import('./native-flutter/README.mdx')), metadata: nativeFlutter, }, { order: 5, id: 'web-dotnet-core', - Logo: lazy(async () => import('./web-dotnet-core/logo.svg')), + Logo: lazy(async () => import('./web-dotnet-core/logo.svg?react')), Component: lazy(async () => import('./web-dotnet-core/README.mdx')), metadata: webDotnetCore, }, { order: 5.1, id: 'web-dotnet-core-mvc', - Logo: lazy(async () => import('./web-dotnet-core-mvc/logo.svg')), + Logo: lazy(async () => import('./web-dotnet-core-mvc/logo.svg?react')), Component: lazy(async () => import('./web-dotnet-core-mvc/README.mdx')), metadata: webDotnetCoreMvc, }, { order: 5.2, id: 'web-dotnet-core-blazor-server', - Logo: lazy(async () => import('./web-dotnet-core-blazor-server/logo.svg')), + Logo: lazy(async () => import('./web-dotnet-core-blazor-server/logo.svg?react')), Component: lazy(async () => import('./web-dotnet-core-blazor-server/README.mdx')), metadata: webDotnetCoreBlazorServer, }, { order: 5.3, id: 'web-dotnet-core-blazor-wasm', - Logo: lazy(async () => import('./web-dotnet-core-blazor-wasm/logo.svg')), + Logo: lazy(async () => import('./web-dotnet-core-blazor-wasm/logo.svg?react')), Component: lazy(async () => import('./web-dotnet-core-blazor-wasm/README.mdx')), metadata: webDotnetCoreBlazorWasm, }, { order: 6, id: 'web-outline', - Logo: lazy(async () => import('./web-outline/logo.svg')), + Logo: lazy(async () => import('./web-outline/logo.svg?react')), Component: lazy(async () => import('./web-outline/README.mdx')), metadata: webOutline, }, { order: 999, id: 'web-gpt-plugin', - Logo: lazy(async () => import('./web-gpt-plugin/logo.svg')), + Logo: lazy(async () => import('./web-gpt-plugin/logo.svg?react')), Component: lazy(async () => import('./web-gpt-plugin/README.mdx')), metadata: webGptPlugin, }, { order: Number.POSITIVE_INFINITY, id: 'api-express', - Logo: lazy(async () => import('./api-express/logo.svg')), + Logo: lazy(async () => import('./api-express/logo.svg?react')), Component: lazy(async () => import('./api-express/README.mdx')), metadata: apiExpress, }, { order: Number.POSITIVE_INFINITY, id: 'api-python', - Logo: lazy(async () => import('./api-python/logo.svg')), + Logo: lazy(async () => import('./api-python/logo.svg?react')), Component: lazy(async () => import('./api-python/README.mdx')), metadata: apiPython, }, { order: Number.POSITIVE_INFINITY, id: 'api-spring-boot', - Logo: lazy(async () => import('./api-spring-boot/logo.svg')), + Logo: lazy(async () => import('./api-spring-boot/logo.svg?react')), Component: lazy(async () => import('./api-spring-boot/README.mdx')), metadata: apiSpringBoot, }, { order: Number.POSITIVE_INFINITY, id: 'third-party-oidc', - Logo: lazy(async () => import('./third-party-oidc/logo.svg')), + Logo: lazy(async () => import('./third-party-oidc/logo.svg?react')), Component: lazy(async () => import('./third-party-oidc/README.mdx')), metadata: thirdPartyOidc, }, diff --git a/packages/console/src/assets/docs/guides/web-gpt-plugin/components/ClientBasics/index.tsx b/packages/console/src/assets/docs/guides/web-gpt-plugin/components/ClientBasics/index.tsx index c7fae219f79..b5ab4e70ba7 100644 --- a/packages/console/src/assets/docs/guides/web-gpt-plugin/components/ClientBasics/index.tsx +++ b/packages/console/src/assets/docs/guides/web-gpt-plugin/components/ClientBasics/index.tsx @@ -4,7 +4,7 @@ import { GuideContext } from '@/components/Guide'; import CopyToClipboard from '@/ds-components/CopyToClipboard'; import FormField from '@/ds-components/FormField'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; export default function ClientBasics() { const { app } = useContext(GuideContext); diff --git a/packages/console/src/cloud/AppRoutes.tsx b/packages/console/src/cloud/AppRoutes.tsx index 9870c709ac6..2e49878cfa8 100644 --- a/packages/console/src/cloud/AppRoutes.tsx +++ b/packages/console/src/cloud/AppRoutes.tsx @@ -9,7 +9,7 @@ import CheckoutSuccessCallback from '@/pages/CheckoutSuccessCallback'; import Profile from '@/pages/Profile'; import HandleSocialCallback from '@/pages/Profile/containers/HandleSocialCallback'; -import * as styles from './AppRoutes.module.scss'; +import styles from './AppRoutes.module.scss'; import Main from './pages/Main'; import SocialDemoCallback from './pages/SocialDemoCallback'; diff --git a/packages/console/src/cloud/pages/Main/InvitationList/index.tsx b/packages/console/src/cloud/pages/Main/InvitationList/index.tsx index e86b71147fe..13e17b42a47 100644 --- a/packages/console/src/cloud/pages/Main/InvitationList/index.tsx +++ b/packages/console/src/cloud/pages/Main/InvitationList/index.tsx @@ -2,7 +2,7 @@ import { OrganizationInvitationStatus, getTenantIdFromOrganizationId } from '@lo import { useContext, useState } from 'react'; import { useTranslation } from 'react-i18next'; -import OrganizationIcon from '@/assets/icons/organization-preview.svg'; +import OrganizationIcon from '@/assets/icons/organization-preview.svg?react'; import { useCloudApi } from '@/cloud/hooks/use-cloud-api'; import { type InvitationListResponse } from '@/cloud/types/router'; import TenantEnvTag from '@/components/TenantEnvTag'; @@ -13,7 +13,7 @@ import Spacer from '@/ds-components/Spacer'; import useTenantPathname from '@/hooks/use-tenant-pathname'; import useUserOnboardingData from '@/onboarding/hooks/use-user-onboarding-data'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly invitations: InvitationListResponse; diff --git a/packages/console/src/cloud/pages/Main/TenantLandingPage/TenantLandingPageContent/index.tsx b/packages/console/src/cloud/pages/Main/TenantLandingPage/TenantLandingPageContent/index.tsx index 6978b899366..e51c9c24c4b 100644 --- a/packages/console/src/cloud/pages/Main/TenantLandingPage/TenantLandingPageContent/index.tsx +++ b/packages/console/src/cloud/pages/Main/TenantLandingPage/TenantLandingPageContent/index.tsx @@ -2,9 +2,9 @@ import { Theme } from '@logto/schemas'; import classNames from 'classnames'; import { useContext, useState } from 'react'; -import Plus from '@/assets/icons/plus.svg'; -import TenantLandingPageImageDark from '@/assets/images/tenant-landing-page-dark.svg'; -import TenantLandingPageImage from '@/assets/images/tenant-landing-page.svg'; +import Plus from '@/assets/icons/plus.svg?react'; +import TenantLandingPageImageDark from '@/assets/images/tenant-landing-page-dark.svg?react'; +import TenantLandingPageImage from '@/assets/images/tenant-landing-page.svg?react'; import { type TenantResponse } from '@/cloud/types/router'; import CreateTenantModal from '@/components/CreateTenantModal'; import { TenantsContext } from '@/contexts/TenantsProvider'; @@ -12,7 +12,7 @@ import Button from '@/ds-components/Button'; import DynamicT from '@/ds-components/DynamicT'; import useTheme from '@/hooks/use-theme'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly className?: string; diff --git a/packages/console/src/cloud/pages/Main/TenantLandingPage/index.tsx b/packages/console/src/cloud/pages/Main/TenantLandingPage/index.tsx index fb99b70dcc4..d5fd24d6c70 100644 --- a/packages/console/src/cloud/pages/Main/TenantLandingPage/index.tsx +++ b/packages/console/src/cloud/pages/Main/TenantLandingPage/index.tsx @@ -1,7 +1,7 @@ import Topbar from '@/components/Topbar'; import TenantLandingPageContent from './TenantLandingPageContent'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; function TenantLandingPage() { return ( diff --git a/packages/console/src/cloud/pages/SocialDemoCallback/index.tsx b/packages/console/src/cloud/pages/SocialDemoCallback/index.tsx index 5c18de94f1c..b83cd0c46a5 100644 --- a/packages/console/src/cloud/pages/SocialDemoCallback/index.tsx +++ b/packages/console/src/cloud/pages/SocialDemoCallback/index.tsx @@ -3,12 +3,12 @@ import { useEffect } from 'react'; import { useTranslation } from 'react-i18next'; import { useSearchParams } from 'react-router-dom'; -import CongratsDark from '@/assets/images/congrats-dark.svg'; -import Congrats from '@/assets/images/congrats.svg'; +import CongratsDark from '@/assets/images/congrats-dark.svg?react'; +import Congrats from '@/assets/images/congrats.svg?react'; import Card from '@/ds-components/Card'; import useTheme from '@/hooks/use-theme'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; function SocialDemoCallback() { const theme = useTheme(); diff --git a/packages/console/src/components/ActionBar/index.tsx b/packages/console/src/components/ActionBar/index.tsx index 11d09537973..403f3a981cc 100644 --- a/packages/console/src/components/ActionBar/index.tsx +++ b/packages/console/src/components/ActionBar/index.tsx @@ -2,7 +2,7 @@ import type { ReactNode } from 'react'; import ProgressBar from '../ProgressBar'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly step: number; diff --git a/packages/console/src/components/ActionsButton/index.tsx b/packages/console/src/components/ActionsButton/index.tsx index 575b05f1bd6..00a27113274 100644 --- a/packages/console/src/components/ActionsButton/index.tsx +++ b/packages/console/src/components/ActionsButton/index.tsx @@ -2,15 +2,15 @@ import { type AdminConsoleKey } from '@logto/phrases'; import { useCallback, useState } from 'react'; import { useTranslation } from 'react-i18next'; -import Delete from '@/assets/icons/delete.svg'; -import Edit from '@/assets/icons/edit.svg'; -import More from '@/assets/icons/more.svg'; +import Delete from '@/assets/icons/delete.svg?react'; +import Edit from '@/assets/icons/edit.svg?react'; +import More from '@/assets/icons/more.svg?react'; import ActionMenu, { ActionMenuItem } from '@/ds-components/ActionMenu'; import ConfirmModal from '@/ds-components/ConfirmModal'; import DynamicT from '@/ds-components/DynamicT'; import useActionTranslation from '@/hooks/use-action-translation'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { /** A function that will be called when the user confirms the deletion. If not provided, diff --git a/packages/console/src/components/AppError/index.tsx b/packages/console/src/components/AppError/index.tsx index 49a2bfdbb89..468aa8d80fe 100644 --- a/packages/console/src/components/AppError/index.tsx +++ b/packages/console/src/components/AppError/index.tsx @@ -3,15 +3,15 @@ import { Theme } from '@logto/schemas'; import { useState } from 'react'; import { useTranslation } from 'react-i18next'; -import KeyboardArrowDown from '@/assets/icons/keyboard-arrow-down.svg'; -import KeyboardArrowUp from '@/assets/icons/keyboard-arrow-up.svg'; -import ErrorDark from '@/assets/images/error-dark.svg'; -import Error from '@/assets/images/error.svg'; +import KeyboardArrowDown from '@/assets/icons/keyboard-arrow-down.svg?react'; +import KeyboardArrowUp from '@/assets/icons/keyboard-arrow-up.svg?react'; +import ErrorDark from '@/assets/images/error-dark.svg?react'; +import Error from '@/assets/images/error.svg?react'; import Button from '@/ds-components/Button'; import useTheme from '@/hooks/use-theme'; import { onKeyDownHandler } from '@/utils/a11y'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly title?: string; diff --git a/packages/console/src/components/AppLoading/index.tsx b/packages/console/src/components/AppLoading/index.tsx index 036e8efa270..c0db14cb006 100644 --- a/packages/console/src/components/AppLoading/index.tsx +++ b/packages/console/src/components/AppLoading/index.tsx @@ -1,7 +1,7 @@ -import Logo from '@/assets/images/logo.svg'; +import Logo from '@/assets/images/logo.svg?react'; import { Daisy as Spinner } from '@/ds-components/Spinner'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; function AppLoading() { return ( diff --git a/packages/console/src/components/ApplicationCreation/CreateForm/index.tsx b/packages/console/src/components/ApplicationCreation/CreateForm/index.tsx index 21c88536a07..7f4ac87e949 100644 --- a/packages/console/src/components/ApplicationCreation/CreateForm/index.tsx +++ b/packages/console/src/components/ApplicationCreation/CreateForm/index.tsx @@ -17,12 +17,12 @@ import TextInput from '@/ds-components/TextInput'; import useApi from '@/hooks/use-api'; import useCurrentUser from '@/hooks/use-current-user'; import TypeDescription from '@/pages/Applications/components/TypeDescription'; -import * as modalStyles from '@/scss/modal.module.scss'; +import modalStyles from '@/scss/modal.module.scss'; import { applicationTypeI18nKey } from '@/types/applications'; import { trySubmitSafe } from '@/utils/form'; import Footer from './Footer'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type FormData = { type: ApplicationType; diff --git a/packages/console/src/components/ApplicationName/index.tsx b/packages/console/src/components/ApplicationName/index.tsx index e537d5d9c0e..96f593e0ace 100644 --- a/packages/console/src/components/ApplicationName/index.tsx +++ b/packages/console/src/components/ApplicationName/index.tsx @@ -10,7 +10,7 @@ import useSwrFetcher from '@/hooks/use-swr-fetcher'; import useTenantPathname from '@/hooks/use-tenant-pathname'; import { shouldRetryOnError } from '@/utils/request'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly applicationId: string; diff --git a/packages/console/src/components/AuditLogTable/components/EventName/index.tsx b/packages/console/src/components/AuditLogTable/components/EventName/index.tsx index 46898ff3b36..ae6066090f9 100644 --- a/packages/console/src/components/AuditLogTable/components/EventName/index.tsx +++ b/packages/console/src/components/AuditLogTable/components/EventName/index.tsx @@ -1,13 +1,13 @@ import classNames from 'classnames'; import { Link } from 'react-router-dom'; -import Failed from '@/assets/icons/failed.svg'; -import Success from '@/assets/icons/success.svg'; +import Failed from '@/assets/icons/failed.svg?react'; +import Success from '@/assets/icons/success.svg?react'; import { logEventTitle } from '@/consts/logs'; import Tag from '@/ds-components/Tag'; import useTenantPathname from '@/hooks/use-tenant-pathname'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly eventKey: string; diff --git a/packages/console/src/components/AuditLogTable/index.tsx b/packages/console/src/components/AuditLogTable/index.tsx index 6901f5fa3a6..8cd31e744b3 100644 --- a/packages/console/src/components/AuditLogTable/index.tsx +++ b/packages/console/src/components/AuditLogTable/index.tsx @@ -19,7 +19,7 @@ import EmptyDataPlaceholder from '../EmptyDataPlaceholder'; import ApplicationSelector from './components/ApplicationSelector'; import EventName from './components/EventName'; import EventSelector from './components/EventSelector'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; const auditLogEventOptions = Object.entries(auditLogEventTitle).map(([value, title]) => ({ value, diff --git a/packages/console/src/components/BasicWebhookForm/index.tsx b/packages/console/src/components/BasicWebhookForm/index.tsx index f110c7b852c..98ba5b7097e 100644 --- a/packages/console/src/components/BasicWebhookForm/index.tsx +++ b/packages/console/src/components/BasicWebhookForm/index.tsx @@ -14,7 +14,7 @@ import FormField from '@/ds-components/FormField'; import TextInput from '@/ds-components/TextInput'; import { uriValidator } from '@/utils/validator'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; const hookEventGroups: Array> = [ ...schemaGroupedDataHookEvents.map(([schema, events]) => ({ diff --git a/packages/console/src/components/BillInfo/index.tsx b/packages/console/src/components/BillInfo/index.tsx index c2a3a25f2df..85ec6946fed 100644 --- a/packages/console/src/components/BillInfo/index.tsx +++ b/packages/console/src/components/BillInfo/index.tsx @@ -1,7 +1,7 @@ import { useContext, useState } from 'react'; import { Trans, useTranslation } from 'react-i18next'; -import Tip from '@/assets/icons/tip.svg'; +import Tip from '@/assets/icons/tip.svg?react'; import { newPlansBlogLink } from '@/consts'; import { TenantsContext } from '@/contexts/TenantsProvider'; import Button from '@/ds-components/Button'; @@ -11,7 +11,7 @@ import TextLink from '@/ds-components/TextLink'; import { ToggleTip } from '@/ds-components/Tip'; import useSubscribe from '@/hooks/use-subscribe'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly cost: number; diff --git a/packages/console/src/components/Breakable/index.tsx b/packages/console/src/components/Breakable/index.tsx index ca5bf216797..45de5954c8c 100644 --- a/packages/console/src/components/Breakable/index.tsx +++ b/packages/console/src/components/Breakable/index.tsx @@ -1,4 +1,4 @@ -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly children: React.ReactNode; diff --git a/packages/console/src/components/ConnectorForm/BasicForm/index.tsx b/packages/console/src/components/ConnectorForm/BasicForm/index.tsx index fb872a83e6d..0711588a6a2 100644 --- a/packages/console/src/components/ConnectorForm/BasicForm/index.tsx +++ b/packages/console/src/components/ConnectorForm/BasicForm/index.tsx @@ -2,7 +2,7 @@ import { Theme } from '@logto/schemas'; import { Controller, useFormContext } from 'react-hook-form'; import { Trans, useTranslation } from 'react-i18next'; -import Error from '@/assets/icons/toast-error.svg'; +import Error from '@/assets/icons/toast-error.svg?react'; import ImageInputs from '@/components/ImageInputs'; import UnnamedTrans from '@/components/UnnamedTrans'; import FormField from '@/ds-components/FormField'; @@ -13,7 +13,7 @@ import useDocumentationUrl from '@/hooks/use-documentation-url'; import type { ConnectorFormType } from '@/types/connector'; import { SyncProfileMode } from '@/types/connector'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; const themeToField = Object.freeze({ [Theme.Light]: 'logo', diff --git a/packages/console/src/components/ConnectorForm/ConfigForm/ConfigFormFields/index.tsx b/packages/console/src/components/ConnectorForm/ConfigForm/ConfigFormFields/index.tsx index fb1119d810f..90e05fd7e5b 100644 --- a/packages/console/src/components/ConnectorForm/ConfigForm/ConfigFormFields/index.tsx +++ b/packages/console/src/components/ConnectorForm/ConfigForm/ConfigFormFields/index.tsx @@ -15,7 +15,7 @@ import Textarea from '@/ds-components/Textarea'; import type { ConnectorFormType } from '@/types/connector'; import { jsonValidator } from '@/utils/validator'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly formItems: ConnectorConfigFormItem[]; diff --git a/packages/console/src/components/ConnectorForm/ConfigForm/index.tsx b/packages/console/src/components/ConnectorForm/ConfigForm/index.tsx index b13a45d524e..d1789eb1ce9 100644 --- a/packages/console/src/components/ConnectorForm/ConfigForm/index.tsx +++ b/packages/console/src/components/ConnectorForm/ConfigForm/index.tsx @@ -16,7 +16,7 @@ import type { ConnectorFormType } from '@/types/connector'; import { jsonValidator } from '@/utils/validator'; import ConfigFormFields from './ConfigFormFields'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly formItems?: ConnectorConfigFormItem[]; diff --git a/packages/console/src/components/ConnectorForm/GoogleOneTapCard/index.tsx b/packages/console/src/components/ConnectorForm/GoogleOneTapCard/index.tsx index cfb7deb1284..da03323f5df 100644 --- a/packages/console/src/components/ConnectorForm/GoogleOneTapCard/index.tsx +++ b/packages/console/src/components/ConnectorForm/GoogleOneTapCard/index.tsx @@ -12,7 +12,7 @@ import useTheme from '@/hooks/use-theme'; import figureDark from './figure-dark.webp'; import figureLight from './figure-light.webp'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type FormContext = { rawConfig: { oneTap: GoogleConnectorConfig['oneTap'] } }; diff --git a/packages/console/src/components/ConnectorLogo/index.tsx b/packages/console/src/components/ConnectorLogo/index.tsx index 333cbcff5de..809afe5e01d 100644 --- a/packages/console/src/components/ConnectorLogo/index.tsx +++ b/packages/console/src/components/ConnectorLogo/index.tsx @@ -5,7 +5,7 @@ import classNames from 'classnames'; import ImageWithErrorFallback from '@/ds-components/ImageWithErrorFallback'; import useTheme from '@/hooks/use-theme'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly className?: string; diff --git a/packages/console/src/components/ConnectorTester/index.tsx b/packages/console/src/components/ConnectorTester/index.tsx index 3e88f51c43f..874d5428892 100644 --- a/packages/console/src/components/ConnectorTester/index.tsx +++ b/packages/console/src/components/ConnectorTester/index.tsx @@ -15,7 +15,7 @@ import useApi from '@/hooks/use-api'; import { onKeyDownHandler } from '@/utils/a11y'; import { trySubmitSafe } from '@/utils/form'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly connectorFactoryId: string; diff --git a/packages/console/src/components/CreateConnectorForm/ConnectorRadioGroup/ConnectorRadio/index.tsx b/packages/console/src/components/CreateConnectorForm/ConnectorRadioGroup/ConnectorRadio/index.tsx index b722f3f99bb..fc2293ab59d 100644 --- a/packages/console/src/components/CreateConnectorForm/ConnectorRadioGroup/ConnectorRadio/index.tsx +++ b/packages/console/src/components/CreateConnectorForm/ConnectorRadioGroup/ConnectorRadio/index.tsx @@ -5,7 +5,7 @@ import ConnectorLogo from '@/components/ConnectorLogo'; import UnnamedTrans from '@/components/UnnamedTrans'; import { type ConnectorGroup } from '@/types/connector'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly data: ConnectorGroup; diff --git a/packages/console/src/components/CreateConnectorForm/ConnectorRadioGroup/index.tsx b/packages/console/src/components/CreateConnectorForm/ConnectorRadioGroup/index.tsx index f682f929e8a..38a81ebe01b 100644 --- a/packages/console/src/components/CreateConnectorForm/ConnectorRadioGroup/index.tsx +++ b/packages/console/src/components/CreateConnectorForm/ConnectorRadioGroup/index.tsx @@ -5,7 +5,7 @@ import RadioGroup, { Radio } from '@/ds-components/RadioGroup'; import { type ConnectorGroup } from '@/types/connector'; import ConnectorRadio from './ConnectorRadio'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; export type ConnectorRadioGroupSize = 'medium' | 'large' | 'xlarge'; diff --git a/packages/console/src/components/CreateConnectorForm/PlatformSelector/index.tsx b/packages/console/src/components/CreateConnectorForm/PlatformSelector/index.tsx index 658db4e286d..01a9eac6eab 100644 --- a/packages/console/src/components/CreateConnectorForm/PlatformSelector/index.tsx +++ b/packages/console/src/components/CreateConnectorForm/PlatformSelector/index.tsx @@ -6,7 +6,7 @@ import { connectorPlatformLabel } from '@/consts/connectors'; import RadioGroup, { Radio } from '@/ds-components/RadioGroup'; import type { ConnectorGroup } from '@/types/connector'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly connectorGroup: ConnectorGroup; diff --git a/packages/console/src/components/CreateConnectorForm/Skeleton/index.tsx b/packages/console/src/components/CreateConnectorForm/Skeleton/index.tsx index 9ecdb68975f..c305f630c42 100644 --- a/packages/console/src/components/CreateConnectorForm/Skeleton/index.tsx +++ b/packages/console/src/components/CreateConnectorForm/Skeleton/index.tsx @@ -1,9 +1,9 @@ import classNames from 'classnames'; -import * as radioStyles from '../ConnectorRadioGroup/ConnectorRadio/index.module.scss'; -import * as radioGroupStyles from '../ConnectorRadioGroup/index.module.scss'; +import radioStyles from '../ConnectorRadioGroup/ConnectorRadio/index.module.scss'; +import radioGroupStyles from '../ConnectorRadioGroup/index.module.scss'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly numberOfLoadingConnectors?: number; diff --git a/packages/console/src/components/CreateConnectorForm/index.tsx b/packages/console/src/components/CreateConnectorForm/index.tsx index 5ed33692ef9..db935cd198a 100644 --- a/packages/console/src/components/CreateConnectorForm/index.tsx +++ b/packages/console/src/components/CreateConnectorForm/index.tsx @@ -10,7 +10,7 @@ import useSWR from 'swr'; import DynamicT from '@/ds-components/DynamicT'; import ModalLayout from '@/ds-components/ModalLayout'; import type { RequestError } from '@/hooks/use-api'; -import * as modalStyles from '@/scss/modal.module.scss'; +import modalStyles from '@/scss/modal.module.scss'; import { getConnectorGroups } from '../../pages/Connectors/utils'; @@ -18,7 +18,7 @@ import ConnectorRadioGroup from './ConnectorRadioGroup'; import Footer from './Footer'; import PlatformSelector from './PlatformSelector'; import Skeleton from './Skeleton'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; import { compareConnectors, getConnectorRadioGroupSize, getModalTitle } from './utils'; type Props = { diff --git a/packages/console/src/components/CreateTenantModal/EnvTagOptionContent/index.tsx b/packages/console/src/components/CreateTenantModal/EnvTagOptionContent/index.tsx index f9d6a10549d..48b2f75e2d7 100644 --- a/packages/console/src/components/CreateTenantModal/EnvTagOptionContent/index.tsx +++ b/packages/console/src/components/CreateTenantModal/EnvTagOptionContent/index.tsx @@ -7,7 +7,7 @@ import DynamicT from '@/ds-components/DynamicT'; import Tag from '@/ds-components/Tag'; import { ReservedPlanName } from '@/types/subscriptions'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly tag: TenantTag; diff --git a/packages/console/src/components/CreateTenantModal/SelectTenantPlanModal/PlanCardItem/FeaturedPlanContent/index.tsx b/packages/console/src/components/CreateTenantModal/SelectTenantPlanModal/PlanCardItem/FeaturedPlanContent/index.tsx index 8e95a6a2a3a..9007d706273 100644 --- a/packages/console/src/components/CreateTenantModal/SelectTenantPlanModal/PlanCardItem/FeaturedPlanContent/index.tsx +++ b/packages/console/src/components/CreateTenantModal/SelectTenantPlanModal/PlanCardItem/FeaturedPlanContent/index.tsx @@ -1,9 +1,9 @@ import classNames from 'classnames'; -import Failed from '@/assets/icons/failed.svg'; -import Success from '@/assets/icons/success.svg'; +import Failed from '@/assets/icons/failed.svg?react'; +import Success from '@/assets/icons/success.svg?react'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; import useFeaturedPlanContent from './use-featured-plan-content'; type Props = { diff --git a/packages/console/src/components/CreateTenantModal/SelectTenantPlanModal/PlanCardItem/index.tsx b/packages/console/src/components/CreateTenantModal/SelectTenantPlanModal/PlanCardItem/index.tsx index f6836d4041c..417d5d77a66 100644 --- a/packages/console/src/components/CreateTenantModal/SelectTenantPlanModal/PlanCardItem/index.tsx +++ b/packages/console/src/components/CreateTenantModal/SelectTenantPlanModal/PlanCardItem/index.tsx @@ -3,7 +3,7 @@ import classNames from 'classnames'; import { useContext, useMemo } from 'react'; import { Trans, useTranslation } from 'react-i18next'; -import ArrowRight from '@/assets/icons/arrow-right.svg'; +import ArrowRight from '@/assets/icons/arrow-right.svg?react'; import PlanDescription from '@/components/PlanDescription'; import PlanName from '@/components/PlanName'; import { pricingLink } from '@/consts'; @@ -15,7 +15,7 @@ import TextLink from '@/ds-components/TextLink'; import { type SubscriptionPlan } from '@/types/subscriptions'; import FeaturedPlanContent from './FeaturedPlanContent'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly plan: SubscriptionPlan; diff --git a/packages/console/src/components/CreateTenantModal/SelectTenantPlanModal/index.tsx b/packages/console/src/components/CreateTenantModal/SelectTenantPlanModal/index.tsx index 38d4260599f..2d4f796a641 100644 --- a/packages/console/src/components/CreateTenantModal/SelectTenantPlanModal/index.tsx +++ b/packages/console/src/components/CreateTenantModal/SelectTenantPlanModal/index.tsx @@ -13,14 +13,14 @@ import ModalLayout from '@/ds-components/ModalLayout'; import TextLink from '@/ds-components/TextLink'; import useSubscribe from '@/hooks/use-subscribe'; import useSubscriptionPlans from '@/hooks/use-subscription-plans'; -import * as modalStyles from '@/scss/modal.module.scss'; +import modalStyles from '@/scss/modal.module.scss'; import { type SubscriptionPlan } from '@/types/subscriptions'; import { pickupFeaturedPlans } from '@/utils/subscription'; import { type CreateTenantData } from '../types'; import PlanCardItem from './PlanCardItem'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly tenantData?: CreateTenantData; diff --git a/packages/console/src/components/CreateTenantModal/index.tsx b/packages/console/src/components/CreateTenantModal/index.tsx index d6525cc5162..3dc2fd67878 100644 --- a/packages/console/src/components/CreateTenantModal/index.tsx +++ b/packages/console/src/components/CreateTenantModal/index.tsx @@ -5,8 +5,8 @@ import { toast } from 'react-hot-toast'; import { useTranslation } from 'react-i18next'; import Modal from 'react-modal'; -import CreateTenantHeaderIconDark from '@/assets/icons/create-tenant-header-dark.svg'; -import CreateTenantHeaderIcon from '@/assets/icons/create-tenant-header.svg'; +import CreateTenantHeaderIconDark from '@/assets/icons/create-tenant-header-dark.svg?react'; +import CreateTenantHeaderIcon from '@/assets/icons/create-tenant-header.svg?react'; import { useCloudApi } from '@/cloud/hooks/use-cloud-api'; import { type TenantResponse } from '@/cloud/types/router'; import Region, { RegionName } from '@/components/Region'; @@ -17,11 +17,11 @@ import ModalLayout from '@/ds-components/ModalLayout'; import RadioGroup, { Radio } from '@/ds-components/RadioGroup'; import TextInput from '@/ds-components/TextInput'; import useTheme from '@/hooks/use-theme'; -import * as modalStyles from '@/scss/modal.module.scss'; +import modalStyles from '@/scss/modal.module.scss'; import EnvTagOptionContent from './EnvTagOptionContent'; import SelectTenantPlanModal from './SelectTenantPlanModal'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; import { type CreateTenantData } from './types'; type Props = { diff --git a/packages/console/src/components/CustomUiAssetsUploader/index.tsx b/packages/console/src/components/CustomUiAssetsUploader/index.tsx index a985b0a062b..070cdbdc025 100644 --- a/packages/console/src/components/CustomUiAssetsUploader/index.tsx +++ b/packages/console/src/components/CustomUiAssetsUploader/index.tsx @@ -4,14 +4,14 @@ import { format } from 'date-fns/fp'; import { useCallback, useState } from 'react'; import { useTranslation } from 'react-i18next'; -import DeleteIcon from '@/assets/icons/delete.svg'; +import DeleteIcon from '@/assets/icons/delete.svg?react'; import IconButton from '@/ds-components/IconButton'; import FileUploader from '@/ds-components/Uploader/FileUploader'; import { formatBytes } from '@/utils/uploader'; import FileIcon from '../FileIcon'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { // eslint-disable-next-line react/boolean-prop-naming diff --git a/packages/console/src/components/DetailsForm/index.tsx b/packages/console/src/components/DetailsForm/index.tsx index c19161d60c4..fb2b8ef231a 100644 --- a/packages/console/src/components/DetailsForm/index.tsx +++ b/packages/console/src/components/DetailsForm/index.tsx @@ -3,7 +3,7 @@ import type { ReactNode } from 'react'; import SubmitFormChangesActionBar from '../SubmitFormChangesActionBar'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly autoComplete?: string; diff --git a/packages/console/src/components/DetailsPage/DetailsPageHeader/index.tsx b/packages/console/src/components/DetailsPage/DetailsPageHeader/index.tsx index b4b431a33a9..d72e741f6bf 100644 --- a/packages/console/src/components/DetailsPage/DetailsPageHeader/index.tsx +++ b/packages/console/src/components/DetailsPage/DetailsPageHeader/index.tsx @@ -10,7 +10,7 @@ import { } from 'react'; import { useTranslation } from 'react-i18next'; -import More from '@/assets/icons/more.svg'; +import More from '@/assets/icons/more.svg?react'; import ActionMenu, { ActionMenuItem } from '@/ds-components/ActionMenu'; import Button from '@/ds-components/Button'; import Card from '@/ds-components/Card'; @@ -20,7 +20,7 @@ import DynamicT from '@/ds-components/DynamicT'; import Tag, { type Props as TagProps } from '@/ds-components/Tag'; import useWindowResize from '@/hooks/use-window-resize'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type StatusTag = { status: TagProps['status']; diff --git a/packages/console/src/components/DetailsPage/Skeleton/index.tsx b/packages/console/src/components/DetailsPage/Skeleton/index.tsx index b796c621e91..58bfcb30b24 100644 --- a/packages/console/src/components/DetailsPage/Skeleton/index.tsx +++ b/packages/console/src/components/DetailsPage/Skeleton/index.tsx @@ -1,7 +1,7 @@ import { FormCardSkeleton } from '@/components/FormCard'; import Spacer from '@/ds-components/Spacer'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; function Skeleton() { return ( diff --git a/packages/console/src/components/DetailsPage/index.tsx b/packages/console/src/components/DetailsPage/index.tsx index c6083122d0f..2f4f8677413 100644 --- a/packages/console/src/components/DetailsPage/index.tsx +++ b/packages/console/src/components/DetailsPage/index.tsx @@ -3,7 +3,7 @@ import classNames from 'classnames'; import type { ReactElement, ReactNode } from 'react'; import { type To } from 'react-router-dom'; -import Back from '@/assets/icons/back.svg'; +import Back from '@/assets/icons/back.svg?react'; import type DangerousRaw from '@/ds-components/DangerousRaw'; import DynamicT from '@/ds-components/DynamicT'; import TextLink from '@/ds-components/TextLink'; @@ -12,7 +12,7 @@ import type { RequestError } from '@/hooks/use-api'; import RequestDataError from '../RequestDataError'; import Skeleton from './Skeleton'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly backLink: To; diff --git a/packages/console/src/components/Drawer/index.tsx b/packages/console/src/components/Drawer/index.tsx index 99e004b664d..bf920ab5d79 100644 --- a/packages/console/src/components/Drawer/index.tsx +++ b/packages/console/src/components/Drawer/index.tsx @@ -1,12 +1,12 @@ import type { AdminConsoleKey } from '@logto/phrases'; import ReactModal from 'react-modal'; -import Close from '@/assets/icons/close.svg'; +import Close from '@/assets/icons/close.svg?react'; import CardTitle from '@/ds-components/CardTitle'; import IconButton from '@/ds-components/IconButton'; import Spacer from '@/ds-components/Spacer'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly title?: AdminConsoleKey; diff --git a/packages/console/src/components/EditScopeModal/index.tsx b/packages/console/src/components/EditScopeModal/index.tsx index 1ba3bc37bee..5e8a3cc1fda 100644 --- a/packages/console/src/components/EditScopeModal/index.tsx +++ b/packages/console/src/components/EditScopeModal/index.tsx @@ -8,7 +8,7 @@ import Button from '@/ds-components/Button'; import FormField from '@/ds-components/FormField'; import ModalLayout from '@/ds-components/ModalLayout'; import TextInput from '@/ds-components/TextInput'; -import * as modalStyles from '@/scss/modal.module.scss'; +import modalStyles from '@/scss/modal.module.scss'; import { trySubmitSafe } from '@/utils/form'; export type EditScopeData = { diff --git a/packages/console/src/components/EmptyDataPlaceholder/index.tsx b/packages/console/src/components/EmptyDataPlaceholder/index.tsx index bdf1706507b..4b7d12ad7b0 100644 --- a/packages/console/src/components/EmptyDataPlaceholder/index.tsx +++ b/packages/console/src/components/EmptyDataPlaceholder/index.tsx @@ -3,11 +3,11 @@ import classNames from 'classnames'; import { type ReactNode } from 'react'; import { useTranslation } from 'react-i18next'; -import EmptyDark from '@/assets/images/table-empty-dark.svg'; -import Empty from '@/assets/images/table-empty.svg'; +import EmptyDark from '@/assets/images/table-empty-dark.svg?react'; +import Empty from '@/assets/images/table-empty.svg?react'; import useTheme from '@/hooks/use-theme'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly title?: ReactNode; diff --git a/packages/console/src/components/EntitiesTransfer/components/EntityItem/index.tsx b/packages/console/src/components/EntitiesTransfer/components/EntityItem/index.tsx index 0b8ccaa9db2..7646f9f66ee 100644 --- a/packages/console/src/components/EntitiesTransfer/components/EntityItem/index.tsx +++ b/packages/console/src/components/EntitiesTransfer/components/EntityItem/index.tsx @@ -5,7 +5,7 @@ import UserAvatar from '@/components/UserAvatar'; import SuspendedTag from '@/pages/Users/components/SuspendedTag'; import { getUserTitle } from '@/utils/user'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type UserItemProps = { readonly entity: User; diff --git a/packages/console/src/components/EntitiesTransfer/components/SourceEntitiesBox/index.tsx b/packages/console/src/components/EntitiesTransfer/components/SourceEntitiesBox/index.tsx index e8402edf490..01715df9161 100644 --- a/packages/console/src/components/EntitiesTransfer/components/SourceEntitiesBox/index.tsx +++ b/packages/console/src/components/EntitiesTransfer/components/SourceEntitiesBox/index.tsx @@ -6,7 +6,7 @@ import { useState } from 'react'; import { useTranslation } from 'react-i18next'; import useSWR from 'swr'; -import Search from '@/assets/icons/search.svg'; +import Search from '@/assets/icons/search.svg?react'; import EmptyDataPlaceholder from '@/components/EmptyDataPlaceholder'; import { defaultPageSize } from '@/consts'; import DynamicT from '@/ds-components/DynamicT'; @@ -14,13 +14,13 @@ import Pagination from '@/ds-components/Pagination'; import TextInput from '@/ds-components/TextInput'; import type { RequestError } from '@/hooks/use-api'; import useDebounce from '@/hooks/use-debounce'; -import * as transferLayout from '@/scss/transfer.module.scss'; +import transferLayout from '@/scss/transfer.module.scss'; import { type Identifiable } from '@/types/general'; import { buildUrl, formatSearchKeyword } from '@/utils/url'; import SourceEntityItem from '../SourceEntityItem'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type SearchProps = { pathname: string; diff --git a/packages/console/src/components/EntitiesTransfer/components/SourceEntityItem/index.tsx b/packages/console/src/components/EntitiesTransfer/components/SourceEntityItem/index.tsx index b26f110b3ae..1c3dc0d1820 100644 --- a/packages/console/src/components/EntitiesTransfer/components/SourceEntityItem/index.tsx +++ b/packages/console/src/components/EntitiesTransfer/components/SourceEntityItem/index.tsx @@ -4,7 +4,7 @@ import Checkbox from '@/ds-components/Checkbox'; import { type Identifiable } from '@/types/general'; import { onKeyDownHandler } from '@/utils/a11y'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly entity: T; diff --git a/packages/console/src/components/EntitiesTransfer/components/TargetEntitiesBox/index.tsx b/packages/console/src/components/EntitiesTransfer/components/TargetEntitiesBox/index.tsx index 145cbbfb31b..7c19d6e69cf 100644 --- a/packages/console/src/components/EntitiesTransfer/components/TargetEntitiesBox/index.tsx +++ b/packages/console/src/components/EntitiesTransfer/components/TargetEntitiesBox/index.tsx @@ -1,11 +1,11 @@ import { useTranslation } from 'react-i18next'; -import * as transferLayout from '@/scss/transfer.module.scss'; +import transferLayout from '@/scss/transfer.module.scss'; import { type Identifiable } from '@/types/general'; import TargetEntityItem from '../TargetEntityItem'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly renderEntity: (entity: T) => React.ReactNode; diff --git a/packages/console/src/components/EntitiesTransfer/components/TargetEntityItem/index.tsx b/packages/console/src/components/EntitiesTransfer/components/TargetEntityItem/index.tsx index 8c71be5d205..47c4f05b19b 100644 --- a/packages/console/src/components/EntitiesTransfer/components/TargetEntityItem/index.tsx +++ b/packages/console/src/components/EntitiesTransfer/components/TargetEntityItem/index.tsx @@ -1,10 +1,10 @@ import { type ReactNode } from 'react'; -import Close from '@/assets/icons/close.svg'; +import Close from '@/assets/icons/close.svg?react'; import IconButton from '@/ds-components/IconButton'; import { type Identifiable } from '@/types/general'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly entity: T; diff --git a/packages/console/src/components/EntitiesTransfer/index.tsx b/packages/console/src/components/EntitiesTransfer/index.tsx index ffec093f2ef..87d4ca74344 100644 --- a/packages/console/src/components/EntitiesTransfer/index.tsx +++ b/packages/console/src/components/EntitiesTransfer/index.tsx @@ -1,11 +1,11 @@ import classNames from 'classnames'; -import * as transferLayout from '@/scss/transfer.module.scss'; +import transferLayout from '@/scss/transfer.module.scss'; import { type Identifiable } from '@/types/general'; import SourceEntitiesBox, { type Props as SourceProps } from './components/SourceEntitiesBox'; import TargetEntitiesBox from './components/TargetEntitiesBox'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = SourceProps & { readonly errorMessage?: string; diff --git a/packages/console/src/components/FeatureTag/BetaTag.tsx b/packages/console/src/components/FeatureTag/BetaTag.tsx index 4bbe194a095..452eab39d3b 100644 --- a/packages/console/src/components/FeatureTag/BetaTag.tsx +++ b/packages/console/src/components/FeatureTag/BetaTag.tsx @@ -6,7 +6,7 @@ import classNames from 'classnames'; * Used to indicate that a new released feature is in beta. */ -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly className?: string; diff --git a/packages/console/src/components/FeatureTag/index.tsx b/packages/console/src/components/FeatureTag/index.tsx index cfec1dc5288..75d58d3271b 100644 --- a/packages/console/src/components/FeatureTag/index.tsx +++ b/packages/console/src/components/FeatureTag/index.tsx @@ -4,7 +4,7 @@ import { useContext } from 'react'; import { TenantsContext } from '@/contexts/TenantsProvider'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; export { default as BetaTag } from './BetaTag'; diff --git a/packages/console/src/components/FileIcon/index.tsx b/packages/console/src/components/FileIcon/index.tsx index bab200d1d0f..29c8585ff8b 100644 --- a/packages/console/src/components/FileIcon/index.tsx +++ b/packages/console/src/components/FileIcon/index.tsx @@ -1,8 +1,8 @@ import { Theme } from '@logto/schemas'; import { type ReactNode } from 'react'; -import FileIconDark from '@/assets/icons/file-icon-dark.svg'; -import FileIconLight from '@/assets/icons/file-icon.svg'; +import FileIconDark from '@/assets/icons/file-icon-dark.svg?react'; +import FileIconLight from '@/assets/icons/file-icon.svg?react'; import useTheme from '@/hooks/use-theme'; const themeToRoleIcon = Object.freeze({ diff --git a/packages/console/src/components/FormCard/FormCardLayout/index.tsx b/packages/console/src/components/FormCard/FormCardLayout/index.tsx index a19c3c66343..1622ed74cf7 100644 --- a/packages/console/src/components/FormCard/FormCardLayout/index.tsx +++ b/packages/console/src/components/FormCard/FormCardLayout/index.tsx @@ -2,7 +2,7 @@ import { type ReactNode } from 'react'; import Card from '@/ds-components/Card'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly introduction: ReactNode; diff --git a/packages/console/src/components/FormCard/Skeleton/index.tsx b/packages/console/src/components/FormCard/Skeleton/index.tsx index 01b44e57d2f..c9fc9f5a216 100644 --- a/packages/console/src/components/FormCard/Skeleton/index.tsx +++ b/packages/console/src/components/FormCard/Skeleton/index.tsx @@ -2,7 +2,7 @@ import FormFieldSkeleton from '@/ds-components/FormField/Skeleton'; import FormCardLayout from '../FormCardLayout'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly formFieldCount?: number; diff --git a/packages/console/src/components/FormCard/index.tsx b/packages/console/src/components/FormCard/index.tsx index 565a3615a49..6befab89d5c 100644 --- a/packages/console/src/components/FormCard/index.tsx +++ b/packages/console/src/components/FormCard/index.tsx @@ -6,7 +6,7 @@ import TextLink from '@/ds-components/TextLink'; import type { Props as TextLinkProps } from '@/ds-components/TextLink'; import FormCardLayout from './FormCardLayout'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; export type Props = { readonly title: AdminConsoleKey; diff --git a/packages/console/src/components/Guide/GuideCard/index.tsx b/packages/console/src/components/Guide/GuideCard/index.tsx index fef3471ecf8..4c5ddb96402 100644 --- a/packages/console/src/components/Guide/GuideCard/index.tsx +++ b/packages/console/src/components/Guide/GuideCard/index.tsx @@ -9,7 +9,7 @@ import { SubscriptionDataContext } from '@/contexts/SubscriptionDataProvider'; import Button from '@/ds-components/Button'; import { onKeyDownHandler } from '@/utils/a11y'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; export type SelectedGuide = { id: Guide['id']; diff --git a/packages/console/src/components/Guide/GuideCardGroup/index.tsx b/packages/console/src/components/Guide/GuideCardGroup/index.tsx index e23fb721fef..a979d68e5d0 100644 --- a/packages/console/src/components/Guide/GuideCardGroup/index.tsx +++ b/packages/console/src/components/Guide/GuideCardGroup/index.tsx @@ -5,7 +5,7 @@ import { type Guide } from '@/assets/docs/guides/types'; import GuideCard, { type SelectedGuide } from '../GuideCard'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly className?: string; diff --git a/packages/console/src/components/Guide/ModalFooter/index.tsx b/packages/console/src/components/Guide/ModalFooter/index.tsx index d43a8960221..42862ea5d18 100644 --- a/packages/console/src/components/Guide/ModalFooter/index.tsx +++ b/packages/console/src/components/Guide/ModalFooter/index.tsx @@ -4,7 +4,7 @@ import classNames from 'classnames'; import Button from '@/ds-components/Button'; import DynamicT from '@/ds-components/DynamicT'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly wrapperClassName?: string; diff --git a/packages/console/src/components/Guide/ModalHeader/RequestForm.tsx b/packages/console/src/components/Guide/ModalHeader/RequestForm.tsx index afa1a94c72b..7232c3b6cd8 100644 --- a/packages/console/src/components/Guide/ModalHeader/RequestForm.tsx +++ b/packages/console/src/components/Guide/ModalHeader/RequestForm.tsx @@ -10,7 +10,7 @@ import FormField from '@/ds-components/FormField'; import ModalLayout from '@/ds-components/ModalLayout'; import TextInput from '@/ds-components/TextInput'; import useCurrentUser from '@/hooks/use-current-user'; -import * as modalStyles from '@/scss/modal.module.scss'; +import modalStyles from '@/scss/modal.module.scss'; type Props = { readonly title: AdminConsoleKey; diff --git a/packages/console/src/components/Guide/ModalHeader/index.tsx b/packages/console/src/components/Guide/ModalHeader/index.tsx index dbef8c32208..99f40efdb20 100644 --- a/packages/console/src/components/Guide/ModalHeader/index.tsx +++ b/packages/console/src/components/Guide/ModalHeader/index.tsx @@ -1,14 +1,14 @@ import { type AdminConsoleKey } from '@logto/phrases'; import { useCallback, useState } from 'react'; -import Box from '@/assets/icons/box.svg'; +import Box from '@/assets/icons/box.svg?react'; import { githubIssuesLink } from '@/consts'; import { isCloud } from '@/consts/env'; import Button from '@/ds-components/Button'; import DsModalHeader from '@/ds-components/ModalHeader'; import RequestForm from './RequestForm'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly title: AdminConsoleKey; diff --git a/packages/console/src/components/Guide/StepsSkeleton/index.tsx b/packages/console/src/components/Guide/StepsSkeleton/index.tsx index 7d3ed4e75d9..5557f532f57 100644 --- a/packages/console/src/components/Guide/StepsSkeleton/index.tsx +++ b/packages/console/src/components/Guide/StepsSkeleton/index.tsx @@ -1,4 +1,4 @@ -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; function StepsSkeleton() { return ( diff --git a/packages/console/src/components/Guide/index.tsx b/packages/console/src/components/Guide/index.tsx index be312df981e..f697cdf7083 100644 --- a/packages/console/src/components/Guide/index.tsx +++ b/packages/console/src/components/Guide/index.tsx @@ -10,7 +10,7 @@ import MdxProvider from '@/mdx-components/MdxProvider'; import NotFound from '@/pages/NotFound'; import StepsSkeleton from './StepsSkeleton'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; export type GuideContextType = { metadata: Readonly; diff --git a/packages/console/src/components/ImageInputs/index.tsx b/packages/console/src/components/ImageInputs/index.tsx index dcabc41d39a..29a02819965 100644 --- a/packages/console/src/components/ImageInputs/index.tsx +++ b/packages/console/src/components/ImageInputs/index.tsx @@ -22,7 +22,7 @@ import useImageMimeTypes from '@/hooks/use-image-mime-types'; import useUserAssetsService from '@/hooks/use-user-assets-service'; import { uriValidator } from '@/utils/validator'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; export const themeToLogoName = Object.freeze({ [Theme.Light]: 'logoUrl', diff --git a/packages/console/src/components/Index/index.tsx b/packages/console/src/components/Index/index.tsx index d9584593dca..4c9036e0e44 100644 --- a/packages/console/src/components/Index/index.tsx +++ b/packages/console/src/components/Index/index.tsx @@ -1,8 +1,8 @@ import classNames from 'classnames'; -import Tick from '@/assets/icons/tick.svg'; +import Tick from '@/assets/icons/tick.svg?react'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly className?: string; diff --git a/packages/console/src/components/InlineUpsell/index.tsx b/packages/console/src/components/InlineUpsell/index.tsx index 1f57a042c43..ca2fd0eb152 100644 --- a/packages/console/src/components/InlineUpsell/index.tsx +++ b/packages/console/src/components/InlineUpsell/index.tsx @@ -8,7 +8,7 @@ import useTenantPathname from '@/hooks/use-tenant-pathname'; import ContactUsPhraseLink from '../ContactUsPhraseLink'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly className?: string; diff --git a/packages/console/src/components/ItemPreview/ApplicationPreview.tsx b/packages/console/src/components/ItemPreview/ApplicationPreview.tsx index e284a5894c6..438d322834d 100644 --- a/packages/console/src/components/ItemPreview/ApplicationPreview.tsx +++ b/packages/console/src/components/ItemPreview/ApplicationPreview.tsx @@ -5,7 +5,7 @@ import ApplicationIcon from '@/components/ApplicationIcon'; import { applicationTypeI18nKey } from '@/types/applications'; import ItemPreview from '.'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; const applicationsPathname = '/applications'; const buildDetailsPathname = (id: string) => `${applicationsPathname}/${id}`; diff --git a/packages/console/src/components/ItemPreview/index.tsx b/packages/console/src/components/ItemPreview/index.tsx index e7447b76e06..2728e184848 100644 --- a/packages/console/src/components/ItemPreview/index.tsx +++ b/packages/console/src/components/ItemPreview/index.tsx @@ -5,7 +5,7 @@ import { Link } from 'react-router-dom'; import useTenantPathname from '@/hooks/use-tenant-pathname'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly title: ReactNode; diff --git a/packages/console/src/components/ListPage/index.tsx b/packages/console/src/components/ListPage/index.tsx index c59d75fea1d..26abe9e481b 100644 --- a/packages/console/src/components/ListPage/index.tsx +++ b/packages/console/src/components/ListPage/index.tsx @@ -2,14 +2,14 @@ import classNames from 'classnames'; import { type ReactNode } from 'react'; import { type FieldValues, type FieldPath } from 'react-hook-form'; -import Plus from '@/assets/icons/plus.svg'; +import Plus from '@/assets/icons/plus.svg?react'; import PageMeta, { type Props as PageMetaProps } from '@/components/PageMeta'; import { type Props as ButtonProps } from '@/ds-components/Button'; import Button from '@/ds-components/Button'; import { type Props as CardTitleProps } from '@/ds-components/CardTitle'; import CardTitle from '@/ds-components/CardTitle'; import Table, { type Props as TableProps } from '@/ds-components/Table'; -import * as pageLayout from '@/scss/page-layout.module.scss'; +import pageLayout from '@/scss/page-layout.module.scss'; type CreateButtonProps = { title: ButtonProps['title']; diff --git a/packages/console/src/components/LivePreviewButton/index.tsx b/packages/console/src/components/LivePreviewButton/index.tsx index 6a1ec955d3f..c773cfaac34 100644 --- a/packages/console/src/components/LivePreviewButton/index.tsx +++ b/packages/console/src/components/LivePreviewButton/index.tsx @@ -3,13 +3,13 @@ import classNames from 'classnames'; import { useContext } from 'react'; import { useTranslation } from 'react-i18next'; -import ExternalLinkIcon from '@/assets/icons/external-link.svg'; +import ExternalLinkIcon from '@/assets/icons/external-link.svg?react'; import { AppDataContext } from '@/contexts/AppDataProvider'; import type { Props as ButtonProps, ButtonType } from '@/ds-components/Button'; import Button from '@/ds-components/Button'; import { Tooltip } from '@/ds-components/Tip'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly size?: ButtonProps['size']; diff --git a/packages/console/src/components/ManageOrganizationPermissionModal/index.tsx b/packages/console/src/components/ManageOrganizationPermissionModal/index.tsx index bca34f4503a..153802ff340 100644 --- a/packages/console/src/components/ManageOrganizationPermissionModal/index.tsx +++ b/packages/console/src/components/ManageOrganizationPermissionModal/index.tsx @@ -10,7 +10,7 @@ import FormField from '@/ds-components/FormField'; import ModalLayout from '@/ds-components/ModalLayout'; import TextInput from '@/ds-components/TextInput'; import useApi from '@/hooks/use-api'; -import * as modalStyles from '@/scss/modal.module.scss'; +import modalStyles from '@/scss/modal.module.scss'; import { trySubmitSafe } from '@/utils/form'; type Props = { diff --git a/packages/console/src/components/Markdown/index.tsx b/packages/console/src/components/Markdown/index.tsx index c8cf7c6eb97..ef077e022d6 100644 --- a/packages/console/src/components/Markdown/index.tsx +++ b/packages/console/src/components/Markdown/index.tsx @@ -17,7 +17,7 @@ import 'property-information'; import CodeEditor from '@/ds-components/CodeEditor'; import GithubRawImage from './components/GithubRawImage'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly className?: string; diff --git a/packages/console/src/components/MauExceededModal/index.tsx b/packages/console/src/components/MauExceededModal/index.tsx index 3d44dddf692..947e5383513 100644 --- a/packages/console/src/components/MauExceededModal/index.tsx +++ b/packages/console/src/components/MauExceededModal/index.tsx @@ -12,11 +12,11 @@ import FormField from '@/ds-components/FormField'; import InlineNotification from '@/ds-components/InlineNotification'; import ModalLayout from '@/ds-components/ModalLayout'; import useTenantPathname from '@/hooks/use-tenant-pathname'; -import * as modalStyles from '@/scss/modal.module.scss'; +import modalStyles from '@/scss/modal.module.scss'; import PlanName from '../PlanName'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; function MauExceededModal() { const { currentTenant } = useContext(TenantsContext); diff --git a/packages/console/src/components/MfaFactorTitle/index.tsx b/packages/console/src/components/MfaFactorTitle/index.tsx index a32c32339f5..8f75cafb8b4 100644 --- a/packages/console/src/components/MfaFactorTitle/index.tsx +++ b/packages/console/src/components/MfaFactorTitle/index.tsx @@ -1,16 +1,16 @@ import { MfaFactor } from '@logto/schemas'; import { type ReactNode } from 'react'; -import FactorBackupCode from '@/assets/icons/factor-backup-code.svg'; -import FactorTotp from '@/assets/icons/factor-totp.svg'; -import FactorWebAuthn from '@/assets/icons/factor-webauthn.svg'; -import Tip from '@/assets/icons/tip.svg'; +import FactorBackupCode from '@/assets/icons/factor-backup-code.svg?react'; +import FactorTotp from '@/assets/icons/factor-totp.svg?react'; +import FactorWebAuthn from '@/assets/icons/factor-webauthn.svg?react'; +import Tip from '@/assets/icons/tip.svg?react'; import IconButton from '@/ds-components/IconButton'; import { ToggleTip } from '@/ds-components/Tip'; import MfaFactorName, { type Props as MfaFactorNameProps } from '../MfaFactorName'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; const factorIcon: Record = { [MfaFactor.TOTP]: FactorTotp, diff --git a/packages/console/src/components/MultiOptionInput/index.tsx b/packages/console/src/components/MultiOptionInput/index.tsx index 68d5db09eb7..47cc0f85c79 100644 --- a/packages/console/src/components/MultiOptionInput/index.tsx +++ b/packages/console/src/components/MultiOptionInput/index.tsx @@ -2,12 +2,12 @@ import { isKeyInObject, type Nullable } from '@silverhand/essentials'; import classNames from 'classnames'; import { type ReactNode, useRef, useState, useCallback } from 'react'; -import Close from '@/assets/icons/close.svg'; +import Close from '@/assets/icons/close.svg?react'; import IconButton from '@/ds-components/IconButton'; import Tag from '@/ds-components/Tag'; import { onKeyDownHandler } from '@/utils/a11y'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type CanBePromise = T | Promise; diff --git a/packages/console/src/components/MultiTextInputField/index.tsx b/packages/console/src/components/MultiTextInputField/index.tsx index 69791ecaeff..d797a4e1891 100644 --- a/packages/console/src/components/MultiTextInputField/index.tsx +++ b/packages/console/src/components/MultiTextInputField/index.tsx @@ -5,7 +5,7 @@ import FormField from '@/ds-components/FormField'; import type { Props as MultiTextInputProps } from '@/ds-components/MultiTextInput'; import MultiTextInput from '@/ds-components/MultiTextInput'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = MultiTextInputProps & Pick & { diff --git a/packages/console/src/components/OpenExternalLink/index.tsx b/packages/console/src/components/OpenExternalLink/index.tsx index c6e93e6c345..649fbde7fd3 100644 --- a/packages/console/src/components/OpenExternalLink/index.tsx +++ b/packages/console/src/components/OpenExternalLink/index.tsx @@ -1,6 +1,6 @@ import { useTranslation } from 'react-i18next'; -import ExternalLinkIcon from '@/assets/icons/external-link.svg'; +import ExternalLinkIcon from '@/assets/icons/external-link.svg?react'; import IconButton from '@/ds-components/IconButton'; import { Tooltip } from '@/ds-components/Tip'; diff --git a/packages/console/src/components/OrganizationList/index.tsx b/packages/console/src/components/OrganizationList/index.tsx index a924e830646..aaef30d4f74 100644 --- a/packages/console/src/components/OrganizationList/index.tsx +++ b/packages/console/src/components/OrganizationList/index.tsx @@ -3,8 +3,8 @@ import { type ReactNode, useState } from 'react'; import { useTranslation } from 'react-i18next'; import useSWR from 'swr'; -import OrganizationIcon from '@/assets/icons/organization-preview.svg'; -import Tip from '@/assets/icons/tip.svg'; +import OrganizationIcon from '@/assets/icons/organization-preview.svg?react'; +import Tip from '@/assets/icons/tip.svg?react'; import EmptyDataPlaceholder from '@/components/EmptyDataPlaceholder'; import ItemPreview from '@/components/ItemPreview'; import { RoleOption } from '@/components/OrganizationRolesSelect'; @@ -18,7 +18,7 @@ import { ToggleTip } from '@/ds-components/Tip'; import { type RequestError } from '@/hooks/use-api'; import useTenantPathname from '@/hooks/use-tenant-pathname'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly type: 'user' | 'application'; diff --git a/packages/console/src/components/OrganizationRolesSelect/index.tsx b/packages/console/src/components/OrganizationRolesSelect/index.tsx index 452100f8980..f78a09f0876 100644 --- a/packages/console/src/components/OrganizationRolesSelect/index.tsx +++ b/packages/console/src/components/OrganizationRolesSelect/index.tsx @@ -1,14 +1,14 @@ import { type OrganizationRole, type RoleType } from '@logto/schemas'; import classNames from 'classnames'; -import RoleIcon from '@/assets/icons/organization-role-feature.svg'; +import RoleIcon from '@/assets/icons/organization-role-feature.svg?react'; import MultiSelect, { type Option } from '@/ds-components/Select/MultiSelect'; import useSearchValues from '@/hooks/use-search-values'; import Breakable from '../Breakable'; import ThemedIcon from '../ThemedIcon'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type RoleOptionProps = { readonly title?: string; diff --git a/packages/console/src/components/PaymentOverdueModal/index.tsx b/packages/console/src/components/PaymentOverdueModal/index.tsx index 78029388510..73e31ff27fe 100644 --- a/packages/console/src/components/PaymentOverdueModal/index.tsx +++ b/packages/console/src/components/PaymentOverdueModal/index.tsx @@ -10,11 +10,11 @@ import FormField from '@/ds-components/FormField'; import InlineNotification from '@/ds-components/InlineNotification'; import ModalLayout from '@/ds-components/ModalLayout'; import useSubscribe from '@/hooks/use-subscribe'; -import * as modalStyles from '@/scss/modal.module.scss'; +import modalStyles from '@/scss/modal.module.scss'; import BillInfo from '../BillInfo'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; function PaymentOverdueModal() { const { t } = useTranslation(undefined, { keyPrefix: 'admin_console' }); diff --git a/packages/console/src/components/PermissionsTable/index.tsx b/packages/console/src/components/PermissionsTable/index.tsx index 3097491f369..0a2b62fab26 100644 --- a/packages/console/src/components/PermissionsTable/index.tsx +++ b/packages/console/src/components/PermissionsTable/index.tsx @@ -5,9 +5,9 @@ import { useState } from 'react'; import { toast } from 'react-hot-toast'; import { useTranslation } from 'react-i18next'; -import Plus from '@/assets/icons/plus.svg'; -import PermissionsEmptyDark from '@/assets/images/permissions-empty-dark.svg'; -import PermissionsEmpty from '@/assets/images/permissions-empty.svg'; +import Plus from '@/assets/icons/plus.svg?react'; +import PermissionsEmptyDark from '@/assets/images/permissions-empty-dark.svg?react'; +import PermissionsEmpty from '@/assets/images/permissions-empty.svg?react'; import { ApiResourceDetailsTabs } from '@/consts/page-tabs'; import Button from '@/ds-components/Button'; import type { Props as PaginationProps } from '@/ds-components/Pagination'; @@ -24,7 +24,7 @@ import ActionsButton from '../ActionsButton'; import EditScopeModal, { type EditScopeData } from '../EditScopeModal'; import EmptyDataPlaceholder from '../EmptyDataPlaceholder'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type SearchProps = { keyword: string; diff --git a/packages/console/src/components/PlanUsage/index.tsx b/packages/console/src/components/PlanUsage/index.tsx index 96fb6345b54..0a27d441c43 100644 --- a/packages/console/src/components/PlanUsage/index.tsx +++ b/packages/console/src/components/PlanUsage/index.tsx @@ -7,7 +7,7 @@ import DynamicT from '@/ds-components/DynamicT'; import { type SubscriptionPlan } from '@/types/subscriptions'; import { formatPeriod } from '@/utils/subscription'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly subscriptionUsage: SubscriptionUsage; diff --git a/packages/console/src/components/ProgressBar/index.tsx b/packages/console/src/components/ProgressBar/index.tsx index 25af66bc818..5977e5fc00e 100644 --- a/packages/console/src/components/ProgressBar/index.tsx +++ b/packages/console/src/components/ProgressBar/index.tsx @@ -1,6 +1,6 @@ import classNames from 'classnames'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly currentStep: number; diff --git a/packages/console/src/components/QuotaGuardFooter/index.tsx b/packages/console/src/components/QuotaGuardFooter/index.tsx index c5d57f0ded6..ecd9408dc3a 100644 --- a/packages/console/src/components/QuotaGuardFooter/index.tsx +++ b/packages/console/src/components/QuotaGuardFooter/index.tsx @@ -3,7 +3,7 @@ import { type ReactNode } from 'react'; import Button from '@/ds-components/Button'; import useTenantPathname from '@/hooks/use-tenant-pathname'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly children: ReactNode; diff --git a/packages/console/src/components/Region/index.tsx b/packages/console/src/components/Region/index.tsx index 9a50cb97ed2..ff4164aa88f 100644 --- a/packages/console/src/components/Region/index.tsx +++ b/packages/console/src/components/Region/index.tsx @@ -1,7 +1,7 @@ import classNames from 'classnames'; import { useTranslation } from 'react-i18next'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; // TODO: This is a copy from `@logto/cloud-models`, make a SSoT for this later export enum RegionName { diff --git a/packages/console/src/components/RequestDataError/index.tsx b/packages/console/src/components/RequestDataError/index.tsx index daed530f2c5..b0134d6f37f 100644 --- a/packages/console/src/components/RequestDataError/index.tsx +++ b/packages/console/src/components/RequestDataError/index.tsx @@ -2,14 +2,14 @@ import { Theme } from '@logto/schemas'; import classNames from 'classnames'; import { useTranslation } from 'react-i18next'; -import RequestErrorDarkImage from '@/assets/images/request-error-dark.svg'; -import RequestErrorImage from '@/assets/images/request-error.svg'; +import RequestErrorDarkImage from '@/assets/images/request-error-dark.svg?react'; +import RequestErrorImage from '@/assets/images/request-error.svg?react'; import Button from '@/ds-components/Button'; import Card from '@/ds-components/Card'; import type { RequestError } from '@/hooks/use-api'; import useTheme from '@/hooks/use-theme'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly error: RequestError; diff --git a/packages/console/src/components/RoleAssignmentModal/index.tsx b/packages/console/src/components/RoleAssignmentModal/index.tsx index cd2e9fed36b..baa1056ecfe 100644 --- a/packages/console/src/components/RoleAssignmentModal/index.tsx +++ b/packages/console/src/components/RoleAssignmentModal/index.tsx @@ -11,10 +11,10 @@ import DangerousRaw from '@/ds-components/DangerousRaw'; import ModalLayout from '@/ds-components/ModalLayout'; import TextLink from '@/ds-components/TextLink'; import useApi from '@/hooks/use-api'; -import * as modalStyles from '@/scss/modal.module.scss'; +import modalStyles from '@/scss/modal.module.scss'; import { getUserTitle } from '@/utils/user'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = ( | { diff --git a/packages/console/src/components/RoleIcon/index.tsx b/packages/console/src/components/RoleIcon/index.tsx index 10914329113..878a790de51 100644 --- a/packages/console/src/components/RoleIcon/index.tsx +++ b/packages/console/src/components/RoleIcon/index.tsx @@ -1,8 +1,8 @@ import { Theme } from '@logto/schemas'; import { type ReactNode } from 'react'; -import UserRoleIconDark from '@/assets/icons/role-feature-dark.svg'; -import UserRoleIcon from '@/assets/icons/role-feature.svg'; +import UserRoleIconDark from '@/assets/icons/role-feature-dark.svg?react'; +import UserRoleIcon from '@/assets/icons/role-feature.svg?react'; import useTheme from '@/hooks/use-theme'; const themeToRoleIcon = Object.freeze({ diff --git a/packages/console/src/components/RoleScopesTransfer/components/ResourceItem/index.tsx b/packages/console/src/components/RoleScopesTransfer/components/ResourceItem/index.tsx index a0280753fbe..ee93f79ce1b 100644 --- a/packages/console/src/components/RoleScopesTransfer/components/ResourceItem/index.tsx +++ b/packages/console/src/components/RoleScopesTransfer/components/ResourceItem/index.tsx @@ -3,8 +3,8 @@ import classNames from 'classnames'; import { useState } from 'react'; import { useTranslation } from 'react-i18next'; -import CaretExpanded from '@/assets/icons/caret-expanded.svg'; -import CaretFolded from '@/assets/icons/caret-folded.svg'; +import CaretExpanded from '@/assets/icons/caret-expanded.svg?react'; +import CaretFolded from '@/assets/icons/caret-folded.svg?react'; import Checkbox from '@/ds-components/Checkbox'; import IconButton from '@/ds-components/IconButton'; import { onKeyDownHandler } from '@/utils/a11y'; @@ -12,7 +12,7 @@ import { onKeyDownHandler } from '@/utils/a11y'; import type { DetailedResourceResponse } from '../../types'; import SourceScopeItem from '../SourceScopeItem'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly resource: DetailedResourceResponse; diff --git a/packages/console/src/components/RoleScopesTransfer/components/SourceScopeItem/index.tsx b/packages/console/src/components/RoleScopesTransfer/components/SourceScopeItem/index.tsx index 04f84802ae0..869b746a28a 100644 --- a/packages/console/src/components/RoleScopesTransfer/components/SourceScopeItem/index.tsx +++ b/packages/console/src/components/RoleScopesTransfer/components/SourceScopeItem/index.tsx @@ -3,7 +3,7 @@ import type { ScopeResponse } from '@logto/schemas'; import Checkbox from '@/ds-components/Checkbox'; import { onKeyDownHandler } from '@/utils/a11y'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly scope: ScopeResponse; diff --git a/packages/console/src/components/RoleScopesTransfer/components/SourceScopesBox/index.tsx b/packages/console/src/components/RoleScopesTransfer/components/SourceScopesBox/index.tsx index a67684e135c..aea029d47b3 100644 --- a/packages/console/src/components/RoleScopesTransfer/components/SourceScopesBox/index.tsx +++ b/packages/console/src/components/RoleScopesTransfer/components/SourceScopesBox/index.tsx @@ -7,16 +7,16 @@ import { useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; import useSWR from 'swr'; -import Search from '@/assets/icons/search.svg'; +import Search from '@/assets/icons/search.svg?react'; import EmptyDataPlaceholder from '@/components/EmptyDataPlaceholder'; import type { DetailedResourceResponse } from '@/components/RoleScopesTransfer/types'; import TextInput from '@/ds-components/TextInput'; import type { RequestError } from '@/hooks/use-api'; -import * as transferLayout from '@/scss/transfer.module.scss'; +import transferLayout from '@/scss/transfer.module.scss'; import ResourceItem from '../ResourceItem'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly roleId?: string; diff --git a/packages/console/src/components/RoleScopesTransfer/components/TargetScopeItem/index.tsx b/packages/console/src/components/RoleScopesTransfer/components/TargetScopeItem/index.tsx index 65793d4f2f5..41fbec835aa 100644 --- a/packages/console/src/components/RoleScopesTransfer/components/TargetScopeItem/index.tsx +++ b/packages/console/src/components/RoleScopesTransfer/components/TargetScopeItem/index.tsx @@ -1,9 +1,9 @@ import type { ScopeResponse } from '@logto/schemas'; -import Close from '@/assets/icons/close.svg'; +import Close from '@/assets/icons/close.svg?react'; import IconButton from '@/ds-components/IconButton'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly scope: ScopeResponse; diff --git a/packages/console/src/components/RoleScopesTransfer/components/TargetScopesBox/index.tsx b/packages/console/src/components/RoleScopesTransfer/components/TargetScopesBox/index.tsx index c7edebe2562..bc0319fdd90 100644 --- a/packages/console/src/components/RoleScopesTransfer/components/TargetScopesBox/index.tsx +++ b/packages/console/src/components/RoleScopesTransfer/components/TargetScopesBox/index.tsx @@ -1,11 +1,11 @@ import type { ScopeResponse } from '@logto/schemas'; import { useTranslation } from 'react-i18next'; -import * as transferLayout from '@/scss/transfer.module.scss'; +import transferLayout from '@/scss/transfer.module.scss'; import TargetScopeItem from '../TargetScopeItem'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly selectedScopes: ScopeResponse[]; diff --git a/packages/console/src/components/RoleScopesTransfer/index.tsx b/packages/console/src/components/RoleScopesTransfer/index.tsx index 5baf6c1205e..ce1610c9e57 100644 --- a/packages/console/src/components/RoleScopesTransfer/index.tsx +++ b/packages/console/src/components/RoleScopesTransfer/index.tsx @@ -1,11 +1,11 @@ import type { ScopeResponse, RoleType } from '@logto/schemas'; import classNames from 'classnames'; -import * as transferLayout from '@/scss/transfer.module.scss'; +import transferLayout from '@/scss/transfer.module.scss'; import SourceScopesBox from './components/SourceScopesBox'; import TargetScopesBox from './components/TargetScopesBox'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; /** * @deprecated Use `@/ds-component/DataTransferBox` instead. diff --git a/packages/console/src/components/RolesTransfer/SourceRolesBox/SourceRoleItem/index.tsx b/packages/console/src/components/RolesTransfer/SourceRolesBox/SourceRoleItem/index.tsx index c943633cc2e..9a128849bdf 100644 --- a/packages/console/src/components/RolesTransfer/SourceRolesBox/SourceRoleItem/index.tsx +++ b/packages/console/src/components/RolesTransfer/SourceRolesBox/SourceRoleItem/index.tsx @@ -5,7 +5,7 @@ import { onKeyDownHandler } from '@/utils/a11y'; import RoleInformation from '../../components/RoleInformation'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly role: RoleResponse; diff --git a/packages/console/src/components/RolesTransfer/SourceRolesBox/index.tsx b/packages/console/src/components/RolesTransfer/SourceRolesBox/index.tsx index 1da49e842e6..ccc485c3764 100644 --- a/packages/console/src/components/RolesTransfer/SourceRolesBox/index.tsx +++ b/packages/console/src/components/RolesTransfer/SourceRolesBox/index.tsx @@ -7,18 +7,18 @@ import { useState } from 'react'; import { useTranslation } from 'react-i18next'; import useSWR from 'swr'; -import Search from '@/assets/icons/search.svg'; +import Search from '@/assets/icons/search.svg?react'; import EmptyDataPlaceholder from '@/components/EmptyDataPlaceholder'; import { defaultPageSize } from '@/consts'; import Pagination from '@/ds-components/Pagination'; import TextInput from '@/ds-components/TextInput'; import type { RequestError } from '@/hooks/use-api'; import useDebounce from '@/hooks/use-debounce'; -import * as transferLayout from '@/scss/transfer.module.scss'; +import transferLayout from '@/scss/transfer.module.scss'; import { buildUrl } from '@/utils/url'; import SourceRoleItem from './SourceRoleItem'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly entityId: string; diff --git a/packages/console/src/components/RolesTransfer/TargetRolesBox/TargetRoleItem/index.tsx b/packages/console/src/components/RolesTransfer/TargetRolesBox/TargetRoleItem/index.tsx index af35c72caa1..ec1690c3e68 100644 --- a/packages/console/src/components/RolesTransfer/TargetRolesBox/TargetRoleItem/index.tsx +++ b/packages/console/src/components/RolesTransfer/TargetRolesBox/TargetRoleItem/index.tsx @@ -1,11 +1,11 @@ import { type RoleResponse } from '@logto/schemas'; -import Close from '@/assets/icons/close.svg'; +import Close from '@/assets/icons/close.svg?react'; import IconButton from '@/ds-components/IconButton'; import RoleInformation from '../../components/RoleInformation'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly role: RoleResponse; diff --git a/packages/console/src/components/RolesTransfer/TargetRolesBox/index.tsx b/packages/console/src/components/RolesTransfer/TargetRolesBox/index.tsx index ea9bcc2e4ea..56c82584ca0 100644 --- a/packages/console/src/components/RolesTransfer/TargetRolesBox/index.tsx +++ b/packages/console/src/components/RolesTransfer/TargetRolesBox/index.tsx @@ -1,10 +1,10 @@ import type { RoleResponse } from '@logto/schemas'; import { useTranslation } from 'react-i18next'; -import * as transferLayout from '@/scss/transfer.module.scss'; +import transferLayout from '@/scss/transfer.module.scss'; import TargetRoleItem from './TargetRoleItem'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly selectedRoles: RoleResponse[]; diff --git a/packages/console/src/components/RolesTransfer/components/RoleInformation/index.tsx b/packages/console/src/components/RolesTransfer/components/RoleInformation/index.tsx index 4602f85758d..93bd4751218 100644 --- a/packages/console/src/components/RolesTransfer/components/RoleInformation/index.tsx +++ b/packages/console/src/components/RolesTransfer/components/RoleInformation/index.tsx @@ -1,11 +1,11 @@ import { RoleType, type ScopeResponse, isManagementApi, type RoleResponse } from '@logto/schemas'; import useSWR from 'swr'; -import ManagementApiAccessFlag from '@/assets/icons/management-api-access.svg'; +import ManagementApiAccessFlag from '@/assets/icons/management-api-access.svg?react'; import DynamicT from '@/ds-components/DynamicT'; import { Tooltip } from '@/ds-components/Tip'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly role: RoleResponse; diff --git a/packages/console/src/components/RolesTransfer/index.tsx b/packages/console/src/components/RolesTransfer/index.tsx index 152aa6fd41c..c642f628959 100644 --- a/packages/console/src/components/RolesTransfer/index.tsx +++ b/packages/console/src/components/RolesTransfer/index.tsx @@ -2,15 +2,15 @@ import { type RoleResponse, RoleType } from '@logto/schemas'; import classNames from 'classnames'; import { Trans, useTranslation } from 'react-i18next'; -import ManagementApiAccessFlag from '@/assets/icons/management-api-access.svg'; +import ManagementApiAccessFlag from '@/assets/icons/management-api-access.svg?react'; import FormField from '@/ds-components/FormField'; import InlineNotification from '@/ds-components/InlineNotification'; import useUserPreferences from '@/hooks/use-user-preferences'; -import * as transferLayout from '@/scss/transfer.module.scss'; +import transferLayout from '@/scss/transfer.module.scss'; import SourceRolesBox from './SourceRolesBox'; import TargetRolesBox from './TargetRolesBox'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly entityId: string; diff --git a/packages/console/src/components/SignInExperiencePreview/components/ToggleUiThemeButton/index.tsx b/packages/console/src/components/SignInExperiencePreview/components/ToggleUiThemeButton/index.tsx index c0e9dbce37f..ffc859394e8 100644 --- a/packages/console/src/components/SignInExperiencePreview/components/ToggleUiThemeButton/index.tsx +++ b/packages/console/src/components/SignInExperiencePreview/components/ToggleUiThemeButton/index.tsx @@ -1,12 +1,12 @@ import { Theme } from '@logto/schemas'; import classNames from 'classnames'; -import Moon from '@/assets/icons/moon.svg'; -import Sun from '@/assets/icons/sun.svg'; +import Moon from '@/assets/icons/moon.svg?react'; +import Sun from '@/assets/icons/sun.svg?react'; import Button from '@/ds-components/Button'; import type { Props as ButtonProps } from '@/ds-components/Button'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly value: Theme; diff --git a/packages/console/src/components/SignInExperiencePreview/index.tsx b/packages/console/src/components/SignInExperiencePreview/index.tsx index ef6ff41b289..cf20714f359 100644 --- a/packages/console/src/components/SignInExperiencePreview/index.tsx +++ b/packages/console/src/components/SignInExperiencePreview/index.tsx @@ -16,12 +16,12 @@ import { import { useTranslation } from 'react-i18next'; import useSWR from 'swr'; -import PhoneInfo from '@/assets/images/phone-info.svg'; +import PhoneInfo from '@/assets/images/phone-info.svg?react'; import { AppDataContext } from '@/contexts/AppDataProvider'; import type { RequestError } from '@/hooks/use-api'; import useUiLanguages from '@/hooks/use-ui-languages'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; import { PreviewPlatform } from './types'; export { default as ToggleUiThemeButton } from './components/ToggleUiThemeButton'; diff --git a/packages/console/src/components/SubmitFormChangesActionBar/index.tsx b/packages/console/src/components/SubmitFormChangesActionBar/index.tsx index 7cf92fab9de..e1eeed147b1 100644 --- a/packages/console/src/components/SubmitFormChangesActionBar/index.tsx +++ b/packages/console/src/components/SubmitFormChangesActionBar/index.tsx @@ -3,7 +3,7 @@ import classNames from 'classnames'; import Button from '@/ds-components/Button'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly isOpen: boolean; diff --git a/packages/console/src/components/TemplateTable/index.tsx b/packages/console/src/components/TemplateTable/index.tsx index ed7faa430f7..38e285a4e88 100644 --- a/packages/console/src/components/TemplateTable/index.tsx +++ b/packages/console/src/components/TemplateTable/index.tsx @@ -3,14 +3,14 @@ import { useMemo } from 'react'; import { type FieldPath, type FieldValues } from 'react-hook-form'; import { useTranslation } from 'react-i18next'; -import CirclePlus from '@/assets/icons/circle-plus.svg'; -import Plus from '@/assets/icons/plus.svg'; +import CirclePlus from '@/assets/icons/circle-plus.svg?react'; +import Plus from '@/assets/icons/plus.svg?react'; import Button from '@/ds-components/Button'; import DynamicT from '@/ds-components/DynamicT'; import Table from '@/ds-components/Table'; import { type RowGroup, type Column } from '@/ds-components/Table/types'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props> = { /** diff --git a/packages/console/src/components/TenantEnvTag/index.tsx b/packages/console/src/components/TenantEnvTag/index.tsx index b6eab6b48e2..acf2b76999e 100644 --- a/packages/console/src/components/TenantEnvTag/index.tsx +++ b/packages/console/src/components/TenantEnvTag/index.tsx @@ -4,7 +4,7 @@ import classNames from 'classnames'; import DynamicT from '@/ds-components/DynamicT'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly tag: TenantTag; diff --git a/packages/console/src/components/ThemedIcon/index.tsx b/packages/console/src/components/ThemedIcon/index.tsx index b5dc9871b40..75f8a99f4ac 100644 --- a/packages/console/src/components/ThemedIcon/index.tsx +++ b/packages/console/src/components/ThemedIcon/index.tsx @@ -1,4 +1,4 @@ -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly for: SvgComponent; diff --git a/packages/console/src/components/Topbar/ContactModal/hook.tsx b/packages/console/src/components/Topbar/ContactModal/hook.tsx index a39258161ff..c04e32de4bb 100644 --- a/packages/console/src/components/Topbar/ContactModal/hook.tsx +++ b/packages/console/src/components/Topbar/ContactModal/hook.tsx @@ -1,13 +1,13 @@ import type { AdminConsoleKey } from '@logto/phrases'; import { Theme } from '@logto/schemas'; -import Calendar from '@/assets/icons/calendar.svg'; -import DiscordDark from '@/assets/icons/discord-dark.svg'; -import Discord from '@/assets/icons/discord.svg'; -import EmailDark from '@/assets/icons/email-dark.svg'; -import Email from '@/assets/icons/email.svg'; -import GithubDark from '@/assets/icons/github-dark.svg'; -import Github from '@/assets/icons/github.svg'; +import Calendar from '@/assets/icons/calendar.svg?react'; +import DiscordDark from '@/assets/icons/discord-dark.svg?react'; +import Discord from '@/assets/icons/discord.svg?react'; +import EmailDark from '@/assets/icons/email-dark.svg?react'; +import Email from '@/assets/icons/email.svg?react'; +import GithubDark from '@/assets/icons/github-dark.svg?react'; +import Github from '@/assets/icons/github.svg?react'; import { contactEmailLink, discordLink, githubIssuesLink, reservationLink } from '@/consts'; import useTheme from '@/hooks/use-theme'; diff --git a/packages/console/src/components/Topbar/ContactModal/index.tsx b/packages/console/src/components/Topbar/ContactModal/index.tsx index 9e9fe42dd52..6c2f87a179d 100644 --- a/packages/console/src/components/Topbar/ContactModal/index.tsx +++ b/packages/console/src/components/Topbar/ContactModal/index.tsx @@ -3,10 +3,10 @@ import ReactModal from 'react-modal'; import Button from '@/ds-components/Button'; import DynamicT from '@/ds-components/DynamicT'; import ModalLayout from '@/ds-components/ModalLayout'; -import * as modalStyles from '@/scss/modal.module.scss'; +import modalStyles from '@/scss/modal.module.scss'; import { useContacts } from './hook'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly isOpen: boolean; diff --git a/packages/console/src/components/Topbar/TenantSelector/TenantDropdownItem/index.tsx b/packages/console/src/components/Topbar/TenantSelector/TenantDropdownItem/index.tsx index 714dc97d39a..444f4ba4c6e 100644 --- a/packages/console/src/components/Topbar/TenantSelector/TenantDropdownItem/index.tsx +++ b/packages/console/src/components/Topbar/TenantSelector/TenantDropdownItem/index.tsx @@ -2,7 +2,7 @@ import { TenantTag } from '@logto/schemas'; import classNames from 'classnames'; import { useContext, useMemo } from 'react'; -import Tick from '@/assets/icons/tick.svg'; +import Tick from '@/assets/icons/tick.svg?react'; import { type TenantResponse } from '@/cloud/types/router'; import PlanName from '@/components/PlanName'; import TenantEnvTag from '@/components/TenantEnvTag'; @@ -11,7 +11,7 @@ import { DropdownItem } from '@/ds-components/Dropdown'; import DynamicT from '@/ds-components/DynamicT'; import TenantStatusTag from './TenantStatusTag'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly tenantData: TenantResponse; diff --git a/packages/console/src/components/Topbar/TenantSelector/TenantInvitationDropdownItem/index.tsx b/packages/console/src/components/Topbar/TenantSelector/TenantInvitationDropdownItem/index.tsx index 47d59d639c6..8812f86b50f 100644 --- a/packages/console/src/components/Topbar/TenantSelector/TenantInvitationDropdownItem/index.tsx +++ b/packages/console/src/components/Topbar/TenantSelector/TenantInvitationDropdownItem/index.tsx @@ -10,7 +10,7 @@ import TenantEnvTag from '@/components/TenantEnvTag'; import { TenantsContext } from '@/contexts/TenantsProvider'; import Button from '@/ds-components/Button'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly data: { diff --git a/packages/console/src/components/Topbar/TenantSelector/index.tsx b/packages/console/src/components/Topbar/TenantSelector/index.tsx index 2116d80046d..f882a351fc1 100644 --- a/packages/console/src/components/Topbar/TenantSelector/index.tsx +++ b/packages/console/src/components/Topbar/TenantSelector/index.tsx @@ -2,8 +2,8 @@ import { OrganizationInvitationStatus } from '@logto/schemas'; import { useContext, useRef, useState } from 'react'; import { useTranslation } from 'react-i18next'; -import KeyboardArrowDown from '@/assets/icons/keyboard-arrow-down.svg'; -import PlusSign from '@/assets/icons/plus.svg'; +import KeyboardArrowDown from '@/assets/icons/keyboard-arrow-down.svg?react'; +import PlusSign from '@/assets/icons/plus.svg?react'; import { type TenantResponse } from '@/cloud/types/router'; import CreateTenantModal from '@/components/CreateTenantModal'; import TenantEnvTag from '@/components/TenantEnvTag'; @@ -17,7 +17,7 @@ import { onKeyDownHandler } from '@/utils/a11y'; import TenantDropdownItem from './TenantDropdownItem'; import TenantInvitationDropdownItem from './TenantInvitationDropdownItem'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; export default function TenantSelector() { const { t } = useTranslation(undefined, { keyPrefix: 'admin_console' }); diff --git a/packages/console/src/components/Topbar/UserInfo/SubMenu/index.tsx b/packages/console/src/components/Topbar/UserInfo/SubMenu/index.tsx index d24c791c9a1..415ac666465 100644 --- a/packages/console/src/components/Topbar/UserInfo/SubMenu/index.tsx +++ b/packages/console/src/components/Topbar/UserInfo/SubMenu/index.tsx @@ -2,8 +2,8 @@ import type { AdminConsoleKey } from '@logto/phrases'; import classNames from 'classnames'; import { type ReactNode, useCallback, useState, useRef } from 'react'; -import ArrowRight from '@/assets/icons/arrow-right.svg'; -import Tick from '@/assets/icons/tick.svg'; +import ArrowRight from '@/assets/icons/arrow-right.svg?react'; +import Tick from '@/assets/icons/tick.svg?react'; import { DropdownItem } from '@/ds-components/Dropdown'; import DynamicT from '@/ds-components/DynamicT'; import OverlayScrollbar from '@/ds-components/OverlayScrollbar'; @@ -11,7 +11,7 @@ import type { Option } from '@/ds-components/Select'; import Spacer from '@/ds-components/Spacer'; import { onKeyDownHandler } from '@/utils/a11y'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly className?: string; diff --git a/packages/console/src/components/Topbar/UserInfo/UserInfoSkeleton/index.tsx b/packages/console/src/components/Topbar/UserInfo/UserInfoSkeleton/index.tsx index 5ce948b1c20..6a3186a2a26 100644 --- a/packages/console/src/components/Topbar/UserInfo/UserInfoSkeleton/index.tsx +++ b/packages/console/src/components/Topbar/UserInfo/UserInfoSkeleton/index.tsx @@ -1,4 +1,4 @@ -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; function UserInfoSkeleton() { return ( diff --git a/packages/console/src/components/Topbar/UserInfo/index.tsx b/packages/console/src/components/Topbar/UserInfo/index.tsx index 67dd709a2a9..81519b3bf0f 100644 --- a/packages/console/src/components/Topbar/UserInfo/index.tsx +++ b/packages/console/src/components/Topbar/UserInfo/index.tsx @@ -5,11 +5,11 @@ import classNames from 'classnames'; import { useRef, useState } from 'react'; import { useTranslation } from 'react-i18next'; -import ExternalLinkIcon from '@/assets/icons/external-link.svg'; -import Globe from '@/assets/icons/globe.svg'; -import Palette from '@/assets/icons/palette.svg'; -import Profile from '@/assets/icons/profile.svg'; -import SignOut from '@/assets/icons/sign-out.svg'; +import ExternalLinkIcon from '@/assets/icons/external-link.svg?react'; +import Globe from '@/assets/icons/globe.svg?react'; +import Palette from '@/assets/icons/palette.svg?react'; +import Profile from '@/assets/icons/profile.svg?react'; +import SignOut from '@/assets/icons/sign-out.svg?react'; import UserAvatar from '@/components/UserAvatar'; import UserInfoCard from '@/components/UserInfoCard'; import { isCloud } from '@/consts/env'; @@ -26,7 +26,7 @@ import { onKeyDownHandler } from '@/utils/a11y'; import SubMenu from './SubMenu'; import UserInfoSkeleton from './UserInfoSkeleton'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; function UserInfo() { const { signOut } = useLogto(); diff --git a/packages/console/src/components/Topbar/index.module.scss b/packages/console/src/components/Topbar/index.module.scss index 4946b7d325d..0de21ef488c 100644 --- a/packages/console/src/components/Topbar/index.module.scss +++ b/packages/console/src/components/Topbar/index.module.scss @@ -4,6 +4,7 @@ flex: 0 0 64px; width: 100%; padding: 0 _.unit(6); + gap: _.unit(4); display: flex; align-items: center; @@ -17,17 +18,12 @@ .line { @include _.vertical-bar; height: 20px; - margin: 0 _.unit(5); } .text { font: var(--font-title-2); color: var(--color-text); } - - > :not(:last-child) { - margin-right: _.unit(4); - } } .button { diff --git a/packages/console/src/components/Topbar/index.tsx b/packages/console/src/components/Topbar/index.tsx index dbce591d586..15839e6b7dc 100644 --- a/packages/console/src/components/Topbar/index.tsx +++ b/packages/console/src/components/Topbar/index.tsx @@ -3,11 +3,11 @@ import classNames from 'classnames'; import { useEffect, useRef, useState } from 'react'; import { useTranslation } from 'react-i18next'; -import ContactIcon from '@/assets/icons/contact-us.svg'; -import CubeIcon from '@/assets/icons/cube.svg'; -import DocumentIcon from '@/assets/icons/document-nav-button.svg'; -import CloudLogo from '@/assets/images/cloud-logo.svg'; -import Logo from '@/assets/images/logo.svg'; +import ContactIcon from '@/assets/icons/contact-us.svg?react'; +import CubeIcon from '@/assets/icons/cube.svg?react'; +import DocumentIcon from '@/assets/icons/document-nav-button.svg?react'; +import CloudLogo from '@/assets/images/cloud-logo.svg?react'; +import Logo from '@/assets/images/logo.svg?react'; import { githubReleasesLink } from '@/consts'; import { isCloud } from '@/consts/env'; import DynamicT from '@/ds-components/DynamicT'; @@ -20,7 +20,7 @@ import { onKeyDownHandler } from '@/utils/a11y'; import ContactModal from './ContactModal'; import TenantSelector from './TenantSelector'; import UserInfo from './UserInfo'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; import { currentVersion, isGreaterThanCurrentVersion } from './utils'; type Props = { diff --git a/packages/console/src/components/UnsavedChangesAlertModal/index.tsx b/packages/console/src/components/UnsavedChangesAlertModal/index.tsx index b1674b23bbe..dea58bd9c0b 100644 --- a/packages/console/src/components/UnsavedChangesAlertModal/index.tsx +++ b/packages/console/src/components/UnsavedChangesAlertModal/index.tsx @@ -1,6 +1,6 @@ import { useEffect } from 'react'; import { useTranslation } from 'react-i18next'; -import { unstable_useBlocker as useBlocker, useLocation } from 'react-router-dom'; +import { useBlocker, useLocation } from 'react-router-dom'; import ConfirmModal from '@/ds-components/ConfirmModal'; diff --git a/packages/console/src/components/UserAccountInformation/index.tsx b/packages/console/src/components/UserAccountInformation/index.tsx index 4d7eeaec2e9..adea73a1d6b 100644 --- a/packages/console/src/components/UserAccountInformation/index.tsx +++ b/packages/console/src/components/UserAccountInformation/index.tsx @@ -6,13 +6,13 @@ import { toast } from 'react-hot-toast'; import { useTranslation } from 'react-i18next'; import ReactModal from 'react-modal'; -import Eye from '@/assets/icons/eye.svg'; +import Eye from '@/assets/icons/eye.svg?react'; import Button from '@/ds-components/Button'; import IconButton from '@/ds-components/IconButton'; import ModalLayout from '@/ds-components/ModalLayout'; -import * as modalStyles from '@/scss/modal.module.scss'; +import modalStyles from '@/scss/modal.module.scss'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly user: UserProfileResponse; diff --git a/packages/console/src/components/UserAvatar/index.tsx b/packages/console/src/components/UserAvatar/index.tsx index f13c92da494..71c7c9df0e8 100644 --- a/packages/console/src/components/UserAvatar/index.tsx +++ b/packages/console/src/components/UserAvatar/index.tsx @@ -4,11 +4,11 @@ import { conditional } from '@silverhand/essentials'; import classNames from 'classnames'; import { useTranslation } from 'react-i18next'; -import DefaultAvatar from '@/assets/images/default-avatar.svg'; +import DefaultAvatar from '@/assets/images/default-avatar.svg?react'; import ImageWithErrorFallback from '@/ds-components/ImageWithErrorFallback'; import { Tooltip } from '@/ds-components/Tip'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type UserInfo = Pick; diff --git a/packages/console/src/components/UserInfoCard/index.tsx b/packages/console/src/components/UserInfoCard/index.tsx index e3f535f1fdd..ff25ee2c2a7 100644 --- a/packages/console/src/components/UserInfoCard/index.tsx +++ b/packages/console/src/components/UserInfoCard/index.tsx @@ -5,7 +5,7 @@ import { useTranslation } from 'react-i18next'; import UserAvatar from '../UserAvatar'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly className?: string; diff --git a/packages/console/src/components/UserName/index.tsx b/packages/console/src/components/UserName/index.tsx index 97df6142be0..3a5e00e8ab1 100644 --- a/packages/console/src/components/UserName/index.tsx +++ b/packages/console/src/components/UserName/index.tsx @@ -14,7 +14,7 @@ import { getUserTitle } from '@/utils/user'; import UserAvatar from '../UserAvatar'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly userId: string; diff --git a/packages/console/src/components/VerificationCodeInput/index.tsx b/packages/console/src/components/VerificationCodeInput/index.tsx index fc11b7d0bc0..d8e667d21c3 100644 --- a/packages/console/src/components/VerificationCodeInput/index.tsx +++ b/packages/console/src/components/VerificationCodeInput/index.tsx @@ -1,7 +1,7 @@ import type { FormEventHandler, KeyboardEventHandler, ClipboardEventHandler } from 'react'; import { useMemo, useRef, useCallback, useEffect } from 'react'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; export const defaultLength = 6; diff --git a/packages/console/src/consts/applications.ts b/packages/console/src/consts/applications.ts index 537e21fabee..73c936d0afb 100644 --- a/packages/console/src/consts/applications.ts +++ b/packages/console/src/consts/applications.ts @@ -1,15 +1,15 @@ import { ApplicationType } from '@logto/schemas'; -import MachineToMachineDark from '@/assets/icons/machine-to-machine-dark.svg'; -import MachineToMachine from '@/assets/icons/machine-to-machine.svg'; -import NativeAppDark from '@/assets/icons/native-app-dark.svg'; -import NativeApp from '@/assets/icons/native-app.svg'; -import ProtectedAppDark from '@/assets/icons/protected-app-dark.svg'; -import ProtectedApp from '@/assets/icons/protected-app.svg'; -import SinglePageAppDark from '@/assets/icons/single-page-app-dark.svg'; -import SinglePageApp from '@/assets/icons/single-page-app.svg'; -import TraditionalWebAppDark from '@/assets/icons/traditional-web-app-dark.svg'; -import TraditionalWebApp from '@/assets/icons/traditional-web-app.svg'; +import MachineToMachineDark from '@/assets/icons/machine-to-machine-dark.svg?react'; +import MachineToMachine from '@/assets/icons/machine-to-machine.svg?react'; +import NativeAppDark from '@/assets/icons/native-app-dark.svg?react'; +import NativeApp from '@/assets/icons/native-app.svg?react'; +import ProtectedAppDark from '@/assets/icons/protected-app-dark.svg?react'; +import ProtectedApp from '@/assets/icons/protected-app.svg?react'; +import SinglePageAppDark from '@/assets/icons/single-page-app-dark.svg?react'; +import SinglePageApp from '@/assets/icons/single-page-app.svg?react'; +import TraditionalWebAppDark from '@/assets/icons/traditional-web-app-dark.svg?react'; +import TraditionalWebApp from '@/assets/icons/traditional-web-app.svg?react'; type ApplicationIconMap = { [key in ApplicationType]: SvgComponent; @@ -31,6 +31,6 @@ export const darkModeApplicationIconMap: ApplicationIconMap = Object.freeze({ [ApplicationType.Protected]: ProtectedAppDark, } as const); -export { default as thirdPartyApplicationIconDark } from '@/assets/icons/third-party-app-dark.svg'; +export { default as thirdPartyApplicationIconDark } from '@/assets/icons/third-party-app-dark.svg?react'; -export { default as thirdPartyApplicationIcon } from '@/assets/icons/third-party-app.svg'; +export { default as thirdPartyApplicationIcon } from '@/assets/icons/third-party-app.svg?react'; diff --git a/packages/console/src/consts/connectors.ts b/packages/console/src/consts/connectors.ts index 5fed12d1bac..cf979142eb8 100644 --- a/packages/console/src/consts/connectors.ts +++ b/packages/console/src/consts/connectors.ts @@ -1,8 +1,8 @@ import type { AdminConsoleKey } from '@logto/phrases'; import { ConnectorPlatform, ConnectorType } from '@logto/schemas'; -import EmailConnector from '@/assets/icons/connector-email.svg'; -import SmsConnectorIcon from '@/assets/icons/connector-sms.svg'; +import EmailConnector from '@/assets/icons/connector-email.svg?react'; +import SmsConnectorIcon from '@/assets/icons/connector-sms.svg?react'; import type { ConnectorGroup } from '@/types/connector'; type TitlePlaceHolder = { diff --git a/packages/console/src/consts/env.ts b/packages/console/src/consts/env.ts index 7b26d4d598b..f8239c099b3 100644 --- a/packages/console/src/consts/env.ts +++ b/packages/console/src/consts/env.ts @@ -2,11 +2,14 @@ import { yes } from '@silverhand/essentials'; import { storageKeys } from './storage'; -const isProduction = process.env.NODE_ENV === 'production'; -export const isCloud = yes(process.env.IS_CLOUD); -export const adminEndpoint = process.env.ADMIN_ENDPOINT; +export const normalizeEnv = (value: unknown) => + value === null || value === undefined ? undefined : String(value); + +const isProduction = import.meta.env.PROD; +export const isCloud = yes(normalizeEnv(import.meta.env.IS_CLOUD)); +export const adminEndpoint = normalizeEnv(import.meta.env.ADMIN_ENDPOINT); export const isDevFeaturesEnabled = !isProduction || - yes(process.env.DEV_FEATURES_ENABLED) || + yes(normalizeEnv(import.meta.env.DEV_FEATURES_ENABLED)) || yes(localStorage.getItem(storageKeys.isDevFeaturesEnabled)); diff --git a/packages/console/src/containers/AppContent/TenantNotificationContainer/CreateProductionTenantBanner/index.tsx b/packages/console/src/containers/AppContent/TenantNotificationContainer/CreateProductionTenantBanner/index.tsx index 87816b000b8..7138165f276 100644 --- a/packages/console/src/containers/AppContent/TenantNotificationContainer/CreateProductionTenantBanner/index.tsx +++ b/packages/console/src/containers/AppContent/TenantNotificationContainer/CreateProductionTenantBanner/index.tsx @@ -8,7 +8,7 @@ import CreateTenantModal from '@/components/CreateTenantModal'; import { TenantsContext } from '@/contexts/TenantsProvider'; import TextLink from '@/ds-components/TextLink'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; function CreateProductionTenantBanner() { const [isCreateModalOpen, setIsCreateModalOpen] = useState(false); diff --git a/packages/console/src/containers/AppContent/TenantNotificationContainer/TenantEnvMigrationModal/index.tsx b/packages/console/src/containers/AppContent/TenantNotificationContainer/TenantEnvMigrationModal/index.tsx index 0260408c2c3..b55363ac1d7 100644 --- a/packages/console/src/containers/AppContent/TenantNotificationContainer/TenantEnvMigrationModal/index.tsx +++ b/packages/console/src/containers/AppContent/TenantNotificationContainer/TenantEnvMigrationModal/index.tsx @@ -4,9 +4,9 @@ import Confetti from 'react-confetti'; import { Trans, useTranslation } from 'react-i18next'; import ReactModal from 'react-modal'; -import CongratsDark from '@/assets/images/congrats-dark.svg'; -import Congrats from '@/assets/images/congrats.svg'; -import Fireworks from '@/assets/images/tenant-modal-fireworks.svg'; +import CongratsDark from '@/assets/images/congrats-dark.svg?react'; +import Congrats from '@/assets/images/congrats.svg?react'; +import Fireworks from '@/assets/images/tenant-modal-fireworks.svg?react'; import { envTagsFeatureLink } from '@/consts'; import Button, { LinkButton } from '@/ds-components/Button'; import DynamicT from '@/ds-components/DynamicT'; @@ -14,9 +14,9 @@ import ModalLayout from '@/ds-components/ModalLayout'; import useConfigs from '@/hooks/use-configs'; import useDocumentationUrl from '@/hooks/use-documentation-url'; import useTheme from '@/hooks/use-theme'; -import * as modalStyles from '@/scss/modal.module.scss'; +import modalStyles from '@/scss/modal.module.scss'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; /** * This modal is used to notify the user that the tenant env has been migrated. diff --git a/packages/console/src/containers/AppContent/TenantSuspendedPage/index.tsx b/packages/console/src/containers/AppContent/TenantSuspendedPage/index.tsx index 0aabc7ef457..9a3bf7cbbd1 100644 --- a/packages/console/src/containers/AppContent/TenantSuspendedPage/index.tsx +++ b/packages/console/src/containers/AppContent/TenantSuspendedPage/index.tsx @@ -1,13 +1,13 @@ import { Theme } from '@logto/schemas'; -import ErrorDark from '@/assets/images/error-dark.svg'; -import Error from '@/assets/images/error.svg'; +import ErrorDark from '@/assets/images/error-dark.svg?react'; +import Error from '@/assets/images/error.svg?react'; import { contactEmailLink } from '@/consts'; import Button from '@/ds-components/Button'; import DynamicT from '@/ds-components/DynamicT'; import useTheme from '@/hooks/use-theme'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; function TenantSuspendedPage() { const theme = useTheme(); diff --git a/packages/console/src/containers/AppContent/index.tsx b/packages/console/src/containers/AppContent/index.tsx index 57d738306dd..8722f0381bb 100644 --- a/packages/console/src/containers/AppContent/index.tsx +++ b/packages/console/src/containers/AppContent/index.tsx @@ -16,7 +16,7 @@ import { useSidebarMenuItems } from '../ConsoleContent/Sidebar/hook'; import TenantNotificationContainer from './TenantNotificationContainer'; import TenantSuspendedPage from './TenantSuspendedPage'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; import { type AppContentOutletContext } from './types'; export default function AppContent() { diff --git a/packages/console/src/containers/ConsoleContent/Sidebar/components/Item/index.tsx b/packages/console/src/containers/ConsoleContent/Sidebar/components/Item/index.tsx index 09141752225..641d1e1c978 100644 --- a/packages/console/src/containers/ConsoleContent/Sidebar/components/Item/index.tsx +++ b/packages/console/src/containers/ConsoleContent/Sidebar/components/Item/index.tsx @@ -7,7 +7,7 @@ import { Link } from 'react-router-dom'; import { getPath } from '../../utils'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly icon?: ReactNode; diff --git a/packages/console/src/containers/ConsoleContent/Sidebar/components/Section/index.tsx b/packages/console/src/containers/ConsoleContent/Sidebar/components/Section/index.tsx index ef4315af6c9..3420e9cdd3d 100644 --- a/packages/console/src/containers/ConsoleContent/Sidebar/components/Section/index.tsx +++ b/packages/console/src/containers/ConsoleContent/Sidebar/components/Section/index.tsx @@ -1,6 +1,6 @@ import type { ReactNode } from 'react'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly title: string; diff --git a/packages/console/src/containers/ConsoleContent/Sidebar/hook.tsx b/packages/console/src/containers/ConsoleContent/Sidebar/hook.tsx index 1b539c622c0..1cce6cae3f7 100644 --- a/packages/console/src/containers/ConsoleContent/Sidebar/hook.tsx +++ b/packages/console/src/containers/ConsoleContent/Sidebar/hook.tsx @@ -2,23 +2,23 @@ import { type Optional } from '@silverhand/essentials'; import type { TFuncKey } from 'i18next'; import type { FC, ReactNode } from 'react'; -import BarGraph from '@/assets/icons/bar-graph.svg'; -import Bolt from '@/assets/icons/bolt.svg'; -import Box from '@/assets/icons/box.svg'; -import Connection from '@/assets/icons/connection.svg'; -import Gear from '@/assets/icons/gear.svg'; -import Hook from '@/assets/icons/hook.svg'; -import JwtClaims from '@/assets/icons/jwt-claims.svg'; -import Key from '@/assets/icons/key.svg'; -import List from '@/assets/icons/list.svg'; -import OrganizationTemplate from '@/assets/icons/organization-template-feature.svg'; -import Organization from '@/assets/icons/organization.svg'; -import UserProfile from '@/assets/icons/profile.svg'; -import ResourceIcon from '@/assets/icons/resource.svg'; -import Role from '@/assets/icons/role.svg'; -import SecurityLock from '@/assets/icons/security-lock.svg'; -import EnterpriseSso from '@/assets/icons/single-sign-on.svg'; -import Web from '@/assets/icons/web.svg'; +import BarGraph from '@/assets/icons/bar-graph.svg?react'; +import Bolt from '@/assets/icons/bolt.svg?react'; +import Box from '@/assets/icons/box.svg?react'; +import Connection from '@/assets/icons/connection.svg?react'; +import Gear from '@/assets/icons/gear.svg?react'; +import Hook from '@/assets/icons/hook.svg?react'; +import JwtClaims from '@/assets/icons/jwt-claims.svg?react'; +import Key from '@/assets/icons/key.svg?react'; +import List from '@/assets/icons/list.svg?react'; +import OrganizationTemplate from '@/assets/icons/organization-template-feature.svg?react'; +import Organization from '@/assets/icons/organization.svg?react'; +import UserProfile from '@/assets/icons/profile.svg?react'; +import ResourceIcon from '@/assets/icons/resource.svg?react'; +import Role from '@/assets/icons/role.svg?react'; +import SecurityLock from '@/assets/icons/security-lock.svg?react'; +import EnterpriseSso from '@/assets/icons/single-sign-on.svg?react'; +import Web from '@/assets/icons/web.svg?react'; import { isCloud } from '@/consts/env'; type SidebarItem = { diff --git a/packages/console/src/containers/ConsoleContent/Sidebar/index.module.scss b/packages/console/src/containers/ConsoleContent/Sidebar/index.module.scss index c0d8e7ab735..117802ee4db 100644 --- a/packages/console/src/containers/ConsoleContent/Sidebar/index.module.scss +++ b/packages/console/src/containers/ConsoleContent/Sidebar/index.module.scss @@ -6,3 +6,9 @@ margin-bottom: _.unit(6); flex-shrink: 0; } + +.skeleton { + @include _.shimmering-animation; + width: 248px; + height: 100%; +} diff --git a/packages/console/src/containers/ConsoleContent/Sidebar/index.tsx b/packages/console/src/containers/ConsoleContent/Sidebar/index.tsx index 3cb525f7f59..b1a8a33dbe0 100644 --- a/packages/console/src/containers/ConsoleContent/Sidebar/index.tsx +++ b/packages/console/src/containers/ConsoleContent/Sidebar/index.tsx @@ -6,9 +6,13 @@ import useMatchTenantPath from '@/hooks/use-tenant-pathname'; import Item from './components/Item'; import Section from './components/Section'; import { useSidebarMenuItems } from './hook'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; import { getPath } from './utils'; +export function Skeleton() { + return
; +} + function Sidebar() { const { t } = useTranslation(undefined, { keyPrefix: 'admin_console.tab_sections', diff --git a/packages/console/src/containers/ConsoleContent/index.module.scss b/packages/console/src/containers/ConsoleContent/index.module.scss index 4f2b34bea11..81b2977908d 100644 --- a/packages/console/src/containers/ConsoleContent/index.module.scss +++ b/packages/console/src/containers/ConsoleContent/index.module.scss @@ -15,12 +15,12 @@ height: 100%; padding: 0 _.unit(6) 0 _.unit(2); - > * { + > :not(svg) { @include _.main-content-width; } // App Insights wrapper on cloud env prevents the CSS assignment to direct children - [class='appInsightsWrapper'] > * { + [class='appInsightsWrapper'] > :not(svg) { @include _.main-content-width; } } @@ -31,3 +31,10 @@ bottom: _.unit(3); left: _.unit(4); } + +.daisy { + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); +} diff --git a/packages/console/src/containers/ConsoleContent/index.tsx b/packages/console/src/containers/ConsoleContent/index.tsx index 8deffe847f7..49ff9967470 100644 --- a/packages/console/src/containers/ConsoleContent/index.tsx +++ b/packages/console/src/containers/ConsoleContent/index.tsx @@ -1,16 +1,20 @@ +import { lazy, Suspense } from 'react'; import { useOutletContext, useRoutes } from 'react-router-dom'; import { isDevFeaturesEnabled } from '@/consts/env'; import OverlayScrollbar from '@/ds-components/OverlayScrollbar'; +import { Daisy } from '@/ds-components/Spinner'; import Tag from '@/ds-components/Tag'; import { useConsoleRoutes } from '@/hooks/use-console-routes'; import { usePlausiblePageview } from '@/hooks/use-plausible-pageview'; import type { AppContentOutletContext } from '../AppContent/types'; -import Sidebar from './Sidebar'; +import { Skeleton } from './Sidebar'; import useTenantScopeListener from './hooks'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; + +const Sidebar = lazy(async () => import('./Sidebar')); function ConsoleContent() { const { scrollableContent } = useOutletContext(); @@ -23,10 +27,12 @@ function ConsoleContent() { return (
- + }> + +
- {routes} + }>{routes}
{isDevFeaturesEnabled && ( diff --git a/packages/console/src/contexts/AppThemeProvider/index.tsx b/packages/console/src/contexts/AppThemeProvider/index.tsx index bd3e6990aa4..fa9f2af0560 100644 --- a/packages/console/src/contexts/AppThemeProvider/index.tsx +++ b/packages/console/src/contexts/AppThemeProvider/index.tsx @@ -1,5 +1,5 @@ import { Theme } from '@logto/schemas'; -import { conditionalString, noop, trySafe } from '@silverhand/essentials'; +import { condArray, noop, trySafe } from '@silverhand/essentials'; import type { ReactNode } from 'react'; import { useEffect, useMemo, useState, createContext } from 'react'; @@ -7,7 +7,7 @@ import { storageKeys } from '@/consts'; import type { AppearanceMode } from '@/types/appearance-mode'; import { appearanceModeGuard, DynamicAppearanceMode } from '@/types/appearance-mode'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly children: ReactNode; @@ -78,8 +78,8 @@ export function AppThemeProvider({ children }: Props) { // Set Theme Mode useEffect(() => { - document.body.classList.remove(conditionalString(styles.light), conditionalString(styles.dark)); - document.body.classList.add(conditionalString(styles[theme])); + document.body.classList.remove(...condArray(styles.light, styles.dark)); + document.body.classList.add(...condArray(styles[theme])); }, [theme]); const context = useMemo( diff --git a/packages/console/src/ds-components/ActionMenu/index.tsx b/packages/console/src/ds-components/ActionMenu/index.tsx index b9641dc167f..03ba6ec9b05 100644 --- a/packages/console/src/ds-components/ActionMenu/index.tsx +++ b/packages/console/src/ds-components/ActionMenu/index.tsx @@ -9,7 +9,7 @@ import Button from '../Button'; import Dropdown from '../Dropdown'; import IconButton from '../IconButton'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; export { default as ActionMenuItem } from '../Dropdown/DropdownItem'; diff --git a/packages/console/src/ds-components/Button/index.tsx b/packages/console/src/ds-components/Button/index.tsx index bb94c797002..5d7949090ca 100644 --- a/packages/console/src/ds-components/Button/index.tsx +++ b/packages/console/src/ds-components/Button/index.tsx @@ -11,7 +11,7 @@ import { isAbsoluteUrl } from '@/utils/url'; import type DangerousRaw from '../DangerousRaw'; import DynamicT from '../DynamicT'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; export type ButtonType = | 'primary' diff --git a/packages/console/src/ds-components/Card/index.tsx b/packages/console/src/ds-components/Card/index.tsx index 220f2b6e9b9..bdc7f643fff 100644 --- a/packages/console/src/ds-components/Card/index.tsx +++ b/packages/console/src/ds-components/Card/index.tsx @@ -2,7 +2,7 @@ import classNames from 'classnames'; import type { Ref, ReactNode } from 'react'; import { forwardRef } from 'react'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly children: ReactNode; diff --git a/packages/console/src/ds-components/CardTitle/index.tsx b/packages/console/src/ds-components/CardTitle/index.tsx index a9d5d2b0554..2ed4d7f4cb4 100644 --- a/packages/console/src/ds-components/CardTitle/index.tsx +++ b/packages/console/src/ds-components/CardTitle/index.tsx @@ -12,7 +12,7 @@ import type DangerousRaw from '../DangerousRaw'; import DynamicT from '../DynamicT'; import TextLink from '../TextLink'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; export type Props = { readonly title: AdminConsoleKey | ReactElement; diff --git a/packages/console/src/ds-components/Checkbox/CategorizedCheckboxGroup/index.tsx b/packages/console/src/ds-components/Checkbox/CategorizedCheckboxGroup/index.tsx index 1f07557df05..c0f68c2c7e7 100644 --- a/packages/console/src/ds-components/Checkbox/CategorizedCheckboxGroup/index.tsx +++ b/packages/console/src/ds-components/Checkbox/CategorizedCheckboxGroup/index.tsx @@ -5,7 +5,7 @@ import DynamicT from '@/ds-components/DynamicT'; import CheckboxGroup, { type Option } from '../CheckboxGroup'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; export type CheckboxOptionGroup = { title: AdminConsoleKey; diff --git a/packages/console/src/ds-components/Checkbox/Checkbox/index.tsx b/packages/console/src/ds-components/Checkbox/Checkbox/index.tsx index 954aa363432..52a998d71b4 100644 --- a/packages/console/src/ds-components/Checkbox/Checkbox/index.tsx +++ b/packages/console/src/ds-components/Checkbox/Checkbox/index.tsx @@ -5,7 +5,7 @@ import { useLayoutEffect, useState } from 'react'; import { Tooltip } from '@/ds-components/Tip'; import { onKeyDownHandler } from '@/utils/a11y'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { /* eslint-disable react/boolean-prop-naming */ diff --git a/packages/console/src/ds-components/Checkbox/CheckboxGroup/index.tsx b/packages/console/src/ds-components/Checkbox/CheckboxGroup/index.tsx index faeb433559a..aff83f33616 100644 --- a/packages/console/src/ds-components/Checkbox/CheckboxGroup/index.tsx +++ b/packages/console/src/ds-components/Checkbox/CheckboxGroup/index.tsx @@ -6,7 +6,7 @@ import DynamicT from '@/ds-components/DynamicT'; import Checkbox from '../Checkbox'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; export type Option = { title?: AdminConsoleKey; diff --git a/packages/console/src/ds-components/CodeEditor/index.tsx b/packages/console/src/ds-components/CodeEditor/index.tsx index 45d03d307fe..ffbbe8d50dd 100644 --- a/packages/console/src/ds-components/CodeEditor/index.tsx +++ b/packages/console/src/ds-components/CodeEditor/index.tsx @@ -7,7 +7,7 @@ import { a11yDark as a11yDarkTheme } from 'react-syntax-highlighter/dist/esm/sty import CopyToClipboard from '../CopyToClipboard'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; import { lineNumberContainerStyle, lineNumberStyle, customStyle } from './utils'; type Props = { diff --git a/packages/console/src/ds-components/ColorPicker/index.tsx b/packages/console/src/ds-components/ColorPicker/index.tsx index f8d430233de..d3c6a19c718 100644 --- a/packages/console/src/ds-components/ColorPicker/index.tsx +++ b/packages/console/src/ds-components/ColorPicker/index.tsx @@ -6,7 +6,7 @@ import { onKeyDownHandler } from '@/utils/a11y'; import Dropdown from '../Dropdown'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly name?: string; diff --git a/packages/console/src/ds-components/ConfirmModal/index.tsx b/packages/console/src/ds-components/ConfirmModal/index.tsx index 4e18211c905..9fe550ef6c9 100644 --- a/packages/console/src/ds-components/ConfirmModal/index.tsx +++ b/packages/console/src/ds-components/ConfirmModal/index.tsx @@ -5,13 +5,13 @@ import ReactModal from 'react-modal'; import type { ButtonType } from '@/ds-components/Button'; import Button from '@/ds-components/Button'; -import * as modalStyles from '@/scss/modal.module.scss'; +import modalStyles from '@/scss/modal.module.scss'; import type DangerousRaw from '../DangerousRaw'; import ModalLayout from '../ModalLayout'; import type { Props as ModalLayoutProps } from '../ModalLayout'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; export type ConfirmModalProps = { readonly children: ReactNode; diff --git a/packages/console/src/ds-components/CopyToClipboard/index.tsx b/packages/console/src/ds-components/CopyToClipboard/index.tsx index 03314fdf7f8..962ff8406e9 100644 --- a/packages/console/src/ds-components/CopyToClipboard/index.tsx +++ b/packages/console/src/ds-components/CopyToClipboard/index.tsx @@ -12,15 +12,15 @@ import { } from 'react'; import { useTranslation } from 'react-i18next'; -import Copy from '@/assets/icons/copy.svg'; -import EyeClosed from '@/assets/icons/eye-closed.svg'; -import Eye from '@/assets/icons/eye.svg'; +import Copy from '@/assets/icons/copy.svg?react'; +import EyeClosed from '@/assets/icons/eye-closed.svg?react'; +import Eye from '@/assets/icons/eye.svg?react'; import { onKeyDownHandler } from '@/utils/a11y'; import IconButton from '../IconButton'; import { Tooltip } from '../Tip'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly value: string; diff --git a/packages/console/src/ds-components/DataTransferBox/SourceDataItem/index.tsx b/packages/console/src/ds-components/DataTransferBox/SourceDataItem/index.tsx index fa2a7d36153..3ebea6853c2 100644 --- a/packages/console/src/ds-components/DataTransferBox/SourceDataItem/index.tsx +++ b/packages/console/src/ds-components/DataTransferBox/SourceDataItem/index.tsx @@ -3,7 +3,7 @@ import { onKeyDownHandler } from '@/utils/a11y'; import type { DataEntry } from '../type'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly data: TEntry; diff --git a/packages/console/src/ds-components/DataTransferBox/SourceGroupItem/index.tsx b/packages/console/src/ds-components/DataTransferBox/SourceGroupItem/index.tsx index 48148afa585..da53f98dede 100644 --- a/packages/console/src/ds-components/DataTransferBox/SourceGroupItem/index.tsx +++ b/packages/console/src/ds-components/DataTransferBox/SourceGroupItem/index.tsx @@ -2,8 +2,8 @@ import classNames from 'classnames'; import { useState } from 'react'; import { useTranslation } from 'react-i18next'; -import CaretExpanded from '@/assets/icons/caret-expanded.svg'; -import CaretFolded from '@/assets/icons/caret-folded.svg'; +import CaretExpanded from '@/assets/icons/caret-expanded.svg?react'; +import CaretFolded from '@/assets/icons/caret-folded.svg?react'; import Checkbox from '@/ds-components/Checkbox'; import IconButton from '@/ds-components/IconButton'; import { onKeyDownHandler } from '@/utils/a11y'; @@ -11,7 +11,7 @@ import { onKeyDownHandler } from '@/utils/a11y'; import SourceDataItem from '../SourceDataItem'; import { type DataEntry, type DataGroup, type SelectedDataEntry } from '../type'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly dataGroup: DataGroup; diff --git a/packages/console/src/ds-components/DataTransferBox/SourcePanel/index.tsx b/packages/console/src/ds-components/DataTransferBox/SourcePanel/index.tsx index 11c73f0cb87..b26923397fe 100644 --- a/packages/console/src/ds-components/DataTransferBox/SourcePanel/index.tsx +++ b/packages/console/src/ds-components/DataTransferBox/SourcePanel/index.tsx @@ -2,16 +2,16 @@ import classNames from 'classnames'; import { useState, type ChangeEvent, useCallback, useMemo } from 'react'; import { useTranslation } from 'react-i18next'; -import Search from '@/assets/icons/search.svg'; +import Search from '@/assets/icons/search.svg?react'; import EmptyDataPlaceholder from '@/components/EmptyDataPlaceholder'; import TextInput from '@/ds-components/TextInput'; -import * as transferLayout from '@/scss/transfer.module.scss'; +import transferLayout from '@/scss/transfer.module.scss'; import SourceDataItem from '../SourceDataItem'; import SourceGroupItem from '../SourceGroupItem'; import { type DataEntry, type DataGroup, type SelectedDataEntry } from '../type'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; const appendUnique = (list: T[], items: T | T[]) => { const newEntries = Array.isArray(items) ? items : [items]; diff --git a/packages/console/src/ds-components/DataTransferBox/TargetDataItem/index.tsx b/packages/console/src/ds-components/DataTransferBox/TargetDataItem/index.tsx index 4dad5d979b3..69b8417f410 100644 --- a/packages/console/src/ds-components/DataTransferBox/TargetDataItem/index.tsx +++ b/packages/console/src/ds-components/DataTransferBox/TargetDataItem/index.tsx @@ -1,9 +1,9 @@ -import Close from '@/assets/icons/close.svg'; +import Close from '@/assets/icons/close.svg?react'; import IconButton from '@/ds-components/IconButton'; import { type DataEntry, type SelectedDataEntry } from '../type'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly data: SelectedDataEntry; diff --git a/packages/console/src/ds-components/DataTransferBox/TargetPanel/index.tsx b/packages/console/src/ds-components/DataTransferBox/TargetPanel/index.tsx index 75a9381d498..3637fbae170 100644 --- a/packages/console/src/ds-components/DataTransferBox/TargetPanel/index.tsx +++ b/packages/console/src/ds-components/DataTransferBox/TargetPanel/index.tsx @@ -1,12 +1,12 @@ import { useCallback } from 'react'; import { useTranslation } from 'react-i18next'; -import * as transferLayout from '@/scss/transfer.module.scss'; +import transferLayout from '@/scss/transfer.module.scss'; import TargetDataItem from '../TargetDataItem'; import { type DataEntry, type SelectedDataEntry } from '../type'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly selectedData: Array>; diff --git a/packages/console/src/ds-components/DataTransferBox/index.tsx b/packages/console/src/ds-components/DataTransferBox/index.tsx index 1bf6266f97a..85bfb843d25 100644 --- a/packages/console/src/ds-components/DataTransferBox/index.tsx +++ b/packages/console/src/ds-components/DataTransferBox/index.tsx @@ -3,13 +3,13 @@ import classNames from 'classnames'; import { type ReactElement } from 'react'; import FormField from '@/ds-components/FormField'; -import * as transferLayout from '@/scss/transfer.module.scss'; +import transferLayout from '@/scss/transfer.module.scss'; import type DangerousRaw from '../DangerousRaw'; import SourcePanel from './SourcePanel'; import TargetPanel from './TargetPanel'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; import { type DataEntry, type DataGroup, type SelectedDataEntry } from './type'; /** diff --git a/packages/console/src/ds-components/Divider/index.tsx b/packages/console/src/ds-components/Divider/index.tsx index 2b3e8077c2f..2305bde7087 100644 --- a/packages/console/src/ds-components/Divider/index.tsx +++ b/packages/console/src/ds-components/Divider/index.tsx @@ -1,6 +1,6 @@ import classNames from 'classnames'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly className?: string; diff --git a/packages/console/src/ds-components/DragDrop/DragDropProvider.tsx b/packages/console/src/ds-components/DragDrop/DragDropProvider.tsx index 829c81799d9..4f430ff8141 100644 --- a/packages/console/src/ds-components/DragDrop/DragDropProvider.tsx +++ b/packages/console/src/ds-components/DragDrop/DragDropProvider.tsx @@ -4,7 +4,7 @@ import { createContext, useMemo, useState } from 'react'; import { DndProvider } from 'react-dnd'; import { HTML5Backend } from 'react-dnd-html5-backend'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly children: ReactNode; diff --git a/packages/console/src/ds-components/Dropdown/DropdownItem.tsx b/packages/console/src/ds-components/Dropdown/DropdownItem.tsx index 906b43d8978..092675835b0 100644 --- a/packages/console/src/ds-components/Dropdown/DropdownItem.tsx +++ b/packages/console/src/ds-components/Dropdown/DropdownItem.tsx @@ -3,7 +3,7 @@ import type { MouseEvent, KeyboardEvent, ReactNode } from 'react'; import { onKeyDownHandler } from '@/utils/a11y'; -import * as styles from './DropdownItem.module.scss'; +import styles from './DropdownItem.module.scss'; export type Props = { readonly onClick?: (event: MouseEvent | KeyboardEvent) => void; diff --git a/packages/console/src/ds-components/Dropdown/index.tsx b/packages/console/src/ds-components/Dropdown/index.tsx index 346b8e76365..d404650a3b6 100644 --- a/packages/console/src/ds-components/Dropdown/index.tsx +++ b/packages/console/src/ds-components/Dropdown/index.tsx @@ -15,7 +15,7 @@ import { onKeyDownHandler } from '@/utils/a11y'; import OverlayScrollbar from '../OverlayScrollbar'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; export { default as DropdownItem } from './DropdownItem'; diff --git a/packages/console/src/ds-components/FormField/Skeleton.tsx b/packages/console/src/ds-components/FormField/Skeleton.tsx index 004cf2b8498..be985940103 100644 --- a/packages/console/src/ds-components/FormField/Skeleton.tsx +++ b/packages/console/src/ds-components/FormField/Skeleton.tsx @@ -1,4 +1,4 @@ -import * as styles from './Skeleton.module.scss'; +import styles from './Skeleton.module.scss'; type Props = { readonly formFieldCount: number; diff --git a/packages/console/src/ds-components/FormField/index.tsx b/packages/console/src/ds-components/FormField/index.tsx index 1a2ada001d1..45a0fcc3a1c 100644 --- a/packages/console/src/ds-components/FormField/index.tsx +++ b/packages/console/src/ds-components/FormField/index.tsx @@ -3,7 +3,7 @@ import classNames from 'classnames'; import type { ReactElement, ReactNode } from 'react'; import { useTranslation } from 'react-i18next'; -import Tip from '@/assets/icons/tip.svg'; +import Tip from '@/assets/icons/tip.svg?react'; import FeatureTag, { type Props as FeatureTagProps } from '@/components/FeatureTag'; import type DangerousRaw from '../DangerousRaw'; @@ -13,7 +13,7 @@ import Spacer from '../Spacer'; import { ToggleTip } from '../Tip'; import type { Props as ToggleTipProps } from '../Tip/ToggleTip'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; export type Props = { readonly title: AdminConsoleKey | ReactElement; diff --git a/packages/console/src/ds-components/IconButton/index.tsx b/packages/console/src/ds-components/IconButton/index.tsx index 52afa0b2a98..86bb9af72b4 100644 --- a/packages/console/src/ds-components/IconButton/index.tsx +++ b/packages/console/src/ds-components/IconButton/index.tsx @@ -2,7 +2,7 @@ import classNames from 'classnames'; import type { ForwardedRef, HTMLProps } from 'react'; import { forwardRef, useRef } from 'react'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = Omit, 'size' | 'type'> & { readonly size?: 'small' | 'medium' | 'large'; diff --git a/packages/console/src/ds-components/ImageWithErrorFallback/index.tsx b/packages/console/src/ds-components/ImageWithErrorFallback/index.tsx index d3cd4700251..550e6cc1ef7 100644 --- a/packages/console/src/ds-components/ImageWithErrorFallback/index.tsx +++ b/packages/console/src/ds-components/ImageWithErrorFallback/index.tsx @@ -2,8 +2,8 @@ import { Theme } from '@logto/schemas'; import type { ImgHTMLAttributes, ReactElement } from 'react'; import { cloneElement, useState } from 'react'; -import FallbackImageDark from '@/assets/images/broken-image-dark.svg'; -import FallbackImageLight from '@/assets/images/broken-image-light.svg'; +import FallbackImageDark from '@/assets/images/broken-image-dark.svg?react'; +import FallbackImageLight from '@/assets/images/broken-image-light.svg?react'; import useTheme from '@/hooks/use-theme'; type Props = { diff --git a/packages/console/src/ds-components/InlineNotification/index.tsx b/packages/console/src/ds-components/InlineNotification/index.tsx index 807c1116652..3e44fbc06ca 100644 --- a/packages/console/src/ds-components/InlineNotification/index.tsx +++ b/packages/console/src/ds-components/InlineNotification/index.tsx @@ -3,17 +3,17 @@ import classNames from 'classnames'; import { forwardRef } from 'react'; import type { ReactNode, Ref } from 'react'; -import Alert from '@/assets/icons/alert.svg'; -import Info from '@/assets/icons/info.svg'; -import Error from '@/assets/icons/toast-error.svg'; -import Success from '@/assets/icons/toast-success.svg'; +import Alert from '@/assets/icons/alert.svg?react'; +import Info from '@/assets/icons/info.svg?react'; +import Error from '@/assets/icons/toast-error.svg?react'; +import Success from '@/assets/icons/toast-success.svg?react'; import type { Props as TextLinkProps } from '@/ds-components/TextLink'; import Button from '../Button'; import DynamicT from '../DynamicT'; import TextLink from '../TextLink'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly severity?: 'info' | 'alert' | 'success' | 'error'; diff --git a/packages/console/src/ds-components/KeyValueInputField/index.tsx b/packages/console/src/ds-components/KeyValueInputField/index.tsx index ecb9f36ff3f..c72c22e880f 100644 --- a/packages/console/src/ds-components/KeyValueInputField/index.tsx +++ b/packages/console/src/ds-components/KeyValueInputField/index.tsx @@ -1,12 +1,12 @@ import { type FieldError } from 'react-hook-form'; -import CirclePlus from '@/assets/icons/circle-plus.svg'; -import Minus from '@/assets/icons/minus.svg'; +import CirclePlus from '@/assets/icons/circle-plus.svg?react'; +import Minus from '@/assets/icons/minus.svg?react'; import Button from '@/ds-components/Button'; import IconButton from '@/ds-components/IconButton'; import TextInput, { type Props as TextInputProps } from '@/ds-components/TextInput'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type FieldType = { key: string; diff --git a/packages/console/src/ds-components/ModalHeader/index.tsx b/packages/console/src/ds-components/ModalHeader/index.tsx index 2ab625550f4..d76c450e4f1 100644 --- a/packages/console/src/ds-components/ModalHeader/index.tsx +++ b/packages/console/src/ds-components/ModalHeader/index.tsx @@ -1,13 +1,13 @@ import { type AdminConsoleKey } from '@logto/phrases'; import { type ReactNode } from 'react'; -import Close from '@/assets/icons/close.svg'; +import Close from '@/assets/icons/close.svg?react'; import CardTitle from '../CardTitle'; import IconButton from '../IconButton'; import Spacer from '../Spacer'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly title: AdminConsoleKey; diff --git a/packages/console/src/ds-components/ModalLayout/index.tsx b/packages/console/src/ds-components/ModalLayout/index.tsx index 6cdc2b1030b..149c05f8084 100644 --- a/packages/console/src/ds-components/ModalLayout/index.tsx +++ b/packages/console/src/ds-components/ModalLayout/index.tsx @@ -1,14 +1,14 @@ import classNames from 'classnames'; import { type ReactElement, type ReactNode } from 'react'; -import Close from '@/assets/icons/close.svg'; +import Close from '@/assets/icons/close.svg?react'; import Card from '../Card'; import type { Props as CardTitleProps } from '../CardTitle'; import CardTitle from '../CardTitle'; import IconButton from '../IconButton'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; export type Props = { readonly children: ReactNode; diff --git a/packages/console/src/ds-components/MultiTextInput/index.tsx b/packages/console/src/ds-components/MultiTextInput/index.tsx index cff6d1b75ac..755a912bebf 100644 --- a/packages/console/src/ds-components/MultiTextInput/index.tsx +++ b/packages/console/src/ds-components/MultiTextInput/index.tsx @@ -5,15 +5,15 @@ import type { KeyboardEvent } from 'react'; import { useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; -import CirclePlus from '@/assets/icons/circle-plus.svg'; -import Minus from '@/assets/icons/minus.svg'; +import CirclePlus from '@/assets/icons/circle-plus.svg?react'; +import Minus from '@/assets/icons/minus.svg?react'; import Button from '../Button'; import ConfirmModal from '../ConfirmModal'; import IconButton from '../IconButton'; import TextInput from '../TextInput'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; import type { MultiTextInputError } from './types'; export type Props = { diff --git a/packages/console/src/ds-components/Pagination/index.tsx b/packages/console/src/ds-components/Pagination/index.tsx index 4530f730efb..102fcc4f70b 100644 --- a/packages/console/src/ds-components/Pagination/index.tsx +++ b/packages/console/src/ds-components/Pagination/index.tsx @@ -9,7 +9,7 @@ import DangerousRaw from '../DangerousRaw'; import Next from './Next'; import Previous from './Previous'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; export type Props = { readonly page: number; diff --git a/packages/console/src/ds-components/RadioGroup/Radio.tsx b/packages/console/src/ds-components/RadioGroup/Radio.tsx index ac097bc026a..37f2068a1ae 100644 --- a/packages/console/src/ds-components/RadioGroup/Radio.tsx +++ b/packages/console/src/ds-components/RadioGroup/Radio.tsx @@ -6,7 +6,7 @@ import { useCallback } from 'react'; import type DangerousRaw from '../DangerousRaw'; import DynamicT from '../DynamicT'; -import * as styles from './Radio.module.scss'; +import styles from './Radio.module.scss'; function Check() { return ( diff --git a/packages/console/src/ds-components/RadioGroup/index.tsx b/packages/console/src/ds-components/RadioGroup/index.tsx index 5e0df24d62b..f5b1d9e93e9 100644 --- a/packages/console/src/ds-components/RadioGroup/index.tsx +++ b/packages/console/src/ds-components/RadioGroup/index.tsx @@ -5,7 +5,7 @@ import { Children, cloneElement, forwardRef, isValidElement } from 'react'; import type { Props as RadioProps } from './Radio'; import Radio from './Radio'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type RadioElement = | { diff --git a/packages/console/src/ds-components/Search/index.tsx b/packages/console/src/ds-components/Search/index.tsx index ef54f32d337..ecf40330585 100644 --- a/packages/console/src/ds-components/Search/index.tsx +++ b/packages/console/src/ds-components/Search/index.tsx @@ -1,12 +1,12 @@ import type { FormEventHandler, KeyboardEventHandler } from 'react'; import { useEffect, useRef, useState } from 'react'; -import SearchIcon from '@/assets/icons/search.svg'; +import SearchIcon from '@/assets/icons/search.svg?react'; import Button from '../Button'; import TextInput from '../TextInput'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly defaultValue?: string; diff --git a/packages/console/src/ds-components/Select/MultiSelect.tsx b/packages/console/src/ds-components/Select/MultiSelect.tsx index 9bd33fb906f..f3b52819cd9 100644 --- a/packages/console/src/ds-components/Select/MultiSelect.tsx +++ b/packages/console/src/ds-components/Select/MultiSelect.tsx @@ -4,7 +4,7 @@ import classNames from 'classnames'; import { useEffect, useRef, useState } from 'react'; import { useTranslation } from 'react-i18next'; -import Close from '@/assets/icons/close.svg'; +import Close from '@/assets/icons/close.svg?react'; import { Ring as Spinner } from '@/ds-components/Spinner'; import { onKeyDownHandler } from '@/utils/a11y'; @@ -12,7 +12,7 @@ import Dropdown, { DropdownItem } from '../Dropdown'; import IconButton from '../IconButton'; import Tag from '../Tag'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; export type Option = { value: T; diff --git a/packages/console/src/ds-components/Select/index.tsx b/packages/console/src/ds-components/Select/index.tsx index c57eba9b759..d8fc8163268 100644 --- a/packages/console/src/ds-components/Select/index.tsx +++ b/packages/console/src/ds-components/Select/index.tsx @@ -3,17 +3,17 @@ import type { ReactEventHandler, ReactNode } from 'react'; import { useEffect, useMemo, useRef, useState } from 'react'; import { useTranslation } from 'react-i18next'; -import Close from '@/assets/icons/close.svg'; -import KeyboardArrowDown from '@/assets/icons/keyboard-arrow-down.svg'; -import KeyboardArrowUp from '@/assets/icons/keyboard-arrow-up.svg'; -import SearchIcon from '@/assets/icons/search.svg'; +import Close from '@/assets/icons/close.svg?react'; +import KeyboardArrowDown from '@/assets/icons/keyboard-arrow-down.svg?react'; +import KeyboardArrowUp from '@/assets/icons/keyboard-arrow-up.svg?react'; +import SearchIcon from '@/assets/icons/search.svg?react'; import useWindowResize from '@/hooks/use-window-resize'; import { onKeyDownHandler } from '@/utils/a11y'; import Dropdown, { DropdownItem } from '../Dropdown'; import IconButton from '../IconButton'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; export type Option = { value: T; diff --git a/packages/console/src/ds-components/Spacer/index.tsx b/packages/console/src/ds-components/Spacer/index.tsx index 448c789085b..c1ec9a17b0c 100644 --- a/packages/console/src/ds-components/Spacer/index.tsx +++ b/packages/console/src/ds-components/Spacer/index.tsx @@ -1,4 +1,4 @@ -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; function Spacer() { return
; diff --git a/packages/console/src/ds-components/Spinner/index.tsx b/packages/console/src/ds-components/Spinner/index.tsx index 6e409d38b6c..960634b59cb 100644 --- a/packages/console/src/ds-components/Spinner/index.tsx +++ b/packages/console/src/ds-components/Spinner/index.tsx @@ -1,6 +1,6 @@ import classNames from 'classnames'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly className?: string; diff --git a/packages/console/src/ds-components/Switch/index.tsx b/packages/console/src/ds-components/Switch/index.tsx index 2d999063ee3..c962217ceae 100644 --- a/packages/console/src/ds-components/Switch/index.tsx +++ b/packages/console/src/ds-components/Switch/index.tsx @@ -5,7 +5,7 @@ import { forwardRef } from 'react'; import DynamicT from '../DynamicT'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = | (Omit, 'label'> & { diff --git a/packages/console/src/ds-components/TabNav/TabNavItem.tsx b/packages/console/src/ds-components/TabNav/TabNavItem.tsx index d3c3ab19bf7..0a377705fdb 100644 --- a/packages/console/src/ds-components/TabNav/TabNavItem.tsx +++ b/packages/console/src/ds-components/TabNav/TabNavItem.tsx @@ -5,7 +5,7 @@ import { Link } from 'react-router-dom'; import useMatchTenantPath from '@/hooks/use-tenant-pathname'; import { onKeyDownHandler } from '@/utils/a11y'; -import * as styles from './TabNavItem.module.scss'; +import styles from './TabNavItem.module.scss'; type BaseProps = { isActive?: boolean; diff --git a/packages/console/src/ds-components/TabNav/index.tsx b/packages/console/src/ds-components/TabNav/index.tsx index 631d466240a..88eb617c435 100644 --- a/packages/console/src/ds-components/TabNav/index.tsx +++ b/packages/console/src/ds-components/TabNav/index.tsx @@ -1,6 +1,6 @@ import classNames from 'classnames'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; export { default as TabNavItem } from './TabNavItem'; diff --git a/packages/console/src/ds-components/TabWrapper/index.tsx b/packages/console/src/ds-components/TabWrapper/index.tsx index 11bac4bad39..97f5c3dd9f7 100644 --- a/packages/console/src/ds-components/TabWrapper/index.tsx +++ b/packages/console/src/ds-components/TabWrapper/index.tsx @@ -1,7 +1,7 @@ import classNames from 'classnames'; import type { ReactNode } from 'react'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; export type Props = { readonly isActive: boolean; diff --git a/packages/console/src/ds-components/Table/Skeleton/index.tsx b/packages/console/src/ds-components/Table/Skeleton/index.tsx index 2a8bc56c6e2..c58988fd08c 100644 --- a/packages/console/src/ds-components/Table/Skeleton/index.tsx +++ b/packages/console/src/ds-components/Table/Skeleton/index.tsx @@ -1,4 +1,4 @@ -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly columnSpans: number[]; diff --git a/packages/console/src/ds-components/Table/TableEmptyWrapper.tsx b/packages/console/src/ds-components/Table/TableEmptyWrapper.tsx index 64879af9acf..5f78abb1819 100644 --- a/packages/console/src/ds-components/Table/TableEmptyWrapper.tsx +++ b/packages/console/src/ds-components/Table/TableEmptyWrapper.tsx @@ -1,6 +1,6 @@ import type { ReactNode } from 'react'; -import * as styles from './TableEmptyWrapper.module.scss'; +import styles from './TableEmptyWrapper.module.scss'; type Props = { readonly columns: number; diff --git a/packages/console/src/ds-components/Table/TableError.tsx b/packages/console/src/ds-components/Table/TableError.tsx index d2a3b4637d6..61ff5091ad5 100644 --- a/packages/console/src/ds-components/Table/TableError.tsx +++ b/packages/console/src/ds-components/Table/TableError.tsx @@ -1,13 +1,13 @@ import { Theme } from '@logto/schemas'; import { useTranslation } from 'react-i18next'; -import RequestErrorDarkImage from '@/assets/images/request-error-dark.svg'; -import RequestErrorImage from '@/assets/images/request-error.svg'; +import RequestErrorDarkImage from '@/assets/images/request-error-dark.svg?react'; +import RequestErrorImage from '@/assets/images/request-error.svg?react'; import useTheme from '@/hooks/use-theme'; import Button from '../Button'; -import * as styles from './TableError.module.scss'; +import styles from './TableError.module.scss'; type Props = { readonly title?: string; diff --git a/packages/console/src/ds-components/Table/TablePlaceholder.tsx b/packages/console/src/ds-components/Table/TablePlaceholder.tsx index e03654579f4..2464daa1dd8 100644 --- a/packages/console/src/ds-components/Table/TablePlaceholder.tsx +++ b/packages/console/src/ds-components/Table/TablePlaceholder.tsx @@ -9,7 +9,7 @@ import useTheme from '@/hooks/use-theme'; import DynamicT from '../DynamicT'; import TextLink from '../TextLink'; -import * as styles from './TablePlaceholder.module.scss'; +import styles from './TablePlaceholder.module.scss'; type Props = { readonly image: ReactNode; diff --git a/packages/console/src/ds-components/Table/index.tsx b/packages/console/src/ds-components/Table/index.tsx index 4a9010b8f94..ce51cfd752c 100644 --- a/packages/console/src/ds-components/Table/index.tsx +++ b/packages/console/src/ds-components/Table/index.tsx @@ -12,7 +12,7 @@ import OverlayScrollbar from '../OverlayScrollbar'; import Skeleton from './Skeleton'; import TableEmptyWrapper from './TableEmptyWrapper'; import TableError from './TableError'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; import type { Column, RowGroup } from './types'; export type Props< diff --git a/packages/console/src/ds-components/Tag/index.tsx b/packages/console/src/ds-components/Tag/index.tsx index 6d11b03997f..3694cafdbaa 100644 --- a/packages/console/src/ds-components/Tag/index.tsx +++ b/packages/console/src/ds-components/Tag/index.tsx @@ -2,10 +2,10 @@ import { conditional } from '@silverhand/essentials'; import classNames from 'classnames'; import type { HTMLProps, ReactNode } from 'react'; -import Failed from '@/assets/icons/failed.svg'; -import Success from '@/assets/icons/success.svg'; +import Failed from '@/assets/icons/failed.svg?react'; +import Success from '@/assets/icons/success.svg?react'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; export type Props = Pick, 'className' | 'onClick'> & { readonly type?: 'property' | 'state' | 'result'; diff --git a/packages/console/src/ds-components/TextInput/NumericInput.tsx b/packages/console/src/ds-components/TextInput/NumericInput.tsx index a622041594a..462409a7030 100644 --- a/packages/console/src/ds-components/TextInput/NumericInput.tsx +++ b/packages/console/src/ds-components/TextInput/NumericInput.tsx @@ -1,11 +1,11 @@ import classNames from 'classnames'; import { type ComponentProps } from 'react'; -import CaretDown from '@/assets/icons/caret-down.svg'; -import CaretUp from '@/assets/icons/caret-up.svg'; +import CaretDown from '@/assets/icons/caret-down.svg?react'; +import CaretUp from '@/assets/icons/caret-up.svg?react'; import { onKeyDownHandler } from '@/utils/a11y'; -import * as styles from './NumericInput.module.scss'; +import styles from './NumericInput.module.scss'; import TextInput from './index'; type ButtonProps = { diff --git a/packages/console/src/ds-components/TextInput/index.tsx b/packages/console/src/ds-components/TextInput/index.tsx index e13603c271c..31e8754f5a6 100644 --- a/packages/console/src/ds-components/TextInput/index.tsx +++ b/packages/console/src/ds-components/TextInput/index.tsx @@ -12,11 +12,11 @@ import { useState, } from 'react'; -import EyeClosed from '@/assets/icons/eye-closed.svg'; -import Eye from '@/assets/icons/eye.svg'; +import EyeClosed from '@/assets/icons/eye-closed.svg?react'; +import Eye from '@/assets/icons/eye.svg?react'; import IconButton from '@/ds-components/IconButton'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; export type Props = Omit, 'size'> & { readonly error?: string | boolean | ReactElement; diff --git a/packages/console/src/ds-components/TextLink/index.tsx b/packages/console/src/ds-components/TextLink/index.tsx index 1539f986d34..08b0b290699 100644 --- a/packages/console/src/ds-components/TextLink/index.tsx +++ b/packages/console/src/ds-components/TextLink/index.tsx @@ -8,7 +8,7 @@ import { Link } from 'react-router-dom'; import { LinkButton } from '@/ds-components/Button'; import useTenantPathname from '@/hooks/use-tenant-pathname'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; export type Props = AnchorHTMLAttributes & Partial & { diff --git a/packages/console/src/ds-components/Textarea/index.tsx b/packages/console/src/ds-components/Textarea/index.tsx index 6da3741c52a..01dfa80f978 100644 --- a/packages/console/src/ds-components/Textarea/index.tsx +++ b/packages/console/src/ds-components/Textarea/index.tsx @@ -2,7 +2,7 @@ import classNames from 'classnames'; import type { ForwardedRef, HTMLProps } from 'react'; import { forwardRef } from 'react'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = HTMLProps & { readonly className?: string; diff --git a/packages/console/src/ds-components/Tip/TipBubble/index.tsx b/packages/console/src/ds-components/Tip/TipBubble/index.tsx index 18d2e5830ef..8803a2c6546 100644 --- a/packages/console/src/ds-components/Tip/TipBubble/index.tsx +++ b/packages/console/src/ds-components/Tip/TipBubble/index.tsx @@ -5,7 +5,7 @@ import type { ForwardedRef, ReactNode, HTMLProps, RefObject } from 'react'; import type { HorizontalAlignment, Position } from '@/types/positioning'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; export type TipBubblePlacement = 'top' | 'right' | 'bottom' | 'left'; diff --git a/packages/console/src/ds-components/Tip/ToggleTip/index.tsx b/packages/console/src/ds-components/Tip/ToggleTip/index.tsx index db8fe54bd0b..f3bce58e35a 100644 --- a/packages/console/src/ds-components/Tip/ToggleTip/index.tsx +++ b/packages/console/src/ds-components/Tip/ToggleTip/index.tsx @@ -4,7 +4,7 @@ import { useCallback, useState, useRef } from 'react'; import ReactModal from 'react-modal'; import usePosition from '@/hooks/use-position'; -import * as modalStyles from '@/scss/modal.module.scss'; +import modalStyles from '@/scss/modal.module.scss'; import type { HorizontalAlignment } from '@/types/positioning'; import { onKeyDownHandler } from '@/utils/a11y'; @@ -17,7 +17,7 @@ import { getHorizontalOffset, } from '../TipBubble/utils'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; export type Props = { readonly children: ReactNode; diff --git a/packages/console/src/ds-components/Tip/Tooltip/index.tsx b/packages/console/src/ds-components/Tip/Tooltip/index.tsx index 1e7d9538fe8..2bdfb7298c5 100644 --- a/packages/console/src/ds-components/Tip/Tooltip/index.tsx +++ b/packages/console/src/ds-components/Tip/Tooltip/index.tsx @@ -15,7 +15,7 @@ import { getHorizontalOffset, } from '../TipBubble/utils'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly className?: string; diff --git a/packages/console/src/ds-components/Toast/index.tsx b/packages/console/src/ds-components/Toast/index.tsx index 5e20eaf4eac..e4011ba3d78 100644 --- a/packages/console/src/ds-components/Toast/index.tsx +++ b/packages/console/src/ds-components/Toast/index.tsx @@ -1,10 +1,10 @@ import classNames from 'classnames'; import { Toaster, resolveValue } from 'react-hot-toast'; -import Error from '@/assets/icons/toast-error.svg'; -import Success from '@/assets/icons/toast-success.svg'; +import Error from '@/assets/icons/toast-error.svg?react'; +import Success from '@/assets/icons/toast-success.svg?react'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; function Toast() { return ( diff --git a/packages/console/src/ds-components/Uploader/FileUploader/index.tsx b/packages/console/src/ds-components/Uploader/FileUploader/index.tsx index 4e067723fba..4110aee0ac6 100644 --- a/packages/console/src/ds-components/Uploader/FileUploader/index.tsx +++ b/packages/console/src/ds-components/Uploader/FileUploader/index.tsx @@ -6,13 +6,13 @@ import { useCallback, useEffect, useState } from 'react'; import { type FileRejection, useDropzone } from 'react-dropzone'; import { useTranslation } from 'react-i18next'; -import UploaderIcon from '@/assets/icons/upload.svg'; +import UploaderIcon from '@/assets/icons/upload.svg?react'; import useApi from '@/hooks/use-api'; import { convertToFileExtensionArray, formatBytes } from '@/utils/uploader'; import { Ring } from '../../Spinner'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; export type Props = UserAssets> = { // eslint-disable-next-line react/boolean-prop-naming diff --git a/packages/console/src/ds-components/Uploader/ImageUploader/index.tsx b/packages/console/src/ds-components/Uploader/ImageUploader/index.tsx index 49bc45a7fc1..6b16009018a 100644 --- a/packages/console/src/ds-components/Uploader/ImageUploader/index.tsx +++ b/packages/console/src/ds-components/Uploader/ImageUploader/index.tsx @@ -1,7 +1,7 @@ import type { AllowedUploadMimeType } from '@logto/schemas'; import classNames from 'classnames'; -import Delete from '@/assets/icons/delete.svg'; +import Delete from '@/assets/icons/delete.svg?react'; import ImageWithErrorFallback from '@/ds-components/ImageWithErrorFallback'; import useImageMimeTypes, { maxImageSizeLimit } from '@/hooks/use-image-mime-types'; @@ -9,7 +9,7 @@ import IconButton from '../../IconButton'; import FileUploader from '../FileUploader'; import type { Props as FileUploaderProps } from '../FileUploader'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; export type Props = Omit & { readonly allowedMimeTypes?: AllowedUploadMimeType[]; diff --git a/packages/console/src/ds-components/Uploader/ImageUploaderField/index.tsx b/packages/console/src/ds-components/Uploader/ImageUploaderField/index.tsx index 2b519a7f458..ff8c6a08589 100644 --- a/packages/console/src/ds-components/Uploader/ImageUploaderField/index.tsx +++ b/packages/console/src/ds-components/Uploader/ImageUploaderField/index.tsx @@ -7,7 +7,7 @@ import useImageMimeTypes from '@/hooks/use-image-mime-types'; import ImageUploader from '../ImageUploader'; import type { Props as ImageUploaderProps } from '../ImageUploader'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = Omit & { readonly onChange: (value: string) => void; diff --git a/packages/console/src/hooks/use-console-routes/index.tsx b/packages/console/src/hooks/use-console-routes/index.tsx index f03eeec9e4a..4b78bbc2de9 100644 --- a/packages/console/src/hooks/use-console-routes/index.tsx +++ b/packages/console/src/hooks/use-console-routes/index.tsx @@ -1,12 +1,9 @@ import { condArray } from '@silverhand/essentials'; -import { useMemo } from 'react'; +import { lazy, useMemo } from 'react'; import { type RouteObject } from 'react-router-dom'; import { isCloud } from '@/consts/env'; -import Dashboard from '@/pages/Dashboard'; -import GetStarted from '@/pages/GetStarted'; import NotFound from '@/pages/NotFound'; -import SigningKeys from '@/pages/SigningKeys'; import { apiResources } from './routes/api-resources'; import { applications } from './routes/applications'; @@ -23,6 +20,10 @@ import { useTenantSettings } from './routes/tenant-settings'; import { users } from './routes/users'; import { webhooks } from './routes/webhooks'; +const Dashboard = lazy(async () => import('@/pages/Dashboard')); +const GetStarted = lazy(async () => import('@/pages/GetStarted')); +const SigningKeys = lazy(async () => import('@/pages/SigningKeys')); + export const useConsoleRoutes = () => { const tenantSettings = useTenantSettings(); diff --git a/packages/console/src/hooks/use-console-routes/routes/api-resources.tsx b/packages/console/src/hooks/use-console-routes/routes/api-resources.tsx index 4e284d237e4..3bdd236135d 100644 --- a/packages/console/src/hooks/use-console-routes/routes/api-resources.tsx +++ b/packages/console/src/hooks/use-console-routes/routes/api-resources.tsx @@ -1,10 +1,16 @@ +import { lazy } from 'react'; import { Navigate, type RouteObject } from 'react-router-dom'; import { ApiResourceDetailsTabs } from '@/consts'; -import ApiResourceDetails from '@/pages/ApiResourceDetails'; -import ApiResourcePermissions from '@/pages/ApiResourceDetails/ApiResourcePermissions'; -import ApiResourceSettings from '@/pages/ApiResourceDetails/ApiResourceSettings'; -import ApiResources from '@/pages/ApiResources'; + +const ApiResources = lazy(async () => import('@/pages/ApiResources')); +const ApiResourceDetails = lazy(async () => import('@/pages/ApiResourceDetails')); +const ApiResourcePermissions = lazy( + async () => import('@/pages/ApiResourceDetails/ApiResourcePermissions') +); +const ApiResourceSettings = lazy( + async () => import('@/pages/ApiResourceDetails/ApiResourceSettings') +); export const apiResources: RouteObject = { path: 'api-resources', diff --git a/packages/console/src/hooks/use-console-routes/routes/applications.tsx b/packages/console/src/hooks/use-console-routes/routes/applications.tsx index ea537f6c3d1..e4c178db175 100644 --- a/packages/console/src/hooks/use-console-routes/routes/applications.tsx +++ b/packages/console/src/hooks/use-console-routes/routes/applications.tsx @@ -1,9 +1,11 @@ +import { lazy } from 'react'; import { Navigate, type RouteObject } from 'react-router-dom'; import { ApplicationDetailsTabs } from '@/consts'; -import ApplicationDetails from '@/pages/ApplicationDetails'; -import Applications from '@/pages/Applications'; -import AuditLogDetails from '@/pages/AuditLogDetails'; + +const Applications = lazy(async () => import('@/pages/Applications')); +const ApplicationDetails = lazy(async () => import('@/pages/ApplicationDetails')); +const AuditLogDetails = lazy(async () => import('@/pages/AuditLogDetails')); export const applications: RouteObject = { path: 'applications', diff --git a/packages/console/src/hooks/use-console-routes/routes/audit-logs.tsx b/packages/console/src/hooks/use-console-routes/routes/audit-logs.tsx index 24094e4681c..e529342119c 100644 --- a/packages/console/src/hooks/use-console-routes/routes/audit-logs.tsx +++ b/packages/console/src/hooks/use-console-routes/routes/audit-logs.tsx @@ -1,7 +1,8 @@ +import { lazy } from 'react'; import { type RouteObject } from 'react-router-dom'; -import AuditLogDetails from '@/pages/AuditLogDetails'; -import AuditLogs from '@/pages/AuditLogs'; +const AuditLogs = lazy(async () => import('@/pages/AuditLogs')); +const AuditLogDetails = lazy(async () => import('@/pages/AuditLogDetails')); export const auditLogs: RouteObject = { path: 'audit-logs', diff --git a/packages/console/src/hooks/use-console-routes/routes/connectors.tsx b/packages/console/src/hooks/use-console-routes/routes/connectors.tsx index 5fcc4d50b2a..dbe359ba2d7 100644 --- a/packages/console/src/hooks/use-console-routes/routes/connectors.tsx +++ b/packages/console/src/hooks/use-console-routes/routes/connectors.tsx @@ -1,8 +1,10 @@ +import { lazy } from 'react'; import { Navigate } from 'react-router-dom'; import { ConnectorsTabs } from '@/consts'; -import ConnectorDetails from '@/pages/ConnectorDetails'; -import Connectors from '@/pages/Connectors'; + +const Connectors = lazy(async () => import('@/pages/Connectors')); +const ConnectorDetails = lazy(async () => import('@/pages/ConnectorDetails')); export const connectors = { path: 'connectors', diff --git a/packages/console/src/hooks/use-console-routes/routes/customize-jwt.tsx b/packages/console/src/hooks/use-console-routes/routes/customize-jwt.tsx index 9ed2653a117..b5d8ec0379f 100644 --- a/packages/console/src/hooks/use-console-routes/routes/customize-jwt.tsx +++ b/packages/console/src/hooks/use-console-routes/routes/customize-jwt.tsx @@ -1,7 +1,8 @@ +import { lazy } from 'react'; import { type RouteObject } from 'react-router-dom'; -import CustomizeJwt from '@/pages/CustomizeJwt'; -import CustomizeJwtDetails from '@/pages/CustomizeJwtDetails'; +const CustomizeJwt = lazy(async () => import('@/pages/CustomizeJwt')); +const CustomizeJwtDetails = lazy(async () => import('@/pages/CustomizeJwtDetails')); export const customizeJwt: RouteObject = { path: 'customize-jwt', diff --git a/packages/console/src/hooks/use-console-routes/routes/enterprise-sso.tsx b/packages/console/src/hooks/use-console-routes/routes/enterprise-sso.tsx index a363671658d..caa7c174398 100644 --- a/packages/console/src/hooks/use-console-routes/routes/enterprise-sso.tsx +++ b/packages/console/src/hooks/use-console-routes/routes/enterprise-sso.tsx @@ -1,8 +1,10 @@ +import { lazy } from 'react'; import { Navigate, type RouteObject } from 'react-router-dom'; import { EnterpriseSsoDetailsTabs } from '@/consts/page-tabs'; -import EnterpriseSso from '@/pages/EnterpriseSso'; -import EnterpriseSsoDetails from '@/pages/EnterpriseSsoDetails'; + +const EnterpriseSso = lazy(async () => import('@/pages/EnterpriseSso')); +const EnterpriseSsoDetails = lazy(async () => import('@/pages/EnterpriseSsoDetails')); export const enterpriseSso: RouteObject = { path: 'enterprise-sso', diff --git a/packages/console/src/hooks/use-console-routes/routes/mfa.tsx b/packages/console/src/hooks/use-console-routes/routes/mfa.tsx index 8225a573d4c..0ef3fde5acf 100644 --- a/packages/console/src/hooks/use-console-routes/routes/mfa.tsx +++ b/packages/console/src/hooks/use-console-routes/routes/mfa.tsx @@ -1,5 +1,6 @@ +import { lazy } from 'react'; import { type RouteObject } from 'react-router-dom'; -import Mfa from '@/pages/Mfa'; +const Mfa = lazy(async () => import('@/pages/Mfa')); export const mfa: RouteObject = { path: 'mfa', element: }; diff --git a/packages/console/src/hooks/use-console-routes/routes/organization-template.tsx b/packages/console/src/hooks/use-console-routes/routes/organization-template.tsx index 21d30eb6c0d..aa69cf6e387 100644 --- a/packages/console/src/hooks/use-console-routes/routes/organization-template.tsx +++ b/packages/console/src/hooks/use-console-routes/routes/organization-template.tsx @@ -1,12 +1,18 @@ +import { lazy } from 'react'; import { Navigate, type RouteObject } from 'react-router-dom'; import { OrganizationRoleDetailsTabs, OrganizationTemplateTabs } from '@/consts'; -import OrganizationRoleDetails from '@/pages/OrganizationRoleDetails'; -import Permissions from '@/pages/OrganizationRoleDetails/Permissions'; -import Settings from '@/pages/OrganizationRoleDetails/Settings'; -import OrganizationTemplate from '@/pages/OrganizationTemplate'; -import OrganizationPermissions from '@/pages/OrganizationTemplate/OrganizationPermissions'; -import OrganizationRoles from '@/pages/OrganizationTemplate/OrganizationRoles'; + +const OrganizationTemplate = lazy(async () => import('@/pages/OrganizationTemplate')); +const OrganizationRoles = lazy( + async () => import('@/pages/OrganizationTemplate/OrganizationRoles') +); +const OrganizationPermissions = lazy( + async () => import('@/pages/OrganizationTemplate/OrganizationPermissions') +); +const OrganizationRoleDetails = lazy(async () => import('@/pages/OrganizationRoleDetails')); +const Permissions = lazy(async () => import('@/pages/OrganizationRoleDetails/Permissions')); +const Settings = lazy(async () => import('@/pages/OrganizationRoleDetails/Settings')); export const organizationTemplate: RouteObject[] = [ { diff --git a/packages/console/src/hooks/use-console-routes/routes/organizations.tsx b/packages/console/src/hooks/use-console-routes/routes/organizations.tsx index 1c70a673807..c8c95668aa3 100644 --- a/packages/console/src/hooks/use-console-routes/routes/organizations.tsx +++ b/packages/console/src/hooks/use-console-routes/routes/organizations.tsx @@ -1,12 +1,14 @@ import { condArray } from '@silverhand/essentials'; +import { lazy } from 'react'; import { Navigate, type RouteObject } from 'react-router-dom'; -import OrganizationDetails from '@/pages/OrganizationDetails'; -import MachineToMachine from '@/pages/OrganizationDetails/MachineToMachine'; -import Members from '@/pages/OrganizationDetails/Members'; -import Settings from '@/pages/OrganizationDetails/Settings'; import { OrganizationDetailsTabs } from '@/pages/OrganizationDetails/types'; -import Organizations from '@/pages/Organizations'; + +const Organizations = lazy(async () => import('@/pages/Organizations')); +const OrganizationDetails = lazy(async () => import('@/pages/OrganizationDetails')); +const MachineToMachine = lazy(async () => import('@/pages/OrganizationDetails/MachineToMachine')); +const Members = lazy(async () => import('@/pages/OrganizationDetails/Members')); +const Settings = lazy(async () => import('@/pages/OrganizationDetails/Settings')); export const organizations: RouteObject = { path: 'organizations', diff --git a/packages/console/src/hooks/use-console-routes/routes/profile.tsx b/packages/console/src/hooks/use-console-routes/routes/profile.tsx index f4bb0268f08..423030de425 100644 --- a/packages/console/src/hooks/use-console-routes/routes/profile.tsx +++ b/packages/console/src/hooks/use-console-routes/routes/profile.tsx @@ -1,9 +1,16 @@ +import { lazy } from 'react'; import { type RouteObject } from 'react-router-dom'; -import ChangePasswordModal from '@/pages/Profile/containers/ChangePasswordModal'; -import LinkEmailModal from '@/pages/Profile/containers/LinkEmailModal'; -import VerificationCodeModal from '@/pages/Profile/containers/VerificationCodeModal'; -import VerifyPasswordModal from '@/pages/Profile/containers/VerifyPasswordModal'; +const ChangePasswordModal = lazy( + async () => import('@/pages/Profile/containers/ChangePasswordModal') +); +const LinkEmailModal = lazy(async () => import('@/pages/Profile/containers/LinkEmailModal')); +const VerificationCodeModal = lazy( + async () => import('@/pages/Profile/containers/VerificationCodeModal') +); +const VerifyPasswordModal = lazy( + async () => import('@/pages/Profile/containers/VerifyPasswordModal') +); export const profile: RouteObject[] = [ { path: 'verify-password', element: }, diff --git a/packages/console/src/hooks/use-console-routes/routes/roles.tsx b/packages/console/src/hooks/use-console-routes/routes/roles.tsx index 536131a0bb7..51e38899e7a 100644 --- a/packages/console/src/hooks/use-console-routes/routes/roles.tsx +++ b/packages/console/src/hooks/use-console-routes/routes/roles.tsx @@ -1,12 +1,14 @@ +import { lazy } from 'react'; import { Navigate, type RouteObject } from 'react-router-dom'; import { RoleDetailsTabs } from '@/consts/page-tabs'; -import RoleDetails from '@/pages/RoleDetails'; -import RoleApplications from '@/pages/RoleDetails/RoleApplications'; -import RolePermissions from '@/pages/RoleDetails/RolePermissions'; -import RoleSettings from '@/pages/RoleDetails/RoleSettings'; -import RoleUsers from '@/pages/RoleDetails/RoleUsers'; -import Roles from '@/pages/Roles'; + +const Roles = lazy(async () => import('@/pages/Roles')); +const RoleDetails = lazy(async () => import('@/pages/RoleDetails')); +const RolePermissions = lazy(async () => import('@/pages/RoleDetails/RolePermissions')); +const RoleSettings = lazy(async () => import('@/pages/RoleDetails/RoleSettings')); +const RoleUsers = lazy(async () => import('@/pages/RoleDetails/RoleUsers')); +const RoleApplications = lazy(async () => import('@/pages/RoleDetails/RoleApplications')); export const roles: RouteObject = { path: 'roles', diff --git a/packages/console/src/hooks/use-console-routes/routes/sign-in-experience.tsx b/packages/console/src/hooks/use-console-routes/routes/sign-in-experience.tsx index 04fdd3d94db..63b4a2e8e1d 100644 --- a/packages/console/src/hooks/use-console-routes/routes/sign-in-experience.tsx +++ b/packages/console/src/hooks/use-console-routes/routes/sign-in-experience.tsx @@ -1,8 +1,10 @@ +import { lazy } from 'react'; import { Navigate, type RouteObject } from 'react-router-dom'; -import SignInExperience from '@/pages/SignInExperience'; import { SignInExperienceTab } from '@/pages/SignInExperience/types'; +const SignInExperience = lazy(async () => import('@/pages/SignInExperience')); + export const signInExperience: RouteObject = { path: 'sign-in-experience', children: [ diff --git a/packages/console/src/hooks/use-console-routes/routes/tenant-settings.tsx b/packages/console/src/hooks/use-console-routes/routes/tenant-settings.tsx index fd33b2384e8..5c025626e82 100644 --- a/packages/console/src/hooks/use-console-routes/routes/tenant-settings.tsx +++ b/packages/console/src/hooks/use-console-routes/routes/tenant-settings.tsx @@ -1,19 +1,22 @@ import { condArray } from '@silverhand/essentials'; -import { useContext, useMemo } from 'react'; +import { lazy, useContext, useMemo } from 'react'; import { Navigate, type RouteObject } from 'react-router-dom'; import { TenantSettingsTabs } from '@/consts'; import { TenantsContext } from '@/contexts/TenantsProvider'; import useCurrentTenantScopes from '@/hooks/use-current-tenant-scopes'; import NotFound from '@/pages/NotFound'; -import TenantSettings from '@/pages/TenantSettings'; -import BillingHistory from '@/pages/TenantSettings/BillingHistory'; -import Subscription from '@/pages/TenantSettings/Subscription'; -import TenantBasicSettings from '@/pages/TenantSettings/TenantBasicSettings'; -import TenantDomainSettings from '@/pages/TenantSettings/TenantDomainSettings'; -import TenantMembers from '@/pages/TenantSettings/TenantMembers'; -import Invitations from '@/pages/TenantSettings/TenantMembers/Invitations'; -import Members from '@/pages/TenantSettings/TenantMembers/Members'; + +const TenantSettings = lazy(async () => import('@/pages/TenantSettings')); +const TenantBasicSettings = lazy(async () => import('@/pages/TenantSettings/TenantBasicSettings')); +const TenantDomainSettings = lazy( + async () => import('@/pages/TenantSettings/TenantDomainSettings') +); +const TenantMembers = lazy(async () => import('@/pages/TenantSettings/TenantMembers')); +const Invitations = lazy(async () => import('@/pages/TenantSettings/TenantMembers/Invitations')); +const Members = lazy(async () => import('@/pages/TenantSettings/TenantMembers/Members')); +const BillingHistory = lazy(async () => import('@/pages/TenantSettings/BillingHistory')); +const Subscription = lazy(async () => import('@/pages/TenantSettings/Subscription')); export const useTenantSettings = () => { const { isDevTenant } = useContext(TenantsContext); diff --git a/packages/console/src/hooks/use-console-routes/routes/users.tsx b/packages/console/src/hooks/use-console-routes/routes/users.tsx index 39f85b6a862..2a4d30f99c1 100644 --- a/packages/console/src/hooks/use-console-routes/routes/users.tsx +++ b/packages/console/src/hooks/use-console-routes/routes/users.tsx @@ -1,13 +1,15 @@ +import { lazy } from 'react'; import { Navigate, type RouteObject } from 'react-router-dom'; import { UserDetailsTabs } from '@/consts/page-tabs'; -import AuditLogDetails from '@/pages/AuditLogDetails'; -import UserDetails from '@/pages/UserDetails'; -import UserLogs from '@/pages/UserDetails/UserLogs'; -import UserOrganizations from '@/pages/UserDetails/UserOrganizations'; -import UserRoles from '@/pages/UserDetails/UserRoles'; -import UserSettings from '@/pages/UserDetails/UserSettings'; -import Users from '@/pages/Users'; + +const AuditLogDetails = lazy(async () => import('@/pages/AuditLogDetails')); +const UserDetails = lazy(async () => import('@/pages/UserDetails')); +const UserLogs = lazy(async () => import('@/pages/UserDetails/UserLogs')); +const UserOrganizations = lazy(async () => import('@/pages/UserDetails/UserOrganizations')); +const UserRoles = lazy(async () => import('@/pages/UserDetails/UserRoles')); +const UserSettings = lazy(async () => import('@/pages/UserDetails/UserSettings')); +const Users = lazy(async () => import('@/pages/Users')); export const users: RouteObject = { path: 'users', diff --git a/packages/console/src/hooks/use-console-routes/routes/webhooks.tsx b/packages/console/src/hooks/use-console-routes/routes/webhooks.tsx index 2dc6c7c2a72..e9823187911 100644 --- a/packages/console/src/hooks/use-console-routes/routes/webhooks.tsx +++ b/packages/console/src/hooks/use-console-routes/routes/webhooks.tsx @@ -1,11 +1,13 @@ +import { lazy } from 'react'; import { Navigate, type RouteObject } from 'react-router-dom'; import { WebhookDetailsTabs } from '@/consts'; -import AuditLogDetails from '@/pages/AuditLogDetails'; -import WebhookDetails from '@/pages/WebhookDetails'; -import WebhookLogs from '@/pages/WebhookDetails/WebhookLogs'; -import WebhookSettings from '@/pages/WebhookDetails/WebhookSettings'; -import Webhooks from '@/pages/Webhooks'; + +const WebhookDetails = lazy(async () => import('@/pages/WebhookDetails')); +const AuditLogDetails = lazy(async () => import('@/pages/AuditLogDetails')); +const WebhookSettings = lazy(async () => import('@/pages/WebhookDetails/WebhookSettings')); +const WebhookLogs = lazy(async () => import('@/pages/WebhookDetails/WebhookLogs')); +const Webhooks = lazy(async () => import('@/pages/Webhooks')); export const webhooks: RouteObject = { path: 'webhooks', diff --git a/packages/console/src/icons/ConnectorPlatformIcon.tsx b/packages/console/src/icons/ConnectorPlatformIcon.tsx index cd5397de9b9..a659122ec61 100644 --- a/packages/console/src/icons/ConnectorPlatformIcon.tsx +++ b/packages/console/src/icons/ConnectorPlatformIcon.tsx @@ -1,8 +1,8 @@ import { ConnectorPlatform } from '@logto/schemas'; -import Native from '@/assets/icons/connector-platform-icon-native.svg'; -import Universal from '@/assets/icons/connector-platform-icon-universal.svg'; -import Web from '@/assets/icons/connector-platform-icon-web.svg'; +import Native from '@/assets/icons/connector-platform-icon-native.svg?react'; +import Universal from '@/assets/icons/connector-platform-icon-universal.svg?react'; +import Web from '@/assets/icons/connector-platform-icon-web.svg?react'; type Props = { readonly platform: ConnectorPlatform; diff --git a/packages/console/src/include.d/react-app.d.ts b/packages/console/src/include.d/react-app.d.ts deleted file mode 100644 index c2ef4a4de00..00000000000 --- a/packages/console/src/include.d/react-app.d.ts +++ /dev/null @@ -1,65 +0,0 @@ -// Copied from react-scripts/lib/react-app.d.ts - -declare module '*.avif' { - const src: string; - export default src; -} - -declare module '*.bmp' { - const src: string; - export default src; -} - -declare module '*.gif' { - const src: string; - export default src; -} - -declare module '*.jpg' { - const src: string; - export default src; -} - -declare module '*.jpeg' { - const src: string; - export default src; -} - -declare module '*.png' { - const src: string; - export default src; -} - -declare module '*.webp' { - const src: string; - export default src; -} - -declare module '*.svg' { - import type * as React from 'react'; - - export const ReactComponent: React.FunctionComponent< - React.SVGProps & { title?: string } - >; - - const src: string; - export default src; -} - -declare module '*.module.css' { - const classes: Readonly>; - export default classes; - export = classes; -} - -declare module '*.module.scss' { - const classes: Readonly>; - export default classes; - export = classes; -} - -declare module '*.module.sass' { - const classes: Readonly>; - export default classes; - export = classes; -} diff --git a/packages/console/src/include.d/react-router-dom.d.ts b/packages/console/src/include.d/react-router-dom.d.ts index 56d37327af0..ff4278d74e6 100644 --- a/packages/console/src/include.d/react-router-dom.d.ts +++ b/packages/console/src/include.d/react-router-dom.d.ts @@ -6,7 +6,6 @@ * Reference: https://github.com/remix-run/react-router/issues/10241 */ -// eslint-disable-next-line import/no-unassigned-import import 'react-router-dom'; declare module 'react-router-dom' { diff --git a/packages/console/src/include.d/vite-env.d.ts b/packages/console/src/include.d/vite-env.d.ts new file mode 100644 index 00000000000..3b54c3d2394 --- /dev/null +++ b/packages/console/src/include.d/vite-env.d.ts @@ -0,0 +1,6 @@ +import 'vite/client'; +import 'vite-plugin-svgr/client'; + +interface ImportMeta { + readonly env: Record; +} diff --git a/packages/console/src/mdx-components/ApplicationCredentials/index.tsx b/packages/console/src/mdx-components/ApplicationCredentials/index.tsx index b52ec1571b1..332fc172d6b 100644 --- a/packages/console/src/mdx-components/ApplicationCredentials/index.tsx +++ b/packages/console/src/mdx-components/ApplicationCredentials/index.tsx @@ -6,7 +6,7 @@ import CopyToClipboard from '@/ds-components/CopyToClipboard'; import FormField from '@/ds-components/FormField'; import TextLink from '@/ds-components/TextLink'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; function ApplicationCredentials() { const { app } = useContext(GuideContext); diff --git a/packages/console/src/mdx-components/DetailsSummary/index.tsx b/packages/console/src/mdx-components/DetailsSummary/index.tsx index d5f5b7c86a7..62ca486b035 100644 --- a/packages/console/src/mdx-components/DetailsSummary/index.tsx +++ b/packages/console/src/mdx-components/DetailsSummary/index.tsx @@ -4,10 +4,10 @@ import { useState, useCallback } from 'react'; import type { Height } from 'react-animate-height'; import AnimateHeight from 'react-animate-height'; -import ArrowRight from '@/assets/icons/triangle-right.svg'; +import ArrowRight from '@/assets/icons/triangle-right.svg?react'; import { onKeyDownHandler } from '@/utils/a11y'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly children?: ReactNode[] | ReactNode; diff --git a/packages/console/src/mdx-components/Mermaid/index.tsx b/packages/console/src/mdx-components/Mermaid/index.tsx index 19164e75345..011e0fad672 100644 --- a/packages/console/src/mdx-components/Mermaid/index.tsx +++ b/packages/console/src/mdx-components/Mermaid/index.tsx @@ -3,6 +3,7 @@ import { noop, yes } from '@silverhand/essentials'; import { type Mermaid as MermaidType } from 'mermaid'; import { useEffect } from 'react'; +import { normalizeEnv } from '@/consts/env'; import useTheme from '@/hooks/use-theme'; /** @@ -14,14 +15,14 @@ const loadMermaid = async () => { // https://github.com/parcel-bundler/parcel/issues/7064#issuecomment-942441649 const uri = 'https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs'; // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment - const imported: { default: MermaidType } = await (process.env.NODE_ENV === 'development' + const imported: { default: MermaidType } = await (import.meta.env.DEV ? // eslint-disable-next-line no-eval -- https://github.com/parcel-bundler/parcel/issues/8316 eval(`import('${uri}')`) : import(uri)); return imported.default; }; -const mermaidPromise = yes(process.env.INTEGRATION_TEST) +const mermaidPromise = yes(normalizeEnv(import.meta.env.INTEGRATION_TEST)) ? // Mock Mermaid in integration tests to avoid issues with network requests and testing environment. Promise.resolve({ initialize: noop, diff --git a/packages/console/src/mdx-components/OidcCallbackUri/index.tsx b/packages/console/src/mdx-components/OidcCallbackUri/index.tsx index 1502cf6a288..71f8af9431d 100644 --- a/packages/console/src/mdx-components/OidcCallbackUri/index.tsx +++ b/packages/console/src/mdx-components/OidcCallbackUri/index.tsx @@ -6,7 +6,7 @@ import CopyToClipboard from '@/ds-components/CopyToClipboard'; import FormField from '@/ds-components/FormField'; import useCustomDomain from '@/hooks/use-custom-domain'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; function OidcCallbackUri() { const { ssoConnector } = useContext(SsoConnectorContext); diff --git a/packages/console/src/mdx-components/Sample/index.tsx b/packages/console/src/mdx-components/Sample/index.tsx index a5a805c93e5..9d734b87b29 100644 --- a/packages/console/src/mdx-components/Sample/index.tsx +++ b/packages/console/src/mdx-components/Sample/index.tsx @@ -7,7 +7,7 @@ import { LinkButton } from '@/ds-components/Button'; import DangerousRaw from '@/ds-components/DangerousRaw'; import Spacer from '@/ds-components/Spacer'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; /** The inline banner for displaying the sample info. */ export default function Sample() { diff --git a/packages/console/src/mdx-components/SsoSamlSpMetadata/index.tsx b/packages/console/src/mdx-components/SsoSamlSpMetadata/index.tsx index 38de02ff236..3d04c6110cc 100644 --- a/packages/console/src/mdx-components/SsoSamlSpMetadata/index.tsx +++ b/packages/console/src/mdx-components/SsoSamlSpMetadata/index.tsx @@ -5,7 +5,7 @@ import { SsoConnectorContext } from '@/contexts/SsoConnectorContextProvider'; import CopyToClipboard from '@/ds-components/CopyToClipboard'; import FormField from '@/ds-components/FormField'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; // Basic SAML SP config metadata, @see `packages/core/sso/src/types/saml` const samlServiceProviderMetadataGuard = z.object({ diff --git a/packages/console/src/mdx-components/Step/index.tsx b/packages/console/src/mdx-components/Step/index.tsx index 74b8029a7d6..2e7f73084ec 100644 --- a/packages/console/src/mdx-components/Step/index.tsx +++ b/packages/console/src/mdx-components/Step/index.tsx @@ -4,7 +4,7 @@ import Index from '@/components/Index'; import CardTitle from '@/ds-components/CardTitle'; import DangerousRaw from '@/ds-components/DangerousRaw'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; export type Props = { readonly index?: number; diff --git a/packages/console/src/mdx-components/Steps/index.tsx b/packages/console/src/mdx-components/Steps/index.tsx index 0f60f779e59..1d6a959723c 100644 --- a/packages/console/src/mdx-components/Steps/index.tsx +++ b/packages/console/src/mdx-components/Steps/index.tsx @@ -11,7 +11,7 @@ import { type Props as StepProps } from '../Step'; import Step from '../Step'; import FurtherReadings from './FurtherReadings'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly children: diff --git a/packages/console/src/mdx-components/Tabs/index.tsx b/packages/console/src/mdx-components/Tabs/index.tsx index 4883b684697..7903aadb447 100644 --- a/packages/console/src/mdx-components/Tabs/index.tsx +++ b/packages/console/src/mdx-components/Tabs/index.tsx @@ -11,7 +11,7 @@ import { useState, isValidElement, type ReactElement, cloneElement, useRef, Chil import type { Props as TabItemProps } from '../TabItem'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type MaybeArray = T | T[]; diff --git a/packages/console/src/mdx-components/UriInputField/index.tsx b/packages/console/src/mdx-components/UriInputField/index.tsx index 36cd2d3000d..f38915c770c 100644 --- a/packages/console/src/mdx-components/UriInputField/index.tsx +++ b/packages/console/src/mdx-components/UriInputField/index.tsx @@ -26,7 +26,7 @@ import type { import { trySubmitSafe } from '@/utils/form'; import { uriValidator } from '@/utils/validator'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; const nameToKey: Record = Object.freeze({ redirectUris: 'application_details.redirect_uri', diff --git a/packages/console/src/onboarding/components/CardSelector/MultiCardSelector/CardItem.tsx b/packages/console/src/onboarding/components/CardSelector/MultiCardSelector/CardItem.tsx index 96061a0ed49..8e16db8dbea 100644 --- a/packages/console/src/onboarding/components/CardSelector/MultiCardSelector/CardItem.tsx +++ b/packages/console/src/onboarding/components/CardSelector/MultiCardSelector/CardItem.tsx @@ -7,7 +7,7 @@ import { onKeyDownHandler } from '@/utils/a11y'; import type { MultiCardSelectorOption } from '../types'; -import * as styles from './CardItem.module.scss'; +import styles from './CardItem.module.scss'; type Props = { readonly option: MultiCardSelectorOption; diff --git a/packages/console/src/onboarding/components/CardSelector/MultiCardSelector/index.tsx b/packages/console/src/onboarding/components/CardSelector/MultiCardSelector/index.tsx index 6ae19a295d2..7ed883c2a96 100644 --- a/packages/console/src/onboarding/components/CardSelector/MultiCardSelector/index.tsx +++ b/packages/console/src/onboarding/components/CardSelector/MultiCardSelector/index.tsx @@ -3,7 +3,7 @@ import classNames from 'classnames'; import type { MultiCardSelectorOption } from '../types'; import CardItem from './CardItem'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly options: MultiCardSelectorOption[]; diff --git a/packages/console/src/onboarding/components/DemoConnectorNotice/index.tsx b/packages/console/src/onboarding/components/DemoConnectorNotice/index.tsx index c59f133c0f8..4ea1aa2e64e 100644 --- a/packages/console/src/onboarding/components/DemoConnectorNotice/index.tsx +++ b/packages/console/src/onboarding/components/DemoConnectorNotice/index.tsx @@ -2,7 +2,7 @@ import { useTranslation } from 'react-i18next'; import InlineNotification from '@/ds-components/InlineNotification'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; function DemoConnectorNotice() { const { t } = useTranslation(undefined, { keyPrefix: 'admin_console' }); diff --git a/packages/console/src/onboarding/components/Topbar/index.tsx b/packages/console/src/onboarding/components/Topbar/index.tsx index 07c7de8e637..679f6b4686e 100644 --- a/packages/console/src/onboarding/components/Topbar/index.tsx +++ b/packages/console/src/onboarding/components/Topbar/index.tsx @@ -1,6 +1,6 @@ -import CloudLogo from '@/assets/images/cloud-logo.svg'; +import CloudLogo from '@/assets/images/cloud-logo.svg?react'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; function Topbar() { return ( diff --git a/packages/console/src/onboarding/index.tsx b/packages/console/src/onboarding/index.tsx index 6794d0321d6..dd03850f0ed 100644 --- a/packages/console/src/onboarding/index.tsx +++ b/packages/console/src/onboarding/index.tsx @@ -9,7 +9,7 @@ import { usePlausiblePageview } from '@/hooks/use-plausible-pageview'; import Topbar from './components/Topbar'; import useUserOnboardingData from './hooks/use-user-onboarding-data'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; import CreateTenant from './pages/CreateTenant'; import SignInExperience from './pages/SignInExperience'; import Welcome from './pages/Welcome'; diff --git a/packages/console/src/onboarding/pages/CreateTenant/index.tsx b/packages/console/src/onboarding/pages/CreateTenant/index.tsx index a06a9731f40..02b4a3584c8 100644 --- a/packages/console/src/onboarding/pages/CreateTenant/index.tsx +++ b/packages/console/src/onboarding/pages/CreateTenant/index.tsx @@ -7,8 +7,8 @@ import { Controller, FormProvider, useForm } from 'react-hook-form'; import { toast } from 'react-hot-toast'; import { useTranslation } from 'react-i18next'; -import CreateTenantHeaderIconDark from '@/assets/icons/create-tenant-header-dark.svg'; -import CreateTenantHeaderIcon from '@/assets/icons/create-tenant-header.svg'; +import CreateTenantHeaderIconDark from '@/assets/icons/create-tenant-header-dark.svg?react'; +import CreateTenantHeaderIcon from '@/assets/icons/create-tenant-header.svg?react'; import { createTenantApi, useCloudApi } from '@/cloud/hooks/use-cloud-api'; import ActionBar from '@/components/ActionBar'; import { type CreateTenantData } from '@/components/CreateTenantModal/types'; @@ -23,7 +23,7 @@ import RadioGroup, { Radio } from '@/ds-components/RadioGroup'; import TextInput from '@/ds-components/TextInput'; import useTenantPathname from '@/hooks/use-tenant-pathname'; import useTheme from '@/hooks/use-theme'; -import * as pageLayout from '@/onboarding/scss/layout.module.scss'; +import pageLayout from '@/onboarding/scss/layout.module.scss'; import { OnboardingPage, OnboardingRoute } from '@/onboarding/types'; import InviteEmailsInput from '@/pages/TenantSettings/TenantMembers/InviteEmailsInput'; import { type InviteeEmailItem } from '@/pages/TenantSettings/TenantMembers/types'; diff --git a/packages/console/src/onboarding/pages/SignInExperience/InspireMe/index.tsx b/packages/console/src/onboarding/pages/SignInExperience/InspireMe/index.tsx index 2133f3bfb4c..e0c9c76cabd 100644 --- a/packages/console/src/onboarding/pages/SignInExperience/InspireMe/index.tsx +++ b/packages/console/src/onboarding/pages/SignInExperience/InspireMe/index.tsx @@ -2,15 +2,15 @@ import { ConnectorType } from '@logto/connector-kit'; import { useState } from 'react'; import { useTranslation } from 'react-i18next'; -import Bulb from '@/assets/icons/bulb.svg'; -import LightBulb from '@/assets/icons/light-bulb.svg'; +import Bulb from '@/assets/icons/bulb.svg?react'; +import LightBulb from '@/assets/icons/light-bulb.svg?react'; import Button from '@/ds-components/Button'; import useConnectorGroups from '@/hooks/use-connector-groups'; import { randomSieFormDataTemplate } from '../sie-config-templates'; import { type OnboardingSieFormData } from '../types'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly onInspired: (template: OnboardingSieFormData) => void; diff --git a/packages/console/src/onboarding/pages/SignInExperience/Preview/PlatformTabs/PlatformTab.tsx b/packages/console/src/onboarding/pages/SignInExperience/Preview/PlatformTabs/PlatformTab.tsx index a81784891e5..236faf46dcc 100644 --- a/packages/console/src/onboarding/pages/SignInExperience/Preview/PlatformTabs/PlatformTab.tsx +++ b/packages/console/src/onboarding/pages/SignInExperience/Preview/PlatformTabs/PlatformTab.tsx @@ -6,7 +6,7 @@ import type { PreviewPlatform } from '@/components/SignInExperiencePreview/types import DynamicT from '@/ds-components/DynamicT'; import { onKeyDownHandler } from '@/utils/a11y'; -import * as styles from './PlatformTab.module.scss'; +import styles from './PlatformTab.module.scss'; type Props = { readonly isSelected: boolean; diff --git a/packages/console/src/onboarding/pages/SignInExperience/Preview/PlatformTabs/index.tsx b/packages/console/src/onboarding/pages/SignInExperience/Preview/PlatformTabs/index.tsx index 3badf5756ff..69361da1919 100644 --- a/packages/console/src/onboarding/pages/SignInExperience/Preview/PlatformTabs/index.tsx +++ b/packages/console/src/onboarding/pages/SignInExperience/Preview/PlatformTabs/index.tsx @@ -1,9 +1,9 @@ -import Native from '@/assets/icons/connector-platform-icon-native.svg'; -import Web from '@/assets/icons/connector-platform-icon-web.svg'; +import Native from '@/assets/icons/connector-platform-icon-native.svg?react'; +import Web from '@/assets/icons/connector-platform-icon-web.svg?react'; import { PreviewPlatform } from '@/components/SignInExperiencePreview/types'; import PlatformTab from './PlatformTab'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly currentTab: PreviewPlatform; diff --git a/packages/console/src/onboarding/pages/SignInExperience/Preview/index.tsx b/packages/console/src/onboarding/pages/SignInExperience/Preview/index.tsx index 8a920b85df6..b7537ca6dae 100644 --- a/packages/console/src/onboarding/pages/SignInExperience/Preview/index.tsx +++ b/packages/console/src/onboarding/pages/SignInExperience/Preview/index.tsx @@ -7,7 +7,7 @@ import SignInExperiencePreview from '@/components/SignInExperiencePreview'; import { PreviewPlatform } from '@/components/SignInExperiencePreview/types'; import PlatformTabs from './PlatformTabs'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly signInExperience?: SignInExperience; diff --git a/packages/console/src/onboarding/pages/SignInExperience/Skeleton/index.tsx b/packages/console/src/onboarding/pages/SignInExperience/Skeleton/index.tsx index 49fc7f2e098..bf6a24cbd95 100644 --- a/packages/console/src/onboarding/pages/SignInExperience/Skeleton/index.tsx +++ b/packages/console/src/onboarding/pages/SignInExperience/Skeleton/index.tsx @@ -1,8 +1,8 @@ -import * as pageLayout from '@/onboarding/scss/layout.module.scss'; +import pageLayout from '@/onboarding/scss/layout.module.scss'; -import * as sieLayout from '../index.module.scss'; +import sieLayout from '../index.module.scss'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; function Skeleton() { return ( diff --git a/packages/console/src/onboarding/pages/SignInExperience/index.tsx b/packages/console/src/onboarding/pages/SignInExperience/index.tsx index e0579ef891e..822b45025d2 100644 --- a/packages/console/src/onboarding/pages/SignInExperience/index.tsx +++ b/packages/console/src/onboarding/pages/SignInExperience/index.tsx @@ -7,7 +7,7 @@ import { useTranslation } from 'react-i18next'; import { useParams } from 'react-router-dom'; import useSWR, { SWRConfig } from 'swr'; -import Tools from '@/assets/icons/tools.svg'; +import Tools from '@/assets/icons/tools.svg?react'; import ActionBar from '@/components/ActionBar'; import { GtagConversionId, reportConversion } from '@/components/Conversion/utils'; import PageMeta from '@/components/PageMeta'; @@ -26,7 +26,7 @@ import useTenantApi from '@/onboarding/hooks/use-tenant-api'; import useTenantSwrOptions from '@/onboarding/hooks/use-tenant-swr-options'; import useTenantUserAssetsService from '@/onboarding/hooks/use-tenant-user-asset-service'; import useUserOnboardingData from '@/onboarding/hooks/use-user-onboarding-data'; -import * as pageLayout from '@/onboarding/scss/layout.module.scss'; +import pageLayout from '@/onboarding/scss/layout.module.scss'; import { trySubmitSafe } from '@/utils/form'; import { buildUrl } from '@/utils/url'; import { uriValidator } from '@/utils/validator'; @@ -36,7 +36,7 @@ import Preview from './Preview'; import Skeleton from './Skeleton'; import SocialSelector from './SocialSelector'; import { formDataParser } from './form-data-parser'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; import { authenticationOptions, identifierOptions } from './options'; import { defaultOnboardingSieFormData } from './sie-config-templates'; import { Authentication, type OnboardingSieFormData } from './types'; diff --git a/packages/console/src/onboarding/pages/SignInExperience/options.tsx b/packages/console/src/onboarding/pages/SignInExperience/options.tsx index fcd4a588922..00af0e1693b 100644 --- a/packages/console/src/onboarding/pages/SignInExperience/options.tsx +++ b/packages/console/src/onboarding/pages/SignInExperience/options.tsx @@ -1,20 +1,20 @@ import { SignInIdentifier } from '@logto/schemas'; -import Envelop from '@/assets/icons/envelop.svg'; -import Keyboard from '@/assets/icons/keyboard.svg'; -import Label from '@/assets/icons/label.svg'; -import Lock from '@/assets/icons/lock.svg'; +import Envelop from '@/assets/icons/envelop.svg?react'; +import Keyboard from '@/assets/icons/keyboard.svg?react'; +import Label from '@/assets/icons/label.svg?react'; +import Lock from '@/assets/icons/lock.svg?react'; import DangerousRaw from '@/ds-components/DangerousRaw'; import type { MultiCardSelectorOption, CardSelectorOption, } from '@/onboarding/components/CardSelector'; -import Apple from '../../assets/icons/social-apple.svg'; -import Facebook from '../../assets/icons/social-facebook.svg'; -import Kakao from '../../assets/icons/social-kakao.svg'; -import Microsoft from '../../assets/icons/social-microsoft.svg'; -import Oidc from '../../assets/icons/social-oidc.svg'; +import Apple from '../../assets/icons/social-apple.svg?react'; +import Facebook from '../../assets/icons/social-facebook.svg?react'; +import Kakao from '../../assets/icons/social-kakao.svg?react'; +import Microsoft from '../../assets/icons/social-microsoft.svg?react'; +import Oidc from '../../assets/icons/social-oidc.svg?react'; import { Authentication } from './types'; diff --git a/packages/console/src/onboarding/pages/Welcome/index.tsx b/packages/console/src/onboarding/pages/Welcome/index.tsx index df471ab276f..c22d207aca4 100644 --- a/packages/console/src/onboarding/pages/Welcome/index.tsx +++ b/packages/console/src/onboarding/pages/Welcome/index.tsx @@ -5,7 +5,7 @@ import { Controller, useForm } from 'react-hook-form'; import { useTranslation } from 'react-i18next'; import { useNavigate } from 'react-router-dom'; -import Case from '@/assets/icons/case.svg'; +import Case from '@/assets/icons/case.svg?react'; import ActionBar from '@/components/ActionBar'; import PageMeta from '@/components/PageMeta'; import Button from '@/ds-components/Button'; @@ -13,14 +13,14 @@ import FormField from '@/ds-components/FormField'; import OverlayScrollbar from '@/ds-components/OverlayScrollbar'; import TextInput from '@/ds-components/TextInput'; import useUserOnboardingData from '@/onboarding/hooks/use-user-onboarding-data'; -import * as pageLayout from '@/onboarding/scss/layout.module.scss'; +import pageLayout from '@/onboarding/scss/layout.module.scss'; import { trySubmitSafe } from '@/utils/form'; import { CardSelector, MultiCardSelector } from '../../components/CardSelector'; import { OnboardingPage } from '../../types'; import { getOnboardingPage } from '../../utils'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; import { stageOptions, additionalFeaturesOptions, projectOptions } from './options'; function Welcome() { diff --git a/packages/console/src/onboarding/pages/Welcome/options.tsx b/packages/console/src/onboarding/pages/Welcome/options.tsx index f2b1a8ad936..4a3283a1396 100644 --- a/packages/console/src/onboarding/pages/Welcome/options.tsx +++ b/packages/console/src/onboarding/pages/Welcome/options.tsx @@ -1,7 +1,7 @@ import { AdditionalFeatures, Project, Stage } from '@logto/schemas'; -import Building from '@/assets/icons/building.svg'; -import Pizza from '@/assets/icons/pizza.svg'; +import Building from '@/assets/icons/building.svg?react'; +import Pizza from '@/assets/icons/pizza.svg?react'; import type { CardSelectorOption, MultiCardSelectorOption, diff --git a/packages/console/src/pages/AcceptInvitation/SwitchAccount/index.tsx b/packages/console/src/pages/AcceptInvitation/SwitchAccount/index.tsx index d7fc9d094a4..5de4edf8f84 100644 --- a/packages/console/src/pages/AcceptInvitation/SwitchAccount/index.tsx +++ b/packages/console/src/pages/AcceptInvitation/SwitchAccount/index.tsx @@ -1,11 +1,11 @@ import { useTranslation } from 'react-i18next'; -import Logo from '@/assets/images/logo.svg'; +import Logo from '@/assets/images/logo.svg?react'; import AppLoading from '@/components/AppLoading'; import Button from '@/ds-components/Button'; import useCurrentUser from '@/hooks/use-current-user'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly onClickSwitch: () => void; diff --git a/packages/console/src/pages/ApiResourceDetails/ApiResourcePermissions/components/CreatePermissionModal/index.tsx b/packages/console/src/pages/ApiResourceDetails/ApiResourcePermissions/components/CreatePermissionModal/index.tsx index eb90aa05bc7..cdf79f74d8f 100644 --- a/packages/console/src/pages/ApiResourceDetails/ApiResourcePermissions/components/CreatePermissionModal/index.tsx +++ b/packages/console/src/pages/ApiResourceDetails/ApiResourcePermissions/components/CreatePermissionModal/index.tsx @@ -14,7 +14,7 @@ import FormField from '@/ds-components/FormField'; import ModalLayout from '@/ds-components/ModalLayout'; import TextInput from '@/ds-components/TextInput'; import useApi from '@/hooks/use-api'; -import * as modalStyles from '@/scss/modal.module.scss'; +import modalStyles from '@/scss/modal.module.scss'; import { trySubmitSafe } from '@/utils/form'; import { hasReachedQuotaLimit } from '@/utils/quota'; diff --git a/packages/console/src/pages/ApiResourceDetails/components/GuideDrawer/index.tsx b/packages/console/src/pages/ApiResourceDetails/components/GuideDrawer/index.tsx index 681916d5b6a..299516669f8 100644 --- a/packages/console/src/pages/ApiResourceDetails/components/GuideDrawer/index.tsx +++ b/packages/console/src/pages/ApiResourceDetails/components/GuideDrawer/index.tsx @@ -2,8 +2,8 @@ import { type Resource } from '@logto/schemas'; import { useState } from 'react'; import { useTranslation } from 'react-i18next'; -import ArrowLeft from '@/assets/icons/arrow-left.svg'; -import Close from '@/assets/icons/close.svg'; +import ArrowLeft from '@/assets/icons/arrow-left.svg?react'; +import Close from '@/assets/icons/close.svg?react'; import { type SelectedGuide } from '@/components/Guide/GuideCard'; import GuideCardGroup from '@/components/Guide/GuideCardGroup'; import { useApiGuideMetadata } from '@/components/Guide/hooks'; @@ -12,7 +12,7 @@ import Spacer from '@/ds-components/Spacer'; import ApiGuide from '../ApiGuide'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly apiResource: Resource; diff --git a/packages/console/src/pages/ApiResourceDetails/components/GuideModal/index.tsx b/packages/console/src/pages/ApiResourceDetails/components/GuideModal/index.tsx index 18b391ed3e4..d0aeb108ae7 100644 --- a/packages/console/src/pages/ApiResourceDetails/components/GuideModal/index.tsx +++ b/packages/console/src/pages/ApiResourceDetails/components/GuideModal/index.tsx @@ -2,11 +2,11 @@ import { type Resource } from '@logto/schemas'; import Modal from 'react-modal'; import ModalHeader from '@/components/Guide/ModalHeader'; -import * as modalStyles from '@/scss/modal.module.scss'; +import modalStyles from '@/scss/modal.module.scss'; import ApiGuide from '../ApiGuide'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly guideId: string; diff --git a/packages/console/src/pages/ApiResourceDetails/index.tsx b/packages/console/src/pages/ApiResourceDetails/index.tsx index 5e697217192..7dc16dccae5 100644 --- a/packages/console/src/pages/ApiResourceDetails/index.tsx +++ b/packages/console/src/pages/ApiResourceDetails/index.tsx @@ -8,12 +8,12 @@ import { Trans, useTranslation } from 'react-i18next'; import { Outlet, useLocation, useParams } from 'react-router-dom'; import useSWR from 'swr'; -import ApiResourceDark from '@/assets/icons/api-resource-dark.svg'; -import ApiResource from '@/assets/icons/api-resource.svg'; -import Delete from '@/assets/icons/delete.svg'; -import File from '@/assets/icons/file.svg'; -import ManagementApiResourceDark from '@/assets/icons/management-api-resource-dark.svg'; -import ManagementApiResource from '@/assets/icons/management-api-resource.svg'; +import ApiResourceDark from '@/assets/icons/api-resource-dark.svg?react'; +import ApiResource from '@/assets/icons/api-resource.svg?react'; +import Delete from '@/assets/icons/delete.svg?react'; +import File from '@/assets/icons/file.svg?react'; +import ManagementApiResourceDark from '@/assets/icons/management-api-resource-dark.svg?react'; +import ManagementApiResource from '@/assets/icons/management-api-resource.svg?react'; import DetailsPage from '@/components/DetailsPage'; import DetailsPageHeader, { type MenuItem } from '@/components/DetailsPage/DetailsPageHeader'; import Drawer from '@/components/Drawer'; @@ -30,7 +30,7 @@ import useTheme from '@/hooks/use-theme'; import GuideDrawer from './components/GuideDrawer'; import GuideModal from './components/GuideModal'; import ManagementApiNotice from './components/ManagementApiNotice'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; import { type ApiResourceDetailsOutletContext } from './types'; const icons = { diff --git a/packages/console/src/pages/ApiResources/components/CreateForm/index.tsx b/packages/console/src/pages/ApiResources/components/CreateForm/index.tsx index b19cc76de5b..911196a813f 100644 --- a/packages/console/src/pages/ApiResources/components/CreateForm/index.tsx +++ b/packages/console/src/pages/ApiResources/components/CreateForm/index.tsx @@ -10,7 +10,7 @@ import ModalLayout from '@/ds-components/ModalLayout'; import TextInput from '@/ds-components/TextInput'; import TextLink from '@/ds-components/TextLink'; import useApi from '@/hooks/use-api'; -import * as modalStyles from '@/scss/modal.module.scss'; +import modalStyles from '@/scss/modal.module.scss'; import { trySubmitSafe } from '@/utils/form'; import Footer from './Footer'; diff --git a/packages/console/src/pages/ApiResources/components/GuideLibrary/index.tsx b/packages/console/src/pages/ApiResources/components/GuideLibrary/index.tsx index 438f1a6a4b6..ce7cdb0b705 100644 --- a/packages/console/src/pages/ApiResources/components/GuideLibrary/index.tsx +++ b/packages/console/src/pages/ApiResources/components/GuideLibrary/index.tsx @@ -11,7 +11,7 @@ import useTenantPathname from '@/hooks/use-tenant-pathname'; import CreateForm from '../CreateForm'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly className?: string; diff --git a/packages/console/src/pages/ApiResources/components/GuideLibraryModal/index.tsx b/packages/console/src/pages/ApiResources/components/GuideLibraryModal/index.tsx index 264dedd9f36..369e48f87f0 100644 --- a/packages/console/src/pages/ApiResources/components/GuideLibraryModal/index.tsx +++ b/packages/console/src/pages/ApiResources/components/GuideLibraryModal/index.tsx @@ -4,12 +4,12 @@ import Modal from 'react-modal'; import ModalFooter from '@/components/Guide/ModalFooter'; import ModalHeader from '@/components/Guide/ModalHeader'; import useTenantPathname from '@/hooks/use-tenant-pathname'; -import * as modalStyles from '@/scss/modal.module.scss'; +import modalStyles from '@/scss/modal.module.scss'; import CreateForm from '../CreateForm'; import GuideLibrary from '../GuideLibrary'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly isOpen: boolean; diff --git a/packages/console/src/pages/ApiResources/index.tsx b/packages/console/src/pages/ApiResources/index.tsx index ec680119cc4..a9aafb15660 100644 --- a/packages/console/src/pages/ApiResources/index.tsx +++ b/packages/console/src/pages/ApiResources/index.tsx @@ -4,10 +4,10 @@ import { useTranslation } from 'react-i18next'; import { useLocation } from 'react-router-dom'; import useSWR from 'swr'; -import ApiResourceDark from '@/assets/icons/api-resource-dark.svg'; -import ApiResource from '@/assets/icons/api-resource.svg'; -import ManagementApiResourceDark from '@/assets/icons/management-api-resource-dark.svg'; -import ManagementApiResource from '@/assets/icons/management-api-resource.svg'; +import ApiResourceDark from '@/assets/icons/api-resource-dark.svg?react'; +import ApiResource from '@/assets/icons/api-resource.svg?react'; +import ManagementApiResourceDark from '@/assets/icons/management-api-resource-dark.svg?react'; +import ManagementApiResource from '@/assets/icons/management-api-resource.svg?react'; import ChargeNotification from '@/components/ChargeNotification'; import EmptyDataPlaceholder from '@/components/EmptyDataPlaceholder'; import ItemPreview from '@/components/ItemPreview'; @@ -25,7 +25,7 @@ import useTheme from '@/hooks/use-theme'; import { buildUrl } from '@/utils/url'; import GuideLibraryModal from './components/GuideLibraryModal'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; const pageSize = defaultPageSize; const apiResourcesPathname = '/api-resources'; diff --git a/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/Branding/index.tsx b/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/Branding/index.tsx index 7ff5d422e9d..910bf0bb6ec 100644 --- a/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/Branding/index.tsx +++ b/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/Branding/index.tsx @@ -28,7 +28,7 @@ import { emptyBranding } from '@/types/sign-in-experience'; import { trySubmitSafe } from '@/utils/form'; import { uriValidator } from '@/utils/validator'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; import useApplicationSignInExperienceSWR from './use-application-sign-in-experience-swr'; import useSignInExperienceSWR from './use-sign-in-experience-swr'; import { type ApplicationSignInExperienceForm, formatFormToSubmitData } from './utils'; diff --git a/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/CreateSecretModal.tsx b/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/CreateSecretModal.tsx index d50e34ac301..c548dd8fef3 100644 --- a/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/CreateSecretModal.tsx +++ b/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/CreateSecretModal.tsx @@ -13,7 +13,7 @@ import ModalLayout from '@/ds-components/ModalLayout'; import Select from '@/ds-components/Select'; import TextInput from '@/ds-components/TextInput'; import useApi from '@/hooks/use-api'; -import * as modalStyles from '@/scss/modal.module.scss'; +import modalStyles from '@/scss/modal.module.scss'; import { trySubmitSafe } from '@/utils/form'; type FormData = { name: string; expiration: string }; diff --git a/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/EndpointsAndCredentials.tsx b/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/EndpointsAndCredentials.tsx index 8fde0ff6678..512131c31d2 100644 --- a/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/EndpointsAndCredentials.tsx +++ b/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/EndpointsAndCredentials.tsx @@ -11,10 +11,10 @@ import { useCallback, useContext, useMemo, useState } from 'react'; import { Trans, useTranslation } from 'react-i18next'; import useSWR from 'swr'; -import CaretDown from '@/assets/icons/caret-down.svg'; -import CaretUp from '@/assets/icons/caret-up.svg'; -import CirclePlus from '@/assets/icons/circle-plus.svg'; -import Plus from '@/assets/icons/plus.svg'; +import CaretDown from '@/assets/icons/caret-down.svg?react'; +import CaretUp from '@/assets/icons/caret-up.svg?react'; +import CirclePlus from '@/assets/icons/circle-plus.svg?react'; +import Plus from '@/assets/icons/plus.svg?react'; import ActionsButton from '@/components/ActionsButton'; import FormCard from '@/components/FormCard'; import { isDevFeaturesEnabled } from '@/consts/env'; @@ -31,7 +31,7 @@ import useApi, { type RequestError } from '@/hooks/use-api'; import useCustomDomain from '@/hooks/use-custom-domain'; import CreateSecretModal from './CreateSecretModal'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; const isLegacySecret = (secret: string) => !secret.startsWith(internalPrefix); diff --git a/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/GuideDrawer/index.tsx b/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/GuideDrawer/index.tsx index 594c24bd0bd..4c078f476aa 100644 --- a/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/GuideDrawer/index.tsx +++ b/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/GuideDrawer/index.tsx @@ -2,8 +2,8 @@ import { type ApplicationResponse } from '@logto/schemas'; import { useEffect, useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; -import ArrowLeft from '@/assets/icons/arrow-left.svg'; -import Close from '@/assets/icons/close.svg'; +import ArrowLeft from '@/assets/icons/arrow-left.svg?react'; +import Close from '@/assets/icons/close.svg?react'; import { type SelectedGuide } from '@/components/Guide/GuideCard'; import GuideCardGroup from '@/components/Guide/GuideCardGroup'; import { useAppGuideMetadata } from '@/components/Guide/hooks'; @@ -12,7 +12,7 @@ import Spacer from '@/ds-components/Spacer'; import AppGuide from '../../components/AppGuide'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly app: ApplicationResponse; diff --git a/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/MachineLogs/index.tsx b/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/MachineLogs/index.tsx index 3651509e2d8..885b252bba5 100644 --- a/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/MachineLogs/index.tsx +++ b/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/MachineLogs/index.tsx @@ -1,6 +1,6 @@ import AuditLogTable from '@/components/AuditLogTable'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly applicationId: string }; diff --git a/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/MachineToMachineApplicationRoles/index.tsx b/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/MachineToMachineApplicationRoles/index.tsx index e65c1f84b88..a4251cb434b 100644 --- a/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/MachineToMachineApplicationRoles/index.tsx +++ b/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/MachineToMachineApplicationRoles/index.tsx @@ -6,8 +6,8 @@ import { toast } from 'react-hot-toast'; import { useTranslation } from 'react-i18next'; import useSWR from 'swr'; -import Delete from '@/assets/icons/delete.svg'; -import Plus from '@/assets/icons/plus.svg'; +import Delete from '@/assets/icons/delete.svg?react'; +import Plus from '@/assets/icons/plus.svg?react'; import EmptyDataPlaceholder from '@/components/EmptyDataPlaceholder'; import ItemPreview from '@/components/ItemPreview'; import RoleAssignmentModal from '@/components/RoleAssignmentModal'; @@ -25,7 +25,7 @@ import useSearchParametersWatcher from '@/hooks/use-search-parameters-watcher'; import useTheme from '@/hooks/use-theme'; import { buildUrl, formatSearchKeyword } from '@/utils/url'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; const pageSize = defaultPageSize; diff --git a/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/Permissions/PermissionsCard/ApplicationScopesManagementModal/index.tsx b/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/Permissions/PermissionsCard/ApplicationScopesManagementModal/index.tsx index 47f952efcad..2831f5a798b 100644 --- a/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/Permissions/PermissionsCard/ApplicationScopesManagementModal/index.tsx +++ b/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/Permissions/PermissionsCard/ApplicationScopesManagementModal/index.tsx @@ -11,7 +11,7 @@ import ModalLayout from '@/ds-components/ModalLayout'; import TextInput from '@/ds-components/TextInput'; import useActionTranslation from '@/hooks/use-action-translation'; import useApi from '@/hooks/use-api'; -import * as modalStyles from '@/scss/modal.module.scss'; +import modalStyles from '@/scss/modal.module.scss'; import { trySubmitSafe } from '@/utils/form'; import { type ScopesTableRowDataType, type UserScopeTableRowDataType } from '../use-scopes-table'; diff --git a/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/Permissions/PermissionsCard/index.tsx b/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/Permissions/PermissionsCard/index.tsx index 82a33fa4956..dcb7cac9e4b 100644 --- a/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/Permissions/PermissionsCard/index.tsx +++ b/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/Permissions/PermissionsCard/index.tsx @@ -22,7 +22,7 @@ import { ScopeLevel } from './ApplicationScopesAssignmentModal/type'; import ApplicationScopesManagementModal, { type EditableScopeData, } from './ApplicationScopesManagementModal'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; import useScopesTable from './use-scopes-table'; type Props = { diff --git a/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/Permissions/PermissionsCard/use-scopes-table.tsx b/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/Permissions/PermissionsCard/use-scopes-table.tsx index 19cfb566245..c19a56354bb 100644 --- a/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/Permissions/PermissionsCard/use-scopes-table.tsx +++ b/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/Permissions/PermissionsCard/use-scopes-table.tsx @@ -7,12 +7,12 @@ import { import { useCallback, type ReactNode } from 'react'; import { useTranslation } from 'react-i18next'; -import Tip from '@/assets/icons/tip.svg'; +import Tip from '@/assets/icons/tip.svg?react'; import IconButton from '@/ds-components/IconButton'; import { ToggleTip } from '@/ds-components/Tip'; import useApi from '@/hooks/use-api'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; export type UserScopeTableRowDataType = { type: ApplicationUserConsentScopeType.UserScopes; diff --git a/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/Permissions/index.tsx b/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/Permissions/index.tsx index 92edc9f090a..a7bee8c021d 100644 --- a/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/Permissions/index.tsx +++ b/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/Permissions/index.tsx @@ -2,7 +2,7 @@ import { type Application } from '@logto/schemas'; import PermissionsCard from './PermissionsCard'; import { ScopeLevel } from './PermissionsCard/ApplicationScopesAssignmentModal/type'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly application: Application; diff --git a/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/ProtectedAppSettings/components/SessionForm.tsx b/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/ProtectedAppSettings/components/SessionForm.tsx index cdf985ac17f..c927251801b 100644 --- a/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/ProtectedAppSettings/components/SessionForm.tsx +++ b/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/ProtectedAppSettings/components/SessionForm.tsx @@ -11,7 +11,7 @@ import { type RequestError } from '@/hooks/use-api'; import { type ApplicationForm } from '../../utils'; -import * as styles from './SessionForm.module.scss'; +import styles from './SessionForm.module.scss'; type Props = { readonly data: Application; diff --git a/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/ProtectedAppSettings/index.tsx b/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/ProtectedAppSettings/index.tsx index 6fe5215b12d..ac96e6ea965 100644 --- a/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/ProtectedAppSettings/index.tsx +++ b/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/ProtectedAppSettings/index.tsx @@ -13,7 +13,7 @@ import { Trans, useTranslation } from 'react-i18next'; import useSWR from 'swr'; import useSWRImmutable from 'swr/immutable'; -import ExternalLinkIcon from '@/assets/icons/external-link.svg'; +import ExternalLinkIcon from '@/assets/icons/external-link.svg?react'; import DomainStatusTag from '@/components/DomainStatusTag'; import FormCard from '@/components/FormCard'; import OpenExternalLink from '@/components/OpenExternalLink'; @@ -35,7 +35,7 @@ import EndpointsAndCredentials from '../EndpointsAndCredentials'; import { type ApplicationForm } from '../utils'; import SessionForm from './components/SessionForm'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly data: Application; diff --git a/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/index.tsx b/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/index.tsx index f8186e9ad67..367a4868393 100644 --- a/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/index.tsx +++ b/packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/index.tsx @@ -9,8 +9,8 @@ import { toast } from 'react-hot-toast'; import { Trans, useTranslation } from 'react-i18next'; import { useParams } from 'react-router-dom'; -import Delete from '@/assets/icons/delete.svg'; -import File from '@/assets/icons/file.svg'; +import Delete from '@/assets/icons/delete.svg?react'; +import File from '@/assets/icons/file.svg?react'; import ApplicationIcon from '@/components/ApplicationIcon'; import DetailsForm from '@/components/DetailsForm'; import DetailsPageHeader from '@/components/DetailsPage/DetailsPageHeader'; @@ -39,7 +39,7 @@ import MachineToMachineApplicationRoles from './MachineToMachineApplicationRoles import Permissions from './Permissions'; import RefreshTokenSettings from './RefreshTokenSettings'; import Settings from './Settings'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; import { type ApplicationForm, applicationFormDataParser } from './utils'; type Props = { diff --git a/packages/console/src/pages/ApplicationDetails/GuideModal/index.tsx b/packages/console/src/pages/ApplicationDetails/GuideModal/index.tsx index bf877fc8606..7408ddaae1d 100644 --- a/packages/console/src/pages/ApplicationDetails/GuideModal/index.tsx +++ b/packages/console/src/pages/ApplicationDetails/GuideModal/index.tsx @@ -2,11 +2,11 @@ import type { ApplicationResponse } from '@logto/schemas'; import Modal from 'react-modal'; import ModalHeader from '@/components/Guide/ModalHeader'; -import * as modalStyles from '@/scss/modal.module.scss'; +import modalStyles from '@/scss/modal.module.scss'; import AppGuide from '../components/AppGuide'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly guideId: string; diff --git a/packages/console/src/pages/Applications/components/GuideLibrary/index.tsx b/packages/console/src/pages/Applications/components/GuideLibrary/index.tsx index daa96d3b30e..ae447d9fcd7 100644 --- a/packages/console/src/pages/Applications/components/GuideLibrary/index.tsx +++ b/packages/console/src/pages/Applications/components/GuideLibrary/index.tsx @@ -5,7 +5,7 @@ import { useCallback, useContext, useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { useLocation } from 'react-router-dom'; -import SearchIcon from '@/assets/icons/search.svg'; +import SearchIcon from '@/assets/icons/search.svg?react'; import EmptyDataPlaceholder from '@/components/EmptyDataPlaceholder'; import FeatureTag from '@/components/FeatureTag'; import { type SelectedGuide } from '@/components/Guide/GuideCard'; @@ -22,7 +22,7 @@ import { thirdPartyAppCategory } from '@/types/applications'; import ProtectedAppCard from '../ProtectedAppCard'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly className?: string; diff --git a/packages/console/src/pages/Applications/components/GuideLibraryModal/index.tsx b/packages/console/src/pages/Applications/components/GuideLibraryModal/index.tsx index 345665363c5..eb3d2a2d770 100644 --- a/packages/console/src/pages/Applications/components/GuideLibraryModal/index.tsx +++ b/packages/console/src/pages/Applications/components/GuideLibraryModal/index.tsx @@ -4,11 +4,11 @@ import Modal from 'react-modal'; import { type SelectedGuide } from '@/components/Guide/GuideCard'; import ModalFooter from '@/components/Guide/ModalFooter'; import ModalHeader from '@/components/Guide/ModalHeader'; -import * as modalStyles from '@/scss/modal.module.scss'; +import modalStyles from '@/scss/modal.module.scss'; import GuideLibrary from '../GuideLibrary'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly isOpen: boolean; diff --git a/packages/console/src/pages/Applications/components/ProtectedAppCard/index.tsx b/packages/console/src/pages/Applications/components/ProtectedAppCard/index.tsx index 3e7bc46731c..9ee16e101de 100644 --- a/packages/console/src/pages/Applications/components/ProtectedAppCard/index.tsx +++ b/packages/console/src/pages/Applications/components/ProtectedAppCard/index.tsx @@ -3,8 +3,8 @@ import classNames from 'classnames'; import { useState } from 'react'; import { Trans, useTranslation } from 'react-i18next'; -import ProtectedAppDarkIcon from '@/assets/icons/protected-app-dark.svg'; -import ProtectedAppIcon from '@/assets/icons/protected-app.svg'; +import ProtectedAppDarkIcon from '@/assets/icons/protected-app-dark.svg?react'; +import ProtectedAppIcon from '@/assets/icons/protected-app.svg?react'; import { BetaTag } from '@/components/FeatureTag'; import Button from '@/ds-components/Button'; import TextLink from '@/ds-components/TextLink'; @@ -13,7 +13,7 @@ import useTheme from '@/hooks/use-theme'; import ProtectedAppModal from '../ProtectedAppModal'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly className?: string; diff --git a/packages/console/src/pages/Applications/components/ProtectedAppForm/index.tsx b/packages/console/src/pages/Applications/components/ProtectedAppForm/index.tsx index a6f65db2049..5a8fc4817de 100644 --- a/packages/console/src/pages/Applications/components/ProtectedAppForm/index.tsx +++ b/packages/console/src/pages/Applications/components/ProtectedAppForm/index.tsx @@ -23,7 +23,7 @@ import useApi from '@/hooks/use-api'; import useApplicationsUsage from '@/hooks/use-applications-usage'; import useTenantPathname from '@/hooks/use-tenant-pathname'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly className?: string; diff --git a/packages/console/src/pages/Applications/components/ProtectedAppModal/index.tsx b/packages/console/src/pages/Applications/components/ProtectedAppModal/index.tsx index b5403526f9a..6e93ef7b86b 100644 --- a/packages/console/src/pages/Applications/components/ProtectedAppModal/index.tsx +++ b/packages/console/src/pages/Applications/components/ProtectedAppModal/index.tsx @@ -2,7 +2,7 @@ import { type Application } from '@logto/schemas'; import Modal from 'react-modal'; import ModalLayout from '@/ds-components/ModalLayout'; -import * as modalStyles from '@/scss/modal.module.scss'; +import modalStyles from '@/scss/modal.module.scss'; import ProtectedAppForm from '../ProtectedAppForm'; diff --git a/packages/console/src/pages/Applications/components/TypeDescription/index.tsx b/packages/console/src/pages/Applications/components/TypeDescription/index.tsx index ecb36d27f06..dfecf63eb07 100644 --- a/packages/console/src/pages/Applications/components/TypeDescription/index.tsx +++ b/packages/console/src/pages/Applications/components/TypeDescription/index.tsx @@ -3,7 +3,7 @@ import classNames from 'classnames'; import ApplicationIcon from '@/components/ApplicationIcon'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly title: string; diff --git a/packages/console/src/pages/Applications/index.tsx b/packages/console/src/pages/Applications/index.tsx index 51ddd6312bf..906ccc05066 100644 --- a/packages/console/src/pages/Applications/index.tsx +++ b/packages/console/src/pages/Applications/index.tsx @@ -4,7 +4,7 @@ import { useCallback, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { useLocation } from 'react-router-dom'; -import Plus from '@/assets/icons/plus.svg'; +import Plus from '@/assets/icons/plus.svg?react'; import ApplicationCreation from '@/components/ApplicationCreation'; import ChargeNotification from '@/components/ChargeNotification'; import { type SelectedGuide } from '@/components/Guide/GuideCard'; @@ -18,13 +18,13 @@ import TabNav, { TabNavItem } from '@/ds-components/TabNav'; import Table from '@/ds-components/Table'; import useApplicationsUsage from '@/hooks/use-applications-usage'; import useTenantPathname from '@/hooks/use-tenant-pathname'; -import * as pageLayout from '@/scss/page-layout.module.scss'; +import pageLayout from '@/scss/page-layout.module.scss'; import { buildUrl } from '@/utils/url'; import GuideLibrary from './components/GuideLibrary'; import GuideLibraryModal from './components/GuideLibraryModal'; import useApplicationsData from './hooks/use-application-data'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; const tabs = Object.freeze({ thirdPartyApplications: 'third-party-applications', diff --git a/packages/console/src/pages/AuditLogDetails/components/EventIcon/index.tsx b/packages/console/src/pages/AuditLogDetails/components/EventIcon/index.tsx index 7dc1677939d..4ee5b6b1547 100644 --- a/packages/console/src/pages/AuditLogDetails/components/EventIcon/index.tsx +++ b/packages/console/src/pages/AuditLogDetails/components/EventIcon/index.tsx @@ -1,9 +1,9 @@ import { useTranslation } from 'react-i18next'; -import Failed from '@/assets/icons/failed.svg'; -import Success from '@/assets/icons/success.svg'; +import Failed from '@/assets/icons/failed.svg?react'; +import Success from '@/assets/icons/success.svg?react'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly isSuccess: boolean; diff --git a/packages/console/src/pages/AuditLogDetails/index.tsx b/packages/console/src/pages/AuditLogDetails/index.tsx index d08c1a54f92..8a3b824c6c6 100644 --- a/packages/console/src/pages/AuditLogDetails/index.tsx +++ b/packages/console/src/pages/AuditLogDetails/index.tsx @@ -22,7 +22,7 @@ import { isWebhookEventLogKey } from '@/pages/WebhookDetails/utils'; import { getUserTitle } from '@/utils/user'; import EventIcon from './components/EventIcon'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; const getAuditLogDetailsRelatedResourceLink = (pathname: string) => `${pathname.slice(0, pathname.lastIndexOf('/'))}`; diff --git a/packages/console/src/pages/AuditLogs/index.tsx b/packages/console/src/pages/AuditLogs/index.tsx index f56857c640d..b8e7331dbdc 100644 --- a/packages/console/src/pages/AuditLogs/index.tsx +++ b/packages/console/src/pages/AuditLogs/index.tsx @@ -1,7 +1,7 @@ import AuditLogTable from '@/components/AuditLogTable'; import PageMeta from '@/components/PageMeta'; import CardTitle from '@/ds-components/CardTitle'; -import * as pageLayout from '@/scss/page-layout.module.scss'; +import pageLayout from '@/scss/page-layout.module.scss'; function AuditLogs() { return ( diff --git a/packages/console/src/pages/ConnectorDetails/ConnectorContent/EmailServiceConnectorForm/index.tsx b/packages/console/src/pages/ConnectorDetails/ConnectorContent/EmailServiceConnectorForm/index.tsx index 8506be3d35e..b2b11351447 100644 --- a/packages/console/src/pages/ConnectorDetails/ConnectorContent/EmailServiceConnectorForm/index.tsx +++ b/packages/console/src/pages/ConnectorDetails/ConnectorContent/EmailServiceConnectorForm/index.tsx @@ -14,7 +14,7 @@ import useUserAssetsService from '@/hooks/use-user-assets-service'; import { type ConnectorFormType } from '@/types/connector'; import { uriValidator } from '@/utils/validator'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly extraInfo?: Record; diff --git a/packages/console/src/pages/ConnectorDetails/ConnectorTabs/index.tsx b/packages/console/src/pages/ConnectorDetails/ConnectorTabs/index.tsx index 7d616e8d0d4..5fb48d97eb9 100644 --- a/packages/console/src/pages/ConnectorDetails/ConnectorTabs/index.tsx +++ b/packages/console/src/pages/ConnectorDetails/ConnectorTabs/index.tsx @@ -10,7 +10,7 @@ import { ConnectorsTabs } from '@/consts/page-tabs'; import useTenantPathname from '@/hooks/use-tenant-pathname'; import ConnectorPlatformIcon from '@/icons/ConnectorPlatformIcon'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly target: string; diff --git a/packages/console/src/pages/ConnectorDetails/EmailUsage/index.tsx b/packages/console/src/pages/ConnectorDetails/EmailUsage/index.tsx index 667b41aaa35..ba5358da375 100644 --- a/packages/console/src/pages/ConnectorDetails/EmailUsage/index.tsx +++ b/packages/console/src/pages/ConnectorDetails/EmailUsage/index.tsx @@ -1,9 +1,9 @@ import { Theme } from '@logto/schemas'; import { Trans, useTranslation } from 'react-i18next'; -import EmailSentIconDark from '@/assets/icons/email-sent-dark.svg'; -import EmailSentIconLight from '@/assets/icons/email-sent.svg'; -import Tip from '@/assets/icons/tip.svg'; +import EmailSentIconDark from '@/assets/icons/email-sent-dark.svg?react'; +import EmailSentIconLight from '@/assets/icons/email-sent.svg?react'; +import Tip from '@/assets/icons/tip.svg?react'; import DynamicT from '@/ds-components/DynamicT'; import IconButton from '@/ds-components/IconButton'; import TextLink from '@/ds-components/TextLink'; @@ -11,7 +11,7 @@ import { ToggleTip } from '@/ds-components/Tip'; import useDocumentationUrl from '@/hooks/use-documentation-url'; import useTheme from '@/hooks/use-theme'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly usage: number; diff --git a/packages/console/src/pages/ConnectorDetails/index.tsx b/packages/console/src/pages/ConnectorDetails/index.tsx index 63647d56963..8d730394307 100644 --- a/packages/console/src/pages/ConnectorDetails/index.tsx +++ b/packages/console/src/pages/ConnectorDetails/index.tsx @@ -8,9 +8,9 @@ import { useTranslation } from 'react-i18next'; import { useLocation, useParams } from 'react-router-dom'; import useSWR, { useSWRConfig } from 'swr'; -import Delete from '@/assets/icons/delete.svg'; -import File from '@/assets/icons/file.svg'; -import Reset from '@/assets/icons/reset.svg'; +import Delete from '@/assets/icons/delete.svg?react'; +import File from '@/assets/icons/file.svg?react'; +import Reset from '@/assets/icons/reset.svg?react'; import ConnectorLogo from '@/components/ConnectorLogo'; import CreateConnectorForm from '@/components/CreateConnectorForm'; import DeleteConnectorConfirmModal from '@/components/DeleteConnectorConfirmModal'; @@ -34,7 +34,7 @@ import ConnectorContent from './ConnectorContent'; import ConnectorTabs from './ConnectorTabs'; import ConnectorTypeName from './ConnectorTypeName'; import EmailUsage from './EmailUsage'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; // TODO: refactor path-related operation utils in both Connectors and ConnectorDetails page const getConnectorsPathname = (isSocial: boolean) => diff --git a/packages/console/src/pages/Connectors/ConnectorDeleteButton/index.tsx b/packages/console/src/pages/Connectors/ConnectorDeleteButton/index.tsx index 9b76408aa65..654239c001d 100644 --- a/packages/console/src/pages/Connectors/ConnectorDeleteButton/index.tsx +++ b/packages/console/src/pages/Connectors/ConnectorDeleteButton/index.tsx @@ -3,7 +3,7 @@ import { toast } from 'react-hot-toast'; import { useTranslation } from 'react-i18next'; import { useSWRConfig } from 'swr'; -import Delete from '@/assets/icons/delete.svg'; +import Delete from '@/assets/icons/delete.svg?react'; import DeleteConnectorConfirmModal from '@/components/DeleteConnectorConfirmModal'; import IconButton from '@/ds-components/IconButton'; import { Tooltip } from '@/ds-components/Tip'; diff --git a/packages/console/src/pages/Connectors/ConnectorName/index.tsx b/packages/console/src/pages/Connectors/ConnectorName/index.tsx index 740780db6f8..909f2075d15 100644 --- a/packages/console/src/pages/Connectors/ConnectorName/index.tsx +++ b/packages/console/src/pages/Connectors/ConnectorName/index.tsx @@ -17,7 +17,7 @@ import ConnectorPlatformIcon from '@/icons/ConnectorPlatformIcon'; import type { ConnectorGroup } from '@/types/connector'; import DemoTag from './DemoTag'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly connectorGroup: ConnectorGroup; diff --git a/packages/console/src/pages/Connectors/ConnectorStatusField/index.tsx b/packages/console/src/pages/Connectors/ConnectorStatusField/index.tsx index e3689612afe..e93b55fa59c 100644 --- a/packages/console/src/pages/Connectors/ConnectorStatusField/index.tsx +++ b/packages/console/src/pages/Connectors/ConnectorStatusField/index.tsx @@ -1,11 +1,11 @@ import { Trans, useTranslation } from 'react-i18next'; -import Tip from '@/assets/icons/tip.svg'; +import Tip from '@/assets/icons/tip.svg?react'; import IconButton from '@/ds-components/IconButton'; import TextLink from '@/ds-components/TextLink'; import { ToggleTip } from '@/ds-components/Tip'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; function ConnectorStatusField() { const { t } = useTranslation(undefined, { keyPrefix: 'admin_console' }); diff --git a/packages/console/src/pages/Connectors/Guide/index.tsx b/packages/console/src/pages/Connectors/Guide/index.tsx index 68ce4d20c41..8d23122fdb4 100644 --- a/packages/console/src/pages/Connectors/Guide/index.tsx +++ b/packages/console/src/pages/Connectors/Guide/index.tsx @@ -11,7 +11,7 @@ import { toast } from 'react-hot-toast'; import { useTranslation } from 'react-i18next'; import Modal from 'react-modal'; -import Close from '@/assets/icons/close.svg'; +import Close from '@/assets/icons/close.svg?react'; import BasicForm from '@/components/ConnectorForm/BasicForm'; import ConfigForm from '@/components/ConnectorForm/ConfigForm'; import ConnectorTester from '@/components/ConnectorTester'; @@ -25,7 +25,7 @@ import OverlayScrollbar from '@/ds-components/OverlayScrollbar'; import useConnectorApi from '@/hooks/use-connector-api'; import { useConnectorFormConfigParser } from '@/hooks/use-connector-form-config-parser'; import useTenantPathname from '@/hooks/use-tenant-pathname'; -import * as modalStyles from '@/scss/modal.module.scss'; +import modalStyles from '@/scss/modal.module.scss'; import type { ConnectorFormType } from '@/types/connector'; import { SyncProfileMode } from '@/types/connector'; import { convertFactoryResponseToForm } from '@/utils/connector-form'; @@ -33,7 +33,7 @@ import { trySubmitSafe } from '@/utils/form'; import { splitMarkdownByTitle } from '../utils'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; const targetErrorCode = 'connector.multiple_target_with_same_platform'; diff --git a/packages/console/src/pages/Connectors/SignInExperienceSetupNotice/index.tsx b/packages/console/src/pages/Connectors/SignInExperienceSetupNotice/index.tsx index 7cfd0ac7319..c2f72a1f706 100644 --- a/packages/console/src/pages/Connectors/SignInExperienceSetupNotice/index.tsx +++ b/packages/console/src/pages/Connectors/SignInExperienceSetupNotice/index.tsx @@ -6,7 +6,7 @@ import InlineNotification from '@/ds-components/InlineNotification'; import TextLink from '@/ds-components/TextLink'; import useUserPreferences from '@/hooks/use-user-preferences'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; function SignInExperienceSetupNotice() { const { t } = useTranslation(undefined, { keyPrefix: 'admin_console' }); diff --git a/packages/console/src/pages/Connectors/index.tsx b/packages/console/src/pages/Connectors/index.tsx index fab02b7984e..19b68d2762e 100644 --- a/packages/console/src/pages/Connectors/index.tsx +++ b/packages/console/src/pages/Connectors/index.tsx @@ -7,9 +7,9 @@ import { useTranslation } from 'react-i18next'; import { useParams } from 'react-router-dom'; import useSWR from 'swr'; -import Plus from '@/assets/icons/plus.svg'; -import SocialConnectorEmptyDark from '@/assets/images/social-connector-empty-dark.svg'; -import SocialConnectorEmpty from '@/assets/images/social-connector-empty.svg'; +import Plus from '@/assets/icons/plus.svg?react'; +import SocialConnectorEmptyDark from '@/assets/images/social-connector-empty-dark.svg?react'; +import SocialConnectorEmpty from '@/assets/images/social-connector-empty.svg?react'; import CreateConnectorForm from '@/components/CreateConnectorForm'; import ListPage from '@/components/ListPage'; import { defaultEmailConnectorGroup, defaultSmsConnectorGroup } from '@/consts'; @@ -31,7 +31,7 @@ import ConnectorStatusField from './ConnectorStatusField'; import ConnectorTypeColumn from './ConnectorTypeColumn'; import Guide from './Guide'; import SignInExperienceSetupNotice from './SignInExperienceSetupNotice'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; const basePathname = '/connectors'; const passwordlessPathname = `${basePathname}/${ConnectorsTabs.Passwordless}`; diff --git a/packages/console/src/pages/CustomizeJwt/CustomizerItem/index.tsx b/packages/console/src/pages/CustomizeJwt/CustomizerItem/index.tsx index 05c19a8436b..73a22d4804a 100644 --- a/packages/console/src/pages/CustomizeJwt/CustomizerItem/index.tsx +++ b/packages/console/src/pages/CustomizeJwt/CustomizerItem/index.tsx @@ -1,13 +1,13 @@ import { LogtoJwtTokenKeyType } from '@logto/schemas'; import { useTranslation } from 'react-i18next'; -import DeleteIcon from '@/assets/icons/delete.svg'; -import EditIcon from '@/assets/icons/edit.svg'; +import DeleteIcon from '@/assets/icons/delete.svg?react'; +import EditIcon from '@/assets/icons/edit.svg?react'; import Button from '@/ds-components/Button'; import useTenantPathname from '@/hooks/use-tenant-pathname'; import { getPagePath } from '@/pages/CustomizeJwt/utils/path'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly tokenType: LogtoJwtTokenKeyType; diff --git a/packages/console/src/pages/CustomizeJwt/index.tsx b/packages/console/src/pages/CustomizeJwt/index.tsx index f1c9ee189ee..3ab1fe19240 100644 --- a/packages/console/src/pages/CustomizeJwt/index.tsx +++ b/packages/console/src/pages/CustomizeJwt/index.tsx @@ -13,7 +13,7 @@ import FormField from '@/ds-components/FormField'; import CreateButton from './CreateButton'; import CustomizerItem from './CustomizerItem'; import DeleteConfirmModal from './DeleteConfirmModal'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; import useJwtCustomizer from './use-jwt-customizer'; function CustomizeJwt() { diff --git a/packages/console/src/pages/CustomizeJwtDetails/MainContent/MonacoCodeEditor/ActionButton/CodeRestoreButton.tsx b/packages/console/src/pages/CustomizeJwtDetails/MainContent/MonacoCodeEditor/ActionButton/CodeRestoreButton.tsx index 63ee433488b..0d0a42f0945 100644 --- a/packages/console/src/pages/CustomizeJwtDetails/MainContent/MonacoCodeEditor/ActionButton/CodeRestoreButton.tsx +++ b/packages/console/src/pages/CustomizeJwtDetails/MainContent/MonacoCodeEditor/ActionButton/CodeRestoreButton.tsx @@ -1,10 +1,10 @@ import classNames from 'classnames'; import { useTranslation } from 'react-i18next'; -import RedoIcon from '@/assets/icons/redo.svg'; +import RedoIcon from '@/assets/icons/redo.svg?react'; import ActionButton from './index'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly className?: string; diff --git a/packages/console/src/pages/CustomizeJwtDetails/MainContent/MonacoCodeEditor/Dashboard/index.tsx b/packages/console/src/pages/CustomizeJwtDetails/MainContent/MonacoCodeEditor/Dashboard/index.tsx index 2042506c69a..982e06fd5f8 100644 --- a/packages/console/src/pages/CustomizeJwtDetails/MainContent/MonacoCodeEditor/Dashboard/index.tsx +++ b/packages/console/src/pages/CustomizeJwtDetails/MainContent/MonacoCodeEditor/Dashboard/index.tsx @@ -1,10 +1,10 @@ import classNames from 'classnames'; import { type ReactNode } from 'react'; -import CloseIcon from '@/assets/icons/close.svg'; +import CloseIcon from '@/assets/icons/close.svg?react'; import IconButton from '@/ds-components/IconButton'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; export type Props = { readonly title: string; diff --git a/packages/console/src/pages/CustomizeJwtDetails/MainContent/MonacoCodeEditor/index.tsx b/packages/console/src/pages/CustomizeJwtDetails/MainContent/MonacoCodeEditor/index.tsx index e71641e6001..17fc7f3744d 100644 --- a/packages/console/src/pages/CustomizeJwtDetails/MainContent/MonacoCodeEditor/index.tsx +++ b/packages/console/src/pages/CustomizeJwtDetails/MainContent/MonacoCodeEditor/index.tsx @@ -11,7 +11,7 @@ import { onKeyDownHandler } from '@/utils/a11y'; import CodeRestoreButton from './ActionButton/CodeRestoreButton.js'; import DashBoard, { type Props as DashboardProps } from './Dashboard'; import { defaultOptions, logtoDarkTheme, logtoLightTheme } from './config.js'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; import type { IStandaloneCodeEditor, ModelSettings } from './type.js'; import useEditorHeight from './use-editor-height.js'; diff --git a/packages/console/src/pages/CustomizeJwtDetails/MainContent/ScriptSection/ErrorContent/index.tsx b/packages/console/src/pages/CustomizeJwtDetails/MainContent/ScriptSection/ErrorContent/index.tsx index a5520abf8ef..3039ac2db59 100644 --- a/packages/console/src/pages/CustomizeJwtDetails/MainContent/ScriptSection/ErrorContent/index.tsx +++ b/packages/console/src/pages/CustomizeJwtDetails/MainContent/ScriptSection/ErrorContent/index.tsx @@ -1,6 +1,6 @@ import { type TestResultData } from '@/pages/CustomizeJwtDetails/MainContent/ScriptSection/use-test-handler'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly testResult: TestResultData; diff --git a/packages/console/src/pages/CustomizeJwtDetails/MainContent/ScriptSection/index.tsx b/packages/console/src/pages/CustomizeJwtDetails/MainContent/ScriptSection/index.tsx index e1212e94d77..1111083beda 100644 --- a/packages/console/src/pages/CustomizeJwtDetails/MainContent/ScriptSection/index.tsx +++ b/packages/console/src/pages/CustomizeJwtDetails/MainContent/ScriptSection/index.tsx @@ -5,7 +5,7 @@ import { useCallback, useContext, useMemo } from 'react'; import { Controller, useFormContext, useWatch } from 'react-hook-form'; import { useTranslation } from 'react-i18next'; -import RunIcon from '@/assets/icons/start.svg'; +import RunIcon from '@/assets/icons/start.svg?react'; import Button from '@/ds-components/Button'; import { CodeEditorLoadingContext } from '@/pages/CustomizeJwtDetails/CodeEditorLoadingContext'; import MonacoCodeEditor, { @@ -20,7 +20,7 @@ import { import { buildEnvironmentVariablesTypeDefinition } from '@/pages/CustomizeJwtDetails/utils/type-definitions'; import ErrorContent from './ErrorContent'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; import useTestHandler from './use-test-handler'; function ScriptSection() { diff --git a/packages/console/src/pages/CustomizeJwtDetails/MainContent/SettingsSection/InstructionTab/GuideCard/index.tsx b/packages/console/src/pages/CustomizeJwtDetails/MainContent/SettingsSection/InstructionTab/GuideCard/index.tsx index 5472e3e776b..564d0aab256 100644 --- a/packages/console/src/pages/CustomizeJwtDetails/MainContent/SettingsSection/InstructionTab/GuideCard/index.tsx +++ b/packages/console/src/pages/CustomizeJwtDetails/MainContent/SettingsSection/InstructionTab/GuideCard/index.tsx @@ -1,11 +1,11 @@ import classNames from 'classnames'; import { useTranslation } from 'react-i18next'; -import CaretExpandedIcon from '@/assets/icons/caret-expanded.svg'; +import CaretExpandedIcon from '@/assets/icons/caret-expanded.svg?react'; import Card from '@/ds-components/Card'; import { onKeyDownHandler } from '@/utils/a11y'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; export enum CardType { UserData = 'user_data', diff --git a/packages/console/src/pages/CustomizeJwtDetails/MainContent/SettingsSection/InstructionTab/index.tsx b/packages/console/src/pages/CustomizeJwtDetails/MainContent/SettingsSection/InstructionTab/index.tsx index 76003b617a4..6c484b8c71f 100644 --- a/packages/console/src/pages/CustomizeJwtDetails/MainContent/SettingsSection/InstructionTab/index.tsx +++ b/packages/console/src/pages/CustomizeJwtDetails/MainContent/SettingsSection/InstructionTab/index.tsx @@ -19,11 +19,11 @@ import { jwtCustomizerGrantContextTypeDefinition, } from '@/pages/CustomizeJwtDetails/utils/type-definitions'; -import * as tabContentStyles from '../index.module.scss'; +import tabContentStyles from '../index.module.scss'; import EnvironmentVariablesField from './EnvironmentVariablesField'; import GuideCard, { CardType } from './GuideCard'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly isActive: boolean; diff --git a/packages/console/src/pages/CustomizeJwtDetails/MainContent/SettingsSection/TestTab/index.tsx b/packages/console/src/pages/CustomizeJwtDetails/MainContent/SettingsSection/TestTab/index.tsx index 1a1c9c6ea3a..2cfaa3d0936 100644 --- a/packages/console/src/pages/CustomizeJwtDetails/MainContent/SettingsSection/TestTab/index.tsx +++ b/packages/console/src/pages/CustomizeJwtDetails/MainContent/SettingsSection/TestTab/index.tsx @@ -15,9 +15,9 @@ import { userContextTestModel, } from '@/pages/CustomizeJwtDetails/utils/config'; -import * as tabContentStyles from '../index.module.scss'; +import tabContentStyles from '../index.module.scss'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly isActive: boolean; diff --git a/packages/console/src/pages/CustomizeJwtDetails/MainContent/SettingsSection/index.tsx b/packages/console/src/pages/CustomizeJwtDetails/MainContent/SettingsSection/index.tsx index a2a41c05ea8..becd4e26fc0 100644 --- a/packages/console/src/pages/CustomizeJwtDetails/MainContent/SettingsSection/index.tsx +++ b/packages/console/src/pages/CustomizeJwtDetails/MainContent/SettingsSection/index.tsx @@ -1,13 +1,13 @@ import classNames from 'classnames'; import { useState } from 'react'; -import BookIcon from '@/assets/icons/book.svg'; -import FlaskIcon from '@/assets/icons/conical-flask.svg'; +import BookIcon from '@/assets/icons/book.svg?react'; +import FlaskIcon from '@/assets/icons/conical-flask.svg?react'; import Button from '@/ds-components/Button'; import InstructionTab from './InstructionTab'; import TestTab from './TestTab'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; enum Tab { DataSource = 'data_source_tab', diff --git a/packages/console/src/pages/CustomizeJwtDetails/MainContent/index.tsx b/packages/console/src/pages/CustomizeJwtDetails/MainContent/index.tsx index 3dead2a6ea7..d99e51727f7 100644 --- a/packages/console/src/pages/CustomizeJwtDetails/MainContent/index.tsx +++ b/packages/console/src/pages/CustomizeJwtDetails/MainContent/index.tsx @@ -15,7 +15,7 @@ import { formatFormDataToRequestData, formatResponseDataToFormData } from '../ut import ScriptSection from './ScriptSection'; import SettingsSection from './SettingsSection'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly className?: string; diff --git a/packages/console/src/pages/CustomizeJwtDetails/PageLoadingSkeleton/index.tsx b/packages/console/src/pages/CustomizeJwtDetails/PageLoadingSkeleton/index.tsx index 152247eea12..9a782b44821 100644 --- a/packages/console/src/pages/CustomizeJwtDetails/PageLoadingSkeleton/index.tsx +++ b/packages/console/src/pages/CustomizeJwtDetails/PageLoadingSkeleton/index.tsx @@ -3,7 +3,7 @@ import classNames from 'classnames'; import Card from '@/ds-components/Card'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly tokenType: LogtoJwtTokenKeyType; diff --git a/packages/console/src/pages/CustomizeJwtDetails/index.tsx b/packages/console/src/pages/CustomizeJwtDetails/index.tsx index abcfa2fc821..56bbff3f695 100644 --- a/packages/console/src/pages/CustomizeJwtDetails/index.tsx +++ b/packages/console/src/pages/CustomizeJwtDetails/index.tsx @@ -8,7 +8,7 @@ import EmptyDataPlaceholder from '@/components/EmptyDataPlaceholder'; import { CodeEditorLoadingContext } from './CodeEditorLoadingContext'; import MainContent from './MainContent'; import PageLoadingSkeleton from './PageLoadingSkeleton'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; import { pageParamsGuard, type Action } from './type'; import useDataFetch from './use-data-fetch'; diff --git a/packages/console/src/pages/CustomizeJwtDetails/utils/config.tsx b/packages/console/src/pages/CustomizeJwtDetails/utils/config.tsx index 278292ada61..3eee22b503d 100644 --- a/packages/console/src/pages/CustomizeJwtDetails/utils/config.tsx +++ b/packages/console/src/pages/CustomizeJwtDetails/utils/config.tsx @@ -7,8 +7,8 @@ import { } from '@logto/schemas'; import { type EditorProps } from '@monaco-editor/react'; -import TokenFileIcon from '@/assets/icons/token-file-icon.svg'; -import UserFileIcon from '@/assets/icons/user-file-icon.svg'; +import TokenFileIcon from '@/assets/icons/token-file-icon.svg?react'; +import UserFileIcon from '@/assets/icons/user-file-icon.svg?react'; import type { ModelSettings } from '../MainContent/MonacoCodeEditor/type.js'; diff --git a/packages/console/src/pages/Dashboard/components/Block.tsx b/packages/console/src/pages/Dashboard/components/Block.tsx index 407112d985f..a058e9f015e 100644 --- a/packages/console/src/pages/Dashboard/components/Block.tsx +++ b/packages/console/src/pages/Dashboard/components/Block.tsx @@ -2,9 +2,9 @@ import type { AdminConsoleKey } from '@logto/phrases'; import { conditionalString } from '@silverhand/essentials'; import classNames from 'classnames'; -import ArrowDown from '@/assets/icons/arrow-down.svg'; -import ArrowUp from '@/assets/icons/arrow-up.svg'; -import Tip from '@/assets/icons/tip.svg'; +import ArrowDown from '@/assets/icons/arrow-down.svg?react'; +import ArrowUp from '@/assets/icons/arrow-up.svg?react'; +import Tip from '@/assets/icons/tip.svg?react'; import Card from '@/ds-components/Card'; import DynamicT from '@/ds-components/DynamicT'; import IconButton from '@/ds-components/IconButton'; @@ -12,7 +12,7 @@ import { ToggleTip } from '@/ds-components/Tip'; import type { Props as ToggleTipProps } from '@/ds-components/Tip/ToggleTip'; import { formatNumberWithComma } from '@/utils/number'; -import * as styles from './Block.module.scss'; +import styles from './Block.module.scss'; type Props = { readonly count: number; diff --git a/packages/console/src/pages/Dashboard/components/ChartTooltip/index.tsx b/packages/console/src/pages/Dashboard/components/ChartTooltip/index.tsx index 141cd3d6f81..2c93ddcc7cb 100644 --- a/packages/console/src/pages/Dashboard/components/ChartTooltip/index.tsx +++ b/packages/console/src/pages/Dashboard/components/ChartTooltip/index.tsx @@ -1,6 +1,6 @@ import { formatNumberWithComma } from '@/utils/number'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly label?: string; diff --git a/packages/console/src/pages/Dashboard/components/Skeleton/index.tsx b/packages/console/src/pages/Dashboard/components/Skeleton/index.tsx index 1794cd9ac92..f948a7fcf80 100644 --- a/packages/console/src/pages/Dashboard/components/Skeleton/index.tsx +++ b/packages/console/src/pages/Dashboard/components/Skeleton/index.tsx @@ -1,6 +1,6 @@ import Card from '@/ds-components/Card'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; function Skeleton() { return ( diff --git a/packages/console/src/pages/Dashboard/index.tsx b/packages/console/src/pages/Dashboard/index.tsx index a0a1a30d9a4..ee2d27ebc97 100644 --- a/packages/console/src/pages/Dashboard/index.tsx +++ b/packages/console/src/pages/Dashboard/index.tsx @@ -22,7 +22,7 @@ import type { RequestError } from '@/hooks/use-api'; import Block from './components/Block'; import ChartTooltip from './components/ChartTooltip'; import Skeleton from './components/Skeleton'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; import type { ActiveUsersResponse, NewUsersResponse, TotalUsersResponse } from './types'; const tickStyle = { diff --git a/packages/console/src/pages/EnterpriseSso/SsoConnectorLogo/index.tsx b/packages/console/src/pages/EnterpriseSso/SsoConnectorLogo/index.tsx index bba65bbb36a..6babe925c72 100644 --- a/packages/console/src/pages/EnterpriseSso/SsoConnectorLogo/index.tsx +++ b/packages/console/src/pages/EnterpriseSso/SsoConnectorLogo/index.tsx @@ -5,7 +5,7 @@ import classNames from 'classnames'; import ImageWithErrorFallback from '@/ds-components/ImageWithErrorFallback'; import useTheme from '@/hooks/use-theme'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; import { pickLogoForCurrentThemeHelper } from './utils'; type Props = { diff --git a/packages/console/src/pages/EnterpriseSso/SsoCreationModal/SsoConnectorRadioGroup/SsoConnectorRadio/index.tsx b/packages/console/src/pages/EnterpriseSso/SsoCreationModal/SsoConnectorRadioGroup/SsoConnectorRadio/index.tsx index ae5f2895ed8..805b22f2f6d 100644 --- a/packages/console/src/pages/EnterpriseSso/SsoCreationModal/SsoConnectorRadioGroup/SsoConnectorRadio/index.tsx +++ b/packages/console/src/pages/EnterpriseSso/SsoCreationModal/SsoConnectorRadioGroup/SsoConnectorRadio/index.tsx @@ -4,7 +4,7 @@ import classNames from 'classnames'; import ImageWithErrorFallback from '@/ds-components/ImageWithErrorFallback'; import useTheme from '@/hooks/use-theme'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly data: SsoConnectorProviderDetail; diff --git a/packages/console/src/pages/EnterpriseSso/SsoCreationModal/SsoConnectorRadioGroup/index.tsx b/packages/console/src/pages/EnterpriseSso/SsoCreationModal/SsoConnectorRadioGroup/index.tsx index edac0cbb532..6e9492c4b71 100644 --- a/packages/console/src/pages/EnterpriseSso/SsoCreationModal/SsoConnectorRadioGroup/index.tsx +++ b/packages/console/src/pages/EnterpriseSso/SsoCreationModal/SsoConnectorRadioGroup/index.tsx @@ -5,7 +5,7 @@ import { type ConnectorRadioGroupSize } from '@/components/CreateConnectorForm/C import RadioGroup, { Radio } from '@/ds-components/RadioGroup'; import SsoConnectorRadio from './SsoConnectorRadio'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly name: string; diff --git a/packages/console/src/pages/EnterpriseSso/SsoCreationModal/index.tsx b/packages/console/src/pages/EnterpriseSso/SsoCreationModal/index.tsx index 8525df33111..aaa7e1d3917 100644 --- a/packages/console/src/pages/EnterpriseSso/SsoCreationModal/index.tsx +++ b/packages/console/src/pages/EnterpriseSso/SsoCreationModal/index.tsx @@ -22,11 +22,11 @@ import FormField from '@/ds-components/FormField'; import ModalLayout from '@/ds-components/ModalLayout'; import TextInput from '@/ds-components/TextInput'; import useApi, { type RequestError } from '@/hooks/use-api'; -import * as modalStyles from '@/scss/modal.module.scss'; +import modalStyles from '@/scss/modal.module.scss'; import { trySubmitSafe } from '@/utils/form'; import SsoConnectorRadioGroup from './SsoConnectorRadioGroup'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; import { categorizeSsoConnectorProviders } from './utils'; type Props = { diff --git a/packages/console/src/pages/EnterpriseSso/index.tsx b/packages/console/src/pages/EnterpriseSso/index.tsx index 74d78056a30..e3d40158a18 100644 --- a/packages/console/src/pages/EnterpriseSso/index.tsx +++ b/packages/console/src/pages/EnterpriseSso/index.tsx @@ -5,9 +5,9 @@ import { useTranslation } from 'react-i18next'; import { useLocation } from 'react-router-dom'; import useSWR from 'swr'; -import Plus from '@/assets/icons/plus.svg'; -import EnterpriseSsoConnectorEmptyDark from '@/assets/images/sso-connector-empty-dark.svg'; -import EnterpriseSsoConnectorEmpty from '@/assets/images/sso-connector-empty.svg'; +import Plus from '@/assets/icons/plus.svg?react'; +import EnterpriseSsoConnectorEmptyDark from '@/assets/images/sso-connector-empty-dark.svg?react'; +import EnterpriseSsoConnectorEmpty from '@/assets/images/sso-connector-empty.svg?react'; import ItemPreview from '@/components/ItemPreview'; import ListPage from '@/components/ListPage'; import { defaultPageSize } from '@/consts'; @@ -24,7 +24,7 @@ import { buildUrl } from '@/utils/url'; import SsoConnectorLogo from './SsoConnectorLogo'; import SsoCreationModal from './SsoCreationModal'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; const pageSize = defaultPageSize; const enterpriseSsoPathname = '/enterprise-sso'; diff --git a/packages/console/src/pages/EnterpriseSsoDetails/Connection/FileReader/index.tsx b/packages/console/src/pages/EnterpriseSsoDetails/Connection/FileReader/index.tsx index 67a2a4ebc9a..d81d2320d1e 100644 --- a/packages/console/src/pages/EnterpriseSsoDetails/Connection/FileReader/index.tsx +++ b/packages/console/src/pages/EnterpriseSsoDetails/Connection/FileReader/index.tsx @@ -4,17 +4,17 @@ import { useCallback } from 'react'; import { useDropzone, type FileRejection, type Accept } from 'react-dropzone'; import { type FieldError } from 'react-hook-form'; -import Delete from '@/assets/icons/delete.svg'; -import FileIconDark from '@/assets/icons/file-icon-dark.svg'; -import FileIcon from '@/assets/icons/file-icon.svg'; -import UploaderIcon from '@/assets/icons/upload.svg'; +import Delete from '@/assets/icons/delete.svg?react'; +import FileIconDark from '@/assets/icons/file-icon-dark.svg?react'; +import FileIcon from '@/assets/icons/file-icon.svg?react'; +import UploaderIcon from '@/assets/icons/upload.svg?react'; import Button from '@/ds-components/Button'; import IconButton from '@/ds-components/IconButton'; import useTheme from '@/hooks/use-theme'; import { calculateFileSize } from '../SamlMetadataForm/utils'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; const fileSizeLimit = 500 * 1024; // 500 KB diff --git a/packages/console/src/pages/EnterpriseSsoDetails/Connection/OidcMetadataForm/ParsedConfigPreview/index.tsx b/packages/console/src/pages/EnterpriseSsoDetails/Connection/OidcMetadataForm/ParsedConfigPreview/index.tsx index 7e7675d054f..249fccdf914 100644 --- a/packages/console/src/pages/EnterpriseSsoDetails/Connection/OidcMetadataForm/ParsedConfigPreview/index.tsx +++ b/packages/console/src/pages/EnterpriseSsoDetails/Connection/OidcMetadataForm/ParsedConfigPreview/index.tsx @@ -3,7 +3,7 @@ import { useTranslation } from 'react-i18next'; import { type OidcProviderConfig } from '@/pages/EnterpriseSsoDetails/types/oidc'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly providerConfig: OidcProviderConfig; diff --git a/packages/console/src/pages/EnterpriseSsoDetails/Connection/OidcMetadataForm/index.tsx b/packages/console/src/pages/EnterpriseSsoDetails/Connection/OidcMetadataForm/index.tsx index b8c52e4000d..580a695f7a3 100644 --- a/packages/console/src/pages/EnterpriseSsoDetails/Connection/OidcMetadataForm/index.tsx +++ b/packages/console/src/pages/EnterpriseSsoDetails/Connection/OidcMetadataForm/index.tsx @@ -11,7 +11,7 @@ import { uriValidator } from '@/utils/validator'; import { type OidcConnectorConfig, type OidcProviderConfig } from '../../types/oidc'; import ParsedConfigPreview from './ParsedConfigPreview'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly providerConfig?: OidcProviderConfig; diff --git a/packages/console/src/pages/EnterpriseSsoDetails/Connection/SamlAttributeMapping/index.tsx b/packages/console/src/pages/EnterpriseSsoDetails/Connection/SamlAttributeMapping/index.tsx index 08a6c6f0f8f..7d9b6b2ce32 100644 --- a/packages/console/src/pages/EnterpriseSsoDetails/Connection/SamlAttributeMapping/index.tsx +++ b/packages/console/src/pages/EnterpriseSsoDetails/Connection/SamlAttributeMapping/index.tsx @@ -10,7 +10,7 @@ import { type SamlConnectorConfig, } from '@/pages/EnterpriseSsoDetails/types/saml'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly samlProviderConfig?: SamlProviderConfig; diff --git a/packages/console/src/pages/EnterpriseSsoDetails/Connection/SamlConnectorForm.tsx b/packages/console/src/pages/EnterpriseSsoDetails/Connection/SamlConnectorForm.tsx index 5955515b86c..889588787ec 100644 --- a/packages/console/src/pages/EnterpriseSsoDetails/Connection/SamlConnectorForm.tsx +++ b/packages/console/src/pages/EnterpriseSsoDetails/Connection/SamlConnectorForm.tsx @@ -24,7 +24,7 @@ import { invalidConfigErrorCode, invalidMetadataErrorCode } from '../config'; import SamlAttributeMapping from './SamlAttributeMapping'; import SamlMetadataForm from './SamlMetadataForm'; import SamlConnectorSpInfo from './ServiceProviderInfo/SamlConnectorSpInfo'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly isDeleted: boolean; diff --git a/packages/console/src/pages/EnterpriseSsoDetails/Connection/SamlMetadataForm/ParsedConfigPreview/index.tsx b/packages/console/src/pages/EnterpriseSsoDetails/Connection/SamlMetadataForm/ParsedConfigPreview/index.tsx index 9b0866c8bdf..5305a2a2f29 100644 --- a/packages/console/src/pages/EnterpriseSsoDetails/Connection/SamlMetadataForm/ParsedConfigPreview/index.tsx +++ b/packages/console/src/pages/EnterpriseSsoDetails/Connection/SamlMetadataForm/ParsedConfigPreview/index.tsx @@ -8,7 +8,7 @@ import CopyToClipboard from '@/ds-components/CopyToClipboard'; import DynamicT from '@/ds-components/DynamicT'; import { type SamlProviderConfig } from '@/pages/EnterpriseSsoDetails/types/saml'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly identityProviderConfig: SamlProviderConfig['identityProvider']; diff --git a/packages/console/src/pages/EnterpriseSsoDetails/Connection/SamlMetadataForm/SwitchFormatButton/index.tsx b/packages/console/src/pages/EnterpriseSsoDetails/Connection/SamlMetadataForm/SwitchFormatButton/index.tsx index cf50520e928..2b71c71996e 100644 --- a/packages/console/src/pages/EnterpriseSsoDetails/Connection/SamlMetadataForm/SwitchFormatButton/index.tsx +++ b/packages/console/src/pages/EnterpriseSsoDetails/Connection/SamlMetadataForm/SwitchFormatButton/index.tsx @@ -2,13 +2,13 @@ import { type AdminConsoleKey } from '@logto/phrases'; import classNames from 'classnames'; import { useTranslation } from 'react-i18next'; -import SwitchArrowIcon from '@/assets/icons/switch-arrow.svg'; -import Tick from '@/assets/icons/tick.svg'; +import SwitchArrowIcon from '@/assets/icons/switch-arrow.svg?react'; +import Tick from '@/assets/icons/tick.svg?react'; import ActionMenu from '@/ds-components/ActionMenu'; import { DropdownItem } from '@/ds-components/Dropdown'; import DynamicT from '@/ds-components/DynamicT'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly value: FormFormat; diff --git a/packages/console/src/pages/EnterpriseSsoDetails/Connection/SamlMetadataForm/index.tsx b/packages/console/src/pages/EnterpriseSsoDetails/Connection/SamlMetadataForm/index.tsx index 434d27a09c2..ecd5f263507 100644 --- a/packages/console/src/pages/EnterpriseSsoDetails/Connection/SamlMetadataForm/index.tsx +++ b/packages/console/src/pages/EnterpriseSsoDetails/Connection/SamlMetadataForm/index.tsx @@ -15,7 +15,7 @@ import FileReader, { type Props as FileReaderProps } from '../FileReader'; import ParsedConfigPreview, { CertificatePreview } from './ParsedConfigPreview'; import SwitchFormatButton, { FormFormat } from './SwitchFormatButton'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type SamlMetadataFormFieldsProps = Pick & { readonly identityProviderConfig?: SamlProviderConfig['identityProvider']; diff --git a/packages/console/src/pages/EnterpriseSsoDetails/Experience/DomainsInput/index.tsx b/packages/console/src/pages/EnterpriseSsoDetails/Experience/DomainsInput/index.tsx index e4e9e29f776..9743f511a8d 100644 --- a/packages/console/src/pages/EnterpriseSsoDetails/Experience/DomainsInput/index.tsx +++ b/packages/console/src/pages/EnterpriseSsoDetails/Experience/DomainsInput/index.tsx @@ -6,13 +6,13 @@ import { useRef, useState } from 'react'; import { useFormContext } from 'react-hook-form'; import { useTranslation } from 'react-i18next'; -import Close from '@/assets/icons/close.svg'; +import Close from '@/assets/icons/close.svg?react'; import IconButton from '@/ds-components/IconButton'; import Tag from '@/ds-components/Tag'; import { onKeyDownHandler } from '@/utils/a11y'; import { domainRegExp } from './consts'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; import { domainOptionsParser, type Option } from './utils'; export type DomainsFormType = { diff --git a/packages/console/src/pages/EnterpriseSsoDetails/Experience/LogosUploader/index.tsx b/packages/console/src/pages/EnterpriseSsoDetails/Experience/LogosUploader/index.tsx index 6bdb2ffada5..e355f8ab05d 100644 --- a/packages/console/src/pages/EnterpriseSsoDetails/Experience/LogosUploader/index.tsx +++ b/packages/console/src/pages/EnterpriseSsoDetails/Experience/LogosUploader/index.tsx @@ -8,7 +8,7 @@ import ImageUploader from '@/ds-components/Uploader/ImageUploader'; import type { FormType } from '../index.js'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; const allowedMimeTypes: AllowedUploadMimeType[] = ['image/png', 'image/jpeg', 'image/svg+xml']; // Only allow `svg`, `png`, `jpg` and `jpeg` files. diff --git a/packages/console/src/pages/EnterpriseSsoDetails/Experience/index.tsx b/packages/console/src/pages/EnterpriseSsoDetails/Experience/index.tsx index 0d6892e5d78..c71defa799d 100644 --- a/packages/console/src/pages/EnterpriseSsoDetails/Experience/index.tsx +++ b/packages/console/src/pages/EnterpriseSsoDetails/Experience/index.tsx @@ -32,7 +32,7 @@ import { } from './DomainsInput/consts'; import { domainOptionsParser } from './DomainsInput/utils'; import LogosUploader from './LogosUploader'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type DataType = Pick< SsoConnectorWithProviderConfig, diff --git a/packages/console/src/pages/EnterpriseSsoDetails/SsoGuide/index.tsx b/packages/console/src/pages/EnterpriseSsoDetails/SsoGuide/index.tsx index 9e0f63b0e41..3c636237c40 100644 --- a/packages/console/src/pages/EnterpriseSsoDetails/SsoGuide/index.tsx +++ b/packages/console/src/pages/EnterpriseSsoDetails/SsoGuide/index.tsx @@ -8,7 +8,7 @@ import OverlayScrollbar from '@/ds-components/OverlayScrollbar'; import MdxProvider from '@/mdx-components/MdxProvider'; import NotFound from '@/pages/NotFound'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly ssoConnector?: SsoConnectorWithProviderConfig; diff --git a/packages/console/src/pages/EnterpriseSsoDetails/index.tsx b/packages/console/src/pages/EnterpriseSsoDetails/index.tsx index 9f69ecf66e5..c1da2a45ce5 100644 --- a/packages/console/src/pages/EnterpriseSsoDetails/index.tsx +++ b/packages/console/src/pages/EnterpriseSsoDetails/index.tsx @@ -4,8 +4,8 @@ import { useEffect, useState } from 'react'; import { useLocation, useParams } from 'react-router-dom'; import useSWR from 'swr'; -import Delete from '@/assets/icons/delete.svg'; -import File from '@/assets/icons/file.svg'; +import Delete from '@/assets/icons/delete.svg?react'; +import File from '@/assets/icons/file.svg?react'; import DetailsPage from '@/components/DetailsPage'; import DetailsPageHeader from '@/components/DetailsPage/DetailsPageHeader'; import Skeleton from '@/components/DetailsPage/Skeleton'; @@ -24,7 +24,7 @@ import Connection from './Connection'; import Experience from './Experience'; import SsoGuide from './SsoGuide'; import { enterpriseSsoPathname } from './config'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; import useDeleteConnector from './use-delete-connector'; const getSsoConnectorDetailsPathname = (ssoConnectorId: string, tab: EnterpriseSsoDetailsTabs) => diff --git a/packages/console/src/pages/GetStarted/ProtectedAppCreationForm/index.tsx b/packages/console/src/pages/GetStarted/ProtectedAppCreationForm/index.tsx index e5d599d1bd2..cc97bfb3772 100644 --- a/packages/console/src/pages/GetStarted/ProtectedAppCreationForm/index.tsx +++ b/packages/console/src/pages/GetStarted/ProtectedAppCreationForm/index.tsx @@ -12,7 +12,7 @@ import useTenantPathname from '@/hooks/use-tenant-pathname'; import ProtectedAppCard from '@/pages/Applications/components/ProtectedAppCard'; import ProtectedAppForm from '@/pages/Applications/components/ProtectedAppForm'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; function ProtectedAppCreationForm() { const { t } = useTranslation(undefined, { keyPrefix: 'admin_console' }); diff --git a/packages/console/src/pages/GetStarted/index.tsx b/packages/console/src/pages/GetStarted/index.tsx index 9e9879978da..266541c89f9 100644 --- a/packages/console/src/pages/GetStarted/index.tsx +++ b/packages/console/src/pages/GetStarted/index.tsx @@ -3,12 +3,12 @@ import classNames from 'classnames'; import { useCallback, useContext, useMemo, useRef, useState } from 'react'; import { useTranslation } from 'react-i18next'; -import CheckPreviewDark from '@/assets/icons/check-demo-dark.svg'; -import CheckPreview from '@/assets/icons/check-demo.svg'; -import CreateRoleDark from '@/assets/icons/create-role-dark.svg'; -import CreateRole from '@/assets/icons/create-role.svg'; -import SocialDark from '@/assets/icons/social-dark.svg'; -import Social from '@/assets/icons/social.svg'; +import CheckPreviewDark from '@/assets/icons/check-demo-dark.svg?react'; +import CheckPreview from '@/assets/icons/check-demo.svg?react'; +import CreateRoleDark from '@/assets/icons/create-role-dark.svg?react'; +import CreateRole from '@/assets/icons/create-role.svg?react'; +import SocialDark from '@/assets/icons/social-dark.svg?react'; +import Social from '@/assets/icons/social.svg?react'; import ApplicationCreation from '@/components/ApplicationCreation'; import { type SelectedGuide } from '@/components/Guide/GuideCard'; import GuideCardGroup from '@/components/Guide/GuideCardGroup'; @@ -28,7 +28,7 @@ import useWindowResize from '@/hooks/use-window-resize'; import CreateApiForm from '../ApiResources/components/CreateForm'; import ProtectedAppCreationForm from './ProtectedAppCreationForm'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; const icons = { [Theme.Light]: { PreviewIcon: CheckPreview, SocialIcon: Social, RbacIcon: CreateRole }, diff --git a/packages/console/src/pages/Mfa/MfaForm/FactorLabel/WebAuthnTipContent/index.tsx b/packages/console/src/pages/Mfa/MfaForm/FactorLabel/WebAuthnTipContent/index.tsx index b854ef605ff..19f167c7a60 100644 --- a/packages/console/src/pages/Mfa/MfaForm/FactorLabel/WebAuthnTipContent/index.tsx +++ b/packages/console/src/pages/Mfa/MfaForm/FactorLabel/WebAuthnTipContent/index.tsx @@ -1,6 +1,6 @@ import DynamicT from '@/ds-components/DynamicT'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; function WebAuthnTipContent() { return ( diff --git a/packages/console/src/pages/Mfa/MfaForm/FactorLabel/index.tsx b/packages/console/src/pages/Mfa/MfaForm/FactorLabel/index.tsx index 0ef88bc6f0b..1c584a0c0f9 100644 --- a/packages/console/src/pages/Mfa/MfaForm/FactorLabel/index.tsx +++ b/packages/console/src/pages/Mfa/MfaForm/FactorLabel/index.tsx @@ -5,7 +5,7 @@ import MfaFactorTitle from '@/components/MfaFactorTitle'; import DynamicT from '@/ds-components/DynamicT'; import WebAuthnTipContent from './WebAuthnTipContent'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly type: MfaFactor; diff --git a/packages/console/src/pages/Mfa/MfaForm/index.tsx b/packages/console/src/pages/Mfa/MfaForm/index.tsx index 0188553f99e..e4b6e9e9213 100644 --- a/packages/console/src/pages/Mfa/MfaForm/index.tsx +++ b/packages/console/src/pages/Mfa/MfaForm/index.tsx @@ -23,7 +23,7 @@ import { type MfaConfigForm, type MfaConfig } from '../types'; import FactorLabel from './FactorLabel'; import { policyOptionTitleMap } from './constants'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; import { convertMfaFormToConfig, convertMfaConfigToForm, validateBackupCodeFactor } from './utils'; type Props = { diff --git a/packages/console/src/pages/Mfa/PageWrapper/index.tsx b/packages/console/src/pages/Mfa/PageWrapper/index.tsx index ccd5c3e8e51..b89dcdcf895 100644 --- a/packages/console/src/pages/Mfa/PageWrapper/index.tsx +++ b/packages/console/src/pages/Mfa/PageWrapper/index.tsx @@ -8,7 +8,7 @@ import { SubscriptionDataContext } from '@/contexts/SubscriptionDataProvider'; import { TenantsContext } from '@/contexts/TenantsProvider'; import CardTitle from '@/ds-components/CardTitle'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly children: ReactNode; diff --git a/packages/console/src/pages/Mfa/Skeleton/index.tsx b/packages/console/src/pages/Mfa/Skeleton/index.tsx index 3bb6647fef8..ec9abdb8bf6 100644 --- a/packages/console/src/pages/Mfa/Skeleton/index.tsx +++ b/packages/console/src/pages/Mfa/Skeleton/index.tsx @@ -1,6 +1,6 @@ import { FormCardSkeleton } from '@/components/FormCard'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; function Skeleton() { return ( diff --git a/packages/console/src/pages/NotFound/index.tsx b/packages/console/src/pages/NotFound/index.tsx index 39e5e798513..a256177e445 100644 --- a/packages/console/src/pages/NotFound/index.tsx +++ b/packages/console/src/pages/NotFound/index.tsx @@ -2,13 +2,13 @@ import { Theme } from '@logto/schemas'; import classNames from 'classnames'; import { useTranslation } from 'react-i18next'; -import NotFoundDarkImage from '@/assets/images/not-found-dark.svg'; -import NotFoundImage from '@/assets/images/not-found.svg'; +import NotFoundDarkImage from '@/assets/images/not-found-dark.svg?react'; +import NotFoundImage from '@/assets/images/not-found.svg?react'; import PageMeta from '@/components/PageMeta'; import Card from '@/ds-components/Card'; import useTheme from '@/hooks/use-theme'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly className?: string; diff --git a/packages/console/src/pages/OrganizationDetails/EditOrganizationRolesModal/index.tsx b/packages/console/src/pages/OrganizationDetails/EditOrganizationRolesModal/index.tsx index 92835e31ed2..84fdde8a294 100644 --- a/packages/console/src/pages/OrganizationDetails/EditOrganizationRolesModal/index.tsx +++ b/packages/console/src/pages/OrganizationDetails/EditOrganizationRolesModal/index.tsx @@ -10,7 +10,7 @@ import FormField from '@/ds-components/FormField'; import ModalLayout from '@/ds-components/ModalLayout'; import { type Option } from '@/ds-components/Select/MultiSelect'; import useApi from '@/hooks/use-api'; -import * as modalStyles from '@/scss/modal.module.scss'; +import modalStyles from '@/scss/modal.module.scss'; import { decapitalize } from '@/utils/string'; type WithOrganizationRoles = { diff --git a/packages/console/src/pages/OrganizationDetails/MachineToMachine/AddAppsToOrganization.tsx b/packages/console/src/pages/OrganizationDetails/MachineToMachine/AddAppsToOrganization.tsx index 6ec5156e137..bcaf531674c 100644 --- a/packages/console/src/pages/OrganizationDetails/MachineToMachine/AddAppsToOrganization.tsx +++ b/packages/console/src/pages/OrganizationDetails/MachineToMachine/AddAppsToOrganization.tsx @@ -14,7 +14,7 @@ import ModalLayout from '@/ds-components/ModalLayout'; import { type Option } from '@/ds-components/Select/MultiSelect'; import useActionTranslation from '@/hooks/use-action-translation'; import useApi from '@/hooks/use-api'; -import * as modalStyles from '@/scss/modal.module.scss'; +import modalStyles from '@/scss/modal.module.scss'; import { trySubmitSafe } from '@/utils/form'; type Props = { diff --git a/packages/console/src/pages/OrganizationDetails/MachineToMachine/index.tsx b/packages/console/src/pages/OrganizationDetails/MachineToMachine/index.tsx index bf2db19e4b9..117102807aa 100644 --- a/packages/console/src/pages/OrganizationDetails/MachineToMachine/index.tsx +++ b/packages/console/src/pages/OrganizationDetails/MachineToMachine/index.tsx @@ -4,7 +4,7 @@ import { useTranslation } from 'react-i18next'; import { useOutletContext } from 'react-router-dom'; import useSWR from 'swr'; -import Plus from '@/assets/icons/plus.svg'; +import Plus from '@/assets/icons/plus.svg?react'; import ActionsButton from '@/components/ActionsButton'; import EmptyDataPlaceholder from '@/components/EmptyDataPlaceholder'; import ApplicationPreview from '@/components/ItemPreview/ApplicationPreview'; @@ -23,7 +23,7 @@ import EditOrganizationRolesModal from '../EditOrganizationRolesModal'; import { type OrganizationDetailsOutletContext } from '../types'; import AddAppsToOrganization from './AddAppsToOrganization'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; const pageSize = defaultPageSize; diff --git a/packages/console/src/pages/OrganizationDetails/Members/AddMembersToOrganization.tsx b/packages/console/src/pages/OrganizationDetails/Members/AddMembersToOrganization.tsx index b9320944013..332b22c1fbf 100644 --- a/packages/console/src/pages/OrganizationDetails/Members/AddMembersToOrganization.tsx +++ b/packages/console/src/pages/OrganizationDetails/Members/AddMembersToOrganization.tsx @@ -14,7 +14,7 @@ import ModalLayout from '@/ds-components/ModalLayout'; import { type Option } from '@/ds-components/Select/MultiSelect'; import useActionTranslation from '@/hooks/use-action-translation'; import useApi from '@/hooks/use-api'; -import * as modalStyles from '@/scss/modal.module.scss'; +import modalStyles from '@/scss/modal.module.scss'; import { trySubmitSafe } from '@/utils/form'; type Props = { diff --git a/packages/console/src/pages/OrganizationDetails/Members/index.tsx b/packages/console/src/pages/OrganizationDetails/Members/index.tsx index e4fd674956f..36e2fea566b 100644 --- a/packages/console/src/pages/OrganizationDetails/Members/index.tsx +++ b/packages/console/src/pages/OrganizationDetails/Members/index.tsx @@ -4,7 +4,7 @@ import { useTranslation } from 'react-i18next'; import { useOutletContext } from 'react-router-dom'; import useSWR from 'swr'; -import Plus from '@/assets/icons/plus.svg'; +import Plus from '@/assets/icons/plus.svg?react'; import ActionsButton from '@/components/ActionsButton'; import DateTime from '@/components/DateTime'; import EmptyDataPlaceholder from '@/components/EmptyDataPlaceholder'; @@ -24,7 +24,7 @@ import EditOrganizationRolesModal from '../EditOrganizationRolesModal'; import { type OrganizationDetailsOutletContext } from '../types'; import AddMembersToOrganization from './AddMembersToOrganization'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; const pageSize = defaultPageSize; diff --git a/packages/console/src/pages/OrganizationDetails/Settings/JitSettings.tsx b/packages/console/src/pages/OrganizationDetails/Settings/JitSettings.tsx index 777ac693250..3336682a967 100644 --- a/packages/console/src/pages/OrganizationDetails/Settings/JitSettings.tsx +++ b/packages/console/src/pages/OrganizationDetails/Settings/JitSettings.tsx @@ -5,9 +5,9 @@ import { Controller, type UseFormReturn } from 'react-hook-form'; import { Trans, useTranslation } from 'react-i18next'; import useSWRInfinite from 'swr/infinite'; -import Minus from '@/assets/icons/minus.svg'; -import Plus from '@/assets/icons/plus.svg'; -import SsoIcon from '@/assets/icons/single-sign-on.svg'; +import Minus from '@/assets/icons/minus.svg?react'; +import Plus from '@/assets/icons/plus.svg?react'; +import SsoIcon from '@/assets/icons/single-sign-on.svg?react'; import FormCard from '@/components/FormCard'; import MultiOptionInput from '@/components/MultiOptionInput'; import OrganizationRolesSelect from '@/components/OrganizationRolesSelect'; @@ -23,7 +23,7 @@ import useDocumentationUrl from '@/hooks/use-documentation-url'; import SsoConnectorLogo from '@/pages/EnterpriseSso/SsoConnectorLogo'; import { domainRegExp } from '@/pages/EnterpriseSsoDetails/Experience/DomainsInput/consts'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; import { type FormData } from './utils'; type Props = { diff --git a/packages/console/src/pages/OrganizationDetails/Settings/index.tsx b/packages/console/src/pages/OrganizationDetails/Settings/index.tsx index 56f672653b1..deccae6d65f 100644 --- a/packages/console/src/pages/OrganizationDetails/Settings/index.tsx +++ b/packages/console/src/pages/OrganizationDetails/Settings/index.tsx @@ -24,7 +24,7 @@ import { trySubmitSafe } from '@/utils/form'; import { type OrganizationDetailsOutletContext } from '../types'; import JitSettings from './JitSettings'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; import { assembleData, isJsonObject, normalizeData, type FormData } from './utils'; function Settings() { diff --git a/packages/console/src/pages/OrganizationDetails/index.tsx b/packages/console/src/pages/OrganizationDetails/index.tsx index 222998359ea..0fcc7d8df96 100644 --- a/packages/console/src/pages/OrganizationDetails/index.tsx +++ b/packages/console/src/pages/OrganizationDetails/index.tsx @@ -9,9 +9,9 @@ import { useTranslation } from 'react-i18next'; import { Outlet, useParams } from 'react-router-dom'; import useSWR from 'swr'; -import Delete from '@/assets/icons/delete.svg'; -import File from '@/assets/icons/file.svg'; -import OrganizationIcon from '@/assets/icons/organization-preview.svg'; +import Delete from '@/assets/icons/delete.svg?react'; +import File from '@/assets/icons/file.svg?react'; +import OrganizationIcon from '@/assets/icons/organization-preview.svg?react'; import DetailsPage from '@/components/DetailsPage'; import DetailsPageHeader from '@/components/DetailsPage/DetailsPageHeader'; import Drawer from '@/components/Drawer'; @@ -24,7 +24,7 @@ import useTenantPathname from '@/hooks/use-tenant-pathname'; import Introduction from '../Organizations/Introduction'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; import { OrganizationDetailsTabs, type OrganizationDetailsOutletContext } from './types'; const pathname = '/organizations'; diff --git a/packages/console/src/pages/OrganizationRoleDetails/Permissions/ResourceName/index.tsx b/packages/console/src/pages/OrganizationRoleDetails/Permissions/ResourceName/index.tsx index 8e1ace42c60..2ddb1ccd59e 100644 --- a/packages/console/src/pages/OrganizationRoleDetails/Permissions/ResourceName/index.tsx +++ b/packages/console/src/pages/OrganizationRoleDetails/Permissions/ResourceName/index.tsx @@ -1,9 +1,9 @@ import { type Resource } from '@logto/schemas'; import useSWR from 'swr'; -import ResourceIcon from '@/assets/icons/resource.svg'; +import ResourceIcon from '@/assets/icons/resource.svg?react'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly resourceId: string; diff --git a/packages/console/src/pages/OrganizationRoleDetails/Permissions/index.tsx b/packages/console/src/pages/OrganizationRoleDetails/Permissions/index.tsx index 5dde3b42be5..fdc7387c809 100644 --- a/packages/console/src/pages/OrganizationRoleDetails/Permissions/index.tsx +++ b/packages/console/src/pages/OrganizationRoleDetails/Permissions/index.tsx @@ -4,7 +4,7 @@ import { toast } from 'react-hot-toast'; import { useTranslation } from 'react-i18next'; import { useOutletContext } from 'react-router-dom'; -import Plus from '@/assets/icons/plus.svg'; +import Plus from '@/assets/icons/plus.svg?react'; import ActionsButton from '@/components/ActionsButton'; import Breakable from '@/components/Breakable'; import EditScopeModal, { type EditScopeData } from '@/components/EditScopeModal'; @@ -21,7 +21,7 @@ import useSearchParametersWatcher from '@/hooks/use-search-parameters-watcher'; import { type OrganizationRoleDetailsOutletContext } from '../types'; import ResourceName from './ResourceName'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; import useOrganizationRoleScopes from './use-organization-role-scopes'; type OrganizationRoleScope = OrganizationScope | Scope; diff --git a/packages/console/src/pages/OrganizationRoleDetails/index.tsx b/packages/console/src/pages/OrganizationRoleDetails/index.tsx index 1a52fc0f304..7b9a9351634 100644 --- a/packages/console/src/pages/OrganizationRoleDetails/index.tsx +++ b/packages/console/src/pages/OrganizationRoleDetails/index.tsx @@ -6,8 +6,8 @@ import { useTranslation } from 'react-i18next'; import { Outlet, useLocation, useParams } from 'react-router-dom'; import useSWR, { useSWRConfig } from 'swr'; -import Delete from '@/assets/icons/delete.svg'; -import OrgRoleIcon from '@/assets/icons/organization-role-feature.svg'; +import Delete from '@/assets/icons/delete.svg?react'; +import OrgRoleIcon from '@/assets/icons/organization-role-feature.svg?react'; import DetailsPage from '@/components/DetailsPage'; import DetailsPageHeader from '@/components/DetailsPage/DetailsPageHeader'; import PageMeta from '@/components/PageMeta'; @@ -19,7 +19,7 @@ import TabNav, { TabNavItem } from '@/ds-components/TabNav'; import useApi, { type RequestError } from '@/hooks/use-api'; import useTenantPathname from '@/hooks/use-tenant-pathname'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; import { type OrganizationRoleDetailsOutletContext } from './types'; // Console path for organization roles diff --git a/packages/console/src/pages/OrganizationTemplate/OrganizationPermissions/index.tsx b/packages/console/src/pages/OrganizationTemplate/OrganizationPermissions/index.tsx index d8343c0bd2b..0ac4ab05c3e 100644 --- a/packages/console/src/pages/OrganizationTemplate/OrganizationPermissions/index.tsx +++ b/packages/console/src/pages/OrganizationTemplate/OrganizationPermissions/index.tsx @@ -4,9 +4,9 @@ import { useState } from 'react'; import { useTranslation } from 'react-i18next'; import useSWR from 'swr'; -import Plus from '@/assets/icons/plus.svg'; -import PermissionsEmptyDark from '@/assets/images/permissions-empty-dark.svg'; -import PermissionsEmpty from '@/assets/images/permissions-empty.svg'; +import Plus from '@/assets/icons/plus.svg?react'; +import PermissionsEmptyDark from '@/assets/images/permissions-empty-dark.svg?react'; +import PermissionsEmpty from '@/assets/images/permissions-empty.svg?react'; import ActionsButton from '@/components/ActionsButton'; import Breakable from '@/components/Breakable'; import EmptyDataPlaceholder from '@/components/EmptyDataPlaceholder'; @@ -23,7 +23,7 @@ import useDocumentationUrl from '@/hooks/use-documentation-url'; import useSearchParametersWatcher from '@/hooks/use-search-parameters-watcher'; import { buildUrl, formatSearchKeyword } from '@/utils/url'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; function OrganizationPermissions() { const { t } = useTranslation(undefined, { keyPrefix: 'admin_console' }); diff --git a/packages/console/src/pages/OrganizationTemplate/OrganizationRoles/CreateOrganizationRoleModal.tsx b/packages/console/src/pages/OrganizationTemplate/OrganizationRoles/CreateOrganizationRoleModal.tsx index 6a4546547e3..455aa1041e7 100644 --- a/packages/console/src/pages/OrganizationTemplate/OrganizationRoles/CreateOrganizationRoleModal.tsx +++ b/packages/console/src/pages/OrganizationTemplate/OrganizationRoles/CreateOrganizationRoleModal.tsx @@ -13,10 +13,10 @@ import ModalLayout from '@/ds-components/ModalLayout'; import RadioGroup, { Radio } from '@/ds-components/RadioGroup'; import TextInput from '@/ds-components/TextInput'; import useApi from '@/hooks/use-api'; -import * as modalStyles from '@/scss/modal.module.scss'; +import modalStyles from '@/scss/modal.module.scss'; import { trySubmitSafe } from '@/utils/form'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type FormData = Pick; diff --git a/packages/console/src/pages/OrganizationTemplate/OrganizationRoles/index.tsx b/packages/console/src/pages/OrganizationTemplate/OrganizationRoles/index.tsx index 3a45cea1bcc..bc9bd2ac458 100644 --- a/packages/console/src/pages/OrganizationTemplate/OrganizationRoles/index.tsx +++ b/packages/console/src/pages/OrganizationTemplate/OrganizationRoles/index.tsx @@ -4,10 +4,10 @@ import { useState } from 'react'; import { useTranslation } from 'react-i18next'; import useSWR from 'swr'; -import OrgRoleIcon from '@/assets/icons/organization-role-feature.svg'; -import Plus from '@/assets/icons/plus.svg'; -import RolesEmptyDark from '@/assets/images/roles-empty-dark.svg'; -import RolesEmpty from '@/assets/images/roles-empty.svg'; +import OrgRoleIcon from '@/assets/icons/organization-role-feature.svg?react'; +import Plus from '@/assets/icons/plus.svg?react'; +import RolesEmptyDark from '@/assets/images/roles-empty-dark.svg?react'; +import RolesEmpty from '@/assets/images/roles-empty.svg?react'; import Breakable from '@/components/Breakable'; import EmptyDataPlaceholder from '@/components/EmptyDataPlaceholder'; import ItemPreview from '@/components/ItemPreview'; @@ -27,7 +27,7 @@ import useTenantPathname from '@/hooks/use-tenant-pathname'; import { buildUrl, formatSearchKeyword } from '@/utils/url'; import CreateOrganizationRoleModal from './CreateOrganizationRoleModal'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; function OrganizationRoles() { const { t } = useTranslation(undefined, { keyPrefix: 'admin_console' }); diff --git a/packages/console/src/pages/OrganizationTemplate/index.tsx b/packages/console/src/pages/OrganizationTemplate/index.tsx index 54621c1840d..7c5b3174ad7 100644 --- a/packages/console/src/pages/OrganizationTemplate/index.tsx +++ b/packages/console/src/pages/OrganizationTemplate/index.tsx @@ -4,8 +4,8 @@ import classNames from 'classnames'; import { useCallback, useContext, useState } from 'react'; import { Outlet } from 'react-router-dom'; -import OrganizationEmptyDark from '@/assets/images/organization-empty-dark.svg'; -import OrganizationEmpty from '@/assets/images/organization-empty.svg'; +import OrganizationEmptyDark from '@/assets/images/organization-empty-dark.svg?react'; +import OrganizationEmpty from '@/assets/images/organization-empty.svg?react'; import Drawer from '@/components/Drawer'; import PageMeta from '@/components/PageMeta'; import { OrganizationTemplateTabs, organizationTemplateLink } from '@/consts'; @@ -21,11 +21,11 @@ import TabNav, { TabNavItem } from '@/ds-components/TabNav'; import TablePlaceholder from '@/ds-components/Table/TablePlaceholder'; import useDocumentationUrl from '@/hooks/use-documentation-url'; import useTenantPathname from '@/hooks/use-tenant-pathname'; -import * as pageLayout from '@/scss/page-layout.module.scss'; +import pageLayout from '@/scss/page-layout.module.scss'; import Introduction from '../Organizations/Introduction'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; const basePathname = '/organization-template'; diff --git a/packages/console/src/pages/Organizations/CreateOrganizationModal/index.tsx b/packages/console/src/pages/Organizations/CreateOrganizationModal/index.tsx index fb6c54723e7..52870cc010e 100644 --- a/packages/console/src/pages/Organizations/CreateOrganizationModal/index.tsx +++ b/packages/console/src/pages/Organizations/CreateOrganizationModal/index.tsx @@ -13,7 +13,7 @@ import FormField from '@/ds-components/FormField'; import ModalLayout from '@/ds-components/ModalLayout'; import TextInput from '@/ds-components/TextInput'; import useApi from '@/hooks/use-api'; -import * as modalStyles from '@/scss/modal.module.scss'; +import modalStyles from '@/scss/modal.module.scss'; import { trySubmitSafe } from '@/utils/form'; type Props = { diff --git a/packages/console/src/pages/Organizations/Introduction/components/FlexBox/index.tsx b/packages/console/src/pages/Organizations/Introduction/components/FlexBox/index.tsx index d201bd5f3a5..a8e70c7202e 100644 --- a/packages/console/src/pages/Organizations/Introduction/components/FlexBox/index.tsx +++ b/packages/console/src/pages/Organizations/Introduction/components/FlexBox/index.tsx @@ -1,7 +1,7 @@ import classNames from 'classnames'; import { type CSSProperties, type PropsWithChildren } from 'react'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly className?: string; diff --git a/packages/console/src/pages/Organizations/Introduction/components/InteractiveDiagram/index.tsx b/packages/console/src/pages/Organizations/Introduction/components/InteractiveDiagram/index.tsx index 5adadf47435..e1af530f30b 100644 --- a/packages/console/src/pages/Organizations/Introduction/components/InteractiveDiagram/index.tsx +++ b/packages/console/src/pages/Organizations/Introduction/components/InteractiveDiagram/index.tsx @@ -9,7 +9,7 @@ import User from '../User'; import JohnVector from '../Vector/John'; import SarahVector from '../Vector/Sarah'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; function InteractiveDiagram() { const { t } = useTranslation(undefined, { keyPrefix: 'admin_console.organizations' }); diff --git a/packages/console/src/pages/Organizations/Introduction/components/Panel/index.tsx b/packages/console/src/pages/Organizations/Introduction/components/Panel/index.tsx index fc9d774ee09..e7550da4bdf 100644 --- a/packages/console/src/pages/Organizations/Introduction/components/Panel/index.tsx +++ b/packages/console/src/pages/Organizations/Introduction/components/Panel/index.tsx @@ -1,7 +1,7 @@ import classNames from 'classnames'; import { type PropsWithChildren } from 'react'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly className?: string; diff --git a/packages/console/src/pages/Organizations/Introduction/components/Permission/index.tsx b/packages/console/src/pages/Organizations/Introduction/components/Permission/index.tsx index 55e609a3c76..03801eb73e1 100644 --- a/packages/console/src/pages/Organizations/Introduction/components/Permission/index.tsx +++ b/packages/console/src/pages/Organizations/Introduction/components/Permission/index.tsx @@ -1,6 +1,6 @@ import classNames from 'classnames'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly className?: string; diff --git a/packages/console/src/pages/Organizations/Introduction/components/Role/index.tsx b/packages/console/src/pages/Organizations/Introduction/components/Role/index.tsx index 23cdc6ecd4a..b15520ec97e 100644 --- a/packages/console/src/pages/Organizations/Introduction/components/Role/index.tsx +++ b/packages/console/src/pages/Organizations/Introduction/components/Role/index.tsx @@ -5,7 +5,7 @@ import Tooltip from '@/ds-components/Tip/Tooltip'; import FlexBox from '../FlexBox'; import Permission from '../Permission'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly className?: string; diff --git a/packages/console/src/pages/Organizations/Introduction/components/Section/index.tsx b/packages/console/src/pages/Organizations/Introduction/components/Section/index.tsx index a32cbfb3cb7..0578b4d2122 100644 --- a/packages/console/src/pages/Organizations/Introduction/components/Section/index.tsx +++ b/packages/console/src/pages/Organizations/Introduction/components/Section/index.tsx @@ -3,7 +3,7 @@ import { type PropsWithChildren } from 'react'; import FlexBox from '../FlexBox'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; /** * The section component with a gray background diff --git a/packages/console/src/pages/Organizations/Introduction/components/User/index.tsx b/packages/console/src/pages/Organizations/Introduction/components/User/index.tsx index 0b5f78e9d79..76ff8fdc22c 100644 --- a/packages/console/src/pages/Organizations/Introduction/components/User/index.tsx +++ b/packages/console/src/pages/Organizations/Introduction/components/User/index.tsx @@ -1,9 +1,9 @@ import classNames from 'classnames'; -import UserIcon from '@/assets/icons/user.svg'; +import UserIcon from '@/assets/icons/user.svg?react'; import Tooltip from '@/ds-components/Tip/Tooltip'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly className?: string; diff --git a/packages/console/src/pages/Organizations/Introduction/components/Vector/John.tsx b/packages/console/src/pages/Organizations/Introduction/components/Vector/John.tsx index 93606c1b109..e4ad7094910 100644 --- a/packages/console/src/pages/Organizations/Introduction/components/Vector/John.tsx +++ b/packages/console/src/pages/Organizations/Introduction/components/Vector/John.tsx @@ -1,6 +1,6 @@ import classNames from 'classnames'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly isActive?: boolean; diff --git a/packages/console/src/pages/Organizations/Introduction/components/Vector/Sarah.tsx b/packages/console/src/pages/Organizations/Introduction/components/Vector/Sarah.tsx index c1f5a2ce8f5..3d70bd51369 100644 --- a/packages/console/src/pages/Organizations/Introduction/components/Vector/Sarah.tsx +++ b/packages/console/src/pages/Organizations/Introduction/components/Vector/Sarah.tsx @@ -1,6 +1,6 @@ import classNames from 'classnames'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly isActive?: boolean; diff --git a/packages/console/src/pages/Organizations/Introduction/index.tsx b/packages/console/src/pages/Organizations/Introduction/index.tsx index d49cda7115d..02a76004d24 100644 --- a/packages/console/src/pages/Organizations/Introduction/index.tsx +++ b/packages/console/src/pages/Organizations/Introduction/index.tsx @@ -2,8 +2,8 @@ import { Theme } from '@logto/schemas'; import classNames from 'classnames'; import { useTranslation } from 'react-i18next'; -import OrganizationFeatureDark from '@/assets/icons/organization-feature-dark.svg'; -import OrganizationFeature from '@/assets/icons/organization-feature.svg'; +import OrganizationFeatureDark from '@/assets/icons/organization-feature-dark.svg?react'; +import OrganizationFeature from '@/assets/icons/organization-feature.svg?react'; import Card from '@/ds-components/Card'; import OverlayScrollbar from '@/ds-components/OverlayScrollbar'; import useTheme from '@/hooks/use-theme'; @@ -15,7 +15,7 @@ import Permission from './components/Permission'; import Role from './components/Role'; import Section from './components/Section'; import User from './components/User'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; const icons = { [Theme.Light]: { OrganizationIcon: OrganizationFeature }, diff --git a/packages/console/src/pages/Organizations/OrganizationsTable/EmptyDataPlaceholder/index.tsx b/packages/console/src/pages/Organizations/OrganizationsTable/EmptyDataPlaceholder/index.tsx index 183b121197b..00480ef644c 100644 --- a/packages/console/src/pages/Organizations/OrganizationsTable/EmptyDataPlaceholder/index.tsx +++ b/packages/console/src/pages/Organizations/OrganizationsTable/EmptyDataPlaceholder/index.tsx @@ -1,14 +1,14 @@ import { Theme } from '@logto/schemas'; import { useTranslation } from 'react-i18next'; -import Plus from '@/assets/icons/plus.svg'; -import OrganizationEmptyDark from '@/assets/images/organization-empty-dark.svg'; -import OrganizationEmpty from '@/assets/images/organization-empty.svg'; +import Plus from '@/assets/icons/plus.svg?react'; +import OrganizationEmptyDark from '@/assets/images/organization-empty-dark.svg?react'; +import OrganizationEmpty from '@/assets/images/organization-empty.svg?react'; import Button, { type Props as ButtonProps } from '@/ds-components/Button'; import useConfigs from '@/hooks/use-configs'; import useTheme from '@/hooks/use-theme'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { /** Override the default button properties in the placeholder */ diff --git a/packages/console/src/pages/Organizations/OrganizationsTable/index.tsx b/packages/console/src/pages/Organizations/OrganizationsTable/index.tsx index 911c58e2f18..39f5ed69ece 100644 --- a/packages/console/src/pages/Organizations/OrganizationsTable/index.tsx +++ b/packages/console/src/pages/Organizations/OrganizationsTable/index.tsx @@ -4,7 +4,7 @@ import { useState } from 'react'; import { useTranslation } from 'react-i18next'; import useSWR from 'swr'; -import OrganizationIcon from '@/assets/icons/organization-preview.svg'; +import OrganizationIcon from '@/assets/icons/organization-preview.svg?react'; import NotFoundDataPlaceholder from '@/components/EmptyDataPlaceholder'; import ItemPreview from '@/components/ItemPreview'; import ThemedIcon from '@/components/ThemedIcon'; @@ -15,7 +15,7 @@ import Table from '@/ds-components/Table'; import { type RequestError } from '@/hooks/use-api'; import useTenantPathname from '@/hooks/use-tenant-pathname'; import AssignedEntities from '@/pages/Roles/components/AssignedEntities'; -import * as pageLayout from '@/scss/page-layout.module.scss'; +import pageLayout from '@/scss/page-layout.module.scss'; import { buildUrl } from '@/utils/url'; import EmptyDataPlaceholder from './EmptyDataPlaceholder'; diff --git a/packages/console/src/pages/Organizations/index.tsx b/packages/console/src/pages/Organizations/index.tsx index bd370fc673d..e33508aef47 100644 --- a/packages/console/src/pages/Organizations/index.tsx +++ b/packages/console/src/pages/Organizations/index.tsx @@ -2,7 +2,7 @@ import { ReservedPlanId } from '@logto/schemas'; import { cond } from '@silverhand/essentials'; import { useCallback, useContext, useState } from 'react'; -import Plus from '@/assets/icons/plus.svg'; +import Plus from '@/assets/icons/plus.svg?react'; import PageMeta from '@/components/PageMeta'; import { organizationsFeatureLink } from '@/consts'; import { isCloud } from '@/consts/env'; @@ -14,12 +14,12 @@ import Card from '@/ds-components/Card'; import CardTitle from '@/ds-components/CardTitle'; import useDocumentationUrl from '@/hooks/use-documentation-url'; import useTenantPathname from '@/hooks/use-tenant-pathname'; -import * as pageLayout from '@/scss/page-layout.module.scss'; +import pageLayout from '@/scss/page-layout.module.scss'; import CreateOrganizationModal from './CreateOrganizationModal'; import OrganizationsTable from './OrganizationsTable'; import EmptyDataPlaceholder from './OrganizationsTable/EmptyDataPlaceholder'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; const organizationsPathname = '/organizations'; diff --git a/packages/console/src/pages/Profile/components/CardContent/index.tsx b/packages/console/src/pages/Profile/components/CardContent/index.tsx index 19b80ee82b8..6a641f2c462 100644 --- a/packages/console/src/pages/Profile/components/CardContent/index.tsx +++ b/packages/console/src/pages/Profile/components/CardContent/index.tsx @@ -8,7 +8,7 @@ import DynamicT from '@/ds-components/DynamicT'; import NotSet from '../NotSet'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Action = { name: AdminConsoleKey; diff --git a/packages/console/src/pages/Profile/components/ExperienceLikeModal/index.tsx b/packages/console/src/pages/Profile/components/ExperienceLikeModal/index.tsx index 7c82358e6e5..ba443d51376 100644 --- a/packages/console/src/pages/Profile/components/ExperienceLikeModal/index.tsx +++ b/packages/console/src/pages/Profile/components/ExperienceLikeModal/index.tsx @@ -5,12 +5,12 @@ import { Trans, useTranslation } from 'react-i18next'; import ReactModal from 'react-modal'; import { useNavigate } from 'react-router-dom'; -import Arrow from '@/assets/icons/arrow-left.svg'; +import Arrow from '@/assets/icons/arrow-left.svg?react'; import DynamicT from '@/ds-components/DynamicT'; import TextLink from '@/ds-components/TextLink'; -import * as modalStyles from '@/scss/modal.module.scss'; +import modalStyles from '@/scss/modal.module.scss'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = PropsWithChildren<{ readonly title: AdminConsoleKey; diff --git a/packages/console/src/pages/Profile/components/LinkAccountSection/index.tsx b/packages/console/src/pages/Profile/components/LinkAccountSection/index.tsx index 8a00dd71554..7d9654366c1 100644 --- a/packages/console/src/pages/Profile/components/LinkAccountSection/index.tsx +++ b/packages/console/src/pages/Profile/components/LinkAccountSection/index.tsx @@ -8,7 +8,7 @@ import { appendPath, conditional } from '@silverhand/essentials'; import { useCallback, useMemo } from 'react'; import { Trans, useTranslation } from 'react-i18next'; -import MailIcon from '@/assets/icons/mail.svg'; +import MailIcon from '@/assets/icons/mail.svg?react'; import FormCard from '@/components/FormCard'; import UnnamedTrans from '@/components/UnnamedTrans'; import UserInfoCard from '@/components/UserInfoCard'; @@ -24,7 +24,7 @@ import type { Row } from '../CardContent'; import CardContent from '../CardContent'; import NotSet from '../NotSet'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly user: UserProfileResponse; diff --git a/packages/console/src/pages/Profile/components/NotSet/index.tsx b/packages/console/src/pages/Profile/components/NotSet/index.tsx index b142cc9adef..21ecc277835 100644 --- a/packages/console/src/pages/Profile/components/NotSet/index.tsx +++ b/packages/console/src/pages/Profile/components/NotSet/index.tsx @@ -1,6 +1,6 @@ import { useTranslation } from 'react-i18next'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; function NotSet() { const { t } = useTranslation(undefined, { keyPrefix: 'admin_console' }); diff --git a/packages/console/src/pages/Profile/components/Skeleton/index.tsx b/packages/console/src/pages/Profile/components/Skeleton/index.tsx index 87c5c5221fd..50a3154b54b 100644 --- a/packages/console/src/pages/Profile/components/Skeleton/index.tsx +++ b/packages/console/src/pages/Profile/components/Skeleton/index.tsx @@ -1,4 +1,4 @@ -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; function Skeleton() { return ( diff --git a/packages/console/src/pages/Profile/containers/BasicUserInfoUpdateModal/index.tsx b/packages/console/src/pages/Profile/containers/BasicUserInfoUpdateModal/index.tsx index 74b93ffb424..ee5bfa6a9f2 100644 --- a/packages/console/src/pages/Profile/containers/BasicUserInfoUpdateModal/index.tsx +++ b/packages/console/src/pages/Profile/containers/BasicUserInfoUpdateModal/index.tsx @@ -13,7 +13,7 @@ import ImageUploaderField from '@/ds-components/Uploader/ImageUploaderField'; import { useStaticApi } from '@/hooks/use-api'; import { useConfirmModal } from '@/hooks/use-confirm-modal'; import useUserAssetsService from '@/hooks/use-user-assets-service'; -import * as modalStyles from '@/scss/modal.module.scss'; +import modalStyles from '@/scss/modal.module.scss'; import { handleError } from '../../utils'; diff --git a/packages/console/src/pages/Profile/containers/ChangePasswordModal/index.tsx b/packages/console/src/pages/Profile/containers/ChangePasswordModal/index.tsx index 9a209b174da..2691f6e1ab2 100644 --- a/packages/console/src/pages/Profile/containers/ChangePasswordModal/index.tsx +++ b/packages/console/src/pages/Profile/containers/ChangePasswordModal/index.tsx @@ -4,7 +4,7 @@ import { useForm } from 'react-hook-form'; import { toast } from 'react-hot-toast'; import { useTranslation } from 'react-i18next'; -import ClearInput from '@/assets/icons/clear-input.svg'; +import ClearInput from '@/assets/icons/clear-input.svg?react'; import { adminTenantEndpoint, meApi } from '@/consts'; import Button from '@/ds-components/Button'; import Checkbox from '@/ds-components/Checkbox'; diff --git a/packages/console/src/pages/Profile/containers/DeleteAccountModal/components/DeletionConfirmationModal/index.tsx b/packages/console/src/pages/Profile/containers/DeleteAccountModal/components/DeletionConfirmationModal/index.tsx index db4c3492ec4..332ce24997c 100644 --- a/packages/console/src/pages/Profile/containers/DeleteAccountModal/components/DeletionConfirmationModal/index.tsx +++ b/packages/console/src/pages/Profile/containers/DeleteAccountModal/components/DeletionConfirmationModal/index.tsx @@ -9,7 +9,7 @@ import { TenantsContext } from '@/contexts/TenantsProvider'; import Button from '@/ds-components/Button'; import ModalLayout from '@/ds-components/ModalLayout'; -import * as styles from '../../index.module.scss'; +import styles from '../../index.module.scss'; import FinalConfirmationModal from '../FinalConfirmationModal'; import TenantsList from '../TenantsList'; diff --git a/packages/console/src/pages/Profile/containers/DeleteAccountModal/components/FinalConfirmationModal/index.tsx b/packages/console/src/pages/Profile/containers/DeleteAccountModal/components/FinalConfirmationModal/index.tsx index e71b4ad7e9a..984017263b5 100644 --- a/packages/console/src/pages/Profile/containers/DeleteAccountModal/components/FinalConfirmationModal/index.tsx +++ b/packages/console/src/pages/Profile/containers/DeleteAccountModal/components/FinalConfirmationModal/index.tsx @@ -10,9 +10,9 @@ import { TenantsContext } from '@/contexts/TenantsProvider'; import Button from '@/ds-components/Button'; import ModalLayout from '@/ds-components/ModalLayout'; import useRedirectUri from '@/hooks/use-redirect-uri'; -import * as modalStyles from '@/scss/modal.module.scss'; +import modalStyles from '@/scss/modal.module.scss'; -import * as styles from '../../index.module.scss'; +import styles from '../../index.module.scss'; type Props = { readonly userId: string; diff --git a/packages/console/src/pages/Profile/containers/DeleteAccountModal/components/TenantsIssuesModal/index.tsx b/packages/console/src/pages/Profile/containers/DeleteAccountModal/components/TenantsIssuesModal/index.tsx index 1a0a6bba0bb..472396df5b1 100644 --- a/packages/console/src/pages/Profile/containers/DeleteAccountModal/components/TenantsIssuesModal/index.tsx +++ b/packages/console/src/pages/Profile/containers/DeleteAccountModal/components/TenantsIssuesModal/index.tsx @@ -5,7 +5,7 @@ import { type TenantResponse } from '@/cloud/types/router'; import Button from '@/ds-components/Button'; import ModalLayout from '@/ds-components/ModalLayout'; -import * as styles from '../../index.module.scss'; +import styles from '../../index.module.scss'; import TenantsList from '../TenantsList'; type Props = { diff --git a/packages/console/src/pages/Profile/containers/DeleteAccountModal/components/TenantsList/index.tsx b/packages/console/src/pages/Profile/containers/DeleteAccountModal/components/TenantsList/index.tsx index 464431d3e8c..dd901fcde46 100644 --- a/packages/console/src/pages/Profile/containers/DeleteAccountModal/components/TenantsList/index.tsx +++ b/packages/console/src/pages/Profile/containers/DeleteAccountModal/components/TenantsList/index.tsx @@ -1,6 +1,6 @@ import { type TenantResponse } from '@/cloud/types/router'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly description: string; diff --git a/packages/console/src/pages/Profile/containers/DeleteAccountModal/index.tsx b/packages/console/src/pages/Profile/containers/DeleteAccountModal/index.tsx index 822ac27ddc6..6274b4bb5e0 100644 --- a/packages/console/src/pages/Profile/containers/DeleteAccountModal/index.tsx +++ b/packages/console/src/pages/Profile/containers/DeleteAccountModal/index.tsx @@ -3,7 +3,7 @@ import { useContext } from 'react'; import ReactModal from 'react-modal'; import { TenantsContext } from '@/contexts/TenantsProvider'; -import * as modalStyles from '@/scss/modal.module.scss'; +import modalStyles from '@/scss/modal.module.scss'; import DeletionConfirmationModal from './components/DeletionConfirmationModal'; import TenantsIssuesModal from './components/TenantsIssuesModal'; diff --git a/packages/console/src/pages/Profile/containers/VerificationCodeModal/index.tsx b/packages/console/src/pages/Profile/containers/VerificationCodeModal/index.tsx index 31a660397a3..a5e217af1cf 100644 --- a/packages/console/src/pages/Profile/containers/VerificationCodeModal/index.tsx +++ b/packages/console/src/pages/Profile/containers/VerificationCodeModal/index.tsx @@ -5,7 +5,7 @@ import { useTranslation } from 'react-i18next'; import { useLocation } from 'react-router-dom'; import { useTimer } from 'react-timer-hook'; -import ArrowConnection from '@/assets/icons/arrow-connection.svg'; +import ArrowConnection from '@/assets/icons/arrow-connection.svg?react'; import VerificationCodeInput, { defaultLength } from '@/components/VerificationCodeInput'; import { adminTenantEndpoint, meApi } from '@/consts'; import TextLink from '@/ds-components/TextLink'; @@ -17,7 +17,7 @@ import useTenantPathname from '@/hooks/use-tenant-pathname'; import ExperienceLikeModal from '../../components/ExperienceLikeModal'; import { handleError, parseLocationState } from '../../utils'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; const resendTimeout = 59; diff --git a/packages/console/src/pages/Profile/containers/VerifyPasswordModal/index.tsx b/packages/console/src/pages/Profile/containers/VerifyPasswordModal/index.tsx index b5d76284fcb..cfd09b8e9b2 100644 --- a/packages/console/src/pages/Profile/containers/VerifyPasswordModal/index.tsx +++ b/packages/console/src/pages/Profile/containers/VerifyPasswordModal/index.tsx @@ -3,9 +3,9 @@ import { useForm } from 'react-hook-form'; import { useTranslation } from 'react-i18next'; import { useLocation } from 'react-router-dom'; -import ArrowConnection from '@/assets/icons/arrow-connection.svg'; -import PasswordHideIcon from '@/assets/icons/password-hide.svg'; -import PasswordShowIcon from '@/assets/icons/password-show.svg'; +import ArrowConnection from '@/assets/icons/arrow-connection.svg?react'; +import PasswordHideIcon from '@/assets/icons/password-hide.svg?react'; +import PasswordShowIcon from '@/assets/icons/password-show.svg?react'; import { adminTenantEndpoint, meApi } from '@/consts'; import Button from '@/ds-components/Button'; import IconButton from '@/ds-components/IconButton'; @@ -17,7 +17,7 @@ import useTenantPathname from '@/hooks/use-tenant-pathname'; import ExperienceLikeModal from '../../components/ExperienceLikeModal'; import { handleError, parseLocationState } from '../../utils'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type FormFields = { password: string; diff --git a/packages/console/src/pages/Profile/index.tsx b/packages/console/src/pages/Profile/index.tsx index 77e5e067645..45ac4edd110 100644 --- a/packages/console/src/pages/Profile/index.tsx +++ b/packages/console/src/pages/Profile/index.tsx @@ -22,7 +22,7 @@ import { usePlausiblePageview } from '@/hooks/use-plausible-pageview'; import useSwrFetcher from '@/hooks/use-swr-fetcher'; import useTenantPathname from '@/hooks/use-tenant-pathname'; import useUserAssetsService from '@/hooks/use-user-assets-service'; -import * as pageLayout from '@/scss/page-layout.module.scss'; +import pageLayout from '@/scss/page-layout.module.scss'; import BasicUserInfoSection from './components/BasicUserInfoSection'; import CardContent from './components/CardContent'; @@ -30,7 +30,7 @@ import LinkAccountSection from './components/LinkAccountSection'; import NotSet from './components/NotSet'; import Skeleton from './components/Skeleton'; import DeleteAccountModal from './containers/DeleteAccountModal'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; if (isDevFeaturesEnabled) { initLocalization(); diff --git a/packages/console/src/pages/RoleDetails/RoleApplications/index.tsx b/packages/console/src/pages/RoleDetails/RoleApplications/index.tsx index 7c66743d50f..2cc9dacf8ba 100644 --- a/packages/console/src/pages/RoleDetails/RoleApplications/index.tsx +++ b/packages/console/src/pages/RoleDetails/RoleApplications/index.tsx @@ -6,8 +6,8 @@ import { useTranslation } from 'react-i18next'; import { useOutletContext } from 'react-router-dom'; import useSWR from 'swr'; -import Delete from '@/assets/icons/delete.svg'; -import Plus from '@/assets/icons/plus.svg'; +import Delete from '@/assets/icons/delete.svg?react'; +import Plus from '@/assets/icons/plus.svg?react'; import ApplicationIcon from '@/components/ApplicationIcon'; import EmptyDataPlaceholder from '@/components/EmptyDataPlaceholder'; import ItemPreview from '@/components/ItemPreview'; @@ -26,7 +26,7 @@ import { buildUrl, formatSearchKeyword } from '@/utils/url'; import type { RoleDetailsOutletContext } from '../types'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; const pageSize = defaultPageSize; diff --git a/packages/console/src/pages/RoleDetails/RolePermissions/components/AssignPermissionsModal/index.tsx b/packages/console/src/pages/RoleDetails/RolePermissions/components/AssignPermissionsModal/index.tsx index eb5b24cf43d..9f7e85f148f 100644 --- a/packages/console/src/pages/RoleDetails/RolePermissions/components/AssignPermissionsModal/index.tsx +++ b/packages/console/src/pages/RoleDetails/RolePermissions/components/AssignPermissionsModal/index.tsx @@ -13,7 +13,7 @@ import Button from '@/ds-components/Button'; import FormField from '@/ds-components/FormField'; import ModalLayout from '@/ds-components/ModalLayout'; import useApi from '@/hooks/use-api'; -import * as modalStyles from '@/scss/modal.module.scss'; +import modalStyles from '@/scss/modal.module.scss'; import { hasSurpassedQuotaLimit } from '@/utils/quota'; type Props = { diff --git a/packages/console/src/pages/RoleDetails/RoleUsers/index.tsx b/packages/console/src/pages/RoleDetails/RoleUsers/index.tsx index b2991cf7e5c..0aa9e471812 100644 --- a/packages/console/src/pages/RoleDetails/RoleUsers/index.tsx +++ b/packages/console/src/pages/RoleDetails/RoleUsers/index.tsx @@ -6,8 +6,8 @@ import { useTranslation } from 'react-i18next'; import { useOutletContext } from 'react-router-dom'; import useSWR from 'swr'; -import Delete from '@/assets/icons/delete.svg'; -import Plus from '@/assets/icons/plus.svg'; +import Delete from '@/assets/icons/delete.svg?react'; +import Plus from '@/assets/icons/plus.svg?react'; import ApplicationName from '@/components/ApplicationName'; import DateTime from '@/components/DateTime'; import EmptyDataPlaceholder from '@/components/EmptyDataPlaceholder'; @@ -27,7 +27,7 @@ import { buildUrl, formatSearchKeyword } from '@/utils/url'; import type { RoleDetailsOutletContext } from '../types'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; const pageSize = defaultPageSize; diff --git a/packages/console/src/pages/RoleDetails/index.tsx b/packages/console/src/pages/RoleDetails/index.tsx index 6fa85c7851a..a7faa442dd8 100644 --- a/packages/console/src/pages/RoleDetails/index.tsx +++ b/packages/console/src/pages/RoleDetails/index.tsx @@ -7,7 +7,7 @@ import { Trans, useTranslation } from 'react-i18next'; import { Outlet, useLocation, useParams } from 'react-router-dom'; import useSWR, { useSWRConfig } from 'swr'; -import Delete from '@/assets/icons/delete.svg'; +import Delete from '@/assets/icons/delete.svg?react'; import DetailsPage from '@/components/DetailsPage'; import DetailsPageHeader from '@/components/DetailsPage/DetailsPageHeader'; import RoleIcon from '@/components/RoleIcon'; @@ -22,7 +22,7 @@ import useTenantPathname from '@/hooks/use-tenant-pathname'; import useTheme from '@/hooks/use-theme'; import useUserPreferences from '@/hooks/use-user-preferences'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; import { type RoleDetailsOutletContext } from './types'; function RoleDetails() { diff --git a/packages/console/src/pages/Roles/components/AssignRoleModal/index.tsx b/packages/console/src/pages/Roles/components/AssignRoleModal/index.tsx index 3f3b530d83b..caaf8ba0456 100644 --- a/packages/console/src/pages/Roles/components/AssignRoleModal/index.tsx +++ b/packages/console/src/pages/Roles/components/AssignRoleModal/index.tsx @@ -12,7 +12,7 @@ import DynamicT from '@/ds-components/DynamicT'; import FormField from '@/ds-components/FormField'; import ModalLayout from '@/ds-components/ModalLayout'; import useApi from '@/hooks/use-api'; -import * as modalStyles from '@/scss/modal.module.scss'; +import modalStyles from '@/scss/modal.module.scss'; const isUserEntity = (entity: User | Application): entity is User => 'customData' in entity || 'identities' in entity; diff --git a/packages/console/src/pages/Roles/components/AssignedEntities/index.tsx b/packages/console/src/pages/Roles/components/AssignedEntities/index.tsx index faed3b43775..4569b2b02f0 100644 --- a/packages/console/src/pages/Roles/components/AssignedEntities/index.tsx +++ b/packages/console/src/pages/Roles/components/AssignedEntities/index.tsx @@ -6,7 +6,7 @@ import ApplicationIcon from '@/components/ApplicationIcon'; import UserAvatar from '@/components/UserAvatar'; import DynamicT from '@/ds-components/DynamicT'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type User = GetArrayElementType; type Application = GetArrayElementType; diff --git a/packages/console/src/pages/Roles/components/CreateRoleForm/index.tsx b/packages/console/src/pages/Roles/components/CreateRoleForm/index.tsx index f4433e6968c..d7bbfec7e81 100644 --- a/packages/console/src/pages/Roles/components/CreateRoleForm/index.tsx +++ b/packages/console/src/pages/Roles/components/CreateRoleForm/index.tsx @@ -15,7 +15,7 @@ import useApi from '@/hooks/use-api'; import { trySubmitSafe } from '@/utils/form'; import Footer from './Footer'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type RadioOption = { key: AdminConsoleKey; value: RoleType }; diff --git a/packages/console/src/pages/Roles/components/CreateRoleModal/index.tsx b/packages/console/src/pages/Roles/components/CreateRoleModal/index.tsx index e0763f4589e..1351cb11563 100644 --- a/packages/console/src/pages/Roles/components/CreateRoleModal/index.tsx +++ b/packages/console/src/pages/Roles/components/CreateRoleModal/index.tsx @@ -5,7 +5,7 @@ import { useTranslation } from 'react-i18next'; import ReactModal from 'react-modal'; import useTenantPathname from '@/hooks/use-tenant-pathname'; -import * as modalStyles from '@/scss/modal.module.scss'; +import modalStyles from '@/scss/modal.module.scss'; import AssignRoleModal from '../AssignRoleModal'; import type { Props as CreateRoleFormProps } from '../CreateRoleForm'; diff --git a/packages/console/src/pages/Roles/index.tsx b/packages/console/src/pages/Roles/index.tsx index f3bd1106584..1f864d8a595 100644 --- a/packages/console/src/pages/Roles/index.tsx +++ b/packages/console/src/pages/Roles/index.tsx @@ -4,9 +4,9 @@ import { useTranslation } from 'react-i18next'; import { useLocation } from 'react-router-dom'; import useSWR from 'swr'; -import Plus from '@/assets/icons/plus.svg'; -import RolesEmptyDark from '@/assets/images/roles-empty-dark.svg'; -import RolesEmpty from '@/assets/images/roles-empty.svg'; +import Plus from '@/assets/icons/plus.svg?react'; +import RolesEmptyDark from '@/assets/images/roles-empty-dark.svg?react'; +import RolesEmpty from '@/assets/images/roles-empty.svg?react'; import Breakable from '@/components/Breakable'; import EmptyDataPlaceholder from '@/components/EmptyDataPlaceholder'; import ItemPreview from '@/components/ItemPreview'; diff --git a/packages/console/src/pages/SignInExperience/PageContent/Branding/BrandingForm/index.tsx b/packages/console/src/pages/SignInExperience/PageContent/Branding/BrandingForm/index.tsx index 26196842229..2859092b271 100644 --- a/packages/console/src/pages/SignInExperience/PageContent/Branding/BrandingForm/index.tsx +++ b/packages/console/src/pages/SignInExperience/PageContent/Branding/BrandingForm/index.tsx @@ -14,7 +14,7 @@ import Switch from '@/ds-components/Switch'; import type { SignInExperienceForm } from '../../../types'; import FormSectionTitle from '../../components/FormSectionTitle'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; function BrandingForm() { const { t } = useTranslation(undefined, { keyPrefix: 'admin_console' }); diff --git a/packages/console/src/pages/SignInExperience/PageContent/Branding/CustomUiForm/index.tsx b/packages/console/src/pages/SignInExperience/PageContent/Branding/CustomUiForm/index.tsx index 961c40bbf81..87fc79db8c1 100644 --- a/packages/console/src/pages/SignInExperience/PageContent/Branding/CustomUiForm/index.tsx +++ b/packages/console/src/pages/SignInExperience/PageContent/Branding/CustomUiForm/index.tsx @@ -16,7 +16,7 @@ import useDocumentationUrl from '@/hooks/use-documentation-url'; import type { SignInExperienceForm } from '../../../types'; import FormSectionTitle from '../../components/FormSectionTitle'; -import * as brandingStyles from './index.module.scss'; +import brandingStyles from './index.module.scss'; function CustomUiForm() { const { t } = useTranslation(undefined, { keyPrefix: 'admin_console' }); diff --git a/packages/console/src/pages/SignInExperience/PageContent/Content/LanguagesForm/ManageLanguage/LanguageEditor/AddLanguageSelector.tsx b/packages/console/src/pages/SignInExperience/PageContent/Content/LanguagesForm/ManageLanguage/LanguageEditor/AddLanguageSelector.tsx index 5f50be6c951..1397dfe2d4d 100644 --- a/packages/console/src/pages/SignInExperience/PageContent/Content/LanguagesForm/ManageLanguage/LanguageEditor/AddLanguageSelector.tsx +++ b/packages/console/src/pages/SignInExperience/PageContent/Content/LanguagesForm/ManageLanguage/LanguageEditor/AddLanguageSelector.tsx @@ -4,15 +4,15 @@ import type { ChangeEvent } from 'react'; import { useEffect, useRef, useState } from 'react'; import { useTranslation } from 'react-i18next'; -import Plus from '@/assets/icons/plus.svg'; -import SearchIcon from '@/assets/icons/search.svg'; +import Plus from '@/assets/icons/plus.svg?react'; +import SearchIcon from '@/assets/icons/search.svg?react'; import Button from '@/ds-components/Button'; import DynamicT from '@/ds-components/DynamicT'; import OverlayScrollbar from '@/ds-components/OverlayScrollbar'; import TextInput from '@/ds-components/TextInput'; import { onKeyDownHandler } from '@/utils/a11y'; -import * as style from './AddLanguageSelector.module.scss'; +import style from './AddLanguageSelector.module.scss'; type Props = { readonly options: LanguageTag[]; diff --git a/packages/console/src/pages/SignInExperience/PageContent/Content/LanguagesForm/ManageLanguage/LanguageEditor/LanguageDetails.tsx b/packages/console/src/pages/SignInExperience/PageContent/Content/LanguagesForm/ManageLanguage/LanguageEditor/LanguageDetails.tsx index fe64750ba4d..715b2af4e9e 100644 --- a/packages/console/src/pages/SignInExperience/PageContent/Content/LanguagesForm/ManageLanguage/LanguageEditor/LanguageDetails.tsx +++ b/packages/console/src/pages/SignInExperience/PageContent/Content/LanguagesForm/ManageLanguage/LanguageEditor/LanguageDetails.tsx @@ -15,8 +15,8 @@ import { toast } from 'react-hot-toast'; import { useTranslation } from 'react-i18next'; import useSWR, { useSWRConfig } from 'swr'; -import Clear from '@/assets/icons/clear.svg'; -import Delete from '@/assets/icons/delete.svg'; +import Clear from '@/assets/icons/clear.svg?react'; +import Delete from '@/assets/icons/delete.svg?react'; import Button from '@/ds-components/Button'; import ConfirmModal from '@/ds-components/ConfirmModal'; import IconButton from '@/ds-components/IconButton'; @@ -31,7 +31,7 @@ import type { CustomPhraseResponse } from '@/types/custom-phrase'; import { trySubmitSafe } from '@/utils/form'; import { shouldRetryOnError } from '@/utils/request'; -import * as styles from './LanguageDetails.module.scss'; +import styles from './LanguageDetails.module.scss'; import { hiddenLocalePhraseGroups, hiddenLocalePhrases } from './constants'; import { LanguageEditorContext } from './use-language-editor-context'; import { createEmptyUiTranslation, flattenTranslation } from './utils'; diff --git a/packages/console/src/pages/SignInExperience/PageContent/Content/LanguagesForm/ManageLanguage/LanguageEditor/LanguageItem.tsx b/packages/console/src/pages/SignInExperience/PageContent/Content/LanguagesForm/ManageLanguage/LanguageEditor/LanguageItem.tsx index e89b8be25f0..42ddb702693 100644 --- a/packages/console/src/pages/SignInExperience/PageContent/Content/LanguagesForm/ManageLanguage/LanguageEditor/LanguageItem.tsx +++ b/packages/console/src/pages/SignInExperience/PageContent/Content/LanguagesForm/ManageLanguage/LanguageEditor/LanguageItem.tsx @@ -5,7 +5,7 @@ import { useEffect, useRef } from 'react'; import { onKeyDownHandler } from '@/utils/a11y'; -import * as style from './LanguageItem.module.scss'; +import style from './LanguageItem.module.scss'; type Props = { readonly languageTag: LanguageTag; diff --git a/packages/console/src/pages/SignInExperience/PageContent/Content/LanguagesForm/ManageLanguage/LanguageEditor/LanguageNav.tsx b/packages/console/src/pages/SignInExperience/PageContent/Content/LanguagesForm/ManageLanguage/LanguageEditor/LanguageNav.tsx index a8afddc2593..41893751662 100644 --- a/packages/console/src/pages/SignInExperience/PageContent/Content/LanguagesForm/ManageLanguage/LanguageEditor/LanguageNav.tsx +++ b/packages/console/src/pages/SignInExperience/PageContent/Content/LanguagesForm/ManageLanguage/LanguageEditor/LanguageNav.tsx @@ -6,7 +6,7 @@ import useUiLanguages from '@/hooks/use-ui-languages'; import AddLanguageSelector from './AddLanguageSelector'; import LanguageItem from './LanguageItem'; -import * as style from './LanguageNav.module.scss'; +import style from './LanguageNav.module.scss'; import { LanguageEditorContext } from './use-language-editor-context'; function LanguageNav() { diff --git a/packages/console/src/pages/SignInExperience/PageContent/Content/LanguagesForm/ManageLanguage/LanguageEditor/index.tsx b/packages/console/src/pages/SignInExperience/PageContent/Content/LanguagesForm/ManageLanguage/LanguageEditor/index.tsx index 7c396e7f813..e06d4e643a7 100644 --- a/packages/console/src/pages/SignInExperience/PageContent/Content/LanguagesForm/ManageLanguage/LanguageEditor/index.tsx +++ b/packages/console/src/pages/SignInExperience/PageContent/Content/LanguagesForm/ManageLanguage/LanguageEditor/index.tsx @@ -2,7 +2,7 @@ import { useContext, useEffect } from 'react'; import { useTranslation } from 'react-i18next'; import Modal from 'react-modal'; -import Close from '@/assets/icons/close.svg'; +import Close from '@/assets/icons/close.svg?react'; import Card from '@/ds-components/Card'; import CardTitle from '@/ds-components/CardTitle'; import ConfirmModal from '@/ds-components/ConfirmModal'; @@ -11,7 +11,7 @@ import useUiLanguages from '@/hooks/use-ui-languages'; import LanguageDetails from './LanguageDetails'; import LanguageNav from './LanguageNav'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; import useLanguageEditorContext, { LanguageEditorContext } from './use-language-editor-context'; type Props = { diff --git a/packages/console/src/pages/SignInExperience/PageContent/Content/LanguagesForm/index.tsx b/packages/console/src/pages/SignInExperience/PageContent/Content/LanguagesForm/index.tsx index eee106ee81c..8f3b7ea8199 100644 --- a/packages/console/src/pages/SignInExperience/PageContent/Content/LanguagesForm/index.tsx +++ b/packages/console/src/pages/SignInExperience/PageContent/Content/LanguagesForm/index.tsx @@ -16,7 +16,7 @@ import type { SignInExperienceForm } from '../../../types'; import FormSectionTitle from '../../components/FormSectionTitle'; import ManageLanguageButton from './ManageLanguage/ManageLanguageButton'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly isManageLanguageVisible?: boolean; diff --git a/packages/console/src/pages/SignInExperience/PageContent/PasswordPolicy/index.tsx b/packages/console/src/pages/SignInExperience/PageContent/PasswordPolicy/index.tsx index 86207ae7715..d2e885960ac 100644 --- a/packages/console/src/pages/SignInExperience/PageContent/PasswordPolicy/index.tsx +++ b/packages/console/src/pages/SignInExperience/PageContent/PasswordPolicy/index.tsx @@ -18,7 +18,7 @@ import FormFieldDescription from '../components/FormFieldDescription'; import FormSectionTitle from '../components/FormSectionTitle'; import SignInExperienceTabWrapper from '../components/SignInExperienceTabWrapper'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type PasswordOptionProps = { readonly name: FieldPath; diff --git a/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignIn/AdvancedOptions/index.tsx b/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignIn/AdvancedOptions/index.tsx index d158f9628ef..36aa77a6339 100644 --- a/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignIn/AdvancedOptions/index.tsx +++ b/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignIn/AdvancedOptions/index.tsx @@ -9,7 +9,7 @@ import TextLink from '@/ds-components/TextLink'; import type { SignInExperienceForm } from '../../../types'; import FormSectionTitle from '../../components/FormSectionTitle'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; function AdvancedOptions() { const { t } = useTranslation(undefined, { diff --git a/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignIn/SignInForm/SignInMethodEditBox/AddButton.tsx b/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignIn/SignInForm/SignInMethodEditBox/AddButton.tsx index b0b6dcad6a3..038ad3f19cc 100644 --- a/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignIn/SignInForm/SignInMethodEditBox/AddButton.tsx +++ b/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignIn/SignInForm/SignInMethodEditBox/AddButton.tsx @@ -2,15 +2,15 @@ import type { SignInIdentifier } from '@logto/schemas'; import classNames from 'classnames'; import { useTranslation } from 'react-i18next'; -import CirclePlus from '@/assets/icons/circle-plus.svg'; -import Plus from '@/assets/icons/plus.svg'; +import CirclePlus from '@/assets/icons/circle-plus.svg?react'; +import Plus from '@/assets/icons/plus.svg?react'; import ActionMenu from '@/ds-components/ActionMenu'; import type { Props as ButtonProps } from '@/ds-components/Button'; import { DropdownItem } from '@/ds-components/Dropdown'; import { signInIdentifierPhrase } from '../../../constants'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly options: SignInIdentifier[]; diff --git a/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignIn/SignInForm/SignInMethodEditBox/SignInMethodItem.tsx b/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignIn/SignInForm/SignInMethodEditBox/SignInMethodItem.tsx index d4739f6d688..37b4771fc45 100644 --- a/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignIn/SignInForm/SignInMethodEditBox/SignInMethodItem.tsx +++ b/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignIn/SignInForm/SignInMethodEditBox/SignInMethodItem.tsx @@ -4,9 +4,9 @@ import { conditional } from '@silverhand/essentials'; import classNames from 'classnames'; import { useTranslation } from 'react-i18next'; -import Draggable from '@/assets/icons/draggable.svg'; -import Minus from '@/assets/icons/minus.svg'; -import SwitchArrowIcon from '@/assets/icons/switch-arrow.svg'; +import Draggable from '@/assets/icons/draggable.svg?react'; +import Minus from '@/assets/icons/minus.svg?react'; +import SwitchArrowIcon from '@/assets/icons/switch-arrow.svg?react'; import Checkbox from '@/ds-components/Checkbox'; import IconButton from '@/ds-components/IconButton'; import { Tooltip } from '@/ds-components/Tip'; @@ -15,7 +15,7 @@ import type { SignInMethod } from '@/pages/SignInExperience/types'; import { signInIdentifierPhrase } from '../../../constants'; import ConnectorSetupWarning from '../../components/ConnectorSetupWarning'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly signInMethod: SignInMethod; diff --git a/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignIn/SignInForm/SignInMethodEditBox/index.tsx b/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignIn/SignInForm/SignInMethodEditBox/index.tsx index f737fa918be..aa56c2918d0 100644 --- a/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignIn/SignInForm/SignInMethodEditBox/index.tsx +++ b/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignIn/SignInForm/SignInMethodEditBox/index.tsx @@ -13,7 +13,7 @@ import { getSignUpRequiredConnectorTypes, createSignInMethod } from '../../utils import AddButton from './AddButton'; import SignInMethodItem from './SignInMethodItem'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; function SignInMethodEditBox() { const { t } = useTranslation(undefined, { keyPrefix: 'admin_console' }); diff --git a/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignIn/SignUpForm/index.tsx b/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignIn/SignUpForm/index.tsx index 3b327c5050c..4cd264bc79a 100644 --- a/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignIn/SignUpForm/index.tsx +++ b/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignIn/SignUpForm/index.tsx @@ -26,7 +26,7 @@ import { getSignInMethodVerificationCodeCheckState, } from '../utils'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; function SignUpForm() { const { t } = useTranslation(undefined, { keyPrefix: 'admin_console' }); diff --git a/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignIn/SocialSignInForm/SocialConnectorEditBox/AddButton/index.tsx b/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignIn/SocialSignInForm/SocialConnectorEditBox/AddButton/index.tsx index a7cdd22976b..69301e404f9 100644 --- a/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignIn/SocialSignInForm/SocialConnectorEditBox/AddButton/index.tsx +++ b/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignIn/SocialSignInForm/SocialConnectorEditBox/AddButton/index.tsx @@ -1,7 +1,7 @@ import classNames from 'classnames'; -import CirclePlus from '@/assets/icons/circle-plus.svg'; -import Plus from '@/assets/icons/plus.svg'; +import CirclePlus from '@/assets/icons/circle-plus.svg?react'; +import Plus from '@/assets/icons/plus.svg?react'; import ConnectorLogo from '@/components/ConnectorLogo'; import UnnamedTrans from '@/components/UnnamedTrans'; import ActionMenu from '@/ds-components/ActionMenu'; @@ -10,7 +10,7 @@ import { DropdownItem } from '@/ds-components/Dropdown'; import ConnectorPlatformIcon from '@/icons/ConnectorPlatformIcon'; import type { ConnectorGroup } from '@/types/connector'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly options: ConnectorGroup[]; diff --git a/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignIn/SocialSignInForm/SocialConnectorEditBox/SelectedConnectorItem/index.tsx b/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignIn/SocialSignInForm/SocialConnectorEditBox/SelectedConnectorItem/index.tsx index 3e8f68234ea..3c18cf5f133 100644 --- a/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignIn/SocialSignInForm/SocialConnectorEditBox/SelectedConnectorItem/index.tsx +++ b/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignIn/SocialSignInForm/SocialConnectorEditBox/SelectedConnectorItem/index.tsx @@ -1,12 +1,12 @@ -import Draggable from '@/assets/icons/draggable.svg'; -import Minus from '@/assets/icons/minus.svg'; +import Draggable from '@/assets/icons/draggable.svg?react'; +import Minus from '@/assets/icons/minus.svg?react'; import ConnectorLogo from '@/components/ConnectorLogo'; import UnnamedTrans from '@/components/UnnamedTrans'; import IconButton from '@/ds-components/IconButton'; import ConnectorPlatformIcon from '@/icons/ConnectorPlatformIcon'; import type { ConnectorGroup } from '@/types/connector'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly data: ConnectorGroup; diff --git a/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignIn/SocialSignInForm/SocialConnectorEditBox/index.tsx b/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignIn/SocialSignInForm/SocialConnectorEditBox/index.tsx index 45df48b0bb1..fde179c70bc 100644 --- a/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignIn/SocialSignInForm/SocialConnectorEditBox/index.tsx +++ b/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignIn/SocialSignInForm/SocialConnectorEditBox/index.tsx @@ -10,7 +10,7 @@ import ConnectorSetupWarning from '../../components/ConnectorSetupWarning'; import AddButton from './AddButton'; import SelectedConnectorItem from './SelectedConnectorItem'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly value: string[]; diff --git a/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignIn/components/ConnectorSetupWarning/index.tsx b/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignIn/components/ConnectorSetupWarning/index.tsx index 3303848bbf8..f519b649e4b 100644 --- a/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignIn/components/ConnectorSetupWarning/index.tsx +++ b/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignIn/components/ConnectorSetupWarning/index.tsx @@ -6,7 +6,7 @@ import InlineNotification from '@/ds-components/InlineNotification'; import TextLink from '@/ds-components/TextLink'; import useEnabledConnectorTypes from '@/hooks/use-enabled-connector-types'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type NoConnectorWarningPhrase = { [key in ConnectorType]: AdminConsoleKey; diff --git a/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignInChangePreview/SignUpAndSignInDiffSection/DiffSegment.tsx b/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignInChangePreview/SignUpAndSignInDiffSection/DiffSegment.tsx index c2717c7b6f7..83d2536e796 100644 --- a/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignInChangePreview/SignUpAndSignInDiffSection/DiffSegment.tsx +++ b/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignInChangePreview/SignUpAndSignInDiffSection/DiffSegment.tsx @@ -1,6 +1,6 @@ import type { ReactNode } from 'react'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly children: ReactNode; diff --git a/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignInChangePreview/SignUpAndSignInDiffSection/SignInDiffSection.tsx b/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignInChangePreview/SignUpAndSignInDiffSection/SignInDiffSection.tsx index 3005b88e505..4ae334f58dd 100644 --- a/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignInChangePreview/SignUpAndSignInDiffSection/SignInDiffSection.tsx +++ b/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignInChangePreview/SignUpAndSignInDiffSection/SignInDiffSection.tsx @@ -10,7 +10,7 @@ import { signInIdentifierPhrase } from '../../constants'; import { convertToSignInMethodsObject } from '../../utils/form'; import DiffSegment from './DiffSegment'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly before: SignInMethod[]; diff --git a/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignInChangePreview/SignUpAndSignInDiffSection/SignUpDiffSection.tsx b/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignInChangePreview/SignUpAndSignInDiffSection/SignUpDiffSection.tsx index 783bf06d392..6239b0935fa 100644 --- a/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignInChangePreview/SignUpAndSignInDiffSection/SignUpDiffSection.tsx +++ b/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignInChangePreview/SignUpAndSignInDiffSection/SignUpDiffSection.tsx @@ -10,7 +10,7 @@ import { signUpIdentifierPhrase } from '../../constants'; import { signUpFormDataParser } from '../../utils/parser'; import DiffSegment from './DiffSegment'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly before: SignUp; diff --git a/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignInChangePreview/SignUpAndSignInDiffSection/SocialTargetsDiffSection.tsx b/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignInChangePreview/SignUpAndSignInDiffSection/SocialTargetsDiffSection.tsx index 5c134256d96..89eeea84bde 100644 --- a/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignInChangePreview/SignUpAndSignInDiffSection/SocialTargetsDiffSection.tsx +++ b/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignInChangePreview/SignUpAndSignInDiffSection/SocialTargetsDiffSection.tsx @@ -6,7 +6,7 @@ import { useTranslation } from 'react-i18next'; import useConnectorGroups from '@/hooks/use-connector-groups'; import DiffSegment from './DiffSegment'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly before: string[]; diff --git a/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignInChangePreview/index.tsx b/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignInChangePreview/index.tsx index 38ec7fd02cc..5fc62959663 100644 --- a/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignInChangePreview/index.tsx +++ b/packages/console/src/pages/SignInExperience/PageContent/SignUpAndSignInChangePreview/index.tsx @@ -2,7 +2,7 @@ import type { SignInExperience } from '@logto/schemas'; import { useTranslation } from 'react-i18next'; import SignUpAndSignInDiffSection from './SignUpAndSignInDiffSection'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly before: SignInExperience; diff --git a/packages/console/src/pages/SignInExperience/PageContent/components/FormFieldDescription/index.tsx b/packages/console/src/pages/SignInExperience/PageContent/components/FormFieldDescription/index.tsx index dc12d8f7629..9a7ea8bad00 100644 --- a/packages/console/src/pages/SignInExperience/PageContent/components/FormFieldDescription/index.tsx +++ b/packages/console/src/pages/SignInExperience/PageContent/components/FormFieldDescription/index.tsx @@ -1,6 +1,6 @@ import { type ReactNode } from 'react'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly children: ReactNode; diff --git a/packages/console/src/pages/SignInExperience/PageContent/components/FormSectionTitle/index.tsx b/packages/console/src/pages/SignInExperience/PageContent/components/FormSectionTitle/index.tsx index ec8ca75191e..1a06f0ea075 100644 --- a/packages/console/src/pages/SignInExperience/PageContent/components/FormSectionTitle/index.tsx +++ b/packages/console/src/pages/SignInExperience/PageContent/components/FormSectionTitle/index.tsx @@ -2,7 +2,7 @@ import { type TFuncKey } from 'i18next'; import DynamicT from '@/ds-components/DynamicT'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly title: TFuncKey<'translation', 'admin_console.sign_in_exp'>; diff --git a/packages/console/src/pages/SignInExperience/PageContent/components/SignInExperienceTabWrapper/index.tsx b/packages/console/src/pages/SignInExperience/PageContent/components/SignInExperienceTabWrapper/index.tsx index 774056ee0bb..ca86c4ad034 100644 --- a/packages/console/src/pages/SignInExperience/PageContent/components/SignInExperienceTabWrapper/index.tsx +++ b/packages/console/src/pages/SignInExperience/PageContent/components/SignInExperienceTabWrapper/index.tsx @@ -1,6 +1,6 @@ import TabWrapper, { type Props as TabWrapperProps } from '@/ds-components/TabWrapper'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = Omit; diff --git a/packages/console/src/pages/SignInExperience/PageContent/index.tsx b/packages/console/src/pages/SignInExperience/PageContent/index.tsx index 32eebcad02f..9185f048895 100644 --- a/packages/console/src/pages/SignInExperience/PageContent/index.tsx +++ b/packages/console/src/pages/SignInExperience/PageContent/index.tsx @@ -25,7 +25,7 @@ import Content from './Content'; import PasswordPolicy from './PasswordPolicy'; import SignUpAndSignIn from './SignUpAndSignIn'; import SignUpAndSignInChangePreview from './SignUpAndSignInChangePreview'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; import { getBrandingErrorCount, getSignUpAndSignInErrorCount, diff --git a/packages/console/src/pages/SignInExperience/Skeleton/index.tsx b/packages/console/src/pages/SignInExperience/Skeleton/index.tsx index 1d7566e4b30..0107535a1f0 100644 --- a/packages/console/src/pages/SignInExperience/Skeleton/index.tsx +++ b/packages/console/src/pages/SignInExperience/Skeleton/index.tsx @@ -3,10 +3,10 @@ import classNames from 'classnames'; import CardTitle from '@/ds-components/CardTitle'; import Spacer from '@/ds-components/Spacer'; -import * as pageContentStyles from '../PageContent/index.module.scss'; -import * as pageStyles from '../index.module.scss'; +import pageContentStyles from '../PageContent/index.module.scss'; +import pageStyles from '../index.module.scss'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; function Skeleton() { return ( diff --git a/packages/console/src/pages/SignInExperience/Welcome/GuideModal.tsx b/packages/console/src/pages/SignInExperience/Welcome/GuideModal.tsx index 24ccb6a0cde..d37c4e40b3f 100644 --- a/packages/console/src/pages/SignInExperience/Welcome/GuideModal.tsx +++ b/packages/console/src/pages/SignInExperience/Welcome/GuideModal.tsx @@ -5,7 +5,7 @@ import { useTranslation } from 'react-i18next'; import Modal from 'react-modal'; import useSWR from 'swr'; -import Close from '@/assets/icons/close.svg'; +import Close from '@/assets/icons/close.svg?react'; import Button from '@/ds-components/Button'; import CardTitle from '@/ds-components/CardTitle'; import IconButton from '@/ds-components/IconButton'; @@ -14,7 +14,7 @@ import Spacer from '@/ds-components/Spacer'; import useApi from '@/hooks/use-api'; import useConfigs from '@/hooks/use-configs'; import useUserPreferences from '@/hooks/use-user-preferences'; -import * as modalStyles from '@/scss/modal.module.scss'; +import modalStyles from '@/scss/modal.module.scss'; import { trySubmitSafe } from '@/utils/form'; import BrandingForm from '../PageContent/Branding/BrandingForm'; @@ -25,7 +25,7 @@ import Preview from '../components/Preview'; import usePreviewConfigs from '../hooks/use-preview-configs'; import type { SignInExperienceForm } from '../types'; -import * as styles from './GuideModal.module.scss'; +import styles from './GuideModal.module.scss'; type Props = { readonly isOpen: boolean; diff --git a/packages/console/src/pages/SignInExperience/Welcome/index.tsx b/packages/console/src/pages/SignInExperience/Welcome/index.tsx index 1a2e70a43d4..8504bf8f123 100644 --- a/packages/console/src/pages/SignInExperience/Welcome/index.tsx +++ b/packages/console/src/pages/SignInExperience/Welcome/index.tsx @@ -2,13 +2,13 @@ import { Theme } from '@logto/schemas'; import { useState } from 'react'; import { useTranslation } from 'react-i18next'; -import WelcomeImageDark from '@/assets/images/sign-in-experience-welcome-dark.svg'; -import WelcomeImage from '@/assets/images/sign-in-experience-welcome.svg'; +import WelcomeImageDark from '@/assets/images/sign-in-experience-welcome-dark.svg?react'; +import WelcomeImage from '@/assets/images/sign-in-experience-welcome.svg?react'; import Button from '@/ds-components/Button'; import useTheme from '@/hooks/use-theme'; import GuideModal from './GuideModal'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly mutate: () => void; diff --git a/packages/console/src/pages/SignInExperience/components/Preview/index.tsx b/packages/console/src/pages/SignInExperience/components/Preview/index.tsx index 9dfecb51db4..03d680ab981 100644 --- a/packages/console/src/pages/SignInExperience/components/Preview/index.tsx +++ b/packages/console/src/pages/SignInExperience/components/Preview/index.tsx @@ -13,7 +13,7 @@ import TabNav, { TabNavItem } from '@/ds-components/TabNav'; import useConnectorGroups from '@/hooks/use-connector-groups'; import useUiLanguages from '@/hooks/use-ui-languages'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly isLivePreviewDisabled?: boolean; diff --git a/packages/console/src/pages/SignInExperience/index.tsx b/packages/console/src/pages/SignInExperience/index.tsx index 82fd1e0036d..c0d6e99f05a 100644 --- a/packages/console/src/pages/SignInExperience/index.tsx +++ b/packages/console/src/pages/SignInExperience/index.tsx @@ -13,7 +13,7 @@ import useUserAssetsService from '@/hooks/use-user-assets-service'; import PageContent from './PageContent'; import Skeleton from './Skeleton'; import Welcome from './Welcome'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type PageWrapperProps = { readonly children: ReactNode; diff --git a/packages/console/src/pages/SigningKeys/SigningKeyFormCard/index.tsx b/packages/console/src/pages/SigningKeys/SigningKeyFormCard/index.tsx index 03e39e8a91c..2db54e307c2 100644 --- a/packages/console/src/pages/SigningKeys/SigningKeyFormCard/index.tsx +++ b/packages/console/src/pages/SigningKeys/SigningKeyFormCard/index.tsx @@ -9,7 +9,7 @@ import { toast } from 'react-hot-toast'; import { Trans, useTranslation } from 'react-i18next'; import useSWR from 'swr'; -import Delete from '@/assets/icons/delete.svg'; +import Delete from '@/assets/icons/delete.svg?react'; import FormCard from '@/components/FormCard'; import Button from '@/ds-components/Button'; import DangerConfirmModal from '@/ds-components/DeleteConfirmModal'; @@ -20,7 +20,7 @@ import Table from '@/ds-components/Table'; import Tag from '@/ds-components/Tag'; import useApi, { type RequestError } from '@/hooks/use-api'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly keyType: LogtoOidcConfigKeyType; diff --git a/packages/console/src/pages/SigningKeys/index.tsx b/packages/console/src/pages/SigningKeys/index.tsx index f90263134a6..a288e446b5e 100644 --- a/packages/console/src/pages/SigningKeys/index.tsx +++ b/packages/console/src/pages/SigningKeys/index.tsx @@ -6,7 +6,7 @@ import CardTitle from '@/ds-components/CardTitle'; import useDocumentationUrl from '@/hooks/use-documentation-url'; import SigningKeyFormCard from './SigningKeyFormCard'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; function SigningKeys() { const { getDocumentationUrl } = useDocumentationUrl(); diff --git a/packages/console/src/pages/TenantSettings/Subscription/CurrentPlan/index.tsx b/packages/console/src/pages/TenantSettings/Subscription/CurrentPlan/index.tsx index 2489a2245ba..cda09e151e6 100644 --- a/packages/console/src/pages/TenantSettings/Subscription/CurrentPlan/index.tsx +++ b/packages/console/src/pages/TenantSettings/Subscription/CurrentPlan/index.tsx @@ -13,7 +13,7 @@ import { hasSurpassedQuotaLimit } from '@/utils/quota'; import MauLimitExceedNotification from './MauLimitExceededNotification'; import PaymentOverdueNotification from './PaymentOverdueNotification'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly subscription: Subscription; diff --git a/packages/console/src/pages/TenantSettings/Subscription/DowngradeConfirmModalContent/PlanQuotaDiffCard/PlanQuotaList/DiffQuotaItem/index.tsx b/packages/console/src/pages/TenantSettings/Subscription/DowngradeConfirmModalContent/PlanQuotaDiffCard/PlanQuotaList/DiffQuotaItem/index.tsx index 9eeaf2e7b06..a499d70158d 100644 --- a/packages/console/src/pages/TenantSettings/Subscription/DowngradeConfirmModalContent/PlanQuotaDiffCard/PlanQuotaList/DiffQuotaItem/index.tsx +++ b/packages/console/src/pages/TenantSettings/Subscription/DowngradeConfirmModalContent/PlanQuotaDiffCard/PlanQuotaList/DiffQuotaItem/index.tsx @@ -1,12 +1,12 @@ import { cond } from '@silverhand/essentials'; import classNames from 'classnames'; -import DescendArrow from '@/assets/icons/descend-arrow.svg'; -import Failed from '@/assets/icons/failed.svg'; +import DescendArrow from '@/assets/icons/descend-arrow.svg?react'; +import Failed from '@/assets/icons/failed.svg?react'; import { type SubscriptionPlanQuota } from '@/types/subscriptions'; import QuotaItemPhrase from './QuotaItemPhrase'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly quotaKey: keyof SubscriptionPlanQuota; diff --git a/packages/console/src/pages/TenantSettings/Subscription/DowngradeConfirmModalContent/PlanQuotaDiffCard/PlanQuotaList/index.tsx b/packages/console/src/pages/TenantSettings/Subscription/DowngradeConfirmModalContent/PlanQuotaDiffCard/PlanQuotaList/index.tsx index 62b59cfdd73..2112587c642 100644 --- a/packages/console/src/pages/TenantSettings/Subscription/DowngradeConfirmModalContent/PlanQuotaDiffCard/PlanQuotaList/index.tsx +++ b/packages/console/src/pages/TenantSettings/Subscription/DowngradeConfirmModalContent/PlanQuotaDiffCard/PlanQuotaList/index.tsx @@ -3,7 +3,7 @@ import classNames from 'classnames'; import { type SubscriptionPlanQuotaEntries } from '@/types/subscriptions'; import DiffQuotaItem from './DiffQuotaItem'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly entries: SubscriptionPlanQuotaEntries; diff --git a/packages/console/src/pages/TenantSettings/Subscription/DowngradeConfirmModalContent/PlanQuotaDiffCard/index.tsx b/packages/console/src/pages/TenantSettings/Subscription/DowngradeConfirmModalContent/PlanQuotaDiffCard/index.tsx index 67c75ce93c3..9cac99cede1 100644 --- a/packages/console/src/pages/TenantSettings/Subscription/DowngradeConfirmModalContent/PlanQuotaDiffCard/index.tsx +++ b/packages/console/src/pages/TenantSettings/Subscription/DowngradeConfirmModalContent/PlanQuotaDiffCard/index.tsx @@ -11,7 +11,7 @@ import { import { sortBy } from '@/utils/sort'; import PlanQuotaList from './PlanQuotaList'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly planName: string; diff --git a/packages/console/src/pages/TenantSettings/Subscription/DowngradeConfirmModalContent/index.tsx b/packages/console/src/pages/TenantSettings/Subscription/DowngradeConfirmModalContent/index.tsx index 18b61d9639e..4c374ef76d5 100644 --- a/packages/console/src/pages/TenantSettings/Subscription/DowngradeConfirmModalContent/index.tsx +++ b/packages/console/src/pages/TenantSettings/Subscription/DowngradeConfirmModalContent/index.tsx @@ -11,7 +11,7 @@ import { } from '@/types/subscriptions'; import PlanQuotaDiffCard from './PlanQuotaDiffCard'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly currentPlan: SubscriptionPlan; diff --git a/packages/console/src/pages/TenantSettings/Subscription/PlanComparisonTable/TableDataWrapper/TableDataContent/index.tsx b/packages/console/src/pages/TenantSettings/Subscription/PlanComparisonTable/TableDataWrapper/TableDataContent/index.tsx index 0689fad1c94..a6c692ca041 100644 --- a/packages/console/src/pages/TenantSettings/Subscription/PlanComparisonTable/TableDataWrapper/TableDataContent/index.tsx +++ b/packages/console/src/pages/TenantSettings/Subscription/PlanComparisonTable/TableDataWrapper/TableDataContent/index.tsx @@ -1,6 +1,6 @@ -import Success from '@/assets/icons/success.svg'; +import Success from '@/assets/icons/success.svg?react'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly content: string; diff --git a/packages/console/src/pages/TenantSettings/Subscription/PlanComparisonTable/TableDataWrapper/index.tsx b/packages/console/src/pages/TenantSettings/Subscription/PlanComparisonTable/TableDataWrapper/index.tsx index 877b41b1657..174edf3d3da 100644 --- a/packages/console/src/pages/TenantSettings/Subscription/PlanComparisonTable/TableDataWrapper/index.tsx +++ b/packages/console/src/pages/TenantSettings/Subscription/PlanComparisonTable/TableDataWrapper/index.tsx @@ -1,11 +1,11 @@ import classNames from 'classnames'; -import Tip from '@/assets/icons/tip.svg'; +import Tip from '@/assets/icons/tip.svg?react'; import IconButton from '@/ds-components/IconButton'; import { ToggleTip } from '@/ds-components/Tip'; import TableDataContent from './TableDataContent'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly value: string; diff --git a/packages/console/src/pages/TenantSettings/Subscription/PlanComparisonTable/index.tsx b/packages/console/src/pages/TenantSettings/Subscription/PlanComparisonTable/index.tsx index be8dfb770cb..2dc6b805a60 100644 --- a/packages/console/src/pages/TenantSettings/Subscription/PlanComparisonTable/index.tsx +++ b/packages/console/src/pages/TenantSettings/Subscription/PlanComparisonTable/index.tsx @@ -14,7 +14,7 @@ import { import DynamicT from '@/ds-components/DynamicT'; import TableDataWrapper from './TableDataWrapper'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; const featuredPlanPhraseKey: AdminConsoleKey[] = [ 'subscription.free_plan', diff --git a/packages/console/src/pages/TenantSettings/Subscription/SwitchPlanActionBar/index.tsx b/packages/console/src/pages/TenantSettings/Subscription/SwitchPlanActionBar/index.tsx index 0280fb559dd..6a2f5c52085 100644 --- a/packages/console/src/pages/TenantSettings/Subscription/SwitchPlanActionBar/index.tsx +++ b/packages/console/src/pages/TenantSettings/Subscription/SwitchPlanActionBar/index.tsx @@ -18,7 +18,7 @@ import { isDowngradePlan, parseExceededQuotaLimitError } from '@/utils/subscript import DowngradeConfirmModalContent from '../DowngradeConfirmModalContent'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly currentSubscriptionPlanId: string; diff --git a/packages/console/src/pages/TenantSettings/Subscription/index.tsx b/packages/console/src/pages/TenantSettings/Subscription/index.tsx index 69bb1186566..2a9e07cf897 100644 --- a/packages/console/src/pages/TenantSettings/Subscription/index.tsx +++ b/packages/console/src/pages/TenantSettings/Subscription/index.tsx @@ -11,7 +11,7 @@ import Skeleton from '../components/Skeleton'; import CurrentPlan from './CurrentPlan'; import PlanComparisonTable from './PlanComparisonTable'; import SwitchPlanActionBar from './SwitchPlanActionBar'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; function Subscription() { const { currentTenantId } = useContext(TenantsContext); diff --git a/packages/console/src/pages/TenantSettings/TenantBasicSettings/DeleteCard/index.tsx b/packages/console/src/pages/TenantSettings/TenantBasicSettings/DeleteCard/index.tsx index 789fb035346..1918a4a9f40 100644 --- a/packages/console/src/pages/TenantSettings/TenantBasicSettings/DeleteCard/index.tsx +++ b/packages/console/src/pages/TenantSettings/TenantBasicSettings/DeleteCard/index.tsx @@ -5,7 +5,7 @@ import FormCard from '@/components/FormCard'; import Button from '@/ds-components/Button'; import FormField from '@/ds-components/FormField'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly currentTenantId: string; diff --git a/packages/console/src/pages/TenantSettings/TenantBasicSettings/DeleteModal/index.tsx b/packages/console/src/pages/TenantSettings/TenantBasicSettings/DeleteModal/index.tsx index 3cbfc189a25..160e1e89868 100644 --- a/packages/console/src/pages/TenantSettings/TenantBasicSettings/DeleteModal/index.tsx +++ b/packages/console/src/pages/TenantSettings/TenantBasicSettings/DeleteModal/index.tsx @@ -6,7 +6,7 @@ import ContactUsPhraseLink from '@/components/ContactUsPhraseLink'; import { tenantAbbreviatedTagNameMap } from '@/components/TenantEnvTag'; import DeleteConfirmModal from '@/ds-components/DeleteConfirmModal'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly isOpen: boolean; diff --git a/packages/console/src/pages/TenantSettings/TenantBasicSettings/LeaveCard/index.tsx b/packages/console/src/pages/TenantSettings/TenantBasicSettings/LeaveCard/index.tsx index 85a3f8e45fe..98ec0d15cbd 100644 --- a/packages/console/src/pages/TenantSettings/TenantBasicSettings/LeaveCard/index.tsx +++ b/packages/console/src/pages/TenantSettings/TenantBasicSettings/LeaveCard/index.tsx @@ -9,7 +9,7 @@ import FormField from '@/ds-components/FormField'; import { useConfirmModal } from '@/hooks/use-confirm-modal'; import useCurrentUser from '@/hooks/use-current-user'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; function LeaveCard() { const { t } = useTranslation(undefined, { keyPrefix: 'admin_console' }); diff --git a/packages/console/src/pages/TenantSettings/TenantBasicSettings/ProfileForm/TenantEnvironment/index.tsx b/packages/console/src/pages/TenantSettings/TenantBasicSettings/ProfileForm/TenantEnvironment/index.tsx index 655224eb649..303a4be9aae 100644 --- a/packages/console/src/pages/TenantSettings/TenantBasicSettings/ProfileForm/TenantEnvironment/index.tsx +++ b/packages/console/src/pages/TenantSettings/TenantBasicSettings/ProfileForm/TenantEnvironment/index.tsx @@ -6,7 +6,7 @@ import { envTagsFeatureLink } from '@/consts'; import TextLink from '@/ds-components/TextLink'; import useDocumentationUrl from '@/hooks/use-documentation-url'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly tag: TenantTag; diff --git a/packages/console/src/pages/TenantSettings/TenantBasicSettings/ProfileForm/TenantRegion/index.tsx b/packages/console/src/pages/TenantSettings/TenantBasicSettings/ProfileForm/TenantRegion/index.tsx index 51661444743..6e9455c43c2 100644 --- a/packages/console/src/pages/TenantSettings/TenantBasicSettings/ProfileForm/TenantRegion/index.tsx +++ b/packages/console/src/pages/TenantSettings/TenantBasicSettings/ProfileForm/TenantRegion/index.tsx @@ -6,7 +6,7 @@ import { trustAndSecurityLink } from '@/consts'; import { TenantsContext } from '@/contexts/TenantsProvider'; import TextLink from '@/ds-components/TextLink'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; function TenantRegion() { const { t } = useTranslation(undefined, { keyPrefix: 'admin_console' }); diff --git a/packages/console/src/pages/TenantSettings/TenantBasicSettings/index.tsx b/packages/console/src/pages/TenantSettings/TenantBasicSettings/index.tsx index 13c3019efff..e47fdc8f162 100644 --- a/packages/console/src/pages/TenantSettings/TenantBasicSettings/index.tsx +++ b/packages/console/src/pages/TenantSettings/TenantBasicSettings/index.tsx @@ -18,7 +18,7 @@ import DeleteCard from './DeleteCard'; import DeleteModal from './DeleteModal'; import LeaveCard from './LeaveCard'; import ProfileForm from './ProfileForm'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; import { type TenantSettingsForm } from './types.js'; function TenantBasicSettings() { diff --git a/packages/console/src/pages/TenantSettings/TenantDomainSettings/AddDomainForm/index.tsx b/packages/console/src/pages/TenantSettings/TenantDomainSettings/AddDomainForm/index.tsx index 538edeeb120..2cc019b13f3 100644 --- a/packages/console/src/pages/TenantSettings/TenantDomainSettings/AddDomainForm/index.tsx +++ b/packages/console/src/pages/TenantSettings/TenantDomainSettings/AddDomainForm/index.tsx @@ -8,7 +8,7 @@ import TextInput from '@/ds-components/TextInput'; import { onKeyDownHandler } from '@/utils/a11y'; import { trySubmitSafe } from '@/utils/form'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type FormData = { domain: string; diff --git a/packages/console/src/pages/TenantSettings/TenantDomainSettings/CustomDomain/ActivationProcess/DnsRecordsTable/index.tsx b/packages/console/src/pages/TenantSettings/TenantDomainSettings/CustomDomain/ActivationProcess/DnsRecordsTable/index.tsx index 4f63c0dabb4..e38619c4cff 100644 --- a/packages/console/src/pages/TenantSettings/TenantDomainSettings/CustomDomain/ActivationProcess/DnsRecordsTable/index.tsx +++ b/packages/console/src/pages/TenantSettings/TenantDomainSettings/CustomDomain/ActivationProcess/DnsRecordsTable/index.tsx @@ -5,7 +5,7 @@ import DynamicT from '@/ds-components/DynamicT'; import { Ring } from '@/ds-components/Spinner'; import Table from '@/ds-components/Table'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly records: DomainDnsRecords; diff --git a/packages/console/src/pages/TenantSettings/TenantDomainSettings/CustomDomain/ActivationProcess/Step/index.tsx b/packages/console/src/pages/TenantSettings/TenantDomainSettings/CustomDomain/ActivationProcess/Step/index.tsx index 2e7a4c4adf3..9ff1641a918 100644 --- a/packages/console/src/pages/TenantSettings/TenantDomainSettings/CustomDomain/ActivationProcess/Step/index.tsx +++ b/packages/console/src/pages/TenantSettings/TenantDomainSettings/CustomDomain/ActivationProcess/Step/index.tsx @@ -3,14 +3,14 @@ import { DomainStatus } from '@logto/schemas'; import classNames from 'classnames'; import { type ReactNode } from 'react'; -import Success from '@/assets/icons/success.svg'; -import Tip from '@/assets/icons/tip.svg'; +import Success from '@/assets/icons/success.svg?react'; +import Tip from '@/assets/icons/tip.svg?react'; import DynamicT from '@/ds-components/DynamicT'; import IconButton from '@/ds-components/IconButton'; import { Ring } from '@/ds-components/Spinner'; import ToggleTip from '@/ds-components/Tip/ToggleTip'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly step: number; diff --git a/packages/console/src/pages/TenantSettings/TenantDomainSettings/CustomDomain/ActivationProcess/index.tsx b/packages/console/src/pages/TenantSettings/TenantDomainSettings/CustomDomain/ActivationProcess/index.tsx index 11e159f0ff7..e675a6531e2 100644 --- a/packages/console/src/pages/TenantSettings/TenantDomainSettings/CustomDomain/ActivationProcess/index.tsx +++ b/packages/console/src/pages/TenantSettings/TenantDomainSettings/CustomDomain/ActivationProcess/index.tsx @@ -6,7 +6,7 @@ import InlineNotification from '@/ds-components/InlineNotification'; import DnsRecordsTable from './DnsRecordsTable'; import Step from './Step'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly customDomain: CustomDomain; diff --git a/packages/console/src/pages/TenantSettings/TenantDomainSettings/CustomDomain/CustomDomainHeader/index.tsx b/packages/console/src/pages/TenantSettings/TenantDomainSettings/CustomDomain/CustomDomainHeader/index.tsx index f81b5698791..c037671ea45 100644 --- a/packages/console/src/pages/TenantSettings/TenantDomainSettings/CustomDomain/CustomDomainHeader/index.tsx +++ b/packages/console/src/pages/TenantSettings/TenantDomainSettings/CustomDomain/CustomDomainHeader/index.tsx @@ -2,8 +2,8 @@ import { DomainStatus, type CustomDomain } from '@logto/schemas'; import { toast } from 'react-hot-toast'; import { Trans, useTranslation } from 'react-i18next'; -import Delete from '@/assets/icons/delete.svg'; -import More from '@/assets/icons/more.svg'; +import Delete from '@/assets/icons/delete.svg?react'; +import More from '@/assets/icons/more.svg?react'; import DomainStatusTag from '@/components/DomainStatusTag'; import OpenExternalLink from '@/components/OpenExternalLink'; import ActionMenu, { ActionMenuItem } from '@/ds-components/ActionMenu'; @@ -12,7 +12,7 @@ import DynamicT from '@/ds-components/DynamicT'; import Spacer from '@/ds-components/Spacer'; import { useConfirmModal } from '@/hooks/use-confirm-modal'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly customDomain: CustomDomain; diff --git a/packages/console/src/pages/TenantSettings/TenantDomainSettings/CustomDomain/index.tsx b/packages/console/src/pages/TenantSettings/TenantDomainSettings/CustomDomain/index.tsx index d9fccbf546b..9be54eab870 100644 --- a/packages/console/src/pages/TenantSettings/TenantDomainSettings/CustomDomain/index.tsx +++ b/packages/console/src/pages/TenantSettings/TenantDomainSettings/CustomDomain/index.tsx @@ -3,7 +3,7 @@ import classNames from 'classnames'; import ActivationProcess from './ActivationProcess'; import CustomDomainHeader from './CustomDomainHeader'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly className?: string; diff --git a/packages/console/src/pages/TenantSettings/TenantDomainSettings/DefaultDomain/index.tsx b/packages/console/src/pages/TenantSettings/TenantDomainSettings/DefaultDomain/index.tsx index 3ded17d5f25..16825548d8a 100644 --- a/packages/console/src/pages/TenantSettings/TenantDomainSettings/DefaultDomain/index.tsx +++ b/packages/console/src/pages/TenantSettings/TenantDomainSettings/DefaultDomain/index.tsx @@ -6,7 +6,7 @@ import DynamicT from '@/ds-components/DynamicT'; import Spacer from '@/ds-components/Spacer'; import Tag from '@/ds-components/Tag'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; function DefaultDomain() { const { tenantEndpoint } = useContext(AppDataContext); diff --git a/packages/console/src/pages/TenantSettings/TenantDomainSettings/index.tsx b/packages/console/src/pages/TenantSettings/TenantDomainSettings/index.tsx index d234ed13f4a..27383cd0b9e 100644 --- a/packages/console/src/pages/TenantSettings/TenantDomainSettings/index.tsx +++ b/packages/console/src/pages/TenantSettings/TenantDomainSettings/index.tsx @@ -15,7 +15,7 @@ import Skeleton from '../components/Skeleton'; import AddDomainForm from './AddDomainForm'; import CustomDomain from './CustomDomain'; import DefaultDomain from './DefaultDomain'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; function TenantDomainSettings() { const { t } = useTranslation(undefined, { keyPrefix: 'admin_console' }); diff --git a/packages/console/src/pages/TenantSettings/TenantMembers/EditMemberModal/index.tsx b/packages/console/src/pages/TenantSettings/TenantMembers/EditMemberModal/index.tsx index 3aa0904ef3e..9f03577cdf9 100644 --- a/packages/console/src/pages/TenantSettings/TenantMembers/EditMemberModal/index.tsx +++ b/packages/console/src/pages/TenantSettings/TenantMembers/EditMemberModal/index.tsx @@ -13,9 +13,9 @@ import ModalLayout from '@/ds-components/ModalLayout'; import Select, { type Option } from '@/ds-components/Select'; import { useConfirmModal } from '@/hooks/use-confirm-modal'; import useCurrentTenantScopes from '@/hooks/use-current-tenant-scopes'; -import * as modalStyles from '@/scss/modal.module.scss'; +import modalStyles from '@/scss/modal.module.scss'; -import * as styles from '../index.module.scss'; +import styles from '../index.module.scss'; type Props = { readonly user: TenantMemberResponse; diff --git a/packages/console/src/pages/TenantSettings/TenantMembers/Invitations/index.tsx b/packages/console/src/pages/TenantSettings/TenantMembers/Invitations/index.tsx index 3d0e3e421d6..4d2819975be 100644 --- a/packages/console/src/pages/TenantSettings/TenantMembers/Invitations/index.tsx +++ b/packages/console/src/pages/TenantSettings/TenantMembers/Invitations/index.tsx @@ -6,13 +6,13 @@ import { toast } from 'react-hot-toast'; import { useTranslation } from 'react-i18next'; import useSWR from 'swr'; -import Delete from '@/assets/icons/delete.svg'; -import Invite from '@/assets/icons/invitation.svg'; -import More from '@/assets/icons/more.svg'; -import Plus from '@/assets/icons/plus.svg'; -import Redo from '@/assets/icons/redo.svg'; -import UsersEmptyDark from '@/assets/images/users-empty-dark.svg'; -import UsersEmpty from '@/assets/images/users-empty.svg'; +import Delete from '@/assets/icons/delete.svg?react'; +import Invite from '@/assets/icons/invitation.svg?react'; +import More from '@/assets/icons/more.svg?react'; +import Plus from '@/assets/icons/plus.svg?react'; +import Redo from '@/assets/icons/redo.svg?react'; +import UsersEmptyDark from '@/assets/images/users-empty-dark.svg?react'; +import UsersEmpty from '@/assets/images/users-empty.svg?react'; import { useAuthedCloudApi } from '@/cloud/hooks/use-cloud-api'; import type { InvitationResponse, TenantInvitationResponse } from '@/cloud/types/router'; import Breakable from '@/components/Breakable'; diff --git a/packages/console/src/pages/TenantSettings/TenantMembers/InviteEmailsInput/index.tsx b/packages/console/src/pages/TenantSettings/TenantMembers/InviteEmailsInput/index.tsx index 5108d0fc637..a4c12950d7b 100644 --- a/packages/console/src/pages/TenantSettings/TenantMembers/InviteEmailsInput/index.tsx +++ b/packages/console/src/pages/TenantSettings/TenantMembers/InviteEmailsInput/index.tsx @@ -5,14 +5,14 @@ import classNames from 'classnames'; import { useEffect, useRef, useState } from 'react'; import { useFormContext } from 'react-hook-form'; -import Close from '@/assets/icons/close.svg'; +import Close from '@/assets/icons/close.svg?react'; import IconButton from '@/ds-components/IconButton'; import Tag from '@/ds-components/Tag'; import { onKeyDownHandler } from '@/utils/a11y'; import type { InviteeEmailItem } from '../types'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly formName?: string; diff --git a/packages/console/src/pages/TenantSettings/TenantMembers/InviteMemberModal/Footer/index.tsx b/packages/console/src/pages/TenantSettings/TenantMembers/InviteMemberModal/Footer/index.tsx index f1e4d9a5468..35c1988f539 100644 --- a/packages/console/src/pages/TenantSettings/TenantMembers/InviteMemberModal/Footer/index.tsx +++ b/packages/console/src/pages/TenantSettings/TenantMembers/InviteMemberModal/Footer/index.tsx @@ -10,7 +10,7 @@ import Button, { LinkButton } from '@/ds-components/Button'; import useTenantMembersUsage from '../../hooks'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly newInvitationCount?: number; diff --git a/packages/console/src/pages/TenantSettings/TenantMembers/InviteMemberModal/index.tsx b/packages/console/src/pages/TenantSettings/TenantMembers/InviteMemberModal/index.tsx index 18d868b9aa9..36daa0bedef 100644 --- a/packages/console/src/pages/TenantSettings/TenantMembers/InviteMemberModal/index.tsx +++ b/packages/console/src/pages/TenantSettings/TenantMembers/InviteMemberModal/index.tsx @@ -11,11 +11,11 @@ import FormField from '@/ds-components/FormField'; import ModalLayout from '@/ds-components/ModalLayout'; import Select, { type Option } from '@/ds-components/Select'; import { useConfirmModal } from '@/hooks/use-confirm-modal'; -import * as modalStyles from '@/scss/modal.module.scss'; +import modalStyles from '@/scss/modal.module.scss'; import InviteEmailsInput from '../InviteEmailsInput'; import useEmailInputUtils from '../InviteEmailsInput/hooks'; -import * as styles from '../index.module.scss'; +import styles from '../index.module.scss'; import { type InviteMemberForm } from '../types'; import Footer from './Footer'; diff --git a/packages/console/src/pages/TenantSettings/TenantMembers/index.tsx b/packages/console/src/pages/TenantSettings/TenantMembers/index.tsx index fe6c694d063..b989698f90f 100644 --- a/packages/console/src/pages/TenantSettings/TenantMembers/index.tsx +++ b/packages/console/src/pages/TenantSettings/TenantMembers/index.tsx @@ -3,9 +3,9 @@ import { useContext, useState } from 'react'; import { Outlet } from 'react-router-dom'; import useSWRMutation from 'swr/mutation'; -import InvitationIcon from '@/assets/icons/invitation.svg'; -import MembersIcon from '@/assets/icons/members.svg'; -import PlusIcon from '@/assets/icons/plus.svg'; +import InvitationIcon from '@/assets/icons/invitation.svg?react'; +import MembersIcon from '@/assets/icons/members.svg?react'; +import PlusIcon from '@/assets/icons/plus.svg?react'; import { useAuthedCloudApi } from '@/cloud/hooks/use-cloud-api'; import ChargeNotification from '@/components/ChargeNotification'; import { TenantSettingsTabs } from '@/consts'; @@ -17,7 +17,7 @@ import useTenantPathname from '@/hooks/use-tenant-pathname'; import InviteMemberModal from './InviteMemberModal'; import useTenantMembersUsage from './hooks'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; function TenantMembers() { const { hasTenantMembersSurpassedLimit } = useTenantMembersUsage(); diff --git a/packages/console/src/pages/TenantSettings/components/NotEligibleSwitchPlanModalContent/index.tsx b/packages/console/src/pages/TenantSettings/components/NotEligibleSwitchPlanModalContent/index.tsx index 06ba5acfa21..89ef0b0e4df 100644 --- a/packages/console/src/pages/TenantSettings/components/NotEligibleSwitchPlanModalContent/index.tsx +++ b/packages/console/src/pages/TenantSettings/components/NotEligibleSwitchPlanModalContent/index.tsx @@ -18,7 +18,7 @@ import { } from '@/types/subscriptions'; import { sortBy } from '@/utils/sort'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; const excludedQuotaKeys = new Set([ 'auditLogsRetentionDays', diff --git a/packages/console/src/pages/TenantSettings/components/Skeleton/index.tsx b/packages/console/src/pages/TenantSettings/components/Skeleton/index.tsx index 3bb6647fef8..ec9abdb8bf6 100644 --- a/packages/console/src/pages/TenantSettings/components/Skeleton/index.tsx +++ b/packages/console/src/pages/TenantSettings/components/Skeleton/index.tsx @@ -1,6 +1,6 @@ import { FormCardSkeleton } from '@/components/FormCard'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; function Skeleton() { return ( diff --git a/packages/console/src/pages/TenantSettings/index.tsx b/packages/console/src/pages/TenantSettings/index.tsx index e72881a7c4c..1e9b013ccde 100644 --- a/packages/console/src/pages/TenantSettings/index.tsx +++ b/packages/console/src/pages/TenantSettings/index.tsx @@ -8,7 +8,7 @@ import DynamicT from '@/ds-components/DynamicT'; import TabNav, { TabNavItem } from '@/ds-components/TabNav'; import useCurrentTenantScopes from '@/hooks/use-current-tenant-scopes'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; function TenantSettings() { const { isDevTenant } = useContext(TenantsContext); diff --git a/packages/console/src/pages/UserDetails/UserLogs/index.tsx b/packages/console/src/pages/UserDetails/UserLogs/index.tsx index 3af61a2f4a4..528d1452bb3 100644 --- a/packages/console/src/pages/UserDetails/UserLogs/index.tsx +++ b/packages/console/src/pages/UserDetails/UserLogs/index.tsx @@ -4,7 +4,7 @@ import AuditLogTable from '@/components/AuditLogTable'; import type { UserDetailsOutletContext } from '../types'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; function UserLogs() { const { diff --git a/packages/console/src/pages/UserDetails/UserRoles/index.tsx b/packages/console/src/pages/UserDetails/UserRoles/index.tsx index 6ce9aa53dda..8e9020665ab 100644 --- a/packages/console/src/pages/UserDetails/UserRoles/index.tsx +++ b/packages/console/src/pages/UserDetails/UserRoles/index.tsx @@ -7,8 +7,8 @@ import { useTranslation } from 'react-i18next'; import { useOutletContext } from 'react-router-dom'; import useSWR from 'swr'; -import Delete from '@/assets/icons/delete.svg'; -import Plus from '@/assets/icons/plus.svg'; +import Delete from '@/assets/icons/delete.svg?react'; +import Plus from '@/assets/icons/plus.svg?react'; import EmptyDataPlaceholder from '@/components/EmptyDataPlaceholder'; import ItemPreview from '@/components/ItemPreview'; import RoleAssignmentModal from '@/components/RoleAssignmentModal'; @@ -28,7 +28,7 @@ import { buildUrl, formatSearchKeyword } from '@/utils/url'; import type { UserDetailsOutletContext } from '../types'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; const pageSize = defaultPageSize; diff --git a/packages/console/src/pages/UserDetails/UserSettings/UserMfaVerifications/index.tsx b/packages/console/src/pages/UserDetails/UserSettings/UserMfaVerifications/index.tsx index ae8441f2796..38266f70144 100644 --- a/packages/console/src/pages/UserDetails/UserSettings/UserMfaVerifications/index.tsx +++ b/packages/console/src/pages/UserDetails/UserSettings/UserMfaVerifications/index.tsx @@ -11,7 +11,7 @@ import useApi, { type RequestError } from '@/hooks/use-api'; import { useConfirmModal } from '@/hooks/use-confirm-modal'; import { type UserMfaVerification } from '@/types/mfa'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly userId: string; diff --git a/packages/console/src/pages/UserDetails/UserSettings/components/UserSocialIdentities/index.tsx b/packages/console/src/pages/UserDetails/UserSettings/components/UserSocialIdentities/index.tsx index b27e3428927..aa4740e451d 100644 --- a/packages/console/src/pages/UserDetails/UserSettings/components/UserSocialIdentities/index.tsx +++ b/packages/console/src/pages/UserDetails/UserSettings/components/UserSocialIdentities/index.tsx @@ -13,7 +13,7 @@ import type { RequestError } from '@/hooks/use-api'; import useApi from '@/hooks/use-api'; import { getConnectorGroups } from '@/pages/Connectors/utils'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly userId: string; diff --git a/packages/console/src/pages/UserDetails/UserSettings/components/UserSsoIdentities/index.tsx b/packages/console/src/pages/UserDetails/UserSettings/components/UserSsoIdentities/index.tsx index 4bf7e5fa8d1..fa21c6f9834 100644 --- a/packages/console/src/pages/UserDetails/UserSettings/components/UserSsoIdentities/index.tsx +++ b/packages/console/src/pages/UserDetails/UserSettings/components/UserSsoIdentities/index.tsx @@ -13,7 +13,7 @@ import Table from '@/ds-components/Table'; import type { RequestError } from '@/hooks/use-api'; import SsoConnectorLogo from '@/pages/EnterpriseSso/SsoConnectorLogo'; -import * as styles from '../UserSocialIdentities/index.module.scss'; +import styles from '../UserSocialIdentities/index.module.scss'; type Props = { readonly ssoIdentities: UserSsoIdentity[]; diff --git a/packages/console/src/pages/UserDetails/index.tsx b/packages/console/src/pages/UserDetails/index.tsx index 8a7bc0d59eb..612d5228853 100644 --- a/packages/console/src/pages/UserDetails/index.tsx +++ b/packages/console/src/pages/UserDetails/index.tsx @@ -7,10 +7,10 @@ import ReactModal from 'react-modal'; import { Outlet, useLocation, useParams } from 'react-router-dom'; import useSWR from 'swr'; -import Delete from '@/assets/icons/delete.svg'; -import Forbidden from '@/assets/icons/forbidden.svg'; -import Reset from '@/assets/icons/reset.svg'; -import Shield from '@/assets/icons/shield.svg'; +import Delete from '@/assets/icons/delete.svg?react'; +import Forbidden from '@/assets/icons/forbidden.svg?react'; +import Reset from '@/assets/icons/reset.svg?react'; +import Shield from '@/assets/icons/shield.svg?react'; import DetailsPage from '@/components/DetailsPage'; import DetailsPageHeader from '@/components/DetailsPage/DetailsPageHeader'; import PageMeta from '@/components/PageMeta'; @@ -22,7 +22,7 @@ import TabNav, { TabNavItem } from '@/ds-components/TabNav'; import type { RequestError } from '@/hooks/use-api'; import useApi from '@/hooks/use-api'; import useTenantPathname from '@/hooks/use-tenant-pathname'; -import * as modalStyles from '@/scss/modal.module.scss'; +import modalStyles from '@/scss/modal.module.scss'; import { buildUrl } from '@/utils/url'; import { getUserTitle, getUserSubtitle } from '@/utils/user'; @@ -30,7 +30,7 @@ import UserAccountInformation from '../../components/UserAccountInformation'; import SuspendedTag from '../Users/components/SuspendedTag'; import ResetPasswordForm from './components/ResetPasswordForm'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; import { type UserDetailsOutletContext } from './types'; function UserDetails() { diff --git a/packages/console/src/pages/Users/components/CreateForm/index.tsx b/packages/console/src/pages/Users/components/CreateForm/index.tsx index 7b889250550..75218f8c2c0 100644 --- a/packages/console/src/pages/Users/components/CreateForm/index.tsx +++ b/packages/console/src/pages/Users/components/CreateForm/index.tsx @@ -15,11 +15,11 @@ import ModalLayout from '@/ds-components/ModalLayout'; import TextInput from '@/ds-components/TextInput'; import useApi from '@/hooks/use-api'; import useTenantPathname from '@/hooks/use-tenant-pathname'; -import * as modalStyles from '@/scss/modal.module.scss'; +import modalStyles from '@/scss/modal.module.scss'; import { trySubmitSafe } from '@/utils/form'; import { generateRandomPassword } from '@/utils/password'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type FormData = Pick; diff --git a/packages/console/src/pages/Users/index.tsx b/packages/console/src/pages/Users/index.tsx index 5d7803ac105..f12f12ae2d9 100644 --- a/packages/console/src/pages/Users/index.tsx +++ b/packages/console/src/pages/Users/index.tsx @@ -4,9 +4,9 @@ import { useTranslation } from 'react-i18next'; import { useLocation } from 'react-router-dom'; import useSWR from 'swr'; -import Plus from '@/assets/icons/plus.svg'; -import UsersEmptyDark from '@/assets/images/users-empty-dark.svg'; -import UsersEmpty from '@/assets/images/users-empty.svg'; +import Plus from '@/assets/icons/plus.svg?react'; +import UsersEmptyDark from '@/assets/images/users-empty-dark.svg?react'; +import UsersEmpty from '@/assets/images/users-empty.svg?react'; import ApplicationName from '@/components/ApplicationName'; import DateTime from '@/components/DateTime'; import EmptyDataPlaceholder from '@/components/EmptyDataPlaceholder'; diff --git a/packages/console/src/pages/WebhookDetails/WebhookLogs/index.tsx b/packages/console/src/pages/WebhookDetails/WebhookLogs/index.tsx index d89f41a843a..399effcc408 100644 --- a/packages/console/src/pages/WebhookDetails/WebhookLogs/index.tsx +++ b/packages/console/src/pages/WebhookDetails/WebhookLogs/index.tsx @@ -18,7 +18,7 @@ import { buildUrl } from '@/utils/url'; import { type WebhookDetailsOutletContext } from '../types'; import { buildHookEventLogKey, getHookEventKey } from '../utils'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; const hookLogEventOptions = hookEvents.map((event) => ({ title: event, diff --git a/packages/console/src/pages/WebhookDetails/WebhookSettings/SigningKeyField/index.tsx b/packages/console/src/pages/WebhookDetails/WebhookSettings/SigningKeyField/index.tsx index 3a72a2f5c68..68e4b5642b5 100644 --- a/packages/console/src/pages/WebhookDetails/WebhookSettings/SigningKeyField/index.tsx +++ b/packages/console/src/pages/WebhookDetails/WebhookSettings/SigningKeyField/index.tsx @@ -3,7 +3,7 @@ import { useCallback, useEffect, useState } from 'react'; import { toast } from 'react-hot-toast'; import { useTranslation } from 'react-i18next'; -import Redo from '@/assets/icons/redo.svg'; +import Redo from '@/assets/icons/redo.svg?react'; import Button from '@/ds-components/Button'; import ConfirmModal from '@/ds-components/ConfirmModal'; import CopyToClipboard from '@/ds-components/CopyToClipboard'; @@ -11,7 +11,7 @@ import DynamicT from '@/ds-components/DynamicT'; import FormField from '@/ds-components/FormField'; import useApi from '@/hooks/use-api'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; type Props = { readonly hookId: string; diff --git a/packages/console/src/pages/WebhookDetails/WebhookSettings/TestWebhook/index.tsx b/packages/console/src/pages/WebhookDetails/WebhookSettings/TestWebhook/index.tsx index 923d312d997..5e026a456ad 100644 --- a/packages/console/src/pages/WebhookDetails/WebhookSettings/TestWebhook/index.tsx +++ b/packages/console/src/pages/WebhookDetails/WebhookSettings/TestWebhook/index.tsx @@ -14,7 +14,7 @@ import useApi from '@/hooks/use-api'; import { type WebhookDetailsFormType } from '@/pages/WebhookDetails/types'; import { webhookDetailsParser } from '@/pages/WebhookDetails/utils'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; import useWebhookTestResult from './use-webhook-test-result'; type Props = { diff --git a/packages/console/src/pages/WebhookDetails/index.tsx b/packages/console/src/pages/WebhookDetails/index.tsx index 52771e37f13..d18bd2094b9 100644 --- a/packages/console/src/pages/WebhookDetails/index.tsx +++ b/packages/console/src/pages/WebhookDetails/index.tsx @@ -7,11 +7,11 @@ import { useTranslation } from 'react-i18next'; import { Outlet, useLocation, useParams } from 'react-router-dom'; import useSWR from 'swr'; -import Delete from '@/assets/icons/delete.svg'; -import Forbidden from '@/assets/icons/forbidden.svg'; -import Shield from '@/assets/icons/shield.svg'; -import WebhookDark from '@/assets/icons/webhook-dark.svg'; -import Webhook from '@/assets/icons/webhook.svg'; +import Delete from '@/assets/icons/delete.svg?react'; +import Forbidden from '@/assets/icons/forbidden.svg?react'; +import Shield from '@/assets/icons/shield.svg?react'; +import WebhookDark from '@/assets/icons/webhook-dark.svg?react'; +import Webhook from '@/assets/icons/webhook.svg?react'; import DetailsPage from '@/components/DetailsPage'; import DetailsPageHeader from '@/components/DetailsPage/DetailsPageHeader'; import PageMeta from '@/components/PageMeta'; @@ -25,7 +25,7 @@ import useTenantPathname from '@/hooks/use-tenant-pathname'; import useTheme from '@/hooks/use-theme'; import { buildUrl } from '@/utils/url'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; import { type WebhookDetailsOutletContext } from './types'; function WebhookDetails() { diff --git a/packages/console/src/pages/Webhooks/CreateFormModal/index.tsx b/packages/console/src/pages/Webhooks/CreateFormModal/index.tsx index 8522e936ebc..b6ba73be828 100644 --- a/packages/console/src/pages/Webhooks/CreateFormModal/index.tsx +++ b/packages/console/src/pages/Webhooks/CreateFormModal/index.tsx @@ -1,7 +1,7 @@ import { type Hook } from '@logto/schemas'; import Modal from 'react-modal'; -import * as modalStyles from '@/scss/modal.module.scss'; +import modalStyles from '@/scss/modal.module.scss'; import CreateForm from './CreateForm'; diff --git a/packages/console/src/pages/Webhooks/index.tsx b/packages/console/src/pages/Webhooks/index.tsx index ba20ba2a580..eae94c7498c 100644 --- a/packages/console/src/pages/Webhooks/index.tsx +++ b/packages/console/src/pages/Webhooks/index.tsx @@ -5,11 +5,11 @@ import { useTranslation } from 'react-i18next'; import { useLocation } from 'react-router-dom'; import useSWR from 'swr'; -import Plus from '@/assets/icons/plus.svg'; -import WebhookDark from '@/assets/icons/webhook-dark.svg'; -import Webhook from '@/assets/icons/webhook.svg'; -import WebhooksEmptyDark from '@/assets/images/webhooks-empty-dark.svg'; -import WebhooksEmpty from '@/assets/images/webhooks-empty.svg'; +import Plus from '@/assets/icons/plus.svg?react'; +import WebhookDark from '@/assets/icons/webhook-dark.svg?react'; +import Webhook from '@/assets/icons/webhook.svg?react'; +import WebhooksEmptyDark from '@/assets/images/webhooks-empty-dark.svg?react'; +import WebhooksEmpty from '@/assets/images/webhooks-empty.svg?react'; import ItemPreview from '@/components/ItemPreview'; import ListPage from '@/components/ListPage'; import SuccessRate from '@/components/SuccessRate'; @@ -25,7 +25,7 @@ import useTheme from '@/hooks/use-theme'; import { buildUrl } from '@/utils/url'; import CreateFormModal from './CreateFormModal'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; const pageSize = defaultPageSize; const webhooksPathname = '/webhooks'; diff --git a/packages/console/src/pages/Welcome/index.tsx b/packages/console/src/pages/Welcome/index.tsx index f2d920b8b44..8f907198ce9 100644 --- a/packages/console/src/pages/Welcome/index.tsx +++ b/packages/console/src/pages/Welcome/index.tsx @@ -3,13 +3,13 @@ import classNames from 'classnames'; import { useEffect } from 'react'; import { useTranslation } from 'react-i18next'; -import Logo from '@/assets/images/logo.svg'; +import Logo from '@/assets/images/logo.svg?react'; import Button from '@/ds-components/Button'; import useRedirectUri from '@/hooks/use-redirect-uri'; import useTenantPathname from '@/hooks/use-tenant-pathname'; import useTheme from '@/hooks/use-theme'; -import * as styles from './index.module.scss'; +import styles from './index.module.scss'; function Welcome() { const { t } = useTranslation(undefined, { keyPrefix: 'admin_console' }); diff --git a/packages/console/svgo.config.json b/packages/console/svgo.config.json deleted file mode 100644 index 3fe9143d0d2..00000000000 --- a/packages/console/svgo.config.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "plugins": [ - { - "name": "preset-default", - "params": { - "overrides": { - "cleanupIDs": false, - "removeViewBox": false - } - } - } - ] -} diff --git a/packages/console/tsconfig.json b/packages/console/tsconfig.json index 91e9c18de12..e6a5e449cc7 100644 --- a/packages/console/tsconfig.json +++ b/packages/console/tsconfig.json @@ -3,12 +3,12 @@ "compilerOptions": { "baseUrl": "./", "paths": { - "@/*": ["./src/*"], - "@cloud/*": ["./src/cloud/*"] + "@/*": ["./src/*"] } }, "include": [ "src", - "jest.*.ts" + "jest.*.ts", + "*.config.ts" ] } diff --git a/packages/console/vite.config.ts b/packages/console/vite.config.ts new file mode 100644 index 00000000000..4fcaf167c6f --- /dev/null +++ b/packages/console/vite.config.ts @@ -0,0 +1,55 @@ +import mdx from '@mdx-js/rollup'; +import react from '@vitejs/plugin-react'; +import dotenv from 'dotenv'; +import { findUp } from 'find-up'; +import rehypeMdxCodeProps from 'rehype-mdx-code-props'; +import remarkGfm from 'remark-gfm'; +import { defineConfig, mergeConfig, type UserConfig } from 'vite'; +import viteCompression from 'vite-plugin-compression'; +import svgr from 'vite-plugin-svgr'; + +import { defaultConfig } from '../../vite.shared.config'; + +// We need to explicitly import the `.env` file and use `define` later because we do not have a +// prefix for our environment variables which it is required in Vite. +// @see {@link https://vitejs.dev/config/shared-options.html#envprefix} +dotenv.config({ path: await findUp('.env', {}) }); + +const buildConfig = (mode: string): UserConfig => ({ + base: `/${process.env.CONSOLE_PUBLIC_URL ?? 'console'}`, + envDir: '../../', + server: { + port: 5002, + hmr: { + port: 6002, + }, + }, + css: { + modules: { + generateScopedName: '__[hash:base64:5]__[local]', + }, + }, + plugins: [ + { + enforce: 'pre', + ...mdx({ + providerImportSource: '@mdx-js/react', + remarkPlugins: [remarkGfm], + rehypePlugins: [[rehypeMdxCodeProps, { tagName: 'code' }]], + }), + }, + react(), + svgr(), + viteCompression({ disable: mode === 'development' }), + ], + define: { + 'import.meta.env.IS_CLOUD': JSON.stringify(process.env.IS_CLOUD), + 'import.meta.env.ADMIN_ENDPOINT': JSON.stringify(process.env.ADMIN_ENDPOINT), + 'import.meta.env.DEV_FEATURES_ENABLED': JSON.stringify(process.env.DEV_FEATURES_ENABLED), + 'import.meta.env.INTEGRATION_TEST': JSON.stringify(process.env.INTEGRATION_TEST), + // `@withtyped/client` needs this to be defined. We can optimize this later. + 'process.env': {}, + }, +}); + +export default defineConfig(({ mode }) => mergeConfig(defaultConfig, buildConfig(mode))); diff --git a/packages/core/src/app/init.ts b/packages/core/src/app/init.ts index 642868071f3..bd5e9928555 100644 --- a/packages/core/src/app/init.ts +++ b/packages/core/src/app/init.ts @@ -1,5 +1,6 @@ import fs from 'node:fs/promises'; import http2 from 'node:http2'; +import path from 'node:path'; import { appInsights } from '@logto/app-insights/node'; import { ConsoleLog } from '@logto/shared'; @@ -33,7 +34,11 @@ export default async function initApp(app: Koa): Promise { ctx.console = consoleLog; await koaLogger({ - transporter: (string) => { + transporter: (string, [, _, requestPath]) => { + // Ignoring static file requests in development since vite will load a crazy amount of files + if (!EnvSet.values.isProduction && path.basename(requestPath).includes('.')) { + return; + } consoleLog.plain(string); }, })(ctx, next); diff --git a/packages/core/src/middleware/koa-security-headers.ts b/packages/core/src/middleware/koa-security-headers.ts index cde61c93db2..a981598fcd5 100644 --- a/packages/core/src/middleware/koa-security-headers.ts +++ b/packages/core/src/middleware/koa-security-headers.ts @@ -36,7 +36,9 @@ export default function koaSecurityHeaders( // Logto Cloud uses cloud service to serve the admin console; while Logto OSS uses a fixed path under the admin URL set. const adminOrigins = isCloud ? cloudUrlSet.origins : adminUrlSet.origins; const coreOrigins = urlSet.origins; - const developmentOrigins = conditionalArray(!isProduction && 'ws:'); + const developmentOrigins = isProduction + ? [] + : ['ws:', ...['6001', '6002', '6003'].map((port) => `ws://localhost:${port}`)]; const logtoOrigin = 'https://*.logto.io'; /** Google Sign-In (GSI) origin for Google One Tap. */ const gsiOrigin = 'https://accounts.google.com/gsi/'; diff --git a/packages/core/src/middleware/koa-spa-proxy.ts b/packages/core/src/middleware/koa-spa-proxy.ts index ffccfe53893..da429efe163 100644 --- a/packages/core/src/middleware/koa-spa-proxy.ts +++ b/packages/core/src/middleware/koa-spa-proxy.ts @@ -8,6 +8,7 @@ import type { IRouterParamContext } from 'koa-router'; import { EnvSet } from '#src/env-set/index.js'; import serveStatic from '#src/middleware/koa-serve-static.js'; import type Queries from '#src/tenants/Queries.js'; +import { getConsoleLogFromContext } from '#src/utils/console.js'; import serveCustomUiAssets from './koa-serve-custom-ui-assets.js'; @@ -35,7 +36,14 @@ export default function koaSpaProxy { + // Ignoring static file requests in development since vite will load a crazy amount of files + if (path.basename(ctx.request.path).includes('.')) { + return; + } + + getConsoleLogFromContext(ctx).plain(`\tproxy --> ${target}`); + }, rewrite: (requestPath) => { const fullPath = '/' + path.join(prefix, requestPath); // Static files @@ -45,7 +53,7 @@ export default function koaSpaProxy { diff --git a/packages/demo-app/vite.config.ts b/packages/demo-app/vite.config.ts index 2951f9635ff..9fa6033fbf2 100644 --- a/packages/demo-app/vite.config.ts +++ b/packages/demo-app/vite.config.ts @@ -1,6 +1,8 @@ -import { defineConfig } from 'vite'; +import { mergeConfig, type UserConfig } from 'vite'; -export default defineConfig({ +import { defaultConfig } from '../../vite.shared.config'; + +const config: UserConfig = { base: '/demo-app', server: { port: 5003, @@ -8,40 +10,6 @@ export default defineConfig({ port: 6003, }, }, - resolve: { - alias: [ - { - find: /^@\//, - replacement: '/src/', - }, - ], - }, - optimizeDeps: { - include: ['@logto/phrases', '@logto/phrases-experience', '@logto/schemas'], - }, - build: { - sourcemap: process.env.NODE_ENV === 'production', - rollupOptions: { - output: { - manualChunks(id) { - if (/\/react[^/]*\//.test(id)) { - return 'react'; - } - - if (id.includes('/@logto/')) { - return 'logto'; - } +}; - if (id.includes('/node_modules/')) { - return 'vendors'; - } - - const match = /\/lib\/locales\/([^/]+)/.exec(id); - if (match?.[1]) { - return `phrases-${match[1]}`; - } - }, - }, - }, - }, -}); +export default mergeConfig(defaultConfig, config); diff --git a/packages/phrases-experience/package.json b/packages/phrases-experience/package.json index 4e9804a1c3e..85158e667b1 100644 --- a/packages/phrases-experience/package.json +++ b/packages/phrases-experience/package.json @@ -43,7 +43,6 @@ "devDependencies": { "@silverhand/eslint-config": "6.0.1", "@silverhand/ts-config": "6.0.0", - "buffer": "^6.0.0", "eslint": "^8.56.0", "lint-staged": "^15.0.0", "prettier": "^3.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cacd0811fc8..59a99764510 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -39,6 +39,9 @@ importers: typescript: specifier: ^5.0.0 version: 5.0.2 + vite: + specifier: ^5.3.4 + version: 5.3.4(@types/node@20.12.7)(lightningcss@1.25.1)(sass@1.77.8) packages/app-insights: dependencies: @@ -63,7 +66,7 @@ importers: version: 20.10.4 '@vitest/coverage-v8': specifier: ^2.0.0 - version: 2.0.0(vitest@2.0.0(@types/node@20.10.4)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8)) + version: 2.0.0(vitest@2.0.0(@types/node@20.10.4)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8)) eslint: specifier: ^8.56.0 version: 8.57.0 @@ -78,7 +81,7 @@ importers: version: 5.5.3 vitest: specifier: ^2.0.0 - version: 2.0.0(@types/node@20.10.4)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8) + version: 2.0.0(@types/node@20.10.4)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8) packages/cli: dependencies: @@ -190,7 +193,7 @@ importers: version: 17.0.13 '@vitest/coverage-v8': specifier: ^2.0.0 - version: 2.0.0(vitest@2.0.0(@types/node@20.10.4)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8)) + version: 2.0.0(vitest@2.0.0(@types/node@20.10.4)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8)) '@withtyped/server': specifier: ^0.13.6 version: 0.13.6(zod@3.23.8) @@ -208,7 +211,7 @@ importers: version: 18.0.0 vitest: specifier: ^2.0.0 - version: 2.0.0(@types/node@20.10.4)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8) + version: 2.0.0(@types/node@20.10.4)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8) packages/connectors/connector-alipay-native: dependencies: @@ -263,7 +266,7 @@ importers: version: 6.0.2 '@vitest/coverage-v8': specifier: ^2.0.0 - version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8)) + version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8)) eslint: specifier: ^8.56.0 version: 8.57.0 @@ -290,7 +293,7 @@ importers: version: 5.5.3 vitest: specifier: ^2.0.0 - version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8) + version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8) packages/connectors/connector-alipay-web: dependencies: @@ -345,7 +348,7 @@ importers: version: 6.0.2 '@vitest/coverage-v8': specifier: ^2.0.0 - version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8)) + version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8)) eslint: specifier: ^8.56.0 version: 8.57.0 @@ -372,7 +375,7 @@ importers: version: 5.5.3 vitest: specifier: ^2.0.0 - version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8) + version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8) packages/connectors/connector-aliyun-dm: dependencies: @@ -418,7 +421,7 @@ importers: version: 6.0.2 '@vitest/coverage-v8': specifier: ^2.0.0 - version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8)) + version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8)) eslint: specifier: ^8.56.0 version: 8.57.0 @@ -445,7 +448,7 @@ importers: version: 5.5.3 vitest: specifier: ^2.0.0 - version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8) + version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8) packages/connectors/connector-aliyun-sms: dependencies: @@ -491,7 +494,7 @@ importers: version: 6.0.2 '@vitest/coverage-v8': specifier: ^2.0.0 - version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8)) + version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8)) eslint: specifier: ^8.56.0 version: 8.57.0 @@ -518,7 +521,7 @@ importers: version: 5.5.3 vitest: specifier: ^2.0.0 - version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8) + version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8) packages/connectors/connector-apple: dependencies: @@ -570,7 +573,7 @@ importers: version: 6.0.2 '@vitest/coverage-v8': specifier: ^2.0.0 - version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8)) + version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8)) eslint: specifier: ^8.56.0 version: 8.57.0 @@ -597,7 +600,7 @@ importers: version: 5.5.3 vitest: specifier: ^2.0.0 - version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8) + version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8) packages/connectors/connector-aws-ses: dependencies: @@ -649,7 +652,7 @@ importers: version: 6.0.2 '@vitest/coverage-v8': specifier: ^2.0.0 - version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8)) + version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8)) eslint: specifier: ^8.56.0 version: 8.57.0 @@ -676,7 +679,7 @@ importers: version: 5.5.3 vitest: specifier: ^2.0.0 - version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8) + version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8) packages/connectors/connector-azuread: dependencies: @@ -725,7 +728,7 @@ importers: version: 6.0.2 '@vitest/coverage-v8': specifier: ^2.0.0 - version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8)) + version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8)) eslint: specifier: ^8.56.0 version: 8.57.0 @@ -752,7 +755,7 @@ importers: version: 5.5.3 vitest: specifier: ^2.0.0 - version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8) + version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8) packages/connectors/connector-dingtalk-web: dependencies: @@ -807,7 +810,7 @@ importers: version: 6.0.2 '@vitest/coverage-v8': specifier: ^2.0.0 - version: 2.0.0(vitest@2.0.0(@types/node@20.12.7)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8)) + version: 2.0.0(vitest@2.0.0(@types/node@20.12.7)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8)) eslint: specifier: ^8.56.0 version: 8.57.0 @@ -834,7 +837,7 @@ importers: version: 5.5.3 vitest: specifier: ^2.0.0 - version: 2.0.0(@types/node@20.12.7)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8) + version: 2.0.0(@types/node@20.12.7)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8) packages/connectors/connector-discord: dependencies: @@ -880,7 +883,7 @@ importers: version: 6.0.2 '@vitest/coverage-v8': specifier: ^2.0.0 - version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8)) + version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8)) eslint: specifier: ^8.56.0 version: 8.57.0 @@ -907,7 +910,7 @@ importers: version: 5.5.3 vitest: specifier: ^2.0.0 - version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8) + version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8) packages/connectors/connector-facebook: dependencies: @@ -953,7 +956,7 @@ importers: version: 6.0.2 '@vitest/coverage-v8': specifier: ^2.0.0 - version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8)) + version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8)) eslint: specifier: ^8.56.0 version: 8.57.0 @@ -980,7 +983,7 @@ importers: version: 5.5.3 vitest: specifier: ^2.0.0 - version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8) + version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8) packages/connectors/connector-feishu-web: dependencies: @@ -1026,7 +1029,7 @@ importers: version: 6.0.2 '@vitest/coverage-v8': specifier: ^2.0.0 - version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8)) + version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8)) eslint: specifier: ^8.56.0 version: 8.57.0 @@ -1053,7 +1056,7 @@ importers: version: 5.5.3 vitest: specifier: ^2.0.0 - version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8) + version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8) packages/connectors/connector-github: dependencies: @@ -1102,7 +1105,7 @@ importers: version: 6.0.2 '@vitest/coverage-v8': specifier: ^2.0.0 - version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8)) + version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8)) eslint: specifier: ^8.56.0 version: 8.57.0 @@ -1129,7 +1132,7 @@ importers: version: 5.5.3 vitest: specifier: ^2.0.0 - version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8) + version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8) packages/connectors/connector-google: dependencies: @@ -1178,7 +1181,7 @@ importers: version: 6.0.2 '@vitest/coverage-v8': specifier: ^2.0.0 - version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8)) + version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8)) eslint: specifier: ^8.56.0 version: 8.57.0 @@ -1205,7 +1208,7 @@ importers: version: 5.5.3 vitest: specifier: ^2.0.0 - version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8) + version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8) packages/connectors/connector-huggingface: dependencies: @@ -1251,7 +1254,7 @@ importers: version: 6.0.2 '@vitest/coverage-v8': specifier: ^2.0.0 - version: 2.0.0(vitest@2.0.0(@types/node@20.12.7)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8)) + version: 2.0.0(vitest@2.0.0(@types/node@20.12.7)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8)) eslint: specifier: ^8.56.0 version: 8.57.0 @@ -1278,7 +1281,7 @@ importers: version: 5.5.3 vitest: specifier: ^2.0.0 - version: 2.0.0(@types/node@20.12.7)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8) + version: 2.0.0(@types/node@20.12.7)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8) packages/connectors/connector-kakao: dependencies: @@ -1324,7 +1327,7 @@ importers: version: 6.0.2 '@vitest/coverage-v8': specifier: ^2.0.0 - version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8)) + version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8)) eslint: specifier: ^8.56.0 version: 8.57.0 @@ -1351,7 +1354,7 @@ importers: version: 5.5.3 vitest: specifier: ^2.0.0 - version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8) + version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8) packages/connectors/connector-logto-email: dependencies: @@ -1400,7 +1403,7 @@ importers: version: 6.0.2 '@vitest/coverage-v8': specifier: ^2.0.0 - version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8)) + version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8)) eslint: specifier: ^8.56.0 version: 8.57.0 @@ -1427,7 +1430,7 @@ importers: version: 5.5.3 vitest: specifier: ^2.0.0 - version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8) + version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8) packages/connectors/connector-logto-sms: dependencies: @@ -1473,7 +1476,7 @@ importers: version: 6.0.2 '@vitest/coverage-v8': specifier: ^2.0.0 - version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8)) + version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8)) eslint: specifier: ^8.56.0 version: 8.57.0 @@ -1500,7 +1503,7 @@ importers: version: 5.5.3 vitest: specifier: ^2.0.0 - version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8) + version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8) packages/connectors/connector-logto-social-demo: dependencies: @@ -1546,7 +1549,7 @@ importers: version: 6.0.2 '@vitest/coverage-v8': specifier: ^2.0.0 - version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8)) + version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8)) eslint: specifier: ^8.56.0 version: 8.57.0 @@ -1573,7 +1576,7 @@ importers: version: 5.5.3 vitest: specifier: ^2.0.0 - version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8) + version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8) packages/connectors/connector-mailgun: dependencies: @@ -1619,7 +1622,7 @@ importers: version: 6.0.2 '@vitest/coverage-v8': specifier: ^2.0.0 - version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8)) + version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8)) eslint: specifier: ^8.56.0 version: 8.57.0 @@ -1646,7 +1649,7 @@ importers: version: 5.5.3 vitest: specifier: ^2.0.0 - version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8) + version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8) packages/connectors/connector-mock-email: dependencies: @@ -1692,7 +1695,7 @@ importers: version: 6.0.2 '@vitest/coverage-v8': specifier: ^2.0.0 - version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8)) + version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8)) eslint: specifier: ^8.56.0 version: 8.57.0 @@ -1719,7 +1722,7 @@ importers: version: 5.5.3 vitest: specifier: ^2.0.0 - version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8) + version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8) packages/connectors/connector-mock-email-alternative: dependencies: @@ -1765,7 +1768,7 @@ importers: version: 6.0.2 '@vitest/coverage-v8': specifier: ^2.0.0 - version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8)) + version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8)) eslint: specifier: ^8.56.0 version: 8.57.0 @@ -1792,7 +1795,7 @@ importers: version: 5.5.3 vitest: specifier: ^2.0.0 - version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8) + version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8) packages/connectors/connector-mock-sms: dependencies: @@ -1838,7 +1841,7 @@ importers: version: 6.0.2 '@vitest/coverage-v8': specifier: ^2.0.0 - version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8)) + version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8)) eslint: specifier: ^8.56.0 version: 8.57.0 @@ -1865,7 +1868,7 @@ importers: version: 5.5.3 vitest: specifier: ^2.0.0 - version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8) + version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8) packages/connectors/connector-mock-social: dependencies: @@ -1911,7 +1914,7 @@ importers: version: 6.0.2 '@vitest/coverage-v8': specifier: ^2.0.0 - version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8)) + version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8)) eslint: specifier: ^8.56.0 version: 8.57.0 @@ -1938,7 +1941,7 @@ importers: version: 5.5.3 vitest: specifier: ^2.0.0 - version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8) + version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8) packages/connectors/connector-naver: dependencies: @@ -1984,7 +1987,7 @@ importers: version: 6.0.2 '@vitest/coverage-v8': specifier: ^2.0.0 - version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8)) + version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8)) eslint: specifier: ^8.56.0 version: 8.57.0 @@ -2011,7 +2014,7 @@ importers: version: 5.5.3 vitest: specifier: ^2.0.0 - version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8) + version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8) packages/connectors/connector-oauth2: dependencies: @@ -2066,7 +2069,7 @@ importers: version: 6.0.2 '@vitest/coverage-v8': specifier: ^2.0.0 - version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8)) + version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8)) eslint: specifier: ^8.56.0 version: 8.57.0 @@ -2093,7 +2096,7 @@ importers: version: 5.5.3 vitest: specifier: ^2.0.0 - version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8) + version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8) packages/connectors/connector-oidc: dependencies: @@ -2151,7 +2154,7 @@ importers: version: 6.0.2 '@vitest/coverage-v8': specifier: ^2.0.0 - version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8)) + version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8)) eslint: specifier: ^8.56.0 version: 8.57.0 @@ -2178,7 +2181,7 @@ importers: version: 5.5.3 vitest: specifier: ^2.0.0 - version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8) + version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8) packages/connectors/connector-saml: dependencies: @@ -2230,7 +2233,7 @@ importers: version: 6.0.2 '@vitest/coverage-v8': specifier: ^2.0.0 - version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8)) + version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8)) eslint: specifier: ^8.56.0 version: 8.57.0 @@ -2257,7 +2260,7 @@ importers: version: 5.5.3 vitest: specifier: ^2.0.0 - version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8) + version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8) packages/connectors/connector-sendgrid-email: dependencies: @@ -2303,7 +2306,7 @@ importers: version: 6.0.2 '@vitest/coverage-v8': specifier: ^2.0.0 - version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8)) + version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8)) eslint: specifier: ^8.56.0 version: 8.57.0 @@ -2330,7 +2333,7 @@ importers: version: 5.5.3 vitest: specifier: ^2.0.0 - version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8) + version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8) packages/connectors/connector-smsaero: dependencies: @@ -2376,7 +2379,7 @@ importers: version: 6.0.2 '@vitest/coverage-v8': specifier: ^2.0.0 - version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8)) + version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8)) eslint: specifier: ^8.56.0 version: 8.57.0 @@ -2403,7 +2406,7 @@ importers: version: 5.5.3 vitest: specifier: ^2.0.0 - version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8) + version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8) packages/connectors/connector-smtp: dependencies: @@ -2455,7 +2458,7 @@ importers: version: 6.0.2 '@vitest/coverage-v8': specifier: ^2.0.0 - version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8)) + version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8)) eslint: specifier: ^8.56.0 version: 8.57.0 @@ -2482,7 +2485,7 @@ importers: version: 5.5.3 vitest: specifier: ^2.0.0 - version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8) + version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8) packages/connectors/connector-tencent-sms: dependencies: @@ -2528,7 +2531,7 @@ importers: version: 6.0.2 '@vitest/coverage-v8': specifier: ^2.0.0 - version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8)) + version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8)) eslint: specifier: ^8.56.0 version: 8.57.0 @@ -2555,7 +2558,7 @@ importers: version: 5.5.3 vitest: specifier: ^2.0.0 - version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8) + version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8) packages/connectors/connector-twilio-sms: dependencies: @@ -2601,7 +2604,7 @@ importers: version: 6.0.2 '@vitest/coverage-v8': specifier: ^2.0.0 - version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8)) + version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8)) eslint: specifier: ^8.56.0 version: 8.57.0 @@ -2628,7 +2631,7 @@ importers: version: 5.5.3 vitest: specifier: ^2.0.0 - version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8) + version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8) packages/connectors/connector-wechat-native: dependencies: @@ -2674,7 +2677,7 @@ importers: version: 6.0.2 '@vitest/coverage-v8': specifier: ^2.0.0 - version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8)) + version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8)) eslint: specifier: ^8.56.0 version: 8.57.0 @@ -2701,7 +2704,7 @@ importers: version: 5.5.3 vitest: specifier: ^2.0.0 - version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8) + version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8) packages/connectors/connector-wechat-web: dependencies: @@ -2747,7 +2750,7 @@ importers: version: 6.0.2 '@vitest/coverage-v8': specifier: ^2.0.0 - version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8)) + version: 2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8)) eslint: specifier: ^8.56.0 version: 8.57.0 @@ -2774,7 +2777,7 @@ importers: version: 5.5.3 vitest: specifier: ^2.0.0 - version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8) + version: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8) packages/connectors/connector-wecom: dependencies: @@ -2820,7 +2823,7 @@ importers: version: 6.0.2 '@vitest/coverage-v8': specifier: ^2.0.0 - version: 2.0.0(vitest@2.0.0(@types/node@20.10.4)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8)) + version: 2.0.0(vitest@2.0.0(@types/node@20.10.4)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8)) eslint: specifier: ^8.56.0 version: 8.57.0 @@ -2847,7 +2850,7 @@ importers: version: 5.5.3 vitest: specifier: ^2.0.0 - version: 2.0.0(@types/node@20.10.4)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8) + version: 2.0.0(@types/node@20.10.4)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8) packages/console: devDependencies: @@ -2893,30 +2896,18 @@ importers: '@mdx-js/react': specifier: ^3.0.1 version: 3.0.1(@types/react@18.3.3)(react@18.3.1) + '@mdx-js/rollup': + specifier: ^3.0.1 + version: 3.0.1(rollup@4.14.3) '@monaco-editor/react': specifier: ^4.6.0 version: 4.6.0(monaco-editor@0.47.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@parcel/compressor-brotli': - specifier: 2.9.3 - version: 2.9.3(@parcel/core@2.9.3) - '@parcel/compressor-gzip': - specifier: 2.9.3 - version: 2.9.3(@parcel/core@2.9.3) - '@parcel/core': - specifier: 2.9.3 - version: 2.9.3 - '@parcel/transformer-sass': - specifier: 2.9.3 - version: 2.9.3(@parcel/core@2.9.3) - '@parcel/transformer-svg-react': - specifier: 2.9.3 - version: 2.9.3(@parcel/core@2.9.3) '@silverhand/eslint-config': specifier: 6.0.1 version: 6.0.1(eslint@8.57.0)(prettier@3.0.0)(typescript@5.5.3) '@silverhand/eslint-config-react': specifier: 6.0.2 - version: 6.0.2(eslint@8.57.0)(postcss@8.4.31)(prettier@3.0.0)(stylelint@15.11.0(typescript@5.5.3))(typescript@5.5.3) + version: 6.0.2(eslint@8.57.0)(postcss@8.4.39)(prettier@3.0.0)(stylelint@15.11.0(typescript@5.5.3))(typescript@5.5.3) '@silverhand/essentials': specifier: ^2.9.1 version: 2.9.1 @@ -2965,24 +2956,18 @@ importers: '@types/react-syntax-highlighter': specifier: ^15.5.1 version: 15.5.1 + '@vitejs/plugin-react': + specifier: ^4.3.1 + version: 4.3.1(vite@5.3.4(@types/node@20.12.7)(lightningcss@1.25.1)(sass@1.77.8)) '@withtyped/client': specifier: ^0.8.7 version: 0.8.7(zod@3.23.8) - buffer: - specifier: ^6.0.0 - version: 6.0.3 classnames: specifier: ^2.3.1 version: 2.3.1 clean-deep: specifier: ^3.4.0 version: 3.4.0 - cross-env: - specifier: ^7.0.3 - version: 7.0.3 - csstype: - specifier: ^3.0.11 - version: 3.0.11 date-fns: specifier: ^2.29.3 version: 2.29.3 @@ -3001,12 +2986,15 @@ importers: dnd-core: specifier: ^16.0.0 version: 16.0.0 + dotenv: + specifier: ^16.4.5 + version: 16.4.5 eslint: specifier: ^8.56.0 version: 8.57.0 - history: - specifier: ^5.3.0 - version: 5.3.0 + find-up: + specifier: ^7.0.0 + version: 7.0.0 i18next: specifier: ^22.4.15 version: 22.4.15 @@ -3052,21 +3040,15 @@ importers: overlayscrollbars-react: specifier: ^0.5.0 version: 0.5.0(overlayscrollbars@2.0.3)(react@18.3.1) - parcel: - specifier: 2.9.3 - version: 2.9.3(@swc/helpers@0.5.1)(postcss@8.4.31)(srcset@4.0.0) postcss: - specifier: ^8.4.31 - version: 8.4.31 + specifier: ^8.4.39 + version: 8.4.39 postcss-modules: specifier: ^4.3.0 - version: 4.3.0(postcss@8.4.31) + version: 4.3.1(postcss@8.4.39) prettier: specifier: ^3.0.0 version: 3.0.0 - process: - specifier: ^0.11.10 - version: 0.11.10 prop-types: specifier: ^15.8.1 version: 15.8.1 @@ -3119,8 +3101,8 @@ importers: specifier: ^8.1.3 version: 8.1.3(react@18.3.1) react-router-dom: - specifier: ^6.10.0 - version: 6.10.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: ^6.25.1 + version: 6.25.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react-syntax-highlighter: specifier: ^15.5.0 version: 15.5.0(react@18.3.1) @@ -3142,15 +3124,21 @@ importers: swr: specifier: ^2.2.0 version: 2.2.0(react@18.3.1) - ts-node: - specifier: ^10.9.2 - version: 10.9.2(@swc/core@1.3.52)(@types/node@20.12.7)(typescript@5.5.3) - tslib: - specifier: ^2.4.1 - version: 2.4.1 typescript: specifier: ^5.5.3 version: 5.5.3 + vite: + specifier: ^5.3.4 + version: 5.3.4(@types/node@20.12.7)(lightningcss@1.25.1)(sass@1.77.8) + vite-plugin-compression: + specifier: ^0.5.1 + version: 0.5.1(vite@5.3.4(@types/node@20.12.7)(lightningcss@1.25.1)(sass@1.77.8)) + vite-plugin-prebundle: + specifier: ^0.0.4 + version: 0.0.4(esbuild@0.21.5)(rollup@4.14.3)(vite@5.3.4(@types/node@20.12.7)(lightningcss@1.25.1)(sass@1.77.8)) + vite-plugin-svgr: + specifier: ^4.2.0 + version: 4.2.0(rollup@4.14.3)(typescript@5.5.3)(vite@5.3.4(@types/node@20.12.7)(lightningcss@1.25.1)(sass@1.77.8)) zod: specifier: ^3.23.8 version: 3.23.8 @@ -3493,7 +3481,7 @@ importers: version: 6.0.1(eslint@8.57.0)(prettier@3.0.0)(typescript@5.5.3) '@silverhand/eslint-config-react': specifier: 6.0.2 - version: 6.0.2(eslint@8.57.0)(postcss@8.4.31)(prettier@3.0.0)(stylelint@15.11.0(typescript@5.5.3))(typescript@5.5.3) + version: 6.0.2(eslint@8.57.0)(postcss@8.4.39)(prettier@3.0.0)(stylelint@15.11.0(typescript@5.5.3))(typescript@5.5.3) '@silverhand/ts-config': specifier: 6.0.0 version: 6.0.0(typescript@5.5.3) @@ -3506,12 +3494,6 @@ importers: '@types/react-dom': specifier: ^18.3.0 version: 18.3.0 - buffer: - specifier: ^6.0.0 - version: 6.0.3 - cross-env: - specifier: ^7.0.3 - version: 7.0.3 eslint: specifier: ^8.56.0 version: 8.57.0 @@ -3527,9 +3509,6 @@ importers: lint-staged: specifier: ^15.0.0 version: 15.0.2 - postcss: - specifier: ^8.4.31 - version: 8.4.31 prettier: specifier: ^3.0.0 version: 3.0.0 @@ -3550,7 +3529,7 @@ importers: version: 5.5.3 vite: specifier: ^5.3.4 - version: 5.3.4(@types/node@20.12.7)(sass@1.77.8) + version: 5.3.4(@types/node@20.12.7)(lightningcss@1.25.1)(sass@1.77.8) zod: specifier: ^3.23.8 version: 3.23.8 @@ -3770,7 +3749,7 @@ importers: version: 8.4.31 postcss-modules: specifier: ^4.3.0 - version: 4.3.0(postcss@8.4.31) + version: 4.3.1(postcss@8.4.31) prettier: specifier: ^3.0.0 version: 3.0.0 @@ -3969,9 +3948,6 @@ importers: '@silverhand/ts-config': specifier: 6.0.0 version: 6.0.0(typescript@5.5.3) - buffer: - specifier: ^6.0.0 - version: 6.0.3 eslint: specifier: ^8.56.0 version: 8.57.0 @@ -4038,7 +4014,7 @@ importers: version: 0.0.33 '@vitest/coverage-v8': specifier: ^2.0.0 - version: 2.0.0(vitest@2.0.0(@types/node@20.10.4)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8)) + version: 2.0.0(vitest@2.0.0(@types/node@20.10.4)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8)) camelcase: specifier: ^8.0.0 version: 8.0.0 @@ -4065,7 +4041,7 @@ importers: version: 5.5.3 vitest: specifier: ^2.0.0 - version: 2.0.0(@types/node@20.10.4)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8) + version: 2.0.0(@types/node@20.10.4)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8) packages/shared: dependencies: @@ -4099,7 +4075,7 @@ importers: version: 20.10.4 '@vitest/coverage-v8': specifier: ^2.0.0 - version: 2.0.0(vitest@2.0.0(@types/node@20.10.4)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8)) + version: 2.0.0(vitest@2.0.0(@types/node@20.10.4)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8)) eslint: specifier: ^8.56.0 version: 8.57.0 @@ -4114,7 +4090,7 @@ importers: version: 5.5.3 vitest: specifier: ^2.0.0 - version: 2.0.0(@types/node@20.10.4)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8) + version: 2.0.0(@types/node@20.10.4)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8) packages/toolkit/connector-kit: dependencies: @@ -4146,7 +4122,7 @@ importers: version: 20.10.4 '@vitest/coverage-v8': specifier: ^2.0.0 - version: 2.0.0(vitest@2.0.0(@types/node@20.10.4)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8)) + version: 2.0.0(vitest@2.0.0(@types/node@20.10.4)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8)) eslint: specifier: ^8.56.0 version: 8.57.0 @@ -4161,7 +4137,7 @@ importers: version: 5.5.3 vitest: specifier: ^2.0.0 - version: 2.0.0(@types/node@20.10.4)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8) + version: 2.0.0(@types/node@20.10.4)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8) packages/toolkit/core-kit: dependencies: @@ -4205,7 +4181,7 @@ importers: version: 18.3.3 '@vitest/coverage-v8': specifier: ^2.0.0 - version: 2.0.0(vitest@2.0.0(@types/node@20.10.4)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8)) + version: 2.0.0(vitest@2.0.0(@types/node@20.10.4)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8)) eslint: specifier: ^8.56.0 version: 8.57.0 @@ -4226,7 +4202,7 @@ importers: version: 5.5.3 vitest: specifier: ^2.0.0 - version: 2.0.0(@types/node@20.10.4)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8) + version: 2.0.0(@types/node@20.10.4)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8) packages/toolkit/language-kit: optionalDependencies: @@ -4245,7 +4221,7 @@ importers: version: 20.10.4 '@vitest/coverage-v8': specifier: ^2.0.0 - version: 2.0.0(vitest@2.0.0(@types/node@20.10.4)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8)) + version: 2.0.0(vitest@2.0.0(@types/node@20.10.4)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8)) eslint: specifier: ^8.56.0 version: 8.57.0 @@ -4260,7 +4236,7 @@ importers: version: 5.5.3 vitest: specifier: ^2.0.0 - version: 2.0.0(@types/node@20.10.4)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8) + version: 2.0.0(@types/node@20.10.4)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8) packages: @@ -4539,18 +4515,34 @@ packages: resolution: {integrity: sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==} engines: {node: '>=6.9.0'} + '@babel/code-frame@7.24.7': + resolution: {integrity: sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==} + engines: {node: '>=6.9.0'} + '@babel/compat-data@7.24.4': resolution: {integrity: sha512-vg8Gih2MLK+kOkHJp4gBEIkyaIi00jgWot2D9QOmmfLC8jINSOzmCLta6Bvz/JSBCqnegV0L80jhxkol5GWNfQ==} engines: {node: '>=6.9.0'} + '@babel/compat-data@7.24.9': + resolution: {integrity: sha512-e701mcfApCJqMMueQI0Fb68Amflj83+dvAvHawoBpAz+GDjCIyGHzNwnefjsWJ3xiYAqqiQFoWbspGYBdb2/ng==} + engines: {node: '>=6.9.0'} + '@babel/core@7.24.4': resolution: {integrity: sha512-MBVlMXP+kkl5394RBLSxxk/iLTeVGuXTV3cIDXavPpMMqnSnt6apKgan/U8O3USWZCWZT/TbgfEpKa4uMgN4Dg==} engines: {node: '>=6.9.0'} + '@babel/core@7.24.9': + resolution: {integrity: sha512-5e3FI4Q3M3Pbr21+5xJwCv6ZT6KmGkI0vw3Tozy5ODAQFTIWe37iT8Cr7Ice2Ntb+M3iSKCEWMB1MBgKrW3whg==} + engines: {node: '>=6.9.0'} + '@babel/generator@7.20.4': resolution: {integrity: sha512-luCf7yk/cm7yab6CAW1aiFnmEfBJplb/JojV56MYEK7ziWfGmFlTfmL9Ehwfy4gFhbjBfWO1wj7/TuSbVNEEtA==} engines: {node: '>=6.9.0'} + '@babel/generator@7.24.10': + resolution: {integrity: sha512-o9HBZL1G2129luEUlG1hB4N/nlYNWHnpwlND9eOMclRqqu1YDy2sSYVCFUZwl8I1Gxh+QSRrP2vD7EpUmFVXxg==} + engines: {node: '>=6.9.0'} + '@babel/generator@7.24.4': resolution: {integrity: sha512-Xd6+v6SnjWVx/nus+y0l1sxMOTOMBkyL4+BIdbALyatQnAe/SRVjANeDPSCYaX+i1iJmuGSKf3Z+E+V/va1Hvw==} engines: {node: '>=6.9.0'} @@ -4559,56 +4551,110 @@ packages: resolution: {integrity: sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==} engines: {node: '>=6.9.0'} + '@babel/helper-compilation-targets@7.24.8': + resolution: {integrity: sha512-oU+UoqCHdp+nWVDkpldqIQL/i/bvAv53tRqLG/s+cOXxe66zOYLU7ar/Xs3LdmBihrUMEUhwu6dMZwbNOYDwvw==} + engines: {node: '>=6.9.0'} + '@babel/helper-environment-visitor@7.22.20': resolution: {integrity: sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==} engines: {node: '>=6.9.0'} + '@babel/helper-environment-visitor@7.24.7': + resolution: {integrity: sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==} + engines: {node: '>=6.9.0'} + '@babel/helper-function-name@7.23.0': resolution: {integrity: sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==} engines: {node: '>=6.9.0'} + '@babel/helper-function-name@7.24.7': + resolution: {integrity: sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==} + engines: {node: '>=6.9.0'} + '@babel/helper-hoist-variables@7.22.5': resolution: {integrity: sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==} engines: {node: '>=6.9.0'} + '@babel/helper-hoist-variables@7.24.7': + resolution: {integrity: sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==} + engines: {node: '>=6.9.0'} + '@babel/helper-module-imports@7.24.3': resolution: {integrity: sha512-viKb0F9f2s0BCS22QSF308z/+1YWKV/76mwt61NBzS5izMzDPwdq1pTrzf+Li3npBWX9KdQbkeCt1jSAM7lZqg==} engines: {node: '>=6.9.0'} + '@babel/helper-module-imports@7.24.7': + resolution: {integrity: sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==} + engines: {node: '>=6.9.0'} + '@babel/helper-module-transforms@7.23.3': resolution: {integrity: sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 + '@babel/helper-module-transforms@7.24.9': + resolution: {integrity: sha512-oYbh+rtFKj/HwBQkFlUzvcybzklmVdVV3UU+mN7n2t/q3yGHbuVdNxyFvSBO1tfvjyArpHNcWMAzsSPdyI46hw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + '@babel/helper-plugin-utils@7.20.2': resolution: {integrity: sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ==} engines: {node: '>=6.9.0'} + '@babel/helper-plugin-utils@7.24.8': + resolution: {integrity: sha512-FFWx5142D8h2Mgr/iPVGH5G7w6jDn4jUSpZTyDnQO0Yn7Ks2Kuz6Pci8H6MPCoUJegd/UZQ3tAvfLCxQSnWWwg==} + engines: {node: '>=6.9.0'} + '@babel/helper-simple-access@7.22.5': resolution: {integrity: sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==} engines: {node: '>=6.9.0'} + '@babel/helper-simple-access@7.24.7': + resolution: {integrity: sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==} + engines: {node: '>=6.9.0'} + '@babel/helper-split-export-declaration@7.22.6': resolution: {integrity: sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==} engines: {node: '>=6.9.0'} + '@babel/helper-split-export-declaration@7.24.7': + resolution: {integrity: sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==} + engines: {node: '>=6.9.0'} + '@babel/helper-string-parser@7.23.4': resolution: {integrity: sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==} engines: {node: '>=6.9.0'} + '@babel/helper-string-parser@7.24.8': + resolution: {integrity: sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==} + engines: {node: '>=6.9.0'} + '@babel/helper-validator-identifier@7.22.20': resolution: {integrity: sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==} engines: {node: '>=6.9.0'} + '@babel/helper-validator-identifier@7.24.7': + resolution: {integrity: sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==} + engines: {node: '>=6.9.0'} + '@babel/helper-validator-option@7.23.5': resolution: {integrity: sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==} engines: {node: '>=6.9.0'} + '@babel/helper-validator-option@7.24.8': + resolution: {integrity: sha512-xb8t9tD1MHLungh/AIoWYN+gVHaB9kwlu8gffXGSt3FFEIT7RjS+xWbc2vUD1UTZdIpKj/ab3rdqJ7ufngyi2Q==} + engines: {node: '>=6.9.0'} + '@babel/helpers@7.24.4': resolution: {integrity: sha512-FewdlZbSiwaVGlgT1DPANDuCHaDMiOo+D/IDYRFYjHOuv66xMSJ7fQwwODwRNAPkADIO/z1EoF/l2BCWlWABDw==} engines: {node: '>=6.9.0'} + '@babel/helpers@7.24.8': + resolution: {integrity: sha512-gV2265Nkcz7weJJfvDoAEVzC1e2OTDpkGbEsebse8koXUJUXPsCMi7sRo/+SPMuMZ9MtUPnGwITTnQnU5YjyaQ==} + engines: {node: '>=6.9.0'} + '@babel/highlight@7.22.5': resolution: {integrity: sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==} engines: {node: '>=6.9.0'} @@ -4617,11 +4663,20 @@ packages: resolution: {integrity: sha512-Yac1ao4flkTxTteCDZLEvdxg2fZfz1v8M4QpaGypq/WPDqg3ijHYbDfs+LG5hvzSoqaSZ9/Z9lKSP3CjZjv+pA==} engines: {node: '>=6.9.0'} + '@babel/highlight@7.24.7': + resolution: {integrity: sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==} + engines: {node: '>=6.9.0'} + '@babel/parser@7.24.4': resolution: {integrity: sha512-zTvEBcghmeBma9QIGunWevvBAp4/Qu9Bdq+2k0Ot4fVMD6v3dsC9WOcRSKk7tRRyBM/53yKMJko9xOatGQAwSg==} engines: {node: '>=6.0.0'} hasBin: true + '@babel/parser@7.24.8': + resolution: {integrity: sha512-WzfbgXOkGzZiXXCqk43kKwZjzwx4oulxZi3nq2TYL9mOjQv6kYwul9mz6ID36njuL7Xkp6nJEfok848Zj10j/w==} + engines: {node: '>=6.0.0'} + hasBin: true + '@babel/plugin-syntax-async-generators@7.8.4': resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==} peerDependencies: @@ -4695,12 +4750,20 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/runtime@7.17.9': - resolution: {integrity: sha512-lSiBBvodq29uShpWGNbgFdKYNiFDo5/HIYsaCEY9ff4sb10x9jizo2+pRrSyF4jKZCXqgzuqBOQKbUm90gQwJg==} + '@babel/plugin-transform-react-jsx-self@7.24.7': + resolution: {integrity: sha512-fOPQYbGSgH0HUp4UJO4sMBFjY6DuWq+2i8rixyUMb3CdGixs/gccURvYOAhajBdKDoGajFr3mUq5rH3phtkGzw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-react-jsx-source@7.24.7': + resolution: {integrity: sha512-J2z+MWzZHVOemyLweMqngXrgGC42jQ//R0KdxqkIz/OrbVIIlhFI3WigZ5fO+nwFvBlncr4MGapd8vTyc7RPNQ==} engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 - '@babel/runtime@7.19.4': - resolution: {integrity: sha512-EXpLCrk55f+cYqmHsSR+yD/0gAIMxxA9QK9lnQWzhMCvt+YmoBN7Zx94s++Kv0+unHk39vxNO8t+CMA2WSS3wA==} + '@babel/runtime@7.17.9': + resolution: {integrity: sha512-lSiBBvodq29uShpWGNbgFdKYNiFDo5/HIYsaCEY9ff4sb10x9jizo2+pRrSyF4jKZCXqgzuqBOQKbUm90gQwJg==} engines: {node: '>=6.9.0'} '@babel/runtime@7.21.0': @@ -4719,14 +4782,26 @@ packages: resolution: {integrity: sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==} engines: {node: '>=6.9.0'} + '@babel/template@7.24.7': + resolution: {integrity: sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==} + engines: {node: '>=6.9.0'} + '@babel/traverse@7.24.1': resolution: {integrity: sha512-xuU6o9m68KeqZbQuDt2TcKSxUw/mrsvavlEqQ1leZ/B+C9tk6E4sRWy97WaXgvq5E+nU3cXMxv3WKOCanVMCmQ==} engines: {node: '>=6.9.0'} + '@babel/traverse@7.24.8': + resolution: {integrity: sha512-t0P1xxAPzEDcEPmjprAQq19NWum4K0EQPjMwZQZbHt+GiZqvjCHjj755Weq1YRPVzBI+3zSfvScfpnuIecVFJQ==} + engines: {node: '>=6.9.0'} + '@babel/types@7.24.0': resolution: {integrity: sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==} engines: {node: '>=6.9.0'} + '@babel/types@7.24.9': + resolution: {integrity: sha512-xm8XrMKz0IlUdocVbYJe0Z9xEgidU7msskG8BbhnTPK/HZ2z/7FP7ykqPgrUH+C+r414mNfNWam1f2vqOjqjYQ==} + engines: {node: '>=6.9.0'} + '@bcoe/v8-coverage@0.2.3': resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} @@ -5474,6 +5549,11 @@ packages: '@types/react': '>=16' react: '>=16' + '@mdx-js/rollup@3.0.1': + resolution: {integrity: sha512-j0II91OCm4ld+l5QVgXXMQGxVVcAWIQJakYWi1dv5pefDHASJyCYER2TsdH7Alf958GoFSM7ugukWyvDq/UY4A==} + peerDependencies: + rollup: '>=2' + '@microsoft/applicationinsights-web-snippet@1.0.1': resolution: {integrity: sha512-2IHAOaLauc8qaAitvWS+U931T+ze+7MNWrDHY47IENP5y2UA0vqJDu67kWZDdpCN1fFC77sfgfB+HV7SrKshnQ==} @@ -5920,6 +6000,10 @@ packages: peerDependencies: '@redis/client': ^1.0.0 + '@remix-run/router@1.18.0': + resolution: {integrity: sha512-L3jkqmqoSVBVKHfpGZmLrex0lxR5SucGA0sUfFzGctehw+S/ggL9L/0NnC5mw6P8HUWpFZ3nQw3cRApjjWx9Sw==} + engines: {node: '>=14.0.0'} + '@remix-run/router@1.5.0': resolution: {integrity: sha512-bkUDCp8o1MvFO+qxkODcbhSqRa6P2GXgrGZVpt0dCXNW2HCSCqYI0ZoAqEOSAjRWmmlKcYgFvN4B4S+zo/f8kg==} engines: {node: '>=14'} @@ -6415,68 +6499,136 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 + '@svgr/babel-plugin-add-jsx-attribute@8.0.0': + resolution: {integrity: sha512-b9MIk7yhdS1pMCZM8VeNfUlSKVRhsHZNMl5O9SfaX0l0t5wjdgu4IDzGB8bpnGBBOjGST3rRFVsaaEtI4W6f7g==} + engines: {node: '>=14'} + peerDependencies: + '@babel/core': ^7.0.0-0 + '@svgr/babel-plugin-remove-jsx-attribute@6.5.0': resolution: {integrity: sha512-8zYdkym7qNyfXpWvu4yq46k41pyNM9SOstoWhKlm+IfdCE1DdnRKeMUPsWIEO/DEkaWxJ8T9esNdG3QwQ93jBA==} engines: {node: '>=10'} peerDependencies: '@babel/core': ^7.0.0-0 + '@svgr/babel-plugin-remove-jsx-attribute@8.0.0': + resolution: {integrity: sha512-BcCkm/STipKvbCl6b7QFrMh/vx00vIP63k2eM66MfHJzPr6O2U0jYEViXkHJWqXqQYjdeA9cuCl5KWmlwjDvbA==} + engines: {node: '>=14'} + peerDependencies: + '@babel/core': ^7.0.0-0 + '@svgr/babel-plugin-remove-jsx-empty-expression@6.5.0': resolution: {integrity: sha512-NFdxMq3xA42Kb1UbzCVxplUc0iqSyM9X8kopImvFnB+uSDdzIHOdbs1op8ofAvVRtbg4oZiyRl3fTYeKcOe9Iw==} engines: {node: '>=10'} peerDependencies: '@babel/core': ^7.0.0-0 + '@svgr/babel-plugin-remove-jsx-empty-expression@8.0.0': + resolution: {integrity: sha512-5BcGCBfBxB5+XSDSWnhTThfI9jcO5f0Ai2V24gZpG+wXF14BzwxxdDb4g6trdOux0rhibGs385BeFMSmxtS3uA==} + engines: {node: '>=14'} + peerDependencies: + '@babel/core': ^7.0.0-0 + '@svgr/babel-plugin-replace-jsx-attribute-value@6.5.1': resolution: {integrity: sha512-8DPaVVE3fd5JKuIC29dqyMB54sA6mfgki2H2+swh+zNJoynC8pMPzOkidqHOSc6Wj032fhl8Z0TVn1GiPpAiJg==} engines: {node: '>=10'} peerDependencies: '@babel/core': ^7.0.0-0 + '@svgr/babel-plugin-replace-jsx-attribute-value@8.0.0': + resolution: {integrity: sha512-KVQ+PtIjb1BuYT3ht8M5KbzWBhdAjjUPdlMtpuw/VjT8coTrItWX6Qafl9+ji831JaJcu6PJNKCV0bp01lBNzQ==} + engines: {node: '>=14'} + peerDependencies: + '@babel/core': ^7.0.0-0 + '@svgr/babel-plugin-svg-dynamic-title@6.5.1': resolution: {integrity: sha512-FwOEi0Il72iAzlkaHrlemVurgSQRDFbk0OC8dSvD5fSBPHltNh7JtLsxmZUhjYBZo2PpcU/RJvvi6Q0l7O7ogw==} engines: {node: '>=10'} peerDependencies: '@babel/core': ^7.0.0-0 + '@svgr/babel-plugin-svg-dynamic-title@8.0.0': + resolution: {integrity: sha512-omNiKqwjNmOQJ2v6ge4SErBbkooV2aAWwaPFs2vUY7p7GhVkzRkJ00kILXQvRhA6miHnNpXv7MRnnSjdRjK8og==} + engines: {node: '>=14'} + peerDependencies: + '@babel/core': ^7.0.0-0 + '@svgr/babel-plugin-svg-em-dimensions@6.5.1': resolution: {integrity: sha512-gWGsiwjb4tw+ITOJ86ndY/DZZ6cuXMNE/SjcDRg+HLuCmwpcjOktwRF9WgAiycTqJD/QXqL2f8IzE2Rzh7aVXA==} engines: {node: '>=10'} peerDependencies: '@babel/core': ^7.0.0-0 + '@svgr/babel-plugin-svg-em-dimensions@8.0.0': + resolution: {integrity: sha512-mURHYnu6Iw3UBTbhGwE/vsngtCIbHE43xCRK7kCw4t01xyGqb2Pd+WXekRRoFOBIY29ZoOhUCTEweDMdrjfi9g==} + engines: {node: '>=14'} + peerDependencies: + '@babel/core': ^7.0.0-0 + '@svgr/babel-plugin-transform-react-native-svg@6.5.1': resolution: {integrity: sha512-2jT3nTayyYP7kI6aGutkyfJ7UMGtuguD72OjeGLwVNyfPRBD8zQthlvL+fAbAKk5n9ZNcvFkp/b1lZ7VsYqVJg==} engines: {node: '>=10'} peerDependencies: '@babel/core': ^7.0.0-0 + '@svgr/babel-plugin-transform-react-native-svg@8.1.0': + resolution: {integrity: sha512-Tx8T58CHo+7nwJ+EhUwx3LfdNSG9R2OKfaIXXs5soiy5HtgoAEkDay9LIimLOcG8dJQH1wPZp/cnAv6S9CrR1Q==} + engines: {node: '>=14'} + peerDependencies: + '@babel/core': ^7.0.0-0 + '@svgr/babel-plugin-transform-svg-component@6.5.1': resolution: {integrity: sha512-a1p6LF5Jt33O3rZoVRBqdxL350oge54iZWHNI6LJB5tQ7EelvD/Mb1mfBiZNAan0dt4i3VArkFRjA4iObuNykQ==} engines: {node: '>=12'} peerDependencies: '@babel/core': ^7.0.0-0 + '@svgr/babel-plugin-transform-svg-component@8.0.0': + resolution: {integrity: sha512-DFx8xa3cZXTdb/k3kfPeaixecQLgKh5NVBMwD0AQxOzcZawK4oo1Jh9LbrcACUivsCA7TLG8eeWgrDXjTMhRmw==} + engines: {node: '>=12'} + peerDependencies: + '@babel/core': ^7.0.0-0 + '@svgr/babel-preset@6.5.1': resolution: {integrity: sha512-6127fvO/FF2oi5EzSQOAjo1LE3OtNVh11R+/8FXa+mHx1ptAaS4cknIjnUA7e6j6fwGGJ17NzaTJFUwOV2zwCw==} engines: {node: '>=10'} peerDependencies: '@babel/core': ^7.0.0-0 + '@svgr/babel-preset@8.1.0': + resolution: {integrity: sha512-7EYDbHE7MxHpv4sxvnVPngw5fuR6pw79SkcrILHJ/iMpuKySNCl5W1qcwPEpU+LgyRXOaAFgH0KhwD18wwg6ug==} + engines: {node: '>=14'} + peerDependencies: + '@babel/core': ^7.0.0-0 + '@svgr/core@6.5.1': resolution: {integrity: sha512-/xdLSWxK5QkqG524ONSjvg3V/FkNyCv538OIBdQqPNaAta3AsXj/Bd2FbvR87yMbXO2hFSWiAe/Q6IkVPDw+mw==} engines: {node: '>=10'} + '@svgr/core@8.1.0': + resolution: {integrity: sha512-8QqtOQT5ACVlmsvKOJNEaWmRPmcojMOzCz4Hs2BGG/toAp/K38LcsMRyLp349glq5AzJbCEeimEoxaX6v/fLrA==} + engines: {node: '>=14'} + '@svgr/hast-util-to-babel-ast@6.5.1': resolution: {integrity: sha512-1hnUxxjd83EAxbL4a0JDJoD3Dao3hmjvyvyEV8PzWmLK3B9m9NPlW7GKjFyoWE8nM7HnXzPcmmSyOW8yOddSXw==} engines: {node: '>=10'} + '@svgr/hast-util-to-babel-ast@8.0.0': + resolution: {integrity: sha512-EbDKwO9GpfWP4jN9sGdYwPBU0kdomaPIL2Eu4YwmgP+sJeXT+L7bMwJUBnhzfH8Q2qMBqZ4fJwpCyYsAN3mt2Q==} + engines: {node: '>=14'} + '@svgr/plugin-jsx@6.5.1': resolution: {integrity: sha512-+UdQxI3jgtSjCykNSlEMuy1jSRQlGC7pqBCPvkG/2dATdWo082zHTTK3uhnAju2/6XpE6B5mZ3z4Z8Ns01S8Gw==} engines: {node: '>=10'} peerDependencies: '@svgr/core': ^6.0.0 + '@svgr/plugin-jsx@8.1.0': + resolution: {integrity: sha512-0xiIyBsLlr8quN+WyuxooNW9RJ0Dpr8uOnH/xrCVO8GLUcwHISwj1AG0k+LFzteTkAA0GbX0kj9q6Dk70PTiPA==} + engines: {node: '>=14'} + peerDependencies: + '@svgr/core': '*' + '@svgr/plugin-svgo@6.5.1': resolution: {integrity: sha512-omvZKf8ixP9z6GWgwbtmP9qQMPX4ODXi+wzbVZgomNFsUIlHA1sf4fThdwTWSsZGgvGAG6yE+b/F5gWUkcZ/iQ==} engines: {node: '>=10'} @@ -6638,6 +6790,9 @@ packages: '@types/babel__core@7.1.19': resolution: {integrity: sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw==} + '@types/babel__core@7.20.5': + resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} + '@types/babel__generator@7.6.4': resolution: {integrity: sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==} @@ -7020,6 +7175,12 @@ packages: '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} + '@vitejs/plugin-react@4.3.1': + resolution: {integrity: sha512-m/V2syj5CuVnaxcUJOQRel/Wr31FFXRFlnOoq1TVtkCxsY5veGMTEmpWHndrhB2U8ScHtCQB1e+4hWYExQc6Lg==} + engines: {node: ^14.18.0 || >=16.0.0} + peerDependencies: + vite: ^4.2.0 || ^5.0.0 + '@vitest/coverage-v8@2.0.0': resolution: {integrity: sha512-k2OgMH8e4AyUVsmLk2P3vT++VVaUQbvVaP5NJQDgXgv1q4lG56Z4nb26QNcxgk4ZLypmOrfultAShMo+okIOYw==} peerDependencies: @@ -7119,10 +7280,6 @@ packages: peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 - acorn-walk@8.2.0: - resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==} - engines: {node: '>=0.4.0'} - acorn-walk@8.3.2: resolution: {integrity: sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==} engines: {node: '>=0.4.0'} @@ -7472,6 +7629,11 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true + browserslist@4.23.2: + resolution: {integrity: sha512-qkqSyistMYdxAcw+CzbZwlBy8AGmS/eEWs+sEV5TnLRGDOL+C5M2EnH6tlZyg0YoAxGJAFKh61En9BR941GnHA==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + bser@2.1.1: resolution: {integrity: sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==} @@ -7566,6 +7728,9 @@ packages: caniuse-lite@1.0.30001618: resolution: {integrity: sha512-p407+D1tIkDvsEAPS22lJxLQQaG8OTBEqo0KhzfABGk0TU4juBNDSfH0hyAp/HRyx+M8L17z/ltyhxh27FTfQg==} + caniuse-lite@1.0.30001643: + resolution: {integrity: sha512-ERgWGNleEilSrHM6iUz/zJNSQTP8Mr21wDWpdgvRwcTXGAq6jMtOUPP4dqFPTdKqZ2wKTdtB+uucZ3MRpAUSmg==} + ccount@2.0.1: resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} @@ -8448,6 +8613,9 @@ packages: electron-to-chromium@1.4.738: resolution: {integrity: sha512-lwKft2CLFztD+vEIpesrOtCrko/TFnEJlHFdRhazU7Y/jx5qc4cqsocfVrBg4So4gGe9lvxnbLIoev47WMpg+A==} + electron-to-chromium@1.5.0: + resolution: {integrity: sha512-Vb3xHHYnLseK8vlMJQKJYXJ++t4u1/qJ3vykuVrVjvdiOEhYyT1AuP4x03G8EnPmYvYOhe9T+dADTmthjRQMkA==} + elkjs@0.9.3: resolution: {integrity: sha512-f/ZeWvW/BCXbhGEf1Ujp29EASo/lk1FDnETgNKwJrsVvGZhUWCZyg3xLJjAsxfOmt8KjswHmI5EwCQcPMpOYhQ==} @@ -8565,6 +8733,10 @@ packages: resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} engines: {node: '>=6'} + escalade@3.1.2: + resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==} + engines: {node: '>=6'} + escape-html@1.0.3: resolution: {integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==} @@ -9377,9 +9549,6 @@ packages: highlight.js@10.7.3: resolution: {integrity: sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==} - history@5.3.0: - resolution: {integrity: sha512-ZqaKwjjrAYUYfLG+htGaIIZ4nioX2L70ZUMIFysS3xvBsSG4x/n1V6TXV3N8ZYNuFGlDirFg32T7B6WOUPDYcQ==} - hoist-non-react-statics@3.3.2: resolution: {integrity: sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==} @@ -10383,56 +10552,62 @@ packages: libphonenumber-js@1.10.51: resolution: {integrity: sha512-vY2I+rQwrDQzoPds0JeTEpeWzbUJgqoV0O4v31PauHBb/e+1KCXKylHcDnBMgJZ9fH9mErsEbROJY3Z3JtqEmg==} - lightningcss-darwin-arm64@1.16.1: - resolution: {integrity: sha512-/J898YSAiGVqdybHdIF3Ao0Hbh2vyVVj5YNm3NznVzTSvkOi3qQCAtO97sfmNz+bSRHXga7ZPLm+89PpOM5gAg==} + lightningcss-darwin-arm64@1.25.1: + resolution: {integrity: sha512-G4Dcvv85bs5NLENcu/s1f7ehzE3D5ThnlWSDwE190tWXRQCQaqwcuHe+MGSVI/slm0XrxnaayXY+cNl3cSricw==} engines: {node: '>= 12.0.0'} cpu: [arm64] os: [darwin] - lightningcss-darwin-x64@1.16.1: - resolution: {integrity: sha512-vyKCNPRNRqke+5i078V+N0GLfMVLEaNcqIcv28hA/vUNRGk/90EDkDB9EndGay0MoPIrC2y0qE3Y74b/OyedqQ==} + lightningcss-darwin-x64@1.25.1: + resolution: {integrity: sha512-dYWuCzzfqRueDSmto6YU5SoGHvZTMU1Em9xvhcdROpmtOQLorurUZz8+xFxZ51lCO2LnYbfdjZ/gCqWEkwixNg==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [darwin] - lightningcss-linux-arm-gnueabihf@1.16.1: - resolution: {integrity: sha512-0AJC52l40VbrzkMJz6qRvlqVVGykkR2MgRS4bLjVC2ab0H0I/n4p6uPZXGvNIt5gw1PedeND/hq+BghNdgfuPQ==} + lightningcss-freebsd-x64@1.25.1: + resolution: {integrity: sha512-hXoy2s9A3KVNAIoKz+Fp6bNeY+h9c3tkcx1J3+pS48CqAt+5bI/R/YY4hxGL57fWAIquRjGKW50arltD6iRt/w==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [freebsd] + + lightningcss-linux-arm-gnueabihf@1.25.1: + resolution: {integrity: sha512-tWyMgHFlHlp1e5iW3EpqvH5MvsgoN7ZkylBbG2R2LWxnvH3FuWCJOhtGcYx9Ks0Kv0eZOBud789odkYLhyf1ng==} engines: {node: '>= 12.0.0'} cpu: [arm] os: [linux] - lightningcss-linux-arm64-gnu@1.16.1: - resolution: {integrity: sha512-NqxYXsRvI3/Fb9AQLXKrYsU0Q61LqKz5It+Es9gidsfcw1lamny4lmlUgO3quisivkaLCxEkogaizcU6QeZeWQ==} + lightningcss-linux-arm64-gnu@1.25.1: + resolution: {integrity: sha512-Xjxsx286OT9/XSnVLIsFEDyDipqe4BcLeB4pXQ/FEA5+2uWCCuAEarUNQumRucnj7k6ftkAHUEph5r821KBccQ==} engines: {node: '>= 12.0.0'} cpu: [arm64] os: [linux] - lightningcss-linux-arm64-musl@1.16.1: - resolution: {integrity: sha512-VUPQ4dmB9yDQxpJF8/imtwNcbIPzlL6ArLHSUInOGxipDk1lOAklhUjbKUvlL3HVlDwD3WHCxggAY01WpFcjiA==} + lightningcss-linux-arm64-musl@1.25.1: + resolution: {integrity: sha512-IhxVFJoTW8wq6yLvxdPvyHv4NjzcpN1B7gjxrY3uaykQNXPHNIpChLB52+wfH+yS58zm1PL4LemUp8u9Cfp6Bw==} engines: {node: '>= 12.0.0'} cpu: [arm64] os: [linux] - lightningcss-linux-x64-gnu@1.16.1: - resolution: {integrity: sha512-A40Jjnbellnvh4YF+kt047GLnUU59iLN2LFRCyWQG+QqQZeXOCzXfTQ6EJB4yvHB1mQvWOVdAzVrtEmRw3Vh8g==} + lightningcss-linux-x64-gnu@1.25.1: + resolution: {integrity: sha512-RXIaru79KrREPEd6WLXfKfIp4QzoppZvD3x7vuTKkDA64PwTzKJ2jaC43RZHRt8BmyIkRRlmywNhTRMbmkPYpA==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [linux] - lightningcss-linux-x64-musl@1.16.1: - resolution: {integrity: sha512-VZf76GxW+8mk238tpw0u9R66gBi/m0YB0TvD54oeGiOqvTZ/mabkBkbsuXTSWcKYj8DSrLW+A42qu+6PLRsIgA==} + lightningcss-linux-x64-musl@1.25.1: + resolution: {integrity: sha512-TdcNqFsAENEEFr8fJWg0Y4fZ/nwuqTRsIr7W7t2wmDUlA8eSXVepeeONYcb+gtTj1RaXn/WgNLB45SFkz+XBZA==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [linux] - lightningcss-win32-x64-msvc@1.16.1: - resolution: {integrity: sha512-Djy+UzlTtJMayVJU3eFuUW5Gdo+zVTNPJhlYw25tNC9HAoMCkIdSDDrGsWEdEyibEV7xwB8ySTmLuxilfhBtgg==} + lightningcss-win32-x64-msvc@1.25.1: + resolution: {integrity: sha512-9KZZkmmy9oGDSrnyHuxP6iMhbsgChUiu/NSgOx+U1I/wTngBStDf2i2aGRCHvFqj19HqqBEI4WuGVQBa2V6e0A==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [win32] - lightningcss@1.16.1: - resolution: {integrity: sha512-zU8OTaps3VAodmI2MopfqqOQQ4A9L/2Eo7xoTH/4fNkecy6ftfiGwbbRMTQqtIqJjRg3f927e+lnyBBPhucY1Q==} + lightningcss@1.25.1: + resolution: {integrity: sha512-V0RMVZzK1+rCHpymRv4URK2lNhIRyO8g7U7zOFwVAhJuat74HtkjIQpQRKNCwFEYkRGpafOpmXXLoaoBcyVtBg==} engines: {node: '>= 12.0.0'} lilconfig@2.1.0: @@ -11694,8 +11869,8 @@ packages: peerDependencies: postcss: ^8.1.0 - postcss-modules@4.3.0: - resolution: {integrity: sha512-zoUttLDSsbWDinJM9jH37o7hulLRyEgH6fZm2PchxN7AZ8rkdWiALyNhnQ7+jg7cX9f10m6y5VhHsrjO0Mf/DA==} + postcss-modules@4.3.1: + resolution: {integrity: sha512-ItUhSUxBBdNamkT3KzIZwYNNRFKmkJrofvC2nWab3CPKhYBQ1f27XXh1PAPE27Psx58jeelPsxWB/+og+KEH0Q==} peerDependencies: postcss: ^8.0.0 @@ -11714,10 +11889,6 @@ packages: peerDependencies: postcss: ^8.4.29 - postcss-selector-parser@6.0.11: - resolution: {integrity: sha512-zbARubNdogI9j7WY4nQJBiNqQf3sLS3wCP4WfOidu+p28LofJqDH1tcXypGrcmMHhDk2t9wGhCsYe/+szLTy1g==} - engines: {node: '>=4'} - postcss-selector-parser@6.0.16: resolution: {integrity: sha512-A0RVJrX+IUkVZbW3ClroRWurercFhieevHB38sr2+l9eUClMqome3LmEmnhlNy+5Mr2EYN6B2Kaw9wYdd+VHiw==} engines: {node: '>=4'} @@ -11737,10 +11908,6 @@ packages: resolution: {integrity: sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==} engines: {node: ^10 || ^12 || >=14} - postcss@8.4.38: - resolution: {integrity: sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==} - engines: {node: ^10 || ^12 || >=14} - postcss@8.4.39: resolution: {integrity: sha512-0vzE+lAiG7hZl1/9I8yzKLx3aR9Xbof3fBHKunvMfOCYAtMhrsnccJY2iTURb9EZd5+pLuiNV9/c/GZJOHsgIw==} engines: {node: ^10 || ^12 || >=14} @@ -12091,6 +12258,10 @@ packages: peerDependencies: react: ^16 || ^17 || ^18 + react-refresh@0.14.2: + resolution: {integrity: sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA==} + engines: {node: '>=0.10.0'} + react-refresh@0.9.0: resolution: {integrity: sha512-Gvzk7OZpiqKSkxsQvO/mbTN1poglhmAV7gR/DdIrRrSMXraRQQlfikRJOr3Nb9GTMPC5kof948Zy6jJZIFtDvQ==} engines: {node: '>=0.10.0'} @@ -12108,12 +12279,25 @@ packages: react: '>=16.8' react-dom: '>=16.8' + react-router-dom@6.25.1: + resolution: {integrity: sha512-0tUDpbFvk35iv+N89dWNrJp+afLgd+y4VtorJZuOCXK0kkCWjEvb3vTJM++SYvMEpbVwXKf3FjeVveVEb6JpDQ==} + engines: {node: '>=14.0.0'} + peerDependencies: + react: '>=16.8' + react-dom: '>=16.8' + react-router@6.10.0: resolution: {integrity: sha512-Nrg0BWpQqrC3ZFFkyewrflCud9dio9ME3ojHCF/WLsprJVzkq3q3UeEhMCAW1dobjeGbWgjNn/PVF6m46ANxXQ==} engines: {node: '>=14'} peerDependencies: react: '>=16.8' + react-router@6.25.1: + resolution: {integrity: sha512-u8ELFr5Z6g02nUtpPAggP73Jigj1mRePSwhS/2nkTrlPU5yEkH1vYzWNyvSnSzeeE2DNqWdH+P8OhIh9wuXhTw==} + engines: {node: '>=14.0.0'} + peerDependencies: + react: '>=16.8' + react-side-effect@2.1.2: resolution: {integrity: sha512-PVjOcvVOyIILrYoyGEpDN3vmYNLdy1CajSFNt4TDsVQC5KpTijDvWVoR+/7Rz2xT978D8/ZtFceXxzsPwZEDvw==} peerDependencies: @@ -12432,11 +12616,6 @@ packages: samlify@2.8.11: resolution: {integrity: sha512-EDO9CMba0rtHSek2NyUcS8brIxK1E521X5fT+1qLKTRkm1dddITeuPqU8/by4Lcf95ngMKjsn5Z600eVhXDqxQ==} - sass@1.56.1: - resolution: {integrity: sha512-VpEyKpyBPCxE7qGDtOcdJ6fFbcpOM+Emu7uZLxVrkX8KVU/Dp5UF7WLvzqRuUhB6mqqQt1xffLoG+AndxTZrCQ==} - engines: {node: '>=12.0.0'} - hasBin: true - sass@1.77.8: resolution: {integrity: sha512-4UHg6prsrycW20fqLGPShtEvo/WyHRVRHwOP4DzkUrObWoWI05QBSfzU71TVB7PFaL104TwNaHpjlWXAZbQiNQ==} engines: {node: '>=14.0.0'} @@ -13290,6 +13469,12 @@ packages: peerDependencies: browserslist: '>= 4.21.0' + update-browserslist-db@1.1.0: + resolution: {integrity: sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==} + hasBin: true + peerDependencies: + browserslist: '>= 4.21.0' + uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} @@ -13355,33 +13540,22 @@ packages: engines: {node: ^18.0.0 || >=20.0.0} hasBin: true - vite@5.3.3: - resolution: {integrity: sha512-NPQdeCU0Dv2z5fu+ULotpuq5yfCS1BzKUIPhNbP3YBfAMGJXbt2nS+sbTFu+qchaqWTD+H3JK++nRwr6XIcp6A==} - engines: {node: ^18.0.0 || >=20.0.0} - hasBin: true + vite-plugin-compression@0.5.1: + resolution: {integrity: sha512-5QJKBDc+gNYVqL/skgFAP81Yuzo9R+EAf19d+EtsMF/i8kFUpNi3J/H01QD3Oo8zBQn+NzoCIFkpPLynoOzaJg==} peerDependencies: - '@types/node': ^18.0.0 || >=20.0.0 - less: '*' - lightningcss: ^1.21.0 - sass: '*' - stylus: '*' - sugarss: '*' - terser: ^5.4.0 - peerDependenciesMeta: - '@types/node': - optional: true - less: - optional: true - lightningcss: - optional: true - sass: - optional: true - stylus: - optional: true - sugarss: - optional: true - terser: - optional: true + vite: '>=2.0.0' + + vite-plugin-prebundle@0.0.4: + resolution: {integrity: sha512-5r0KdY4swsZnU3bo7fuqGguYn73qy37I0bRPRye8OQLTinaa1jhHzK4I3CmouF0gnHcMBI1VSNpnuhPLK2BV2A==} + peerDependencies: + esbuild: ^0.17.0 + rollup: ^3.0.0 + vite: ^4.0.0 + + vite-plugin-svgr@4.2.0: + resolution: {integrity: sha512-SC7+FfVtNQk7So0XMjrrtLAbEC8qjFPifyD7+fs/E6aaNdVde6umlVVh0QuwDLdOMu7vp5RiGFsB70nj5yo0XA==} + peerDependencies: + vite: ^2.6.0 || 3 || 4 || 5 vite@5.3.4: resolution: {integrity: sha512-Cw+7zL3ZG9/NZBB8C+8QbQZmR54GwqIz+WMI4b3JgdYJvX+ny9AjJXqkGQlDXSXRP9rP0B4tbciRMOVEKulVOA==} @@ -13695,10 +13869,6 @@ packages: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} - yocto-queue@1.0.0: - resolution: {integrity: sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==} - engines: {node: '>=12.20'} - yocto-queue@1.1.1: resolution: {integrity: sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==} engines: {node: '>=12.20'} @@ -14431,8 +14601,15 @@ snapshots: '@babel/highlight': 7.24.2 picocolors: 1.0.1 + '@babel/code-frame@7.24.7': + dependencies: + '@babel/highlight': 7.24.7 + picocolors: 1.0.1 + '@babel/compat-data@7.24.4': {} + '@babel/compat-data@7.24.9': {} + '@babel/core@7.24.4': dependencies: '@ampproject/remapping': 2.3.0 @@ -14453,12 +14630,39 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/core@7.24.9': + dependencies: + '@ampproject/remapping': 2.3.0 + '@babel/code-frame': 7.24.7 + '@babel/generator': 7.24.10 + '@babel/helper-compilation-targets': 7.24.8 + '@babel/helper-module-transforms': 7.24.9(@babel/core@7.24.9) + '@babel/helpers': 7.24.8 + '@babel/parser': 7.24.8 + '@babel/template': 7.24.7 + '@babel/traverse': 7.24.8 + '@babel/types': 7.24.9 + convert-source-map: 2.0.0 + debug: 4.3.5 + gensync: 1.0.0-beta.2 + json5: 2.2.3 + semver: 6.3.1 + transitivePeerDependencies: + - supports-color + '@babel/generator@7.20.4': dependencies: '@babel/types': 7.24.0 '@jridgewell/gen-mapping': 0.3.5 jsesc: 2.5.2 + '@babel/generator@7.24.10': + dependencies: + '@babel/types': 7.24.9 + '@jridgewell/gen-mapping': 0.3.5 + '@jridgewell/trace-mapping': 0.3.25 + jsesc: 2.5.2 + '@babel/generator@7.24.4': dependencies: '@babel/types': 7.24.0 @@ -14474,21 +14678,49 @@ snapshots: lru-cache: 5.1.1 semver: 6.3.1 + '@babel/helper-compilation-targets@7.24.8': + dependencies: + '@babel/compat-data': 7.24.9 + '@babel/helper-validator-option': 7.24.8 + browserslist: 4.23.2 + lru-cache: 5.1.1 + semver: 6.3.1 + '@babel/helper-environment-visitor@7.22.20': {} + '@babel/helper-environment-visitor@7.24.7': + dependencies: + '@babel/types': 7.24.9 + '@babel/helper-function-name@7.23.0': dependencies: '@babel/template': 7.24.0 '@babel/types': 7.24.0 + '@babel/helper-function-name@7.24.7': + dependencies: + '@babel/template': 7.24.7 + '@babel/types': 7.24.9 + '@babel/helper-hoist-variables@7.22.5': dependencies: '@babel/types': 7.24.0 + '@babel/helper-hoist-variables@7.24.7': + dependencies: + '@babel/types': 7.24.9 + '@babel/helper-module-imports@7.24.3': dependencies: '@babel/types': 7.24.0 + '@babel/helper-module-imports@7.24.7': + dependencies: + '@babel/traverse': 7.24.8 + '@babel/types': 7.24.9 + transitivePeerDependencies: + - supports-color + '@babel/helper-module-transforms@7.23.3(@babel/core@7.24.4)': dependencies: '@babel/core': 7.24.4 @@ -14498,22 +14730,52 @@ snapshots: '@babel/helper-split-export-declaration': 7.22.6 '@babel/helper-validator-identifier': 7.22.20 + '@babel/helper-module-transforms@7.24.9(@babel/core@7.24.9)': + dependencies: + '@babel/core': 7.24.9 + '@babel/helper-environment-visitor': 7.24.7 + '@babel/helper-module-imports': 7.24.7 + '@babel/helper-simple-access': 7.24.7 + '@babel/helper-split-export-declaration': 7.24.7 + '@babel/helper-validator-identifier': 7.24.7 + transitivePeerDependencies: + - supports-color + '@babel/helper-plugin-utils@7.20.2': {} + '@babel/helper-plugin-utils@7.24.8': {} + '@babel/helper-simple-access@7.22.5': dependencies: '@babel/types': 7.24.0 + '@babel/helper-simple-access@7.24.7': + dependencies: + '@babel/traverse': 7.24.8 + '@babel/types': 7.24.9 + transitivePeerDependencies: + - supports-color + '@babel/helper-split-export-declaration@7.22.6': dependencies: '@babel/types': 7.24.0 + '@babel/helper-split-export-declaration@7.24.7': + dependencies: + '@babel/types': 7.24.9 + '@babel/helper-string-parser@7.23.4': {} + '@babel/helper-string-parser@7.24.8': {} + '@babel/helper-validator-identifier@7.22.20': {} + '@babel/helper-validator-identifier@7.24.7': {} + '@babel/helper-validator-option@7.23.5': {} + '@babel/helper-validator-option@7.24.8': {} + '@babel/helpers@7.24.4': dependencies: '@babel/template': 7.24.0 @@ -14522,6 +14784,11 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/helpers@7.24.8': + dependencies: + '@babel/template': 7.24.7 + '@babel/types': 7.24.9 + '@babel/highlight@7.22.5': dependencies: '@babel/helper-validator-identifier': 7.22.20 @@ -14535,10 +14802,21 @@ snapshots: js-tokens: 4.0.0 picocolors: 1.0.1 + '@babel/highlight@7.24.7': + dependencies: + '@babel/helper-validator-identifier': 7.24.7 + chalk: 2.4.2 + js-tokens: 4.0.0 + picocolors: 1.0.1 + '@babel/parser@7.24.4': dependencies: '@babel/types': 7.24.0 + '@babel/parser@7.24.8': + dependencies: + '@babel/types': 7.24.9 + '@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.24.4)': dependencies: '@babel/core': 7.24.4 @@ -14609,11 +14887,17 @@ snapshots: '@babel/core': 7.24.4 '@babel/helper-plugin-utils': 7.20.2 - '@babel/runtime@7.17.9': + '@babel/plugin-transform-react-jsx-self@7.24.7(@babel/core@7.24.9)': dependencies: - regenerator-runtime: 0.13.11 + '@babel/core': 7.24.9 + '@babel/helper-plugin-utils': 7.24.8 + + '@babel/plugin-transform-react-jsx-source@7.24.7(@babel/core@7.24.9)': + dependencies: + '@babel/core': 7.24.9 + '@babel/helper-plugin-utils': 7.24.8 - '@babel/runtime@7.19.4': + '@babel/runtime@7.17.9': dependencies: regenerator-runtime: 0.13.11 @@ -14637,6 +14921,12 @@ snapshots: '@babel/parser': 7.24.4 '@babel/types': 7.24.0 + '@babel/template@7.24.7': + dependencies: + '@babel/code-frame': 7.24.7 + '@babel/parser': 7.24.8 + '@babel/types': 7.24.9 + '@babel/traverse@7.24.1': dependencies: '@babel/code-frame': 7.24.2 @@ -14652,12 +14942,33 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/traverse@7.24.8': + dependencies: + '@babel/code-frame': 7.24.7 + '@babel/generator': 7.24.10 + '@babel/helper-environment-visitor': 7.24.7 + '@babel/helper-function-name': 7.24.7 + '@babel/helper-hoist-variables': 7.24.7 + '@babel/helper-split-export-declaration': 7.24.7 + '@babel/parser': 7.24.8 + '@babel/types': 7.24.9 + debug: 4.3.5 + globals: 11.12.0 + transitivePeerDependencies: + - supports-color + '@babel/types@7.24.0': dependencies: '@babel/helper-string-parser': 7.23.4 '@babel/helper-validator-identifier': 7.22.20 to-fast-properties: 2.0.0 + '@babel/types@7.24.9': + dependencies: + '@babel/helper-string-parser': 7.24.8 + '@babel/helper-validator-identifier': 7.24.7 + to-fast-properties: 2.0.0 + '@bcoe/v8-coverage@0.2.3': {} '@braintree/sanitize-url@6.0.4': {} @@ -14924,6 +15235,7 @@ snapshots: '@cspotcode/source-map-support@0.8.1': dependencies: '@jridgewell/trace-mapping': 0.3.9 + optional: true '@csstools/css-parser-algorithms@2.6.1(@csstools/css-tokenizer@2.2.4)': dependencies: @@ -15459,6 +15771,7 @@ snapshots: dependencies: '@jridgewell/resolve-uri': 3.1.0 '@jridgewell/sourcemap-codec': 1.4.15 + optional: true '@jsdevtools/ono@7.1.3': {} @@ -15628,6 +15941,16 @@ snapshots: '@types/react': 18.3.3 react: 18.3.1 + '@mdx-js/rollup@3.0.1(rollup@4.14.3)': + dependencies: + '@mdx-js/mdx': 3.0.1 + '@rollup/pluginutils': 5.1.0(rollup@4.14.3) + rollup: 4.14.3 + source-map: 0.7.4 + vfile: 6.0.1 + transitivePeerDependencies: + - supports-color + '@microsoft/applicationinsights-web-snippet@1.0.1': {} '@mischnic/json-sourcemap@0.1.0': @@ -15907,7 +16230,7 @@ snapshots: '@parcel/source-map': 2.1.1 '@parcel/utils': 2.9.3 browserslist: 4.21.4 - lightningcss: 1.16.1 + lightningcss: 1.25.1 nullthrows: 1.1.1 transitivePeerDependencies: - '@parcel/core' @@ -16119,7 +16442,7 @@ snapshots: '@parcel/source-map': 2.1.1 '@parcel/utils': 2.9.3 browserslist: 4.21.4 - lightningcss: 1.16.1 + lightningcss: 1.25.1 nullthrows: 1.1.1 transitivePeerDependencies: - '@parcel/core' @@ -16210,7 +16533,7 @@ snapshots: dependencies: '@parcel/plugin': 2.9.3(@parcel/core@2.9.3) '@parcel/source-map': 2.1.1 - sass: 1.56.1 + sass: 1.77.8 transitivePeerDependencies: - '@parcel/core' @@ -16396,6 +16719,8 @@ snapshots: dependencies: '@redis/client': 1.5.16 + '@remix-run/router@1.18.0': {} + '@remix-run/router@1.5.0': {} '@rollup/plugin-commonjs@26.0.1(rollup@4.12.0)': @@ -16611,6 +16936,27 @@ snapshots: - supports-color - typescript + '@silverhand/eslint-config-react@6.0.2(eslint@8.57.0)(postcss@8.4.39)(prettier@3.0.0)(stylelint@15.11.0(typescript@5.5.3))(typescript@5.5.3)': + dependencies: + '@silverhand/eslint-config': 6.0.1(eslint@8.57.0)(prettier@3.0.0)(typescript@5.5.3) + eslint-config-xo-react: 0.27.0(eslint-plugin-react-hooks@4.6.0(eslint@8.57.0))(eslint-plugin-react@7.34.1(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-jsx-a11y: 6.8.0(eslint@8.57.0) + eslint-plugin-react: 7.34.1(eslint@8.57.0) + eslint-plugin-react-hooks: 4.6.0(eslint@8.57.0) + postcss-scss: 4.0.9(postcss@8.4.39) + stylelint: 15.11.0(typescript@5.5.3) + stylelint-config-xo: 0.22.0(stylelint@15.11.0(typescript@5.5.3)) + stylelint-scss: 6.2.1(stylelint@15.11.0(typescript@5.5.3)) + transitivePeerDependencies: + - '@types/eslint' + - eslint + - eslint-import-resolver-node + - eslint-import-resolver-webpack + - postcss + - prettier + - supports-color + - typescript + '@silverhand/eslint-config@6.0.1(eslint@8.57.0)(prettier@3.0.0)(typescript@5.5.3)': dependencies: '@silverhand/eslint-plugin-fp': 2.5.0(eslint@8.57.0) @@ -17054,34 +17400,66 @@ snapshots: dependencies: '@babel/core': 7.24.4 + '@svgr/babel-plugin-add-jsx-attribute@8.0.0(@babel/core@7.24.4)': + dependencies: + '@babel/core': 7.24.4 + '@svgr/babel-plugin-remove-jsx-attribute@6.5.0(@babel/core@7.24.4)': dependencies: '@babel/core': 7.24.4 + '@svgr/babel-plugin-remove-jsx-attribute@8.0.0(@babel/core@7.24.4)': + dependencies: + '@babel/core': 7.24.4 + '@svgr/babel-plugin-remove-jsx-empty-expression@6.5.0(@babel/core@7.24.4)': dependencies: '@babel/core': 7.24.4 + '@svgr/babel-plugin-remove-jsx-empty-expression@8.0.0(@babel/core@7.24.4)': + dependencies: + '@babel/core': 7.24.4 + '@svgr/babel-plugin-replace-jsx-attribute-value@6.5.1(@babel/core@7.24.4)': dependencies: '@babel/core': 7.24.4 + '@svgr/babel-plugin-replace-jsx-attribute-value@8.0.0(@babel/core@7.24.4)': + dependencies: + '@babel/core': 7.24.4 + '@svgr/babel-plugin-svg-dynamic-title@6.5.1(@babel/core@7.24.4)': dependencies: '@babel/core': 7.24.4 + '@svgr/babel-plugin-svg-dynamic-title@8.0.0(@babel/core@7.24.4)': + dependencies: + '@babel/core': 7.24.4 + '@svgr/babel-plugin-svg-em-dimensions@6.5.1(@babel/core@7.24.4)': dependencies: '@babel/core': 7.24.4 + '@svgr/babel-plugin-svg-em-dimensions@8.0.0(@babel/core@7.24.4)': + dependencies: + '@babel/core': 7.24.4 + '@svgr/babel-plugin-transform-react-native-svg@6.5.1(@babel/core@7.24.4)': dependencies: '@babel/core': 7.24.4 + '@svgr/babel-plugin-transform-react-native-svg@8.1.0(@babel/core@7.24.4)': + dependencies: + '@babel/core': 7.24.4 + '@svgr/babel-plugin-transform-svg-component@6.5.1(@babel/core@7.24.4)': dependencies: '@babel/core': 7.24.4 + '@svgr/babel-plugin-transform-svg-component@8.0.0(@babel/core@7.24.4)': + dependencies: + '@babel/core': 7.24.4 + '@svgr/babel-preset@6.5.1(@babel/core@7.24.4)': dependencies: '@babel/core': 7.24.4 @@ -17094,6 +17472,18 @@ snapshots: '@svgr/babel-plugin-transform-react-native-svg': 6.5.1(@babel/core@7.24.4) '@svgr/babel-plugin-transform-svg-component': 6.5.1(@babel/core@7.24.4) + '@svgr/babel-preset@8.1.0(@babel/core@7.24.4)': + dependencies: + '@babel/core': 7.24.4 + '@svgr/babel-plugin-add-jsx-attribute': 8.0.0(@babel/core@7.24.4) + '@svgr/babel-plugin-remove-jsx-attribute': 8.0.0(@babel/core@7.24.4) + '@svgr/babel-plugin-remove-jsx-empty-expression': 8.0.0(@babel/core@7.24.4) + '@svgr/babel-plugin-replace-jsx-attribute-value': 8.0.0(@babel/core@7.24.4) + '@svgr/babel-plugin-svg-dynamic-title': 8.0.0(@babel/core@7.24.4) + '@svgr/babel-plugin-svg-em-dimensions': 8.0.0(@babel/core@7.24.4) + '@svgr/babel-plugin-transform-react-native-svg': 8.1.0(@babel/core@7.24.4) + '@svgr/babel-plugin-transform-svg-component': 8.0.0(@babel/core@7.24.4) + '@svgr/core@6.5.1': dependencies: '@babel/core': 7.24.4 @@ -17104,11 +17494,27 @@ snapshots: transitivePeerDependencies: - supports-color + '@svgr/core@8.1.0(typescript@5.5.3)': + dependencies: + '@babel/core': 7.24.4 + '@svgr/babel-preset': 8.1.0(@babel/core@7.24.4) + camelcase: 6.3.0 + cosmiconfig: 8.3.6(typescript@5.5.3) + snake-case: 3.0.4 + transitivePeerDependencies: + - supports-color + - typescript + '@svgr/hast-util-to-babel-ast@6.5.1': dependencies: '@babel/types': 7.24.0 entities: 4.4.0 + '@svgr/hast-util-to-babel-ast@8.0.0': + dependencies: + '@babel/types': 7.24.0 + entities: 4.5.0 + '@svgr/plugin-jsx@6.5.1(@svgr/core@6.5.1)': dependencies: '@babel/core': 7.24.4 @@ -17119,6 +17525,16 @@ snapshots: transitivePeerDependencies: - supports-color + '@svgr/plugin-jsx@8.1.0(@svgr/core@8.1.0(typescript@5.5.3))': + dependencies: + '@babel/core': 7.24.4 + '@svgr/babel-preset': 8.1.0(@babel/core@7.24.4) + '@svgr/core': 8.1.0(typescript@5.5.3) + '@svgr/hast-util-to-babel-ast': 8.0.0 + svg-parser: 2.0.4 + transitivePeerDependencies: + - supports-color + '@svgr/plugin-svgo@6.5.1(@svgr/core@6.5.1)': dependencies: '@svgr/core': 6.5.1 @@ -17186,7 +17602,7 @@ snapshots: '@testing-library/dom@10.0.0': dependencies: - '@babel/code-frame': 7.24.2 + '@babel/code-frame': 7.24.7 '@babel/runtime': 7.24.4 '@types/aria-query': 5.0.1 aria-query: 5.3.0 @@ -17220,13 +17636,17 @@ snapshots: '@trysound/sax@0.2.0': {} - '@tsconfig/node10@1.0.9': {} + '@tsconfig/node10@1.0.9': + optional: true - '@tsconfig/node12@1.0.11': {} + '@tsconfig/node12@1.0.11': + optional: true - '@tsconfig/node14@1.0.3': {} + '@tsconfig/node14@1.0.3': + optional: true - '@tsconfig/node16@1.0.4': {} + '@tsconfig/node16@1.0.4': + optional: true '@types/accepts@1.3.5': dependencies: @@ -17250,6 +17670,14 @@ snapshots: '@types/babel__template': 7.4.1 '@types/babel__traverse': 7.18.2 + '@types/babel__core@7.20.5': + dependencies: + '@babel/parser': 7.24.4 + '@babel/types': 7.24.0 + '@types/babel__generator': 7.6.4 + '@types/babel__template': 7.4.1 + '@types/babel__traverse': 7.18.2 + '@types/babel__generator@7.6.4': dependencies: '@babel/types': 7.24.0 @@ -17725,7 +18153,18 @@ snapshots: '@ungap/structured-clone@1.2.0': {} - '@vitest/coverage-v8@2.0.0(vitest@2.0.0(@types/node@20.10.4)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8))': + '@vitejs/plugin-react@4.3.1(vite@5.3.4(@types/node@20.12.7)(lightningcss@1.25.1)(sass@1.77.8))': + dependencies: + '@babel/core': 7.24.9 + '@babel/plugin-transform-react-jsx-self': 7.24.7(@babel/core@7.24.9) + '@babel/plugin-transform-react-jsx-source': 7.24.7(@babel/core@7.24.9) + '@types/babel__core': 7.20.5 + react-refresh: 0.14.2 + vite: 5.3.4(@types/node@20.12.7)(lightningcss@1.25.1)(sass@1.77.8) + transitivePeerDependencies: + - supports-color + + '@vitest/coverage-v8@2.0.0(vitest@2.0.0(@types/node@20.10.4)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -17740,11 +18179,11 @@ snapshots: std-env: 3.7.0 strip-literal: 2.1.0 test-exclude: 7.0.1 - vitest: 2.0.0(@types/node@20.10.4)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8) + vitest: 2.0.0(@types/node@20.10.4)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8) transitivePeerDependencies: - supports-color - '@vitest/coverage-v8@2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8))': + '@vitest/coverage-v8@2.0.0(vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -17759,11 +18198,11 @@ snapshots: std-env: 3.7.0 strip-literal: 2.1.0 test-exclude: 7.0.1 - vitest: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8) + vitest: 2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8) transitivePeerDependencies: - supports-color - '@vitest/coverage-v8@2.0.0(vitest@2.0.0(@types/node@20.12.7)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8))': + '@vitest/coverage-v8@2.0.0(vitest@2.0.0(@types/node@20.12.7)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -17778,7 +18217,7 @@ snapshots: std-env: 3.7.0 strip-literal: 2.1.0 test-exclude: 7.0.1 - vitest: 2.0.0(@types/node@20.12.7)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8) + vitest: 2.0.0(@types/node@20.12.7)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8) transitivePeerDependencies: - supports-color @@ -17949,8 +18388,6 @@ snapshots: dependencies: acorn: 8.11.3 - acorn-walk@8.2.0: {} - acorn-walk@8.3.2: {} acorn@8.10.0: {} @@ -18048,7 +18485,8 @@ snapshots: transitivePeerDependencies: - supports-color - arg@4.1.3: {} + arg@4.1.3: + optional: true argparse@1.0.10: dependencies: @@ -18353,6 +18791,13 @@ snapshots: node-releases: 2.0.14 update-browserslist-db: 1.0.13(browserslist@4.23.0) + browserslist@4.23.2: + dependencies: + caniuse-lite: 1.0.30001643 + electron-to-chromium: 1.5.0 + node-releases: 2.0.14 + update-browserslist-db: 1.1.0(browserslist@4.23.2) + bser@2.1.1: dependencies: node-int64: 0.4.0 @@ -18445,6 +18890,8 @@ snapshots: caniuse-lite@1.0.30001618: {} + caniuse-lite@1.0.30001643: {} + ccount@2.0.1: {} chai@5.1.1: @@ -18788,7 +19235,8 @@ snapshots: - supports-color - ts-node - create-require@1.1.1: {} + create-require@1.1.1: + optional: true cross-env@7.0.3: dependencies: @@ -19234,7 +19682,8 @@ snapshots: diff-sequences@29.6.3: {} - diff@4.0.2: {} + diff@4.0.2: + optional: true diff@5.2.0: {} @@ -19324,6 +19773,8 @@ snapshots: electron-to-chromium@1.4.738: {} + electron-to-chromium@1.5.0: {} + elkjs@0.9.3: {} emitter-listener@1.1.2: @@ -19550,6 +20001,8 @@ snapshots: escalade@3.1.1: {} + escalade@3.1.2: {} + escape-html@1.0.3: {} escape-string-regexp@1.0.5: {} @@ -20563,10 +21016,6 @@ snapshots: highlight.js@10.7.3: {} - history@5.3.0: - dependencies: - '@babel/runtime': 7.19.4 - hoist-non-react-statics@3.3.2: dependencies: react-is: 16.13.1 @@ -20723,6 +21172,10 @@ snapshots: dependencies: postcss: 8.4.31 + icss-utils@5.1.0(postcss@8.4.39): + dependencies: + postcss: 8.4.39 + identity-obj-proxy@3.0.0: dependencies: harmony-reflect: 1.6.2 @@ -21366,7 +21819,7 @@ snapshots: '@types/node': 20.12.7 anymatch: 3.1.3 fb-watchman: 2.0.2 - graceful-fs: 4.2.10 + graceful-fs: 4.2.11 jest-regex-util: 29.4.3 jest-util: 29.5.0 jest-worker: 29.5.0 @@ -21888,7 +22341,7 @@ snapshots: content-disposition: 0.5.4 content-type: 1.0.4 cookies: 0.8.0 - debug: 4.3.4 + debug: 4.3.5 delegates: 1.0.0 depd: 2.0.0 destroy: 1.0.4 @@ -21956,42 +22409,46 @@ snapshots: libphonenumber-js@1.10.51: {} - lightningcss-darwin-arm64@1.16.1: + lightningcss-darwin-arm64@1.25.1: + optional: true + + lightningcss-darwin-x64@1.25.1: optional: true - lightningcss-darwin-x64@1.16.1: + lightningcss-freebsd-x64@1.25.1: optional: true - lightningcss-linux-arm-gnueabihf@1.16.1: + lightningcss-linux-arm-gnueabihf@1.25.1: optional: true - lightningcss-linux-arm64-gnu@1.16.1: + lightningcss-linux-arm64-gnu@1.25.1: optional: true - lightningcss-linux-arm64-musl@1.16.1: + lightningcss-linux-arm64-musl@1.25.1: optional: true - lightningcss-linux-x64-gnu@1.16.1: + lightningcss-linux-x64-gnu@1.25.1: optional: true - lightningcss-linux-x64-musl@1.16.1: + lightningcss-linux-x64-musl@1.25.1: optional: true - lightningcss-win32-x64-msvc@1.16.1: + lightningcss-win32-x64-msvc@1.25.1: optional: true - lightningcss@1.16.1: + lightningcss@1.25.1: dependencies: detect-libc: 1.0.3 optionalDependencies: - lightningcss-darwin-arm64: 1.16.1 - lightningcss-darwin-x64: 1.16.1 - lightningcss-linux-arm-gnueabihf: 1.16.1 - lightningcss-linux-arm64-gnu: 1.16.1 - lightningcss-linux-arm64-musl: 1.16.1 - lightningcss-linux-x64-gnu: 1.16.1 - lightningcss-linux-x64-musl: 1.16.1 - lightningcss-win32-x64-msvc: 1.16.1 + lightningcss-darwin-arm64: 1.25.1 + lightningcss-darwin-x64: 1.25.1 + lightningcss-freebsd-x64: 1.25.1 + lightningcss-linux-arm-gnueabihf: 1.25.1 + lightningcss-linux-arm64-gnu: 1.25.1 + lightningcss-linux-arm64-musl: 1.25.1 + lightningcss-linux-x64-gnu: 1.25.1 + lightningcss-linux-x64-musl: 1.25.1 + lightningcss-win32-x64-msvc: 1.25.1 lilconfig@2.1.0: {} @@ -22207,7 +22664,8 @@ snapshots: dependencies: semver: 7.6.0 - make-error@1.3.6: {} + make-error@1.3.6: + optional: true makeerror@1.0.12: dependencies: @@ -23320,7 +23778,7 @@ snapshots: p-limit@4.0.0: dependencies: - yocto-queue: 1.0.0 + yocto-queue: 1.1.1 p-limit@6.0.0: dependencies: @@ -23622,24 +24080,45 @@ snapshots: dependencies: postcss: 8.4.31 + postcss-modules-extract-imports@3.0.0(postcss@8.4.39): + dependencies: + postcss: 8.4.39 + postcss-modules-local-by-default@4.0.0(postcss@8.4.31): dependencies: icss-utils: 5.1.0(postcss@8.4.31) postcss: 8.4.31 - postcss-selector-parser: 6.0.11 + postcss-selector-parser: 6.0.16 + postcss-value-parser: 4.2.0 + + postcss-modules-local-by-default@4.0.0(postcss@8.4.39): + dependencies: + icss-utils: 5.1.0(postcss@8.4.39) + postcss: 8.4.39 + postcss-selector-parser: 6.0.16 postcss-value-parser: 4.2.0 postcss-modules-scope@3.0.0(postcss@8.4.31): dependencies: postcss: 8.4.31 - postcss-selector-parser: 6.0.11 + postcss-selector-parser: 6.0.16 + + postcss-modules-scope@3.0.0(postcss@8.4.39): + dependencies: + postcss: 8.4.39 + postcss-selector-parser: 6.0.16 postcss-modules-values@4.0.0(postcss@8.4.31): dependencies: icss-utils: 5.1.0(postcss@8.4.31) postcss: 8.4.31 - postcss-modules@4.3.0(postcss@8.4.31): + postcss-modules-values@4.0.0(postcss@8.4.39): + dependencies: + icss-utils: 5.1.0(postcss@8.4.39) + postcss: 8.4.39 + + postcss-modules@4.3.1(postcss@8.4.31): dependencies: generic-names: 4.0.0 icss-replace-symbols: 1.1.0 @@ -23651,29 +24130,40 @@ snapshots: postcss-modules-values: 4.0.0(postcss@8.4.31) string-hash: 1.1.3 + postcss-modules@4.3.1(postcss@8.4.39): + dependencies: + generic-names: 4.0.0 + icss-replace-symbols: 1.1.0 + lodash.camelcase: 4.3.0 + postcss: 8.4.39 + postcss-modules-extract-imports: 3.0.0(postcss@8.4.39) + postcss-modules-local-by-default: 4.0.0(postcss@8.4.39) + postcss-modules-scope: 3.0.0(postcss@8.4.39) + postcss-modules-values: 4.0.0(postcss@8.4.39) + string-hash: 1.1.3 + postcss-resolve-nested-selector@0.1.1: {} - postcss-safe-parser@6.0.0(postcss@8.4.38): + postcss-safe-parser@6.0.0(postcss@8.4.39): dependencies: - postcss: 8.4.38 + postcss: 8.4.39 postcss-scss@4.0.9(postcss@8.4.31): dependencies: postcss: 8.4.31 - postcss-selector-parser@6.0.11: + postcss-scss@4.0.9(postcss@8.4.39): dependencies: - cssesc: 3.0.0 - util-deprecate: 1.0.2 + postcss: 8.4.39 postcss-selector-parser@6.0.16: dependencies: cssesc: 3.0.0 util-deprecate: 1.0.2 - postcss-sorting@8.0.2(postcss@8.4.38): + postcss-sorting@8.0.2(postcss@8.4.39): dependencies: - postcss: 8.4.38 + postcss: 8.4.39 postcss-value-parser@3.3.1: {} @@ -23685,12 +24175,6 @@ snapshots: picocolors: 1.0.0 source-map-js: 1.0.2 - postcss@8.4.38: - dependencies: - nanoid: 3.3.7 - picocolors: 1.0.0 - source-map-js: 1.2.0 - postcss@8.4.39: dependencies: nanoid: 3.3.7 @@ -24037,6 +24521,8 @@ snapshots: prop-types: 15.8.1 react: 18.3.1 + react-refresh@0.14.2: {} + react-refresh@0.9.0: {} react-resize-detector@7.1.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1): @@ -24052,11 +24538,23 @@ snapshots: react-dom: 18.3.1(react@18.3.1) react-router: 6.10.0(react@18.3.1) + react-router-dom@6.25.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + dependencies: + '@remix-run/router': 1.18.0 + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + react-router: 6.25.1(react@18.3.1) + react-router@6.10.0(react@18.3.1): dependencies: '@remix-run/router': 1.5.0 react: 18.3.1 + react-router@6.25.1(react@18.3.1): + dependencies: + '@remix-run/router': 1.18.0 + react: 18.3.1 + react-side-effect@2.1.2(react@18.3.1): dependencies: react: 18.3.1 @@ -24514,18 +25012,11 @@ snapshots: xml-escape: 1.1.0 xpath: 0.0.32 - sass@1.56.1: - dependencies: - chokidar: 3.5.3 - immutable: 4.1.0 - source-map-js: 1.0.2 - sass@1.77.8: dependencies: chokidar: 3.5.3 immutable: 4.1.0 source-map-js: 1.2.0 - optional: true sax@1.2.4: {} @@ -24926,8 +25417,8 @@ snapshots: stylelint-order@6.0.4(stylelint@15.11.0(typescript@5.5.3)): dependencies: - postcss: 8.4.38 - postcss-sorting: 8.0.2(postcss@8.4.38) + postcss: 8.4.39 + postcss-sorting: 8.0.2(postcss@8.4.39) stylelint: 15.11.0(typescript@5.5.3) stylelint-scss@6.2.1(stylelint@15.11.0(typescript@5.5.3)): @@ -24968,9 +25459,9 @@ snapshots: micromatch: 4.0.5 normalize-path: 3.0.0 picocolors: 1.0.0 - postcss: 8.4.38 + postcss: 8.4.39 postcss-resolve-nested-selector: 0.1.1 - postcss-safe-parser: 6.0.0(postcss@8.4.38) + postcss-safe-parser: 6.0.0(postcss@8.4.39) postcss-selector-parser: 6.0.16 postcss-value-parser: 4.2.0 resolve-from: 5.0.0 @@ -25001,7 +25492,7 @@ snapshots: dependencies: component-emitter: 1.3.0 cookiejar: 2.1.4 - debug: 4.3.4 + debug: 4.3.5 fast-safe-stringify: 2.1.1 form-data: 4.0.0 formidable: 3.5.1 @@ -25051,7 +25542,7 @@ snapshots: css-select: 4.3.0 css-tree: 1.1.3 csso: 4.2.0 - picocolors: 1.0.0 + picocolors: 1.0.1 stable: 0.1.8 swr@2.2.0(react@18.3.1): @@ -25231,8 +25722,8 @@ snapshots: '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 '@types/node': 20.12.7 - acorn: 8.10.0 - acorn-walk: 8.2.0 + acorn: 8.11.3 + acorn-walk: 8.3.2 arg: 4.1.3 create-require: 1.1.1 diff: 4.0.2 @@ -25252,8 +25743,8 @@ snapshots: '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 '@types/node': 20.12.7 - acorn: 8.10.0 - acorn-walk: 8.2.0 + acorn: 8.11.3 + acorn-walk: 8.3.2 arg: 4.1.3 create-require: 1.1.1 diff: 4.0.2 @@ -25263,6 +25754,7 @@ snapshots: yn: 3.1.1 optionalDependencies: '@swc/core': 1.3.52(@swc/helpers@0.5.1) + optional: true ts-node@10.9.2(@types/node@20.10.4)(typescript@5.5.3): dependencies: @@ -25487,7 +25979,7 @@ snapshots: dependencies: browserslist: 4.21.4 escalade: 3.1.1 - picocolors: 1.0.0 + picocolors: 1.0.1 update-browserslist-db@1.0.13(browserslist@4.23.0): dependencies: @@ -25495,6 +25987,12 @@ snapshots: escalade: 3.1.1 picocolors: 1.0.1 + update-browserslist-db@1.1.0(browserslist@4.23.2): + dependencies: + browserslist: 4.23.2 + escalade: 3.1.2 + picocolors: 1.0.1 + uri-js@4.4.1: dependencies: punycode: 2.3.0 @@ -25529,7 +26027,8 @@ snapshots: kleur: 4.1.4 sade: 1.8.1 - v8-compile-cache-lib@3.0.1: {} + v8-compile-cache-lib@3.0.1: + optional: true v8-to-istanbul@9.2.0: dependencies: @@ -25555,13 +26054,13 @@ snapshots: unist-util-stringify-position: 4.0.0 vfile-message: 4.0.2 - vite-node@2.0.0(@types/node@20.10.4)(sass@1.77.8): + vite-node@2.0.0(@types/node@20.10.4)(lightningcss@1.25.1)(sass@1.77.8): dependencies: cac: 6.7.14 debug: 4.3.5 pathe: 1.1.2 picocolors: 1.0.1 - vite: 5.3.3(@types/node@20.10.4)(sass@1.77.8) + vite: 5.3.4(@types/node@20.10.4)(lightningcss@1.25.1)(sass@1.77.8) transitivePeerDependencies: - '@types/node' - less @@ -25572,13 +26071,13 @@ snapshots: - supports-color - terser - vite-node@2.0.0(@types/node@20.11.20)(sass@1.77.8): + vite-node@2.0.0(@types/node@20.11.20)(lightningcss@1.25.1)(sass@1.77.8): dependencies: cac: 6.7.14 debug: 4.3.5 pathe: 1.1.2 picocolors: 1.0.1 - vite: 5.3.3(@types/node@20.11.20)(sass@1.77.8) + vite: 5.3.4(@types/node@20.11.20)(lightningcss@1.25.1)(sass@1.77.8) transitivePeerDependencies: - '@types/node' - less @@ -25589,13 +26088,13 @@ snapshots: - supports-color - terser - vite-node@2.0.0(@types/node@20.12.7)(sass@1.77.8): + vite-node@2.0.0(@types/node@20.12.7)(lightningcss@1.25.1)(sass@1.77.8): dependencies: cac: 6.7.14 debug: 4.3.5 pathe: 1.1.2 picocolors: 1.0.1 - vite: 5.3.3(@types/node@20.12.7)(sass@1.77.8) + vite: 5.3.4(@types/node@20.12.7)(lightningcss@1.25.1)(sass@1.77.8) transitivePeerDependencies: - '@types/node' - less @@ -25606,37 +26105,59 @@ snapshots: - supports-color - terser - vite@5.3.3(@types/node@20.10.4)(sass@1.77.8): + vite-plugin-compression@0.5.1(vite@5.3.4(@types/node@20.12.7)(lightningcss@1.25.1)(sass@1.77.8)): dependencies: + chalk: 4.1.2 + debug: 4.3.5 + fs-extra: 10.1.0 + vite: 5.3.4(@types/node@20.12.7)(lightningcss@1.25.1)(sass@1.77.8) + transitivePeerDependencies: + - supports-color + + vite-plugin-prebundle@0.0.4(esbuild@0.21.5)(rollup@4.14.3)(vite@5.3.4(@types/node@20.12.7)(lightningcss@1.25.1)(sass@1.77.8)): + dependencies: + debug: 4.3.5 esbuild: 0.21.5 - postcss: 8.4.39 + pathe: 1.1.2 rollup: 4.14.3 - optionalDependencies: - '@types/node': 20.10.4 - fsevents: 2.3.3 - sass: 1.77.8 + vite: 5.3.4(@types/node@20.12.7)(lightningcss@1.25.1)(sass@1.77.8) + transitivePeerDependencies: + - supports-color + + vite-plugin-svgr@4.2.0(rollup@4.14.3)(typescript@5.5.3)(vite@5.3.4(@types/node@20.12.7)(lightningcss@1.25.1)(sass@1.77.8)): + dependencies: + '@rollup/pluginutils': 5.1.0(rollup@4.14.3) + '@svgr/core': 8.1.0(typescript@5.5.3) + '@svgr/plugin-jsx': 8.1.0(@svgr/core@8.1.0(typescript@5.5.3)) + vite: 5.3.4(@types/node@20.12.7)(lightningcss@1.25.1)(sass@1.77.8) + transitivePeerDependencies: + - rollup + - supports-color + - typescript - vite@5.3.3(@types/node@20.11.20)(sass@1.77.8): + vite@5.3.4(@types/node@20.10.4)(lightningcss@1.25.1)(sass@1.77.8): dependencies: esbuild: 0.21.5 postcss: 8.4.39 rollup: 4.14.3 optionalDependencies: - '@types/node': 20.11.20 + '@types/node': 20.10.4 fsevents: 2.3.3 + lightningcss: 1.25.1 sass: 1.77.8 - vite@5.3.3(@types/node@20.12.7)(sass@1.77.8): + vite@5.3.4(@types/node@20.11.20)(lightningcss@1.25.1)(sass@1.77.8): dependencies: esbuild: 0.21.5 postcss: 8.4.39 rollup: 4.14.3 optionalDependencies: - '@types/node': 20.12.7 + '@types/node': 20.11.20 fsevents: 2.3.3 + lightningcss: 1.25.1 sass: 1.77.8 - vite@5.3.4(@types/node@20.12.7)(sass@1.77.8): + vite@5.3.4(@types/node@20.12.7)(lightningcss@1.25.1)(sass@1.77.8): dependencies: esbuild: 0.21.5 postcss: 8.4.39 @@ -25644,9 +26165,10 @@ snapshots: optionalDependencies: '@types/node': 20.12.7 fsevents: 2.3.3 + lightningcss: 1.25.1 sass: 1.77.8 - vitest@2.0.0(@types/node@20.10.4)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8): + vitest@2.0.0(@types/node@20.10.4)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8): dependencies: '@ampproject/remapping': 2.3.0 '@vitest/expect': 2.0.0 @@ -25663,8 +26185,8 @@ snapshots: std-env: 3.7.0 tinybench: 2.8.0 tinypool: 1.0.0 - vite: 5.3.3(@types/node@20.10.4)(sass@1.77.8) - vite-node: 2.0.0(@types/node@20.10.4)(sass@1.77.8) + vite: 5.3.4(@types/node@20.10.4)(lightningcss@1.25.1)(sass@1.77.8) + vite-node: 2.0.0(@types/node@20.10.4)(lightningcss@1.25.1)(sass@1.77.8) why-is-node-running: 2.2.2 optionalDependencies: '@types/node': 20.10.4 @@ -25679,7 +26201,7 @@ snapshots: - supports-color - terser - vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8): + vitest@2.0.0(@types/node@20.11.20)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8): dependencies: '@ampproject/remapping': 2.3.0 '@vitest/expect': 2.0.0 @@ -25696,8 +26218,8 @@ snapshots: std-env: 3.7.0 tinybench: 2.8.0 tinypool: 1.0.0 - vite: 5.3.3(@types/node@20.11.20)(sass@1.77.8) - vite-node: 2.0.0(@types/node@20.11.20)(sass@1.77.8) + vite: 5.3.4(@types/node@20.11.20)(lightningcss@1.25.1)(sass@1.77.8) + vite-node: 2.0.0(@types/node@20.11.20)(lightningcss@1.25.1)(sass@1.77.8) why-is-node-running: 2.2.2 optionalDependencies: '@types/node': 20.11.20 @@ -25712,7 +26234,7 @@ snapshots: - supports-color - terser - vitest@2.0.0(@types/node@20.12.7)(happy-dom@14.12.3)(jsdom@20.0.2)(sass@1.77.8): + vitest@2.0.0(@types/node@20.12.7)(happy-dom@14.12.3)(jsdom@20.0.2)(lightningcss@1.25.1)(sass@1.77.8): dependencies: '@ampproject/remapping': 2.3.0 '@vitest/expect': 2.0.0 @@ -25729,8 +26251,8 @@ snapshots: std-env: 3.7.0 tinybench: 2.8.0 tinypool: 1.0.0 - vite: 5.3.3(@types/node@20.12.7)(sass@1.77.8) - vite-node: 2.0.0(@types/node@20.12.7)(sass@1.77.8) + vite: 5.3.4(@types/node@20.12.7)(lightningcss@1.25.1)(sass@1.77.8) + vite-node: 2.0.0(@types/node@20.12.7)(lightningcss@1.25.1)(sass@1.77.8) why-is-node-running: 2.2.2 optionalDependencies: '@types/node': 20.12.7 @@ -26004,12 +26526,11 @@ snapshots: ylru@1.2.1: {} - yn@3.1.1: {} + yn@3.1.1: + optional: true yocto-queue@0.1.0: {} - yocto-queue@1.0.0: {} - yocto-queue@1.1.1: {} zod-to-ts@1.2.0(typescript@5.5.3)(zod@3.23.8): diff --git a/vite.shared.config.ts b/vite.shared.config.ts new file mode 100644 index 00000000000..10b5ab01553 --- /dev/null +++ b/vite.shared.config.ts @@ -0,0 +1,39 @@ +/** @fileoverview The common config for frontend projects. */ + +import { UserConfig } from 'vite'; +import fs from 'fs'; + +export const defaultConfig: UserConfig = { + resolve: { + alias: [ + { + find: /^@\//, + replacement: '/src/', + }, + ], + }, + optimizeDeps: { + include: ['@logto/phrases', '@logto/phrases-experience', '@logto/schemas'], + }, + build: { + sourcemap: false, + rollupOptions: { + output: { + manualChunks(id) { + if (id.includes('/@logto/')) { + return 'logto'; + } + + if (id.includes('/node_modules/')) { + return 'vendors'; + } + + const match = /\/lib\/locales\/([^/]+)/.exec(id); + if (match?.[1]) { + return `phrases-${match[1]}`; + } + }, + }, + }, + }, +};