Skip to content

Commit

Permalink
Sync with upstream
Browse files Browse the repository at this point in the history
commit b32a933
Author: benoitgrelard <[email protected]>
Date:   Thu Mar 14 12:23:48 2024 +0000

    Publish release candidate

commit d312472
Author: Benoît Grélard <[email protected]>
Date:   Thu Mar 14 12:20:17 2024 +0000

    Testing updated transitive dep of react-remove-scroll (radix-ui#2776)

commit b64b9f1
Author: benoitgrelard <[email protected]>
Date:   Tue Mar 12 11:17:33 2024 +0000

    Publish release candidate

commit 8b38903
Author: Benoît Grélard <[email protected]>
Date:   Tue Mar 12 11:13:46 2024 +0000

    [Slider] Add ability to name each thumb for more flexibility (radix-ui#2766)

    Fixes radix-ui#2454

commit be80c2a
Author: benoitgrelard <[email protected]>
Date:   Thu Mar 7 10:28:17 2024 +0000

    Publish release candidate

commit 4736d55
Author: Benoît Grélard <[email protected]>
Date:   Thu Mar 7 10:24:44 2024 +0000

    Upgrade react-remove-scroll version (radix-ui#2765)

    Fixes radix-ui#1548
    Fixes radix-ui#2367

commit 82eebe9
Author: benoitgrelard <[email protected]>
Date:   Wed Mar 6 15:04:36 2024 +0000

    Publish release candidate

commit 38f7f14
Author: Benoît Grélard <[email protected]>
Date:   Wed Mar 6 15:00:54 2024 +0000

    [DropdownMenu] Prevent scroll on initial menu focus (radix-ui#2762)

    Fixes radix-ui#2331

commit 834330f
Author: benoitgrelard <[email protected]>
Date:   Wed Mar 6 14:59:19 2024 +0000

    Publish release candidate

commit d7f5ed5
Author: Benoît Grélard <[email protected]>
Date:   Wed Mar 6 14:55:08 2024 +0000

    Use capture phase in `useEscapeKeydown` (radix-ui#2761)

    * Use capture phase

    * Create 75dcd823.yml

commit 2790136
Author: benoitgrelard <[email protected]>
Date:   Tue Mar 5 14:13:07 2024 +0000

    Publish release candidate

commit ad69155
Author: Benoît Grélard <[email protected]>
Date:   Tue Mar 5 14:09:51 2024 +0000

    [Label] Don't eagerly prevent double-click (radix-ui#2753)

    * [Label] Don't eagerly prevent double-click

    Fixes radix-ui#2656

    * Update Label.stories.tsx

    * Update Label.tsx

    * PR feedback

commit b5b3162
Author: Benoît Grélard <[email protected]>
Date:   Tue Mar 5 14:09:13 2024 +0000

    Update CODEOWNERS

commit 7d884d2
Author: benoitgrelard <[email protected]>
Date:   Fri Mar 1 22:14:10 2024 +0000

    Publish release candidate

commit f58a28c
Author: Nicholas Chiang <[email protected]>
Date:   Fri Mar 1 15:10:32 2024 -0700

    fix(Popper): disable pointer events when hidden (radix-ui#2745)

    * fix(Popper): disable pointer events when hidden

    This patch sets `pointer-events: none` when the `<PopperContent>` is
    hidden so that the UI behaves as if it is not there at all. This ensures
    that users can interact with elements beneath the `<PopperContent>`
    uninterrupted.

    Ref: radix-ui#2743 (comment)

    Fixes: e5ba0d9 ("fix(Popper): use `visibility` to hide instead of `opacity` (radix-ui#2744)")

    * Move to wrapper

    ---------

    Co-authored-by: Benoît Grélard <[email protected]>

commit 8b1162c
Author: benoitgrelard <[email protected]>
Date:   Thu Feb 29 19:43:17 2024 +0000

    Publish release candidate

commit e5ba0d9
Author: Nicholas Chiang <[email protected]>
Date:   Thu Feb 29 12:39:51 2024 -0700

    fix(Popper): use `visibility` to hide instead of `opacity` (radix-ui#2744)

    * fix(Popper): use `visibility` to hide instead of `opacity`

    When using `hideWhenDetached`, the opacity is changed to 0 instead of the
    visibility. This lets users click items that they cannot see. This is
    generally a bad user experience.

    This patch updates the `Popper` to set the `visibility` to `hidden` when
    `hideWhenDetached` is used. This ensures the user cannot interact with
    the hidden element.

    This aligns with what is in the `@floating-ui/react-dom` documentation.

    Ref: https://floating-ui.com/docs/hide#usage

    Closes: radix-ui#2743

    * Update packages/react/popper/src/Popper.tsx

    * Create 5793010b.yml

    ---------

    Co-authored-by: Benoît Grélard <[email protected]>

commit ef4cc7d
Author: benoitgrelard <[email protected]>
Date:   Thu Feb 29 13:44:52 2024 +0000

    Publish release candidate

commit fdc34ad
Author: Benoît Grélard <[email protected]>
Date:   Thu Feb 29 13:38:47 2024 +0000

    [NavigationMenu] Remove unsuported `disableOutsidePointerEvents` prop (radix-ui#2741)

    * [NavigationMenu] Remove unsuported `disableOutsidePointerEvents` prop

    Fixes radix-ui#2731

    * Trigger status?

    * Revert "Trigger status?"

    This reverts commit 3c827c0.

commit 8e4dfde
Author: benoitgrelard <[email protected]>
Date:   Wed Feb 28 17:26:11 2024 +0000

    Publish release candidate

commit 1fbb93c
Author: Benoît Grélard <[email protected]>
Date:   Wed Feb 28 17:22:06 2024 +0000

    [RovingFocusGroup] Move only with single arrow keys (radix-ui#2739)

    Fixes radix-ui#2732

commit f243570
Author: benoitgrelard <[email protected]>
Date:   Wed Feb 28 16:40:05 2024 +0000

    Publish release candidate

commit 57c1450
Author: Daniel Kremniov <[email protected]>
Date:   Wed Feb 28 18:36:08 2024 +0200

    feat: added CSP nonce prop (radix-ui#2728)

commit ddb0a12
Author: Benoît Grélard <[email protected]>
Date:   Wed Feb 28 14:39:00 2024 +0000

    yarn workspaces foreach default (radix-ui#2737)

commit a8fa795
Author: Benoît Grélard <[email protected]>
Date:   Wed Feb 28 14:08:13 2024 +0000

    Upgrade node/yarn/storybook (radix-ui#2736)

commit c31c972
Author: Benoît Grélard <[email protected]>
Date:   Mon Sep 25 15:10:49 2023 +0100

    New release

commit c578e3f
Author: benoitgrelard <[email protected]>
Date:   Mon Sep 25 13:44:53 2023 +0000

    Publish release candidate

commit fadebe7
Author: Benoît Grélard <[email protected]>
Date:   Mon Sep 25 14:37:30 2023 +0100

    [ScrollArea] Fix types (radix-ui#2408)

commit 28bebf2
Author: andy-hook <[email protected]>
Date:   Wed Sep 6 11:03:49 2023 +0000

    Publish release candidate

commit 1ccd02f
Author: Dott <[email protected]>
Date:   Wed Sep 6 19:55:24 2023 +0900

    Fix issue link in contribution guide (radix-ui#2381)

    * document: fix duplicated contribution guide open issues page link

    * run yarn version check as declined

commit ea63769
Author: andy-hook <[email protected]>
Date:   Wed Aug 16 13:26:17 2023 +0000

    Publish release candidate

commit baf9862
Author: Alexey Ryabov <[email protected]>
Date:   Wed Aug 16 16:18:41 2023 +0300

    [Avatar] Fix flashing of broken image (radix-ui#2340)

    * [Avatar] Fix flashing of broken image

    * Use isomorphic `useLayoutEffect`

    * [Avatar] Bump patch version

commit 3e0642e
Author: andy-hook <[email protected]>
Date:   Tue Aug 8 10:17:02 2023 +0000

    Publish release candidate

commit 2bc8f49
Author: Andy Hook <[email protected]>
Date:   Tue Aug 8 11:10:35 2023 +0100

    Update readme image (radix-ui#2328)

    * Update readme image

    * Versions
  • Loading branch information
jgoz committed Mar 20, 2024
1 parent e012a92 commit 85a036d
Show file tree
Hide file tree
Showing 74 changed files with 12,427 additions and 11,465 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
* @benoitgrelard @andy-hook @vladmoroz @lucasmotta
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ If you have questions about Radix Primitives, be sure to check out the docs wher
There are many ways to contribute to the project. Code is just one possible means of contribution.

- **Feedback.** Tell us what we're doing well or where we can improve.
- **Support.** You can answer questions on StackOverflow or [GitHub Discussions](https://github.com/radix-ui/primitives/discussions), or provide solutions for others in [open issues](https://github.com/radix-ui/primitives/issueshttps://github.com/radix-ui/primitives/issues).
- **Support.** You can answer questions on StackOverflow or [GitHub Discussions](https://github.com/radix-ui/primitives/discussions), or provide solutions for others in [open issues](https://github.com/radix-ui/primitives/issues).
- **Write.** If you come up with an interesting example, write about it. Post it to your blog and share it with us. We'd love to see what folks in the community build with Primitives!
- **Report.** Create issues with bug reports so we can make Primitives even better.

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.

54 changes: 54 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
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,
},
},

// 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.

13 changes: 13 additions & 0 deletions .yarn/versions/2ab74363.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
releases:
"@implydata/radix-react-context-menu": patch
"@implydata/radix-react-dropdown-menu": patch
"@implydata/radix-react-menu": patch
"@implydata/radix-react-menubar": patch
"@implydata/radix-react-radio-group": patch
"@implydata/radix-react-roving-focus": patch
"@implydata/radix-react-tabs": patch
"@implydata/radix-react-toggle-group": patch
"@implydata/radix-react-toolbar": patch

declined:
- primitives
13 changes: 0 additions & 13 deletions .yarn/versions/310b65b7.yml

This file was deleted.

File renamed without changes.
4 changes: 3 additions & 1 deletion .yarn/versions/ca844fc6.yml → .yarn/versions/75dcd823.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@ releases:
"@implydata/radix-react-alert-dialog": patch
"@implydata/radix-react-context-menu": patch
"@implydata/radix-react-dialog": patch
"@implydata/radix-react-dismissable-layer": patch
"@implydata/radix-react-dropdown-menu": patch
"@implydata/radix-react-hover-card": patch
"@implydata/radix-react-menu": patch
"@implydata/radix-react-menubar": patch
"@implydata/radix-react-navigation-menu": patch
"@implydata/radix-react-popover": patch
"@implydata/radix-react-portal": patch
"@implydata/radix-react-select": patch
"@implydata/radix-react-toast": patch
"@implydata/radix-react-tooltip": patch
"@implydata/radix-react-use-escape-keydown": patch

declined:
- primitives
5 changes: 0 additions & 5 deletions .yarn/versions/96d1204b.yml

This file was deleted.

5 changes: 5 additions & 0 deletions .yarn/versions/b20a66e3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
releases:
"@implydata/radix-react-slider": minor

declined:
- primitives
2 changes: 2 additions & 0 deletions .yarn/versions/d226e89e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
declined:
- primitives
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
releases:
"@implydata/radix-react-scroll-area": patch
"@implydata/radix-react-select": patch

declined:
- primitives
6 changes: 6 additions & 0 deletions .yarn/versions/ded3a040.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
releases:
"@implydata/radix-react-form": patch
"@implydata/radix-react-label": patch

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

declined:
- primitives
2 changes: 2 additions & 0 deletions .yarn/versions/eb020608.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
declined:
- primitives
File renamed without changes.
13 changes: 13 additions & 0 deletions .yarn/versions/f4333956.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
releases:
"@implydata/radix-react-context-menu": patch
"@implydata/radix-react-dropdown-menu": patch
"@implydata/radix-react-menu": patch
"@implydata/radix-react-menubar": patch
"@implydata/radix-react-radio-group": patch
"@implydata/radix-react-roving-focus": patch
"@implydata/radix-react-tabs": patch
"@implydata/radix-react-toggle-group": patch
"@implydata/radix-react-toolbar": patch

declined:
- primitives
2 changes: 2 additions & 0 deletions .yarn/versions/fad3e42d.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
declined:
- primitives
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
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<a href="https://radix-ui.com/primitives" >
<img alt="Radix UI hero image" src="https://repository-images.githubusercontent.com/316012819/b7b19180-3f85-11eb-884c-1e19ce2f493a">
</a>
[![Radix Primitives Logo](primitives.png)](https://radix-ui.com/primitives)

# Radix Primitives

Expand Down
29 changes: 16 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,21 @@
"types:check": "tsc --skipLibCheck --noEmit",
"test": "jest",
"test:ci": "yarn types:check && jest --ci && yarn cypress:ci",
"storybook": "start-storybook -p 9009 --ci",
"storybook": "BROWSER=none storybook dev -p 9009",
"cypress:ci": "start-server-and-test storybook http://localhost:9009 cypress:run",
"cypress:run": "cypress run",
"cypress:dev": "cypress open",
"dev": "yarn storybook",
"build-storybook": "build-storybook",
"build-storybook": "storybook build",
"// build": "For context on tsconfig replacements in build scripts, see https://github.com/radix-ui/primitives/pull/361#discussion_r555004944",
"build": "yarn build:config && yarn build:packages && yarn build:cleanup",
"build:config": "mv tsconfig.json tsconfig.tmp.json && mv tsconfig.production.json tsconfig.json",
"build:packages": "parcel build 'packages/*/*/' --no-cache --no-optimize && yarn build:fix-type-defs",
"build:packages": "parcel build 'packages/*/*/' --no-cache && yarn build:fix-type-defs",
"build:fix-type-defs": "node ./scripts/fix-type-defs-imports",
"build:cleanup": "mv tsconfig.json tsconfig.production.json && mv tsconfig.tmp.json tsconfig.json",
"publish:current": "yarn clean && yarn build && yarn workspaces foreach -pv --exclude primitives --exclude ssr-testing npm publish --tolerate-republish --access public",
"publish:stable": "yarn bump:stable && yarn clean && yarn build && yarn workspaces foreach -pv --exclude primitives --exclude ssr-testing npm publish --tolerate-republish --access public",
"publish:next": "yarn bump:next && yarn clean && yarn build && yarn workspaces foreach -pv --exclude primitives --exclude ssr-testing npm publish --tolerate-republish --access public --tag next",
"clean": "yarn workspaces foreach -pv --exclude primitives --exclude ssr-testing run clean",
"publish:stable": "yarn bump:stable && yarn clean && yarn build && yarn workspaces foreach -pvW --exclude primitives --exclude ssr-testing npm publish --tolerate-republish --access public",
"publish:next": "yarn bump:next && yarn clean && yarn build && yarn workspaces foreach -pvW --exclude primitives --exclude ssr-testing npm publish --tolerate-republish --access public --tag next",
"clean": "yarn workspaces foreach -pvW --exclude primitives --exclude ssr-testing run clean",
"reset": "yarn clean && rm -rf node_modules .yarn/cache .parcel-cache",
"bump:stable": "yarn version apply --all",
"bump:next": "yarn version apply --all --prerelease",
Expand All @@ -47,8 +46,11 @@
"@parcel/packager-ts": "2.4.1",
"@parcel/transformer-typescript-types": "2.4.1",
"@stitches/core": "^1.2.8",
"@storybook/addon-storysource": "^6.5.0-alpha.63",
"@storybook/react": "^6.5.0-alpha.63",
"@storybook/addon-essentials": "^7.6.17",
"@storybook/addon-storysource": "^7.6.17",
"@storybook/react": "^7.6.17",
"@storybook/react-webpack5": "^7.6.17",
"@storybook/test": "^7.6.17",
"@testing-library/cypress": "^7.0.6",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^13.0.1",
Expand All @@ -75,6 +77,7 @@
"eslint-plugin-jsx-a11y": "^6.3.1",
"eslint-plugin-react": "^7.24.0",
"eslint-plugin-react-hooks": "^4.2.0",
"eslint-plugin-storybook": "^0.8.0",
"fs-extra": "^11.1.1",
"glob": "^10.2.2",
"husky": "^4.3.6",
Expand All @@ -88,6 +91,7 @@
"react-test-renderer": "^18.0.0",
"replace-in-files": "^3.0.0",
"start-server-and-test": "^1.12.5",
"storybook": "^7.6.17",
"ts-jest": "^27.1.4",
"typescript": "^4.6.3"
},
Expand Down Expand Up @@ -129,7 +133,8 @@
"eslintConfig": {
"extends": [
"react-app",
"plugin:jsx-a11y/recommended"
"plugin:jsx-a11y/recommended",
"plugin:storybook/recommended"
],
"plugins": [
"jsx-a11y"
Expand Down Expand Up @@ -184,7 +189,5 @@
"lint-staged": {
"*.{js,ts,tsx}": "eslint --quiet --fix --cache"
},
"volta": {
"node": "18.16.0"
}
"packageManager": "[email protected]"
}
4 changes: 2 additions & 2 deletions packages/react/alert-dialog/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@implydata/radix-react-alert-dialog",
"version": "1.0.5-rc.5",
"version": "1.0.6-rc.5",
"license": "MIT",
"exports": {
".": {
Expand Down Expand Up @@ -58,5 +58,5 @@
"bugs": {
"url": "https://github.com/radix-ui/primitives/issues"
},
"stableVersion": "1.0.4"
"stableVersion": "1.0.5"
}
2 changes: 1 addition & 1 deletion packages/react/avatar/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@implydata/radix-react-avatar",
"version": "1.0.3",
"version": "1.0.4",
"license": "MIT",
"exports": {
".": {
Expand Down
2 changes: 1 addition & 1 deletion packages/react/avatar/src/Avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ AvatarFallback.displayName = FALLBACK_NAME;
function useImageLoadingStatus(src?: string) {
const [loadingStatus, setLoadingStatus] = React.useState<ImageLoadingStatus>('idle');

React.useEffect(() => {
useLayoutEffect(() => {
if (!src) {
setLoadingStatus('error');
return;
Expand Down
Loading

0 comments on commit 85a036d

Please sign in to comment.