@desynova-digital/components 8.19.63 → 9.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/atoms/avatar/avatar.js +1 -1
  2. package/atoms/avatar/avatar.story.js +46 -14
  3. package/atoms/badge/badge.js +13 -13
  4. package/atoms/badge/badge.story.js +91 -29
  5. package/atoms/button/button.js +81 -85
  6. package/atoms/button/button.story.js +342 -2
  7. package/atoms/card/card.js +43 -39
  8. package/atoms/card/card.story.js +74 -48
  9. package/atoms/cardStack/cardStack.js +182 -155
  10. package/atoms/cardStack/cardStack.story.js +131 -18
  11. package/atoms/cardV2/cardV2.js +23 -23
  12. package/atoms/cardV2/cardV2.story.js +196 -45
  13. package/atoms/cardV2/content.js +109 -87
  14. package/atoms/cardV2/thumbnail.js +85 -72
  15. package/atoms/cardV2/timeline.js +119 -107
  16. package/atoms/checkbox/checkbox.js +41 -32
  17. package/atoms/checkbox/checkbox.story.js +220 -99
  18. package/atoms/customSelect/customSelect.story.js +820 -582
  19. package/atoms/datePicker/datePicker.js +77 -83
  20. package/atoms/datePicker/datePicker.story.js +167 -1
  21. package/atoms/dateTime/dateTime.story.js +26 -1
  22. package/atoms/draftInputText/draftInputText.js +358 -0
  23. package/atoms/draftInputText/draftInputText.story.js +251 -0
  24. package/atoms/draftInputText/index.js +13 -0
  25. package/atoms/dropdown/dropdown.story.js +146 -18
  26. package/atoms/dropdownList/dropdownList.story.js +1598 -1091
  27. package/atoms/graphs/barGraph/barGraph.js +143 -130
  28. package/atoms/graphs/barGraph/barGraph.story.js +74 -40
  29. package/atoms/graphs/circleDonut/circleDonut.story.js +374 -220
  30. package/atoms/graphs/circleGraph/circleGraph.js +84 -80
  31. package/atoms/graphs/circleGraph/circleGraph.story.js +38 -26
  32. package/atoms/graphs/circleNested/circleNested.story.js +98 -103
  33. package/atoms/graphs/pieChart/pieChart.story.js +160 -81
  34. package/atoms/graphs/verticalBarGraph/verticalBarGraph.story.js +30 -28
  35. package/atoms/icon/icon.story.js +220 -163
  36. package/atoms/inputText/inputText.js +52 -49
  37. package/atoms/label/label.js +29 -29
  38. package/atoms/label/label.story.js +42 -30
  39. package/atoms/loader/CircleLoader.js +13 -4
  40. package/atoms/loader/CircleLoader.jsx +10 -4
  41. package/atoms/loader/ThreeDotLoader.js +8 -4
  42. package/atoms/loader/ThreeDotLoader.jsx +4 -4
  43. package/atoms/loader/loader.js +29 -30
  44. package/atoms/loader/loader.story.js +38 -23
  45. package/atoms/loader/spinningLoader.js +7 -4
  46. package/atoms/loader/spinningLoader.jsx +5 -5
  47. package/atoms/popup/popup.js +11 -11
  48. package/atoms/popup/popup.story.js +36 -4
  49. package/atoms/radio/radio.story.js +140 -2
  50. package/atoms/sideBar/sidebar.js +19 -5
  51. package/atoms/sideBar/sidebar.jsx +13 -8
  52. package/atoms/switch/switch.js +72 -66
  53. package/atoms/switch/switch.story.js +323 -78
  54. package/atoms/tag/tag.js +39 -39
  55. package/atoms/tag/tag.story.js +83 -2
  56. package/atoms/textarea/textarea.js +36 -34
  57. package/atoms/timeCodeInput/timCodeInput.story.js +10 -9
  58. package/atoms/timeCodeInput/timeCodeInput.js +108 -100
  59. package/atoms/timer/timer.js +127 -126
  60. package/atoms/toast/toast.js +24 -14
  61. package/atoms/toast/toast.story.js +22 -0
  62. package/atoms/videoCard/videoCard.js +226 -203
  63. package/atoms/videoCard/videoCard.story.js +547 -186
  64. package/components.js +69 -66
  65. package/index.js +5 -4
  66. package/molecules/carousel/carousel.js +55 -67
  67. package/molecules/filter/filter.js +133 -106
  68. package/molecules/filter/filter.story.js +215 -173
  69. package/molecules/graphCard/graphCard.js +34 -24
  70. package/molecules/graphCard/graphCard.story.js +169 -82
  71. package/molecules/graphDetailCard/graphDetailCard.js +207 -182
  72. package/molecules/pageHeader/pageHeader.js +3 -2
  73. package/molecules/pageHeader/pageHeader.story.js +40 -18
  74. package/molecules/pagination/pagination.js +66 -14
  75. package/molecules/pagination/pagination.story.js +24 -2
  76. package/molecules/table/table.js +368 -316
  77. package/molecules/table/table.story.js +404 -208
  78. package/molecules/tabs/tabs.js +15 -6
  79. package/molecules/tabs/tabs.story.js +26 -0
  80. package/package.json +2 -2
@@ -1,14 +1,14 @@
1
1
  'use strict';
2
2
 
3
3
  Object.defineProperty(exports, "__esModule", {
4
- value: true
4
+ value: true
5
5
  });
6
6
 
7
7
  var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
8
8
 
9
- var _templateObject = _taggedTemplateLiteral(['\nposition:relative;\npadding: 20px;\n//min-height:250px;\n > div{\n position:relative;\n min-height:100%;\n display: flex;\n &>div{\n //width:100%;\n transition: all 0.5s ease;\n position: relative;\n }\n\n\n\n &.current{\n &>div{\n .card-title{\n position:relative;//absolute;\n bottom:0px;\n width:100%;\n display:none;\n }\n }\n }\n &.next{ \n &>div{\n .card-title{\n position:relative;//absolute;\n bottom:0px;\n width:100%;\n //color:#00cec6;\n font-size: 16px;\n display: flex;\n align-items: flex-end;\n cursor: ', '\n }\n }\n }\n &.previous{ \n &>div{\n .card-title{\n position:relative;//absolute;\n top:0px;\n width:100%;\n //color:#00cec6;\n font-size: 16px;\n display: flex;\n align-items: flex-start;\n cursor: pointer;\n }\n }\n }\n }\nh1{\n font-size:20px;\n}\n\n\n'], ['\nposition:relative;\npadding: 20px;\n//min-height:250px;\n > div{\n position:relative;\n min-height:100%;\n display: flex;\n &>div{\n //width:100%;\n transition: all 0.5s ease;\n position: relative;\n }\n\n\n\n &.current{\n &>div{\n .card-title{\n position:relative;//absolute;\n bottom:0px;\n width:100%;\n display:none;\n }\n }\n }\n &.next{ \n &>div{\n .card-title{\n position:relative;//absolute;\n bottom:0px;\n width:100%;\n //color:#00cec6;\n font-size: 16px;\n display: flex;\n align-items: flex-end;\n cursor: ', '\n }\n }\n }\n &.previous{ \n &>div{\n .card-title{\n position:relative;//absolute;\n top:0px;\n width:100%;\n //color:#00cec6;\n font-size: 16px;\n display: flex;\n align-items: flex-start;\n cursor: pointer;\n }\n }\n }\n }\nh1{\n font-size:20px;\n}\n\n\n']),
9
+ var _templateObject = _taggedTemplateLiteral(['\nposition:relative;\npadding: 20px;\n//min-height:250px;\n > div{\n position:relative;\n min-height:100%;\n display: flex;\n &>div{\n //width:100%;\n transition: all 0.5s ease;\n position: relative;\n }\n\n\n\n &.current{\n &>div{\n .card-title{\n position:relative;//absolute;\n bottom:0px;\n width:100%;\n display:none;\n }\n }\n }\n &.next{ \n &>div{\n .card-title{\n position:relative;//absolute;\n bottom:0px;\n width:100%;\n //color:', '\n font-size: 16px;\n display: flex;\n align-items: flex-end;\n cursor: ', '\n }\n }\n }\n &.previous{ \n &>div{\n .card-title{\n position:relative;//absolute;\n top:0px;\n width:100%;\n //color: ', ';\n font-size: 16px;\n display: flex;\n align-items: flex-start;\n cursor: pointer;\n }\n }\n }\n }\nh1{\n font-size:20px;\n}\n\n\n'], ['\nposition:relative;\npadding: 20px;\n//min-height:250px;\n > div{\n position:relative;\n min-height:100%;\n display: flex;\n &>div{\n //width:100%;\n transition: all 0.5s ease;\n position: relative;\n }\n\n\n\n &.current{\n &>div{\n .card-title{\n position:relative;//absolute;\n bottom:0px;\n width:100%;\n display:none;\n }\n }\n }\n &.next{ \n &>div{\n .card-title{\n position:relative;//absolute;\n bottom:0px;\n width:100%;\n //color:', '\n font-size: 16px;\n display: flex;\n align-items: flex-end;\n cursor: ', '\n }\n }\n }\n &.previous{ \n &>div{\n .card-title{\n position:relative;//absolute;\n top:0px;\n width:100%;\n //color: ', ';\n font-size: 16px;\n display: flex;\n align-items: flex-start;\n cursor: pointer;\n }\n }\n }\n }\nh1{\n font-size:20px;\n}\n\n\n']),
10
10
  _templateObject2 = _taggedTemplateLiteral(['\n\n margin:0px auto;\n \n top: -', 'px;\n\n width: 100%;\n\n &>div{\n background: #303f51; //', ';//#fff;\n //border:1px solid #fff;\n border-bottom: 0px;\n box-shadow: 0px 0px 18px 7px rgba(0,0,0,0.3); //0 0 6px 2px #dddddd;//2px 2px 2px 2px #8a8787;\n margin:0px auto;\n transition: all 0.5s;\n ', '\n }\n\n\n\n @keyframes up {\n 0%{\n transform: translate(0, 0);\n opacity:1;\n }\n \n 70% {\n transform: translate(0, -40px);\n opacity:1;\n }\n\n 99% {\n\n }\n 100% {\n transform: translate(0, 0);\n opacity:1;\n }\n \n }\n @keyframes down {\n 0%{\n transform: translate(0, 0);\n //opacity:0;\n }\n \n 70% {\n transform: translate(0, 40px);\n }\n\n 99% {\n\n }\n 100% {\n transform: translate(0, 0);\n opacity:1;\n }\n \n }\n\n \n\n\n'], ['\n\n margin:0px auto;\n \n top: -', 'px;\n\n width: 100%;\n\n &>div{\n background: #303f51; //', ';//#fff;\n //border:1px solid #fff;\n border-bottom: 0px;\n box-shadow: 0px 0px 18px 7px rgba(0,0,0,0.3); //0 0 6px 2px #dddddd;//2px 2px 2px 2px #8a8787;\n margin:0px auto;\n transition: all 0.5s;\n ', '\n }\n\n\n\n @keyframes up {\n 0%{\n transform: translate(0, 0);\n opacity:1;\n }\n \n 70% {\n transform: translate(0, -40px);\n opacity:1;\n }\n\n 99% {\n\n }\n 100% {\n transform: translate(0, 0);\n opacity:1;\n }\n \n }\n @keyframes down {\n 0%{\n transform: translate(0, 0);\n //opacity:0;\n }\n \n 70% {\n transform: translate(0, 40px);\n }\n\n 99% {\n\n }\n 100% {\n transform: translate(0, 0);\n opacity:1;\n }\n \n }\n\n \n\n\n']),
11
- _templateObject3 = _taggedTemplateLiteral(['\n height:', 'px;\n'], ['\n height:', 'px;\n']);
11
+ _templateObject3 = _taggedTemplateLiteral(['\n height: ', 'px;\n'], ['\n height: ', 'px;\n']);
12
12
 
13
13
  var _react = require('react');
14
14
 
@@ -18,7 +18,11 @@ var _styledComponents = require('styled-components');
18
18
 
19
19
  var _styledComponents2 = _interopRequireDefault(_styledComponents);
20
20
 
21
- var _tokens = require('../../../tokens');
21
+ var _tokens = require('@desynova-digital/tokens');
22
+
23
+ var _propTypes = require('prop-types');
24
+
25
+ var _propTypes2 = _interopRequireDefault(_propTypes);
22
26
 
23
27
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
24
28
 
@@ -32,180 +36,203 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
32
36
 
33
37
  //import './switch.css'
34
38
  var CardStack = function (_React$Component) {
35
- _inherits(CardStack, _React$Component);
36
-
37
- function CardStack(props) {
38
- _classCallCheck(this, CardStack);
39
-
40
- var _this = _possibleConstructorReturn(this, (CardStack.__proto__ || Object.getPrototypeOf(CardStack)).call(this, props));
41
-
42
- _this.changeCardTo = function (newIdx) {
43
- _this.setState({
44
- current: newIdx,
45
- last: _this.state.current ? _this.state.current : 0
46
-
47
- });
48
- };
49
-
50
- _this.state = {
51
- current: props.current ? props.current : 0,
52
- last: props.current ? props.current : 0,
53
- total: props.total
54
- };
55
- _this.cardClick = _this.cardClick.bind(_this);
56
- return _this;
57
- }
58
-
59
- _createClass(CardStack, [{
60
- key: 'cardClick',
61
- value: function cardClick(e, idx) {
62
- var _this2 = this;
63
-
64
- if (this.state.current !== idx) {
65
- if (!this.props.isStepform) {
66
- this.setState({
67
- current: idx,
68
- last: this.state.current
69
- }, function () {
70
- _this2.props.currentCardChange(idx, _this2.state.current);
71
- });
72
- } else {
73
- this.props.currentCardChange(idx, this.state.current);
74
- }
75
- }
39
+ _inherits(CardStack, _React$Component);
40
+
41
+ function CardStack(props) {
42
+ _classCallCheck(this, CardStack);
43
+
44
+ var _this = _possibleConstructorReturn(this, (CardStack.__proto__ || Object.getPrototypeOf(CardStack)).call(this, props));
45
+
46
+ _this.changeCardTo = function (newIdx) {
47
+ _this.setState({
48
+ current: newIdx,
49
+ last: _this.state.current ? _this.state.current : 0
50
+ });
51
+ };
52
+
53
+ _this.state = {
54
+ current: props.current ? props.current : 0,
55
+ last: props.current ? props.current : 0,
56
+ total: props.total
57
+ };
58
+ _this.cardClick = _this.cardClick.bind(_this);
59
+ return _this;
60
+ }
61
+
62
+ _createClass(CardStack, [{
63
+ key: 'cardClick',
64
+ value: function cardClick(e, idx) {
65
+ var _this2 = this;
66
+
67
+ if (this.state.current !== idx) {
68
+ if (!this.props.isStepform) {
69
+ this.setState({
70
+ current: idx,
71
+ last: this.state.current
72
+ }, function () {
73
+ _this2.props.currentCardChange(idx, _this2.state.current);
74
+ });
75
+ } else {
76
+ this.props.currentCardChange(idx, this.state.current);
76
77
  }
77
- }, {
78
- key: 'render',
79
- value: function render() {
80
- var _this3 = this;
81
-
82
- if (this.props.isStepform && this.props.current !== this.state.current) {
83
- this.changeCardTo(this.props.current);
84
- }
85
-
86
- return _react2.default.createElement(
87
- CardStack.CardStackBox,
88
- { className: 'card-stack-box', theme: this.props.theme,
89
- isStepform: this.props.isStepform },
90
- this.props.children.constructor === Array ? this.props.children.map(function (child, idx) {
91
- //console.log('child ::',child.key);
92
- return _react2.default.createElement(
93
- CardStack.Card,
94
- {
95
- key: child.key + 0 + 'card-stack',
96
- className: _this3.state.current < idx ? "next" : _this3.state.current === idx ? "current" : "previous",
97
- count: idx,
98
- isStepform: _this3.props.isStepform,
99
- current: _this3.state.current,
100
- total: _this3.props.children.length,
101
- last: _this3.state.last,
102
- onClick: function onClick(e) {
103
- return _this3.cardClick(e, idx);
104
- },
105
- titleHeight: _this3.props.titleHeight,
106
- theme: _this3.props.theme ? _this3.props.theme : 'dark' },
107
- _react2.default.createElement(
108
- 'div',
109
- null,
110
- _react2.default.createElement(TitleComponent, { title: child.props.title,
111
- titleHeight: _this3.props.titleHeight
112
- }),
113
- _this3.state.current === idx ? child : null
114
- )
115
- );
116
- }) : this.props.children.constructor === Object ? _react2.default.createElement(
117
- CardStack.Card,
118
- {
119
- key: "card",
120
- className: this.state.current < 0 ? "next" : this.state.current === 0 ? "current" : "previous",
121
- count: 0,
122
- current: this.state.current,
123
- isStepform: this.props.isStepform,
124
- total: 1,
125
- last: this.state.last,
126
- onClick: function onClick(e) {
127
- return _this3.cardClick(e, 0);
128
- },
129
- titleHeight: this.props.titleHeight,
130
- theme: this.props.theme ? this.props.theme : 'dark' },
131
- _react2.default.createElement(
132
- 'div',
133
- null,
134
- _react2.default.createElement(TitleComponent, { title: this.props.children.props.title,
135
- titleHeight: this.props.titleHeight }),
136
- this.state.current === 0 ? this.props.children : null
137
- )
138
- ) : null
139
- );
140
- }
141
- }]);
78
+ }
79
+ }
80
+ }, {
81
+ key: 'render',
82
+ value: function render() {
83
+ var _this3 = this;
84
+
85
+ if (this.props.isStepform && this.props.current !== this.state.current) {
86
+ this.changeCardTo(this.props.current);
87
+ }
88
+
89
+ return _react2.default.createElement(
90
+ CardStack.CardStackBox,
91
+ {
92
+ className: 'card-stack-box',
93
+ theme: this.props.theme,
94
+ isStepform: this.props.isStepform
95
+ },
96
+ this.props.children.constructor === Array ? this.props.children.map(function (child, idx) {
97
+ //console.log('child ::',child.key);
98
+ return _react2.default.createElement(
99
+ CardStack.Card,
100
+ {
101
+ key: child.key + 0 + 'card-stack',
102
+ className: _this3.state.current < idx ? 'next' : _this3.state.current === idx ? 'current' : 'previous',
103
+ count: idx,
104
+ isStepform: _this3.props.isStepform,
105
+ current: _this3.state.current,
106
+ total: _this3.props.children.length,
107
+ last: _this3.state.last,
108
+ onClick: function onClick(e) {
109
+ return _this3.cardClick(e, idx);
110
+ },
111
+ titleHeight: _this3.props.titleHeight,
112
+ theme: _this3.props.theme ? _this3.props.theme : 'dark'
113
+ },
114
+ _react2.default.createElement(
115
+ 'div',
116
+ null,
117
+ _react2.default.createElement(TitleComponent, { title: child.props.title, titleHeight: _this3.props.titleHeight }),
118
+ _this3.state.current === idx ? child : null
119
+ )
120
+ );
121
+ }) : this.props.children.constructor === Object ? _react2.default.createElement(
122
+ CardStack.Card,
123
+ {
124
+ key: 'card',
125
+ className: this.state.current < 0 ? 'next' : this.state.current === 0 ? 'current' : 'previous',
126
+ count: 0,
127
+ current: this.state.current,
128
+ isStepform: this.props.isStepform,
129
+ total: 1,
130
+ last: this.state.last,
131
+ onClick: function onClick(e) {
132
+ return _this3.cardClick(e, 0);
133
+ },
134
+ titleHeight: this.props.titleHeight,
135
+ theme: this.props.theme ? this.props.theme : 'dark'
136
+ },
137
+ _react2.default.createElement(
138
+ 'div',
139
+ null,
140
+ _react2.default.createElement(TitleComponent, {
141
+ title: this.props.children.props.title,
142
+ titleHeight: this.props.titleHeight
143
+ }),
144
+ this.state.current === 0 ? this.props.children : null
145
+ )
146
+ ) : null
147
+ );
148
+ }
149
+ }]);
142
150
 
143
- return CardStack;
151
+ return CardStack;
144
152
  }(_react2.default.Component);
145
153
 
146
154
  CardStack.CardStackBox = _styledComponents2.default.div(_templateObject, function (props) {
147
- return props.isStepform ? 'not-allowed' : 'pointer';
155
+ return _tokens.colors[props.theme].card.themeColor;
156
+ }, function (props) {
157
+ return props.isStepform ? 'not-allowed' : 'pointer';
158
+ }, function (props) {
159
+ return _tokens.colors[props.theme].card.themeColor;
148
160
  });
149
161
  CardStack.Card = _styledComponents2.default.div(_templateObject2, function (props) {
150
- return props.count * (props.titleHeight + 40);
162
+ return props.count * (props.titleHeight + 40);
151
163
  }, function (props) {
152
- return _tokens.colors[props.theme].card.background;
164
+ return _tokens.colors[props.theme].card.background;
153
165
  }, function (props) {
154
- if (props.count < props.current) {
155
- return 'width:calc(100% - ' + (props.current - props.count) * 60 + 'px); z-index:' + props.count + ';' + (props.isStepform ? 'color:#00cec6;' : '');
156
- } else if (props.count > props.current) {
157
- return 'width:calc(100% - ' + (props.count - props.current) * 60 + 'px);z-index:' + (props.total - (props.count - props.current)) + ';' + (props.isStepform ? 'color:#999999;' : '');
158
- } else {
159
- return 'animation: ' + (props.last > props.current ? 'up' : 'down') + ' 0.25s 1;transform: translate(0, 0); width:100%; z-index:' + props.total + ';background:#162433';
160
- }
166
+ if (props.count < props.current) {
167
+ return 'width:calc(100% - ' + (props.current - props.count) * 60 + 'px); z-index:' + props.count + ';' + (props.isStepform ? 'color:' + _tokens.colors[props.theme].card.themeColor + ';' : '');
168
+ } else if (props.count > props.current) {
169
+ return 'width:calc(100% - ' + (props.count - props.current) * 60 + 'px);z-index:' + (props.total - (props.count - props.current)) + ';' + (props.isStepform ? 'color:#999999;' : '');
170
+ } else {
171
+ return 'animation: ' + (props.last > props.current ? 'up' : 'down') + ' 0.25s 1;transform: translate(0, 0); width:100%; z-index:' + props.total + ';background:#162433';
172
+ }
161
173
  });
162
174
 
175
+ CardStack.propTypes = {
176
+ /** The visual style used to convey the label's purpose */
177
+ theme: _propTypes2.default.oneOf(['light', 'dark', 'nexc']),
178
+
179
+ titleHeight: _propTypes2.default.number,
180
+ current: _propTypes2.default.number
181
+ };
182
+
183
+ CardStack.Card.propTypes = {
184
+ /** The visual style used to convey the label's purpose */
185
+ theme: _propTypes2.default.oneOf(['light', 'dark', 'nexc']),
186
+ isStepform: _propTypes2.default.bool,
187
+ titleHeight: _propTypes2.default.number
188
+ };
189
+
163
190
  CardStack.defaultProps = {
164
- titleHeight: 60,
165
- theme: 'dark',
166
- current: 0
191
+ titleHeight: 60,
192
+ theme: 'dark',
193
+ current: 0
167
194
  };
168
195
  CardStack.Card.defaultProps = {
169
- theme: 'dark',
170
- isStepform: false,
171
- activeForms: [],
172
- titleHeight: 60
196
+ theme: 'dark',
197
+ isStepform: false,
198
+ activeForms: [],
199
+ titleHeight: 60
173
200
  };
174
201
 
175
202
  var TitleComponent = function (_React$Component2) {
176
- _inherits(TitleComponent, _React$Component2);
177
-
178
- function TitleComponent(props) {
179
- _classCallCheck(this, TitleComponent);
203
+ _inherits(TitleComponent, _React$Component2);
204
+
205
+ function TitleComponent(props) {
206
+ _classCallCheck(this, TitleComponent);
207
+
208
+ return _possibleConstructorReturn(this, (TitleComponent.__proto__ || Object.getPrototypeOf(TitleComponent)).call(this, props));
209
+ }
210
+
211
+ _createClass(TitleComponent, [{
212
+ key: 'render',
213
+ value: function render() {
214
+ var title = '';
215
+ if (this.props.title) {
216
+ if (typeof this.props.title == 'string') {
217
+ title = _react2.default.createElement(
218
+ CardStack.TitleBox,
219
+ { titleHeight: this.props.titleHeight, className: 'card-title' },
220
+ this.props.title
221
+ );
222
+ } else {
223
+ title = this.props.title;
224
+ }
225
+ }
180
226
 
181
- return _possibleConstructorReturn(this, (TitleComponent.__proto__ || Object.getPrototypeOf(TitleComponent)).call(this, props));
227
+ return title;
182
228
  }
229
+ }]);
183
230
 
184
- _createClass(TitleComponent, [{
185
- key: 'render',
186
- value: function render() {
187
- var title = '';
188
- if (this.props.title) {
189
- if (typeof this.props.title == "string") {
190
- title = _react2.default.createElement(
191
- CardStack.TitleBox,
192
- { titleHeight: this.props.titleHeight, className: 'card-title' },
193
- this.props.title
194
- );
195
- } else {
196
- title = this.props.title;
197
- }
198
- }
199
-
200
- return title;
201
- }
202
- }]);
203
-
204
- return TitleComponent;
231
+ return TitleComponent;
205
232
  }(_react2.default.Component);
206
233
 
207
234
  CardStack.TitleBox = _styledComponents2.default.div(_templateObject3, function (props) {
208
- return props.titleHeight + 100;
235
+ return props.titleHeight + 100;
209
236
  });
210
237
 
211
238
  exports.default = CardStack;
@@ -13,7 +13,7 @@ var _components = require('../../components');
13
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
14
 
15
15
  //console.log(RadioGroup);
16
- (0, _react3.storiesOf)('CardStack').add('default', function () {
16
+ (0, _react3.storiesOf)('CardStack').add('dark theme', function () {
17
17
  return _react2.default.createElement(
18
18
  _storyHelpers.Example,
19
19
  null,
@@ -25,15 +25,22 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
25
25
  null,
26
26
  _react2.default.createElement(
27
27
  'div',
28
- { style: {
29
- 'background': '#fff',
30
- 'padding': '10px'
31
- } },
28
+ {
29
+ style: {
30
+ background: '#fff',
31
+ padding: '10px'
32
+ }
33
+ },
32
34
  _react2.default.createElement(
33
35
  _components.CardStack,
34
- { current: 2, theme: 'dark', isStepform: true, onChangeCheck: function onChangeCheck(value) {
36
+ {
37
+ current: 2,
38
+ theme: 'dark',
39
+ isStepform: true,
40
+ onChangeCheck: function onChangeCheck(value) {
35
41
  console.log(value);
36
- } },
42
+ }
43
+ },
37
44
  _react2.default.createElement(
38
45
  'div',
39
46
  { style: { height: '300px' }, title: 'SECTION 1' },
@@ -45,7 +52,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
45
52
  ),
46
53
  _react2.default.createElement(
47
54
  'div',
48
- { style: { height: '450px' }, title: "SECTION 2" },
55
+ { style: { height: '450px' }, title: 'SECTION 2' },
49
56
  _react2.default.createElement(
50
57
  'h1',
51
58
  null,
@@ -54,7 +61,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
54
61
  ),
55
62
  _react2.default.createElement(
56
63
  'div',
57
- { style: { height: '350px' }, title: "SECTION 3" },
64
+ { style: { height: '350px' }, title: 'SECTION 3' },
58
65
  _react2.default.createElement(
59
66
  'h1',
60
67
  null,
@@ -63,7 +70,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
63
70
  ),
64
71
  _react2.default.createElement(
65
72
  'div',
66
- { style: { height: '500px' }, title: "SECTION 4" },
73
+ { style: { height: '500px' }, title: 'SECTION 4' },
67
74
  _react2.default.createElement(
68
75
  'h1',
69
76
  null,
@@ -74,19 +81,125 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
74
81
  ),
75
82
  _react2.default.createElement(
76
83
  'div',
77
- { style: {
78
- 'background': '#fff',
79
- 'padding': '10px',
80
- 'marginTop': '300px'
81
- } },
84
+ {
85
+ style: {
86
+ background: '#fff',
87
+ padding: '10px',
88
+ marginTop: '300px'
89
+ }
90
+ },
82
91
  _react2.default.createElement(
83
92
  _components.CardStack,
84
- { current: 1, theme: 'light', onChangeCheck: function onChangeCheck(value) {
93
+ {
94
+ current: 1,
95
+ theme: 'dark',
96
+ onChangeCheck: function onChangeCheck(value) {
85
97
  console.log(value);
86
- } },
98
+ }
99
+ },
87
100
  _react2.default.createElement(
88
101
  'div',
89
- { title: _react2.default.createElement("div", { 'background': 'yellow' }, "Title Element") },
102
+ { title: _react2.default.createElement('div', { background: 'yellow' }, 'Title Element') },
103
+ _react2.default.createElement(
104
+ 'h1',
105
+ null,
106
+ ' Child 1'
107
+ )
108
+ )
109
+ )
110
+ )
111
+ )
112
+ )
113
+ );
114
+ });
115
+
116
+ (0, _react3.storiesOf)('CardStack').add('nexc theme', function () {
117
+ return _react2.default.createElement(
118
+ _storyHelpers.Example,
119
+ null,
120
+ _react2.default.createElement(
121
+ 'div',
122
+ null,
123
+ _react2.default.createElement(
124
+ 'div',
125
+ null,
126
+ _react2.default.createElement(
127
+ 'div',
128
+ {
129
+ style: {
130
+ background: '#fff',
131
+ padding: '10px'
132
+ }
133
+ },
134
+ _react2.default.createElement(
135
+ _components.CardStack,
136
+ {
137
+ current: 2,
138
+ theme: 'nexc',
139
+ isStepform: true,
140
+ onChangeCheck: function onChangeCheck(value) {
141
+ console.log(value);
142
+ }
143
+ },
144
+ _react2.default.createElement(
145
+ 'div',
146
+ { style: { height: '300px' }, title: 'SECTION 1' },
147
+ _react2.default.createElement(
148
+ 'h1',
149
+ null,
150
+ ' Child 1'
151
+ )
152
+ ),
153
+ _react2.default.createElement(
154
+ 'div',
155
+ { style: { height: '450px' }, title: 'SECTION 2' },
156
+ _react2.default.createElement(
157
+ 'h1',
158
+ null,
159
+ ' Child 2'
160
+ )
161
+ ),
162
+ _react2.default.createElement(
163
+ 'div',
164
+ { style: { height: '350px' }, title: 'SECTION 3' },
165
+ _react2.default.createElement(
166
+ 'h1',
167
+ null,
168
+ ' Child 3'
169
+ )
170
+ ),
171
+ _react2.default.createElement(
172
+ 'div',
173
+ { style: { height: '500px' }, title: 'SECTION 4' },
174
+ _react2.default.createElement(
175
+ 'h1',
176
+ null,
177
+ ' Child 4'
178
+ )
179
+ )
180
+ )
181
+ ),
182
+ _react2.default.createElement(
183
+ 'div',
184
+ {
185
+ style: {
186
+ background: '#fff',
187
+ padding: '10px',
188
+ marginTop: '300px'
189
+ }
190
+ },
191
+ _react2.default.createElement(
192
+ _components.CardStack,
193
+ {
194
+ current: 1,
195
+ theme: 'nexc',
196
+ onChangeCheck: function onChangeCheck(value) {
197
+ console.log(value);
198
+ }
199
+ },
200
+ _react2.default.createElement(
201
+ 'div',
202
+ { title: _react2.default.createElement('div', { background: 'yellow' }, 'Title Element') },
90
203
  _react2.default.createElement(
91
204
  'h1',
92
205
  null,