diff --git a/.changeset/mosaic-features-dir.md b/.changeset/mosaic-features-dir.md new file mode 100644 index 00000000000..a845151cc84 --- /dev/null +++ b/.changeset/mosaic-features-dir.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/.claude/skills/mosaic/SKILL.md b/.claude/skills/mosaic/SKILL.md index c876dbb6c20..c4108823c44 100644 --- a/.claude/skills/mosaic/SKILL.md +++ b/.claude/skills/mosaic/SKILL.md @@ -56,7 +56,7 @@ canonical contract for the whole design system — the `--cl-*` tokens, the architecture" section that defines the split. Read it for the _what_; this skill is the _how-to_. -`packages/ui/src/mosaic/user-button/` is the fullest worked example of the split +`packages/ui/src/mosaic/features/user-button/` is the fullest worked example of the split in the repo — model, controller, view, wrapper, types, messages, and a test per layer. Copy from it. diff --git a/.claude/skills/mosaic/references/controllers.md b/.claude/skills/mosaic/references/controllers.md index 44ca61fe4b0..d419af5c5d9 100644 --- a/.claude/skills/mosaic/references/controllers.md +++ b/.claude/skills/mosaic/references/controllers.md @@ -11,8 +11,8 @@ against a fake object instead of a mocked Clerk. Worked examples: -- `packages/ui/src/mosaic/user-button/user-button.controller.tsx` — wraps a model -- `packages/ui/src/mosaic/user-profile/user-profile-delete-section/user-profile-delete-section.controller.ts` +- `packages/ui/src/mosaic/features/user-button/user-button.controller.tsx` — wraps a model +- `packages/ui/src/mosaic/features/user-profile/user-profile-delete-section/user-profile-delete-section.controller.ts` — takes its one effect as a prop See `references/mosaic-architecture.md` → "Controllers" for the layer contract. diff --git a/.claude/skills/mosaic/references/migration.md b/.claude/skills/mosaic/references/migration.md index 1450b616fe6..f41723cdf7c 100644 --- a/.claude/skills/mosaic/references/migration.md +++ b/.claude/skills/mosaic/references/migration.md @@ -3,7 +3,7 @@ Migrating a legacy component means taking logic that was fused into one file and pulling it apart into the model / controller / view layers (see the skill overview and `references/mosaic-architecture.md` → "Flow and data architecture"). -`packages/ui/src/mosaic/user-button/` is the fullest worked example of the +`packages/ui/src/mosaic/features/user-button/` is the fullest worked example of the finished shape. **The core risk this workflow exists to manage:** a legacy component fuses diff --git a/.claude/skills/mosaic/references/models.md b/.claude/skills/mosaic/references/models.md index ff9fca17bb0..8f1106532e7 100644 --- a/.claude/skills/mosaic/references/models.md +++ b/.claude/skills/mosaic/references/models.md @@ -5,7 +5,7 @@ Mosaic flow that may import Clerk hooks or call Clerk resource methods** — the controller (`controllers.md`) and the view (`views.md`) stay Clerk-free, which is what makes both testable without a Clerk fixture. -Worked example: `packages/ui/src/mosaic/user-button/user-button.model.tsx`. See +Worked example: `packages/ui/src/mosaic/features/user-button/user-button.model.tsx`. See `references/mosaic-architecture.md` → "Models" for the layer contract. ## Shape diff --git a/.claude/skills/mosaic/references/testing.md b/.claude/skills/mosaic/references/testing.md index 279ca80adf2..4a56f1e38af 100644 --- a/.claude/skills/mosaic/references/testing.md +++ b/.claude/skills/mosaic/references/testing.md @@ -8,7 +8,7 @@ against plain props. Tests are Vitest + React Testing Library, co-located in `__tests__/` next to the feature and named for the layer they cover. -`packages/ui/src/mosaic/user-button/__tests__/` is the canonical set to copy from: +`packages/ui/src/mosaic/features/user-button/__tests__/` is the canonical set to copy from: | File | Covers | | ---------------------------------- | ----------------------------------------------------------- | diff --git a/packages/swingset/src/lib/registry.ts b/packages/swingset/src/lib/registry.ts index 158e69af818..05fcb700e63 100644 --- a/packages/swingset/src/lib/registry.ts +++ b/packages/swingset/src/lib/registry.ts @@ -588,10 +588,11 @@ export const registry: StoryModule[] = [ userProfileConnectedAccountsSectionModule, userProfileWeb3WalletsSectionModule, userProfileDeleteSectionModule, + // Reverification + reverificationModule, // Blocks — flows assembled from components, wired by the caller's machine. confirmationModule, destructiveModule, - reverificationModule, // Components avatarModule, badgeModule, diff --git a/packages/swingset/src/stories/dialog.component.mdx b/packages/swingset/src/stories/dialog.component.mdx index c4eb6ca4228..40a65eb0a4a 100644 --- a/packages/swingset/src/stories/dialog.component.mdx +++ b/packages/swingset/src/stories/dialog.component.mdx @@ -94,7 +94,7 @@ full example is under [A profile](#a-profile): ```tsx import { Button } from '@clerk/ui/mosaic/components/button'; import { Dialog } from '@clerk/ui/mosaic/components/dialog'; -import { UserProfileView } from '@clerk/ui/mosaic/user-profile/user-profile.view'; +import { UserProfileView } from '@clerk/ui/mosaic/features/user-profile/user-profile.view'; }>Manage account diff --git a/packages/swingset/src/stories/dialog.component.stories.tsx b/packages/swingset/src/stories/dialog.component.stories.tsx index 0bdd486133d..79aaa11910b 100644 --- a/packages/swingset/src/stories/dialog.component.stories.tsx +++ b/packages/swingset/src/stories/dialog.component.stories.tsx @@ -6,7 +6,7 @@ import { createConfirmHandle, Dialog, useConfirmedClose } from '@clerk/ui/mosaic import { Heading } from '@clerk/ui/mosaic/components/heading'; import { Input } from '@clerk/ui/mosaic/components/input'; import { Text } from '@clerk/ui/mosaic/components/text'; -import { UserProfileView } from '@clerk/ui/mosaic/user-profile/user-profile.view'; +import { UserProfileView } from '@clerk/ui/mosaic/features/user-profile/user-profile.view'; import React from 'react'; import type { StoryMeta } from '@/lib/types'; diff --git a/packages/swingset/src/stories/drawer.component.stories.tsx b/packages/swingset/src/stories/drawer.component.stories.tsx index fd4452b24f1..aa8d8b5a8a8 100644 --- a/packages/swingset/src/stories/drawer.component.stories.tsx +++ b/packages/swingset/src/stories/drawer.component.stories.tsx @@ -3,7 +3,7 @@ import { Dialog } from '@clerk/ui/mosaic/components/dialog'; import { Drawer } from '@clerk/ui/mosaic/components/drawer'; import { Heading } from '@clerk/ui/mosaic/components/heading'; import { Text } from '@clerk/ui/mosaic/components/text'; -import { UserProfileView } from '@clerk/ui/mosaic/user-profile/user-profile.view'; +import { UserProfileView } from '@clerk/ui/mosaic/features/user-profile/user-profile.view'; import type { StoryMeta } from '@/lib/types'; diff --git a/packages/swingset/src/stories/fixtures/user-profile-add-phone.ts b/packages/swingset/src/stories/fixtures/user-profile-add-phone.ts index c2908c6716e..ff4de709ad7 100644 --- a/packages/swingset/src/stories/fixtures/user-profile-add-phone.ts +++ b/packages/swingset/src/stories/fixtures/user-profile-add-phone.ts @@ -1,5 +1,5 @@ -import type { UserProfileAccountSectionViewProps } from '@clerk/ui/mosaic/user-profile/user-profile-account-section/user-profile-account-section.view'; -import type { UserProfileAddPhoneDialogProps } from '@clerk/ui/mosaic/user-profile/user-profile-account-section/user-profile-add-phone.dialog'; +import type { UserProfileAccountSectionViewProps } from '@clerk/ui/mosaic/features/user-profile/user-profile-account-section/user-profile-account-section.view'; +import type { UserProfileAddPhoneDialogProps } from '@clerk/ui/mosaic/features/user-profile/user-profile-account-section/user-profile-add-phone.dialog'; interface FixtureOptions { failAt?: UserProfileAddPhoneDialogProps['step']; diff --git a/packages/swingset/src/stories/fixtures/user-profile-edit-name.ts b/packages/swingset/src/stories/fixtures/user-profile-edit-name.ts index 7604e9f09b1..c9abef0bfae 100644 --- a/packages/swingset/src/stories/fixtures/user-profile-edit-name.ts +++ b/packages/swingset/src/stories/fixtures/user-profile-edit-name.ts @@ -1,6 +1,6 @@ -import type { UserProfileFormError } from '@clerk/ui/mosaic/user-profile/user-profile-account-section/user-profile-account-section.types'; -import { UserProfileSaveError } from '@clerk/ui/mosaic/user-profile/user-profile-account-section/user-profile-account-section.types'; -import type { UserProfileEditNameValue } from '@clerk/ui/mosaic/user-profile/user-profile-account-section/user-profile-edit-name.dialog'; +import type { UserProfileFormError } from '@clerk/ui/mosaic/features/user-profile/user-profile-account-section/user-profile-account-section.types'; +import { UserProfileSaveError } from '@clerk/ui/mosaic/features/user-profile/user-profile-account-section/user-profile-account-section.types'; +import type { UserProfileEditNameValue } from '@clerk/ui/mosaic/features/user-profile/user-profile-account-section/user-profile-edit-name.dialog'; import { useState } from 'react'; export interface UserProfileEditNameFixtureOptions { diff --git a/packages/swingset/src/stories/fixtures/user-profile-edit-username.ts b/packages/swingset/src/stories/fixtures/user-profile-edit-username.ts index 83fb0a83da9..27f4e876bf7 100644 --- a/packages/swingset/src/stories/fixtures/user-profile-edit-username.ts +++ b/packages/swingset/src/stories/fixtures/user-profile-edit-username.ts @@ -1,5 +1,5 @@ -import type { UserProfileFormError } from '@clerk/ui/mosaic/user-profile/user-profile-account-section/user-profile-account-section.types'; -import { UserProfileSaveError } from '@clerk/ui/mosaic/user-profile/user-profile-account-section/user-profile-account-section.types'; +import type { UserProfileFormError } from '@clerk/ui/mosaic/features/user-profile/user-profile-account-section/user-profile-account-section.types'; +import { UserProfileSaveError } from '@clerk/ui/mosaic/features/user-profile/user-profile-account-section/user-profile-account-section.types'; import { useState } from 'react'; export interface UserProfileEditUsernameFixtureOptions { diff --git a/packages/swingset/src/stories/fixtures/user-profile.ts b/packages/swingset/src/stories/fixtures/user-profile.ts index f4411466b6d..6de6dfa4197 100644 --- a/packages/swingset/src/stories/fixtures/user-profile.ts +++ b/packages/swingset/src/stories/fixtures/user-profile.ts @@ -1,15 +1,18 @@ -import type { UserProfileViewProps } from '@clerk/ui/mosaic/user-profile/user-profile.view'; -import type { UserProfileAPIKey } from '@clerk/ui/mosaic/user-profile/user-profile-api-keys-panel.view'; +import type { UserProfileViewProps } from '@clerk/ui/mosaic/features/user-profile/user-profile.view'; +import type { UserProfileAPIKey } from '@clerk/ui/mosaic/features/user-profile/user-profile-api-keys-panel.view'; import type { UserProfilePaymentMethod, UserProfileSubscription, -} from '@clerk/ui/mosaic/user-profile/user-profile-billing-panel.view'; -import type { UserProfileEmail, UserProfilePhone } from '@clerk/ui/mosaic/user-profile/user-profile-profile-panel.view'; +} from '@clerk/ui/mosaic/features/user-profile/user-profile-billing-panel.view'; +import type { + UserProfileEmail, + UserProfilePhone, +} from '@clerk/ui/mosaic/features/user-profile/user-profile-profile-panel.view'; import type { UserProfileDevice, UserProfileMfaMethod, UserProfilePasskey, -} from '@clerk/ui/mosaic/user-profile/user-profile-security-panel.view'; +} from '@clerk/ui/mosaic/features/user-profile/user-profile-security-panel.view'; import { useMemo, useState } from 'react'; import { usePreviewImage } from './use-preview-image'; diff --git a/packages/swingset/src/stories/reverification.stories.tsx b/packages/swingset/src/stories/reverification.stories.tsx index d5e42596144..963ee140f48 100644 --- a/packages/swingset/src/stories/reverification.stories.tsx +++ b/packages/swingset/src/stories/reverification.stories.tsx @@ -1,14 +1,14 @@ import { Button } from '@clerk/ui/mosaic/components/button'; import { Card } from '@clerk/ui/mosaic/components/card'; import type { ReverificationMethod, ReverificationStep } from '@clerk/ui/mosaic/features/reverification'; -import { ReverificationBackupCode } from '@clerk/ui/mosaic/features/reverification/panels/reverification-backup-code'; -import { ReverificationHelp } from '@clerk/ui/mosaic/features/reverification/panels/reverification-help'; -import { ReverificationMethodPicker } from '@clerk/ui/mosaic/features/reverification/panels/reverification-method-picker'; -import { ReverificationOTP } from '@clerk/ui/mosaic/features/reverification/panels/reverification-otp'; -import { ReverificationPasskey } from '@clerk/ui/mosaic/features/reverification/panels/reverification-passkey'; -import { ReverificationPassword } from '@clerk/ui/mosaic/features/reverification/panels/reverification-password'; import { otpChannelFor } from '@clerk/ui/mosaic/features/reverification/reverification.utils'; import { ReverificationView } from '@clerk/ui/mosaic/features/reverification/reverification.view'; +import { ReverificationBackupCode } from '@clerk/ui/mosaic/features/reverification/steps/reverification-backup-code'; +import { ReverificationHelp } from '@clerk/ui/mosaic/features/reverification/steps/reverification-help'; +import { ReverificationMethodPicker } from '@clerk/ui/mosaic/features/reverification/steps/reverification-method-picker'; +import { ReverificationOTP } from '@clerk/ui/mosaic/features/reverification/steps/reverification-otp'; +import { ReverificationPasskey } from '@clerk/ui/mosaic/features/reverification/steps/reverification-passkey'; +import { ReverificationPassword } from '@clerk/ui/mosaic/features/reverification/steps/reverification-password'; import { useRef, useState } from 'react'; import type { StoryMeta } from '@/lib/types'; @@ -16,7 +16,7 @@ import type { StoryMeta } from '@/lib/types'; export { default as __source } from './reverification.stories?raw'; export const meta: StoryMeta = { - group: 'Blocks', + group: 'Reverification', status: 'wip', title: 'Reverification', source: 'packages/ui/src/mosaic/features/reverification/reverification.view.tsx', diff --git a/packages/swingset/src/stories/user-button.mdx b/packages/swingset/src/stories/user-button.mdx index 9d0d40f5f59..fcde080d165 100644 --- a/packages/swingset/src/stories/user-button.mdx +++ b/packages/swingset/src/stories/user-button.mdx @@ -34,7 +34,7 @@ that would navigate (Manage, Invite, Create organization, Add account) only clos `UserButtonView` renders trigger and popup from one prop-driven call: ```tsx -import { UserButtonView } from '@clerk/ui/mosaic/user-button/user-button.view'; +import { UserButtonView } from '@clerk/ui/mosaic/features/user-button/user-button.view'; diff --git a/packages/swingset/src/stories/user-button.stories.tsx b/packages/swingset/src/stories/user-button.stories.tsx index 01776179291..c69edb070fd 100644 --- a/packages/swingset/src/stories/user-button.stories.tsx +++ b/packages/swingset/src/stories/user-button.stories.tsx @@ -7,7 +7,7 @@ import { type UserButtonSession, type UserButtonSuggestion, UserButtonView, -} from '@clerk/ui/mosaic/user-button/user-button.view'; +} from '@clerk/ui/mosaic/features/user-button/user-button.view'; import { useEffect, useState } from 'react'; import type { StoryMeta } from '@/lib/types'; @@ -22,7 +22,7 @@ export const meta: StoryMeta = { label: 'User button', status: 'wip', substatus: 'needs wire-up', - source: 'packages/ui/src/mosaic/user-button/user-button.view.tsx', + source: 'packages/ui/src/mosaic/features/user-button/user-button.view.tsx', }; // Accounts wear their own photo. Only the flagship workspace carries the Clerk mark; the rest wear diff --git a/packages/swingset/src/stories/user-profile-account-section.stories.tsx b/packages/swingset/src/stories/user-profile-account-section.stories.tsx index 86c5288a77c..5d554783c2b 100644 --- a/packages/swingset/src/stories/user-profile-account-section.stories.tsx +++ b/packages/swingset/src/stories/user-profile-account-section.stories.tsx @@ -1,10 +1,10 @@ -import type { UserProfileFormError } from '@clerk/ui/mosaic/user-profile/user-profile-account-section/user-profile-account-section.types'; +import type { UserProfileFormError } from '@clerk/ui/mosaic/features/user-profile/user-profile-account-section/user-profile-account-section.types'; import type { UserProfileEmail, UserProfilePhone, -} from '@clerk/ui/mosaic/user-profile/user-profile-account-section/user-profile-account-section.view'; -import { UserProfileAccountSectionView } from '@clerk/ui/mosaic/user-profile/user-profile-account-section/user-profile-account-section.view'; -import type { UserProfileAddPhoneDialogProps } from '@clerk/ui/mosaic/user-profile/user-profile-account-section/user-profile-add-phone.dialog'; +} from '@clerk/ui/mosaic/features/user-profile/user-profile-account-section/user-profile-account-section.view'; +import { UserProfileAccountSectionView } from '@clerk/ui/mosaic/features/user-profile/user-profile-account-section/user-profile-account-section.view'; +import type { UserProfileAddPhoneDialogProps } from '@clerk/ui/mosaic/features/user-profile/user-profile-account-section/user-profile-add-phone.dialog'; import { useState } from 'react'; import type { StoryMeta } from '@/lib/types'; @@ -22,7 +22,8 @@ export const meta: StoryMeta = { title: 'UserProfileAccountSection', label: 'Account', navigation: { category: 'Sections' }, - source: 'packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-account-section.view.tsx', + source: + 'packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-account-section.view.tsx', }; function AccountSection({ diff --git a/packages/swingset/src/stories/user-profile-active-devices-section.stories.tsx b/packages/swingset/src/stories/user-profile-active-devices-section.stories.tsx index dbdaeaeb66a..9b5500e959f 100644 --- a/packages/swingset/src/stories/user-profile-active-devices-section.stories.tsx +++ b/packages/swingset/src/stories/user-profile-active-devices-section.stories.tsx @@ -1,5 +1,5 @@ -import type { UserProfileDevice } from '@clerk/ui/mosaic/user-profile/user-profile-active-devices-section.view'; -import { UserProfileActiveDevicesSectionView } from '@clerk/ui/mosaic/user-profile/user-profile-active-devices-section.view'; +import type { UserProfileDevice } from '@clerk/ui/mosaic/features/user-profile/user-profile-active-devices-section.view'; +import { UserProfileActiveDevicesSectionView } from '@clerk/ui/mosaic/features/user-profile/user-profile-active-devices-section.view'; import { useState } from 'react'; import type { StoryMeta } from '@/lib/types'; @@ -12,7 +12,7 @@ export const meta: StoryMeta = { title: 'UserProfileActiveDevicesSection', label: 'Active devices', navigation: { category: 'Sections' }, - source: 'packages/ui/src/mosaic/user-profile/user-profile-active-devices-section.view.tsx', + source: 'packages/ui/src/mosaic/features/user-profile/user-profile-active-devices-section.view.tsx', }; export function Default() { diff --git a/packages/swingset/src/stories/user-profile-api-keys-panel.stories.tsx b/packages/swingset/src/stories/user-profile-api-keys-panel.stories.tsx index bcc95a6821b..3f2e5c6c73b 100644 --- a/packages/swingset/src/stories/user-profile-api-keys-panel.stories.tsx +++ b/packages/swingset/src/stories/user-profile-api-keys-panel.stories.tsx @@ -1,5 +1,5 @@ -import type { UserProfileAPIKey } from '@clerk/ui/mosaic/user-profile/user-profile-api-keys-panel.view'; -import { UserProfileApiKeysPanelView } from '@clerk/ui/mosaic/user-profile/user-profile-api-keys-panel.view'; +import type { UserProfileAPIKey } from '@clerk/ui/mosaic/features/user-profile/user-profile-api-keys-panel.view'; +import { UserProfileApiKeysPanelView } from '@clerk/ui/mosaic/features/user-profile/user-profile-api-keys-panel.view'; import { useMemo, useState } from 'react'; import type { StoryMeta } from '@/lib/types'; @@ -12,7 +12,7 @@ export const meta: StoryMeta = { title: 'UserProfileApiKeysPanel', label: 'API keys panel', navigation: { category: 'Panels' }, - source: 'packages/ui/src/mosaic/user-profile/user-profile-api-keys-panel.view.tsx', + source: 'packages/ui/src/mosaic/features/user-profile/user-profile-api-keys-panel.view.tsx', }; const initialAPIKeys: UserProfileAPIKey[] = [ 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 095aafcc2be..8d6cddb3c96 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/ui/mosaic/user-profile/user-profile-billing-history-section.view'; -import { UserProfileBillingHistorySectionView } from '@clerk/ui/mosaic/user-profile/user-profile-billing-history-section.view'; +import type { UserProfileBillingHistoryItem } from '@clerk/ui/mosaic/features/user-profile/user-profile-billing-history-section.view'; +import { UserProfileBillingHistorySectionView } from '@clerk/ui/mosaic/features/user-profile/user-profile-billing-history-section.view'; import { useState } from 'react'; import type { StoryMeta } from '@/lib/types'; @@ -12,7 +12,7 @@ export const meta: StoryMeta = { title: 'UserProfileBillingHistorySection', label: 'Billing history', navigation: { category: 'Sections' }, - source: 'packages/ui/src/mosaic/user-profile/user-profile-billing-history-section.view.tsx', + source: 'packages/ui/src/mosaic/features/user-profile/user-profile-billing-history-section.view.tsx', }; const items: UserProfileBillingHistoryItem[] = [ diff --git a/packages/swingset/src/stories/user-profile-billing-panel.stories.tsx b/packages/swingset/src/stories/user-profile-billing-panel.stories.tsx index 3597034da36..8bbe4130ab1 100644 --- a/packages/swingset/src/stories/user-profile-billing-panel.stories.tsx +++ b/packages/swingset/src/stories/user-profile-billing-panel.stories.tsx @@ -2,8 +2,8 @@ import type { UserProfileBillingHistoryItem, UserProfilePaymentMethod, UserProfileSubscription, -} from '@clerk/ui/mosaic/user-profile/user-profile-billing-panel.view'; -import { UserProfileBillingPanelView } from '@clerk/ui/mosaic/user-profile/user-profile-billing-panel.view'; +} from '@clerk/ui/mosaic/features/user-profile/user-profile-billing-panel.view'; +import { UserProfileBillingPanelView } from '@clerk/ui/mosaic/features/user-profile/user-profile-billing-panel.view'; import { useState } from 'react'; import type { StoryMeta } from '@/lib/types'; @@ -16,7 +16,7 @@ export const meta: StoryMeta = { title: 'UserProfileBillingPanel', label: 'Billing panel', navigation: { category: 'Panels' }, - source: 'packages/ui/src/mosaic/user-profile/user-profile-billing-panel.view.tsx', + source: 'packages/ui/src/mosaic/features/user-profile/user-profile-billing-panel.view.tsx', }; const initialSubscription: UserProfileSubscription = { diff --git a/packages/swingset/src/stories/user-profile-connected-accounts-section.stories.tsx b/packages/swingset/src/stories/user-profile-connected-accounts-section.stories.tsx index 03c4aaf3570..41ce1a8260a 100644 --- a/packages/swingset/src/stories/user-profile-connected-accounts-section.stories.tsx +++ b/packages/swingset/src/stories/user-profile-connected-accounts-section.stories.tsx @@ -1,4 +1,4 @@ -import { UserProfileConnectedAccountsSectionView } from '@clerk/ui/mosaic/user-profile/user-profile-connected-accounts-section.view'; +import { UserProfileConnectedAccountsSectionView } from '@clerk/ui/mosaic/features/user-profile/user-profile-connected-accounts-section.view'; import type { StoryMeta } from '@/lib/types'; @@ -10,7 +10,7 @@ export const meta: StoryMeta = { title: 'UserProfileConnectedAccountsSection', label: 'Connected accounts', navigation: { category: 'Sections' }, - source: 'packages/ui/src/mosaic/user-profile/user-profile-connected-accounts-section.view.tsx', + source: 'packages/ui/src/mosaic/features/user-profile/user-profile-connected-accounts-section.view.tsx', }; export function Default() { diff --git a/packages/swingset/src/stories/user-profile-delete-section.stories.tsx b/packages/swingset/src/stories/user-profile-delete-section.stories.tsx index 4790ba74e50..2e82a58cc04 100644 --- a/packages/swingset/src/stories/user-profile-delete-section.stories.tsx +++ b/packages/swingset/src/stories/user-profile-delete-section.stories.tsx @@ -1,4 +1,4 @@ -import { UserProfileDeleteSectionView } from '@clerk/ui/mosaic/user-profile/user-profile-delete-section/user-profile-delete-section.view'; +import { UserProfileDeleteSectionView } from '@clerk/ui/mosaic/features/user-profile/user-profile-delete-section/user-profile-delete-section.view'; import { useState } from 'react'; import type { StoryMeta } from '@/lib/types'; @@ -11,7 +11,8 @@ export const meta: StoryMeta = { title: 'UserProfileDeleteSection', label: 'Danger zone', navigation: { category: 'Sections' }, - source: 'packages/ui/src/mosaic/user-profile/user-profile-delete-section/user-profile-delete-section.view.tsx', + source: + 'packages/ui/src/mosaic/features/user-profile/user-profile-delete-section/user-profile-delete-section.view.tsx', }; // A real delete is a network round trip. Without one the button never renders its pending diff --git a/packages/swingset/src/stories/user-profile-mfa-section.stories.tsx b/packages/swingset/src/stories/user-profile-mfa-section.stories.tsx index dd99535f686..74296624c8b 100644 --- a/packages/swingset/src/stories/user-profile-mfa-section.stories.tsx +++ b/packages/swingset/src/stories/user-profile-mfa-section.stories.tsx @@ -1,5 +1,5 @@ -import type { UserProfileMfaMethod } from '@clerk/ui/mosaic/user-profile/user-profile-mfa-section.view'; -import { UserProfileMfaSectionView } from '@clerk/ui/mosaic/user-profile/user-profile-mfa-section.view'; +import type { UserProfileMfaMethod } from '@clerk/ui/mosaic/features/user-profile/user-profile-mfa-section.view'; +import { UserProfileMfaSectionView } from '@clerk/ui/mosaic/features/user-profile/user-profile-mfa-section.view'; import { useState } from 'react'; import type { StoryMeta } from '@/lib/types'; @@ -12,7 +12,7 @@ export const meta: StoryMeta = { title: 'UserProfileMfaSection', label: '2-step verification', navigation: { category: 'Sections' }, - source: 'packages/ui/src/mosaic/user-profile/user-profile-mfa-section.view.tsx', + source: 'packages/ui/src/mosaic/features/user-profile/user-profile-mfa-section.view.tsx', }; export function Default() { 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 b4d0b392300..571266f1f0d 100644 --- a/packages/swingset/src/stories/user-profile-passkeys-section.stories.tsx +++ b/packages/swingset/src/stories/user-profile-passkeys-section.stories.tsx @@ -1,5 +1,5 @@ -import type { UserProfilePasskey } from '@clerk/ui/mosaic/user-profile/user-profile-passkeys-section.view'; -import { UserProfilePasskeysSectionView } from '@clerk/ui/mosaic/user-profile/user-profile-passkeys-section.view'; +import type { UserProfilePasskey } from '@clerk/ui/mosaic/features/user-profile/user-profile-passkeys-section.view'; +import { UserProfilePasskeysSectionView } from '@clerk/ui/mosaic/features/user-profile/user-profile-passkeys-section.view'; import { useState } from 'react'; import type { StoryMeta } from '@/lib/types'; @@ -12,7 +12,7 @@ export const meta: StoryMeta = { title: 'UserProfilePasskeysSection', label: 'Passkeys', navigation: { category: 'Sections' }, - source: 'packages/ui/src/mosaic/user-profile/user-profile-passkeys-section.view.tsx', + source: 'packages/ui/src/mosaic/features/user-profile/user-profile-passkeys-section.view.tsx', }; export function Default() { diff --git a/packages/swingset/src/stories/user-profile-password-section.stories.tsx b/packages/swingset/src/stories/user-profile-password-section.stories.tsx index ad658594519..bc9b0a27cf7 100644 --- a/packages/swingset/src/stories/user-profile-password-section.stories.tsx +++ b/packages/swingset/src/stories/user-profile-password-section.stories.tsx @@ -1,4 +1,4 @@ -import { UserProfilePasswordSectionView } from '@clerk/ui/mosaic/user-profile/user-profile-password-section.view'; +import { UserProfilePasswordSectionView } from '@clerk/ui/mosaic/features/user-profile/user-profile-password-section.view'; import type { StoryMeta } from '@/lib/types'; @@ -10,7 +10,7 @@ export const meta: StoryMeta = { title: 'UserProfilePasswordSection', label: 'Password', navigation: { category: 'Sections' }, - source: 'packages/ui/src/mosaic/user-profile/user-profile-password-section.view.tsx', + source: 'packages/ui/src/mosaic/features/user-profile/user-profile-password-section.view.tsx', }; export function Default() { 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 2ff047ffaf8..4275021a98d 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/ui/mosaic/user-profile/user-profile-payment-methods-section.view'; -import { UserProfilePaymentMethodsSectionView } from '@clerk/ui/mosaic/user-profile/user-profile-payment-methods-section.view'; +import type { UserProfilePaymentMethod } from '@clerk/ui/mosaic/features/user-profile/user-profile-payment-methods-section.view'; +import { UserProfilePaymentMethodsSectionView } from '@clerk/ui/mosaic/features/user-profile/user-profile-payment-methods-section.view'; import { useState } from 'react'; import type { StoryMeta } from '@/lib/types'; @@ -12,7 +12,7 @@ export const meta: StoryMeta = { title: 'UserProfilePaymentMethodsSection', label: 'Payment methods', navigation: { category: 'Sections' }, - source: 'packages/ui/src/mosaic/user-profile/user-profile-payment-methods-section.view.tsx', + source: 'packages/ui/src/mosaic/features/user-profile/user-profile-payment-methods-section.view.tsx', }; export function Default() { diff --git a/packages/swingset/src/stories/user-profile-profile-panel.mdx b/packages/swingset/src/stories/user-profile-profile-panel.mdx index 79512e48080..1a1b3c30cfe 100644 --- a/packages/swingset/src/stories/user-profile-profile-panel.mdx +++ b/packages/swingset/src/stories/user-profile-profile-panel.mdx @@ -16,7 +16,7 @@ import * as UserProfileProfilePanelStories from './user-profile-profile-panel.st ## Usage ```tsx -import { UserProfileProfilePanelView } from '@clerk/ui/mosaic/user-profile/user-profile-profile-panel.view'; +import { UserProfileProfilePanelView } from '@clerk/ui/mosaic/features/user-profile/user-profile-profile-panel.view'; ) { diff --git a/packages/swingset/src/stories/user-profile-security-panel.stories.tsx b/packages/swingset/src/stories/user-profile-security-panel.stories.tsx index 3878ee58d39..ee6d83edfca 100644 --- a/packages/swingset/src/stories/user-profile-security-panel.stories.tsx +++ b/packages/swingset/src/stories/user-profile-security-panel.stories.tsx @@ -2,8 +2,8 @@ import type { UserProfileDevice, UserProfileMfaMethod, UserProfilePasskey, -} from '@clerk/ui/mosaic/user-profile/user-profile-security-panel.view'; -import { UserProfileSecurityPanelView } from '@clerk/ui/mosaic/user-profile/user-profile-security-panel.view'; +} from '@clerk/ui/mosaic/features/user-profile/user-profile-security-panel.view'; +import { UserProfileSecurityPanelView } from '@clerk/ui/mosaic/features/user-profile/user-profile-security-panel.view'; import { useState } from 'react'; import type { StoryMeta } from '@/lib/types'; @@ -16,7 +16,7 @@ export const meta: StoryMeta = { title: 'UserProfileSecurityPanel', label: 'Security panel', navigation: { category: 'Panels' }, - source: 'packages/ui/src/mosaic/user-profile/user-profile-security-panel.view.tsx', + source: 'packages/ui/src/mosaic/features/user-profile/user-profile-security-panel.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 6f5048c20bf..4a20ac0539f 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/ui/mosaic/user-profile/user-profile-subscription-section.view'; +import { UserProfileSubscriptionSectionView } from '@clerk/ui/mosaic/features/user-profile/user-profile-subscription-section.view'; import { useState } from 'react'; import type { StoryMeta } from '@/lib/types'; @@ -11,7 +11,7 @@ export const meta: StoryMeta = { title: 'UserProfileSubscriptionSection', label: 'Subscription', navigation: { category: 'Sections' }, - source: 'packages/ui/src/mosaic/user-profile/user-profile-subscription-section.view.tsx', + source: 'packages/ui/src/mosaic/features/user-profile/user-profile-subscription-section.view.tsx', }; export function Default() { diff --git a/packages/swingset/src/stories/user-profile-web3-wallets-section.stories.tsx b/packages/swingset/src/stories/user-profile-web3-wallets-section.stories.tsx index 491c2d154f3..faa09ab806d 100644 --- a/packages/swingset/src/stories/user-profile-web3-wallets-section.stories.tsx +++ b/packages/swingset/src/stories/user-profile-web3-wallets-section.stories.tsx @@ -1,4 +1,4 @@ -import { UserProfileWeb3WalletsSectionView } from '@clerk/ui/mosaic/user-profile/user-profile-web3-wallets-section.view'; +import { UserProfileWeb3WalletsSectionView } from '@clerk/ui/mosaic/features/user-profile/user-profile-web3-wallets-section.view'; import type { StoryMeta } from '@/lib/types'; @@ -10,7 +10,7 @@ export const meta: StoryMeta = { title: 'UserProfileWeb3WalletsSection', label: 'Web3 wallets', navigation: { category: 'Sections' }, - source: 'packages/ui/src/mosaic/user-profile/user-profile-web3-wallets-section.view.tsx', + source: 'packages/ui/src/mosaic/features/user-profile/user-profile-web3-wallets-section.view.tsx', }; export function Default() { diff --git a/packages/swingset/src/stories/user-profile.stories.tsx b/packages/swingset/src/stories/user-profile.stories.tsx index e9ab7ba2141..f77e31c7d30 100644 --- a/packages/swingset/src/stories/user-profile.stories.tsx +++ b/packages/swingset/src/stories/user-profile.stories.tsx @@ -1,6 +1,6 @@ import { Button } from '@clerk/ui/mosaic/components/button'; import { Dialog } from '@clerk/ui/mosaic/components/dialog'; -import { UserProfileView } from '@clerk/ui/mosaic/user-profile/user-profile.view'; +import { UserProfileView } from '@clerk/ui/mosaic/features/user-profile/user-profile.view'; import type { StoryMeta } from '@/lib/types'; @@ -14,7 +14,7 @@ export const meta: StoryMeta = { title: 'UserProfile', label: 'User profile', layout: 'wide', - source: 'packages/ui/src/mosaic/user-profile/user-profile.view.tsx', + source: 'packages/ui/src/mosaic/features/user-profile/user-profile.view.tsx', }; /** diff --git a/packages/ui/src/mosaic/features/reverification/reverification.view.tsx b/packages/ui/src/mosaic/features/reverification/reverification.view.tsx index 36b18cb3eae..cab4ef5c3a8 100644 --- a/packages/ui/src/mosaic/features/reverification/reverification.view.tsx +++ b/packages/ui/src/mosaic/features/reverification/reverification.view.tsx @@ -1,14 +1,14 @@ import { Card } from '../../components/card'; import { Flow } from '../../components/flow'; import type { IconName } from '../../icons/registry'; -import { ReverificationBackupCode } from './panels/reverification-backup-code'; -import { ReverificationHelp } from './panels/reverification-help'; -import { ReverificationMethodPicker } from './panels/reverification-method-picker'; -import { ReverificationOTP } from './panels/reverification-otp'; -import { ReverificationPasskey } from './panels/reverification-passkey'; -import { ReverificationPassword } from './panels/reverification-password'; import { fill, reverificationBase as m } from './reverification.messages'; import type { ReverificationMethod, ReverificationOtpChannel, ReverificationViewProps } from './reverification.types'; +import { ReverificationBackupCode } from './steps/reverification-backup-code'; +import { ReverificationHelp } from './steps/reverification-help'; +import { ReverificationMethodPicker } from './steps/reverification-method-picker'; +import { ReverificationOTP } from './steps/reverification-otp'; +import { ReverificationPasskey } from './steps/reverification-passkey'; +import { ReverificationPassword } from './steps/reverification-password'; const actions = { secondaryActionLabel: m.footerActionLink__useAnotherMethod, diff --git a/packages/ui/src/mosaic/features/reverification/panels/reverification-backup-code.tsx b/packages/ui/src/mosaic/features/reverification/steps/reverification-backup-code.tsx similarity index 100% rename from packages/ui/src/mosaic/features/reverification/panels/reverification-backup-code.tsx rename to packages/ui/src/mosaic/features/reverification/steps/reverification-backup-code.tsx diff --git a/packages/ui/src/mosaic/features/reverification/panels/reverification-help.tsx b/packages/ui/src/mosaic/features/reverification/steps/reverification-help.tsx similarity index 100% rename from packages/ui/src/mosaic/features/reverification/panels/reverification-help.tsx rename to packages/ui/src/mosaic/features/reverification/steps/reverification-help.tsx diff --git a/packages/ui/src/mosaic/features/reverification/panels/reverification-method-picker.tsx b/packages/ui/src/mosaic/features/reverification/steps/reverification-method-picker.tsx similarity index 100% rename from packages/ui/src/mosaic/features/reverification/panels/reverification-method-picker.tsx rename to packages/ui/src/mosaic/features/reverification/steps/reverification-method-picker.tsx diff --git a/packages/ui/src/mosaic/features/reverification/panels/reverification-otp.tsx b/packages/ui/src/mosaic/features/reverification/steps/reverification-otp.tsx similarity index 100% rename from packages/ui/src/mosaic/features/reverification/panels/reverification-otp.tsx rename to packages/ui/src/mosaic/features/reverification/steps/reverification-otp.tsx diff --git a/packages/ui/src/mosaic/features/reverification/panels/reverification-passkey.tsx b/packages/ui/src/mosaic/features/reverification/steps/reverification-passkey.tsx similarity index 100% rename from packages/ui/src/mosaic/features/reverification/panels/reverification-passkey.tsx rename to packages/ui/src/mosaic/features/reverification/steps/reverification-passkey.tsx diff --git a/packages/ui/src/mosaic/features/reverification/panels/reverification-password.tsx b/packages/ui/src/mosaic/features/reverification/steps/reverification-password.tsx similarity index 100% rename from packages/ui/src/mosaic/features/reverification/panels/reverification-password.tsx rename to packages/ui/src/mosaic/features/reverification/steps/reverification-password.tsx diff --git a/packages/ui/src/mosaic/user-button/__tests__/user-button.controller.test.tsx b/packages/ui/src/mosaic/features/user-button/__tests__/user-button.controller.test.tsx similarity index 99% rename from packages/ui/src/mosaic/user-button/__tests__/user-button.controller.test.tsx rename to packages/ui/src/mosaic/features/user-button/__tests__/user-button.controller.test.tsx index 726b6ccb56c..bd33beabdbf 100644 --- a/packages/ui/src/mosaic/user-button/__tests__/user-button.controller.test.tsx +++ b/packages/ui/src/mosaic/features/user-button/__tests__/user-button.controller.test.tsx @@ -1,7 +1,7 @@ import { act, fireEvent, render, screen, waitFor } from '@testing-library/react'; import { describe, expect, it, vi } from 'vitest'; -import { deferred, tick } from '../../machines/__tests__/test-utils'; +import { deferred, tick } from '../../../machines/__tests__/test-utils'; import type { UserButtonControllerOptions, UserButtonReadyModel } from '../user-button.controller'; import { useUserButtonController } from '../user-button.controller'; import type { UserButtonModel } from '../user-button.model'; diff --git a/packages/ui/src/mosaic/user-button/__tests__/user-button.integration.test.tsx b/packages/ui/src/mosaic/features/user-button/__tests__/user-button.integration.test.tsx similarity index 99% rename from packages/ui/src/mosaic/user-button/__tests__/user-button.integration.test.tsx rename to packages/ui/src/mosaic/features/user-button/__tests__/user-button.integration.test.tsx index e9b14ca5463..9954506b41c 100644 --- a/packages/ui/src/mosaic/user-button/__tests__/user-button.integration.test.tsx +++ b/packages/ui/src/mosaic/features/user-button/__tests__/user-button.integration.test.tsx @@ -4,7 +4,7 @@ import { act as reactAct, render, screen, waitFor, within } from '@testing-libra import userEvent from '@testing-library/user-event'; import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; -import { MosaicProvider } from '../../MosaicProvider'; +import { MosaicProvider } from '../../../MosaicProvider'; import type { UserButtonProps } from '../user-button'; import { UserButton } from '../user-button'; @@ -96,7 +96,7 @@ vi.mock('@clerk/shared/react', async importOriginal => { // Stubbed at the same seam as the controller test: the in-view helper is the controller's whole // fetch boundary, so `ref` doubles as the assertion that the paging sentinel mounted. -vi.mock('../../../hooks/useOrganizationListInView', () => ({ +vi.mock('../../../../hooks/useOrganizationListInView', () => ({ useOrganizationListInView: () => ({ userMemberships, userInvitations, userSuggestions, ref: pagingRef }), })); diff --git a/packages/ui/src/mosaic/user-button/__tests__/user-button.layout.test.ts b/packages/ui/src/mosaic/features/user-button/__tests__/user-button.layout.test.ts similarity index 100% rename from packages/ui/src/mosaic/user-button/__tests__/user-button.layout.test.ts rename to packages/ui/src/mosaic/features/user-button/__tests__/user-button.layout.test.ts diff --git a/packages/ui/src/mosaic/user-button/__tests__/user-button.model.test.tsx b/packages/ui/src/mosaic/features/user-button/__tests__/user-button.model.test.tsx similarity index 99% rename from packages/ui/src/mosaic/user-button/__tests__/user-button.model.test.tsx rename to packages/ui/src/mosaic/features/user-button/__tests__/user-button.model.test.tsx index 7f4ee1ea062..276a79b3106 100644 --- a/packages/ui/src/mosaic/user-button/__tests__/user-button.model.test.tsx +++ b/packages/ui/src/mosaic/features/user-button/__tests__/user-button.model.test.tsx @@ -4,7 +4,7 @@ import type { CustomPage } from '@clerk/shared/types'; import { act, cleanup, fireEvent, render, renderHook, screen } from '@testing-library/react'; import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; -import { useOrganizationListInView } from '../../../hooks/useOrganizationListInView'; +import { useOrganizationListInView } from '../../../../hooks/useOrganizationListInView'; import type { UserButtonModelOptions } from '../user-button.model'; import { useUserButtonModel } from '../user-button.model'; @@ -106,7 +106,7 @@ vi.mock('@clerk/shared/react', async importOriginal => { // The model reads its three paginated lists through the shared in-view helper, so the fetch // boundary is stubbed there rather than at `useOrganizationList`. -vi.mock('../../../hooks/useOrganizationListInView', () => ({ +vi.mock('../../../../hooks/useOrganizationListInView', () => ({ useOrganizationListInView: vi.fn(() => ({ userMemberships, userInvitations, userSuggestions, ref: pagingRef })), })); diff --git a/packages/ui/src/mosaic/user-button/__tests__/user-button.pages.test.tsx b/packages/ui/src/mosaic/features/user-button/__tests__/user-button.pages.test.tsx similarity index 100% rename from packages/ui/src/mosaic/user-button/__tests__/user-button.pages.test.tsx rename to packages/ui/src/mosaic/features/user-button/__tests__/user-button.pages.test.tsx diff --git a/packages/ui/src/mosaic/user-button/__tests__/user-button.test.tsx b/packages/ui/src/mosaic/features/user-button/__tests__/user-button.test.tsx similarity index 100% rename from packages/ui/src/mosaic/user-button/__tests__/user-button.test.tsx rename to packages/ui/src/mosaic/features/user-button/__tests__/user-button.test.tsx diff --git a/packages/ui/src/mosaic/user-button/__tests__/user-button.view.test.tsx b/packages/ui/src/mosaic/features/user-button/__tests__/user-button.view.test.tsx similarity index 99% rename from packages/ui/src/mosaic/user-button/__tests__/user-button.view.test.tsx rename to packages/ui/src/mosaic/features/user-button/__tests__/user-button.view.test.tsx index e2fbecf1ac4..c42c24c7ff8 100644 --- a/packages/ui/src/mosaic/user-button/__tests__/user-button.view.test.tsx +++ b/packages/ui/src/mosaic/features/user-button/__tests__/user-button.view.test.tsx @@ -3,8 +3,8 @@ import { render, screen, waitFor, within } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { describe, expect, it, vi } from 'vitest'; -import { scrollAreaViewport } from '../../components/scroll-area'; -import { MosaicProvider } from '../../MosaicProvider'; +import { scrollAreaViewport } from '../../../components/scroll-area'; +import { MosaicProvider } from '../../../MosaicProvider'; import type { UserButtonProps } from '../user-button.view'; import { userButtonBusyKeys, UserButtonView } from '../user-button.view'; diff --git a/packages/ui/src/mosaic/user-button/user-button.controller.tsx b/packages/ui/src/mosaic/features/user-button/user-button.controller.tsx similarity index 98% rename from packages/ui/src/mosaic/user-button/user-button.controller.tsx rename to packages/ui/src/mosaic/features/user-button/user-button.controller.tsx index e91242cc9ff..9af27e07bc0 100644 --- a/packages/ui/src/mosaic/user-button/user-button.controller.tsx +++ b/packages/ui/src/mosaic/features/user-button/user-button.controller.tsx @@ -1,6 +1,6 @@ -import { useSpinDelay } from '../hooks/useSpinDelay'; -import { setup } from '../machine/setup'; -import { useMachine } from '../machine/useMachine'; +import { useSpinDelay } from '../../hooks/useSpinDelay'; +import { setup } from '../../machine/setup'; +import { useMachine } from '../../machine/useMachine'; import type { UserButtonModel } from './user-button.model'; import type { UserButtonMenuProps, UserButtonModeProps } from './user-button.types'; import type { UserButtonProps as UserButtonViewProps, UserButtonTriggerProps } from './user-button.view'; diff --git a/packages/ui/src/mosaic/user-button/user-button.layout.ts b/packages/ui/src/mosaic/features/user-button/user-button.layout.ts similarity index 100% rename from packages/ui/src/mosaic/user-button/user-button.layout.ts rename to packages/ui/src/mosaic/features/user-button/user-button.layout.ts diff --git a/packages/ui/src/mosaic/user-button/user-button.messages.ts b/packages/ui/src/mosaic/features/user-button/user-button.messages.ts similarity index 100% rename from packages/ui/src/mosaic/user-button/user-button.messages.ts rename to packages/ui/src/mosaic/features/user-button/user-button.messages.ts diff --git a/packages/ui/src/mosaic/user-button/user-button.model.tsx b/packages/ui/src/mosaic/features/user-button/user-button.model.tsx similarity index 97% rename from packages/ui/src/mosaic/user-button/user-button.model.tsx rename to packages/ui/src/mosaic/features/user-button/user-button.model.tsx index 20404039508..bf455e13dac 100644 --- a/packages/ui/src/mosaic/user-button/user-button.model.tsx +++ b/packages/ui/src/mosaic/features/user-button/user-button.model.tsx @@ -3,10 +3,10 @@ import { getFullName, getIdentifier } from '@clerk/shared/internal/clerk-js/user import { useClerk, useOrganization, usePortalRoot, useSession, useUser } from '@clerk/shared/react'; import type { CustomPage, OrganizationResource, UserResource } from '@clerk/shared/types'; -import { populateParamFromObject } from '../../contexts/utils'; -import { useOrganizationListInView } from '../../hooks/useOrganizationListInView'; -import { useMosaicEnvironment } from '../hooks/useMosaicEnvironment'; -import { useMosaicRouter } from '../hooks/useMosaicRouter'; +import { populateParamFromObject } from '../../../contexts/utils'; +import { useOrganizationListInView } from '../../../hooks/useOrganizationListInView'; +import { useMosaicEnvironment } from '../../hooks/useMosaicEnvironment'; +import { useMosaicRouter } from '../../hooks/useMosaicRouter'; import type { UserButtonBrandingProps, UserButtonCallbacks, diff --git a/packages/ui/src/mosaic/user-button/user-button.pages.tsx b/packages/ui/src/mosaic/features/user-button/user-button.pages.tsx similarity index 97% rename from packages/ui/src/mosaic/user-button/user-button.pages.tsx rename to packages/ui/src/mosaic/features/user-button/user-button.pages.tsx index 644554b45c3..04ab2c2f400 100644 --- a/packages/ui/src/mosaic/user-button/user-button.pages.tsx +++ b/packages/ui/src/mosaic/features/user-button/user-button.pages.tsx @@ -8,10 +8,10 @@ import type { ReactNode } from 'react'; import { useCallback, useState } from 'react'; import { createPortal } from 'react-dom'; -import { useMosaicEnvironment } from '../hooks/useMosaicEnvironment'; +import { useMosaicEnvironment } from '../../hooks/useMosaicEnvironment'; +import { applyOrder } from '../../utils/apply-order'; import { USER_PROFILE_PAGE_IDS } from '../user-profile/user-profile.layout'; import type { CustomProfileItem, CustomProfileLink, UserProfilePageId } from '../user-profile/user-profile.types'; -import { applyOrder } from '../utils/apply-order'; /** * The UserProfile's own pages, in the order it lists them, minus the ones this instance has turned diff --git a/packages/ui/src/mosaic/user-button/user-button.styles.ts b/packages/ui/src/mosaic/features/user-button/user-button.styles.ts similarity index 97% rename from packages/ui/src/mosaic/user-button/user-button.styles.ts rename to packages/ui/src/mosaic/features/user-button/user-button.styles.ts index 7d81aa99f12..014eac50007 100644 --- a/packages/ui/src/mosaic/user-button/user-button.styles.ts +++ b/packages/ui/src/mosaic/features/user-button/user-button.styles.ts @@ -1,6 +1,6 @@ import * as stylex from '@stylexjs/stylex'; -import { colorVars, durationVars, fontWeightVars, radiusVars, space, typeScaleVars } from '../tokens.stylex'; +import { colorVars, durationVars, fontWeightVars, radiusVars, space, typeScaleVars } from '../../tokens.stylex'; export const styles = stylex.create({ accountIdentifier: { diff --git a/packages/ui/src/mosaic/user-button/user-button.tsx b/packages/ui/src/mosaic/features/user-button/user-button.tsx similarity index 100% rename from packages/ui/src/mosaic/user-button/user-button.tsx rename to packages/ui/src/mosaic/features/user-button/user-button.tsx diff --git a/packages/ui/src/mosaic/user-button/user-button.types.ts b/packages/ui/src/mosaic/features/user-button/user-button.types.ts similarity index 100% rename from packages/ui/src/mosaic/user-button/user-button.types.ts rename to packages/ui/src/mosaic/features/user-button/user-button.types.ts diff --git a/packages/ui/src/mosaic/user-button/user-button.view.tsx b/packages/ui/src/mosaic/features/user-button/user-button.view.tsx similarity index 97% rename from packages/ui/src/mosaic/user-button/user-button.view.tsx rename to packages/ui/src/mosaic/features/user-button/user-button.view.tsx index f028621995e..41c2ee16aeb 100644 --- a/packages/ui/src/mosaic/user-button/user-button.view.tsx +++ b/packages/ui/src/mosaic/features/user-button/user-button.view.tsx @@ -6,21 +6,21 @@ import * as stylex from '@stylexjs/stylex'; import type { ReactElement, ReactNode } from 'react'; import React from 'react'; -import type { AvatarProps } from '../components/avatar'; -import { Avatar } from '../components/avatar'; -import { Badge } from '../components/badge'; -import { Button, SubmitButton } from '../components/button'; -import { Card } from '../components/card'; -import { Icon } from '../components/icon'; -import { Item } from '../components/item'; -import { Menu } from '../components/menu'; -import { Popover } from '../components/popover'; -import { scrollAreaViewport } from '../components/scroll-area'; -import { Spinner } from '../components/spinner'; -import type { IconName } from '../icons/registry'; -import { applyOrder } from '../utils/apply-order'; -import { focusOutline } from '../utils/focus-outline.styles'; -import { truncationStyles } from '../utils/typography.styles'; +import type { AvatarProps } from '../../components/avatar'; +import { Avatar } from '../../components/avatar'; +import { Badge } from '../../components/badge'; +import { Button, SubmitButton } from '../../components/button'; +import { Card } from '../../components/card'; +import { Icon } from '../../components/icon'; +import { Item } from '../../components/item'; +import { Menu } from '../../components/menu'; +import { Popover } from '../../components/popover'; +import { scrollAreaViewport } from '../../components/scroll-area'; +import { Spinner } from '../../components/spinner'; +import type { IconName } from '../../icons/registry'; +import { applyOrder } from '../../utils/apply-order'; +import { focusOutline } from '../../utils/focus-outline.styles'; +import { truncationStyles } from '../../utils/typography.styles'; import type { UserButtonLayout } from './user-button.layout'; import { resolveUserButtonLayout } from './user-button.layout'; import { fill, plural, userButtonBase as m } from './user-button.messages'; diff --git a/packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-add-phone.controller.test.ts b/packages/ui/src/mosaic/features/user-profile/__tests__/user-profile-add-phone.controller.test.ts similarity index 98% rename from packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-add-phone.controller.test.ts rename to packages/ui/src/mosaic/features/user-profile/__tests__/user-profile-add-phone.controller.test.ts index 1e962b612a6..d7715ed1ad2 100644 --- a/packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-add-phone.controller.test.ts +++ b/packages/ui/src/mosaic/features/user-profile/__tests__/user-profile-add-phone.controller.test.ts @@ -2,7 +2,7 @@ import { createDeferredPromise } from '@clerk/shared/utils'; import { act, renderHook, waitFor } from '@testing-library/react'; import { afterEach, describe, expect, it, vi } from 'vitest'; -import { useUserProfileAddPhoneController } from './user-profile-add-phone.controller'; +import { useUserProfileAddPhoneController } from '../user-profile-account-section/user-profile-add-phone.controller'; describe('useUserProfileAddPhoneController', () => { afterEach(() => vi.useRealTimers()); diff --git a/packages/ui/src/mosaic/user-profile/__tests__/user-profile-add-phone.dialog.test.tsx b/packages/ui/src/mosaic/features/user-profile/__tests__/user-profile-add-phone.dialog.test.tsx similarity index 99% rename from packages/ui/src/mosaic/user-profile/__tests__/user-profile-add-phone.dialog.test.tsx rename to packages/ui/src/mosaic/features/user-profile/__tests__/user-profile-add-phone.dialog.test.tsx index c0d66211efd..8ad5297eb5e 100644 --- a/packages/ui/src/mosaic/user-profile/__tests__/user-profile-add-phone.dialog.test.tsx +++ b/packages/ui/src/mosaic/features/user-profile/__tests__/user-profile-add-phone.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 '../../MosaicProvider'; +import { MosaicProvider } from '../../../MosaicProvider'; import type { UserProfileAddPhoneDialogProps } from '../user-profile-account-section/user-profile-add-phone.dialog'; import { UserProfileAddPhoneDialog } from '../user-profile-account-section/user-profile-add-phone.dialog'; diff --git a/packages/ui/src/mosaic/user-profile/__tests__/user-profile-add-phone.integration.test.tsx b/packages/ui/src/mosaic/features/user-profile/__tests__/user-profile-add-phone.integration.test.tsx similarity index 96% rename from packages/ui/src/mosaic/user-profile/__tests__/user-profile-add-phone.integration.test.tsx rename to packages/ui/src/mosaic/features/user-profile/__tests__/user-profile-add-phone.integration.test.tsx index 0cc7edb1827..876f2bc2382 100644 --- a/packages/ui/src/mosaic/user-profile/__tests__/user-profile-add-phone.integration.test.tsx +++ b/packages/ui/src/mosaic/features/user-profile/__tests__/user-profile-add-phone.integration.test.tsx @@ -2,7 +2,7 @@ import { render, screen, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { describe, expect, it, vi } from 'vitest'; -import { MosaicProvider } from '../../MosaicProvider'; +import { MosaicProvider } from '../../../MosaicProvider'; import { UserProfileProfilePanelView } from '../user-profile-profile-panel.view'; describe('profile add phone', () => { diff --git a/packages/ui/src/mosaic/user-profile/__tests__/user-profile-api-keys-panel.view.test.tsx b/packages/ui/src/mosaic/features/user-profile/__tests__/user-profile-api-keys-panel.view.test.tsx similarity index 98% rename from packages/ui/src/mosaic/user-profile/__tests__/user-profile-api-keys-panel.view.test.tsx rename to packages/ui/src/mosaic/features/user-profile/__tests__/user-profile-api-keys-panel.view.test.tsx index 255eb8ea7fa..8a38c97e6e8 100644 --- a/packages/ui/src/mosaic/user-profile/__tests__/user-profile-api-keys-panel.view.test.tsx +++ b/packages/ui/src/mosaic/features/user-profile/__tests__/user-profile-api-keys-panel.view.test.tsx @@ -2,7 +2,7 @@ import { fireEvent, render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { describe, expect, it, vi } from 'vitest'; -import { MosaicProvider } from '../../MosaicProvider'; +import { MosaicProvider } from '../../../MosaicProvider'; import { UserProfileApiKeysPanelView } from '../user-profile-api-keys-panel.view'; const apiKeys = [ diff --git a/packages/ui/src/mosaic/user-profile/__tests__/user-profile-billing-panel.view.test.tsx b/packages/ui/src/mosaic/features/user-profile/__tests__/user-profile-billing-panel.view.test.tsx similarity index 98% rename from packages/ui/src/mosaic/user-profile/__tests__/user-profile-billing-panel.view.test.tsx rename to packages/ui/src/mosaic/features/user-profile/__tests__/user-profile-billing-panel.view.test.tsx index 75ef66de7fe..01baad9dd5a 100644 --- a/packages/ui/src/mosaic/user-profile/__tests__/user-profile-billing-panel.view.test.tsx +++ b/packages/ui/src/mosaic/features/user-profile/__tests__/user-profile-billing-panel.view.test.tsx @@ -2,7 +2,7 @@ import { render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { describe, expect, it, vi } from 'vitest'; -import { MosaicProvider } from '../../MosaicProvider'; +import { MosaicProvider } from '../../../MosaicProvider'; import { UserProfileBillingPanelView } from '../user-profile-billing-panel.view'; const subscription = { diff --git a/packages/ui/src/mosaic/user-profile/__tests__/user-profile-contact-list-row.view.test.tsx b/packages/ui/src/mosaic/features/user-profile/__tests__/user-profile-contact-list-row.view.test.tsx similarity index 100% rename from packages/ui/src/mosaic/user-profile/__tests__/user-profile-contact-list-row.view.test.tsx rename to packages/ui/src/mosaic/features/user-profile/__tests__/user-profile-contact-list-row.view.test.tsx diff --git a/packages/ui/src/mosaic/user-profile/user-profile-delete-section/user-profile-delete-section.controller.test.ts b/packages/ui/src/mosaic/features/user-profile/__tests__/user-profile-delete-section.controller.test.ts similarity index 95% rename from packages/ui/src/mosaic/user-profile/user-profile-delete-section/user-profile-delete-section.controller.test.ts rename to packages/ui/src/mosaic/features/user-profile/__tests__/user-profile-delete-section.controller.test.ts index 3485de0a567..ac1c8ac584d 100644 --- a/packages/ui/src/mosaic/user-profile/user-profile-delete-section/user-profile-delete-section.controller.test.ts +++ b/packages/ui/src/mosaic/features/user-profile/__tests__/user-profile-delete-section.controller.test.ts @@ -1,11 +1,11 @@ import { act, renderHook, waitFor } from '@testing-library/react'; import { describe, expect, it, vi } from 'vitest'; -import { createActor } from '../../machine/createActor'; +import { createActor } from '../../../machine/createActor'; import { userProfileDeleteSectionMachine, useUserProfileDeleteSectionController, -} from './user-profile-delete-section.controller'; +} from '../user-profile-delete-section/user-profile-delete-section.controller'; function start(deleteAccount: () => Promise) { const actor = createActor(userProfileDeleteSectionMachine, { context: { deleteAccount } }).start(); diff --git a/packages/ui/src/mosaic/user-profile/__tests__/user-profile-delete-section.view.test.tsx b/packages/ui/src/mosaic/features/user-profile/__tests__/user-profile-delete-section.view.test.tsx similarity index 98% rename from packages/ui/src/mosaic/user-profile/__tests__/user-profile-delete-section.view.test.tsx rename to packages/ui/src/mosaic/features/user-profile/__tests__/user-profile-delete-section.view.test.tsx index 911d97432fc..9f70ce5dea6 100644 --- a/packages/ui/src/mosaic/user-profile/__tests__/user-profile-delete-section.view.test.tsx +++ b/packages/ui/src/mosaic/features/user-profile/__tests__/user-profile-delete-section.view.test.tsx @@ -2,7 +2,7 @@ import { render, screen, waitFor, within } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { describe, expect, it, vi } from 'vitest'; -import { MosaicProvider } from '../../MosaicProvider'; +import { MosaicProvider } from '../../../MosaicProvider'; import { UserProfileDeleteSectionView } from '../user-profile-delete-section/user-profile-delete-section.view'; function renderView(onDelete: () => Promise = vi.fn(() => Promise.resolve())) { diff --git a/packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-edit-name.controller.test.ts b/packages/ui/src/mosaic/features/user-profile/__tests__/user-profile-edit-name.controller.test.ts similarity index 93% rename from packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-edit-name.controller.test.ts rename to packages/ui/src/mosaic/features/user-profile/__tests__/user-profile-edit-name.controller.test.ts index c315b2334ab..8a9d757eb13 100644 --- a/packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-edit-name.controller.test.ts +++ b/packages/ui/src/mosaic/features/user-profile/__tests__/user-profile-edit-name.controller.test.ts @@ -1,9 +1,12 @@ import { act, renderHook, waitFor } from '@testing-library/react'; import { describe, expect, it, vi } from 'vitest'; -import { createActor } from '../../machine/createActor'; -import { UserProfileSaveError } from './user-profile-account-section.types'; -import { userProfileEditNameMachine, useUserProfileEditNameController } from './user-profile-edit-name.controller'; +import { createActor } from '../../../machine/createActor'; +import { UserProfileSaveError } from '../user-profile-account-section/user-profile-account-section.types'; +import { + userProfileEditNameMachine, + useUserProfileEditNameController, +} from '../user-profile-account-section/user-profile-edit-name.controller'; function start(saveName: () => Promise, saved = { savedFirstName: 'Preston', savedLastName: 'Booth' }) { const actor = createActor(userProfileEditNameMachine, { context: { saveName, ...saved } }).start(); diff --git a/packages/ui/src/mosaic/user-profile/__tests__/user-profile-edit-name.dialog.test.tsx b/packages/ui/src/mosaic/features/user-profile/__tests__/user-profile-edit-name.dialog.test.tsx similarity index 98% rename from packages/ui/src/mosaic/user-profile/__tests__/user-profile-edit-name.dialog.test.tsx rename to packages/ui/src/mosaic/features/user-profile/__tests__/user-profile-edit-name.dialog.test.tsx index 7578a86d811..07a83dcbba9 100644 --- a/packages/ui/src/mosaic/user-profile/__tests__/user-profile-edit-name.dialog.test.tsx +++ b/packages/ui/src/mosaic/features/user-profile/__tests__/user-profile-edit-name.dialog.test.tsx @@ -2,8 +2,8 @@ import { render, screen, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { describe, expect, it, vi } from 'vitest'; -import { Button } from '../../components/button'; -import { MosaicProvider } from '../../MosaicProvider'; +import { Button } from '../../../components/button'; +import { MosaicProvider } from '../../../MosaicProvider'; import type { UserProfileEditNameDialogProps } from '../user-profile-account-section/user-profile-edit-name.dialog'; import { UserProfileEditNameDialog } from '../user-profile-account-section/user-profile-edit-name.dialog'; diff --git a/packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-edit-username.controller.test.ts b/packages/ui/src/mosaic/features/user-profile/__tests__/user-profile-edit-username.controller.test.ts similarity index 96% rename from packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-edit-username.controller.test.ts rename to packages/ui/src/mosaic/features/user-profile/__tests__/user-profile-edit-username.controller.test.ts index aca343d0963..c1c99cd6808 100644 --- a/packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-edit-username.controller.test.ts +++ b/packages/ui/src/mosaic/features/user-profile/__tests__/user-profile-edit-username.controller.test.ts @@ -1,12 +1,12 @@ import { act, renderHook, waitFor } from '@testing-library/react'; import { describe, expect, it, vi } from 'vitest'; -import { createActor } from '../../machine/createActor'; -import { UserProfileSaveError } from './user-profile-account-section.types'; +import { createActor } from '../../../machine/createActor'; +import { UserProfileSaveError } from '../user-profile-account-section/user-profile-account-section.types'; import { userProfileEditUsernameMachine, useUserProfileEditUsernameController, -} from './user-profile-edit-username.controller'; +} from '../user-profile-account-section/user-profile-edit-username.controller'; function start(saveUsername: () => Promise, savedUsername = 'prestonxyz') { const actor = createActor(userProfileEditUsernameMachine, { context: { saveUsername, savedUsername } }).start(); diff --git a/packages/ui/src/mosaic/user-profile/__tests__/user-profile-edit-username.dialog.test.tsx b/packages/ui/src/mosaic/features/user-profile/__tests__/user-profile-edit-username.dialog.test.tsx similarity index 97% rename from packages/ui/src/mosaic/user-profile/__tests__/user-profile-edit-username.dialog.test.tsx rename to packages/ui/src/mosaic/features/user-profile/__tests__/user-profile-edit-username.dialog.test.tsx index 19d94dc953a..ad079f44a49 100644 --- a/packages/ui/src/mosaic/user-profile/__tests__/user-profile-edit-username.dialog.test.tsx +++ b/packages/ui/src/mosaic/features/user-profile/__tests__/user-profile-edit-username.dialog.test.tsx @@ -2,8 +2,8 @@ import { render, screen, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { describe, expect, it, vi } from 'vitest'; -import { Button } from '../../components/button'; -import { MosaicProvider } from '../../MosaicProvider'; +import { Button } from '../../../components/button'; +import { MosaicProvider } from '../../../MosaicProvider'; import type { UserProfileEditUsernameDialogProps } from '../user-profile-account-section/user-profile-edit-username.dialog'; import { UserProfileEditUsernameDialog } from '../user-profile-account-section/user-profile-edit-username.dialog'; diff --git a/packages/ui/src/mosaic/user-profile/__tests__/user-profile-phone-actions.test.tsx b/packages/ui/src/mosaic/features/user-profile/__tests__/user-profile-phone-actions.test.tsx similarity index 99% rename from packages/ui/src/mosaic/user-profile/__tests__/user-profile-phone-actions.test.tsx rename to packages/ui/src/mosaic/features/user-profile/__tests__/user-profile-phone-actions.test.tsx index 658feaac808..97b4dbcf3ef 100644 --- a/packages/ui/src/mosaic/user-profile/__tests__/user-profile-phone-actions.test.tsx +++ b/packages/ui/src/mosaic/features/user-profile/__tests__/user-profile-phone-actions.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 '../../MosaicProvider'; +import { MosaicProvider } from '../../../MosaicProvider'; import type { UserProfileAccountSectionViewProps } from '../user-profile-account-section/user-profile-account-section.view'; import { UserProfileAccountSectionView } from '../user-profile-account-section/user-profile-account-section.view'; diff --git a/packages/ui/src/mosaic/user-profile/__tests__/user-profile-picture-row.view.test.tsx b/packages/ui/src/mosaic/features/user-profile/__tests__/user-profile-picture-row.view.test.tsx similarity index 97% rename from packages/ui/src/mosaic/user-profile/__tests__/user-profile-picture-row.view.test.tsx rename to packages/ui/src/mosaic/features/user-profile/__tests__/user-profile-picture-row.view.test.tsx index 6fac24fcc7b..9b6e43d131c 100644 --- a/packages/ui/src/mosaic/user-profile/__tests__/user-profile-picture-row.view.test.tsx +++ b/packages/ui/src/mosaic/features/user-profile/__tests__/user-profile-picture-row.view.test.tsx @@ -2,7 +2,7 @@ import { render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { describe, expect, it, vi } from 'vitest'; -import { MosaicProvider } from '../../MosaicProvider'; +import { MosaicProvider } from '../../../MosaicProvider'; import type { UserProfilePictureRowViewProps } from '../user-profile-account-section/user-profile-picture-row.view'; import { UserProfilePictureRowView } from '../user-profile-account-section/user-profile-picture-row.view'; diff --git a/packages/ui/src/mosaic/user-profile/__tests__/user-profile-profile-panel.view.test.tsx b/packages/ui/src/mosaic/features/user-profile/__tests__/user-profile-profile-panel.view.test.tsx similarity index 99% rename from packages/ui/src/mosaic/user-profile/__tests__/user-profile-profile-panel.view.test.tsx rename to packages/ui/src/mosaic/features/user-profile/__tests__/user-profile-profile-panel.view.test.tsx index 91078591e10..a76fbd926ec 100644 --- a/packages/ui/src/mosaic/user-profile/__tests__/user-profile-profile-panel.view.test.tsx +++ b/packages/ui/src/mosaic/features/user-profile/__tests__/user-profile-profile-panel.view.test.tsx @@ -2,7 +2,7 @@ import { render, screen, waitFor, within } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { describe, expect, it, vi } from 'vitest'; -import { MosaicProvider } from '../../MosaicProvider'; +import { MosaicProvider } from '../../../MosaicProvider'; import type { UserProfileProfilePanelViewProps } from '../user-profile-profile-panel.view'; import { UserProfileProfilePanelView } from '../user-profile-profile-panel.view'; diff --git a/packages/ui/src/mosaic/user-profile/__tests__/user-profile-security-panel.view.test.tsx b/packages/ui/src/mosaic/features/user-profile/__tests__/user-profile-security-panel.view.test.tsx similarity index 99% rename from packages/ui/src/mosaic/user-profile/__tests__/user-profile-security-panel.view.test.tsx rename to packages/ui/src/mosaic/features/user-profile/__tests__/user-profile-security-panel.view.test.tsx index 0d5038bf3d9..e3a0d051f5a 100644 --- a/packages/ui/src/mosaic/user-profile/__tests__/user-profile-security-panel.view.test.tsx +++ b/packages/ui/src/mosaic/features/user-profile/__tests__/user-profile-security-panel.view.test.tsx @@ -2,7 +2,7 @@ import { render, screen, within } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { describe, expect, it, vi } from 'vitest'; -import { MosaicProvider } from '../../MosaicProvider'; +import { MosaicProvider } from '../../../MosaicProvider'; import type { UserProfileSecurityPanelViewProps } from '../user-profile-security-panel.view'; import { UserProfileSecurityPanelView } from '../user-profile-security-panel.view'; diff --git a/packages/ui/src/mosaic/user-profile/__tests__/user-profile.layout.test.ts b/packages/ui/src/mosaic/features/user-profile/__tests__/user-profile.layout.test.ts similarity index 100% rename from packages/ui/src/mosaic/user-profile/__tests__/user-profile.layout.test.ts rename to packages/ui/src/mosaic/features/user-profile/__tests__/user-profile.layout.test.ts diff --git a/packages/ui/src/mosaic/user-profile/__tests__/user-profile.view.test.tsx b/packages/ui/src/mosaic/features/user-profile/__tests__/user-profile.view.test.tsx similarity index 97% rename from packages/ui/src/mosaic/user-profile/__tests__/user-profile.view.test.tsx rename to packages/ui/src/mosaic/features/user-profile/__tests__/user-profile.view.test.tsx index e7225444ee4..d4847b0755a 100644 --- a/packages/ui/src/mosaic/user-profile/__tests__/user-profile.view.test.tsx +++ b/packages/ui/src/mosaic/features/user-profile/__tests__/user-profile.view.test.tsx @@ -2,8 +2,8 @@ import { render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { describe, expect, it, vi } from 'vitest'; -import { Dialog } from '../../components/dialog'; -import { MosaicProvider } from '../../MosaicProvider'; +import { Dialog } from '../../../components/dialog'; +import { MosaicProvider } from '../../../MosaicProvider'; import type { UserProfileViewProps } from '../user-profile.view'; import { UserProfileView } from '../user-profile.view'; diff --git a/packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-account-section.messages.ts b/packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-account-section.messages.ts similarity index 100% rename from packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-account-section.messages.ts rename to packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-account-section.messages.ts diff --git a/packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-account-section.styles.ts b/packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-account-section.styles.ts similarity index 80% rename from packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-account-section.styles.ts rename to packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-account-section.styles.ts index e171b342c3a..73d555e346a 100644 --- a/packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-account-section.styles.ts +++ b/packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-account-section.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({ sections: { diff --git a/packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-account-section.types.ts b/packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-account-section.types.ts similarity index 100% rename from packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-account-section.types.ts rename to packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-account-section.types.ts diff --git a/packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-account-section.view.tsx b/packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-account-section.view.tsx similarity index 99% rename from packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-account-section.view.tsx rename to packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-account-section.view.tsx index e9b99ad600f..0228ddb76a6 100644 --- a/packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-account-section.view.tsx +++ b/packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-account-section.view.tsx @@ -1,7 +1,7 @@ import type { FileRejection } from '@clerk/headless/file-upload'; import * as stylex from '@stylexjs/stylex'; -import { Section } from '../../components/section'; +import { Section } from '../../../components/section'; import { userProfileAccountSectionBase as m } from './user-profile-account-section.messages'; import { styles } from './user-profile-account-section.styles'; import type { UserProfileNameAttribute, UserProfilePhone } from './user-profile-account-section.types'; diff --git a/packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-add-phone.controller.ts b/packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-add-phone.controller.ts similarity index 97% rename from packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-add-phone.controller.ts rename to packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-add-phone.controller.ts index dc1eb1b31c8..6f390d2d032 100644 --- a/packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-add-phone.controller.ts +++ b/packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-add-phone.controller.ts @@ -1,7 +1,7 @@ import { useEffect } from 'react'; -import { setup } from '../../machine/setup'; -import { useMachine } from '../../machine/useMachine'; +import { setup } from '../../../machine/setup'; +import { useMachine } from '../../../machine/useMachine'; import type { UserProfileAddPhoneDialogProps } from './user-profile-add-phone.dialog'; import { userProfileAddPhoneMessages as m } from './user-profile-add-phone.messages'; diff --git a/packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-add-phone.dialog.tsx b/packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-add-phone.dialog.tsx similarity index 92% rename from packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-add-phone.dialog.tsx rename to packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-add-phone.dialog.tsx index 192a2ee3335..f0aa54db900 100644 --- a/packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-add-phone.dialog.tsx +++ b/packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-add-phone.dialog.tsx @@ -1,15 +1,15 @@ import type { FormEvent } from 'react'; import { useId, useRef } from 'react'; -import { stringToFormattedPhoneString } from '../../../utils/phoneUtils'; -import { Button, SubmitButton } from '../../components/button'; -import { Card } from '../../components/card'; -import type { DialogTriggerProps } from '../../components/dialog'; -import { Dialog } from '../../components/dialog'; -import { Field } from '../../components/field'; -import { Flow } from '../../components/flow'; -import { Otp } from '../../components/otp'; -import { PhoneInput } from '../../components/phone-input'; +import { stringToFormattedPhoneString } from '../../../../utils/phoneUtils'; +import { Button, SubmitButton } from '../../../components/button'; +import { Card } from '../../../components/card'; +import type { DialogTriggerProps } from '../../../components/dialog'; +import { Dialog } from '../../../components/dialog'; +import { Field } from '../../../components/field'; +import { Flow } from '../../../components/flow'; +import { Otp } from '../../../components/otp'; +import { PhoneInput } from '../../../components/phone-input'; import { fill } from './user-profile-account-section.messages'; import { userProfileAddPhoneMessages as m } from './user-profile-add-phone.messages'; diff --git a/packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-add-phone.messages.ts b/packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-add-phone.messages.ts similarity index 100% rename from packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-add-phone.messages.ts rename to packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-add-phone.messages.ts diff --git a/packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-contact-list-row.view.tsx b/packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-contact-list-row.view.tsx similarity index 94% rename from packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-contact-list-row.view.tsx rename to packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-contact-list-row.view.tsx index fef776924e1..ae602a53a95 100644 --- a/packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-contact-list-row.view.tsx +++ b/packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-contact-list-row.view.tsx @@ -1,9 +1,9 @@ import type { ReactNode } from 'react'; -import { Badge } from '../../components/badge'; -import { Button } from '../../components/button'; -import { Icon } from '../../components/icon'; -import { Section } from '../../components/section'; +import { Badge } from '../../../components/badge'; +import { Button } from '../../../components/button'; +import { Icon } from '../../../components/icon'; +import { Section } from '../../../components/section'; import type { UserProfileMenuAction } from '../user-profile-action-menu'; import { UserProfileActionMenu } from '../user-profile-action-menu'; import { styles } from '../user-profile-profile-panel.styles'; diff --git a/packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-contact-row.view.tsx b/packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-contact-row.view.tsx similarity index 91% rename from packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-contact-row.view.tsx rename to packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-contact-row.view.tsx index 3faa50a5f69..1da3fc19367 100644 --- a/packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-contact-row.view.tsx +++ b/packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-contact-row.view.tsx @@ -1,8 +1,8 @@ import type { ReactNode } from 'react'; -import { Badge } from '../../components/badge'; -import { Button } from '../../components/button'; -import { Section } from '../../components/section'; +import { Badge } from '../../../components/badge'; +import { Button } from '../../../components/button'; +import { Section } from '../../../components/section'; import { styles } from '../user-profile-profile-panel.styles'; import { userProfileAccountSectionBase as m } from './user-profile-account-section.messages'; diff --git a/packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-edit-name.controller.ts b/packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-edit-name.controller.ts similarity index 97% rename from packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-edit-name.controller.ts rename to packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-edit-name.controller.ts index 3a2af00f2e6..3c4c7f6adbd 100644 --- a/packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-edit-name.controller.ts +++ b/packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-edit-name.controller.ts @@ -1,5 +1,5 @@ -import { setup } from '../../machine/setup'; -import { useMachine } from '../../machine/useMachine'; +import { setup } from '../../../machine/setup'; +import { useMachine } from '../../../machine/useMachine'; import type { UserProfileFormError } from './user-profile-account-section.types'; import { UserProfileSaveError } from './user-profile-account-section.types'; import type { UserProfileEditNameField, UserProfileEditNameValue } from './user-profile-edit-name.dialog'; diff --git a/packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-edit-name.dialog.tsx b/packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-edit-name.dialog.tsx similarity index 92% rename from packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-edit-name.dialog.tsx rename to packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-edit-name.dialog.tsx index 46f17bfd989..7d8adec0e90 100644 --- a/packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-edit-name.dialog.tsx +++ b/packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-edit-name.dialog.tsx @@ -1,13 +1,13 @@ import type { FormEvent } from 'react'; import { useId, useRef } from 'react'; -import { Banner } from '../../components/banner'; -import { Button, SubmitButton } from '../../components/button'; -import { Card } from '../../components/card'; -import type { DialogTriggerProps } from '../../components/dialog'; -import { Dialog } from '../../components/dialog'; -import { Field } from '../../components/field'; -import { Input } from '../../components/input'; +import { Banner } from '../../../components/banner'; +import { Button, SubmitButton } from '../../../components/button'; +import { Card } from '../../../components/card'; +import type { DialogTriggerProps } from '../../../components/dialog'; +import { Dialog } from '../../../components/dialog'; +import { Field } from '../../../components/field'; +import { Input } from '../../../components/input'; import { userProfileAccountSectionBase as m } from './user-profile-account-section.messages'; import type { UserProfileFormError, UserProfileNameAttribute } from './user-profile-account-section.types'; diff --git a/packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-edit-username.controller.ts b/packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-edit-username.controller.ts similarity index 97% rename from packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-edit-username.controller.ts rename to packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-edit-username.controller.ts index e17d1b74a9b..367bc9db0d7 100644 --- a/packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-edit-username.controller.ts +++ b/packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-edit-username.controller.ts @@ -1,5 +1,5 @@ -import { setup } from '../../machine/setup'; -import { useMachine } from '../../machine/useMachine'; +import { setup } from '../../../machine/setup'; +import { useMachine } from '../../../machine/useMachine'; import type { UserProfileFormError } from './user-profile-account-section.types'; import { UserProfileSaveError } from './user-profile-account-section.types'; import type { UserProfileEditUsernameField } from './user-profile-edit-username.dialog'; diff --git a/packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-edit-username.dialog.tsx b/packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-edit-username.dialog.tsx similarity index 89% rename from packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-edit-username.dialog.tsx rename to packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-edit-username.dialog.tsx index ea3372e4082..36e8e5dede3 100644 --- a/packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-edit-username.dialog.tsx +++ b/packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-edit-username.dialog.tsx @@ -1,13 +1,13 @@ import type { FormEvent } from 'react'; import { useId, useRef } from 'react'; -import { Banner } from '../../components/banner'; -import { Button, SubmitButton } from '../../components/button'; -import { Card } from '../../components/card'; -import type { DialogTriggerProps } from '../../components/dialog'; -import { Dialog } from '../../components/dialog'; -import { Field } from '../../components/field'; -import { Input } from '../../components/input'; +import { Banner } from '../../../components/banner'; +import { Button, SubmitButton } from '../../../components/button'; +import { Card } from '../../../components/card'; +import type { DialogTriggerProps } from '../../../components/dialog'; +import { Dialog } from '../../../components/dialog'; +import { Field } from '../../../components/field'; +import { Input } from '../../../components/input'; import { userProfileAccountSectionBase as m } from './user-profile-account-section.messages'; import type { UserProfileFormError } from './user-profile-account-section.types'; diff --git a/packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-name-row.view.tsx b/packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-name-row.view.tsx similarity index 95% rename from packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-name-row.view.tsx rename to packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-name-row.view.tsx index bb94d3b00f2..6815005c0f8 100644 --- a/packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-name-row.view.tsx +++ b/packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-name-row.view.tsx @@ -1,5 +1,5 @@ -import { Button } from '../../components/button'; -import { Section } from '../../components/section'; +import { Button } from '../../../components/button'; +import { Section } from '../../../components/section'; import { userProfileAccountSectionBase as m } from './user-profile-account-section.messages'; import type { UserProfileNameAttribute } from './user-profile-account-section.types'; import { useUserProfileEditNameController } from './user-profile-edit-name.controller'; diff --git a/packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-phone-row.view.tsx b/packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-phone-row.view.tsx similarity index 95% rename from packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-phone-row.view.tsx rename to packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-phone-row.view.tsx index a5cfe41c5a2..213b5c6a410 100644 --- a/packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-phone-row.view.tsx +++ b/packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-phone-row.view.tsx @@ -1,9 +1,9 @@ import { useRef, useState } from 'react'; -import { stringToFormattedPhoneString } from '../../../utils/phoneUtils'; -import { Button } from '../../components/button'; -import { Icon } from '../../components/icon'; -import { Text } from '../../components/text'; +import { stringToFormattedPhoneString } from '../../../../utils/phoneUtils'; +import { Button } from '../../../components/button'; +import { Icon } from '../../../components/icon'; +import { Text } from '../../../components/text'; import { userProfileAccountSectionBase as m } from './user-profile-account-section.messages'; import type { UserProfilePhone } from './user-profile-account-section.types'; import type { UserProfileAddPhoneControllerOptions } from './user-profile-add-phone.controller'; diff --git a/packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-picture-row.view.tsx b/packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-picture-row.view.tsx similarity index 95% rename from packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-picture-row.view.tsx rename to packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-picture-row.view.tsx index 87dad81fe40..908f4403b16 100644 --- a/packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-picture-row.view.tsx +++ b/packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-picture-row.view.tsx @@ -2,9 +2,9 @@ import type { FileRejection } from '@clerk/headless/file-upload'; import { FileUpload } from '@clerk/headless/file-upload'; import { useState } from 'react'; -import { Avatar } from '../../components/avatar'; -import { Button } from '../../components/button'; -import { Section } from '../../components/section'; +import { Avatar } from '../../../components/avatar'; +import { Button } from '../../../components/button'; +import { Section } from '../../../components/section'; import type { UserProfileMenuAction } from '../user-profile-action-menu'; import { UserProfileActionMenu } from '../user-profile-action-menu'; import { userProfileAccountSectionBase as m } from './user-profile-account-section.messages'; diff --git a/packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-remove-phone.dialog.tsx b/packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-remove-phone.dialog.tsx similarity index 86% rename from packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-remove-phone.dialog.tsx rename to packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-remove-phone.dialog.tsx index f55175f6526..e7c58ee551c 100644 --- a/packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-remove-phone.dialog.tsx +++ b/packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-remove-phone.dialog.tsx @@ -1,9 +1,9 @@ import * as stylex from '@stylexjs/stylex'; -import { Button } from '../../components/button'; -import { Dialog } from '../../components/dialog'; -import { Heading } from '../../components/heading'; -import { Text } from '../../components/text'; +import { Button } from '../../../components/button'; +import { Dialog } from '../../../components/dialog'; +import { Heading } from '../../../components/heading'; +import { Text } from '../../../components/text'; import { styles } from '../user-profile-profile-panel.styles'; import { userProfileAccountSectionBase as m } from './user-profile-account-section.messages'; diff --git a/packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-username-row.view.tsx b/packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-username-row.view.tsx similarity index 93% rename from packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-username-row.view.tsx rename to packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-username-row.view.tsx index b5adeb23984..fb1815a7932 100644 --- a/packages/ui/src/mosaic/user-profile/user-profile-account-section/user-profile-username-row.view.tsx +++ b/packages/ui/src/mosaic/features/user-profile/user-profile-account-section/user-profile-username-row.view.tsx @@ -1,5 +1,5 @@ -import { Button } from '../../components/button'; -import { Section } from '../../components/section'; +import { Button } from '../../../components/button'; +import { Section } from '../../../components/section'; import { userProfileAccountSectionBase as m } from './user-profile-account-section.messages'; import { useUserProfileEditUsernameController } from './user-profile-edit-username.controller'; import { UserProfileEditUsernameDialog } from './user-profile-edit-username.dialog'; diff --git a/packages/ui/src/mosaic/user-profile/user-profile-action-menu.tsx b/packages/ui/src/mosaic/features/user-profile/user-profile-action-menu.tsx similarity index 87% rename from packages/ui/src/mosaic/user-profile/user-profile-action-menu.tsx rename to packages/ui/src/mosaic/features/user-profile/user-profile-action-menu.tsx index c2f4041c6b6..3650d9151de 100644 --- a/packages/ui/src/mosaic/user-profile/user-profile-action-menu.tsx +++ b/packages/ui/src/mosaic/features/user-profile/user-profile-action-menu.tsx @@ -1,8 +1,8 @@ import type { ReactNode } from 'react'; -import { Icon } from '../components/icon'; -import { Menu } from '../components/menu'; -import type { IconName } from '../icons/registry'; +import { Icon } from '../../components/icon'; +import { Menu } from '../../components/menu'; +import type { IconName } from '../../icons/registry'; export interface UserProfileMenuAction { label: string; diff --git a/packages/ui/src/mosaic/user-profile/user-profile-active-devices-section.view.tsx b/packages/ui/src/mosaic/features/user-profile/user-profile-active-devices-section.view.tsx similarity index 97% rename from packages/ui/src/mosaic/user-profile/user-profile-active-devices-section.view.tsx rename to packages/ui/src/mosaic/features/user-profile/user-profile-active-devices-section.view.tsx index 6aeef4b0f63..0c66a81729a 100644 --- a/packages/ui/src/mosaic/user-profile/user-profile-active-devices-section.view.tsx +++ b/packages/ui/src/mosaic/features/user-profile/user-profile-active-devices-section.view.tsx @@ -1,7 +1,7 @@ import * as stylex from '@stylexjs/stylex'; -import { Button } from '../components/button'; -import { Section } from '../components/section'; +import { Button } from '../../components/button'; +import { Section } from '../../components/section'; import type { UserProfileMenuAction } from './user-profile-action-menu'; import { UserProfileActionMenu } from './user-profile-action-menu'; import { UserProfileSecurityIcon } from './user-profile-security-icon'; diff --git a/packages/ui/src/mosaic/user-profile/user-profile-api-keys-panel.styles.ts b/packages/ui/src/mosaic/features/user-profile/user-profile-api-keys-panel.styles.ts similarity index 99% rename from packages/ui/src/mosaic/user-profile/user-profile-api-keys-panel.styles.ts rename to packages/ui/src/mosaic/features/user-profile/user-profile-api-keys-panel.styles.ts index 1aa2b4aebd3..41d84929bc7 100644 --- a/packages/ui/src/mosaic/user-profile/user-profile-api-keys-panel.styles.ts +++ b/packages/ui/src/mosaic/features/user-profile/user-profile-api-keys-panel.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/ui/src/mosaic/user-profile/user-profile-api-keys-panel.view.tsx b/packages/ui/src/mosaic/features/user-profile/user-profile-api-keys-panel.view.tsx similarity index 96% rename from packages/ui/src/mosaic/user-profile/user-profile-api-keys-panel.view.tsx rename to packages/ui/src/mosaic/features/user-profile/user-profile-api-keys-panel.view.tsx index 73b648b812f..189eda2d84c 100644 --- a/packages/ui/src/mosaic/user-profile/user-profile-api-keys-panel.view.tsx +++ b/packages/ui/src/mosaic/features/user-profile/user-profile-api-keys-panel.view.tsx @@ -1,13 +1,13 @@ import * as stylex from '@stylexjs/stylex'; import type { ReactElement } from 'react'; -import { Badge } from '../components/badge'; -import { Button } from '../components/button'; -import { Icon } from '../components/icon'; -import { Input } from '../components/input'; -import { Menu } from '../components/menu'; -import { Profile } from '../components/profile'; -import { mergeStyleProps, themeProps } from '../props'; +import { Badge } from '../../components/badge'; +import { Button } from '../../components/button'; +import { Icon } from '../../components/icon'; +import { Input } from '../../components/input'; +import { Menu } from '../../components/menu'; +import { Profile } from '../../components/profile'; +import { mergeStyleProps, themeProps } from '../../props'; import { styles } from './user-profile-api-keys-panel.styles'; export interface UserProfileAPIKey { diff --git a/packages/ui/src/mosaic/user-profile/user-profile-billing-history-section.styles.ts b/packages/ui/src/mosaic/features/user-profile/user-profile-billing-history-section.styles.ts similarity index 98% rename from packages/ui/src/mosaic/user-profile/user-profile-billing-history-section.styles.ts rename to packages/ui/src/mosaic/features/user-profile/user-profile-billing-history-section.styles.ts index ed30ce9b878..6aca6ea3d26 100644 --- a/packages/ui/src/mosaic/user-profile/user-profile-billing-history-section.styles.ts +++ b/packages/ui/src/mosaic/features/user-profile/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/ui/src/mosaic/user-profile/user-profile-billing-history-section.view.tsx b/packages/ui/src/mosaic/features/user-profile/user-profile-billing-history-section.view.tsx similarity index 95% rename from packages/ui/src/mosaic/user-profile/user-profile-billing-history-section.view.tsx rename to packages/ui/src/mosaic/features/user-profile/user-profile-billing-history-section.view.tsx index ad6a0d28cd7..d6d53ae605a 100644 --- a/packages/ui/src/mosaic/user-profile/user-profile-billing-history-section.view.tsx +++ b/packages/ui/src/mosaic/features/user-profile/user-profile-billing-history-section.view.tsx @@ -1,10 +1,10 @@ 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 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 { styles } from './user-profile-billing-history-section.styles'; export interface UserProfileBillingHistoryItem { diff --git a/packages/ui/src/mosaic/user-profile/user-profile-billing-panel.styles.ts b/packages/ui/src/mosaic/features/user-profile/user-profile-billing-panel.styles.ts similarity index 96% rename from packages/ui/src/mosaic/user-profile/user-profile-billing-panel.styles.ts rename to packages/ui/src/mosaic/features/user-profile/user-profile-billing-panel.styles.ts index 13c1602d4aa..2ba3f8e403c 100644 --- a/packages/ui/src/mosaic/user-profile/user-profile-billing-panel.styles.ts +++ b/packages/ui/src/mosaic/features/user-profile/user-profile-billing-panel.styles.ts @@ -1,6 +1,6 @@ import * as stylex from '@stylexjs/stylex'; -import { colorVars, fontWeightVars, space, typeScaleVars } from '../tokens.stylex'; +import { colorVars, fontWeightVars, space, typeScaleVars } from '../../tokens.stylex'; export const styles = stylex.create({ amount: { diff --git a/packages/ui/src/mosaic/user-profile/user-profile-billing-panel.view.tsx b/packages/ui/src/mosaic/features/user-profile/user-profile-billing-panel.view.tsx similarity index 96% rename from packages/ui/src/mosaic/user-profile/user-profile-billing-panel.view.tsx rename to packages/ui/src/mosaic/features/user-profile/user-profile-billing-panel.view.tsx index 384edf84255..0c8678ba65f 100644 --- a/packages/ui/src/mosaic/user-profile/user-profile-billing-panel.view.tsx +++ b/packages/ui/src/mosaic/features/user-profile/user-profile-billing-panel.view.tsx @@ -1,8 +1,8 @@ import * as stylex from '@stylexjs/stylex'; import type { ReactElement } from 'react'; -import { Profile } from '../components/profile'; -import { mergeStyleProps, themeProps } from '../props'; +import { Profile } from '../../components/profile'; +import { mergeStyleProps, themeProps } from '../../props'; import type { UserProfileBillingHistoryItem, UserProfileBillingHistoryPagination, diff --git a/packages/ui/src/mosaic/user-profile/user-profile-connected-accounts-section.view.tsx b/packages/ui/src/mosaic/features/user-profile/user-profile-connected-accounts-section.view.tsx similarity index 94% rename from packages/ui/src/mosaic/user-profile/user-profile-connected-accounts-section.view.tsx rename to packages/ui/src/mosaic/features/user-profile/user-profile-connected-accounts-section.view.tsx index 94b4760ed65..f0b4b990981 100644 --- a/packages/ui/src/mosaic/user-profile/user-profile-connected-accounts-section.view.tsx +++ b/packages/ui/src/mosaic/features/user-profile/user-profile-connected-accounts-section.view.tsx @@ -1,6 +1,6 @@ -import { Button } from '../components/button'; -import { Icon } from '../components/icon'; -import { Section } from '../components/section'; +import { Button } from '../../components/button'; +import { Icon } from '../../components/icon'; +import { Section } from '../../components/section'; import type { UserProfileMenuAction } from './user-profile-action-menu'; import { UserProfileActionMenu } from './user-profile-action-menu'; import { UserProfileProviderIcon } from './user-profile-provider-icon'; diff --git a/packages/ui/src/mosaic/user-profile/user-profile-delete-section/user-profile-delete-section.controller.ts b/packages/ui/src/mosaic/features/user-profile/user-profile-delete-section/user-profile-delete-section.controller.ts similarity index 96% rename from packages/ui/src/mosaic/user-profile/user-profile-delete-section/user-profile-delete-section.controller.ts rename to packages/ui/src/mosaic/features/user-profile/user-profile-delete-section/user-profile-delete-section.controller.ts index 693f24fb8e4..1b96da8ca90 100644 --- a/packages/ui/src/mosaic/user-profile/user-profile-delete-section/user-profile-delete-section.controller.ts +++ b/packages/ui/src/mosaic/features/user-profile/user-profile-delete-section/user-profile-delete-section.controller.ts @@ -1,5 +1,5 @@ -import { setup } from '../../machine/setup'; -import { useMachine } from '../../machine/useMachine'; +import { setup } from '../../../machine/setup'; +import { useMachine } from '../../../machine/useMachine'; export interface UserProfileDeleteSectionContext { /** Deletes the account. Injected by the view from its `onDelete` prop. */ diff --git a/packages/ui/src/mosaic/user-profile/user-profile-delete-section/user-profile-delete-section.messages.ts b/packages/ui/src/mosaic/features/user-profile/user-profile-delete-section/user-profile-delete-section.messages.ts similarity index 100% rename from packages/ui/src/mosaic/user-profile/user-profile-delete-section/user-profile-delete-section.messages.ts rename to packages/ui/src/mosaic/features/user-profile/user-profile-delete-section/user-profile-delete-section.messages.ts diff --git a/packages/ui/src/mosaic/user-profile/user-profile-delete-section/user-profile-delete-section.view.tsx b/packages/ui/src/mosaic/features/user-profile/user-profile-delete-section/user-profile-delete-section.view.tsx similarity index 92% rename from packages/ui/src/mosaic/user-profile/user-profile-delete-section/user-profile-delete-section.view.tsx rename to packages/ui/src/mosaic/features/user-profile/user-profile-delete-section/user-profile-delete-section.view.tsx index fafba9c90e8..8e96c060e6d 100644 --- a/packages/ui/src/mosaic/user-profile/user-profile-delete-section/user-profile-delete-section.view.tsx +++ b/packages/ui/src/mosaic/features/user-profile/user-profile-delete-section/user-profile-delete-section.view.tsx @@ -1,6 +1,6 @@ -import { Destructive } from '../../blocks/destructive'; -import { Button } from '../../components/button'; -import { Section } from '../../components/section'; +import { Destructive } from '../../../blocks/destructive'; +import { Button } from '../../../components/button'; +import { Section } from '../../../components/section'; import { useUserProfileDeleteSectionController } from './user-profile-delete-section.controller'; import { fill, userProfileDeleteSectionBase as m } from './user-profile-delete-section.messages'; diff --git a/packages/ui/src/mosaic/user-profile/user-profile-mfa-section.view.tsx b/packages/ui/src/mosaic/features/user-profile/user-profile-mfa-section.view.tsx similarity index 95% rename from packages/ui/src/mosaic/user-profile/user-profile-mfa-section.view.tsx rename to packages/ui/src/mosaic/features/user-profile/user-profile-mfa-section.view.tsx index bfba7fe612a..1d22b103b02 100644 --- a/packages/ui/src/mosaic/user-profile/user-profile-mfa-section.view.tsx +++ b/packages/ui/src/mosaic/features/user-profile/user-profile-mfa-section.view.tsx @@ -1,7 +1,7 @@ -import { Button } from '../components/button'; -import { Icon } from '../components/icon'; -import { Menu } from '../components/menu'; -import { Section } from '../components/section'; +import { Button } from '../../components/button'; +import { Icon } from '../../components/icon'; +import { Menu } from '../../components/menu'; +import { Section } from '../../components/section'; import type { UserProfileMenuAction } from './user-profile-action-menu'; import { UserProfileActionMenu } from './user-profile-action-menu'; import { UserProfileSecurityIcon } from './user-profile-security-icon'; diff --git a/packages/ui/src/mosaic/user-profile/user-profile-passkeys-section.view.tsx b/packages/ui/src/mosaic/features/user-profile/user-profile-passkeys-section.view.tsx similarity index 97% rename from packages/ui/src/mosaic/user-profile/user-profile-passkeys-section.view.tsx rename to packages/ui/src/mosaic/features/user-profile/user-profile-passkeys-section.view.tsx index dfbb07689bc..d9f744fbe11 100644 --- a/packages/ui/src/mosaic/user-profile/user-profile-passkeys-section.view.tsx +++ b/packages/ui/src/mosaic/features/user-profile/user-profile-passkeys-section.view.tsx @@ -1,4 +1,4 @@ -import { Section } from '../components/section'; +import { Section } from '../../components/section'; import type { UserProfileMenuAction } from './user-profile-action-menu'; import { UserProfileActionMenu } from './user-profile-action-menu'; import { UserProfileSecurityIcon } from './user-profile-security-icon'; diff --git a/packages/ui/src/mosaic/user-profile/user-profile-password-section.view.tsx b/packages/ui/src/mosaic/features/user-profile/user-profile-password-section.view.tsx similarity index 92% rename from packages/ui/src/mosaic/user-profile/user-profile-password-section.view.tsx rename to packages/ui/src/mosaic/features/user-profile/user-profile-password-section.view.tsx index 9a48fb65176..34545c4cbd2 100644 --- a/packages/ui/src/mosaic/user-profile/user-profile-password-section.view.tsx +++ b/packages/ui/src/mosaic/features/user-profile/user-profile-password-section.view.tsx @@ -1,5 +1,5 @@ -import { Button } from '../components/button'; -import { Section } from '../components/section'; +import { Button } from '../../components/button'; +import { Section } from '../../components/section'; export interface UserProfilePasswordSectionViewProps { sectionTitle?: string; diff --git a/packages/ui/src/mosaic/user-profile/user-profile-payment-methods-section.view.tsx b/packages/ui/src/mosaic/features/user-profile/user-profile-payment-methods-section.view.tsx similarity index 94% rename from packages/ui/src/mosaic/user-profile/user-profile-payment-methods-section.view.tsx rename to packages/ui/src/mosaic/features/user-profile/user-profile-payment-methods-section.view.tsx index 64eadcc3558..e27c7bfd6fa 100644 --- a/packages/ui/src/mosaic/user-profile/user-profile-payment-methods-section.view.tsx +++ b/packages/ui/src/mosaic/features/user-profile/user-profile-payment-methods-section.view.tsx @@ -1,7 +1,7 @@ -import { Badge } from '../components/badge'; -import { Button } from '../components/button'; -import { Icon } from '../components/icon'; -import { Section } from '../components/section'; +import { Badge } from '../../components/badge'; +import { Button } from '../../components/button'; +import { Icon } from '../../components/icon'; +import { Section } from '../../components/section'; import type { UserProfileMenuAction } from './user-profile-action-menu'; import { UserProfileActionMenu } from './user-profile-action-menu'; import { UserProfileProviderIcon } from './user-profile-provider-icon'; diff --git a/packages/ui/src/mosaic/user-profile/user-profile-profile-panel.styles.ts b/packages/ui/src/mosaic/features/user-profile/user-profile-profile-panel.styles.ts similarity index 90% rename from packages/ui/src/mosaic/user-profile/user-profile-profile-panel.styles.ts rename to packages/ui/src/mosaic/features/user-profile/user-profile-profile-panel.styles.ts index fd3e6967fb3..515605bc490 100644 --- a/packages/ui/src/mosaic/user-profile/user-profile-profile-panel.styles.ts +++ b/packages/ui/src/mosaic/features/user-profile/user-profile-profile-panel.styles.ts @@ -1,6 +1,6 @@ import * as stylex from '@stylexjs/stylex'; -import { fontWeightVars, space } from '../tokens.stylex'; +import { fontWeightVars, space } from '../../tokens.stylex'; export const styles = stylex.create({ confirmPhoneNumber: { diff --git a/packages/ui/src/mosaic/user-profile/user-profile-profile-panel.view.tsx b/packages/ui/src/mosaic/features/user-profile/user-profile-profile-panel.view.tsx similarity index 97% rename from packages/ui/src/mosaic/user-profile/user-profile-profile-panel.view.tsx rename to packages/ui/src/mosaic/features/user-profile/user-profile-profile-panel.view.tsx index 44f921e8b2f..1a71ffc5a64 100644 --- a/packages/ui/src/mosaic/user-profile/user-profile-profile-panel.view.tsx +++ b/packages/ui/src/mosaic/features/user-profile/user-profile-profile-panel.view.tsx @@ -1,8 +1,8 @@ import * as stylex from '@stylexjs/stylex'; import type { ReactElement } from 'react'; -import { Profile } from '../components/profile'; -import { mergeStyleProps, themeProps } from '../props'; +import { Profile } from '../../components/profile'; +import { mergeStyleProps, themeProps } from '../../props'; import type { UserProfileAccountSectionViewProps, UserProfileEmail, diff --git a/packages/ui/src/mosaic/user-profile/user-profile-provider-icon.tsx b/packages/ui/src/mosaic/features/user-profile/user-profile-provider-icon.tsx similarity index 81% rename from packages/ui/src/mosaic/user-profile/user-profile-provider-icon.tsx rename to packages/ui/src/mosaic/features/user-profile/user-profile-provider-icon.tsx index ca21cdfdf13..6ab9d811e46 100644 --- a/packages/ui/src/mosaic/user-profile/user-profile-provider-icon.tsx +++ b/packages/ui/src/mosaic/features/user-profile/user-profile-provider-icon.tsx @@ -1,8 +1,8 @@ import * as stylex from '@stylexjs/stylex'; -import { Icon, IconFrame } from '../components/icon'; -import { Section } from '../components/section'; -import type { IconName } from '../icons/registry'; +import { Icon, IconFrame } from '../../components/icon'; +import { Section } from '../../components/section'; +import type { IconName } from '../../icons/registry'; import { styles } from './user-profile-profile-panel.styles'; type UserProfileProviderIconProps = { iconUrl: string; name?: never } | { iconUrl?: never; name: IconName }; diff --git a/packages/ui/src/mosaic/user-profile/user-profile-security-icon.tsx b/packages/ui/src/mosaic/features/user-profile/user-profile-security-icon.tsx similarity index 81% rename from packages/ui/src/mosaic/user-profile/user-profile-security-icon.tsx rename to packages/ui/src/mosaic/features/user-profile/user-profile-security-icon.tsx index 389bcbf0fd5..3384f246278 100644 --- a/packages/ui/src/mosaic/user-profile/user-profile-security-icon.tsx +++ b/packages/ui/src/mosaic/features/user-profile/user-profile-security-icon.tsx @@ -1,9 +1,9 @@ import * as stylex from '@stylexjs/stylex'; -import { Icon } from '../components/icon'; -import { Section } from '../components/section'; -import { mergeStyleProps } from '../props'; -import { space } from '../tokens.stylex'; +import { Icon } from '../../components/icon'; +import { Section } from '../../components/section'; +import { mergeStyleProps } from '../../props'; +import { space } from '../../tokens.stylex'; import { styles } from './user-profile-security-panel.styles'; export type UserProfileSecurityIconName = 'authenticator' | 'backup-codes' | 'desktop' | 'mobile' | 'passkey' | 'sms'; diff --git a/packages/ui/src/mosaic/user-profile/user-profile-security-list.tsx b/packages/ui/src/mosaic/features/user-profile/user-profile-security-list.tsx similarity index 92% rename from packages/ui/src/mosaic/user-profile/user-profile-security-list.tsx rename to packages/ui/src/mosaic/features/user-profile/user-profile-security-list.tsx index aefc2b7b70f..ce576146bd2 100644 --- a/packages/ui/src/mosaic/user-profile/user-profile-security-list.tsx +++ b/packages/ui/src/mosaic/features/user-profile/user-profile-security-list.tsx @@ -1,8 +1,8 @@ import type { ReactNode } from 'react'; -import { Button } from '../components/button'; -import { Icon } from '../components/icon'; -import { Section } from '../components/section'; +import { Button } from '../../components/button'; +import { Icon } from '../../components/icon'; +import { Section } from '../../components/section'; export function UserProfileSecurityList({ sectionTitle, diff --git a/packages/ui/src/mosaic/user-profile/user-profile-security-panel.styles.ts b/packages/ui/src/mosaic/features/user-profile/user-profile-security-panel.styles.ts similarity index 93% rename from packages/ui/src/mosaic/user-profile/user-profile-security-panel.styles.ts rename to packages/ui/src/mosaic/features/user-profile/user-profile-security-panel.styles.ts index 6d4ba165d7d..9c7736e3be9 100644 --- a/packages/ui/src/mosaic/user-profile/user-profile-security-panel.styles.ts +++ b/packages/ui/src/mosaic/features/user-profile/user-profile-security-panel.styles.ts @@ -1,6 +1,6 @@ import * as stylex from '@stylexjs/stylex'; -import { colorVars, radiusVars, space } from '../tokens.stylex'; +import { colorVars, radiusVars, space } from '../../tokens.stylex'; export const styles = stylex.create({ currentDevice: { diff --git a/packages/ui/src/mosaic/user-profile/user-profile-security-panel.view.tsx b/packages/ui/src/mosaic/features/user-profile/user-profile-security-panel.view.tsx similarity index 97% rename from packages/ui/src/mosaic/user-profile/user-profile-security-panel.view.tsx rename to packages/ui/src/mosaic/features/user-profile/user-profile-security-panel.view.tsx index 8fbaeda45ce..1e72465437e 100644 --- a/packages/ui/src/mosaic/user-profile/user-profile-security-panel.view.tsx +++ b/packages/ui/src/mosaic/features/user-profile/user-profile-security-panel.view.tsx @@ -1,8 +1,8 @@ import * as stylex from '@stylexjs/stylex'; import type { ReactElement } from 'react'; -import { Profile } from '../components/profile'; -import { mergeStyleProps, themeProps } from '../props'; +import { Profile } from '../../components/profile'; +import { mergeStyleProps, themeProps } from '../../props'; import type { UserProfileActiveDevicesSectionViewProps, UserProfileDevice, diff --git a/packages/ui/src/mosaic/user-profile/user-profile-subscription-section.view.tsx b/packages/ui/src/mosaic/features/user-profile/user-profile-subscription-section.view.tsx similarity index 94% rename from packages/ui/src/mosaic/user-profile/user-profile-subscription-section.view.tsx rename to packages/ui/src/mosaic/features/user-profile/user-profile-subscription-section.view.tsx index 188d7d213e7..e8c7e7c51a5 100644 --- a/packages/ui/src/mosaic/user-profile/user-profile-subscription-section.view.tsx +++ b/packages/ui/src/mosaic/features/user-profile/user-profile-subscription-section.view.tsx @@ -1,7 +1,7 @@ import * as stylex from '@stylexjs/stylex'; -import { Button } from '../components/button'; -import { Section } from '../components/section'; +import { Button } from '../../components/button'; +import { Section } from '../../components/section'; import { styles } from './user-profile-billing-panel.styles'; export interface UserProfileSubscription { diff --git a/packages/ui/src/mosaic/user-profile/user-profile-web3-wallets-section.view.tsx b/packages/ui/src/mosaic/features/user-profile/user-profile-web3-wallets-section.view.tsx similarity index 95% rename from packages/ui/src/mosaic/user-profile/user-profile-web3-wallets-section.view.tsx rename to packages/ui/src/mosaic/features/user-profile/user-profile-web3-wallets-section.view.tsx index 0ccf9bfd4da..6a497c9b982 100644 --- a/packages/ui/src/mosaic/user-profile/user-profile-web3-wallets-section.view.tsx +++ b/packages/ui/src/mosaic/features/user-profile/user-profile-web3-wallets-section.view.tsx @@ -1,9 +1,9 @@ import * as stylex from '@stylexjs/stylex'; -import { Badge } from '../components/badge'; -import { Button } from '../components/button'; -import { Icon } from '../components/icon'; -import { Section } from '../components/section'; +import { Badge } from '../../components/badge'; +import { Button } from '../../components/button'; +import { Icon } from '../../components/icon'; +import { Section } from '../../components/section'; import type { UserProfileMenuAction } from './user-profile-action-menu'; import { UserProfileActionMenu } from './user-profile-action-menu'; import { styles } from './user-profile-profile-panel.styles'; diff --git a/packages/ui/src/mosaic/user-profile/user-profile.layout.ts b/packages/ui/src/mosaic/features/user-profile/user-profile.layout.ts similarity index 94% rename from packages/ui/src/mosaic/user-profile/user-profile.layout.ts rename to packages/ui/src/mosaic/features/user-profile/user-profile.layout.ts index 73ebf36c28b..0aeba7ab40d 100644 --- a/packages/ui/src/mosaic/user-profile/user-profile.layout.ts +++ b/packages/ui/src/mosaic/features/user-profile/user-profile.layout.ts @@ -1,5 +1,5 @@ -import type { IconName } from '../icons/registry'; -import { applyOrder } from '../utils/apply-order'; +import type { IconName } from '../../icons/registry'; +import { applyOrder } from '../../utils/apply-order'; import type { CustomProfilePage, UserProfilePageId, UserProfilePages } from './user-profile.types'; /** The built-in pages in the order the profile lists them before a consumer reorders anything. */ diff --git a/packages/ui/src/mosaic/user-profile/user-profile.messages.ts b/packages/ui/src/mosaic/features/user-profile/user-profile.messages.ts similarity index 100% rename from packages/ui/src/mosaic/user-profile/user-profile.messages.ts rename to packages/ui/src/mosaic/features/user-profile/user-profile.messages.ts diff --git a/packages/ui/src/mosaic/user-profile/user-profile.types.ts b/packages/ui/src/mosaic/features/user-profile/user-profile.types.ts similarity index 100% rename from packages/ui/src/mosaic/user-profile/user-profile.types.ts rename to packages/ui/src/mosaic/features/user-profile/user-profile.types.ts diff --git a/packages/ui/src/mosaic/user-profile/user-profile.view.tsx b/packages/ui/src/mosaic/features/user-profile/user-profile.view.tsx similarity index 95% rename from packages/ui/src/mosaic/user-profile/user-profile.view.tsx rename to packages/ui/src/mosaic/features/user-profile/user-profile.view.tsx index 715916350b1..a3ea2e209dc 100644 --- a/packages/ui/src/mosaic/user-profile/user-profile.view.tsx +++ b/packages/ui/src/mosaic/features/user-profile/user-profile.view.tsx @@ -1,8 +1,8 @@ import React from 'react'; -import { Icon } from '../components/icon'; -import type { ProfileRootProps } from '../components/profile'; -import { Profile } from '../components/profile'; +import { Icon } from '../../components/icon'; +import type { ProfileRootProps } from '../../components/profile'; +import { Profile } from '../../components/profile'; import { getAvailableUserProfilePages, resolveUserProfilePages, USER_PROFILE_PAGE_ICONS } from './user-profile.layout'; import { userProfileBase as m } from './user-profile.messages'; import type { CustomProfilePage, UserProfilePageId, UserProfilePages } from './user-profile.types'; diff --git a/references/mosaic-architecture.md b/references/mosaic-architecture.md index 6ac6d764a09..fc29cb20b60 100644 --- a/references/mosaic-architecture.md +++ b/references/mosaic-architecture.md @@ -469,7 +469,7 @@ The steps above cover the **styling** migration. For **flow** components — whe | `src/mosaic/utils/reset.test.tsx` | Reset specs | | `src/mosaic/__tests__/MosaicProvider.test.tsx` | Icon-override context specs | | `src/mosaic/components/button/button.test.tsx` | Component-level slot/state/variant specs | -| `src/mosaic/user-button/__tests__/` | The canonical per-layer test set to copy from | +| `src/mosaic/features/user-button/__tests__/` | The canonical per-layer test set to copy from | `machine/` is the runtime; `machines/` is machines written with it. The one-letter difference is easy to misread — a feature's own machine belongs in its