base-ui icon indicating copy to clipboard operation
base-ui copied to clipboard

[all components] Update browser support to Baseline Widely Available

Open michaldudak opened this issue 1 month ago • 5 comments

Updated the browserslist config to "Baseline Widely Available" (features supported in major browsers for at least 30 months), as discussed in the infra meeting.

The only changes in the build output:

--- a/packages/react/build/esm/floating-ui-react/components/FloatingTree.js
+++ b/packages/react/build/esm/floating-ui-react/components/FloatingTree.js
@@ -73,8 +73,8 @@ export class FloatingTreeStore {
   nodesRef = {
     current: []
   };
-  events = (() => createEventEmitter())();
-  _id = (() => `${Math.random().toString(16).slice(2)}`)();
+  events = createEventEmitter();
+  _id = `${Math.random().toString(16).slice(2)}`;
   addNode(node) {
     this.nodesRef.current.push(node);
   }

--- a/packages/react/build/toast/provider/ToastProvider.js
+++ b/packages/react/build/toast/provider/ToastProvider.js
@@ -103,7 +103,7 @@ const ToastProvider = exports.ToastProvider = function ToastProvider(props) {
     isPausedRef.current = false;
     timersRef.current.forEach((timer, id) => {
       timer.remaining = timer.remaining > 0 ? timer.remaining : timer.delay;
-      timer.timeout ?? (timer.timeout = _useTimeout.Timeout.create());
+      timer.timeout ??= _useTimeout.Timeout.create();
       timer.timeout.start(timer.remaining, () => {
         timersRef.current.delete(id);
         timer.callback();

CC @mnajdova, to sync with downstream projects.

michaldudak avatar Nov 17 '25 09:11 michaldudak

vite-css-base-ui-example

pnpm add https://pkg.pr.new/mui/base-ui/@base-ui-components/react@3235
pnpm add https://pkg.pr.new/mui/base-ui/@base-ui-components/utils@3235

commit: 672bb1c

pkg-pr-new[bot] avatar Nov 17 '25 09:11 pkg-pr-new[bot]

Bundle size report

Bundle Parsed size Gzip size
@base-ui-components/react 0B(0.00%) 0B(0.00%)

Details of bundle changes


Check out the code infra dashboard for more information about this PR.

mui-bot avatar Nov 17 '25 09:11 mui-bot

Deploy Preview for base-ui ready!

Name Link
Latest commit 672bb1c2c422a102e2ce42168e0bb9d5b640bd80
Latest deploy log https://app.netlify.com/projects/base-ui/deploys/691af59028c18a000858733f
Deploy Preview https://deploy-preview-3235--base-ui.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

netlify[bot] avatar Nov 17 '25 09:11 netlify[bot]

Should there be docs page as well with this information available to the users ?

brijeshb42 avatar Nov 17 '25 09:11 brijeshb42

Few similar changes in utils as well https://frontend-public.mui.com/diff-package?package1=https%3A%2F%2Fpkg.pr.new%2Fmui%2Fbase-ui%2F%40base-ui-components%2Futils%407a41931&package2=https%3A%2F%2Fpkg.pr.new%2Fmui%2Fbase-ui%2F%40base-ui-components%2Futils%4005297fa

Janpot avatar Nov 17 '25 09:11 Janpot