@kdcloudjs/kdesign 1.3.6 → 1.3.7

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.
@@ -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 (
@@ -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 (
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kdcloudjs/kdesign",
3
- "version": "1.3.6",
3
+ "version": "1.3.7",
4
4
  "description": "KDesign 金蝶前端react 组件库",
5
5
  "title": "kdesign",
6
6
  "keywords": [