@kdcloudjs/kdesign 1.3.5 → 1.3.8

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.
@@ -139,7 +139,7 @@ var InternalAnchor = function InternalAnchor(props, ref) {
139
139
 
140
140
  var anchorMenuClass = classNames(_defineProperty({}, "".concat(anchorPrefixCls, "-menu"), true));
141
141
  var anchorAdvancedClass = classNames(_defineProperty({}, "".concat(anchorPrefixCls, "-advanced"), true));
142
- var inkClass = classNames("".concat(anchorPrefixCls, "-ink-line"), {
142
+ var inkClass = classNames("".concat(anchorPrefixCls, "-line-slider"), {
143
143
  visible: activeLink
144
144
  });
145
145
  React.useEffect(function () {
@@ -296,7 +296,7 @@ var InternalAnchor = function InternalAnchor(props, ref) {
296
296
  getScrollContainer().addEventListener('scroll', handleScroll);
297
297
  handleScroll();
298
298
  return function () {
299
- return window.removeEventListener('scroll', handleScroll);
299
+ return getScrollContainer().removeEventListener('scroll', handleScroll);
300
300
  };
301
301
  }, [handleScroll, getScrollContainer]);
302
302
  useEffect(function () {
@@ -371,7 +371,7 @@ var InternalAnchor = function InternalAnchor(props, ref) {
371
371
  width: anchorPosition.width
372
372
  } : undefined
373
373
  }, /*#__PURE__*/React.createElement("div", {
374
- className: "".concat(anchorPrefixCls, "-ink")
374
+ className: "".concat(anchorPrefixCls, "-line")
375
375
  }, /*#__PURE__*/React.createElement("span", {
376
376
  className: inkClass,
377
377
  ref: inkRef
@@ -189,7 +189,7 @@
189
189
  content: '';
190
190
  height: 0;
191
191
  width: 40px;
192
- border-bottom: var(--kd-c-anchor-ink-line-spacing-width, 1px) dashed var(--kd-c-anchor-color-border-disabled, var(--kd-g-color-border-disabled, #ccc));
192
+ border-bottom: var(--kd-c-anchor-line-slider-spacing-width, 1px) dashed var(--kd-c-anchor-color-border-disabled, var(--kd-g-color-border-disabled, #ccc));
193
193
  margin: 4px;
194
194
  }
195
195
  .kd-anchor-advanced-arrows {
@@ -227,31 +227,31 @@
227
227
  .kd-anchor-advanced .kd-anchor {
228
228
  max-width: var(--kd-c-anchor-advanced-sizing-width, 160px);
229
229
  }
230
- .kd-anchor-ink {
230
+ .kd-anchor-line {
231
231
  position: absolute;
232
232
  left: var(--kd-c-anchor-spacing-horizontal, 7px);
233
233
  top: 0;
234
234
  height: 100%;
235
235
  }
236
- .kd-anchor-ink::before {
236
+ .kd-anchor-line::before {
237
237
  position: relative;
238
238
  display: block;
239
- width: var(--kd-c-anchor-ink-line-spacing-width, 1px);
239
+ width: var(--kd-c-anchor-line-slider-spacing-width, 1px);
240
240
  height: 100%;
241
241
  margin: 0 auto;
242
242
  background-color: var(--kd-c-anchor-color-border, var(--kd-g-color-border-strong, #d9d9d9));
243
243
  content: '';
244
244
  }
245
- .kd-anchor-ink-line {
245
+ .kd-anchor-line-slider {
246
246
  position: absolute;
247
247
  display: none;
248
248
  width: 0;
249
249
  height: 16px;
250
- border-right: var(--kd-c-anchor-ink-line-spacing-width, 1px) solid var(--kd-c-anchor-color-theme, var(--kd-g-color-theme, #5582f3));
250
+ border-right: var(--kd-c-anchor-line-slider-spacing-width, 1px) solid var(--kd-c-anchor-color-theme, var(--kd-g-color-theme, #5582f3));
251
251
  -webkit-transition: top 0.3s ease-in-out;
252
252
  transition: top 0.3s ease-in-out;
253
253
  }
254
- .kd-anchor-ink-line.visible {
254
+ .kd-anchor-line-slider.visible {
255
255
  display: inline-block;
256
256
  }
257
257
  .kd-anchor-link {
@@ -83,7 +83,7 @@
83
83
  content: '';
84
84
  height: 0;
85
85
  width: 40px;
86
- border-bottom: @anchor-ink-line-width dashed @anchor-disabled-border-color;
86
+ border-bottom: @anchor-line-slider-width dashed @anchor-disabled-border-color;
87
87
  margin: 4px;
88
88
  }
89
89
  }
@@ -123,7 +123,7 @@
123
123
  }
124
124
  }
125
125
 
126
- &-ink {
126
+ &-line {
127
127
  position: absolute;
128
128
  left: @anchor-link-left;
129
129
  top: 0;
@@ -131,19 +131,19 @@
131
131
  &::before {
132
132
  position: relative;
133
133
  display: block;
134
- width: @anchor-ink-line-width;
134
+ width: @anchor-line-slider-width;
135
135
  height: 100%;
136
136
  margin: 0 auto;
137
137
  background-color: @anchor-border-color;
138
138
  content: '';
139
139
  }
140
140
 
141
- &-line {
141
+ &-slider {
142
142
  position: absolute;
143
143
  display: none;
144
144
  width: 0;
145
145
  height: 16px;
146
- border-right: @anchor-ink-line-width solid @anchor-color-theme;
146
+ border-right: @anchor-line-slider-width solid @anchor-color-theme;
147
147
  transition: top 0.3s ease-in-out;
148
148
  &.visible {
149
149
  display: inline-block;
@@ -22,7 +22,7 @@
22
22
  @anchor-link-secondary-padding: var(~'@{anchor-prefix}-secondary-spacing-padding', 12px 8px);
23
23
  @anchor-advanced-padding-top: var(~'@{anchor-prefix}-advanced-spacing-padding-top', 8px);
24
24
  @anchor-advanced-padding-bottom: var(~'@{anchor-prefix}-advanced-spacing-padding-bottom', 7px);
25
- @anchor-ink-line-width: var(~'@{anchor-prefix}-ink-line-spacing-width', 1px);
25
+ @anchor-line-slider-width: var(~'@{anchor-prefix}-line-slider-spacing-width', 1px);
26
26
 
27
27
 
28
28
  // font
@@ -241,6 +241,15 @@
241
241
  .kd-btn-size-small.kd-btn-icon-only {
242
242
  font-size: var(--kd-c-button-icon-font-size-small, 14px);
243
243
  padding: 0 var(--kd-c-button-icon-spacing-padding-horizontal, 4px);
244
+ display: -webkit-inline-box;
245
+ display: -ms-inline-flexbox;
246
+ display: inline-flex;
247
+ -webkit-box-pack: center;
248
+ -ms-flex-pack: center;
249
+ justify-content: center;
250
+ -webkit-box-align: center;
251
+ -ms-flex-align: center;
252
+ align-items: center;
244
253
  }
245
254
  .kd-btn-size-small .kd-btn-group-basic-icon {
246
255
  font-size: var(--kd-c-button-icon-font-size-small, 14px);
@@ -255,6 +264,15 @@
255
264
  .kd-btn-size-middle.kd-btn-icon-only {
256
265
  font-size: var(--kd-c-button-icon-font-size-middle, 16px);
257
266
  padding: 0 var(--kd-c-button-icon-spacing-padding-horizontal, 4px);
267
+ display: -webkit-inline-box;
268
+ display: -ms-inline-flexbox;
269
+ display: inline-flex;
270
+ -webkit-box-pack: center;
271
+ -ms-flex-pack: center;
272
+ justify-content: center;
273
+ -webkit-box-align: center;
274
+ -ms-flex-align: center;
275
+ align-items: center;
258
276
  }
259
277
  .kd-btn-size-middle .kd-btn-group-basic-icon {
260
278
  font-size: var(--kd-c-button-icon-font-size-middle, 16px);
@@ -269,6 +287,15 @@
269
287
  .kd-btn-size-large.kd-btn-icon-only {
270
288
  font-size: var(--kd-c-button-icon-font-size-large, 18px);
271
289
  padding: 0 var(--kd-c-button-icon-spacing-padding-horizontal, 4px);
290
+ display: -webkit-inline-box;
291
+ display: -ms-inline-flexbox;
292
+ display: inline-flex;
293
+ -webkit-box-pack: center;
294
+ -ms-flex-pack: center;
295
+ justify-content: center;
296
+ -webkit-box-align: center;
297
+ -ms-flex-align: center;
298
+ align-items: center;
272
299
  }
273
300
  .kd-btn-size-large .kd-btn-group-basic-icon {
274
301
  font-size: var(--kd-c-button-icon-font-size-large, 18px);
@@ -337,6 +364,15 @@
337
364
  }
338
365
  .kd-btn-loading {
339
366
  cursor: default;
367
+ display: -webkit-inline-box;
368
+ display: -ms-inline-flexbox;
369
+ display: inline-flex;
370
+ -webkit-box-pack: center;
371
+ -ms-flex-pack: center;
372
+ justify-content: center;
373
+ -webkit-box-align: center;
374
+ -ms-flex-align: center;
375
+ align-items: center;
340
376
  }
341
377
  .kd-btn-block {
342
378
  width: 100%;
@@ -114,6 +114,9 @@
114
114
  &.@{btn-prefix-cls}-icon-only {
115
115
  font-size: @btn-icon-small-font-size;
116
116
  padding: 0 @btn-icon-padding-horizontal;
117
+ display: inline-flex;
118
+ justify-content: center;
119
+ align-items: center;
117
120
  }
118
121
 
119
122
  .@{btn-prefix-cls}-group-basic-icon {
@@ -127,6 +130,9 @@
127
130
  &.@{btn-prefix-cls}-icon-only {
128
131
  font-size: @btn-icon-middle-font-size;
129
132
  padding: 0 @btn-icon-padding-horizontal;
133
+ display: inline-flex;
134
+ justify-content: center;
135
+ align-items: center;
130
136
  }
131
137
 
132
138
  .@{btn-prefix-cls}-group-basic-icon {
@@ -140,6 +146,9 @@
140
146
  &.@{btn-prefix-cls}-icon-only {
141
147
  font-size: @btn-icon-large-font-size;
142
148
  padding: 0 @btn-icon-padding-horizontal;
149
+ display: inline-flex;
150
+ justify-content: center;
151
+ align-items: center;
143
152
  }
144
153
 
145
154
  .@{btn-prefix-cls}-group-basic-icon {
@@ -234,6 +243,9 @@
234
243
  // 加载中按钮
235
244
  &-loading {
236
245
  cursor: default;
246
+ display: inline-flex;
247
+ justify-content: center;
248
+ align-items: center;
237
249
  }
238
250
  // 按钮开启块化撑满父元素
239
251
  &-block {
@@ -271,11 +283,11 @@
271
283
  background: @btn-group-trigger-color-background-hover;
272
284
  border-color: @btn-group-trigger-color-background-hover;
273
285
  }
274
-
286
+
275
287
  &:active {
276
288
  background: @btn-group-trigger-color-background-active;
277
289
  }
278
-
290
+
279
291
  &:disabled {
280
292
  background: @btn-group-trigger-color-background-disabled !important;
281
293
  }
@@ -72,6 +72,8 @@ var InternalCheckbox = function InternalCheckbox(props, ref) {
72
72
  isBoolean(checked) && checked !== selected && setSelected(checked);
73
73
  }, [checked, selected]);
74
74
  useEffect(function () {
75
+ var _a;
76
+
75
77
  var handleRepeatClick = function handleRepeatClick(e) {
76
78
  var element = e.target;
77
79
 
@@ -80,10 +82,12 @@ var InternalCheckbox = function InternalCheckbox(props, ref) {
80
82
  }
81
83
  };
82
84
 
83
- labelRef.current.addEventListener('click', handleRepeatClick);
85
+ (_a = labelRef === null || labelRef === void 0 ? void 0 : labelRef.current) === null || _a === void 0 ? void 0 : _a.addEventListener('click', handleRepeatClick);
84
86
  return function () {
85
- // eslint-disable-next-line react-hooks/exhaustive-deps
86
- labelRef.current.removeEventListener('click', handleRepeatClick);
87
+ var _a; // eslint-disable-next-line react-hooks/exhaustive-deps
88
+
89
+
90
+ (_a = labelRef === null || labelRef === void 0 ? void 0 : labelRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('click', handleRepeatClick);
87
91
  };
88
92
  }, []);
89
93
 
package/es/radio/radio.js CHANGED
@@ -86,6 +86,8 @@ var InternalRadio = function InternalRadio(props, ref) {
86
86
  var classString = classNames((_classNames = {}, _defineProperty(_classNames, "".concat(radioPrefixCls), true), _defineProperty(_classNames, "".concat(radioPrefixCls, "-disabled"), radioProps.disabled), _defineProperty(_classNames, "".concat(radioPrefixCls, "-checked"), context ? radioProps.checked : isChecked), _classNames), className); // 单选包裹元素class名称
87
87
 
88
88
  useEffect(function () {
89
+ var _a;
90
+
89
91
  var handleRepeatClick = function handleRepeatClick(e) {
90
92
  var element = e.target;
91
93
 
@@ -95,10 +97,12 @@ var InternalRadio = function InternalRadio(props, ref) {
95
97
  };
96
98
 
97
99
  var radioRef = mergedRef;
98
- radioRef.current.addEventListener('click', handleRepeatClick);
100
+ (_a = radioRef === null || radioRef === void 0 ? void 0 : radioRef.current) === null || _a === void 0 ? void 0 : _a.addEventListener('click', handleRepeatClick);
99
101
  return function () {
100
- // eslint-disable-next-line react-hooks/exhaustive-deps
101
- radioRef.current.removeEventListener('click', handleRepeatClick);
102
+ var _a; // eslint-disable-next-line react-hooks/exhaustive-deps
103
+
104
+
105
+ (_a = radioRef === null || radioRef === void 0 ? void 0 : radioRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('click', handleRepeatClick);
102
106
  };
103
107
  }, []);
104
108
  return (
@@ -185,7 +185,7 @@
185
185
  .kd-switch-size-small {
186
186
  height: var(--kd-c-switch-small-sizing-height, 16px);
187
187
  min-width: var(--kd-c-switch-small-sizing-width, 32px);
188
- line-height: var(--kd-c-switch-small-line-height, 14px);
188
+ line-height: var(--kd-c-switch-small-line-height, 16px);
189
189
  font-size: var(--kd-c-switch-small-font-size, var(--kd-g-font-size-small, 12px));
190
190
  border-radius: var(--kd-c-switch-small-radius-border, 8px);
191
191
  }
@@ -17,7 +17,7 @@
17
17
 
18
18
  // line-height
19
19
  @switch-large-line-height: var(~'@{switch-prefix}-large-line-height', 20px);
20
- @switch-small-line-height: var(~'@{switch-prefix}-small-line-height', 14px);
20
+ @switch-small-line-height: var(~'@{switch-prefix}-small-line-height', 16px);
21
21
 
22
22
  //radius
23
23
  @switch-small-border-radius: var(~'@{switch-prefix}-small-radius-border', 8px);
@@ -186,7 +186,7 @@ var InternalAnchor = function InternalAnchor(props, ref) {
186
186
 
187
187
  var anchorMenuClass = (0, _classnames.default)((0, _defineProperty2.default)({}, "".concat(anchorPrefixCls, "-menu"), true));
188
188
  var anchorAdvancedClass = (0, _classnames.default)((0, _defineProperty2.default)({}, "".concat(anchorPrefixCls, "-advanced"), true));
189
- var inkClass = (0, _classnames.default)("".concat(anchorPrefixCls, "-ink-line"), {
189
+ var inkClass = (0, _classnames.default)("".concat(anchorPrefixCls, "-line-slider"), {
190
190
  visible: activeLink
191
191
  });
192
192
 
@@ -343,7 +343,7 @@ var InternalAnchor = function InternalAnchor(props, ref) {
343
343
  getScrollContainer().addEventListener('scroll', handleScroll);
344
344
  handleScroll();
345
345
  return function () {
346
- return window.removeEventListener('scroll', handleScroll);
346
+ return getScrollContainer().removeEventListener('scroll', handleScroll);
347
347
  };
348
348
  }, [handleScroll, getScrollContainer]);
349
349
  (0, _react.useEffect)(function () {
@@ -418,7 +418,7 @@ var InternalAnchor = function InternalAnchor(props, ref) {
418
418
  width: anchorPosition.width
419
419
  } : undefined
420
420
  }, /*#__PURE__*/_react.default.createElement("div", {
421
- className: "".concat(anchorPrefixCls, "-ink")
421
+ className: "".concat(anchorPrefixCls, "-line")
422
422
  }, /*#__PURE__*/_react.default.createElement("span", {
423
423
  className: inkClass,
424
424
  ref: inkRef
@@ -189,7 +189,7 @@
189
189
  content: '';
190
190
  height: 0;
191
191
  width: 40px;
192
- border-bottom: var(--kd-c-anchor-ink-line-spacing-width, 1px) dashed var(--kd-c-anchor-color-border-disabled, var(--kd-g-color-border-disabled, #ccc));
192
+ border-bottom: var(--kd-c-anchor-line-slider-spacing-width, 1px) dashed var(--kd-c-anchor-color-border-disabled, var(--kd-g-color-border-disabled, #ccc));
193
193
  margin: 4px;
194
194
  }
195
195
  .kd-anchor-advanced-arrows {
@@ -227,31 +227,31 @@
227
227
  .kd-anchor-advanced .kd-anchor {
228
228
  max-width: var(--kd-c-anchor-advanced-sizing-width, 160px);
229
229
  }
230
- .kd-anchor-ink {
230
+ .kd-anchor-line {
231
231
  position: absolute;
232
232
  left: var(--kd-c-anchor-spacing-horizontal, 7px);
233
233
  top: 0;
234
234
  height: 100%;
235
235
  }
236
- .kd-anchor-ink::before {
236
+ .kd-anchor-line::before {
237
237
  position: relative;
238
238
  display: block;
239
- width: var(--kd-c-anchor-ink-line-spacing-width, 1px);
239
+ width: var(--kd-c-anchor-line-slider-spacing-width, 1px);
240
240
  height: 100%;
241
241
  margin: 0 auto;
242
242
  background-color: var(--kd-c-anchor-color-border, var(--kd-g-color-border-strong, #d9d9d9));
243
243
  content: '';
244
244
  }
245
- .kd-anchor-ink-line {
245
+ .kd-anchor-line-slider {
246
246
  position: absolute;
247
247
  display: none;
248
248
  width: 0;
249
249
  height: 16px;
250
- border-right: var(--kd-c-anchor-ink-line-spacing-width, 1px) solid var(--kd-c-anchor-color-theme, var(--kd-g-color-theme, #5582f3));
250
+ border-right: var(--kd-c-anchor-line-slider-spacing-width, 1px) solid var(--kd-c-anchor-color-theme, var(--kd-g-color-theme, #5582f3));
251
251
  -webkit-transition: top 0.3s ease-in-out;
252
252
  transition: top 0.3s ease-in-out;
253
253
  }
254
- .kd-anchor-ink-line.visible {
254
+ .kd-anchor-line-slider.visible {
255
255
  display: inline-block;
256
256
  }
257
257
  .kd-anchor-link {
@@ -83,7 +83,7 @@
83
83
  content: '';
84
84
  height: 0;
85
85
  width: 40px;
86
- border-bottom: @anchor-ink-line-width dashed @anchor-disabled-border-color;
86
+ border-bottom: @anchor-line-slider-width dashed @anchor-disabled-border-color;
87
87
  margin: 4px;
88
88
  }
89
89
  }
@@ -123,7 +123,7 @@
123
123
  }
124
124
  }
125
125
 
126
- &-ink {
126
+ &-line {
127
127
  position: absolute;
128
128
  left: @anchor-link-left;
129
129
  top: 0;
@@ -131,19 +131,19 @@
131
131
  &::before {
132
132
  position: relative;
133
133
  display: block;
134
- width: @anchor-ink-line-width;
134
+ width: @anchor-line-slider-width;
135
135
  height: 100%;
136
136
  margin: 0 auto;
137
137
  background-color: @anchor-border-color;
138
138
  content: '';
139
139
  }
140
140
 
141
- &-line {
141
+ &-slider {
142
142
  position: absolute;
143
143
  display: none;
144
144
  width: 0;
145
145
  height: 16px;
146
- border-right: @anchor-ink-line-width solid @anchor-color-theme;
146
+ border-right: @anchor-line-slider-width solid @anchor-color-theme;
147
147
  transition: top 0.3s ease-in-out;
148
148
  &.visible {
149
149
  display: inline-block;
@@ -22,7 +22,7 @@
22
22
  @anchor-link-secondary-padding: var(~'@{anchor-prefix}-secondary-spacing-padding', 12px 8px);
23
23
  @anchor-advanced-padding-top: var(~'@{anchor-prefix}-advanced-spacing-padding-top', 8px);
24
24
  @anchor-advanced-padding-bottom: var(~'@{anchor-prefix}-advanced-spacing-padding-bottom', 7px);
25
- @anchor-ink-line-width: var(~'@{anchor-prefix}-ink-line-spacing-width', 1px);
25
+ @anchor-line-slider-width: var(~'@{anchor-prefix}-line-slider-spacing-width', 1px);
26
26
 
27
27
 
28
28
  // font
@@ -241,6 +241,15 @@
241
241
  .kd-btn-size-small.kd-btn-icon-only {
242
242
  font-size: var(--kd-c-button-icon-font-size-small, 14px);
243
243
  padding: 0 var(--kd-c-button-icon-spacing-padding-horizontal, 4px);
244
+ display: -webkit-inline-box;
245
+ display: -ms-inline-flexbox;
246
+ display: inline-flex;
247
+ -webkit-box-pack: center;
248
+ -ms-flex-pack: center;
249
+ justify-content: center;
250
+ -webkit-box-align: center;
251
+ -ms-flex-align: center;
252
+ align-items: center;
244
253
  }
245
254
  .kd-btn-size-small .kd-btn-group-basic-icon {
246
255
  font-size: var(--kd-c-button-icon-font-size-small, 14px);
@@ -255,6 +264,15 @@
255
264
  .kd-btn-size-middle.kd-btn-icon-only {
256
265
  font-size: var(--kd-c-button-icon-font-size-middle, 16px);
257
266
  padding: 0 var(--kd-c-button-icon-spacing-padding-horizontal, 4px);
267
+ display: -webkit-inline-box;
268
+ display: -ms-inline-flexbox;
269
+ display: inline-flex;
270
+ -webkit-box-pack: center;
271
+ -ms-flex-pack: center;
272
+ justify-content: center;
273
+ -webkit-box-align: center;
274
+ -ms-flex-align: center;
275
+ align-items: center;
258
276
  }
259
277
  .kd-btn-size-middle .kd-btn-group-basic-icon {
260
278
  font-size: var(--kd-c-button-icon-font-size-middle, 16px);
@@ -269,6 +287,15 @@
269
287
  .kd-btn-size-large.kd-btn-icon-only {
270
288
  font-size: var(--kd-c-button-icon-font-size-large, 18px);
271
289
  padding: 0 var(--kd-c-button-icon-spacing-padding-horizontal, 4px);
290
+ display: -webkit-inline-box;
291
+ display: -ms-inline-flexbox;
292
+ display: inline-flex;
293
+ -webkit-box-pack: center;
294
+ -ms-flex-pack: center;
295
+ justify-content: center;
296
+ -webkit-box-align: center;
297
+ -ms-flex-align: center;
298
+ align-items: center;
272
299
  }
273
300
  .kd-btn-size-large .kd-btn-group-basic-icon {
274
301
  font-size: var(--kd-c-button-icon-font-size-large, 18px);
@@ -337,6 +364,15 @@
337
364
  }
338
365
  .kd-btn-loading {
339
366
  cursor: default;
367
+ display: -webkit-inline-box;
368
+ display: -ms-inline-flexbox;
369
+ display: inline-flex;
370
+ -webkit-box-pack: center;
371
+ -ms-flex-pack: center;
372
+ justify-content: center;
373
+ -webkit-box-align: center;
374
+ -ms-flex-align: center;
375
+ align-items: center;
340
376
  }
341
377
  .kd-btn-block {
342
378
  width: 100%;
@@ -114,6 +114,9 @@
114
114
  &.@{btn-prefix-cls}-icon-only {
115
115
  font-size: @btn-icon-small-font-size;
116
116
  padding: 0 @btn-icon-padding-horizontal;
117
+ display: inline-flex;
118
+ justify-content: center;
119
+ align-items: center;
117
120
  }
118
121
 
119
122
  .@{btn-prefix-cls}-group-basic-icon {
@@ -127,6 +130,9 @@
127
130
  &.@{btn-prefix-cls}-icon-only {
128
131
  font-size: @btn-icon-middle-font-size;
129
132
  padding: 0 @btn-icon-padding-horizontal;
133
+ display: inline-flex;
134
+ justify-content: center;
135
+ align-items: center;
130
136
  }
131
137
 
132
138
  .@{btn-prefix-cls}-group-basic-icon {
@@ -140,6 +146,9 @@
140
146
  &.@{btn-prefix-cls}-icon-only {
141
147
  font-size: @btn-icon-large-font-size;
142
148
  padding: 0 @btn-icon-padding-horizontal;
149
+ display: inline-flex;
150
+ justify-content: center;
151
+ align-items: center;
143
152
  }
144
153
 
145
154
  .@{btn-prefix-cls}-group-basic-icon {
@@ -234,6 +243,9 @@
234
243
  // 加载中按钮
235
244
  &-loading {
236
245
  cursor: default;
246
+ display: inline-flex;
247
+ justify-content: center;
248
+ align-items: center;
237
249
  }
238
250
  // 按钮开启块化撑满父元素
239
251
  &-block {
@@ -271,11 +283,11 @@
271
283
  background: @btn-group-trigger-color-background-hover;
272
284
  border-color: @btn-group-trigger-color-background-hover;
273
285
  }
274
-
286
+
275
287
  &:active {
276
288
  background: @btn-group-trigger-color-background-active;
277
289
  }
278
-
290
+
279
291
  &:disabled {
280
292
  background: @btn-group-trigger-color-background-disabled !important;
281
293
  }
@@ -104,6 +104,8 @@ var InternalCheckbox = function InternalCheckbox(props, ref) {
104
104
  (0, _isBoolean.default)(checked) && checked !== selected && setSelected(checked);
105
105
  }, [checked, selected]);
106
106
  (0, _react.useEffect)(function () {
107
+ var _a;
108
+
107
109
  var handleRepeatClick = function handleRepeatClick(e) {
108
110
  var element = e.target;
109
111
 
@@ -112,10 +114,12 @@ var InternalCheckbox = function InternalCheckbox(props, ref) {
112
114
  }
113
115
  };
114
116
 
115
- labelRef.current.addEventListener('click', handleRepeatClick);
117
+ (_a = labelRef === null || labelRef === void 0 ? void 0 : labelRef.current) === null || _a === void 0 ? void 0 : _a.addEventListener('click', handleRepeatClick);
116
118
  return function () {
117
- // eslint-disable-next-line react-hooks/exhaustive-deps
118
- labelRef.current.removeEventListener('click', handleRepeatClick);
119
+ var _a; // eslint-disable-next-line react-hooks/exhaustive-deps
120
+
121
+
122
+ (_a = labelRef === null || labelRef === void 0 ? void 0 : labelRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('click', handleRepeatClick);
119
123
  };
120
124
  }, []);
121
125
 
@@ -113,6 +113,8 @@ var InternalRadio = function InternalRadio(props, ref) {
113
113
  var classString = (0, _classnames.default)((_classNames = {}, (0, _defineProperty2.default)(_classNames, "".concat(radioPrefixCls), true), (0, _defineProperty2.default)(_classNames, "".concat(radioPrefixCls, "-disabled"), radioProps.disabled), (0, _defineProperty2.default)(_classNames, "".concat(radioPrefixCls, "-checked"), context ? radioProps.checked : isChecked), _classNames), className); // 单选包裹元素class名称
114
114
 
115
115
  (0, _react.useEffect)(function () {
116
+ var _a;
117
+
116
118
  var handleRepeatClick = function handleRepeatClick(e) {
117
119
  var element = e.target;
118
120
 
@@ -122,10 +124,12 @@ var InternalRadio = function InternalRadio(props, ref) {
122
124
  };
123
125
 
124
126
  var radioRef = mergedRef;
125
- radioRef.current.addEventListener('click', handleRepeatClick);
127
+ (_a = radioRef === null || radioRef === void 0 ? void 0 : radioRef.current) === null || _a === void 0 ? void 0 : _a.addEventListener('click', handleRepeatClick);
126
128
  return function () {
127
- // eslint-disable-next-line react-hooks/exhaustive-deps
128
- radioRef.current.removeEventListener('click', handleRepeatClick);
129
+ var _a; // eslint-disable-next-line react-hooks/exhaustive-deps
130
+
131
+
132
+ (_a = radioRef === null || radioRef === void 0 ? void 0 : radioRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('click', handleRepeatClick);
129
133
  };
130
134
  }, []);
131
135
  return (
@@ -185,7 +185,7 @@
185
185
  .kd-switch-size-small {
186
186
  height: var(--kd-c-switch-small-sizing-height, 16px);
187
187
  min-width: var(--kd-c-switch-small-sizing-width, 32px);
188
- line-height: var(--kd-c-switch-small-line-height, 14px);
188
+ line-height: var(--kd-c-switch-small-line-height, 16px);
189
189
  font-size: var(--kd-c-switch-small-font-size, var(--kd-g-font-size-small, 12px));
190
190
  border-radius: var(--kd-c-switch-small-radius-border, 8px);
191
191
  }
@@ -17,7 +17,7 @@
17
17
 
18
18
  // line-height
19
19
  @switch-large-line-height: var(~'@{switch-prefix}-large-line-height', 20px);
20
- @switch-small-line-height: var(~'@{switch-prefix}-small-line-height', 14px);
20
+ @switch-small-line-height: var(~'@{switch-prefix}-small-line-height', 16px);
21
21
 
22
22
  //radius
23
23
  @switch-small-border-radius: var(~'@{switch-prefix}-small-radius-border', 8px);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kdcloudjs/kdesign",
3
- "version": "1.3.5",
3
+ "version": "1.3.8",
4
4
  "description": "KDesign 金蝶前端react 组件库",
5
5
  "title": "kdesign",
6
6
  "keywords": [
@@ -76,7 +76,7 @@
76
76
  "@babel/runtime": "^7.10.4",
77
77
  "@babel/runtime-corejs3": "^7.11.2",
78
78
  "@babel/standalone": "^7.14.3",
79
- "@kdcloudjs/table": "^1.1.0",
79
+ "@kdcloudjs/table": "^1.1.1",
80
80
  "@popperjs/core": "^2.5.4",
81
81
  "async-validator": "^3.5.1",
82
82
  "axios": "^0.21.1",