@rainbow-oh/yee-c 0.7.0 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +40 -25
- package/dist/cjs/Card/card.js +7 -3
- package/dist/cjs/Carousel/carousel-item.js +7 -2
- package/dist/cjs/Carousel/carousel.js +31 -4
- package/dist/cjs/Cascader/cascader.js +1 -1
- package/dist/cjs/Cascader/column.js +1 -1
- package/dist/cjs/Cascader/node.js +16 -4
- package/dist/cjs/Cascader/search-list.js +13 -4
- package/dist/cjs/Checkbox/checkbox-group.js +1 -1
- package/dist/cjs/Checkbox/checkbox.js +6 -3
- package/dist/cjs/Collapse/panel.js +10 -1
- package/dist/cjs/Dialog/dialog.js +22 -7
- package/dist/cjs/Drawer/drawer.js +14 -5
- package/dist/cjs/Form/form-store.d.ts +2 -1
- package/dist/cjs/Form/form-store.js +32 -17
- package/dist/cjs/Menu/menu-item.js +14 -5
- package/dist/cjs/Menu/menu.js +10 -2
- package/dist/cjs/Pagination/items.js +10 -5
- package/dist/cjs/Pagination/pagination.js +9 -3
- package/dist/cjs/Radio/radio-group.js +6 -5
- package/dist/cjs/Radio/radio.js +39 -29
- package/dist/cjs/Rate/rate.js +6 -1
- package/dist/cjs/Rate/star.js +7 -3
- package/dist/cjs/Steps/step.js +7 -5
- package/dist/cjs/Steps/steps.js +1 -1
- package/dist/cjs/Table/hooks/useColumns.js +1 -1
- package/dist/cjs/Table/style/index.less +35 -11
- package/dist/cjs/Table/table.js +57 -7
- package/dist/cjs/Table/tbody/cell.js +1 -1
- package/dist/cjs/Table/util/header.d.ts +3 -1
- package/dist/cjs/Table/util/header.js +30 -3
- package/dist/cjs/Tabs/tab-content.js +3 -1
- package/dist/cjs/Tabs/tab-header/index.js +3 -1
- package/dist/cjs/Tabs/tab-header/tab-header-title.js +3 -1
- package/dist/cjs/hooks/useDelayState.js +3 -2
- package/dist/cjs/hooks/useFocusManage.d.ts +1 -1
- package/dist/cjs/hooks/useFocusManage.js +27 -22
- package/dist/cjs/style/color.css +2 -0
- package/dist/cjs/style/themes.css +1 -1
- package/dist/cjs/style/variables.css +3 -1
- package/dist/cjs/utils/focusStack.d.ts +6 -2
- package/dist/cjs/utils/focusStack.js +40 -11
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Card/card.js +7 -3
- package/dist/esm/Carousel/carousel-item.js +7 -2
- package/dist/esm/Carousel/carousel.js +31 -4
- package/dist/esm/Cascader/cascader.js +3 -1
- package/dist/esm/Cascader/column.js +2 -1
- package/dist/esm/Cascader/node.js +18 -4
- package/dist/esm/Cascader/search-list.js +18 -4
- package/dist/esm/Checkbox/checkbox-group.js +3 -1
- package/dist/esm/Checkbox/checkbox.js +6 -3
- package/dist/esm/Collapse/panel.js +11 -2
- package/dist/esm/Dialog/dialog.js +26 -9
- package/dist/esm/Drawer/drawer.js +16 -7
- package/dist/esm/Form/form-store.d.ts +2 -1
- package/dist/esm/Form/form-store.js +40 -19
- package/dist/esm/Menu/menu-item.js +16 -5
- package/dist/esm/Menu/menu.js +11 -5
- package/dist/esm/Pagination/items.js +14 -5
- package/dist/esm/Pagination/pagination.js +16 -4
- package/dist/esm/Radio/radio-group.js +5 -4
- package/dist/esm/Radio/radio.js +5 -4
- package/dist/esm/Rate/rate.js +6 -1
- package/dist/esm/Rate/star.js +12 -4
- package/dist/esm/Steps/step.js +12 -6
- package/dist/esm/Steps/steps.js +3 -1
- package/dist/esm/Table/hooks/useColumns.js +1 -1
- package/dist/esm/Table/style/index.less +35 -11
- package/dist/esm/Table/table.js +54 -2
- package/dist/esm/Table/tbody/cell.js +1 -1
- package/dist/esm/Table/util/header.d.ts +3 -1
- package/dist/esm/Table/util/header.js +30 -2
- package/dist/esm/Tabs/tab-content.js +3 -1
- package/dist/esm/Tabs/tab-header/index.js +3 -1
- package/dist/esm/Tabs/tab-header/tab-header-title.js +3 -1
- package/dist/esm/hooks/useDelayState.js +5 -2
- package/dist/esm/hooks/useFocusManage.d.ts +1 -1
- package/dist/esm/hooks/useFocusManage.js +31 -13
- package/dist/esm/style/color.css +2 -0
- package/dist/esm/style/themes.css +1 -1
- package/dist/esm/style/variables.css +3 -1
- package/dist/esm/utils/focusStack.d.ts +6 -2
- package/dist/esm/utils/focusStack.js +37 -14
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/umd/yee-c.min.css +3 -3
- package/dist/umd/yee-c.min.js +1 -1
- package/package.json +10 -6
- package/src/Card/card.tsx +5 -1
- package/src/Carousel/carousel-item.tsx +7 -1
- package/src/Carousel/carousel.tsx +30 -3
- package/src/Cascader/cascader.tsx +1 -1
- package/src/Cascader/column.tsx +1 -1
- package/src/Cascader/node.tsx +14 -2
- package/src/Cascader/search-list.tsx +11 -2
- package/src/Checkbox/checkbox-group.tsx +1 -1
- package/src/Checkbox/checkbox.tsx +3 -0
- package/src/Collapse/panel.tsx +11 -1
- package/src/Dialog/dialog.tsx +31 -6
- package/src/Drawer/drawer.tsx +12 -3
- package/src/Form/form-store.ts +42 -15
- package/src/Menu/menu-item.tsx +12 -3
- package/src/Menu/menu.tsx +11 -5
- package/src/Pagination/items.tsx +9 -4
- package/src/Pagination/pagination.tsx +10 -4
- package/src/Radio/radio-group.tsx +2 -1
- package/src/Radio/radio.tsx +7 -2
- package/src/Rate/rate.tsx +5 -0
- package/src/Rate/star.tsx +8 -4
- package/src/Steps/step.tsx +15 -5
- package/src/Steps/steps.tsx +1 -1
- package/src/Table/hooks/useColumns.ts +1 -1
- package/src/Table/style/index.less +35 -11
- package/src/Table/table.tsx +60 -1
- package/src/Table/tbody/cell.tsx +1 -1
- package/src/Table/util/header.ts +48 -2
- package/src/Tabs/tab-content.tsx +2 -0
- package/src/Tabs/tab-header/index.tsx +2 -0
- package/src/Tabs/tab-header/tab-header-title.tsx +3 -1
- package/src/hooks/useDelayState.ts +4 -2
- package/src/hooks/useFocusManage.ts +33 -17
- package/src/style/color.css +2 -0
- package/src/utils/focusStack.ts +55 -12
- package/src/version.ts +1 -1
|
@@ -12,9 +12,11 @@ var SearchList = function SearchList(props) {
|
|
|
12
12
|
items = props.items,
|
|
13
13
|
_onClick = props.onClick;
|
|
14
14
|
return /*#__PURE__*/React.createElement("ul", {
|
|
15
|
-
className: "".concat(prefixCls, "-filter-menu")
|
|
15
|
+
className: "".concat(prefixCls, "-filter-menu"),
|
|
16
|
+
role: "listbox",
|
|
17
|
+
"aria-label": "Search results"
|
|
16
18
|
}, items.length ? items.map(function (item) {
|
|
17
|
-
var _item$data$$source;
|
|
19
|
+
var _item$data$$source, _item$data$$source2;
|
|
18
20
|
var title = ((_item$data$$source = item.data.$source) === null || _item$data$$source === void 0 ? void 0 : _item$data$$source.title) || item.data.labelPath.join(' / ');
|
|
19
21
|
return /*#__PURE__*/React.createElement("li", {
|
|
20
22
|
className: "".concat(prefixCls, "-filter-menu-item"),
|
|
@@ -22,8 +24,20 @@ var SearchList = function SearchList(props) {
|
|
|
22
24
|
onClick: function onClick() {
|
|
23
25
|
return _onClick(item.data);
|
|
24
26
|
},
|
|
25
|
-
key: item.data.uid
|
|
27
|
+
key: item.data.uid,
|
|
28
|
+
role: "option",
|
|
29
|
+
"aria-disabled": ((_item$data$$source2 = item.data.$source) === null || _item$data$$source2 === void 0 ? void 0 : _item$data$$source2.disabled) || undefined,
|
|
30
|
+
tabIndex: 0,
|
|
31
|
+
onKeyDown: function onKeyDown(e) {
|
|
32
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
33
|
+
e.preventDefault();
|
|
34
|
+
_onClick(item.data);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
26
37
|
}, renderHighlightText(item.matches));
|
|
27
|
-
}) : /*#__PURE__*/React.createElement("
|
|
38
|
+
}) : /*#__PURE__*/React.createElement("li", {
|
|
39
|
+
role: "option",
|
|
40
|
+
"aria-disabled": "true"
|
|
41
|
+
}, 'No result'));
|
|
28
42
|
};
|
|
29
43
|
export default /*#__PURE__*/React.memo(SearchList);
|
|
@@ -60,7 +60,9 @@ var CheckboxGroup = function CheckboxGroup(baseprops) {
|
|
|
60
60
|
};
|
|
61
61
|
return /*#__PURE__*/React.createElement("div", {
|
|
62
62
|
className: cls,
|
|
63
|
-
style: style
|
|
63
|
+
style: style,
|
|
64
|
+
role: "group",
|
|
65
|
+
"aria-disabled": disabled || undefined
|
|
64
66
|
}, /*#__PURE__*/React.createElement(CheckboxGroupCtx.Provider, {
|
|
65
67
|
value: {
|
|
66
68
|
name: name,
|
|
@@ -55,7 +55,8 @@ var Checkbox = function Checkbox(baseprops) {
|
|
|
55
55
|
};
|
|
56
56
|
return /*#__PURE__*/React.createElement("label", {
|
|
57
57
|
className: clsx("".concat(prefixCls, "-wrapper"), _defineProperty({}, "".concat(prefixCls, "-wrapper-disabled"), disabled), className),
|
|
58
|
-
style: style
|
|
58
|
+
style: style,
|
|
59
|
+
"aria-disabled": disabled || undefined
|
|
59
60
|
}, /*#__PURE__*/React.createElement("span", {
|
|
60
61
|
className: clsx("".concat(prefixCls), _defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-checked"), mergedChecked), "".concat(prefixCls, "-indeterminate"), indeterminate), "".concat(prefixCls, "-disabled"), disabled))
|
|
61
62
|
}, /*#__PURE__*/React.createElement("input", _extends({}, rest, {
|
|
@@ -65,10 +66,12 @@ var Checkbox = function Checkbox(baseprops) {
|
|
|
65
66
|
value: value,
|
|
66
67
|
disabled: disabled,
|
|
67
68
|
checked: mergedChecked,
|
|
68
|
-
onChange: handleChange
|
|
69
|
+
onChange: handleChange,
|
|
70
|
+
"aria-checked": indeterminate ? 'mixed' : mergedChecked
|
|
69
71
|
})), /*#__PURE__*/React.createElement("span", {
|
|
70
72
|
className: clsx("".concat(prefixCls, "-inner"), classNames === null || classNames === void 0 ? void 0 : classNames.inner),
|
|
71
|
-
style: styles === null || styles === void 0 ? void 0 : styles.inner
|
|
73
|
+
style: styles === null || styles === void 0 ? void 0 : styles.inner,
|
|
74
|
+
"aria-hidden": "true"
|
|
72
75
|
})), children ? /*#__PURE__*/React.createElement("span", {
|
|
73
76
|
className: clsx("".concat(prefixCls, "-label"), classNames === null || classNames === void 0 ? void 0 : classNames.label),
|
|
74
77
|
style: styles === null || styles === void 0 ? void 0 : styles.label
|
|
@@ -5,7 +5,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import { ChevronRight } from 'lucide-react';
|
|
7
7
|
import { AnimatePresence, motion } from 'motion/react';
|
|
8
|
-
import React, { useContext } from 'react';
|
|
8
|
+
import React, { useContext, useId } from 'react';
|
|
9
9
|
import Button from "../Button";
|
|
10
10
|
import { CollapseContext } from "./collapse";
|
|
11
11
|
var Panel = function Panel(props) {
|
|
@@ -21,6 +21,9 @@ var Panel = function Panel(props) {
|
|
|
21
21
|
prefixCls = _useContext.prefixCls,
|
|
22
22
|
activeKey = _useContext.activeKey,
|
|
23
23
|
onExpand = _useContext.onExpand;
|
|
24
|
+
var panelId = useId();
|
|
25
|
+
var headerId = "".concat(panelId, "-header");
|
|
26
|
+
var contentId = "".concat(panelId, "-content");
|
|
24
27
|
var expanded = activeKey.includes(id);
|
|
25
28
|
var itemClassName = clsx("".concat(prefixCls, "-item"), _defineProperty({}, "".concat(prefixCls, "-item-expanded"), expanded), className);
|
|
26
29
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -30,7 +33,9 @@ var Panel = function Panel(props) {
|
|
|
30
33
|
className: clsx("".concat(prefixCls, "-header"), classNames === null || classNames === void 0 ? void 0 : classNames.header),
|
|
31
34
|
role: "button",
|
|
32
35
|
style: styles === null || styles === void 0 ? void 0 : styles.header,
|
|
36
|
+
id: headerId,
|
|
33
37
|
"aria-expanded": expanded,
|
|
38
|
+
"aria-controls": contentId,
|
|
34
39
|
"aria-disabled": "false",
|
|
35
40
|
tabIndex: 0,
|
|
36
41
|
onClick: function onClick() {
|
|
@@ -50,7 +55,8 @@ var Panel = function Panel(props) {
|
|
|
50
55
|
},
|
|
51
56
|
transition: {
|
|
52
57
|
duration: 0.15
|
|
53
|
-
}
|
|
58
|
+
},
|
|
59
|
+
"aria-hidden": "true"
|
|
54
60
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
55
61
|
icon: /*#__PURE__*/React.createElement(ChevronRight, {
|
|
56
62
|
size: 16
|
|
@@ -69,6 +75,9 @@ var Panel = function Panel(props) {
|
|
|
69
75
|
}, typeof extra === 'function' ? extra() : extra)), /*#__PURE__*/React.createElement(AnimatePresence, null, expanded && /*#__PURE__*/React.createElement(motion.div, {
|
|
70
76
|
className: clsx("".concat(prefixCls, "-content"), classNames === null || classNames === void 0 ? void 0 : classNames.content),
|
|
71
77
|
style: styles === null || styles === void 0 ? void 0 : styles.content,
|
|
78
|
+
id: contentId,
|
|
79
|
+
role: "region",
|
|
80
|
+
"aria-labelledby": headerId,
|
|
72
81
|
initial: {
|
|
73
82
|
height: 0,
|
|
74
83
|
opacity: 0
|
|
@@ -17,7 +17,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
17
17
|
import clsx from 'clsx';
|
|
18
18
|
import { X } from 'lucide-react';
|
|
19
19
|
import { motion } from 'motion/react';
|
|
20
|
-
import React, { useContext, useEffect, useRef, useState } from 'react';
|
|
20
|
+
import React, { useCallback, useContext, useEffect, useId, useRef, useState } from 'react';
|
|
21
21
|
import Button from "../Button";
|
|
22
22
|
import { GlobalContext } from "../Config-Provider";
|
|
23
23
|
import useEsc from "../hooks/useEsc";
|
|
@@ -35,7 +35,6 @@ var ANIMATION_DURATION = 0.2;
|
|
|
35
35
|
var CLOSE_ICON_SIZE = 16;
|
|
36
36
|
var CLOSE_ICON_STROKE_WIDTH = 1.5;
|
|
37
37
|
var Dialog = function Dialog(baseprops) {
|
|
38
|
-
var _contentRef$current2;
|
|
39
38
|
var _useContext = useContext(GlobalContext),
|
|
40
39
|
dialog = _useContext.dialog;
|
|
41
40
|
var props = mergeContextToProps(baseprops, dialog);
|
|
@@ -84,7 +83,18 @@ var Dialog = function Dialog(baseprops) {
|
|
|
84
83
|
_useState2 = _slicedToArray(_useState, 2),
|
|
85
84
|
delayOpen = _useState2[0],
|
|
86
85
|
setDelayOpen = _useState2[1];
|
|
86
|
+
var _useState3 = useState(null),
|
|
87
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
88
|
+
contentElement = _useState4[0],
|
|
89
|
+
setContentElement = _useState4[1];
|
|
87
90
|
var contentRef = useRef(null);
|
|
91
|
+
var setContentRef = useCallback(function (element) {
|
|
92
|
+
contentRef.current = element;
|
|
93
|
+
setContentElement(element);
|
|
94
|
+
}, []);
|
|
95
|
+
var dialogId = useId();
|
|
96
|
+
var titleId = "".concat(dialogId, "-title");
|
|
97
|
+
var bodyId = "".concat(dialogId, "-body");
|
|
88
98
|
|
|
89
99
|
// When open changes and openResetLocation is true, reset position
|
|
90
100
|
useEffect(function () {
|
|
@@ -102,7 +112,7 @@ var Dialog = function Dialog(baseprops) {
|
|
|
102
112
|
});
|
|
103
113
|
|
|
104
114
|
// lock focus in the dialog
|
|
105
|
-
useLockFocus(
|
|
115
|
+
useLockFocus(contentElement, delayOpen);
|
|
106
116
|
|
|
107
117
|
// enable esc to close dialog
|
|
108
118
|
useEsc({
|
|
@@ -112,8 +122,8 @@ var Dialog = function Dialog(baseprops) {
|
|
|
112
122
|
}
|
|
113
123
|
});
|
|
114
124
|
|
|
115
|
-
// manage focus
|
|
116
|
-
useFocusManage(
|
|
125
|
+
// manage focus once per open cycle
|
|
126
|
+
useFocusManage(contentElement, open);
|
|
117
127
|
var cls = clsx(prefixCls, _defineProperty(_defineProperty({}, "".concat(prefixCls, "-open"), delayOpen), "".concat(prefixCls, "-fullscreen"), fullscreen));
|
|
118
128
|
var renderFooter = function renderFooter() {
|
|
119
129
|
if (footer === false || footer === null) {
|
|
@@ -164,7 +174,8 @@ var Dialog = function Dialog(baseprops) {
|
|
|
164
174
|
}
|
|
165
175
|
}), showMask && delayOpen && /*#__PURE__*/React.createElement("div", {
|
|
166
176
|
className: clsx("".concat(prefixCls, "-mask"), classNames === null || classNames === void 0 ? void 0 : classNames.mask),
|
|
167
|
-
style: styles === null || styles === void 0 ? void 0 : styles.mask
|
|
177
|
+
style: styles === null || styles === void 0 ? void 0 : styles.mask,
|
|
178
|
+
"aria-hidden": "true"
|
|
168
179
|
}), /*#__PURE__*/React.createElement("div", {
|
|
169
180
|
className: "".concat(prefixCls, "-content-wrapper"),
|
|
170
181
|
onClick: maskClosable ? onCancel : undefined
|
|
@@ -177,7 +188,11 @@ var Dialog = function Dialog(baseprops) {
|
|
|
177
188
|
onClick: function onClick(e) {
|
|
178
189
|
return e.stopPropagation();
|
|
179
190
|
},
|
|
180
|
-
ref:
|
|
191
|
+
ref: setContentRef,
|
|
192
|
+
role: "dialog",
|
|
193
|
+
"aria-modal": showMask ? true : undefined,
|
|
194
|
+
"aria-labelledby": title ? titleId : undefined,
|
|
195
|
+
"aria-describedby": bodyId
|
|
181
196
|
}, closable ? /*#__PURE__*/React.createElement(Button, {
|
|
182
197
|
type: "text",
|
|
183
198
|
icon: /*#__PURE__*/React.createElement(X, {
|
|
@@ -191,10 +206,12 @@ var Dialog = function Dialog(baseprops) {
|
|
|
191
206
|
className: clsx("".concat(prefixCls, "-header"), classNames === null || classNames === void 0 ? void 0 : classNames.header),
|
|
192
207
|
style: styles === null || styles === void 0 ? void 0 : styles.header
|
|
193
208
|
}, /*#__PURE__*/React.createElement("div", {
|
|
194
|
-
className: "".concat(prefixCls, "-title")
|
|
209
|
+
className: "".concat(prefixCls, "-title"),
|
|
210
|
+
id: titleId
|
|
195
211
|
}, title)) : null, /*#__PURE__*/React.createElement("div", {
|
|
196
212
|
className: clsx("".concat(prefixCls, "-body"), classNames === null || classNames === void 0 ? void 0 : classNames.body),
|
|
197
|
-
style: styles === null || styles === void 0 ? void 0 : styles.body
|
|
213
|
+
style: styles === null || styles === void 0 ? void 0 : styles.body,
|
|
214
|
+
id: bodyId
|
|
198
215
|
}, children), renderFooter())));
|
|
199
216
|
return /*#__PURE__*/React.createElement(Portal, {
|
|
200
217
|
open: open,
|
|
@@ -15,7 +15,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
15
15
|
import clsx from 'clsx';
|
|
16
16
|
import { X } from 'lucide-react';
|
|
17
17
|
import { motion } from 'motion/react';
|
|
18
|
-
import React, { useContext, useRef, useState } from 'react';
|
|
18
|
+
import React, { useContext, useId, useRef, useState } from 'react';
|
|
19
19
|
import Button from "../Button";
|
|
20
20
|
import { GlobalContext } from "../Config-Provider";
|
|
21
21
|
import Portal from "../Portal";
|
|
@@ -132,6 +132,9 @@ var Drawer = function Drawer(baseprops) {
|
|
|
132
132
|
delayOpen = _useState2[0],
|
|
133
133
|
setDelayOpen = _useState2[1];
|
|
134
134
|
var contentRef = useRef(null);
|
|
135
|
+
var drawerId = useId();
|
|
136
|
+
var titleId = "".concat(drawerId, "-title");
|
|
137
|
+
var bodyId = "".concat(drawerId, "-body");
|
|
135
138
|
useLockFocus(contentRef.current, delayOpen);
|
|
136
139
|
useEsc({
|
|
137
140
|
enabled: keyboard,
|
|
@@ -177,8 +180,7 @@ var Drawer = function Drawer(baseprops) {
|
|
|
177
180
|
exit = _getAnimate.exit;
|
|
178
181
|
return /*#__PURE__*/React.createElement("div", _extends({}, rest, {
|
|
179
182
|
className: cls,
|
|
180
|
-
style: style
|
|
181
|
-
role: "modal"
|
|
183
|
+
style: style
|
|
182
184
|
}), showMask && delayOpen && /*#__PURE__*/React.createElement(motion.div, {
|
|
183
185
|
className: clsx("".concat(prefixCls, "-mask"), classNames === null || classNames === void 0 ? void 0 : classNames.mask),
|
|
184
186
|
style: styles === null || styles === void 0 ? void 0 : styles.mask,
|
|
@@ -196,7 +198,8 @@ var Drawer = function Drawer(baseprops) {
|
|
|
196
198
|
},
|
|
197
199
|
transition: {
|
|
198
200
|
duration: ANIMATION_DURATION
|
|
199
|
-
}
|
|
201
|
+
},
|
|
202
|
+
"aria-hidden": "true"
|
|
200
203
|
}), /*#__PURE__*/React.createElement(motion.div, {
|
|
201
204
|
className: "".concat(prefixCls, "-content-wrapper"),
|
|
202
205
|
style: {
|
|
@@ -223,16 +226,22 @@ var Drawer = function Drawer(baseprops) {
|
|
|
223
226
|
className: clsx("".concat(prefixCls, "-content"), classNames === null || classNames === void 0 ? void 0 : classNames.content),
|
|
224
227
|
tabIndex: 0,
|
|
225
228
|
style: styles === null || styles === void 0 ? void 0 : styles.content,
|
|
226
|
-
ref: contentRef
|
|
229
|
+
ref: contentRef,
|
|
230
|
+
role: "dialog",
|
|
231
|
+
"aria-modal": showMask ? true : undefined,
|
|
232
|
+
"aria-labelledby": title ? titleId : undefined,
|
|
233
|
+
"aria-describedby": bodyId
|
|
227
234
|
}, renderClose(), title ? /*#__PURE__*/React.createElement("div", {
|
|
228
235
|
className: clsx("".concat(prefixCls, "-header"), classNames === null || classNames === void 0 ? void 0 : classNames.header),
|
|
229
236
|
style: styles === null || styles === void 0 ? void 0 : styles.header
|
|
230
237
|
}, /*#__PURE__*/React.createElement("div", {
|
|
231
238
|
className: clsx("".concat(prefixCls, "-title"), classNames === null || classNames === void 0 ? void 0 : classNames.title),
|
|
232
|
-
style: styles === null || styles === void 0 ? void 0 : styles.title
|
|
239
|
+
style: styles === null || styles === void 0 ? void 0 : styles.title,
|
|
240
|
+
id: titleId
|
|
233
241
|
}, title)) : null, /*#__PURE__*/React.createElement("div", {
|
|
234
242
|
className: clsx("".concat(prefixCls, "-body"), classNames === null || classNames === void 0 ? void 0 : classNames.body),
|
|
235
|
-
style: styles === null || styles === void 0 ? void 0 : styles.body
|
|
243
|
+
style: styles === null || styles === void 0 ? void 0 : styles.body,
|
|
244
|
+
id: bodyId
|
|
236
245
|
}, children), renderFooter())));
|
|
237
246
|
};
|
|
238
247
|
return /*#__PURE__*/React.createElement(Portal, {
|
|
@@ -28,7 +28,8 @@ export declare class FormStore {
|
|
|
28
28
|
clearFields: (name?: Name[]) => void;
|
|
29
29
|
validateField: (name: Name, trigger?: TRIGGER) => Promise<ValidateMessage[]>;
|
|
30
30
|
validateFields: (names?: string[], trigger?: TRIGGER) => Promise<ValidateMessage[]>;
|
|
31
|
-
|
|
31
|
+
private getRelatedFieldNames;
|
|
32
|
+
refreshField: (newStore?: Store, relatedFieldNames?: Name[]) => void;
|
|
32
33
|
subscribe: (namePath?: NamePath, callback?: () => void) => (() => void);
|
|
33
34
|
private notifyWatchers;
|
|
34
35
|
registerGroupEntity: (id: string, entity: GroupEntity) => (() => void);
|
|
@@ -34,6 +34,9 @@ function _move(array, from, to) {
|
|
|
34
34
|
return result;
|
|
35
35
|
}
|
|
36
36
|
var GLOBAL_WATCH_KEY = '__ALL__';
|
|
37
|
+
var isRelatedNamePath = function isRelatedNamePath(first, second) {
|
|
38
|
+
return first === second || first.startsWith("".concat(second, ".")) || second.startsWith("".concat(first, "."));
|
|
39
|
+
};
|
|
37
40
|
export var FormStore = /*#__PURE__*/function () {
|
|
38
41
|
function FormStore() {
|
|
39
42
|
var _this = this;
|
|
@@ -136,13 +139,15 @@ export var FormStore = /*#__PURE__*/function () {
|
|
|
136
139
|
}
|
|
137
140
|
});
|
|
138
141
|
}
|
|
142
|
+
var changedKeys = Object.keys(newStore);
|
|
143
|
+
var relatedFieldNames = _this.getRelatedFieldNames(changedKeys);
|
|
139
144
|
|
|
140
145
|
// Validate on onChange and onBlur (async — fire-and-forget so setFieldsValue
|
|
141
146
|
// stays synchronous for its callers; results surface via onStoreChange).
|
|
142
147
|
if (trigger === 'onChange' || trigger === 'onBlur' || trigger === 'onSubmit') {
|
|
143
|
-
void _this.validateFields(
|
|
148
|
+
void _this.validateFields(relatedFieldNames, trigger);
|
|
144
149
|
}
|
|
145
|
-
_this.refreshField(newStore);
|
|
150
|
+
_this.refreshField(newStore, relatedFieldNames);
|
|
146
151
|
});
|
|
147
152
|
_defineProperty(this, "resetFields", function (name) {
|
|
148
153
|
var _this$callbacks4, _this$callbacks4$onRe;
|
|
@@ -322,16 +327,22 @@ export var FormStore = /*#__PURE__*/function () {
|
|
|
322
327
|
}
|
|
323
328
|
}, _callee2);
|
|
324
329
|
})));
|
|
325
|
-
_defineProperty(this, "
|
|
330
|
+
_defineProperty(this, "getRelatedFieldNames", function (changedKeys) {
|
|
331
|
+
return Array.from(_this.fieldMap.keys()).filter(function (fieldName) {
|
|
332
|
+
return changedKeys.some(function (changedKey) {
|
|
333
|
+
return isRelatedNamePath(String(fieldName), changedKey);
|
|
334
|
+
});
|
|
335
|
+
});
|
|
336
|
+
});
|
|
337
|
+
_defineProperty(this, "refreshField", function (newStore, relatedFieldNames) {
|
|
326
338
|
if (newStore) {
|
|
327
|
-
var
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
}
|
|
333
|
-
_this.notifyWatchers(key);
|
|
339
|
+
var changedKeys = Object.keys(newStore);
|
|
340
|
+
var fieldNames = relatedFieldNames !== null && relatedFieldNames !== void 0 ? relatedFieldNames : _this.getRelatedFieldNames(changedKeys);
|
|
341
|
+
fieldNames.forEach(function (fieldName) {
|
|
342
|
+
var _this$fieldMap$get;
|
|
343
|
+
(_this$fieldMap$get = _this.fieldMap.get(fieldName)) === null || _this$fieldMap$get === void 0 || _this$fieldMap$get.onStoreChange();
|
|
334
344
|
});
|
|
345
|
+
_this.notifyWatchers(changedKeys);
|
|
335
346
|
} else {
|
|
336
347
|
_this.fieldEntities.forEach(function (entity) {
|
|
337
348
|
entity === null || entity === void 0 || entity.onStoreChange();
|
|
@@ -347,18 +358,28 @@ export var FormStore = /*#__PURE__*/function () {
|
|
|
347
358
|
}
|
|
348
359
|
_this.watchers.get(key).add(callback);
|
|
349
360
|
return function () {
|
|
350
|
-
var _this
|
|
351
|
-
|
|
361
|
+
var watchers = _this.watchers.get(key);
|
|
362
|
+
watchers === null || watchers === void 0 || watchers.delete(callback);
|
|
363
|
+
if ((watchers === null || watchers === void 0 ? void 0 : watchers.size) === 0) {
|
|
364
|
+
_this.watchers.delete(key);
|
|
365
|
+
}
|
|
352
366
|
};
|
|
353
367
|
});
|
|
354
|
-
_defineProperty(this, "notifyWatchers", function (
|
|
355
|
-
if (
|
|
356
|
-
var
|
|
357
|
-
|
|
358
|
-
|
|
368
|
+
_defineProperty(this, "notifyWatchers", function (changedKeys) {
|
|
369
|
+
if (changedKeys) {
|
|
370
|
+
var keys = Array.isArray(changedKeys) ? changedKeys : [changedKeys];
|
|
371
|
+
var callbacks = new Set();
|
|
372
|
+
_this.watchers.forEach(function (watchers, watchedKey) {
|
|
373
|
+
if (watchedKey === GLOBAL_WATCH_KEY || keys.some(function (changedKey) {
|
|
374
|
+
return isRelatedNamePath(watchedKey, changedKey);
|
|
375
|
+
})) {
|
|
376
|
+
watchers.forEach(function (callback) {
|
|
377
|
+
return callbacks.add(callback);
|
|
378
|
+
});
|
|
379
|
+
}
|
|
359
380
|
});
|
|
360
|
-
|
|
361
|
-
return
|
|
381
|
+
callbacks.forEach(function (callback) {
|
|
382
|
+
return callback();
|
|
362
383
|
});
|
|
363
384
|
} else {
|
|
364
385
|
_this.watchers.forEach(function (set) {
|
|
@@ -69,7 +69,11 @@ var MenuItem = function MenuItem(props) {
|
|
|
69
69
|
paddingLeft: paddingLeft
|
|
70
70
|
}, styles === null || styles === void 0 ? void 0 : styles.item),
|
|
71
71
|
onClick: handleClick,
|
|
72
|
-
title: isCollapsed && typeof label === 'string' ? label : undefined
|
|
72
|
+
title: isCollapsed && typeof label === 'string' ? label : undefined,
|
|
73
|
+
role: "menuitem",
|
|
74
|
+
"aria-disabled": disabled || undefined,
|
|
75
|
+
"aria-current": selectedKeys !== null && selectedKeys !== void 0 && selectedKeys.includes(key) ? 'page' : undefined,
|
|
76
|
+
tabIndex: disabled ? -1 : 0
|
|
73
77
|
}, iconNode, !isCollapsed && /*#__PURE__*/React.createElement("span", {
|
|
74
78
|
className: "".concat(prefixCls, "-item-content"),
|
|
75
79
|
title: typeof label === 'string' ? label : ''
|
|
@@ -130,7 +134,8 @@ var MenuItem = function MenuItem(props) {
|
|
|
130
134
|
if (isCollapsed) return null;
|
|
131
135
|
if (mode === 'vertical' || mode === 'horizontal') {
|
|
132
136
|
return /*#__PURE__*/React.createElement("span", {
|
|
133
|
-
className: "".concat(prefixCls, "-item-switch")
|
|
137
|
+
className: "".concat(prefixCls, "-item-switch"),
|
|
138
|
+
"aria-hidden": "true"
|
|
134
139
|
}, /*#__PURE__*/React.createElement(ChevronRight, {
|
|
135
140
|
strokeWidth: 2,
|
|
136
141
|
size: 18
|
|
@@ -143,14 +148,18 @@ var MenuItem = function MenuItem(props) {
|
|
|
143
148
|
},
|
|
144
149
|
transition: {
|
|
145
150
|
duration: 0.15
|
|
146
|
-
}
|
|
151
|
+
},
|
|
152
|
+
"aria-hidden": "true"
|
|
147
153
|
}, /*#__PURE__*/React.createElement(ChevronDown, {
|
|
148
154
|
strokeWidth: 2,
|
|
149
155
|
size: 18
|
|
150
156
|
}));
|
|
151
157
|
};
|
|
152
158
|
var triggerNode = /*#__PURE__*/React.createElement("div", {
|
|
153
|
-
role: "
|
|
159
|
+
role: "menuitem",
|
|
160
|
+
"aria-haspopup": "true",
|
|
161
|
+
"aria-expanded": opened,
|
|
162
|
+
"aria-disabled": disabled || undefined,
|
|
154
163
|
className: clsx("".concat(prefixCls, "-submenu-title"), _defineProperty(_defineProperty({}, "".concat(prefixCls, "-submenu-open"), opened), "".concat(prefixCls, "-submenu-selected"), selectedKeys.includes(key) || selectedKeys.find(function (k) {
|
|
155
164
|
return childrenKeys.includes(k);
|
|
156
165
|
}))),
|
|
@@ -158,6 +167,7 @@ var MenuItem = function MenuItem(props) {
|
|
|
158
167
|
paddingLeft: paddingLeft
|
|
159
168
|
},
|
|
160
169
|
onClick: handleExpand,
|
|
170
|
+
tabIndex: disabled ? -1 : 0,
|
|
161
171
|
title: isCollapsed && typeof label === 'string' ? label : undefined
|
|
162
172
|
}, iconNode, !isCollapsed && /*#__PURE__*/React.createElement("div", {
|
|
163
173
|
className: "".concat(prefixCls, "-item-content"),
|
|
@@ -168,7 +178,8 @@ var MenuItem = function MenuItem(props) {
|
|
|
168
178
|
var usePopup = mode === 'vertical' || mode === 'horizontal' || isCollapsed;
|
|
169
179
|
var placement = mode === 'horizontal' && !isCollapsed ? 'bottomLeft' : 'rightTop';
|
|
170
180
|
var childNode = /*#__PURE__*/React.createElement("li", {
|
|
171
|
-
className: cls
|
|
181
|
+
className: cls,
|
|
182
|
+
role: "none"
|
|
172
183
|
}, usePopup ? /*#__PURE__*/React.createElement(Trigger, {
|
|
173
184
|
open: openKeys.includes(key),
|
|
174
185
|
popup: popup,
|
package/dist/esm/Menu/menu.js
CHANGED
|
@@ -25,11 +25,16 @@ var MenuGroup = function MenuGroup(_ref2) {
|
|
|
25
25
|
prefixCls = _ref2.prefixCls,
|
|
26
26
|
renderItems = _ref2.renderItems;
|
|
27
27
|
return /*#__PURE__*/React.createElement("li", {
|
|
28
|
-
className: "".concat(prefixCls, "-item-group")
|
|
28
|
+
className: "".concat(prefixCls, "-item-group"),
|
|
29
|
+
role: "none"
|
|
29
30
|
}, /*#__PURE__*/React.createElement("div", {
|
|
30
|
-
className: "".concat(prefixCls, "-item-group-title")
|
|
31
|
+
className: "".concat(prefixCls, "-item-group-title"),
|
|
32
|
+
role: "presentation",
|
|
33
|
+
id: "".concat(prefixCls, "-group-").concat(String(item.label))
|
|
31
34
|
}, item.label), /*#__PURE__*/React.createElement("ul", {
|
|
32
|
-
className: "".concat(prefixCls, "-item-group-list")
|
|
35
|
+
className: "".concat(prefixCls, "-item-group-list"),
|
|
36
|
+
role: "group",
|
|
37
|
+
"aria-labelledby": "".concat(prefixCls, "-group-").concat(String(item.label))
|
|
33
38
|
}, renderItems(item.children)));
|
|
34
39
|
};
|
|
35
40
|
var Menu = function Menu(props) {
|
|
@@ -89,7 +94,7 @@ var Menu = function Menu(props) {
|
|
|
89
94
|
return /*#__PURE__*/React.createElement("ul", _extends({}, dataAttrs, {
|
|
90
95
|
className: cls,
|
|
91
96
|
style: rootStyle,
|
|
92
|
-
role:
|
|
97
|
+
role: root && mode === 'horizontal' ? 'menubar' : 'menu'
|
|
93
98
|
}), /*#__PURE__*/React.createElement(MenuCtx.Provider, {
|
|
94
99
|
value: {
|
|
95
100
|
level: level,
|
|
@@ -98,7 +103,8 @@ var Menu = function Menu(props) {
|
|
|
98
103
|
styles: styles
|
|
99
104
|
}
|
|
100
105
|
}, getChildFromItems(items), level === 0 && footer && /*#__PURE__*/React.createElement("li", {
|
|
101
|
-
className: "".concat(prefixCls, "-footer")
|
|
106
|
+
className: "".concat(prefixCls, "-footer"),
|
|
107
|
+
role: "none"
|
|
102
108
|
}, footer)));
|
|
103
109
|
};
|
|
104
110
|
Menu.displayName = 'Menu';
|
|
@@ -60,15 +60,18 @@ var Items = function Items(props) {
|
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
62
|
role: "button",
|
|
63
|
+
"aria-label": "Jump back 7 pages",
|
|
63
64
|
key: "turnleft"
|
|
64
65
|
}, (_components$jumpPrev = components === null || components === void 0 ? void 0 : components.jumpPrev) !== null && _components$jumpPrev !== void 0 ? _components$jumpPrev : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
65
|
-
className: "".concat(prefixCls, "-jump-prev-ellipsis")
|
|
66
|
+
className: "".concat(prefixCls, "-jump-prev-ellipsis"),
|
|
67
|
+
"aria-hidden": "true"
|
|
66
68
|
}, /*#__PURE__*/React.createElement(Ellipsis, {
|
|
67
69
|
className: "ellipsis",
|
|
68
70
|
size: 18,
|
|
69
71
|
strokeWidth: 1.5
|
|
70
72
|
})), /*#__PURE__*/React.createElement("span", {
|
|
71
|
-
className: "".concat(prefixCls, "-jump-prev-icon")
|
|
73
|
+
className: "".concat(prefixCls, "-jump-prev-icon"),
|
|
74
|
+
"aria-hidden": "true"
|
|
72
75
|
}, /*#__PURE__*/React.createElement(ChevronsLeft, {
|
|
73
76
|
className: "turn",
|
|
74
77
|
size: 18,
|
|
@@ -89,15 +92,18 @@ var Items = function Items(props) {
|
|
|
89
92
|
}
|
|
90
93
|
},
|
|
91
94
|
role: "button",
|
|
95
|
+
"aria-label": "Jump forward 7 pages",
|
|
92
96
|
key: "turn-right"
|
|
93
97
|
}, (_components$jumpNext = components === null || components === void 0 ? void 0 : components.jumpNext) !== null && _components$jumpNext !== void 0 ? _components$jumpNext : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
94
|
-
className: "".concat(prefixCls, "-jump-next-ellipsis")
|
|
98
|
+
className: "".concat(prefixCls, "-jump-next-ellipsis"),
|
|
99
|
+
"aria-hidden": "true"
|
|
95
100
|
}, /*#__PURE__*/React.createElement(Ellipsis, {
|
|
96
101
|
className: "ellipsis",
|
|
97
102
|
size: 18,
|
|
98
103
|
strokeWidth: 1.5
|
|
99
104
|
})), /*#__PURE__*/React.createElement("span", {
|
|
100
|
-
className: "".concat(prefixCls, "-jump-next-icon")
|
|
105
|
+
className: "".concat(prefixCls, "-jump-next-icon"),
|
|
106
|
+
"aria-hidden": "true"
|
|
101
107
|
}, /*#__PURE__*/React.createElement(ChevronsRight, {
|
|
102
108
|
className: "turn",
|
|
103
109
|
size: 18,
|
|
@@ -116,7 +122,10 @@ var Items = function Items(props) {
|
|
|
116
122
|
if (e.key === 'Enter') {
|
|
117
123
|
onChange(number);
|
|
118
124
|
}
|
|
119
|
-
}
|
|
125
|
+
},
|
|
126
|
+
role: "button",
|
|
127
|
+
"aria-label": "Page ".concat(number),
|
|
128
|
+
"aria-current": current === number ? 'page' : undefined
|
|
120
129
|
}, number);
|
|
121
130
|
}
|
|
122
131
|
}));
|
|
@@ -169,10 +169,14 @@ var Pagination = /*#__PURE__*/React.forwardRef(function (baseprops, ref) {
|
|
|
169
169
|
prevClick();
|
|
170
170
|
}
|
|
171
171
|
},
|
|
172
|
+
role: "button",
|
|
173
|
+
"aria-label": "Previous page",
|
|
174
|
+
"aria-disabled": mergedCurrent === 1 || undefined,
|
|
172
175
|
key: "prev"
|
|
173
176
|
}, (_components$prev = components === null || components === void 0 ? void 0 : components.prev) !== null && _components$prev !== void 0 ? _components$prev : /*#__PURE__*/React.createElement(ChevronLeft, {
|
|
174
177
|
size: 20,
|
|
175
|
-
strokeWidth: 1.5
|
|
178
|
+
strokeWidth: 1.5,
|
|
179
|
+
"aria-hidden": "true"
|
|
176
180
|
}));
|
|
177
181
|
};
|
|
178
182
|
var renderNext = function renderNext() {
|
|
@@ -187,10 +191,14 @@ var Pagination = /*#__PURE__*/React.forwardRef(function (baseprops, ref) {
|
|
|
187
191
|
nextClick();
|
|
188
192
|
}
|
|
189
193
|
},
|
|
194
|
+
role: "button",
|
|
195
|
+
"aria-label": "Next page",
|
|
196
|
+
"aria-disabled": mergedCurrent === pageCount || undefined,
|
|
190
197
|
key: "next"
|
|
191
198
|
}, (_components$next = components === null || components === void 0 ? void 0 : components.next) !== null && _components$next !== void 0 ? _components$next : /*#__PURE__*/React.createElement(ChevronRight, {
|
|
192
199
|
size: 20,
|
|
193
|
-
strokeWidth: 1.5
|
|
200
|
+
strokeWidth: 1.5,
|
|
201
|
+
"aria-hidden": "true"
|
|
194
202
|
}));
|
|
195
203
|
};
|
|
196
204
|
var renderSizeChanger = function renderSizeChanger() {
|
|
@@ -225,11 +233,15 @@ var Pagination = /*#__PURE__*/React.forwardRef(function (baseprops, ref) {
|
|
|
225
233
|
return /*#__PURE__*/React.createElement("ul", _extends({}, rest, {
|
|
226
234
|
className: cls,
|
|
227
235
|
style: style,
|
|
228
|
-
ref: ref
|
|
236
|
+
ref: ref,
|
|
237
|
+
role: "navigation",
|
|
238
|
+
"aria-label": "Pagination",
|
|
239
|
+
"aria-disabled": disabled || undefined
|
|
229
240
|
}), renderTotal(), renderPrevious(), simple ? /*#__PURE__*/React.createElement("li", {
|
|
230
241
|
className: "".concat(prefixCls, "-simple")
|
|
231
242
|
}, renderNumber(false), /*#__PURE__*/React.createElement("span", {
|
|
232
|
-
className: "split"
|
|
243
|
+
className: "split",
|
|
244
|
+
"aria-hidden": "true"
|
|
233
245
|
}, "/"), /*#__PURE__*/React.createElement("span", {
|
|
234
246
|
className: "total-page"
|
|
235
247
|
}, pageCount)) : /*#__PURE__*/React.createElement(Items, {
|
|
@@ -53,14 +53,15 @@ var RadioGroup = /*#__PURE__*/React.forwardRef(function (baseprops, ref) {
|
|
|
53
53
|
setMergedValue(event.target.value);
|
|
54
54
|
onChange === null || onChange === void 0 || onChange(event.target.value, event);
|
|
55
55
|
};
|
|
56
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
56
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
57
57
|
className: cls,
|
|
58
58
|
style: _objectSpread(_objectSpread({}, style), {}, {
|
|
59
59
|
gap: gap
|
|
60
60
|
}),
|
|
61
61
|
ref: ref,
|
|
62
|
-
role: "radiogroup"
|
|
63
|
-
|
|
62
|
+
role: "radiogroup",
|
|
63
|
+
"aria-disabled": disabled || undefined
|
|
64
|
+
}, rest), /*#__PURE__*/React.createElement(GroupCtx.Provider, {
|
|
64
65
|
value: {
|
|
65
66
|
name: name,
|
|
66
67
|
buttonStyle: buttonStyle,
|
|
@@ -69,7 +70,7 @@ var RadioGroup = /*#__PURE__*/React.forwardRef(function (baseprops, ref) {
|
|
|
69
70
|
}, options === null || options === void 0 ? void 0 : options.map(function (option, index) {
|
|
70
71
|
return /*#__PURE__*/React.createElement(Radio, _extends({
|
|
71
72
|
disabled: disabled
|
|
72
|
-
},
|
|
73
|
+
}, option, {
|
|
73
74
|
checked: option.value === mergedValue,
|
|
74
75
|
key: option.value || index
|
|
75
76
|
}));
|
package/dist/esm/Radio/radio.js
CHANGED
|
@@ -70,7 +70,8 @@ var Radio = /*#__PURE__*/React.forwardRef(function (baseprops, ref) {
|
|
|
70
70
|
return /*#__PURE__*/React.createElement("label", {
|
|
71
71
|
className: cls,
|
|
72
72
|
style: style,
|
|
73
|
-
onClick: handleClick
|
|
73
|
+
onClick: handleClick,
|
|
74
|
+
"aria-disabled": disabled || undefined
|
|
74
75
|
}, /*#__PURE__*/React.createElement("span", {
|
|
75
76
|
className: clsx(prefixCls, _defineProperty({}, "".concat(prefixCls, "-disabled"), disabled))
|
|
76
77
|
}, /*#__PURE__*/React.createElement("input", _extends({}, rest, {
|
|
@@ -81,11 +82,11 @@ var Radio = /*#__PURE__*/React.forwardRef(function (baseprops, ref) {
|
|
|
81
82
|
value: value,
|
|
82
83
|
checked: mergedChecked,
|
|
83
84
|
disabled: disabled,
|
|
84
|
-
onChange: handleChange
|
|
85
|
-
"aria-checked": mergedChecked
|
|
85
|
+
onChange: handleChange
|
|
86
86
|
})), !buttonStyle && /*#__PURE__*/React.createElement("span", {
|
|
87
87
|
className: clsx("".concat(prefixCls, "-inner"), classNames === null || classNames === void 0 ? void 0 : classNames.inner),
|
|
88
|
-
style: styles === null || styles === void 0 ? void 0 : styles.inner
|
|
88
|
+
style: styles === null || styles === void 0 ? void 0 : styles.inner,
|
|
89
|
+
"aria-hidden": "true"
|
|
89
90
|
})), /*#__PURE__*/React.createElement("span", {
|
|
90
91
|
className: clsx("".concat(prefixCls, "-label"), classNames === null || classNames === void 0 ? void 0 : classNames.label),
|
|
91
92
|
style: styles === null || styles === void 0 ? void 0 : styles.label
|