@kdcloudjs/kdesign 1.8.49 → 1.8.51

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.
@@ -13,6 +13,7 @@ export interface IConfigProps {
13
13
  localeConfig?: LocaleConfigType;
14
14
  locale?: IntlUniversal;
15
15
  direction?: DirectionType;
16
+ isMobile?: boolean;
16
17
  }
17
18
  export interface IContextConfigProps {
18
19
  getPrefixCls?: (configPrefixCls?: string, suffixCls?: string, customizePrefixCls?: string) => string;
@@ -21,6 +22,7 @@ export interface IContextConfigProps {
21
22
  localeConfig?: LocaleConfigType;
22
23
  locale: IntlUniversal;
23
24
  direction?: DirectionType;
25
+ isMobile?: boolean;
24
26
  }
25
27
  declare const ConfigContext: import("react").Context<IContextConfigProps>;
26
28
  export default ConfigContext;
@@ -7,5 +7,6 @@ declare const defaultConfig: {
7
7
  getCompLangMsg: (compLangMsgParams: import("../locale").CompLangMsgParams, customGetLangMsg?: ((componentName: string, labelName: string, params: any) => any) | undefined, localeDate?: any) => any;
8
8
  };
9
9
  direction: "ltr" | "rtl";
10
+ isMobile: boolean;
10
11
  };
11
12
  export default defaultConfig;
@@ -13,6 +13,7 @@ var defaultConfig = {
13
13
  getLangMsg: getLangMsg,
14
14
  getCompLangMsg: getCompLangMsg
15
15
  },
16
- direction: 'ltr'
16
+ direction: 'ltr',
17
+ isMobile: false
17
18
  };
18
19
  export default defaultConfig;
package/es/table/table.js CHANGED
@@ -73,7 +73,8 @@ var Table = forwardRef(function (props, ref) {
73
73
  getPrefixCls = _useContext.getPrefixCls,
74
74
  prefixCls = _useContext.prefixCls,
75
75
  locale = _useContext.locale,
76
- direction = _useContext.direction;
76
+ direction = _useContext.direction,
77
+ isMobile = _useContext.isMobile;
77
78
  var tablePrefixCls = getPrefixCls(prefixCls, customPrefixcls);
78
79
  var tableCls = classNames(tablePrefixCls, className);
79
80
  var localeText = locale.getCompLangMsg({
@@ -85,7 +86,8 @@ var Table = forwardRef(function (props, ref) {
85
86
  Radio: (components === null || components === void 0 ? void 0 : components.Radio) || Radio
86
87
  },
87
88
  localeText: localeText,
88
- direction: direction
89
+ direction: direction,
90
+ isMobile: isMobile
89
91
  }).primaryKey(primaryKey === undefined ? '' : primaryKey).input({
90
92
  columns: columns,
91
93
  dataSource: dataSource
@@ -146,7 +148,9 @@ var Table = forwardRef(function (props, ref) {
146
148
  stickyScrollHeight: stickyScrollHeight,
147
149
  scrollbarWidth: scrollbarWidth,
148
150
  scrollLoad: scrollLoad,
149
- direction: direction
151
+ direction: direction,
152
+ isMobile: isMobile,
153
+ prefixCls: prefixCls
150
154
  }, others));
151
155
  });
152
156
  Table.displayName = 'Table';
@@ -386,7 +386,7 @@
386
386
  max-width: var(--kd-c-tabs-pane-text-sizing-max-width);
387
387
  }
388
388
  .kd-tab-pane-text-active,
389
- .kd-tab-pane-text:hover {
389
+ .kd-tab-pane-text-notMobile:hover {
390
390
  color: var(--kd-c-tabs-color-text-active, var(--kd-g-color-theme, #5582f3));
391
391
  }
392
392
  .kd-tab-pane-text-disabled:hover {
@@ -473,12 +473,16 @@
473
473
  -ms-flex-align: center;
474
474
  align-items: center;
475
475
  }
476
- .kd-tab-pane-type-dynamic:not(.kd-tab-pane-disabled):hover .kd-tab-pane-operations span:first-child {
476
+ .kd-tab-pane-type-dynamic .kd-tab-pane-operations .kdicon {
477
+ font-size: 16px;
478
+ }
479
+ .kd-tab-pane-type-dynamic.kd-tab-pane-box-active.kd-tab-pane-isMobile:not(.kd-tab-pane-disabled):hover .kd-tab-pane-operations span:first-child {
477
480
  opacity: 1;
478
481
  cursor: pointer;
479
482
  }
480
- .kd-tab-pane-type-dynamic .kd-tab-pane-operations .kdicon {
481
- font-size: 16px;
483
+ .kd-tab-pane-type-dynamic-notMobile:not(.kd-tab-pane-disabled):hover .kd-tab-pane-operations span:first-child {
484
+ opacity: 1;
485
+ cursor: pointer;
482
486
  }
483
487
  .kd-tab-pane-type-grid {
484
488
  height: 24px;
@@ -507,7 +511,7 @@
507
511
  .kd-tab-pane-type-grid.kd-tab-pane-disabled {
508
512
  background-color: var(--kd-c-tabs-color-background-disabled, transparent);
509
513
  }
510
- .kd-tab-pane-type-grid:hover {
514
+ .kd-tab-pane-notMobile:hover {
511
515
  color: var(--kd-c-tabs-color-text-active, var(--kd-g-color-theme, #5582f3));
512
516
  }
513
517
  .kd-tab-pane-operations {
@@ -221,7 +221,7 @@
221
221
  text-overflow: ellipsis;
222
222
  max-width: @tab-pane-text-max-width;
223
223
  &-active,
224
- &:hover {
224
+ &-notMobile:hover {
225
225
  color: @tabPane-font-color-active;
226
226
  }
227
227
  &-disabled {
@@ -230,6 +230,7 @@
230
230
  }
231
231
  }
232
232
  }
233
+
233
234
  &-disabled {
234
235
  color: @tabPane-font-color-disabled;
235
236
  cursor: not-allowed;
@@ -304,6 +305,21 @@
304
305
  margin: 0 0 0 4px;
305
306
  display: inline-flex;
306
307
  align-items: center;
308
+ .@{tabPane-prefix-cls}-operations .@{icon-prefix-cls} {
309
+ font-size: 16px;
310
+ }
311
+ &.@{tabPane-prefix-cls}-box-active {
312
+ &.@{tabPane-prefix-cls}-isMobile:not(.@{tabPane-prefix-cls}-disabled):hover {
313
+ .@{tabPane-prefix-cls}-operations {
314
+ span:first-child {
315
+ opacity: 1;
316
+ cursor: pointer;
317
+ }
318
+ }
319
+ }
320
+ }
321
+ }
322
+ &-type-dynamic-notMobile {
307
323
  &:not(.@{tabPane-prefix-cls}-disabled):hover {
308
324
  .@{tabPane-prefix-cls}-operations {
309
325
  span:first-child {
@@ -312,9 +328,6 @@
312
328
  }
313
329
  }
314
330
  }
315
- .@{tabPane-prefix-cls}-operations .@{icon-prefix-cls} {
316
- font-size: 16px;
317
- }
318
331
  }
319
332
  &-type-grid {
320
333
  height: 24px;
@@ -341,6 +354,8 @@
341
354
  &.@{tabPane-prefix-cls}-disabled {
342
355
  background-color: @tab-disabled-bg;
343
356
  }
357
+ }
358
+ &-notMobile {
344
359
  &:hover {
345
360
  color: @tabPane-font-color-active;
346
361
  }
@@ -14,7 +14,8 @@ var TabPane = function TabPane(props) {
14
14
  var tabPaneRef = useRef(null);
15
15
  var _useContext = useContext(ConfigContext),
16
16
  getPrefixCls = _useContext.getPrefixCls,
17
- prefixCls = _useContext.prefixCls;
17
+ prefixCls = _useContext.prefixCls,
18
+ isMobile = _useContext.isMobile;
18
19
  var tab = props.tab,
19
20
  id = props.id,
20
21
  className = props.className,
@@ -30,8 +31,8 @@ var TabPane = function TabPane(props) {
30
31
  tabPaneProps.disabled = context.disabled || disabled;
31
32
  }
32
33
  var tabPanePrefixCls = getPrefixCls(prefixCls, 'tab-pane');
33
- var tabPaneBoxClasses = classNames(tabPanePrefixCls, className, (_classNames = {}, _defineProperty(_classNames, "".concat(tabPanePrefixCls, "-box-active"), String(tabPaneProps.activeKey) === String(id) && !tabPaneProps.disabled), _defineProperty(_classNames, _concatInstanceProperty(_context = "".concat(tabPanePrefixCls, "-type-")).call(_context, tabPaneProps.type), tabPaneProps.type), _defineProperty(_classNames, _concatInstanceProperty(_context2 = "".concat(tabPanePrefixCls, "-")).call(_context2, tabPaneProps.position), tabPaneProps.position), _defineProperty(_classNames, _concatInstanceProperty(_context3 = "".concat(tabPanePrefixCls, "-")).call(_context3, tabPaneProps.size), tabPaneProps.size), _defineProperty(_classNames, "".concat(tabPanePrefixCls, "-disabled"), tabPaneProps.disabled), _classNames));
34
- var tabPaneTextClasses = classNames("".concat(tabPanePrefixCls, "-text"), (_classNames2 = {}, _defineProperty(_classNames2, "".concat(tabPanePrefixCls, "-text-active"), String(tabPaneProps.activeKey) === String(id) && !tabPaneProps.disabled), _defineProperty(_classNames2, "".concat(tabPanePrefixCls, "-text-disabled"), tabPaneProps.disabled), _classNames2));
34
+ var tabPaneBoxClasses = classNames(tabPanePrefixCls, className, (_classNames = {}, _defineProperty(_classNames, "".concat(tabPanePrefixCls, "-box-active"), String(tabPaneProps.activeKey) === String(id) && !tabPaneProps.disabled), _defineProperty(_classNames, "".concat(tabPanePrefixCls, "-type-dynamic-notMobile"), !isMobile), _defineProperty(_classNames, _concatInstanceProperty(_context = "".concat(tabPanePrefixCls, "-type-")).call(_context, tabPaneProps.type), tabPaneProps.type), _defineProperty(_classNames, _concatInstanceProperty(_context2 = "".concat(tabPanePrefixCls, "-")).call(_context2, tabPaneProps.position), tabPaneProps.position), _defineProperty(_classNames, _concatInstanceProperty(_context3 = "".concat(tabPanePrefixCls, "-")).call(_context3, tabPaneProps.size), tabPaneProps.size), _defineProperty(_classNames, "".concat(tabPanePrefixCls, "-disabled"), tabPaneProps.disabled), _defineProperty(_classNames, "".concat(tabPanePrefixCls, "-notMobile"), !isMobile), _defineProperty(_classNames, "".concat(tabPanePrefixCls, "-isMobile"), isMobile), _classNames));
35
+ var tabPaneTextClasses = classNames("".concat(tabPanePrefixCls, "-text"), (_classNames2 = {}, _defineProperty(_classNames2, "".concat(tabPanePrefixCls, "-text-active"), String(tabPaneProps.activeKey) === String(id) && !tabPaneProps.disabled), _defineProperty(_classNames2, "".concat(tabPanePrefixCls, "-text-disabled"), tabPaneProps.disabled), _defineProperty(_classNames2, "".concat(tabPanePrefixCls, "-text-notMobile"), !isMobile), _classNames2));
35
36
  var operationsClasses = classNames("".concat(tabPanePrefixCls, "-operations"), _defineProperty({}, "".concat(tabPanePrefixCls, "-operations-active"), String(tabPaneProps.activeKey) === String(id) && !tabPaneProps.disabled));
36
37
  var handleClick = function handleClick(e) {
37
38
  if (tabPaneProps.disabled) return;
@@ -13,6 +13,7 @@ export interface IConfigProps {
13
13
  localeConfig?: LocaleConfigType;
14
14
  locale?: IntlUniversal;
15
15
  direction?: DirectionType;
16
+ isMobile?: boolean;
16
17
  }
17
18
  export interface IContextConfigProps {
18
19
  getPrefixCls?: (configPrefixCls?: string, suffixCls?: string, customizePrefixCls?: string) => string;
@@ -21,6 +22,7 @@ export interface IContextConfigProps {
21
22
  localeConfig?: LocaleConfigType;
22
23
  locale: IntlUniversal;
23
24
  direction?: DirectionType;
25
+ isMobile?: boolean;
24
26
  }
25
27
  declare const ConfigContext: import("react").Context<IContextConfigProps>;
26
28
  export default ConfigContext;
@@ -7,5 +7,6 @@ declare const defaultConfig: {
7
7
  getCompLangMsg: (compLangMsgParams: import("../locale").CompLangMsgParams, customGetLangMsg?: ((componentName: string, labelName: string, params: any) => any) | undefined, localeDate?: any) => any;
8
8
  };
9
9
  direction: "ltr" | "rtl";
10
+ isMobile: boolean;
10
11
  };
11
12
  export default defaultConfig;
@@ -20,7 +20,8 @@ var defaultConfig = {
20
20
  getLangMsg: _locale.getLangMsg,
21
21
  getCompLangMsg: _locale.getCompLangMsg
22
22
  },
23
- direction: 'ltr'
23
+ direction: 'ltr',
24
+ isMobile: false
24
25
  };
25
26
  var _default = defaultConfig;
26
27
  exports.default = _default;
@@ -85,7 +85,8 @@ var Table = (0, _react.forwardRef)(function (props, ref) {
85
85
  getPrefixCls = _useContext.getPrefixCls,
86
86
  prefixCls = _useContext.prefixCls,
87
87
  locale = _useContext.locale,
88
- direction = _useContext.direction;
88
+ direction = _useContext.direction,
89
+ isMobile = _useContext.isMobile;
89
90
  var tablePrefixCls = getPrefixCls(prefixCls, customPrefixcls);
90
91
  var tableCls = (0, _classnames.default)(tablePrefixCls, className);
91
92
  var localeText = locale.getCompLangMsg({
@@ -97,7 +98,8 @@ var Table = (0, _react.forwardRef)(function (props, ref) {
97
98
  Radio: (components === null || components === void 0 ? void 0 : components.Radio) || _index2.default
98
99
  },
99
100
  localeText: localeText,
100
- direction: direction
101
+ direction: direction,
102
+ isMobile: isMobile
101
103
  }).primaryKey(primaryKey === undefined ? '' : primaryKey).input({
102
104
  columns: columns,
103
105
  dataSource: dataSource
@@ -158,7 +160,9 @@ var Table = (0, _react.forwardRef)(function (props, ref) {
158
160
  stickyScrollHeight: stickyScrollHeight,
159
161
  scrollbarWidth: scrollbarWidth,
160
162
  scrollLoad: scrollLoad,
161
- direction: direction
163
+ direction: direction,
164
+ isMobile: isMobile,
165
+ prefixCls: prefixCls
162
166
  }, others));
163
167
  });
164
168
  Table.displayName = 'Table';
@@ -386,7 +386,7 @@
386
386
  max-width: var(--kd-c-tabs-pane-text-sizing-max-width);
387
387
  }
388
388
  .kd-tab-pane-text-active,
389
- .kd-tab-pane-text:hover {
389
+ .kd-tab-pane-text-notMobile:hover {
390
390
  color: var(--kd-c-tabs-color-text-active, var(--kd-g-color-theme, #5582f3));
391
391
  }
392
392
  .kd-tab-pane-text-disabled:hover {
@@ -473,12 +473,16 @@
473
473
  -ms-flex-align: center;
474
474
  align-items: center;
475
475
  }
476
- .kd-tab-pane-type-dynamic:not(.kd-tab-pane-disabled):hover .kd-tab-pane-operations span:first-child {
476
+ .kd-tab-pane-type-dynamic .kd-tab-pane-operations .kdicon {
477
+ font-size: 16px;
478
+ }
479
+ .kd-tab-pane-type-dynamic.kd-tab-pane-box-active.kd-tab-pane-isMobile:not(.kd-tab-pane-disabled):hover .kd-tab-pane-operations span:first-child {
477
480
  opacity: 1;
478
481
  cursor: pointer;
479
482
  }
480
- .kd-tab-pane-type-dynamic .kd-tab-pane-operations .kdicon {
481
- font-size: 16px;
483
+ .kd-tab-pane-type-dynamic-notMobile:not(.kd-tab-pane-disabled):hover .kd-tab-pane-operations span:first-child {
484
+ opacity: 1;
485
+ cursor: pointer;
482
486
  }
483
487
  .kd-tab-pane-type-grid {
484
488
  height: 24px;
@@ -507,7 +511,7 @@
507
511
  .kd-tab-pane-type-grid.kd-tab-pane-disabled {
508
512
  background-color: var(--kd-c-tabs-color-background-disabled, transparent);
509
513
  }
510
- .kd-tab-pane-type-grid:hover {
514
+ .kd-tab-pane-notMobile:hover {
511
515
  color: var(--kd-c-tabs-color-text-active, var(--kd-g-color-theme, #5582f3));
512
516
  }
513
517
  .kd-tab-pane-operations {
@@ -221,7 +221,7 @@
221
221
  text-overflow: ellipsis;
222
222
  max-width: @tab-pane-text-max-width;
223
223
  &-active,
224
- &:hover {
224
+ &-notMobile:hover {
225
225
  color: @tabPane-font-color-active;
226
226
  }
227
227
  &-disabled {
@@ -230,6 +230,7 @@
230
230
  }
231
231
  }
232
232
  }
233
+
233
234
  &-disabled {
234
235
  color: @tabPane-font-color-disabled;
235
236
  cursor: not-allowed;
@@ -304,6 +305,21 @@
304
305
  margin: 0 0 0 4px;
305
306
  display: inline-flex;
306
307
  align-items: center;
308
+ .@{tabPane-prefix-cls}-operations .@{icon-prefix-cls} {
309
+ font-size: 16px;
310
+ }
311
+ &.@{tabPane-prefix-cls}-box-active {
312
+ &.@{tabPane-prefix-cls}-isMobile:not(.@{tabPane-prefix-cls}-disabled):hover {
313
+ .@{tabPane-prefix-cls}-operations {
314
+ span:first-child {
315
+ opacity: 1;
316
+ cursor: pointer;
317
+ }
318
+ }
319
+ }
320
+ }
321
+ }
322
+ &-type-dynamic-notMobile {
307
323
  &:not(.@{tabPane-prefix-cls}-disabled):hover {
308
324
  .@{tabPane-prefix-cls}-operations {
309
325
  span:first-child {
@@ -312,9 +328,6 @@
312
328
  }
313
329
  }
314
330
  }
315
- .@{tabPane-prefix-cls}-operations .@{icon-prefix-cls} {
316
- font-size: 16px;
317
- }
318
331
  }
319
332
  &-type-grid {
320
333
  height: 24px;
@@ -341,6 +354,8 @@
341
354
  &.@{tabPane-prefix-cls}-disabled {
342
355
  background-color: @tab-disabled-bg;
343
356
  }
357
+ }
358
+ &-notMobile {
344
359
  &:hover {
345
360
  color: @tabPane-font-color-active;
346
361
  }
@@ -27,7 +27,8 @@ var TabPane = function TabPane(props) {
27
27
  var tabPaneRef = (0, _react.useRef)(null);
28
28
  var _useContext = (0, _react.useContext)(_ConfigContext.default),
29
29
  getPrefixCls = _useContext.getPrefixCls,
30
- prefixCls = _useContext.prefixCls;
30
+ prefixCls = _useContext.prefixCls,
31
+ isMobile = _useContext.isMobile;
31
32
  var tab = props.tab,
32
33
  id = props.id,
33
34
  className = props.className,
@@ -43,8 +44,8 @@ var TabPane = function TabPane(props) {
43
44
  tabPaneProps.disabled = context.disabled || disabled;
44
45
  }
45
46
  var tabPanePrefixCls = getPrefixCls(prefixCls, 'tab-pane');
46
- var tabPaneBoxClasses = (0, _classnames.default)(tabPanePrefixCls, className, (_classNames = {}, (0, _defineProperty2.default)(_classNames, "".concat(tabPanePrefixCls, "-box-active"), String(tabPaneProps.activeKey) === String(id) && !tabPaneProps.disabled), (0, _defineProperty2.default)(_classNames, (0, _concat.default)(_context = "".concat(tabPanePrefixCls, "-type-")).call(_context, tabPaneProps.type), tabPaneProps.type), (0, _defineProperty2.default)(_classNames, (0, _concat.default)(_context2 = "".concat(tabPanePrefixCls, "-")).call(_context2, tabPaneProps.position), tabPaneProps.position), (0, _defineProperty2.default)(_classNames, (0, _concat.default)(_context3 = "".concat(tabPanePrefixCls, "-")).call(_context3, tabPaneProps.size), tabPaneProps.size), (0, _defineProperty2.default)(_classNames, "".concat(tabPanePrefixCls, "-disabled"), tabPaneProps.disabled), _classNames));
47
- var tabPaneTextClasses = (0, _classnames.default)("".concat(tabPanePrefixCls, "-text"), (_classNames2 = {}, (0, _defineProperty2.default)(_classNames2, "".concat(tabPanePrefixCls, "-text-active"), String(tabPaneProps.activeKey) === String(id) && !tabPaneProps.disabled), (0, _defineProperty2.default)(_classNames2, "".concat(tabPanePrefixCls, "-text-disabled"), tabPaneProps.disabled), _classNames2));
47
+ var tabPaneBoxClasses = (0, _classnames.default)(tabPanePrefixCls, className, (_classNames = {}, (0, _defineProperty2.default)(_classNames, "".concat(tabPanePrefixCls, "-box-active"), String(tabPaneProps.activeKey) === String(id) && !tabPaneProps.disabled), (0, _defineProperty2.default)(_classNames, "".concat(tabPanePrefixCls, "-type-dynamic-notMobile"), !isMobile), (0, _defineProperty2.default)(_classNames, (0, _concat.default)(_context = "".concat(tabPanePrefixCls, "-type-")).call(_context, tabPaneProps.type), tabPaneProps.type), (0, _defineProperty2.default)(_classNames, (0, _concat.default)(_context2 = "".concat(tabPanePrefixCls, "-")).call(_context2, tabPaneProps.position), tabPaneProps.position), (0, _defineProperty2.default)(_classNames, (0, _concat.default)(_context3 = "".concat(tabPanePrefixCls, "-")).call(_context3, tabPaneProps.size), tabPaneProps.size), (0, _defineProperty2.default)(_classNames, "".concat(tabPanePrefixCls, "-disabled"), tabPaneProps.disabled), (0, _defineProperty2.default)(_classNames, "".concat(tabPanePrefixCls, "-notMobile"), !isMobile), (0, _defineProperty2.default)(_classNames, "".concat(tabPanePrefixCls, "-isMobile"), isMobile), _classNames));
48
+ var tabPaneTextClasses = (0, _classnames.default)("".concat(tabPanePrefixCls, "-text"), (_classNames2 = {}, (0, _defineProperty2.default)(_classNames2, "".concat(tabPanePrefixCls, "-text-active"), String(tabPaneProps.activeKey) === String(id) && !tabPaneProps.disabled), (0, _defineProperty2.default)(_classNames2, "".concat(tabPanePrefixCls, "-text-disabled"), tabPaneProps.disabled), (0, _defineProperty2.default)(_classNames2, "".concat(tabPanePrefixCls, "-text-notMobile"), !isMobile), _classNames2));
48
49
  var operationsClasses = (0, _classnames.default)("".concat(tabPanePrefixCls, "-operations"), (0, _defineProperty2.default)({}, "".concat(tabPanePrefixCls, "-operations-active"), String(tabPaneProps.activeKey) === String(id) && !tabPaneProps.disabled));
49
50
  var handleClick = function handleClick(e) {
50
51
  if (tabPaneProps.disabled) return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kdcloudjs/kdesign",
3
- "version": "1.8.49",
3
+ "version": "1.8.51",
4
4
  "description": "KDesign 金蝶前端react 组件库",
5
5
  "title": "kdesign",
6
6
  "keywords": [
@@ -78,7 +78,7 @@
78
78
  "@babel/runtime-corejs3": "^7.11.2",
79
79
  "@babel/standalone": "^7.14.3",
80
80
  "@kdcloudjs/kdesign-icons": "^1.0.5",
81
- "@kdcloudjs/table": "1.2.2-canary.12",
81
+ "@kdcloudjs/table": "1.2.2-canary.15",
82
82
  "@popperjs/core": "^2.11.8",
83
83
  "@types/js-cookie": "^3.0.3",
84
84
  "async-validator": "^3.5.1",