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

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 (89) hide show
  1. package/lib/jsx-runtime.js +40 -3
  2. package/package.json +8 -8
  3. package/src/autocomplete/README.md +15 -9
  4. package/src/autocomplete/autocomplete.jsx +4 -4
  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 +6 -6
  10. package/src/checkbox/README.md +8 -8
  11. package/src/checkbox/checkbox.jsx +3 -3
  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 +6 -2
  20. package/src/colorpicker/colorpicker.jsx +8 -7
  21. package/src/combobox/README.md +15 -9
  22. package/src/combobox/combobox.jsx +5 -5
  23. package/src/{component.js → component/component.jsx} +4 -2
  24. package/src/component/index.js +1 -0
  25. package/src/dateinput/README.md +15 -9
  26. package/src/dateinput/dateinput.jsx +5 -5
  27. package/src/datepicker/README.md +15 -9
  28. package/src/datepicker/datepicker.jsx +5 -5
  29. package/src/datetimepicker/README.md +15 -9
  30. package/src/datetimepicker/datetimepicker.jsx +5 -5
  31. package/src/dropdownbutton/README.md +60 -0
  32. package/src/dropdownbutton/dropdownbutton.jsx +149 -0
  33. package/src/dropdownbutton/index.js +1 -0
  34. package/src/dropdownlist/README.md +23 -14
  35. package/src/dropdownlist/dropdownlist.jsx +9 -6
  36. package/src/icon/icon.jsx +1 -1
  37. package/src/index.js +49 -4
  38. package/src/input/input-clear-value.jsx +1 -1
  39. package/src/input/input-inner-input.jsx +1 -1
  40. package/src/input/input-inner-span.jsx +1 -1
  41. package/src/input/input-inner-textarea.jsx +1 -1
  42. package/src/input/input-prefix.jsx +1 -1
  43. package/src/input/input-suffix.jsx +1 -1
  44. package/src/input/input.jsx +4 -4
  45. package/src/input/picker.jsx +4 -4
  46. package/src/list/README.md +93 -0
  47. package/src/list/index.js +5 -0
  48. package/src/list/list-content.jsx +94 -0
  49. package/src/list/list-group-item.jsx +66 -0
  50. package/src/list/list-header.jsx +66 -0
  51. package/src/list/list-item.jsx +117 -0
  52. package/src/list/list.jsx +182 -0
  53. package/src/maskedtextbox/README.md +15 -9
  54. package/src/maskedtextbox/maskedtextbox.jsx +4 -4
  55. package/src/menuitem/README.md +26 -0
  56. package/src/menuitem/index.js +2 -0
  57. package/src/menuitem/menu-item-content.jsx +48 -0
  58. package/src/menuitem/menu-item.jsx +169 -0
  59. package/src/menulist/README.md +11 -0
  60. package/src/menulist/index.js +1 -0
  61. package/src/menulist/menulist.jsx +73 -0
  62. package/src/multiselect/README.md +0 -0
  63. package/src/multiselect/index.js +2 -0
  64. package/src/multiselect/multiselect-chip-list.jsx +55 -0
  65. package/src/multiselect/multiselect.jsx +189 -0
  66. package/src/nodata/index.js +1 -0
  67. package/src/nodata/nodata.jsx +64 -0
  68. package/src/numerictextbox/README.md +15 -9
  69. package/src/numerictextbox/numerictextbox.jsx +5 -5
  70. package/src/popup/README.md +15 -0
  71. package/src/popup/index.js +1 -0
  72. package/src/popup/popup.jsx +80 -0
  73. package/src/radio/README.md +7 -7
  74. package/src/radio/radio.jsx +2 -2
  75. package/src/searchbar/searchbar.jsx +1 -1
  76. package/src/searchbox/README.md +16 -12
  77. package/src/searchbox/searchbox.jsx +4 -4
  78. package/src/spinbutton/spinbutton.jsx +9 -3
  79. package/src/splitbutton/README.md +76 -0
  80. package/src/splitbutton/index.js +1 -0
  81. package/src/splitbutton/splitbutton.jsx +152 -0
  82. package/src/switch/switch.jsx +4 -4
  83. package/src/textarea/README.md +17 -11
  84. package/src/textarea/textarea.jsx +4 -4
  85. package/src/textbox/README.md +15 -9
  86. package/src/textbox/textbox.jsx +4 -4
  87. package/src/timepicker/README.md +15 -9
  88. package/src/timepicker/timepicker.jsx +5 -5
  89. package/utils/styles.js +14 -5
@@ -31,11 +31,21 @@ const attrMap = {
31
31
  showclearbutton: 'showClearButton',
32
32
  clearbutton: 'clearButton',
33
33
 
34
+ showcheckbox: 'showCheckbox',
35
+
34
36
  // Switch
35
37
  onlabel: 'onLabel',
36
38
  offlabel: 'offLabel',
37
39
  trackrounded: 'trackRounded',
38
- thumbrounded: 'thumbRounded'
40
+ thumbrounded: 'thumbRounded',
41
+
42
+ // Menu list
43
+ contenttemplate: 'contentTemplate',
44
+
45
+ // Chip
46
+ showremoveicon: 'showRemoveIcon',
47
+ showselectedicon: 'showSelectedIcon',
48
+ showavatar: 'showAvatar'
39
49
  };
40
50
 
41
51
  const booleanAttr = new Set([
@@ -62,10 +72,30 @@ const booleanAttr = new Set([
62
72
  'showIcon',
63
73
  'showClearButton',
64
74
  'showSpinButton',
75
+ 'showArrow',
76
+
77
+ 'showCheckbox',
78
+
79
+ 'virtualization',
80
+ 'root',
81
+
82
+ 'showRemoveIcon',
83
+ 'showSelectedIcon',
84
+ 'showAvatar',
65
85
 
66
86
  'aria'
67
87
  ]);
68
88
 
89
+ const nullAttr = new Set([
90
+ 'size',
91
+ 'rounded',
92
+ 'fillMode',
93
+ 'themeColor',
94
+
95
+ 'trackRounded',
96
+ 'thumbRounded'
97
+ ]);
98
+
69
99
  const skipAttr = new Set([
70
100
  'is',
71
101
  'aria',
@@ -144,6 +174,10 @@ function attrToProps( attributes ) {
144
174
  attrName = attrMap[attrName];
145
175
  }
146
176
 
177
+ // Set props as is
178
+ props[ attrName ] = attrValue;
179
+
180
+ // Ensure boolean value
147
181
  if (booleanAttr.has(attrName) && typeof attrValue === 'string') {
148
182
  switch (attrValue) {
149
183
  case '':
@@ -154,8 +188,11 @@ function attrToProps( attributes ) {
154
188
  props[ attrName ] = false;
155
189
  break;
156
190
  }
157
- } else {
158
- props[ attrName ] = attrValue;
191
+ }
192
+
193
+ // Ensure null value
194
+ if (nullAttr.has(attrName) && attrValue === 'null') {
195
+ props[ attrName ] = null;
159
196
  }
160
197
  });
161
198
 
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.1",
4
+ "version": "5.0.0-beta.1",
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": "f7771e7fd26ff92503ccbdda09fbbd8a7578abb2"
45
+ "gitHead": "5f6c640b397e7dfb0481ea1eecd8fbce7abb967f"
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
  ```
@@ -1,4 +1,4 @@
1
- import { globalDefaultProps } from '../component';
1
+ import { globalDefaultProps } from '../component/index';
2
2
  import { Input, InputStatic, InputInnerInputStatic } from '../input/index';
3
3
  import { InputValidationIconStatic, InputLoadingIconStatic, InputClearValueStatic } from '../input/index';
4
4
 
@@ -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/index';
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
  ```
@@ -1,5 +1,5 @@
1
1
  import * as styles from '../../utils/styles';
2
- import { Component, globalDefaultProps } from '../component';
2
+ import { Component, globalDefaultProps } from '../component/index';
3
3
  import { IconStatic } from '../icon/index';
4
4
 
5
5
  class Button extends Component {
@@ -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
  />
@@ -1,5 +1,5 @@
1
1
  import * as styles from '../../utils/styles';
2
- import { Component, globalDefaultProps } from '../component';
2
+ import { Component, globalDefaultProps } from '../component/index';
3
3
 
4
4
  class Checkbox extends Component {
5
5
  render() {
@@ -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/index';
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 };