@desynova-digital/components 8.19.63 → 9.0.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.
- package/atoms/avatar/avatar.js +1 -1
- package/atoms/avatar/avatar.story.js +46 -14
- package/atoms/badge/badge.js +13 -13
- package/atoms/badge/badge.story.js +91 -29
- package/atoms/button/button.js +81 -85
- package/atoms/button/button.story.js +342 -2
- package/atoms/card/card.js +43 -39
- package/atoms/card/card.story.js +74 -48
- package/atoms/cardStack/cardStack.js +182 -155
- package/atoms/cardStack/cardStack.story.js +131 -18
- package/atoms/cardV2/cardV2.js +23 -23
- package/atoms/cardV2/cardV2.story.js +196 -45
- package/atoms/cardV2/content.js +109 -87
- package/atoms/cardV2/thumbnail.js +85 -72
- package/atoms/cardV2/timeline.js +119 -107
- package/atoms/checkbox/checkbox.js +41 -32
- package/atoms/checkbox/checkbox.story.js +220 -99
- package/atoms/customSelect/customSelect.story.js +820 -582
- package/atoms/datePicker/datePicker.js +77 -83
- package/atoms/datePicker/datePicker.story.js +167 -1
- package/atoms/dateTime/dateTime.story.js +26 -1
- package/atoms/draftInputText/draftInputText.js +358 -0
- package/atoms/draftInputText/draftInputText.story.js +251 -0
- package/atoms/draftInputText/index.js +13 -0
- package/atoms/dropdown/dropdown.story.js +146 -18
- package/atoms/dropdownList/dropdownList.story.js +1598 -1091
- package/atoms/graphs/barGraph/barGraph.js +143 -130
- package/atoms/graphs/barGraph/barGraph.story.js +74 -40
- package/atoms/graphs/circleDonut/circleDonut.story.js +374 -220
- package/atoms/graphs/circleGraph/circleGraph.js +84 -80
- package/atoms/graphs/circleGraph/circleGraph.story.js +38 -26
- package/atoms/graphs/circleNested/circleNested.story.js +98 -103
- package/atoms/graphs/pieChart/pieChart.story.js +160 -81
- package/atoms/graphs/verticalBarGraph/verticalBarGraph.story.js +30 -28
- package/atoms/icon/icon.story.js +220 -163
- package/atoms/inputText/inputText.js +52 -49
- package/atoms/label/label.js +29 -29
- package/atoms/label/label.story.js +42 -30
- package/atoms/loader/CircleLoader.js +13 -4
- package/atoms/loader/CircleLoader.jsx +10 -4
- package/atoms/loader/ThreeDotLoader.js +8 -4
- package/atoms/loader/ThreeDotLoader.jsx +4 -4
- package/atoms/loader/loader.js +29 -30
- package/atoms/loader/loader.story.js +38 -23
- package/atoms/loader/spinningLoader.js +7 -4
- package/atoms/loader/spinningLoader.jsx +5 -5
- package/atoms/popup/popup.js +11 -11
- package/atoms/popup/popup.story.js +36 -4
- package/atoms/radio/radio.story.js +140 -2
- package/atoms/sideBar/sidebar.js +19 -5
- package/atoms/sideBar/sidebar.jsx +13 -8
- package/atoms/switch/switch.js +72 -66
- package/atoms/switch/switch.story.js +323 -78
- package/atoms/tag/tag.js +39 -39
- package/atoms/tag/tag.story.js +83 -2
- package/atoms/textarea/textarea.js +36 -34
- package/atoms/timeCodeInput/timCodeInput.story.js +10 -9
- package/atoms/timeCodeInput/timeCodeInput.js +107 -100
- package/atoms/timer/timer.js +127 -126
- package/atoms/toast/toast.js +24 -14
- package/atoms/toast/toast.story.js +22 -0
- package/atoms/videoCard/videoCard.js +226 -203
- package/atoms/videoCard/videoCard.story.js +547 -186
- package/components.js +69 -66
- package/index.js +5 -4
- package/molecules/carousel/carousel.js +55 -67
- package/molecules/filter/filter.js +133 -106
- package/molecules/filter/filter.story.js +215 -173
- package/molecules/graphCard/graphCard.js +34 -24
- package/molecules/graphCard/graphCard.story.js +169 -82
- package/molecules/graphDetailCard/graphDetailCard.js +207 -182
- package/molecules/pageHeader/pageHeader.js +3 -2
- package/molecules/pageHeader/pageHeader.story.js +40 -18
- package/molecules/pagination/pagination.js +66 -14
- package/molecules/pagination/pagination.story.js +24 -2
- package/molecules/table/table.js +367 -315
- package/molecules/table/table.story.js +404 -208
- package/molecules/tabs/tabs.js +15 -6
- package/molecules/tabs/tabs.story.js +26 -0
- package/package.json +2 -2
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
|
|
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
|
|
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
|
|
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('
|
|
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
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
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
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
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
|
-
|
|
151
|
+
return CardStack;
|
|
144
152
|
}(_react2.default.Component);
|
|
145
153
|
|
|
146
154
|
CardStack.CardStackBox = _styledComponents2.default.div(_templateObject, function (props) {
|
|
147
|
-
|
|
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
|
-
|
|
162
|
+
return props.count * (props.titleHeight + 40);
|
|
151
163
|
}, function (props) {
|
|
152
|
-
|
|
164
|
+
return _tokens.colors[props.theme].card.background;
|
|
153
165
|
}, function (props) {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
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
|
-
|
|
165
|
-
|
|
166
|
-
|
|
191
|
+
titleHeight: 60,
|
|
192
|
+
theme: 'dark',
|
|
193
|
+
current: 0
|
|
167
194
|
};
|
|
168
195
|
CardStack.Card.defaultProps = {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
196
|
+
theme: 'dark',
|
|
197
|
+
isStepform: false,
|
|
198
|
+
activeForms: [],
|
|
199
|
+
titleHeight: 60
|
|
173
200
|
};
|
|
174
201
|
|
|
175
202
|
var TitleComponent = function (_React$Component2) {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
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
|
-
|
|
227
|
+
return title;
|
|
182
228
|
}
|
|
229
|
+
}]);
|
|
183
230
|
|
|
184
|
-
|
|
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
|
-
|
|
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('
|
|
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
|
-
{
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
{
|
|
29
|
+
style: {
|
|
30
|
+
background: '#fff',
|
|
31
|
+
padding: '10px'
|
|
32
|
+
}
|
|
33
|
+
},
|
|
32
34
|
_react2.default.createElement(
|
|
33
35
|
_components.CardStack,
|
|
34
|
-
{
|
|
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:
|
|
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:
|
|
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:
|
|
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
|
-
{
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
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
|
-
{
|
|
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(
|
|
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,
|