@kdcloudjs/kdesign 1.8.29 → 1.8.31
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 +897 -83
- package/dist/kdesign.css +650 -7
- package/dist/kdesign.css.map +1 -1
- package/dist/kdesign.js +188 -109
- 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/ConfigContext.d.ts +4 -0
- package/es/config-provider/ConfigContext.js +2 -0
- package/es/config-provider/compDefaultProps.d.ts +0 -1
- package/es/config-provider/compDefaultProps.js +0 -5
- package/es/config-provider/defaultConfig.d.ts +1 -0
- package/es/config-provider/defaultConfig.js +2 -1
- package/es/dropdown/dropdown.js +4 -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/pagination/pagination.js +16 -13
- package/es/pagination/style/index.css +72 -0
- package/es/pagination/style/index.less +99 -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/ConfigContext.d.ts +4 -0
- package/lib/config-provider/ConfigContext.js +4 -1
- package/lib/config-provider/compDefaultProps.d.ts +0 -1
- package/lib/config-provider/compDefaultProps.js +0 -5
- package/lib/config-provider/defaultConfig.d.ts +1 -0
- package/lib/config-provider/defaultConfig.js +2 -1
- package/lib/dropdown/dropdown.js +4 -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/pagination/pagination.js +16 -13
- package/lib/pagination/style/index.css +72 -0
- package/lib/pagination/style/index.less +99 -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/es/menu/style/index.less
CHANGED
|
@@ -124,13 +124,13 @@
|
|
|
124
124
|
|
|
125
125
|
// dark
|
|
126
126
|
.@{menu-dark-prefix-cls} {
|
|
127
|
-
|
|
128
127
|
.@{submenu-prefix-cls}-sub {
|
|
129
128
|
color: @menu-sub-color;
|
|
130
129
|
background: @menu-sub-inline-color-background;
|
|
131
130
|
}
|
|
132
131
|
|
|
133
|
-
.@{submenu-prefix-cls}-sub-second,
|
|
132
|
+
.@{submenu-prefix-cls}-sub-second,
|
|
133
|
+
.@{submenu-prefix-cls}-sub-third {
|
|
134
134
|
background: @menu-sub-color-background;
|
|
135
135
|
}
|
|
136
136
|
|
|
@@ -140,29 +140,32 @@
|
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
&-active {
|
|
143
|
-
.menu-dark-active()
|
|
143
|
+
.menu-dark-active();
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
-
.@{menuitem-prefix-cls}-active,
|
|
148
|
-
|
|
147
|
+
.@{menuitem-prefix-cls}-active,
|
|
148
|
+
.@{submenu-prefix-cls}-active {
|
|
149
|
+
.menu-dark-active();
|
|
149
150
|
}
|
|
150
151
|
|
|
151
|
-
.@{menuitem-prefix-cls}-hover,
|
|
152
|
-
|
|
152
|
+
.@{menuitem-prefix-cls}-hover,
|
|
153
|
+
.@{submenu-prefix-cls}-hover {
|
|
154
|
+
.menu-dark-hover();
|
|
153
155
|
}
|
|
154
156
|
}
|
|
155
157
|
|
|
156
158
|
.@{menu-inline-prefix-cls}.@{menu-dark-prefix-cls} {
|
|
157
|
-
.@{menuitem-prefix-cls}-active,
|
|
159
|
+
.@{menuitem-prefix-cls}-active,
|
|
160
|
+
.@{submenu-prefix-cls}-active {
|
|
158
161
|
.@{submenu-prefix-cls}-title {
|
|
159
|
-
.menu-dark-active-inline-title()
|
|
162
|
+
.menu-dark-active-inline-title();
|
|
160
163
|
}
|
|
161
164
|
}
|
|
162
165
|
|
|
163
166
|
.@{submenu-prefix-cls}:not(.@{submenu-prefix-cls}-disabled):not(.@{submenu-prefix-cls}-active) {
|
|
164
167
|
> .@{submenu-prefix-cls}-title:hover {
|
|
165
|
-
.menu-dark-active-inline-title()
|
|
168
|
+
.menu-dark-active-inline-title();
|
|
166
169
|
}
|
|
167
170
|
}
|
|
168
171
|
}
|
|
@@ -173,9 +176,10 @@
|
|
|
173
176
|
}
|
|
174
177
|
|
|
175
178
|
.@{menu-inline-prefix-cls}.@{menu-light-prefix-cls} {
|
|
176
|
-
.@{menuitem-prefix-cls}-active,
|
|
179
|
+
.@{menuitem-prefix-cls}-active,
|
|
180
|
+
.@{submenu-prefix-cls}-active {
|
|
177
181
|
.@{submenu-prefix-cls}-title {
|
|
178
|
-
.menu-light-active-inline-title()
|
|
182
|
+
.menu-light-active-inline-title();
|
|
179
183
|
}
|
|
180
184
|
}
|
|
181
185
|
}
|
|
@@ -187,7 +191,7 @@
|
|
|
187
191
|
}
|
|
188
192
|
|
|
189
193
|
&.hidden {
|
|
190
|
-
.menu-hidden()
|
|
194
|
+
.menu-hidden();
|
|
191
195
|
}
|
|
192
196
|
|
|
193
197
|
.@{submenu-prefix-cls} {
|
|
@@ -197,18 +201,18 @@
|
|
|
197
201
|
color: @menu-sub-color;
|
|
198
202
|
background: @menu-sub-inline-color-background;
|
|
199
203
|
box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
200
|
-
|
|
204
|
+
0 9px 28px 8px rgba(0, 0, 0, 0.05);
|
|
201
205
|
|
|
202
206
|
.@{menuitem-prefix-cls} {
|
|
203
207
|
&:not(.@{menuitem-prefix-cls}-disabled):not(.@{menuitem-prefix-cls}-active):hover,
|
|
204
208
|
&-active {
|
|
205
|
-
.menu-dark-hover()
|
|
209
|
+
.menu-dark-hover();
|
|
206
210
|
}
|
|
207
211
|
}
|
|
208
212
|
|
|
209
213
|
&-second,
|
|
210
214
|
&-third {
|
|
211
|
-
animation: kdZoomTopLeftIn calc(@menu-motion-duration - 0.1s) cubic-bezier(0, .4, .4, 1) forwards;
|
|
215
|
+
animation: kdZoomTopLeftIn calc(@menu-motion-duration - 0.1s) cubic-bezier(0, 0.4, 0.4, 1) forwards;
|
|
212
216
|
opacity: 1;
|
|
213
217
|
visibility: visible;
|
|
214
218
|
transition: opacity, visibility;
|
|
@@ -217,7 +221,7 @@
|
|
|
217
221
|
}
|
|
218
222
|
|
|
219
223
|
&-hide {
|
|
220
|
-
.menu-hidden()
|
|
224
|
+
.menu-hidden();
|
|
221
225
|
}
|
|
222
226
|
}
|
|
223
227
|
}
|
|
@@ -227,10 +231,17 @@
|
|
|
227
231
|
}
|
|
228
232
|
}
|
|
229
233
|
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
234
|
+
.@{menu-prefix-cls}-rtl {
|
|
235
|
+
direction: rtl;
|
|
236
|
+
.@{submenu-prefix-cls} {
|
|
237
|
+
direction: rtl;
|
|
238
|
+
.@{submenu-prefix-cls}-title {
|
|
239
|
+
.@{submenu-prefix-cls}-arrow {
|
|
240
|
+
margin-left: 0;
|
|
241
|
+
margin-right: auto;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
235
246
|
|
|
236
247
|
|
package/es/menu/subMenu.js
CHANGED
|
@@ -29,7 +29,8 @@ var SubMenu = function SubMenu(props) {
|
|
|
29
29
|
var _React$useContext = React.useContext(ConfigContext),
|
|
30
30
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
31
31
|
pkgPrefixCls = _React$useContext.prefixCls,
|
|
32
|
-
userDefaultProps = _React$useContext.compDefaultProps
|
|
32
|
+
userDefaultProps = _React$useContext.compDefaultProps,
|
|
33
|
+
direction = _React$useContext.direction;
|
|
33
34
|
var _a = getCompProps('MenuSubMenu', userDefaultProps, props),
|
|
34
35
|
customPrefixcls = _a.prefixCls,
|
|
35
36
|
theme = _a.theme,
|
|
@@ -226,9 +227,10 @@ var SubMenu = function SubMenu(props) {
|
|
|
226
227
|
onMouseEnter: handleOnMouseEnter,
|
|
227
228
|
onClick: handleOnClickSubMenu
|
|
228
229
|
};
|
|
230
|
+
var isRtl = direction === 'rtl';
|
|
229
231
|
var titleStyle = {
|
|
230
|
-
paddingRight: "".concat(curPaddingRight, "px"),
|
|
231
|
-
paddingLeft: "".concat(curPaddingLeft, "px")
|
|
232
|
+
paddingRight: isRtl ? "".concat(curPaddingLeft, "px") : "".concat(curPaddingRight, "px"),
|
|
233
|
+
paddingLeft: isRtl ? "".concat(curPaddingRight, "px") : "".concat(curPaddingLeft, "px")
|
|
232
234
|
};
|
|
233
235
|
var verticalView = usePopper(React.createElement("li", _extends({
|
|
234
236
|
className: classNames(prefixCls, className, (_classNames2 = {}, _defineProperty(_classNames2, "light", theme === 'light'), _defineProperty(_classNames2, "".concat(prefixCls, "-collapsed"), collapsed), _defineProperty(_classNames2, "".concat(prefixCls, "-disabled"), disabled), _defineProperty(_classNames2, "".concat(prefixCls, "-hover"), !disabled && Array.isArray(openKeys) && _includesInstanceProperty(openKeys).call(openKeys, keyValue)), _defineProperty(_classNames2, "".concat(prefixCls, "-active"), Array.isArray(selectedKeyPath) && _includesInstanceProperty(selectedKeyPath).call(selectedKeyPath, keyValue)), _classNames2)),
|
|
@@ -275,7 +277,7 @@ var SubMenu = function SubMenu(props) {
|
|
|
275
277
|
});
|
|
276
278
|
}))), {
|
|
277
279
|
arrow: false,
|
|
278
|
-
placement: 'rightTop',
|
|
280
|
+
placement: direction === 'rtl' ? 'leftTop' : 'rightTop',
|
|
279
281
|
gap: 0,
|
|
280
282
|
visible: isVertical && !disabled ? visible : false,
|
|
281
283
|
disabled: isVertical ? undefined : true,
|
package/es/modal/modal.js
CHANGED
|
@@ -54,7 +54,8 @@ var InternalModal = function InternalModal(props, ref) {
|
|
|
54
54
|
var _useContext = useContext(ConfigContext),
|
|
55
55
|
getPrefixCls = _useContext.getPrefixCls,
|
|
56
56
|
prefixCls = _useContext.prefixCls,
|
|
57
|
-
userDefaultProps = _useContext.compDefaultProps
|
|
57
|
+
userDefaultProps = _useContext.compDefaultProps,
|
|
58
|
+
direction = _useContext.direction;
|
|
58
59
|
var modalProps = getCompProps('Modal', userDefaultProps, props);
|
|
59
60
|
var body = modalProps.body,
|
|
60
61
|
bodyClassName = modalProps.bodyClassName,
|
|
@@ -108,6 +109,7 @@ var InternalModal = function InternalModal(props, ref) {
|
|
|
108
109
|
var wrapperRef = useRef(null);
|
|
109
110
|
var containerRef = ref || innerRef;
|
|
110
111
|
var modalPrefixCls = getPrefixCls(prefixCls, 'modal', customPrefixcls);
|
|
112
|
+
var rtlCls = direction === 'rtl' ? "".concat(modalPrefixCls, "-rtl") : null;
|
|
111
113
|
devWarning(ModalTypes.indexOf(type) === -1, 'modal', "cannot found modal type '".concat(type, "'"));
|
|
112
114
|
var modalContainer = typeof getContainer === 'function' ? getContainer() : getContainer;
|
|
113
115
|
if (modalContainer !== false && !(modalContainer instanceof HTMLElement)) {
|
|
@@ -372,7 +374,7 @@ var InternalModal = function InternalModal(props, ref) {
|
|
|
372
374
|
}
|
|
373
375
|
};
|
|
374
376
|
var isHidden = !destroyOnClose && !(isForceController ? visible : innerVisible);
|
|
375
|
-
var modalClasses = classNames(modalPrefixCls, className, (_classNames3 = {}, _defineProperty(_classNames3, "".concat(modalPrefixCls, "-container"), true), _defineProperty(_classNames3, "".concat(modalPrefixCls, "-container-ie"), isIE), _defineProperty(_classNames3, "".concat(modalPrefixCls, "-container-hidden"), isHidden), _defineProperty(_classNames3, "".concat(modalPrefixCls, "-container-show"), !isHidden), _classNames3));
|
|
377
|
+
var modalClasses = classNames(modalPrefixCls, rtlCls, className, (_classNames3 = {}, _defineProperty(_classNames3, "".concat(modalPrefixCls, "-container"), true), _defineProperty(_classNames3, "".concat(modalPrefixCls, "-container-ie"), isIE), _defineProperty(_classNames3, "".concat(modalPrefixCls, "-container-hidden"), isHidden), _defineProperty(_classNames3, "".concat(modalPrefixCls, "-container-show"), !isHidden), _classNames3));
|
|
376
378
|
var headerClass = classNames("".concat(modalPrefixCls, "-header"), titleClassName);
|
|
377
379
|
var container = React.createElement("div", {
|
|
378
380
|
className: classNames((_classNames4 = {}, _defineProperty(_classNames4, "".concat(modalPrefixCls, "-container-box"), true), _defineProperty(_classNames4, "".concat(modalPrefixCls, "-has-container-box"), modalContainer && !overroll), _defineProperty(_classNames4, "".concat(modalPrefixCls, "-showline"), showline), _classNames4)),
|
package/es/modal/style/index.css
CHANGED
|
@@ -347,3 +347,10 @@
|
|
|
347
347
|
.kd-modal-showline .kd-modal-footer {
|
|
348
348
|
border-top: var(--kd-c-modal-sizing-border, 1px) solid var(--kd-c-modal-color-border, var(--kd-g-color-border-strong-2, #d9d9d9));
|
|
349
349
|
}
|
|
350
|
+
.kd-modal-rtl {
|
|
351
|
+
direction: rtl;
|
|
352
|
+
}
|
|
353
|
+
.kd-modal-rtl .kd-modal-container-box .kd-modal-footer .kd-modal-cancel-node .kd-modal-margin-btn {
|
|
354
|
+
margin-left: var(--kd-c-modal-footer-button-spacing, 12px);
|
|
355
|
+
margin-right: 0;
|
|
356
|
+
}
|
|
@@ -226,3 +226,17 @@
|
|
|
226
226
|
border-top: @modal-border-width solid @modal-border-color;
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
|
+
|
|
230
|
+
.@{modal-prefix-cls}-rtl {
|
|
231
|
+
direction: rtl;
|
|
232
|
+
.@{modal-prefix-cls}-container-box {
|
|
233
|
+
.@{modal-prefix-cls}-footer {
|
|
234
|
+
.@{modal-prefix-cls}-cancel-node {
|
|
235
|
+
.@{modal-prefix-cls}-margin-btn {
|
|
236
|
+
margin-left: @modal-footer-button-spacing;
|
|
237
|
+
margin-right: 0;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
@@ -21,7 +21,8 @@ var Pagination = function Pagination(props) {
|
|
|
21
21
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
22
22
|
pkgPrefixCls = _React$useContext.prefixCls,
|
|
23
23
|
userDefaultProps = _React$useContext.compDefaultProps,
|
|
24
|
-
locale = _React$useContext.locale
|
|
24
|
+
locale = _React$useContext.locale,
|
|
25
|
+
direction = _React$useContext.direction;
|
|
25
26
|
var paginationLangMsg = locale.getCompLangMsg({
|
|
26
27
|
componentName: 'Pagination'
|
|
27
28
|
});
|
|
@@ -48,6 +49,7 @@ var Pagination = function Pagination(props) {
|
|
|
48
49
|
customPrefixcls = _getCompProps.prefixCls;
|
|
49
50
|
devWarning(PageTypes.indexOf(pageType) === -1, 'Pagination', "cannot found pageType '".concat(pageType, "'"));
|
|
50
51
|
var prefixCls = getPrefixCls(pkgPrefixCls, 'pagination', customPrefixcls);
|
|
52
|
+
var rtlCls = direction === 'rtl' ? "".concat(prefixCls, "-rtl") : null;
|
|
51
53
|
var _React$useState = React.useState(pageSize || defaultPageSize),
|
|
52
54
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
53
55
|
size = _React$useState2[0],
|
|
@@ -77,25 +79,25 @@ var Pagination = function Pagination(props) {
|
|
|
77
79
|
setIsOpen = _React$useState8[1];
|
|
78
80
|
var innerIcon = _extends({
|
|
79
81
|
first: React.createElement(Icon, {
|
|
80
|
-
type: "first
|
|
82
|
+
type: "".concat(direction === 'rtl' ? 'last' : 'first')
|
|
81
83
|
}),
|
|
82
84
|
last: React.createElement(Icon, {
|
|
83
|
-
type: "last
|
|
85
|
+
type: "".concat(direction === 'rtl' ? 'first' : 'last')
|
|
84
86
|
}),
|
|
85
87
|
prev: React.createElement(Icon, {
|
|
86
|
-
type: "arrow-left
|
|
88
|
+
type: "arrow-".concat(direction === 'rtl' ? 'right' : 'left')
|
|
87
89
|
}),
|
|
88
90
|
next: React.createElement(Icon, {
|
|
89
|
-
type: "arrow-right
|
|
91
|
+
type: "arrow-".concat(direction === 'rtl' ? 'left' : 'right')
|
|
90
92
|
}),
|
|
91
93
|
down: React.createElement(Icon, {
|
|
92
94
|
type: "arrow-down"
|
|
93
95
|
}),
|
|
94
96
|
jumpPrev: React.createElement(Icon, {
|
|
95
|
-
type: "double-arrow-left
|
|
97
|
+
type: "double-arrow-".concat(direction === 'rtl' ? 'right' : 'left')
|
|
96
98
|
}),
|
|
97
99
|
jumpNext: React.createElement(Icon, {
|
|
98
|
-
type: "double-arrow-right
|
|
100
|
+
type: "double-arrow-".concat(direction === 'rtl' ? 'left' : 'right')
|
|
99
101
|
})
|
|
100
102
|
}, icons || {});
|
|
101
103
|
var handleChangeSize = function handleChangeSize(key) {
|
|
@@ -193,7 +195,7 @@ var Pagination = function Pagination(props) {
|
|
|
193
195
|
className: "".concat(prefixCls, "-total")
|
|
194
196
|
}, mapTotalText[showTotal]);
|
|
195
197
|
var normalPagination = React.createElement("div", {
|
|
196
|
-
className: classNames(prefixCls, className),
|
|
198
|
+
className: classNames(prefixCls, rtlCls, className),
|
|
197
199
|
style: style
|
|
198
200
|
}, Total, showJumper && React.createElement("span", {
|
|
199
201
|
className: "".concat(prefixCls, "-current")
|
|
@@ -228,7 +230,7 @@ var Pagination = function Pagination(props) {
|
|
|
228
230
|
selectedKey: size,
|
|
229
231
|
menu: sizeOptions,
|
|
230
232
|
trigger: "click",
|
|
231
|
-
placement:
|
|
233
|
+
placement: direction === 'rtl' ? 'bottomRight' : 'bottomLeft',
|
|
232
234
|
disabled: disabled,
|
|
233
235
|
prefix: "".concat(prefixCls, "-dropdown"),
|
|
234
236
|
popperStyle: {
|
|
@@ -246,7 +248,7 @@ var Pagination = function Pagination(props) {
|
|
|
246
248
|
size: size
|
|
247
249
|
})), innerIcon.down))));
|
|
248
250
|
var simplePagination = React.createElement("div", {
|
|
249
|
-
className: classNames(prefixCls, 'simple', className),
|
|
251
|
+
className: classNames(prefixCls, rtlCls, 'simple', className),
|
|
250
252
|
style: style
|
|
251
253
|
}, Total, React.createElement("ul", {
|
|
252
254
|
className: classNames("".concat(prefixCls, "-action"), {
|
|
@@ -276,7 +278,7 @@ var Pagination = function Pagination(props) {
|
|
|
276
278
|
var lessPagination = null;
|
|
277
279
|
if (pageType === 'less') {
|
|
278
280
|
lessPagination = React.createElement("div", {
|
|
279
|
-
className: classNames(prefixCls, 'less', {
|
|
281
|
+
className: classNames(prefixCls, rtlCls, 'less', {
|
|
280
282
|
bordered: bordered,
|
|
281
283
|
disabled: disabled
|
|
282
284
|
}, className),
|
|
@@ -314,7 +316,7 @@ var Pagination = function Pagination(props) {
|
|
|
314
316
|
page >= 5 && nicetyPages.unshift(1, '<<');
|
|
315
317
|
}
|
|
316
318
|
var nicetyPagination = React.createElement("div", {
|
|
317
|
-
className: classNames(prefixCls, 'nicety', {
|
|
319
|
+
className: classNames(prefixCls, rtlCls, 'nicety', {
|
|
318
320
|
bordered: bordered,
|
|
319
321
|
disabled: disabled
|
|
320
322
|
}, className),
|
|
@@ -371,7 +373,8 @@ var Pagination = function Pagination(props) {
|
|
|
371
373
|
onItemClick: handleChangeSize,
|
|
372
374
|
getPopupContainer: function getPopupContainer(triggerNode) {
|
|
373
375
|
return triggerNode === null || triggerNode === void 0 ? void 0 : triggerNode.parentElement;
|
|
374
|
-
}
|
|
376
|
+
},
|
|
377
|
+
placement: direction === 'rtl' ? 'bottomRight' : 'bottomLeft'
|
|
375
378
|
}, dropdownProps, {
|
|
376
379
|
onVisibleChange: dropdownVisibleChange
|
|
377
380
|
}), React.createElement("button", {
|
|
@@ -815,3 +815,75 @@
|
|
|
815
815
|
-webkit-transform: rotate(180deg);
|
|
816
816
|
transform: rotate(180deg);
|
|
817
817
|
}
|
|
818
|
+
.kd-pagination-rtl {
|
|
819
|
+
direction: rtl;
|
|
820
|
+
}
|
|
821
|
+
.kd-pagination-rtl .kd-pagination-total {
|
|
822
|
+
margin-left: 12px;
|
|
823
|
+
margin-right: 0;
|
|
824
|
+
}
|
|
825
|
+
.kd-pagination-rtl .kd-pagination-current {
|
|
826
|
+
margin-right: 0;
|
|
827
|
+
margin-left: 12px;
|
|
828
|
+
}
|
|
829
|
+
.kd-pagination-rtl .kd-pagination-action .kd-pagination-action-item.bordered {
|
|
830
|
+
margin-left: calc(2 * var(--kd-c-pagination-button-spacing, 4px));
|
|
831
|
+
margin-right: 0;
|
|
832
|
+
}
|
|
833
|
+
.kd-pagination-rtl .kd-pagination-action .kd-pagination-action-item.bordered:last-child {
|
|
834
|
+
margin-left: 0;
|
|
835
|
+
}
|
|
836
|
+
.kd-pagination-rtl .kd-pagination-selector {
|
|
837
|
+
margin-right: 20px;
|
|
838
|
+
margin-left: 0;
|
|
839
|
+
}
|
|
840
|
+
.kd-pagination-rtl .kd-pagination-selector .kd-pagination-selector-size i {
|
|
841
|
+
margin-left: 0;
|
|
842
|
+
margin-right: 4px;
|
|
843
|
+
}
|
|
844
|
+
.kd-pagination-rtl.simple .kd-pagination-action-item .kd-pagination-current {
|
|
845
|
+
margin-right: 0;
|
|
846
|
+
margin-left: 2px;
|
|
847
|
+
}
|
|
848
|
+
.kd-pagination-rtl.simple .kd-pagination-action-item .kd-pagination-total {
|
|
849
|
+
margin-left: 0;
|
|
850
|
+
margin-right: 2px;
|
|
851
|
+
}
|
|
852
|
+
.kd-pagination-rtl.less .kd-pagination-pages-item {
|
|
853
|
+
margin-left: var(--kd-c-pagination-button-spacing, 4px);
|
|
854
|
+
margin-right: 0;
|
|
855
|
+
}
|
|
856
|
+
.kd-pagination-rtl.less .kd-pagination-pages-item:last-child {
|
|
857
|
+
margin-left: 0;
|
|
858
|
+
}
|
|
859
|
+
.kd-pagination-rtl.nicety .kd-pagination-pages-item {
|
|
860
|
+
margin-left: var(--kd-c-pagination-button-spacing, 4px);
|
|
861
|
+
margin-right: 0;
|
|
862
|
+
}
|
|
863
|
+
.kd-pagination-rtl.nicety .kd-pagination-pages-item:last-child {
|
|
864
|
+
margin-left: 0;
|
|
865
|
+
}
|
|
866
|
+
.kd-pagination-rtl.nicety .kd-pagination-jumper {
|
|
867
|
+
margin-right: var(--kd-c-pagination-button-spacing, 4px);
|
|
868
|
+
margin-left: 0;
|
|
869
|
+
}
|
|
870
|
+
.kd-pagination-rtl.nicety .kd-pagination-jumper .kd-pagination-jumper-button {
|
|
871
|
+
margin-right: var(--kd-c-pagination-button-spacing, 4px);
|
|
872
|
+
margin-left: 0;
|
|
873
|
+
}
|
|
874
|
+
.kd-pagination-rtl.nicety .kd-pagination-options {
|
|
875
|
+
margin-right: 22px;
|
|
876
|
+
margin-left: 0;
|
|
877
|
+
}
|
|
878
|
+
.kd-pagination-rtl.nicety .kd-pagination-options .kd-pagination-options-size {
|
|
879
|
+
margin-right: 0;
|
|
880
|
+
margin-left: 8px;
|
|
881
|
+
padding: 0 4px 0 24px;
|
|
882
|
+
}
|
|
883
|
+
.kd-pagination-rtl.nicety .kd-pagination-options .kd-pagination-options-size i {
|
|
884
|
+
left: 5px;
|
|
885
|
+
right: auto;
|
|
886
|
+
}
|
|
887
|
+
.kd-pagination-rtl.nicety .kd-pagination-options .kd-dropdown-menu-item > span {
|
|
888
|
+
text-align: right;
|
|
889
|
+
}
|
|
@@ -617,3 +617,102 @@
|
|
|
617
617
|
}
|
|
618
618
|
}
|
|
619
619
|
}
|
|
620
|
+
|
|
621
|
+
.@{pagination-prefix-cls}-rtl {
|
|
622
|
+
direction: rtl;
|
|
623
|
+
.@{pagination-prefix-cls}-total {
|
|
624
|
+
margin-left: 12px;
|
|
625
|
+
margin-right: 0;
|
|
626
|
+
}
|
|
627
|
+
.@{pagination-prefix-cls}-current {
|
|
628
|
+
margin-right: 0;
|
|
629
|
+
margin-left: 12px;
|
|
630
|
+
}
|
|
631
|
+
.@{pagination-action-prefix-cls} {
|
|
632
|
+
.@{pagination-action-prefix-cls}-item {
|
|
633
|
+
&.bordered {
|
|
634
|
+
margin-left: calc(2 * @pagination-button-spacing);
|
|
635
|
+
margin-right: 0;
|
|
636
|
+
&:last-child {
|
|
637
|
+
margin-left: 0;
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
.@{pagination-selector-prefix-cls} {
|
|
643
|
+
margin-right: 20px;
|
|
644
|
+
margin-left: 0;
|
|
645
|
+
.@{pagination-selector-prefix-cls}-size {
|
|
646
|
+
i {
|
|
647
|
+
margin-left: 0;
|
|
648
|
+
margin-right: 4px;
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
&.simple {
|
|
653
|
+
.@{pagination-prefix-cls}-action {
|
|
654
|
+
&-item {
|
|
655
|
+
.@{pagination-prefix-cls}-current {
|
|
656
|
+
margin-right: 0;
|
|
657
|
+
margin-left: 2px;
|
|
658
|
+
}
|
|
659
|
+
.@{pagination-prefix-cls}-total {
|
|
660
|
+
margin-left: 0;
|
|
661
|
+
margin-right: 2px;
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
&.less {
|
|
667
|
+
.@{pagination-pages-prefix-cls} {
|
|
668
|
+
&-item {
|
|
669
|
+
margin-left: @pagination-button-spacing;
|
|
670
|
+
margin-right: 0;
|
|
671
|
+
&:last-child {
|
|
672
|
+
margin-left: 0;
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
&.nicety {
|
|
678
|
+
.@{pagination-pages-prefix-cls} {
|
|
679
|
+
&-item {
|
|
680
|
+
margin-left: @pagination-button-spacing;
|
|
681
|
+
margin-right: 0;
|
|
682
|
+
&:last-child {
|
|
683
|
+
margin-left: 0;
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
.@{pagination-jumper-prefix-cls} {
|
|
688
|
+
margin-right: @pagination-button-spacing;
|
|
689
|
+
margin-left: 0;
|
|
690
|
+
.@{pagination-jumper-prefix-cls}-button {
|
|
691
|
+
margin-right: @pagination-button-spacing;
|
|
692
|
+
margin-left: 0;
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
.@{pagination-options-prefix-cls} {
|
|
696
|
+
margin-right: 22px;
|
|
697
|
+
margin-left: 0;
|
|
698
|
+
.@{pagination-options-prefix-cls}-size {
|
|
699
|
+
margin-right: 0;
|
|
700
|
+
margin-left: 8px;
|
|
701
|
+
padding: 0 4px 0 24px;
|
|
702
|
+
i {
|
|
703
|
+
left: 5px;
|
|
704
|
+
right: auto;
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
.@{kd-prefix}-dropdown {
|
|
708
|
+
&-menu {
|
|
709
|
+
&-item {
|
|
710
|
+
& > span {
|
|
711
|
+
text-align: right;
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
}
|
package/es/qr-code/qr-code.js
CHANGED
|
@@ -18,7 +18,8 @@ var QRCode = function QRCode(props) {
|
|
|
18
18
|
getPrefixCls = _useContext.getPrefixCls,
|
|
19
19
|
prefixCls = _useContext.prefixCls,
|
|
20
20
|
userDefaultProps = _useContext.compDefaultProps,
|
|
21
|
-
getCompLangMsg = _useContext.locale.getCompLangMsg
|
|
21
|
+
getCompLangMsg = _useContext.locale.getCompLangMsg,
|
|
22
|
+
direction = _useContext.direction;
|
|
22
23
|
var qrCodeProps = getCompProps('QRCode', userDefaultProps, props);
|
|
23
24
|
var value = qrCodeProps.value,
|
|
24
25
|
size = qrCodeProps.size,
|
|
@@ -37,7 +38,8 @@ var QRCode = function QRCode(props) {
|
|
|
37
38
|
var className = qrCodeProps.className,
|
|
38
39
|
customPrefixcls = qrCodeProps.prefixCls;
|
|
39
40
|
var qrCodePrefixCls = getPrefixCls(prefixCls, 'qrcode', customPrefixcls);
|
|
40
|
-
var
|
|
41
|
+
var rtlCls = direction === 'rtl' ? "".concat(qrCodePrefixCls, "-rtl") : null;
|
|
42
|
+
var qrCodeClass = classNames(qrCodePrefixCls, rtlCls, className, _defineProperty({}, "".concat(qrCodePrefixCls, "-borderless"), !bordered));
|
|
41
43
|
var qrCodeLangMsg = getCompLangMsg({
|
|
42
44
|
componentName: 'QRCode'
|
|
43
45
|
});
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
list-style: none;
|
|
20
20
|
overflow: hidden;
|
|
21
21
|
|
|
22
|
-
&-expired{
|
|
22
|
+
&-expired {
|
|
23
23
|
margin-bottom: @qrcode-spacing-margin-vertical;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
&-mask{
|
|
26
|
+
&-mask {
|
|
27
27
|
position: absolute;
|
|
28
28
|
z-index: 10;
|
|
29
29
|
display: flex;
|
|
@@ -36,7 +36,11 @@
|
|
|
36
36
|
background: @qrcode-color-background;
|
|
37
37
|
text-align: center;
|
|
38
38
|
}
|
|
39
|
-
&-borderless{
|
|
39
|
+
&-borderless {
|
|
40
40
|
border: none;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
+
|
|
44
|
+
.@{qrcode-prefix-cls}-rtl {
|
|
45
|
+
direction: rtl;
|
|
46
|
+
}
|
package/es/radio/group.js
CHANGED
|
@@ -11,7 +11,8 @@ var RadioGroup = React.forwardRef(function (props, ref) {
|
|
|
11
11
|
var _React$useContext = React.useContext(ConfigContext),
|
|
12
12
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
13
13
|
prefixCls = _React$useContext.prefixCls,
|
|
14
|
-
userDefaultProps = _React$useContext.compDefaultProps
|
|
14
|
+
userDefaultProps = _React$useContext.compDefaultProps,
|
|
15
|
+
direction = _React$useContext.direction;
|
|
15
16
|
var initValue = typeof props.value === 'undefined' ? props.defaultValue : props.value;
|
|
16
17
|
var _React$useState = React.useState(initValue),
|
|
17
18
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -43,6 +44,7 @@ var RadioGroup = React.forwardRef(function (props, ref) {
|
|
|
43
44
|
optionType = _getCompProps.optionType,
|
|
44
45
|
customPrefixcls = _getCompProps.prefixCls;
|
|
45
46
|
var groupPrefixCls = getPrefixCls === null || getPrefixCls === void 0 ? void 0 : getPrefixCls(prefixCls, "radio-group", customPrefixcls);
|
|
47
|
+
var rtlCls = direction === 'rtl' ? "".concat(groupPrefixCls, "-rtl") : null;
|
|
46
48
|
var radioPrefixCls = getPrefixCls === null || getPrefixCls === void 0 ? void 0 : getPrefixCls(prefixCls, "radio", customPrefixcls);
|
|
47
49
|
var childrenToRender = children;
|
|
48
50
|
if (options && options.length > 0) {
|
|
@@ -69,7 +71,7 @@ var RadioGroup = React.forwardRef(function (props, ref) {
|
|
|
69
71
|
});
|
|
70
72
|
}
|
|
71
73
|
return React.createElement("div", {
|
|
72
|
-
className: classNames(groupPrefixCls, className),
|
|
74
|
+
className: classNames(groupPrefixCls, rtlCls, className),
|
|
73
75
|
style: style,
|
|
74
76
|
id: id,
|
|
75
77
|
ref: ref
|
package/es/radio/radio.js
CHANGED
|
@@ -25,7 +25,8 @@ var InternalRadio = function InternalRadio(props, ref) {
|
|
|
25
25
|
var _React$useContext = React.useContext(ConfigContext),
|
|
26
26
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
27
27
|
prefixCls = _React$useContext.prefixCls,
|
|
28
|
-
userDefaultProps = _React$useContext.compDefaultProps
|
|
28
|
+
userDefaultProps = _React$useContext.compDefaultProps,
|
|
29
|
+
direction = _React$useContext.direction;
|
|
29
30
|
var innerRef = React.useRef();
|
|
30
31
|
var mergedRef = ref || innerRef;
|
|
31
32
|
var _a = getCompProps('Radio', userDefaultProps, props),
|
|
@@ -47,6 +48,7 @@ var InternalRadio = function InternalRadio(props, ref) {
|
|
|
47
48
|
return "radio".concat(radioType === 'square' ? "-".concat(radioType) : '');
|
|
48
49
|
};
|
|
49
50
|
var radioPrefixCls = getPrefixCls === null || getPrefixCls === void 0 ? void 0 : getPrefixCls(prefixCls, getPrefix(radioType), customPrefixcls);
|
|
51
|
+
var rtlCls = direction === 'rtl' ? "".concat(radioPrefixCls, "-rtl") : null;
|
|
50
52
|
var _React$useState = React.useState(initValue),
|
|
51
53
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
52
54
|
isChecked = _React$useState2[0],
|
|
@@ -67,7 +69,7 @@ var InternalRadio = function InternalRadio(props, ref) {
|
|
|
67
69
|
context.onChange(e, value);
|
|
68
70
|
}
|
|
69
71
|
};
|
|
70
|
-
var classString = classNames((_classNames = {}, _defineProperty(_classNames, "".concat(radioPrefixCls), true), _defineProperty(_classNames, "".concat(radioPrefixCls, "-disabled"), disabled), _defineProperty(_classNames, "".concat(radioPrefixCls, "-checked"), isChecked), _classNames), className);
|
|
72
|
+
var classString = classNames(rtlCls, (_classNames = {}, _defineProperty(_classNames, "".concat(radioPrefixCls), true), _defineProperty(_classNames, "".concat(radioPrefixCls, "-disabled"), disabled), _defineProperty(_classNames, "".concat(radioPrefixCls, "-checked"), isChecked), _classNames), className);
|
|
71
73
|
useEffect(function () {
|
|
72
74
|
var _a;
|
|
73
75
|
var handleRepeatClick = function handleRepeatClick(e) {
|
package/es/radio/style/index.css
CHANGED
|
@@ -454,3 +454,41 @@
|
|
|
454
454
|
display: block;
|
|
455
455
|
line-height: 1.5;
|
|
456
456
|
}
|
|
457
|
+
.kd-radio-rtl {
|
|
458
|
+
direction: rtl;
|
|
459
|
+
}
|
|
460
|
+
.kd-radio-button-rtl {
|
|
461
|
+
direction: rtl;
|
|
462
|
+
}
|
|
463
|
+
.kd-radio-button-rtl.kd-radio-button {
|
|
464
|
+
border: var(--kd-c-radio-radius-border-width, 1px) solid var(--kd-c-radio-color-border, var(--kd-g-color-border-strong, #d9d9d9));
|
|
465
|
+
border-right: none;
|
|
466
|
+
}
|
|
467
|
+
.kd-radio-button-rtl.kd-radio-button.kd-radio-button:first-child {
|
|
468
|
+
border-radius: 0 2px 2px 0;
|
|
469
|
+
border-right: var(--kd-c-radio-radius-border-width, 1px) solid var(--kd-c-radio-color-border, var(--kd-g-color-border-strong, #d9d9d9));
|
|
470
|
+
}
|
|
471
|
+
.kd-radio-button-rtl.kd-radio-button.kd-radio-button:first-child::before {
|
|
472
|
+
content: none;
|
|
473
|
+
}
|
|
474
|
+
.kd-radio-button-rtl.kd-radio-button.kd-radio-button:last-child {
|
|
475
|
+
border-radius: 2px 0 0 2px;
|
|
476
|
+
}
|
|
477
|
+
.kd-radio-square-rtl {
|
|
478
|
+
direction: rtl;
|
|
479
|
+
}
|
|
480
|
+
.kd-radio-square-rtl.kd-radio-square {
|
|
481
|
+
margin-left: var(--kd-c-radio-spacing-margin-right, 8px);
|
|
482
|
+
margin-right: 0;
|
|
483
|
+
}
|
|
484
|
+
.kd-radio-square-rtl.kd-radio-square.kd-radio-square::after {
|
|
485
|
+
left: calc(-1 * (var(--kd-c-radio-square-sizing-height, 32px) - 10px) / 2);
|
|
486
|
+
right: auto;
|
|
487
|
+
}
|
|
488
|
+
.kd-radio-square-rtl.kd-radio-square.kd-radio-square-checked::after {
|
|
489
|
+
left: calc(-1 * (var(--kd-c-radio-square-sizing-height, 32px) - 10px) / 2);
|
|
490
|
+
right: auto;
|
|
491
|
+
}
|
|
492
|
+
.kd-radio-group-rtl {
|
|
493
|
+
direction: rtl;
|
|
494
|
+
}
|