@progress/kendo-themes-html 4.43.0 → 4.43.1-dev.3

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 (53) hide show
  1. package/lib/jsx-runtime.js +13 -1
  2. package/package.json +2 -2
  3. package/src/autocomplete/autocomplete.jsx +2 -2
  4. package/src/avatar/avatar.jsx +18 -21
  5. package/src/button/button.jsx +2 -2
  6. package/src/checkbox/checkbox.jsx +1 -1
  7. package/src/chip/README.md +47 -0
  8. package/src/chip/chip-actions.jsx +80 -0
  9. package/src/chip/chip-avatar.jsx +13 -0
  10. package/src/chip/chip-list.jsx +84 -0
  11. package/src/chip/chip.jsx +180 -0
  12. package/src/chip/index.js +4 -0
  13. package/src/colorpicker/README.md +24 -15
  14. package/src/colorpicker/color-preview.jsx +1 -1
  15. package/src/colorpicker/colorpicker.jsx +6 -8
  16. package/src/combobox/combobox.jsx +2 -2
  17. package/src/{component.js → component/component.jsx} +4 -2
  18. package/src/component/index.js +1 -0
  19. package/src/dateinput/dateinput.jsx +6 -8
  20. package/src/datepicker/datepicker.jsx +6 -8
  21. package/src/datetimepicker/datetimepicker.jsx +6 -8
  22. package/src/dropdownlist/dropdownlist.jsx +2 -2
  23. package/src/icon/icon.jsx +1 -1
  24. package/src/index.js +42 -3
  25. package/src/input/input-inner-input.jsx +1 -1
  26. package/src/input/input-inner-span.jsx +1 -1
  27. package/src/input/input-inner-textarea.jsx +1 -1
  28. package/src/input/input-prefix.jsx +1 -1
  29. package/src/input/input-suffix.jsx +1 -1
  30. package/src/input/input.jsx +2 -2
  31. package/src/input/picker.jsx +4 -4
  32. package/src/list/README.md +93 -0
  33. package/src/list/index.js +5 -0
  34. package/src/list/list-content.jsx +95 -0
  35. package/src/list/list-group-item.jsx +66 -0
  36. package/src/list/list-header.jsx +67 -0
  37. package/src/list/list-item.jsx +117 -0
  38. package/src/list/list.jsx +182 -0
  39. package/src/maskedtextbox/maskedtextbox.jsx +2 -2
  40. package/src/nodata/index.js +1 -0
  41. package/src/nodata/nodata.jsx +64 -0
  42. package/src/numerictextbox/numerictextbox.jsx +2 -2
  43. package/src/popup/README.md +15 -0
  44. package/src/popup/index.js +1 -0
  45. package/src/popup/popup.jsx +80 -0
  46. package/src/radio/radio.jsx +1 -1
  47. package/src/searchbar/searchbar.jsx +1 -1
  48. package/src/searchbox/searchbox.jsx +2 -2
  49. package/src/spinbutton/spinbutton.jsx +1 -1
  50. package/src/switch/switch.jsx +5 -5
  51. package/src/textarea/textarea.jsx +2 -2
  52. package/src/textbox/textbox.jsx +2 -2
  53. package/src/timepicker/timepicker.jsx +6 -8
@@ -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
  import { ButtonStatic } from '../button/index';
@@ -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
 
@@ -1,9 +1,11 @@
1
- import { isFunction } from '../utils/object';
2
- import { renderDOM, htmlToProps } from '../lib/jsx-runtime';
1
+ import { isFunction } from '../../utils/object';
2
+ import { renderDOM, htmlToProps } from '../../lib/jsx-runtime';
3
3
 
4
4
  const globalDefaultProps = {
5
5
  legacy: true,
6
6
 
7
+ framework: 'universal',
8
+
7
9
  className: '',
8
10
 
9
11
  aria: false,
@@ -0,0 +1 @@
1
+ export * from './component.jsx';
@@ -1,4 +1,4 @@
1
- import { Component, globalDefaultProps } from '../component';
1
+ import { Component, globalDefaultProps } from '../component/index';
2
2
  import { InputStatic, InputInnerInputStatic } from '../input/index';
3
3
  import { InputValidationIconStatic, InputLoadingIconStatic, InputClearValueStatic } from '../input/index';
4
4
  import { SpinButtonStatic } from '../spinbutton/index';
@@ -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
 
@@ -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
  import { ButtonStatic } from '../button/index';
@@ -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
 
@@ -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
  import { ButtonStatic } from '../button/index';
@@ -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
 
@@ -1,4 +1,4 @@
1
- import { globalDefaultProps } from '../component';
1
+ import { globalDefaultProps } from '../component/index';
2
2
  import { Picker, PickerStatic, InputInnerSpanStatic } from '../input/index';
3
3
  import { InputValidationIconStatic, InputLoadingIconStatic, InputClearValueStatic } from '../input/index';
4
4
  import { ButtonStatic } from '../button/index';
@@ -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/icon/icon.jsx CHANGED
@@ -1,4 +1,4 @@
1
- import { Component, globalDefaultProps } from '../component';
1
+ import { Component, globalDefaultProps } from '../component/index';
2
2
 
3
3
  class Icon extends Component {
4
4
  render() {
package/src/index.js CHANGED
@@ -16,7 +16,7 @@ export function init() {
16
16
  window.addEventListener('DOMContentLoaded', init);
17
17
 
18
18
  // Dependencies
19
- export * from './component';
19
+ export * from './component/index';
20
20
 
21
21
  // Generic content
22
22
  export * from './icon/index';
@@ -24,9 +24,17 @@ export * from './icon/index';
24
24
  // Primitive components
25
25
  export * from './input/index';
26
26
  // export * from './picker/index';
27
- // export * from './popup/index';
28
- // export * from './list/index';
27
+ export * from './popup/index';
28
+ export * from './list/index';
29
+ export * from './nodata/index';
30
+
31
+ // Indicators
29
32
  export * from './avatar/index';
33
+ // export * from './badge/index';
34
+ export * from './chip/index';
35
+ // export * from './color-preview/index';
36
+ // export * from './loader/index';
37
+ // export * from './skeleton/index';
30
38
 
31
39
  // Native forms
32
40
  export * from './button/index';
@@ -58,3 +66,34 @@ export * from './searchbox/index';
58
66
  export * from './switch/index';
59
67
  // export * from './upload/index';
60
68
  // export * from './dropzone/index';
69
+
70
+ // Command interfaces
71
+ // export * from './action-buttons/index';
72
+ // export * from './fab/index';
73
+ // export * from './menu/index';
74
+ // export * from './toolbar/index';
75
+
76
+ // Popups and modals
77
+ // export * from './action-sheet/index';
78
+ // export * from './dialog/index';
79
+ // export * from './drawer/index';
80
+ // export * from './notification/index';
81
+ // export * from './popover/index';
82
+ // export * from './tooltip/index';
83
+ // export * from './window/index';
84
+
85
+ // Navigation
86
+ // export * from './appbar/index';
87
+ // export * from './bottom-nav/index';
88
+ // export * from './breadcrumb/index';
89
+ // export * from './pager/index';
90
+ // export * from './stepper/index';
91
+ // export * from './tabstrip/index';
92
+ // export * from './wizard/index';
93
+
94
+ // Layout & containers
95
+ // export * from './card/index';
96
+ // export * from './expander/index';
97
+ // export * from './panelbar/index';
98
+ // export * from './splitter/index';
99
+ // export * from './tile-layout/index';
@@ -1,4 +1,4 @@
1
- import { Component, globalDefaultProps } from '../component';
1
+ import { Component, globalDefaultProps } from '../component/index';
2
2
 
3
3
  class InputInnerInput extends Component {
4
4
  render() {
@@ -1,5 +1,5 @@
1
1
  import { IconStatic } from '../icon/index';
2
- import { Component, globalDefaultProps } from '../component';
2
+ import { Component, globalDefaultProps } from '../component/index';
3
3
 
4
4
  class InputInnerSpan extends Component {
5
5
  render() {
@@ -1,4 +1,4 @@
1
- import { Component, globalDefaultProps } from '../component';
1
+ import { Component, globalDefaultProps } from '../component/index';
2
2
 
3
3
  class InputInnerTextarea extends Component {
4
4
  render() {
@@ -1,4 +1,4 @@
1
- import { Component, globalDefaultProps } from '../component';
1
+ import { Component, globalDefaultProps } from '../component/index';
2
2
 
3
3
  class InputPrefix extends Component {
4
4
  render() {
@@ -1,4 +1,4 @@
1
- import { Component, globalDefaultProps } from '../component';
1
+ import { Component, globalDefaultProps } from '../component/index';
2
2
 
3
3
  class InputSuffix extends Component {
4
4
  render() {
@@ -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 Input extends Component {
5
5
 
@@ -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
 
@@ -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 Picker extends Component {
5
5
 
@@ -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
 
@@ -0,0 +1,93 @@
1
+ ```html
2
+ <!-- jquery / react / vue rendering -->
3
+ <div class="k-list k-list-md">
4
+ <div class="k-list-header"><span class="k-list-header-text">Group 1</span></div>
5
+ <div class="k-list-content">
6
+ <ul class="k-list-ul">
7
+ <li class="k-list-item">
8
+ <span class="k-list-item-text">Item 1.1</span>
9
+ </li>
10
+ <li class="k-list-item">
11
+ <span class="k-list-item-text">Item 1.2</span>
12
+ </li>
13
+ <li class="k-list-item k-first">
14
+ <span class="k-list-item-text">Item 2.1</span>
15
+ <span class="k-list-group-label">Group 2</span>
16
+ </li>
17
+ <li class="k-list-item">
18
+ <span class="k-list-item-text">Item 2.2</span>
19
+ </li>
20
+ </ul>
21
+ </div>
22
+ </div>
23
+
24
+ <!-- jquery / react / vue rendering w/ virtualization -->
25
+ <div class="k-list k-virtual-list k-list-md">
26
+ <div class="k-list-header"><span class="k-list-header-text">Group 1</span></div>
27
+ <div class="k-list-content">
28
+ <ul class="k-list-ul">
29
+ <li class="k-list-item">
30
+ <span class="k-list-item-text">Item 1.1</span>
31
+ </li>
32
+ <li class="k-list-item">
33
+ <span class="k-list-item-text">Item 1.2</span>
34
+ </li>
35
+ <li class="k-list-item k-first">
36
+ <span class="k-list-item-text">Item 2.1</span>
37
+ <span class="k-list-group-label">Group 2</span>
38
+ </li>
39
+ <li class="k-list-item">
40
+ <span class="k-list-item-text">Item 2.2</span>
41
+ </li>
42
+ </ul>
43
+ </div>
44
+ </div>
45
+
46
+ <!-- angular / blazor rendering -->
47
+ <div class="k-list k-list-md">
48
+ <div class="k-list-header"><span class="k-list-header-text">Group 1</span></div>
49
+ <div class="k-list-content">
50
+ <ul class="k-list-ul">
51
+ <li class="k-list-item">
52
+ <span class="k-list-item-text">Item 1.1</span>
53
+ </li>
54
+ <li class="k-list-item">
55
+ <span class="k-list-item-text">Item 1.2</span>
56
+ </li>
57
+ <li class="k-list-group-item">
58
+ <span class="k-list-item-text">Group 2</span>
59
+ </li>
60
+ <li class="k-list-item">
61
+ <span class="k-list-item-text">Item 2.1</span>
62
+ </li>
63
+ <li class="k-list-item">
64
+ <span class="k-list-item-text">Item 2.2</span>
65
+ </li>
66
+ </ul>
67
+ </div>
68
+ </div>
69
+
70
+ <!-- angular / blazor rendering w/ virtualization -->
71
+ <div class="k-list k-virtual-list k-list-md">
72
+ <div class="k-list-header"><span class="k-list-header-text">Group 1</span></div>
73
+ <div class="k-list-content">
74
+ <ul class="k-list-ul">
75
+ <li class="k-list-item">
76
+ <span class="k-list-item-text">Item 1.1</span>
77
+ </li>
78
+ <li class="k-list-item">
79
+ <span class="k-list-item-text">Item 1.2</span>
80
+ </li>
81
+ <li class="k-list-group-item">
82
+ <span class="k-list-item-text">Group 2</span>
83
+ </li>
84
+ <li class="k-list-item">
85
+ <span class="k-list-item-text">Item 2.1</span>
86
+ </li>
87
+ <li class="k-list-item">
88
+ <span class="k-list-item-text">Item 2.2</span>
89
+ </li>
90
+ </ul>
91
+ </div>
92
+ </div>
93
+ ```
@@ -0,0 +1,5 @@
1
+ export * from './list.jsx';
2
+ export * from './list-header.jsx';
3
+ export * from './list-content.jsx';
4
+ export * from './list-item.jsx';
5
+ export * from './list-group-item.jsx';
@@ -0,0 +1,95 @@
1
+ import { Component, globalDefaultProps } from '../component/index';
2
+
3
+ class ListContent extends Component {
4
+ render() {
5
+ return <ListContentStatic {...this.props} />;
6
+ }
7
+ }
8
+
9
+ function ListContentStatic(props) {
10
+ const {
11
+ className: ownClassName,
12
+
13
+ children,
14
+
15
+ virtualization,
16
+
17
+ aria,
18
+ legacy,
19
+
20
+ ...htmlAttributes
21
+ } = props;
22
+
23
+ let listContentClasses = [
24
+ ownClassName,
25
+ 'k-list-content'
26
+ ];
27
+
28
+ let listULClasses = [
29
+ 'k-list-ul'
30
+ ];
31
+
32
+ let ariaAttr = aria
33
+ ? {}
34
+ : {};
35
+
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
+
55
+ return (
56
+ <div className={legacyListContentClasses} {...ariaAttr} {...htmlAttributes}>
57
+ <ul className={legacyListULClasses}>
58
+ {children}
59
+ </ul>
60
+ { virtualization && <div className="k-height-container"><div></div></div> }
61
+ </div>
62
+ );
63
+ }
64
+
65
+ return (
66
+ <div className={listContentClasses} {...ariaAttr} {...htmlAttributes}>
67
+ <ul className={listULClasses}>
68
+ {children}
69
+ </ul>
70
+ { virtualization && <div className="k-height-container"><div></div></div> }
71
+ </div>
72
+ );
73
+ }
74
+
75
+ ListContentStatic.defaultProps = {
76
+ ...globalDefaultProps,
77
+
78
+ children: [],
79
+
80
+ virtualization: false
81
+ };
82
+
83
+ ListContentStatic.propTypes = {
84
+ children: typeof [],
85
+ className: typeof '',
86
+
87
+ virtualization: typeof false,
88
+
89
+ aria: typeof false,
90
+ legacy: typeof false,
91
+
92
+ htmlAttributes: typeof []
93
+ };
94
+
95
+ export { ListContent, ListContentStatic };
@@ -0,0 +1,66 @@
1
+ import { Component, globalDefaultProps } from '../component/index';
2
+
3
+ class ListGroupItem extends Component {
4
+ render() {
5
+ return <ListGroupItemStatic {...this.props} />;
6
+ }
7
+ }
8
+
9
+ function ListGroupItemStatic(props) {
10
+ const {
11
+ className: ownClassName,
12
+
13
+ children,
14
+
15
+ aria,
16
+ legacy,
17
+
18
+ ...htmlAttributes
19
+ } = props;
20
+
21
+ let listGroupItemClasses = [
22
+ ownClassName,
23
+ 'k-list-group-item'
24
+ ];
25
+
26
+ let legacyListGroupItemClasses = [
27
+ ownClassName,
28
+ 'k-group-header'
29
+ ];
30
+
31
+ let ariaAttr = aria
32
+ ? {}
33
+ : {};
34
+
35
+ if (legacy) {
36
+ return (
37
+ <li className={legacyListGroupItemClasses} {...ariaAttr} {...htmlAttributes}>
38
+ {children}
39
+ </li>
40
+ );
41
+ }
42
+
43
+ return (
44
+ <li className={listGroupItemClasses} {...ariaAttr} {...htmlAttributes}>
45
+ <span className="k-list-item-text">{children}</span>
46
+ </li>
47
+ );
48
+ }
49
+
50
+ ListGroupItemStatic.defaultProps = {
51
+ ...globalDefaultProps,
52
+
53
+ children: []
54
+ };
55
+
56
+ ListGroupItemStatic.propTypes = {
57
+ children: typeof [],
58
+ className: typeof '',
59
+
60
+ aria: typeof false,
61
+ legacy: typeof false,
62
+
63
+ htmlAttributes: typeof []
64
+ };
65
+
66
+ export { ListGroupItem, ListGroupItemStatic };
@@ -0,0 +1,67 @@
1
+ import { Component, globalDefaultProps } from '../component/index';
2
+
3
+ class ListHeader extends Component {
4
+ render() {
5
+ return <ListHeaderStatic {...this.props} />;
6
+ }
7
+ }
8
+
9
+ function ListHeaderStatic(props) {
10
+ const {
11
+ className: ownClassName,
12
+
13
+ children,
14
+
15
+ aria,
16
+ legacy,
17
+
18
+ ...htmlAttributes
19
+ } = props;
20
+
21
+ let listHeaderClasses = [
22
+ ownClassName,
23
+ // 'k-list-header',
24
+ 'k-list-group-sticky-header'
25
+ ];
26
+
27
+ let legacyListHeaderClasses = [
28
+ ownClassName,
29
+ 'k-group-header'
30
+ ];
31
+
32
+ let ariaAttr = aria
33
+ ? {}
34
+ : {};
35
+
36
+ if (legacy) {
37
+ return (
38
+ <div className={legacyListHeaderClasses} {...ariaAttr} {...htmlAttributes}>
39
+ {children}
40
+ </div>
41
+ );
42
+ }
43
+
44
+ return (
45
+ <div className={listHeaderClasses} {...ariaAttr} {...htmlAttributes}>
46
+ <div className="k-list-header-text">{children}</div>
47
+ </div>
48
+ );
49
+ }
50
+
51
+ ListHeaderStatic.defaultProps = {
52
+ ...globalDefaultProps,
53
+
54
+ children: []
55
+ };
56
+
57
+ ListHeaderStatic.propTypes = {
58
+ children: typeof [],
59
+ className: typeof '',
60
+
61
+ aria: typeof false,
62
+ legacy: typeof false,
63
+
64
+ htmlAttributes: typeof []
65
+ };
66
+
67
+ export { ListHeader, ListHeaderStatic };