Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into menu-radioitem
Browse files Browse the repository at this point in the history
  • Loading branch information
michaldudak committed Sep 10, 2024
2 parents 6fb355e + 480e33d commit cc1caee
Show file tree
Hide file tree
Showing 1,383 changed files with 35,362 additions and 42,335 deletions.
14 changes: 4 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,12 +226,6 @@ jobs:
- run:
name: '`pnpm docs:api` changes committed?'
command: git add -A && git diff --exit-code --staged
- run:
name: Update the navigation translations
command: pnpm docs:i18n
- run:
name: '`pnpm docs:i18n` changes committed?'
command: git add -A && git diff --exit-code --staged
- run:
name: '`pnpm extract-error-codes` changes committed?'
command: |
Expand Down Expand Up @@ -319,7 +313,7 @@ jobs:
<<: *default-job
resource_class: 'medium+'
docker:
- image: mcr.microsoft.com/playwright:v1.45.3-focal
- image: mcr.microsoft.com/playwright:v1.46.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand Down Expand Up @@ -350,7 +344,7 @@ jobs:
test_profile:
<<: *default-job
docker:
- image: mcr.microsoft.com/playwright:v1.45.3-focal
- image: mcr.microsoft.com/playwright:v1.46.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand Down Expand Up @@ -378,7 +372,7 @@ jobs:
test_regressions:
<<: *default-job
docker:
- image: mcr.microsoft.com/playwright:v1.45.3-focal
- image: mcr.microsoft.com/playwright:v1.46.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -395,7 +389,7 @@ jobs:
test_e2e:
<<: *default-job
docker:
- image: mcr.microsoft.com/playwright:v1.45.3-focal
- image: mcr.microsoft.com/playwright:v1.46.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand Down
61 changes: 45 additions & 16 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ const OneLevelImportMessage = [
'See https://github.com/mui/material-ui/pull/24147 for the kind of win it can unlock.',
].join('\n');

const NO_RESTRICTED_IMPORTS_PATTERNS_DEEPLY_NESTED = [
{
group: ['@base_ui/react/*/*'],
message: OneLevelImportMessage,
},
];

module.exports = {
...baseline,
settings: {
Expand All @@ -27,27 +34,15 @@ module.exports = {
'no-restricted-imports': [
'error',
{
patterns: [
{
group: [
'@mui/*/*/*',
'@pigment-css/*/*/*',
'@base_ui/react/*/*',
'!@base_ui/react/legacy/*',
// Allow any import depth with any internal packages
'!@mui/internal-*/**',
// TODO delete, @mui/docs should be @mui/internal-docs
'!@mui/docs/**',
],
message: OneLevelImportMessage,
},
],
patterns: NO_RESTRICTED_IMPORTS_PATTERNS_DEEPLY_NESTED,
},
],
'@typescript-eslint/no-redeclare': 'off',
},
overrides: [
...baseline.overrides,
...baseline.overrides.filter(
(ruleSet) => !ruleSet.rules.hasOwnProperty('filenames/match-exported'),
),
{
files: ['docs/pages/experiments/**/*{.tsx,.js}', 'docs/pages/playground/**/*{.tsx,.js}'],
rules: {
Expand All @@ -57,5 +52,39 @@ module.exports = {
'no-console': 'off',
},
},
{
files: ['packages/**/*.test{.tsx,.js}'],
extends: ['plugin:testing-library/react'],
rules: {
'testing-library/prefer-screen-queries': 'off', // TODO: enable and fix
'testing-library/no-container': 'off', // TODO: enable and fix
'testing-library/render-result-naming-convention': 'off', // False positives
},
},
{
files: ['docs/**/*{.ts,.tsx,.js}'],
rules: {
'no-restricted-imports': [
'error',
{
patterns: NO_RESTRICTED_IMPORTS_PATTERNS_DEEPLY_NESTED,
},
],
'react/prop-types': 'off',
'@typescript-eslint/no-use-before-define': 'off',
},
},
{
files: ['docs/data/**/*{.tsx,.js}'],
excludedFiles: [
'docs/data/**/css/*{.tsx,.js}',
'docs/data/**/css-modules/*{.tsx,.js}',
'docs/data/**/system/*{.tsx,.js}',
'docs/data/**/tailwind/*{.tsx,.js}',
],
rules: {
'filenames/match-exported': ['error'],
},
},
],
};
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
contact_links:
- name: Support ❔
url: https://mui.com/getting-started/support/
url: https://mui.com/base-ui/getting-started/support/
about: I need support with Base UI.
6 changes: 3 additions & 3 deletions .github/workflows/support-stackoverflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ jobs:
# Comment to post on issues marked as support requests. Add a link
# to a support page, or set to `false` to disable
issue-comment: |
👋 Thanks for using MUI Core!
👋 Thanks for using this project!
We use GitHub issues exclusively as a bug and feature requests tracker, however,
this issue appears to be a support request.
For support, please check out https://mui.com/getting-started/support/. Thanks!
For support with Base UI please check out https://mui.com/base-ui/getting-started/support/. Thanks!
If you have a question on Stack Overflow, you are welcome to link to it here, it might help others.
If you have a question on Stack Overflow, you are welcome to link to it here, it might help others.
If your issue is subsequently confirmed as a bug, and the report follows the issue template, it can be reopened.
close-issue: true
lock-issue: false
5 changes: 3 additions & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"recommendations": [
"editorconfig.editorconfig",
"dbaeumer.vscode-eslint",
"davidanson.vscode-markdownlint",
"dbaeumer.vscode-eslint",
"editorconfig.editorconfig",
"esbenp.prettier-vscode",
"unifiedjs.vscode-mdx",
"yoavbls.pretty-ts-errors"
]
}
80 changes: 80 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,85 @@
# Versions

## v1.0.0-alpha.2

_Aug 19, 2024_

A big thanks to the 10 contributors who made this release possible. Here are some highlights ✨:

⭐ We added many new components: AlertDialog, Dialog, Field, Menu, Popover, PreviewCard, Progress, Slider, and Tooltip.

### `@base_ui/[email protected]`

- [Checkbox] Fix checked change when clicking button with wrapping label (#467) @atomiks
- [Dialog] Create new component and hook (#372) @michaldudak
- [Field] Create new Field components (#477) @atomiks
- [Menu] Overhaul the component API (#468) @michaldudak
- [NumberField] Fix tests on non-English locale machines (#524) @michaldudak
- [NumberField] Rename `onChange` prop to `onValueChange` (#464) @atomiks
- [Popover] Component and Hook (#381) @atomiks
- [Popover] Fix `keepMounted` focus management (#489) @atomiks
- [Popover] Wait for focus to settle in tests (#491) @michaldudak
- [PreviewCard] Create new component (#469) @atomiks
- [PreviewCard] Fix Firefox browser hang (#490) @atomiks
- [Progress] New `Progress` components (#470) @mj12albert
- [Slider] improve `disabled` prop description (#527) @sai6855
- [Slider] New Slider components and hook (#373) @mj12albert
- [Switch/Checkbox] Rename `onChange` prop to `onCheckedChange` (#465) @atomiks
- [Tabs] Fix indicator tests (#379) @michaldudak
- [Tooltip] Component and Hook (#264) @atomiks
- [Tooltip] Fix animations (#426) @atomiks
- [useCompoundParent] Display `displayName` only in dev (#525) @sai6855

### Docs

- [docs] Add badges like in Material UI @oliviertassinari
- [docs] Add the logo to the README (#448) @danilo-leal
- [docs] Convert alpha component docs to new docs template (#392) @colmtuite
- [docs] Correct Bundlephobia links (#419) @michaldudak
- [docs] Fix page description line break @oliviertassinari
- [docs] Fix the X link (#450) @michaldudak
- [docs] Fix Vale errors (#492) @oliviertassinari
- [docs] Prepare security table for once it has its first release (#536) @oliviertassinari
- [docs] Update twitter.com to x.com @oliviertassinari
- [docs][Tooltip] Use the correct version of ComponentLinkHeader (#425) @michaldudak

### Core

- [code-infra] Fix pnpm version in package.json engines (#409) @Janpot
- [code-infra] Propagate API docs builder package interface changes (#478) @LukasTy
- [code-infra] Remove raw-loader (#404) @michaldudak
- [code-infra] Use shared .stylelintrc.js config (#415) @oliviertassinari
- [core] Add `trackAnchor` prop for anchor positioning (#519) @atomiks
- [core] Add `useAnchorPositioning` Hook (#461) @atomiks
- [core] Add `useTransitionStatus` and `useExecuteIfNotAnimated` Hooks (#396) @atomiks
- [core] Add codeowners file (#447) @michaldudak
- [core] Allow Renovate to update pnpm (#446) @michaldudak
- [core] Encapsulate the common rendering logic in `useComponentRenderer` (#408) @michaldudak
- [core] Fix event naming convention @oliviertassinari
- [core] Improve performance of `mergeReactProps` (#456) @marcpachecog
- [core] Improve Tooltip and Popover consistency (#463) @atomiks
- [core] Link GH issue for import/prefer-default-export @oliviertassinari
- [core] Make pnpm version permissive (#529) @atomiks
- [core] Move hooks under component directories (#405) @michaldudak
- [core] Move legacy components to a subdirectory (#410) @michaldudak
- [core] Normalize rest / other to match the most common used @oliviertassinari
- [core] Refactor animation hooks (#417) @atomiks
- [core] Remove sources of old components we don't intend to support (#474) @michaldudak
- [core] Simpler pnpm dedupe error message to act on @oliviertassinari
- [core] Upgrade to core-js v3 (#418) @atomiks
- [core] Verify types in test code (#457) @michaldudak
- [dependencies] Do not try to update eslint (#515) @michaldudak
- [docs-infra] Fix a stylelint issue (#421) @oliviertassinari
- [docs-infra] Integrate the latest @mui/docs (#378) @michaldudak
- [test] Clean up and unify test code (#532) @michaldudak
- [test] Update test-utils and remove enzyme (#473) @michaldudak
- [test] Use internal-test-utils from npm (#424) @michaldudak
- [typescript] Add `type` to export statements (#544) @michaldudak
- [website] Fix /base-ui/ code duplication (#416) @oliviertassinari- [infra] Add support donation button @oliviertassinari
- [website] Redirect to an existing page on dev (#445) @michaldudak

All contributors of this release in alphabetical order: @atomiks, @colmtuite, @danilo-leal, @Janpot, @LukasTy, @marcpachecog, @michaldudak, @mj12albert, @oliviertassinari, @sai6855

## v1.0.0-alpha.1

<!-- generated comparing v1.0.0-alpha.0..master -->
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing to Base UI

## Base UI vs. Material UI
## Base UI vs. MUI organization

Base UI is an open-source project of the MUI organization. The repositories are part of the same codebase.
`mui/base-ui` imports the code infrastructure from [`mui/material-ui`](https://github.com/mui/material-ui).
Expand Down
8 changes: 8 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Security policy

## Supported versions

The versions of the project that are currently supported with security updates.

| Base UI version | Release | Supported |
| --------------: | :------ | :----------------- |
| <=1.0.0 | TBD | :white_check_mark: |

## Reporting a vulnerability

You can report a vulnerability by contacting us via email at [[email protected]](mailto:[email protected]).
8 changes: 0 additions & 8 deletions docs/.link-check-errors.txt
Original file line number Diff line number Diff line change
@@ -1,8 +0,0 @@
Broken links found by `pnpm docs:link-check` that exist:

- https://mui.com/material-ui/customization/css-theme-variables/configuration/#advanced-configuration
- https://mui.com/material-ui/customization/css-theme-variables/configuration/#changing-variable-prefixes
- https://mui.com/material-ui/customization/theme-components/#creating-new-component-variants
- https://mui.com/material-ui/customization/theme-components/#overrides-based-on-props
- https://mui.com/material-ui/migrating-to-v6/
- https://mui.com/material-ui/react-grid2/#whats-changed
27 changes: 27 additions & 0 deletions docs/app/(content)/components/[slug]/getApiReferenceData.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { readFile } from 'node:fs/promises';
import { ComponentAPIReference } from 'docs-base/types/ComponentAPIReference';
import kebabCase from 'lodash/kebabCase';

export function getApiReferenceData(componentNames: string[]): Promise<ComponentAPIReference[]> {
return Promise.all(
componentNames.map(async (componentName) => {
const kebabedComponentName = kebabCase(componentName);
const apiDescriptionFilePath = `data/api/${kebabedComponentName}.json`;
const translationsFilePath = `data/translations/api-docs/${kebabedComponentName}/${kebabedComponentName}.json`;

const apiDescription = JSON.parse(await readFile(apiDescriptionFilePath, 'utf-8'));
const translations = JSON.parse(await readFile(translationsFilePath, 'utf-8'));

return {
name: componentName,
description: translations.componentDescription,
props: Object.keys(apiDescription.props).map((propName) => ({
name: propName,
...apiDescription.props[propName],
defaultValue: apiDescription.props[propName].default ?? null,
...translations.propDescriptions[propName],
})),
} satisfies ComponentAPIReference;
}),
);
}
Loading

0 comments on commit cc1caee

Please sign in to comment.