@king-design/react 3.0.0-beta.1 → 3.0.0-beta.2

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.
Files changed (59) hide show
  1. package/__tests__/__snapshots__/Dialog.md +1 -1
  2. package/__tests__/__snapshots__/React Demos.md +278 -271
  3. package/components/button/styles.d.ts +1 -1
  4. package/components/button/styles.js +3 -5
  5. package/components/carousel/index.vdt.js +2 -2
  6. package/components/cascader/index.vdt.js +1 -1
  7. package/components/collapse/item.vdt.js +1 -1
  8. package/components/copy/index.vdt.js +1 -1
  9. package/components/datepicker/calendar.vdt.js +6 -6
  10. package/components/datepicker/index.spec.js +170 -152
  11. package/components/datepicker/styles.js +1 -1
  12. package/components/datepicker/useValue.d.ts +3 -3
  13. package/components/datepicker/useValue.js +38 -9
  14. package/components/dialog/styles.js +1 -1
  15. package/components/form/styles.js +1 -1
  16. package/components/icon/styles.js +1 -1
  17. package/components/input/index.d.ts +3 -1
  18. package/components/input/index.js +4 -1
  19. package/components/input/index.vdt.js +21 -10
  20. package/components/input/search.vdt.js +2 -4
  21. package/components/input/styles.js +13 -6
  22. package/components/input/useFocus.d.ts +4 -0
  23. package/components/input/useFocus.js +21 -0
  24. package/components/menu/item.vdt.js +4 -1
  25. package/components/pagination/index.vdt.js +2 -2
  26. package/components/progress/index.vdt.js +1 -1
  27. package/components/select/base.vdt.js +36 -19
  28. package/components/select/index.spec.js +23 -11
  29. package/components/select/menu.vdt.js +5 -5
  30. package/components/select/option.vdt.js +2 -1
  31. package/components/select/styles.js +1 -1
  32. package/components/spinner/index.vdt.js +4 -4
  33. package/components/spinner/styles.js +2 -2
  34. package/components/steps/step.vdt.js +2 -2
  35. package/components/steps/styles.js +6 -2
  36. package/components/table/cell.vdt.js +1 -1
  37. package/components/table/column.vdt.js +40 -24
  38. package/components/table/index.spec.js +37 -6
  39. package/components/table/styles.js +15 -8
  40. package/components/table/useGroup.d.ts +9 -3
  41. package/components/table/useGroup.js +45 -37
  42. package/components/tabs/index.vdt.js +7 -2
  43. package/components/tag/styles.js +1 -1
  44. package/components/tag/tags.vdt.js +14 -2
  45. package/components/tag/useNowrap.js +1 -1
  46. package/components/transfer/index.vdt.js +14 -3
  47. package/components/types.d.ts +1 -0
  48. package/components/upload/index.vdt.js +4 -4
  49. package/index.d.ts +2 -2
  50. package/index.js +2 -2
  51. package/package.json +1 -1
  52. package/styles/fonts/iconfont.eot +0 -0
  53. package/styles/fonts/iconfont.js +1 -1
  54. package/styles/fonts/iconfont.svg +35 -35
  55. package/styles/fonts/iconfont.ttf +0 -0
  56. package/styles/fonts/iconfont.woff +0 -0
  57. package/styles/global.js +1 -1
  58. package/components/select/useNowrap.d.ts +0 -3
  59. package/components/select/useNowrap.js +0 -19
@@ -24,7 +24,7 @@ declare const defaults: {
24
24
  link: {
25
25
  readonly color: string;
26
26
  readonly hoverColor: string;
27
- readonly hoverBgColor: string;
27
+ hoverBgColor: string;
28
28
  };
29
29
  none: {
30
30
  readonly hoverBgColor: string;
@@ -7,7 +7,7 @@ export var types = ['primary', 'warning', 'danger', 'active', 'success'];
7
7
  var sizes = ['large', 'small', 'mini'];
8
8
  var btnStyles = {
9
9
  get color() {
10
- return theme.color.lightBlack;
10
+ return theme.color.text;
11
11
  },
12
12
 
13
13
  bgColor: '#fff',
@@ -181,9 +181,7 @@ var defaults = deepDefaults({
181
181
  return theme.color.linkHover;
182
182
  },
183
183
 
184
- get hoverBgColor() {
185
- return theme.color.hoverBg;
186
- }
184
+ hoverBgColor: 'transparent' // get hoverBgColor() { return theme.color.hoverBg },
187
185
 
188
186
  },
189
187
  none: {
@@ -238,7 +236,7 @@ export function makeButtonStyles(_ref) {
238
236
  css("display:inline-flex;align-items:center;justify-content:center;cursor:pointer;height:", button.height, ";padding:", button.padding, ";outline:none;vertical-align:middle;color:", button.color, ";background:", button.bgColor, ";border-radius:", button.borderRadius, ";border:1px solid ", button.borderColor, ";font-size:", button.fontSize, ";white-space:nowrap;transition:all ", button.transition, ";line-height:", button.lineHeight, ";.k-icon{color:inherit;}&:hover,&:focus{border-color:", button.hoverBorderColor, ";color:", button.hoverColor, ";}&:active{background:", palette(theme.color.primary, -4), ";}.k-button-input{position:absolute;opacity:0;width:0;height:0;}", _mapInstanceProperty(types).call(types, function (type) {
239
237
  var typeStyles = button[type];
240
238
  return /*#__PURE__*/css("&.k-", type, "{background:", typeStyles.bgColor, ";color:", typeStyles.color, ";border-color:", typeStyles.borderColor, ";&:hover,&:focus{background:", palette(typeStyles.bgColor, -1), ";border-color:", typeStyles.hoverBorderColor, ";color:", typeStyles.color, ";}&:active{background:", palette(typeStyles.bgColor, 1), ";border-color:", palette(typeStyles.borderColor, 1), ";}}");
241
- }), "&.k-secondary{color:", secondary.color, ";border-color:", secondary.borderColor, ";&:hover,&:focus{background:", secondary.hoverBgColor, ";}&:active{background:", secondary.activeBgColor, ";}}&.k-link{color:", link.color, ";&:hover{color:", link.hoverColor, ";background:", link.hoverBgColor, ";}}&.k-disabled{&,&:hover{color:", button.disabled.color, ";background:", button.disabled.bgColor, ";border-color:", button.disabled.borderColor, ";cursor:not-allowed;}}&.k-none,&.k-link,&.k-flat{background:transparent;&,&:hover{border:none;}&.k-active{color:", theme.color.primary, ";}}&.k-none:hover{background:", button.none.hoverBgColor, ";}&.k-flat{background:", button.none.hoverBgColor, ";}", _mapInstanceProperty(sizes).call(sizes, function (size) {
239
+ }), "&.k-secondary{color:", secondary.color, ";border-color:", secondary.borderColor, ";&:hover,&:focus{background:", secondary.hoverBgColor, ";}&:active{background:", secondary.activeBgColor, ";}}&.k-link{color:", link.color, ";&:hover{color:", link.hoverColor, ";background:", link.hoverBgColor, ";}}&.k-none,&.k-link,&.k-flat{background:transparent;&,&:hover{border:none;}&.k-active{color:", theme.color.primary, ";}}&.k-none:hover{background:", button.none.hoverBgColor, ";}&.k-flat{background:", button.none.hoverBgColor, ";}&.k-disabled{&,&:hover{color:", button.disabled.color, ";background:", button.disabled.bgColor, ";border-color:", button.disabled.borderColor, ";cursor:not-allowed;}}&.k-none.k-disabled,&.k-link.k-disabled{&,&:hover{background:transparent;}}", _mapInstanceProperty(sizes).call(sizes, function (size) {
242
240
  var styles = button[size];
243
241
  return /*#__PURE__*/css("&.k-", size, "{font-size:", styles.fontSize, ";height:", styles.height, ";padding:", styles.padding, ";&.k-btn-icon{width:", styles.height, ";}}");
244
242
  }), "&.k-btn-icon{width:", button.height, ";padding:0;.k-icon{margin:0;}}&.k-fluid{width:100%;padding:0;}&.k-circle{border-radius:calc(", button.large.height, " / 2);}&.k-loading{", _mapInstanceProperty(types).call(types, function (type) {
@@ -7,10 +7,10 @@ import { Icon } from '../icon';
7
7
  import { makeStyles } from './styles';
8
8
  import { linkEvent } from 'intact';
9
9
  var _$tmp0 = {
10
- 'className': 'ion-ios-arrow-left'
10
+ 'className': 'k-icon-left'
11
11
  };
12
12
  var _$tmp1 = {
13
- 'className': 'ion-ios-arrow-right'
13
+ 'className': 'k-icon-right'
14
14
  };
15
15
  export default function ($props, $blocks, $__proto__) {
16
16
  var _classNameObj;
@@ -11,7 +11,7 @@ var _$tmp0 = {
11
11
  'rotate': true
12
12
  };
13
13
  var _$tmp1 = {
14
- 'className': 'k-cascader-arrow ion-ios-arrow-right'
14
+ 'className': 'k-cascader-arrow k-icon-right'
15
15
  };
16
16
  var _$tmp2 = {
17
17
  'className': 'k-cascader'
@@ -39,7 +39,7 @@ export default function ($props, $blocks, $__proto__) {
39
39
 
40
40
  return block ? block.call($this, callBlock, data) : callBlock();
41
41
  }, __$blocks['title'](_$no)), _$cc(Icon, {
42
- 'className': _$cn((_$cn2 = {}, _$cn2[kls('arrow')] = true, _$cn2['ion-ios-arrow-right'] = true, _$cn2)),
42
+ 'className': _$cn((_$cn2 = {}, _$cn2[kls('arrow')] = true, _$cn2['k-icon-right'] = true, _$cn2)),
43
43
  'hoverable': !disabled
44
44
  })], 0, _$cn(kls('title')), {
45
45
  'ev-click': this.toggle
@@ -8,7 +8,7 @@ import { makeStyles } from './styles';
8
8
  import { _$ } from '../../i18n';
9
9
  var _$tmp0 = {
10
10
  'key': '2',
11
- 'className': 'k-icon-truth',
11
+ 'className': 'k-icon-check',
12
12
  'hoverable': true,
13
13
  'color': 'success'
14
14
  };
@@ -6,27 +6,27 @@ import { _$ } from '../../i18n';
6
6
  import { makeCalendarStyles } from './styles';
7
7
  import { getNowDate } from './helpers';
8
8
  var _$tmp0 = {
9
- 'className': 'ion-ios-arrow-left',
9
+ 'className': 'k-icon-left',
10
10
  'size': 'small'
11
11
  };
12
12
  var _$tmp1 = {
13
- 'className': 'ion-ios-arrow-left',
13
+ 'className': 'k-icon-left',
14
14
  'size': 'small'
15
15
  };
16
16
  var _$tmp2 = {
17
- 'className': 'ion-ios-arrow-left',
17
+ 'className': 'k-icon-left',
18
18
  'size': 'small'
19
19
  };
20
20
  var _$tmp3 = {
21
- 'className': 'ion-ios-arrow-right',
21
+ 'className': 'k-icon-right',
22
22
  'size': 'small'
23
23
  };
24
24
  var _$tmp4 = {
25
- 'className': 'ion-ios-arrow-right',
25
+ 'className': 'k-icon-right',
26
26
  'size': 'small'
27
27
  };
28
28
  var _$tmp5 = {
29
- 'className': 'ion-ios-arrow-right',
29
+ 'className': 'k-icon-right',
30
30
  'size': 'small'
31
31
  };
32
32
  export default function ($props, $blocks, $__proto__) {