rc-dialog
Advanced tools
Comparing version 8.7.0 to 8.8.0
@@ -8,6 +8,7 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import KeyCode from "rc-util/es/KeyCode"; | ||
import useId from "rc-util/es/hooks/useId"; | ||
import contains from "rc-util/es/Dom/contains"; | ||
import pickAttrs from "rc-util/es/pickAttrs"; | ||
import Mask from './Mask'; | ||
import { getMotionName, getUUID } from '../util'; | ||
import { getMotionName } from '../util'; | ||
import Content from './Content'; | ||
@@ -54,9 +55,4 @@ export default function Dialog(props) { | ||
var ariaIdRef = useRef(); | ||
var ariaId = useId(); // ========================= Events ========================= | ||
if (!ariaIdRef.current) { | ||
ariaIdRef.current = "rcDialogTitle".concat(getUUID()); | ||
} // ========================= Events ========================= | ||
function onDialogVisibleChanged(newVisible) { | ||
@@ -183,3 +179,3 @@ if (newVisible) { | ||
role: "dialog", | ||
"aria-labelledby": title ? ariaIdRef.current : null, | ||
"aria-labelledby": title ? ariaId : null, | ||
style: _objectSpread(_objectSpread({ | ||
@@ -195,3 +191,3 @@ zIndex: zIndex | ||
closable: closable, | ||
ariaId: ariaIdRef.current, | ||
ariaId: ariaId, | ||
prefixCls: prefixCls, | ||
@@ -198,0 +194,0 @@ visible: visible, |
export declare function getMotionName(prefixCls: string, transitionName?: string, animationName?: string): string; | ||
export declare function getUUID(): number; | ||
export declare function offset(el: Element): { | ||
@@ -4,0 +3,0 @@ left: number; |
@@ -10,8 +10,2 @@ // =============================== Motion =============================== | ||
return motionName; | ||
} // ================================ UUID ================================ | ||
var uuid = -1; | ||
export function getUUID() { | ||
uuid += 1; | ||
return uuid; | ||
} // =============================== Offset =============================== | ||
@@ -18,0 +12,0 @@ |
@@ -24,2 +24,4 @@ "use strict"; | ||
var _useId = _interopRequireDefault(require("rc-util/lib/hooks/useId")); | ||
var _contains = _interopRequireDefault(require("rc-util/lib/Dom/contains")); | ||
@@ -75,9 +77,4 @@ | ||
var ariaIdRef = (0, React.useRef)(); | ||
var ariaId = (0, _useId.default)(); // ========================= Events ========================= | ||
if (!ariaIdRef.current) { | ||
ariaIdRef.current = "rcDialogTitle".concat((0, _util.getUUID)()); | ||
} // ========================= Events ========================= | ||
function onDialogVisibleChanged(newVisible) { | ||
@@ -204,3 +201,3 @@ if (newVisible) { | ||
role: "dialog", | ||
"aria-labelledby": title ? ariaIdRef.current : null, | ||
"aria-labelledby": title ? ariaId : null, | ||
style: (0, _objectSpread2.default)((0, _objectSpread2.default)({ | ||
@@ -216,3 +213,3 @@ zIndex: zIndex | ||
closable: closable, | ||
ariaId: ariaIdRef.current, | ||
ariaId: ariaId, | ||
prefixCls: prefixCls, | ||
@@ -219,0 +216,0 @@ visible: visible, |
export declare function getMotionName(prefixCls: string, transitionName?: string, animationName?: string): string; | ||
export declare function getUUID(): number; | ||
export declare function offset(el: Element): { | ||
@@ -4,0 +3,0 @@ left: number; |
@@ -7,3 +7,2 @@ "use strict"; | ||
exports.getMotionName = getMotionName; | ||
exports.getUUID = getUUID; | ||
exports.offset = offset; | ||
@@ -20,10 +19,2 @@ | ||
return motionName; | ||
} // ================================ UUID ================================ | ||
var uuid = -1; | ||
function getUUID() { | ||
uuid += 1; | ||
return uuid; | ||
} // =============================== Offset =============================== | ||
@@ -30,0 +21,0 @@ |
{ | ||
"name": "rc-dialog", | ||
"version": "8.7.0", | ||
"version": "8.8.0", | ||
"description": "dialog ui component for react", | ||
@@ -52,3 +52,3 @@ "keywords": [ | ||
"rc-motion": "^2.3.0", | ||
"rc-util": "^5.6.1" | ||
"rc-util": "^5.21.0" | ||
}, | ||
@@ -55,0 +55,0 @@ "devDependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
65111
1464
Updatedrc-util@^5.21.0