@progress/kendo-themes-html 5.0.0-beta.1 → 5.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 (40) hide show
  1. package/lib/jsx-runtime.js +4 -8
  2. package/package.json +2 -2
  3. package/src/autocomplete/autocomplete.jsx +1 -1
  4. package/src/avatar/avatar.jsx +17 -20
  5. package/src/button/button.jsx +1 -1
  6. package/src/chip/README.md +5 -5
  7. package/src/chip/chip-actions.jsx +80 -0
  8. package/src/chip/chip-avatar.jsx +1 -9
  9. package/src/chip/chip-list.jsx +8 -5
  10. package/src/chip/chip.jsx +55 -38
  11. package/src/chip/index.js +2 -3
  12. package/src/colorpicker/README.md +24 -15
  13. package/src/colorpicker/colorpicker.jsx +5 -7
  14. package/src/combobox/combobox.jsx +1 -1
  15. package/src/dateinput/dateinput.jsx +5 -7
  16. package/src/datepicker/datepicker.jsx +5 -7
  17. package/src/datetimepicker/datetimepicker.jsx +5 -7
  18. package/src/dropdownbutton/dropdownbutton.jsx +10 -14
  19. package/src/dropdownlist/dropdownlist.jsx +1 -1
  20. package/src/index.js +1 -2
  21. package/src/input/input.jsx +1 -1
  22. package/src/input/picker.jsx +3 -3
  23. package/src/list/list-content.jsx +18 -17
  24. package/src/list/list-header.jsx +2 -1
  25. package/src/maskedtextbox/maskedtextbox.jsx +1 -1
  26. package/src/menuitem/menu-item.jsx +1 -1
  27. package/src/menulist/menulist.jsx +1 -1
  28. package/src/multiselect/README.md +37 -0
  29. package/src/multiselect/multiselect.jsx +3 -3
  30. package/src/numerictextbox/numerictextbox.jsx +1 -1
  31. package/src/popup/popup.jsx +1 -1
  32. package/src/searchbox/searchbox.jsx +1 -1
  33. package/src/splitbutton/splitbutton.jsx +5 -5
  34. package/src/switch/README.md +3 -3
  35. package/src/switch/switch.jsx +4 -4
  36. package/src/textarea/textarea.jsx +1 -1
  37. package/src/textbox/textbox.jsx +1 -1
  38. package/src/timepicker/timepicker.jsx +5 -7
  39. package/src/chip/chip-remove-icon.jsx +0 -45
  40. package/src/chip/chip-selected-icon.jsx +0 -47
@@ -39,13 +39,11 @@ const attrMap = {
39
39
  trackrounded: 'trackRounded',
40
40
  thumbrounded: 'thumbRounded',
41
41
 
42
- // Menu list
43
- contenttemplate: 'contentTemplate',
44
-
45
42
  // Chip
46
- showremoveicon: 'showRemoveIcon',
47
- showselectedicon: 'showSelectedIcon',
48
- showavatar: 'showAvatar'
43
+ showavatar: 'showAvatar',
44
+
45
+ // Menu list
46
+ contentTemplate: 'contentTemplate'
49
47
  };
50
48
 
51
49
  const booleanAttr = new Set([
@@ -79,8 +77,6 @@ const booleanAttr = new Set([
79
77
  'virtualization',
80
78
  'root',
81
79
 
82
- 'showRemoveIcon',
83
- 'showSelectedIcon',
84
80
  'showAvatar',
85
81
 
86
82
  'aria'
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@progress/kendo-themes-html",
3
3
  "description": "A collection of HTML helpers used for developing Kendo UI themes",
4
- "version": "5.0.0-beta.1",
4
+ "version": "5.0.0-beta.2",
5
5
  "author": "Progress",
6
6
  "license": "Apache-2.0",
7
7
  "keywords": [
@@ -42,5 +42,5 @@
42
42
  "@rollup/plugin-node-resolve": "^13.0.6",
43
43
  "rollup": "^2.59.0"
44
44
  },
45
- "gitHead": "5f6c640b397e7dfb0481ea1eecd8fbce7abb967f"
45
+ "gitHead": "13e32ba172a1fa6fc172c9d989974ebfccef19e6"
46
46
  }
@@ -139,7 +139,7 @@ AutocompleteStatic.propTypes = {
139
139
  suffix: typeof '#fragment',
140
140
 
141
141
  size: typeof [ null, 'small', 'medium', 'large' ],
142
- rounded: typeof [ null, 'small', 'medium', 'large', 'pill' ],
142
+ rounded: typeof [ null, 'small', 'medium', 'large', 'full' ],
143
143
 
144
144
  fillMode: typeof [ null, 'solid', 'flat', 'outline' ],
145
145
 
@@ -16,7 +16,6 @@ function AvatarStatic(props) {
16
16
  type,
17
17
 
18
18
  size,
19
- shape,
20
19
  rounded,
21
20
  bordered,
22
21
 
@@ -35,29 +34,29 @@ function AvatarStatic(props) {
35
34
  styles.sizeClass( size, 'k-avatar' ),
36
35
  styles.roundedClass( rounded ),
37
36
  styles.fillModeClass( fillMode, 'k-avatar' ),
38
- styles.shapeClass( shape, 'k-avatar' ),
39
37
  styles.themeColorClass( fillMode, themeColor, 'k-avatar' ),
40
38
  styles.borderedClass( bordered, 'k-avatar' ),
41
39
  ];
42
40
 
43
- let legacyClasses = [
44
- ownClassName,
45
- 'k-avatar',
46
- `k-avatar-${themeColor}`,
47
- {
48
- 'k-avatar-circle': rounded === 'circle',
49
- 'k-avatar-rounded': rounded !== 'circle' && rounded !== null
50
- },
51
- styles.sizeClass( size, 'k-avatar' ),
52
- styles.fillModeClass( fillMode, 'k-avatar' ),
53
- styles.borderedClass( bordered, 'k-avatar' ),
54
- ];
55
-
56
41
  let ariaAttr = aria
57
42
  ? {}
58
43
  : {};
59
44
 
60
45
  if (legacy) {
46
+
47
+ let legacyClasses = [
48
+ ownClassName,
49
+ 'k-avatar',
50
+ `k-avatar-${themeColor}`,
51
+ {
52
+ 'k-avatar-circle': rounded === 'full',
53
+ 'k-avatar-rounded': rounded !== 'full' && rounded !== null
54
+ },
55
+ styles.sizeClass( size, 'k-avatar' ),
56
+ styles.fillModeClass( fillMode, 'k-avatar' ),
57
+ styles.borderedClass( bordered, 'k-avatar' ),
58
+ ];
59
+
61
60
  return (
62
61
  <span className={legacyClasses} {...ariaAttr} {...htmlAttributes}>
63
62
  <span className={`k-avatar-${type}`}>
@@ -85,8 +84,7 @@ AvatarStatic.defaultProps = {
85
84
  type: '',
86
85
 
87
86
  size: 'medium',
88
- shape: 'square',
89
- rounded: 'circle',
87
+ rounded: 'full',
90
88
  bordered: false,
91
89
 
92
90
  fillMode: 'solid',
@@ -99,9 +97,8 @@ AvatarStatic.propTypes = {
99
97
 
100
98
  type: typeof '',
101
99
 
102
- size: typeof [ null, 'small', 'medium', 'large', 'circle' ],
103
- shape: typeof [ null, 'square', 'circle', 'rounded' ],
104
- rounded: typeof [ null, '0', 'small', 'medium', 'large' ],
100
+ size: typeof [ null, 'small', 'medium', 'large' ],
101
+ rounded: typeof [ null, 'small', 'medium', 'large', 'full' ],
105
102
  bordered: typeof false,
106
103
 
107
104
  fillMode: typeof [ null, 'solid', 'outline' ],
@@ -125,7 +125,7 @@ ButtonStatic.propTypes = {
125
125
  type: typeof [ 'button', 'submit', 'reset' ],
126
126
 
127
127
  size: typeof [ null, 'small', 'medium', 'large' ],
128
- rounded: typeof [ null, '0', 'small', 'medium', 'large', 'pill', 'circle' ],
128
+ rounded: typeof [ null, 'small', 'medium', 'large', 'full' ],
129
129
  shape: typeof [ null, 'rectangle', 'square' ],
130
130
 
131
131
  fillMode: typeof [ null, 'solid', 'flat', 'outline', 'link' ],
@@ -2,7 +2,7 @@
2
2
 
3
3
  ```html
4
4
  <!-- default rendering -->
5
- <div class="k-chip k-chip-md k-rounded-pill k-chip-solid k-chip-solid-base">
5
+ <div class="k-chip k-chip-md k-rounded-full k-chip-solid k-chip-solid-base">
6
6
  <span class="k-chip-text">Chip Text</span>
7
7
  </div>
8
8
 
@@ -32,9 +32,9 @@
32
32
  ```html
33
33
  <!-- default rendering -->
34
34
  <div class="k-chip-list k-chip-list-md">
35
- <div class="k-chip k-chip-md k-rounded-pill k-chip-solid k-chip-solid-base">...</div>
36
- <div class="k-chip k-chip-md k-rounded-pill k-chip-solid k-chip-solid-base">...</div>
37
- <div class="k-chip k-chip-md k-rounded-pill k-chip-solid k-chip-solid-base">...</div>
35
+ <div class="k-chip k-chip-md k-rounded-full k-chip-solid k-chip-solid-base">...</div>
36
+ <div class="k-chip k-chip-md k-rounded-full k-chip-solid k-chip-solid-base">...</div>
37
+ <div class="k-chip k-chip-md k-rounded-full k-chip-solid k-chip-solid-base">...</div>
38
38
  </div>
39
39
 
40
40
  <!-- canonical rendering -->
@@ -44,4 +44,4 @@
44
44
  <div class="k-chip" {...props}>...</div>
45
45
  <div class="k-chip" {...props}>...</div>
46
46
  </div>
47
- ```
47
+ ```
@@ -0,0 +1,80 @@
1
+ import { Component, globalDefaultProps } from '../component/index';
2
+ import { IconStatic } from '../icon/index';
3
+
4
+ function transformActions(actions) {
5
+ let newActions = [];
6
+
7
+ actions.forEach(action => {
8
+ if (action === 'more') {
9
+ newActions.push(
10
+ <span className="k-chip-action k-chip-more-action">
11
+ <IconStatic name="more-vertical" />
12
+ </span>
13
+ );
14
+
15
+ return;
16
+ }
17
+
18
+ if (action === 'remove') {
19
+ newActions.push(
20
+ <span className="k-chip-action k-chip-remove-action">
21
+ <IconStatic name="x-circle" />
22
+ </span>
23
+ );
24
+
25
+ return;
26
+ }
27
+
28
+ newActions.push(
29
+ <span className={`k-chip-action k-chip-${action}-action`}>
30
+ <IconStatic name={action} />
31
+ </span>
32
+ );
33
+ });
34
+
35
+ return newActions;
36
+ }
37
+
38
+ class ChipActions extends Component {
39
+ render() {
40
+ return <ChipActionsStatic {...this.props} />;
41
+ }
42
+ }
43
+
44
+ function ChipActionsStatic(props) {
45
+
46
+ const {
47
+ actions
48
+ } = props;
49
+
50
+ if (actions.length === 0) {
51
+ return <></>;
52
+ }
53
+
54
+ return (
55
+ <span className="k-chip-actions">
56
+ {transformActions( actions )}
57
+ </span>
58
+ );
59
+
60
+ }
61
+
62
+ ChipActionsStatic.defaultProps = {
63
+ ...globalDefaultProps,
64
+
65
+ actions: []
66
+ };
67
+
68
+ ChipActionsStatic.propTypes = {
69
+ className: typeof '',
70
+ children: typeof [],
71
+
72
+ actions: typeof [],
73
+
74
+ aria: typeof false,
75
+ legacy: typeof false,
76
+
77
+ htmlAttributes: typeof []
78
+ };
79
+
80
+ export { ChipActions, ChipActionsStatic };
@@ -1,14 +1,6 @@
1
1
  import { AvatarStatic } from '../avatar/index';
2
2
 
3
- function ChipAvatarStatic(chipProps) {
4
-
5
- const {
6
- showAvatar
7
- } = chipProps;
8
-
9
- if (!showAvatar) {
10
- return <></>;
11
- }
3
+ function ChipAvatarStatic() {
12
4
 
13
5
  return (
14
6
  <AvatarStatic className="k-chip-avatar" type="image">
@@ -12,6 +12,8 @@ function ChipListStatic(props) {
12
12
  const {
13
13
  className: ownClassName,
14
14
 
15
+ children,
16
+
15
17
  size,
16
18
 
17
19
  selection,
@@ -35,6 +37,7 @@ function ChipListStatic(props) {
35
37
 
36
38
  let legacyListClasses = [
37
39
  ownClassName,
40
+ 'k-chip-list'
38
41
  ];
39
42
 
40
43
  let ariaAttr = aria
@@ -44,14 +47,14 @@ function ChipListStatic(props) {
44
47
  if (legacy) {
45
48
  return (
46
49
  <div className={legacyListClasses} {...ariaAttr} {...htmlAttributes}>
47
-
50
+ {children}
48
51
  </div>
49
52
  );
50
53
  }
51
54
 
52
55
  return (
53
56
  <div className={listClasses} {...ariaAttr} {...htmlAttributes}>
54
-
57
+ {children}
55
58
  </div>
56
59
  );
57
60
  }
@@ -59,14 +62,15 @@ function ChipListStatic(props) {
59
62
  ChipListStatic.defaultProps = {
60
63
  ...globalDefaultProps,
61
64
 
62
- className: '',
63
-
64
65
  size: 'medium',
65
66
 
66
67
  selection: 'none'
67
68
  };
68
69
 
69
70
  ChipListStatic.propTypes = {
71
+ className: typeof '',
72
+ children: typeof [],
73
+
70
74
  size: typeof [ null, 'small', 'medium', 'large' ],
71
75
 
72
76
  selection: typeof [ null, 'single', 'multiple' ],
@@ -74,7 +78,6 @@ ChipListStatic.propTypes = {
74
78
  aria: typeof false,
75
79
  legacy: typeof false,
76
80
 
77
- className: typeof '',
78
81
  htmlAttributes: typeof []
79
82
  };
80
83
 
package/src/chip/chip.jsx CHANGED
@@ -1,11 +1,31 @@
1
1
  import * as styles from '../../utils/styles';
2
2
  import { Component, globalDefaultProps } from '../component/index';
3
3
  import { IconStatic } from '../icon/index';
4
- import { ChipSelectedIconStatic } from '../chip/index';
5
- import { ChipRemoveIconStatic } from '../chip/index';
6
- import { ChipAvatarStatic } from '../chip/index';
4
+ import { ChipAvatarStatic } from './chip-avatar.jsx';
5
+ import { ChipActionsStatic } from './chip-actions.jsx';
7
6
 
8
7
  class Chip extends Component {
8
+
9
+ init() {
10
+ let actions = this._props.actions;
11
+ let newActions = [];
12
+
13
+ if (actions === undefined) {
14
+ this._props.actions = [];
15
+ return;
16
+ }
17
+
18
+ if (Array.isArray(actions)) {
19
+ return;
20
+ }
21
+
22
+ actions.split(',').forEach(action => {
23
+ newActions.push(action.trim());
24
+ });
25
+
26
+ this._props.actions = newActions;
27
+ }
28
+
9
29
  render() {
10
30
  return <ChipStatic {...this.props} />;
11
31
  }
@@ -18,6 +38,10 @@ function ChipStatic(props) {
18
38
  children,
19
39
 
20
40
  text,
41
+ icon,
42
+ actions,
43
+
44
+ showAvatar,
21
45
 
22
46
  size,
23
47
  rounded,
@@ -25,9 +49,6 @@ function ChipStatic(props) {
25
49
  fillMode,
26
50
  themeColor,
27
51
 
28
- icon,
29
- showAvatar,
30
-
31
52
  hover,
32
53
  focus,
33
54
  active,
@@ -48,7 +69,6 @@ function ChipStatic(props) {
48
69
  styles.fillModeClass( fillMode, 'k-chip' ),
49
70
  styles.themeColorClass( fillMode, themeColor, 'k-chip' ),
50
71
  {
51
- 'k-chip-has-icon': icon !== '' || showAvatar,
52
72
  'k-hover': hover === true,
53
73
  'k-focus': focus === true,
54
74
  'k-active': active === true,
@@ -57,21 +77,6 @@ function ChipStatic(props) {
57
77
  }
58
78
  ];
59
79
 
60
- let legacyClasses = [
61
- ownClassName,
62
- 'k-chip',
63
- {
64
- 'k-chip-has-icon': icon !== '' || showAvatar,
65
- 'k-chip-outline': fillMode === 'outline',
66
- 'k-chip-solid': fillMode === 'solid',
67
- 'k-state-hover': hover === true,
68
- 'k-state-focus': focus === true,
69
- 'k-state-active': active === true,
70
- 'k-state-selected': selected === true,
71
- 'k-state-disabled': disabled === true
72
- }
73
- ];
74
-
75
80
  // Augment attributes
76
81
  htmlAttributes.disabled = disabled;
77
82
 
@@ -80,18 +85,33 @@ function ChipStatic(props) {
80
85
  : {};
81
86
 
82
87
  if (legacy) {
88
+
89
+ let legacyClasses = [
90
+ ownClassName,
91
+ 'k-chip',
92
+ `k-chip-${themeColor}`,
93
+ {
94
+ 'k-chip-outline': fillMode === 'outline',
95
+ 'k-chip-solid': fillMode === 'solid',
96
+ 'k-state-hover': hover === true,
97
+ 'k-state-focus': focus === true,
98
+ 'k-state-active': active === true,
99
+ 'k-state-selected': selected === true,
100
+ 'k-state-disabled': disabled === true
101
+ }
102
+ ];
103
+
83
104
  return (
84
105
  <div className={legacyClasses} {...ariaAttr} {...htmlAttributes}>
85
106
  <IconStatic className="k-chip-icon" name={icon} />
86
- <ChipSelectedIconStatic {...props} />
87
- <ChipAvatarStatic {...props} />
107
+ {showAvatar && <ChipAvatarStatic {...props} />}
88
108
  <span className="k-chip-content">
89
109
  { children.length
90
110
  ? children
91
- : text &&
92
- <span className="k-chip-label">{text}</span>}
111
+ : text && <span className="k-chip-label">{text}</span>
112
+ }
93
113
  </span>
94
- <ChipRemoveIconStatic {...props} />
114
+ { actions.length > 0 && <ChipActionsStatic actions={actions} />}
95
115
  </div>
96
116
  );
97
117
  }
@@ -99,15 +119,14 @@ function ChipStatic(props) {
99
119
  return (
100
120
  <div className={chipClasses} {...ariaAttr} {...htmlAttributes}>
101
121
  <IconStatic className="k-chip-icon" name={icon} />
102
- <ChipSelectedIconStatic {...props} />
103
- <ChipAvatarStatic {...props} />
122
+ {showAvatar && <ChipAvatarStatic {...props} />}
104
123
  <span className="k-chip-content">
105
124
  { children.length
106
125
  ? children
107
- : text &&
108
- <span className="k-chip-label k-text-ellipsis">{text}</span>}
126
+ : text && <span className="k-chip-label k-text-ellipsis">{text}</span>
127
+ }
109
128
  </span>
110
- <ChipRemoveIconStatic {...props} />
129
+ { actions.length > 0 && <ChipActionsStatic actions={actions} />}
111
130
  </div>
112
131
  );
113
132
  }
@@ -119,9 +138,8 @@ ChipStatic.defaultProps = {
119
138
 
120
139
  text: '',
121
140
  icon: '',
122
- showRemoveIcon: false,
141
+ actions: [],
123
142
  showAvatar: false,
124
- showSelectedIcon: false,
125
143
 
126
144
  className: '',
127
145
 
@@ -133,16 +151,16 @@ ChipStatic.defaultProps = {
133
151
  };
134
152
 
135
153
  ChipStatic.propTypes = {
154
+ className: typeof '',
136
155
  children: typeof [],
137
156
 
138
157
  text: typeof '',
139
158
  icon: typeof '',
140
- showRemoveIcon: typeof false,
159
+ actions: typeof [],
141
160
  showAvatar: typeof false,
142
- showSelectedIcon: typeof false,
143
161
 
144
162
  size: typeof [ null, 'small', 'medium', 'large' ],
145
- rounded: typeof [ null, '0', 'small', 'medium', 'large', 'pill' ],
163
+ rounded: typeof [ null, 'small', 'medium', 'large', 'full' ],
146
164
 
147
165
  fillMode: typeof [ null, 'solid', 'outline' ],
148
166
  themeColor: typeof [ null, 'base', 'error', 'warning', 'info', 'success' ],
@@ -156,7 +174,6 @@ ChipStatic.propTypes = {
156
174
  aria: typeof false,
157
175
  legacy: typeof false,
158
176
 
159
- className: typeof '',
160
177
  htmlAttributes: typeof []
161
178
  };
162
179
 
package/src/chip/index.js CHANGED
@@ -1,5 +1,4 @@
1
- export * from './chip-selected-icon.jsx';
2
- export * from './chip-remove-icon.jsx';
3
- export * from './chip-avatar.jsx';
4
1
  export * from './chip.jsx';
2
+ export * from './chip-avatar.jsx';
3
+ export * from './chip-actions.jsx';
5
4
  export * from './chip-list.jsx';
@@ -1,28 +1,37 @@
1
1
  ```html
2
2
  <!-- default rendering -->
3
- <span class="k-combobox k-input k-input-md k-rounded-md k-input-solid">
4
- <input type="text" class="k-input-inner" value="..." placeholder="..." />
5
- <button type="button" class="k-input-button k-button k-icon-button k-button-md k-button-solid k-button-solid-base">
3
+ <span class="k-colorpicker k-icon-picker k-picker k-picker-md k-rounded-md k-picker-solid">
4
+ <span class="k-input-inner">
5
+ <span class="k-value-icon k-color-preview k-no-color">
6
+ <span class="k-color-preview-mask" style="background-color: red;"></span>
7
+ </span>
8
+ </span>
9
+ <button type="button" class="k-input-button k-button k-button-md k-button-solid k-button-solid-base k-icon-button">
6
10
  <span class="k-button-icon k-icon k-i-arrow-s"></span>
7
11
  </button>
8
12
  </span>
9
13
 
10
14
  <!-- canonical rendering -->
11
15
  <span class="
12
- k-combobox
13
- k-input
14
- k-input-${size}
15
- k-rounded-${rounded}
16
- k-input-${fillMode}
16
+ k-colorpicker
17
+ k-picker
18
+ k-icon-picker
19
+ k-picker-{size}
20
+ k-rounded-{rounded}
21
+ k-picker-{fillMode}
17
22
 
18
- ${valid && 'k-valid'}
19
- ${invalid && 'k-invalid'}
20
- ${required && 'k-required'}
21
- ${disabled && 'k-disabled'}
23
+ {valid && 'k-valid'}
24
+ {invalid && 'k-invalid'}
25
+ {required && 'k-required'}
26
+ {disabled && 'k-disabled'}
22
27
  ">
23
- <input type={type} class="k-input-inner" value={value} placeholder={placeholder} disabled={disabled} />
24
- {valid && <span class="k-input-icon k-icon k-i-check"></span>}
25
- {invalid && <span class="k-input-icon k-icon k-i-check"></span>}
28
+ {inputPrefix && <span class="k-input-prefix">...</span>}
29
+ <span class="k-input-inner">
30
+ <span class="k-value-icon k-color-preview k-no-color">
31
+ <span class="k-color-preview-mask" style={value}></span>
32
+ </span>
33
+ </span>
34
+ {inputSuffix && <span class="k-input-suffix">...</span>}
26
35
  <button type="button" class="k-input-button k-button k-icon-button k-button-{size} k-button-{fillMode} k-button-{fillMode}-base">
27
36
  <span class="k-button-icon k-icon k-i-arrow-s"></span>
28
37
  </button>
@@ -67,17 +67,15 @@ function ColorpickerStatic(props) {
67
67
  'k-widget',
68
68
  'k-colorpicker',
69
69
  {
70
+ 'k-state-hover': hover === true,
71
+ 'k-state-focus': focus === true,
72
+ 'k-state-invalid': invalid === true,
70
73
  'k-state-disabled': disabled === true
71
74
  }
72
75
  ];
73
76
 
74
77
  let legacyWrapClasses = [
75
- 'k-picker-wrap',
76
- {
77
- 'k-state-hover': hover === true,
78
- 'k-state-focused': focus === true,
79
- 'k-state-invalid': invalid === true
80
- }
78
+ 'k-picker-wrap'
81
79
  ];
82
80
 
83
81
  return (
@@ -133,7 +131,7 @@ ColorpickerStatic.propTypes = {
133
131
  suffix: typeof '#fragment',
134
132
 
135
133
  size: typeof [ null, 'small', 'medium', 'large' ],
136
- rounded: typeof [ null, 'small', 'medium', 'large', 'pill' ],
134
+ rounded: typeof [ null, 'small', 'medium', 'large', 'full' ],
137
135
 
138
136
  fillMode: typeof [ null, 'solid', 'flat', 'outline' ],
139
137
 
@@ -150,7 +150,7 @@ ComboboxStatic.propTypes = {
150
150
  suffix: typeof '#fragment',
151
151
 
152
152
  size: typeof [ null, 'small', 'medium', 'large' ],
153
- rounded: typeof [ null, 'small', 'medium', 'large', 'pill' ],
153
+ rounded: typeof [ null, 'small', 'medium', 'large', 'full' ],
154
154
 
155
155
  fillMode: typeof [ null, 'solid', 'flat', 'outline' ],
156
156
 
@@ -75,17 +75,15 @@ function DateInputStatic(props) {
75
75
  'k-widget',
76
76
  'k-dateinput',
77
77
  {
78
+ 'k-state-hover': hover === true,
79
+ 'k-state-focus': focus === true,
80
+ 'k-state-invalid': invalid === true,
78
81
  'k-state-disabled': disabled === true
79
82
  }
80
83
  ];
81
84
 
82
85
  let legacyWrapClasses = [
83
- 'k-dateinput-wrap',
84
- {
85
- 'k-state-hover': hover === true,
86
- 'k-state-focused': focus === true,
87
- 'k-state-invalid': invalid === true
88
- }
86
+ 'k-dateinput-wrap'
89
87
  ];
90
88
 
91
89
  let legacyInputClasses = [
@@ -148,7 +146,7 @@ DateInputStatic.propTypes = {
148
146
  showClearButton: typeof true,
149
147
 
150
148
  size: typeof [ null, 'small', 'medium', 'large' ],
151
- rounded: typeof [ null, 'small', 'medium', 'large', 'pill' ],
149
+ rounded: typeof [ null, 'small', 'medium', 'large', 'full' ],
152
150
 
153
151
  fillMode: typeof [ null, 'solid', 'flat', 'outline' ],
154
152
 
@@ -76,17 +76,15 @@ function DatePickerStatic(props) {
76
76
  'k-widget',
77
77
  'k-datepicker',
78
78
  {
79
+ 'k-state-hover': hover === true,
80
+ 'k-state-focus': focus === true,
81
+ 'k-state-invalid': invalid === true,
79
82
  'k-state-disabled': disabled === true
80
83
  }
81
84
  ];
82
85
 
83
86
  let legacyWrapClasses = [
84
- 'k-picker-wrap',
85
- {
86
- 'k-state-hover': hover === true,
87
- 'k-state-focused': focus === true,
88
- 'k-state-invalid': invalid === true
89
- }
87
+ 'k-picker-wrap'
90
88
  ];
91
89
 
92
90
  return (
@@ -150,7 +148,7 @@ DatePickerStatic.propTypes = {
150
148
  suffix: typeof '#fragment',
151
149
 
152
150
  size: typeof [ null, 'small', 'medium', 'large' ],
153
- rounded: typeof [ null, 'small', 'medium', 'large', 'pill' ],
151
+ rounded: typeof [ null, 'small', 'medium', 'large', 'full' ],
154
152
 
155
153
  fillMode: typeof [ null, 'solid', 'flat', 'outline' ],
156
154
 
@@ -76,17 +76,15 @@ function DateTimePickerStatic(props) {
76
76
  'k-widget',
77
77
  'k-datetimepicker',
78
78
  {
79
+ 'k-state-hover': hover === true,
80
+ 'k-state-focus': focus === true,
81
+ 'k-state-invalid': invalid === true,
79
82
  'k-state-disabled': disabled === true
80
83
  }
81
84
  ];
82
85
 
83
86
  let legacyWrapClasses = [
84
- 'k-picker-wrap',
85
- {
86
- 'k-state-hover': hover === true,
87
- 'k-state-focused': focus === true,
88
- 'k-state-invalid': invalid === true
89
- }
87
+ 'k-picker-wrap'
90
88
  ];
91
89
 
92
90
  return (
@@ -150,7 +148,7 @@ DateTimePickerStatic.propTypes = {
150
148
  suffix: typeof '#fragment',
151
149
 
152
150
  size: typeof [ null, 'small', 'medium', 'large' ],
153
- rounded: typeof [ null, 'small', 'medium', 'large', 'pill' ],
151
+ rounded: typeof [ null, 'small', 'medium', 'large', 'full' ],
154
152
 
155
153
  fillMode: typeof [ null, 'solid', 'flat', 'outline' ],
156
154
 
@@ -74,15 +74,11 @@ function DropDownButtonStatic(props) {
74
74
  </div>
75
75
  );
76
76
  }
77
- // eslint-disable-next-line no-nested-ternary
78
- let renderText = text !== '' && showArrow ?
79
- <>{text}<span className={`k-icon k-i-${arrowIconName || 'arrow-s'}`}></span></> :
80
- // eslint-disable-next-line no-nested-ternary
81
- text !== '' && !showArrow ?
82
- text :
83
- text === '' && showArrow ?
84
- <span className={`k-icon k-i-${arrowIconName || 'arrow-s'}`}></span> :
85
- undefined;
77
+
78
+ let renderText = text === '' && !showArrow ? undefined : (<>
79
+ {text}
80
+ {showArrow && <span className={`k-icon k-i-${arrowIconName || 'arrow-s'}`}></span>}
81
+ </>);
86
82
 
87
83
  return (
88
84
  <div className={dropDownButtonClasses} {...ariaAttr} {...htmlAttributes}>
@@ -126,12 +122,12 @@ DropDownButtonStatic.propTypes = {
126
122
  showArrow: typeof false,
127
123
  arrowIconName: typeof '',
128
124
 
129
- size: typeof [ 'none', 'small', 'medium', 'large' ],
130
- rounded: typeof [ 'none', '0', 'small', 'medium', 'large', 'pill', 'circle' ],
131
- shape: typeof [ 'none', 'rectangle', 'square' ],
125
+ size: typeof [ null, 'small', 'medium', 'large' ],
126
+ rounded: typeof [ null, '0', 'small', 'medium', 'large', 'full' ],
127
+ shape: typeof [ null, 'rectangle', 'square' ],
132
128
 
133
- fillMode: typeof [ 'none', 'solid', 'flat', 'outline', 'link' ],
134
- themeColor: typeof [ 'none', 'surface', 'base', 'primary' ],
129
+ fillMode: typeof [ null, 'solid', 'flat', 'outline', 'link' ],
130
+ themeColor: typeof [ null, 'surface', 'base', 'primary' ],
135
131
 
136
132
  hover: typeof false,
137
133
  focus: typeof false,
@@ -172,7 +172,7 @@ DropdownListStatic.propTypes = {
172
172
  suffix: typeof '#fragment',
173
173
 
174
174
  size: typeof [ null, 'small', 'medium', 'large' ],
175
- rounded: typeof [ null, 'small', 'medium', 'large', 'pill' ],
175
+ rounded: typeof [ null, 'small', 'medium', 'large', 'full' ],
176
176
 
177
177
  fillMode: typeof [ null, 'solid', 'flat', 'outline' ],
178
178
 
package/src/index.js CHANGED
@@ -31,7 +31,7 @@ export * from './nodata/index';
31
31
  // Indicators
32
32
  export * from './avatar/index';
33
33
  // export * from './badge/index';
34
- // export * from './chip/index';
34
+ export * from './chip/index';
35
35
  // export * from './color-preview/index';
36
36
  // export * from './loader/index';
37
37
  // export * from './skeleton/index';
@@ -47,7 +47,6 @@ export * from './radio/index';
47
47
  // export * from './listbox/index';
48
48
  // export * from './progressbar/index';
49
49
  // export * from './slider/index';
50
- export * from './chip/index';
51
50
 
52
51
  // Augmented inputs
53
52
  export * from './autocomplete/index';
@@ -127,7 +127,7 @@ InputStatic.propTypes = {
127
127
  suffix: typeof '#fragment',
128
128
 
129
129
  size: typeof [ null, 'small', 'medium', 'large' ],
130
- rounded: typeof [ null, 'small', 'medium', 'large', 'pill' ],
130
+ rounded: typeof [ null, 'small', 'medium', 'large', 'full' ],
131
131
 
132
132
  fillMode: typeof [ null, 'solid', 'flat', 'outline' ],
133
133
 
@@ -62,9 +62,9 @@ function PickerStatic(props) {
62
62
  let pickerClasses = [
63
63
  ownClassName,
64
64
  'k-picker',
65
- styles.sizeClass( size, 'k-input' ),
65
+ styles.sizeClass( size, 'k-picker' ),
66
66
  styles.roundedClass( rounded ),
67
- styles.fillModeClass( fillMode, 'k-input' ),
67
+ styles.fillModeClass( fillMode, 'k-picker' ),
68
68
  {
69
69
  'k-hover': hover === true,
70
70
  'k-focus': focus === true,
@@ -125,7 +125,7 @@ PickerStatic.propTypes = {
125
125
  suffix: typeof '#fragment',
126
126
 
127
127
  size: typeof [ null, 'small', 'medium', 'large' ],
128
- rounded: typeof [ null, 'small', 'medium', 'large', 'pill' ],
128
+ rounded: typeof [ null, 'small', 'medium', 'large', 'full' ],
129
129
 
130
130
  fillMode: typeof [ null, 'solid', 'flat', 'outline' ],
131
131
 
@@ -25,32 +25,33 @@ function ListContentStatic(props) {
25
25
  'k-list-content'
26
26
  ];
27
27
 
28
- let legacyListContentClasses = [
29
- ownClassName,
30
- 'k-list-content',
31
- {
32
- 'k-list-scroller': virtualization === false,
33
- 'k-virtual-content': virtualization === true
34
- }
35
- ];
36
-
37
28
  let listULClasses = [
38
29
  'k-list-ul'
39
30
  ];
40
31
 
41
- let legacyListULClasses = [
42
- 'k-list',
43
- 'k-reset',
44
- {
45
- 'k-virtual-list': virtualization === true
46
- }
47
- ];
48
-
49
32
  let ariaAttr = aria
50
33
  ? {}
51
34
  : {};
52
35
 
53
36
  if (legacy) {
37
+
38
+ let legacyListContentClasses = [
39
+ ownClassName,
40
+ 'k-list-content',
41
+ {
42
+ 'k-list-scroller': virtualization === false || virtualization === undefined,
43
+ 'k-virtual-content': virtualization === true
44
+ }
45
+ ];
46
+
47
+ let legacyListULClasses = [
48
+ 'k-list',
49
+ 'k-reset',
50
+ {
51
+ 'k-virtual-list': virtualization === true
52
+ }
53
+ ];
54
+
54
55
  return (
55
56
  <div className={legacyListContentClasses} {...ariaAttr} {...htmlAttributes}>
56
57
  <ul className={legacyListULClasses}>
@@ -20,7 +20,8 @@ function ListHeaderStatic(props) {
20
20
 
21
21
  let listHeaderClasses = [
22
22
  ownClassName,
23
- 'k-list-header'
23
+ // 'k-list-header',
24
+ 'k-list-group-sticky-header'
24
25
  ];
25
26
 
26
27
  let legacyListHeaderClasses = [
@@ -133,7 +133,7 @@ MaskedTextboxStatic.propTypes = {
133
133
  showClearButton: typeof true,
134
134
 
135
135
  size: typeof [ null, 'small', 'medium', 'large' ],
136
- rounded: typeof [ null, 'small', 'medium', 'large', 'pill' ],
136
+ rounded: typeof [ null, 'small', 'medium', 'large', 'full' ],
137
137
 
138
138
  fillMode: typeof [ null, 'solid', 'flat', 'outline' ],
139
139
 
@@ -149,7 +149,7 @@ MenuItemStatic.propTypes = {
149
149
 
150
150
  contentTemplate: typeof '#fragment',
151
151
 
152
- size: typeof [ 'none', 'small', 'medium', 'large' ],
152
+ size: typeof [ null, 'small', 'medium', 'large' ],
153
153
 
154
154
  hover: typeof false,
155
155
  focus: typeof false,
@@ -59,7 +59,7 @@ MenuListStatic.defaultProps = {
59
59
  };
60
60
 
61
61
  MenuListStatic.propTypes = {
62
- size: typeof [ 'none', 'small', 'medium', 'large' ],
62
+ size: typeof [ null, 'small', 'medium', 'large' ],
63
63
 
64
64
  children: typeof [],
65
65
 
@@ -0,0 +1,37 @@
1
+ ```html
2
+ <!-- default rendering -->
3
+ <span class="k-multiselect k-input k-input-md k-rounded-md k-input-solid">
4
+ <input type="text" class="k-input-inner" placeholder="..." autocomplete="..."/>
5
+ </span>
6
+
7
+ <!-- canonical rendering -->
8
+ <span class="
9
+ k-multiselect
10
+ k-input
11
+ k-input-{size}
12
+ k-rounded-{rounded}
13
+ k-input-{fillMode}
14
+
15
+ {valid && 'k-valid'}
16
+ {invalid && 'k-invalid'}
17
+ {loading && 'k-loading'}
18
+ {required && 'k-required'}
19
+ {disabled && 'k-disabled'}
20
+ ">
21
+ {showInputIcon && inputIconName !== '' && <span class="k-input-icon k-icon k-i-{inputIconName}"></span>}
22
+ {inputPrefix && <span class="k-input-prefix">...</span>}
23
+ <div class="k-input-values k-chip-list k-chip-list-md k-selection-multiple">
24
+ {value}
25
+ <input type={type} class="k-input-inner" value={value} placeholder={placeholder} disabled={disabled} />
26
+ </div>
27
+ {inputPrefix && <span class="k-input-suffix">...</span>}
28
+ {showValidationIcon && valid && <span class="k-input-validation-icon k-icon k-i-check"></span>}
29
+ {showValidationIcon && invalid && <span class="k-input-validation-icon k-icon k-i-warning"></span>}
30
+ {showLoadingIcon && loading && <span class="k-icon k-i-loading"></span>}
31
+ {showClearValue && text !== '' && <span class="k-clear-value"><span class="k-icon k-i-x"></span></span>}
32
+ {showArrowButton &&
33
+ <button type="button" class="k-input-button k-button k-icon-button k-button-{size} k-button-{fillMode} k-button-{fillMode}-base">
34
+ <span class="k-button-icon k-icon k-i-arrow-s"></span>
35
+ </button>}
36
+ </span>
37
+ ```
@@ -167,10 +167,10 @@ MultiSelectStatic.propTypes = {
167
167
  suffix: typeof '#fragment',
168
168
  value: typeof '#fragment',
169
169
 
170
- size: typeof [ 'none', 'small', 'medium', 'large' ],
171
- rounded: typeof [ 'none', 'small', 'medium', 'large', 'pill' ],
170
+ size: typeof [ null, 'small', 'medium', 'large' ],
171
+ rounded: typeof [ null, 'small', 'medium', 'large', 'full' ],
172
172
 
173
- fillMode: typeof [ 'none', 'solid', 'flat', 'outline' ],
173
+ fillMode: typeof [ null, 'solid', 'flat', 'outline' ],
174
174
 
175
175
  hover: typeof false,
176
176
  focus: typeof false,
@@ -149,7 +149,7 @@ NumericTextboxStatic.propTypes = {
149
149
  showClearButton: typeof true,
150
150
 
151
151
  size: typeof [ null, 'small', 'medium', 'large' ],
152
- rounded: typeof [ null, 'small', 'medium', 'large', 'pill' ],
152
+ rounded: typeof [ null, 'small', 'medium', 'large', 'full' ],
153
153
 
154
154
  fillMode: typeof [ null, 'solid', 'flat', 'outline' ],
155
155
 
@@ -69,7 +69,7 @@ PopupStatic.propTypes = {
69
69
  className: typeof '',
70
70
 
71
71
  size: typeof [ null, 'small', 'medium', 'large' ],
72
- rounded: typeof [ null, 'small', 'medium', 'large', 'pill' ],
72
+ rounded: typeof [ null, 'small', 'medium', 'large' ],
73
73
 
74
74
  aria: typeof false,
75
75
  legacy: typeof false,
@@ -150,7 +150,7 @@ SearchboxInner.propTypes = {
150
150
  suffix: typeof '#fragment',
151
151
 
152
152
  size: typeof [ null, 'small', 'medium', 'large' ],
153
- rounded: typeof [ null, 'small', 'medium', 'large', 'pill' ],
153
+ rounded: typeof [ null, 'small', 'medium', 'large', 'full' ],
154
154
 
155
155
  fillMode: typeof [ null, 'solid', 'flat', 'outline' ],
156
156
 
@@ -129,12 +129,12 @@ SplitButtonStatic.propTypes = {
129
129
 
130
130
  arrowIconName: typeof '',
131
131
 
132
- size: typeof [ 'none', 'small', 'medium', 'large' ],
133
- rounded: typeof [ 'none', '0', 'small', 'medium', 'large', 'pill', 'circle' ],
134
- shape: typeof [ 'none', 'rectangle', 'square' ],
132
+ size: typeof [ null, 'small', 'medium', 'large' ],
133
+ rounded: typeof [ null, 'small', 'medium', 'large', 'full' ],
134
+ shape: typeof [ null, 'rectangle', 'square' ],
135
135
 
136
- fillMode: typeof [ 'none', 'solid', 'flat', 'outline', 'link' ],
137
- themeColor: typeof [ 'none', 'surface', 'base', 'primary' ],
136
+ fillMode: typeof [ null, 'solid', 'flat', 'outline', 'link' ],
137
+ themeColor: typeof [ null, 'surface', 'base', 'primary' ],
138
138
 
139
139
  hover: typeof false,
140
140
  focus: typeof false,
@@ -1,12 +1,12 @@
1
1
  ```html
2
2
  <!-- default rendering -->
3
- <span class="k-switch k-switch-on k-switch-md k-rounded-pill">
4
- <span class="k-switch-track k-rounded-pill">
3
+ <span class="k-switch k-switch-on k-switch-md k-rounded-full">
4
+ <span class="k-switch-track k-rounded-full">
5
5
  <span class="k-switch-label-on">On</span>
6
6
  <span class="k-switch-label-off">Off</span>
7
7
  </span>
8
8
  <span class="k-switch-thumb-wrap">
9
- <span class="k-switch-thumb k-rounded-pill"></span>
9
+ <span class="k-switch-thumb k-rounded-full"></span>
10
10
  </span>
11
11
  </span>
12
12
 
@@ -105,8 +105,8 @@ SwitchStatic.defaultProps = {
105
105
  offLabel: '',
106
106
 
107
107
  size: 'medium',
108
- trackRounded: 'pill',
109
- thumbRounded: 'pill'
108
+ trackRounded: 'full',
109
+ thumbRounded: 'full'
110
110
  };
111
111
  SwitchStatic.propTypes = {
112
112
  checked: typeof false,
@@ -115,8 +115,8 @@ SwitchStatic.propTypes = {
115
115
  offLabel: typeof '',
116
116
 
117
117
  size: typeof [ null, 'small', 'medium', 'large' ],
118
- trackRounded: typeof [ null, '0', 'small', 'medium', 'large', 'pill', 'circle' ],
119
- thumbRounded: typeof [ null, '0', 'small', 'medium', 'large', 'pill', 'circle' ],
118
+ trackRounded: typeof [ null, 'small', 'medium', 'large', 'full' ],
119
+ thumbRounded: typeof [ null, 'small', 'medium', 'large', 'full' ],
120
120
 
121
121
  hover: typeof false,
122
122
  focus: typeof false,
@@ -117,7 +117,7 @@ TextareaStatic.propTypes = {
117
117
  suffix: typeof '#fragment',
118
118
 
119
119
  size: typeof [ null, 'small', 'medium', 'large' ],
120
- rounded: typeof [ null, 'small', 'medium', 'large', 'pill' ],
120
+ rounded: typeof [ null, 'small', 'medium', 'large', 'full' ],
121
121
 
122
122
  fillMode: typeof [ null, 'solid', 'flat', 'outline' ],
123
123
 
@@ -140,7 +140,7 @@ TextboxStatic.propTypes = {
140
140
  suffix: typeof '#fragment',
141
141
 
142
142
  size: typeof [ null, 'small', 'medium', 'large' ],
143
- rounded: typeof [ null, 'small', 'medium', 'large', 'pill' ],
143
+ rounded: typeof [ null, 'small', 'medium', 'large', 'full' ],
144
144
 
145
145
  fillMode: typeof [ null, 'solid', 'flat', 'outline' ],
146
146
 
@@ -76,17 +76,15 @@ function TimePickerStatic(props) {
76
76
  'k-widget',
77
77
  'k-timepicker',
78
78
  {
79
+ 'k-state-hover': hover === true,
80
+ 'k-state-focus': focus === true,
81
+ 'k-state-invalid': invalid === true,
79
82
  'k-state-disabled': disabled === true
80
83
  }
81
84
  ];
82
85
 
83
86
  let legacyWrapClasses = [
84
- 'k-picker-wrap',
85
- {
86
- 'k-state-hover': hover === true,
87
- 'k-state-focused': focus === true,
88
- 'k-state-invalid': invalid === true
89
- }
87
+ 'k-picker-wrap'
90
88
  ];
91
89
 
92
90
  return (
@@ -150,7 +148,7 @@ TimePickerStatic.propTypes = {
150
148
  suffix: typeof '#fragment',
151
149
 
152
150
  size: typeof [ null, 'small', 'medium', 'large' ],
153
- rounded: typeof [ null, 'small', 'medium', 'large', 'pill' ],
151
+ rounded: typeof [ null, 'small', 'medium', 'large', 'full' ],
154
152
 
155
153
  fillMode: typeof [ null, 'solid', 'flat', 'outline' ],
156
154
 
@@ -1,45 +0,0 @@
1
- import { IconStatic } from '../icon/index';
2
-
3
- function ChipRemoveIconStatic(chipProps) {
4
-
5
- const {
6
- className: ownClassName,
7
-
8
- showRemoveIcon,
9
-
10
- aria,
11
- legacy
12
- } = chipProps;
13
-
14
- if (!showRemoveIcon) {
15
- return <></>;
16
- }
17
-
18
- let ariaAttr = aria
19
- ? {}
20
- : {};
21
-
22
- let iconClasses = [
23
- ownClassName,
24
- 'k-chip-remove-icon',
25
- 'k-chip-icon'
26
- ];
27
-
28
- let legacyClasses = [
29
- ownClassName,
30
- 'k-remove-icon'
31
- ];
32
-
33
- if (legacy) {
34
- return (
35
- <IconStatic className={legacyClasses} name="x-circle" {...ariaAttr} />
36
- );
37
- }
38
-
39
- return (
40
- <IconStatic className={iconClasses} name="x-circle" {...ariaAttr} />
41
- );
42
-
43
- }
44
-
45
- export { ChipRemoveIconStatic };
@@ -1,47 +0,0 @@
1
- import { IconStatic } from '../icon/index';
2
-
3
- function ChipSelectedIconStatic(chipProps) {
4
-
5
- const {
6
- className: ownClassName,
7
-
8
- showSelectedIcon,
9
-
10
- selected,
11
-
12
- aria,
13
- legacy
14
- } = chipProps;
15
-
16
- if (!showSelectedIcon || !selected) {
17
- return <></>;
18
- }
19
-
20
- let ariaAttr = aria
21
- ? {}
22
- : {};
23
-
24
- let iconClasses = [
25
- ownClassName,
26
- 'k-selected-icon',
27
- 'k-chip-icon'
28
- ];
29
-
30
- let legacyClasses = [
31
- ownClassName,
32
- 'k-chip-selected-icon'
33
- ];
34
-
35
- if (legacy) {
36
- return (
37
- <span className="k-selected-icon-wrapper">
38
- <IconStatic name="check" className={legacyClasses} {...ariaAttr} />
39
- </span>
40
- );
41
- }
42
-
43
- return ("");
44
-
45
- }
46
-
47
- export { ChipSelectedIconStatic };