@kdcloudjs/kdesign 1.8.30 → 1.8.32
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/dist/kdesign-complete.less +798 -83
- package/dist/kdesign.css +578 -7
- package/dist/kdesign.css.map +1 -1
- package/dist/kdesign.js +166 -93
- package/dist/kdesign.js.map +1 -1
- package/dist/kdesign.min.css +3 -3
- package/dist/kdesign.min.js +5 -5
- package/dist/kdesign.min.js.map +1 -1
- package/es/anchor/anchor.js +7 -5
- package/es/anchor/style/index.css +14 -0
- package/es/anchor/style/index.less +15 -0
- package/es/button/button.js +4 -2
- package/es/button/group.js +5 -3
- package/es/button/style/index.css +32 -0
- package/es/button/style/index.less +42 -1
- package/es/checkbox/checkbox.js +5 -3
- package/es/checkbox/group.js +4 -2
- package/es/checkbox/style/index.css +38 -1
- package/es/checkbox/style/index.less +56 -15
- package/es/city-picker/city-picker.js +32 -14
- package/es/city-picker/option.js +7 -2
- package/es/city-picker/style/index.css +54 -0
- package/es/city-picker/style/index.less +67 -0
- package/es/collapse/collapse.js +4 -2
- package/es/collapse/style/index.css +24 -0
- package/es/collapse/style/index.less +26 -0
- package/es/color-picker/color-picker.js +6 -4
- package/es/color-picker/style/index.css +129 -4
- package/es/color-picker/style/index.less +174 -29
- package/es/config-provider/compDefaultProps.d.ts +0 -1
- package/es/config-provider/compDefaultProps.js +0 -5
- package/es/dropdown/dropdown.js +5 -2
- package/es/dropdown/menu.js +4 -2
- package/es/dropdown/style/index.css +3 -0
- package/es/dropdown/style/index.less +4 -0
- package/es/image/preview.js +6 -4
- package/es/image/style/index.css +11 -0
- package/es/image/style/index.less +20 -4
- package/es/input/ClearableLabeledInput.d.ts +1 -0
- package/es/input/ClearableLabeledInput.js +6 -4
- package/es/input/TextArea.js +7 -4
- package/es/input/input.js +6 -3
- package/es/input/style/index.css +48 -0
- package/es/input/style/index.less +55 -0
- package/es/link/link.js +4 -2
- package/es/link/style/index.css +11 -0
- package/es/link/style/index.less +14 -0
- package/es/menu/menu.js +4 -2
- package/es/menu/menuItem.js +5 -3
- package/es/menu/style/index.css +10 -0
- package/es/menu/style/index.less +33 -22
- package/es/menu/subMenu.js +6 -4
- package/es/modal/modal.js +4 -2
- package/es/modal/style/index.css +7 -0
- package/es/modal/style/index.less +14 -0
- package/es/qr-code/qr-code.js +4 -2
- package/es/qr-code/style/index.css +3 -0
- package/es/qr-code/style/index.less +7 -3
- package/es/radio/group.js +4 -2
- package/es/radio/radio.js +4 -2
- package/es/radio/style/index.css +38 -0
- package/es/radio/style/index.less +46 -0
- package/es/select/option.js +4 -2
- package/es/select/select.js +8 -6
- package/es/select/style/index.css +61 -0
- package/es/select/style/index.less +87 -0
- package/es/steps/Steps.js +4 -2
- package/es/steps/style/index.css +35 -0
- package/es/steps/style/index.less +59 -5
- package/es/switch/style/index.css +9 -0
- package/es/switch/style/index.less +9 -2
- package/es/switch/switch.js +4 -2
- package/es/tag/style/index.css +7 -0
- package/es/tag/style/index.less +8 -0
- package/es/tag/tag.js +4 -2
- package/es/tree/style/index.css +19 -0
- package/es/tree/style/index.less +27 -0
- package/es/tree/tree.js +4 -2
- package/es/tree/treeNode.js +3 -2
- package/es/upload/style/index.css +24 -1
- package/es/upload/style/index.less +40 -2
- package/es/upload/upload.js +4 -2
- package/lib/anchor/anchor.js +7 -5
- package/lib/anchor/style/index.css +14 -0
- package/lib/anchor/style/index.less +15 -0
- package/lib/button/button.js +4 -2
- package/lib/button/group.js +5 -3
- package/lib/button/style/index.css +32 -0
- package/lib/button/style/index.less +42 -1
- package/lib/checkbox/checkbox.js +5 -3
- package/lib/checkbox/group.js +4 -2
- package/lib/checkbox/style/index.css +38 -1
- package/lib/checkbox/style/index.less +56 -15
- package/lib/city-picker/city-picker.js +32 -14
- package/lib/city-picker/option.js +7 -2
- package/lib/city-picker/style/index.css +54 -0
- package/lib/city-picker/style/index.less +67 -0
- package/lib/collapse/collapse.js +4 -2
- package/lib/collapse/style/index.css +24 -0
- package/lib/collapse/style/index.less +26 -0
- package/lib/color-picker/color-picker.js +6 -4
- package/lib/color-picker/style/index.css +129 -4
- package/lib/color-picker/style/index.less +174 -29
- package/lib/config-provider/compDefaultProps.d.ts +0 -1
- package/lib/config-provider/compDefaultProps.js +0 -5
- package/lib/dropdown/dropdown.js +5 -2
- package/lib/dropdown/menu.js +4 -2
- package/lib/dropdown/style/index.css +3 -0
- package/lib/dropdown/style/index.less +4 -0
- package/lib/image/preview.js +6 -4
- package/lib/image/style/index.css +11 -0
- package/lib/image/style/index.less +20 -4
- package/lib/input/ClearableLabeledInput.d.ts +1 -0
- package/lib/input/ClearableLabeledInput.js +6 -4
- package/lib/input/TextArea.js +7 -4
- package/lib/input/input.js +6 -3
- package/lib/input/style/index.css +48 -0
- package/lib/input/style/index.less +55 -0
- package/lib/link/link.js +4 -2
- package/lib/link/style/index.css +11 -0
- package/lib/link/style/index.less +14 -0
- package/lib/menu/menu.js +4 -2
- package/lib/menu/menuItem.js +5 -3
- package/lib/menu/style/index.css +10 -0
- package/lib/menu/style/index.less +33 -22
- package/lib/menu/subMenu.js +6 -4
- package/lib/modal/modal.js +4 -2
- package/lib/modal/style/index.css +7 -0
- package/lib/modal/style/index.less +14 -0
- package/lib/qr-code/qr-code.js +4 -2
- package/lib/qr-code/style/index.css +3 -0
- package/lib/qr-code/style/index.less +7 -3
- package/lib/radio/group.js +4 -2
- package/lib/radio/radio.js +4 -2
- package/lib/radio/style/index.css +38 -0
- package/lib/radio/style/index.less +46 -0
- package/lib/select/option.js +4 -2
- package/lib/select/select.js +8 -6
- package/lib/select/style/index.css +61 -0
- package/lib/select/style/index.less +87 -0
- package/lib/steps/Steps.js +4 -2
- package/lib/steps/style/index.css +35 -0
- package/lib/steps/style/index.less +59 -5
- package/lib/switch/style/index.css +9 -0
- package/lib/switch/style/index.less +9 -2
- package/lib/switch/switch.js +4 -2
- package/lib/tag/style/index.css +7 -0
- package/lib/tag/style/index.less +8 -0
- package/lib/tag/tag.js +4 -2
- package/lib/tree/style/index.css +19 -0
- package/lib/tree/style/index.less +27 -0
- package/lib/tree/tree.js +4 -2
- package/lib/tree/treeNode.js +3 -2
- package/lib/upload/style/index.css +24 -1
- package/lib/upload/style/index.less +40 -2
- package/lib/upload/upload.js +4 -2
- package/package.json +1 -1
package/lib/tag/style/index.css
CHANGED
package/lib/tag/style/index.less
CHANGED
package/lib/tag/tag.js
CHANGED
|
@@ -40,7 +40,8 @@ var InteranalTag = function InteranalTag(props, ref) {
|
|
|
40
40
|
var _useContext = (0, _react.useContext)(_ConfigContext.default),
|
|
41
41
|
getPrefixCls = _useContext.getPrefixCls,
|
|
42
42
|
prefixCls = _useContext.prefixCls,
|
|
43
|
-
userDefaultProps = _useContext.compDefaultProps
|
|
43
|
+
userDefaultProps = _useContext.compDefaultProps,
|
|
44
|
+
direction = _useContext.direction;
|
|
44
45
|
var tagProps = (0, _utils.getCompProps)('Tag', userDefaultProps, props);
|
|
45
46
|
var className = tagProps.className,
|
|
46
47
|
clickable = tagProps.clickable,
|
|
@@ -60,6 +61,7 @@ var InteranalTag = function InteranalTag(props, ref) {
|
|
|
60
61
|
(0, _devwarning.default)(TagTypes.indexOf(type) === -1, 'tag', "cannot found tag type '".concat(type, "'"));
|
|
61
62
|
(0, _devwarning.default)(TagSizes.indexOf(size) === -1, 'tag', "cannot found tag size '".concat(size, "'"));
|
|
62
63
|
var tagPrefixCls = getPrefixCls(prefixCls, 'tag', customPrefixcls);
|
|
64
|
+
var rtlCls = direction === 'rtl' ? "".concat(tagPrefixCls, "-rtl") : null;
|
|
63
65
|
var handleClick = function handleClick(e) {
|
|
64
66
|
if (!clickable) return;
|
|
65
67
|
onClick && onClick(e);
|
|
@@ -87,7 +89,7 @@ var InteranalTag = function InteranalTag(props, ref) {
|
|
|
87
89
|
}, child);
|
|
88
90
|
};
|
|
89
91
|
var isPresetColor = ['process', 'success', 'warning', 'error', 'end', 'expired'].indexOf(color) > -1;
|
|
90
|
-
var tagClasses = (0, _classnames.default)(tagPrefixCls, className, (_classNames = {}, (0, _defineProperty2.default)(_classNames, (0, _concat.default)(_context = "".concat(tagPrefixCls, "-shape-")).call(_context, type), type), (0, _defineProperty2.default)(_classNames, (0, _concat.default)(_context2 = "".concat(tagPrefixCls, "-")).call(_context2, color), isPresetColor), (0, _defineProperty2.default)(_classNames, "".concat(tagPrefixCls, "-has-color"), !isPresetColor && color && type === 'attribute'), (0, _defineProperty2.default)(_classNames, "".concat(tagPrefixCls, "-clickable"), clickable), (0, _defineProperty2.default)(_classNames, "".concat(tagPrefixCls, "-closable"), closable), (0, _defineProperty2.default)(_classNames, (0, _concat.default)(_context3 = "".concat(tagPrefixCls, "-size-")).call(_context3, size), size), (0, _defineProperty2.default)(_classNames, "".concat(tagPrefixCls, "-closable-disabled"), type === 'edit' && disabled), _classNames));
|
|
92
|
+
var tagClasses = (0, _classnames.default)(tagPrefixCls, rtlCls, className, (_classNames = {}, (0, _defineProperty2.default)(_classNames, (0, _concat.default)(_context = "".concat(tagPrefixCls, "-shape-")).call(_context, type), type), (0, _defineProperty2.default)(_classNames, (0, _concat.default)(_context2 = "".concat(tagPrefixCls, "-")).call(_context2, color), isPresetColor), (0, _defineProperty2.default)(_classNames, "".concat(tagPrefixCls, "-has-color"), !isPresetColor && color && type === 'attribute'), (0, _defineProperty2.default)(_classNames, "".concat(tagPrefixCls, "-clickable"), clickable), (0, _defineProperty2.default)(_classNames, "".concat(tagPrefixCls, "-closable"), closable), (0, _defineProperty2.default)(_classNames, (0, _concat.default)(_context3 = "".concat(tagPrefixCls, "-size-")).call(_context3, size), size), (0, _defineProperty2.default)(_classNames, "".concat(tagPrefixCls, "-closable-disabled"), type === 'edit' && disabled), _classNames));
|
|
91
93
|
var tagColorStyle = !isPresetColor && color && type === 'attribute' ? {
|
|
92
94
|
backgroundColor: color
|
|
93
95
|
} : {};
|
package/lib/tree/style/index.css
CHANGED
|
@@ -373,3 +373,22 @@
|
|
|
373
373
|
-ms-flex-align: center;
|
|
374
374
|
align-items: center;
|
|
375
375
|
}
|
|
376
|
+
.kd-tree-rtl {
|
|
377
|
+
direction: rtl;
|
|
378
|
+
}
|
|
379
|
+
.kd-tree-rtl .kd-tree-root .kd-tree-node-item .kd-tree-node-root .kd-tree-node-indent {
|
|
380
|
+
margin-right: 0;
|
|
381
|
+
margin-left: 6px;
|
|
382
|
+
}
|
|
383
|
+
.kd-tree-rtl .kd-tree-root .kd-tree-node-item .kd-tree-node-root .kd-tree-node-title-wrap {
|
|
384
|
+
padding-right: 4px;
|
|
385
|
+
padding-left: 0;
|
|
386
|
+
}
|
|
387
|
+
.kd-tree-rtl .kd-tree-root .kd-tree-node-item .kd-tree-node-root .kd-tree-node-title-wrap .kd-checkbox-default-margin {
|
|
388
|
+
margin-right: 0;
|
|
389
|
+
margin-left: 4px;
|
|
390
|
+
}
|
|
391
|
+
.kd-tree-rtl .kd-tree-root .kd-tree-node-item .kd-tree-node-root .kd-tree-node-animation-expand {
|
|
392
|
+
-webkit-transform: rotate(-90deg);
|
|
393
|
+
transform: rotate(-90deg);
|
|
394
|
+
}
|
|
@@ -200,3 +200,30 @@
|
|
|
200
200
|
align-items: center;
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
|
+
.@{tree-prefix-cls}-rtl {
|
|
204
|
+
direction: rtl;
|
|
205
|
+
.@{tree-prefix-cls}-root {
|
|
206
|
+
.@{tree-node-prefix-cls}-item {
|
|
207
|
+
.@{tree-node-prefix-cls}-root {
|
|
208
|
+
.@{tree-node-prefix-cls}-indent {
|
|
209
|
+
margin-right: 0;
|
|
210
|
+
margin-left: 6px;
|
|
211
|
+
}
|
|
212
|
+
.@{tree-node-prefix-cls}-title-wrap {
|
|
213
|
+
padding-right: 4px;
|
|
214
|
+
padding-left: 0;
|
|
215
|
+
.@{kd-prefix}-checkbox {
|
|
216
|
+
&-default-margin {
|
|
217
|
+
margin-right: 0;
|
|
218
|
+
margin-left: 4px;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
.@{tree-node-prefix-cls}-animation-expand {
|
|
223
|
+
transform: rotate(-90deg);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
package/lib/tree/tree.js
CHANGED
|
@@ -43,7 +43,8 @@ var InternalTree = _react.default.forwardRef(function (props, ref) {
|
|
|
43
43
|
var _useContext = (0, _react.useContext)(_ConfigContext.default),
|
|
44
44
|
getPrefixCls = _useContext.getPrefixCls,
|
|
45
45
|
prefixCls = _useContext.prefixCls,
|
|
46
|
-
userDefaultProps = _useContext.compDefaultProps
|
|
46
|
+
userDefaultProps = _useContext.compDefaultProps,
|
|
47
|
+
direction = _useContext.direction;
|
|
47
48
|
var TreeProps = (0, _utils.getCompProps)('Tree', userDefaultProps, props);
|
|
48
49
|
var customPrefixcls = TreeProps.prefixCls,
|
|
49
50
|
treeData = TreeProps.treeData,
|
|
@@ -92,7 +93,8 @@ var InternalTree = _react.default.forwardRef(function (props, ref) {
|
|
|
92
93
|
renderExtra = TreeProps.renderExtra,
|
|
93
94
|
others = __rest(TreeProps, ["prefixCls", "treeData", "virtual", "showIcon", "switcherIcon", "icon", "checkable", "checkStrictly", "disabled", "draggable", "scrollToKey", "expandedKeys", "checkedKeys", "defaultExpandRoot", "defaultExpandAll", "defaultExpandParent", "defaultExpandedKeys", "defaultCheckedKeys", "defaultSelectedKeys", "height", "onCheck", "onExpand", "onDragStart", "onDragOver", "onDragLeave", "onDragEnter", "onDragEnd", "onDrop", "onSelect", "selectedKeys", "setTreeNodeStyle", "setTreeNodeClassName", "estimatedItemSize", "style", "className", "filterTreeNode", "filterValue", "expandOnClickNode", "onlyExpandOnClickIcon", "loadData", "notFoundContent", "showLine", "expandOnFilterNode", "renderExtra"]);
|
|
94
95
|
var treePrefixCls = getPrefixCls(prefixCls, 'tree', customPrefixcls);
|
|
95
|
-
var
|
|
96
|
+
var rtlCls = direction === 'rtl' ? "".concat(treePrefixCls, "-rtl") : null;
|
|
97
|
+
var treeNodeClassName = (0, _classnames.default)(className, rtlCls, (_classNames = {}, (0, _defineProperty2.default)(_classNames, "".concat(treePrefixCls), true), (0, _defineProperty2.default)(_classNames, "".concat(treePrefixCls, "-show-line"), showLine), _classNames));
|
|
96
98
|
var treeRootClassName = "".concat(treePrefixCls, "-root");
|
|
97
99
|
var estimatedItemSize = innerEstimatedItemSize;
|
|
98
100
|
var _React$useMemo = _react.default.useMemo(function () {
|
package/lib/tree/treeNode.js
CHANGED
|
@@ -35,7 +35,8 @@ var TreeNode = _react.default.forwardRef(function (props) {
|
|
|
35
35
|
var _useContext = (0, _react.useContext)(_ConfigContext.default),
|
|
36
36
|
getPrefixCls = _useContext.getPrefixCls,
|
|
37
37
|
prefixCls = _useContext.prefixCls,
|
|
38
|
-
userDefaultProps = _useContext.compDefaultProps
|
|
38
|
+
userDefaultProps = _useContext.compDefaultProps,
|
|
39
|
+
direction = _useContext.direction;
|
|
39
40
|
var TreeNodeProps = (0, _utils.getCompProps)('TreeNode', userDefaultProps, props);
|
|
40
41
|
var nodeKey = TreeNodeProps.nodeKey,
|
|
41
42
|
customPrefixcls = TreeNodeProps.prefixCls,
|
|
@@ -188,7 +189,7 @@ var TreeNode = _react.default.forwardRef(function (props) {
|
|
|
188
189
|
className: (0, _classnames.default)("".concat(treeNodePrefixCls, "-icon"), (_classNames3 = {}, (0, _defineProperty2.default)(_classNames3, "".concat(treeNodePrefixCls, "-animation-expand"), expandState), (0, _defineProperty2.default)(_classNames3, "".concat(treeNodePrefixCls, "-animation-collapse"), !expandState), (0, _defineProperty2.default)(_classNames3, "".concat(treeNodePrefixCls, "-icon-hover"), !expandOnClickNode), _classNames3)),
|
|
189
190
|
onClick: expandOnClickNode ? onlyExpandOnClickIcon ? handleExpandIconClick : undefined : handleExpandIconClick
|
|
190
191
|
}, renderIcon(switcherIcon || _react.default.createElement(_icon.default, {
|
|
191
|
-
type: "arrow-right-solid"
|
|
192
|
+
type: "arrow-".concat(direction === 'rtl' ? 'left' : 'right', "-solid")
|
|
192
193
|
})));
|
|
193
194
|
} else {
|
|
194
195
|
return _react.default.createElement("span", {
|
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
opacity: 0;
|
|
165
165
|
overflow: hidden;
|
|
166
166
|
}
|
|
167
|
-
.kd-upload-input input[type=
|
|
167
|
+
.kd-upload-input input[type='file'] {
|
|
168
168
|
position: absolute;
|
|
169
169
|
top: -20%;
|
|
170
170
|
left: 0;
|
|
@@ -386,3 +386,26 @@
|
|
|
386
386
|
color: var(--kd-c-upload-panel-button-color, #0E5FD8);
|
|
387
387
|
font-size: var(--kd-c-upload-picture-action-font-size, var(--kd-g-font-size-small, 12px));
|
|
388
388
|
}
|
|
389
|
+
.kd-upload-rtl {
|
|
390
|
+
direction: rtl;
|
|
391
|
+
}
|
|
392
|
+
.kd-upload-rtl.kd-upload .kd-upload-text-list-item-name {
|
|
393
|
+
margin: 0 var(--kd-c-upload-text-list-item-name-padding-left, 4px) 0 var(--kd-c-upload-text-list-item-name-padding-right, 8px);
|
|
394
|
+
}
|
|
395
|
+
.kd-upload-rtl.kd-upload .kd-upload-text-list-item-action {
|
|
396
|
+
left: 0;
|
|
397
|
+
right: auto;
|
|
398
|
+
-webkit-transform: translateX(-5px);
|
|
399
|
+
transform: translateX(-5px);
|
|
400
|
+
}
|
|
401
|
+
.kd-upload-rtl.kd-upload .kd-upload-text-list-item-action a:not(:first-child) {
|
|
402
|
+
margin-right: 20px;
|
|
403
|
+
margin-left: 0;
|
|
404
|
+
}
|
|
405
|
+
.kd-upload-rtl.kd-upload .kd-upload-picture-list-item {
|
|
406
|
+
margin: 0 0 28px 28px;
|
|
407
|
+
}
|
|
408
|
+
.kd-upload-rtl.kd-upload .kd-upload-picture-list-item-error a:not(:first-child) {
|
|
409
|
+
margin-right: 10px;
|
|
410
|
+
margin-left: auto;
|
|
411
|
+
}
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
opacity: 0;
|
|
47
47
|
overflow: hidden;
|
|
48
48
|
|
|
49
|
-
input[type=
|
|
49
|
+
input[type='file'] {
|
|
50
50
|
position: absolute;
|
|
51
51
|
top: -20%;
|
|
52
52
|
left: 0;
|
|
@@ -94,7 +94,8 @@
|
|
|
94
94
|
font-size: @upload-font-size;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
&-name
|
|
97
|
+
&-name,
|
|
98
|
+
&-icon {
|
|
98
99
|
cursor: pointer;
|
|
99
100
|
}
|
|
100
101
|
|
|
@@ -239,3 +240,40 @@
|
|
|
239
240
|
}
|
|
240
241
|
}
|
|
241
242
|
}
|
|
243
|
+
|
|
244
|
+
.@{upload-prefix-cls}-rtl {
|
|
245
|
+
direction: rtl;
|
|
246
|
+
&.@{upload-prefix-cls} {
|
|
247
|
+
.@{upload-prefix-text-list-cls} {
|
|
248
|
+
&-item {
|
|
249
|
+
&-name {
|
|
250
|
+
margin: 0 @upload-text-list-item-name-padding-left 0 @upload-text-list-item-name-padding-right;
|
|
251
|
+
}
|
|
252
|
+
&-action {
|
|
253
|
+
left: 0;
|
|
254
|
+
right: auto;
|
|
255
|
+
transform: translateX(-5px);
|
|
256
|
+
a {
|
|
257
|
+
&:not(:first-child) {
|
|
258
|
+
margin-right: 20px;
|
|
259
|
+
margin-left: 0;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
.@{upload-prefix-picture-list-cls} {
|
|
266
|
+
&-item {
|
|
267
|
+
margin: 0 0 28px 28px;
|
|
268
|
+
&-error {
|
|
269
|
+
a {
|
|
270
|
+
&:not(:first-child) {
|
|
271
|
+
margin-right: 10px;
|
|
272
|
+
margin-left: auto;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}
|
package/lib/upload/upload.js
CHANGED
|
@@ -89,7 +89,8 @@ var InternalUpload = function InternalUpload(props, ref) {
|
|
|
89
89
|
var _useContext = (0, _react.useContext)(_ConfigContext.default),
|
|
90
90
|
getPrefixCls = _useContext.getPrefixCls,
|
|
91
91
|
pkgPrefixCls = _useContext.prefixCls,
|
|
92
|
-
userDefaultProps = _useContext.compDefaultProps
|
|
92
|
+
userDefaultProps = _useContext.compDefaultProps,
|
|
93
|
+
direction = _useContext.direction;
|
|
93
94
|
var inputRef = (0, _react.useRef)(null);
|
|
94
95
|
var allProps = (0, _utils.getCompProps)('Upload', userDefaultProps, props);
|
|
95
96
|
var type = allProps.type,
|
|
@@ -325,6 +326,7 @@ var InternalUpload = function InternalUpload(props, ref) {
|
|
|
325
326
|
}
|
|
326
327
|
};
|
|
327
328
|
var prefixCls = getPrefixCls(pkgPrefixCls, 'upload', customPrefixcls);
|
|
329
|
+
var rtlCls = direction === 'rtl' ? "".concat(prefixCls, "-rtl") : null;
|
|
328
330
|
var inputFileProps = {
|
|
329
331
|
accept: accept,
|
|
330
332
|
onClick: onClick,
|
|
@@ -398,7 +400,7 @@ var InternalUpload = function InternalUpload(props, ref) {
|
|
|
398
400
|
};
|
|
399
401
|
});
|
|
400
402
|
return _react.default.createElement("div", {
|
|
401
|
-
className: (0, _classnames.default)(prefixCls, {
|
|
403
|
+
className: (0, _classnames.default)(prefixCls, rtlCls, {
|
|
402
404
|
disabled: disabled
|
|
403
405
|
}, className),
|
|
404
406
|
style: style
|