@progress/kendo-themes-html 5.2.1-dev.3 → 5.2.1-dev.6
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.
- package/lib/jsx-runtime.js +1 -0
- package/package.json +2 -2
- package/src/button/button-group.jsx +58 -0
- package/src/button/index.js +1 -0
- package/src/daterangepicker/README.md +90 -0
- package/src/daterangepicker/daterangepicker.jsx +79 -0
- package/src/daterangepicker/index.js +1 -0
- package/src/index.js +1 -0
- package/src/input/floating-label.jsx +78 -0
- package/src/input/index.js +1 -0
package/lib/jsx-runtime.js
CHANGED
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.2.1-dev.
|
|
4
|
+
"version": "5.2.1-dev.6",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"keywords": [
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"@rollup/plugin-node-resolve": "^13.1.2",
|
|
43
43
|
"rollup": "^2.62.0"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "2ceeec1399fcc1bb057257c25da8b4512378b079"
|
|
46
46
|
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
|
|
2
|
+
import * as styles from '../../utils/styles';
|
|
3
|
+
import { Component, globalDefaultProps } from '../component/index';
|
|
4
|
+
|
|
5
|
+
class ButtonGroup extends Component {
|
|
6
|
+
render() {
|
|
7
|
+
return <ButtonGroupStatic {...this.props} />;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function ButtonGroupStatic(props) {
|
|
12
|
+
const {
|
|
13
|
+
className: ownClassName,
|
|
14
|
+
|
|
15
|
+
children,
|
|
16
|
+
|
|
17
|
+
fillMode,
|
|
18
|
+
|
|
19
|
+
aria,
|
|
20
|
+
|
|
21
|
+
...htmlAttributes
|
|
22
|
+
} = props;
|
|
23
|
+
|
|
24
|
+
let buttonGroupClasses = [
|
|
25
|
+
ownClassName,
|
|
26
|
+
'k-button-group',
|
|
27
|
+
styles.fillModeClass( fillMode, 'k-button-group' )
|
|
28
|
+
];
|
|
29
|
+
|
|
30
|
+
let ariaAttr = aria
|
|
31
|
+
? {}
|
|
32
|
+
: {};
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<div className={buttonGroupClasses} {...ariaAttr} {...htmlAttributes}>
|
|
36
|
+
{children}
|
|
37
|
+
</div>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
ButtonGroupStatic.defaultProps = {
|
|
42
|
+
...globalDefaultProps,
|
|
43
|
+
|
|
44
|
+
fillMode: null
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
ButtonGroupStatic.propTypes = {
|
|
48
|
+
className: typeof '',
|
|
49
|
+
children: typeof [],
|
|
50
|
+
|
|
51
|
+
fillMode: typeof [ null, 'solid', 'flat', 'outline', 'link' ],
|
|
52
|
+
|
|
53
|
+
aria: typeof false,
|
|
54
|
+
|
|
55
|
+
htmlAttributes: typeof []
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export { ButtonGroup, ButtonGroupStatic };
|
package/src/button/index.js
CHANGED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
```html
|
|
2
|
+
<!-- default rendering -->
|
|
3
|
+
<span class="k-daterangepicker">
|
|
4
|
+
<span class="k-floating-label-container">
|
|
5
|
+
<span class="k-dateinput k-input k-input-md k-rounded-md k-input-solid">
|
|
6
|
+
<input type="text" class="k-input-inner" value="..." placeholder="..." />
|
|
7
|
+
</span>
|
|
8
|
+
<label class="k-label">Start</label>
|
|
9
|
+
</span>
|
|
10
|
+
<span class="k-floating-label-container">
|
|
11
|
+
<span class="k-dateinput k-input k-input-md k-rounded-md k-input-solid">
|
|
12
|
+
<input type="text" class="k-input-inner" value="..." placeholder="..." />
|
|
13
|
+
</span>
|
|
14
|
+
<label class="k-label">End</label>
|
|
15
|
+
</span>
|
|
16
|
+
</span>
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
<!-- canonical rendering -->
|
|
20
|
+
<span class="
|
|
21
|
+
k-daterangepicker
|
|
22
|
+
|
|
23
|
+
{disabled && 'k-disabled'}
|
|
24
|
+
">
|
|
25
|
+
<span class="
|
|
26
|
+
k-floating-label-container
|
|
27
|
+
|
|
28
|
+
{valid && 'k-valid'}
|
|
29
|
+
{invalid && 'k-invalid'}
|
|
30
|
+
{disabled && 'k-disabled'}
|
|
31
|
+
">
|
|
32
|
+
<span class="
|
|
33
|
+
k-dateinput
|
|
34
|
+
k-input
|
|
35
|
+
k-input-{size}
|
|
36
|
+
k-rounded-{rounded}
|
|
37
|
+
k-input-{fillMode}
|
|
38
|
+
|
|
39
|
+
{valid && 'k-valid'}
|
|
40
|
+
{invalid && 'k-invalid'}
|
|
41
|
+
{loading && 'k-loading'}
|
|
42
|
+
{required && 'k-required'}
|
|
43
|
+
{disabled && 'k-disabled'}
|
|
44
|
+
">
|
|
45
|
+
{showInputIcon && inputIconName !== '' && <span class="k-input-icon k-i-icon k-i-{inputIconName}"></span>}
|
|
46
|
+
{inputPrefix && <span class="k-input-prefix">...</span>}
|
|
47
|
+
<input type={type} class="k-input-inner" value={value} placeholder={placeholder} disabled={disabled} />
|
|
48
|
+
{inputPrefix && <span class="k-input-suffix">...</span>}
|
|
49
|
+
{showValidationIcon && valid && <span class="k-input-validation-icon k-icon k-i-check"></span>}
|
|
50
|
+
{showValidationIcon && invalid && <span class="k-input-validation-icon k-icon k-i-warning"></span>}
|
|
51
|
+
{showLoadingIcon && loading && <span class="k-input-loading-icon k-icon k-i-loading"></span>}
|
|
52
|
+
{showClearValue && text !== '' && <span class="k-clear-value"><span class="k-icon k-i-x"></span></span>}
|
|
53
|
+
</span>
|
|
54
|
+
<label class="k-label">Start</label>
|
|
55
|
+
</span>
|
|
56
|
+
|
|
57
|
+
<span class="
|
|
58
|
+
k-floating-label-container
|
|
59
|
+
|
|
60
|
+
{valid && 'k-valid'}
|
|
61
|
+
{invalid && 'k-invalid'}
|
|
62
|
+
{disabled && 'k-disabled'}
|
|
63
|
+
">
|
|
64
|
+
<span class="
|
|
65
|
+
k-dateinput
|
|
66
|
+
k-input
|
|
67
|
+
k-input-{size}
|
|
68
|
+
k-rounded-{rounded}
|
|
69
|
+
k-input-{fillMode}
|
|
70
|
+
|
|
71
|
+
{valid && 'k-valid'}
|
|
72
|
+
{invalid && 'k-invalid'}
|
|
73
|
+
{loading && 'k-loading'}
|
|
74
|
+
{required && 'k-required'}
|
|
75
|
+
{disabled && 'k-disabled'}
|
|
76
|
+
">
|
|
77
|
+
{showInputIcon && inputIconName !== '' && <span class="k-input-icon k-i-icon k-i-{inputIconName}"></span>}
|
|
78
|
+
{inputPrefix && <span class="k-input-prefix">...</span>}
|
|
79
|
+
<input type={type} class="k-input-inner" value={value} placeholder={placeholder} disabled={disabled} />
|
|
80
|
+
{inputPrefix && <span class="k-input-suffix">...</span>}
|
|
81
|
+
{showValidationIcon && valid && <span class="k-input-validation-icon k-icon k-i-check"></span>}
|
|
82
|
+
{showValidationIcon && invalid && <span class="k-input-validation-icon k-icon k-i-warning"></span>}
|
|
83
|
+
{showLoadingIcon && loading && <span class="k-input-loading-icon k-icon k-i-loading"></span>}
|
|
84
|
+
{showClearValue && text !== '' && <span class="k-clear-value"><span class="k-icon k-i-x"></span></span>}
|
|
85
|
+
</span>
|
|
86
|
+
<label class="k-label">End</label>
|
|
87
|
+
</span>
|
|
88
|
+
|
|
89
|
+
</span>
|
|
90
|
+
```
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { globalDefaultProps, Component } from '../component/index';
|
|
2
|
+
import { FloatingLabelStatic } from '../input/index';
|
|
3
|
+
import { DateInputStatic } from '../dateinput/index';
|
|
4
|
+
|
|
5
|
+
class DateRangePicker extends Component {
|
|
6
|
+
render() {
|
|
7
|
+
return <DateRangePickerStatic {...this.props} />;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function DateRangePickerStatic(props) {
|
|
12
|
+
|
|
13
|
+
const {
|
|
14
|
+
className: ownClassName,
|
|
15
|
+
|
|
16
|
+
size,
|
|
17
|
+
rounded,
|
|
18
|
+
fillMode,
|
|
19
|
+
|
|
20
|
+
disabled,
|
|
21
|
+
|
|
22
|
+
aria,
|
|
23
|
+
|
|
24
|
+
...htmlAttributes
|
|
25
|
+
} = props;
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
const dateInputAttributes = {
|
|
29
|
+
size,
|
|
30
|
+
rounded,
|
|
31
|
+
fillMode
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
let DateRangePickerClasses = [
|
|
36
|
+
ownClassName,
|
|
37
|
+
'k-daterangepicker',
|
|
38
|
+
{'k-disabled': disabled === true}
|
|
39
|
+
];
|
|
40
|
+
|
|
41
|
+
let ariaAttr = aria
|
|
42
|
+
? {}
|
|
43
|
+
: {};
|
|
44
|
+
|
|
45
|
+
return (
|
|
46
|
+
<span className={DateRangePickerClasses} {...ariaAttr} {...htmlAttributes}>
|
|
47
|
+
<FloatingLabelStatic label="Start">
|
|
48
|
+
<DateInputStatic showSpinButton="false" {...dateInputAttributes}/>
|
|
49
|
+
</FloatingLabelStatic>
|
|
50
|
+
<FloatingLabelStatic label="End">
|
|
51
|
+
<DateInputStatic showSpinButton="false" {...dateInputAttributes}/>
|
|
52
|
+
</FloatingLabelStatic>
|
|
53
|
+
</span>
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
DateRangePickerStatic.defaultProps = {
|
|
58
|
+
...globalDefaultProps,
|
|
59
|
+
|
|
60
|
+
size: 'medium',
|
|
61
|
+
rounded: 'medium',
|
|
62
|
+
fillMode: 'solid'
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
DateRangePickerStatic.propTypes = {
|
|
66
|
+
className: typeof '',
|
|
67
|
+
|
|
68
|
+
size: typeof [ null, 'small', 'medium', 'large' ],
|
|
69
|
+
rounded: typeof [ null, 'small', 'medium', 'large', 'full' ],
|
|
70
|
+
fillMode: typeof [ null, 'solid', 'flat', 'outline' ],
|
|
71
|
+
|
|
72
|
+
disabled: typeof false,
|
|
73
|
+
|
|
74
|
+
aria: typeof false,
|
|
75
|
+
|
|
76
|
+
htmlAttributes: typeof []
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
export { DateRangePicker, DateRangePickerStatic };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './daterangepicker.jsx';
|
package/src/index.js
CHANGED
|
@@ -57,6 +57,7 @@ export * from './dateinput/index';
|
|
|
57
57
|
export * from './datepicker/index';
|
|
58
58
|
export * from './timepicker/index';
|
|
59
59
|
export * from './datetimepicker/index';
|
|
60
|
+
export * from './daterangepicker/index';
|
|
60
61
|
export * from './dropdowngrid/index';
|
|
61
62
|
export * from './dropdownlist/index';
|
|
62
63
|
// export * from './dropdowntree/index';
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { Component, globalDefaultProps } from '../component/index';
|
|
2
|
+
|
|
3
|
+
class FloatingLabel extends Component {
|
|
4
|
+
render() {
|
|
5
|
+
return <FloatingLabelStatic {...this.props} />;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
function FloatingLabelStatic(props) {
|
|
10
|
+
|
|
11
|
+
const {
|
|
12
|
+
className: ownClassName,
|
|
13
|
+
|
|
14
|
+
children,
|
|
15
|
+
|
|
16
|
+
label,
|
|
17
|
+
|
|
18
|
+
focus,
|
|
19
|
+
valid,
|
|
20
|
+
invalid,
|
|
21
|
+
empty,
|
|
22
|
+
disabled,
|
|
23
|
+
|
|
24
|
+
aria,
|
|
25
|
+
|
|
26
|
+
...htmlAttributes
|
|
27
|
+
} = props;
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
htmlAttributes.empty = empty;
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
let ariaAttr = aria
|
|
34
|
+
? {}
|
|
35
|
+
: {};
|
|
36
|
+
|
|
37
|
+
let floatingLabelClasses = [
|
|
38
|
+
ownClassName,
|
|
39
|
+
'k-floating-label-container',
|
|
40
|
+
{
|
|
41
|
+
'k-focus': focus === true,
|
|
42
|
+
'k-valid': valid === true,
|
|
43
|
+
'k-invalid': invalid === true,
|
|
44
|
+
'k-empty': empty === true,
|
|
45
|
+
'k-disabled': disabled === true,
|
|
46
|
+
}
|
|
47
|
+
];
|
|
48
|
+
|
|
49
|
+
return (
|
|
50
|
+
<span className={floatingLabelClasses} {...ariaAttr} {...htmlAttributes} >
|
|
51
|
+
<>{children}</>
|
|
52
|
+
{ label && <label className="k-label">{label}</label> }
|
|
53
|
+
</span>
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
FloatingLabelStatic.defaultProps = {
|
|
58
|
+
...globalDefaultProps,
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
FloatingLabelStatic.propTypes = {
|
|
62
|
+
className: typeof '',
|
|
63
|
+
children: typeof [],
|
|
64
|
+
|
|
65
|
+
label: typeof '',
|
|
66
|
+
|
|
67
|
+
focus: typeof false,
|
|
68
|
+
valid: typeof false,
|
|
69
|
+
invalid: typeof false,
|
|
70
|
+
empty: typeof false,
|
|
71
|
+
disabled: typeof false,
|
|
72
|
+
|
|
73
|
+
aria: typeof false,
|
|
74
|
+
|
|
75
|
+
htmlAttributes: typeof []
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export { FloatingLabel, FloatingLabelStatic };
|
package/src/input/index.js
CHANGED