From a469e3ed030b8e44dabc79a0d1237cfeddbf66e6 Mon Sep 17 00:00:00 2001 From: Alex Carpenter Date: Thu, 15 Oct 2026 22:21:40 -0400 Subject: [PATCH 1/2] refactor(mosaic): group profile section files and tests into folders --- .changeset/mosaic-profile-folders.md | 2 ++ ...ion-profile-general-panel.feature.test.tsx | 18 +++++----- .../invitations-table-tab.view.test.tsx | 4 +-- .../members-table-tab.controller.test.tsx | 0 .../__tests__/members-table-tab.view.test.tsx | 4 +-- ...ation-profile-invitations.feature.test.tsx | 8 ++--- ...ion-profile-invite-members.dialog.test.tsx | 2 +- ...-profile-members-panel.controller.test.tsx | 2 +- ...ion-profile-members-panel.feature.test.tsx | 14 +++++--- ...nization-profile-requests.feature.test.tsx | 6 ++-- .../requests-table-tab.view.test.tsx | 4 +-- .../invitations-table-tab.controller.ts | 8 ++--- .../invitations-table-tab.messages.ts | 0 .../invitations-table-tab.model.ts | 2 +- .../invitations-table-tab.types.ts | 4 +-- .../invitations-table-tab.view.tsx | 28 +++++++-------- .../members-table-tab.controller.ts | 12 +++---- .../members-table-tab.messages.ts | 0 .../members-table-tab.model.ts | 0 .../members-table-tab.styles.ts | 0 .../members-table-tab.types.ts | 4 +-- .../members-table-tab.utils.ts | 0 .../members-table-tab.view.tsx | 34 +++++++++---------- ...ation-profile-invite-members.controller.ts | 6 ++-- ...nization-profile-invite-members.dialog.tsx | 18 +++++----- ...ization-profile-invite-members.messages.ts | 0 ...anization-profile-invite-members.styles.ts | 2 +- ...zation-profile-members-panel.controller.ts | 6 ++-- ...rganization-profile-members-panel.model.ts | 2 +- .../organization-profile-members-panel.tsx | 0 ...rganization-profile-members-panel.view.tsx | 8 ++--- .../requests-table-tab.controller.ts | 6 ++-- .../requests-table-tab.messages.ts | 0 .../requests-table-tab.model.ts | 0 .../requests-table-tab.styles.ts | 2 +- .../requests-table-tab.types.ts | 0 .../requests-table-tab.view.tsx | 28 +++++++-------- .../table-tab.styles.ts | 2 +- .../organization-profile.model.ts | 2 +- .../organization-profile.tsx | 2 +- .../user-profile-security-panel.view.test.tsx | 4 +-- ...le-active-devices-section.feature.test.tsx | 14 ++++---- .../user-profile-device-actions.test.tsx | 8 ++--- ...-profile-billing-history-section.styles.ts | 2 +- ...r-profile-billing-history-section.view.tsx | 12 +++---- .../user-profile-billing-panel.view.tsx | 12 +++---- ...-profile-passkeys-section.feature.test.tsx | 2 +- .../user-profile-passkey-row.view.tsx | 14 ++++---- ...ser-profile-passkeys-section.controller.ts | 2 +- .../user-profile-passkeys-section.messages.ts | 0 .../user-profile-passkeys-section.styles.ts | 2 +- .../user-profile-passkeys-section.tsx | 2 +- .../user-profile-passkeys-section.view.tsx | 23 ++++++------- .../user-profile-rename-passkey.controller.ts | 6 ++-- .../user-profile-rename-passkey.dialog.tsx | 18 +++++----- ...r-profile-payment-methods-section.view.tsx | 14 ++++---- ...user-profile-subscription-section.view.tsx | 6 ++-- ...file-web3-wallets-section.feature.test.tsx | 14 ++++---- packages/mosaic/src/localization/registry.ts | 10 +++--- packages/mosaic/src/styles/index.ts | 6 ++-- .../page.tsx | 2 +- .../stories/fixtures/invitations-table-tab.ts | 2 +- .../src/stories/fixtures/members-table-tab.ts | 2 +- .../organization-profile-invite-members.ts | 2 +- .../stories/fixtures/organization-profile.tsx | 2 +- .../stories/fixtures/requests-table-tab.ts | 2 +- .../stories/fixtures/user-profile-passkeys.ts | 2 +- .../src/stories/fixtures/user-profile.tsx | 2 +- ...nization-profile-members-panel.stories.tsx | 5 +-- ...rofile-billing-history-section.stories.tsx | 7 ++-- .../user-profile-passkeys-section.stories.tsx | 5 +-- ...rofile-payment-methods-section.stories.tsx | 7 ++-- ...r-profile-subscription-section.stories.tsx | 5 +-- 73 files changed, 233 insertions(+), 223 deletions(-) create mode 100644 .changeset/mosaic-profile-folders.md rename packages/mosaic/src/features/organization-profile/{ => __tests__}/organization-profile-general-panel.feature.test.tsx (96%) rename packages/mosaic/src/features/organization-profile/{ => organization-profile-members-panel}/__tests__/invitations-table-tab.view.test.tsx (97%) rename packages/mosaic/src/features/organization-profile/{ => organization-profile-members-panel}/__tests__/members-table-tab.controller.test.tsx (100%) rename packages/mosaic/src/features/organization-profile/{ => organization-profile-members-panel}/__tests__/members-table-tab.view.test.tsx (98%) rename packages/mosaic/src/features/organization-profile/{ => organization-profile-members-panel}/__tests__/organization-profile-invitations.feature.test.tsx (99%) rename packages/mosaic/src/features/organization-profile/{ => organization-profile-members-panel}/__tests__/organization-profile-invite-members.dialog.test.tsx (97%) rename packages/mosaic/src/features/organization-profile/{ => organization-profile-members-panel}/__tests__/organization-profile-members-panel.controller.test.tsx (96%) rename packages/mosaic/src/features/organization-profile/{ => organization-profile-members-panel}/__tests__/organization-profile-members-panel.feature.test.tsx (98%) rename packages/mosaic/src/features/organization-profile/{ => organization-profile-members-panel}/__tests__/organization-profile-requests.feature.test.tsx (98%) rename packages/mosaic/src/features/organization-profile/{ => organization-profile-members-panel}/__tests__/requests-table-tab.view.test.tsx (98%) rename packages/mosaic/src/features/organization-profile/{ => organization-profile-members-panel}/invitations-table-tab.controller.ts (86%) rename packages/mosaic/src/features/organization-profile/{ => organization-profile-members-panel}/invitations-table-tab.messages.ts (100%) rename packages/mosaic/src/features/organization-profile/{ => organization-profile-members-panel}/invitations-table-tab.model.ts (98%) rename packages/mosaic/src/features/organization-profile/{ => organization-profile-members-panel}/invitations-table-tab.types.ts (86%) rename packages/mosaic/src/features/organization-profile/{ => organization-profile-members-panel}/invitations-table-tab.view.tsx (89%) rename packages/mosaic/src/features/organization-profile/{ => organization-profile-members-panel}/members-table-tab.controller.ts (86%) rename packages/mosaic/src/features/organization-profile/{ => organization-profile-members-panel}/members-table-tab.messages.ts (100%) rename packages/mosaic/src/features/organization-profile/{ => organization-profile-members-panel}/members-table-tab.model.ts (100%) rename packages/mosaic/src/features/organization-profile/{ => organization-profile-members-panel}/members-table-tab.styles.ts (100%) rename packages/mosaic/src/features/organization-profile/{ => organization-profile-members-panel}/members-table-tab.types.ts (91%) rename packages/mosaic/src/features/organization-profile/{ => organization-profile-members-panel}/members-table-tab.utils.ts (100%) rename packages/mosaic/src/features/organization-profile/{ => organization-profile-members-panel}/members-table-tab.view.tsx (91%) rename packages/mosaic/src/features/organization-profile/{ => organization-profile-members-panel}/organization-profile-invite-members.controller.ts (94%) rename packages/mosaic/src/features/organization-profile/{ => organization-profile-members-panel}/organization-profile-invite-members.dialog.tsx (89%) rename packages/mosaic/src/features/organization-profile/{ => organization-profile-members-panel}/organization-profile-invite-members.messages.ts (100%) rename packages/mosaic/src/features/organization-profile/{ => organization-profile-members-panel}/organization-profile-invite-members.styles.ts (83%) rename packages/mosaic/src/features/organization-profile/{ => organization-profile-members-panel}/organization-profile-members-panel.controller.ts (86%) rename packages/mosaic/src/features/organization-profile/{ => organization-profile-members-panel}/organization-profile-members-panel.model.ts (96%) rename packages/mosaic/src/features/organization-profile/{ => organization-profile-members-panel}/organization-profile-members-panel.tsx (100%) rename packages/mosaic/src/features/organization-profile/{ => organization-profile-members-panel}/organization-profile-members-panel.view.tsx (93%) rename packages/mosaic/src/features/organization-profile/{ => organization-profile-members-panel}/requests-table-tab.controller.ts (90%) rename packages/mosaic/src/features/organization-profile/{ => organization-profile-members-panel}/requests-table-tab.messages.ts (100%) rename packages/mosaic/src/features/organization-profile/{ => organization-profile-members-panel}/requests-table-tab.model.ts (100%) rename packages/mosaic/src/features/organization-profile/{ => organization-profile-members-panel}/requests-table-tab.styles.ts (77%) rename packages/mosaic/src/features/organization-profile/{ => organization-profile-members-panel}/requests-table-tab.types.ts (100%) rename packages/mosaic/src/features/organization-profile/{ => organization-profile-members-panel}/requests-table-tab.view.tsx (91%) rename packages/mosaic/src/features/organization-profile/{ => organization-profile-members-panel}/table-tab.styles.ts (79%) rename packages/mosaic/src/features/user-profile/user-profile-active-devices-section/{ => __tests__}/user-profile-active-devices-section.feature.test.tsx (98%) rename packages/mosaic/src/features/user-profile/{ => user-profile-active-devices-section}/__tests__/user-profile-device-actions.test.tsx (95%) rename packages/mosaic/src/features/user-profile/{ => user-profile-billing-history-section}/user-profile-billing-history-section.styles.ts (98%) rename packages/mosaic/src/features/user-profile/{ => user-profile-billing-history-section}/user-profile-billing-history-section.view.tsx (95%) rename packages/mosaic/src/features/user-profile/{ => user-profile-passkeys-section}/user-profile-passkey-row.view.tsx (86%) rename packages/mosaic/src/features/user-profile/{ => user-profile-passkeys-section}/user-profile-passkeys-section.messages.ts (100%) rename packages/mosaic/src/features/user-profile/{ => user-profile-passkeys-section}/user-profile-passkeys-section.styles.ts (79%) rename packages/mosaic/src/features/user-profile/{ => user-profile-passkeys-section}/user-profile-passkeys-section.view.tsx (84%) rename packages/mosaic/src/features/user-profile/{ => user-profile-passkeys-section}/user-profile-rename-passkey.controller.ts (86%) rename packages/mosaic/src/features/user-profile/{ => user-profile-passkeys-section}/user-profile-rename-passkey.dialog.tsx (84%) rename packages/mosaic/src/features/user-profile/{ => user-profile-payment-methods-section}/user-profile-payment-methods-section.view.tsx (88%) rename packages/mosaic/src/features/user-profile/{ => user-profile-subscription-section}/user-profile-subscription-section.view.tsx (91%) rename packages/mosaic/src/features/user-profile/{ => user-profile-web3-wallets-section}/__tests__/user-profile-web3-wallets-section.feature.test.tsx (98%) diff --git a/.changeset/mosaic-profile-folders.md b/.changeset/mosaic-profile-folders.md new file mode 100644 index 00000000000..a845151cc84 --- /dev/null +++ b/.changeset/mosaic-profile-folders.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/packages/mosaic/src/features/organization-profile/organization-profile-general-panel.feature.test.tsx b/packages/mosaic/src/features/organization-profile/__tests__/organization-profile-general-panel.feature.test.tsx similarity index 96% rename from packages/mosaic/src/features/organization-profile/organization-profile-general-panel.feature.test.tsx rename to packages/mosaic/src/features/organization-profile/__tests__/organization-profile-general-panel.feature.test.tsx index 0afac059dce..472876d768c 100644 --- a/packages/mosaic/src/features/organization-profile/organization-profile-general-panel.feature.test.tsx +++ b/packages/mosaic/src/features/organization-profile/__tests__/organization-profile-general-panel.feature.test.tsx @@ -3,8 +3,8 @@ import { act, screen, waitFor, within } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { describe, expect, it } from 'vitest'; -import { openDialog } from '../../__tests__/feature/dialog'; -import { type FakeFapiSeed, holdRequests, serveFapi } from '../../__tests__/feature/fake-fapi'; +import { openDialog } from '../../../__tests__/feature/dialog'; +import { type FakeFapiSeed, holdRequests, serveFapi } from '../../../__tests__/feature/fake-fapi'; import { fapiClient, fapiEnvironment, @@ -12,13 +12,13 @@ import { fapiOrganization, fapiSession, fapiUser, -} from '../../__tests__/feature/fapi'; -import { renderWithClerk } from '../../__tests__/feature/render'; -import { MosaicProvider } from '../../mosaic-provider'; -import { OrganizationProfileProvider } from './organization-profile.provider'; -import { OrganizationProfileDangerSection } from './organization-profile-danger-section/organization-profile-danger-section'; -import { OrganizationProfileGeneralPanel } from './organization-profile-general-panel'; -import { OrganizationProfileProfileSection } from './organization-profile-profile-section/organization-profile-profile-section'; +} from '../../../__tests__/feature/fapi'; +import { renderWithClerk } from '../../../__tests__/feature/render'; +import { MosaicProvider } from '../../../mosaic-provider'; +import { OrganizationProfileProvider } from '../organization-profile.provider'; +import { OrganizationProfileDangerSection } from '../organization-profile-danger-section/organization-profile-danger-section'; +import { OrganizationProfileGeneralPanel } from '../organization-profile-general-panel'; +import { OrganizationProfileProfileSection } from '../organization-profile-profile-section/organization-profile-profile-section'; const acme = fapiOrganization({ id: 'org_1', name: 'Acme', slug: 'acme' }); diff --git a/packages/mosaic/src/features/organization-profile/__tests__/invitations-table-tab.view.test.tsx b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/__tests__/invitations-table-tab.view.test.tsx similarity index 97% rename from packages/mosaic/src/features/organization-profile/__tests__/invitations-table-tab.view.test.tsx rename to packages/mosaic/src/features/organization-profile/organization-profile-members-panel/__tests__/invitations-table-tab.view.test.tsx index ff5c82c14f6..b825d7fd809 100644 --- a/packages/mosaic/src/features/organization-profile/__tests__/invitations-table-tab.view.test.tsx +++ b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/__tests__/invitations-table-tab.view.test.tsx @@ -2,8 +2,8 @@ import { render, screen, within } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { afterEach, describe, expect, it, vi } from 'vitest'; -import { useConfirmController } from '../../../blocks/confirm'; -import { MosaicProvider } from '../../../mosaic-provider'; +import { useConfirmController } from '../../../../blocks/confirm'; +import { MosaicProvider } from '../../../../mosaic-provider'; import type { InvitationsTableTabViewProps, OrganizationProfileInvitation } from '../invitations-table-tab.types'; import { InvitationsTableTabView } from '../invitations-table-tab.view'; diff --git a/packages/mosaic/src/features/organization-profile/__tests__/members-table-tab.controller.test.tsx b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/__tests__/members-table-tab.controller.test.tsx similarity index 100% rename from packages/mosaic/src/features/organization-profile/__tests__/members-table-tab.controller.test.tsx rename to packages/mosaic/src/features/organization-profile/organization-profile-members-panel/__tests__/members-table-tab.controller.test.tsx diff --git a/packages/mosaic/src/features/organization-profile/__tests__/members-table-tab.view.test.tsx b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/__tests__/members-table-tab.view.test.tsx similarity index 98% rename from packages/mosaic/src/features/organization-profile/__tests__/members-table-tab.view.test.tsx rename to packages/mosaic/src/features/organization-profile/organization-profile-members-panel/__tests__/members-table-tab.view.test.tsx index 6433c6a9f26..9826d90c280 100644 --- a/packages/mosaic/src/features/organization-profile/__tests__/members-table-tab.view.test.tsx +++ b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/__tests__/members-table-tab.view.test.tsx @@ -2,8 +2,8 @@ import { render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { afterEach, describe, expect, it, vi } from 'vitest'; -import { useConfirmController } from '../../../blocks/confirm'; -import { MosaicProvider } from '../../../mosaic-provider'; +import { useConfirmController } from '../../../../blocks/confirm'; +import { MosaicProvider } from '../../../../mosaic-provider'; import type { MembersTableTabViewProps, OrganizationProfileMember } from '../members-table-tab.types'; import { MembersTableTabView } from '../members-table-tab.view'; diff --git a/packages/mosaic/src/features/organization-profile/__tests__/organization-profile-invitations.feature.test.tsx b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/__tests__/organization-profile-invitations.feature.test.tsx similarity index 99% rename from packages/mosaic/src/features/organization-profile/__tests__/organization-profile-invitations.feature.test.tsx rename to packages/mosaic/src/features/organization-profile/organization-profile-members-panel/__tests__/organization-profile-invitations.feature.test.tsx index 4fb0c30ae09..eb9a208bd89 100644 --- a/packages/mosaic/src/features/organization-profile/__tests__/organization-profile-invitations.feature.test.tsx +++ b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/__tests__/organization-profile-invitations.feature.test.tsx @@ -5,7 +5,7 @@ import { http, HttpResponse } from 'msw'; import { describe, expect, it } from 'vitest'; import { userEvent as browserEvent } from 'vitest/browser'; -import { fapiUrl, holdRequests, serveFapi, worker } from '../../../__tests__/feature/fake-fapi'; +import { fapiUrl, holdRequests, serveFapi, worker } from '../../../../__tests__/feature/fake-fapi'; import { fapiClient, fapiEnvironment, @@ -13,9 +13,9 @@ import { fapiOrganization, fapiSession, fapiUser, -} from '../../../__tests__/feature/fapi'; -import { renderWithClerk } from '../../../__tests__/feature/render'; -import { MosaicLocalizationProvider, resolveLocalization } from '../../../localization'; +} from '../../../../__tests__/feature/fapi'; +import { renderWithClerk } from '../../../../__tests__/feature/render'; +import { MosaicLocalizationProvider, resolveLocalization } from '../../../../localization'; import { OrganizationProfileMembersPanel } from '../organization-profile-members-panel'; const organization = fapiOrganization({ id: 'org_invitations', name: 'Acme' }); diff --git a/packages/mosaic/src/features/organization-profile/__tests__/organization-profile-invite-members.dialog.test.tsx b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/__tests__/organization-profile-invite-members.dialog.test.tsx similarity index 97% rename from packages/mosaic/src/features/organization-profile/__tests__/organization-profile-invite-members.dialog.test.tsx rename to packages/mosaic/src/features/organization-profile/organization-profile-members-panel/__tests__/organization-profile-invite-members.dialog.test.tsx index 5f67850edbd..4262b473274 100644 --- a/packages/mosaic/src/features/organization-profile/__tests__/organization-profile-invite-members.dialog.test.tsx +++ b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/__tests__/organization-profile-invite-members.dialog.test.tsx @@ -3,7 +3,7 @@ import userEvent from '@testing-library/user-event'; import { useState } from 'react'; import { describe, expect, it, vi } from 'vitest'; -import { MosaicProvider } from '../../../mosaic-provider'; +import { MosaicProvider } from '../../../../mosaic-provider'; import type { OrganizationProfileInviteMembersDialogProps } from '../organization-profile-invite-members.dialog'; import { OrganizationProfileInviteMembersDialog } from '../organization-profile-invite-members.dialog'; diff --git a/packages/mosaic/src/features/organization-profile/__tests__/organization-profile-members-panel.controller.test.tsx b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/__tests__/organization-profile-members-panel.controller.test.tsx similarity index 96% rename from packages/mosaic/src/features/organization-profile/__tests__/organization-profile-members-panel.controller.test.tsx rename to packages/mosaic/src/features/organization-profile/organization-profile-members-panel/__tests__/organization-profile-members-panel.controller.test.tsx index 9d4a4f05f56..00049585977 100644 --- a/packages/mosaic/src/features/organization-profile/__tests__/organization-profile-members-panel.controller.test.tsx +++ b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/__tests__/organization-profile-members-panel.controller.test.tsx @@ -1,7 +1,7 @@ import { act, renderHook } from '@testing-library/react'; import { describe, expect, it, vi } from 'vitest'; -import { deferred } from '../../../__tests__/async'; +import { deferred } from '../../../../__tests__/async'; import type { MembersRoles } from '../members-table-tab.types'; import { useMembersPanelRolesController } from '../organization-profile-members-panel.controller'; diff --git a/packages/mosaic/src/features/organization-profile/__tests__/organization-profile-members-panel.feature.test.tsx b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/__tests__/organization-profile-members-panel.feature.test.tsx similarity index 98% rename from packages/mosaic/src/features/organization-profile/__tests__/organization-profile-members-panel.feature.test.tsx rename to packages/mosaic/src/features/organization-profile/organization-profile-members-panel/__tests__/organization-profile-members-panel.feature.test.tsx index 96b1f46e00f..56e3c5b53fb 100644 --- a/packages/mosaic/src/features/organization-profile/__tests__/organization-profile-members-panel.feature.test.tsx +++ b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/__tests__/organization-profile-members-panel.feature.test.tsx @@ -4,10 +4,16 @@ import userEvent from '@testing-library/user-event'; import { http, HttpResponse } from 'msw'; import { describe, expect, it, vi } from 'vitest'; -import { fapiUrl, holdRequests, serveFapi, worker } from '../../../__tests__/feature/fake-fapi'; -import { fapiClient, fapiMembership, fapiOrganization, fapiSession, fapiUser } from '../../../__tests__/feature/fapi'; -import { renderWithClerk } from '../../../__tests__/feature/render'; -import { MosaicLocalizationProvider, resolveLocalization } from '../../../localization'; +import { fapiUrl, holdRequests, serveFapi, worker } from '../../../../__tests__/feature/fake-fapi'; +import { + fapiClient, + fapiMembership, + fapiOrganization, + fapiSession, + fapiUser, +} from '../../../../__tests__/feature/fapi'; +import { renderWithClerk } from '../../../../__tests__/feature/render'; +import { MosaicLocalizationProvider, resolveLocalization } from '../../../../localization'; import { OrganizationProfileMembersPanel } from '../organization-profile-members-panel'; const organization = fapiOrganization({ id: 'org_1', name: 'Acme' }); diff --git a/packages/mosaic/src/features/organization-profile/__tests__/organization-profile-requests.feature.test.tsx b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/__tests__/organization-profile-requests.feature.test.tsx similarity index 98% rename from packages/mosaic/src/features/organization-profile/__tests__/organization-profile-requests.feature.test.tsx rename to packages/mosaic/src/features/organization-profile/organization-profile-members-panel/__tests__/organization-profile-requests.feature.test.tsx index 91515e0da59..f137ea17d69 100644 --- a/packages/mosaic/src/features/organization-profile/__tests__/organization-profile-requests.feature.test.tsx +++ b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/__tests__/organization-profile-requests.feature.test.tsx @@ -3,7 +3,7 @@ import { act, screen, waitFor, within } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { describe, expect, it } from 'vitest'; -import { holdRequests, serveFapi } from '../../../__tests__/feature/fake-fapi'; +import { holdRequests, serveFapi } from '../../../../__tests__/feature/fake-fapi'; import { fapiClient, fapiEnvironment, @@ -11,8 +11,8 @@ import { fapiOrganization, fapiSession, fapiUser, -} from '../../../__tests__/feature/fapi'; -import { renderWithClerk } from '../../../__tests__/feature/render'; +} from '../../../../__tests__/feature/fapi'; +import { renderWithClerk } from '../../../../__tests__/feature/render'; import { OrganizationProfileMembersPanel } from '../organization-profile-members-panel'; const organization = fapiOrganization({ id: 'org_requests', name: 'Acme' }); diff --git a/packages/mosaic/src/features/organization-profile/__tests__/requests-table-tab.view.test.tsx b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/__tests__/requests-table-tab.view.test.tsx similarity index 98% rename from packages/mosaic/src/features/organization-profile/__tests__/requests-table-tab.view.test.tsx rename to packages/mosaic/src/features/organization-profile/organization-profile-members-panel/__tests__/requests-table-tab.view.test.tsx index 8344e134755..f95c5dd4634 100644 --- a/packages/mosaic/src/features/organization-profile/__tests__/requests-table-tab.view.test.tsx +++ b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/__tests__/requests-table-tab.view.test.tsx @@ -2,8 +2,8 @@ import { act, render, screen, waitFor, within } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { afterEach, describe, expect, it, vi } from 'vitest'; -import { deferred } from '../../../__tests__/async'; -import { MosaicProvider } from '../../../mosaic-provider'; +import { deferred } from '../../../../__tests__/async'; +import { MosaicProvider } from '../../../../mosaic-provider'; import type { RequestsTableTabViewProps } from '../requests-table-tab.types'; import { RequestsTableTabView } from '../requests-table-tab.view'; diff --git a/packages/mosaic/src/features/organization-profile/invitations-table-tab.controller.ts b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/invitations-table-tab.controller.ts similarity index 86% rename from packages/mosaic/src/features/organization-profile/invitations-table-tab.controller.ts rename to packages/mosaic/src/features/organization-profile/organization-profile-members-panel/invitations-table-tab.controller.ts index d139c977aab..1942999e2d9 100644 --- a/packages/mosaic/src/features/organization-profile/invitations-table-tab.controller.ts +++ b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/invitations-table-tab.controller.ts @@ -1,9 +1,9 @@ import { useRef } from 'react'; -import { useConfirmController } from '../../blocks/confirm'; -import { useListRemovalFocus } from '../../hooks/use-list-removal-focus'; -import { useLocale, useMessages } from '../../localization'; -import { formatDate } from '../../utils/format-date'; +import { useConfirmController } from '../../../blocks/confirm'; +import { useListRemovalFocus } from '../../../hooks/use-list-removal-focus'; +import { useLocale, useMessages } from '../../../localization'; +import { formatDate } from '../../../utils/format-date'; import type { useInvitationsTableModel } from './invitations-table-tab.model'; import type { InvitationsTableTabViewProps, OrganizationProfileInvitation } from './invitations-table-tab.types'; diff --git a/packages/mosaic/src/features/organization-profile/invitations-table-tab.messages.ts b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/invitations-table-tab.messages.ts similarity index 100% rename from packages/mosaic/src/features/organization-profile/invitations-table-tab.messages.ts rename to packages/mosaic/src/features/organization-profile/organization-profile-members-panel/invitations-table-tab.messages.ts diff --git a/packages/mosaic/src/features/organization-profile/invitations-table-tab.model.ts b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/invitations-table-tab.model.ts similarity index 98% rename from packages/mosaic/src/features/organization-profile/invitations-table-tab.model.ts rename to packages/mosaic/src/features/organization-profile/organization-profile-members-panel/invitations-table-tab.model.ts index 9ead312ee98..a3b7872ad39 100644 --- a/packages/mosaic/src/features/organization-profile/invitations-table-tab.model.ts +++ b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/invitations-table-tab.model.ts @@ -2,7 +2,7 @@ import { ClerkRuntimeError, isClerkAPIResponseError } from '@clerk/shared/error' import { useClerk, useOrganization, useSession } from '@clerk/shared/react'; import type { ClerkAPIError, OrganizationInvitationResource } from '@clerk/shared/types'; -import { save } from '../../utils/errors'; +import { save } from '../../../utils/errors'; import type { MembersRoles } from './members-table-tab.types'; const PAGE_SIZE = 10; diff --git a/packages/mosaic/src/features/organization-profile/invitations-table-tab.types.ts b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/invitations-table-tab.types.ts similarity index 86% rename from packages/mosaic/src/features/organization-profile/invitations-table-tab.types.ts rename to packages/mosaic/src/features/organization-profile/organization-profile-members-panel/invitations-table-tab.types.ts index ae1581b5402..6c55f9cd3e9 100644 --- a/packages/mosaic/src/features/organization-profile/invitations-table-tab.types.ts +++ b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/invitations-table-tab.types.ts @@ -1,7 +1,7 @@ import type { MouseEventHandler, Ref } from 'react'; -import type { ConfirmController } from '../../blocks/confirm'; -import type { DialogFocusTarget } from '../../components/dialog'; +import type { ConfirmController } from '../../../blocks/confirm'; +import type { DialogFocusTarget } from '../../../components/dialog'; export interface OrganizationProfileInvitation { id: string; diff --git a/packages/mosaic/src/features/organization-profile/invitations-table-tab.view.tsx b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/invitations-table-tab.view.tsx similarity index 89% rename from packages/mosaic/src/features/organization-profile/invitations-table-tab.view.tsx rename to packages/mosaic/src/features/organization-profile/organization-profile-members-panel/invitations-table-tab.view.tsx index db056e95bf3..c4180f234e9 100644 --- a/packages/mosaic/src/features/organization-profile/invitations-table-tab.view.tsx +++ b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/invitations-table-tab.view.tsx @@ -1,20 +1,20 @@ import * as stylex from '@stylexjs/stylex'; import type { Ref } from 'react'; -import { Confirmation } from '../../blocks/confirmation'; -import { ActionMenu } from '../../components/action-menu'; -import { Avatar } from '../../components/avatar'; -import { Button } from '../../components/button'; -import { EmptyState } from '../../components/empty-state'; -import { Icon } from '../../components/icon'; -import { Item } from '../../components/item'; -import { Pagination } from '../../components/pagination'; -import { Spinner } from '../../components/spinner'; -import { Table } from '../../components/table'; -import { VisuallyHidden } from '../../components/visually-hidden'; -import { useServerDataTable } from '../../hooks/use-server-data-table'; -import { fill, useMessages } from '../../localization'; -import { mergeStyleProps, themeProps } from '../../props'; +import { Confirmation } from '../../../blocks/confirmation'; +import { ActionMenu } from '../../../components/action-menu'; +import { Avatar } from '../../../components/avatar'; +import { Button } from '../../../components/button'; +import { EmptyState } from '../../../components/empty-state'; +import { Icon } from '../../../components/icon'; +import { Item } from '../../../components/item'; +import { Pagination } from '../../../components/pagination'; +import { Spinner } from '../../../components/spinner'; +import { Table } from '../../../components/table'; +import { VisuallyHidden } from '../../../components/visually-hidden'; +import { useServerDataTable } from '../../../hooks/use-server-data-table'; +import { fill, useMessages } from '../../../localization'; +import { mergeStyleProps, themeProps } from '../../../props'; import type { InvitationsTableTabViewProps, OrganizationProfileInvitation } from './invitations-table-tab.types'; import { tableTabStyles } from './table-tab.styles'; diff --git a/packages/mosaic/src/features/organization-profile/members-table-tab.controller.ts b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/members-table-tab.controller.ts similarity index 86% rename from packages/mosaic/src/features/organization-profile/members-table-tab.controller.ts rename to packages/mosaic/src/features/organization-profile/organization-profile-members-panel/members-table-tab.controller.ts index b7045067c5e..f40033df291 100644 --- a/packages/mosaic/src/features/organization-profile/members-table-tab.controller.ts +++ b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/members-table-tab.controller.ts @@ -1,11 +1,11 @@ import { useRef, useState } from 'react'; -import { useConfirmController } from '../../blocks/confirm'; -import { useDebouncedAsync } from '../../hooks/use-debounced-async'; -import { useListRemovalFocus } from '../../hooks/use-list-removal-focus'; -import { usePendingAction } from '../../hooks/use-pending-action'; -import { useLocale, useMessages } from '../../localization'; -import { formatDate } from '../../utils/format-date'; +import { useConfirmController } from '../../../blocks/confirm'; +import { useDebouncedAsync } from '../../../hooks/use-debounced-async'; +import { useListRemovalFocus } from '../../../hooks/use-list-removal-focus'; +import { usePendingAction } from '../../../hooks/use-pending-action'; +import { useLocale, useMessages } from '../../../localization'; +import { formatDate } from '../../../utils/format-date'; import type { useMembersTableModel } from './members-table-tab.model'; import type { MembersRoles, OrganizationProfileMember } from './members-table-tab.types'; import { canManageMember } from './members-table-tab.utils'; diff --git a/packages/mosaic/src/features/organization-profile/members-table-tab.messages.ts b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/members-table-tab.messages.ts similarity index 100% rename from packages/mosaic/src/features/organization-profile/members-table-tab.messages.ts rename to packages/mosaic/src/features/organization-profile/organization-profile-members-panel/members-table-tab.messages.ts diff --git a/packages/mosaic/src/features/organization-profile/members-table-tab.model.ts b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/members-table-tab.model.ts similarity index 100% rename from packages/mosaic/src/features/organization-profile/members-table-tab.model.ts rename to packages/mosaic/src/features/organization-profile/organization-profile-members-panel/members-table-tab.model.ts diff --git a/packages/mosaic/src/features/organization-profile/members-table-tab.styles.ts b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/members-table-tab.styles.ts similarity index 100% rename from packages/mosaic/src/features/organization-profile/members-table-tab.styles.ts rename to packages/mosaic/src/features/organization-profile/organization-profile-members-panel/members-table-tab.styles.ts diff --git a/packages/mosaic/src/features/organization-profile/members-table-tab.types.ts b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/members-table-tab.types.ts similarity index 91% rename from packages/mosaic/src/features/organization-profile/members-table-tab.types.ts rename to packages/mosaic/src/features/organization-profile/organization-profile-members-panel/members-table-tab.types.ts index bef0e5c927b..6318013d129 100644 --- a/packages/mosaic/src/features/organization-profile/members-table-tab.types.ts +++ b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/members-table-tab.types.ts @@ -1,8 +1,8 @@ import type { RoleResource } from '@clerk/shared/types'; import type { MouseEventHandler, Ref } from 'react'; -import type { ConfirmController } from '../../blocks/confirm'; -import type { DialogFocusTarget } from '../../components/dialog'; +import type { ConfirmController } from '../../../blocks/confirm'; +import type { DialogFocusTarget } from '../../../components/dialog'; export type MemberRole = Pick; diff --git a/packages/mosaic/src/features/organization-profile/members-table-tab.utils.ts b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/members-table-tab.utils.ts similarity index 100% rename from packages/mosaic/src/features/organization-profile/members-table-tab.utils.ts rename to packages/mosaic/src/features/organization-profile/organization-profile-members-panel/members-table-tab.utils.ts diff --git a/packages/mosaic/src/features/organization-profile/members-table-tab.view.tsx b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/members-table-tab.view.tsx similarity index 91% rename from packages/mosaic/src/features/organization-profile/members-table-tab.view.tsx rename to packages/mosaic/src/features/organization-profile/organization-profile-members-panel/members-table-tab.view.tsx index a2de57990ba..a64d6235cbb 100644 --- a/packages/mosaic/src/features/organization-profile/members-table-tab.view.tsx +++ b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/members-table-tab.view.tsx @@ -1,23 +1,23 @@ import * as stylex from '@stylexjs/stylex'; import type { Ref } from 'react'; -import { Confirmation } from '../../blocks/confirmation'; -import { ActionMenu } from '../../components/action-menu'; -import { Avatar } from '../../components/avatar'; -import { Badge } from '../../components/badge'; -import { Banner } from '../../components/banner'; -import { Button } from '../../components/button'; -import { EmptyState } from '../../components/empty-state'; -import { Entity } from '../../components/entity'; -import { Icon } from '../../components/icon'; -import { Pagination } from '../../components/pagination'; -import { Select } from '../../components/select'; -import { Spinner } from '../../components/spinner'; -import { Table } from '../../components/table'; -import { VisuallyHidden } from '../../components/visually-hidden'; -import { useServerDataTable } from '../../hooks/use-server-data-table'; -import { fill, useMessages } from '../../localization'; -import { mergeStyleProps, themeProps } from '../../props'; +import { Confirmation } from '../../../blocks/confirmation'; +import { ActionMenu } from '../../../components/action-menu'; +import { Avatar } from '../../../components/avatar'; +import { Badge } from '../../../components/badge'; +import { Banner } from '../../../components/banner'; +import { Button } from '../../../components/button'; +import { EmptyState } from '../../../components/empty-state'; +import { Entity } from '../../../components/entity'; +import { Icon } from '../../../components/icon'; +import { Pagination } from '../../../components/pagination'; +import { Select } from '../../../components/select'; +import { Spinner } from '../../../components/spinner'; +import { Table } from '../../../components/table'; +import { VisuallyHidden } from '../../../components/visually-hidden'; +import { useServerDataTable } from '../../../hooks/use-server-data-table'; +import { fill, useMessages } from '../../../localization'; +import { mergeStyleProps, themeProps } from '../../../props'; import { styles } from './members-table-tab.styles'; import type { MembersTableTabViewProps, OrganizationProfileMember } from './members-table-tab.types'; import { canManageMember } from './members-table-tab.utils'; diff --git a/packages/mosaic/src/features/organization-profile/organization-profile-invite-members.controller.ts b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/organization-profile-invite-members.controller.ts similarity index 94% rename from packages/mosaic/src/features/organization-profile/organization-profile-invite-members.controller.ts rename to packages/mosaic/src/features/organization-profile/organization-profile-members-panel/organization-profile-invite-members.controller.ts index dbd65b809e4..9541ae2c17c 100644 --- a/packages/mosaic/src/features/organization-profile/organization-profile-invite-members.controller.ts +++ b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/organization-profile-invite-members.controller.ts @@ -1,9 +1,9 @@ import type { MouseEvent } from 'react'; import { useRef, useState } from 'react'; -import { useForm } from '../../components/form'; -import { useToastManager } from '../../components/toast'; -import { useMessages } from '../../localization'; +import { useForm } from '../../../components/form'; +import { useToastManager } from '../../../components/toast'; +import { useMessages } from '../../../localization'; import type { InviteMembersInput } from './invitations-table-tab.model'; import type { MembersRoles } from './members-table-tab.types'; import type { OrganizationProfileInviteMembersDialogProps } from './organization-profile-invite-members.dialog'; diff --git a/packages/mosaic/src/features/organization-profile/organization-profile-invite-members.dialog.tsx b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/organization-profile-invite-members.dialog.tsx similarity index 89% rename from packages/mosaic/src/features/organization-profile/organization-profile-invite-members.dialog.tsx rename to packages/mosaic/src/features/organization-profile/organization-profile-members-panel/organization-profile-invite-members.dialog.tsx index 23455b08e07..18690bfd4bf 100644 --- a/packages/mosaic/src/features/organization-profile/organization-profile-invite-members.dialog.tsx +++ b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/organization-profile-invite-members.dialog.tsx @@ -1,15 +1,15 @@ import * as stylex from '@stylexjs/stylex'; import { useId, useRef } from 'react'; -import { Button, SubmitButton } from '../../components/button'; -import { Card } from '../../components/card'; -import type { DialogFocusTarget } from '../../components/dialog'; -import { Dialog } from '../../components/dialog'; -import { Field } from '../../components/field'; -import type { SelectItem } from '../../components/select'; -import { Select } from '../../components/select'; -import { TagInput } from '../../components/tag-input'; -import { fill, useMessages } from '../../localization'; +import { Button, SubmitButton } from '../../../components/button'; +import { Card } from '../../../components/card'; +import type { DialogFocusTarget } from '../../../components/dialog'; +import { Dialog } from '../../../components/dialog'; +import { Field } from '../../../components/field'; +import type { SelectItem } from '../../../components/select'; +import { Select } from '../../../components/select'; +import { TagInput } from '../../../components/tag-input'; +import { fill, useMessages } from '../../../localization'; import { styles } from './organization-profile-invite-members.styles'; const isEmail = (value: string) => /^\S+@\S+\.\S+$/.test(value); diff --git a/packages/mosaic/src/features/organization-profile/organization-profile-invite-members.messages.ts b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/organization-profile-invite-members.messages.ts similarity index 100% rename from packages/mosaic/src/features/organization-profile/organization-profile-invite-members.messages.ts rename to packages/mosaic/src/features/organization-profile/organization-profile-members-panel/organization-profile-invite-members.messages.ts diff --git a/packages/mosaic/src/features/organization-profile/organization-profile-invite-members.styles.ts b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/organization-profile-invite-members.styles.ts similarity index 83% rename from packages/mosaic/src/features/organization-profile/organization-profile-invite-members.styles.ts rename to packages/mosaic/src/features/organization-profile/organization-profile-members-panel/organization-profile-invite-members.styles.ts index 9943797e22b..df3de6041d0 100644 --- a/packages/mosaic/src/features/organization-profile/organization-profile-invite-members.styles.ts +++ b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/organization-profile-invite-members.styles.ts @@ -1,6 +1,6 @@ import * as stylex from '@stylexjs/stylex'; -import { space } from '../../tokens.stylex'; +import { space } from '../../../tokens.stylex'; export const styles = stylex.create({ labelRow: { diff --git a/packages/mosaic/src/features/organization-profile/organization-profile-members-panel.controller.ts b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/organization-profile-members-panel.controller.ts similarity index 86% rename from packages/mosaic/src/features/organization-profile/organization-profile-members-panel.controller.ts rename to packages/mosaic/src/features/organization-profile/organization-profile-members-panel/organization-profile-members-panel.controller.ts index d3dc415a733..7c92025e980 100644 --- a/packages/mosaic/src/features/organization-profile/organization-profile-members-panel.controller.ts +++ b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/organization-profile-members-panel.controller.ts @@ -1,6 +1,6 @@ -import { setup } from '../../machine/setup'; -import type { DoneInvokeEvent } from '../../machine/types'; -import { useMachine } from '../../machine/use-machine'; +import { setup } from '../../../machine/setup'; +import type { DoneInvokeEvent } from '../../../machine/types'; +import { useMachine } from '../../../machine/use-machine'; import type { MembersRoles } from './members-table-tab.types'; interface RolesContext { diff --git a/packages/mosaic/src/features/organization-profile/organization-profile-members-panel.model.ts b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/organization-profile-members-panel.model.ts similarity index 96% rename from packages/mosaic/src/features/organization-profile/organization-profile-members-panel.model.ts rename to packages/mosaic/src/features/organization-profile/organization-profile-members-panel/organization-profile-members-panel.model.ts index a1e8e6c144f..b8b9aed0bbf 100644 --- a/packages/mosaic/src/features/organization-profile/organization-profile-members-panel.model.ts +++ b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/organization-profile-members-panel.model.ts @@ -1,7 +1,7 @@ import { ClerkRuntimeError } from '@clerk/shared/error'; import { useOrganization, useSession } from '@clerk/shared/react'; -import { useMosaicEnvironment } from '../../hooks/use-mosaic-environment'; +import { useMosaicEnvironment } from '../../../hooks/use-mosaic-environment'; import type { MembersRoles } from './members-table-tab.types'; const READ_PERMISSION = 'org:sys_memberships:read'; diff --git a/packages/mosaic/src/features/organization-profile/organization-profile-members-panel.tsx b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/organization-profile-members-panel.tsx similarity index 100% rename from packages/mosaic/src/features/organization-profile/organization-profile-members-panel.tsx rename to packages/mosaic/src/features/organization-profile/organization-profile-members-panel/organization-profile-members-panel.tsx diff --git a/packages/mosaic/src/features/organization-profile/organization-profile-members-panel.view.tsx b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/organization-profile-members-panel.view.tsx similarity index 93% rename from packages/mosaic/src/features/organization-profile/organization-profile-members-panel.view.tsx rename to packages/mosaic/src/features/organization-profile/organization-profile-members-panel/organization-profile-members-panel.view.tsx index fc0a61a2f61..f5e71d4d93d 100644 --- a/packages/mosaic/src/features/organization-profile/organization-profile-members-panel.view.tsx +++ b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/organization-profile-members-panel.view.tsx @@ -1,9 +1,9 @@ import type { MouseEventHandler } from 'react'; -import { Panel } from '../../components/panel'; -import { Tabs } from '../../components/tabs'; -import { useMessages } from '../../localization'; -import { themeProps } from '../../props'; +import { Panel } from '../../../components/panel'; +import { Tabs } from '../../../components/tabs'; +import { useMessages } from '../../../localization'; +import { themeProps } from '../../../props'; import type { InvitationsTableTabViewProps } from './invitations-table-tab.types'; import { InvitationsTableTabView } from './invitations-table-tab.view'; import type { MembersTableTabViewProps } from './members-table-tab.types'; diff --git a/packages/mosaic/src/features/organization-profile/requests-table-tab.controller.ts b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/requests-table-tab.controller.ts similarity index 90% rename from packages/mosaic/src/features/organization-profile/requests-table-tab.controller.ts rename to packages/mosaic/src/features/organization-profile/organization-profile-members-panel/requests-table-tab.controller.ts index 50fc5193c61..c48330e3bd8 100644 --- a/packages/mosaic/src/features/organization-profile/requests-table-tab.controller.ts +++ b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/requests-table-tab.controller.ts @@ -1,8 +1,8 @@ import { useRef } from 'react'; -import { useListRemovalFocus } from '../../hooks/use-list-removal-focus'; -import { useLocale } from '../../localization'; -import { formatDate } from '../../utils/format-date'; +import { useListRemovalFocus } from '../../../hooks/use-list-removal-focus'; +import { useLocale } from '../../../localization'; +import { formatDate } from '../../../utils/format-date'; import type { useRequestsTableModel } from './requests-table-tab.model'; import type { RequestsTableTabViewProps } from './requests-table-tab.types'; diff --git a/packages/mosaic/src/features/organization-profile/requests-table-tab.messages.ts b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/requests-table-tab.messages.ts similarity index 100% rename from packages/mosaic/src/features/organization-profile/requests-table-tab.messages.ts rename to packages/mosaic/src/features/organization-profile/organization-profile-members-panel/requests-table-tab.messages.ts diff --git a/packages/mosaic/src/features/organization-profile/requests-table-tab.model.ts b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/requests-table-tab.model.ts similarity index 100% rename from packages/mosaic/src/features/organization-profile/requests-table-tab.model.ts rename to packages/mosaic/src/features/organization-profile/organization-profile-members-panel/requests-table-tab.model.ts diff --git a/packages/mosaic/src/features/organization-profile/requests-table-tab.styles.ts b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/requests-table-tab.styles.ts similarity index 77% rename from packages/mosaic/src/features/organization-profile/requests-table-tab.styles.ts rename to packages/mosaic/src/features/organization-profile/organization-profile-members-panel/requests-table-tab.styles.ts index 6e171ad565f..076d70cd720 100644 --- a/packages/mosaic/src/features/organization-profile/requests-table-tab.styles.ts +++ b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/requests-table-tab.styles.ts @@ -1,6 +1,6 @@ import * as stylex from '@stylexjs/stylex'; -import { space } from '../../tokens.stylex'; +import { space } from '../../../tokens.stylex'; export const styles = stylex.create({ actions: { gap: space['2'], display: 'flex', justifyContent: 'flex-end' }, diff --git a/packages/mosaic/src/features/organization-profile/requests-table-tab.types.ts b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/requests-table-tab.types.ts similarity index 100% rename from packages/mosaic/src/features/organization-profile/requests-table-tab.types.ts rename to packages/mosaic/src/features/organization-profile/organization-profile-members-panel/requests-table-tab.types.ts diff --git a/packages/mosaic/src/features/organization-profile/requests-table-tab.view.tsx b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/requests-table-tab.view.tsx similarity index 91% rename from packages/mosaic/src/features/organization-profile/requests-table-tab.view.tsx rename to packages/mosaic/src/features/organization-profile/organization-profile-members-panel/requests-table-tab.view.tsx index e527109a9e6..089c083b047 100644 --- a/packages/mosaic/src/features/organization-profile/requests-table-tab.view.tsx +++ b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/requests-table-tab.view.tsx @@ -2,20 +2,20 @@ import * as stylex from '@stylexjs/stylex'; import type { Ref } from 'react'; import { useState } from 'react'; -import { Avatar } from '../../components/avatar'; -import { Button, SubmitButton } from '../../components/button'; -import { EmptyState } from '../../components/empty-state'; -import { Icon } from '../../components/icon'; -import { Item } from '../../components/item'; -import { Pagination } from '../../components/pagination'; -import { Section } from '../../components/section'; -import { Spinner } from '../../components/spinner'; -import { Table } from '../../components/table'; -import { VisuallyHidden } from '../../components/visually-hidden'; -import { usePendingAction } from '../../hooks/use-pending-action'; -import { useServerDataTable } from '../../hooks/use-server-data-table'; -import { fill, useMessages } from '../../localization'; -import { mergeStyleProps, themeProps } from '../../props'; +import { Avatar } from '../../../components/avatar'; +import { Button, SubmitButton } from '../../../components/button'; +import { EmptyState } from '../../../components/empty-state'; +import { Icon } from '../../../components/icon'; +import { Item } from '../../../components/item'; +import { Pagination } from '../../../components/pagination'; +import { Section } from '../../../components/section'; +import { Spinner } from '../../../components/spinner'; +import { Table } from '../../../components/table'; +import { VisuallyHidden } from '../../../components/visually-hidden'; +import { usePendingAction } from '../../../hooks/use-pending-action'; +import { useServerDataTable } from '../../../hooks/use-server-data-table'; +import { fill, useMessages } from '../../../localization'; +import { mergeStyleProps, themeProps } from '../../../props'; import { styles } from './requests-table-tab.styles'; import type { OrganizationProfileRequest, RequestsTableTabViewProps } from './requests-table-tab.types'; import { tableTabStyles } from './table-tab.styles'; diff --git a/packages/mosaic/src/features/organization-profile/table-tab.styles.ts b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/table-tab.styles.ts similarity index 79% rename from packages/mosaic/src/features/organization-profile/table-tab.styles.ts rename to packages/mosaic/src/features/organization-profile/organization-profile-members-panel/table-tab.styles.ts index f7047688fb9..21d61625d86 100644 --- a/packages/mosaic/src/features/organization-profile/table-tab.styles.ts +++ b/packages/mosaic/src/features/organization-profile/organization-profile-members-panel/table-tab.styles.ts @@ -1,6 +1,6 @@ import * as stylex from '@stylexjs/stylex'; -import { space } from '../../tokens.stylex'; +import { space } from '../../../tokens.stylex'; export const tableTabStyles = stylex.create({ root: { diff --git a/packages/mosaic/src/features/organization-profile/organization-profile.model.ts b/packages/mosaic/src/features/organization-profile/organization-profile.model.ts index a593342c3c3..aeae3f9a62d 100644 --- a/packages/mosaic/src/features/organization-profile/organization-profile.model.ts +++ b/packages/mosaic/src/features/organization-profile/organization-profile.model.ts @@ -3,7 +3,7 @@ import { useOrganization } from '@clerk/shared/react'; import { useMosaicEnvironment } from '../../hooks/use-mosaic-environment'; import { useAPIKeysAccess } from '../api-keys/api-keys-table.model'; import type { OrganizationProfilePageId } from './organization-profile.types'; -import { useMembersPanelAccessModel } from './organization-profile-members-panel.model'; +import { useMembersPanelAccessModel } from './organization-profile-members-panel/organization-profile-members-panel.model'; export type OrganizationProfileModel = | { status: 'loading' } diff --git a/packages/mosaic/src/features/organization-profile/organization-profile.tsx b/packages/mosaic/src/features/organization-profile/organization-profile.tsx index 53a9d48c2e3..5d7b17dc8dc 100644 --- a/packages/mosaic/src/features/organization-profile/organization-profile.tsx +++ b/packages/mosaic/src/features/organization-profile/organization-profile.tsx @@ -10,7 +10,7 @@ import type { OrganizationProfileViewProps } from './organization-profile.view'; import { OrganizationProfileView } from './organization-profile.view'; import { OrganizationProfileApiKeysPanel } from './organization-profile-api-keys-panel'; import { OrganizationProfileGeneralPanel } from './organization-profile-general-panel'; -import { OrganizationProfileMembersPanel } from './organization-profile-members-panel'; +import { OrganizationProfileMembersPanel } from './organization-profile-members-panel/organization-profile-members-panel'; /** Everything `` takes: your own pages and their order, the page it opens on, and where leaving the organization lands. */ export interface OrganizationProfileProps diff --git a/packages/mosaic/src/features/user-profile/__tests__/user-profile-security-panel.view.test.tsx b/packages/mosaic/src/features/user-profile/__tests__/user-profile-security-panel.view.test.tsx index 3a7e1a5ebef..82087518ee9 100644 --- a/packages/mosaic/src/features/user-profile/__tests__/user-profile-security-panel.view.test.tsx +++ b/packages/mosaic/src/features/user-profile/__tests__/user-profile-security-panel.view.test.tsx @@ -10,9 +10,9 @@ import type { UserProfileDevice } from '../user-profile-active-devices-section/u import { UserProfileActiveDevicesSectionView } from '../user-profile-active-devices-section/user-profile-active-devices-section.view'; import type { UserProfileMfaSectionViewProps } from '../user-profile-mfa-section/user-profile-mfa-section.view'; import { UserProfileMfaSectionView } from '../user-profile-mfa-section/user-profile-mfa-section.view'; -import type { UserProfilePasskey } from '../user-profile-passkeys-section.view'; -import { UserProfilePasskeysSectionView } from '../user-profile-passkeys-section.view'; import { useUserProfilePasskeysSectionController } from '../user-profile-passkeys-section/user-profile-passkeys-section.controller'; +import type { UserProfilePasskey } from '../user-profile-passkeys-section/user-profile-passkeys-section.view'; +import { UserProfilePasskeysSectionView } from '../user-profile-passkeys-section/user-profile-passkeys-section.view'; import { UserProfileSecurityPanelView } from '../user-profile-security-panel.view'; function ActiveDevices({ diff --git a/packages/mosaic/src/features/user-profile/user-profile-active-devices-section/user-profile-active-devices-section.feature.test.tsx b/packages/mosaic/src/features/user-profile/user-profile-active-devices-section/__tests__/user-profile-active-devices-section.feature.test.tsx similarity index 98% rename from packages/mosaic/src/features/user-profile/user-profile-active-devices-section/user-profile-active-devices-section.feature.test.tsx rename to packages/mosaic/src/features/user-profile/user-profile-active-devices-section/__tests__/user-profile-active-devices-section.feature.test.tsx index 3667533d37d..99b7be89e93 100644 --- a/packages/mosaic/src/features/user-profile/user-profile-active-devices-section/user-profile-active-devices-section.feature.test.tsx +++ b/packages/mosaic/src/features/user-profile/user-profile-active-devices-section/__tests__/user-profile-active-devices-section.feature.test.tsx @@ -11,13 +11,13 @@ import { holdRequests, serveFapi, worker, -} from '../../../__tests__/feature/fake-fapi'; -import { fapiClient, fapiSession, fapiUser } from '../../../__tests__/feature/fapi'; -import { renderWithClerk } from '../../../__tests__/feature/render'; -import { MosaicNowProvider } from '../../../hooks/use-now'; -import { MosaicLocalizationProvider, resolveLocalization } from '../../../localization'; -import { UserProfileSecurityPanelView } from '../user-profile-security-panel.view'; -import { UserProfileActiveDevicesSection } from './user-profile-active-devices-section'; +} from '../../../../__tests__/feature/fake-fapi'; +import { fapiClient, fapiSession, fapiUser } from '../../../../__tests__/feature/fapi'; +import { renderWithClerk } from '../../../../__tests__/feature/render'; +import { MosaicNowProvider } from '../../../../hooks/use-now'; +import { MosaicLocalizationProvider, resolveLocalization } from '../../../../localization'; +import { UserProfileSecurityPanelView } from '../../user-profile-security-panel.view'; +import { UserProfileActiveDevicesSection } from '../user-profile-active-devices-section'; const alice = fapiUser({ id: 'user_1' }); diff --git a/packages/mosaic/src/features/user-profile/__tests__/user-profile-device-actions.test.tsx b/packages/mosaic/src/features/user-profile/user-profile-active-devices-section/__tests__/user-profile-device-actions.test.tsx similarity index 95% rename from packages/mosaic/src/features/user-profile/__tests__/user-profile-device-actions.test.tsx rename to packages/mosaic/src/features/user-profile/user-profile-active-devices-section/__tests__/user-profile-device-actions.test.tsx index e676a5dc937..125d1aefa3e 100644 --- a/packages/mosaic/src/features/user-profile/__tests__/user-profile-device-actions.test.tsx +++ b/packages/mosaic/src/features/user-profile/user-profile-active-devices-section/__tests__/user-profile-device-actions.test.tsx @@ -3,10 +3,10 @@ import { act, render, screen, waitFor, within } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { afterEach, describe, expect, it, vi } from 'vitest'; -import { MosaicProvider } from '../../../mosaic-provider'; -import type { UserProfileDevice } from '../user-profile-active-devices-section/user-profile-active-devices.types'; -import { useUserProfileActiveDevicesController } from '../user-profile-active-devices-section/user-profile-active-devices-section.controller'; -import { UserProfileActiveDevicesSectionView } from '../user-profile-active-devices-section/user-profile-active-devices-section.view'; +import { MosaicProvider } from '../../../../mosaic-provider'; +import type { UserProfileDevice } from '../user-profile-active-devices.types'; +import { useUserProfileActiveDevicesController } from '../user-profile-active-devices-section.controller'; +import { UserProfileActiveDevicesSectionView } from '../user-profile-active-devices-section.view'; const current: UserProfileDevice = { id: 'current', diff --git a/packages/mosaic/src/features/user-profile/user-profile-billing-history-section.styles.ts b/packages/mosaic/src/features/user-profile/user-profile-billing-history-section/user-profile-billing-history-section.styles.ts similarity index 98% rename from packages/mosaic/src/features/user-profile/user-profile-billing-history-section.styles.ts rename to packages/mosaic/src/features/user-profile/user-profile-billing-history-section/user-profile-billing-history-section.styles.ts index 25ff41fa5cf..378fb3fb6bf 100644 --- a/packages/mosaic/src/features/user-profile/user-profile-billing-history-section.styles.ts +++ b/packages/mosaic/src/features/user-profile/user-profile-billing-history-section/user-profile-billing-history-section.styles.ts @@ -1,6 +1,6 @@ import * as stylex from '@stylexjs/stylex'; -import { colorVars, fontWeightVars, radiusVars, space, typeScaleVars } from '../../tokens.stylex'; +import { colorVars, fontWeightVars, radiusVars, space, typeScaleVars } from '../../../tokens.stylex'; export const styles = stylex.create({ actionCell: { diff --git a/packages/mosaic/src/features/user-profile/user-profile-billing-history-section.view.tsx b/packages/mosaic/src/features/user-profile/user-profile-billing-history-section/user-profile-billing-history-section.view.tsx similarity index 95% rename from packages/mosaic/src/features/user-profile/user-profile-billing-history-section.view.tsx rename to packages/mosaic/src/features/user-profile/user-profile-billing-history-section/user-profile-billing-history-section.view.tsx index 5cd04a592d4..6347706d60c 100644 --- a/packages/mosaic/src/features/user-profile/user-profile-billing-history-section.view.tsx +++ b/packages/mosaic/src/features/user-profile/user-profile-billing-history-section/user-profile-billing-history-section.view.tsx @@ -1,11 +1,11 @@ import * as stylex from '@stylexjs/stylex'; -import type { BadgeProps } from '../../components/badge'; -import { Badge } from '../../components/badge'; -import { Button } from '../../components/button'; -import { Icon } from '../../components/icon'; -import { Section } from '../../components/section'; -import { rtl } from '../../styles/rtl.styles'; +import type { BadgeProps } from '../../../components/badge'; +import { Badge } from '../../../components/badge'; +import { Button } from '../../../components/button'; +import { Icon } from '../../../components/icon'; +import { Section } from '../../../components/section'; +import { rtl } from '../../../styles/rtl.styles'; import { styles } from './user-profile-billing-history-section.styles'; export interface UserProfileBillingHistoryItem { diff --git a/packages/mosaic/src/features/user-profile/user-profile-billing-panel.view.tsx b/packages/mosaic/src/features/user-profile/user-profile-billing-panel.view.tsx index 9708349082e..ab504675b11 100644 --- a/packages/mosaic/src/features/user-profile/user-profile-billing-panel.view.tsx +++ b/packages/mosaic/src/features/user-profile/user-profile-billing-panel.view.tsx @@ -5,12 +5,12 @@ import { themeProps } from '../../props'; import type { UserProfileBillingHistoryItem, UserProfileBillingHistoryPagination, -} from './user-profile-billing-history-section.view'; -import { UserProfileBillingHistorySectionView } from './user-profile-billing-history-section.view'; -import type { UserProfilePaymentMethod } from './user-profile-payment-methods-section.view'; -import { UserProfilePaymentMethodsSectionView } from './user-profile-payment-methods-section.view'; -import type { UserProfileSubscription } from './user-profile-subscription-section.view'; -import { UserProfileSubscriptionSectionView } from './user-profile-subscription-section.view'; +} from './user-profile-billing-history-section/user-profile-billing-history-section.view'; +import { UserProfileBillingHistorySectionView } from './user-profile-billing-history-section/user-profile-billing-history-section.view'; +import type { UserProfilePaymentMethod } from './user-profile-payment-methods-section/user-profile-payment-methods-section.view'; +import { UserProfilePaymentMethodsSectionView } from './user-profile-payment-methods-section/user-profile-payment-methods-section.view'; +import type { UserProfileSubscription } from './user-profile-subscription-section/user-profile-subscription-section.view'; +import { UserProfileSubscriptionSectionView } from './user-profile-subscription-section/user-profile-subscription-section.view'; export type { UserProfileBillingHistoryItem, diff --git a/packages/mosaic/src/features/user-profile/user-profile-passkeys-section/__tests__/user-profile-passkeys-section.feature.test.tsx b/packages/mosaic/src/features/user-profile/user-profile-passkeys-section/__tests__/user-profile-passkeys-section.feature.test.tsx index e153acffa12..1b424d48094 100644 --- a/packages/mosaic/src/features/user-profile/user-profile-passkeys-section/__tests__/user-profile-passkeys-section.feature.test.tsx +++ b/packages/mosaic/src/features/user-profile/user-profile-passkeys-section/__tests__/user-profile-passkeys-section.feature.test.tsx @@ -22,10 +22,10 @@ import { } from '../../../../__tests__/feature/fapi'; import { renderWithClerk } from '../../../../__tests__/feature/render'; import { MosaicProvider } from '../../../../mosaic-provider'; -import { UserProfilePasskeysSectionView } from '../../user-profile-passkeys-section.view'; import { UserProfileSecurityPanelView } from '../../user-profile-security-panel.view'; import { UserProfilePasskeysSection } from '../user-profile-passkeys-section'; import { useUserProfilePasskeysModel } from '../user-profile-passkeys-section.model'; +import { UserProfilePasskeysSectionView } from '../user-profile-passkeys-section.view'; function ReadonlyPasskeys() { const model = useUserProfilePasskeysModel(); diff --git a/packages/mosaic/src/features/user-profile/user-profile-passkey-row.view.tsx b/packages/mosaic/src/features/user-profile/user-profile-passkeys-section/user-profile-passkey-row.view.tsx similarity index 86% rename from packages/mosaic/src/features/user-profile/user-profile-passkey-row.view.tsx rename to packages/mosaic/src/features/user-profile/user-profile-passkeys-section/user-profile-passkey-row.view.tsx index e9cdf81b294..279d00cb12d 100644 --- a/packages/mosaic/src/features/user-profile/user-profile-passkey-row.view.tsx +++ b/packages/mosaic/src/features/user-profile/user-profile-passkeys-section/user-profile-passkey-row.view.tsx @@ -1,15 +1,15 @@ import type { Ref } from 'react'; import { useMemo } from 'react'; -import type { ActionMenuAction } from '../../components/action-menu'; -import { ActionMenu } from '../../components/action-menu'; -import { Dialog } from '../../components/dialog'; -import { Icon, IconFrame } from '../../components/icon'; -import { Section } from '../../components/section'; -import { fill, useMessages } from '../../localization'; +import type { ActionMenuAction } from '../../../components/action-menu'; +import { ActionMenu } from '../../../components/action-menu'; +import { Dialog } from '../../../components/dialog'; +import { Icon, IconFrame } from '../../../components/icon'; +import { Section } from '../../../components/section'; +import { fill, useMessages } from '../../../localization'; import { styles } from './user-profile-passkeys-section.styles'; +import type { UserProfilePasskeyNameValidator } from './user-profile-passkeys-section.types'; import type { UserProfilePasskey } from './user-profile-passkeys-section.view'; -import type { UserProfilePasskeyNameValidator } from './user-profile-passkeys-section/user-profile-passkeys-section.types'; import { useUserProfileRenamePasskeyController } from './user-profile-rename-passkey.controller'; import { UserProfileRenamePasskeyDialog } from './user-profile-rename-passkey.dialog'; diff --git a/packages/mosaic/src/features/user-profile/user-profile-passkeys-section/user-profile-passkeys-section.controller.ts b/packages/mosaic/src/features/user-profile/user-profile-passkeys-section/user-profile-passkeys-section.controller.ts index 0e3d471bf6f..664e8ffea2b 100644 --- a/packages/mosaic/src/features/user-profile/user-profile-passkeys-section/user-profile-passkeys-section.controller.ts +++ b/packages/mosaic/src/features/user-profile/user-profile-passkeys-section/user-profile-passkeys-section.controller.ts @@ -5,9 +5,9 @@ import { useListRemovalFocus } from '../../../hooks/use-list-removal-focus'; import { usePendingAction } from '../../../hooks/use-pending-action'; import { useMessages } from '../../../localization'; import type { ReverificationController } from '../../reverification'; -import type { UserProfilePasskeysSectionViewProps } from '../user-profile-passkeys-section.view'; import type { UserProfilePasskeysModel } from './user-profile-passkeys-section.model'; import type { UserProfilePasskey } from './user-profile-passkeys-section.types'; +import type { UserProfilePasskeysSectionViewProps } from './user-profile-passkeys-section.view'; type PasskeysControllerInput = Pick< Extract, diff --git a/packages/mosaic/src/features/user-profile/user-profile-passkeys-section.messages.ts b/packages/mosaic/src/features/user-profile/user-profile-passkeys-section/user-profile-passkeys-section.messages.ts similarity index 100% rename from packages/mosaic/src/features/user-profile/user-profile-passkeys-section.messages.ts rename to packages/mosaic/src/features/user-profile/user-profile-passkeys-section/user-profile-passkeys-section.messages.ts diff --git a/packages/mosaic/src/features/user-profile/user-profile-passkeys-section.styles.ts b/packages/mosaic/src/features/user-profile/user-profile-passkeys-section/user-profile-passkeys-section.styles.ts similarity index 79% rename from packages/mosaic/src/features/user-profile/user-profile-passkeys-section.styles.ts rename to packages/mosaic/src/features/user-profile/user-profile-passkeys-section/user-profile-passkeys-section.styles.ts index 3be114d851b..8d2a9eb203e 100644 --- a/packages/mosaic/src/features/user-profile/user-profile-passkeys-section.styles.ts +++ b/packages/mosaic/src/features/user-profile/user-profile-passkeys-section/user-profile-passkeys-section.styles.ts @@ -1,6 +1,6 @@ import * as stylex from '@stylexjs/stylex'; -import { colorVars, space } from '../../tokens.stylex'; +import { colorVars, space } from '../../../tokens.stylex'; export const styles = stylex.create({ addError: { diff --git a/packages/mosaic/src/features/user-profile/user-profile-passkeys-section/user-profile-passkeys-section.tsx b/packages/mosaic/src/features/user-profile/user-profile-passkeys-section/user-profile-passkeys-section.tsx index d1049940cbe..6e5c583bcec 100644 --- a/packages/mosaic/src/features/user-profile/user-profile-passkeys-section/user-profile-passkeys-section.tsx +++ b/packages/mosaic/src/features/user-profile/user-profile-passkeys-section/user-profile-passkeys-section.tsx @@ -1,10 +1,10 @@ import type { ReactNode } from 'react'; import { useReverificationFlow } from '../../reverification'; -import { UserProfilePasskeysSectionView } from '../user-profile-passkeys-section.view'; import { useUserProfilePasskeysSectionController } from './user-profile-passkeys-section.controller'; import type { UserProfilePasskeysModel } from './user-profile-passkeys-section.model'; import { useUserProfilePasskeysModel } from './user-profile-passkeys-section.model'; +import { UserProfilePasskeysSectionView } from './user-profile-passkeys-section.view'; export interface UserProfilePasskeysSectionProps { fallback?: ReactNode; diff --git a/packages/mosaic/src/features/user-profile/user-profile-passkeys-section.view.tsx b/packages/mosaic/src/features/user-profile/user-profile-passkeys-section/user-profile-passkeys-section.view.tsx similarity index 84% rename from packages/mosaic/src/features/user-profile/user-profile-passkeys-section.view.tsx rename to packages/mosaic/src/features/user-profile/user-profile-passkeys-section/user-profile-passkeys-section.view.tsx index d152d297aaa..06162bf2c50 100644 --- a/packages/mosaic/src/features/user-profile/user-profile-passkeys-section.view.tsx +++ b/packages/mosaic/src/features/user-profile/user-profile-passkeys-section/user-profile-passkeys-section.view.tsx @@ -1,21 +1,18 @@ import type { Ref } from 'react'; -import type { ConfirmController } from '../../blocks/confirm'; -import { Confirmation } from '../../blocks/confirmation'; -import { Button } from '../../components/button'; -import type { DialogFocusTarget } from '../../components/dialog'; -import { Field } from '../../components/field'; -import { Icon } from '../../components/icon'; -import { Section } from '../../components/section'; -import { fill, useMessages } from '../../localization'; +import type { ConfirmController } from '../../../blocks/confirm'; +import { Confirmation } from '../../../blocks/confirmation'; +import { Button } from '../../../components/button'; +import type { DialogFocusTarget } from '../../../components/dialog'; +import { Field } from '../../../components/field'; +import { Icon } from '../../../components/icon'; +import { Section } from '../../../components/section'; +import { fill, useMessages } from '../../../localization'; import { UserProfilePasskeyRowView } from './user-profile-passkey-row.view'; import { styles } from './user-profile-passkeys-section.styles'; -import type { - UserProfilePasskey, - UserProfilePasskeyNameValidator, -} from './user-profile-passkeys-section/user-profile-passkeys-section.types'; +import type { UserProfilePasskey, UserProfilePasskeyNameValidator } from './user-profile-passkeys-section.types'; -export type { UserProfilePasskey } from './user-profile-passkeys-section/user-profile-passkeys-section.types'; +export type { UserProfilePasskey } from './user-profile-passkeys-section.types'; export interface UserProfilePasskeysSectionViewProps { passkeys: UserProfilePasskey[]; diff --git a/packages/mosaic/src/features/user-profile/user-profile-rename-passkey.controller.ts b/packages/mosaic/src/features/user-profile/user-profile-passkeys-section/user-profile-rename-passkey.controller.ts similarity index 86% rename from packages/mosaic/src/features/user-profile/user-profile-rename-passkey.controller.ts rename to packages/mosaic/src/features/user-profile/user-profile-passkeys-section/user-profile-rename-passkey.controller.ts index 80b0e0e4587..d1a1fe3abce 100644 --- a/packages/mosaic/src/features/user-profile/user-profile-rename-passkey.controller.ts +++ b/packages/mosaic/src/features/user-profile/user-profile-passkeys-section/user-profile-rename-passkey.controller.ts @@ -1,11 +1,11 @@ import { useState } from 'react'; -import type { UseFormResult } from '../../components/form'; -import { useForm } from '../../components/form'; +import type { UseFormResult } from '../../../components/form'; +import { useForm } from '../../../components/form'; import type { UserProfilePasskeyNameValidator, UserProfileRenamePasskeyValues, -} from './user-profile-passkeys-section/user-profile-passkeys-section.types'; +} from './user-profile-passkeys-section.types'; interface UserProfileRenamePasskeyControllerOptions { id: string; diff --git a/packages/mosaic/src/features/user-profile/user-profile-rename-passkey.dialog.tsx b/packages/mosaic/src/features/user-profile/user-profile-passkeys-section/user-profile-rename-passkey.dialog.tsx similarity index 84% rename from packages/mosaic/src/features/user-profile/user-profile-rename-passkey.dialog.tsx rename to packages/mosaic/src/features/user-profile/user-profile-passkeys-section/user-profile-rename-passkey.dialog.tsx index f3d1d20aa21..be621864f56 100644 --- a/packages/mosaic/src/features/user-profile/user-profile-rename-passkey.dialog.tsx +++ b/packages/mosaic/src/features/user-profile/user-profile-passkeys-section/user-profile-rename-passkey.dialog.tsx @@ -1,15 +1,15 @@ import { useMergeRefs } from '@floating-ui/react'; import { useRef } from 'react'; -import { Button, SubmitButton } from '../../components/button'; -import { Card } from '../../components/card'; -import type { DialogHandle } from '../../components/dialog'; -import { Dialog } from '../../components/dialog'; -import { Field } from '../../components/field'; -import type { UseFormResult } from '../../components/form'; -import { Input } from '../../components/input'; -import { useMessages } from '../../localization'; -import type { UserProfileRenamePasskeyValues } from './user-profile-passkeys-section/user-profile-passkeys-section.types'; +import { Button, SubmitButton } from '../../../components/button'; +import { Card } from '../../../components/card'; +import type { DialogHandle } from '../../../components/dialog'; +import { Dialog } from '../../../components/dialog'; +import { Field } from '../../../components/field'; +import type { UseFormResult } from '../../../components/form'; +import { Input } from '../../../components/input'; +import { useMessages } from '../../../localization'; +import type { UserProfileRenamePasskeyValues } from './user-profile-passkeys-section.types'; export interface UserProfileRenamePasskeyDialogProps { handle: DialogHandle; diff --git a/packages/mosaic/src/features/user-profile/user-profile-payment-methods-section.view.tsx b/packages/mosaic/src/features/user-profile/user-profile-payment-methods-section/user-profile-payment-methods-section.view.tsx similarity index 88% rename from packages/mosaic/src/features/user-profile/user-profile-payment-methods-section.view.tsx rename to packages/mosaic/src/features/user-profile/user-profile-payment-methods-section/user-profile-payment-methods-section.view.tsx index 08cbd7ad66b..fb2765b57c8 100644 --- a/packages/mosaic/src/features/user-profile/user-profile-payment-methods-section.view.tsx +++ b/packages/mosaic/src/features/user-profile/user-profile-payment-methods-section/user-profile-payment-methods-section.view.tsx @@ -1,10 +1,10 @@ -import type { ActionMenuAction } from '../../components/action-menu'; -import { ActionMenu } from '../../components/action-menu'; -import { Badge } from '../../components/badge'; -import { Button } from '../../components/button'; -import { Icon } from '../../components/icon'; -import { Section } from '../../components/section'; -import { UserProfileProviderIcon } from './user-profile-provider-icon'; +import type { ActionMenuAction } from '../../../components/action-menu'; +import { ActionMenu } from '../../../components/action-menu'; +import { Badge } from '../../../components/badge'; +import { Button } from '../../../components/button'; +import { Icon } from '../../../components/icon'; +import { Section } from '../../../components/section'; +import { UserProfileProviderIcon } from '../user-profile-provider-icon'; export interface UserProfilePaymentMethod { id: string; diff --git a/packages/mosaic/src/features/user-profile/user-profile-subscription-section.view.tsx b/packages/mosaic/src/features/user-profile/user-profile-subscription-section/user-profile-subscription-section.view.tsx similarity index 91% rename from packages/mosaic/src/features/user-profile/user-profile-subscription-section.view.tsx rename to packages/mosaic/src/features/user-profile/user-profile-subscription-section/user-profile-subscription-section.view.tsx index f3b7e5a65f7..a7269115270 100644 --- a/packages/mosaic/src/features/user-profile/user-profile-subscription-section.view.tsx +++ b/packages/mosaic/src/features/user-profile/user-profile-subscription-section/user-profile-subscription-section.view.tsx @@ -1,8 +1,8 @@ import * as stylex from '@stylexjs/stylex'; -import { Button } from '../../components/button'; -import { Section } from '../../components/section'; -import { styles } from './user-profile-billing-panel.styles'; +import { Button } from '../../../components/button'; +import { Section } from '../../../components/section'; +import { styles } from '../user-profile-billing-panel.styles'; export interface UserProfileSubscription { planName: string; diff --git a/packages/mosaic/src/features/user-profile/__tests__/user-profile-web3-wallets-section.feature.test.tsx b/packages/mosaic/src/features/user-profile/user-profile-web3-wallets-section/__tests__/user-profile-web3-wallets-section.feature.test.tsx similarity index 98% rename from packages/mosaic/src/features/user-profile/__tests__/user-profile-web3-wallets-section.feature.test.tsx rename to packages/mosaic/src/features/user-profile/user-profile-web3-wallets-section/__tests__/user-profile-web3-wallets-section.feature.test.tsx index 45166b15bf6..9fb295c71cc 100644 --- a/packages/mosaic/src/features/user-profile/__tests__/user-profile-web3-wallets-section.feature.test.tsx +++ b/packages/mosaic/src/features/user-profile/user-profile-web3-wallets-section/__tests__/user-profile-web3-wallets-section.feature.test.tsx @@ -9,7 +9,7 @@ import { type FakeFapiSeed, holdRequests, serveFapi, -} from '../../../__tests__/feature/fake-fapi'; +} from '../../../../__tests__/feature/fake-fapi'; import { fapiClient, fapiEnterpriseAccount, @@ -18,12 +18,12 @@ import { fapiUser, fapiVerification, fapiWeb3Wallet, -} from '../../../__tests__/feature/fapi'; -import { renderWithClerk } from '../../../__tests__/feature/render'; -import { Dialog } from '../../../components/dialog'; -import { MosaicProvider } from '../../../mosaic-provider'; -import { UserProfileSolanaWalletView } from '../user-profile-web3-wallets-section/user-profile-solana-wallet.view'; -import { UserProfileWeb3WalletsSection } from '../user-profile-web3-wallets-section/user-profile-web3-wallets-section'; +} from '../../../../__tests__/feature/fapi'; +import { renderWithClerk } from '../../../../__tests__/feature/render'; +import { Dialog } from '../../../../components/dialog'; +import { MosaicProvider } from '../../../../mosaic-provider'; +import { UserProfileSolanaWalletView } from '../user-profile-solana-wallet.view'; +import { UserProfileWeb3WalletsSection } from '../user-profile-web3-wallets-section'; describe('Web3 wallets', () => { afterEach(() => vi.unstubAllGlobals()); diff --git a/packages/mosaic/src/localization/registry.ts b/packages/mosaic/src/localization/registry.ts index 762e0927a02..c458b3c2ff8 100644 --- a/packages/mosaic/src/localization/registry.ts +++ b/packages/mosaic/src/localization/registry.ts @@ -1,13 +1,13 @@ import { formMessages } from '../components/form/form.messages'; import { profileMessages } from '../components/profile/profile.messages'; import { apiKeysTableMessages } from '../features/api-keys/api-keys-table.messages'; -import { invitationsTableTabMessages } from '../features/organization-profile/invitations-table-tab.messages'; -import { membersTableTabMessages } from '../features/organization-profile/members-table-tab.messages'; import { organizationProfileMessages } from '../features/organization-profile/organization-profile.messages'; import { organizationProfileDangerSectionMessages } from '../features/organization-profile/organization-profile-danger-section/organization-profile-danger-section.messages'; -import { organizationProfileInviteMembersMessages } from '../features/organization-profile/organization-profile-invite-members.messages'; +import { invitationsTableTabMessages } from '../features/organization-profile/organization-profile-members-panel/invitations-table-tab.messages'; +import { membersTableTabMessages } from '../features/organization-profile/organization-profile-members-panel/members-table-tab.messages'; +import { organizationProfileInviteMembersMessages } from '../features/organization-profile/organization-profile-members-panel/organization-profile-invite-members.messages'; +import { requestsTableTabMessages } from '../features/organization-profile/organization-profile-members-panel/requests-table-tab.messages'; import { organizationProfileProfileSectionMessages } from '../features/organization-profile/organization-profile-profile-section/organization-profile-profile-section.messages'; -import { requestsTableTabMessages } from '../features/organization-profile/requests-table-tab.messages'; import { organizationSwitcherMessages } from '../features/organization-switcher/organization-switcher.messages'; import { reverificationMessages } from '../features/reverification/reverification.messages'; import { userButtonMessages } from '../features/user-button/user-button.messages'; @@ -23,7 +23,7 @@ import { userProfileAddSmsMessages } from '../features/user-profile/user-profile import { userProfileAuthenticatorSetupMessages } from '../features/user-profile/user-profile-mfa-section/user-profile-authenticator-setup.messages'; import { userProfileBackupCodesMessages } from '../features/user-profile/user-profile-mfa-section/user-profile-backup-codes.messages'; import { userProfileMfaMessages } from '../features/user-profile/user-profile-mfa-section/user-profile-mfa-section.messages'; -import { userProfilePasskeysMessages } from '../features/user-profile/user-profile-passkeys-section.messages'; +import { userProfilePasskeysMessages } from '../features/user-profile/user-profile-passkeys-section/user-profile-passkeys-section.messages'; import { userProfilePasswordSectionMessages } from '../features/user-profile/user-profile-password-section/user-profile-password-section.messages'; import { userProfileAddPhoneMessages } from '../features/user-profile/user-profile-phone-section/user-profile-add-phone.messages'; import { userProfileProfileSectionMessages } from '../features/user-profile/user-profile-profile-section/user-profile-profile-section.messages'; diff --git a/packages/mosaic/src/styles/index.ts b/packages/mosaic/src/styles/index.ts index 99619198819..ce58212d69e 100644 --- a/packages/mosaic/src/styles/index.ts +++ b/packages/mosaic/src/styles/index.ts @@ -234,6 +234,6 @@ export { UserProfileMfaSetupView } from '../features/user-profile/user-profile-m export { APIKeysTableView } from '../features/api-keys/api-keys-table.view'; export { UserProfileEnterpriseAccountsSectionView } from '../features/user-profile/user-profile-enterprise-accounts-section/user-profile-enterprise-accounts-section.view'; -export { MembersTableTabView } from '../features/organization-profile/members-table-tab.view'; -export { InvitationsTableTabView } from '../features/organization-profile/invitations-table-tab.view'; -export { RequestsTableTabView } from '../features/organization-profile/requests-table-tab.view'; +export { MembersTableTabView } from '../features/organization-profile/organization-profile-members-panel/members-table-tab.view'; +export { InvitationsTableTabView } from '../features/organization-profile/organization-profile-members-panel/invitations-table-tab.view'; +export { RequestsTableTabView } from '../features/organization-profile/organization-profile-members-panel/requests-table-tab.view'; diff --git a/packages/swingset/src/app/(clerk)/live/organization-profile/organization-profile-members-panel/page.tsx b/packages/swingset/src/app/(clerk)/live/organization-profile/organization-profile-members-panel/page.tsx index a94d54fcc64..735c6f1a93a 100644 --- a/packages/swingset/src/app/(clerk)/live/organization-profile/organization-profile-members-panel/page.tsx +++ b/packages/swingset/src/app/(clerk)/live/organization-profile/organization-profile-members-panel/page.tsx @@ -1,6 +1,6 @@ 'use client'; -import { OrganizationProfileMembersPanel } from '@clerk/mosaic/features/organization-profile/organization-profile-members-panel'; +import { OrganizationProfileMembersPanel } from '@clerk/mosaic/features/organization-profile/organization-profile-members-panel/organization-profile-members-panel'; import { MosaicProvider } from '@clerk/mosaic/mosaic-provider'; import { useOrganization, useUser } from '@clerk/nextjs'; import Link from 'next/link'; diff --git a/packages/swingset/src/stories/fixtures/invitations-table-tab.ts b/packages/swingset/src/stories/fixtures/invitations-table-tab.ts index aab340fc3aa..1b1cbc649cd 100644 --- a/packages/swingset/src/stories/fixtures/invitations-table-tab.ts +++ b/packages/swingset/src/stories/fixtures/invitations-table-tab.ts @@ -2,7 +2,7 @@ import { useConfirmController } from '@clerk/mosaic/blocks/confirm'; import type { InvitationsTableTabViewProps, OrganizationProfileInvitation, -} from '@clerk/mosaic/features/organization-profile/invitations-table-tab.types'; +} from '@clerk/mosaic/features/organization-profile/organization-profile-members-panel/invitations-table-tab.types'; import { useListRemovalFocus } from '@clerk/mosaic/hooks/use-list-removal-focus'; import { useLocale } from '@clerk/mosaic/localization'; import { useRef, useState } from 'react'; diff --git a/packages/swingset/src/stories/fixtures/members-table-tab.ts b/packages/swingset/src/stories/fixtures/members-table-tab.ts index 9781c387841..a2f5c4d5c49 100644 --- a/packages/swingset/src/stories/fixtures/members-table-tab.ts +++ b/packages/swingset/src/stories/fixtures/members-table-tab.ts @@ -2,7 +2,7 @@ import { useConfirmController } from '@clerk/mosaic/blocks/confirm'; import type { MembersTableTabViewProps, OrganizationProfileMember, -} from '@clerk/mosaic/features/organization-profile/members-table-tab.types'; +} from '@clerk/mosaic/features/organization-profile/organization-profile-members-panel/members-table-tab.types'; import { useListRemovalFocus } from '@clerk/mosaic/hooks/use-list-removal-focus'; import { useLocale } from '@clerk/mosaic/localization'; import { useRef, useState } from 'react'; diff --git a/packages/swingset/src/stories/fixtures/organization-profile-invite-members.ts b/packages/swingset/src/stories/fixtures/organization-profile-invite-members.ts index a8574a2011a..6d72fdc0975 100644 --- a/packages/swingset/src/stories/fixtures/organization-profile-invite-members.ts +++ b/packages/swingset/src/stories/fixtures/organization-profile-invite-members.ts @@ -1,5 +1,5 @@ import { useToastManager } from '@clerk/mosaic/components/toast'; -import type { OrganizationProfileInviteMembersDialogProps } from '@clerk/mosaic/features/organization-profile/organization-profile-invite-members.dialog'; +import type { OrganizationProfileInviteMembersDialogProps } from '@clerk/mosaic/features/organization-profile/organization-profile-members-panel/organization-profile-invite-members.dialog'; import { useMessages } from '@clerk/mosaic/localization'; import type { MouseEvent } from 'react'; import { useRef, useState } from 'react'; diff --git a/packages/swingset/src/stories/fixtures/organization-profile.tsx b/packages/swingset/src/stories/fixtures/organization-profile.tsx index 30bd197db6e..bed141fb2d4 100644 --- a/packages/swingset/src/stories/fixtures/organization-profile.tsx +++ b/packages/swingset/src/stories/fixtures/organization-profile.tsx @@ -2,7 +2,7 @@ import { useConfirmController } from '@clerk/mosaic/blocks/confirm'; import type { OrganizationProfileViewProps } from '@clerk/mosaic/features/organization-profile/organization-profile.view'; import { OrganizationProfileDangerSectionView } from '@clerk/mosaic/features/organization-profile/organization-profile-danger-section/organization-profile-danger-section.view'; import { OrganizationProfileGeneralPanelView } from '@clerk/mosaic/features/organization-profile/organization-profile-general-panel.view'; -import { OrganizationProfileMembersPanelView } from '@clerk/mosaic/features/organization-profile/organization-profile-members-panel.view'; +import { OrganizationProfileMembersPanelView } from '@clerk/mosaic/features/organization-profile/organization-profile-members-panel/organization-profile-members-panel.view'; import { OrganizationProfilePlaceholderPanelView } from '@clerk/mosaic/features/organization-profile/organization-profile-placeholder-panel.view'; import type { OrganizationProfileProfileSectionViewProps } from '@clerk/mosaic/features/organization-profile/organization-profile-profile-section/organization-profile-profile-section.view'; import { OrganizationProfileProfileSectionView } from '@clerk/mosaic/features/organization-profile/organization-profile-profile-section/organization-profile-profile-section.view'; diff --git a/packages/swingset/src/stories/fixtures/requests-table-tab.ts b/packages/swingset/src/stories/fixtures/requests-table-tab.ts index b031d6f6174..1f6949be7ea 100644 --- a/packages/swingset/src/stories/fixtures/requests-table-tab.ts +++ b/packages/swingset/src/stories/fixtures/requests-table-tab.ts @@ -1,4 +1,4 @@ -import type { RequestsTableTabViewProps } from '@clerk/mosaic/features/organization-profile/requests-table-tab.types'; +import type { RequestsTableTabViewProps } from '@clerk/mosaic/features/organization-profile/organization-profile-members-panel/requests-table-tab.types'; import { useLocale } from '@clerk/mosaic/localization'; import { useState } from 'react'; diff --git a/packages/swingset/src/stories/fixtures/user-profile-passkeys.ts b/packages/swingset/src/stories/fixtures/user-profile-passkeys.ts index 97e33d11a5a..4418015d1b9 100644 --- a/packages/swingset/src/stories/fixtures/user-profile-passkeys.ts +++ b/packages/swingset/src/stories/fixtures/user-profile-passkeys.ts @@ -1,7 +1,7 @@ import type { UserProfilePasskey, UserProfilePasskeysSectionViewProps, -} from '@clerk/mosaic/features/user-profile/user-profile-passkeys-section.view'; +} from '@clerk/mosaic/features/user-profile/user-profile-passkeys-section/user-profile-passkeys-section.view'; import { useUserProfilePasskeysSectionController } from '@clerk/mosaic/features/user-profile/user-profile-passkeys-section/user-profile-passkeys-section.controller'; import { useRef, useState } from 'react'; diff --git a/packages/swingset/src/stories/fixtures/user-profile.tsx b/packages/swingset/src/stories/fixtures/user-profile.tsx index 08a12d1c11b..3c9dec0c772 100644 --- a/packages/swingset/src/stories/fixtures/user-profile.tsx +++ b/packages/swingset/src/stories/fixtures/user-profile.tsx @@ -14,7 +14,7 @@ import type { import { UserProfileDangerSectionView } from '@clerk/mosaic/features/user-profile/user-profile-danger-section/user-profile-danger-section.view'; import { UserProfileEmailSectionView } from '@clerk/mosaic/features/user-profile/user-profile-email-section/user-profile-email-section.view'; import { UserProfileMfaSectionView } from '@clerk/mosaic/features/user-profile/user-profile-mfa-section/user-profile-mfa-section.view'; -import { UserProfilePasskeysSectionView } from '@clerk/mosaic/features/user-profile/user-profile-passkeys-section.view'; +import { UserProfilePasskeysSectionView } from '@clerk/mosaic/features/user-profile/user-profile-passkeys-section/user-profile-passkeys-section.view'; import { UserProfilePasswordSectionView } from '@clerk/mosaic/features/user-profile/user-profile-password-section/user-profile-password-section.view'; import { UserProfilePhoneSectionView } from '@clerk/mosaic/features/user-profile/user-profile-phone-section/user-profile-phone-section.view'; import { UserProfileProfilePanelView } from '@clerk/mosaic/features/user-profile/user-profile-profile-panel.view'; diff --git a/packages/swingset/src/stories/organization-profile-members-panel.stories.tsx b/packages/swingset/src/stories/organization-profile-members-panel.stories.tsx index 4c3f3ec2dd9..fdc4df0277a 100644 --- a/packages/swingset/src/stories/organization-profile-members-panel.stories.tsx +++ b/packages/swingset/src/stories/organization-profile-members-panel.stories.tsx @@ -1,4 +1,4 @@ -import { OrganizationProfileMembersPanelView } from '@clerk/mosaic/features/organization-profile/organization-profile-members-panel.view'; +import { OrganizationProfileMembersPanelView } from '@clerk/mosaic/features/organization-profile/organization-profile-members-panel/organization-profile-members-panel.view'; import type { StoryMeta } from '@/lib/types'; @@ -16,7 +16,8 @@ export const meta: StoryMeta = { title: 'OrganizationProfileMembersPanel', label: 'Members panel', navigation: { category: 'Panels' }, - source: 'packages/mosaic/src/features/organization-profile/organization-profile-members-panel.view.tsx', + source: + 'packages/mosaic/src/features/organization-profile/organization-profile-members-panel/organization-profile-members-panel.view.tsx', }; export function Legacy() { diff --git a/packages/swingset/src/stories/user-profile-billing-history-section.stories.tsx b/packages/swingset/src/stories/user-profile-billing-history-section.stories.tsx index b584a1d08b6..10a1fce4cf3 100644 --- a/packages/swingset/src/stories/user-profile-billing-history-section.stories.tsx +++ b/packages/swingset/src/stories/user-profile-billing-history-section.stories.tsx @@ -1,5 +1,5 @@ -import type { UserProfileBillingHistoryItem } from '@clerk/mosaic/features/user-profile/user-profile-billing-history-section.view'; -import { UserProfileBillingHistorySectionView } from '@clerk/mosaic/features/user-profile/user-profile-billing-history-section.view'; +import type { UserProfileBillingHistoryItem } from '@clerk/mosaic/features/user-profile/user-profile-billing-history-section/user-profile-billing-history-section.view'; +import { UserProfileBillingHistorySectionView } from '@clerk/mosaic/features/user-profile/user-profile-billing-history-section/user-profile-billing-history-section.view'; import { useState } from 'react'; import type { StoryMeta } from '@/lib/types'; @@ -12,7 +12,8 @@ export const meta: StoryMeta = { title: 'UserProfileBillingHistorySection', label: 'Billing history', navigation: { category: 'Sections' }, - source: 'packages/mosaic/src/features/user-profile/user-profile-billing-history-section.view.tsx', + source: + 'packages/mosaic/src/features/user-profile/user-profile-billing-history-section/user-profile-billing-history-section.view.tsx', }; const items: UserProfileBillingHistoryItem[] = [ diff --git a/packages/swingset/src/stories/user-profile-passkeys-section.stories.tsx b/packages/swingset/src/stories/user-profile-passkeys-section.stories.tsx index 00a6c1e776e..2ddb771ea0c 100644 --- a/packages/swingset/src/stories/user-profile-passkeys-section.stories.tsx +++ b/packages/swingset/src/stories/user-profile-passkeys-section.stories.tsx @@ -1,4 +1,4 @@ -import { UserProfilePasskeysSectionView } from '@clerk/mosaic/features/user-profile/user-profile-passkeys-section.view'; +import { UserProfilePasskeysSectionView } from '@clerk/mosaic/features/user-profile/user-profile-passkeys-section/user-profile-passkeys-section.view'; import type { ReactElement } from 'react'; import type { StoryMeta } from '@/lib/types'; @@ -14,7 +14,8 @@ export const meta: StoryMeta = { title: 'UserProfilePasskeysSection', label: 'Passkeys', navigation: { category: 'Sections' }, - source: 'packages/mosaic/src/features/user-profile/user-profile-passkeys-section.view.tsx', + source: + 'packages/mosaic/src/features/user-profile/user-profile-passkeys-section/user-profile-passkeys-section.view.tsx', }; function PasskeysExample({ empty = false, failOnce = false }: { empty?: boolean; failOnce?: boolean }): ReactElement { diff --git a/packages/swingset/src/stories/user-profile-payment-methods-section.stories.tsx b/packages/swingset/src/stories/user-profile-payment-methods-section.stories.tsx index 029dd2d382a..3672163cba7 100644 --- a/packages/swingset/src/stories/user-profile-payment-methods-section.stories.tsx +++ b/packages/swingset/src/stories/user-profile-payment-methods-section.stories.tsx @@ -1,5 +1,5 @@ -import type { UserProfilePaymentMethod } from '@clerk/mosaic/features/user-profile/user-profile-payment-methods-section.view'; -import { UserProfilePaymentMethodsSectionView } from '@clerk/mosaic/features/user-profile/user-profile-payment-methods-section.view'; +import type { UserProfilePaymentMethod } from '@clerk/mosaic/features/user-profile/user-profile-payment-methods-section/user-profile-payment-methods-section.view'; +import { UserProfilePaymentMethodsSectionView } from '@clerk/mosaic/features/user-profile/user-profile-payment-methods-section/user-profile-payment-methods-section.view'; import { useState } from 'react'; import type { StoryMeta } from '@/lib/types'; @@ -12,7 +12,8 @@ export const meta: StoryMeta = { title: 'UserProfilePaymentMethodsSection', label: 'Payment methods', navigation: { category: 'Sections' }, - source: 'packages/mosaic/src/features/user-profile/user-profile-payment-methods-section.view.tsx', + source: + 'packages/mosaic/src/features/user-profile/user-profile-payment-methods-section/user-profile-payment-methods-section.view.tsx', }; export function Default() { diff --git a/packages/swingset/src/stories/user-profile-subscription-section.stories.tsx b/packages/swingset/src/stories/user-profile-subscription-section.stories.tsx index 6088d5cb3f6..36936e7eb31 100644 --- a/packages/swingset/src/stories/user-profile-subscription-section.stories.tsx +++ b/packages/swingset/src/stories/user-profile-subscription-section.stories.tsx @@ -1,4 +1,4 @@ -import { UserProfileSubscriptionSectionView } from '@clerk/mosaic/features/user-profile/user-profile-subscription-section.view'; +import { UserProfileSubscriptionSectionView } from '@clerk/mosaic/features/user-profile/user-profile-subscription-section/user-profile-subscription-section.view'; import { useState } from 'react'; import type { StoryMeta } from '@/lib/types'; @@ -11,7 +11,8 @@ export const meta: StoryMeta = { title: 'UserProfileSubscriptionSection', label: 'Subscription', navigation: { category: 'Sections' }, - source: 'packages/mosaic/src/features/user-profile/user-profile-subscription-section.view.tsx', + source: + 'packages/mosaic/src/features/user-profile/user-profile-subscription-section/user-profile-subscription-section.view.tsx', }; export function Default() { From e8c78768bfe4cc9014d68b7e3138e24c095d6a73 Mon Sep 17 00:00:00 2001 From: Alex Carpenter Date: Fri, 16 Oct 2026 12:10:54 -0400 Subject: [PATCH 2/2] fix(mosaic): sort swingset passkeys fixture imports --- packages/swingset/src/stories/fixtures/user-profile-passkeys.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/swingset/src/stories/fixtures/user-profile-passkeys.ts b/packages/swingset/src/stories/fixtures/user-profile-passkeys.ts index 4418015d1b9..18a847a7706 100644 --- a/packages/swingset/src/stories/fixtures/user-profile-passkeys.ts +++ b/packages/swingset/src/stories/fixtures/user-profile-passkeys.ts @@ -1,8 +1,8 @@ +import { useUserProfilePasskeysSectionController } from '@clerk/mosaic/features/user-profile/user-profile-passkeys-section/user-profile-passkeys-section.controller'; import type { UserProfilePasskey, UserProfilePasskeysSectionViewProps, } from '@clerk/mosaic/features/user-profile/user-profile-passkeys-section/user-profile-passkeys-section.view'; -import { useUserProfilePasskeysSectionController } from '@clerk/mosaic/features/user-profile/user-profile-passkeys-section/user-profile-passkeys-section.controller'; import { useRef, useState } from 'react'; import { useChaosFixture } from '@/components/ChaosProvider';