Skip to content

Commit

Permalink
Merge branch 'main' into perf/tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
chaance authored Sep 27, 2024
2 parents df32f30 + 6fdc2e3 commit 07965c9
Show file tree
Hide file tree
Showing 249 changed files with 13,218 additions and 13,181 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Add the following users as reviewers on new pull requests

* @benoitgrelard @jjenzz @andy-hook
* @StephenHaney @vladmoroz @lucasmotta @hadihallak @chaance
14 changes: 7 additions & 7 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,40 +55,40 @@ cd primitives
git remote add upstream https://github.com/radix-ui/primitives.git
```

1. Synchronize your local `main` branch with the upstream remote:
3. Synchronize your local `main` branch with the upstream remote:

```sh
git checkout main
git pull upstream main
```

1. Make sure your Node version matches the [.nvmrc](../.nvmrc).
4. Make sure your Node version matches the [.nvmrc](../.nvmrc).

```
node -v
```

1. Install dependencies with [yarn](https://yarnpkg.com):
5. Install dependencies with [yarn](https://yarnpkg.com):

```sh
yarn install
```

1. Create a new branch related to your PR:
6. Create a new branch related to your PR:

```sh
git checkout -b my-bug-fix
```

6. Make changes, then commit and push to your forked repository:
7. Make changes, then commit and push to your forked repository:

```sh
git push -u origin HEAD
```

7. Go to [the repository](https://github.com/radix-ui/primitives) and [make a Pull Request](https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request).
8. Go to [the repository](https://github.com/radix-ui/primitives) and [make a Pull Request](https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request).

8. We will review your Pull Request and either merge it, request changes to it, or close it with an explanation.
9. We will review your Pull Request and either merge it, request changes to it, or close it with an explanation.

## Working locally

Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.17.0
18
34 changes: 0 additions & 34 deletions .storybook/main.js

This file was deleted.

64 changes: 64 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
import type { StorybookConfig } from '@storybook/react-webpack5';
import path from 'path';

const config: StorybookConfig = {
stories: ['../packages/core/**/*.stories.tsx', '../packages/react/**/*.stories.tsx'],
addons: [
getAbsolutePath('@storybook/addon-essentials'),
getAbsolutePath('@storybook/addon-storysource'),
],
framework: {
name: getAbsolutePath('@storybook/react-webpack5'),
options: {
builder: {
useSWC: true,
},
// enable React strict mode
strictMode: true,
},
},
swc: () => ({
jsc: {
transform: {
react: {
// Do not require importing React into scope to use JSX
runtime: 'automatic',
},
},
},
}),

// we need to add aliases to webpack so it knows how to follow
// to the source of the packages rather than the built version (dist)
webpackFinal: async (config) => ({
...config,
resolve: {
...config.resolve,
alias: {
...config.resolve.alias,
...convertTsConfigPathsToWebpackAliases(),
},
},
}),
};

export default config;

/**
* This function is used to resolve the absolute path of a package.
* It is needed in projects that use Yarn PnP or are set up within a monorepo.
*/
function getAbsolutePath(value: string): any {
return path.dirname(require.resolve(path.join(value, 'package.json')));
}

function convertTsConfigPathsToWebpackAliases() {
const rootDir = path.resolve(__dirname, '../');
const tsconfig = require('../tsconfig.json');
const tsconfigPaths: Array<string | string[]> = Object.entries(tsconfig.compilerOptions.paths);

return tsconfigPaths.reduce((aliases, [realPath, mappedPath]) => {
aliases[realPath] = path.join(rootDir, mappedPath[0]);
return aliases;
}, {});
}
5 changes: 0 additions & 5 deletions .storybook/manager.js

This file was deleted.

7 changes: 7 additions & 0 deletions .storybook/manager.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { addons } from '@storybook/manager-api';
import { themes } from '@storybook/theming';

addons.setConfig({
enableShortcuts: false,
theme: themes.light,
});
9 changes: 0 additions & 9 deletions .storybook/preview.js

This file was deleted.

19 changes: 19 additions & 0 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import type { Preview } from '@storybook/react';

const preview: Preview = {
parameters: {
// This should work after upgrading to Storybook 7.6 but doesn't.
// I am leaving it commented out here so we can fix it one day.
//
// options: {
// storySort: {
// order: ['Components', 'Utilities'],
// },
// },

// disables Chromatic on a global level
chromatic: { disable: true },
},
};

export default preview;
9 changes: 0 additions & 9 deletions .yarn/plugins/@yarnpkg/plugin-typescript.cjs

This file was deleted.

367 changes: 0 additions & 367 deletions .yarn/plugins/@yarnpkg/plugin-version.cjs

This file was deleted.

28 changes: 0 additions & 28 deletions .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

This file was deleted.

631 changes: 0 additions & 631 deletions .yarn/releases/yarn-3.0.1.cjs

This file was deleted.

893 changes: 893 additions & 0 deletions .yarn/releases/yarn-4.1.0.cjs

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions .yarn/versions/19bdd400.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
releases:
"@radix-ui/react-avatar": patch

declined:
- primitives
9 changes: 9 additions & 0 deletions .yarn/versions/3e57a8d0.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
releases:
"@radix-ui/react-focus-guards": patch

declined:
- primitives
- "@radix-ui/react-dialog"
- "@radix-ui/react-menu"
- "@radix-ui/react-popover"
- "@radix-ui/react-select"
16 changes: 16 additions & 0 deletions .yarn/versions/41451f5a.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
releases:
"@radix-ui/react-alert-dialog": patch
"@radix-ui/react-context-menu": patch
"@radix-ui/react-dialog": patch
"@radix-ui/react-dropdown-menu": patch
"@radix-ui/react-hover-card": patch
"@radix-ui/react-menu": patch
"@radix-ui/react-menubar": patch
"@radix-ui/react-popover": patch
"@radix-ui/react-portal": patch
"@radix-ui/react-select": patch
"@radix-ui/react-toast": patch
"@radix-ui/react-tooltip": patch

declined:
- primitives
22 changes: 22 additions & 0 deletions .yarn/versions/8a3bd6ee.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
releases:
"@radix-ui/react-accordion": patch
"@radix-ui/react-alert-dialog": patch
"@radix-ui/react-checkbox": patch
"@radix-ui/react-collapsible": patch
"@radix-ui/react-context-menu": patch
"@radix-ui/react-dialog": patch
"@radix-ui/react-dropdown-menu": patch
"@radix-ui/react-hover-card": patch
"@radix-ui/react-menu": patch
"@radix-ui/react-menubar": patch
"@radix-ui/react-navigation-menu": patch
"@radix-ui/react-popover": patch
"@radix-ui/react-presence": patch
"@radix-ui/react-radio-group": patch
"@radix-ui/react-scroll-area": patch
"@radix-ui/react-tabs": patch
"@radix-ui/react-toast": patch
"@radix-ui/react-tooltip": patch

declined:
- primitives
17 changes: 17 additions & 0 deletions .yarn/versions/8cb19c89.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
releases:
"@radix-ui/react-alert-dialog": patch
"@radix-ui/react-context-menu": patch
"@radix-ui/react-dialog": patch
"@radix-ui/react-dismissable-layer": patch
"@radix-ui/react-dropdown-menu": patch
"@radix-ui/react-hover-card": patch
"@radix-ui/react-menu": patch
"@radix-ui/react-menubar": patch
"@radix-ui/react-navigation-menu": patch
"@radix-ui/react-popover": patch
"@radix-ui/react-select": patch
"@radix-ui/react-toast": patch
"@radix-ui/react-tooltip": patch

declined:
- primitives
2 changes: 2 additions & 0 deletions .yarn/versions/96c502e7.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
declined:
- primitives
5 changes: 5 additions & 0 deletions .yarn/versions/9cbffb59.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
releases:
"@radix-ui/react-select": patch

declined:
- primitives
5 changes: 5 additions & 0 deletions .yarn/versions/a0df87d9.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
releases:
"@radix-ui/react-checkbox": patch

declined:
- primitives
6 changes: 6 additions & 0 deletions .yarn/versions/a54ad5a9.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
releases:
"@radix-ui/react-scroll-area": minor

declined:
- primitives
- ssr-testing
33 changes: 33 additions & 0 deletions .yarn/versions/c80771b8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
releases:
"@radix-ui/react-context": patch

declined:
- primitives
- "@radix-ui/react-accordion"
- "@radix-ui/react-alert-dialog"
- "@radix-ui/react-avatar"
- "@radix-ui/react-checkbox"
- "@radix-ui/react-collapsible"
- "@radix-ui/react-collection"
- "@radix-ui/react-context-menu"
- "@radix-ui/react-dialog"
- "@radix-ui/react-dropdown-menu"
- "@radix-ui/react-form"
- "@radix-ui/react-hover-card"
- "@radix-ui/react-menu"
- "@radix-ui/react-menubar"
- "@radix-ui/react-navigation-menu"
- "@radix-ui/react-popover"
- "@radix-ui/react-popper"
- "@radix-ui/react-progress"
- "@radix-ui/react-radio-group"
- "@radix-ui/react-roving-focus"
- "@radix-ui/react-scroll-area"
- "@radix-ui/react-select"
- "@radix-ui/react-slider"
- "@radix-ui/react-switch"
- "@radix-ui/react-tabs"
- "@radix-ui/react-toast"
- "@radix-ui/react-toggle-group"
- "@radix-ui/react-toolbar"
- "@radix-ui/react-tooltip"
5 changes: 5 additions & 0 deletions .yarn/versions/cc138cf5.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
releases:
"@radix-ui/react-select": patch

declined:
- primitives
5 changes: 5 additions & 0 deletions .yarn/versions/cccc0adb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
releases:
"@radix-ui/react-select": patch

declined:
- primitives
2 changes: 2 additions & 0 deletions .yarn/versions/f24f9512.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
releases:
"@radix-ui/react-select": patch
14 changes: 5 additions & 9 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,10 @@ changesetIgnorePatterns:
- '**/*.test.{ts,tsx}'
- '**/*.stories.{ts,tsx}'

nodeLinker: node-modules
compressionLevel: mixed

enableGlobalCache: false

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: '@yarnpkg/plugin-workspace-tools'
- path: .yarn/plugins/@yarnpkg/plugin-typescript.cjs
spec: '@yarnpkg/plugin-typescript'
- path: .yarn/plugins/@yarnpkg/plugin-version.cjs
spec: '@yarnpkg/plugin-version'
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-3.0.1.cjs
yarnPath: .yarn/releases/yarn-4.1.0.cjs
Loading

0 comments on commit 07965c9

Please sign in to comment.