@desynova-digital/components 9.0.26 → 9.1.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.
Files changed (170) hide show
  1. package/_helpers/globals.js +9 -10
  2. package/_helpers/pagination.js +10 -15
  3. package/_helpers/story-example.js +16 -39
  4. package/_helpers/story-helpers.js +15 -14
  5. package/_helpers/story-stack.js +22 -43
  6. package/_helpers/uniqueId.js +2 -5
  7. package/_helpers/utils.js +28 -4
  8. package/atoms/avatar/avatar.js +19 -42
  9. package/atoms/avatar/avatar.story.js +25 -58
  10. package/atoms/avatar/index.js +13 -11
  11. package/atoms/badge/badge.js +14 -37
  12. package/atoms/badge/badge.story.js +45 -103
  13. package/atoms/badge/index.js +12 -10
  14. package/atoms/button/button.js +85 -161
  15. package/atoms/button/button.story.js +354 -508
  16. package/atoms/button/index.js +5 -9
  17. package/atoms/card/card.js +26 -55
  18. package/atoms/card/card.story.js +39 -88
  19. package/atoms/card/index.js +12 -10
  20. package/atoms/cardStack/cardStack.js +88 -147
  21. package/atoms/cardStack/cardStack.story.js +106 -210
  22. package/atoms/cardStack/index.js +12 -10
  23. package/atoms/cardV2/cardV2.js +57 -106
  24. package/atoms/cardV2/cardV2.story.js +184 -232
  25. package/atoms/cardV2/content.js +154 -256
  26. package/atoms/cardV2/index.js +4 -8
  27. package/atoms/cardV2/thumbnail.js +138 -208
  28. package/atoms/cardV2/timeline.js +167 -123
  29. package/atoms/checkbox/checkbox.js +85 -157
  30. package/atoms/checkbox/checkbox.story.js +237 -365
  31. package/atoms/checkbox/index.js +4 -9
  32. package/atoms/customSelect/customSelect.js +136 -215
  33. package/atoms/customSelect/customSelect.story.js +745 -851
  34. package/atoms/customSelect/index.js +4 -8
  35. package/atoms/datePicker/datePicker.js +299 -431
  36. package/atoms/datePicker/datePicker.story.js +453 -501
  37. package/atoms/datePicker/index.js +4 -8
  38. package/atoms/dateTime/dateTime.js +3 -6
  39. package/atoms/dateTime/dateTime.story.js +17 -63
  40. package/atoms/dateTime/index.js +5 -9
  41. package/atoms/draftInputText/draftInputText.js +121 -189
  42. package/atoms/draftInputText/draftInputText.story.js +200 -249
  43. package/atoms/draftInputText/index.js +5 -9
  44. package/atoms/dropdown/dropdown.js +38 -66
  45. package/atoms/dropdown/dropdown.story.js +102 -262
  46. package/atoms/dropdown/index.js +4 -8
  47. package/atoms/dropdownList/dropdownList.js +78 -108
  48. package/atoms/dropdownList/dropdownList.story.js +1546 -1621
  49. package/atoms/dropdownList/index.js +4 -8
  50. package/atoms/graphs/barGraph/barGraph.js +95 -146
  51. package/atoms/graphs/barGraph/barGraph.story.js +65 -87
  52. package/atoms/graphs/barGraph/index.js +4 -8
  53. package/atoms/graphs/circleDonut/circleDonut.js +177 -229
  54. package/atoms/graphs/circleDonut/circleDonut.story.js +328 -394
  55. package/atoms/graphs/circleDonut/index.js +5 -9
  56. package/atoms/graphs/circleGraph/circleGraph.js +60 -90
  57. package/atoms/graphs/circleGraph/circleGraph.story.js +36 -54
  58. package/atoms/graphs/circleGraph/index.js +4 -8
  59. package/atoms/graphs/circleNested/circleNested.js +216 -262
  60. package/atoms/graphs/circleNested/circleNested.story.js +91 -116
  61. package/atoms/graphs/circleNested/index.js +5 -9
  62. package/atoms/graphs/pieChart/index.js +4 -8
  63. package/atoms/graphs/pieChart/pieChart.js +162 -191
  64. package/atoms/graphs/pieChart/pieChart.story.js +147 -176
  65. package/atoms/graphs/verticalBarGraph/index.js +5 -9
  66. package/atoms/graphs/verticalBarGraph/verticalBarGraph.js +75 -98
  67. package/atoms/graphs/verticalBarGraph/verticalBarGraph.story.js +26 -45
  68. package/atoms/icon/icon.js +41 -72
  69. package/atoms/icon/icon.story.js +831 -260
  70. package/atoms/icon/index.js +19 -12
  71. package/atoms/image/image.js +18 -32
  72. package/atoms/image/image.story.js +10 -19
  73. package/atoms/image/index.js +4 -8
  74. package/atoms/inputText/index.js +4 -8
  75. package/atoms/inputText/inputText.js +86 -131
  76. package/atoms/inputText/inputText.story.js +191 -255
  77. package/atoms/label/index.js +4 -8
  78. package/atoms/label/label.js +25 -50
  79. package/atoms/label/label.story.js +42 -83
  80. package/atoms/loader/CircleLoader.js +29 -63
  81. package/atoms/loader/ShimmerComponent/CollabShimmerCard.js +39 -50
  82. package/atoms/loader/ShimmerComponent/CollabShimmerCardTray.js +41 -42
  83. package/atoms/loader/ShimmerComponent/FiltersShimmer.js +30 -30
  84. package/atoms/loader/ShimmerComponent/GraphDetailShimmer.js +21 -34
  85. package/atoms/loader/ShimmerComponent/GraphTitleShimmer.js +30 -34
  86. package/atoms/loader/ShimmerComponent/GraphsComponentShimmer.js +23 -32
  87. package/atoms/loader/ShimmerComponent/Shimmer.js +24 -32
  88. package/atoms/loader/ThreeDotLoader.js +14 -29
  89. package/atoms/loader/index.js +13 -11
  90. package/atoms/loader/loader.js +34 -58
  91. package/atoms/loader/loader.story.js +48 -52
  92. package/atoms/loader/spinningLoader.js +23 -34
  93. package/atoms/popup/index.js +5 -9
  94. package/atoms/popup/popup.js +123 -208
  95. package/atoms/popup/popup.story.js +97 -131
  96. package/atoms/radio/index.js +18 -11
  97. package/atoms/radio/radio.js +58 -112
  98. package/atoms/radio/radio.story.js +197 -420
  99. package/atoms/select/index.js +4 -8
  100. package/atoms/select/select.js +48 -86
  101. package/atoms/sideBar/index.js +5 -9
  102. package/atoms/sideBar/sidebar.js +89 -140
  103. package/atoms/switch/index.js +4 -8
  104. package/atoms/switch/switch.js +56 -86
  105. package/atoms/switch/switch.story.js +268 -415
  106. package/atoms/tag/index.js +12 -10
  107. package/atoms/tag/tag.js +29 -63
  108. package/atoms/tag/tag.story.js +135 -209
  109. package/atoms/textarea/index.js +5 -9
  110. package/atoms/textarea/textarea.js +55 -99
  111. package/atoms/textarea/textarea.story.js +48 -41
  112. package/atoms/thematicBreak/index.js +12 -10
  113. package/atoms/thematicBreak/thematicBreak.js +20 -38
  114. package/atoms/thematicBreak/thematicBreak.story.js +25 -37
  115. package/atoms/timeCodeInput/index.js +4 -8
  116. package/atoms/timeCodeInput/timCodeInput.story.js +21 -35
  117. package/atoms/timeCodeInput/timeCodeInput.js +33 -51
  118. package/atoms/timer/index.js +5 -9
  119. package/atoms/timer/timer.js +57 -108
  120. package/atoms/timer/timer.story.js +13 -26
  121. package/atoms/toast/index.js +5 -9
  122. package/atoms/toast/toast.js +81 -116
  123. package/atoms/toast/toast.story.js +50 -76
  124. package/atoms/videoCard/index.js +12 -10
  125. package/atoms/videoCard/videoCard.js +265 -447
  126. package/atoms/videoCard/videoCard.story.js +495 -710
  127. package/components.js +411 -294
  128. package/index.js +350 -61
  129. package/molecules/carousel/carousel.js +121 -207
  130. package/molecules/carousel/carousel.story.js +240 -223
  131. package/molecules/carousel/index.js +5 -9
  132. package/molecules/errorScreen/CollabErrorScreen.js +35 -66
  133. package/molecules/errorScreen/TableErrorScreen.js +109 -102
  134. package/molecules/errorScreen/TableErrorScreen.jsx +7 -6
  135. package/molecules/errorScreen/errorScreen.js +41 -94
  136. package/molecules/filter/constants.js +1 -0
  137. package/molecules/filter/filter.js +378 -562
  138. package/molecules/filter/filter.story.js +79 -104
  139. package/molecules/filter/index.js +5 -9
  140. package/molecules/graphCard/graphCard.js +97 -193
  141. package/molecules/graphCard/graphCard.story.js +159 -191
  142. package/molecules/graphCard/index.js +4 -8
  143. package/molecules/graphCard/loader.js +28 -68
  144. package/molecules/graphDetailCard/graphDetailCard.js +115 -183
  145. package/molecules/graphDetailCard/graphDetailCard.story.js +218 -254
  146. package/molecules/graphDetailCard/index.js +5 -9
  147. package/molecules/pageHeader/index.js +12 -10
  148. package/molecules/pageHeader/pageHeader.js +38 -79
  149. package/molecules/pageHeader/pageHeader.story.js +34 -55
  150. package/molecules/pagination/index.js +4 -8
  151. package/molecules/pagination/pagination.js +126 -202
  152. package/molecules/pagination/pagination.story.js +40 -52
  153. package/molecules/richTextInput/RichTextInput.js +354 -0
  154. package/molecules/richTextInput/RichTextInput.story.js +50 -0
  155. package/molecules/richTextInput/index.js +9 -0
  156. package/molecules/table/index.js +4 -8
  157. package/molecules/table/table-column.js +10 -16
  158. package/molecules/table/table-header.js +31 -72
  159. package/molecules/table/table.js +743 -1075
  160. package/molecules/table/table.story.js +274 -304
  161. package/molecules/tabs/index.js +4 -8
  162. package/molecules/tabs/tabs.js +112 -184
  163. package/molecules/tabs/tabs.story.js +66 -133
  164. package/molecules/videoCardList/index.js +4 -8
  165. package/molecules/videoCardList/videoCardList.js +24 -41
  166. package/molecules/videoCardList/videoCardList.story.js +449 -664
  167. package/molecules/videoPlayer/index.js +4 -8
  168. package/molecules/videoPlayer/videoPlayer.js +1019 -1097
  169. package/molecules/videoPlayer/videoPlayer.story.js +10 -21
  170. package/package.json +2 -2
@@ -1,179 +1,150 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
- var _react = require('react');
4
-
5
- var _react2 = _interopRequireDefault(_react);
6
-
7
- var _react3 = require('@storybook/react');
8
-
9
- var _storyHelpers = require('../../../_helpers/story-helpers');
10
-
11
- var _components = require('../../../../components');
12
-
13
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
-
15
- (0, _react3.storiesOf)('PieChart').add('light theme', function () {
16
- return _react2.default.createElement(
17
- _storyHelpers.Example,
18
- { title: 'Appearances' },
19
- _react2.default.createElement(
20
- 'div',
21
- null,
22
- _react2.default.createElement(
23
- 'div',
24
- null,
25
- _react2.default.createElement(
26
- 'div',
27
- { style: { width: '500px' } },
28
- _react2.default.createElement(_components.PieChart, {
29
- width: 500,
30
- height: 500,
31
- data: {
32
- name: 'Archieve',
33
- total: 100,
34
- values: [{
35
- name: 'Archieved',
36
- value: 'archieved',
37
- data: 1,
38
- index: 1
39
- }, {
40
- name: 'InProcess',
41
- value: 'inprocess',
42
- data: 1,
43
- index: 2
44
- }, {
45
- name: 'Pending',
46
- value: 'pending',
47
- data: 95,
48
- index: 3
49
- }, {
50
- name: 'Failed',
51
- value: 'failed',
52
- data: 3,
53
- index: 4
54
- }]
55
- },
56
- type: 'donutThin'
57
- })
58
- ),
59
- _react2.default.createElement(
60
- 'div',
61
- { style: { width: '500px' } },
62
- _react2.default.createElement(_components.PieChart, {
63
- width: 500,
64
- height: 500,
65
- data: {
66
- name: 'Archieve',
67
- total: 100,
68
- values: [{
69
- name: 'Archieved',
70
- value: 'archieved',
71
- data: 25,
72
- index: 1
73
- }, {
74
- name: 'InProcess',
75
- value: 'inprocess',
76
- data: 25,
77
- index: 2
78
- }, {
79
- name: 'Pending',
80
- value: 'pending',
81
- data: 25,
82
- index: 3
83
- }, {
84
- name: 'Failed',
85
- value: 'failed',
86
- data: 25,
87
- index: 4
88
- }]
89
- }
90
- })
91
- )
92
- )
93
- )
94
- );
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ var _react = _interopRequireDefault(require("react"));
5
+ var _react2 = require("@storybook/react");
6
+ var _storyHelpers = require("../../../_helpers/story-helpers");
7
+ var _components = require("../../../../components");
8
+ (0, _react2.storiesOf)('PieChart').add('light theme', function () {
9
+ return /*#__PURE__*/_react["default"].createElement(_storyHelpers.Example, {
10
+ title: "Appearances"
11
+ }, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("div", {
12
+ style: {
13
+ width: '500px'
14
+ }
15
+ }, /*#__PURE__*/_react["default"].createElement(_components.PieChart, {
16
+ width: 500,
17
+ height: 500,
18
+ data: {
19
+ name: 'Archieve',
20
+ total: 100,
21
+ values: [{
22
+ name: 'Archieved',
23
+ value: 'archieved',
24
+ data: 1,
25
+ index: 1
26
+ }, {
27
+ name: 'InProcess',
28
+ value: 'inprocess',
29
+ data: 1,
30
+ index: 2
31
+ }, {
32
+ name: 'Pending',
33
+ value: 'pending',
34
+ data: 95,
35
+ index: 3
36
+ }, {
37
+ name: 'Failed',
38
+ value: 'failed',
39
+ data: 3,
40
+ index: 4
41
+ }]
42
+ },
43
+ type: "donutThin"
44
+ })), /*#__PURE__*/_react["default"].createElement("div", {
45
+ style: {
46
+ width: '500px'
47
+ }
48
+ }, /*#__PURE__*/_react["default"].createElement(_components.PieChart, {
49
+ width: 500,
50
+ height: 500,
51
+ data: {
52
+ name: 'Archieve',
53
+ total: 100,
54
+ values: [{
55
+ name: 'Archieved',
56
+ value: 'archieved',
57
+ data: 25,
58
+ index: 1
59
+ }, {
60
+ name: 'InProcess',
61
+ value: 'inprocess',
62
+ data: 25,
63
+ index: 2
64
+ }, {
65
+ name: 'Pending',
66
+ value: 'pending',
67
+ data: 25,
68
+ index: 3
69
+ }, {
70
+ name: 'Failed',
71
+ value: 'failed',
72
+ data: 25,
73
+ index: 4
74
+ }]
75
+ }
76
+ })))));
95
77
  });
96
-
97
- (0, _react3.storiesOf)('PieChart').add('dark theme', function () {
98
- return _react2.default.createElement(
99
- _storyHelpers.Example,
100
- { title: 'Tag', background: 'dark' },
101
- _react2.default.createElement(
102
- 'div',
103
- null,
104
- _react2.default.createElement(
105
- 'div',
106
- null,
107
- _react2.default.createElement(
108
- 'div',
109
- { style: { width: '500px' } },
110
- _react2.default.createElement(_components.PieChart, {
111
- width: 500,
112
- height: 500,
113
- theme: 'dark',
114
- data: {
115
- name: 'Archieve',
116
- total: 100,
117
- values: [{
118
- name: 'Archieved',
119
- value: 'archieved',
120
- data: 1,
121
- index: 1
122
- }, {
123
- name: 'InProcess',
124
- value: 'inprocess',
125
- data: 1,
126
- index: 2
127
- }, {
128
- name: 'Pending',
129
- value: 'pending',
130
- data: 95,
131
- index: 3
132
- }, {
133
- name: 'Failed',
134
- value: 'failed',
135
- data: 3,
136
- index: 4
137
- }]
138
- },
139
- type: 'donutThin'
140
- })
141
- ),
142
- _react2.default.createElement(
143
- 'div',
144
- { style: { width: '500px' } },
145
- _react2.default.createElement(_components.PieChart, {
146
- theme: 'dark',
147
- width: 500,
148
- height: 500,
149
- data: {
150
- name: 'Archieve',
151
- total: 100,
152
- values: [{
153
- name: 'Archieved',
154
- value: 'archieved',
155
- data: 25,
156
- index: 1
157
- }, {
158
- name: 'InProcess',
159
- value: 'inprocess',
160
- data: 25,
161
- index: 2
162
- }, {
163
- name: 'Pending',
164
- value: 'pending',
165
- data: 25,
166
- index: 3
167
- }, {
168
- name: 'Failed',
169
- value: 'failed',
170
- data: 25,
171
- index: 4
172
- }]
173
- }
174
- })
175
- )
176
- )
177
- )
178
- );
78
+ (0, _react2.storiesOf)('PieChart').add('dark theme', function () {
79
+ return /*#__PURE__*/_react["default"].createElement(_storyHelpers.Example, {
80
+ title: "Tag",
81
+ background: "dark"
82
+ }, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("div", {
83
+ style: {
84
+ width: '500px'
85
+ }
86
+ }, /*#__PURE__*/_react["default"].createElement(_components.PieChart, {
87
+ width: 500,
88
+ height: 500,
89
+ theme: 'dark',
90
+ data: {
91
+ name: 'Archieve',
92
+ total: 100,
93
+ values: [{
94
+ name: 'Archieved',
95
+ value: 'archieved',
96
+ data: 1,
97
+ index: 1
98
+ }, {
99
+ name: 'InProcess',
100
+ value: 'inprocess',
101
+ data: 1,
102
+ index: 2
103
+ }, {
104
+ name: 'Pending',
105
+ value: 'pending',
106
+ data: 95,
107
+ index: 3
108
+ }, {
109
+ name: 'Failed',
110
+ value: 'failed',
111
+ data: 3,
112
+ index: 4
113
+ }]
114
+ },
115
+ type: "donutThin"
116
+ })), /*#__PURE__*/_react["default"].createElement("div", {
117
+ style: {
118
+ width: '500px'
119
+ }
120
+ }, /*#__PURE__*/_react["default"].createElement(_components.PieChart, {
121
+ theme: 'dark',
122
+ width: 500,
123
+ height: 500,
124
+ data: {
125
+ name: 'Archieve',
126
+ total: 100,
127
+ values: [{
128
+ name: 'Archieved',
129
+ value: 'archieved',
130
+ data: 25,
131
+ index: 1
132
+ }, {
133
+ name: 'InProcess',
134
+ value: 'inprocess',
135
+ data: 25,
136
+ index: 2
137
+ }, {
138
+ name: 'Pending',
139
+ value: 'pending',
140
+ data: 25,
141
+ index: 3
142
+ }, {
143
+ name: 'Failed',
144
+ value: 'failed',
145
+ data: 25,
146
+ index: 4
147
+ }]
148
+ }
149
+ })))));
179
150
  });
@@ -1,13 +1,9 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
-
7
- var _verticalBarGraph = require('./verticalBarGraph');
8
-
9
- var _verticalBarGraph2 = _interopRequireDefault(_verticalBarGraph);
10
-
11
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
-
13
- exports.default = _verticalBarGraph2.default;
7
+ exports["default"] = void 0;
8
+ var _verticalBarGraph = _interopRequireDefault(require("./verticalBarGraph"));
9
+ var _default = exports["default"] = _verticalBarGraph["default"];
@@ -1,109 +1,86 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ var _typeof = require("@babel/runtime/helpers/typeof");
3
5
  Object.defineProperty(exports, "__esModule", {
4
- value: true
6
+ value: true
5
7
  });
6
-
7
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
8
-
9
- var _templateObject = _taggedTemplateLiteral(['\n\n height : 200px;\n margin: 0px 12.5px;\n position:relative;\n\n &:hover {\n .info-area{\n opacity: 1;\n }\n }\n .info-area{\n position: absolute;\n opacity: 0;\n transition: all 0.4s ease;\n text-align: center;\n min-width: 40px;\n .main{\n font-size:20px;\n color: #fff;\n font-family: \'SFUIText-Regular\';\n text-align: center;\n }\n .sub{\n font-size:10px;\n color: #AFB2BA;\n font-family: \'SFUIText-Regular\';\n width: max-content;\n min-width: 40px;\n }\n }\n\n .bar-box{\n height: 100%;\n width: 40px;\n border-radius: 20px;\n background: #121D29;\n position:relative;\n overflow: hidden;\n\n .bar{\n position: absolute;\n height: 0%; // 100%;\n width: 40px;\n border-radius: 20px;\n background: ', ';\n bottom: 0; //-100%;\n transition: all 2s ease;\n }\n }\n\n \n\n .move-up {\n animation-duration: 2s;\n animation-iteration-count: 1;\n animation-name: move-up;\n animation-timing-function: ease;\n animation-fill-mode: forwards;\n }\n @keyframes move-up {\n 0% { }\n 100% { bottom: ', '%; }\n }\n\n\n'], ['\n\n height : 200px;\n margin: 0px 12.5px;\n position:relative;\n\n &:hover {\n .info-area{\n opacity: 1;\n }\n }\n .info-area{\n position: absolute;\n opacity: 0;\n transition: all 0.4s ease;\n text-align: center;\n min-width: 40px;\n .main{\n font-size:20px;\n color: #fff;\n font-family: \'SFUIText-Regular\';\n text-align: center;\n }\n .sub{\n font-size:10px;\n color: #AFB2BA;\n font-family: \'SFUIText-Regular\';\n width: max-content;\n min-width: 40px;\n }\n }\n\n .bar-box{\n height: 100%;\n width: 40px;\n border-radius: 20px;\n background: #121D29;\n position:relative;\n overflow: hidden;\n\n .bar{\n position: absolute;\n height: 0%; // 100%;\n width: 40px;\n border-radius: 20px;\n background: ', ';\n bottom: 0; //-100%;\n transition: all 2s ease;\n }\n }\n\n \n\n .move-up {\n animation-duration: 2s;\n animation-iteration-count: 1;\n animation-name: move-up;\n animation-timing-function: ease;\n animation-fill-mode: forwards;\n }\n @keyframes move-up {\n 0% { }\n 100% { bottom: ', '%; }\n }\n\n\n']);
10
-
11
- var _react = require('react');
12
-
13
- var _react2 = _interopRequireDefault(_react);
14
-
15
- var _propTypes = require('prop-types');
16
-
17
- var _propTypes2 = _interopRequireDefault(_propTypes);
18
-
19
- var _styledComponents = require('styled-components');
20
-
21
- var _styledComponents2 = _interopRequireDefault(_styledComponents);
22
-
23
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
24
-
25
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
26
-
27
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
28
-
29
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
30
-
31
- function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
32
-
8
+ exports["default"] = void 0;
9
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
11
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
12
+ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
13
+ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
14
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
15
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
16
+ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
17
+ var _react = _interopRequireWildcard(require("react"));
18
+ var _propTypes = _interopRequireDefault(require("prop-types"));
19
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
20
+ var _templateObject;
21
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
22
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
23
+ function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
24
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
33
25
  var propTypes = {};
34
-
35
- var StyledVerticalBarGraph = _styledComponents2.default.div(_templateObject, function (props) {
36
- return 'linear-gradient(0deg,' + props.graphColors[0] + ' 0%,' + props.graphColors[1] + ' 100%)';
26
+ var StyledVerticalBarGraph = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n\n height : 200px;\n margin: 0px 12.5px;\n position:relative;\n\n &:hover {\n .info-area{\n opacity: 1;\n }\n }\n .info-area{\n position: absolute;\n opacity: 0;\n transition: all 0.4s ease;\n text-align: center;\n min-width: 40px;\n .main{\n font-size:20px;\n color: #fff;\n font-family: 'SFUIText-Regular';\n text-align: center;\n }\n .sub{\n font-size:10px;\n color: #AFB2BA;\n font-family: 'SFUIText-Regular';\n width: max-content;\n min-width: 40px;\n }\n }\n\n .bar-box{\n height: 100%;\n width: 40px;\n border-radius: 20px;\n background: #121D29;\n position:relative;\n overflow: hidden;\n\n .bar{\n position: absolute;\n height: 0%; // 100%;\n width: 40px;\n border-radius: 20px;\n background: ", ";\n bottom: 0; //-100%;\n transition: all 2s ease;\n }\n }\n\n \n\n .move-up {\n animation-duration: 2s;\n animation-iteration-count: 1;\n animation-name: move-up;\n animation-timing-function: ease;\n animation-fill-mode: forwards;\n }\n @keyframes move-up {\n 0% { }\n 100% { bottom: ", "%; }\n }\n\n\n"])), function (props) {
27
+ return 'linear-gradient(0deg,' + props.graphColors[0] + ' 0%,' + props.graphColors[1] + ' 100%)';
37
28
  }, function (props) {
38
- return props.value - 100;
29
+ return props.value - 100;
39
30
  });
40
-
41
- var VerticalBarGraph = function (_Component) {
42
- _inherits(VerticalBarGraph, _Component);
43
-
44
- function VerticalBarGraph(props) {
45
- _classCallCheck(this, VerticalBarGraph);
46
-
47
- var _this = _possibleConstructorReturn(this, (VerticalBarGraph.__proto__ || Object.getPrototypeOf(VerticalBarGraph)).call(this, props));
48
-
49
- _this.componentDidMount = function () {
50
- setTimeout(function () {
51
- _this.setState({
52
- animate: true
53
- });
54
- }, 1000);
55
- };
56
-
57
- _this.render = function () {
58
-
59
- return _react2.default.createElement(
60
- StyledVerticalBarGraph,
61
- _extends({}, _this.props, { className: 'vertical-bar' }),
62
- _react2.default.createElement(
63
- 'div',
64
- { className: 'bar-box' },
65
- _react2.default.createElement('div', { className: 'bar'
66
- //style={{bottom: this.state.animate? (this.props.value-100) +'%': '-100%'}}
67
- , style: { height: _this.state.animate ? _this.props.value + '%' : '0%' }
68
- })
69
- ),
70
- _react2.default.createElement(
71
- 'div',
72
- { className: 'info-area', style: { top: 82 - _this.props.value + '%' } },
73
- _react2.default.createElement(
74
- 'div',
75
- { className: 'main', style: {
76
- color: _this.props.graphColors[0]
77
- } },
78
- _this.props.valueMain
79
- ),
80
- _react2.default.createElement(
81
- 'div',
82
- { className: 'sub' },
83
- _this.props.valueSub
84
- )
85
- )
86
- );
87
- };
88
-
89
- _this.state = {};
90
- return _this;
91
- }
92
-
93
- return VerticalBarGraph;
31
+ var VerticalBarGraph = /*#__PURE__*/function (_Component) {
32
+ function VerticalBarGraph(props) {
33
+ var _this;
34
+ (0, _classCallCheck2["default"])(this, VerticalBarGraph);
35
+ _this = _callSuper(this, VerticalBarGraph, [props]);
36
+ (0, _defineProperty2["default"])(_this, "componentDidMount", function () {
37
+ setTimeout(function () {
38
+ _this.setState({
39
+ animate: true
40
+ });
41
+ }, 1000);
42
+ });
43
+ (0, _defineProperty2["default"])(_this, "render", function () {
44
+ return /*#__PURE__*/_react["default"].createElement(StyledVerticalBarGraph, (0, _extends2["default"])({}, _this.props, {
45
+ className: "vertical-bar"
46
+ }), /*#__PURE__*/_react["default"].createElement("div", {
47
+ className: "bar-box"
48
+ }, /*#__PURE__*/_react["default"].createElement("div", {
49
+ className: "bar"
50
+ //style={{bottom: this.state.animate? (this.props.value-100) +'%': '-100%'}}
51
+ ,
52
+ style: {
53
+ height: _this.state.animate ? _this.props.value + '%' : '0%'
54
+ }
55
+ })), /*#__PURE__*/_react["default"].createElement("div", {
56
+ className: "info-area",
57
+ style: {
58
+ top: 82 - _this.props.value + '%'
59
+ }
60
+ }, /*#__PURE__*/_react["default"].createElement("div", {
61
+ className: "main",
62
+ style: {
63
+ color: _this.props.graphColors[0]
64
+ }
65
+ }, _this.props.valueMain), /*#__PURE__*/_react["default"].createElement("div", {
66
+ className: "sub"
67
+ }, _this.props.valueSub)));
68
+ });
69
+ _this.state = {};
70
+ return _this;
71
+ }
72
+ (0, _inherits2["default"])(VerticalBarGraph, _Component);
73
+ return (0, _createClass2["default"])(VerticalBarGraph);
94
74
  }(_react.Component);
95
-
96
75
  VerticalBarGraph.propTypes = {
97
- value: _propTypes2.default.number.isRequired,
98
- theme: _propTypes2.default.oneOf(['light', 'dark']),
99
- graphColors: _propTypes2.default.array,
100
- valueMain: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.number]),
101
- valueSub: _propTypes2.default.string
76
+ value: _propTypes["default"].number.isRequired,
77
+ theme: _propTypes["default"].oneOf(['light', 'dark']),
78
+ graphColors: _propTypes["default"].array,
79
+ valueMain: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].number]),
80
+ valueSub: _propTypes["default"].string
102
81
  };
103
-
104
82
  VerticalBarGraph.defaultProps = {
105
- theme: 'light',
106
- graphColors: ['#FFF', '#FFF']
83
+ theme: 'light',
84
+ graphColors: ['#FFF', '#FFF']
107
85
  };
108
-
109
- exports.default = VerticalBarGraph;
86
+ var _default = exports["default"] = VerticalBarGraph;
@@ -1,47 +1,28 @@
1
- 'use strict';
2
-
3
- var _react = require('react');
4
-
5
- var _react2 = _interopRequireDefault(_react);
6
-
7
- var _react3 = require('@storybook/react');
8
-
9
- var _storyHelpers = require('../../../_helpers/story-helpers');
10
-
11
- var _components = require('../../../../components');
12
-
13
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
-
15
- (0, _react3.storiesOf)('VerticalBarGraph').add('light theme', function () {
16
- return _react2.default.createElement(
17
- _storyHelpers.Example,
18
- { title: 'Appearances' },
19
- _react2.default.createElement(
20
- _storyHelpers.Stack,
21
- null,
22
- _react2.default.createElement(_components.VerticalBarGraph, {
23
- value: 60,
24
- graphColors: ['#00C8E7', '#00E6B9'],
25
- valueMain: 60,
26
- valueSub: 'Assets'
27
- })
28
- )
29
- );
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ var _react = _interopRequireDefault(require("react"));
5
+ var _react2 = require("@storybook/react");
6
+ var _storyHelpers = require("../../../_helpers/story-helpers");
7
+ var _components = require("../../../../components");
8
+ (0, _react2.storiesOf)('VerticalBarGraph').add('light theme', function () {
9
+ return /*#__PURE__*/_react["default"].createElement(_storyHelpers.Example, {
10
+ title: "Appearances"
11
+ }, /*#__PURE__*/_react["default"].createElement(_storyHelpers.Stack, null, /*#__PURE__*/_react["default"].createElement(_components.VerticalBarGraph, {
12
+ value: 60,
13
+ graphColors: ['#00C8E7', '#00E6B9'],
14
+ valueMain: 60,
15
+ valueSub: 'Assets'
16
+ })));
30
17
  });
31
-
32
- (0, _react3.storiesOf)('VerticalBarGraph').add('dark theme', function () {
33
- return _react2.default.createElement(
34
- _storyHelpers.Example,
35
- { title: 'Tag', background: 'dark' },
36
- _react2.default.createElement(
37
- _storyHelpers.Stack,
38
- null,
39
- _react2.default.createElement(_components.VerticalBarGraph, {
40
- value: 60,
41
- graphColors: ['#00C8E7', '#00E6B9'],
42
- valueMain: '60%',
43
- valueSub: 'Assets'
44
- })
45
- )
46
- );
18
+ (0, _react2.storiesOf)('VerticalBarGraph').add('dark theme', function () {
19
+ return /*#__PURE__*/_react["default"].createElement(_storyHelpers.Example, {
20
+ title: "Tag",
21
+ background: "dark"
22
+ }, /*#__PURE__*/_react["default"].createElement(_storyHelpers.Stack, null, /*#__PURE__*/_react["default"].createElement(_components.VerticalBarGraph, {
23
+ value: 60,
24
+ graphColors: ['#00C8E7', '#00E6B9'],
25
+ valueMain: '60%',
26
+ valueSub: 'Assets'
27
+ })));
47
28
  });