@progress/kendo-themes-html 5.2.1-dev.6 → 5.3.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.
@@ -49,7 +49,10 @@ const attrMap = {
49
49
  leafclassname: 'leafClassName',
50
50
 
51
51
  // Template
52
- contenttemplate: 'contentTemplate'
52
+ contenttemplate: 'contentTemplate',
53
+
54
+ // ColorPalette
55
+ tilesize: 'tileSize'
53
56
  };
54
57
 
55
58
  const booleanAttr = new Set([
@@ -81,6 +84,8 @@ const booleanAttr = new Set([
81
84
 
82
85
  'showCheckbox',
83
86
 
87
+ 'loading',
88
+
84
89
  'virtualization',
85
90
  'root',
86
91
 
@@ -103,7 +108,9 @@ const nullAttr = new Set([
103
108
  'themeColor',
104
109
 
105
110
  'trackRounded',
106
- 'thumbRounded'
111
+ 'thumbRounded',
112
+
113
+ 'callout'
107
114
  ]);
108
115
 
109
116
  const skipAttr = new Set([
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.6",
4
+ "version": "5.3.0",
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": "2ceeec1399fcc1bb057257c25da8b4512378b079"
45
+ "gitHead": "867f14d5246e147b66555ac808c5790ba8881d12"
46
46
  }
@@ -0,0 +1,62 @@
1
+ import { Component, globalDefaultProps } from '../component/index';
2
+
3
+ class ActionButtons extends Component {
4
+ render() {
5
+ return <ActionButtonsStatic {...this.props} />;
6
+ }
7
+ }
8
+
9
+ function ActionButtonsStatic(props) {
10
+
11
+ const {
12
+ className: ownClassName,
13
+
14
+ alignment,
15
+ orientation,
16
+ children,
17
+
18
+ aria,
19
+
20
+ ...htmlAttributes
21
+ } = props;
22
+
23
+ let ActionButtonsClasses = [
24
+ ownClassName,
25
+ 'k-actions',
26
+ `k-actions-${alignment}`,
27
+ `k-actions-${orientation}`
28
+ ];
29
+
30
+ let ariaAttr = aria
31
+ ? {}
32
+ : {};
33
+
34
+
35
+ return (
36
+ <div className={ActionButtonsClasses} {...ariaAttr} {...htmlAttributes}>
37
+ <>{children}</>
38
+ </div>
39
+ );
40
+ }
41
+
42
+ ActionButtonsStatic.defaultProps = {
43
+ ...globalDefaultProps,
44
+
45
+ children: [],
46
+ alignment: 'start',
47
+ orientation: 'horizontal'
48
+
49
+ };
50
+
51
+ ActionButtonsStatic.propTypes = {
52
+ children: typeof [],
53
+ className: typeof '',
54
+
55
+ alignment: typeof ['start', 'center', 'end', 'stretched'],
56
+ orientation: typeof ['horizontal', 'vertical'],
57
+ aria: typeof false,
58
+
59
+ htmlAttributes: typeof []
60
+ };
61
+
62
+ export { ActionButtons, ActionButtonsStatic };
@@ -1,2 +1,3 @@
1
1
  export * from './button.jsx';
2
2
  export * from './button-group.jsx';
3
+ export * from './action-buttons.jsx';
@@ -0,0 +1,74 @@
1
+ ```html
2
+ <!-- default rendering -->
3
+ <div class="k-captcha">
4
+ <div class="k-captcha-image-wrap k-hstack">
5
+ <div class="k-captcha-image">
6
+ <img class="" src="../../../assets/captcha.jpg">
7
+ </div>
8
+ <div class="k-captcha-image-controls k-vstack">
9
+ <button type="button" class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-icon-button">
10
+ <span class="k-button-icon k-icon k-i-volume-up"></span>
11
+ </button>
12
+ <button type="button" class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-icon-button">
13
+ <span class="k-button-icon k-icon k-i-reload"></span>
14
+ </button>
15
+ </div>
16
+ <div class="k-captcha-volume-control k-vstack k-pos-absolute k-hidden">
17
+ <div class="k-widget k-slider k-slider-vertical"></div>
18
+ </div>
19
+ </div>
20
+ <div class="k-captcha-input k-vstack">
21
+ <span class="k-textbox k-input k-input-md k-rounded-md k-input-solid" type="text" autocomplete="off">
22
+ <input type="text" class="k-input-inner" value="YR890" autocomplete="off">
23
+ </span>
24
+ </div>
25
+ </div>
26
+
27
+ <!-- canonical rendering -->
28
+
29
+ <div class="
30
+ k-captcha
31
+ ${loading && 'k-captcha-loading'}
32
+
33
+ ${disabled && 'k-disabled'}
34
+ ">
35
+ <div class="k-captcha-image-wrap k-hstack">
36
+ <div class="k-captcha-image">
37
+ <img class="
38
+ ${loading && 'k-hidden'}
39
+
40
+ " src="../../../assets/captcha.jpg">
41
+
42
+ {loading && <span style="width: 100%; height: 100%;" class="k-skeleton k-skeleton-rect"></span>}
43
+ </div>
44
+
45
+ <div class="k-captcha-image-controls k-vstack">
46
+ <button type="button" class="
47
+ ${loading && 'k-disabled'}
48
+ k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-icon-button
49
+ ">
50
+ <span class="k-button-icon k-icon k-i-volume-up"></span>
51
+ </button>
52
+ <button type="button" class="
53
+ ${loading && 'k-disabled'}
54
+ k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-icon-button
55
+ ">
56
+ <span class="k-button-icon k-icon k-i-reload"></span>
57
+ </button>
58
+ </div>
59
+ <div class="k-captcha-volume-control k-vstack k-pos-absolute k-hidden">
60
+ <div class="k-widget k-slider k-slider-vertical"></div>
61
+ </div>
62
+ </div>
63
+ <div class="k-captcha-input k-vstack">
64
+ <span class="
65
+ ${loading && 'k-disabled'}
66
+ k-textbox k-input k-input-md k-rounded-md k-input-solid
67
+ " type="text" autocomplete="off">
68
+ <input type="text" class="k-input-inner" value="{value}" autocomplete="off">
69
+ </span>
70
+ {valid && loading !== true && <span class="k-captcha-validation-message k-text-success">{successMessage}</span>}
71
+ </div>
72
+ </div>
73
+
74
+ ```
@@ -0,0 +1,73 @@
1
+ import { Component, globalDefaultProps } from '../component/index';
2
+ import { ButtonStatic } from '../button/index';
3
+
4
+ class CaptchaImage extends Component {
5
+ render() {
6
+ return <CaptchaImageStatic {...this.props} />;
7
+ }
8
+ }
9
+
10
+ function CaptchaImageStatic(props) {
11
+
12
+ const {
13
+ className: ownClassName,
14
+
15
+ loading,
16
+
17
+ aria,
18
+
19
+ ...htmlAttributes
20
+
21
+ } = props;
22
+
23
+
24
+ let ariaAttr = aria
25
+ ? {}
26
+ : {};
27
+
28
+ let CaptchaImageClasses = [
29
+ ownClassName,
30
+ 'k-captcha-image-wrap',
31
+ 'k-hstack'
32
+ ];
33
+
34
+ const imgAttributes = {
35
+ className: loading && "k-hidden",
36
+ src: "../../../assets/captcha.jpg",
37
+ };
38
+
39
+ const buttonDisabled = loading === true;
40
+
41
+ return (
42
+ <div className={CaptchaImageClasses} {...ariaAttr} {...htmlAttributes}>
43
+ <div className="k-captcha-image">
44
+ <img {...imgAttributes} />
45
+ {loading && <span style="width: 100%; height: 100%;" className="k-skeleton k-skeleton-rect"></span>}
46
+ </div>
47
+ <div className="k-captcha-image-controls k-vstack">
48
+ <ButtonStatic icon="volume-up" disabled={buttonDisabled}></ButtonStatic>
49
+ <ButtonStatic icon="reload" disabled={buttonDisabled}></ButtonStatic>
50
+ </div>
51
+ <div className="k-captcha-volume-control k-vstack k-pos-absolute k-hidden">
52
+ <div className="k-widget k-slider k-slider-vertical"></div>
53
+ </div>
54
+ </div>
55
+ );
56
+ }
57
+
58
+ CaptchaImageStatic.defaultProps = {
59
+ ...globalDefaultProps,
60
+ loading: false,
61
+ };
62
+
63
+ CaptchaImageStatic.propTypes = {
64
+ className: typeof '',
65
+
66
+ loading: typeof false,
67
+
68
+ aria: typeof false,
69
+
70
+ htmlAttributes: typeof []
71
+ };
72
+
73
+ export { CaptchaImage, CaptchaImageStatic };
@@ -0,0 +1,85 @@
1
+ import { Component, globalDefaultProps } from '../component/index';
2
+ import { CaptchaImageStatic } from '../captcha/index';
3
+ import { TextboxStatic } from '../textbox/index';
4
+
5
+ class Captcha extends Component {
6
+ render() {
7
+ return <CaptchaStatic {...this.props} />;
8
+ }
9
+ }
10
+
11
+ function CaptchaStatic(props) {
12
+
13
+ const {
14
+ className: ownClassName,
15
+
16
+ loading,
17
+ value,
18
+
19
+ valid,
20
+ invalid,
21
+ disabled,
22
+
23
+ aria,
24
+
25
+ ...htmlAttributes
26
+
27
+ } = props;
28
+
29
+ htmlAttributes.disabled = disabled;
30
+
31
+ let ariaAttr = aria
32
+ ? {}
33
+ : {};
34
+
35
+ let captchaClasses = [
36
+ ownClassName,
37
+ 'k-captcha',
38
+ {
39
+ 'k-captcha-loading': loading === true,
40
+ 'k-disabled': disabled === true,
41
+ }
42
+ ];
43
+
44
+ const textBoxAttributes = {
45
+ value,
46
+ showClearButton: false,
47
+ invalid,
48
+ disabled: loading === true
49
+ };
50
+
51
+
52
+ return (
53
+ <div className={captchaClasses} {...ariaAttr} {...htmlAttributes}>
54
+ <CaptchaImageStatic loading={loading}></CaptchaImageStatic>
55
+
56
+ <div className="k-captcha-input k-vstack">
57
+ <TextboxStatic {...textBoxAttributes}></TextboxStatic>
58
+ {valid && !loading && <span className="k-captcha-validation-message k-text-success">Verification Success</span>}
59
+ </div>
60
+ </div>
61
+ );
62
+ }
63
+
64
+ CaptchaStatic.defaultProps = {
65
+ ...globalDefaultProps,
66
+ loading: false,
67
+ value: '',
68
+ };
69
+
70
+ CaptchaStatic.propTypes = {
71
+ className: typeof '',
72
+
73
+ loading: typeof false,
74
+ value: typeof '',
75
+
76
+ valid: typeof false,
77
+ invalid: typeof false,
78
+ disabled: typeof false,
79
+
80
+ aria: typeof false,
81
+
82
+ htmlAttributes: typeof []
83
+ };
84
+
85
+ export { Captcha, CaptchaStatic };
@@ -0,0 +1,2 @@
1
+ export * from './captcha.jsx';
2
+ export * from './captcha-image.jsx';
@@ -27,11 +27,7 @@ function ChipListStatic(props) {
27
27
  let listClasses = [
28
28
  ownClassName,
29
29
  'k-chip-list',
30
- styles.sizeClass( size, 'k-chip-list' ),
31
- {
32
- 'k-selection-single': selection === 'single',
33
- 'k-selection-multiple': selection === 'multiple'
34
- }
30
+ styles.sizeClass( size, 'k-chip-list' )
35
31
  ];
36
32
 
37
33
 
@@ -0,0 +1,33 @@
1
+ # ColorPalette
2
+
3
+ ```html
4
+ <!-- default rendering -->
5
+ <div class="k-colorpalette">
6
+ <div class="k-colorpalette-table-wrap">
7
+ <table class="k-colorpalette-table k-palette">
8
+ <tr>
9
+ <td class="k-colorpalette-tile" style="background-color: #ffffff;"></td>
10
+ <td class="k-colorpalette-tile" style="background-color: #000000;"></td>
11
+ </tr>
12
+ </table>
13
+ </div>
14
+ </div>
15
+
16
+
17
+ <!-- canonical rendering -->
18
+ <div class="k-colorpalette {disabled && 'k-disabled'}">
19
+ <div class="k-colorpalette-table-wrap">
20
+ <table class="k-colorpalette-table k-palette">
21
+ <tr>
22
+ <td class="k-colorpalette-tile
23
+ style="background-color: {color}
24
+ {hover && 'k-hover'}
25
+ {focus && 'k-focus'}
26
+ {selected && 'k-selected'}
27
+ ">
28
+ </td>
29
+ </tr>
30
+ </table>
31
+ </div>
32
+ </div>
33
+ ```
@@ -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
+ };
@@ -0,0 +1,39 @@
1
+ import { Component, globalDefaultProps } from '../component/index';
2
+
3
+ class ColorPaletteRow extends Component {
4
+ render() {
5
+ return <ColorPaletteRowStatic {...this.props} />;
6
+ }
7
+ }
8
+
9
+ function ColorPaletteRowStatic(props) {
10
+ const {
11
+ className: ownClassName,
12
+
13
+ aria,
14
+
15
+ ...htmlAttributes
16
+ } = props;
17
+
18
+ let ariaAttr = aria
19
+ ? {}
20
+ : {};
21
+
22
+ return (
23
+ <tr {...ariaAttr} {...htmlAttributes}></tr>
24
+ );
25
+ }
26
+
27
+ ColorPaletteRowStatic.defaultProps = {
28
+ ...globalDefaultProps,
29
+ };
30
+
31
+ ColorPaletteRowStatic.propTypes = {
32
+ className: typeof '',
33
+
34
+ aria: typeof false,
35
+
36
+ htmlAttributes: typeof []
37
+ };
38
+
39
+ export { ColorPaletteRow, ColorPaletteRowStatic };
@@ -0,0 +1,72 @@
1
+ import { Component, globalDefaultProps } from '../component/index';
2
+
3
+ class ColorPaletteTile extends Component {
4
+ render() {
5
+ return <ColorPaletteTileStatic {...this.props} />;
6
+ }
7
+ }
8
+
9
+ function ColorPaletteTileStatic(props) {
10
+ const {
11
+ className: ownClassName,
12
+
13
+ color,
14
+ tileSize,
15
+
16
+ hover,
17
+ focus,
18
+ selected,
19
+
20
+ aria,
21
+ legacy,
22
+
23
+ ...htmlAttributes
24
+ } = props;
25
+
26
+ let colorPaletteTileClasses = [
27
+ ownClassName,
28
+ 'k-colorpalette-tile',
29
+ {
30
+ 'k-hover': hover === true,
31
+ 'k-focus': focus === true,
32
+ 'k-selected': selected === true
33
+ }
34
+ ];
35
+
36
+ let styles = {
37
+ 'background-color': color,
38
+ 'width': tileSize ? tileSize + "px" : '',
39
+ 'height': tileSize ? tileSize + "px" : ''
40
+ };
41
+
42
+ let ariaAttr = aria;
43
+
44
+ return (
45
+ <td className={colorPaletteTileClasses} {...ariaAttr} {...htmlAttributes} style={styles}></td>
46
+ );
47
+ }
48
+
49
+ ColorPaletteTileStatic.defaultProps = {
50
+ ...globalDefaultProps,
51
+
52
+ color: '',
53
+ tileSize: ''
54
+ };
55
+
56
+ ColorPaletteTileStatic.propTypes = {
57
+ className: typeof '',
58
+
59
+ color: typeof '',
60
+ tileSize: typeof '',
61
+
62
+ hover: typeof false,
63
+ focus: typeof false,
64
+ selected: typeof false,
65
+
66
+ aria: typeof false,
67
+ legacy: typeof false,
68
+
69
+ htmlAttributes: typeof []
70
+ };
71
+
72
+ export { ColorPaletteTile, ColorPaletteTileStatic };
@@ -0,0 +1,103 @@
1
+ import { Component, globalDefaultProps } from '../component/index';
2
+ import { ColorPaletteRowStatic } from './colorpalette-row.jsx';
3
+ import { ColorPaletteTileStatic } from './colorpalette-tile.jsx';
4
+ import { PALETTEPRESETS } from './colorpalette-presets.jsx';
5
+
6
+ class ColorPalette extends Component {
7
+
8
+ init() {
9
+ let preset = PALETTEPRESETS[this._props.palette];
10
+ let columns = this._props.columns;
11
+ let tileSize = this._props.tileSize;
12
+ let newChildren = [];
13
+
14
+ if (!preset) { return; }
15
+
16
+ columns = columns || preset.columns;
17
+
18
+ Array.from({ length: Math.ceil(preset.colors.length / columns) }, (_, i) => {
19
+ let row = <ColorPaletteRowStatic></ColorPaletteRowStatic>;
20
+
21
+ preset.colors.slice(i * columns, (i + 1) * columns)
22
+ .map((color) => {
23
+ row.props.children.push( <ColorPaletteTileStatic color={color} tileSize={tileSize} /> );
24
+ })
25
+
26
+ newChildren.push(row);
27
+ });
28
+
29
+ this._props.children = newChildren;
30
+ }
31
+
32
+ render() {
33
+ return <ColorPaletteStatic {...this.props} />;
34
+ }
35
+ }
36
+
37
+ function ColorPaletteStatic(props) {
38
+ const {
39
+ className: ownClassName,
40
+ children,
41
+
42
+ palette,
43
+ columns,
44
+ tileSize,
45
+
46
+ disabled,
47
+
48
+ aria,
49
+ legacy,
50
+
51
+ ...htmlAttributes
52
+ } = props;
53
+
54
+ let colorPaletteClasses = [
55
+ ownClassName,
56
+ 'k-colorpalette',
57
+ {
58
+ 'k-disabled': disabled === true
59
+ }
60
+ ];
61
+
62
+ let ariaAttr = aria
63
+ ? {}
64
+ : {};
65
+
66
+ return (
67
+ <div className={colorPaletteClasses} {...ariaAttr} {...htmlAttributes}>
68
+ <div className="k-colorpalette-table-wrap">
69
+ <table className="k-colorpalette-table k-palette">
70
+ {children}
71
+ </table>
72
+ </div>
73
+ </div>
74
+ );
75
+ }
76
+
77
+ ColorPaletteStatic.defaultProps = {
78
+ ...globalDefaultProps,
79
+
80
+ className: '',
81
+
82
+ palette: 'office',
83
+ columns: 10,
84
+ tileSize: ''
85
+ };
86
+
87
+ ColorPaletteStatic.propTypes = {
88
+ children: typeof [],
89
+
90
+ palette: typeof '',
91
+ columns: typeof '',
92
+ tileSize: typeof '',
93
+
94
+ disabled: typeof false,
95
+
96
+ aria: typeof false,
97
+ legacy: typeof false,
98
+
99
+ className: typeof '',
100
+ htmlAttributes: typeof []
101
+ };
102
+
103
+ export { ColorPalette, ColorPaletteStatic };
@@ -0,0 +1,3 @@
1
+ export * from './colorpalette-row.jsx';
2
+ export * from './colorpalette-tile.jsx';
3
+ export * from './colorpalette.jsx';
package/src/index.js CHANGED
@@ -18,6 +18,9 @@ window.addEventListener('DOMContentLoaded', init);
18
18
  // Dependencies
19
19
  export * from './component/index';
20
20
 
21
+ // Typography and utils
22
+ export * from './typography/index';
23
+
21
24
  // Generic content
22
25
  export * from './icon/index';
23
26
 
@@ -50,7 +53,8 @@ export * from './radio/index';
50
53
 
51
54
  // Augmented inputs
52
55
  export * from './autocomplete/index';
53
- // export * from './captcha/index';
56
+ export * from './colorpalette/index';
57
+ export * from './captcha/index';
54
58
  export * from './colorpicker/index';
55
59
  export * from './combobox/index';
56
60
  export * from './dateinput/index';
@@ -81,7 +85,7 @@ export * from './menu/index';
81
85
  // export * from './dialog/index';
82
86
  // export * from './drawer/index';
83
87
  // export * from './notification/index';
84
- // export * from './popover/index';
88
+ export * from './popover/index';
85
89
  // export * from './tooltip/index';
86
90
  // export * from './window/index';
87
91
 
@@ -0,0 +1,40 @@
1
+ ```html
2
+ <!-- default rendering -->
3
+ <div class="k-popover">
4
+ <div class="k-popover-callout k-callout-s"></div>
5
+ <div class="k-popover-header">Title</div>
6
+ <div class="k-popover-body">Body content</div>
7
+ <div class="k-popover-actions k-actions k-actions-stretched">
8
+ <button type="button" class="k-button k-button-md k-rounded-md k-button-flat k-button-flat-base">
9
+ <span class="k-button-text">Action</span>
10
+ </button>
11
+ <button type="button" class="k-button k-button-md k-rounded-md k-button-flat k-button-flat-primary">
12
+ <span class="k-button-text">Primary</span>
13
+ </button>
14
+ </div>
15
+ </div>
16
+
17
+ <!-- canonical rendering -->
18
+
19
+ <div class="k-popover">
20
+ {callout && <div class="
21
+ k-popover-callout
22
+ k-callout-{callout}
23
+ "></div>
24
+ {title && <div class="k-popover-header">{title}</div>}
25
+ {body && <div class="k-popover-body">{body}</div>}
26
+ <div class="
27
+ k-popover-actions
28
+ k-actions
29
+ k-actions-{alignment}
30
+ ">
31
+ <button type="button" class="k-button k-button-md k-rounded-md k-button-flat k-button-flat-{themeColor}">
32
+ <span class="k-button-text">Action</span>
33
+ </button>
34
+ <button type="button" class="k-button k-button-md k-rounded-md k-button-flat k-button-flat-primary">
35
+ <span class="k-button-text">Primary</span>
36
+ </button>
37
+ </div>
38
+ </div>
39
+
40
+ ```
@@ -0,0 +1 @@
1
+ export * from './popover.jsx';
@@ -0,0 +1,73 @@
1
+ import * as styles from '../../utils/styles';
2
+ import { Component, globalDefaultProps } from '../component/index';
3
+
4
+ class Popover extends Component {
5
+ render() {
6
+ return <PopoverStatic {...this.props} />;
7
+ }
8
+ }
9
+
10
+ function PopoverStatic(props) {
11
+
12
+ const {
13
+ className: ownClassName,
14
+
15
+ callout,
16
+ title,
17
+ body,
18
+
19
+ children,
20
+
21
+ aria,
22
+
23
+ ...htmlAttributes
24
+ } = props;
25
+
26
+ let PopoverClasses = [
27
+ ownClassName,
28
+ 'k-popover',
29
+ ];
30
+
31
+ let PopoverCalloutClasses = [
32
+ 'k-popover-callout',
33
+ styles.calloutClass( callout )
34
+ ];
35
+
36
+ let ariaAttr = aria
37
+ ? {}
38
+ : {};
39
+
40
+
41
+ return (
42
+ <div className={PopoverClasses} {...ariaAttr} {...htmlAttributes}>
43
+ {callout && <div className={PopoverCalloutClasses}></div>}
44
+ {title && <div className="k-popover-header">{title}</div>}
45
+ {body && <div className="k-popover-body">{body}</div>}
46
+ <>{children}</>
47
+ </div>
48
+ );
49
+ }
50
+
51
+ PopoverStatic.defaultProps = {
52
+ ...globalDefaultProps,
53
+
54
+ children: [],
55
+ callout: null,
56
+ title: '',
57
+ body: '',
58
+ };
59
+
60
+ PopoverStatic.propTypes = {
61
+ children: typeof [],
62
+ className: typeof '',
63
+
64
+ callout: typeof [ null, 'top', 'bottom', 'left', 'right'],
65
+ title: typeof '',
66
+ body: typeof '',
67
+
68
+ aria: typeof false,
69
+
70
+ htmlAttributes: typeof []
71
+ };
72
+
73
+ export { Popover, PopoverStatic };
@@ -0,0 +1,33 @@
1
+ ## Headings
2
+
3
+ ```html
4
+ <h1 class="k-h1">Heading 1</h1>
5
+ <h2 class="k-h2">Heading 2</h2>
6
+ <h3 class="k-h3">Heading 3</h3>
7
+ <h4 class="k-h4">Heading 4</h4>
8
+ <h5 class="k-h5">Heading 5</h5>
9
+ <h6 class="k-h6">Heading 6</h6>
10
+ ```
11
+
12
+ ## Displays
13
+
14
+ ```html
15
+ <div class="k-display-1">Display 1</div>
16
+ <div class="k-display-2">Display 2</div>
17
+ <div class="k-display-3">Display 3</div>
18
+ <div class="k-display-4">Display 4</div>
19
+ ```
20
+
21
+ ## Others
22
+
23
+ ```html
24
+ <p class="k-paragraph">A paragraph of regular body text</p>
25
+
26
+ <pre class="k-pre">
27
+ <code class="k-code">const handleChange = ({ target }) =&gt; {
28
+ const { name, value } = target;
29
+ const newData = Object.assign({}, data, { [name]: value });
30
+ setData(newData);
31
+ }</code>
32
+ </pre>
33
+ ```
@@ -0,0 +1 @@
1
+ export * from './typography.jsx';
@@ -0,0 +1,62 @@
1
+ import { Component, globalDefaultProps } from '../component/index';
2
+
3
+ class Typography extends Component {
4
+ render() {
5
+ return <TypographyStatic {...this.props} />;
6
+ }
7
+ }
8
+
9
+ function TypographyStatic(props) {
10
+
11
+ const {
12
+ className: ownClassName,
13
+
14
+ type,
15
+
16
+ children,
17
+
18
+ aria,
19
+
20
+ ...htmlAttributes
21
+ } = props;
22
+
23
+ const typeClass = type === 'p' ? 'paragraph' : type;
24
+
25
+ let TypographyClasses = [
26
+ ownClassName,
27
+ type && `k-${typeClass}`,
28
+ ];
29
+
30
+ const Component = type === null || type.includes('display') ? 'div' : type;
31
+
32
+ let ariaAttr = aria
33
+ ? {}
34
+ : {};
35
+
36
+
37
+ return (
38
+ <Component className={TypographyClasses} {...ariaAttr} {...htmlAttributes}>
39
+ {children}
40
+ </Component>
41
+ );
42
+ }
43
+
44
+ TypographyStatic.defaultProps = {
45
+ ...globalDefaultProps,
46
+
47
+ children: [],
48
+ type: null,
49
+ };
50
+
51
+ TypographyStatic.propTypes = {
52
+ children: typeof [],
53
+ className: typeof '',
54
+
55
+ type: typeof [null, 'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'code', 'pre', 'display-1', 'display-2', 'display-3', 'display-4'],
56
+
57
+ aria: typeof false,
58
+
59
+ htmlAttributes: typeof []
60
+ };
61
+
62
+ export { Typography, TypographyStatic };
@@ -66,7 +66,8 @@
66
66
  "solid": "solid",
67
67
  "flat": "flat",
68
68
  "outline": "outline",
69
- "link": "link"
69
+ "link": "link",
70
+ "clear": "clear"
70
71
  },
71
72
  "shape": {
72
73
  "rectangle": "rectangle",
package/utils/styles.js CHANGED
@@ -14,6 +14,13 @@ const roundedMap = {
14
14
  'large': 'lg'
15
15
  };
16
16
 
17
+ const calloutMap = {
18
+ 'top': 'n',
19
+ 'bottom': 's',
20
+ 'left': 'w',
21
+ 'right': 'e'
22
+ };
23
+
17
24
  function lookup( map, key ) {
18
25
  let result = map[key];
19
26
 
@@ -80,6 +87,14 @@ function positionClass( position, prefix ) {
80
87
  return `k-pos-absolute ${prefix}-${position}`;
81
88
  }
82
89
 
90
+ function calloutClass( callout ) {
91
+ if ( callout === null ) {
92
+ return '';
93
+ }
94
+
95
+ return `k-callout-${lookup(calloutMap, callout)}`;
96
+ }
97
+
83
98
  function classNames( ...args ) {
84
99
 
85
100
  /* eslint-disable arrow-body-style, no-nested-ternary */
@@ -140,6 +155,7 @@ export {
140
155
  themeColorClass,
141
156
  borderedClass,
142
157
  positionClass,
158
+ calloutClass,
143
159
 
144
160
  classNames,
145
161
  cssStyle,