Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fluentui/react-dialog

Package Overview
Dependencies
Maintainers
13
Versions
679
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fluentui/react-dialog - npm Package Compare versions

Comparing version 9.0.0 to 9.0.1-0

17

CHANGELOG.json

@@ -5,3 +5,18 @@ {

{
"date": "Thu, 13 Oct 2022 10:59:24 GMT",
"date": "Thu, 13 Oct 2022 12:55:51 GMT",
"tag": "@fluentui/react-dialog_v9.0.1-0",
"version": "9.0.1-0",
"comments": {
"prerelease": [
{
"author": "bernardo.sunderhus@gmail.com",
"package": "@fluentui/react-dialog",
"commit": "e563f3daaea9b7cc62f50bc15edd44edf5045107",
"comment": "feat: adds disableButtonEnhancement property on DialogTrigger"
}
]
}
},
{
"date": "Thu, 13 Oct 2022 11:02:48 GMT",
"tag": "@fluentui/react-dialog_v9.0.0",

@@ -8,0 +23,0 @@ "version": "9.0.0",

# Change Log - @fluentui/react-dialog
This log was last generated on Thu, 13 Oct 2022 10:59:24 GMT and should not be manually modified.
This log was last generated on Thu, 13 Oct 2022 12:55:51 GMT and should not be manually modified.
<!-- Start content -->
## [9.0.1-0](https://github.com/microsoft/fluentui/tree/@fluentui/react-dialog_v9.0.1-0)
Thu, 13 Oct 2022 12:55:51 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-dialog_v9.0.0..@fluentui/react-dialog_v9.0.1-0)
### Changes
- feat: adds disableButtonEnhancement property on DialogTrigger ([PR #25112](https://github.com/microsoft/fluentui/pull/25112) by bernardo.sunderhus@gmail.com)
## [9.0.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-dialog_v9.0.0)
Thu, 13 Oct 2022 10:59:24 GMT
Thu, 13 Oct 2022 11:02:48 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-dialog_v9.0.0-beta.11..@fluentui/react-dialog_v9.0.0)

@@ -11,0 +20,0 @@

@@ -315,2 +315,7 @@ /// <reference types="react" />

action?: DialogTriggerAction;
/**
* Disables internal trigger mechanism that ensures a child provided will be a compliant ARIA button.
* @default false
*/
disableButtonEnhancement?: boolean;
};

@@ -317,0 +322,0 @@

@@ -53,2 +53,3 @@ "use strict";

children: React.createElement(DialogTrigger_1.DialogTrigger, {
disableButtonEnhancement: true,
action: "close"

@@ -55,0 +56,0 @@ }, React.createElement("button", {

19

lib-commonjs/components/DialogTrigger/useDialogTrigger.js

@@ -27,2 +27,3 @@ "use strict";

children,
disableButtonEnhancement = false,
action = isInsideSurfaceDialog ? 'close' : 'open'

@@ -48,11 +49,13 @@ } = props;

});
const triggerChildProps = { ...(child === null || child === void 0 ? void 0 : child.props),
'aria-haspopup': action === 'close' ? undefined : 'dialog',
ref: child === null || child === void 0 ? void 0 : child.ref,
onClick: handleClick,
...triggerAttributes
};
const ariaButtonTriggerChildProps = react_aria_1.useARIAButtonProps((child === null || child === void 0 ? void 0 : child.type) === 'button' || (child === null || child === void 0 ? void 0 : child.type) === 'a' ? child.type : 'div', { ...triggerChildProps,
type: 'button'
});
return {
children: react_utilities_1.applyTriggerPropsToChildren(children, react_aria_1.useARIAButtonProps((child === null || child === void 0 ? void 0 : child.type) === 'button' || (child === null || child === void 0 ? void 0 : child.type) === 'a' ? child.type : 'div', {
type: 'button',
...(child === null || child === void 0 ? void 0 : child.props),
'aria-haspopup': action === 'close' ? undefined : 'dialog',
ref: child === null || child === void 0 ? void 0 : child.ref,
onClick: handleClick,
...triggerAttributes
}))
children: react_utilities_1.applyTriggerPropsToChildren(children, disableButtonEnhancement ? triggerChildProps : ariaButtonTriggerChildProps)
};

@@ -59,0 +62,0 @@ };

@@ -39,2 +39,3 @@ import * as React from 'react';

children: /*#__PURE__*/React.createElement(DialogTrigger, {
disableButtonEnhancement: true,
action: "close"

@@ -41,0 +42,0 @@ }, /*#__PURE__*/React.createElement("button", {

@@ -16,2 +16,3 @@ import { useModalAttributes } from '@fluentui/react-tabster';

children,
disableButtonEnhancement = false,
action = isInsideSurfaceDialog ? 'close' : 'open'

@@ -37,13 +38,15 @@ } = props;

});
const triggerChildProps = { ...(child === null || child === void 0 ? void 0 : child.props),
'aria-haspopup': action === 'close' ? undefined : 'dialog',
ref: child === null || child === void 0 ? void 0 : child.ref,
onClick: handleClick,
...triggerAttributes
};
const ariaButtonTriggerChildProps = useARIAButtonProps((child === null || child === void 0 ? void 0 : child.type) === 'button' || (child === null || child === void 0 ? void 0 : child.type) === 'a' ? child.type : 'div', { ...triggerChildProps,
type: 'button'
});
return {
children: applyTriggerPropsToChildren(children, useARIAButtonProps((child === null || child === void 0 ? void 0 : child.type) === 'button' || (child === null || child === void 0 ? void 0 : child.type) === 'a' ? child.type : 'div', {
type: 'button',
...(child === null || child === void 0 ? void 0 : child.props),
'aria-haspopup': action === 'close' ? undefined : 'dialog',
ref: child === null || child === void 0 ? void 0 : child.ref,
onClick: handleClick,
...triggerAttributes
}))
children: applyTriggerPropsToChildren(children, disableButtonEnhancement ? triggerChildProps : ariaButtonTriggerChildProps)
};
};
//# sourceMappingURL=useDialogTrigger.js.map
{
"name": "@fluentui/react-dialog",
"version": "9.0.0",
"version": "9.0.1-0",
"description": "Dialog component for Fluent UI React",

@@ -5,0 +5,0 @@ "main": "lib-commonjs/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc