From aedc88c09e0f261ecebbec14664c7a539e714141 Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Wed, 11 Mar 2026 18:10:19 -0700 Subject: [PATCH 1/7] feat: Add unified fluentui-react-native mono-package with subpath exports --- lage.config.mjs | 6 +- .../libraries/fluentui-react-native/README.md | 192 +++++++ .../fluentui-react-native/babel.config.js | 1 + .../fluentui-react-native/eslint.config.js | 3 + .../fluentui-react-native/package.json | 482 ++++++++++++++++++ .../fluentui-react-native/src/components.ts | 25 + .../fluentui-react-native/src/core.ts | 9 + .../fluentui-react-native/src/deprecated.ts | 8 + .../fluentui-react-native/src/experimental.ts | 17 + .../fluentui-react-native/src/theming.ts | 7 + .../fluentui-react-native/src/utils.ts | 4 + .../fluentui-react-native/update-exports.mts | 303 +++++++++++ scripts/src/tasks/lintPackage.ts | 21 +- scripts/src/utils/buildConfig.ts | 5 + yarn.lock | 115 ++++- 15 files changed, 1188 insertions(+), 10 deletions(-) create mode 100644 packages/libraries/fluentui-react-native/README.md create mode 100644 packages/libraries/fluentui-react-native/babel.config.js create mode 100644 packages/libraries/fluentui-react-native/eslint.config.js create mode 100644 packages/libraries/fluentui-react-native/package.json create mode 100644 packages/libraries/fluentui-react-native/src/components.ts create mode 100644 packages/libraries/fluentui-react-native/src/core.ts create mode 100644 packages/libraries/fluentui-react-native/src/deprecated.ts create mode 100644 packages/libraries/fluentui-react-native/src/experimental.ts create mode 100644 packages/libraries/fluentui-react-native/src/theming.ts create mode 100644 packages/libraries/fluentui-react-native/src/utils.ts create mode 100644 packages/libraries/fluentui-react-native/update-exports.mts diff --git a/lage.config.mjs b/lage.config.mjs index e5fb2a4e154..d5b420e6360 100644 --- a/lage.config.mjs +++ b/lage.config.mjs @@ -36,6 +36,10 @@ const config = { inputs: ['**/*', '!node_modules/**/*', '!dist/**/*', '!lib/**/*', '!lib-commonjs/**/*'], outputs: [], }, + 'check-exports': { + inputs: ['*', 'src/**/*'], + outputs: [], + }, test: { dependsOn: ['build-all'], inputs: [], @@ -57,7 +61,7 @@ const config = { // ── Pipeline aliases ─────────────────────────────────────────────────── 'repo-checks': ['lint-lockfile', 'format:check', 'check-publishing'], - buildci: ['build-all', 'test', 'lint', 'lint-package', 'repo-checks'], + buildci: ['build-all', 'test', 'lint', 'lint-package', 'check-exports', 'repo-checks'], // ── Worker tasks ─────────────────────────────────────────────────────── pack: { diff --git a/packages/libraries/fluentui-react-native/README.md b/packages/libraries/fluentui-react-native/README.md new file mode 100644 index 00000000000..b5e8ea18bf9 --- /dev/null +++ b/packages/libraries/fluentui-react-native/README.md @@ -0,0 +1,192 @@ +# fluentui-react-native + +Unified mono-package for [FluentUI React Native](https://github.com/microsoft/fluentui-react-native). Import any published package via a single dependency using subpath imports. + +## Installation + +```bash +yarn add fluentui-react-native +# or +npm install fluentui-react-native +``` + +## Usage + +The package provides **two levels of imports**: individual subpaths for precise access, and category barrels for convenience. + +### Individual subpaths (recommended) + +Every `@fluentui-react-native/*` package is available as a subpath — just drop the `@`: + +```ts +import { Button } from 'fluentui-react-native/button'; +import { ThemeProvider } from 'fluentui-react-native/theme'; +import { Avatar } from 'fluentui-react-native/avatar'; +import { Menu } from 'fluentui-react-native/menu'; +``` + +Each subpath re-exports exactly one package, so there are no name collisions and tree-shaking is optimal. + +### Category barrels + +For quick prototyping or when importing from many packages in the same category: + +```ts +import { Button, Avatar, Menu } from 'fluentui-react-native/components'; +import { ThemeProvider } from 'fluentui-react-native/core'; +import { appleTheme } from 'fluentui-react-native/theming'; +import { Spinner, Tooltip } from 'fluentui-react-native/experimental'; +``` + +Category barrels re-export all packages in a group. If two packages in the same category export the same symbol name, that symbol is excluded from the barrel (per ES module `export *` semantics). In that case, import from the individual subpath instead. + +**Available barrels**: `./components`, `./experimental`, `./core`, `./theming`, `./utils`, `./deprecated` + +### Migration + +Migrating from individual packages is a find-and-replace: + +```diff +-import { Button } from '@fluentui-react-native/button'; ++import { Button } from 'fluentui-react-native/button'; +``` + +The individual `@fluentui-react-native/*` packages continue to be published and versioned independently — existing consumers are not affected. + +## Package Structure + +### Category barrels + +| Barrel | Contains | Packages | +|--------|----------|----------| +| `./components` | Stable UI components | 25 | +| `./experimental` | Components under active development | 17 | +| `./core` | Framework, composition, slots, tokens | 9 | +| `./theming` | Platform themes and token definitions | 7 | +| `./utils` | Shared utilities | 4 | +| `./deprecated` | Legacy `@uifabricshared/*` packages | 8 | + +### Individual subpaths + +#### Components (25) + +| Subpath | Package | +|---------|---------| +| `./avatar` | `@fluentui-react-native/avatar` | +| `./badge` | `@fluentui-react-native/badge` | +| `./button` | `@fluentui-react-native/button` | +| `./callout` | `@fluentui-react-native/callout` | +| `./checkbox` | `@fluentui-react-native/checkbox` | +| `./chip` | `@fluentui-react-native/chip` | +| `./contextual-menu` | `@fluentui-react-native/contextual-menu` | +| `./divider` | `@fluentui-react-native/divider` | +| `./focus-trap-zone` | `@fluentui-react-native/focus-trap-zone` | +| `./focus-zone` | `@fluentui-react-native/focus-zone` | +| `./icon` | `@fluentui-react-native/icon` | +| `./input` | `@fluentui-react-native/input` | +| `./link` | `@fluentui-react-native/link` | +| `./menu` | `@fluentui-react-native/menu` | +| `./menu-button` | `@fluentui-react-native/menu-button` | +| `./notification` | `@fluentui-react-native/notification` | +| `./persona` | `@fluentui-react-native/persona` | +| `./persona-coin` | `@fluentui-react-native/persona-coin` | +| `./pressable` | `@fluentui-react-native/pressable` | +| `./radio-group` | `@fluentui-react-native/radio-group` | +| `./separator` | `@fluentui-react-native/separator` | +| `./stack` | `@fluentui-react-native/stack` | +| `./switch` | `@fluentui-react-native/switch` | +| `./tablist` | `@fluentui-react-native/tablist` | +| `./text` | `@fluentui-react-native/text` | + +#### Experimental (17) + +| Subpath | Package | +|---------|---------| +| `./drawer` | `@fluentui-react-native/drawer` | +| `./dropdown` | `@fluentui-react-native/dropdown` | +| `./experimental-activity-indicator` | `@fluentui-react-native/experimental-activity-indicator` | +| `./experimental-appearance-additions` | `@fluentui-react-native/experimental-appearance-additions` | +| `./experimental-avatar` | `@fluentui-react-native/experimental-avatar` | +| `./experimental-checkbox` | `@fluentui-react-native/experimental-checkbox` | +| `./experimental-expander` | `@fluentui-react-native/experimental-expander` | +| `./experimental-menu-button` | `@fluentui-react-native/experimental-menu-button` | +| `./experimental-native-date-picker` | `@fluentui-react-native/experimental-native-date-picker` | +| `./experimental-native-font-metrics` | `@fluentui-react-native/experimental-native-font-metrics` | +| `./experimental-shadow` | `@fluentui-react-native/experimental-shadow` | +| `./experimental-shimmer` | `@fluentui-react-native/experimental-shimmer` | +| `./overflow` | `@fluentui-react-native/overflow` | +| `./popover` | `@fluentui-react-native/popover` | +| `./spinner` | `@fluentui-react-native/spinner` | +| `./tooltip` | `@fluentui-react-native/tooltip` | +| `./vibrancy-view` | `@fluentui-react-native/vibrancy-view` | + +#### Core / Framework (9) + +| Subpath | Package | +|---------|---------| +| `./composition` | `@fluentui-react-native/composition` | +| `./framework` | `@fluentui-react-native/framework` | +| `./framework-base` | `@fluentui-react-native/framework-base` | +| `./theme` | `@fluentui-react-native/theme` | +| `./themed-stylesheet` | `@fluentui-react-native/themed-stylesheet` | +| `./use-slot` | `@fluentui-react-native/use-slot` | +| `./use-slots` | `@fluentui-react-native/use-slots` | +| `./use-styling` | `@fluentui-react-native/use-styling` | +| `./use-tokens` | `@fluentui-react-native/use-tokens` | + +#### Theming (7) + +| Subpath | Package | +|---------|---------| +| `./android-theme` | `@fluentui-react-native/android-theme` | +| `./apple-theme` | `@fluentui-react-native/apple-theme` | +| `./default-theme` | `@fluentui-react-native/default-theme` | +| `./theme-tokens` | `@fluentui-react-native/theme-tokens` | +| `./theme-types` | `@fluentui-react-native/theme-types` | +| `./theming-utils` | `@fluentui-react-native/theming-utils` | +| `./win32-theme` | `@fluentui-react-native/win32-theme` | + +#### Utilities (4) + +| Subpath | Package | +|---------|---------| +| `./adapters` | `@fluentui-react-native/adapters` | +| `./interactive-hooks` | `@fluentui-react-native/interactive-hooks` | +| `./styling-utils` | `@fluentui-react-native/styling-utils` | +| `./tokens` | `@fluentui-react-native/tokens` | + +#### Deprecated (8) + +| Subpath | Package | +|---------|---------| +| `./foundation-composable` | `@uifabricshared/foundation-composable` | +| `./foundation-compose` | `@uifabricshared/foundation-compose` | +| `./foundation-settings` | `@uifabricshared/foundation-settings` | +| `./foundation-tokens` | `@uifabricshared/foundation-tokens` | +| `./theme-registry` | `@uifabricshared/theme-registry` | +| `./themed-settings` | `@uifabricshared/themed-settings` | +| `./theming-ramp` | `@uifabricshared/theming-ramp` | +| `./theming-react-native` | `@uifabricshared/theming-react-native` | + +## Design + +- **ESM only** — all exports use `import` conditions (no CommonJS `require`). This ensures optimal tree-shaking. +- **`sideEffects: false`** — bundlers can safely eliminate unused re-exports. +- **Two import levels** — individual subpaths for precise control; category barrels for convenience. There is no top-level `import * from 'fluentui-react-native'` barrel. +- **Auto-generated** — all exports, dependencies, and source files are generated by `update-exports.mts`. Run `yarn update-exports` after adding a new package to the monorepo. +- **CI-enforced** — `yarn check-exports` runs in CI and fails if a publishable package is missing. + +## Maintainer Guide + +When adding a new package to the monorepo: + +1. Create the package as usual under `packages/` +2. Run `yarn update-exports` from this directory (or `yarn lage check-exports` will remind you) +3. Commit the generated `src/` files and updated `package.json` + +The script automatically: +- Discovers all publishable (non-private) packages under `packages/` +- Creates individual re-export files (`src//index.ts`) +- Creates category barrel files (`src//index.ts`) +- Updates `package.json` exports and dependencies fields +- Detects and removes stale entries for deleted packages diff --git a/packages/libraries/fluentui-react-native/babel.config.js b/packages/libraries/fluentui-react-native/babel.config.js new file mode 100644 index 00000000000..aa7d482ebf2 --- /dev/null +++ b/packages/libraries/fluentui-react-native/babel.config.js @@ -0,0 +1 @@ +module.exports = require('@fluentui-react-native/babel-config'); diff --git a/packages/libraries/fluentui-react-native/eslint.config.js b/packages/libraries/fluentui-react-native/eslint.config.js new file mode 100644 index 00000000000..c98098e0680 --- /dev/null +++ b/packages/libraries/fluentui-react-native/eslint.config.js @@ -0,0 +1,3 @@ +const baseConfig = require('@fluentui-react-native/eslint-config-rules'); + +module.exports = baseConfig; diff --git a/packages/libraries/fluentui-react-native/package.json b/packages/libraries/fluentui-react-native/package.json new file mode 100644 index 00000000000..2aecbcf8604 --- /dev/null +++ b/packages/libraries/fluentui-react-native/package.json @@ -0,0 +1,482 @@ +{ + "name": "fluentui-react-native", + "version": "1.0.0", + "description": "Unified mono-package for FluentUI React Native. Import any component via subpath: fluentui-react-native/button, fluentui-react-native/theme, etc.", + "homepage": "https://github.com/microsoft/fluentui-react-native", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/libraries/fluentui-react-native" + }, + "license": "MIT", + "author": "Microsoft ", + "sideEffects": false, + "type": "module", + "exports": { + "./components": { + "types": "./lib/components.d.ts", + "import": "./lib/components.js", + "default": "./src/components.ts" + }, + "./core": { + "types": "./lib/core.d.ts", + "import": "./lib/core.js", + "default": "./src/core.ts" + }, + "./deprecated": { + "types": "./lib/deprecated.d.ts", + "import": "./lib/deprecated.js", + "default": "./src/deprecated.ts" + }, + "./experimental": { + "types": "./lib/experimental.d.ts", + "import": "./lib/experimental.js", + "default": "./src/experimental.ts" + }, + "./theming": { + "types": "./lib/theming.d.ts", + "import": "./lib/theming.js", + "default": "./src/theming.ts" + }, + "./utils": { + "types": "./lib/utils.d.ts", + "import": "./lib/utils.js", + "default": "./src/utils.ts" + }, + "./adapters": { + "types": "./lib/adapters.d.ts", + "import": "./lib/adapters.js" + }, + "./android-theme": { + "types": "./lib/android-theme.d.ts", + "import": "./lib/android-theme.js" + }, + "./apple-theme": { + "types": "./lib/apple-theme.d.ts", + "import": "./lib/apple-theme.js" + }, + "./avatar": { + "types": "./lib/avatar.d.ts", + "import": "./lib/avatar.js" + }, + "./badge": { + "types": "./lib/badge.d.ts", + "import": "./lib/badge.js" + }, + "./button": { + "types": "./lib/button.d.ts", + "import": "./lib/button.js" + }, + "./callout": { + "types": "./lib/callout.d.ts", + "import": "./lib/callout.js" + }, + "./checkbox": { + "types": "./lib/checkbox.d.ts", + "import": "./lib/checkbox.js" + }, + "./chip": { + "types": "./lib/chip.d.ts", + "import": "./lib/chip.js" + }, + "./composition": { + "types": "./lib/composition.d.ts", + "import": "./lib/composition.js" + }, + "./contextual-menu": { + "types": "./lib/contextual-menu.d.ts", + "import": "./lib/contextual-menu.js" + }, + "./default-theme": { + "types": "./lib/default-theme.d.ts", + "import": "./lib/default-theme.js" + }, + "./divider": { + "types": "./lib/divider.d.ts", + "import": "./lib/divider.js" + }, + "./drawer": { + "types": "./lib/drawer.d.ts", + "import": "./lib/drawer.js" + }, + "./dropdown": { + "types": "./lib/dropdown.d.ts", + "import": "./lib/dropdown.js" + }, + "./experimental-activity-indicator": { + "types": "./lib/experimental-activity-indicator.d.ts", + "import": "./lib/experimental-activity-indicator.js" + }, + "./experimental-appearance-additions": { + "types": "./lib/experimental-appearance-additions.d.ts", + "import": "./lib/experimental-appearance-additions.js" + }, + "./experimental-avatar": { + "types": "./lib/experimental-avatar.d.ts", + "import": "./lib/experimental-avatar.js" + }, + "./experimental-checkbox": { + "types": "./lib/experimental-checkbox.d.ts", + "import": "./lib/experimental-checkbox.js" + }, + "./experimental-expander": { + "types": "./lib/experimental-expander.d.ts", + "import": "./lib/experimental-expander.js" + }, + "./experimental-menu-button": { + "types": "./lib/experimental-menu-button.d.ts", + "import": "./lib/experimental-menu-button.js" + }, + "./experimental-native-date-picker": { + "types": "./lib/experimental-native-date-picker.d.ts", + "import": "./lib/experimental-native-date-picker.js" + }, + "./experimental-native-font-metrics": { + "types": "./lib/experimental-native-font-metrics.d.ts", + "import": "./lib/experimental-native-font-metrics.js" + }, + "./experimental-shadow": { + "types": "./lib/experimental-shadow.d.ts", + "import": "./lib/experimental-shadow.js" + }, + "./experimental-shimmer": { + "types": "./lib/experimental-shimmer.d.ts", + "import": "./lib/experimental-shimmer.js" + }, + "./focus-trap-zone": { + "types": "./lib/focus-trap-zone.d.ts", + "import": "./lib/focus-trap-zone.js" + }, + "./focus-zone": { + "types": "./lib/focus-zone.d.ts", + "import": "./lib/focus-zone.js" + }, + "./foundation-composable": { + "types": "./lib/foundation-composable.d.ts", + "import": "./lib/foundation-composable.js" + }, + "./foundation-compose": { + "types": "./lib/foundation-compose.d.ts", + "import": "./lib/foundation-compose.js" + }, + "./foundation-settings": { + "types": "./lib/foundation-settings.d.ts", + "import": "./lib/foundation-settings.js" + }, + "./foundation-tokens": { + "types": "./lib/foundation-tokens.d.ts", + "import": "./lib/foundation-tokens.js" + }, + "./framework": { + "types": "./lib/framework.d.ts", + "import": "./lib/framework.js" + }, + "./framework-base": { + "types": "./lib/framework-base.d.ts", + "import": "./lib/framework-base.js" + }, + "./icon": { + "types": "./lib/icon.d.ts", + "import": "./lib/icon.js" + }, + "./input": { + "types": "./lib/input.d.ts", + "import": "./lib/input.js" + }, + "./interactive-hooks": { + "types": "./lib/interactive-hooks.d.ts", + "import": "./lib/interactive-hooks.js" + }, + "./link": { + "types": "./lib/link.d.ts", + "import": "./lib/link.js" + }, + "./menu": { + "types": "./lib/menu.d.ts", + "import": "./lib/menu.js" + }, + "./menu-button": { + "types": "./lib/menu-button.d.ts", + "import": "./lib/menu-button.js" + }, + "./notification": { + "types": "./lib/notification.d.ts", + "import": "./lib/notification.js" + }, + "./overflow": { + "types": "./lib/overflow.d.ts", + "import": "./lib/overflow.js" + }, + "./persona": { + "types": "./lib/persona.d.ts", + "import": "./lib/persona.js" + }, + "./persona-coin": { + "types": "./lib/persona-coin.d.ts", + "import": "./lib/persona-coin.js" + }, + "./popover": { + "types": "./lib/popover.d.ts", + "import": "./lib/popover.js" + }, + "./pressable": { + "types": "./lib/pressable.d.ts", + "import": "./lib/pressable.js" + }, + "./radio-group": { + "types": "./lib/radio-group.d.ts", + "import": "./lib/radio-group.js" + }, + "./separator": { + "types": "./lib/separator.d.ts", + "import": "./lib/separator.js" + }, + "./spinner": { + "types": "./lib/spinner.d.ts", + "import": "./lib/spinner.js" + }, + "./stack": { + "types": "./lib/stack.d.ts", + "import": "./lib/stack.js" + }, + "./styling-utils": { + "types": "./lib/styling-utils.d.ts", + "import": "./lib/styling-utils.js" + }, + "./switch": { + "types": "./lib/switch.d.ts", + "import": "./lib/switch.js" + }, + "./tablist": { + "types": "./lib/tablist.d.ts", + "import": "./lib/tablist.js" + }, + "./text": { + "types": "./lib/text.d.ts", + "import": "./lib/text.js" + }, + "./theme": { + "types": "./lib/theme.d.ts", + "import": "./lib/theme.js" + }, + "./theme-registry": { + "types": "./lib/theme-registry.d.ts", + "import": "./lib/theme-registry.js" + }, + "./theme-tokens": { + "types": "./lib/theme-tokens.d.ts", + "import": "./lib/theme-tokens.js" + }, + "./theme-types": { + "types": "./lib/theme-types.d.ts", + "import": "./lib/theme-types.js" + }, + "./themed-settings": { + "types": "./lib/themed-settings.d.ts", + "import": "./lib/themed-settings.js" + }, + "./themed-stylesheet": { + "types": "./lib/themed-stylesheet.d.ts", + "import": "./lib/themed-stylesheet.js" + }, + "./theming-ramp": { + "types": "./lib/theming-ramp.d.ts", + "import": "./lib/theming-ramp.js" + }, + "./theming-react-native": { + "types": "./lib/theming-react-native.d.ts", + "import": "./lib/theming-react-native.js" + }, + "./theming-utils": { + "types": "./lib/theming-utils.d.ts", + "import": "./lib/theming-utils.js" + }, + "./tokens": { + "types": "./lib/tokens.d.ts", + "import": "./lib/tokens.js" + }, + "./tooltip": { + "types": "./lib/tooltip.d.ts", + "import": "./lib/tooltip.js" + }, + "./use-slot": { + "types": "./lib/use-slot.d.ts", + "import": "./lib/use-slot.js" + }, + "./use-slots": { + "types": "./lib/use-slots.d.ts", + "import": "./lib/use-slots.js" + }, + "./use-styling": { + "types": "./lib/use-styling.d.ts", + "import": "./lib/use-styling.js" + }, + "./use-tokens": { + "types": "./lib/use-tokens.d.ts", + "import": "./lib/use-tokens.js" + }, + "./vibrancy-view": { + "types": "./lib/vibrancy-view.d.ts", + "import": "./lib/vibrancy-view.js" + }, + "./win32-theme": { + "types": "./lib/win32-theme.d.ts", + "import": "./lib/win32-theme.js" + } + }, + "scripts": { + "build": "node update-exports.mts", + "check-exports": "node update-exports.mts --check", + "clean": "fluentui-scripts clean", + "depcheck": "fluentui-scripts depcheck", + "format": "fluentui-scripts format", + "lint": "fluentui-scripts eslint", + "lint-package": "fluentui-scripts lint-package", + "update-exports": "node update-exports.mts" + }, + "dependencies": { + "@fluentui-react-native/adapters": "workspace:*", + "@fluentui-react-native/android-theme": "workspace:*", + "@fluentui-react-native/apple-theme": "workspace:*", + "@fluentui-react-native/avatar": "workspace:*", + "@fluentui-react-native/badge": "workspace:*", + "@fluentui-react-native/button": "workspace:*", + "@fluentui-react-native/callout": "workspace:*", + "@fluentui-react-native/checkbox": "workspace:*", + "@fluentui-react-native/chip": "workspace:*", + "@fluentui-react-native/composition": "workspace:*", + "@fluentui-react-native/contextual-menu": "workspace:*", + "@fluentui-react-native/default-theme": "workspace:*", + "@fluentui-react-native/divider": "workspace:*", + "@fluentui-react-native/drawer": "workspace:*", + "@fluentui-react-native/dropdown": "workspace:*", + "@fluentui-react-native/experimental-activity-indicator": "workspace:*", + "@fluentui-react-native/experimental-appearance-additions": "workspace:*", + "@fluentui-react-native/experimental-avatar": "workspace:*", + "@fluentui-react-native/experimental-checkbox": "workspace:*", + "@fluentui-react-native/experimental-expander": "workspace:*", + "@fluentui-react-native/experimental-menu-button": "workspace:*", + "@fluentui-react-native/experimental-native-date-picker": "workspace:*", + "@fluentui-react-native/experimental-native-font-metrics": "workspace:*", + "@fluentui-react-native/experimental-shadow": "workspace:*", + "@fluentui-react-native/experimental-shimmer": "workspace:*", + "@fluentui-react-native/focus-trap-zone": "workspace:*", + "@fluentui-react-native/focus-zone": "workspace:*", + "@fluentui-react-native/framework": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", + "@fluentui-react-native/icon": "workspace:*", + "@fluentui-react-native/input": "workspace:*", + "@fluentui-react-native/interactive-hooks": "workspace:*", + "@fluentui-react-native/link": "workspace:*", + "@fluentui-react-native/menu": "workspace:*", + "@fluentui-react-native/menu-button": "workspace:*", + "@fluentui-react-native/notification": "workspace:*", + "@fluentui-react-native/overflow": "workspace:*", + "@fluentui-react-native/persona": "workspace:*", + "@fluentui-react-native/persona-coin": "workspace:*", + "@fluentui-react-native/popover": "workspace:*", + "@fluentui-react-native/pressable": "workspace:*", + "@fluentui-react-native/radio-group": "workspace:*", + "@fluentui-react-native/separator": "workspace:*", + "@fluentui-react-native/spinner": "workspace:*", + "@fluentui-react-native/stack": "workspace:*", + "@fluentui-react-native/styling-utils": "workspace:*", + "@fluentui-react-native/switch": "workspace:*", + "@fluentui-react-native/tablist": "workspace:*", + "@fluentui-react-native/text": "workspace:*", + "@fluentui-react-native/theme": "workspace:*", + "@fluentui-react-native/theme-tokens": "workspace:*", + "@fluentui-react-native/theme-types": "workspace:*", + "@fluentui-react-native/themed-stylesheet": "workspace:*", + "@fluentui-react-native/theming-utils": "workspace:*", + "@fluentui-react-native/tokens": "workspace:*", + "@fluentui-react-native/tooltip": "workspace:*", + "@fluentui-react-native/use-slot": "workspace:*", + "@fluentui-react-native/use-slots": "workspace:*", + "@fluentui-react-native/use-styling": "workspace:*", + "@fluentui-react-native/use-tokens": "workspace:*", + "@fluentui-react-native/vibrancy-view": "workspace:*", + "@fluentui-react-native/win32-theme": "workspace:*", + "@uifabricshared/foundation-composable": "workspace:*", + "@uifabricshared/foundation-compose": "workspace:*", + "@uifabricshared/foundation-settings": "workspace:*", + "@uifabricshared/foundation-tokens": "workspace:*", + "@uifabricshared/theme-registry": "workspace:*", + "@uifabricshared/themed-settings": "workspace:*", + "@uifabricshared/theming-ramp": "workspace:*", + "@uifabricshared/theming-react-native": "workspace:*" + }, + "devDependencies": { + "@fluentui-react-native/babel-config": "workspace:*", + "@fluentui-react-native/eslint-config-rules": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", + "@fluentui-react-native/scripts": "workspace:*", + "@react-native-community/cli": "^20.0.0", + "@react-native-community/cli-platform-android": "^20.0.0", + "@react-native-community/cli-platform-ios": "^20.0.0", + "@react-native/metro-config": "^0.81.0", + "@types/react": "~19.1.4", + "react": "19.1.4", + "react-native": "^0.81.6", + "react-native-macos": "^0.81.0", + "react-native-svg": "^15.12.1", + "react-native-windows": "^0.81.0", + "workspace-tools": "^0.26.3" + }, + "peerDependencies": { + "@office-iss/react-native-win32": "^0.74.0", + "@types/react": "~18.2.0 || ~19.0.0 || ~19.1.4", + "react": "18.2.0 || 19.0.0 || 19.1.4", + "react-native": "^0.73.0 || ^0.74.0 || ^0.78.0 || ^0.81.6", + "react-native-macos": "^0.73.0 || ^0.74.0 || ^0.78.0 || ^0.81.0", + "react-native-svg": ">=15.0.0 <15.13.0 || >=15.4.0 <15.13.0 || ^15.11.2 || ^15.12.1", + "react-native-windows": "^0.73.0 || ^0.74.0 || ^0.78.0 || ^0.81.0" + }, + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "@types/react": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-svg": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, + "furn": { + "depcheck": { + "ignoreMatches": [ + "@fluentui-react-native/*", + "@uifabricshared/*", + "@fluentui-react-native/kit-config", + "@react-native-community/cli", + "@react-native-community/cli-platform-android", + "@react-native-community/cli-platform-ios", + "@react-native/metro-config", + "workspace-tools" + ] + } + }, + "rnx-kit": { + "kitType": "library", + "alignDeps": { + "capabilities": [ + "core", + "core-android", + "core-ios", + "core-macos", + "core-windows", + "react", + "svg", + "tools-core" + ] + }, + "extends": "@fluentui-react-native/kit-config" + } +} diff --git a/packages/libraries/fluentui-react-native/src/components.ts b/packages/libraries/fluentui-react-native/src/components.ts new file mode 100644 index 00000000000..26eaced33be --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/components.ts @@ -0,0 +1,25 @@ +export * from '@fluentui-react-native/avatar'; +export * from '@fluentui-react-native/badge'; +export * from '@fluentui-react-native/button'; +export * from '@fluentui-react-native/callout'; +export * from '@fluentui-react-native/checkbox'; +export * from '@fluentui-react-native/chip'; +export * from '@fluentui-react-native/contextual-menu'; +export * from '@fluentui-react-native/divider'; +export * from '@fluentui-react-native/focus-trap-zone'; +export * from '@fluentui-react-native/focus-zone'; +export * from '@fluentui-react-native/icon'; +export * from '@fluentui-react-native/input'; +export * from '@fluentui-react-native/link'; +export * from '@fluentui-react-native/menu'; +export * from '@fluentui-react-native/menu-button'; +export * from '@fluentui-react-native/notification'; +export * from '@fluentui-react-native/persona'; +export * from '@fluentui-react-native/persona-coin'; +export * from '@fluentui-react-native/pressable'; +export * from '@fluentui-react-native/radio-group'; +export * from '@fluentui-react-native/separator'; +export * from '@fluentui-react-native/stack'; +export * from '@fluentui-react-native/switch'; +export * from '@fluentui-react-native/tablist'; +export * from '@fluentui-react-native/text'; diff --git a/packages/libraries/fluentui-react-native/src/core.ts b/packages/libraries/fluentui-react-native/src/core.ts new file mode 100644 index 00000000000..12d83e2770e --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/core.ts @@ -0,0 +1,9 @@ +export * from '@fluentui-react-native/composition'; +export * from '@fluentui-react-native/framework'; +export * from '@fluentui-react-native/framework-base'; +export * from '@fluentui-react-native/theme'; +export * from '@fluentui-react-native/themed-stylesheet'; +export * from '@fluentui-react-native/use-slot'; +export * from '@fluentui-react-native/use-slots'; +export * from '@fluentui-react-native/use-styling'; +export * from '@fluentui-react-native/use-tokens'; diff --git a/packages/libraries/fluentui-react-native/src/deprecated.ts b/packages/libraries/fluentui-react-native/src/deprecated.ts new file mode 100644 index 00000000000..3650f0b48c2 --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/deprecated.ts @@ -0,0 +1,8 @@ +export * from '@uifabricshared/foundation-composable'; +export * from '@uifabricshared/foundation-compose'; +export * from '@uifabricshared/foundation-settings'; +export * from '@uifabricshared/foundation-tokens'; +export * from '@uifabricshared/theme-registry'; +export * from '@uifabricshared/themed-settings'; +export * from '@uifabricshared/theming-ramp'; +export * from '@uifabricshared/theming-react-native'; diff --git a/packages/libraries/fluentui-react-native/src/experimental.ts b/packages/libraries/fluentui-react-native/src/experimental.ts new file mode 100644 index 00000000000..789e9dfed36 --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/experimental.ts @@ -0,0 +1,17 @@ +export * from '@fluentui-react-native/drawer'; +export * from '@fluentui-react-native/dropdown'; +export * from '@fluentui-react-native/experimental-activity-indicator'; +export * from '@fluentui-react-native/experimental-appearance-additions'; +export * from '@fluentui-react-native/experimental-avatar'; +export * from '@fluentui-react-native/experimental-checkbox'; +export * from '@fluentui-react-native/experimental-expander'; +export * from '@fluentui-react-native/experimental-menu-button'; +export * from '@fluentui-react-native/experimental-native-date-picker'; +export * from '@fluentui-react-native/experimental-native-font-metrics'; +export * from '@fluentui-react-native/experimental-shadow'; +export * from '@fluentui-react-native/experimental-shimmer'; +export * from '@fluentui-react-native/overflow'; +export * from '@fluentui-react-native/popover'; +export * from '@fluentui-react-native/spinner'; +export * from '@fluentui-react-native/tooltip'; +export * from '@fluentui-react-native/vibrancy-view'; diff --git a/packages/libraries/fluentui-react-native/src/theming.ts b/packages/libraries/fluentui-react-native/src/theming.ts new file mode 100644 index 00000000000..f1c4957e34c --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/theming.ts @@ -0,0 +1,7 @@ +export * from '@fluentui-react-native/android-theme'; +export * from '@fluentui-react-native/apple-theme'; +export * from '@fluentui-react-native/default-theme'; +export * from '@fluentui-react-native/theme-tokens'; +export * from '@fluentui-react-native/theme-types'; +export * from '@fluentui-react-native/theming-utils'; +export * from '@fluentui-react-native/win32-theme'; diff --git a/packages/libraries/fluentui-react-native/src/utils.ts b/packages/libraries/fluentui-react-native/src/utils.ts new file mode 100644 index 00000000000..e5c4f91154f --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/utils.ts @@ -0,0 +1,4 @@ +export * from '@fluentui-react-native/adapters'; +export * from '@fluentui-react-native/interactive-hooks'; +export * from '@fluentui-react-native/styling-utils'; +export * from '@fluentui-react-native/tokens'; diff --git a/packages/libraries/fluentui-react-native/update-exports.mts b/packages/libraries/fluentui-react-native/update-exports.mts new file mode 100644 index 00000000000..a61b697a833 --- /dev/null +++ b/packages/libraries/fluentui-react-native/update-exports.mts @@ -0,0 +1,303 @@ +/** + * Auto-generates subpath exports for the fluentui-react-native mono-package. + * + * Source layout (checked into git): + * src/components.ts — category barrel re-exporting all stable component packages + * src/experimental.ts — category barrel re-exporting all experimental packages + * src/core.ts — category barrel re-exporting framework packages + * src/theming.ts — category barrel re-exporting theme packages + * src/utils.ts — category barrel re-exporting utility packages + * src/deprecated.ts — category barrel re-exporting legacy @uifabricshared packages + * + * Build output (generated into lib/, gitignored): + * lib/.js + .d.ts — compiled from src/ barrels + * lib/.js + .d.ts — individual re-export for each package + * + * Usage: + * node update-exports.mts # Generate/update src/, lib/, and package.json + * node update-exports.mts --check # Verify src/ and package.json are up-to-date (CI mode) + */ + +import { existsSync, mkdirSync, readFileSync, readdirSync, rmSync, writeFileSync } from 'node:fs'; +import { dirname, join, relative } from 'node:path'; +import { parseArgs } from 'node:util'; +import { getAllPackageJsonFiles } from 'workspace-tools'; + +const SCRIPT_DIR = import.meta.dirname; +const REPO_ROOT = join(SCRIPT_DIR, '..', '..', '..'); +const SRC_DIR = join(SCRIPT_DIR, 'src'); +const LIB_DIR = join(SCRIPT_DIR, 'lib'); +const PKG_JSON_PATH = join(SCRIPT_DIR, 'package.json'); + +/** Category definitions — maps a directory prefix to a category barrel name. */ +const CATEGORIES: { prefix: string; barrel: string }[] = [ + { prefix: 'packages/components/', barrel: 'components' }, + { prefix: 'packages/experimental/', barrel: 'experimental' }, + { prefix: 'packages/framework/', barrel: 'core' }, + { prefix: 'packages/framework-base/', barrel: 'core' }, + { prefix: 'packages/theming/', barrel: 'theming' }, + { prefix: 'packages/utils/', barrel: 'utils' }, + { prefix: 'packages/deprecated/', barrel: 'deprecated' }, +]; + +/** Packages to always exclude (by npm package name). */ +const EXCLUDE_PACKAGES = new Set([ + 'fluentui-react-native', // ourselves + '@fluentui/react-native', // the existing barrel package + '@fluentui-react-native/dependency-profiles', // meta-package for version alignment + '@fluentui-react-native/codemods', // codemod tooling +]); + +interface PackageManifest { + name: string; + version: string; + private?: boolean; +} + +interface SubpathEntry { + subpath: string; + packageName: string; + category: string; +} + +function deriveSubpath(packageName: string): string { + const parts = packageName.split('/'); + return parts[parts.length - 1]; +} + +/** Discover all publishable packages that should be re-exported. */ +function discoverPackages(): SubpathEntry[] { + const entries: SubpathEntry[] = []; + const seenSubpaths = new Map(); + + for (const manifestPath of getAllPackageJsonFiles(PKG_JSON_PATH)?.sort() ?? []) { + const manifest = JSON.parse(readFileSync(manifestPath, 'utf-8')) as PackageManifest; + + if (manifest.private) continue; + if (!manifest.name || !manifest.version) continue; + if (EXCLUDE_PACKAGES.has(manifest.name)) continue; + + const relPath = relative(REPO_ROOT, dirname(manifestPath)).replace(/\\/g, '/'); + const relPathSlash = relPath + '/'; + const matchedCategory = CATEGORIES.find((cat) => relPathSlash.startsWith(cat.prefix)); + if (!matchedCategory) continue; + + const subpath = deriveSubpath(manifest.name); + + if (seenSubpaths.has(subpath)) { + throw new Error( + `Subpath collision: "${subpath}" is mapped by both "${seenSubpaths.get(subpath)}" and "${manifest.name}"`, + ); + } + seenSubpaths.set(subpath, manifest.name); + + entries.push({ subpath, packageName: manifest.name, category: matchedCategory.barrel }); + } + + const barrelNames = new Set(CATEGORIES.map((c) => c.barrel)); + for (const entry of entries) { + if (barrelNames.has(entry.subpath)) { + throw new Error( + `Subpath "${entry.subpath}" (from ${entry.packageName}) collides with category barrel name "${entry.subpath}"`, + ); + } + } + + return entries.sort((a, b) => a.subpath.localeCompare(b.subpath)); +} + +/** Group entries by category barrel name. */ +function groupByCategory(entries: SubpathEntry[]): Map { + const barrels = new Map(); + for (const entry of entries) { + const group = barrels.get(entry.category) ?? []; + group.push(entry); + barrels.set(entry.category, group); + } + return barrels; +} + +// ── Expected state builders ──────────────────────────────────────────────────── + +/** Build the expected src/ files (category barrels only — checked into git). */ +function generateSrcFiles(barrels: Map): Map { + const files = new Map(); + for (const [barrelName, barrelEntries] of [...barrels].sort(([a], [b]) => a.localeCompare(b))) { + const lines = barrelEntries.map((e) => `export * from '${e.packageName}';`); + files.set(`${barrelName}.ts`, lines.join('\n') + '\n'); + } + return files; +} + +/** Build the expected lib/ files (category barrels + individual subpaths). */ +function generateLibFiles(entries: SubpathEntry[], barrels: Map): Map { + const files = new Map(); + + // Individual subpath files + for (const { subpath, packageName } of entries) { + const reexport = `export * from '${packageName}';\n`; + files.set(`${subpath}.js`, reexport); + files.set(`${subpath}.d.ts`, reexport); + } + + // Category barrel files + for (const [barrelName, barrelEntries] of barrels) { + const reexport = barrelEntries.map((e) => `export * from '${e.packageName}';`).join('\n') + '\n'; + files.set(`${barrelName}.js`, reexport); + files.set(`${barrelName}.d.ts`, reexport); + } + + return files; +} + +/** Build the package.json "exports" map. */ +function generateExports(entries: SubpathEntry[], barrels: Map): Record> { + const exports: Record> = {}; + + // Category barrels (have source files in src/) + for (const barrel of [...barrels.keys()].sort()) { + exports[`./${barrel}`] = { + types: `./lib/${barrel}.d.ts`, + import: `./lib/${barrel}.js`, + default: `./src/${barrel}.ts`, + }; + } + + // Individual subpaths (lib-only, no src/ file) + for (const { subpath } of entries) { + exports[`./${subpath}`] = { + types: `./lib/${subpath}.d.ts`, + import: `./lib/${subpath}.js`, + }; + } + return exports; +} + +/** Build the package.json "dependencies" map. */ +function generateDependencies(entries: SubpathEntry[]): Record { + const deps: Record = {}; + for (const { packageName } of entries) { + deps[packageName] = 'workspace:*'; + } + return deps; +} + +// ── Main ─────────────────────────────────────────────────────────────────────── + +const { values: args } = parseArgs({ options: { check: { type: 'boolean', default: false } } }); +const isCheck = args.check; + +const entries = discoverPackages(); +const barrels = groupByCategory(entries); +console.log(`Found ${entries.length} packages in ${barrels.size} categories`); + +const expectedSrcFiles = generateSrcFiles(barrels); +const expectedLibFiles = generateLibFiles(entries, barrels); +const expectedExports = generateExports(entries, barrels); +const expectedDeps = generateDependencies(entries); + +// Read current state +const pkgJson = JSON.parse(readFileSync(PKG_JSON_PATH, 'utf-8')); +const currentExports = pkgJson.exports || {}; +const currentDeps = pkgJson.dependencies || {}; + +const diffs: string[] = []; + +// Check src/ files (the checked-in source of truth) +for (const [relPath, expectedContent] of expectedSrcFiles) { + const fullPath = join(SRC_DIR, relPath); + const currentContent = existsSync(fullPath) ? readFileSync(fullPath, 'utf-8') : null; + if (currentContent !== expectedContent) { + diffs.push(`src/${relPath} ${currentContent === null ? 'missing' : 'differs'}`); + } +} + +// Check for stale files in src/ +if (existsSync(SRC_DIR)) { + for (const entry of readdirSync(SRC_DIR, { withFileTypes: true })) { + if (entry.isDirectory()) { + diffs.push(`src/${entry.name}/ is stale (unexpected directory)`); + } else if (entry.isFile() && !expectedSrcFiles.has(entry.name)) { + diffs.push(`src/${entry.name} is stale (no matching category)`); + } + } +} + +// Check exports field +if (JSON.stringify(currentExports) !== JSON.stringify(expectedExports)) { + diffs.push('package.json "exports" field differs from expected'); +} + +// Check dependencies field +if (JSON.stringify(currentDeps) !== JSON.stringify(expectedDeps)) { + diffs.push('package.json "dependencies" field differs from expected'); +} + +if (isCheck) { + if (diffs.length > 0) { + console.error('\nOut-of-sync items:'); + for (const diff of diffs) { + console.error(` ✗ ${diff}`); + } + console.error('\n❌ Exports are out of sync. Run `yarn update-exports` to fix.'); + process.exit(1); + } else { + console.log('✅ Exports are up to date.'); + process.exit(0); + } +} + +// ── Write mode ───────────────────────────────────────────────────────────────── + +if (diffs.length === 0 && !isCheck) { + // Even if src/ + package.json are in sync, always regenerate lib/ (this is the build) +} + +// Ensure directories exist +if (!existsSync(SRC_DIR)) { + mkdirSync(SRC_DIR, { recursive: true }); +} +if (!existsSync(LIB_DIR)) { + mkdirSync(LIB_DIR, { recursive: true }); +} + +// Write src/ files (category barrels) +for (const [relPath, content] of expectedSrcFiles) { + writeFileSync(join(SRC_DIR, relPath), content); +} + +// Clean stale src/ files +for (const entry of readdirSync(SRC_DIR, { withFileTypes: true })) { + if (entry.isDirectory()) { + rmSync(join(SRC_DIR, entry.name), { recursive: true }); + } else if (entry.isFile() && !expectedSrcFiles.has(entry.name)) { + rmSync(join(SRC_DIR, entry.name)); + console.log(` Removed stale: src/${entry.name}`); + } +} + +// Write lib/ files (category barrels + individual subpaths) +for (const [relPath, content] of expectedLibFiles) { + writeFileSync(join(LIB_DIR, relPath), content); +} + +// Clean stale lib/ files +for (const entry of readdirSync(LIB_DIR, { withFileTypes: true })) { + if (entry.isDirectory()) { + rmSync(join(LIB_DIR, entry.name), { recursive: true }); + } else if (entry.isFile() && !expectedLibFiles.has(entry.name)) { + rmSync(join(LIB_DIR, entry.name)); + console.log(` Removed stale: lib/${entry.name}`); + } +} + +// Update package.json +pkgJson.exports = expectedExports; +pkgJson.dependencies = expectedDeps; +writeFileSync(PKG_JSON_PATH, JSON.stringify(pkgJson, null, 2) + '\n'); + +// Print summary +console.log(`\n✅ Generated ${barrels.size} src/ barrels + ${expectedLibFiles.size / 2} lib/ subpaths\n`); +for (const [barrelName, barrelEntries] of [...barrels].sort(([a], [b]) => a.localeCompare(b))) { + console.log(` ./${barrelName} (${barrelEntries.length} packages)`); +} diff --git a/scripts/src/tasks/lintPackage.ts b/scripts/src/tasks/lintPackage.ts index 3904a36997e..592bb77d142 100644 --- a/scripts/src/tasks/lintPackage.ts +++ b/scripts/src/tasks/lintPackage.ts @@ -375,9 +375,12 @@ export class LintPackageCommand extends Command { if (updated.import) { const importInSrc = updated.import.startsWith('./src'); const defaultExport = importInSrc ? updated.import : updated.import.replace(esmDir, 'src').replace(/\.js$/, '.ts'); - if (!updated.default || updated.default !== defaultExport) { - errors.push(`'default' entry in exports does not match the expected default export`); - updated.default = defaultExport; + const defaultExportPath = path.resolve(this.projRoot.root, defaultExport); + if (fs.existsSync(defaultExportPath)) { + if (!updated.default || updated.default !== defaultExport) { + errors.push(`'default' entry in exports does not match the expected default export`); + updated.default = defaultExport; + } } } this.errorIf(errors.length > 0, errors.join('\n'), () => { @@ -409,10 +412,14 @@ export class LintPackageCommand extends Command { const exports = manifest.exports; if (exports) { const defaultExport = exports['.']; - // this is really only ok for packages that only have a single build output and no types like a config package - const validStringExport = typeof defaultExport === 'string' && !(main && module && main !== module && manifest.types === undefined); - if (typeof defaultExport !== 'string' || !validStringExport) { - this.validateExportsGroup(manifest, '.', true, buildConfig); + // Only validate the "." export group if it exists, or if main/module fields imply one should exist. + // Subpath-only packages (no main, no module, no ".") intentionally omit a barrel export. + if (defaultExport !== undefined || main || module) { + // this is really only ok for packages that only have a single build output and no types like a config package + const validStringExport = typeof defaultExport === 'string' && !(main && module && main !== module && manifest.types === undefined); + if (typeof defaultExport !== 'string' || !validStringExport) { + this.validateExportsGroup(manifest, '.', true, buildConfig); + } } for (const key of Object.keys(exports)) { if (key !== '.') { diff --git a/scripts/src/utils/buildConfig.ts b/scripts/src/utils/buildConfig.ts index 6d32cf04e9a..d3ed2463fb2 100644 --- a/scripts/src/utils/buildConfig.ts +++ b/scripts/src/utils/buildConfig.ts @@ -62,6 +62,11 @@ function getTypescriptBuildConfig( cjsScript = getScript(options, cjsDir, !isModule, 'commonjs'); esmScript = getScript(options, esmDir, isModule, 'esnext'); checkScript = options.noEmit ? engine : ''; + + // ESM-only packages (type: module with no CJS entry point) should not generate a CJS build + if (isModule && !projRoot.manifest.main) { + cjsScript = ''; + } } } return { engine, cjsDir, esmDir, cjsScript, esmScript, checkScript, extraArgs }; diff --git a/yarn.lock b/yarn.lock index 9a16db481b9..bc104222e33 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4888,7 +4888,7 @@ __metadata: languageName: unknown linkType: soft -"@fluentui-react-native/popover@workspace:packages/experimental/Popover": +"@fluentui-react-native/popover@workspace:*, @fluentui-react-native/popover@workspace:packages/experimental/Popover": version: 0.0.0-use.local resolution: "@fluentui-react-native/popover@workspace:packages/experimental/Popover" dependencies: @@ -10991,7 +10991,7 @@ __metadata: languageName: unknown linkType: soft -"@uifabricshared/theming-react-native@workspace:packages/deprecated/theming-react-native": +"@uifabricshared/theming-react-native@workspace:*, @uifabricshared/theming-react-native@workspace:packages/deprecated/theming-react-native": version: 0.0.0-use.local resolution: "@uifabricshared/theming-react-native@workspace:packages/deprecated/theming-react-native" dependencies: @@ -15877,6 +15877,117 @@ __metadata: languageName: node linkType: hard +"fluentui-react-native@workspace:packages/libraries/fluentui-react-native": + version: 0.0.0-use.local + resolution: "fluentui-react-native@workspace:packages/libraries/fluentui-react-native" + dependencies: + "@fluentui-react-native/adapters": "workspace:*" + "@fluentui-react-native/android-theme": "workspace:*" + "@fluentui-react-native/apple-theme": "workspace:*" + "@fluentui-react-native/avatar": "workspace:*" + "@fluentui-react-native/babel-config": "workspace:*" + "@fluentui-react-native/badge": "workspace:*" + "@fluentui-react-native/button": "workspace:*" + "@fluentui-react-native/callout": "workspace:*" + "@fluentui-react-native/checkbox": "workspace:*" + "@fluentui-react-native/chip": "workspace:*" + "@fluentui-react-native/composition": "workspace:*" + "@fluentui-react-native/contextual-menu": "workspace:*" + "@fluentui-react-native/default-theme": "workspace:*" + "@fluentui-react-native/divider": "workspace:*" + "@fluentui-react-native/drawer": "workspace:*" + "@fluentui-react-native/dropdown": "workspace:*" + "@fluentui-react-native/eslint-config-rules": "workspace:*" + "@fluentui-react-native/experimental-activity-indicator": "workspace:*" + "@fluentui-react-native/experimental-appearance-additions": "workspace:*" + "@fluentui-react-native/experimental-avatar": "workspace:*" + "@fluentui-react-native/experimental-checkbox": "workspace:*" + "@fluentui-react-native/experimental-expander": "workspace:*" + "@fluentui-react-native/experimental-menu-button": "workspace:*" + "@fluentui-react-native/experimental-native-date-picker": "workspace:*" + "@fluentui-react-native/experimental-native-font-metrics": "workspace:*" + "@fluentui-react-native/experimental-shadow": "workspace:*" + "@fluentui-react-native/experimental-shimmer": "workspace:*" + "@fluentui-react-native/focus-trap-zone": "workspace:*" + "@fluentui-react-native/focus-zone": "workspace:*" + "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" + "@fluentui-react-native/icon": "workspace:*" + "@fluentui-react-native/input": "workspace:*" + "@fluentui-react-native/interactive-hooks": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" + "@fluentui-react-native/link": "workspace:*" + "@fluentui-react-native/menu": "workspace:*" + "@fluentui-react-native/menu-button": "workspace:*" + "@fluentui-react-native/notification": "workspace:*" + "@fluentui-react-native/overflow": "workspace:*" + "@fluentui-react-native/persona": "workspace:*" + "@fluentui-react-native/persona-coin": "workspace:*" + "@fluentui-react-native/popover": "workspace:*" + "@fluentui-react-native/pressable": "workspace:*" + "@fluentui-react-native/radio-group": "workspace:*" + "@fluentui-react-native/scripts": "workspace:*" + "@fluentui-react-native/separator": "workspace:*" + "@fluentui-react-native/spinner": "workspace:*" + "@fluentui-react-native/stack": "workspace:*" + "@fluentui-react-native/styling-utils": "workspace:*" + "@fluentui-react-native/switch": "workspace:*" + "@fluentui-react-native/tablist": "workspace:*" + "@fluentui-react-native/text": "workspace:*" + "@fluentui-react-native/theme": "workspace:*" + "@fluentui-react-native/theme-tokens": "workspace:*" + "@fluentui-react-native/theme-types": "workspace:*" + "@fluentui-react-native/themed-stylesheet": "workspace:*" + "@fluentui-react-native/theming-utils": "workspace:*" + "@fluentui-react-native/tokens": "workspace:*" + "@fluentui-react-native/tooltip": "workspace:*" + "@fluentui-react-native/use-slot": "workspace:*" + "@fluentui-react-native/use-slots": "workspace:*" + "@fluentui-react-native/use-styling": "workspace:*" + "@fluentui-react-native/use-tokens": "workspace:*" + "@fluentui-react-native/vibrancy-view": "workspace:*" + "@fluentui-react-native/win32-theme": "workspace:*" + "@react-native-community/cli": "npm:^20.0.0" + "@react-native-community/cli-platform-android": "npm:^20.0.0" + "@react-native-community/cli-platform-ios": "npm:^20.0.0" + "@react-native/metro-config": "npm:^0.81.0" + "@types/react": "npm:~19.1.4" + "@uifabricshared/foundation-composable": "workspace:*" + "@uifabricshared/foundation-compose": "workspace:*" + "@uifabricshared/foundation-settings": "workspace:*" + "@uifabricshared/foundation-tokens": "workspace:*" + "@uifabricshared/theme-registry": "workspace:*" + "@uifabricshared/themed-settings": "workspace:*" + "@uifabricshared/theming-ramp": "workspace:*" + "@uifabricshared/theming-react-native": "workspace:*" + react: "npm:19.1.4" + react-native: "npm:^0.81.6" + react-native-macos: "npm:^0.81.0" + react-native-svg: "npm:^15.12.1" + react-native-windows: "npm:^0.81.0" + workspace-tools: "npm:^0.26.3" + peerDependencies: + "@office-iss/react-native-win32": ^0.74.0 + "@types/react": ~18.2.0 || ~19.0.0 || ~19.1.4 + react: 18.2.0 || 19.0.0 || 19.1.4 + react-native: ^0.73.0 || ^0.74.0 || ^0.78.0 || ^0.81.6 + react-native-macos: ^0.73.0 || ^0.74.0 || ^0.78.0 || ^0.81.0 + react-native-svg: ">=15.0.0 <15.13.0 || >=15.4.0 <15.13.0 || ^15.11.2 || ^15.12.1" + react-native-windows: ^0.73.0 || ^0.74.0 || ^0.78.0 || ^0.81.0 + peerDependenciesMeta: + "@office-iss/react-native-win32": + optional: true + "@types/react": + optional: true + react-native-macos: + optional: true + react-native-svg: + optional: true + react-native-windows: + optional: true + languageName: unknown + linkType: soft + "fn.name@npm:1.x.x": version: 1.1.0 resolution: "fn.name@npm:1.1.0" From 9a4c0784a63d10cb188271cb3b1b476f5c89cb62 Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Wed, 11 Mar 2026 20:37:02 -0700 Subject: [PATCH 2/7] feat: Add migrate-to-mono-package codemod with barrel decomposition - New jscodeshift transform: migrate-to-mono-package - Rewrites @fluentui-react-native/* and @uifabricshared/* to fluentui-react-native/* - Decomposes @fluentui/react-native barrel into per-package subpath imports - Replaces yargs with Node built-in parseArgs - Includes test fixtures covering scoped, barrel, require(), and skip cases --- packages/codemods/package.json | 3 +- packages/codemods/src/index.ts | 4 +- packages/codemods/src/transform.ts | 69 ++- .../migrate-to-mono-package.input.tsx | 38 ++ .../migrate-to-mono-package.output.tsx | 42 ++ .../__tests__/migrate-to-mono-package.test.ts | 7 + .../src/transforms/migrate-package-json.ts | 141 ++++++ .../src/transforms/migrate-to-mono-package.ts | 467 ++++++++++++++++++ .../src/transforms/mono-package-constants.ts | 82 +++ .../fluentui-react-native/create-pr.sh | 63 +++ yarn.lock | 3 +- 11 files changed, 889 insertions(+), 30 deletions(-) create mode 100644 packages/codemods/src/transforms/__testfixtures__/migrate-to-mono-package.input.tsx create mode 100644 packages/codemods/src/transforms/__testfixtures__/migrate-to-mono-package.output.tsx create mode 100644 packages/codemods/src/transforms/__tests__/migrate-to-mono-package.test.ts create mode 100644 packages/codemods/src/transforms/migrate-package-json.ts create mode 100644 packages/codemods/src/transforms/migrate-to-mono-package.ts create mode 100644 packages/codemods/src/transforms/mono-package-constants.ts create mode 100644 packages/libraries/fluentui-react-native/create-pr.sh diff --git a/packages/codemods/package.json b/packages/codemods/package.json index d5fb6df4307..0b4565175ff 100644 --- a/packages/codemods/package.json +++ b/packages/codemods/package.json @@ -36,8 +36,7 @@ "test": "fluentui-scripts jest" }, "dependencies": { - "jscodeshift": "^17.0.0", - "yargs": "^17.0.0" + "jscodeshift": "^17.0.0" }, "devDependencies": { "@babel/core": "catalog:", diff --git a/packages/codemods/src/index.ts b/packages/codemods/src/index.ts index 4d8b81b5e16..aaa99c9cb63 100644 --- a/packages/codemods/src/index.ts +++ b/packages/codemods/src/index.ts @@ -1,3 +1,3 @@ -import { transform, yargsParse } from './transform'; +import { transform, parseCliArgs } from './transform'; -transform(yargsParse(process.argv)); +transform(parseCliArgs(process.argv)); diff --git a/packages/codemods/src/transform.ts b/packages/codemods/src/transform.ts index 5a5f454b94b..8e85661a7fc 100644 --- a/packages/codemods/src/transform.ts +++ b/packages/codemods/src/transform.ts @@ -1,43 +1,64 @@ import { execSync } from 'child_process'; import path from 'path'; +import { parseArgs } from 'util'; -import yargs from 'yargs'; +import { findPackageJson, migratePackageJson } from './transforms/migrate-package-json'; const transformerDirectory = path.join(__dirname, 'transforms'); -const jscodeshiftExecutable = require.resolve('.bin/jscodeshift'); +const jscodeshiftExecutable = path.join(path.dirname(require.resolve('jscodeshift/package.json')), 'bin', 'jscodeshift.js'); -interface argsType { +const VALID_TRANSFORMS = ['button-v0-to-v1', 'deprecate-exports', 'migrate-to-mono-package'] as const; + +interface ArgsType { path: string; transform: string; } -export const yargsParse = (args: string[]): argsType => { - return yargs([]) - .help() - .exitProcess(false) - .option('path', { - alias: 'p', - type: 'string', - description: 'Path that transform should be run over', - normalize: true, - }) - .option('transform', { - alias: 't', - type: 'string', - description: 'Name of transform to run', - choices: ['button-v0-to-v1', 'deprecate-exports'], - }) - .demandOption(['path', 'transform']) - .parseSync(args); +export const parseCliArgs = (argv: string[]): ArgsType => { + const { values } = parseArgs({ + args: argv.slice(2), + options: { + path: { type: 'string', short: 'p' }, + transform: { type: 'string', short: 't' }, + }, + strict: true, + }); + + if (!values.path) { + throw new Error('Missing required option: --path (-p)'); + } + if (!values.transform) { + throw new Error('Missing required option: --transform (-t)'); + } + if (!(VALID_TRANSFORMS as readonly string[]).includes(values.transform)) { + throw new Error(`Invalid transform "${values.transform}". Valid choices: ${VALID_TRANSFORMS.join(', ')}`); + } + + return { path: values.path, transform: values.transform }; }; -export const transform = (args: argsType) => { +export const transform = (args: ArgsType) => { const codeshiftArgs = []; codeshiftArgs.push('-t', path.join(transformerDirectory, args.transform + '.js')); codeshiftArgs.push('--parser=tsx'); - codeshiftArgs.push('--extensions=tsx'); + codeshiftArgs.push('--extensions=tsx,ts,js'); codeshiftArgs.push(args.path); - execSync(jscodeshiftExecutable + ' ' + codeshiftArgs.join(' ')); + execSync(jscodeshiftExecutable + ' ' + codeshiftArgs.join(' '), { stdio: 'inherit' }); + + // For migrate-to-mono-package, also update the nearest package.json + if (args.transform === 'migrate-to-mono-package') { + const pkgJsonPath = findPackageJson(args.path); + if (pkgJsonPath) { + console.log(`\nMigrating ${pkgJsonPath}...`); + const result = migratePackageJson(pkgJsonPath); + console.log(` Removed ${result.removed.length} dependencies`); + if (result.monoPackageAdded) { + console.log(` Added fluentui-react-native dependency`); + } + } else { + console.warn(`\nWarning: No package.json found near ${args.path}`); + } + } }; diff --git a/packages/codemods/src/transforms/__testfixtures__/migrate-to-mono-package.input.tsx b/packages/codemods/src/transforms/__testfixtures__/migrate-to-mono-package.input.tsx new file mode 100644 index 00000000000..589423f8650 --- /dev/null +++ b/packages/codemods/src/transforms/__testfixtures__/migrate-to-mono-package.input.tsx @@ -0,0 +1,38 @@ +import * as React from 'react'; + +import { Button } from '@fluentui-react-native/button'; +import type { SvgIconProps } from '@fluentui-react-native/icon'; +import type { IFocusable } from '@fluentui-react-native/interactive-hooks'; +import { Stack } from '@fluentui-react-native/stack'; +import { Text } from '@fluentui-react-native/text'; +import { Theme } from '@fluentui-react-native/theme-types'; +import { themedStyleSheet } from '@fluentui-react-native/themed-stylesheet'; +import { ThemeProvider } from '@fluentui-react-native/framework'; +import { Shimmer } from '@fluentui-react-native/experimental-shimmer'; +import { createThemedCompose } from '@uifabricshared/theming-react-native'; +import { settings } from '@uifabricshared/themed-settings'; + +// Barrel imports — should be decomposed into per-package imports +import { ButtonV1, Separator, TextV1 as MyText } from '@fluentui/react-native'; +import type { FocusZoneDirection, CheckboxProps } from '@fluentui/react-native'; +import { FocusZone, MenuButton, useOnPressWithFocus } from '@fluentui/react-native'; + +// Packages NOT in the mono-package — these should stay unchanged +import { TestSection } from '@fluentui-react-native/e2e-testing'; +import { something } from '@fluentui-react-native/scripts'; + +const someRequire = require('@fluentui-react-native/avatar'); +const alsoTransform = require('@uifabricshared/foundation-compose'); +const skipThis = require('@fluentui-react-native/e2e-testing'); + +export const Example: React.FunctionComponent = () => { + return ( + + + - {showStandardCallout && ( { ) : ( //else - + ( - + ) )} diff --git a/apps/tester-core/src/TestComponents/CheckboxLegacy/CheckboxLegacyE2ETest.tsx b/apps/tester-core/src/TestComponents/CheckboxLegacy/CheckboxLegacyE2ETest.tsx index f33786a505d..b4548052650 100644 --- a/apps/tester-core/src/TestComponents/CheckboxLegacy/CheckboxLegacyE2ETest.tsx +++ b/apps/tester-core/src/TestComponents/CheckboxLegacy/CheckboxLegacyE2ETest.tsx @@ -1,7 +1,8 @@ import * as React from 'react'; import { View } from 'react-native'; -import { Checkbox, Text } from '@fluentui/react-native'; +import { Checkbox } from 'fluentui-react-native/checkbox'; +import { Text } from 'fluentui-react-native/text'; import { CHECKBOX_TEST_COMPONENT, CHECKBOX_ON_PRESS, @@ -9,7 +10,7 @@ import { CHECKBOX_TEST_COMPONENT_LABEL, CHECKBOX_ACCESSIBILITY_LABEL, } from '@fluentui-react-native/e2e-testing'; -import { Stack } from '@fluentui-react-native/stack'; +import { Stack } from 'fluentui-react-native/stack'; import { stackStyle } from '../Common/styles'; import { testProps } from '../Common/TestProps'; diff --git a/apps/tester-core/src/TestComponents/CheckboxLegacy/CheckboxLegacyTest.tsx b/apps/tester-core/src/TestComponents/CheckboxLegacy/CheckboxLegacyTest.tsx index 946a9dbdae9..3ca3d649753 100644 --- a/apps/tester-core/src/TestComponents/CheckboxLegacy/CheckboxLegacyTest.tsx +++ b/apps/tester-core/src/TestComponents/CheckboxLegacy/CheckboxLegacyTest.tsx @@ -1,11 +1,11 @@ import * as React from 'react'; import { View, TextInput } from 'react-native'; -import { Checkbox } from '@fluentui/react-native'; +import { Checkbox } from 'fluentui-react-native/checkbox'; import { CHECKBOX_TESTPAGE } from '@fluentui-react-native/e2e-testing'; -import type { Theme } from '@fluentui-react-native/theme-types'; -import { useTheme } from '@fluentui-react-native/theme-types'; -import { themedStyleSheet } from '@fluentui-react-native/themed-stylesheet'; +import type { Theme } from 'fluentui-react-native/theme-types'; +import { useTheme } from 'fluentui-react-native/theme-types'; +import { themedStyleSheet } from 'fluentui-react-native/themed-stylesheet'; import { CheckboxLegacyE2ETest } from './CheckboxLegacyE2ETest'; import { commonTestStyles as commonStyles } from '../Common/styles'; diff --git a/apps/tester-core/src/TestComponents/CheckboxV1/BasicCheckboxTest.tsx b/apps/tester-core/src/TestComponents/CheckboxV1/BasicCheckboxTest.tsx index c28fb558b45..fc75ded42cb 100644 --- a/apps/tester-core/src/TestComponents/CheckboxV1/BasicCheckboxTest.tsx +++ b/apps/tester-core/src/TestComponents/CheckboxV1/BasicCheckboxTest.tsx @@ -1,8 +1,8 @@ import React from 'react'; import { View } from 'react-native'; -import { Checkbox } from '@fluentui-react-native/experimental-checkbox'; -import type { InteractionEvent } from '@fluentui-react-native/interactive-hooks'; +import { Checkbox } from 'fluentui-react-native/experimental-checkbox'; +import type { InteractionEvent } from 'fluentui-react-native/interactive-hooks'; function onChangeUncontrolled(_e: InteractionEvent, isChecked: boolean) { console.log(isChecked); diff --git a/apps/tester-core/src/TestComponents/CheckboxV1/DesktopSpecificCheckboxTest.tsx b/apps/tester-core/src/TestComponents/CheckboxV1/DesktopSpecificCheckboxTest.tsx index 208ae7ac53e..b566498eaf6 100644 --- a/apps/tester-core/src/TestComponents/CheckboxV1/DesktopSpecificCheckboxTest.tsx +++ b/apps/tester-core/src/TestComponents/CheckboxV1/DesktopSpecificCheckboxTest.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { Checkbox } from '@fluentui-react-native/experimental-checkbox'; +import { Checkbox } from 'fluentui-react-native/experimental-checkbox'; export const DesktopSpecificCheckbox: React.FunctionComponent = () => { return ( diff --git a/apps/tester-core/src/TestComponents/CheckboxV1/E2ECheckboxV1Test.tsx b/apps/tester-core/src/TestComponents/CheckboxV1/E2ECheckboxV1Test.tsx index 357f1e0402b..508d5859642 100644 --- a/apps/tester-core/src/TestComponents/CheckboxV1/E2ECheckboxV1Test.tsx +++ b/apps/tester-core/src/TestComponents/CheckboxV1/E2ECheckboxV1Test.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { View } from 'react-native'; -import { Text } from '@fluentui/react-native'; +import { Text } from 'fluentui-react-native/text'; import { CHECKBOXV1_TEST_COMPONENT, CHECKBOXV1_ACCESSIBILITY_LABEL, @@ -9,8 +9,8 @@ import { CHECKBOXV1_TEST_COMPONENT_LABEL, CHECKBOXV1_ON_PRESS, } from '@fluentui-react-native/e2e-testing'; -import { Checkbox } from '@fluentui-react-native/experimental-checkbox'; -import { Stack } from '@fluentui-react-native/stack'; +import { Checkbox } from 'fluentui-react-native/experimental-checkbox'; +import { Stack } from 'fluentui-react-native/stack'; import { stackStyle } from '../Common/styles'; import { testProps } from '../Common/TestProps'; diff --git a/apps/tester-core/src/TestComponents/CheckboxV1/OtherCheckboxPropsTest.tsx b/apps/tester-core/src/TestComponents/CheckboxV1/OtherCheckboxPropsTest.tsx index fb60fe21102..8db91609923 100644 --- a/apps/tester-core/src/TestComponents/CheckboxV1/OtherCheckboxPropsTest.tsx +++ b/apps/tester-core/src/TestComponents/CheckboxV1/OtherCheckboxPropsTest.tsx @@ -2,9 +2,9 @@ import React from 'react'; import { Platform, Pressable, View } from 'react-native'; import type { ViewStyle } from 'react-native'; -import { ButtonV1 as Button } from '@fluentui-react-native/button'; -import { Checkbox } from '@fluentui-react-native/experimental-checkbox'; -import { TextV1 } from '@fluentui-react-native/text'; +import { ButtonV1 as Button } from 'fluentui-react-native/button'; +import { Checkbox } from 'fluentui-react-native/experimental-checkbox'; +import { TextV1 } from 'fluentui-react-native/text'; import { mobileStyles } from '../Common/styles'; diff --git a/apps/tester-core/src/TestComponents/CheckboxV1/SizeCheckboxTest.tsx b/apps/tester-core/src/TestComponents/CheckboxV1/SizeCheckboxTest.tsx index 230bd1a4718..9792f5a77a8 100644 --- a/apps/tester-core/src/TestComponents/CheckboxV1/SizeCheckboxTest.tsx +++ b/apps/tester-core/src/TestComponents/CheckboxV1/SizeCheckboxTest.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { Checkbox } from '@fluentui-react-native/experimental-checkbox'; +import { Checkbox } from 'fluentui-react-native/experimental-checkbox'; export const SizeCheckbox: React.FunctionComponent = () => { return ( diff --git a/apps/tester-core/src/TestComponents/CheckboxV1/TokenCheckboxTest.tsx b/apps/tester-core/src/TestComponents/CheckboxV1/TokenCheckboxTest.tsx index c27c3cadd77..de7a8e0c842 100644 --- a/apps/tester-core/src/TestComponents/CheckboxV1/TokenCheckboxTest.tsx +++ b/apps/tester-core/src/TestComponents/CheckboxV1/TokenCheckboxTest.tsx @@ -1,11 +1,11 @@ import React from 'react'; import { View, TextInput, Platform } from 'react-native'; -import { Checkbox } from '@fluentui-react-native/experimental-checkbox'; -import type { InteractionEvent } from '@fluentui-react-native/interactive-hooks'; -import type { Theme } from '@fluentui-react-native/theme-types'; -import { useTheme } from '@fluentui-react-native/theme-types'; -import { themedStyleSheet } from '@fluentui-react-native/themed-stylesheet'; +import { Checkbox } from 'fluentui-react-native/experimental-checkbox'; +import type { InteractionEvent } from 'fluentui-react-native/interactive-hooks'; +import type { Theme } from 'fluentui-react-native/theme-types'; +import { useTheme } from 'fluentui-react-native/theme-types'; +import { themedStyleSheet } from 'fluentui-react-native/themed-stylesheet'; import { commonTestStyles as commonStyles } from '../Common/styles'; diff --git a/apps/tester-core/src/TestComponents/Chip/ChipDefault.tsx b/apps/tester-core/src/TestComponents/Chip/ChipDefault.tsx index fb41be297f0..dbda462e0dd 100644 --- a/apps/tester-core/src/TestComponents/Chip/ChipDefault.tsx +++ b/apps/tester-core/src/TestComponents/Chip/ChipDefault.tsx @@ -1,10 +1,10 @@ import React, { useCallback } from 'react'; import { StyleSheet, View, ToastAndroid } from 'react-native'; -import { Chip } from '@fluentui-react-native/chip'; -import type { InteractionEvent } from '@fluentui-react-native/interactive-hooks'; -import { Switch } from '@fluentui-react-native/switch'; -import { Text } from '@fluentui-react-native/text'; +import { Chip } from 'fluentui-react-native/chip'; +import type { InteractionEvent } from 'fluentui-react-native/interactive-hooks'; +import { Switch } from 'fluentui-react-native/switch'; +import { Text } from 'fluentui-react-native/text'; import { svgProps } from '../Common/iconExamples'; diff --git a/apps/tester-core/src/TestComponents/Chip/E2EChipTest.tsx b/apps/tester-core/src/TestComponents/Chip/E2EChipTest.tsx index c71bae5373d..da27ebf989f 100644 --- a/apps/tester-core/src/TestComponents/Chip/E2EChipTest.tsx +++ b/apps/tester-core/src/TestComponents/Chip/E2EChipTest.tsx @@ -1,15 +1,15 @@ import * as React from 'react'; import { View } from 'react-native'; -import { Chip } from '@fluentui-react-native/chip'; +import { Chip } from 'fluentui-react-native/chip'; import { CHIP_CALLBACK_TEXT_END_STATE, CHIP_CALLBACK_TEXT_START_STATE, CHIP_TEST_COMPONENT, CHIP_TEXT, } from '@fluentui-react-native/e2e-testing'; -import type { InteractionEvent } from '@fluentui-react-native/interactive-hooks'; -import { Text } from '@fluentui-react-native/text'; +import type { InteractionEvent } from 'fluentui-react-native/interactive-hooks'; +import { Text } from 'fluentui-react-native/text'; import { testProps } from '../Common/TestProps'; diff --git a/apps/tester-core/src/TestComponents/ColorTokens/ColorTokenTest.tsx b/apps/tester-core/src/TestComponents/ColorTokens/ColorTokenTest.tsx index 742e311ab82..15f2980cc87 100644 --- a/apps/tester-core/src/TestComponents/ColorTokens/ColorTokenTest.tsx +++ b/apps/tester-core/src/TestComponents/ColorTokens/ColorTokenTest.tsx @@ -2,16 +2,17 @@ import * as React from 'react'; import type { ViewStyle, ColorValue } from 'react-native'; import { View, StyleSheet, Platform } from 'react-native'; -import { Text, ToggleButton } from '@fluentui/react-native'; -import { createAliasTokens } from '@fluentui-react-native/default-theme'; +import { ToggleButton } from 'fluentui-react-native/button'; +import { Text } from 'fluentui-react-native/text'; +import { createAliasTokens } from 'fluentui-react-native/default-theme'; import { COLORTOKENS_TEST_COMPONENT, COLORTOKEN_TESTPAGE } from '@fluentui-react-native/e2e-testing'; -import type { SvgIconProps } from '@fluentui-react-native/icon'; -import { globalTokens } from '@fluentui-react-native/theme-tokens'; -import type { Theme } from '@fluentui-react-native/theme-types'; -import { useTheme } from '@fluentui-react-native/theme-types'; -import { themedStyleSheet } from '@fluentui-react-native/themed-stylesheet'; -import { getCurrentAppearance } from '@fluentui-react-native/theming-utils'; -import { createOfficeAliasTokens } from '@fluentui-react-native/win32-theme'; +import type { SvgIconProps } from 'fluentui-react-native/icon'; +import { globalTokens } from 'fluentui-react-native/theme-tokens'; +import type { Theme } from 'fluentui-react-native/theme-types'; +import { useTheme } from 'fluentui-react-native/theme-types'; +import { themedStyleSheet } from 'fluentui-react-native/themed-stylesheet'; +import { getCurrentAppearance } from 'fluentui-react-native/theming-utils'; +import { createOfficeAliasTokens } from 'fluentui-react-native/win32-theme'; import type { SvgProps } from 'react-native-svg'; import Svg, { G, Path } from 'react-native-svg'; diff --git a/apps/tester-core/src/TestComponents/Common/AlignmentPicker.tsx b/apps/tester-core/src/TestComponents/Common/AlignmentPicker.tsx index e4fe05405ec..6d43ff897db 100644 --- a/apps/tester-core/src/TestComponents/Common/AlignmentPicker.tsx +++ b/apps/tester-core/src/TestComponents/Common/AlignmentPicker.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import type { StyleProp, ViewStyle } from 'react-native'; -import type { IconAlignment } from '@fluentui/react-native'; +import type { IconAlignment } from 'fluentui-react-native/persona-coin'; import { MenuPicker } from './MenuPicker'; import { undefinedText } from '../PersonaCoin/styles'; diff --git a/apps/tester-core/src/TestComponents/Common/MenuPicker.desktop.tsx b/apps/tester-core/src/TestComponents/Common/MenuPicker.desktop.tsx index cedce9b730a..76281cfab28 100644 --- a/apps/tester-core/src/TestComponents/Common/MenuPicker.desktop.tsx +++ b/apps/tester-core/src/TestComponents/Common/MenuPicker.desktop.tsx @@ -1,8 +1,9 @@ import * as React from 'react'; import { View, StyleSheet } from 'react-native'; -import { ButtonV1 as Button, Text } from '@fluentui/react-native'; -import { Menu, MenuItem, MenuTrigger, MenuPopover, MenuList } from '@fluentui-react-native/menu'; +import { ButtonV1 as Button } from 'fluentui-react-native/button'; +import { Text } from 'fluentui-react-native/text'; +import { Menu, MenuItem, MenuTrigger, MenuPopover, MenuList } from 'fluentui-react-native/menu'; import { SvgXml } from 'react-native-svg'; import type { MenuPickerProps, CollectionItem } from './MenuPicker.types'; diff --git a/apps/tester-core/src/TestComponents/Common/MenuPicker.ios.tsx b/apps/tester-core/src/TestComponents/Common/MenuPicker.ios.tsx index 0420b50dcac..b820db59c2b 100644 --- a/apps/tester-core/src/TestComponents/Common/MenuPicker.ios.tsx +++ b/apps/tester-core/src/TestComponents/Common/MenuPicker.ios.tsx @@ -1,9 +1,9 @@ import * as React from 'react'; import { View, StyleSheet } from 'react-native'; -import { ButtonV1 as Button } from '@fluentui-react-native/button'; -import { useFluentTheme } from '@fluentui-react-native/framework'; -import { Text } from '@fluentui-react-native/text'; +import { ButtonV1 as Button } from 'fluentui-react-native/button'; +import { useFluentTheme } from 'fluentui-react-native/framework'; +import { Text } from 'fluentui-react-native/text'; import { MenuView } from '@react-native-menu/menu'; import type { MenuAction } from '@react-native-menu/menu'; import { SvgXml } from 'react-native-svg'; diff --git a/apps/tester-core/src/TestComponents/Common/Slider.tsx b/apps/tester-core/src/TestComponents/Common/Slider.tsx index 79e4ea0d9d9..6e69dc8d71f 100644 --- a/apps/tester-core/src/TestComponents/Common/Slider.tsx +++ b/apps/tester-core/src/TestComponents/Common/Slider.tsx @@ -2,8 +2,9 @@ import * as React from 'react'; import type { ViewProps, ViewStyle } from 'react-native'; import { StyleSheet, Text, View } from 'react-native'; -import { Separator, Pressable } from '@fluentui/react-native'; -import type { IPressableState } from '@fluentui-react-native/interactive-hooks'; +import { Pressable } from 'fluentui-react-native/pressable'; +import { Separator } from 'fluentui-react-native/separator'; +import type { IPressableState } from 'fluentui-react-native/interactive-hooks'; const thumbSize = 20; const defaultMaximumValue = 100; diff --git a/apps/tester-core/src/TestComponents/Common/StyledPicker.tsx b/apps/tester-core/src/TestComponents/Common/StyledPicker.tsx index c0d1e05de59..efc03bcf5ea 100644 --- a/apps/tester-core/src/TestComponents/Common/StyledPicker.tsx +++ b/apps/tester-core/src/TestComponents/Common/StyledPicker.tsx @@ -1,7 +1,7 @@ import { Platform } from 'react-native'; import type { ColorValue } from 'react-native'; -import { useTheme } from '@fluentui-react-native/theme-types'; +import { useTheme } from 'fluentui-react-native/theme-types'; import { MenuPicker } from './MenuPicker'; import { commonTestStyles as commonStyles } from './styles'; diff --git a/apps/tester-core/src/TestComponents/Common/iconExamples.tsx b/apps/tester-core/src/TestComponents/Common/iconExamples.tsx index 34ea2d0abc4..37bb1877e2a 100644 --- a/apps/tester-core/src/TestComponents/Common/iconExamples.tsx +++ b/apps/tester-core/src/TestComponents/Common/iconExamples.tsx @@ -1,6 +1,6 @@ import { Platform } from 'react-native'; -import type { SvgIconProps, FontIconProps, IconProps } from '@fluentui-react-native/icon'; +import type { SvgIconProps, FontIconProps, IconProps } from 'fluentui-react-native/icon'; import TestSvg from '../../../assets/test.svg'; diff --git a/apps/tester-core/src/TestComponents/Common/styles.ts b/apps/tester-core/src/TestComponents/Common/styles.ts index 3de59dab432..a98b8412667 100644 --- a/apps/tester-core/src/TestComponents/Common/styles.ts +++ b/apps/tester-core/src/TestComponents/Common/styles.ts @@ -1,6 +1,6 @@ import { Platform, StyleSheet } from 'react-native'; -import type { IStackProps } from '@fluentui-react-native/stack'; +import type { IStackProps } from 'fluentui-react-native/stack'; export const commonTestStyles = StyleSheet.create({ root: { diff --git a/apps/tester-core/src/TestComponents/ContextualMenu/ContextualMenuTest.tsx b/apps/tester-core/src/TestComponents/ContextualMenu/ContextualMenuTest.tsx index 4f3750f5913..f830f4f1dc1 100644 --- a/apps/tester-core/src/TestComponents/ContextualMenu/ContextualMenuTest.tsx +++ b/apps/tester-core/src/TestComponents/ContextualMenu/ContextualMenuTest.tsx @@ -1,9 +1,12 @@ import * as React from 'react'; import { Text, View, Switch } from 'react-native'; -import { Text as FURNText, ContextualMenu, ContextualMenuItem, Submenu, SubmenuItem, Separator, Checkbox } from '@fluentui/react-native'; +import { Checkbox } from 'fluentui-react-native/checkbox'; +import { ContextualMenu, ContextualMenuItem, Submenu, SubmenuItem } from 'fluentui-react-native/contextual-menu'; +import { Separator } from 'fluentui-react-native/separator'; +import { Text as FURNText } from 'fluentui-react-native/text'; import { CONTEXTUALMENU_TESTPAGE } from '@fluentui-react-native/e2e-testing'; -import { MenuButton } from '@fluentui-react-native/experimental-menu-button'; +import { MenuButton } from 'fluentui-react-native/experimental-menu-button'; import { E2EContextualMenuTest } from './E2EContextualMenuTest'; import { svgProps, fontProps, testImage } from '../Common/iconExamples'; diff --git a/apps/tester-core/src/TestComponents/ContextualMenu/E2EContextualMenuTest.tsx b/apps/tester-core/src/TestComponents/ContextualMenu/E2EContextualMenuTest.tsx index e7859d9f55a..cd874c3bac4 100644 --- a/apps/tester-core/src/TestComponents/ContextualMenu/E2EContextualMenuTest.tsx +++ b/apps/tester-core/src/TestComponents/ContextualMenu/E2EContextualMenuTest.tsx @@ -1,7 +1,9 @@ import * as React from 'react'; import { Text, View, Switch } from 'react-native'; -import { ButtonV1 as Button, ContextualMenu, ContextualMenuItem, Separator } from '@fluentui/react-native'; +import { ButtonV1 as Button } from 'fluentui-react-native/button'; +import { ContextualMenu, ContextualMenuItem } from 'fluentui-react-native/contextual-menu'; +import { Separator } from 'fluentui-react-native/separator'; import { CONTEXTUALMENUITEM_TEST_COMPONENT, CONTEXTUALMENU_TEST_COMPONENT } from '@fluentui-react-native/e2e-testing'; import { testProps } from '../Common/TestProps'; diff --git a/apps/tester-core/src/TestComponents/CornerRadius/CornerRadiusTest.tsx b/apps/tester-core/src/TestComponents/CornerRadius/CornerRadiusTest.tsx index b2f71effbf3..568833e7cff 100644 --- a/apps/tester-core/src/TestComponents/CornerRadius/CornerRadiusTest.tsx +++ b/apps/tester-core/src/TestComponents/CornerRadius/CornerRadiusTest.tsx @@ -1,12 +1,12 @@ import * as React from 'react'; import { View } from 'react-native'; -import { Text } from '@fluentui/react-native'; +import { Text } from 'fluentui-react-native/text'; import { HOMEPAGE_CORNERRADIUS_TESTPAGE } from '@fluentui-react-native/e2e-testing'; -import { useFluentTheme } from '@fluentui-react-native/framework'; -import { Stack } from '@fluentui-react-native/stack'; -import { globalTokens } from '@fluentui-react-native/theme-tokens'; -import { getCurrentAppearance } from '@fluentui-react-native/theming-utils'; +import { useFluentTheme } from 'fluentui-react-native/framework'; +import { Stack } from 'fluentui-react-native/stack'; +import { globalTokens } from 'fluentui-react-native/theme-tokens'; +import { getCurrentAppearance } from 'fluentui-react-native/theming-utils'; import { stackStyle } from '../Common/styles'; import type { TestSection, PlatformStatus } from '../Test'; diff --git a/apps/tester-core/src/TestComponents/Divider/DividerTest.tsx b/apps/tester-core/src/TestComponents/Divider/DividerTest.tsx index e8459a78d9e..78094b640ec 100644 --- a/apps/tester-core/src/TestComponents/Divider/DividerTest.tsx +++ b/apps/tester-core/src/TestComponents/Divider/DividerTest.tsx @@ -1,10 +1,10 @@ import * as React from 'react'; import { Platform, StyleSheet, View } from 'react-native'; -import { Divider } from '@fluentui-react-native/divider'; +import { Divider } from 'fluentui-react-native/divider'; import { DIVIDER_TESTPAGE } from '@fluentui-react-native/e2e-testing'; -import { Stack } from '@fluentui-react-native/stack'; -import { TextV1 as Text } from '@fluentui-react-native/text'; +import { Stack } from 'fluentui-react-native/stack'; +import { TextV1 as Text } from 'fluentui-react-native/text'; import { CustomisedMobileDividers, MobileDividers } from './MobileDividerTest'; import TestSvg from '../../../assets/test.svg'; diff --git a/apps/tester-core/src/TestComponents/Divider/MobileDividerTest.tsx b/apps/tester-core/src/TestComponents/Divider/MobileDividerTest.tsx index f8fc5fe7cf7..3657fb4d3d1 100644 --- a/apps/tester-core/src/TestComponents/Divider/MobileDividerTest.tsx +++ b/apps/tester-core/src/TestComponents/Divider/MobileDividerTest.tsx @@ -1,10 +1,10 @@ import * as React from 'react'; import { StyleSheet, View } from 'react-native'; -import { Divider } from '@fluentui-react-native/divider'; -import { Stack } from '@fluentui-react-native/stack'; -import { TextV1 as Text } from '@fluentui-react-native/text'; -import { globalTokens } from '@fluentui-react-native/theme-tokens'; +import { Divider } from 'fluentui-react-native/divider'; +import { Stack } from 'fluentui-react-native/stack'; +import { TextV1 as Text } from 'fluentui-react-native/text'; +import { globalTokens } from 'fluentui-react-native/theme-tokens'; import { commonTestStyles } from '../Common/styles'; diff --git a/apps/tester-core/src/TestComponents/Drawer/DrawerDefault.tsx b/apps/tester-core/src/TestComponents/Drawer/DrawerDefault.tsx index 1c46b4fe9c6..247f163ab92 100644 --- a/apps/tester-core/src/TestComponents/Drawer/DrawerDefault.tsx +++ b/apps/tester-core/src/TestComponents/Drawer/DrawerDefault.tsx @@ -1,13 +1,13 @@ import * as React from 'react'; import { StyleSheet, View } from 'react-native'; -import { Avatar } from '@fluentui-react-native/avatar'; -import { ButtonV1 as Button } from '@fluentui-react-native/button'; -import { Drawer } from '@fluentui-react-native/drawer'; -import type { DrawerPositionType } from '@fluentui-react-native/drawer'; -import { Stack } from '@fluentui-react-native/stack'; -import { Switch } from '@fluentui-react-native/switch'; -import { Text } from '@fluentui-react-native/text'; +import { Avatar } from 'fluentui-react-native/avatar'; +import { ButtonV1 as Button } from 'fluentui-react-native/button'; +import { Drawer } from 'fluentui-react-native/drawer'; +import type { DrawerPositionType } from 'fluentui-react-native/drawer'; +import { Stack } from 'fluentui-react-native/stack'; +import { Switch } from 'fluentui-react-native/switch'; +import { Text } from 'fluentui-react-native/text'; import { stackStyle } from '../Common/styles'; diff --git a/apps/tester-core/src/TestComponents/Drawer/E2EDrawerTest.tsx b/apps/tester-core/src/TestComponents/Drawer/E2EDrawerTest.tsx index 479693480d4..f140588ac81 100644 --- a/apps/tester-core/src/TestComponents/Drawer/E2EDrawerTest.tsx +++ b/apps/tester-core/src/TestComponents/Drawer/E2EDrawerTest.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; -import { Drawer } from '@fluentui-react-native/drawer'; -import { Stack } from '@fluentui-react-native/stack'; +import { Drawer } from 'fluentui-react-native/drawer'; +import { Stack } from 'fluentui-react-native/stack'; import { stackStyle } from '../Common/styles'; export const E2EDrawerTest: React.FunctionComponent = () => { diff --git a/apps/tester-core/src/TestComponents/Dropdown/DropdownTest.tsx b/apps/tester-core/src/TestComponents/Dropdown/DropdownTest.tsx index b7bfb32ca2b..70311c2a097 100644 --- a/apps/tester-core/src/TestComponents/Dropdown/DropdownTest.tsx +++ b/apps/tester-core/src/TestComponents/Dropdown/DropdownTest.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; -import { Option, Dropdown } from '@fluentui-react-native/dropdown'; -import { Stack } from '@fluentui-react-native/stack'; +import { Option, Dropdown } from 'fluentui-react-native/dropdown'; +import { Stack } from 'fluentui-react-native/stack'; import { DROPDOWN_TESTPAGE } from './consts'; import { stackStyle } from '../Common/styles'; diff --git a/apps/tester-core/src/TestComponents/Expander/ExpanderTest.tsx b/apps/tester-core/src/TestComponents/Expander/ExpanderTest.tsx index f83427e3840..90f190bfe8b 100644 --- a/apps/tester-core/src/TestComponents/Expander/ExpanderTest.tsx +++ b/apps/tester-core/src/TestComponents/Expander/ExpanderTest.tsx @@ -1,9 +1,9 @@ import * as React from 'react'; import { View, Switch } from 'react-native'; -import { Text } from '@fluentui/react-native'; -import { Expander } from '@fluentui-react-native/experimental-expander'; -import { Stack } from '@fluentui-react-native/stack'; +import { Text } from 'fluentui-react-native/text'; +import { Expander } from 'fluentui-react-native/experimental-expander'; +import { Stack } from 'fluentui-react-native/stack'; import { EXPANDER_TESTPAGE } from './consts'; import { stackStyle, commonTestStyles as commonStyles } from '../Common/styles'; diff --git a/apps/tester-core/src/TestComponents/FocusTrapZone/FocusTrapZoneTest.tsx b/apps/tester-core/src/TestComponents/FocusTrapZone/FocusTrapZoneTest.tsx index c93bf5ef27c..2110f399eab 100644 --- a/apps/tester-core/src/TestComponents/FocusTrapZone/FocusTrapZoneTest.tsx +++ b/apps/tester-core/src/TestComponents/FocusTrapZone/FocusTrapZoneTest.tsx @@ -2,14 +2,15 @@ import * as React from 'react'; import type { TouchableHighlightProps } from 'react-native'; import { TouchableHighlight, View } from 'react-native'; -import { FocusTrapZone, Text } from '@fluentui/react-native'; +import { FocusTrapZone } from 'fluentui-react-native/focus-trap-zone'; +import { Text } from 'fluentui-react-native/text'; import { FOCUSTRAPZONE_TESTPAGE } from '@fluentui-react-native/e2e-testing'; -import type { Theme } from '@fluentui-react-native/framework'; -import type { KeyPressEvent } from '@fluentui-react-native/interactive-hooks'; -import { useFocusState } from '@fluentui-react-native/interactive-hooks'; -import { Stack } from '@fluentui-react-native/stack'; -import { useTheme } from '@fluentui-react-native/theme-types'; -import { themedStyleSheet } from '@fluentui-react-native/themed-stylesheet'; +import type { Theme } from 'fluentui-react-native/framework'; +import type { KeyPressEvent } from 'fluentui-react-native/interactive-hooks'; +import { useFocusState } from 'fluentui-react-native/interactive-hooks'; +import { Stack } from 'fluentui-react-native/stack'; +import { useTheme } from 'fluentui-react-native/theme-types'; +import { themedStyleSheet } from 'fluentui-react-native/themed-stylesheet'; import { stackStyle } from '../Common/styles'; import type { TestSection, PlatformStatus } from '../Test'; diff --git a/apps/tester-core/src/TestComponents/FocusZone/FocusZoneE2ETest.tsx b/apps/tester-core/src/TestComponents/FocusZone/FocusZoneE2ETest.tsx index a32b89f44ce..f2e9cbcca43 100644 --- a/apps/tester-core/src/TestComponents/FocusZone/FocusZoneE2ETest.tsx +++ b/apps/tester-core/src/TestComponents/FocusZone/FocusZoneE2ETest.tsx @@ -1,10 +1,13 @@ import React from 'react'; import { Platform, View } from 'react-native'; -import type { FocusZoneDirection, FocusZoneTabNavigation, IFocusable } from '@fluentui/react-native'; -import { FocusZone, MenuButton, Text } from '@fluentui/react-native'; -import type { ButtonProps } from '@fluentui-react-native/button'; -import { ButtonV1 as Button } from '@fluentui-react-native/button'; +import type { FocusZoneDirection, FocusZoneTabNavigation } from 'fluentui-react-native/focus-zone'; +import type { IFocusable } from 'fluentui-react-native/interactive-hooks'; +import { FocusZone } from 'fluentui-react-native/focus-zone'; +import { MenuButton } from 'fluentui-react-native/menu-button'; +import { Text } from 'fluentui-react-native/text'; +import type { ButtonProps } from 'fluentui-react-native/button'; +import { ButtonV1 as Button } from 'fluentui-react-native/button'; import { FOCUSZONE_CIRCLE_NAV_SWITCH, FOCUSZONE_DEFAULT_TABBABLE_SWITCH, @@ -18,7 +21,7 @@ import { FOCUSZONE_TWO_DIM_SWITCH, } from '@fluentui-react-native/e2e-testing'; import type { GridButtonIndex } from '@fluentui-react-native/e2e-testing'; -import { Switch } from '@fluentui-react-native/switch'; +import { Switch } from 'fluentui-react-native/switch'; import { focusZoneTestStyles, GridButton } from './styles'; import { commonTestStyles } from '../Common/styles'; diff --git a/apps/tester-core/src/TestComponents/FocusZone/FocusZoneTest.tsx b/apps/tester-core/src/TestComponents/FocusZone/FocusZoneTest.tsx index 112236c4027..df43aeeafdc 100644 --- a/apps/tester-core/src/TestComponents/FocusZone/FocusZoneTest.tsx +++ b/apps/tester-core/src/TestComponents/FocusZone/FocusZoneTest.tsx @@ -1,12 +1,15 @@ import * as React from 'react'; import { View, ScrollView, Pressable, TextInput } from 'react-native'; -import type { FocusZoneDirection, FocusZoneTabNavigation } from '@fluentui/react-native'; -import { FocusZone, MenuButton, Text, useOnPressWithFocus } from '@fluentui/react-native'; -import { ButtonV1 as Button } from '@fluentui-react-native/button'; +import type { FocusZoneDirection, FocusZoneTabNavigation } from 'fluentui-react-native/focus-zone'; +import { FocusZone } from 'fluentui-react-native/focus-zone'; +import { useOnPressWithFocus } from 'fluentui-react-native/interactive-hooks'; +import { MenuButton } from 'fluentui-react-native/menu-button'; +import { Text } from 'fluentui-react-native/text'; +import { ButtonV1 as Button } from 'fluentui-react-native/button'; import { FOCUSZONE_TESTPAGE } from '@fluentui-react-native/e2e-testing'; -import type { CheckboxProps } from '@fluentui-react-native/experimental-checkbox'; -import { Checkbox } from '@fluentui-react-native/experimental-checkbox'; +import type { CheckboxProps } from 'fluentui-react-native/experimental-checkbox'; +import { Checkbox } from 'fluentui-react-native/experimental-checkbox'; import { FocusZone2D, FocusZoneDirections, FocusZoneListWrapper, FocusZoneTabNavigations, GridOfButtons } from './FocusZoneE2ETest'; import { focusZoneTestStyles, SubheaderText } from './styles'; diff --git a/apps/tester-core/src/TestComponents/FocusZone/styles.ts b/apps/tester-core/src/TestComponents/FocusZone/styles.ts index e8ad046c8e3..68574cfee70 100644 --- a/apps/tester-core/src/TestComponents/FocusZone/styles.ts +++ b/apps/tester-core/src/TestComponents/FocusZone/styles.ts @@ -1,8 +1,8 @@ import { Platform, StyleSheet, View } from 'react-native'; -import { Text } from '@fluentui/react-native'; -import { ButtonV1 as Button } from '@fluentui-react-native/button'; -import { Icon } from '@fluentui-react-native/icon'; +import { Text } from 'fluentui-react-native/text'; +import { ButtonV1 as Button } from 'fluentui-react-native/button'; +import { Icon } from 'fluentui-react-native/icon'; export const focusZoneTestStyles = StyleSheet.create({ focusZoneViewStyle: { diff --git a/apps/tester-core/src/TestComponents/Icon/IconLegacyE2ETest.tsx b/apps/tester-core/src/TestComponents/Icon/IconLegacyE2ETest.tsx index 5524adf4193..c4137212496 100644 --- a/apps/tester-core/src/TestComponents/Icon/IconLegacyE2ETest.tsx +++ b/apps/tester-core/src/TestComponents/Icon/IconLegacyE2ETest.tsx @@ -1,10 +1,10 @@ import * as React from 'react'; import { View } from 'react-native'; -import { Text } from '@fluentui/react-native'; +import { Text } from 'fluentui-react-native/text'; import { ICON_ACCESSIBILITY_LABEL } from '@fluentui-react-native/e2e-testing'; -import { Icon } from '@fluentui-react-native/icon'; -import type { RasterImageIconProps } from '@fluentui-react-native/icon'; +import { Icon } from 'fluentui-react-native/icon'; +import type { RasterImageIconProps } from 'fluentui-react-native/icon'; import { testImage } from '../Common/iconExamples'; diff --git a/apps/tester-core/src/TestComponents/Icon/IconTest.tsx b/apps/tester-core/src/TestComponents/Icon/IconTest.tsx index 2dca34ca79e..c9e4d2c9cc5 100644 --- a/apps/tester-core/src/TestComponents/Icon/IconTest.tsx +++ b/apps/tester-core/src/TestComponents/Icon/IconTest.tsx @@ -1,10 +1,10 @@ import * as React from 'react'; import { Platform, PlatformColor, View } from 'react-native'; -import { Text } from '@fluentui/react-native'; +import { Text } from 'fluentui-react-native/text'; import { ICON_TESTPAGE } from '@fluentui-react-native/e2e-testing'; -import type { RasterImageIconProps, SvgIconProps, FontIconProps } from '@fluentui-react-native/icon'; -import { Icon } from '@fluentui-react-native/icon'; +import type { RasterImageIconProps, SvgIconProps, FontIconProps } from 'fluentui-react-native/icon'; +import { Icon } from 'fluentui-react-native/icon'; import { E2ETestingIcon } from './IconLegacyE2ETest'; import { IconV1E2ETest } from './IconV1E2ETest'; diff --git a/apps/tester-core/src/TestComponents/Icon/IconV1E2ETest.tsx b/apps/tester-core/src/TestComponents/Icon/IconV1E2ETest.tsx index f31ddbd7e1e..a6533fe6d13 100644 --- a/apps/tester-core/src/TestComponents/Icon/IconV1E2ETest.tsx +++ b/apps/tester-core/src/TestComponents/Icon/IconV1E2ETest.tsx @@ -1,15 +1,15 @@ import * as React from 'react'; import { View } from 'react-native'; -import { Text } from '@fluentui/react-native'; +import { Text } from 'fluentui-react-native/text'; import { ICON_ACCESSIBILITY_LABEL, ICON_TEST_COMPONENT, ICON_FONT_TEST_COMPONENT, ICON_SVG_TEST_COMPONENT, } from '@fluentui-react-native/e2e-testing'; -import type { FontIconPropsV1, SvgIconPropsV1 } from '@fluentui-react-native/icon'; -import { FontIcon, SvgIcon, IconV1 } from '@fluentui-react-native/icon'; +import type { FontIconPropsV1, SvgIconPropsV1 } from 'fluentui-react-native/icon'; +import { FontIcon, SvgIcon, IconV1 } from 'fluentui-react-native/icon'; import TestSvg from '../../../assets/test.svg'; diff --git a/apps/tester-core/src/TestComponents/Icon/IconV1Test.android.tsx b/apps/tester-core/src/TestComponents/Icon/IconV1Test.android.tsx index 9122db1f9b7..93811fbf528 100644 --- a/apps/tester-core/src/TestComponents/Icon/IconV1Test.android.tsx +++ b/apps/tester-core/src/TestComponents/Icon/IconV1Test.android.tsx @@ -1,8 +1,8 @@ import React, { useMemo } from 'react'; import { Text, View } from 'react-native'; -import type { FontIconPropsV1, SvgIconPropsV1 } from '@fluentui-react-native/icon'; -import { FontIcon, SvgIcon, IconV1 } from '@fluentui-react-native/icon'; +import type { FontIconPropsV1, SvgIconPropsV1 } from 'fluentui-react-native/icon'; +import { FontIcon, SvgIcon, IconV1 } from 'fluentui-react-native/icon'; import TestSvg from '../../../assets/test.svg'; diff --git a/apps/tester-core/src/TestComponents/Icon/IconV1Test.tsx b/apps/tester-core/src/TestComponents/Icon/IconV1Test.tsx index c81ea13fb37..de6c0f5d8fa 100644 --- a/apps/tester-core/src/TestComponents/Icon/IconV1Test.tsx +++ b/apps/tester-core/src/TestComponents/Icon/IconV1Test.tsx @@ -1,8 +1,8 @@ import React, { useMemo } from 'react'; import { Text, View } from 'react-native'; -import type { FontIconPropsV1, SvgIconPropsV1 } from '@fluentui-react-native/icon'; -import { FontIcon, SvgIcon, IconV1 } from '@fluentui-react-native/icon'; +import type { FontIconPropsV1, SvgIconPropsV1 } from 'fluentui-react-native/icon'; +import { FontIcon, SvgIcon, IconV1 } from 'fluentui-react-native/icon'; import TestSvg from '../../../assets/test.svg'; diff --git a/apps/tester-core/src/TestComponents/Input/E2EInputTest.tsx b/apps/tester-core/src/TestComponents/Input/E2EInputTest.tsx index dc75b2d1c08..3adcd66c076 100644 --- a/apps/tester-core/src/TestComponents/Input/E2EInputTest.tsx +++ b/apps/tester-core/src/TestComponents/Input/E2EInputTest.tsx @@ -8,10 +8,10 @@ import { INPUT_ONCLICK_STRING, INPUT_START_STRING, } from '@fluentui-react-native/e2e-testing'; -import type { IconProps } from '@fluentui-react-native/icon'; -import { Input } from '@fluentui-react-native/input'; -import { Stack } from '@fluentui-react-native/stack'; -import { Text } from '@fluentui-react-native/text'; +import type { IconProps } from 'fluentui-react-native/icon'; +import { Input } from 'fluentui-react-native/input'; +import { Stack } from 'fluentui-react-native/stack'; +import { Text } from 'fluentui-react-native/text'; import FilledSvg from '../../../assets/filledIcon.svg'; import OutlineSvg from '../../../assets/outlineIcon.svg'; diff --git a/apps/tester-core/src/TestComponents/Input/InputDefault.tsx b/apps/tester-core/src/TestComponents/Input/InputDefault.tsx index 6748a01e448..dec845d4f58 100644 --- a/apps/tester-core/src/TestComponents/Input/InputDefault.tsx +++ b/apps/tester-core/src/TestComponents/Input/InputDefault.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; import { KeyboardAvoidingView } from 'react-native'; -import type { IconProps } from '@fluentui-react-native/icon'; -import { Input } from '@fluentui-react-native/input'; +import type { IconProps } from 'fluentui-react-native/icon'; +import { Input } from 'fluentui-react-native/input'; import DismissSvg from '../../../assets/dismissIcon.svg'; import FilledSvg from '../../../assets/filledIcon.svg'; diff --git a/apps/tester-core/src/TestComponents/LinkLegacy/E2ELinkLegacyTest.tsx b/apps/tester-core/src/TestComponents/LinkLegacy/E2ELinkLegacyTest.tsx index 9e3e8f08e57..8a190e3cf58 100644 --- a/apps/tester-core/src/TestComponents/LinkLegacy/E2ELinkLegacyTest.tsx +++ b/apps/tester-core/src/TestComponents/LinkLegacy/E2ELinkLegacyTest.tsx @@ -1,14 +1,14 @@ import * as React from 'react'; import { Alert } from 'react-native'; -import { Link } from '@fluentui/react-native'; +import { Link } from 'fluentui-react-native/link'; import { LINK_TEST_COMPONENT, LINK_ACCESSIBILITY_LABEL, LINK_NO_A11Y_LABEL_COMPONENT, LINK_TEST_COMPONENT_LABEL, } from '@fluentui-react-native/e2e-testing'; -import { Stack } from '@fluentui-react-native/stack'; +import { Stack } from 'fluentui-react-native/stack'; import { stackStyle } from '../Common/styles'; import { testProps } from '../Common/TestProps'; diff --git a/apps/tester-core/src/TestComponents/LinkLegacy/LinkLegacyTest.tsx b/apps/tester-core/src/TestComponents/LinkLegacy/LinkLegacyTest.tsx index 899399f6e07..d89635e4b72 100644 --- a/apps/tester-core/src/TestComponents/LinkLegacy/LinkLegacyTest.tsx +++ b/apps/tester-core/src/TestComponents/LinkLegacy/LinkLegacyTest.tsx @@ -1,9 +1,9 @@ import * as React from 'react'; import { Alert } from 'react-native'; -import { Link } from '@fluentui/react-native'; +import { Link } from 'fluentui-react-native/link'; import { LINK_TESTPAGE } from '@fluentui-react-native/e2e-testing'; -import { Stack } from '@fluentui-react-native/stack'; +import { Stack } from 'fluentui-react-native/stack'; import { E2ELinkLegacyTest } from './E2ELinkLegacyTest'; import { stackStyle } from '../Common/styles'; diff --git a/apps/tester-core/src/TestComponents/LinkV1/E2ELinkV1Test.tsx b/apps/tester-core/src/TestComponents/LinkV1/E2ELinkV1Test.tsx index d4748c6bce0..9d3281a3f46 100644 --- a/apps/tester-core/src/TestComponents/LinkV1/E2ELinkV1Test.tsx +++ b/apps/tester-core/src/TestComponents/LinkV1/E2ELinkV1Test.tsx @@ -1,13 +1,13 @@ import * as React from 'react'; -import { LinkV1 as Link } from '@fluentui/react-native'; +import { LinkV1 as Link } from 'fluentui-react-native/link'; import { LINKV1_TEST_COMPONENT, LINKV1_ACCESSIBILITY_LABEL, LINKV1_NO_A11Y_LABEL_COMPONENT, LINKV1_TEST_COMPONENT_LABEL, } from '@fluentui-react-native/e2e-testing'; -import { Stack } from '@fluentui-react-native/stack'; +import { Stack } from 'fluentui-react-native/stack'; import { stackStyle } from '../Common/styles'; import { testProps } from '../Common/TestProps'; diff --git a/apps/tester-core/src/TestComponents/LinkV1/InlineLinksTest.android.tsx b/apps/tester-core/src/TestComponents/LinkV1/InlineLinksTest.android.tsx index 3292bf39277..a993df711ba 100644 --- a/apps/tester-core/src/TestComponents/LinkV1/InlineLinksTest.android.tsx +++ b/apps/tester-core/src/TestComponents/LinkV1/InlineLinksTest.android.tsx @@ -1,8 +1,9 @@ import * as React from 'react'; import { View, Alert, StyleSheet } from 'react-native'; -import { LinkV1 as Link, TextV1 as Text } from '@fluentui/react-native'; -import { Stack } from '@fluentui-react-native/stack'; +import { LinkV1 as Link } from 'fluentui-react-native/link'; +import { TextV1 as Text } from 'fluentui-react-native/text'; +import { Stack } from 'fluentui-react-native/stack'; import { stackStyle } from '../Common/styles'; diff --git a/apps/tester-core/src/TestComponents/LinkV1/InlineLinksTest.tsx b/apps/tester-core/src/TestComponents/LinkV1/InlineLinksTest.tsx index 7a0acb76077..907e452c4b0 100644 --- a/apps/tester-core/src/TestComponents/LinkV1/InlineLinksTest.tsx +++ b/apps/tester-core/src/TestComponents/LinkV1/InlineLinksTest.tsx @@ -1,8 +1,9 @@ import * as React from 'react'; import { Alert } from 'react-native'; -import { LinkV1 as Link, TextV1 as Text } from '@fluentui/react-native'; -import { Stack } from '@fluentui-react-native/stack'; +import { LinkV1 as Link } from 'fluentui-react-native/link'; +import { TextV1 as Text } from 'fluentui-react-native/text'; +import { Stack } from 'fluentui-react-native/stack'; import { stackStyle } from '../Common/styles'; diff --git a/apps/tester-core/src/TestComponents/LinkV1/LinkV1Test.tsx b/apps/tester-core/src/TestComponents/LinkV1/LinkV1Test.tsx index 1e76fe34c5a..75f37a22144 100644 --- a/apps/tester-core/src/TestComponents/LinkV1/LinkV1Test.tsx +++ b/apps/tester-core/src/TestComponents/LinkV1/LinkV1Test.tsx @@ -2,10 +2,10 @@ import * as React from 'react'; import { Alert, View, StyleSheet, Text, TextInput } from 'react-native'; import { Platform } from 'react-native'; -import type { LinkTokens } from '@fluentui/react-native'; -import { LinkV1 as Link } from '@fluentui/react-native'; +import type { LinkTokens } from 'fluentui-react-native/link'; +import { LinkV1 as Link } from 'fluentui-react-native/link'; import { LINKV1_TESTPAGE } from '@fluentui-react-native/e2e-testing'; -import { Stack } from '@fluentui-react-native/stack'; +import { Stack } from 'fluentui-react-native/stack'; import { E2ELinkV1Test } from './E2ELinkV1Test'; import { InlineLinks } from './InlineLinksTest'; diff --git a/apps/tester-core/src/TestComponents/Menu/E2EMenuTest.tsx b/apps/tester-core/src/TestComponents/Menu/E2EMenuTest.tsx index 271490f1f9e..523e66d6795 100644 --- a/apps/tester-core/src/TestComponents/Menu/E2EMenuTest.tsx +++ b/apps/tester-core/src/TestComponents/Menu/E2EMenuTest.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { View } from 'react-native'; -import { ButtonV1 as Button } from '@fluentui-react-native/button'; +import { ButtonV1 as Button } from 'fluentui-react-native/button'; import { MENUITEM_ACCESSIBILITY_LABEL, MENUITEM_NO_A11Y_LABEL_COMPONENT, @@ -16,9 +16,9 @@ import { MENUITEM_DISABLED_COMPONENT, MENUITEM_CALLBACK_LABEL, } from '@fluentui-react-native/e2e-testing'; -import { Menu, MenuDivider, MenuGroup, MenuItem, MenuList, MenuPopover, MenuTrigger } from '@fluentui-react-native/menu'; -import { Stack } from '@fluentui-react-native/stack'; -import { TextV1 as Text } from '@fluentui-react-native/text'; +import { Menu, MenuDivider, MenuGroup, MenuItem, MenuList, MenuPopover, MenuTrigger } from 'fluentui-react-native/menu'; +import { Stack } from 'fluentui-react-native/stack'; +import { TextV1 as Text } from 'fluentui-react-native/text'; import { stackStyle } from '../Common/styles'; import { testProps } from '../Common/TestProps'; diff --git a/apps/tester-core/src/TestComponents/Menu/MenuComponentOutsideMenuList.tsx b/apps/tester-core/src/TestComponents/Menu/MenuComponentOutsideMenuList.tsx index 6dbbefe56cb..b9a675c2bae 100644 --- a/apps/tester-core/src/TestComponents/Menu/MenuComponentOutsideMenuList.tsx +++ b/apps/tester-core/src/TestComponents/Menu/MenuComponentOutsideMenuList.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; -import { ButtonV1 as Button } from '@fluentui/react-native'; -import { Menu, MenuItem, MenuTrigger, MenuPopover, MenuList } from '@fluentui-react-native/menu'; -import { Stack } from '@fluentui-react-native/stack'; +import { ButtonV1 as Button } from 'fluentui-react-native/button'; +import { Menu, MenuItem, MenuTrigger, MenuPopover, MenuList } from 'fluentui-react-native/menu'; +import { Stack } from 'fluentui-react-native/stack'; import { stackStyle } from '../Common/styles'; diff --git a/apps/tester-core/src/TestComponents/Menu/MenuIcons.tsx b/apps/tester-core/src/TestComponents/Menu/MenuIcons.tsx index fadba7774b5..87ab5a4ea5e 100644 --- a/apps/tester-core/src/TestComponents/Menu/MenuIcons.tsx +++ b/apps/tester-core/src/TestComponents/Menu/MenuIcons.tsx @@ -1,9 +1,9 @@ import React from 'react'; import { Platform } from 'react-native'; -import { ButtonV1 as Button } from '@fluentui/react-native'; -import { Menu, MenuItem, MenuItemCheckbox, MenuTrigger, MenuPopover, MenuList } from '@fluentui-react-native/menu'; -import { Stack } from '@fluentui-react-native/stack'; +import { ButtonV1 as Button } from 'fluentui-react-native/button'; +import { Menu, MenuItem, MenuItemCheckbox, MenuTrigger, MenuPopover, MenuList } from 'fluentui-react-native/menu'; +import { Stack } from 'fluentui-react-native/stack'; import { testImage, svgProps } from '../Common/iconExamples'; import { stackStyle } from '../Common/styles'; diff --git a/apps/tester-core/src/TestComponents/Menu/MenuRefs.tsx b/apps/tester-core/src/TestComponents/Menu/MenuRefs.tsx index 4590756f90a..17e4e7b733a 100644 --- a/apps/tester-core/src/TestComponents/Menu/MenuRefs.tsx +++ b/apps/tester-core/src/TestComponents/Menu/MenuRefs.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; -import { ButtonV1 as Button } from '@fluentui/react-native'; -import { Menu, MenuItem, MenuTrigger, MenuPopover, MenuList } from '@fluentui-react-native/menu'; -import { Stack } from '@fluentui-react-native/stack'; +import { ButtonV1 as Button } from 'fluentui-react-native/button'; +import { Menu, MenuItem, MenuTrigger, MenuPopover, MenuList } from 'fluentui-react-native/menu'; +import { Stack } from 'fluentui-react-native/stack'; import { stackStyle } from '../Common/styles'; diff --git a/apps/tester-core/src/TestComponents/Menu/MenuScrollView.tsx b/apps/tester-core/src/TestComponents/Menu/MenuScrollView.tsx index 68427e35dfb..35a00a5849a 100644 --- a/apps/tester-core/src/TestComponents/Menu/MenuScrollView.tsx +++ b/apps/tester-core/src/TestComponents/Menu/MenuScrollView.tsx @@ -1,9 +1,9 @@ import React, { useState } from 'react'; import { TextInput, StyleSheet, View } from 'react-native'; -import { ButtonV1 as Button } from '@fluentui/react-native'; -import { Menu, MenuItem, MenuTrigger, MenuPopover, MenuList } from '@fluentui-react-native/menu'; -import { Stack } from '@fluentui-react-native/stack'; +import { ButtonV1 as Button } from 'fluentui-react-native/button'; +import { Menu, MenuItem, MenuTrigger, MenuPopover, MenuList } from 'fluentui-react-native/menu'; +import { Stack } from 'fluentui-react-native/stack'; import { stackStyle } from '../Common/styles'; import { commonTestStyles as commonStyles } from '../Common/styles'; diff --git a/apps/tester-core/src/TestComponents/Menu/MenuTest.tsx b/apps/tester-core/src/TestComponents/Menu/MenuTest.tsx index 2c7aa2cdff8..37d64f900e7 100644 --- a/apps/tester-core/src/TestComponents/Menu/MenuTest.tsx +++ b/apps/tester-core/src/TestComponents/Menu/MenuTest.tsx @@ -1,9 +1,9 @@ import React from 'react'; import { Platform, StyleSheet, View } from 'react-native'; -import { ButtonV1 as Button } from '@fluentui/react-native'; +import { ButtonV1 as Button } from 'fluentui-react-native/button'; import { MENU_TESTPAGE } from '@fluentui-react-native/e2e-testing'; -import type { MenuProps } from '@fluentui-react-native/menu'; +import type { MenuProps } from 'fluentui-react-native/menu'; import { Menu, MenuItem, @@ -15,10 +15,10 @@ import { MenuDivider, MenuGroup, MenuGroupHeader, -} from '@fluentui-react-native/menu'; -import { Stack } from '@fluentui-react-native/stack'; -import { Switch } from '@fluentui-react-native/switch'; -import { TextV1 as Text } from '@fluentui-react-native/text'; +} from 'fluentui-react-native/menu'; +import { Stack } from 'fluentui-react-native/stack'; +import { Switch } from 'fluentui-react-native/switch'; +import { TextV1 as Text } from 'fluentui-react-native/text'; import { E2EMenuTest } from './E2EMenuTest'; import { MenuComponentOutsideMenuList } from './MenuComponentOutsideMenuList'; diff --git a/apps/tester-core/src/TestComponents/Menu/MenuTooltips.tsx b/apps/tester-core/src/TestComponents/Menu/MenuTooltips.tsx index 783fabda0ff..5b35cd6bc13 100644 --- a/apps/tester-core/src/TestComponents/Menu/MenuTooltips.tsx +++ b/apps/tester-core/src/TestComponents/Menu/MenuTooltips.tsx @@ -1,8 +1,8 @@ import React from 'react'; -import { ButtonV1 as Button } from '@fluentui/react-native'; -import { Menu, MenuItem, MenuItemCheckbox, MenuItemRadio, MenuTrigger, MenuPopover, MenuList } from '@fluentui-react-native/menu'; -import { Stack } from '@fluentui-react-native/stack'; +import { ButtonV1 as Button } from 'fluentui-react-native/button'; +import { Menu, MenuItem, MenuItemCheckbox, MenuItemRadio, MenuTrigger, MenuPopover, MenuList } from 'fluentui-react-native/menu'; +import { Stack } from 'fluentui-react-native/stack'; import { stackStyle } from '../Common/styles'; diff --git a/apps/tester-core/src/TestComponents/Menu/MenuTriggerCallbacks.tsx b/apps/tester-core/src/TestComponents/Menu/MenuTriggerCallbacks.tsx index 7c0c4bd3843..b43cabd491d 100644 --- a/apps/tester-core/src/TestComponents/Menu/MenuTriggerCallbacks.tsx +++ b/apps/tester-core/src/TestComponents/Menu/MenuTriggerCallbacks.tsx @@ -1,9 +1,9 @@ import * as React from 'react'; import type { ColorValue } from 'react-native'; -import { ButtonV1 as Button } from '@fluentui/react-native'; -import { Menu, MenuItem, MenuTrigger, MenuPopover, MenuList } from '@fluentui-react-native/menu'; -import { Stack } from '@fluentui-react-native/stack'; +import { ButtonV1 as Button } from 'fluentui-react-native/button'; +import { Menu, MenuItem, MenuTrigger, MenuPopover, MenuList } from 'fluentui-react-native/menu'; +import { Stack } from 'fluentui-react-native/stack'; import Svg, { Path } from 'react-native-svg'; import { stackStyle } from '../Common/styles'; diff --git a/apps/tester-core/src/TestComponents/MenuButtonLegacy/CustomizedMenuButtonTest.tsx b/apps/tester-core/src/TestComponents/MenuButtonLegacy/CustomizedMenuButtonTest.tsx index 1057769e44b..b456b9c0341 100644 --- a/apps/tester-core/src/TestComponents/MenuButtonLegacy/CustomizedMenuButtonTest.tsx +++ b/apps/tester-core/src/TestComponents/MenuButtonLegacy/CustomizedMenuButtonTest.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { Text, View } from 'react-native'; -import { MenuButton } from '@fluentui/react-native'; +import { MenuButton } from 'fluentui-react-native/menu-button'; import { viewWrapperStyle, columnStyle, rowStyle } from './MenuButtonLegacyTestStyles'; import { menuItems } from './testData'; diff --git a/apps/tester-core/src/TestComponents/MenuButtonLegacy/MenuButtonLegacyE2ETest.tsx b/apps/tester-core/src/TestComponents/MenuButtonLegacy/MenuButtonLegacyE2ETest.tsx index 2193b4d80a5..27b4e8d2c9a 100644 --- a/apps/tester-core/src/TestComponents/MenuButtonLegacy/MenuButtonLegacyE2ETest.tsx +++ b/apps/tester-core/src/TestComponents/MenuButtonLegacy/MenuButtonLegacyE2ETest.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; import { Text, View } from 'react-native'; -import type { ContextualMenuProps } from '@fluentui/react-native'; -import { MenuButton } from '@fluentui/react-native'; +import type { ContextualMenuProps } from 'fluentui-react-native/contextual-menu'; +import { MenuButton } from 'fluentui-react-native/menu-button'; import { MENU_BUTTON_TEST_COMPONENT, MENU_BUTTON_ACCESSIBILITY_LABEL, diff --git a/apps/tester-core/src/TestComponents/MenuButtonLegacy/NestedMenuButtonTest.tsx b/apps/tester-core/src/TestComponents/MenuButtonLegacy/NestedMenuButtonTest.tsx index 4e8dba0c199..b85e8b2afab 100644 --- a/apps/tester-core/src/TestComponents/MenuButtonLegacy/NestedMenuButtonTest.tsx +++ b/apps/tester-core/src/TestComponents/MenuButtonLegacy/NestedMenuButtonTest.tsx @@ -1,7 +1,8 @@ import * as React from 'react'; import { Text, View, Switch } from 'react-native'; -import { Separator, MenuButton } from '@fluentui/react-native'; +import { MenuButton } from 'fluentui-react-native/menu-button'; +import { Separator } from 'fluentui-react-native/separator'; import { viewWrapperStyle, columnStyle, rowStyle, textColor } from './MenuButtonLegacyTestStyles'; import { menuItems, iconProps } from './testData'; diff --git a/apps/tester-core/src/TestComponents/MenuButtonLegacy/StandardMenuButtonTest.tsx b/apps/tester-core/src/TestComponents/MenuButtonLegacy/StandardMenuButtonTest.tsx index b07a3c4de0c..e97659d1021 100644 --- a/apps/tester-core/src/TestComponents/MenuButtonLegacy/StandardMenuButtonTest.tsx +++ b/apps/tester-core/src/TestComponents/MenuButtonLegacy/StandardMenuButtonTest.tsx @@ -1,9 +1,10 @@ import * as React from 'react'; import { Text, View, Switch, Platform } from 'react-native'; -import type { ContextualMenuProps } from '@fluentui/react-native'; -import { Separator, MenuButton } from '@fluentui/react-native'; -import type { IconSourcesType } from '@fluentui-react-native/icon'; +import type { ContextualMenuProps } from 'fluentui-react-native/contextual-menu'; +import { MenuButton } from 'fluentui-react-native/menu-button'; +import { Separator } from 'fluentui-react-native/separator'; +import type { IconSourcesType } from 'fluentui-react-native/icon'; import { viewWrapperStyle, columnStyle, rowStyle, textColor } from './MenuButtonLegacyTestStyles'; import { menuItems, iconProps } from './testData'; diff --git a/apps/tester-core/src/TestComponents/MenuButtonLegacy/testData.ts b/apps/tester-core/src/TestComponents/MenuButtonLegacy/testData.ts index 31ddda93e6d..ced7ba37fdc 100644 --- a/apps/tester-core/src/TestComponents/MenuButtonLegacy/testData.ts +++ b/apps/tester-core/src/TestComponents/MenuButtonLegacy/testData.ts @@ -1,4 +1,4 @@ -import type { MenuButtonItemProps } from '@fluentui/react-native'; +import type { MenuButtonItemProps } from 'fluentui-react-native/menu-button'; import { MENU_ITEM_1_COMPONENT } from '@fluentui-react-native/e2e-testing'; import { svgProps, testImage } from '../Common/iconExamples'; diff --git a/apps/tester-core/src/TestComponents/MenuButtonV1/CustomizedMenuButtonTest.tsx b/apps/tester-core/src/TestComponents/MenuButtonV1/CustomizedMenuButtonTest.tsx index 4a658a9cf44..6453b685e5d 100644 --- a/apps/tester-core/src/TestComponents/MenuButtonV1/CustomizedMenuButtonTest.tsx +++ b/apps/tester-core/src/TestComponents/MenuButtonV1/CustomizedMenuButtonTest.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { Text, View } from 'react-native'; -import { MenuButton } from '@fluentui/react-native'; +import { MenuButton } from 'fluentui-react-native/menu-button'; import { viewWrapperStyle, columnStyle, rowStyle } from './MenuButtonV1TestStyles'; import { menuItems } from './testData'; diff --git a/apps/tester-core/src/TestComponents/MenuButtonV1/MenuButtonV1E2ETest.tsx b/apps/tester-core/src/TestComponents/MenuButtonV1/MenuButtonV1E2ETest.tsx index 6633a5e3705..4c452bfae79 100644 --- a/apps/tester-core/src/TestComponents/MenuButtonV1/MenuButtonV1E2ETest.tsx +++ b/apps/tester-core/src/TestComponents/MenuButtonV1/MenuButtonV1E2ETest.tsx @@ -1,14 +1,14 @@ import * as React from 'react'; import { Text, View } from 'react-native'; -import type { ContextualMenuProps } from '@fluentui/react-native'; +import type { ContextualMenuProps } from 'fluentui-react-native/contextual-menu'; import { MENUBUTTONV1_TEST_COMPONENT, MENUBUTTONV1_ACCESSIBILITY_LABEL, MENUBUTTONV1_NO_A11Y_LABEL_COMPONENT, MENUBUTTONV1_TEST_COMPONENT_LABEL, } from '@fluentui-react-native/e2e-testing'; -import { MenuButton } from '@fluentui-react-native/experimental-menu-button'; +import { MenuButton } from 'fluentui-react-native/experimental-menu-button'; import { viewWrapperStyle, columnStyle, rowStyle, textColor } from './MenuButtonV1TestStyles'; import { menuItems } from './testData'; diff --git a/apps/tester-core/src/TestComponents/MenuButtonV1/NestedMenuButtonTest.tsx b/apps/tester-core/src/TestComponents/MenuButtonV1/NestedMenuButtonTest.tsx index a8c74200089..df074ea4603 100644 --- a/apps/tester-core/src/TestComponents/MenuButtonV1/NestedMenuButtonTest.tsx +++ b/apps/tester-core/src/TestComponents/MenuButtonV1/NestedMenuButtonTest.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; import { Text, View, Switch } from 'react-native'; -import { Separator } from '@fluentui/react-native'; -import { MenuButton } from '@fluentui-react-native/experimental-menu-button'; +import { Separator } from 'fluentui-react-native/separator'; +import { MenuButton } from 'fluentui-react-native/experimental-menu-button'; import { viewWrapperStyle, columnStyle, rowStyle, textColor } from './MenuButtonV1TestStyles'; import { menuItems, iconProps } from './testData'; diff --git a/apps/tester-core/src/TestComponents/MenuButtonV1/StandardMenuButtonTest.tsx b/apps/tester-core/src/TestComponents/MenuButtonV1/StandardMenuButtonTest.tsx index 19dd292d1f2..5c8044a216f 100644 --- a/apps/tester-core/src/TestComponents/MenuButtonV1/StandardMenuButtonTest.tsx +++ b/apps/tester-core/src/TestComponents/MenuButtonV1/StandardMenuButtonTest.tsx @@ -6,10 +6,10 @@ import * as React from 'react'; import { Text, View, Switch, Platform } from 'react-native'; -import type { ContextualMenuProps } from '@fluentui/react-native'; -import { Separator } from '@fluentui/react-native'; -import { MenuButton } from '@fluentui-react-native/experimental-menu-button'; -import type { IconSourcesType } from '@fluentui-react-native/icon'; +import type { ContextualMenuProps } from 'fluentui-react-native/contextual-menu'; +import { Separator } from 'fluentui-react-native/separator'; +import { MenuButton } from 'fluentui-react-native/experimental-menu-button'; +import type { IconSourcesType } from 'fluentui-react-native/icon'; import { viewWrapperStyle, columnStyle, rowStyle, textColor } from './MenuButtonV1TestStyles'; import { menuItems, iconProps } from './testData'; diff --git a/apps/tester-core/src/TestComponents/MenuButtonV1/testData.ts b/apps/tester-core/src/TestComponents/MenuButtonV1/testData.ts index 84b90227afe..ed5e82a80a1 100644 --- a/apps/tester-core/src/TestComponents/MenuButtonV1/testData.ts +++ b/apps/tester-core/src/TestComponents/MenuButtonV1/testData.ts @@ -1,4 +1,4 @@ -import type { MenuButtonItemProps } from '@fluentui/react-native'; +import type { MenuButtonItemProps } from 'fluentui-react-native/menu-button'; import { testImage, svgProps } from '../Common/iconExamples'; diff --git a/apps/tester-core/src/TestComponents/NativeDatePicker/NativeDatePickerTest.tsx b/apps/tester-core/src/TestComponents/NativeDatePicker/NativeDatePickerTest.tsx index c0b3a4a9ee5..e2016e03d02 100644 --- a/apps/tester-core/src/TestComponents/NativeDatePicker/NativeDatePickerTest.tsx +++ b/apps/tester-core/src/TestComponents/NativeDatePicker/NativeDatePickerTest.tsx @@ -1,10 +1,10 @@ import * as React from 'react'; import { Platform, Switch, View } from 'react-native'; -import { Text } from '@fluentui/react-native'; -import { Button } from '@fluentui-react-native/button'; -import { NativeDatePicker } from '@fluentui-react-native/experimental-native-date-picker'; -import { Stack } from '@fluentui-react-native/stack'; +import { Text } from 'fluentui-react-native/text'; +import { Button } from 'fluentui-react-native/button'; +import { NativeDatePicker } from 'fluentui-react-native/experimental-native-date-picker'; +import { Stack } from 'fluentui-react-native/stack'; import { NATIVEDATEPICKER_TESTPAGE } from './consts'; import { stackStyle, commonTestStyles as commonStyles } from '../Common/styles'; diff --git a/apps/tester-core/src/TestComponents/Notification/NotificationTest.tsx b/apps/tester-core/src/TestComponents/Notification/NotificationTest.tsx index db0e5183dfd..3c8f3ee921c 100644 --- a/apps/tester-core/src/TestComponents/Notification/NotificationTest.tsx +++ b/apps/tester-core/src/TestComponents/Notification/NotificationTest.tsx @@ -1,11 +1,11 @@ import * as React from 'react'; import { Animated, StyleSheet, Switch, TextInput, View } from 'react-native'; -import { ButtonV1 as Button } from '@fluentui-react-native/button'; -import type { SvgIconProps } from '@fluentui-react-native/icon'; -import type { NotificationVariant } from '@fluentui-react-native/notification'; -import { Notification, NotificationVariants } from '@fluentui-react-native/notification'; -import { TextV1 as Text } from '@fluentui-react-native/text'; +import { ButtonV1 as Button } from 'fluentui-react-native/button'; +import type { SvgIconProps } from 'fluentui-react-native/icon'; +import type { NotificationVariant } from 'fluentui-react-native/notification'; +import { Notification, NotificationVariants } from 'fluentui-react-native/notification'; +import { TextV1 as Text } from 'fluentui-react-native/text'; import PlayButton from '../../../assets/play_button.svg'; import { StyledPicker } from '../Common/StyledPicker'; diff --git a/apps/tester-core/src/TestComponents/Overflow/OverflowE2ETest.tsx b/apps/tester-core/src/TestComponents/Overflow/OverflowE2ETest.tsx index f57fd95299c..7ef7d894fd5 100644 --- a/apps/tester-core/src/TestComponents/Overflow/OverflowE2ETest.tsx +++ b/apps/tester-core/src/TestComponents/Overflow/OverflowE2ETest.tsx @@ -2,8 +2,8 @@ import * as React from 'react'; import { View, StyleSheet } from 'react-native'; import type { StyleProp, ViewStyle } from 'react-native'; -import { ButtonV1 as Button } from '@fluentui-react-native/button'; -import { Divider } from '@fluentui-react-native/divider'; +import { ButtonV1 as Button } from 'fluentui-react-native/button'; +import { Divider } from 'fluentui-react-native/divider'; import { FIRST_OVERFLOW_ITEM, FIRST_OVERFLOW_ITEM_ID, @@ -22,9 +22,9 @@ import { RADIO_275, RADIO_375, } from '@fluentui-react-native/e2e-testing'; -import { Overflow, OverflowItem, useOverflowMenu } from '@fluentui-react-native/overflow'; -import { RadioGroupV1 as RadioGroup, Radio } from '@fluentui-react-native/radio-group'; -import { TextV1 as Text } from '@fluentui-react-native/text'; +import { Overflow, OverflowItem, useOverflowMenu } from 'fluentui-react-native/overflow'; +import { RadioGroupV1 as RadioGroup, Radio } from 'fluentui-react-native/radio-group'; +import { TextV1 as Text } from 'fluentui-react-native/text'; const styles = StyleSheet.create({ menu: { diff --git a/apps/tester-core/src/TestComponents/Overflow/OverflowTest.tsx b/apps/tester-core/src/TestComponents/Overflow/OverflowTest.tsx index f069c92abc3..db0b7f3922d 100644 --- a/apps/tester-core/src/TestComponents/Overflow/OverflowTest.tsx +++ b/apps/tester-core/src/TestComponents/Overflow/OverflowTest.tsx @@ -2,13 +2,13 @@ import * as React from 'react'; import { View, StyleSheet } from 'react-native'; import type { ViewStyle } from 'react-native'; -import { ButtonV1 as Button } from '@fluentui-react-native/button'; -import { Divider } from '@fluentui-react-native/divider'; +import { ButtonV1 as Button } from 'fluentui-react-native/button'; +import { Divider } from 'fluentui-react-native/divider'; import { OVERFLOW_TESTPAGE } from '@fluentui-react-native/e2e-testing'; -import { Menu, MenuTrigger, MenuList, MenuPopover, MenuItem } from '@fluentui-react-native/menu'; -import { Overflow, OverflowItem, useOverflowMenu } from '@fluentui-react-native/overflow'; -import { TabList, Tab } from '@fluentui-react-native/tablist'; -import { TextV1 as Text } from '@fluentui-react-native/text'; +import { Menu, MenuTrigger, MenuList, MenuPopover, MenuItem } from 'fluentui-react-native/menu'; +import { Overflow, OverflowItem, useOverflowMenu } from 'fluentui-react-native/overflow'; +import { TabList, Tab } from 'fluentui-react-native/tablist'; +import { TextV1 as Text } from 'fluentui-react-native/text'; import { E2EOverflowTest } from './OverflowE2ETest'; import MoreHorizontalIcon from '../../../assets/MoreHorizontalFilled.svg'; diff --git a/apps/tester-core/src/TestComponents/Persona/CustomizeUsage.tsx b/apps/tester-core/src/TestComponents/Persona/CustomizeUsage.tsx index 5749d8d5f11..0123941fd9e 100644 --- a/apps/tester-core/src/TestComponents/Persona/CustomizeUsage.tsx +++ b/apps/tester-core/src/TestComponents/Persona/CustomizeUsage.tsx @@ -1,10 +1,10 @@ import * as React from 'react'; import { View, Text, Switch, TextInput } from 'react-native'; -import { Persona } from '@fluentui/react-native'; -import type { Theme } from '@fluentui-react-native/theme-types'; -import { useTheme } from '@fluentui-react-native/theme-types'; -import { themedStyleSheet } from '@fluentui-react-native/themed-stylesheet'; +import { Persona } from 'fluentui-react-native/persona'; +import type { Theme } from 'fluentui-react-native/theme-types'; +import { useTheme } from 'fluentui-react-native/theme-types'; +import { themedStyleSheet } from 'fluentui-react-native/themed-stylesheet'; import { michaelImageUrl } from './styles'; import { Slider } from '../Common/Slider'; diff --git a/apps/tester-core/src/TestComponents/Persona/StandardUsage.tsx b/apps/tester-core/src/TestComponents/Persona/StandardUsage.tsx index bbeb992ffd0..c3df035b753 100644 --- a/apps/tester-core/src/TestComponents/Persona/StandardUsage.tsx +++ b/apps/tester-core/src/TestComponents/Persona/StandardUsage.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; import { View, Text, Switch } from 'react-native'; -import type { PersonaSize } from '@fluentui/react-native'; -import { Persona } from '@fluentui/react-native'; +import type { PersonaSize } from 'fluentui-react-native/persona-coin'; +import { Persona } from 'fluentui-react-native/persona'; import { satyaImageUrl } from './styles'; import { MenuPicker } from '../Common/MenuPicker'; diff --git a/apps/tester-core/src/TestComponents/PersonaCoin/CustomizeUsage.mobile.tsx b/apps/tester-core/src/TestComponents/PersonaCoin/CustomizeUsage.mobile.tsx index 342b4e18892..2d8518bccba 100644 --- a/apps/tester-core/src/TestComponents/PersonaCoin/CustomizeUsage.mobile.tsx +++ b/apps/tester-core/src/TestComponents/PersonaCoin/CustomizeUsage.mobile.tsx @@ -1,8 +1,8 @@ import React from 'react'; import { Switch, View, Text, TextInput, StyleSheet } from 'react-native'; -import { PersonaCoin } from '@fluentui/react-native'; -import { useTheme } from '@fluentui-react-native/theme-types'; +import { PersonaCoin } from 'fluentui-react-native/persona-coin'; +import { useTheme } from 'fluentui-react-native/theme-types'; import Slider from '@react-native-community/slider'; import type { SliderProps } from '@react-native-community/slider'; diff --git a/apps/tester-core/src/TestComponents/PersonaCoin/CustomizeUsage.tsx b/apps/tester-core/src/TestComponents/PersonaCoin/CustomizeUsage.tsx index d0f0293d809..c37a42e97b0 100644 --- a/apps/tester-core/src/TestComponents/PersonaCoin/CustomizeUsage.tsx +++ b/apps/tester-core/src/TestComponents/PersonaCoin/CustomizeUsage.tsx @@ -1,11 +1,11 @@ import * as React from 'react'; import { Switch, View, Text, TextInput } from 'react-native'; -import type { IconAlignment } from '@fluentui/react-native'; -import { PersonaCoin } from '@fluentui/react-native'; -import type { Theme } from '@fluentui-react-native/theme-types'; -import { useTheme } from '@fluentui-react-native/theme-types'; -import { themedStyleSheet } from '@fluentui-react-native/themed-stylesheet'; +import type { IconAlignment } from 'fluentui-react-native/persona-coin'; +import { PersonaCoin } from 'fluentui-react-native/persona-coin'; +import type { Theme } from 'fluentui-react-native/theme-types'; +import { useTheme } from 'fluentui-react-native/theme-types'; +import { themedStyleSheet } from 'fluentui-react-native/themed-stylesheet'; import { steveBallmerPhotoUrl } from './styles'; import { AlignmentPicker } from '../Common/AlignmentPicker'; diff --git a/apps/tester-core/src/TestComponents/PersonaCoin/StandardUsage.tsx b/apps/tester-core/src/TestComponents/PersonaCoin/StandardUsage.tsx index d01a367c8c9..88298628b4a 100644 --- a/apps/tester-core/src/TestComponents/PersonaCoin/StandardUsage.tsx +++ b/apps/tester-core/src/TestComponents/PersonaCoin/StandardUsage.tsx @@ -2,9 +2,9 @@ import * as React from 'react'; import type { ColorValue } from 'react-native'; import { Switch, View, Text } from 'react-native'; -import type { PersonaSize, PersonaCoinFluentColor, PersonaPresence } from '@fluentui/react-native'; -import { PersonaCoin } from '@fluentui/react-native'; -import { useTheme } from '@fluentui-react-native/theme-types'; +import type { PersonaSize, PersonaCoinFluentColor, PersonaPresence } from 'fluentui-react-native/persona-coin'; +import { PersonaCoin } from 'fluentui-react-native/persona-coin'; +import { useTheme } from 'fluentui-react-native/theme-types'; import { satyaPhotoUrl, undefinedText } from './styles'; import { StyledPicker } from '../Common/StyledPicker'; diff --git a/apps/tester-core/src/TestComponents/Pressable/PressableTest.tsx b/apps/tester-core/src/TestComponents/Pressable/PressableTest.tsx index 0a83c158c6d..cbba9793a72 100644 --- a/apps/tester-core/src/TestComponents/Pressable/PressableTest.tsx +++ b/apps/tester-core/src/TestComponents/Pressable/PressableTest.tsx @@ -2,11 +2,11 @@ import * as React from 'react'; import type { GestureResponderEvent, ViewProps, ViewStyle } from 'react-native'; import { Alert, StyleSheet, View, Text } from 'react-native'; -import { Pressable } from '@fluentui/react-native'; +import { Pressable } from 'fluentui-react-native/pressable'; import { PRESSABLE_TESTPAGE } from '@fluentui-react-native/e2e-testing'; -import { useFocusState, useHoverState, usePressState } from '@fluentui-react-native/interactive-hooks'; -import type { IPressableState } from '@fluentui-react-native/interactive-hooks'; -import { Stack } from '@fluentui-react-native/stack'; +import { useFocusState, useHoverState, usePressState } from 'fluentui-react-native/interactive-hooks'; +import type { IPressableState } from 'fluentui-react-native/interactive-hooks'; +import { Stack } from 'fluentui-react-native/stack'; import { Square } from '../Common/Square'; import type { TestSection, PlatformStatus } from '../Test'; diff --git a/apps/tester-core/src/TestComponents/RadioGroupLegacy/RadioGroupLegacyE2ETest.tsx b/apps/tester-core/src/TestComponents/RadioGroupLegacy/RadioGroupLegacyE2ETest.tsx index 211359e3d30..1b7edbd7845 100644 --- a/apps/tester-core/src/TestComponents/RadioGroupLegacy/RadioGroupLegacyE2ETest.tsx +++ b/apps/tester-core/src/TestComponents/RadioGroupLegacy/RadioGroupLegacyE2ETest.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { View } from 'react-native'; -import { RadioButton, RadioGroup } from '@fluentui/react-native'; +import { RadioButton, RadioGroup } from 'fluentui-react-native/radio-group'; import { RADIOGROUP_TEST_COMPONENT, RADIOGROUP_NO_A11Y_LABEL_COMPONENT, @@ -14,7 +14,7 @@ import { FIRST_RADIO_BUTTON_ACCESSIBILITY_LABEL, SECOND_RADIO_BUTTON_LABEL, } from '@fluentui-react-native/e2e-testing'; -import { Stack } from '@fluentui-react-native/stack'; +import { Stack } from 'fluentui-react-native/stack'; import { stackStyle } from '../Common/styles'; import { testProps } from '../Common/TestProps'; diff --git a/apps/tester-core/src/TestComponents/RadioGroupLegacy/RadioGroupLegacyTest.tsx b/apps/tester-core/src/TestComponents/RadioGroupLegacy/RadioGroupLegacyTest.tsx index 675848de246..6f112832f5d 100644 --- a/apps/tester-core/src/TestComponents/RadioGroupLegacy/RadioGroupLegacyTest.tsx +++ b/apps/tester-core/src/TestComponents/RadioGroupLegacy/RadioGroupLegacyTest.tsx @@ -1,7 +1,8 @@ import * as React from 'react'; import { View } from 'react-native'; -import { RadioButton, RadioGroup, Separator } from '@fluentui/react-native'; +import { RadioButton, RadioGroup } from 'fluentui-react-native/radio-group'; +import { Separator } from 'fluentui-react-native/separator'; import { RADIOGROUP_TESTPAGE } from '@fluentui-react-native/e2e-testing'; import { RadioGroupLegacyE2ETest } from './RadioGroupLegacyE2ETest'; diff --git a/apps/tester-core/src/TestComponents/RadioGroupV1/CustomizedRadioGroup.tsx b/apps/tester-core/src/TestComponents/RadioGroupV1/CustomizedRadioGroup.tsx index 651a8761795..b360668e911 100644 --- a/apps/tester-core/src/TestComponents/RadioGroupV1/CustomizedRadioGroup.tsx +++ b/apps/tester-core/src/TestComponents/RadioGroupV1/CustomizedRadioGroup.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; import { View, TextInput, Text, StyleSheet } from 'react-native'; -import type { RadioGroupTokens, RadioTokens } from '@fluentui-react-native/radio-group'; -import { RadioGroupV1 as RadioGroup, Radio } from '@fluentui-react-native/radio-group'; +import type { RadioGroupTokens, RadioTokens } from 'fluentui-react-native/radio-group'; +import { RadioGroupV1 as RadioGroup, Radio } from 'fluentui-react-native/radio-group'; import { commonTestStyles as commonStyles } from '../Common/styles'; diff --git a/apps/tester-core/src/TestComponents/RadioGroupV1/DefaultRadioGroup.android.tsx b/apps/tester-core/src/TestComponents/RadioGroupV1/DefaultRadioGroup.android.tsx index 31731a0c921..355be402a83 100644 --- a/apps/tester-core/src/TestComponents/RadioGroupV1/DefaultRadioGroup.android.tsx +++ b/apps/tester-core/src/TestComponents/RadioGroupV1/DefaultRadioGroup.android.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { View } from 'react-native'; -import { RadioGroupV1 as RadioGroup, Radio } from '@fluentui-react-native/radio-group'; +import { RadioGroupV1 as RadioGroup, Radio } from 'fluentui-react-native/radio-group'; export const DefaultRadioGroup: React.FunctionComponent = () => { // Client's example onChange function diff --git a/apps/tester-core/src/TestComponents/RadioGroupV1/DefaultRadioGroup.tsx b/apps/tester-core/src/TestComponents/RadioGroupV1/DefaultRadioGroup.tsx index 6c1f5b2f2fc..ffcea056354 100644 --- a/apps/tester-core/src/TestComponents/RadioGroupV1/DefaultRadioGroup.tsx +++ b/apps/tester-core/src/TestComponents/RadioGroupV1/DefaultRadioGroup.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; import { View } from 'react-native'; -import { Separator } from '@fluentui/react-native'; -import { RadioGroupV1 as RadioGroup, Radio } from '@fluentui-react-native/radio-group'; +import { Separator } from 'fluentui-react-native/separator'; +import { RadioGroupV1 as RadioGroup, Radio } from 'fluentui-react-native/radio-group'; export const DefaultRadioGroup: React.FunctionComponent = () => { // Client's example onChange function diff --git a/apps/tester-core/src/TestComponents/RadioGroupV1/DisabledRadioGroup.tsx b/apps/tester-core/src/TestComponents/RadioGroupV1/DisabledRadioGroup.tsx index 79ce2946df7..12173022d24 100644 --- a/apps/tester-core/src/TestComponents/RadioGroupV1/DisabledRadioGroup.tsx +++ b/apps/tester-core/src/TestComponents/RadioGroupV1/DisabledRadioGroup.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; import { View } from 'react-native'; -import { Separator } from '@fluentui/react-native'; -import { RadioGroupV1 as RadioGroup, Radio } from '@fluentui-react-native/radio-group'; +import { Separator } from 'fluentui-react-native/separator'; +import { RadioGroupV1 as RadioGroup, Radio } from 'fluentui-react-native/radio-group'; export const DisabledRadioGroup: React.FunctionComponent = () => { // Client's example onChange function diff --git a/apps/tester-core/src/TestComponents/RadioGroupV1/HorizontalRadioGroup.tsx b/apps/tester-core/src/TestComponents/RadioGroupV1/HorizontalRadioGroup.tsx index 5e06728540f..f0adc9caf4e 100644 --- a/apps/tester-core/src/TestComponents/RadioGroupV1/HorizontalRadioGroup.tsx +++ b/apps/tester-core/src/TestComponents/RadioGroupV1/HorizontalRadioGroup.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; import { View } from 'react-native'; -import { Separator } from '@fluentui/react-native'; -import { RadioGroupV1 as RadioGroup, Radio } from '@fluentui-react-native/radio-group'; +import { Separator } from 'fluentui-react-native/separator'; +import { RadioGroupV1 as RadioGroup, Radio } from 'fluentui-react-native/radio-group'; export const HorizontalRadioGroup: React.FunctionComponent = () => { // Client's example onChange function diff --git a/apps/tester-core/src/TestComponents/RadioGroupV1/RadioGroupV1E2ETest.tsx b/apps/tester-core/src/TestComponents/RadioGroupV1/RadioGroupV1E2ETest.tsx index 3a9899dc9e0..8bad709c127 100644 --- a/apps/tester-core/src/TestComponents/RadioGroupV1/RadioGroupV1E2ETest.tsx +++ b/apps/tester-core/src/TestComponents/RadioGroupV1/RadioGroupV1E2ETest.tsx @@ -14,8 +14,8 @@ import { FIRST_RADIO_ACCESSIBILITY_LABEL, SECOND_RADIO_LABEL, } from '@fluentui-react-native/e2e-testing'; -import { RadioGroupV1 as RadioGroup, Radio } from '@fluentui-react-native/radio-group'; -import { Stack } from '@fluentui-react-native/stack'; +import { RadioGroupV1 as RadioGroup, Radio } from 'fluentui-react-native/radio-group'; +import { Stack } from 'fluentui-react-native/stack'; import { stackStyle } from '../Common/styles'; import { testProps } from '../Common/TestProps'; diff --git a/apps/tester-core/src/TestComponents/RadioGroupV1/RequiredRadioGroup.tsx b/apps/tester-core/src/TestComponents/RadioGroupV1/RequiredRadioGroup.tsx index f8796e9b5c1..9f7bdc36d7c 100644 --- a/apps/tester-core/src/TestComponents/RadioGroupV1/RequiredRadioGroup.tsx +++ b/apps/tester-core/src/TestComponents/RadioGroupV1/RequiredRadioGroup.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { View } from 'react-native'; -import { RadioGroupV1 as RadioGroup, Radio } from '@fluentui-react-native/radio-group'; +import { RadioGroupV1 as RadioGroup, Radio } from 'fluentui-react-native/radio-group'; export const RequiredRadioGroup: React.FunctionComponent = () => { // Client's example onChange function diff --git a/apps/tester-core/src/TestComponents/RadioGroupV1/SubtextRadioGroup.tsx b/apps/tester-core/src/TestComponents/RadioGroupV1/SubtextRadioGroup.tsx index 3cd8a4d7f13..916277c7ca0 100644 --- a/apps/tester-core/src/TestComponents/RadioGroupV1/SubtextRadioGroup.tsx +++ b/apps/tester-core/src/TestComponents/RadioGroupV1/SubtextRadioGroup.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { View } from 'react-native'; -import { RadioGroupV1 as RadioGroup, Radio } from '@fluentui-react-native/radio-group'; +import { RadioGroupV1 as RadioGroup, Radio } from 'fluentui-react-native/radio-group'; export const SubtextRadioGroup: React.FunctionComponent = () => { // Client's example onChange function diff --git a/apps/tester-core/src/TestComponents/Separator/SeparatorTest.mobile.tsx b/apps/tester-core/src/TestComponents/Separator/SeparatorTest.mobile.tsx index 25c3c2af692..929418d27a8 100644 --- a/apps/tester-core/src/TestComponents/Separator/SeparatorTest.mobile.tsx +++ b/apps/tester-core/src/TestComponents/Separator/SeparatorTest.mobile.tsx @@ -1,9 +1,9 @@ import * as React from 'react'; import { SEPARATOR_TESTPAGE } from '@fluentui-react-native/e2e-testing'; -import { Separator } from '@fluentui-react-native/separator'; -import { Stack } from '@fluentui-react-native/stack'; -import { TextV1 as Text } from '@fluentui-react-native/text'; +import { Separator } from 'fluentui-react-native/separator'; +import { Stack } from 'fluentui-react-native/stack'; +import { TextV1 as Text } from 'fluentui-react-native/text'; import { commonTestStyles, mobileStyles } from '../Common/styles'; import type { TestSection, PlatformStatus } from '../Test'; diff --git a/apps/tester-core/src/TestComponents/Separator/SeparatorTest.tsx b/apps/tester-core/src/TestComponents/Separator/SeparatorTest.tsx index b08b13fcd01..73264fade53 100644 --- a/apps/tester-core/src/TestComponents/Separator/SeparatorTest.tsx +++ b/apps/tester-core/src/TestComponents/Separator/SeparatorTest.tsx @@ -1,10 +1,10 @@ import * as React from 'react'; -import { ButtonV1 } from '@fluentui-react-native/button'; +import { ButtonV1 } from 'fluentui-react-native/button'; import { SEPARATOR_TESTPAGE } from '@fluentui-react-native/e2e-testing'; -import { Separator } from '@fluentui-react-native/separator'; -import { Stack } from '@fluentui-react-native/stack'; -import { TextV1 as Text } from '@fluentui-react-native/text'; +import { Separator } from 'fluentui-react-native/separator'; +import { Stack } from 'fluentui-react-native/stack'; +import { TextV1 as Text } from 'fluentui-react-native/text'; import { stackStyle, separatorStackStyle } from '../Common/styles'; import type { TestSection, PlatformStatus } from '../Test'; diff --git a/apps/tester-core/src/TestComponents/Shadow/ShadowButtonTestSection.tsx b/apps/tester-core/src/TestComponents/Shadow/ShadowButtonTestSection.tsx index e39ffbe9360..a7072e2a530 100644 --- a/apps/tester-core/src/TestComponents/Shadow/ShadowButtonTestSection.tsx +++ b/apps/tester-core/src/TestComponents/Shadow/ShadowButtonTestSection.tsx @@ -1,10 +1,11 @@ import * as React from 'react'; import { Platform, View, StyleSheet } from 'react-native'; -import { FAB, Text } from '@fluentui/react-native'; -import { ButtonV1 as Button } from '@fluentui-react-native/button'; -import { Shadow } from '@fluentui-react-native/experimental-shadow'; -import { useFluentTheme } from '@fluentui-react-native/framework'; +import { FAB } from 'fluentui-react-native/button'; +import { Text } from 'fluentui-react-native/text'; +import { ButtonV1 as Button } from 'fluentui-react-native/button'; +import { Shadow } from 'fluentui-react-native/experimental-shadow'; +import { useFluentTheme } from 'fluentui-react-native/framework'; import { shadowTestPageStyles } from './ShadowTestPageStyles'; import { iconProps } from '../Common/iconExamples'; diff --git a/apps/tester-core/src/TestComponents/Shadow/ShadowDepthTestSection.tsx b/apps/tester-core/src/TestComponents/Shadow/ShadowDepthTestSection.tsx index 78fba881a80..98b1897ca10 100644 --- a/apps/tester-core/src/TestComponents/Shadow/ShadowDepthTestSection.tsx +++ b/apps/tester-core/src/TestComponents/Shadow/ShadowDepthTestSection.tsx @@ -1,12 +1,12 @@ import * as React from 'react'; import { View, type ViewStyle } from 'react-native'; -import { Text } from '@fluentui/react-native'; -import { Shadow, getShadowTokenStyleSet } from '@fluentui-react-native/experimental-shadow'; -import { mergeStyles, useFluentTheme } from '@fluentui-react-native/framework'; -import type { ShadowToken, Theme } from '@fluentui-react-native/theme-types'; -import { useTheme } from '@fluentui-react-native/theme-types'; -import { themedStyleSheet } from '@fluentui-react-native/themed-stylesheet'; +import { Text } from 'fluentui-react-native/text'; +import { Shadow, getShadowTokenStyleSet } from 'fluentui-react-native/experimental-shadow'; +import { mergeStyles, useFluentTheme } from 'fluentui-react-native/framework'; +import type { ShadowToken, Theme } from 'fluentui-react-native/theme-types'; +import { useTheme } from 'fluentui-react-native/theme-types'; +import { themedStyleSheet } from 'fluentui-react-native/themed-stylesheet'; import { shadowTestPageStyles } from './ShadowTestPageStyles'; @@ -77,10 +77,7 @@ export const ShadowDepthTestSection: React.FunctionComponent = () => { function getShadowDescription(shadowToken: ShadowToken): string { const shadowStyle = getShadowTokenStyleSet(shadowToken); - return ( - '\nAmbient: ' + - JSON.stringify(shadowStyle.ambient, undefined, ' ').split('\n').join('').replace(/['"]+/g, '') + - '\n\nKey: ' + - JSON.stringify(shadowStyle.key, undefined, ' ').split('\n').join('').replace(/['"]+/g, '') - ); + return ('\nAmbient: ' + + JSON.stringify(shadowStyle.ambient, undefined, ' ').split('\n').join('').replace(/['"]+/g, '') + + '\n\nKey: ' + JSON.stringify(shadowStyle.key, undefined, ' ').split('\n').join('').replace(/['"]+/g, '')); } diff --git a/apps/tester-core/src/TestComponents/Shadow/ShadowTestPageStyles.tsx b/apps/tester-core/src/TestComponents/Shadow/ShadowTestPageStyles.tsx index 3c14b8bf451..848b7fa085f 100644 --- a/apps/tester-core/src/TestComponents/Shadow/ShadowTestPageStyles.tsx +++ b/apps/tester-core/src/TestComponents/Shadow/ShadowTestPageStyles.tsx @@ -1,7 +1,7 @@ import { Platform } from 'react-native'; -import type { Theme } from '@fluentui-react-native/theme-types'; -import { themedStyleSheet } from '@fluentui-react-native/themed-stylesheet'; +import type { Theme } from 'fluentui-react-native/theme-types'; +import { themedStyleSheet } from 'fluentui-react-native/themed-stylesheet'; /** * The default dark mode iOS background color from the theme is black ('#000000'), which shadows are not visible against. diff --git a/apps/tester-core/src/TestComponents/Shadow/ShadowWithDifferentPropsTestSection.tsx b/apps/tester-core/src/TestComponents/Shadow/ShadowWithDifferentPropsTestSection.tsx index abbe58fa252..811d70d3816 100644 --- a/apps/tester-core/src/TestComponents/Shadow/ShadowWithDifferentPropsTestSection.tsx +++ b/apps/tester-core/src/TestComponents/Shadow/ShadowWithDifferentPropsTestSection.tsx @@ -1,12 +1,12 @@ import * as React from 'react'; import { View, type ViewStyle } from 'react-native'; -import { Text } from '@fluentui/react-native'; -import { Shadow } from '@fluentui-react-native/experimental-shadow'; -import type { Theme } from '@fluentui-react-native/framework'; -import { useFluentTheme } from '@fluentui-react-native/framework'; -import { mergeStyles } from '@fluentui-react-native/framework-base'; -import { themedStyleSheet } from '@fluentui-react-native/themed-stylesheet'; +import { Text } from 'fluentui-react-native/text'; +import { Shadow } from 'fluentui-react-native/experimental-shadow'; +import type { Theme } from 'fluentui-react-native/framework'; +import { useFluentTheme } from 'fluentui-react-native/framework'; +import { mergeStyles } from 'fluentui-react-native/framework-base'; +import { themedStyleSheet } from 'fluentui-react-native/themed-stylesheet'; import { shadowTestPageStyles } from './ShadowTestPageStyles'; diff --git a/apps/tester-core/src/TestComponents/Shimmer/ShimmerE2ETest.tsx b/apps/tester-core/src/TestComponents/Shimmer/ShimmerE2ETest.tsx index 3be301da381..2973680d95a 100644 --- a/apps/tester-core/src/TestComponents/Shimmer/ShimmerE2ETest.tsx +++ b/apps/tester-core/src/TestComponents/Shimmer/ShimmerE2ETest.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; import { SHIMMER_TEST_COMPONENT } from '@fluentui-react-native/e2e-testing'; -import { Shimmer } from '@fluentui-react-native/experimental-shimmer'; -import { Stack } from '@fluentui-react-native/stack'; +import { Shimmer } from 'fluentui-react-native/experimental-shimmer'; +import { Stack } from 'fluentui-react-native/stack'; import { shimmerRectsAndRect } from './ShimmerTestElementSets'; import { stackStyle } from '../Common/styles'; diff --git a/apps/tester-core/src/TestComponents/Shimmer/ShimmerTest.tsx b/apps/tester-core/src/TestComponents/Shimmer/ShimmerTest.tsx index eacfa9666eb..c1f98c31f86 100644 --- a/apps/tester-core/src/TestComponents/Shimmer/ShimmerTest.tsx +++ b/apps/tester-core/src/TestComponents/Shimmer/ShimmerTest.tsx @@ -2,8 +2,8 @@ import * as React from 'react'; import { Platform, StyleSheet } from 'react-native'; import { SHIMMER_TESTPAGE } from '@fluentui-react-native/e2e-testing'; -import { Shimmer } from '@fluentui-react-native/experimental-shimmer'; -import { Stack } from '@fluentui-react-native/stack'; +import { Shimmer } from 'fluentui-react-native/experimental-shimmer'; +import { Stack } from 'fluentui-react-native/stack'; import { E2ETestingShimmer } from './ShimmerE2ETest'; import { shimmerBorderRadiusTests, shimmerRectsAndRect, shimmerRectsAndCircle } from './ShimmerTestElementSets'; diff --git a/apps/tester-core/src/TestComponents/Shimmer/ShimmerTestElementSets.tsx b/apps/tester-core/src/TestComponents/Shimmer/ShimmerTestElementSets.tsx index f103cc801b5..2423c8aff5a 100644 --- a/apps/tester-core/src/TestComponents/Shimmer/ShimmerTestElementSets.tsx +++ b/apps/tester-core/src/TestComponents/Shimmer/ShimmerTestElementSets.tsx @@ -1,4 +1,4 @@ -import type { ShimmerRectElement, ShimmerCircleElement } from '@fluentui-react-native/experimental-shimmer'; +import type { ShimmerRectElement, ShimmerCircleElement } from 'fluentui-react-native/experimental-shimmer'; export function shimmerRects(): Array { return [ diff --git a/apps/tester-core/src/TestComponents/Spacing/SpacingTest.tsx b/apps/tester-core/src/TestComponents/Spacing/SpacingTest.tsx index 1e72e84e0fa..8a8fc25d297 100644 --- a/apps/tester-core/src/TestComponents/Spacing/SpacingTest.tsx +++ b/apps/tester-core/src/TestComponents/Spacing/SpacingTest.tsx @@ -2,8 +2,8 @@ import * as React from 'react'; import { Text, View } from 'react-native'; import { SPACING_TESTPAGE } from '@fluentui-react-native/e2e-testing'; -import { Stack } from '@fluentui-react-native/stack'; -import { globalTokens } from '@fluentui-react-native/theme-tokens'; +import { Stack } from 'fluentui-react-native/stack'; +import { globalTokens } from 'fluentui-react-native/theme-tokens'; import { stackStyle } from '../Common/styles'; import type { TestSection, PlatformStatus } from '../Test'; diff --git a/apps/tester-core/src/TestComponents/Spinner/SpinnerE2ETest.tsx b/apps/tester-core/src/TestComponents/Spinner/SpinnerE2ETest.tsx index c446ce7abab..865c6ed3971 100644 --- a/apps/tester-core/src/TestComponents/Spinner/SpinnerE2ETest.tsx +++ b/apps/tester-core/src/TestComponents/Spinner/SpinnerE2ETest.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; import { SPINNER_TEST_COMPONENT } from '@fluentui-react-native/e2e-testing'; -import { Spinner } from '@fluentui-react-native/spinner'; -import { Stack } from '@fluentui-react-native/stack'; +import { Spinner } from 'fluentui-react-native/spinner'; +import { Stack } from 'fluentui-react-native/stack'; import { stackStyle } from '../Common/styles'; import { testProps } from '../Common/TestProps'; diff --git a/apps/tester-core/src/TestComponents/Spinner/SpinnerTest.tsx b/apps/tester-core/src/TestComponents/Spinner/SpinnerTest.tsx index 4d404b59f90..01bb44de5cb 100644 --- a/apps/tester-core/src/TestComponents/Spinner/SpinnerTest.tsx +++ b/apps/tester-core/src/TestComponents/Spinner/SpinnerTest.tsx @@ -2,10 +2,10 @@ import * as React from 'react'; import { View, Switch } from 'react-native'; import { SPINNER_TESTPAGE } from '@fluentui-react-native/e2e-testing'; -import type { SpinnerStatus } from '@fluentui-react-native/spinner'; -import { Spinner } from '@fluentui-react-native/spinner'; -import { Stack } from '@fluentui-react-native/stack'; -import { Text, TextV1 } from '@fluentui-react-native/text'; +import type { SpinnerStatus } from 'fluentui-react-native/spinner'; +import { Spinner } from 'fluentui-react-native/spinner'; +import { Stack } from 'fluentui-react-native/stack'; +import { Text, TextV1 } from 'fluentui-react-native/text'; import { E2ETestingSpinner } from './SpinnerE2ETest'; import { stackStyle, commonTestStyles as commonStyles, commonTestStyles } from '../Common/styles'; diff --git a/apps/tester-core/src/TestComponents/Spinner/SpinnerTest.win32.tsx b/apps/tester-core/src/TestComponents/Spinner/SpinnerTest.win32.tsx index 53e7ffb701f..373d58f0c4f 100644 --- a/apps/tester-core/src/TestComponents/Spinner/SpinnerTest.win32.tsx +++ b/apps/tester-core/src/TestComponents/Spinner/SpinnerTest.win32.tsx @@ -3,9 +3,9 @@ import { View /*Switch */ } from 'react-native'; //import type { SpinnerStatus } from '@fluentui-react-native/spinner'; import { SPINNER_TESTPAGE } from '@fluentui-react-native/e2e-testing'; -import { Spinner } from '@fluentui-react-native/spinner'; -import { Stack } from '@fluentui-react-native/stack'; -import { TextV1 as Text } from '@fluentui-react-native/text'; +import { Spinner } from 'fluentui-react-native/spinner'; +import { Stack } from 'fluentui-react-native/stack'; +import { TextV1 as Text } from 'fluentui-react-native/text'; import { E2ETestingSpinner } from './SpinnerE2ETest'; import { stackStyle, commonTestStyles as commonStyles } from '../Common/styles'; diff --git a/apps/tester-core/src/TestComponents/StrokeWidth/StrokeWidthTest.tsx b/apps/tester-core/src/TestComponents/StrokeWidth/StrokeWidthTest.tsx index 678356e9436..de1d4e0c888 100644 --- a/apps/tester-core/src/TestComponents/StrokeWidth/StrokeWidthTest.tsx +++ b/apps/tester-core/src/TestComponents/StrokeWidth/StrokeWidthTest.tsx @@ -1,14 +1,14 @@ import * as React from 'react'; import { View } from 'react-native'; -import { Text } from '@fluentui/react-native'; +import { Text } from 'fluentui-react-native/text'; import { STROKEWIDTH_TESTPAGE } from '@fluentui-react-native/e2e-testing'; -import type { Theme } from '@fluentui-react-native/framework'; -import { useFluentTheme } from '@fluentui-react-native/framework'; -import { Stack } from '@fluentui-react-native/stack'; -import { globalTokens } from '@fluentui-react-native/theme-tokens'; -import { themedStyleSheet } from '@fluentui-react-native/themed-stylesheet'; -import { getCurrentAppearance } from '@fluentui-react-native/theming-utils'; +import type { Theme } from 'fluentui-react-native/framework'; +import { useFluentTheme } from 'fluentui-react-native/framework'; +import { Stack } from 'fluentui-react-native/stack'; +import { globalTokens } from 'fluentui-react-native/theme-tokens'; +import { themedStyleSheet } from 'fluentui-react-native/themed-stylesheet'; +import { getCurrentAppearance } from 'fluentui-react-native/theming-utils'; import { stackStyle } from '../Common/styles'; import type { TestSection, PlatformStatus } from '../Test'; diff --git a/apps/tester-core/src/TestComponents/Svg/SvgTest.tsx b/apps/tester-core/src/TestComponents/Svg/SvgTest.tsx index 7745266c51a..3d77ec677e9 100644 --- a/apps/tester-core/src/TestComponents/Svg/SvgTest.tsx +++ b/apps/tester-core/src/TestComponents/Svg/SvgTest.tsx @@ -2,10 +2,10 @@ import * as React from 'react'; import { useState } from 'react'; import { StyleSheet, Switch, Text, TextInput, View } from 'react-native'; -import { ButtonV1 as Button, ToggleButton } from '@fluentui/react-native'; -import { Separator } from '@fluentui/react-native'; +import { ButtonV1 as Button, ToggleButton } from 'fluentui-react-native/button'; +import { Separator } from 'fluentui-react-native/separator'; import { SVG_TESTPAGE } from '@fluentui-react-native/e2e-testing'; -import { TextV1 } from '@fluentui-react-native/text'; +import { TextV1 } from 'fluentui-react-native/text'; import { Circle, Defs, diff --git a/apps/tester-core/src/TestComponents/Switch/CustomizedSwitch.tsx b/apps/tester-core/src/TestComponents/Switch/CustomizedSwitch.tsx index 7cfbd6b9c1a..742586b6b18 100644 --- a/apps/tester-core/src/TestComponents/Switch/CustomizedSwitch.tsx +++ b/apps/tester-core/src/TestComponents/Switch/CustomizedSwitch.tsx @@ -1,9 +1,9 @@ import * as React from 'react'; import { View, TextInput, StyleSheet } from 'react-native'; -import type { SwitchTokens } from '@fluentui-react-native/switch'; -import { Switch } from '@fluentui-react-native/switch'; -import { TextV1 as Text } from '@fluentui-react-native/text'; +import type { SwitchTokens } from 'fluentui-react-native/switch'; +import { Switch } from 'fluentui-react-native/switch'; +import { TextV1 as Text } from 'fluentui-react-native/text'; import { commonTestStyles as commonStyles } from '../Common/styles'; diff --git a/apps/tester-core/src/TestComponents/Switch/E2ESwitchTest.tsx b/apps/tester-core/src/TestComponents/Switch/E2ESwitchTest.tsx index 0c02720357e..f65d59d298a 100644 --- a/apps/tester-core/src/TestComponents/Switch/E2ESwitchTest.tsx +++ b/apps/tester-core/src/TestComponents/Switch/E2ESwitchTest.tsx @@ -8,9 +8,9 @@ import { SWITCH_TEST_COMPONENT_LABEL, SWITCH_ON_PRESS, } from '@fluentui-react-native/e2e-testing'; -import { Stack } from '@fluentui-react-native/stack'; -import { Switch } from '@fluentui-react-native/switch'; -import { TextV1 } from '@fluentui-react-native/text'; +import { Stack } from 'fluentui-react-native/stack'; +import { Switch } from 'fluentui-react-native/switch'; +import { TextV1 } from 'fluentui-react-native/text'; import { stackStyle, commonTestStyles } from '../Common/styles'; import { testProps } from '../Common/TestProps'; diff --git a/apps/tester-core/src/TestComponents/Switch/SwitchTest.tsx b/apps/tester-core/src/TestComponents/Switch/SwitchTest.tsx index e378bb4dd94..9e6ce424cc4 100644 --- a/apps/tester-core/src/TestComponents/Switch/SwitchTest.tsx +++ b/apps/tester-core/src/TestComponents/Switch/SwitchTest.tsx @@ -2,10 +2,10 @@ import * as React from 'react'; import { View, StyleSheet } from 'react-native'; import { Platform } from 'react-native'; -import { ButtonV1 as Button } from '@fluentui-react-native/button'; +import { ButtonV1 as Button } from 'fluentui-react-native/button'; import { SWITCH_TESTPAGE } from '@fluentui-react-native/e2e-testing'; -import type { InteractionEvent } from '@fluentui-react-native/interactive-hooks'; -import { Switch } from '@fluentui-react-native/switch'; +import type { InteractionEvent } from 'fluentui-react-native/interactive-hooks'; +import { Switch } from 'fluentui-react-native/switch'; import { CustomizedSwitch } from './CustomizedSwitch'; import { E2ESwitchTest } from './E2ESwitchTest'; diff --git a/apps/tester-core/src/TestComponents/TabList/TabListE2ETest.tsx b/apps/tester-core/src/TestComponents/TabList/TabListE2ETest.tsx index 2a9c34c966a..24ba0d3ccf5 100644 --- a/apps/tester-core/src/TestComponents/TabList/TabListE2ETest.tsx +++ b/apps/tester-core/src/TestComponents/TabList/TabListE2ETest.tsx @@ -17,9 +17,9 @@ import { THIRD_TAB_KEY, SECOND_TAB_LABEL, } from '@fluentui-react-native/e2e-testing'; -import { Stack } from '@fluentui-react-native/stack'; -import { TabList, Tab } from '@fluentui-react-native/tablist'; -import { TextV1 as Text } from '@fluentui-react-native/text'; +import { Stack } from 'fluentui-react-native/stack'; +import { TabList, Tab } from 'fluentui-react-native/tablist'; +import { TextV1 as Text } from 'fluentui-react-native/text'; import { stackStyle } from '../Common/styles'; import { testProps } from '../Common/TestProps'; diff --git a/apps/tester-core/src/TestComponents/TabList/TabListTest.tsx b/apps/tester-core/src/TestComponents/TabList/TabListTest.tsx index c226c9932ee..c46ecc07c2a 100644 --- a/apps/tester-core/src/TestComponents/TabList/TabListTest.tsx +++ b/apps/tester-core/src/TestComponents/TabList/TabListTest.tsx @@ -1,12 +1,12 @@ import React from 'react'; import { View } from 'react-native'; -import { ButtonV1 as Button } from '@fluentui-react-native/button'; -import { Divider } from '@fluentui-react-native/divider'; +import { ButtonV1 as Button } from 'fluentui-react-native/button'; +import { Divider } from 'fluentui-react-native/divider'; import { TABLIST_TESTPAGE } from '@fluentui-react-native/e2e-testing'; -import { Menu, MenuTrigger, MenuList, MenuItem, MenuPopover } from '@fluentui-react-native/menu'; -import { TabList, Tab } from '@fluentui-react-native/tablist'; -import { TextV1 as Text } from '@fluentui-react-native/text'; +import { Menu, MenuTrigger, MenuList, MenuItem, MenuPopover } from 'fluentui-react-native/menu'; +import { TabList, Tab } from 'fluentui-react-native/tablist'; +import { TextV1 as Text } from 'fluentui-react-native/text'; import { TabListE2ETest } from './TabListE2ETest'; import { svgProps, fontProps } from '../Common/iconExamples'; diff --git a/apps/tester-core/src/TestComponents/Test.tsx b/apps/tester-core/src/TestComponents/Test.tsx index c9be8243ead..4c7a860cc69 100644 --- a/apps/tester-core/src/TestComponents/Test.tsx +++ b/apps/tester-core/src/TestComponents/Test.tsx @@ -1,12 +1,15 @@ import * as React from 'react'; import { Platform, StyleSheet, Switch, View } from 'react-native'; -import { Link, Separator, Text, ToggleButton } from '@fluentui/react-native'; -import { ButtonV1 as Button } from '@fluentui-react-native/button'; +import { ToggleButton } from 'fluentui-react-native/button'; +import { Link } from 'fluentui-react-native/link'; +import { Separator } from 'fluentui-react-native/separator'; +import { Text } from 'fluentui-react-native/text'; +import { ButtonV1 as Button } from 'fluentui-react-native/button'; import { E2E_MODE_SWITCH, E2E_TEST_SECTION } from '@fluentui-react-native/e2e-testing'; -import type { SvgIconProps } from '@fluentui-react-native/icon'; -import { Stack } from '@fluentui-react-native/stack'; -import { useTheme } from '@fluentui-react-native/theme-types'; +import type { SvgIconProps } from 'fluentui-react-native/icon'; +import { Stack } from 'fluentui-react-native/stack'; +import { useTheme } from 'fluentui-react-native/theme-types'; import type { SvgProps } from 'react-native-svg'; import Svg, { G, Path } from 'react-native-svg'; @@ -166,7 +169,7 @@ export const Test = (props: TestProps): React.ReactElement {e2eSections && showE2E && ( // We can check if the E2E section renders by checking if the "E2E Tests" header has rendered for each spec - <> + (<> E2E Tests @@ -177,7 +180,7 @@ export const Test = (props: TestProps): React.ReactElement const { component: E2EComponent } = section; return ; })} - + ) )} {props.description} diff --git a/apps/tester-core/src/TestComponents/TextLegacy/CustomizeUsage.tsx b/apps/tester-core/src/TestComponents/TextLegacy/CustomizeUsage.tsx index 8c2c0f5bad3..9de1c96e7ef 100644 --- a/apps/tester-core/src/TestComponents/TextLegacy/CustomizeUsage.tsx +++ b/apps/tester-core/src/TestComponents/TextLegacy/CustomizeUsage.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; import { Platform, View } from 'react-native'; -import { Text } from '@fluentui/react-native'; -import { Stack } from '@fluentui-react-native/stack'; +import { Text } from 'fluentui-react-native/text'; +import { Stack } from 'fluentui-react-native/stack'; import { stackStyle } from '../Common/styles'; diff --git a/apps/tester-core/src/TestComponents/TextLegacy/PressableUsage.tsx b/apps/tester-core/src/TestComponents/TextLegacy/PressableUsage.tsx index df6e94c2567..73a87502ede 100644 --- a/apps/tester-core/src/TestComponents/TextLegacy/PressableUsage.tsx +++ b/apps/tester-core/src/TestComponents/TextLegacy/PressableUsage.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; import { Alert, Linking, View } from 'react-native'; -import { Text } from '@fluentui/react-native'; -import { Stack } from '@fluentui-react-native/stack'; +import { Text } from 'fluentui-react-native/text'; +import { Stack } from 'fluentui-react-native/stack'; import type { IKeyboardEvent, IHandledKeyboardEvent } from '@office-iss/react-native-win32'; import { stackStyle } from '../Common/styles'; diff --git a/apps/tester-core/src/TestComponents/TextLegacy/StandardUsage.tsx b/apps/tester-core/src/TestComponents/TextLegacy/StandardUsage.tsx index 8723eca6539..a9a921decfc 100644 --- a/apps/tester-core/src/TestComponents/TextLegacy/StandardUsage.tsx +++ b/apps/tester-core/src/TestComponents/TextLegacy/StandardUsage.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; import { View } from 'react-native'; -import { Text } from '@fluentui/react-native'; -import { Stack } from '@fluentui-react-native/stack'; +import { Text } from 'fluentui-react-native/text'; +import { Stack } from 'fluentui-react-native/stack'; import { stackStyle } from '../Common/styles'; diff --git a/apps/tester-core/src/TestComponents/TextLegacy/TextLegacyE2ETest.tsx b/apps/tester-core/src/TestComponents/TextLegacy/TextLegacyE2ETest.tsx index f6fdb352c41..8953aeae46f 100644 --- a/apps/tester-core/src/TestComponents/TextLegacy/TextLegacyE2ETest.tsx +++ b/apps/tester-core/src/TestComponents/TextLegacy/TextLegacyE2ETest.tsx @@ -1,14 +1,14 @@ import * as React from 'react'; import { View } from 'react-native'; -import { Text } from '@fluentui/react-native'; +import { Text } from 'fluentui-react-native/text'; import { DEPRECATED_TEXT_FIRST_ACCESSIBILITY_LABEL, DEPRECATED_TEXT_FIRST_COMPONENT, DEPRECATED_TEXT_SECOND_COMPONENT, DEPRECATED_TEXT_SECOND_COMPONENT_CONTENT, } from '@fluentui-react-native/e2e-testing'; -import { Stack } from '@fluentui-react-native/stack'; +import { Stack } from 'fluentui-react-native/stack'; import { stackStyle } from '../Common/styles'; import { testProps } from '../Common/TestProps'; diff --git a/apps/tester-core/src/TestComponents/TextV1/CustomizeUsage.tsx b/apps/tester-core/src/TestComponents/TextV1/CustomizeUsage.tsx index d8cbafe7df5..61b9777022f 100644 --- a/apps/tester-core/src/TestComponents/TextV1/CustomizeUsage.tsx +++ b/apps/tester-core/src/TestComponents/TextV1/CustomizeUsage.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; import { Platform, View } from 'react-native'; -import { Stack } from '@fluentui-react-native/stack'; -import { TextV1 as Text } from '@fluentui-react-native/text'; +import { Stack } from 'fluentui-react-native/stack'; +import { TextV1 as Text } from 'fluentui-react-native/text'; import { stackStyle } from '../Common/styles'; diff --git a/apps/tester-core/src/TestComponents/TextV1/MaximumFontSize.ios.tsx b/apps/tester-core/src/TestComponents/TextV1/MaximumFontSize.ios.tsx index d2ec1cf676d..b9b2a8baf77 100644 --- a/apps/tester-core/src/TestComponents/TextV1/MaximumFontSize.ios.tsx +++ b/apps/tester-core/src/TestComponents/TextV1/MaximumFontSize.ios.tsx @@ -1,9 +1,9 @@ import * as React from 'react'; import { Text, View } from 'react-native'; -import { Separator } from '@fluentui/react-native'; -import { Stack } from '@fluentui-react-native/stack'; -import { Caption1, Title2, Title3 } from '@fluentui-react-native/text'; +import { Separator } from 'fluentui-react-native/separator'; +import { Stack } from 'fluentui-react-native/stack'; +import { Caption1, Title2, Title3 } from 'fluentui-react-native/text'; import { stackStyle } from '../Common/styles'; diff --git a/apps/tester-core/src/TestComponents/TextV1/PressableUsage.tsx b/apps/tester-core/src/TestComponents/TextV1/PressableUsage.tsx index 71069b3de56..b2c2872115d 100644 --- a/apps/tester-core/src/TestComponents/TextV1/PressableUsage.tsx +++ b/apps/tester-core/src/TestComponents/TextV1/PressableUsage.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; import { Alert, Linking, View } from 'react-native'; -import { Stack } from '@fluentui-react-native/stack'; -import { TextV1 as Text } from '@fluentui-react-native/text'; +import { Stack } from 'fluentui-react-native/stack'; +import { TextV1 as Text } from 'fluentui-react-native/text'; import type { IKeyboardEvent, IHandledKeyboardEvent } from '@office-iss/react-native-win32'; import { stackStyle } from '../Common/styles'; diff --git a/apps/tester-core/src/TestComponents/TextV1/StandardUsage.tsx b/apps/tester-core/src/TestComponents/TextV1/StandardUsage.tsx index a01c01f4f8c..ff2497b3843 100644 --- a/apps/tester-core/src/TestComponents/TextV1/StandardUsage.tsx +++ b/apps/tester-core/src/TestComponents/TextV1/StandardUsage.tsx @@ -2,8 +2,8 @@ import * as React from 'react'; import { View } from 'react-native'; import { HOMEPAGE_TEXTV1_BUTTON } from '@fluentui-react-native/e2e-testing'; -import { Stack } from '@fluentui-react-native/stack'; -import { TextV1 as Text } from '@fluentui-react-native/text'; +import { Stack } from 'fluentui-react-native/stack'; +import { TextV1 as Text } from 'fluentui-react-native/text'; import { stackStyle } from '../Common/styles'; import { testProps } from '../Common/TestProps'; diff --git a/apps/tester-core/src/TestComponents/TextV1/TextV1E2ETest.tsx b/apps/tester-core/src/TestComponents/TextV1/TextV1E2ETest.tsx index 7469e50afb4..eae724dfc7c 100644 --- a/apps/tester-core/src/TestComponents/TextV1/TextV1E2ETest.tsx +++ b/apps/tester-core/src/TestComponents/TextV1/TextV1E2ETest.tsx @@ -7,8 +7,8 @@ import { TEXTV1_NO_A11Y_LABEL_COMPONENT, TEXTV1_CONTENT, } from '@fluentui-react-native/e2e-testing'; -import { Stack } from '@fluentui-react-native/stack'; -import { TextV1 as Text } from '@fluentui-react-native/text'; +import { Stack } from 'fluentui-react-native/stack'; +import { TextV1 as Text } from 'fluentui-react-native/text'; import { stackStyle } from '../Common/styles'; import { testProps } from '../Common/TestProps'; diff --git a/apps/tester-core/src/TestComponents/TextV1/V2Usage.mobile.tsx b/apps/tester-core/src/TestComponents/TextV1/V2Usage.mobile.tsx index aa8730864e9..9f06b711626 100644 --- a/apps/tester-core/src/TestComponents/TextV1/V2Usage.mobile.tsx +++ b/apps/tester-core/src/TestComponents/TextV1/V2Usage.mobile.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { View } from 'react-native'; -import { Stack } from '@fluentui-react-native/stack'; +import { Stack } from 'fluentui-react-native/stack'; import { Body1, Body1Strong, @@ -16,7 +16,7 @@ import { Title1, Title2, Title3, -} from '@fluentui-react-native/text'; +} from 'fluentui-react-native/text'; import { stackStyle } from '../Common/styles'; diff --git a/apps/tester-core/src/TestComponents/TextV1/V2Usage.win32.tsx b/apps/tester-core/src/TestComponents/TextV1/V2Usage.win32.tsx index 89074e65fbf..270ed60aacf 100644 --- a/apps/tester-core/src/TestComponents/TextV1/V2Usage.win32.tsx +++ b/apps/tester-core/src/TestComponents/TextV1/V2Usage.win32.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { View } from 'react-native'; -import { Stack } from '@fluentui-react-native/stack'; +import { Stack } from 'fluentui-react-native/stack'; import { Body1, Body1Strong, @@ -16,7 +16,7 @@ import { Subtitle2Strong, Title1, Title1Strong, -} from '@fluentui-react-native/text'; +} from 'fluentui-react-native/text'; import { stackStyle } from '../Common/styles'; diff --git a/apps/tester-core/src/TestComponents/Theme/ThemeTest.android.tsx b/apps/tester-core/src/TestComponents/Theme/ThemeTest.android.tsx index baded9d319d..9c1bad8ea2d 100644 --- a/apps/tester-core/src/TestComponents/Theme/ThemeTest.android.tsx +++ b/apps/tester-core/src/TestComponents/Theme/ThemeTest.android.tsx @@ -3,11 +3,11 @@ import type { ColorValue, ViewStyle } from 'react-native'; import { Text as TextRN, View } from 'react-native'; import { StyleSheet } from 'react-native'; -import { Text } from '@fluentui/react-native'; +import { Text } from 'fluentui-react-native/text'; import { THEME_TESTPAGE } from '@fluentui-react-native/e2e-testing'; -import { useFluentTheme } from '@fluentui-react-native/framework'; -import type { Theme } from '@fluentui-react-native/theme-types'; -import { themedStyleSheet } from '@fluentui-react-native/themed-stylesheet'; +import { useFluentTheme } from 'fluentui-react-native/framework'; +import type { Theme } from 'fluentui-react-native/theme-types'; +import { themedStyleSheet } from 'fluentui-react-native/themed-stylesheet'; import { commonTestStyles } from '../Common/styles'; import type { TestSection, PlatformStatus } from '../Test'; diff --git a/apps/tester-core/src/TestComponents/Theme/ThemeTest.tsx b/apps/tester-core/src/TestComponents/Theme/ThemeTest.tsx index 96cca85dfff..26a32f614c9 100644 --- a/apps/tester-core/src/TestComponents/Theme/ThemeTest.tsx +++ b/apps/tester-core/src/TestComponents/Theme/ThemeTest.tsx @@ -2,11 +2,12 @@ import * as React from 'react'; import type { ViewStyle, ColorValue } from 'react-native'; import { View, StyleSheet } from 'react-native'; -import { Button, PrimaryButton, Text, StealthButton } from '@fluentui/react-native'; +import { Button, PrimaryButton, StealthButton } from 'fluentui-react-native/button'; +import { Text } from 'fluentui-react-native/text'; import { THEME_TESTPAGE } from '@fluentui-react-native/e2e-testing'; -import type { Theme } from '@fluentui-react-native/theme-types'; -import { useTheme } from '@fluentui-react-native/theme-types'; -import { themedStyleSheet } from '@fluentui-react-native/themed-stylesheet'; +import type { Theme } from 'fluentui-react-native/theme-types'; +import { useTheme } from 'fluentui-react-native/theme-types'; +import { themedStyleSheet } from 'fluentui-react-native/themed-stylesheet'; import { commonTestStyles } from '../Common/styles'; import type { TestSection, PlatformStatus } from '../Test'; diff --git a/apps/tester-core/src/TestComponents/Tooltip/TooltipDefault.tsx b/apps/tester-core/src/TestComponents/Tooltip/TooltipDefault.tsx index 52b34caebcf..f147c38c2fb 100644 --- a/apps/tester-core/src/TestComponents/Tooltip/TooltipDefault.tsx +++ b/apps/tester-core/src/TestComponents/Tooltip/TooltipDefault.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; import { View } from 'react-native'; -import { ButtonV1 } from '@fluentui-react-native/button'; -import { Tooltip } from '@fluentui-react-native/tooltip'; +import { ButtonV1 } from 'fluentui-react-native/button'; +import { Tooltip } from 'fluentui-react-native/tooltip'; export const TooltipDefault: React.FunctionComponent = () => { const defaultContent = 'Tooltip shows relative to mouse cursor.'; diff --git a/apps/tester-core/src/TestComponents/Tooltip/TooltipPosition.tsx b/apps/tester-core/src/TestComponents/Tooltip/TooltipPosition.tsx index b7af2938557..db871242322 100644 --- a/apps/tester-core/src/TestComponents/Tooltip/TooltipPosition.tsx +++ b/apps/tester-core/src/TestComponents/Tooltip/TooltipPosition.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; import { View } from 'react-native'; -import { ButtonV1 } from '@fluentui-react-native/button'; -import { Tooltip } from '@fluentui-react-native/tooltip'; +import { ButtonV1 } from 'fluentui-react-native/button'; +import { Tooltip } from 'fluentui-react-native/tooltip'; export const TooltipPosition: React.FunctionComponent = () => { const topCenterRef = React.useRef(null); diff --git a/apps/tester-core/src/TestComponents/VibrancyView/VibrancyViewTest.tsx b/apps/tester-core/src/TestComponents/VibrancyView/VibrancyViewTest.tsx index 6fe7e0fb091..c18334731cf 100644 --- a/apps/tester-core/src/TestComponents/VibrancyView/VibrancyViewTest.tsx +++ b/apps/tester-core/src/TestComponents/VibrancyView/VibrancyViewTest.tsx @@ -2,11 +2,12 @@ import * as React from 'react'; import { Alert, StyleSheet, View } from 'react-native'; import type { ViewProps } from 'react-native'; -import { ButtonV1 as Button, Text } from '@fluentui/react-native'; +import { ButtonV1 as Button } from 'fluentui-react-native/button'; +import { Text } from 'fluentui-react-native/text'; import { VIBRANCYVIEW_TESTPAGE } from '@fluentui-react-native/e2e-testing'; -import { Stack } from '@fluentui-react-native/stack'; -import type { Material, BlendingMode, State } from '@fluentui-react-native/vibrancy-view'; -import { VibrancyView } from '@fluentui-react-native/vibrancy-view'; +import { Stack } from 'fluentui-react-native/stack'; +import type { Material, BlendingMode, State } from 'fluentui-react-native/vibrancy-view'; +import { VibrancyView } from 'fluentui-react-native/vibrancy-view'; import { MenuPicker } from '../Common/MenuPicker'; import { stackStyle, commonTestStyles as commonStyles } from '../Common/styles'; diff --git a/apps/tester-core/src/theme/CustomThemes.ts b/apps/tester-core/src/theme/CustomThemes.ts index 0cb8082dfb7..d9e657f48e6 100644 --- a/apps/tester-core/src/theme/CustomThemes.ts +++ b/apps/tester-core/src/theme/CustomThemes.ts @@ -1,10 +1,10 @@ import { Platform } from 'react-native'; -import { createAndroidTheme } from '@fluentui-react-native/android-theme'; -import { createAppleTheme } from '@fluentui-react-native/apple-theme'; -import { createDefaultTheme } from '@fluentui-react-native/default-theme'; -import { ThemeReference } from '@fluentui-react-native/theme'; -import type { ThemeOptions } from '@fluentui-react-native/theme-types'; +import { createAndroidTheme } from 'fluentui-react-native/android-theme'; +import { createAppleTheme } from 'fluentui-react-native/apple-theme'; +import { createDefaultTheme } from 'fluentui-react-native/default-theme'; +import { ThemeReference } from 'fluentui-react-native/theme'; +import type { ThemeOptions } from 'fluentui-react-native/theme-types'; import type { OfficeBrand } from './applyBrand'; import { applyBrand } from './applyBrand'; diff --git a/apps/tester-core/src/theme/ThemePickers.android.tsx b/apps/tester-core/src/theme/ThemePickers.android.tsx index 56cc0f6ff76..e45da5d5ec1 100644 --- a/apps/tester-core/src/theme/ThemePickers.android.tsx +++ b/apps/tester-core/src/theme/ThemePickers.android.tsx @@ -1,10 +1,10 @@ import * as React from 'react'; import { View } from 'react-native'; -import type { Theme } from '@fluentui-react-native/framework'; -import { useTheme } from '@fluentui-react-native/framework'; -import { TextV1 as Text } from '@fluentui-react-native/text'; -import { themedStyleSheet } from '@fluentui-react-native/themed-stylesheet'; +import type { Theme } from 'fluentui-react-native/framework'; +import { useTheme } from 'fluentui-react-native/framework'; +import { TextV1 as Text } from 'fluentui-react-native/text'; +import { themedStyleSheet } from 'fluentui-react-native/themed-stylesheet'; import type { PickerProps } from '@react-native-picker/picker'; import { Picker } from '@react-native-picker/picker'; diff --git a/apps/tester-core/src/theme/ThemePickers.ios.tsx b/apps/tester-core/src/theme/ThemePickers.ios.tsx index 25811fde504..8e4418fbbca 100644 --- a/apps/tester-core/src/theme/ThemePickers.ios.tsx +++ b/apps/tester-core/src/theme/ThemePickers.ios.tsx @@ -1,10 +1,10 @@ import * as React from 'react'; import { View } from 'react-native'; -import { ButtonV1 as Button } from '@fluentui-react-native/button'; -import type { Theme } from '@fluentui-react-native/framework'; -import { useTheme } from '@fluentui-react-native/framework'; -import { themedStyleSheet } from '@fluentui-react-native/themed-stylesheet'; +import { ButtonV1 as Button } from 'fluentui-react-native/button'; +import type { Theme } from 'fluentui-react-native/framework'; +import { useTheme } from 'fluentui-react-native/framework'; +import { themedStyleSheet } from 'fluentui-react-native/themed-stylesheet'; import { MenuView } from '@react-native-menu/menu'; import type { MenuAction } from '@react-native-menu/menu'; diff --git a/apps/tester-core/src/theme/ThemePickers.macos.tsx b/apps/tester-core/src/theme/ThemePickers.macos.tsx index 78baaa56678..1279074002d 100644 --- a/apps/tester-core/src/theme/ThemePickers.macos.tsx +++ b/apps/tester-core/src/theme/ThemePickers.macos.tsx @@ -1,9 +1,9 @@ import * as React from 'react'; import { View, StyleSheet } from 'react-native'; -import { ButtonV1 as Button } from '@fluentui/react-native'; -import { Menu, MenuItem, MenuTrigger, MenuPopover, MenuList } from '@fluentui-react-native/menu'; -import { TextV1 as Text } from '@fluentui-react-native/text'; +import { ButtonV1 as Button } from 'fluentui-react-native/button'; +import { Menu, MenuItem, MenuTrigger, MenuPopover, MenuList } from 'fluentui-react-native/menu'; +import { TextV1 as Text } from 'fluentui-react-native/text'; import { SvgXml } from 'react-native-svg'; import type { ThemeNames } from './applyTheme'; diff --git a/apps/tester-core/src/theme/ThemePickers.tsx b/apps/tester-core/src/theme/ThemePickers.tsx index 5fec9615375..9b9bac952a6 100644 --- a/apps/tester-core/src/theme/ThemePickers.tsx +++ b/apps/tester-core/src/theme/ThemePickers.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; import { View, StyleSheet } from 'react-native'; -import { TextV1 as Text } from '@fluentui-react-native/text'; -import type { ThemeOptions } from '@fluentui-react-native/theme-types'; +import { TextV1 as Text } from 'fluentui-react-native/text'; +import type { ThemeOptions } from 'fluentui-react-native/theme-types'; import { themeChoices } from './applyTheme'; import type { ThemeNames } from './applyTheme'; diff --git a/apps/tester-core/src/theme/ThemePickers.win32.tsx b/apps/tester-core/src/theme/ThemePickers.win32.tsx index 5d75c70bc66..ebb4b06b3c9 100644 --- a/apps/tester-core/src/theme/ThemePickers.win32.tsx +++ b/apps/tester-core/src/theme/ThemePickers.win32.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; import { View, StyleSheet } from 'react-native'; -import { TextV1 as Text } from '@fluentui-react-native/text'; -import type { ThemeOptions } from '@fluentui-react-native/theme-types'; +import { TextV1 as Text } from 'fluentui-react-native/text'; +import type { ThemeOptions } from 'fluentui-react-native/theme-types'; import type { OfficeBrand } from './applyBrand'; import { brandOptions } from './applyBrand'; diff --git a/apps/tester-core/src/theme/applyBrand.ts b/apps/tester-core/src/theme/applyBrand.ts index 65b6ded6d3b..54e1e794c51 100644 --- a/apps/tester-core/src/theme/applyBrand.ts +++ b/apps/tester-core/src/theme/applyBrand.ts @@ -1,5 +1,5 @@ -import type { PartialTheme, Theme } from '@fluentui-react-native/theme-types'; -import { getCurrentBrandAliasTokens } from '@fluentui-react-native/win32-theme'; +import type { PartialTheme, Theme } from 'fluentui-react-native/theme-types'; +import { getCurrentBrandAliasTokens } from 'fluentui-react-native/win32-theme'; export type OfficeBrand = 'Default' | 'Office' | 'Word' | 'Excel' | 'Powerpoint' | 'Outlook'; type BrandRampKey = diff --git a/apps/tester-core/src/theme/applyTheme.ts b/apps/tester-core/src/theme/applyTheme.ts index 9ebd1f6b1e5..42e7b7271f6 100644 --- a/apps/tester-core/src/theme/applyTheme.ts +++ b/apps/tester-core/src/theme/applyTheme.ts @@ -1,5 +1,5 @@ -import type { PartialTheme, ThemeOptions } from '@fluentui-react-native/framework'; -import { createOfficeTheme, getThemingModule } from '@fluentui-react-native/win32-theme'; +import type { PartialTheme, ThemeOptions } from 'fluentui-react-native/framework'; +import { createOfficeTheme, getThemingModule } from 'fluentui-react-native/win32-theme'; export type ThemeNames = 'Default' | 'Office' | 'Apple'; diff --git a/yarn.lock b/yarn.lock index 83e30b78606..444ce450986 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5413,59 +5413,11 @@ __metadata: dependencies: "@babel/core": "catalog:" "@babel/runtime": "catalog:" - "@fluentui-react-native/adapters": "workspace:*" - "@fluentui-react-native/android-theme": "workspace:*" - "@fluentui-react-native/apple-theme": "workspace:*" - "@fluentui-react-native/avatar": "workspace:*" "@fluentui-react-native/babel-config": "workspace:*" - "@fluentui-react-native/badge": "workspace:*" - "@fluentui-react-native/button": "workspace:*" - "@fluentui-react-native/callout": "workspace:*" - "@fluentui-react-native/chip": "workspace:*" - "@fluentui-react-native/default-theme": "workspace:*" - "@fluentui-react-native/divider": "workspace:*" - "@fluentui-react-native/drawer": "workspace:*" - "@fluentui-react-native/dropdown": "workspace:*" "@fluentui-react-native/e2e-testing": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" - "@fluentui-react-native/experimental-activity-indicator": "workspace:*" - "@fluentui-react-native/experimental-appearance-additions": "workspace:*" - "@fluentui-react-native/experimental-avatar": "workspace:*" - "@fluentui-react-native/experimental-checkbox": "workspace:*" - "@fluentui-react-native/experimental-expander": "workspace:*" - "@fluentui-react-native/experimental-menu-button": "workspace:*" - "@fluentui-react-native/experimental-native-date-picker": "workspace:*" - "@fluentui-react-native/experimental-native-font-metrics": "workspace:*" - "@fluentui-react-native/experimental-shadow": "workspace:*" - "@fluentui-react-native/experimental-shimmer": "workspace:*" - "@fluentui-react-native/focus-zone": "workspace:*" - "@fluentui-react-native/framework": "workspace:*" - "@fluentui-react-native/framework-base": "workspace:*" - "@fluentui-react-native/icon": "workspace:*" - "@fluentui-react-native/input": "workspace:*" - "@fluentui-react-native/interactive-hooks": "workspace:*" "@fluentui-react-native/kit-config": "workspace:*" - "@fluentui-react-native/menu": "workspace:*" - "@fluentui-react-native/menu-button": "workspace:*" - "@fluentui-react-native/notification": "workspace:*" - "@fluentui-react-native/overflow": "workspace:*" - "@fluentui-react-native/radio-group": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" - "@fluentui-react-native/separator": "workspace:*" - "@fluentui-react-native/spinner": "workspace:*" - "@fluentui-react-native/stack": "workspace:*" - "@fluentui-react-native/switch": "workspace:*" - "@fluentui-react-native/tablist": "workspace:*" - "@fluentui-react-native/text": "workspace:*" - "@fluentui-react-native/theme": "workspace:*" - "@fluentui-react-native/theme-tokens": "workspace:*" - "@fluentui-react-native/theme-types": "workspace:*" - "@fluentui-react-native/themed-stylesheet": "workspace:*" - "@fluentui-react-native/theming-utils": "workspace:*" - "@fluentui-react-native/tooltip": "workspace:*" - "@fluentui-react-native/vibrancy-view": "workspace:*" - "@fluentui-react-native/win32-theme": "workspace:*" - "@fluentui/react-native": "workspace:*" "@fluentui/react-native-icons": "npm:^2.0.316" "@fortawesome/fontawesome-svg-core": "npm:^6.2.0" "@fortawesome/free-solid-svg-icons": "npm:^6.2.0" @@ -5495,6 +5447,7 @@ __metadata: "@wdio/runner": "catalog:" expect-webdriverio: "catalog:" flow-bin: "npm:^0.113.0" + fluentui-react-native: "workspace:*" metro-config: "npm:^0.80.3" react: "npm:19.1.4" react-native: "npm:^0.81.6" @@ -5506,20 +5459,7 @@ __metadata: react-test-renderer: "npm:19.1.4" webdriverio: "catalog:" peerDependencies: - "@fluentui-react-native/callout": "workspace:*" - "@fluentui-react-native/experimental-appearance-additions": "workspace:*" - "@fluentui-react-native/experimental-avatar": "workspace:*" - "@fluentui-react-native/experimental-checkbox": "workspace:*" - "@fluentui-react-native/experimental-expander": "workspace:*" - "@fluentui-react-native/experimental-native-date-picker": "workspace:*" - "@fluentui-react-native/experimental-native-font-metrics": "workspace:*" - "@fluentui-react-native/experimental-shimmer": "workspace:*" - "@fluentui-react-native/focus-zone": "workspace:*" - "@fluentui-react-native/menu-button": "workspace:*" - "@fluentui-react-native/radio-group": "workspace:*" "@fluentui-react-native/tester-core": "workspace:*" - "@fluentui-react-native/tooltip": "workspace:*" - "@fluentui-react-native/vibrancy-view": "workspace:*" "@office-iss/react-native-win32": ^0.73.0 || ^0.74.0 || ^0.78.0 || ^0.81.0 "@types/react": ~18.2.0 || ~19.0.0 || ~19.1.4 react: 18.2.0 || 19.0.0 || 19.1.4 @@ -5528,30 +5468,6 @@ __metadata: react-native-svg: ">=15.0.0 <15.13.0 || >=15.4.0 <15.13.0 || ^15.11.2 || ^15.12.1" react-native-windows: ^0.73.0 || ^0.74.0 || ^0.78.0 || ^0.81.0 peerDependenciesMeta: - "@fluentui-react-native/callout": - optional: true - "@fluentui-react-native/experimental-appearance-additions": - optional: true - "@fluentui-react-native/experimental-avatar": - optional: true - "@fluentui-react-native/experimental-checkbox": - optional: true - "@fluentui-react-native/experimental-expander": - optional: true - "@fluentui-react-native/experimental-native-date-picker": - optional: true - "@fluentui-react-native/experimental-native-font-metrics": - optional: true - "@fluentui-react-native/experimental-shimmer": - optional: true - "@fluentui-react-native/menu-button": - optional: true - "@fluentui-react-native/radio-group": - optional: true - "@fluentui-react-native/tooltip": - optional: true - "@fluentui-react-native/vibrancy-view": - optional: true "@office-iss/react-native-win32": optional: true "@types/react": @@ -5651,23 +5567,10 @@ __metadata: "@babel/core": "catalog:" "@babel/runtime": "catalog:" "@fluentui-react-native/babel-config": "workspace:*" - "@fluentui-react-native/callout": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" - "@fluentui-react-native/experimental-appearance-additions": "workspace:*" - "@fluentui-react-native/experimental-avatar": "workspace:*" - "@fluentui-react-native/experimental-checkbox": "workspace:*" - "@fluentui-react-native/experimental-expander": "workspace:*" - "@fluentui-react-native/experimental-native-date-picker": "workspace:*" - "@fluentui-react-native/experimental-native-font-metrics": "workspace:*" - "@fluentui-react-native/experimental-shimmer": "workspace:*" - "@fluentui-react-native/focus-zone": "workspace:*" "@fluentui-react-native/kit-config": "workspace:*" - "@fluentui-react-native/menu-button": "workspace:*" - "@fluentui-react-native/radio-group": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/tester-core": "workspace:*" - "@fluentui-react-native/tooltip": "workspace:*" - "@fluentui-react-native/vibrancy-view": "workspace:*" "@react-native-community/cli": "npm:^13.6.4" "@react-native-community/cli-platform-android": "npm:^13.6.4" "@react-native-community/cli-platform-ios": "npm:^13.6.4" @@ -5692,6 +5595,7 @@ __metadata: "@wdio/runner": "catalog:" expect-webdriverio: "catalog:" flow-bin: "npm:^0.113.0" + fluentui-react-native: "workspace:*" metro-config: "npm:^0.80.3" oxc-resolver: "catalog:" path-dirname: "npm:^1.0.2" @@ -6224,7 +6128,7 @@ __metadata: languageName: node linkType: hard -"@fluentui/react-native@workspace:*, @fluentui/react-native@workspace:packages/libraries/core": +"@fluentui/react-native@workspace:packages/libraries/core": version: 0.0.0-use.local resolution: "@fluentui/react-native@workspace:packages/libraries/core" dependencies: @@ -15876,7 +15780,7 @@ __metadata: languageName: node linkType: hard -"fluentui-react-native@workspace:packages/libraries/fluentui-react-native": +"fluentui-react-native@workspace:*, fluentui-react-native@workspace:packages/libraries/fluentui-react-native": version: 0.0.0-use.local resolution: "fluentui-react-native@workspace:packages/libraries/fluentui-react-native" dependencies: From 99c68f69f3aac5f40cf28decdfa469596eeb6455 Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Wed, 11 Mar 2026 21:02:48 -0700 Subject: [PATCH 4/7] Make tester-core ESM only --- apps/tester-core/package.json | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/apps/tester-core/package.json b/apps/tester-core/package.json index e8523322c00..c17f7a9cd9d 100644 --- a/apps/tester-core/package.json +++ b/apps/tester-core/package.json @@ -1,6 +1,7 @@ { "name": "@fluentui-react-native/tester-core", "version": "0.1.0", + "type": "module", "private": true, "description": "Core implementation of the fluent tester app", "homepage": "https://github.com/microsoft/fluentui-react-native", @@ -11,20 +12,16 @@ "url": "https://github.com/microsoft/fluentui-react-native.git", "directory": "apps/fluent-tester-core" }, - "main": "lib-commonjs/index.js", - "module": "lib/index.js", "types": "lib/index.d.ts", "exports": { ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", - "build-cjs": "tsgo --outDir lib-commonjs", "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", From c7f70075f14d705dea204805cab35942b3ca6b2d Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Wed, 11 Mar 2026 22:17:07 -0700 Subject: [PATCH 5/7] back to src/ instead of lib/ --- .../libraries/fluentui-react-native/README.md | 163 ++++++------ .../{eslint.config.js => eslint.config.cjs} | 0 .../fluentui-react-native/package.json | 231 ++++++------------ .../fluentui-react-native/src/adapters.ts | 1 + .../src/android-theme.ts | 1 + .../fluentui-react-native/src/apple-theme.ts | 1 + .../fluentui-react-native/src/avatar.ts | 1 + .../fluentui-react-native/src/badge.ts | 1 + .../fluentui-react-native/src/button.ts | 1 + .../fluentui-react-native/src/callout.ts | 1 + .../fluentui-react-native/src/checkbox.ts | 1 + .../fluentui-react-native/src/chip.ts | 1 + .../fluentui-react-native/src/components.ts | 1 + .../fluentui-react-native/src/composition.ts | 1 + .../src/contextual-menu.ts | 1 + .../fluentui-react-native/src/core.ts | 1 + .../src/default-theme.ts | 1 + .../fluentui-react-native/src/deprecated.ts | 1 + .../fluentui-react-native/src/divider.ts | 1 + .../fluentui-react-native/src/drawer.ts | 1 + .../fluentui-react-native/src/dropdown.ts | 1 + .../src/experimental-activity-indicator.ts | 1 + .../src/experimental-appearance-additions.ts | 1 + .../src/experimental-avatar.ts | 1 + .../src/experimental-checkbox.ts | 1 + .../src/experimental-expander.ts | 1 + .../src/experimental-menu-button.ts | 1 + .../src/experimental-native-date-picker.ts | 1 + .../src/experimental-native-font-metrics.ts | 1 + .../src/experimental-shadow.ts | 1 + .../src/experimental-shimmer.ts | 1 + .../fluentui-react-native/src/experimental.ts | 1 + .../src/focus-trap-zone.ts | 1 + .../fluentui-react-native/src/focus-zone.ts | 1 + .../src/foundation-composable.ts | 1 + .../src/foundation-compose.ts | 1 + .../src/foundation-settings.ts | 1 + .../src/foundation-tokens.ts | 1 + .../src/framework-base.ts | 1 + .../fluentui-react-native/src/framework.ts | 1 + .../fluentui-react-native/src/icon.ts | 1 + .../fluentui-react-native/src/input.ts | 1 + .../src/interactive-hooks.ts | 1 + .../fluentui-react-native/src/link.ts | 1 + .../fluentui-react-native/src/menu-button.ts | 1 + .../fluentui-react-native/src/menu.ts | 1 + .../fluentui-react-native/src/notification.ts | 1 + .../fluentui-react-native/src/overflow.ts | 1 + .../fluentui-react-native/src/persona-coin.ts | 1 + .../fluentui-react-native/src/persona.ts | 1 + .../fluentui-react-native/src/popover.ts | 1 + .../fluentui-react-native/src/pressable.ts | 1 + .../fluentui-react-native/src/radio-group.ts | 1 + .../fluentui-react-native/src/separator.ts | 1 + .../fluentui-react-native/src/spinner.ts | 1 + .../fluentui-react-native/src/stack.ts | 1 + .../src/styling-utils.ts | 1 + .../fluentui-react-native/src/switch.ts | 1 + .../fluentui-react-native/src/tablist.ts | 1 + .../fluentui-react-native/src/text.ts | 1 + .../src/theme-registry.ts | 1 + .../fluentui-react-native/src/theme-tokens.ts | 1 + .../fluentui-react-native/src/theme-types.ts | 1 + .../fluentui-react-native/src/theme.ts | 1 + .../src/themed-settings.ts | 1 + .../src/themed-stylesheet.ts | 1 + .../fluentui-react-native/src/theming-ramp.ts | 1 + .../src/theming-react-native.ts | 1 + .../src/theming-utils.ts | 1 + .../fluentui-react-native/src/theming.ts | 1 + .../fluentui-react-native/src/tokens.ts | 1 + .../fluentui-react-native/src/tooltip.ts | 1 + .../fluentui-react-native/src/use-slot.ts | 1 + .../fluentui-react-native/src/use-slots.ts | 1 + .../fluentui-react-native/src/use-styling.ts | 1 + .../fluentui-react-native/src/use-tokens.ts | 1 + .../fluentui-react-native/src/utils.ts | 1 + .../src/vibrancy-view.ts | 1 + .../fluentui-react-native/src/win32-theme.ts | 1 + .../fluentui-react-native/tsconfig.json | 7 + .../fluentui-react-native/update-exports.mts | 92 ++----- 81 files changed, 264 insertions(+), 305 deletions(-) rename packages/libraries/fluentui-react-native/{eslint.config.js => eslint.config.cjs} (100%) create mode 100644 packages/libraries/fluentui-react-native/src/adapters.ts create mode 100644 packages/libraries/fluentui-react-native/src/android-theme.ts create mode 100644 packages/libraries/fluentui-react-native/src/apple-theme.ts create mode 100644 packages/libraries/fluentui-react-native/src/avatar.ts create mode 100644 packages/libraries/fluentui-react-native/src/badge.ts create mode 100644 packages/libraries/fluentui-react-native/src/button.ts create mode 100644 packages/libraries/fluentui-react-native/src/callout.ts create mode 100644 packages/libraries/fluentui-react-native/src/checkbox.ts create mode 100644 packages/libraries/fluentui-react-native/src/chip.ts create mode 100644 packages/libraries/fluentui-react-native/src/composition.ts create mode 100644 packages/libraries/fluentui-react-native/src/contextual-menu.ts create mode 100644 packages/libraries/fluentui-react-native/src/default-theme.ts create mode 100644 packages/libraries/fluentui-react-native/src/divider.ts create mode 100644 packages/libraries/fluentui-react-native/src/drawer.ts create mode 100644 packages/libraries/fluentui-react-native/src/dropdown.ts create mode 100644 packages/libraries/fluentui-react-native/src/experimental-activity-indicator.ts create mode 100644 packages/libraries/fluentui-react-native/src/experimental-appearance-additions.ts create mode 100644 packages/libraries/fluentui-react-native/src/experimental-avatar.ts create mode 100644 packages/libraries/fluentui-react-native/src/experimental-checkbox.ts create mode 100644 packages/libraries/fluentui-react-native/src/experimental-expander.ts create mode 100644 packages/libraries/fluentui-react-native/src/experimental-menu-button.ts create mode 100644 packages/libraries/fluentui-react-native/src/experimental-native-date-picker.ts create mode 100644 packages/libraries/fluentui-react-native/src/experimental-native-font-metrics.ts create mode 100644 packages/libraries/fluentui-react-native/src/experimental-shadow.ts create mode 100644 packages/libraries/fluentui-react-native/src/experimental-shimmer.ts create mode 100644 packages/libraries/fluentui-react-native/src/focus-trap-zone.ts create mode 100644 packages/libraries/fluentui-react-native/src/focus-zone.ts create mode 100644 packages/libraries/fluentui-react-native/src/foundation-composable.ts create mode 100644 packages/libraries/fluentui-react-native/src/foundation-compose.ts create mode 100644 packages/libraries/fluentui-react-native/src/foundation-settings.ts create mode 100644 packages/libraries/fluentui-react-native/src/foundation-tokens.ts create mode 100644 packages/libraries/fluentui-react-native/src/framework-base.ts create mode 100644 packages/libraries/fluentui-react-native/src/framework.ts create mode 100644 packages/libraries/fluentui-react-native/src/icon.ts create mode 100644 packages/libraries/fluentui-react-native/src/input.ts create mode 100644 packages/libraries/fluentui-react-native/src/interactive-hooks.ts create mode 100644 packages/libraries/fluentui-react-native/src/link.ts create mode 100644 packages/libraries/fluentui-react-native/src/menu-button.ts create mode 100644 packages/libraries/fluentui-react-native/src/menu.ts create mode 100644 packages/libraries/fluentui-react-native/src/notification.ts create mode 100644 packages/libraries/fluentui-react-native/src/overflow.ts create mode 100644 packages/libraries/fluentui-react-native/src/persona-coin.ts create mode 100644 packages/libraries/fluentui-react-native/src/persona.ts create mode 100644 packages/libraries/fluentui-react-native/src/popover.ts create mode 100644 packages/libraries/fluentui-react-native/src/pressable.ts create mode 100644 packages/libraries/fluentui-react-native/src/radio-group.ts create mode 100644 packages/libraries/fluentui-react-native/src/separator.ts create mode 100644 packages/libraries/fluentui-react-native/src/spinner.ts create mode 100644 packages/libraries/fluentui-react-native/src/stack.ts create mode 100644 packages/libraries/fluentui-react-native/src/styling-utils.ts create mode 100644 packages/libraries/fluentui-react-native/src/switch.ts create mode 100644 packages/libraries/fluentui-react-native/src/tablist.ts create mode 100644 packages/libraries/fluentui-react-native/src/text.ts create mode 100644 packages/libraries/fluentui-react-native/src/theme-registry.ts create mode 100644 packages/libraries/fluentui-react-native/src/theme-tokens.ts create mode 100644 packages/libraries/fluentui-react-native/src/theme-types.ts create mode 100644 packages/libraries/fluentui-react-native/src/theme.ts create mode 100644 packages/libraries/fluentui-react-native/src/themed-settings.ts create mode 100644 packages/libraries/fluentui-react-native/src/themed-stylesheet.ts create mode 100644 packages/libraries/fluentui-react-native/src/theming-ramp.ts create mode 100644 packages/libraries/fluentui-react-native/src/theming-react-native.ts create mode 100644 packages/libraries/fluentui-react-native/src/theming-utils.ts create mode 100644 packages/libraries/fluentui-react-native/src/tokens.ts create mode 100644 packages/libraries/fluentui-react-native/src/tooltip.ts create mode 100644 packages/libraries/fluentui-react-native/src/use-slot.ts create mode 100644 packages/libraries/fluentui-react-native/src/use-slots.ts create mode 100644 packages/libraries/fluentui-react-native/src/use-styling.ts create mode 100644 packages/libraries/fluentui-react-native/src/use-tokens.ts create mode 100644 packages/libraries/fluentui-react-native/src/vibrancy-view.ts create mode 100644 packages/libraries/fluentui-react-native/src/win32-theme.ts create mode 100644 packages/libraries/fluentui-react-native/tsconfig.json diff --git a/packages/libraries/fluentui-react-native/README.md b/packages/libraries/fluentui-react-native/README.md index b5e8ea18bf9..a7871fcd0b3 100644 --- a/packages/libraries/fluentui-react-native/README.md +++ b/packages/libraries/fluentui-react-native/README.md @@ -57,116 +57,116 @@ The individual `@fluentui-react-native/*` packages continue to be published and ### Category barrels -| Barrel | Contains | Packages | -|--------|----------|----------| -| `./components` | Stable UI components | 25 | -| `./experimental` | Components under active development | 17 | -| `./core` | Framework, composition, slots, tokens | 9 | -| `./theming` | Platform themes and token definitions | 7 | -| `./utils` | Shared utilities | 4 | -| `./deprecated` | Legacy `@uifabricshared/*` packages | 8 | +| Barrel | Contains | Packages | +| ---------------- | ------------------------------------- | -------- | +| `./components` | Stable UI components | 25 | +| `./experimental` | Components under active development | 17 | +| `./core` | Framework, composition, slots, tokens | 9 | +| `./theming` | Platform themes and token definitions | 7 | +| `./utils` | Shared utilities | 4 | +| `./deprecated` | Legacy `@uifabricshared/*` packages | 8 | ### Individual subpaths #### Components (25) -| Subpath | Package | -|---------|---------| -| `./avatar` | `@fluentui-react-native/avatar` | -| `./badge` | `@fluentui-react-native/badge` | -| `./button` | `@fluentui-react-native/button` | -| `./callout` | `@fluentui-react-native/callout` | -| `./checkbox` | `@fluentui-react-native/checkbox` | -| `./chip` | `@fluentui-react-native/chip` | +| Subpath | Package | +| ------------------- | ---------------------------------------- | +| `./avatar` | `@fluentui-react-native/avatar` | +| `./badge` | `@fluentui-react-native/badge` | +| `./button` | `@fluentui-react-native/button` | +| `./callout` | `@fluentui-react-native/callout` | +| `./checkbox` | `@fluentui-react-native/checkbox` | +| `./chip` | `@fluentui-react-native/chip` | | `./contextual-menu` | `@fluentui-react-native/contextual-menu` | -| `./divider` | `@fluentui-react-native/divider` | +| `./divider` | `@fluentui-react-native/divider` | | `./focus-trap-zone` | `@fluentui-react-native/focus-trap-zone` | -| `./focus-zone` | `@fluentui-react-native/focus-zone` | -| `./icon` | `@fluentui-react-native/icon` | -| `./input` | `@fluentui-react-native/input` | -| `./link` | `@fluentui-react-native/link` | -| `./menu` | `@fluentui-react-native/menu` | -| `./menu-button` | `@fluentui-react-native/menu-button` | -| `./notification` | `@fluentui-react-native/notification` | -| `./persona` | `@fluentui-react-native/persona` | -| `./persona-coin` | `@fluentui-react-native/persona-coin` | -| `./pressable` | `@fluentui-react-native/pressable` | -| `./radio-group` | `@fluentui-react-native/radio-group` | -| `./separator` | `@fluentui-react-native/separator` | -| `./stack` | `@fluentui-react-native/stack` | -| `./switch` | `@fluentui-react-native/switch` | -| `./tablist` | `@fluentui-react-native/tablist` | -| `./text` | `@fluentui-react-native/text` | +| `./focus-zone` | `@fluentui-react-native/focus-zone` | +| `./icon` | `@fluentui-react-native/icon` | +| `./input` | `@fluentui-react-native/input` | +| `./link` | `@fluentui-react-native/link` | +| `./menu` | `@fluentui-react-native/menu` | +| `./menu-button` | `@fluentui-react-native/menu-button` | +| `./notification` | `@fluentui-react-native/notification` | +| `./persona` | `@fluentui-react-native/persona` | +| `./persona-coin` | `@fluentui-react-native/persona-coin` | +| `./pressable` | `@fluentui-react-native/pressable` | +| `./radio-group` | `@fluentui-react-native/radio-group` | +| `./separator` | `@fluentui-react-native/separator` | +| `./stack` | `@fluentui-react-native/stack` | +| `./switch` | `@fluentui-react-native/switch` | +| `./tablist` | `@fluentui-react-native/tablist` | +| `./text` | `@fluentui-react-native/text` | #### Experimental (17) -| Subpath | Package | -|---------|---------| -| `./drawer` | `@fluentui-react-native/drawer` | -| `./dropdown` | `@fluentui-react-native/dropdown` | -| `./experimental-activity-indicator` | `@fluentui-react-native/experimental-activity-indicator` | +| Subpath | Package | +| ------------------------------------- | ---------------------------------------------------------- | +| `./drawer` | `@fluentui-react-native/drawer` | +| `./dropdown` | `@fluentui-react-native/dropdown` | +| `./experimental-activity-indicator` | `@fluentui-react-native/experimental-activity-indicator` | | `./experimental-appearance-additions` | `@fluentui-react-native/experimental-appearance-additions` | -| `./experimental-avatar` | `@fluentui-react-native/experimental-avatar` | -| `./experimental-checkbox` | `@fluentui-react-native/experimental-checkbox` | -| `./experimental-expander` | `@fluentui-react-native/experimental-expander` | -| `./experimental-menu-button` | `@fluentui-react-native/experimental-menu-button` | -| `./experimental-native-date-picker` | `@fluentui-react-native/experimental-native-date-picker` | -| `./experimental-native-font-metrics` | `@fluentui-react-native/experimental-native-font-metrics` | -| `./experimental-shadow` | `@fluentui-react-native/experimental-shadow` | -| `./experimental-shimmer` | `@fluentui-react-native/experimental-shimmer` | -| `./overflow` | `@fluentui-react-native/overflow` | -| `./popover` | `@fluentui-react-native/popover` | -| `./spinner` | `@fluentui-react-native/spinner` | -| `./tooltip` | `@fluentui-react-native/tooltip` | -| `./vibrancy-view` | `@fluentui-react-native/vibrancy-view` | +| `./experimental-avatar` | `@fluentui-react-native/experimental-avatar` | +| `./experimental-checkbox` | `@fluentui-react-native/experimental-checkbox` | +| `./experimental-expander` | `@fluentui-react-native/experimental-expander` | +| `./experimental-menu-button` | `@fluentui-react-native/experimental-menu-button` | +| `./experimental-native-date-picker` | `@fluentui-react-native/experimental-native-date-picker` | +| `./experimental-native-font-metrics` | `@fluentui-react-native/experimental-native-font-metrics` | +| `./experimental-shadow` | `@fluentui-react-native/experimental-shadow` | +| `./experimental-shimmer` | `@fluentui-react-native/experimental-shimmer` | +| `./overflow` | `@fluentui-react-native/overflow` | +| `./popover` | `@fluentui-react-native/popover` | +| `./spinner` | `@fluentui-react-native/spinner` | +| `./tooltip` | `@fluentui-react-native/tooltip` | +| `./vibrancy-view` | `@fluentui-react-native/vibrancy-view` | #### Core / Framework (9) -| Subpath | Package | -|---------|---------| -| `./composition` | `@fluentui-react-native/composition` | -| `./framework` | `@fluentui-react-native/framework` | -| `./framework-base` | `@fluentui-react-native/framework-base` | -| `./theme` | `@fluentui-react-native/theme` | +| Subpath | Package | +| --------------------- | ------------------------------------------ | +| `./composition` | `@fluentui-react-native/composition` | +| `./framework` | `@fluentui-react-native/framework` | +| `./framework-base` | `@fluentui-react-native/framework-base` | +| `./theme` | `@fluentui-react-native/theme` | | `./themed-stylesheet` | `@fluentui-react-native/themed-stylesheet` | -| `./use-slot` | `@fluentui-react-native/use-slot` | -| `./use-slots` | `@fluentui-react-native/use-slots` | -| `./use-styling` | `@fluentui-react-native/use-styling` | -| `./use-tokens` | `@fluentui-react-native/use-tokens` | +| `./use-slot` | `@fluentui-react-native/use-slot` | +| `./use-slots` | `@fluentui-react-native/use-slots` | +| `./use-styling` | `@fluentui-react-native/use-styling` | +| `./use-tokens` | `@fluentui-react-native/use-tokens` | #### Theming (7) -| Subpath | Package | -|---------|---------| +| Subpath | Package | +| ----------------- | -------------------------------------- | | `./android-theme` | `@fluentui-react-native/android-theme` | -| `./apple-theme` | `@fluentui-react-native/apple-theme` | +| `./apple-theme` | `@fluentui-react-native/apple-theme` | | `./default-theme` | `@fluentui-react-native/default-theme` | -| `./theme-tokens` | `@fluentui-react-native/theme-tokens` | -| `./theme-types` | `@fluentui-react-native/theme-types` | +| `./theme-tokens` | `@fluentui-react-native/theme-tokens` | +| `./theme-types` | `@fluentui-react-native/theme-types` | | `./theming-utils` | `@fluentui-react-native/theming-utils` | -| `./win32-theme` | `@fluentui-react-native/win32-theme` | +| `./win32-theme` | `@fluentui-react-native/win32-theme` | #### Utilities (4) -| Subpath | Package | -|---------|---------| -| `./adapters` | `@fluentui-react-native/adapters` | +| Subpath | Package | +| --------------------- | ------------------------------------------ | +| `./adapters` | `@fluentui-react-native/adapters` | | `./interactive-hooks` | `@fluentui-react-native/interactive-hooks` | -| `./styling-utils` | `@fluentui-react-native/styling-utils` | -| `./tokens` | `@fluentui-react-native/tokens` | +| `./styling-utils` | `@fluentui-react-native/styling-utils` | +| `./tokens` | `@fluentui-react-native/tokens` | #### Deprecated (8) -| Subpath | Package | -|---------|---------| +| Subpath | Package | +| ------------------------- | --------------------------------------- | | `./foundation-composable` | `@uifabricshared/foundation-composable` | -| `./foundation-compose` | `@uifabricshared/foundation-compose` | -| `./foundation-settings` | `@uifabricshared/foundation-settings` | -| `./foundation-tokens` | `@uifabricshared/foundation-tokens` | -| `./theme-registry` | `@uifabricshared/theme-registry` | -| `./themed-settings` | `@uifabricshared/themed-settings` | -| `./theming-ramp` | `@uifabricshared/theming-ramp` | -| `./theming-react-native` | `@uifabricshared/theming-react-native` | +| `./foundation-compose` | `@uifabricshared/foundation-compose` | +| `./foundation-settings` | `@uifabricshared/foundation-settings` | +| `./foundation-tokens` | `@uifabricshared/foundation-tokens` | +| `./theme-registry` | `@uifabricshared/theme-registry` | +| `./themed-settings` | `@uifabricshared/themed-settings` | +| `./theming-ramp` | `@uifabricshared/theming-ramp` | +| `./theming-react-native` | `@uifabricshared/theming-react-native` | ## Design @@ -185,6 +185,7 @@ When adding a new package to the monorepo: 3. Commit the generated `src/` files and updated `package.json` The script automatically: + - Discovers all publishable (non-private) packages under `packages/` - Creates individual re-export files (`src//index.ts`) - Creates category barrel files (`src//index.ts`) diff --git a/packages/libraries/fluentui-react-native/eslint.config.js b/packages/libraries/fluentui-react-native/eslint.config.cjs similarity index 100% rename from packages/libraries/fluentui-react-native/eslint.config.js rename to packages/libraries/fluentui-react-native/eslint.config.cjs diff --git a/packages/libraries/fluentui-react-native/package.json b/packages/libraries/fluentui-react-native/package.json index 2aecbcf8604..04ca4d5c3be 100644 --- a/packages/libraries/fluentui-react-native/package.json +++ b/packages/libraries/fluentui-react-native/package.json @@ -3,329 +3,248 @@ "version": "1.0.0", "description": "Unified mono-package for FluentUI React Native. Import any component via subpath: fluentui-react-native/button, fluentui-react-native/theme, etc.", "homepage": "https://github.com/microsoft/fluentui-react-native", + "license": "MIT", + "author": "Microsoft ", "repository": { "type": "git", "url": "https://github.com/microsoft/fluentui-react-native.git", "directory": "packages/libraries/fluentui-react-native" }, - "license": "MIT", - "author": "Microsoft ", - "sideEffects": false, "type": "module", + "sideEffects": false, "exports": { "./components": { - "types": "./lib/components.d.ts", - "import": "./lib/components.js", "default": "./src/components.ts" }, "./core": { - "types": "./lib/core.d.ts", - "import": "./lib/core.js", "default": "./src/core.ts" }, "./deprecated": { - "types": "./lib/deprecated.d.ts", - "import": "./lib/deprecated.js", "default": "./src/deprecated.ts" }, "./experimental": { - "types": "./lib/experimental.d.ts", - "import": "./lib/experimental.js", "default": "./src/experimental.ts" }, "./theming": { - "types": "./lib/theming.d.ts", - "import": "./lib/theming.js", "default": "./src/theming.ts" }, "./utils": { - "types": "./lib/utils.d.ts", - "import": "./lib/utils.js", "default": "./src/utils.ts" }, "./adapters": { - "types": "./lib/adapters.d.ts", - "import": "./lib/adapters.js" + "default": "./src/adapters.ts" }, "./android-theme": { - "types": "./lib/android-theme.d.ts", - "import": "./lib/android-theme.js" + "default": "./src/android-theme.ts" }, "./apple-theme": { - "types": "./lib/apple-theme.d.ts", - "import": "./lib/apple-theme.js" + "default": "./src/apple-theme.ts" }, "./avatar": { - "types": "./lib/avatar.d.ts", - "import": "./lib/avatar.js" + "default": "./src/avatar.ts" }, "./badge": { - "types": "./lib/badge.d.ts", - "import": "./lib/badge.js" + "default": "./src/badge.ts" }, "./button": { - "types": "./lib/button.d.ts", - "import": "./lib/button.js" + "default": "./src/button.ts" }, "./callout": { - "types": "./lib/callout.d.ts", - "import": "./lib/callout.js" + "default": "./src/callout.ts" }, "./checkbox": { - "types": "./lib/checkbox.d.ts", - "import": "./lib/checkbox.js" + "default": "./src/checkbox.ts" }, "./chip": { - "types": "./lib/chip.d.ts", - "import": "./lib/chip.js" + "default": "./src/chip.ts" }, "./composition": { - "types": "./lib/composition.d.ts", - "import": "./lib/composition.js" + "default": "./src/composition.ts" }, "./contextual-menu": { - "types": "./lib/contextual-menu.d.ts", - "import": "./lib/contextual-menu.js" + "default": "./src/contextual-menu.ts" }, "./default-theme": { - "types": "./lib/default-theme.d.ts", - "import": "./lib/default-theme.js" + "default": "./src/default-theme.ts" }, "./divider": { - "types": "./lib/divider.d.ts", - "import": "./lib/divider.js" + "default": "./src/divider.ts" }, "./drawer": { - "types": "./lib/drawer.d.ts", - "import": "./lib/drawer.js" + "default": "./src/drawer.ts" }, "./dropdown": { - "types": "./lib/dropdown.d.ts", - "import": "./lib/dropdown.js" + "default": "./src/dropdown.ts" }, "./experimental-activity-indicator": { - "types": "./lib/experimental-activity-indicator.d.ts", - "import": "./lib/experimental-activity-indicator.js" + "default": "./src/experimental-activity-indicator.ts" }, "./experimental-appearance-additions": { - "types": "./lib/experimental-appearance-additions.d.ts", - "import": "./lib/experimental-appearance-additions.js" + "default": "./src/experimental-appearance-additions.ts" }, "./experimental-avatar": { - "types": "./lib/experimental-avatar.d.ts", - "import": "./lib/experimental-avatar.js" + "default": "./src/experimental-avatar.ts" }, "./experimental-checkbox": { - "types": "./lib/experimental-checkbox.d.ts", - "import": "./lib/experimental-checkbox.js" + "default": "./src/experimental-checkbox.ts" }, "./experimental-expander": { - "types": "./lib/experimental-expander.d.ts", - "import": "./lib/experimental-expander.js" + "default": "./src/experimental-expander.ts" }, "./experimental-menu-button": { - "types": "./lib/experimental-menu-button.d.ts", - "import": "./lib/experimental-menu-button.js" + "default": "./src/experimental-menu-button.ts" }, "./experimental-native-date-picker": { - "types": "./lib/experimental-native-date-picker.d.ts", - "import": "./lib/experimental-native-date-picker.js" + "default": "./src/experimental-native-date-picker.ts" }, "./experimental-native-font-metrics": { - "types": "./lib/experimental-native-font-metrics.d.ts", - "import": "./lib/experimental-native-font-metrics.js" + "default": "./src/experimental-native-font-metrics.ts" }, "./experimental-shadow": { - "types": "./lib/experimental-shadow.d.ts", - "import": "./lib/experimental-shadow.js" + "default": "./src/experimental-shadow.ts" }, "./experimental-shimmer": { - "types": "./lib/experimental-shimmer.d.ts", - "import": "./lib/experimental-shimmer.js" + "default": "./src/experimental-shimmer.ts" }, "./focus-trap-zone": { - "types": "./lib/focus-trap-zone.d.ts", - "import": "./lib/focus-trap-zone.js" + "default": "./src/focus-trap-zone.ts" }, "./focus-zone": { - "types": "./lib/focus-zone.d.ts", - "import": "./lib/focus-zone.js" + "default": "./src/focus-zone.ts" }, "./foundation-composable": { - "types": "./lib/foundation-composable.d.ts", - "import": "./lib/foundation-composable.js" + "default": "./src/foundation-composable.ts" }, "./foundation-compose": { - "types": "./lib/foundation-compose.d.ts", - "import": "./lib/foundation-compose.js" + "default": "./src/foundation-compose.ts" }, "./foundation-settings": { - "types": "./lib/foundation-settings.d.ts", - "import": "./lib/foundation-settings.js" + "default": "./src/foundation-settings.ts" }, "./foundation-tokens": { - "types": "./lib/foundation-tokens.d.ts", - "import": "./lib/foundation-tokens.js" + "default": "./src/foundation-tokens.ts" }, "./framework": { - "types": "./lib/framework.d.ts", - "import": "./lib/framework.js" + "default": "./src/framework.ts" }, "./framework-base": { - "types": "./lib/framework-base.d.ts", - "import": "./lib/framework-base.js" + "default": "./src/framework-base.ts" }, "./icon": { - "types": "./lib/icon.d.ts", - "import": "./lib/icon.js" + "default": "./src/icon.ts" }, "./input": { - "types": "./lib/input.d.ts", - "import": "./lib/input.js" + "default": "./src/input.ts" }, "./interactive-hooks": { - "types": "./lib/interactive-hooks.d.ts", - "import": "./lib/interactive-hooks.js" + "default": "./src/interactive-hooks.ts" }, "./link": { - "types": "./lib/link.d.ts", - "import": "./lib/link.js" + "default": "./src/link.ts" }, "./menu": { - "types": "./lib/menu.d.ts", - "import": "./lib/menu.js" + "default": "./src/menu.ts" }, "./menu-button": { - "types": "./lib/menu-button.d.ts", - "import": "./lib/menu-button.js" + "default": "./src/menu-button.ts" }, "./notification": { - "types": "./lib/notification.d.ts", - "import": "./lib/notification.js" + "default": "./src/notification.ts" }, "./overflow": { - "types": "./lib/overflow.d.ts", - "import": "./lib/overflow.js" + "default": "./src/overflow.ts" }, "./persona": { - "types": "./lib/persona.d.ts", - "import": "./lib/persona.js" + "default": "./src/persona.ts" }, "./persona-coin": { - "types": "./lib/persona-coin.d.ts", - "import": "./lib/persona-coin.js" + "default": "./src/persona-coin.ts" }, "./popover": { - "types": "./lib/popover.d.ts", - "import": "./lib/popover.js" + "default": "./src/popover.ts" }, "./pressable": { - "types": "./lib/pressable.d.ts", - "import": "./lib/pressable.js" + "default": "./src/pressable.ts" }, "./radio-group": { - "types": "./lib/radio-group.d.ts", - "import": "./lib/radio-group.js" + "default": "./src/radio-group.ts" }, "./separator": { - "types": "./lib/separator.d.ts", - "import": "./lib/separator.js" + "default": "./src/separator.ts" }, "./spinner": { - "types": "./lib/spinner.d.ts", - "import": "./lib/spinner.js" + "default": "./src/spinner.ts" }, "./stack": { - "types": "./lib/stack.d.ts", - "import": "./lib/stack.js" + "default": "./src/stack.ts" }, "./styling-utils": { - "types": "./lib/styling-utils.d.ts", - "import": "./lib/styling-utils.js" + "default": "./src/styling-utils.ts" }, "./switch": { - "types": "./lib/switch.d.ts", - "import": "./lib/switch.js" + "default": "./src/switch.ts" }, "./tablist": { - "types": "./lib/tablist.d.ts", - "import": "./lib/tablist.js" + "default": "./src/tablist.ts" }, "./text": { - "types": "./lib/text.d.ts", - "import": "./lib/text.js" + "default": "./src/text.ts" }, "./theme": { - "types": "./lib/theme.d.ts", - "import": "./lib/theme.js" + "default": "./src/theme.ts" }, "./theme-registry": { - "types": "./lib/theme-registry.d.ts", - "import": "./lib/theme-registry.js" + "default": "./src/theme-registry.ts" }, "./theme-tokens": { - "types": "./lib/theme-tokens.d.ts", - "import": "./lib/theme-tokens.js" + "default": "./src/theme-tokens.ts" }, "./theme-types": { - "types": "./lib/theme-types.d.ts", - "import": "./lib/theme-types.js" + "default": "./src/theme-types.ts" }, "./themed-settings": { - "types": "./lib/themed-settings.d.ts", - "import": "./lib/themed-settings.js" + "default": "./src/themed-settings.ts" }, "./themed-stylesheet": { - "types": "./lib/themed-stylesheet.d.ts", - "import": "./lib/themed-stylesheet.js" + "default": "./src/themed-stylesheet.ts" }, "./theming-ramp": { - "types": "./lib/theming-ramp.d.ts", - "import": "./lib/theming-ramp.js" + "default": "./src/theming-ramp.ts" }, "./theming-react-native": { - "types": "./lib/theming-react-native.d.ts", - "import": "./lib/theming-react-native.js" + "default": "./src/theming-react-native.ts" }, "./theming-utils": { - "types": "./lib/theming-utils.d.ts", - "import": "./lib/theming-utils.js" + "default": "./src/theming-utils.ts" }, "./tokens": { - "types": "./lib/tokens.d.ts", - "import": "./lib/tokens.js" + "default": "./src/tokens.ts" }, "./tooltip": { - "types": "./lib/tooltip.d.ts", - "import": "./lib/tooltip.js" + "default": "./src/tooltip.ts" }, "./use-slot": { - "types": "./lib/use-slot.d.ts", - "import": "./lib/use-slot.js" + "default": "./src/use-slot.ts" }, "./use-slots": { - "types": "./lib/use-slots.d.ts", - "import": "./lib/use-slots.js" + "default": "./src/use-slots.ts" }, "./use-styling": { - "types": "./lib/use-styling.d.ts", - "import": "./lib/use-styling.js" + "default": "./src/use-styling.ts" }, "./use-tokens": { - "types": "./lib/use-tokens.d.ts", - "import": "./lib/use-tokens.js" + "default": "./src/use-tokens.ts" }, "./vibrancy-view": { - "types": "./lib/vibrancy-view.d.ts", - "import": "./lib/vibrancy-view.js" + "default": "./src/vibrancy-view.ts" }, "./win32-theme": { - "types": "./lib/win32-theme.d.ts", - "import": "./lib/win32-theme.js" + "default": "./src/win32-theme.ts" } }, "scripts": { - "build": "node update-exports.mts", + "build": "tsgo", + "build-core": "tsgo", "check-exports": "node update-exports.mts --check", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", diff --git a/packages/libraries/fluentui-react-native/src/adapters.ts b/packages/libraries/fluentui-react-native/src/adapters.ts new file mode 100644 index 00000000000..73c260c9a36 --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/adapters.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/adapters'; diff --git a/packages/libraries/fluentui-react-native/src/android-theme.ts b/packages/libraries/fluentui-react-native/src/android-theme.ts new file mode 100644 index 00000000000..ce2776695eb --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/android-theme.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/android-theme'; diff --git a/packages/libraries/fluentui-react-native/src/apple-theme.ts b/packages/libraries/fluentui-react-native/src/apple-theme.ts new file mode 100644 index 00000000000..f65492a2a8a --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/apple-theme.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/apple-theme'; diff --git a/packages/libraries/fluentui-react-native/src/avatar.ts b/packages/libraries/fluentui-react-native/src/avatar.ts new file mode 100644 index 00000000000..bd07b70f7e1 --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/avatar.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/avatar'; diff --git a/packages/libraries/fluentui-react-native/src/badge.ts b/packages/libraries/fluentui-react-native/src/badge.ts new file mode 100644 index 00000000000..97e71d85771 --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/badge.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/badge'; diff --git a/packages/libraries/fluentui-react-native/src/button.ts b/packages/libraries/fluentui-react-native/src/button.ts new file mode 100644 index 00000000000..2d3f0480578 --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/button.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/button'; diff --git a/packages/libraries/fluentui-react-native/src/callout.ts b/packages/libraries/fluentui-react-native/src/callout.ts new file mode 100644 index 00000000000..00c1add5227 --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/callout.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/callout'; diff --git a/packages/libraries/fluentui-react-native/src/checkbox.ts b/packages/libraries/fluentui-react-native/src/checkbox.ts new file mode 100644 index 00000000000..8f1e787d0cb --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/checkbox.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/checkbox'; diff --git a/packages/libraries/fluentui-react-native/src/chip.ts b/packages/libraries/fluentui-react-native/src/chip.ts new file mode 100644 index 00000000000..5f48e48c655 --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/chip.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/chip'; diff --git a/packages/libraries/fluentui-react-native/src/components.ts b/packages/libraries/fluentui-react-native/src/components.ts index 26eaced33be..e3a6a33dca0 100644 --- a/packages/libraries/fluentui-react-native/src/components.ts +++ b/packages/libraries/fluentui-react-native/src/components.ts @@ -1,3 +1,4 @@ +// @ts-nocheck — Category barrels re-export overlapping packages that share symbols, causing TS2308 duplicate export errors. export * from '@fluentui-react-native/avatar'; export * from '@fluentui-react-native/badge'; export * from '@fluentui-react-native/button'; diff --git a/packages/libraries/fluentui-react-native/src/composition.ts b/packages/libraries/fluentui-react-native/src/composition.ts new file mode 100644 index 00000000000..cb919014ae3 --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/composition.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/composition'; diff --git a/packages/libraries/fluentui-react-native/src/contextual-menu.ts b/packages/libraries/fluentui-react-native/src/contextual-menu.ts new file mode 100644 index 00000000000..cd056735941 --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/contextual-menu.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/contextual-menu'; diff --git a/packages/libraries/fluentui-react-native/src/core.ts b/packages/libraries/fluentui-react-native/src/core.ts index 12d83e2770e..c63f54739b0 100644 --- a/packages/libraries/fluentui-react-native/src/core.ts +++ b/packages/libraries/fluentui-react-native/src/core.ts @@ -1,3 +1,4 @@ +// @ts-nocheck — Category barrels re-export overlapping packages that share symbols, causing TS2308 duplicate export errors. export * from '@fluentui-react-native/composition'; export * from '@fluentui-react-native/framework'; export * from '@fluentui-react-native/framework-base'; diff --git a/packages/libraries/fluentui-react-native/src/default-theme.ts b/packages/libraries/fluentui-react-native/src/default-theme.ts new file mode 100644 index 00000000000..449e8f217b7 --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/default-theme.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/default-theme'; diff --git a/packages/libraries/fluentui-react-native/src/deprecated.ts b/packages/libraries/fluentui-react-native/src/deprecated.ts index 3650f0b48c2..dd098ad5564 100644 --- a/packages/libraries/fluentui-react-native/src/deprecated.ts +++ b/packages/libraries/fluentui-react-native/src/deprecated.ts @@ -1,3 +1,4 @@ +// @ts-nocheck — Category barrels re-export overlapping packages that share symbols, causing TS2308 duplicate export errors. export * from '@uifabricshared/foundation-composable'; export * from '@uifabricshared/foundation-compose'; export * from '@uifabricshared/foundation-settings'; diff --git a/packages/libraries/fluentui-react-native/src/divider.ts b/packages/libraries/fluentui-react-native/src/divider.ts new file mode 100644 index 00000000000..69b35014561 --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/divider.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/divider'; diff --git a/packages/libraries/fluentui-react-native/src/drawer.ts b/packages/libraries/fluentui-react-native/src/drawer.ts new file mode 100644 index 00000000000..6d2c78eb4f0 --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/drawer.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/drawer'; diff --git a/packages/libraries/fluentui-react-native/src/dropdown.ts b/packages/libraries/fluentui-react-native/src/dropdown.ts new file mode 100644 index 00000000000..a51024921ec --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/dropdown.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/dropdown'; diff --git a/packages/libraries/fluentui-react-native/src/experimental-activity-indicator.ts b/packages/libraries/fluentui-react-native/src/experimental-activity-indicator.ts new file mode 100644 index 00000000000..d63c46f67c0 --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/experimental-activity-indicator.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/experimental-activity-indicator'; diff --git a/packages/libraries/fluentui-react-native/src/experimental-appearance-additions.ts b/packages/libraries/fluentui-react-native/src/experimental-appearance-additions.ts new file mode 100644 index 00000000000..8eb1ff66f43 --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/experimental-appearance-additions.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/experimental-appearance-additions'; diff --git a/packages/libraries/fluentui-react-native/src/experimental-avatar.ts b/packages/libraries/fluentui-react-native/src/experimental-avatar.ts new file mode 100644 index 00000000000..546be814ba7 --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/experimental-avatar.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/experimental-avatar'; diff --git a/packages/libraries/fluentui-react-native/src/experimental-checkbox.ts b/packages/libraries/fluentui-react-native/src/experimental-checkbox.ts new file mode 100644 index 00000000000..068d3d5f239 --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/experimental-checkbox.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/experimental-checkbox'; diff --git a/packages/libraries/fluentui-react-native/src/experimental-expander.ts b/packages/libraries/fluentui-react-native/src/experimental-expander.ts new file mode 100644 index 00000000000..3389fbc2a0d --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/experimental-expander.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/experimental-expander'; diff --git a/packages/libraries/fluentui-react-native/src/experimental-menu-button.ts b/packages/libraries/fluentui-react-native/src/experimental-menu-button.ts new file mode 100644 index 00000000000..c1810a3c414 --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/experimental-menu-button.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/experimental-menu-button'; diff --git a/packages/libraries/fluentui-react-native/src/experimental-native-date-picker.ts b/packages/libraries/fluentui-react-native/src/experimental-native-date-picker.ts new file mode 100644 index 00000000000..618357f4bda --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/experimental-native-date-picker.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/experimental-native-date-picker'; diff --git a/packages/libraries/fluentui-react-native/src/experimental-native-font-metrics.ts b/packages/libraries/fluentui-react-native/src/experimental-native-font-metrics.ts new file mode 100644 index 00000000000..73e619b0dc7 --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/experimental-native-font-metrics.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/experimental-native-font-metrics'; diff --git a/packages/libraries/fluentui-react-native/src/experimental-shadow.ts b/packages/libraries/fluentui-react-native/src/experimental-shadow.ts new file mode 100644 index 00000000000..acdad92eafc --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/experimental-shadow.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/experimental-shadow'; diff --git a/packages/libraries/fluentui-react-native/src/experimental-shimmer.ts b/packages/libraries/fluentui-react-native/src/experimental-shimmer.ts new file mode 100644 index 00000000000..cc06e77d649 --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/experimental-shimmer.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/experimental-shimmer'; diff --git a/packages/libraries/fluentui-react-native/src/experimental.ts b/packages/libraries/fluentui-react-native/src/experimental.ts index 789e9dfed36..ba0de40deca 100644 --- a/packages/libraries/fluentui-react-native/src/experimental.ts +++ b/packages/libraries/fluentui-react-native/src/experimental.ts @@ -1,3 +1,4 @@ +// @ts-nocheck — Category barrels re-export overlapping packages that share symbols, causing TS2308 duplicate export errors. export * from '@fluentui-react-native/drawer'; export * from '@fluentui-react-native/dropdown'; export * from '@fluentui-react-native/experimental-activity-indicator'; diff --git a/packages/libraries/fluentui-react-native/src/focus-trap-zone.ts b/packages/libraries/fluentui-react-native/src/focus-trap-zone.ts new file mode 100644 index 00000000000..4f352a4d95c --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/focus-trap-zone.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/focus-trap-zone'; diff --git a/packages/libraries/fluentui-react-native/src/focus-zone.ts b/packages/libraries/fluentui-react-native/src/focus-zone.ts new file mode 100644 index 00000000000..0461d44a130 --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/focus-zone.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/focus-zone'; diff --git a/packages/libraries/fluentui-react-native/src/foundation-composable.ts b/packages/libraries/fluentui-react-native/src/foundation-composable.ts new file mode 100644 index 00000000000..cf94f517acd --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/foundation-composable.ts @@ -0,0 +1 @@ +export * from '@uifabricshared/foundation-composable'; diff --git a/packages/libraries/fluentui-react-native/src/foundation-compose.ts b/packages/libraries/fluentui-react-native/src/foundation-compose.ts new file mode 100644 index 00000000000..460772cac9a --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/foundation-compose.ts @@ -0,0 +1 @@ +export * from '@uifabricshared/foundation-compose'; diff --git a/packages/libraries/fluentui-react-native/src/foundation-settings.ts b/packages/libraries/fluentui-react-native/src/foundation-settings.ts new file mode 100644 index 00000000000..3e6c6b4d4bd --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/foundation-settings.ts @@ -0,0 +1 @@ +export * from '@uifabricshared/foundation-settings'; diff --git a/packages/libraries/fluentui-react-native/src/foundation-tokens.ts b/packages/libraries/fluentui-react-native/src/foundation-tokens.ts new file mode 100644 index 00000000000..338031575b5 --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/foundation-tokens.ts @@ -0,0 +1 @@ +export * from '@uifabricshared/foundation-tokens'; diff --git a/packages/libraries/fluentui-react-native/src/framework-base.ts b/packages/libraries/fluentui-react-native/src/framework-base.ts new file mode 100644 index 00000000000..804ce9028f7 --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/framework-base.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/framework-base'; diff --git a/packages/libraries/fluentui-react-native/src/framework.ts b/packages/libraries/fluentui-react-native/src/framework.ts new file mode 100644 index 00000000000..3a0c4ffd053 --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/framework.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/framework'; diff --git a/packages/libraries/fluentui-react-native/src/icon.ts b/packages/libraries/fluentui-react-native/src/icon.ts new file mode 100644 index 00000000000..86d2d8f2012 --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/icon.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/icon'; diff --git a/packages/libraries/fluentui-react-native/src/input.ts b/packages/libraries/fluentui-react-native/src/input.ts new file mode 100644 index 00000000000..4ad460d12af --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/input.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/input'; diff --git a/packages/libraries/fluentui-react-native/src/interactive-hooks.ts b/packages/libraries/fluentui-react-native/src/interactive-hooks.ts new file mode 100644 index 00000000000..e67d91a0594 --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/interactive-hooks.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/interactive-hooks'; diff --git a/packages/libraries/fluentui-react-native/src/link.ts b/packages/libraries/fluentui-react-native/src/link.ts new file mode 100644 index 00000000000..aa18bd329b5 --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/link.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/link'; diff --git a/packages/libraries/fluentui-react-native/src/menu-button.ts b/packages/libraries/fluentui-react-native/src/menu-button.ts new file mode 100644 index 00000000000..918238a25da --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/menu-button.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/menu-button'; diff --git a/packages/libraries/fluentui-react-native/src/menu.ts b/packages/libraries/fluentui-react-native/src/menu.ts new file mode 100644 index 00000000000..e9214eefbfb --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/menu.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/menu'; diff --git a/packages/libraries/fluentui-react-native/src/notification.ts b/packages/libraries/fluentui-react-native/src/notification.ts new file mode 100644 index 00000000000..01ac4a5809c --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/notification.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/notification'; diff --git a/packages/libraries/fluentui-react-native/src/overflow.ts b/packages/libraries/fluentui-react-native/src/overflow.ts new file mode 100644 index 00000000000..8e74b53574b --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/overflow.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/overflow'; diff --git a/packages/libraries/fluentui-react-native/src/persona-coin.ts b/packages/libraries/fluentui-react-native/src/persona-coin.ts new file mode 100644 index 00000000000..5f15b04ef27 --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/persona-coin.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/persona-coin'; diff --git a/packages/libraries/fluentui-react-native/src/persona.ts b/packages/libraries/fluentui-react-native/src/persona.ts new file mode 100644 index 00000000000..4c0fc6d042f --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/persona.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/persona'; diff --git a/packages/libraries/fluentui-react-native/src/popover.ts b/packages/libraries/fluentui-react-native/src/popover.ts new file mode 100644 index 00000000000..31d247ffede --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/popover.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/popover'; diff --git a/packages/libraries/fluentui-react-native/src/pressable.ts b/packages/libraries/fluentui-react-native/src/pressable.ts new file mode 100644 index 00000000000..6a737b8a6dd --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/pressable.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/pressable'; diff --git a/packages/libraries/fluentui-react-native/src/radio-group.ts b/packages/libraries/fluentui-react-native/src/radio-group.ts new file mode 100644 index 00000000000..7fd27d2b8ee --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/radio-group.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/radio-group'; diff --git a/packages/libraries/fluentui-react-native/src/separator.ts b/packages/libraries/fluentui-react-native/src/separator.ts new file mode 100644 index 00000000000..15f66c8be0f --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/separator.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/separator'; diff --git a/packages/libraries/fluentui-react-native/src/spinner.ts b/packages/libraries/fluentui-react-native/src/spinner.ts new file mode 100644 index 00000000000..f6e5699a33c --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/spinner.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/spinner'; diff --git a/packages/libraries/fluentui-react-native/src/stack.ts b/packages/libraries/fluentui-react-native/src/stack.ts new file mode 100644 index 00000000000..10871a4cc3e --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/stack.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/stack'; diff --git a/packages/libraries/fluentui-react-native/src/styling-utils.ts b/packages/libraries/fluentui-react-native/src/styling-utils.ts new file mode 100644 index 00000000000..cf2a9b6897d --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/styling-utils.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/styling-utils'; diff --git a/packages/libraries/fluentui-react-native/src/switch.ts b/packages/libraries/fluentui-react-native/src/switch.ts new file mode 100644 index 00000000000..c4c409463ec --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/switch.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/switch'; diff --git a/packages/libraries/fluentui-react-native/src/tablist.ts b/packages/libraries/fluentui-react-native/src/tablist.ts new file mode 100644 index 00000000000..42614a6cacc --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/tablist.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/tablist'; diff --git a/packages/libraries/fluentui-react-native/src/text.ts b/packages/libraries/fluentui-react-native/src/text.ts new file mode 100644 index 00000000000..0ad9060ec3f --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/text.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/text'; diff --git a/packages/libraries/fluentui-react-native/src/theme-registry.ts b/packages/libraries/fluentui-react-native/src/theme-registry.ts new file mode 100644 index 00000000000..37024dc7370 --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/theme-registry.ts @@ -0,0 +1 @@ +export * from '@uifabricshared/theme-registry'; diff --git a/packages/libraries/fluentui-react-native/src/theme-tokens.ts b/packages/libraries/fluentui-react-native/src/theme-tokens.ts new file mode 100644 index 00000000000..8f1d623e9e0 --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/theme-tokens.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/theme-tokens'; diff --git a/packages/libraries/fluentui-react-native/src/theme-types.ts b/packages/libraries/fluentui-react-native/src/theme-types.ts new file mode 100644 index 00000000000..916363f7941 --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/theme-types.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/theme-types'; diff --git a/packages/libraries/fluentui-react-native/src/theme.ts b/packages/libraries/fluentui-react-native/src/theme.ts new file mode 100644 index 00000000000..52399f0c64f --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/theme.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/theme'; diff --git a/packages/libraries/fluentui-react-native/src/themed-settings.ts b/packages/libraries/fluentui-react-native/src/themed-settings.ts new file mode 100644 index 00000000000..2ef3fa89fc1 --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/themed-settings.ts @@ -0,0 +1 @@ +export * from '@uifabricshared/themed-settings'; diff --git a/packages/libraries/fluentui-react-native/src/themed-stylesheet.ts b/packages/libraries/fluentui-react-native/src/themed-stylesheet.ts new file mode 100644 index 00000000000..dfd93b63107 --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/themed-stylesheet.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/themed-stylesheet'; diff --git a/packages/libraries/fluentui-react-native/src/theming-ramp.ts b/packages/libraries/fluentui-react-native/src/theming-ramp.ts new file mode 100644 index 00000000000..90fa5dabe0c --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/theming-ramp.ts @@ -0,0 +1 @@ +export * from '@uifabricshared/theming-ramp'; diff --git a/packages/libraries/fluentui-react-native/src/theming-react-native.ts b/packages/libraries/fluentui-react-native/src/theming-react-native.ts new file mode 100644 index 00000000000..355877e577a --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/theming-react-native.ts @@ -0,0 +1 @@ +export * from '@uifabricshared/theming-react-native'; diff --git a/packages/libraries/fluentui-react-native/src/theming-utils.ts b/packages/libraries/fluentui-react-native/src/theming-utils.ts new file mode 100644 index 00000000000..a1f2e6e1da0 --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/theming-utils.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/theming-utils'; diff --git a/packages/libraries/fluentui-react-native/src/theming.ts b/packages/libraries/fluentui-react-native/src/theming.ts index f1c4957e34c..2c2f323fc45 100644 --- a/packages/libraries/fluentui-react-native/src/theming.ts +++ b/packages/libraries/fluentui-react-native/src/theming.ts @@ -1,3 +1,4 @@ +// @ts-nocheck — Category barrels re-export overlapping packages that share symbols, causing TS2308 duplicate export errors. export * from '@fluentui-react-native/android-theme'; export * from '@fluentui-react-native/apple-theme'; export * from '@fluentui-react-native/default-theme'; diff --git a/packages/libraries/fluentui-react-native/src/tokens.ts b/packages/libraries/fluentui-react-native/src/tokens.ts new file mode 100644 index 00000000000..4c99aba7568 --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/tokens.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/tokens'; diff --git a/packages/libraries/fluentui-react-native/src/tooltip.ts b/packages/libraries/fluentui-react-native/src/tooltip.ts new file mode 100644 index 00000000000..faccdd315d5 --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/tooltip.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/tooltip'; diff --git a/packages/libraries/fluentui-react-native/src/use-slot.ts b/packages/libraries/fluentui-react-native/src/use-slot.ts new file mode 100644 index 00000000000..a7d9b607163 --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/use-slot.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/use-slot'; diff --git a/packages/libraries/fluentui-react-native/src/use-slots.ts b/packages/libraries/fluentui-react-native/src/use-slots.ts new file mode 100644 index 00000000000..e8fd6121a27 --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/use-slots.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/use-slots'; diff --git a/packages/libraries/fluentui-react-native/src/use-styling.ts b/packages/libraries/fluentui-react-native/src/use-styling.ts new file mode 100644 index 00000000000..dc2ecb8ec58 --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/use-styling.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/use-styling'; diff --git a/packages/libraries/fluentui-react-native/src/use-tokens.ts b/packages/libraries/fluentui-react-native/src/use-tokens.ts new file mode 100644 index 00000000000..ae1c4b6f975 --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/use-tokens.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/use-tokens'; diff --git a/packages/libraries/fluentui-react-native/src/utils.ts b/packages/libraries/fluentui-react-native/src/utils.ts index e5c4f91154f..123b48ec3c1 100644 --- a/packages/libraries/fluentui-react-native/src/utils.ts +++ b/packages/libraries/fluentui-react-native/src/utils.ts @@ -1,3 +1,4 @@ +// @ts-nocheck — Category barrels re-export overlapping packages that share symbols, causing TS2308 duplicate export errors. export * from '@fluentui-react-native/adapters'; export * from '@fluentui-react-native/interactive-hooks'; export * from '@fluentui-react-native/styling-utils'; diff --git a/packages/libraries/fluentui-react-native/src/vibrancy-view.ts b/packages/libraries/fluentui-react-native/src/vibrancy-view.ts new file mode 100644 index 00000000000..4ea1b391055 --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/vibrancy-view.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/vibrancy-view'; diff --git a/packages/libraries/fluentui-react-native/src/win32-theme.ts b/packages/libraries/fluentui-react-native/src/win32-theme.ts new file mode 100644 index 00000000000..416ae2f3cf4 --- /dev/null +++ b/packages/libraries/fluentui-react-native/src/win32-theme.ts @@ -0,0 +1 @@ +export * from '@fluentui-react-native/win32-theme'; diff --git a/packages/libraries/fluentui-react-native/tsconfig.json b/packages/libraries/fluentui-react-native/tsconfig.json new file mode 100644 index 00000000000..eab7dbaea1e --- /dev/null +++ b/packages/libraries/fluentui-react-native/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "@fluentui-react-native/scripts/configs/tsconfig.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["src"] +} diff --git a/packages/libraries/fluentui-react-native/update-exports.mts b/packages/libraries/fluentui-react-native/update-exports.mts index a61b697a833..58cc9ed983f 100644 --- a/packages/libraries/fluentui-react-native/update-exports.mts +++ b/packages/libraries/fluentui-react-native/update-exports.mts @@ -1,20 +1,17 @@ /** * Auto-generates subpath exports for the fluentui-react-native mono-package. * - * Source layout (checked into git): + * All generated files live in src/ (checked into git): * src/components.ts — category barrel re-exporting all stable component packages * src/experimental.ts — category barrel re-exporting all experimental packages * src/core.ts — category barrel re-exporting framework packages * src/theming.ts — category barrel re-exporting theme packages * src/utils.ts — category barrel re-exporting utility packages * src/deprecated.ts — category barrel re-exporting legacy @uifabricshared packages - * - * Build output (generated into lib/, gitignored): - * lib/.js + .d.ts — compiled from src/ barrels - * lib/.js + .d.ts — individual re-export for each package + * src/.ts — individual re-export for each package (e.g. src/button.ts) * * Usage: - * node update-exports.mts # Generate/update src/, lib/, and package.json + * node update-exports.mts # Generate/update src/ and package.json * node update-exports.mts --check # Verify src/ and package.json are up-to-date (CI mode) */ @@ -26,7 +23,6 @@ import { getAllPackageJsonFiles } from 'workspace-tools'; const SCRIPT_DIR = import.meta.dirname; const REPO_ROOT = join(SCRIPT_DIR, '..', '..', '..'); const SRC_DIR = join(SCRIPT_DIR, 'src'); -const LIB_DIR = join(SCRIPT_DIR, 'lib'); const PKG_JSON_PATH = join(SCRIPT_DIR, 'package.json'); /** Category definitions — maps a directory prefix to a category barrel name. */ @@ -85,9 +81,7 @@ function discoverPackages(): SubpathEntry[] { const subpath = deriveSubpath(manifest.name); if (seenSubpaths.has(subpath)) { - throw new Error( - `Subpath collision: "${subpath}" is mapped by both "${seenSubpaths.get(subpath)}" and "${manifest.name}"`, - ); + throw new Error(`Subpath collision: "${subpath}" is mapped by both "${seenSubpaths.get(subpath)}" and "${manifest.name}"`); } seenSubpaths.set(subpath, manifest.name); @@ -97,9 +91,7 @@ function discoverPackages(): SubpathEntry[] { const barrelNames = new Set(CATEGORIES.map((c) => c.barrel)); for (const entry of entries) { if (barrelNames.has(entry.subpath)) { - throw new Error( - `Subpath "${entry.subpath}" (from ${entry.packageName}) collides with category barrel name "${entry.subpath}"`, - ); + throw new Error(`Subpath "${entry.subpath}" (from ${entry.packageName}) collides with category barrel name "${entry.subpath}"`); } } @@ -119,64 +111,50 @@ function groupByCategory(entries: SubpathEntry[]): Map { // ── Expected state builders ──────────────────────────────────────────────────── -/** Build the expected src/ files (category barrels only — checked into git). */ -function generateSrcFiles(barrels: Map): Map { +/** Build all expected src/ files (category barrels + individual subpath re-exports). */ +function generateSrcFiles(entries: SubpathEntry[], barrels: Map): Map { const files = new Map(); + + // Category barrels — @ts-nocheck because aggregating overlapping packages causes TS2308 for (const [barrelName, barrelEntries] of [...barrels].sort(([a], [b]) => a.localeCompare(b))) { const lines = barrelEntries.map((e) => `export * from '${e.packageName}';`); - files.set(`${barrelName}.ts`, lines.join('\n') + '\n'); + const header = '// @ts-nocheck — Category barrels re-export overlapping packages that share symbols, causing TS2308 duplicate export errors.\n'; + files.set(`${barrelName}.ts`, header + lines.join('\n') + '\n'); } - return files; -} - -/** Build the expected lib/ files (category barrels + individual subpaths). */ -function generateLibFiles(entries: SubpathEntry[], barrels: Map): Map { - const files = new Map(); // Individual subpath files for (const { subpath, packageName } of entries) { - const reexport = `export * from '${packageName}';\n`; - files.set(`${subpath}.js`, reexport); - files.set(`${subpath}.d.ts`, reexport); - } - - // Category barrel files - for (const [barrelName, barrelEntries] of barrels) { - const reexport = barrelEntries.map((e) => `export * from '${e.packageName}';`).join('\n') + '\n'; - files.set(`${barrelName}.js`, reexport); - files.set(`${barrelName}.d.ts`, reexport); + files.set(`${subpath}.ts`, `export * from '${packageName}';\n`); } return files; } -/** Build the package.json "exports" map. */ +/** Build the package.json "exports" map — all subpaths point to src/. */ function generateExports(entries: SubpathEntry[], barrels: Map): Record> { const exports: Record> = {}; - // Category barrels (have source files in src/) + // Category barrels for (const barrel of [...barrels.keys()].sort()) { exports[`./${barrel}`] = { - types: `./lib/${barrel}.d.ts`, - import: `./lib/${barrel}.js`, default: `./src/${barrel}.ts`, }; } - // Individual subpaths (lib-only, no src/ file) + // Individual subpaths for (const { subpath } of entries) { exports[`./${subpath}`] = { - types: `./lib/${subpath}.d.ts`, - import: `./lib/${subpath}.js`, + default: `./src/${subpath}.ts`, }; } return exports; } -/** Build the package.json "dependencies" map. */ +/** Build the package.json "dependencies" map (sorted by package name for oxfmt compatibility). */ function generateDependencies(entries: SubpathEntry[]): Record { const deps: Record = {}; - for (const { packageName } of entries) { + const sorted = [...entries].sort((a, b) => a.packageName.localeCompare(b.packageName)); + for (const { packageName } of sorted) { deps[packageName] = 'workspace:*'; } return deps; @@ -191,8 +169,7 @@ const entries = discoverPackages(); const barrels = groupByCategory(entries); console.log(`Found ${entries.length} packages in ${barrels.size} categories`); -const expectedSrcFiles = generateSrcFiles(barrels); -const expectedLibFiles = generateLibFiles(entries, barrels); +const expectedSrcFiles = generateSrcFiles(entries, barrels); const expectedExports = generateExports(entries, barrels); const expectedDeps = generateDependencies(entries); @@ -249,19 +226,12 @@ if (isCheck) { // ── Write mode ───────────────────────────────────────────────────────────────── -if (diffs.length === 0 && !isCheck) { - // Even if src/ + package.json are in sync, always regenerate lib/ (this is the build) -} - -// Ensure directories exist +// Ensure src/ exists if (!existsSync(SRC_DIR)) { mkdirSync(SRC_DIR, { recursive: true }); } -if (!existsSync(LIB_DIR)) { - mkdirSync(LIB_DIR, { recursive: true }); -} -// Write src/ files (category barrels) +// Write src/ files (category barrels + individual subpaths) for (const [relPath, content] of expectedSrcFiles) { writeFileSync(join(SRC_DIR, relPath), content); } @@ -276,28 +246,14 @@ for (const entry of readdirSync(SRC_DIR, { withFileTypes: true })) { } } -// Write lib/ files (category barrels + individual subpaths) -for (const [relPath, content] of expectedLibFiles) { - writeFileSync(join(LIB_DIR, relPath), content); -} - -// Clean stale lib/ files -for (const entry of readdirSync(LIB_DIR, { withFileTypes: true })) { - if (entry.isDirectory()) { - rmSync(join(LIB_DIR, entry.name), { recursive: true }); - } else if (entry.isFile() && !expectedLibFiles.has(entry.name)) { - rmSync(join(LIB_DIR, entry.name)); - console.log(` Removed stale: lib/${entry.name}`); - } -} - // Update package.json pkgJson.exports = expectedExports; pkgJson.dependencies = expectedDeps; writeFileSync(PKG_JSON_PATH, JSON.stringify(pkgJson, null, 2) + '\n'); // Print summary -console.log(`\n✅ Generated ${barrels.size} src/ barrels + ${expectedLibFiles.size / 2} lib/ subpaths\n`); +const numSubpaths = entries.length + barrels.size; +console.log(`\n✅ Generated ${numSubpaths} src/ files (${barrels.size} barrels + ${entries.length} individual)\n`); for (const [barrelName, barrelEntries] of [...barrels].sort(([a], [b]) => a.localeCompare(b))) { console.log(` ./${barrelName} (${barrelEntries.length} packages)`); } From 38fff8e7ee8229560ec41c3a934212aea06c0312 Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Wed, 11 Mar 2026 22:17:24 -0700 Subject: [PATCH 6/7] delete --- .../fluentui-react-native/create-pr.sh | 63 ------------------- 1 file changed, 63 deletions(-) delete mode 100644 packages/libraries/fluentui-react-native/create-pr.sh diff --git a/packages/libraries/fluentui-react-native/create-pr.sh b/packages/libraries/fluentui-react-native/create-pr.sh deleted file mode 100644 index bfa250ea31e..00000000000 --- a/packages/libraries/fluentui-react-native/create-pr.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash -# Push branch and create PR for the unified mono-package. -# Run from the repo root. - -set -euo pipefail - -BRANCH="feat/unified-mono-package" -TITLE="feat: Add unified fluentui-react-native mono-package with subpath exports" - -BODY='## Summary - -Adds a new `fluentui-react-native` package that re-exports every publishable package in the monorepo via [subpath exports](https://nodejs.org/api/packages.html#subpath-exports). Consumers can depend on a single package and import from any component: - -```ts -// Individual subpaths (1:1 with @fluentui-react-native/* packages) -import { Button } from '\''fluentui-react-native/button'\''; -import { ThemeProvider } from '\''fluentui-react-native/theme'\''; - -// Category barrels for convenience -import { Button, Avatar, Menu } from '\''fluentui-react-native/components'\''; -import { ThemeProvider } from '\''fluentui-react-native/core'\''; -``` - -The existing `@fluentui-react-native/*` packages are unchanged — this is purely additive. - -## What'\''s included - -- **70 individual subpath exports** — one per publishable package -- **6 category barrels** — `./components` (25), `./experimental` (17), `./core` (9), `./theming` (7), `./deprecated` (8), `./utils` (4) -- **ESM-only**, `sideEffects: false`, fully tree-shakeable -- **Auto-generation script** (`update-exports.mts`) discovers packages and generates exports, with `--check` mode for CI enforcement -- **CI enforcement** via `check-exports` task in the `buildci` pipeline - -## New files - -| File | Purpose | -|------|---------| -| `packages/libraries/fluentui-react-native/package.json` | Manifest with 76 subpath exports | -| `packages/libraries/fluentui-react-native/update-exports.mts` | Script to generate src/, lib/, and sync package.json | -| `packages/libraries/fluentui-react-native/src/*.ts` | 6 category barrel source files (checked in) | -| `packages/libraries/fluentui-react-native/README.md` | Usage, migration guide, and full subpath catalog | - -## Infrastructure changes - -| File | Change | -|------|--------| -| `lage.config.mjs` | Added `check-exports` task to `buildci` pipeline | -| `scripts/src/tasks/lintPackage.ts` | Skip `"."` export validation for subpath-only packages; skip `default` entry enforcement when source file doesn'\''t exist | -| `scripts/src/utils/buildConfig.ts` | Suppress CJS build for `type: "module"` packages without `main` | - -## How it works - -`yarn build` runs `update-exports.mts` which: -1. Scans the monorepo for all publishable packages -2. Writes 6 category barrel `.ts` files to `src/` (checked in, human-readable) -3. Generates `lib/*.js` + `lib/*.d.ts` directly (70 individual + 6 barrel = 76 pairs) -4. Updates `package.json` exports and dependencies fields - -`yarn check-exports` (CI) verifies `src/` and `package.json` stay in sync — if a new package is added to the monorepo, the build will fail until `yarn update-exports` is run.' - -# Push and create PR -git push -u origin "$BRANCH" -gh pr create --title "$TITLE" --body "$BODY" --base main From ccb94877e12a142e2a8865425acb03c244b36777 Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Wed, 11 Mar 2026 23:16:20 -0700 Subject: [PATCH 7/7] get `yarn lage buildci` to pass --- apps/fluent-tester/package.json | 8 +- apps/fluent-tester/tsconfig.json | 2 + .../{babel.config.js => babel.config.cjs} | 0 .../{eslint.config.js => eslint.config.cjs} | 0 apps/tester-core/package.json | 8 +- .../TestComponents/Callout/CalloutTest.tsx | 4 +- .../Shadow/ShadowDepthTestSection.tsx | 9 +- apps/tester-core/src/TestComponents/Test.tsx | 4 +- apps/tester-core/tsconfig.json | 2 + apps/win32-81/package.json | 3 - apps/win32-81/tsconfig.json | 4 + apps/win32/package.json | 3 - apps/win32/tsconfig.json | 4 + .../src/transforms/migrate-package-json.ts | 6 +- .../src/transforms/migrate-to-mono-package.ts | 598 +++++++++--------- .../libraries/fluentui-react-native/README.md | 21 +- .../fluentui-react-native/update-exports.mts | 3 +- scripts/src/utils/buildConfig.ts | 5 +- yarn.lock | 1 - 19 files changed, 347 insertions(+), 338 deletions(-) rename apps/tester-core/{babel.config.js => babel.config.cjs} (100%) rename apps/tester-core/{eslint.config.js => eslint.config.cjs} (100%) diff --git a/apps/fluent-tester/package.json b/apps/fluent-tester/package.json index 6fdc31d99f1..0ef9a31f6c2 100644 --- a/apps/fluent-tester/package.json +++ b/apps/fluent-tester/package.json @@ -10,8 +10,6 @@ "url": "https://github.com/microsoft/fluentui-react-native.git", "directory": "apps/fluent-tester" }, - "main": "lib-commonjs/index.js", - "module": "lib/index.js", "types": "lib/index.d.ts", "exports": { ".": { @@ -24,7 +22,6 @@ "scripts": { "android": "rnx-cli run --platform android", "build": "fluentui-scripts build", - "build-cjs": "tsgo --outDir lib-commonjs", "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "bundle": "rnx-cli bundle --dev false", "bundle:android": "rnx-cli bundle --dev false --platform android", @@ -44,7 +41,6 @@ "dependencies": { "@types/node": "catalog:", "@types/react": "~18.2.0", - "fluentui-react-native": "workspace:*", "react": "18.2.0", "react-native": "^0.74.0", "react-native-macos": "^0.74.0", @@ -94,9 +90,7 @@ }, "furn": { "depcheck": { - "ignoreMatches": [ - "@fluentui-react-native/experimental-expander" - ] + "ignoreMatches": [] } }, "rnx-kit": { diff --git a/apps/fluent-tester/tsconfig.json b/apps/fluent-tester/tsconfig.json index b59c5d96d66..7c69f556dd3 100644 --- a/apps/fluent-tester/tsconfig.json +++ b/apps/fluent-tester/tsconfig.json @@ -2,6 +2,8 @@ "extends": "@fluentui-react-native/scripts/configs/tsconfig.json", "compilerOptions": { "outDir": "lib", + "module": "esnext", + "moduleResolution": "bundler", "allowSyntheticDefaultImports": true, "types": ["@types/jasmine", "@wdio/globals/types", "@wdio/jasmine-framework", "node"] }, diff --git a/apps/tester-core/babel.config.js b/apps/tester-core/babel.config.cjs similarity index 100% rename from apps/tester-core/babel.config.js rename to apps/tester-core/babel.config.cjs diff --git a/apps/tester-core/eslint.config.js b/apps/tester-core/eslint.config.cjs similarity index 100% rename from apps/tester-core/eslint.config.js rename to apps/tester-core/eslint.config.cjs diff --git a/apps/tester-core/package.json b/apps/tester-core/package.json index c17f7a9cd9d..18b80759181 100644 --- a/apps/tester-core/package.json +++ b/apps/tester-core/package.json @@ -1,7 +1,6 @@ { "name": "@fluentui-react-native/tester-core", "version": "0.1.0", - "type": "module", "private": true, "description": "Core implementation of the fluent tester app", "homepage": "https://github.com/microsoft/fluentui-react-native", @@ -12,6 +11,7 @@ "url": "https://github.com/microsoft/fluentui-react-native.git", "directory": "apps/fluent-tester-core" }, + "type": "module", "types": "lib/index.d.ts", "exports": { ".": { @@ -22,7 +22,7 @@ }, "scripts": { "build": "fluentui-scripts build", - "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "format": "fluentui-scripts format", @@ -109,9 +109,7 @@ }, "furn": { "depcheck": { - "ignoreMatches": [ - "@fluentui-react-native/experimental-expander" - ] + "ignoreMatches": [] } }, "rnx-kit": { diff --git a/apps/tester-core/src/TestComponents/Callout/CalloutTest.tsx b/apps/tester-core/src/TestComponents/Callout/CalloutTest.tsx index 7f94be35537..a115a900b21 100644 --- a/apps/tester-core/src/TestComponents/Callout/CalloutTest.tsx +++ b/apps/tester-core/src/TestComponents/Callout/CalloutTest.tsx @@ -404,14 +404,14 @@ const StandardCallout: React.FunctionComponent = () => { ) : ( //else - ( + - ) + )} diff --git a/apps/tester-core/src/TestComponents/Shadow/ShadowDepthTestSection.tsx b/apps/tester-core/src/TestComponents/Shadow/ShadowDepthTestSection.tsx index 98b1897ca10..51f2f3f3af5 100644 --- a/apps/tester-core/src/TestComponents/Shadow/ShadowDepthTestSection.tsx +++ b/apps/tester-core/src/TestComponents/Shadow/ShadowDepthTestSection.tsx @@ -77,7 +77,10 @@ export const ShadowDepthTestSection: React.FunctionComponent = () => { function getShadowDescription(shadowToken: ShadowToken): string { const shadowStyle = getShadowTokenStyleSet(shadowToken); - return ('\nAmbient: ' + - JSON.stringify(shadowStyle.ambient, undefined, ' ').split('\n').join('').replace(/['"]+/g, '') + - '\n\nKey: ' + JSON.stringify(shadowStyle.key, undefined, ' ').split('\n').join('').replace(/['"]+/g, '')); + return ( + '\nAmbient: ' + + JSON.stringify(shadowStyle.ambient, undefined, ' ').split('\n').join('').replace(/['"]+/g, '') + + '\n\nKey: ' + + JSON.stringify(shadowStyle.key, undefined, ' ').split('\n').join('').replace(/['"]+/g, '') + ); } diff --git a/apps/tester-core/src/TestComponents/Test.tsx b/apps/tester-core/src/TestComponents/Test.tsx index 4c7a860cc69..05f3fce6388 100644 --- a/apps/tester-core/src/TestComponents/Test.tsx +++ b/apps/tester-core/src/TestComponents/Test.tsx @@ -169,7 +169,7 @@ export const Test = (props: TestProps): React.ReactElement {e2eSections && showE2E && ( // We can check if the E2E section renders by checking if the "E2E Tests" header has rendered for each spec - (<> + <> E2E Tests @@ -180,7 +180,7 @@ export const Test = (props: TestProps): React.ReactElement const { component: E2EComponent } = section; return ; })} - ) + )} {props.description} diff --git a/apps/tester-core/tsconfig.json b/apps/tester-core/tsconfig.json index b59c5d96d66..7c69f556dd3 100644 --- a/apps/tester-core/tsconfig.json +++ b/apps/tester-core/tsconfig.json @@ -2,6 +2,8 @@ "extends": "@fluentui-react-native/scripts/configs/tsconfig.json", "compilerOptions": { "outDir": "lib", + "module": "esnext", + "moduleResolution": "bundler", "allowSyntheticDefaultImports": true, "types": ["@types/jasmine", "@wdio/globals/types", "@wdio/jasmine-framework", "node"] }, diff --git a/apps/win32-81/package.json b/apps/win32-81/package.json index 078f4d5d1ad..4f27693c7d2 100644 --- a/apps/win32-81/package.json +++ b/apps/win32-81/package.json @@ -8,8 +8,6 @@ "url": "https://github.com/microsoft/fluentui-react-native.git", "directory": "apps/win32" }, - "main": "lib-commonjs/index.js", - "module": "lib/index.js", "types": "lib/index.d.ts", "exports": { ".": { @@ -21,7 +19,6 @@ }, "scripts": { "build": "fluentui-scripts build", - "build-cjs": "tsgo --outDir lib-commonjs", "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "bundle": "rnx-cli bundle --dev false", "bundle-dev": "rnx-cli bundle", diff --git a/apps/win32-81/tsconfig.json b/apps/win32-81/tsconfig.json index 2c7e2516f60..7e1a1568019 100644 --- a/apps/win32-81/tsconfig.json +++ b/apps/win32-81/tsconfig.json @@ -1,4 +1,8 @@ { "extends": "@fluentui-react-native/scripts/configs/tsconfig.json", + "compilerOptions": { + "module": "esnext", + "moduleResolution": "bundler" + }, "include": ["src"] } diff --git a/apps/win32/package.json b/apps/win32/package.json index 59b7566ee67..39bbfd99428 100644 --- a/apps/win32/package.json +++ b/apps/win32/package.json @@ -8,8 +8,6 @@ "url": "https://github.com/microsoft/fluentui-react-native.git", "directory": "apps/win32" }, - "main": "lib-commonjs/index.js", - "module": "lib/index.js", "types": "lib/index.d.ts", "exports": { ".": { @@ -21,7 +19,6 @@ }, "scripts": { "build": "fluentui-scripts build", - "build-cjs": "tsgo --outDir lib-commonjs", "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "bundle": "rnx-cli bundle --dev false", "bundle-dev": "rnx-cli bundle", diff --git a/apps/win32/tsconfig.json b/apps/win32/tsconfig.json index 2c7e2516f60..7e1a1568019 100644 --- a/apps/win32/tsconfig.json +++ b/apps/win32/tsconfig.json @@ -1,4 +1,8 @@ { "extends": "@fluentui-react-native/scripts/configs/tsconfig.json", + "compilerOptions": { + "module": "esnext", + "moduleResolution": "bundler" + }, "include": ["src"] } diff --git a/packages/codemods/src/transforms/migrate-package-json.ts b/packages/codemods/src/transforms/migrate-package-json.ts index 29813da9204..36acdc46dbd 100644 --- a/packages/codemods/src/transforms/migrate-package-json.ts +++ b/packages/codemods/src/transforms/migrate-package-json.ts @@ -39,11 +39,7 @@ interface MigrateResult { * @param dryRun - If true, prints changes without writing * @returns Summary of changes */ -export function migratePackageJson( - packageJsonPath: string, - version = 'workspace:*', - dryRun = false, -): MigrateResult { +export function migratePackageJson(packageJsonPath: string, version = 'workspace:*', dryRun = false): MigrateResult { if (!existsSync(packageJsonPath)) { throw new Error(`package.json not found: ${packageJsonPath}`); } diff --git a/packages/codemods/src/transforms/migrate-to-mono-package.ts b/packages/codemods/src/transforms/migrate-to-mono-package.ts index ccd4612cc71..5212bccdc0c 100644 --- a/packages/codemods/src/transforms/migrate-to-mono-package.ts +++ b/packages/codemods/src/transforms/migrate-to-mono-package.ts @@ -7,304 +7,304 @@ import { BARREL_PACKAGE, MONO_PACKAGE_NAME, MONO_PACKAGE_SUBPATHS } from './mono * Generated from packages/libraries/core/src/index.ts. */ const BARREL_EXPORT_MAP: Record = { - "Body1": "text", - "Body1Strong": "text", - "Body2": "text", - "Body2Strong": "text", - "buildRootStyles": "persona-coin", - "Button": "button", - "ButtonAppearance": "button", - "ButtonCoreProps": "button", - "ButtonCoreTokens": "button", - "ButtonInfo": "button", - "buttonLookup": "button", - "buttonName": "button", - "buttonNameV1": "button", - "ButtonProps": "button", - "ButtonShape": "button", - "ButtonSize": "button", - "ButtonSlotProps": "button", - "ButtonTokens": "button", - "ButtonType": "button", - "ButtonV1": "button", - "Callout": "callout", - "calloutName": "callout", - "CalloutNativeCommands": "callout", - "Caption1": "text", - "Caption1Strong": "text", - "Caption2": "text", - "Checkbox": "checkbox", - "CheckboxInfo": "checkbox", - "checkboxName": "checkbox", - "checkboxNameV1": "checkbox", - "CheckboxProps": "checkbox", - "CheckboxShape": "checkbox", - "CheckboxSize": "checkbox", - "CheckboxSlotProps": "checkbox", - "CheckboxState": "checkbox", - "CheckboxTokens": "checkbox", - "CheckboxType": "checkbox", - "CheckboxV1": "checkbox", - "CMContext": "contextual-menu", - "CompoundButton": "button", - "compoundButtonName": "button", - "CompoundButtonProps": "button", - "CompoundButtonSlotProps": "button", - "CompoundButtonTokens": "button", - "CompoundButtonType": "button", - "ContextualMenu": "contextual-menu", - "ContextualMenuContext": "contextual-menu", - "ContextualMenuItem": "contextual-menu", - "contextualMenuItemName": "contextual-menu", - "ContextualMenuItemProps": "contextual-menu", - "ContextualMenuItemRenderData": "contextual-menu", - "ContextualMenuItemSlotProps": "contextual-menu", - "ContextualMenuItemState": "contextual-menu", - "ContextualMenuItemTokens": "contextual-menu", - "ContextualMenuItemType": "contextual-menu", - "contextualMenuName": "contextual-menu", - "ContextualMenuProps": "contextual-menu", - "ContextualMenuRenderData": "contextual-menu", - "ContextualMenuSlotProps": "contextual-menu", - "ContextualMenuState": "contextual-menu", - "ContextualMenuTokens": "contextual-menu", - "ContextualMenuType": "contextual-menu", - "defaultLinkTokens": "link", - "DirectionalHint": "callout", - "DismissBehaviors": "callout", - "Display": "text", - "FAB": "button", - "fabName": "button", - "FABProps": "button", - "FABSize": "button", - "FABSlotProps": "button", - "FABTokens": "button", - "FABType": "button", - "filterOutComponentRef": "focus-trap-zone", - "FocusTrapZone": "focus-trap-zone", - "FocusZone": "focus-zone", - "FocusZoneDirection": "focus-zone", - "focusZoneName": "focus-zone", - "FocusZoneProps": "focus-zone", - "FocusZoneRenderData": "focus-zone", - "FocusZoneSlotProps": "focus-zone", - "FocusZoneState": "focus-zone", - "FocusZoneTabNavigation": "focus-zone", - "FocusZoneTokens": "focus-zone", - "FocusZoneType": "focus-zone", - "getAccessibilityState": "interactive-hooks", - "getFocusBorderStyle": "button", - "IButtonInfo": "button", - "IButtonProps": "button", - "IButtonRenderData": "button", - "IButtonSlotProps": "button", - "IButtonState": "button", - "IButtonTokens": "button", - "IButtonType": "button", - "ICalloutProps": "callout", - "ICalloutRenderData": "callout", - "ICalloutSlotProps": "callout", - "ICalloutTokens": "callout", - "ICallotType": "callout", - "ICheckboxProps": "checkbox", - "ICheckboxRenderData": "checkbox", - "ICheckboxSlotProps": "checkbox", - "ICheckboxState": "checkbox", - "ICheckboxTokens": "checkbox", - "ICheckboxType": "checkbox", - "IChildAsFunction": "pressable", - "IconAlignment": "persona-coin", - "IFocusable": "interactive-hooks", - "IFocusState": "interactive-hooks", - "IFocusTrapZoneProps": "focus-trap-zone", - "IFocusTrapZoneSlotProps": "focus-trap-zone", - "IFocusTrapZoneType": "focus-trap-zone", - "IHoverState": "interactive-hooks", - "ILinkHooks": "link", - "ILinkInfo": "link", - "ILinkOptions": "link", - "ILinkProps": "link", - "ILinkRenderData": "link", - "ILinkSlotProps": "link", - "ILinkState": "link", - "ILinkTokens": "link", - "ILinkType": "link", - "InteractionEvent": "interactive-hooks", - "IPersonaCoinProps": "persona-coin", - "IPersonaCoinRenderData": "persona-coin", - "IPersonaCoinSlotProps": "persona-coin", - "IPersonaCoinState": "persona-coin", - "IPersonaCoinTokens": "persona-coin", - "IPersonaCoinType": "persona-coin", - "IPersonaConfigurableProps": "persona-coin", - "IPersonaProps": "persona", - "IPersonaRenderData": "persona", - "IPersonaSlotProps": "persona", - "IPersonaState": "persona", - "IPersonaTokens": "persona", - "IPersonaType": "persona", - "IPressableHooks": "interactive-hooks", - "IPressableOptions": "interactive-hooks", - "IPressableProps": "pressable", - "IPressableState": "interactive-hooks", - "IPressableType": "pressable", - "IPressState": "interactive-hooks", - "IRadioButtonProps": "radio-group", - "IRadioButtonRenderData": "radio-group", - "IRadioButtonSlotProps": "radio-group", - "IRadioButtonTokens": "radio-group", - "IRadioButtonType": "radio-group", - "IRadioGroupContext": "radio-group", - "IRadioGroupProps": "radio-group", - "IRadioGroupRenderData": "radio-group", - "IRadioGroupSlotProps": "radio-group", - "IRadioGroupState": "radio-group", - "IRadioGroupTokens": "radio-group", - "IRadioGroupType": "radio-group", - "IRenderChild": "pressable", - "IRenderStyle": "pressable", - "isAccessibilityActionEvent": "interactive-hooks", - "isGestureResponderEvent": "interactive-hooks", - "isKeyPressEvent": "interactive-hooks", - "isMouseEvent": "interactive-hooks", - "ITextProps": "text", - "ITextType": "text", - "IWithLinkOptions": "link", - "IWithPressableEvents": "interactive-hooks", - "IWithPressableOptions": "interactive-hooks", - "KeyCallback": "interactive-hooks", - "KeyPressEvent": "interactive-hooks", - "LargeTitle": "text", - "Link": "link", - "LinkAppearance": "link", - "linkLookup": "link", - "linkName": "link", - "linkNameV1": "link", - "LinkProps": "link", - "LinkSlotProps": "link", - "LinkState": "link", - "linkStates": "link", - "linkStylingSettings": "link", - "LinkTokens": "link", - "LinkType": "link", - "LinkV1": "link", - "MenuButton": "menu-button", - "MenuButtonContext": "menu-button", - "MenuButtonItemProps": "menu-button", - "MenuButtonName": "menu-button", - "MenuButtonProps": "menu-button", - "MenuButtonRenderData": "menu-button", - "MenuButtonSlotProps": "menu-button", - "MenuButtonState": "menu-button", - "MenuButtonTokens": "menu-button", - "MenuButtonType": "menu-button", - "NativeProps": "focus-zone", - "NavigateAtEnd": "focus-zone", - "OnChangeCallback": "interactive-hooks", - "onKeySelectCallback": "interactive-hooks", - "OnPressCallback": "interactive-hooks", - "OnPressWithFocusCallback": "interactive-hooks", - "OnToggleCallback": "interactive-hooks", - "Persona": "persona", - "PersonaCoin": "persona-coin", - "PersonaCoinColor": "persona-coin", - "PersonaCoinFluentColor": "persona-coin", - "personaCoinName": "persona-coin", - "personaName": "persona", - "PersonaPresence": "persona-coin", - "PersonaSize": "persona-coin", - "preferKeyDownForKeyEvents": "interactive-hooks", - "Pressable": "pressable", - "PressableFocusProps": "interactive-hooks", - "PressableHoverProps": "interactive-hooks", - "PressablePressProps": "interactive-hooks", - "PressablePropsExtended": "interactive-hooks", - "PrimaryButton": "button", - "RadioButton": "radio-group", - "radioButtonName": "radio-group", - "RadioGroup": "radio-group", - "RadioGroupContext": "radio-group", - "radioGroupName": "radio-group", - "RestoreFocusEvent": "callout", - "RingConfig": "persona-coin", - "RingThickness": "persona-coin", - "Separator": "separator", - "separatorName": "separator", - "SeparatorProps": "separator", - "SeparatorTokens": "separator", - "SeparatorType": "separator", - "StealthButton": "button", - "Submenu": "contextual-menu", - "SubmenuItem": "contextual-menu", - "submenuItemName": "contextual-menu", - "SubmenuItemProps": "contextual-menu", - "SubmenuItemRenderData": "contextual-menu", - "SubmenuItemSlotProps": "contextual-menu", - "SubmenuItemState": "contextual-menu", - "SubmenuItemTokens": "contextual-menu", - "SubmenuItemType": "contextual-menu", - "submenuName": "contextual-menu", - "SubmenuProps": "contextual-menu", - "SubmenuRenderData": "contextual-menu", - "SubmenuSlotProps": "contextual-menu", - "SubmenuState": "contextual-menu", - "SubmenuTokens": "contextual-menu", - "SubmenuType": "contextual-menu", - "Subtitle1": "text", - "Subtitle1Strong": "text", - "Subtitle2": "text", - "Subtitle2Strong": "text", - "Tab": "tablist", - "TabInfo": "tablist", - "TabList": "tablist", - "TabListInfo": "tablist", - "tabListName": "tablist", - "TabListProps": "tablist", - "TabListSlotProps": "tablist", - "TabListState": "tablist", - "TabListTokens": "tablist", - "TabListType": "tablist", - "tabName": "tablist", - "TabProps": "tablist", - "TabSlotProps": "tablist", - "TabState": "tablist", - "TabTokens": "tablist", - "TabType": "tablist", - "Text": "text", - "textName": "text", - "textNameV1": "text", - "TextProps": "text", - "TextTokens": "text", - "TextV1": "text", - "Title1": "text", - "Title1Strong": "text", - "Title2": "text", - "Title3": "text", - "ToggleButton": "button", - "ToggleButtonInfo": "button", - "toggleButtonName": "button", - "ToggleButtonProps": "button", - "ToggleButtonSlotProps": "button", - "ToggleButtonTokens": "button", - "ToggleButtonType": "button", - "useAsLink": "link", - "useAsPressable": "interactive-hooks", - "useAsToggle": "interactive-hooks", - "useButton": "button", - "useCheckbox": "checkbox", - "useFocusState": "interactive-hooks", - "useHoverState": "interactive-hooks", - "useKeyDownProps": "interactive-hooks", - "useKeyProps": "interactive-hooks", - "useKeyUpProps": "interactive-hooks", - "useLink": "link", - "useOnPressWithFocus": "interactive-hooks", - "usePressability": "interactive-hooks", - "usePressableState": "interactive-hooks", - "usePressState": "interactive-hooks", - "useSelectedKey": "interactive-hooks", - "useToggleButton": "button", - "useViewCommandFocus": "interactive-hooks", + Body1: 'text', + Body1Strong: 'text', + Body2: 'text', + Body2Strong: 'text', + buildRootStyles: 'persona-coin', + Button: 'button', + ButtonAppearance: 'button', + ButtonCoreProps: 'button', + ButtonCoreTokens: 'button', + ButtonInfo: 'button', + buttonLookup: 'button', + buttonName: 'button', + buttonNameV1: 'button', + ButtonProps: 'button', + ButtonShape: 'button', + ButtonSize: 'button', + ButtonSlotProps: 'button', + ButtonTokens: 'button', + ButtonType: 'button', + ButtonV1: 'button', + Callout: 'callout', + calloutName: 'callout', + CalloutNativeCommands: 'callout', + Caption1: 'text', + Caption1Strong: 'text', + Caption2: 'text', + Checkbox: 'checkbox', + CheckboxInfo: 'checkbox', + checkboxName: 'checkbox', + checkboxNameV1: 'checkbox', + CheckboxProps: 'checkbox', + CheckboxShape: 'checkbox', + CheckboxSize: 'checkbox', + CheckboxSlotProps: 'checkbox', + CheckboxState: 'checkbox', + CheckboxTokens: 'checkbox', + CheckboxType: 'checkbox', + CheckboxV1: 'checkbox', + CMContext: 'contextual-menu', + CompoundButton: 'button', + compoundButtonName: 'button', + CompoundButtonProps: 'button', + CompoundButtonSlotProps: 'button', + CompoundButtonTokens: 'button', + CompoundButtonType: 'button', + ContextualMenu: 'contextual-menu', + ContextualMenuContext: 'contextual-menu', + ContextualMenuItem: 'contextual-menu', + contextualMenuItemName: 'contextual-menu', + ContextualMenuItemProps: 'contextual-menu', + ContextualMenuItemRenderData: 'contextual-menu', + ContextualMenuItemSlotProps: 'contextual-menu', + ContextualMenuItemState: 'contextual-menu', + ContextualMenuItemTokens: 'contextual-menu', + ContextualMenuItemType: 'contextual-menu', + contextualMenuName: 'contextual-menu', + ContextualMenuProps: 'contextual-menu', + ContextualMenuRenderData: 'contextual-menu', + ContextualMenuSlotProps: 'contextual-menu', + ContextualMenuState: 'contextual-menu', + ContextualMenuTokens: 'contextual-menu', + ContextualMenuType: 'contextual-menu', + defaultLinkTokens: 'link', + DirectionalHint: 'callout', + DismissBehaviors: 'callout', + Display: 'text', + FAB: 'button', + fabName: 'button', + FABProps: 'button', + FABSize: 'button', + FABSlotProps: 'button', + FABTokens: 'button', + FABType: 'button', + filterOutComponentRef: 'focus-trap-zone', + FocusTrapZone: 'focus-trap-zone', + FocusZone: 'focus-zone', + FocusZoneDirection: 'focus-zone', + focusZoneName: 'focus-zone', + FocusZoneProps: 'focus-zone', + FocusZoneRenderData: 'focus-zone', + FocusZoneSlotProps: 'focus-zone', + FocusZoneState: 'focus-zone', + FocusZoneTabNavigation: 'focus-zone', + FocusZoneTokens: 'focus-zone', + FocusZoneType: 'focus-zone', + getAccessibilityState: 'interactive-hooks', + getFocusBorderStyle: 'button', + IButtonInfo: 'button', + IButtonProps: 'button', + IButtonRenderData: 'button', + IButtonSlotProps: 'button', + IButtonState: 'button', + IButtonTokens: 'button', + IButtonType: 'button', + ICalloutProps: 'callout', + ICalloutRenderData: 'callout', + ICalloutSlotProps: 'callout', + ICalloutTokens: 'callout', + ICallotType: 'callout', + ICheckboxProps: 'checkbox', + ICheckboxRenderData: 'checkbox', + ICheckboxSlotProps: 'checkbox', + ICheckboxState: 'checkbox', + ICheckboxTokens: 'checkbox', + ICheckboxType: 'checkbox', + IChildAsFunction: 'pressable', + IconAlignment: 'persona-coin', + IFocusable: 'interactive-hooks', + IFocusState: 'interactive-hooks', + IFocusTrapZoneProps: 'focus-trap-zone', + IFocusTrapZoneSlotProps: 'focus-trap-zone', + IFocusTrapZoneType: 'focus-trap-zone', + IHoverState: 'interactive-hooks', + ILinkHooks: 'link', + ILinkInfo: 'link', + ILinkOptions: 'link', + ILinkProps: 'link', + ILinkRenderData: 'link', + ILinkSlotProps: 'link', + ILinkState: 'link', + ILinkTokens: 'link', + ILinkType: 'link', + InteractionEvent: 'interactive-hooks', + IPersonaCoinProps: 'persona-coin', + IPersonaCoinRenderData: 'persona-coin', + IPersonaCoinSlotProps: 'persona-coin', + IPersonaCoinState: 'persona-coin', + IPersonaCoinTokens: 'persona-coin', + IPersonaCoinType: 'persona-coin', + IPersonaConfigurableProps: 'persona-coin', + IPersonaProps: 'persona', + IPersonaRenderData: 'persona', + IPersonaSlotProps: 'persona', + IPersonaState: 'persona', + IPersonaTokens: 'persona', + IPersonaType: 'persona', + IPressableHooks: 'interactive-hooks', + IPressableOptions: 'interactive-hooks', + IPressableProps: 'pressable', + IPressableState: 'interactive-hooks', + IPressableType: 'pressable', + IPressState: 'interactive-hooks', + IRadioButtonProps: 'radio-group', + IRadioButtonRenderData: 'radio-group', + IRadioButtonSlotProps: 'radio-group', + IRadioButtonTokens: 'radio-group', + IRadioButtonType: 'radio-group', + IRadioGroupContext: 'radio-group', + IRadioGroupProps: 'radio-group', + IRadioGroupRenderData: 'radio-group', + IRadioGroupSlotProps: 'radio-group', + IRadioGroupState: 'radio-group', + IRadioGroupTokens: 'radio-group', + IRadioGroupType: 'radio-group', + IRenderChild: 'pressable', + IRenderStyle: 'pressable', + isAccessibilityActionEvent: 'interactive-hooks', + isGestureResponderEvent: 'interactive-hooks', + isKeyPressEvent: 'interactive-hooks', + isMouseEvent: 'interactive-hooks', + ITextProps: 'text', + ITextType: 'text', + IWithLinkOptions: 'link', + IWithPressableEvents: 'interactive-hooks', + IWithPressableOptions: 'interactive-hooks', + KeyCallback: 'interactive-hooks', + KeyPressEvent: 'interactive-hooks', + LargeTitle: 'text', + Link: 'link', + LinkAppearance: 'link', + linkLookup: 'link', + linkName: 'link', + linkNameV1: 'link', + LinkProps: 'link', + LinkSlotProps: 'link', + LinkState: 'link', + linkStates: 'link', + linkStylingSettings: 'link', + LinkTokens: 'link', + LinkType: 'link', + LinkV1: 'link', + MenuButton: 'menu-button', + MenuButtonContext: 'menu-button', + MenuButtonItemProps: 'menu-button', + MenuButtonName: 'menu-button', + MenuButtonProps: 'menu-button', + MenuButtonRenderData: 'menu-button', + MenuButtonSlotProps: 'menu-button', + MenuButtonState: 'menu-button', + MenuButtonTokens: 'menu-button', + MenuButtonType: 'menu-button', + NativeProps: 'focus-zone', + NavigateAtEnd: 'focus-zone', + OnChangeCallback: 'interactive-hooks', + onKeySelectCallback: 'interactive-hooks', + OnPressCallback: 'interactive-hooks', + OnPressWithFocusCallback: 'interactive-hooks', + OnToggleCallback: 'interactive-hooks', + Persona: 'persona', + PersonaCoin: 'persona-coin', + PersonaCoinColor: 'persona-coin', + PersonaCoinFluentColor: 'persona-coin', + personaCoinName: 'persona-coin', + personaName: 'persona', + PersonaPresence: 'persona-coin', + PersonaSize: 'persona-coin', + preferKeyDownForKeyEvents: 'interactive-hooks', + Pressable: 'pressable', + PressableFocusProps: 'interactive-hooks', + PressableHoverProps: 'interactive-hooks', + PressablePressProps: 'interactive-hooks', + PressablePropsExtended: 'interactive-hooks', + PrimaryButton: 'button', + RadioButton: 'radio-group', + radioButtonName: 'radio-group', + RadioGroup: 'radio-group', + RadioGroupContext: 'radio-group', + radioGroupName: 'radio-group', + RestoreFocusEvent: 'callout', + RingConfig: 'persona-coin', + RingThickness: 'persona-coin', + Separator: 'separator', + separatorName: 'separator', + SeparatorProps: 'separator', + SeparatorTokens: 'separator', + SeparatorType: 'separator', + StealthButton: 'button', + Submenu: 'contextual-menu', + SubmenuItem: 'contextual-menu', + submenuItemName: 'contextual-menu', + SubmenuItemProps: 'contextual-menu', + SubmenuItemRenderData: 'contextual-menu', + SubmenuItemSlotProps: 'contextual-menu', + SubmenuItemState: 'contextual-menu', + SubmenuItemTokens: 'contextual-menu', + SubmenuItemType: 'contextual-menu', + submenuName: 'contextual-menu', + SubmenuProps: 'contextual-menu', + SubmenuRenderData: 'contextual-menu', + SubmenuSlotProps: 'contextual-menu', + SubmenuState: 'contextual-menu', + SubmenuTokens: 'contextual-menu', + SubmenuType: 'contextual-menu', + Subtitle1: 'text', + Subtitle1Strong: 'text', + Subtitle2: 'text', + Subtitle2Strong: 'text', + Tab: 'tablist', + TabInfo: 'tablist', + TabList: 'tablist', + TabListInfo: 'tablist', + tabListName: 'tablist', + TabListProps: 'tablist', + TabListSlotProps: 'tablist', + TabListState: 'tablist', + TabListTokens: 'tablist', + TabListType: 'tablist', + tabName: 'tablist', + TabProps: 'tablist', + TabSlotProps: 'tablist', + TabState: 'tablist', + TabTokens: 'tablist', + TabType: 'tablist', + Text: 'text', + textName: 'text', + textNameV1: 'text', + TextProps: 'text', + TextTokens: 'text', + TextV1: 'text', + Title1: 'text', + Title1Strong: 'text', + Title2: 'text', + Title3: 'text', + ToggleButton: 'button', + ToggleButtonInfo: 'button', + toggleButtonName: 'button', + ToggleButtonProps: 'button', + ToggleButtonSlotProps: 'button', + ToggleButtonTokens: 'button', + ToggleButtonType: 'button', + useAsLink: 'link', + useAsPressable: 'interactive-hooks', + useAsToggle: 'interactive-hooks', + useButton: 'button', + useCheckbox: 'checkbox', + useFocusState: 'interactive-hooks', + useHoverState: 'interactive-hooks', + useKeyDownProps: 'interactive-hooks', + useKeyProps: 'interactive-hooks', + useKeyUpProps: 'interactive-hooks', + useLink: 'link', + useOnPressWithFocus: 'interactive-hooks', + usePressability: 'interactive-hooks', + usePressableState: 'interactive-hooks', + usePressState: 'interactive-hooks', + useSelectedKey: 'interactive-hooks', + useToggleButton: 'button', + useViewCommandFocus: 'interactive-hooks', }; /** @@ -317,8 +317,6 @@ const FURN_SCOPED_RE = /^@fluentui-react-native\/([^/]+)\/?$/; */ const UIFABRIC_SCOPED_RE = /^@uifabricshared\/([^/]+)\/?$/; - - /** * jscodeshift transform that migrates imports to the unified `fluentui-react-native/*` mono-package. * diff --git a/packages/libraries/fluentui-react-native/README.md b/packages/libraries/fluentui-react-native/README.md index a7871fcd0b3..a850a26c57d 100644 --- a/packages/libraries/fluentui-react-native/README.md +++ b/packages/libraries/fluentui-react-native/README.md @@ -44,13 +44,24 @@ Category barrels re-export all packages in a group. If two packages in the same ### Migration -Migrating from individual packages is a find-and-replace: +An automated codemod handles both source imports and `package.json` dependencies: + +```bash +# From your app directory: +yarn migrate-to-mono-package --path src/ +``` + +This rewrites imports: ```diff -import { Button } from '@fluentui-react-native/button'; +import { Button } from 'fluentui-react-native/button'; ``` +And updates `package.json` — removing individual `@fluentui-react-native/*` dependencies and adding `fluentui-react-native`. + +The codemod lives in `@fluentui-react-native/codemods`. See its [README](../../codemods/README.md) for options. + The individual `@fluentui-react-native/*` packages continue to be published and versioned independently — existing consumers are not affected. ## Package Structure @@ -170,11 +181,13 @@ The individual `@fluentui-react-native/*` packages continue to be published and ## Design -- **ESM only** — all exports use `import` conditions (no CommonJS `require`). This ensures optimal tree-shaking. +- **ESM only** — the package uses `type: "module"` and all subpath exports resolve to TypeScript source files (`./src/.ts`). This ensures optimal tree-shaking with any bundler. - **`sideEffects: false`** — bundlers can safely eliminate unused re-exports. +- **No build step** — exports point directly to `.ts` source files. Consumers' bundlers (Metro, Webpack, etc.) compile them as part of the app build, which is standard for React Native. - **Two import levels** — individual subpaths for precise control; category barrels for convenience. There is no top-level `import * from 'fluentui-react-native'` barrel. - **Auto-generated** — all exports, dependencies, and source files are generated by `update-exports.mts`. Run `yarn update-exports` after adding a new package to the monorepo. - **CI-enforced** — `yarn check-exports` runs in CI and fails if a publishable package is missing. +- **Category barrels use `@ts-nocheck`** — because aggregating overlapping packages with `export *` causes TS2308 duplicate export errors (e.g., `framework` re-exports symbols also in `use-styling`). Individual subpaths have no such issue. ## Maintainer Guide @@ -187,7 +200,7 @@ When adding a new package to the monorepo: The script automatically: - Discovers all publishable (non-private) packages under `packages/` -- Creates individual re-export files (`src//index.ts`) -- Creates category barrel files (`src//index.ts`) +- Creates individual re-export files (`src/.ts`) +- Creates category barrel files (`src/.ts`) with `@ts-nocheck` - Updates `package.json` exports and dependencies fields - Detects and removes stale entries for deleted packages diff --git a/packages/libraries/fluentui-react-native/update-exports.mts b/packages/libraries/fluentui-react-native/update-exports.mts index 58cc9ed983f..c72c3761d4f 100644 --- a/packages/libraries/fluentui-react-native/update-exports.mts +++ b/packages/libraries/fluentui-react-native/update-exports.mts @@ -118,7 +118,8 @@ function generateSrcFiles(entries: SubpathEntry[], barrels: Map a.localeCompare(b))) { const lines = barrelEntries.map((e) => `export * from '${e.packageName}';`); - const header = '// @ts-nocheck — Category barrels re-export overlapping packages that share symbols, causing TS2308 duplicate export errors.\n'; + const header = + '// @ts-nocheck — Category barrels re-export overlapping packages that share symbols, causing TS2308 duplicate export errors.\n'; files.set(`${barrelName}.ts`, header + lines.join('\n') + '\n'); } diff --git a/scripts/src/utils/buildConfig.ts b/scripts/src/utils/buildConfig.ts index d3ed2463fb2..0db3d0a6958 100644 --- a/scripts/src/utils/buildConfig.ts +++ b/scripts/src/utils/buildConfig.ts @@ -63,8 +63,9 @@ function getTypescriptBuildConfig( esmScript = getScript(options, esmDir, isModule, 'esnext'); checkScript = options.noEmit ? engine : ''; - // ESM-only packages (type: module with no CJS entry point) should not generate a CJS build - if (isModule && !projRoot.manifest.main) { + // ESM-only packages (type: module with no CJS entry point) should not generate a CJS build. + // Also skip CJS for packages with no main field at all (e.g. private apps that are bundled by Metro). + if (!projRoot.manifest.main) { cjsScript = ''; } } diff --git a/yarn.lock b/yarn.lock index 444ce450986..9da0715f639 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5595,7 +5595,6 @@ __metadata: "@wdio/runner": "catalog:" expect-webdriverio: "catalog:" flow-bin: "npm:^0.113.0" - fluentui-react-native: "workspace:*" metro-config: "npm:^0.80.3" oxc-resolver: "catalog:" path-dirname: "npm:^1.0.2"