@progress/kendo-themes-html 5.4.2-dev.2 → 5.4.2-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.
- package/dist/index.js +5284 -0
- package/dist/index.js.map +7 -0
- package/lib/jsx-runtime.js +26 -10
- package/package.json +8 -12
- package/src/{button/action-buttons.jsx → action-buttons/action-buttons.tsx} +2 -2
- package/src/action-buttons/index.ts +1 -0
- package/src/autocomplete/{autocomplete.jsx → autocomplete.tsx} +0 -26
- package/src/autocomplete/{index.js → index.ts} +0 -0
- package/src/avatar/{avatar.jsx → avatar.tsx} +0 -22
- package/src/avatar/{index.js → index.ts} +0 -0
- package/src/button/{button.jsx → button.tsx} +0 -34
- package/src/button/index.ts +1 -0
- package/src/{button/button-group.jsx → button-group/button-group.tsx} +0 -0
- package/src/button-group/index.ts +1 -0
- package/src/captcha/{captcha-image.jsx → captcha-image.tsx} +0 -0
- package/src/captcha/{captcha.jsx → captcha.tsx} +0 -0
- package/src/captcha/{index.js → index.ts} +0 -0
- package/src/checkbox/{checkbox.jsx → checkbox.tsx} +0 -21
- package/src/checkbox/{index.js → index.ts} +0 -0
- package/src/chip/{chip-actions.jsx → chip-actions.tsx} +0 -0
- package/src/chip/{chip-avatar.jsx → chip-avatar.tsx} +1 -1
- package/src/chip/{chip-list.jsx → chip-list.tsx} +0 -17
- package/src/chip/{chip.jsx → chip.tsx} +0 -33
- package/src/chip/{index.js → index.ts} +0 -0
- package/src/colorpalette/colorpalette-presets.tsx +50 -0
- package/src/colorpalette/{colorpalette-row.jsx → colorpalette-row.tsx} +7 -2
- package/src/colorpalette/{colorpalette-tile.jsx → colorpalette-tile.tsx} +0 -1
- package/src/colorpalette/{colorpalette.jsx → colorpalette.tsx} +1 -6
- package/src/colorpalette/{index.js → index.ts} +0 -0
- package/src/colorpicker/{color-preview.jsx → color-preview.tsx} +0 -36
- package/src/colorpicker/{colorpicker.jsx → colorpicker.tsx} +0 -30
- package/src/colorpicker/{index.js → index.ts} +0 -0
- package/src/combobox/{combobox.jsx → combobox.tsx} +0 -33
- package/src/combobox/{index.js → index.ts} +0 -0
- package/src/component/{component.jsx → component.tsx} +0 -0
- package/src/component/{index.js → index.ts} +0 -0
- package/src/dateinput/{dateinput.jsx → dateinput.tsx} +0 -37
- package/src/dateinput/{index.js → index.ts} +0 -0
- package/src/datepicker/{datepicker.jsx → datepicker.tsx} +0 -33
- package/src/datepicker/{index.js → index.ts} +0 -0
- package/src/daterangepicker/{daterangepicker.jsx → daterangepicker.tsx} +1 -1
- package/src/daterangepicker/{index.js → index.ts} +0 -0
- package/src/datetimepicker/{datetimepicker.jsx → datetimepicker.tsx} +0 -33
- package/src/datetimepicker/{index.js → index.ts} +0 -0
- package/src/dropdowngrid/{dropdowngrid.jsx → dropdowngrid.tsx} +2 -34
- package/src/dropdowngrid/{index.js → index.ts} +0 -0
- package/src/dropdownlist/{dropdownlist.jsx → dropdownlist.tsx} +0 -33
- package/src/dropdownlist/{index.js → index.ts} +0 -0
- package/src/fab/{fab.jsx → fab.tsx} +0 -26
- package/src/fab/{index.js → index.ts} +0 -0
- package/src/icon/{icon.jsx → icon.tsx} +0 -0
- package/src/icon/{index.js → index.ts} +0 -0
- package/src/{index.js → index.ts} +5 -2
- package/src/input/{floating-label.jsx → floating-label.tsx} +0 -0
- package/src/input/{index.js → index.ts} +0 -0
- package/src/input/{input-clear-value.jsx → input-clear-value.tsx} +0 -0
- package/src/input/{input-inner-input.jsx → input-inner-input.tsx} +0 -12
- package/src/input/{input-inner-span.jsx → input-inner-span.tsx} +0 -18
- package/src/input/{input-inner-textarea.jsx → input-inner-textarea.tsx} +0 -14
- package/src/input/{input-inner.jsx → input-inner.tsx} +0 -0
- package/src/input/{input-loading-icon.jsx → input-loading-icon.tsx} +0 -0
- package/src/input/{input-prefix.jsx → input-prefix.tsx} +0 -0
- package/src/input/{input-suffix.jsx → input-suffix.tsx} +0 -0
- package/src/input/{input-validation-icon.jsx → input-validation-icon.tsx} +0 -0
- package/src/input/{input.jsx → input.tsx} +0 -14
- package/src/input/{picker.jsx → picker.tsx} +0 -14
- package/src/list/{index.js → index.ts} +0 -0
- package/src/list/{list-content.jsx → list-content.tsx} +0 -30
- package/src/list/{list-group-item.jsx → list-group-item.tsx} +0 -14
- package/src/list/{list-header.jsx → list-header.tsx} +0 -14
- package/src/list/{list-item.jsx → list-item.tsx} +0 -24
- package/src/list/{list.jsx → list.tsx} +0 -15
- package/src/maskedtextbox/{index.js → index.ts} +0 -0
- package/src/maskedtextbox/{maskedtextbox.jsx → maskedtextbox.tsx} +0 -25
- package/src/menu/{index.js → index.ts} +0 -0
- package/src/menu/{menu-item-content.jsx → menu-item-content.tsx} +0 -0
- package/src/menu/{menu-item.jsx → menu-item.tsx} +0 -26
- package/src/menu/{menu-list.jsx → menu-list.tsx} +0 -15
- package/src/{menubutton → menu-button}/README.md +0 -0
- package/src/menu-button/index.ts +1 -0
- package/src/{menubutton/menubutton.jsx → menu-button/menu-button.tsx} +0 -34
- package/src/multiselect/{index.js → index.ts} +0 -0
- package/src/multiselect/{multiselect-chip-list.jsx → multiselect-chip-list.tsx} +0 -0
- package/src/multiselect/{multiselect.jsx → multiselect.tsx} +0 -26
- package/src/nodata/{index.js → index.ts} +0 -0
- package/src/nodata/{nodata.jsx → nodata.tsx} +0 -13
- package/src/numerictextbox/{index.js → index.ts} +0 -0
- package/src/numerictextbox/{numerictextbox.jsx → numerictextbox.tsx} +0 -38
- package/src/popover/{index.js → index.ts} +0 -0
- package/src/popover/{popover.jsx → popover.tsx} +1 -1
- package/src/popup/{index.js → index.ts} +0 -0
- package/src/popup/{popup.jsx → popup.tsx} +0 -15
- package/src/radio/{index.js → index.ts} +0 -0
- package/src/radio/{radio.jsx → radio.tsx} +0 -20
- package/src/searchbar/{index.js → index.ts} +0 -0
- package/src/searchbar/{searchbar.jsx → searchbar.tsx} +0 -0
- package/src/searchbox/{index.js → index.ts} +0 -0
- package/src/searchbox/{searchbox.jsx → searchbox.tsx} +0 -26
- package/src/spinbutton/{index.js → index.ts} +0 -0
- package/src/spinbutton/{spinbutton.jsx → spinbutton.tsx} +0 -15
- package/src/{splitbutton → split-button}/README.md +0 -0
- package/src/split-button/index.ts +1 -0
- package/src/{splitbutton/splitbutton.jsx → split-button/split-button.tsx} +0 -42
- package/src/switch/{index.js → index.ts} +0 -0
- package/src/switch/{switch.jsx → switch.tsx} +0 -26
- package/src/textarea/{index.js → index.ts} +0 -0
- package/src/textarea/{textarea.jsx → textarea.tsx} +0 -24
- package/src/textbox/{index.js → index.ts} +0 -0
- package/src/textbox/{textbox.jsx → textbox.tsx} +0 -27
- package/src/timepicker/{index.js → index.ts} +0 -0
- package/src/timepicker/{timepicker.jsx → timepicker.tsx} +0 -33
- package/src/treeview/{index.js → index.ts} +0 -0
- package/src/treeview/{treeview-group.jsx → treeview-group.tsx} +0 -15
- package/src/treeview/{treeview-item.jsx → treeview-item.tsx} +0 -23
- package/src/treeview/{treeview-leaf.jsx → treeview-leaf.tsx} +0 -21
- package/src/treeview/{treeview.jsx → treeview.tsx} +0 -15
- package/src/typography/{index.js → index.ts} +0 -0
- package/src/typography/{typography.jsx → typography.tsx} +2 -2
- package/src/button/index.js +0 -3
- package/src/colorpalette/colorpalette-presets.jsx +0 -50
- package/src/menubutton/index.js +0 -1
- package/src/splitbutton/index.js +0 -1
package/lib/jsx-runtime.js
CHANGED
|
@@ -220,21 +220,21 @@ function attrToProps( attributes ) {
|
|
|
220
220
|
return props;
|
|
221
221
|
}
|
|
222
222
|
|
|
223
|
-
function jsx( type,
|
|
223
|
+
function jsx( type, props, ...children ) {
|
|
224
224
|
|
|
225
225
|
if ( isFunction( type ) ) {
|
|
226
|
-
return type( { ...type.defaultProps, ...
|
|
226
|
+
return type( { ...type.defaultProps, ...props, children } );
|
|
227
227
|
}
|
|
228
228
|
|
|
229
|
-
let
|
|
229
|
+
let _children = children;
|
|
230
230
|
|
|
231
|
-
if (!isArray(
|
|
232
|
-
|
|
231
|
+
if (!isArray( _children) ) {
|
|
232
|
+
_children = [ _children ];
|
|
233
233
|
}
|
|
234
234
|
|
|
235
|
-
|
|
235
|
+
_children.forEach( ( child, index ) => {
|
|
236
236
|
if ( !isObject( child ) ) {
|
|
237
|
-
|
|
237
|
+
_children[index] = {
|
|
238
238
|
type: JSX_TEXT,
|
|
239
239
|
props: {
|
|
240
240
|
text: child
|
|
@@ -252,8 +252,20 @@ function jsx( type, config ) {
|
|
|
252
252
|
};
|
|
253
253
|
}
|
|
254
254
|
|
|
255
|
-
function jsxs( type,
|
|
256
|
-
return jsx( type,
|
|
255
|
+
function jsxs( type, props, ...children ) {
|
|
256
|
+
return jsx( type, props, ...children );
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
function Fragment(props) {
|
|
260
|
+
let children = (props.children || []).filter(child => child !== '');
|
|
261
|
+
|
|
262
|
+
return {
|
|
263
|
+
type: JSX_FRAGMENT,
|
|
264
|
+
props: {
|
|
265
|
+
...props,
|
|
266
|
+
children
|
|
267
|
+
}
|
|
268
|
+
};
|
|
257
269
|
}
|
|
258
270
|
|
|
259
271
|
function renderDOM( jsxNode, container = null ) {
|
|
@@ -320,6 +332,10 @@ function renderDOM( jsxNode, container = null ) {
|
|
|
320
332
|
return;
|
|
321
333
|
}
|
|
322
334
|
|
|
335
|
+
if (Array.isArray(child) && child.length === 0) {
|
|
336
|
+
return;
|
|
337
|
+
}
|
|
338
|
+
|
|
323
339
|
renderDOM( child, element );
|
|
324
340
|
});
|
|
325
341
|
}
|
|
@@ -334,7 +350,7 @@ function renderDOM( jsxNode, container = null ) {
|
|
|
334
350
|
export {
|
|
335
351
|
jsx,
|
|
336
352
|
jsxs,
|
|
337
|
-
|
|
353
|
+
Fragment,
|
|
338
354
|
renderDOM,
|
|
339
355
|
attrToProps,
|
|
340
356
|
htmlToProps
|
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.4.2-dev.
|
|
4
|
+
"version": "5.4.2-dev.3",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"keywords": [
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"HTML",
|
|
11
11
|
"Helpers"
|
|
12
12
|
],
|
|
13
|
-
"main": "index.js",
|
|
13
|
+
"main": "dist/index.js",
|
|
14
14
|
"files": [
|
|
15
15
|
"dist/",
|
|
16
16
|
"src/",
|
|
@@ -30,17 +30,13 @@
|
|
|
30
30
|
"access": "public"
|
|
31
31
|
},
|
|
32
32
|
"scripts": {
|
|
33
|
-
"build": "
|
|
34
|
-
"
|
|
33
|
+
"build": "node ./scripts/build.js",
|
|
34
|
+
"prepublishOnly": "npm run build"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"@rollup/plugin-babel": "^5.3.0",
|
|
41
|
-
"@rollup/plugin-commonjs": "^22.0.0",
|
|
42
|
-
"@rollup/plugin-node-resolve": "^13.1.2",
|
|
43
|
-
"rollup": "^2.62.0"
|
|
37
|
+
"esbuild": "^0.14.36",
|
|
38
|
+
"glob": "^8.0.3",
|
|
39
|
+
"typescript": "^4.7.2"
|
|
44
40
|
},
|
|
45
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "3c98c61d0b83d13dfdc0d722e92c581db0f6269b"
|
|
46
42
|
}
|
|
@@ -52,8 +52,8 @@ ActionButtonsStatic.propTypes = {
|
|
|
52
52
|
children: typeof [],
|
|
53
53
|
className: typeof '',
|
|
54
54
|
|
|
55
|
-
alignment: typeof ['start', 'center', 'end', 'stretched'],
|
|
56
|
-
orientation: typeof ['horizontal', 'vertical'],
|
|
55
|
+
alignment: typeof [ 'start', 'center', 'end', 'stretched' ],
|
|
56
|
+
orientation: typeof [ 'horizontal', 'vertical' ],
|
|
57
57
|
aria: typeof false,
|
|
58
58
|
|
|
59
59
|
htmlAttributes: typeof []
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './action-buttons.jsx';
|
|
@@ -34,7 +34,6 @@ function AutocompleteStatic(props) {
|
|
|
34
34
|
disabled,
|
|
35
35
|
|
|
36
36
|
aria,
|
|
37
|
-
legacy,
|
|
38
37
|
|
|
39
38
|
...htmlAttributes
|
|
40
39
|
} = props;
|
|
@@ -67,31 +66,6 @@ function AutocompleteStatic(props) {
|
|
|
67
66
|
? {}
|
|
68
67
|
: {};
|
|
69
68
|
|
|
70
|
-
if (legacy) {
|
|
71
|
-
|
|
72
|
-
let legacyClasses = [
|
|
73
|
-
ownClassName,
|
|
74
|
-
'k-widget',
|
|
75
|
-
'k-autocomplete',
|
|
76
|
-
{
|
|
77
|
-
'k-state-hover': hover === true,
|
|
78
|
-
'k-state-focus': focus === true,
|
|
79
|
-
'k-state-invalid': invalid === true,
|
|
80
|
-
'k-state-required': required === true,
|
|
81
|
-
'k-state-disabled': disabled === true
|
|
82
|
-
}
|
|
83
|
-
];
|
|
84
|
-
|
|
85
|
-
return (
|
|
86
|
-
<InputStatic className={legacyClasses} {...htmlAttributes}>
|
|
87
|
-
<input type={type} className="k-input" {...inputAttributes} />
|
|
88
|
-
<InputValidationIconStatic {...props} />
|
|
89
|
-
<InputLoadingIconStatic {...props} />
|
|
90
|
-
<InputClearValueStatic {...props} />
|
|
91
|
-
</InputStatic>
|
|
92
|
-
);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
69
|
return (
|
|
96
70
|
<InputStatic className={autocompleteClasses} {...ariaAttr} {...htmlAttributes}>
|
|
97
71
|
{prefix}
|
|
File without changes
|
|
@@ -23,7 +23,6 @@ function AvatarStatic(props) {
|
|
|
23
23
|
themeColor,
|
|
24
24
|
|
|
25
25
|
aria,
|
|
26
|
-
legacy,
|
|
27
26
|
|
|
28
27
|
...htmlAttributes
|
|
29
28
|
} = props;
|
|
@@ -42,27 +41,6 @@ function AvatarStatic(props) {
|
|
|
42
41
|
? {}
|
|
43
42
|
: {};
|
|
44
43
|
|
|
45
|
-
if (legacy) {
|
|
46
|
-
|
|
47
|
-
let legacyClasses = [
|
|
48
|
-
ownClassName,
|
|
49
|
-
'k-avatar',
|
|
50
|
-
`k-avatar-${themeColor}`,
|
|
51
|
-
styles.roundedClass( rounded ),
|
|
52
|
-
styles.sizeClass( size, 'k-avatar' ),
|
|
53
|
-
styles.fillModeClass( fillMode, 'k-avatar' ),
|
|
54
|
-
styles.borderedClass( bordered, 'k-avatar' ),
|
|
55
|
-
];
|
|
56
|
-
|
|
57
|
-
return (
|
|
58
|
-
<span className={legacyClasses} {...ariaAttr} {...htmlAttributes}>
|
|
59
|
-
<span className={`k-avatar-${type}`}>
|
|
60
|
-
{children}
|
|
61
|
-
</span>
|
|
62
|
-
</span>
|
|
63
|
-
);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
44
|
return (
|
|
67
45
|
<span className={avatarClasses} {...ariaAttr} {...htmlAttributes}>
|
|
68
46
|
<span className={`k-avatar-${type}`}>
|
|
File without changes
|
|
@@ -38,7 +38,6 @@ function ButtonStatic(props) {
|
|
|
38
38
|
disabled,
|
|
39
39
|
|
|
40
40
|
aria,
|
|
41
|
-
legacy,
|
|
42
41
|
|
|
43
42
|
...htmlAttributes
|
|
44
43
|
} = props;
|
|
@@ -70,39 +69,6 @@ function ButtonStatic(props) {
|
|
|
70
69
|
? {}
|
|
71
70
|
: {};
|
|
72
71
|
|
|
73
|
-
if (legacy) {
|
|
74
|
-
|
|
75
|
-
let legacyClasses = [
|
|
76
|
-
ownClassName,
|
|
77
|
-
'k-button',
|
|
78
|
-
styles.fillModeClass( fillMode, 'k-button' ),
|
|
79
|
-
styles.themeColorClass( fillMode, themeColor, 'k-button' ),
|
|
80
|
-
{
|
|
81
|
-
'k-primary': themeColor === 'primary',
|
|
82
|
-
'k-flat': fillMode === 'flat',
|
|
83
|
-
'k-outline': fillMode === 'outline',
|
|
84
|
-
'k-state-hover': hover === true,
|
|
85
|
-
'k-state-focus': focus === true,
|
|
86
|
-
'k-state-active': active === true,
|
|
87
|
-
'k-state-selected': selected === true,
|
|
88
|
-
'k-state-disabled': disabled === true,
|
|
89
|
-
'k-icon-button': Boolean( icon) === true && Boolean(text) === false
|
|
90
|
-
}
|
|
91
|
-
];
|
|
92
|
-
|
|
93
|
-
return (
|
|
94
|
-
<button type={type} className={legacyClasses} {...ariaAttr} {...htmlAttributes}>
|
|
95
|
-
{ children.length === 0
|
|
96
|
-
? <>
|
|
97
|
-
<IconStatic className="k-button-icon" name={icon} />
|
|
98
|
-
{text && <span className="k-button-text">{text}</span>}
|
|
99
|
-
</>
|
|
100
|
-
: children
|
|
101
|
-
}
|
|
102
|
-
</button>
|
|
103
|
-
);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
72
|
return (
|
|
107
73
|
<button type={type} className={buttonClasses} {...ariaAttr} {...htmlAttributes}>
|
|
108
74
|
{ children.length === 0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './button.jsx';
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './button-group.jsx';
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -25,7 +25,6 @@ function CheckboxStatic(props) {
|
|
|
25
25
|
disabled,
|
|
26
26
|
|
|
27
27
|
aria,
|
|
28
|
-
legacy,
|
|
29
28
|
|
|
30
29
|
...htmlAttributes
|
|
31
30
|
|
|
@@ -58,26 +57,6 @@ function CheckboxStatic(props) {
|
|
|
58
57
|
}
|
|
59
58
|
];
|
|
60
59
|
|
|
61
|
-
if (legacy) {
|
|
62
|
-
|
|
63
|
-
let legacyClasses = [
|
|
64
|
-
ownClassName,
|
|
65
|
-
'k-checkbox',
|
|
66
|
-
{
|
|
67
|
-
'k-state-hover': hover === true,
|
|
68
|
-
'k-state-focus': focus === true,
|
|
69
|
-
'k-state-invalid': invalid === true,
|
|
70
|
-
'k-state-disabled': disabled === true,
|
|
71
|
-
'k-checked': checked === true,
|
|
72
|
-
'k-state-indeterminate': isIndeterminate,
|
|
73
|
-
}
|
|
74
|
-
];
|
|
75
|
-
|
|
76
|
-
return (
|
|
77
|
-
<span className="k-checkbox-wrap"><input type="checkbox" className={legacyClasses} {...ariaAttr} {...htmlAttributes} /></span>
|
|
78
|
-
);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
60
|
return (
|
|
82
61
|
<span className="k-checkbox-wrap"><input type="checkbox" className={checkboxClasses} {...ariaAttr} {...htmlAttributes} /></span>
|
|
83
62
|
);
|
|
File without changes
|
|
File without changes
|
|
@@ -16,10 +16,7 @@ function ChipListStatic(props) {
|
|
|
16
16
|
|
|
17
17
|
size,
|
|
18
18
|
|
|
19
|
-
selection,
|
|
20
|
-
|
|
21
19
|
aria,
|
|
22
|
-
legacy,
|
|
23
20
|
|
|
24
21
|
...htmlAttributes
|
|
25
22
|
} = props;
|
|
@@ -30,24 +27,10 @@ function ChipListStatic(props) {
|
|
|
30
27
|
styles.sizeClass( size, 'k-chip-list' )
|
|
31
28
|
];
|
|
32
29
|
|
|
33
|
-
|
|
34
|
-
let legacyListClasses = [
|
|
35
|
-
ownClassName,
|
|
36
|
-
'k-chip-list'
|
|
37
|
-
];
|
|
38
|
-
|
|
39
30
|
let ariaAttr = aria
|
|
40
31
|
? {}
|
|
41
32
|
: {};
|
|
42
33
|
|
|
43
|
-
if (legacy) {
|
|
44
|
-
return (
|
|
45
|
-
<div className={legacyListClasses} {...ariaAttr} {...htmlAttributes}>
|
|
46
|
-
{children}
|
|
47
|
-
</div>
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
34
|
return (
|
|
52
35
|
<div className={listClasses} {...ariaAttr} {...htmlAttributes}>
|
|
53
36
|
{children}
|
|
@@ -56,7 +56,6 @@ function ChipStatic(props) {
|
|
|
56
56
|
disabled,
|
|
57
57
|
|
|
58
58
|
aria,
|
|
59
|
-
legacy,
|
|
60
59
|
|
|
61
60
|
...htmlAttributes
|
|
62
61
|
} = props;
|
|
@@ -84,38 +83,6 @@ function ChipStatic(props) {
|
|
|
84
83
|
? {}
|
|
85
84
|
: {};
|
|
86
85
|
|
|
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
|
-
|
|
104
|
-
return (
|
|
105
|
-
<div className={legacyClasses} {...ariaAttr} {...htmlAttributes}>
|
|
106
|
-
<IconStatic className="k-chip-icon" name={icon} />
|
|
107
|
-
{showAvatar && <ChipAvatarStatic {...props} />}
|
|
108
|
-
<span className="k-chip-content">
|
|
109
|
-
{ children.length
|
|
110
|
-
? children
|
|
111
|
-
: text && <span className="k-chip-label">{text}</span>
|
|
112
|
-
}
|
|
113
|
-
</span>
|
|
114
|
-
{ actions.length > 0 && <ChipActionsStatic actions={actions} />}
|
|
115
|
-
</div>
|
|
116
|
-
);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
86
|
return (
|
|
120
87
|
<div className={chipClasses} {...ariaAttr} {...htmlAttributes}>
|
|
121
88
|
<IconStatic className="k-chip-icon" name={icon} />
|
|
File without changes
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export const PALETTEPRESETS = {
|
|
2
|
+
basic: {
|
|
3
|
+
colors: [ '#000000', '#7f7f7f', '#880015', '#ed1c24', '#ff7f27', '#fff200', '#22b14c', '#00a2e8', '#3f48cc', '#a349a4', '#ffffff', '#c3c3c3', '#b97a57', '#ffaec9', '#ffc90e', '#efe4b0', '#b5e61d', '#99d9ea', '#7092be', '#c8bfe7' ],
|
|
4
|
+
columns: 10
|
|
5
|
+
},
|
|
6
|
+
office: {
|
|
7
|
+
colors: [ '#ffffff', '#000000', '#e6e6e6', '#435569', '#4371c4', '#ed7e32', '#a5a4a5', '#febf04', '#5a9bd5', '#71ae48', '#f2f2f3', '#7f7f7f', '#d1cece', '#d5dde3', '#dae1f4', '#fce5d4', '#deeded', '#fff2cc', '#deeaf6', '#e1efd9', '#d7d8d8', '#585959', '#aeabab', '#adbaca', '#b4c5e7', '#f6caac', '#dbdbdb', '#ffe498', '#bcd6ee', '#c5e0b2', '#bfbfc0', '#3f3f3f', '#767070', '#8595b1', '#8fabdb', '#f5b183', '#c9c8c9', '#fed965', '#9bc4e5', '#a8d08d', '#a5a5a6', '#262625', '#393939', '#334050', '#2e5496', '#c45a11', '#7b7b7a', '#bf9000', '#2f75b5', '#548235', '#7f7f7f', '#0b0c0c', '#161616', '#222a34', '#203764', '#843d0b', '#525252', '#7f6000', '#1d4d79', '#375623' ],
|
|
8
|
+
columns: 10
|
|
9
|
+
},
|
|
10
|
+
apex: {
|
|
11
|
+
colors: [ '#ffffff', '#000000', '#c9c2d1', '#69676d', '#ceb966', '#9cb084', '#6bb1c9', '#6585cf', '#7e6bc9', '#a379bb', '#f2f2f2', '#7f7f7f', '#f4f2f5', '#e0e0e2', '#f5f1e0', '#ebefe6', '#e1eff4', '#e0e6f5', '#e5e1f4', '#ece4f1', '#d8d8d8', '#595959', '#e9e6ec', '#c2c1c5', '#ebe3c1', '#d7dfcd', '#c3dfe9', '#c1ceeb', '#cbc3e9', '#dac9e3', '#bfbfbf', '#3f3f3f', '#dedae3', '#a4a3a8', '#e1d5a3', '#c3cfb5', '#a6d0de', '#a2b5e2', '#b1a6de', '#c7aed6', '#a5a5a5', '#262626', '#9688a5', '#4e4d51', '#ae9638', '#758c5a', '#3d8da9', '#365bb0', '#533da9', '#7d4d99', '#7f7f7f', '#0c0c0c', '#635672', '#343336', '#746425', '#4e5d3c', '#295e70', '#243c75', '#372970', '#533366' ],
|
|
12
|
+
columns: 10
|
|
13
|
+
},
|
|
14
|
+
austin: {
|
|
15
|
+
colors: [ '#ffffff', '#000000', '#caf278', '#3e3d2d', '#94c600', '#71685a', '#ff6700', '#909465', '#956b43', '#fea022', '#f2f2f2', '#7f7f7f', '#f4fce4', '#dddcd0', '#efffc0', '#e3e1dc', '#ffe0cb', '#e8e9df', '#ece1d6', '#feecd2', '#d8d8d8', '#595959', '#e9f9c9', '#bbb9a1', '#dfff82', '#c8c3ba', '#ffc299', '#d2d4c0', '#dac3ad', '#fed9a6', '#bfbfbf', '#3f3f3f', '#dff7ae', '#ada598', '#cfff43', '#ada598', '#ffa365', '#bcbfa1', '#c8a585', '#fec67a', '#a5a5a5', '#262626', '#a9ea25', '#2e2d21', '#6f9400', '#544e43', '#bf4d00', '#6c6f4b', '#6f5032', '#d77b00', '#7f7f7f', '#0c0c0c', '#74a50f', '#1f1e16', '#4a6300', '#38342d', '#7f3300', '#484a32', '#4a3521', '#8f5200' ],
|
|
16
|
+
columns: 10
|
|
17
|
+
},
|
|
18
|
+
clarity: {
|
|
19
|
+
colors: [ '#ffffff', '#292934', '#f3f2dc', '#d2533c', '#93a299', '#ad8f67', '#726056', '#4c5a6a', '#808da0', '#79463d', '#f2f2f2', '#e7e7ec', '#e7e5b9', '#f6dcd8', '#e9ecea', '#eee8e0', '#e4dedb', '#d8dde3', '#e5e8ec', '#e9d6d3', '#d8d8d8', '#c4c4d1', '#d5d185', '#edbab1', '#d3d9d6', '#ded2c2', '#c9beb8', '#b2bcc8', '#ccd1d9', '#d3aea7', '#bfbfbf', '#8a8aa3', '#aca73b', '#e4978a', '#bec7c1', '#cdbba3', '#af9e94', '#8c9bac', '#b2bac6', '#bd857c', '#a5a5a5', '#56566e', '#56531d', '#a43925', '#6b7c72', '#866b48', '#554840', '#39434f', '#5c697b', '#5a342d', '#7f7f7f', '#3b3b4b', '#22210b', '#6d2619', '#47534c', '#594730', '#39302b', '#262d35', '#3d4652', '#3c231e' ],
|
|
20
|
+
columns: 10
|
|
21
|
+
},
|
|
22
|
+
slipstream: {
|
|
23
|
+
colors: [ '#ffffff', '#000000', '#b4dcfa', '#212745', '#4e67c8', '#5eccf3', '#a7ea52', '#5dceaf', '#ff8021', '#f14124', '#f2f2f2', '#7f7f7f', '#8bc9f7', '#c7cce4', '#dbe0f4', '#def4fc', '#edfadc', '#def5ef', '#ffe5d2', '#fcd9d3', '#d8d8d8', '#595959', '#4facf3', '#909aca', '#b8c2e9', '#beeafa', '#dbf6b9', '#beebdf', '#ffcca6', '#f9b3a7', '#bfbfbf', '#3f3f3f', '#0d78c9', '#5967af', '#94a3de', '#9ee0f7', '#caf297', '#9de1cf', '#ffb279', '#f68d7b', '#a5a5a5', '#262626', '#063c64', '#181d33', '#31479f', '#11b2eb', '#81d319', '#34ac8b', '#d85c00', '#c3260c', '#7f7f7f', '#0c0c0c', '#021828', '#101322', '#202f6a', '#0b769c', '#568c11', '#22725c', '#903d00', '#821908' ],
|
|
24
|
+
columns: 10
|
|
25
|
+
},
|
|
26
|
+
metro: {
|
|
27
|
+
colors: [ '#ffffff', '#000000', '#d6ecff', '#4e5b6f', '#7fd13b', '#ea157a', '#feb80a', '#00addc', '#738ac8', '#1ab39f', '#f2f2f2', '#7f7f7f', '#a7d6ff', '#d9dde4', '#e5f5d7', '#fad0e4', '#fef0cd', '#c5f2ff', '#e2e7f4', '#c9f7f1', '#d8d8d8', '#595959', '#60b5ff', '#b3bcca', '#cbecb0', '#f6a1c9', '#fee29c', '#8be6ff', '#c7d0e9', '#94efe3', '#bfbfbf', '#3f3f3f', '#007dea', '#8d9baf', '#b2e389', '#f272af', '#fed46b', '#51d9ff', '#aab8de', '#5fe7d5', '#a5a5a5', '#262626', '#003e75', '#3a4453', '#5ea226', '#af0f5b', '#c58c00', '#0081a5', '#425ea9', '#138677', '#7f7f7f', '#0c0c0c', '#00192e', '#272d37', '#3f6c19', '#750a3d', '#835d00', '#00566e', '#2c3f71', '#0c594f' ],
|
|
28
|
+
columns: 10
|
|
29
|
+
},
|
|
30
|
+
flow: {
|
|
31
|
+
colors: [ '#ffffff', '#000000', '#dbf5f9', '#04617b', '#0f6fc6', '#009dd9', '#0bd0d9', '#10cf9b', '#7cca62', '#a5c249', '#f2f2f2', '#7f7f7f', '#b2e9f2', '#b4ecfc', '#c7e2fa', '#c4eeff', '#c9fafc', '#c9faed', '#e4f4df', '#edf2da', '#d8d8d8', '#595959', '#76d9e8', '#6adafa', '#90c6f6', '#89deff', '#93f5f9', '#94f6db', '#cae9c0', '#dbe6b6', '#bfbfbf', '#3f3f3f', '#21b2c8', '#20c8f7', '#59a9f2', '#4fceff', '#5df0f6', '#5ff2ca', '#b0dfa0', '#c9da91', '#a5a5a5', '#262626', '#105964', '#02485c', '#0b5394', '#0075a2', '#089ca2', '#0b9b74', '#54a838', '#7e9532', '#7f7f7f', '#0c0c0c', '#062328', '#01303d', '#073763', '#004e6c', '#05686c', '#07674d', '#387025', '#546321' ],
|
|
32
|
+
columns: 10
|
|
33
|
+
},
|
|
34
|
+
hardcover: {
|
|
35
|
+
colors: [ '#ffffff', '#000000', '#ece9c6', '#895d1d', '#873624', '#d6862d', '#d0be40', '#877f6c', '#972109', '#aeb795', '#f2f2f2', '#7f7f7f', '#e1dca5', '#f2e0c6', '#f0d0c9', '#f6e6d5', '#f5f2d8', '#e7e5e1', '#fbc7bc', '#eef0e9', '#d8d8d8', '#595959', '#d0c974', '#e6c28d', '#e2a293', '#eeceaa', '#ece5b2', '#cfccc3', '#f78f7a', '#dee2d4', '#bfbfbf', '#3f3f3f', '#a29a36', '#daa454', '#d4735e', '#e6b681', '#e2d88c', '#b7b2a5', '#f35838', '#ced3bf', '#a5a5a5', '#262626', '#514d1b', '#664515', '#65281a', '#a2641f', '#a39428', '#655f50', '#711806', '#879464', '#7f7f7f', '#0c0c0c', '#201e0a', '#442e0e', '#431b11', '#6c4315', '#6d621a', '#433f35', '#4b1004', '#5a6243' ],
|
|
36
|
+
columns: 10
|
|
37
|
+
},
|
|
38
|
+
trek: {
|
|
39
|
+
colors: [ '#ffffff', '#000000', '#fbeec9', '#4e3b30', '#f0a22e', '#a5644e', '#b58b80', '#c3986d', '#a19574', '#c17529', '#f2f2f2', '#7f7f7f', '#f7e09e', '#e1d6cf', '#fcecd5', '#eddfda', '#f0e7e5', '#f3eae1', '#ece9e3', '#f5e3d1', '#d8d8d8', '#595959', '#f3cc5f', '#c4ad9f', '#f9d9ab', '#dcc0b6', '#e1d0cc', '#e7d5c4', '#d9d4c7', '#ebc7a3', '#bfbfbf', '#3f3f3f', '#d29f0f', '#a78470', '#f6c781', '#cba092', '#d2b9b2', '#dbc1a7', '#c6bfab', '#e1ac76', '#a5a5a5', '#262626', '#694f07', '#3a2c24', '#c87d0e', '#7b4b3a', '#926255', '#a17242', '#7b7153', '#90571e', '#7f7f7f', '#0c0c0c', '#2a1f03', '#271d18', '#855309', '#523226', '#614138', '#6b4c2c', '#524b37', '#603a14' ],
|
|
40
|
+
columns: 10
|
|
41
|
+
},
|
|
42
|
+
verve: {
|
|
43
|
+
colors: [ '#ffffff', '#000000', '#d2d2d2', '#666666', '#ff388c', '#e40059', '#9c007f', '#68007f', '#005bd3', '#00349e', '#f2f2f2', '#7f7f7f', '#bdbdbd', '#e0e0e0', '#ffd7e8', '#ffc6dc', '#ffb8f1', '#f1b2ff', '#c3dcff', '#b8cfff', '#d8d8d8', '#595959', '#9d9d9d', '#c1c1c1', '#ffafd1', '#ff8eba', '#ff71e4', '#e365ff', '#87baff', '#72a0ff', '#bfbfbf', '#3f3f3f', '#696969', '#a3a3a3', '#ff87ba', '#ff5597', '#ff2ad7', '#d519ff', '#4b98ff', '#2b71ff', '#a5a5a5', '#262626', '#343434', '#4c4c4c', '#e90062', '#ab0042', '#75005f', '#4e005f', '#00449e', '#002676', '#7f7f7f', '#0c0c0c', '#151515', '#333333', '#9b0041', '#72002c', '#4e003f', '#34003f', '#002d69', '#00194f' ],
|
|
44
|
+
columns: 10
|
|
45
|
+
},
|
|
46
|
+
monochrome: {
|
|
47
|
+
colors: [ '#000000', '#1a1a1a', '#333333', '#4d4d4d', '#666666', '#808080', '#999999', '#b3b3b3', '#cccccc', '#e6e6e6', '#f2f2f2', '#ffffff' ],
|
|
48
|
+
columns: 12
|
|
49
|
+
}
|
|
50
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as styles from '../../utils/styles';
|
|
1
2
|
import { Component, globalDefaultProps } from '../component/index';
|
|
2
3
|
|
|
3
4
|
class ColorPaletteRow extends Component {
|
|
@@ -19,13 +20,17 @@ function ColorPaletteRowStatic(props) {
|
|
|
19
20
|
? {}
|
|
20
21
|
: {};
|
|
21
22
|
|
|
23
|
+
let rowClasses = [
|
|
24
|
+
ownClassName
|
|
25
|
+
];
|
|
26
|
+
|
|
22
27
|
return (
|
|
23
|
-
<tr {...ariaAttr} {...htmlAttributes}></tr>
|
|
28
|
+
<tr className={styles.classNames(...rowClasses)} {...ariaAttr} {...htmlAttributes}></tr>
|
|
24
29
|
);
|
|
25
30
|
}
|
|
26
31
|
|
|
27
32
|
ColorPaletteRowStatic.defaultProps = {
|
|
28
|
-
...globalDefaultProps
|
|
33
|
+
...globalDefaultProps
|
|
29
34
|
};
|
|
30
35
|
|
|
31
36
|
ColorPaletteRowStatic.propTypes = {
|
|
@@ -21,7 +21,7 @@ class ColorPalette extends Component {
|
|
|
21
21
|
preset.colors.slice(i * columns, (i + 1) * columns)
|
|
22
22
|
.map((color) => {
|
|
23
23
|
row.props.children.push( <ColorPaletteTileStatic color={color} tileSize={tileSize} /> );
|
|
24
|
-
})
|
|
24
|
+
});
|
|
25
25
|
|
|
26
26
|
newChildren.push(row);
|
|
27
27
|
});
|
|
@@ -39,14 +39,9 @@ function ColorPaletteStatic(props) {
|
|
|
39
39
|
className: ownClassName,
|
|
40
40
|
children,
|
|
41
41
|
|
|
42
|
-
palette,
|
|
43
|
-
columns,
|
|
44
|
-
tileSize,
|
|
45
|
-
|
|
46
42
|
disabled,
|
|
47
43
|
|
|
48
44
|
aria,
|
|
49
|
-
legacy,
|
|
50
45
|
|
|
51
46
|
...htmlAttributes
|
|
52
47
|
} = props;
|
|
File without changes
|
|
@@ -15,7 +15,6 @@ function ColorPreviewStatic(props) {
|
|
|
15
15
|
iconName,
|
|
16
16
|
|
|
17
17
|
aria,
|
|
18
|
-
legacy,
|
|
19
18
|
|
|
20
19
|
...htmlAttributes
|
|
21
20
|
} = props;
|
|
@@ -37,41 +36,6 @@ function ColorPreviewStatic(props) {
|
|
|
37
36
|
? {}
|
|
38
37
|
: {};
|
|
39
38
|
|
|
40
|
-
if (legacy) {
|
|
41
|
-
|
|
42
|
-
// let legacyClasses = [
|
|
43
|
-
// ownClassName,
|
|
44
|
-
// 'k-selected-color',
|
|
45
|
-
// {
|
|
46
|
-
// 'k-no-color': color === ''
|
|
47
|
-
// }
|
|
48
|
-
// ];
|
|
49
|
-
|
|
50
|
-
// let legacyStyles = {
|
|
51
|
-
// 'background-color': color
|
|
52
|
-
// };
|
|
53
|
-
|
|
54
|
-
// if (iconName === '') {
|
|
55
|
-
// return (
|
|
56
|
-
// <span className={legacyClasses} style={legacyStyles}></span>
|
|
57
|
-
// );
|
|
58
|
-
// }
|
|
59
|
-
|
|
60
|
-
// return (
|
|
61
|
-
// <IconStatic className="k-tool-icon" name={iconName}>
|
|
62
|
-
// <span className={legacyClasses} style={legacyStyles}></span>
|
|
63
|
-
// </IconStatic>
|
|
64
|
-
// );
|
|
65
|
-
|
|
66
|
-
return (
|
|
67
|
-
<span className={colorPreviewClasses} {...ariaAttr} {...htmlAttributes}>
|
|
68
|
-
{iconName && <IconStatic name={iconName} className="k-color-preview-icon" />}
|
|
69
|
-
<span className="k-color-preview-mask" style={styles}></span>
|
|
70
|
-
</span>
|
|
71
|
-
);
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
|
|
75
39
|
return (
|
|
76
40
|
<span className={colorPreviewClasses} {...ariaAttr} {...htmlAttributes}>
|
|
77
41
|
{iconName && <IconStatic name={iconName} className="k-color-preview-icon" />}
|
|
@@ -2,7 +2,6 @@ import { globalDefaultProps } from '../component/index';
|
|
|
2
2
|
import { Picker, PickerStatic, InputInnerSpanStatic } from '../input/index';
|
|
3
3
|
import { ColorPreviewStatic } from './color-preview.jsx';
|
|
4
4
|
import { ButtonStatic } from '../button/index';
|
|
5
|
-
import { IconStatic } from '../icon/index';
|
|
6
5
|
|
|
7
6
|
class Colorpicker extends Picker {
|
|
8
7
|
render() {
|
|
@@ -35,7 +34,6 @@ function ColorpickerStatic(props) {
|
|
|
35
34
|
disabled,
|
|
36
35
|
|
|
37
36
|
aria,
|
|
38
|
-
legacy,
|
|
39
37
|
|
|
40
38
|
...htmlAttributes
|
|
41
39
|
} = props;
|
|
@@ -60,34 +58,6 @@ function ColorpickerStatic(props) {
|
|
|
60
58
|
? {}
|
|
61
59
|
: {};
|
|
62
60
|
|
|
63
|
-
if (legacy) {
|
|
64
|
-
|
|
65
|
-
let legacyClasses = [
|
|
66
|
-
ownClassName,
|
|
67
|
-
'k-widget',
|
|
68
|
-
'k-colorpicker',
|
|
69
|
-
{
|
|
70
|
-
'k-state-hover': hover === true,
|
|
71
|
-
'k-state-focus': focus === true,
|
|
72
|
-
'k-state-invalid': invalid === true,
|
|
73
|
-
'k-state-disabled': disabled === true
|
|
74
|
-
}
|
|
75
|
-
];
|
|
76
|
-
|
|
77
|
-
let legacyWrapClasses = [
|
|
78
|
-
'k-picker-wrap'
|
|
79
|
-
];
|
|
80
|
-
|
|
81
|
-
return (
|
|
82
|
-
<PickerStatic className={legacyClasses} {...htmlAttributes}>
|
|
83
|
-
<span className={legacyWrapClasses}>
|
|
84
|
-
<ColorPreviewStatic color={value} iconName={iconName} />
|
|
85
|
-
<span className="k-select"><IconStatic name="arrow-s" /></span>
|
|
86
|
-
</span>
|
|
87
|
-
</PickerStatic>
|
|
88
|
-
);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
61
|
return (
|
|
92
62
|
<PickerStatic className={colorpickerClasses} {...ariaAttr} {...htmlAttributes}>
|
|
93
63
|
{prefix}
|
|
File without changes
|