@progress/kendo-themes-html 5.0.0-alpha.0 → 5.0.0-beta.0

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 (81) hide show
  1. package/lib/jsx-runtime.js +38 -3
  2. package/package.json +8 -8
  3. package/src/autocomplete/README.md +15 -9
  4. package/src/autocomplete/autocomplete.jsx +3 -3
  5. package/src/avatar/README.md +21 -0
  6. package/src/avatar/avatar.jsx +116 -0
  7. package/src/avatar/index.js +1 -0
  8. package/src/button/README.md +8 -8
  9. package/src/button/button.jsx +5 -5
  10. package/src/checkbox/README.md +8 -8
  11. package/src/checkbox/checkbox.jsx +2 -2
  12. package/src/chip/README.md +47 -0
  13. package/src/chip/chip-avatar.jsx +21 -0
  14. package/src/chip/chip-list.jsx +81 -0
  15. package/src/chip/chip-remove-icon.jsx +45 -0
  16. package/src/chip/chip-selected-icon.jsx +47 -0
  17. package/src/chip/chip.jsx +163 -0
  18. package/src/chip/index.js +5 -0
  19. package/src/colorpicker/color-preview.jsx +5 -1
  20. package/src/colorpicker/colorpicker.jsx +7 -6
  21. package/src/combobox/README.md +15 -9
  22. package/src/combobox/combobox.jsx +4 -4
  23. package/src/dateinput/README.md +48 -0
  24. package/src/dateinput/dateinput.jsx +170 -0
  25. package/src/dateinput/index.js +1 -0
  26. package/src/datepicker/README.md +36 -0
  27. package/src/datepicker/datepicker.jsx +170 -0
  28. package/src/datepicker/index.js +1 -0
  29. package/src/datetimepicker/README.md +36 -0
  30. package/src/datetimepicker/datetimepicker.jsx +170 -0
  31. package/src/datetimepicker/index.js +1 -0
  32. package/src/dropdownbutton/README.md +60 -0
  33. package/src/dropdownbutton/dropdownbutton.jsx +149 -0
  34. package/src/dropdownbutton/index.js +1 -0
  35. package/src/dropdownlist/README.md +23 -14
  36. package/src/dropdownlist/dropdownlist.jsx +8 -5
  37. package/src/index.js +12 -3
  38. package/src/input/input-clear-value.jsx +2 -1
  39. package/src/input/input.jsx +3 -3
  40. package/src/input/picker.jsx +3 -3
  41. package/src/list/README.md +58 -0
  42. package/src/list/index.js +7 -0
  43. package/src/list/list-content.jsx +119 -0
  44. package/src/list/list-footer.jsx +61 -0
  45. package/src/list/list-group-header.jsx +92 -0
  46. package/src/list/list-header.jsx +61 -0
  47. package/src/list/list-item-text.jsx +62 -0
  48. package/src/list/list-item.jsx +96 -0
  49. package/src/list/list.jsx +79 -0
  50. package/src/maskedtextbox/README.md +15 -9
  51. package/src/maskedtextbox/maskedtextbox.jsx +3 -3
  52. package/src/menuitem/README.md +26 -0
  53. package/src/menuitem/index.js +2 -0
  54. package/src/menuitem/menu-item-content.jsx +48 -0
  55. package/src/menuitem/menu-item.jsx +169 -0
  56. package/src/menulist/README.md +11 -0
  57. package/src/menulist/index.js +1 -0
  58. package/src/menulist/menulist.jsx +73 -0
  59. package/src/multiselect/README.md +0 -0
  60. package/src/multiselect/index.js +2 -0
  61. package/src/multiselect/multiselect-chip-list.jsx +55 -0
  62. package/src/multiselect/multiselect.jsx +183 -0
  63. package/src/numerictextbox/README.md +15 -9
  64. package/src/numerictextbox/numerictextbox.jsx +4 -4
  65. package/src/radio/README.md +7 -7
  66. package/src/radio/radio.jsx +1 -1
  67. package/src/searchbox/README.md +16 -12
  68. package/src/searchbox/searchbox.jsx +3 -3
  69. package/src/spinbutton/spinbutton.jsx +8 -2
  70. package/src/splitbutton/README.md +76 -0
  71. package/src/splitbutton/index.js +1 -0
  72. package/src/splitbutton/splitbutton.jsx +152 -0
  73. package/src/switch/switch.jsx +3 -3
  74. package/src/textarea/README.md +17 -11
  75. package/src/textarea/textarea.jsx +3 -3
  76. package/src/textbox/README.md +15 -9
  77. package/src/textbox/textbox.jsx +4 -3
  78. package/src/timepicker/README.md +36 -0
  79. package/src/timepicker/index.js +1 -0
  80. package/src/timepicker/timepicker.jsx +170 -0
  81. package/utils/styles.js +14 -5
@@ -35,7 +35,15 @@ const attrMap = {
35
35
  onlabel: 'onLabel',
36
36
  offlabel: 'offLabel',
37
37
  trackrounded: 'trackRounded',
38
- thumbrounded: 'thumbRounded'
38
+ thumbrounded: 'thumbRounded',
39
+
40
+ // Menu list
41
+ contenttemplate: 'contentTemplate',
42
+
43
+ // Chip
44
+ showremoveicon: 'showRemoveIcon',
45
+ showselectedicon: 'showSelectedIcon',
46
+ showavatar: 'showAvatar'
39
47
  };
40
48
 
41
49
  const booleanAttr = new Set([
@@ -44,6 +52,7 @@ const booleanAttr = new Set([
44
52
  'hover',
45
53
  'focus',
46
54
  'active',
55
+ 'readonly',
47
56
  'disabled',
48
57
 
49
58
  'checked',
@@ -61,10 +70,29 @@ const booleanAttr = new Set([
61
70
  'showIcon',
62
71
  'showClearButton',
63
72
  'showSpinButton',
73
+ 'showArrow',
74
+
75
+ 'virtualization',
76
+ 'stuck',
77
+ 'custom',
78
+
79
+ 'showRemoveIcon',
80
+ 'showSelectedIcon',
81
+ 'showAvatar',
64
82
 
65
83
  'aria'
66
84
  ]);
67
85
 
86
+ const nullAttr = new Set([
87
+ 'size',
88
+ 'rounded',
89
+ 'fillMode',
90
+ 'themeColor',
91
+
92
+ 'trackRounded',
93
+ 'thumbRounded'
94
+ ]);
95
+
68
96
  const skipAttr = new Set([
69
97
  'is',
70
98
  'aria',
@@ -143,6 +171,10 @@ function attrToProps( attributes ) {
143
171
  attrName = attrMap[attrName];
144
172
  }
145
173
 
174
+ // Set props as is
175
+ props[ attrName ] = attrValue;
176
+
177
+ // Ensure boolean value
146
178
  if (booleanAttr.has(attrName) && typeof attrValue === 'string') {
147
179
  switch (attrValue) {
148
180
  case '':
@@ -153,8 +185,11 @@ function attrToProps( attributes ) {
153
185
  props[ attrName ] = false;
154
186
  break;
155
187
  }
156
- } else {
157
- props[ attrName ] = attrValue;
188
+ }
189
+
190
+ // Ensure null value
191
+ if (nullAttr.has(attrName) && attrValue === 'null') {
192
+ props[ attrName ] = null;
158
193
  }
159
194
  });
160
195
 
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-alpha.0",
4
+ "version": "5.0.0-beta.0",
5
5
  "author": "Progress",
6
6
  "license": "Apache-2.0",
7
7
  "keywords": [
@@ -34,13 +34,13 @@
34
34
  "dev": "rollup -cw"
35
35
  },
36
36
  "devDependencies": {
37
- "@babel/core": "^7.15.8",
38
- "@babel/preset-env": "^7.15.8",
39
- "@babel/preset-react": "^7.14.5",
37
+ "@babel/core": "^7.16.0",
38
+ "@babel/preset-env": "^7.16.0",
39
+ "@babel/preset-react": "^7.16.0",
40
40
  "@rollup/plugin-babel": "^5.3.0",
41
- "@rollup/plugin-commonjs": "^21.0.0",
42
- "@rollup/plugin-node-resolve": "^13.0.5",
43
- "rollup": "^2.58.0"
41
+ "@rollup/plugin-commonjs": "^21.0.1",
42
+ "@rollup/plugin-node-resolve": "^13.0.6",
43
+ "rollup": "^2.59.0"
44
44
  },
45
- "gitHead": "3fd060a3f688d79324c6e976857536557f71dc11"
45
+ "gitHead": "cf3cf196b3134f227f04a272b4dc4a480b008a84"
46
46
  }
@@ -8,17 +8,23 @@
8
8
  <span class="
9
9
  k-autocomplete
10
10
  k-input
11
- k-input-${size}
12
- k-rounded-${rounded}
13
- k-input-${fillMode}
11
+ k-input-{size}
12
+ k-rounded-{rounded}
13
+ k-input-{fillMode}
14
14
 
15
- ${valid && 'k-valid'}
16
- ${invalid && 'k-invalid'}
17
- ${required && 'k-required'}
18
- ${disabled && 'k-disabled'}
15
+ {valid && 'k-valid'}
16
+ {invalid && 'k-invalid'}
17
+ {loading && 'k-loading'}
18
+ {required && 'k-required'}
19
+ {disabled && 'k-disabled'}
19
20
  ">
21
+ {showInputIcon && inputIconName !== '' && <span class="k-input-icon k-i-icon k-i-{inputIconName}"></span>}
22
+ {inputPrefix && <span class="k-input-prefix">...</span>}
20
23
  <input type={type} class="k-input-inner" value={value} placeholder={placeholder} disabled={disabled} />
21
- {valid && <span class="k-input-icon k-icon k-i-check"></span>}
22
- {invalid && <span class="k-input-icon k-icon k-i-check"></span>}
24
+ {inputPrefix && <span class="k-input-suffix">...</span>}
25
+ {showValidationIcon && valid && <span class="k-validation-icon k-icon k-i-check"></span>}
26
+ {showValidationIcon && invalid && <span class="k-validation-icon k-icon k-i-warning"></span>}
27
+ {showLoadingIcon && loading && <span class="k-icon k-i-loading"></span>}
28
+ {showClearValue && text !== '' && <span class="k-clear-value"><span class="k-icon k-i-x"></span></span>}
23
29
  </span>
24
30
  ```
@@ -138,10 +138,10 @@ AutocompleteStatic.propTypes = {
138
138
  prefix: typeof '#fragment',
139
139
  suffix: typeof '#fragment',
140
140
 
141
- size: typeof [ 'none', 'small', 'medium', 'large' ],
142
- rounded: typeof [ 'none', 'small', 'medium', 'large', 'pill' ],
141
+ size: typeof [ null, 'small', 'medium', 'large' ],
142
+ rounded: typeof [ null, 'small', 'medium', 'large', 'pill' ],
143
143
 
144
- fillMode: typeof [ 'none', 'solid', 'flat', 'outline' ],
144
+ fillMode: typeof [ null, 'solid', 'flat', 'outline' ],
145
145
 
146
146
  hover: typeof false,
147
147
  focus: typeof false,
@@ -0,0 +1,21 @@
1
+ ```html
2
+ <!-- default rendering -->
3
+ <div class="k-avatar k-avatar-md k-rounded-circle k-avatar-solid k-avatar-solid-primary">
4
+ <span class="k-avatar-image">
5
+ <img src="../../assets/avatar.jpg" class="">
6
+ </span>
7
+ </div>
8
+
9
+ <!-- canonical rendering -->
10
+ <div class="
11
+ k-avatar
12
+ k-avatar-{size}
13
+ k-rounded-{rounded}
14
+ k-avatar-{fillMode}
15
+ k-avatar-{fillMode}-{themeColor}
16
+ ">
17
+ <span class="k-avatar-{type}">
18
+ {content}
19
+ </span>
20
+ </div>
21
+ ```
@@ -0,0 +1,116 @@
1
+ import * as styles from '../../utils/styles';
2
+ import { Component, globalDefaultProps } from '../component';
3
+
4
+ class Avatar extends Component {
5
+ render() {
6
+ return <AvatarStatic {...this.props} />;
7
+ }
8
+ }
9
+
10
+ function AvatarStatic(props) {
11
+ const {
12
+ className: ownClassName,
13
+
14
+ children,
15
+
16
+ type,
17
+
18
+ size,
19
+ shape,
20
+ rounded,
21
+ bordered,
22
+
23
+ fillMode,
24
+ themeColor,
25
+
26
+ aria,
27
+ legacy,
28
+
29
+ ...htmlAttributes
30
+ } = props;
31
+
32
+ let avatarClasses = [
33
+ ownClassName,
34
+ 'k-avatar',
35
+ styles.sizeClass( size, 'k-avatar' ),
36
+ styles.roundedClass( rounded ),
37
+ styles.fillModeClass( fillMode, 'k-avatar' ),
38
+ styles.shapeClass( shape, 'k-avatar' ),
39
+ styles.themeColorClass( fillMode, themeColor, 'k-avatar' ),
40
+ styles.borderedClass( bordered, 'k-avatar' ),
41
+ ];
42
+
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
+ let ariaAttr = aria
57
+ ? {}
58
+ : {};
59
+
60
+ if (legacy) {
61
+ return (
62
+ <span className={legacyClasses} {...ariaAttr} {...htmlAttributes}>
63
+ <span className={`k-avatar-${type}`}>
64
+ {children}
65
+ </span>
66
+ </span>
67
+ );
68
+ }
69
+
70
+ return (
71
+ <span className={avatarClasses} {...ariaAttr} {...htmlAttributes}>
72
+ <span className={`k-avatar-${type}`}>
73
+ {children}
74
+ </span>
75
+ </span>
76
+ );
77
+ }
78
+
79
+ AvatarStatic.defaultProps = {
80
+ ...globalDefaultProps,
81
+
82
+ className: '',
83
+ children: [],
84
+
85
+ type: '',
86
+
87
+ size: 'medium',
88
+ shape: 'square',
89
+ rounded: 'circle',
90
+ bordered: false,
91
+
92
+ fillMode: 'solid',
93
+ themeColor: 'primary'
94
+ };
95
+
96
+ AvatarStatic.propTypes = {
97
+ className: typeof '',
98
+ children: typeof [],
99
+
100
+ type: typeof '',
101
+
102
+ size: typeof [ null, 'small', 'medium', 'large', 'circle' ],
103
+ shape: typeof [ null, 'square', 'circle', 'rounded' ],
104
+ rounded: typeof [ null, '0', 'small', 'medium', 'large' ],
105
+ bordered: typeof false,
106
+
107
+ fillMode: typeof [ null, 'solid', 'outline' ],
108
+ themeColor: typeof [ null, 'primary' ],
109
+
110
+ aria: typeof false,
111
+ legacy: typeof false,
112
+
113
+ htmlAttributes: typeof []
114
+ };
115
+
116
+ export { Avatar, AvatarStatic };
@@ -0,0 +1 @@
1
+ export * from './avatar.jsx';
@@ -7,16 +7,16 @@
7
7
  <!-- canonical rendering -->
8
8
  <button class="
9
9
  k-button
10
- ${text === '' && icon !== '' && 'k-icon-button'}
11
- k-button-${size}
12
- k-button-${shape}
13
- k-rounded-${rounded}
14
- k-button-${fillMode}
15
- k-button-${fillMode}-${themeColor}
10
+ {text === '' && iconName !== '' && 'k-icon-button'}
11
+ k-button-{size}
12
+ k-button-{shape}
13
+ k-rounded-{rounded}
14
+ k-button-{fillMode}
15
+ k-button-{fillMode}-{themeColor}
16
16
 
17
- ${disabled && 'k-disabled'}
17
+ {disabled && 'k-disabled'}
18
18
  " type={type} disabled={disabled}>
19
- {icon !== '' && <span class="k-button-icon k-icon k-i-${icon}"></span>}
19
+ {iconName !== '' && <span class="k-button-icon k-icon k-i-{iconName}"></span>}
20
20
  {text !== '' && <span class="k-button-text">Button</span>}
21
21
  </button>
22
22
  ```
@@ -124,12 +124,12 @@ ButtonStatic.propTypes = {
124
124
 
125
125
  type: typeof [ 'button', 'submit', 'reset' ],
126
126
 
127
- size: typeof [ 'none', 'small', 'medium', 'large' ],
128
- rounded: typeof [ 'none', '0', 'small', 'medium', 'large', 'pill', 'circle' ],
129
- shape: typeof [ 'none', 'rectangle', 'square' ],
127
+ size: typeof [ null, 'small', 'medium', 'large' ],
128
+ rounded: typeof [ null, '0', 'small', 'medium', 'large', 'pill', 'circle' ],
129
+ shape: typeof [ null, 'rectangle', 'square' ],
130
130
 
131
- fillMode: typeof [ 'none', 'solid', 'flat', 'outline', 'link' ],
132
- themeColor: typeof [ 'none', 'surface', 'base', 'primary' ],
131
+ fillMode: typeof [ null, 'solid', 'flat', 'outline', 'link' ],
132
+ themeColor: typeof [ null, 'surface', 'base', 'primary' ],
133
133
 
134
134
  hover: typeof false,
135
135
  focus: typeof false,
@@ -6,16 +6,16 @@
6
6
  <input type="checkbox"
7
7
  class="
8
8
  k-checkbox
9
- k-checkbox-${size}
10
- k-rounded-${rounded}
9
+ k-checkbox-{size}
10
+ k-rounded-{rounded}
11
11
 
12
- ${checked && 'k-checked'}
13
- ${indeterminate && 'k-indeterminate'}
12
+ {checked && 'k-checked'}
13
+ {indeterminate && 'k-indeterminate'}
14
14
 
15
- ${valid && 'k-valid'}
16
- ${invalid && 'k-invalid'}
17
- ${required && 'k-required'}
18
- ${disabled && 'k-disabled'}
15
+ {valid && 'k-valid'}
16
+ {invalid && 'k-invalid'}
17
+ {required && 'k-required'}
18
+ {disabled && 'k-disabled'}
19
19
  "
20
20
  disabled={disabled}
21
21
  />
@@ -103,8 +103,8 @@ CheckboxStatic.propTypes = {
103
103
  checked: typeof false,
104
104
  indeterminate: typeof false,
105
105
 
106
- size: typeof [ 'none', 'small', 'medium', 'large' ],
107
- rounded: typeof [ 'none', 'small', 'medium', 'large' ],
106
+ size: typeof [ null, 'small', 'medium', 'large' ],
107
+ rounded: typeof [ null, 'small', 'medium', 'large' ],
108
108
 
109
109
  hover: typeof false,
110
110
  focus: typeof false,
@@ -0,0 +1,47 @@
1
+ ## Chip
2
+
3
+ ```html
4
+ <!-- default rendering -->
5
+ <div class="k-chip k-chip-md k-rounded-pill k-chip-solid k-chip-solid-base">
6
+ <span class="k-chip-text">Chip Text</span>
7
+ </div>
8
+
9
+ <!-- canonical rendering -->
10
+ <div class="
11
+ k-chip
12
+ k-chip-${size}
13
+ k-rounded-${rounded}
14
+ k-chip-${fillMode}
15
+ k-chip-${fillMode}-${themeColor}
16
+
17
+ ${disabled && 'k-disabled'}>
18
+ {icon !== '' && <span class="k-chip-icon k-icon k-i-${icon}"></span>}
19
+ {avatar !== '' && <span class="k-chip-avatar k-avatar"></span>}
20
+ <span className="k-chip-content">
21
+ { children.length
22
+ ? children
23
+ : text &&
24
+ <span className="k-chip-label">{text}</span>}
25
+ </span>
26
+ {removable && <span class="k-chip-icon k-icon k-i-${removeIcon}"></span>}
27
+ </div>
28
+ ```
29
+
30
+ ## ChipList
31
+
32
+ ```html
33
+ <!-- default rendering -->
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>
38
+ </div>
39
+
40
+ <!-- canonical rendering -->
41
+ <div class="
42
+ k-chip-list
43
+ k-chip-${size}">
44
+ <div class="k-chip" {...props}>...</div>
45
+ <div class="k-chip" {...props}>...</div>
46
+ </div>
47
+ ```
@@ -0,0 +1,21 @@
1
+ import { AvatarStatic } from '../avatar/index';
2
+
3
+ function ChipAvatarStatic(chipProps) {
4
+
5
+ const {
6
+ showAvatar
7
+ } = chipProps;
8
+
9
+ if (!showAvatar) {
10
+ return <></>;
11
+ }
12
+
13
+ return (
14
+ <AvatarStatic className="k-chip-avatar" type="image">
15
+ <img src="../../assets/avatar.jpg"/>
16
+ </AvatarStatic>
17
+ );
18
+
19
+ }
20
+
21
+ export { ChipAvatarStatic };
@@ -0,0 +1,81 @@
1
+
2
+ import * as styles from '../../utils/styles';
3
+ import { Component, globalDefaultProps } from '../component';
4
+
5
+ class ChipList extends Component {
6
+ render() {
7
+ return <ChipListStatic {...this.props} />;
8
+ }
9
+ }
10
+
11
+ function ChipListStatic(props) {
12
+ const {
13
+ className: ownClassName,
14
+
15
+ size,
16
+
17
+ selection,
18
+
19
+ aria,
20
+ legacy,
21
+
22
+ ...htmlAttributes
23
+ } = props;
24
+
25
+ let listClasses = [
26
+ ownClassName,
27
+ 'k-chip-list',
28
+ styles.sizeClass( size, 'k-chip-list' ),
29
+ {
30
+ 'k-selection-single': selection === 'single',
31
+ 'k-selection-multiple': selection === 'multiple'
32
+ }
33
+ ];
34
+
35
+
36
+ let legacyListClasses = [
37
+ ownClassName,
38
+ ];
39
+
40
+ let ariaAttr = aria
41
+ ? {}
42
+ : {};
43
+
44
+ if (legacy) {
45
+ return (
46
+ <div className={legacyListClasses} {...ariaAttr} {...htmlAttributes}>
47
+
48
+ </div>
49
+ );
50
+ }
51
+
52
+ return (
53
+ <div className={listClasses} {...ariaAttr} {...htmlAttributes}>
54
+
55
+ </div>
56
+ );
57
+ }
58
+
59
+ ChipListStatic.defaultProps = {
60
+ ...globalDefaultProps,
61
+
62
+ className: '',
63
+
64
+ size: 'medium',
65
+
66
+ selection: 'none'
67
+ };
68
+
69
+ ChipListStatic.propTypes = {
70
+ size: typeof [ null, 'small', 'medium', 'large' ],
71
+
72
+ selection: typeof [ null, 'single', 'multiple' ],
73
+
74
+ aria: typeof false,
75
+ legacy: typeof false,
76
+
77
+ className: typeof '',
78
+ htmlAttributes: typeof []
79
+ };
80
+
81
+ export { ChipList, ChipListStatic };
@@ -0,0 +1,45 @@
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 };
@@ -0,0 +1,47 @@
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 };