Skip to content

Commit

Permalink
Merge branch 'master' into renovate/mui-x
Browse files Browse the repository at this point in the history
  • Loading branch information
aarongarciah authored Dec 2, 2024
2 parents a0db4b8 + 89244c0 commit 9004630
Show file tree
Hide file tree
Showing 8 changed files with 275 additions and 182 deletions.
4 changes: 2 additions & 2 deletions apps/pigment-css-vite-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@types/webfontloader": "^1.6.38",
"@vitejs/plugin-react": "^4.3.3",
"@vitejs/plugin-react": "^4.3.4",
"postcss": "^8.4.49",
"postcss-combine-media-query": "^1.0.1",
"vite": "5.4.11",
"vite-plugin-node-polyfills": "0.22.0",
"vite-plugin-pages": "^0.32.3"
"vite-plugin-pages": "^0.32.4"
},
"nx": {
"targets": {
Expand Down
4 changes: 2 additions & 2 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@
"chai": "^4.5.0",
"cross-fetch": "^4.0.0",
"gm": "^1.25.0",
"marked": "^15.0.2",
"marked": "^15.0.3",
"playwright": "^1.48.2",
"prettier": "^3.3.3",
"prettier": "^3.4.1",
"tailwindcss": "^3.4.15",
"yargs": "^17.7.2"
}
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
"dependencies": {
"@googleapis/sheets": "^9.3.1",
"@netlify/functions": "^2.8.2",
"@slack/bolt": "^4.1.0",
"@slack/bolt": "^4.1.1",
"execa": "^9.5.1",
"google-auth-library": "^9.15.0"
},
Expand Down Expand Up @@ -184,26 +184,26 @@
"nyc": "^17.1.0",
"piscina": "^4.7.0",
"postcss-styled-syntax": "^0.7.0",
"prettier": "^3.3.3",
"prettier": "^3.4.1",
"pretty-quick": "^4.0.0",
"process": "^0.11.10",
"rimraf": "^6.0.1",
"serve": "^14.2.4",
"stylelint": "^16.10.0",
"stylelint": "^16.11.0",
"stylelint-config-standard": "^36.0.1",
"terser-webpack-plugin": "^5.3.10",
"tsx": "^4.19.2",
"typescript": "^5.7.2",
"vitest": "^2.1.5",
"vitest": "^2.1.6",
"vitest-fail-on-console": "^0.7.1",
"webpack": "^5.96.1",
"webpack-bundle-analyzer": "^4.10.2",
"webpack-cli": "^5.1.4",
"yargs": "^17.7.2"
},
"packageManager": "[email protected].2",
"packageManager": "[email protected].4",
"engines": {
"pnpm": "9.14.2"
"pnpm": "9.14.4"
},
"resolutions": {
"@babel/core": "^7.26.0",
Expand All @@ -213,8 +213,8 @@
"@babel/preset-typescript": "^7.26.0",
"@babel/runtime": "^7.26.0",
"@babel/types": "^7.26.0",
"@definitelytyped/header-parser": "^0.2.15",
"@definitelytyped/typescript-versions": "^0.1.5",
"@definitelytyped/header-parser": "^0.2.16",
"@definitelytyped/typescript-versions": "^0.1.6",
"@definitelytyped/utils": "^0.1.8",
"@types/node": "^20.17.7",
"@types/react": "^18.3.12",
Expand Down
2 changes: 1 addition & 1 deletion packages-internal/scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"@types/uuid": "^10.0.0",
"chai": "^4.5.0",
"fast-glob": "^3.3.2",
"prettier": "^3.3.3",
"prettier": "^3.4.1",
"rimraf": "^6.0.1"
},
"publishConfig": {
Expand Down
2 changes: 1 addition & 1 deletion packages/api-docs-builder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"fast-glob": "^3.3.2",
"fs-extra": "^11.2.0",
"lodash": "^4.17.21",
"prettier": "^3.3.3",
"prettier": "^3.4.1",
"react-docgen": "^5.4.3",
"recast": "^0.23.9",
"remark": "^15.0.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/markdown/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"dependencies": {
"@babel/runtime": "^7.26.0",
"lodash": "^4.17.21",
"marked": "^15.0.2",
"marked": "^15.0.3",
"prismjs": "^1.29.0"
},
"devDependencies": {
Expand Down
61 changes: 33 additions & 28 deletions packages/mui-material/src/ButtonBase/ButtonBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,38 +137,29 @@ const ButtonBase = React.forwardRef(function ButtonBase(inProps, ref) {
}
}, [disableRipple, focusRipple, focusVisible, ripple]);

function useRippleHandler(rippleAction, eventCallback, skipRippleAction = disableTouchRipple) {
return useEventCallback((event) => {
if (eventCallback) {
eventCallback(event);
const handleMouseDown = useRippleHandler(ripple, 'start', onMouseDown, disableTouchRipple);
const handleContextMenu = useRippleHandler(ripple, 'stop', onContextMenu, disableTouchRipple);
const handleDragLeave = useRippleHandler(ripple, 'stop', onDragLeave, disableTouchRipple);
const handleMouseUp = useRippleHandler(ripple, 'stop', onMouseUp, disableTouchRipple);
const handleMouseLeave = useRippleHandler(
ripple,
'stop',
(event) => {
if (focusVisible) {
event.preventDefault();
}

const ignore = skipRippleAction;
if (!ignore) {
ripple[rippleAction](event);
if (onMouseLeave) {
onMouseLeave(event);
}

return true;
});
}

const handleMouseDown = useRippleHandler('start', onMouseDown);
const handleContextMenu = useRippleHandler('stop', onContextMenu);
const handleDragLeave = useRippleHandler('stop', onDragLeave);
const handleMouseUp = useRippleHandler('stop', onMouseUp);
const handleMouseLeave = useRippleHandler('stop', (event) => {
if (focusVisible) {
event.preventDefault();
}
if (onMouseLeave) {
onMouseLeave(event);
}
});
const handleTouchStart = useRippleHandler('start', onTouchStart);
const handleTouchEnd = useRippleHandler('stop', onTouchEnd);
const handleTouchMove = useRippleHandler('stop', onTouchMove);
},
disableTouchRipple,
);
const handleTouchStart = useRippleHandler(ripple, 'start', onTouchStart, disableTouchRipple);
const handleTouchEnd = useRippleHandler(ripple, 'stop', onTouchEnd, disableTouchRipple);
const handleTouchMove = useRippleHandler(ripple, 'stop', onTouchMove, disableTouchRipple);

const handleBlur = useRippleHandler(
ripple,
'stop',
(event) => {
if (!isFocusVisible(event.target)) {
Expand Down Expand Up @@ -326,6 +317,20 @@ const ButtonBase = React.forwardRef(function ButtonBase(inProps, ref) {
);
});

function useRippleHandler(ripple, rippleAction, eventCallback, skipRippleAction = false) {
return useEventCallback((event) => {
if (eventCallback) {
eventCallback(event);
}

if (!skipRippleAction) {
ripple[rippleAction](event);
}

return true;
});
}

ButtonBase.propTypes /* remove-proptypes */ = {
// ┌────────────────────────────── Warning ──────────────────────────────┐
// │ These PropTypes are generated from the TypeScript type definitions. │
Expand Down
Loading

0 comments on commit 9004630

Please sign in to comment.