@stokr/components-library 2.3.65-beta.10 → 2.3.65-beta.11

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 (198) hide show
  1. package/dist/components/Chips/Chip.styles.js +3 -2
  2. package/package.json +3 -2
  3. package/dist/components/2FA/EnterCode.stories.js +0 -35
  4. package/dist/components/2FA/disable-2fa-flow.stories.js +0 -31
  5. package/dist/components/2FA/enable-2fa-flow.stories.js +0 -31
  6. package/dist/components/2FA/login-with-otp-flow.stories.js +0 -31
  7. package/dist/components/2FA/main-flow.stories.js +0 -162
  8. package/dist/components/AccountBalance/AccountBalance.stories.js +0 -83
  9. package/dist/components/AdminDashboard/Table/ReactTable.stories.js +0 -913
  10. package/dist/components/AgreementItem/AgreementItem.stories.js +0 -105
  11. package/dist/components/AnalyticGraphs/Analytic.js +0 -541
  12. package/dist/components/AnalyticGraphs/Analytic.styles.js +0 -25
  13. package/dist/components/BackButton/BackButton.stories.js +0 -32
  14. package/dist/components/Background/Background.stories.js +0 -75
  15. package/dist/components/BarChart/BarChart.js +0 -263
  16. package/dist/components/BarChart/BarChart.stories.js +0 -66
  17. package/dist/components/BarChart/BarChart.styles.js +0 -26
  18. package/dist/components/BarChartLegend/BarChartLegend.js +0 -79
  19. package/dist/components/BarChartLegend/BarChartLegend.styles.js +0 -21
  20. package/dist/components/BasicTable/BasicTable.stories.js +0 -59
  21. package/dist/components/BlogPost/BlogPost.stories.js +0 -160
  22. package/dist/components/Button/Button.stories.js +0 -146
  23. package/dist/components/Button/GlareButton.stories.js +0 -132
  24. package/dist/components/CapitalRaisedSummary/CapitalRaisedSummery.stories.js +0 -42
  25. package/dist/components/ChartBox/ChartBox.js +0 -41
  26. package/dist/components/ChartBox/ChartBox.stories.js +0 -17
  27. package/dist/components/ChartBox/ChartBox.styles.js +0 -27
  28. package/dist/components/ChartBox/ChartBoxDistribution.js +0 -27
  29. package/dist/components/ChartBox/ChartBoxDistribution.stories.js +0 -18
  30. package/dist/components/ChartLegend/ChartLegend.stories.js +0 -90
  31. package/dist/components/Checkbox/Checkbox.stories.js +0 -88
  32. package/dist/components/Checklist/ChecklistCard.stories.js +0 -102
  33. package/dist/components/Checklist/UserChecklist.js +0 -184
  34. package/dist/components/Checklist/UserChecklist.stories.js +0 -317
  35. package/dist/components/Chips/Chip.stories.js +0 -36
  36. package/dist/components/Chips/ChipsWrapper.stories.js +0 -47
  37. package/dist/components/ComponentScroll/ComponentScroll.stories.js +0 -111
  38. package/dist/components/CryptoAddress/CryptoAddress.stories.js +0 -205
  39. package/dist/components/CryptoAddressDetails/CryptoAddressDetails.stories.js +0 -70
  40. package/dist/components/DonutChart/DonutChart.stories.js +0 -54
  41. package/dist/components/FAQ/FAQ.stories.js +0 -76
  42. package/dist/components/Footer/Footer.stories.js +0 -49
  43. package/dist/components/Footer/FooterLayout.stories.js +0 -26
  44. package/dist/components/Footer/FooterMenu.stories.js +0 -113
  45. package/dist/components/Footer/mangopay.png +0 -0
  46. package/dist/components/Footer/mangopay.svg +0 -20
  47. package/dist/components/ForgotPasswordModal/ForgotPasswordModal.stories.js +0 -69
  48. package/dist/components/Form/Form.stories.js +0 -32
  49. package/dist/components/FullscreenCard/FullscreenCard.styles.js +0 -27
  50. package/dist/components/Header/Header.stories.js +0 -192
  51. package/dist/components/Icon/Icon.stories.js +0 -108
  52. package/dist/components/InfoIcon/InfoIcon.stories.js +0 -299
  53. package/dist/components/InfoPanel/InfoPanel.js +0 -124
  54. package/dist/components/Input/DatePickerInput.stories.js +0 -87
  55. package/dist/components/Input/Input.stories.js +0 -217
  56. package/dist/components/Input/InputPassword.stories.js +0 -80
  57. package/dist/components/Input/InputWithButton.stories.js +0 -75
  58. package/dist/components/Input/MultiSelect.stories.js +0 -264
  59. package/dist/components/Input/OtpInput.stories.js +0 -57
  60. package/dist/components/Input/RangeInput.stories.js +0 -58
  61. package/dist/components/Input/SearchInput.stories.js +0 -366
  62. package/dist/components/Input/Select.stories.js +0 -478
  63. package/dist/components/InvestCalculator/InvestCalculator.stories.js +0 -135
  64. package/dist/components/InvestmentStat/InvestmentStat.stories.js +0 -52
  65. package/dist/components/KYCFlow/BasicInfo.js +0 -448
  66. package/dist/components/KYCFlow/Confirmation.js +0 -46
  67. package/dist/components/KYCFlow/DocumentFileUpload.js +0 -263
  68. package/dist/components/KYCFlow/DocumentScan.js +0 -75
  69. package/dist/components/KYCFlow/DocumentScanUpload.js +0 -251
  70. package/dist/components/KYCFlow/DocumentSelect.js +0 -118
  71. package/dist/components/KYCFlow/DocumentSuccess.js +0 -63
  72. package/dist/components/KYCFlow/DocumentUpload.js +0 -53
  73. package/dist/components/KYCFlow/DocumentVerificationType.js +0 -131
  74. package/dist/components/KYCFlow/FaceScan.js +0 -54
  75. package/dist/components/KYCFlow/FaceScanRecognition.js +0 -61
  76. package/dist/components/KYCFlow/FaceScanSuccess.js +0 -56
  77. package/dist/components/KYCFlow/Terms.js +0 -119
  78. package/dist/components/KYCFlow/_styles.js +0 -111
  79. package/dist/components/KYCFlow/index.js +0 -97
  80. package/dist/components/KYCSelectBox/KYCSelectBox.styles.js +0 -29
  81. package/dist/components/LatestUpdate/LatestUpdate.stories.js +0 -58
  82. package/dist/components/Layout/Layout.stories.js +0 -60
  83. package/dist/components/LearnMoreCarousel/LearnMoreCarousel.stories.js +0 -66
  84. package/dist/components/LearnMorePage/LearnMore.stories.js +0 -48
  85. package/dist/components/LearnMorePage/LearnMoreItem.stories.js +0 -62
  86. package/dist/components/LearnMoreSection/LearnMore.stories.js +0 -30
  87. package/dist/components/LearnMoreSection/LearnMoreItem.stories.js +0 -59
  88. package/dist/components/LoginModal/LoginModal.stories.js +0 -74
  89. package/dist/components/MatomoConnect/Matomo.js +0 -228
  90. package/dist/components/MatomoConnect/Matomo_fuckup.js +0 -387
  91. package/dist/components/Modal/Modal.stories.js +0 -75
  92. package/dist/components/Modal/NewVentureModal/NewVentureModal.stories.js +0 -150
  93. package/dist/components/Modal/PaymentModal.stories.js +0 -57
  94. package/dist/components/Modal/SideModal.stories.js +0 -342
  95. package/dist/components/MultiProgressBar/MultiProgressBar.stories.js +0 -67
  96. package/dist/components/Newsletter/Newsletter.stories.js +0 -16
  97. package/dist/components/NotificationContext/NotificationContext.js +0 -141
  98. package/dist/components/Number/Number.stories.js +0 -92
  99. package/dist/components/Pagination/Pagination.stories.js +0 -83
  100. package/dist/components/Pagination/PaginationControls.stories.js +0 -112
  101. package/dist/components/Payment/PaymentDetailsCard.stories.js +0 -198
  102. package/dist/components/Payment/PaymentDisplay.stories.js +0 -302
  103. package/dist/components/Payment/TimerComponent.stories.js +0 -236
  104. package/dist/components/Process/Process.stories.js +0 -42
  105. package/dist/components/ProfileBadge/ProfileBadge.stories.js +0 -45
  106. package/dist/components/ProfileBox/ProfileBox.stories.js +0 -35
  107. package/dist/components/ProfileHeader/ProfileHeader.js +0 -252
  108. package/dist/components/ProfileHeader/ProfileHeader.styles.js +0 -65
  109. package/dist/components/ProfileStat/ProfileStat.stories.js +0 -66
  110. package/dist/components/ProofOfAddress/ProofOfAddress.styles.js +0 -53
  111. package/dist/components/QRCode/QRCode.stories.js +0 -104
  112. package/dist/components/Radio/Radio.stories.js +0 -73
  113. package/dist/components/RefreshButton/RefreshButton.stories.js +0 -38
  114. package/dist/components/RegisterAlgorand/AlgoAddressName.js +0 -138
  115. package/dist/components/RegisterAlgorand/AlgoAdressSelect.js +0 -443
  116. package/dist/components/RegisterAlgorand/AlgoConnectWallet.js +0 -47
  117. package/dist/components/RegisterAlgorand/AlgoSuccess.js +0 -38
  118. package/dist/components/RegisterAlgorand/Algorand.stories.js +0 -80
  119. package/dist/components/RegisterAlgorand/ChooseWallet.js +0 -97
  120. package/dist/components/RegisterAlgorand/SelectProject.js +0 -89
  121. package/dist/components/RegisterAlgorand/_styles.js +0 -28
  122. package/dist/components/RegisterAlgorand/flow.js +0 -409
  123. package/dist/components/RegisterAlgorand/flowWithMemo.js +0 -410
  124. package/dist/components/RegisterAlgorand/index.js +0 -48
  125. package/dist/components/RegisterConfirmModal/RegisterConfirmModal.stories.js +0 -41
  126. package/dist/components/RegisterEthereum/EthAddressLedger.js +0 -226
  127. package/dist/components/RegisterEthereum/EthAddressMetamask.js +0 -204
  128. package/dist/components/RegisterEthereum/EthAddressName.js +0 -135
  129. package/dist/components/RegisterEthereum/EthConnectLedger.js +0 -194
  130. package/dist/components/RegisterEthereum/EthConnectMetamask.js +0 -35
  131. package/dist/components/RegisterEthereum/EthFinish.js +0 -41
  132. package/dist/components/RegisterEthereum/EthIntro.js +0 -95
  133. package/dist/components/RegisterEthereum/_styles.js +0 -28
  134. package/dist/components/RegisterEthereum/index.js +0 -68
  135. package/dist/components/RegisterModal/RegisterModal.stories.js +0 -49
  136. package/dist/components/RequestDataBox/RequestDataBox.stories.js +0 -37
  137. package/dist/components/RiskQuestionnaire/RiskQuestionnaireContext.js +0 -185
  138. package/dist/components/RiskQuestionnaire/_styles.js +0 -15
  139. package/dist/components/SEO/SEO.stories.js +0 -60
  140. package/dist/components/SideLine/SideLine.stories.js +0 -28
  141. package/dist/components/SigningSubflow/SignSubAddressMetamask.js +0 -137
  142. package/dist/components/SigningSubflow/SignSubConnectLedger.js +0 -150
  143. package/dist/components/SigningSubflow/SignSubConnectMetamask.js +0 -137
  144. package/dist/components/SigningSubflow/SignSubIntro.js +0 -55
  145. package/dist/components/SigningSubflow/SignSubSendLedger.js +0 -150
  146. package/dist/components/SigningSubflow/SignSubSendMetamask.js +0 -62
  147. package/dist/components/SigningSubflow/SignSubTransactionLedger.js +0 -161
  148. package/dist/components/SigningSubflow/SignSubTransactionMetamask.js +0 -166
  149. package/dist/components/SigningSubflow/_styles.js +0 -34
  150. package/dist/components/SigningSubflow/index.js +0 -32
  151. package/dist/components/Slider/Slider.stories.js +0 -68
  152. package/dist/components/Snackbar/Snackbar.stories.js +0 -292
  153. package/dist/components/StatusTag/StatusTag.stories.js +0 -262
  154. package/dist/components/StepController/StepController.stories.js +0 -60
  155. package/dist/components/StepController/StepControllerProgress.stories.js +0 -49
  156. package/dist/components/StepsProgress/StepIndicator.stories.js +0 -153
  157. package/dist/components/StepsProgress/StepsProgress.stories.js +0 -49
  158. package/dist/components/Switch/Switch.stories.js +0 -81
  159. package/dist/components/Tabs/Tabs.stories.js +0 -36
  160. package/dist/components/TabsNav/TabNav.stories.js +0 -40
  161. package/dist/components/TabsNav/TabsNav.stories.js +0 -37
  162. package/dist/components/TeamOverview/TeamOverview.stories.js +0 -76
  163. package/dist/components/TermsModal/TermsModal.stories.js +0 -31
  164. package/dist/components/Text/Headline.stories.js +0 -48
  165. package/dist/components/Text/Text.stories.js +0 -70
  166. package/dist/components/TextLink/TextLink.stories.js +0 -35
  167. package/dist/components/Timeline/Timeline.stories.js +0 -393
  168. package/dist/components/ToDoList/ToDoList.stories.js +0 -133
  169. package/dist/components/ToDoList/ToDoListTask.stories.js +0 -70
  170. package/dist/components/TransactionDetails/TransactionDetails.stories.js +0 -55
  171. package/dist/components/TransactionDetails/TransactionDetailsTable.stories.js +0 -305
  172. package/dist/components/TransactionInfo/TransactionInfo.stories.js +0 -61
  173. package/dist/components/TwoFactorModal/TwoFactorModal.js +0 -100
  174. package/dist/components/VerifyEmailModal/VerifyEmailModal.stories.js +0 -59
  175. package/dist/components/headerHo/HeaderHo.stories.js +0 -35
  176. package/dist/components/icons/Arrow.stories.js +0 -42
  177. package/dist/components/icons/ArrowSimple.stories.js +0 -48
  178. package/dist/components/icons/Check.stories.js +0 -22
  179. package/dist/components/icons/Facebook.stories.js +0 -21
  180. package/dist/components/icons/Facebook_Logo.png +0 -0
  181. package/dist/components/icons/Info.stories.js +0 -16
  182. package/dist/components/icons/Instagram.stories.js +0 -21
  183. package/dist/components/icons/LI-In-Bug.png +0 -0
  184. package/dist/components/icons/LinkIcon.stories.js +0 -21
  185. package/dist/components/icons/LinkedIn.stories.js +0 -16
  186. package/dist/components/icons/Medium.stories.js +0 -16
  187. package/dist/components/icons/Reddit.stories.js +0 -21
  188. package/dist/components/icons/Share.stories.js +0 -16
  189. package/dist/components/icons/Telegram-Logo.png +0 -0
  190. package/dist/components/icons/Telegram.stories.js +0 -16
  191. package/dist/components/icons/Twitter.stories.js +0 -21
  192. package/dist/components/icons/X-logo-black.png +0 -0
  193. package/dist/components/icons/X.stories.js +0 -16
  194. package/dist/components/icons/Youtube.stories.js +0 -21
  195. package/dist/components/icons/youtube_social_circle_red.png +0 -0
  196. package/dist/components/logo/Logo.stories.js +0 -260
  197. package/dist/components/taxId/TaxId.stories.js +0 -50
  198. package/dist/components/video/Video.stories.js +0 -52
@@ -1,478 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = exports.SelectOptionStrings = exports.SelectOptionNodes = exports.SelectEmpty = exports.Searchable = exports.NotSearchable = exports.CreatableCustomLabel = exports.Creatable = exports.AllStates = void 0;
7
- var _react = _interopRequireWildcard(require("react"));
8
- var _Select = require("./Select");
9
- var _ComponentWrapper = require("../ComponentWrapper/ComponentWrapper.styles");
10
- var _Medium = require("../icons/Medium");
11
- var _Share = require("../icons/Share");
12
- var _Number = require("../Number/Number");
13
- var _global = _interopRequireDefault(require("../../styles/global"));
14
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
16
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
17
- var _default = exports.default = {
18
- title: 'Components Library/Inputs/Select',
19
- component: _Select.Select,
20
- decorators: [Story => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_global.default, null), /*#__PURE__*/_react.default.createElement(_ComponentWrapper.ComponentWrapper, null, /*#__PURE__*/_react.default.createElement(Story, null)))],
21
- argTypes: {
22
- id: {
23
- type: 'string',
24
- required: true
25
- },
26
- name: {
27
- type: 'string',
28
- required: true
29
- },
30
- label: {
31
- type: 'string',
32
- defaultValue: ''
33
- },
34
- error: {
35
- type: 'boolean',
36
- defaultValue: false
37
- },
38
- touched: {
39
- type: 'boolean',
40
- defaultValue: false
41
- },
42
- value: {
43
- type: 'string',
44
- defaultValue: ''
45
- },
46
- disabled: {
47
- type: 'boolean',
48
- defaultValue: false
49
- },
50
- options: {
51
- control: {
52
- type: 'object'
53
- },
54
- defaultValue: [{
55
- key: 'default option key',
56
- value: 'default option value',
57
- label: 'default option label, (string or node)'
58
- }],
59
- required: true
60
- },
61
- search: {
62
- type: 'boolean',
63
- defaultValue: false
64
- },
65
- checkLabel: {
66
- type: 'function'
67
- },
68
- onChange: {
69
- action: 'change',
70
- type: 'function'
71
- },
72
- onBlur: {
73
- action: 'blur',
74
- type: 'function'
75
- },
76
- onFocus: {
77
- action: 'hasFocus',
78
- type: 'function'
79
- },
80
- setTimeout: {
81
- type: 'function'
82
- }
83
- }
84
- }; // Controlled wrapper for interactive stories
85
- const ControlledSelect = props => {
86
- const [value, setValue] = (0, _react.useState)(props.value || '');
87
- return /*#__PURE__*/_react.default.createElement(_Select.Select, _extends({}, props, {
88
- value: value,
89
- onChange: _ref => {
90
- let {
91
- value: newValue
92
- } = _ref;
93
- setValue(newValue);
94
- console.log('Selected:', newValue);
95
- }
96
- }));
97
- };
98
- const Template = args => /*#__PURE__*/_react.default.createElement(ControlledSelect, args);
99
- const SelectOptionStrings = exports.SelectOptionStrings = Template.bind({});
100
- SelectOptionStrings.args = {
101
- label: 'click LABEL here for options',
102
- value: null,
103
- search: true,
104
- //menuHeight: 100,
105
- options: [{
106
- key: 'other option key',
107
- value: 'other option value',
108
- label: 'dropdown option label string 1'
109
- }, {
110
- key: 'other option key',
111
- value: 'other option value',
112
- label: 'dropdown option label string 2'
113
- }, {
114
- key: 'other option key',
115
- value: 'other option value',
116
- label: 'dropdown option label string 3'
117
- }, {
118
- key: 'other option key',
119
- value: 'other option value',
120
- label: 'dropdown option label string 4'
121
- }]
122
- };
123
- const SelectOptionNodes = exports.SelectOptionNodes = Template.bind({});
124
- SelectOptionNodes.args = {
125
- label: 'click LABEL here for options',
126
- value: 'your text (value)',
127
- options: [{
128
- key: 'other option key',
129
- value: 'other option value',
130
- label: 'dropdown option label 1'
131
- }, {
132
- key: 'other option key',
133
- value: 'other option value',
134
- label: 'dropdown option label 2'
135
- }, {
136
- key: 'other option key',
137
- value: 'other option value',
138
- label: /*#__PURE__*/_react.default.createElement(_Share.Share, null)
139
- }, {
140
- key: 'other option key',
141
- value: 'other option value',
142
- label: /*#__PURE__*/_react.default.createElement(_Medium.Medium, null)
143
- }, {
144
- key: 'other option key',
145
- value: 'other option value',
146
- label: /*#__PURE__*/_react.default.createElement(_Number.Number, null)
147
- }]
148
- };
149
- const SelectEmpty = exports.SelectEmpty = Template.bind({});
150
- SelectEmpty.args = {};
151
-
152
- // Searchable Select - type to filter options
153
- const Searchable = () => {
154
- const [value, setValue] = (0, _react.useState)('');
155
- const countryOptions = [{
156
- key: 'us',
157
- value: 'us',
158
- label: 'United States'
159
- }, {
160
- key: 'uk',
161
- value: 'uk',
162
- label: 'United Kingdom'
163
- }, {
164
- key: 'de',
165
- value: 'de',
166
- label: 'Germany'
167
- }, {
168
- key: 'fr',
169
- value: 'fr',
170
- label: 'France'
171
- }, {
172
- key: 'es',
173
- value: 'es',
174
- label: 'Spain'
175
- }, {
176
- key: 'it',
177
- value: 'it',
178
- label: 'Italy'
179
- }, {
180
- key: 'nl',
181
- value: 'nl',
182
- label: 'Netherlands'
183
- }, {
184
- key: 'ch',
185
- value: 'ch',
186
- label: 'Switzerland'
187
- }, {
188
- key: 'at',
189
- value: 'at',
190
- label: 'Austria'
191
- }, {
192
- key: 'be',
193
- value: 'be',
194
- label: 'Belgium'
195
- }];
196
- return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("h4", {
197
- style: {
198
- marginBottom: '16px',
199
- fontSize: '14px'
200
- }
201
- }, "Type to filter options (try typing \"United\" or \"Ger\")"), /*#__PURE__*/_react.default.createElement(_Select.Select, {
202
- id: "country",
203
- name: "country",
204
- label: "Select Country",
205
- options: countryOptions,
206
- value: value,
207
- search: true,
208
- onChange: _ref2 => {
209
- let {
210
- value: newValue
211
- } = _ref2;
212
- return setValue(newValue);
213
- }
214
- }), /*#__PURE__*/_react.default.createElement("p", {
215
- style: {
216
- marginTop: '12px',
217
- fontSize: '12px',
218
- color: '#666'
219
- }
220
- }, "Selected: ", /*#__PURE__*/_react.default.createElement("strong", null, value || '(none)')));
221
- };
222
-
223
- // Not Searchable (default)
224
- exports.Searchable = Searchable;
225
- const NotSearchable = () => {
226
- const [value, setValue] = (0, _react.useState)('');
227
- const options = [{
228
- key: 'opt1',
229
- value: 'option1',
230
- label: 'Option 1'
231
- }, {
232
- key: 'opt2',
233
- value: 'option2',
234
- label: 'Option 2'
235
- }, {
236
- key: 'opt3',
237
- value: 'option3',
238
- label: 'Option 3'
239
- }];
240
- return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("h4", {
241
- style: {
242
- marginBottom: '16px',
243
- fontSize: '14px'
244
- }
245
- }, "Click to open, no typing (search=false)"), /*#__PURE__*/_react.default.createElement(_Select.Select, {
246
- id: "basic",
247
- name: "basic",
248
- label: "Select Option",
249
- options: options,
250
- value: value,
251
- search: false,
252
- onChange: _ref3 => {
253
- let {
254
- value: newValue
255
- } = _ref3;
256
- return setValue(newValue);
257
- }
258
- }), /*#__PURE__*/_react.default.createElement("p", {
259
- style: {
260
- marginTop: '12px',
261
- fontSize: '12px',
262
- color: '#666'
263
- }
264
- }, "Selected: ", /*#__PURE__*/_react.default.createElement("strong", null, value || '(none)')));
265
- };
266
-
267
- // All States
268
- exports.NotSearchable = NotSearchable;
269
- const AllStates = () => {
270
- const [value1, setValue1] = (0, _react.useState)('');
271
- const [value2, setValue2] = (0, _react.useState)('de');
272
- const [value3, setValue3] = (0, _react.useState)('');
273
- const options = [{
274
- key: 'us',
275
- value: 'us',
276
- label: 'United States'
277
- }, {
278
- key: 'uk',
279
- value: 'uk',
280
- label: 'United Kingdom'
281
- }, {
282
- key: 'de',
283
- value: 'de',
284
- label: 'Germany'
285
- }, {
286
- key: 'fr',
287
- value: 'fr',
288
- label: 'France'
289
- }];
290
- return /*#__PURE__*/_react.default.createElement("div", {
291
- style: {
292
- display: 'flex',
293
- flexDirection: 'column',
294
- gap: '32px'
295
- }
296
- }, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("h4", {
297
- style: {
298
- marginBottom: '8px',
299
- fontSize: '12px',
300
- color: '#666'
301
- }
302
- }, "Empty with search"), /*#__PURE__*/_react.default.createElement(_Select.Select, {
303
- id: "empty",
304
- name: "empty",
305
- label: "Country",
306
- options: options,
307
- value: value1,
308
- search: true,
309
- onChange: _ref4 => {
310
- let {
311
- value
312
- } = _ref4;
313
- return setValue1(value);
314
- }
315
- })), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("h4", {
316
- style: {
317
- marginBottom: '8px',
318
- fontSize: '12px',
319
- color: '#666'
320
- }
321
- }, "Pre-selected value"), /*#__PURE__*/_react.default.createElement(_Select.Select, {
322
- id: "preselected",
323
- name: "preselected",
324
- label: "Country",
325
- options: options,
326
- value: value2,
327
- search: true,
328
- onChange: _ref5 => {
329
- let {
330
- value
331
- } = _ref5;
332
- return setValue2(value);
333
- }
334
- })), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("h4", {
335
- style: {
336
- marginBottom: '8px',
337
- fontSize: '12px',
338
- color: '#666'
339
- }
340
- }, "Disabled"), /*#__PURE__*/_react.default.createElement(_Select.Select, {
341
- id: "disabled",
342
- name: "disabled",
343
- label: "Country",
344
- options: options,
345
- value: "uk",
346
- disabled: true,
347
- onChange: () => {}
348
- })), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("h4", {
349
- style: {
350
- marginBottom: '8px',
351
- fontSize: '12px',
352
- color: '#666'
353
- }
354
- }, "Error state"), /*#__PURE__*/_react.default.createElement(_Select.Select, {
355
- id: "error",
356
- name: "error",
357
- label: "Country",
358
- options: options,
359
- value: value3,
360
- error: true,
361
- touched: true,
362
- onChange: _ref6 => {
363
- let {
364
- value
365
- } = _ref6;
366
- return setValue3(value);
367
- }
368
- })));
369
- };
370
-
371
- // Creatable - type to add custom options
372
- exports.AllStates = AllStates;
373
- const Creatable = () => {
374
- const [value, setValue] = (0, _react.useState)('');
375
- const [options, setOptions] = (0, _react.useState)([{
376
- key: 'react',
377
- value: 'react',
378
- label: 'React'
379
- }, {
380
- key: 'vue',
381
- value: 'vue',
382
- label: 'Vue'
383
- }, {
384
- key: 'angular',
385
- value: 'angular',
386
- label: 'Angular'
387
- }, {
388
- key: 'svelte',
389
- value: 'svelte',
390
- label: 'Svelte'
391
- }]);
392
- const handleChange = _ref7 => {
393
- let {
394
- value: newValue
395
- } = _ref7;
396
- setValue(newValue);
397
- // Add new option to the list if it doesn't exist
398
- if (!options.find(opt => opt.value === newValue)) {
399
- setOptions([...options, {
400
- key: newValue,
401
- value: newValue,
402
- label: newValue
403
- }]);
404
- }
405
- };
406
- return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("h4", {
407
- style: {
408
- marginBottom: '16px',
409
- fontSize: '14px'
410
- }
411
- }, "Type to search or create a new option (try typing \"Next.js\")"), /*#__PURE__*/_react.default.createElement(_Select.Select, {
412
- id: "framework",
413
- name: "framework",
414
- label: "Framework",
415
- options: options,
416
- value: value,
417
- creatable: true,
418
- onChange: handleChange
419
- }), /*#__PURE__*/_react.default.createElement("p", {
420
- style: {
421
- marginTop: '12px',
422
- fontSize: '12px',
423
- color: '#666'
424
- }
425
- }, "Selected: ", /*#__PURE__*/_react.default.createElement("strong", null, value || '(none)')), /*#__PURE__*/_react.default.createElement("p", {
426
- style: {
427
- marginTop: '8px',
428
- fontSize: '12px',
429
- color: '#666'
430
- }
431
- }, "Options: ", options.map(o => o.label).join(', ')));
432
- };
433
-
434
- // Creatable with custom label
435
- exports.Creatable = Creatable;
436
- const CreatableCustomLabel = () => {
437
- const [value, setValue] = (0, _react.useState)('');
438
- const tagOptions = [{
439
- key: 'bug',
440
- value: 'bug',
441
- label: 'Bug'
442
- }, {
443
- key: 'feature',
444
- value: 'feature',
445
- label: 'Feature'
446
- }, {
447
- key: 'docs',
448
- value: 'docs',
449
- label: 'Documentation'
450
- }];
451
- return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("h4", {
452
- style: {
453
- marginBottom: '16px',
454
- fontSize: '14px'
455
- }
456
- }, "Custom \"create\" label format"), /*#__PURE__*/_react.default.createElement(_Select.Select, {
457
- id: "tag",
458
- name: "tag",
459
- label: "Add Tag",
460
- options: tagOptions,
461
- value: value,
462
- creatable: true,
463
- formatCreateLabel: inputValue => "+ Add new tag: ".concat(inputValue),
464
- onChange: _ref8 => {
465
- let {
466
- value: newValue
467
- } = _ref8;
468
- return setValue(newValue);
469
- }
470
- }), /*#__PURE__*/_react.default.createElement("p", {
471
- style: {
472
- marginTop: '12px',
473
- fontSize: '12px',
474
- color: '#666'
475
- }
476
- }, "Selected: ", /*#__PURE__*/_react.default.createElement("strong", null, value || '(none)')));
477
- };
478
- exports.CreatableCustomLabel = CreatableCustomLabel;
@@ -1,135 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = exports.InvestCalculatorOverview = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- var _InvestCalculator = require("./InvestCalculator");
9
- var _ComponentWrapper = require("../ComponentWrapper/ComponentWrapper.styles");
10
- var _global = _interopRequireDefault(require("../../styles/global"));
11
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
- //// U N F I N I S H E D ////
13
- var _default = exports.default = {
14
- title: 'Components Library/InvestCalculator',
15
- component: _InvestCalculator.InvestCalculator,
16
- argTypes: {
17
- minTokensCount: {
18
- type: 'number',
19
- required: true,
20
- defaultValue: 0
21
- },
22
- available: {
23
- type: 'number',
24
- required: true
25
- },
26
- tokenName: {
27
- type: 'string',
28
- required: true
29
- },
30
- id: {
31
- type: 'string',
32
- required: true
33
- },
34
- name: {
35
- type: 'string',
36
- defaultValue: '',
37
- required: true
38
- },
39
- onChange: {
40
- type: 'function',
41
- action: 'onChange',
42
- defaultValue: () => {}
43
- },
44
- onBlur: {
45
- type: 'function',
46
- action: 'onBlur',
47
- defaultValue: () => {}
48
- },
49
- onFocus: {
50
- type: 'function',
51
- action: 'onFocus',
52
- defaultValue: () => {}
53
- },
54
- onErrors: {
55
- type: 'function',
56
- action: 'onErrors',
57
- defaultValue: () => {}
58
- },
59
- exchangeRate: {
60
- type: 'shape',
61
- defaultValue: {},
62
- required: true
63
- },
64
- maxFunds: {
65
- type: 'shape',
66
- defaultValue: {},
67
- required: true
68
- },
69
- //not props
70
- changeCurrencyValue: {
71
- type: 'function',
72
- action: 'changeCurrencyValue',
73
- defaultValue: () => {}
74
- },
75
- changeTokens: {
76
- type: 'function',
77
- action: 'changeTokens',
78
- defaultValue: () => {}
79
- },
80
- tokens: {
81
- type: 'number'
82
- },
83
- tokensInput: {
84
- type: 'number'
85
- },
86
- currencyValueInput: {
87
- type: 'number'
88
- },
89
- currencyValue: {
90
- type: 'number'
91
- },
92
- state: {
93
- type: 'shape',
94
- defaultValue: {
95
- tokens: 0,
96
- currencyValue: 0,
97
- selectedCurrencyValue: 0,
98
- userSelectedCurrency: 'ether'
99
- }
100
- }
101
- }
102
- };
103
- const Template = args => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_global.default, null), /*#__PURE__*/_react.default.createElement(_ComponentWrapper.ComponentWrapper, null, /*#__PURE__*/_react.default.createElement(_InvestCalculator.InvestCalculator, args)));
104
- const InvestCalculatorOverview = exports.InvestCalculatorOverview = Template.bind({});
105
- InvestCalculatorOverview.args = {
106
- minTokensCount: 3,
107
- available: 345,
108
- tokenName: 'STOKR TEST',
109
- id: 'I-D',
110
- name: 'John Doe',
111
- exchangeRate: {
112
- [_InvestCalculator.InvestCalculatorCurrencies.ETH]: 222,
113
- [_InvestCalculator.InvestCalculatorCurrencies.EUR]: 111
114
- },
115
- maxFunds: {
116
- [_InvestCalculator.InvestCalculatorCurrencies.CRYPTO]: 333,
117
- [_InvestCalculator.InvestCalculatorCurrencies.EUR]: 222
118
- },
119
- tokens: 444,
120
- tokensInput: 666,
121
- currencyValueInput: 400
122
- };
123
-
124
- //doublecheck:
125
- //UNFINISHED
126
- // square brackets waitng for evaluation (string) - so imported
127
- // [InvestCalculatorCurrencies.CRYPTO]
128
- //
129
- // NOT PROPs propped in..
130
- // state prop made up... not changing anything
131
- //changeTokens
132
- //tokensInput
133
- //tokens
134
- //
135
- // ?(onChange - target - currencyName -)/ state - selectedCurrency
@@ -1,52 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = exports.InvestmentStatOverview = exports.InvestmentStatBlueTooltip = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- var _InvestmentStat = _interopRequireDefault(require("./InvestmentStat"));
9
- var _ComponentWrapper = require("../ComponentWrapper/ComponentWrapper.styles");
10
- var _global = _interopRequireDefault(require("../../styles/global"));
11
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
- var _default = exports.default = {
13
- title: 'Components Library/InvestmentStat',
14
- component: _InvestmentStat.default,
15
- argTypes: {
16
- title: {
17
- type: 'string',
18
- defaultValue: '',
19
- required: true
20
- },
21
- content: {
22
- type: 'string',
23
- defaultValue: '',
24
- required: true
25
- },
26
- state: {
27
- type: 'string',
28
- defaultValue: ''
29
- },
30
- tooltip: {
31
- type: 'string',
32
- defaultValue: ''
33
- },
34
- primaryBg: {
35
- type: 'boolean',
36
- defaultValue: false
37
- }
38
- }
39
- };
40
- const Template = args => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_global.default, null), /*#__PURE__*/_react.default.createElement(_ComponentWrapper.ComponentWrapper, null, /*#__PURE__*/_react.default.createElement(_InvestmentStat.default, args)));
41
- const InvestmentStatOverview = exports.InvestmentStatOverview = Template.bind({});
42
- InvestmentStatOverview.args = {
43
- title: 'Investment Stat Title',
44
- content: 'some Content'
45
- };
46
- const InvestmentStatBlueTooltip = exports.InvestmentStatBlueTooltip = Template.bind({});
47
- InvestmentStatBlueTooltip.args = {
48
- title: 'Investment Stat Title',
49
- content: 'some Content',
50
- primaryBg: true,
51
- tooltip: 'information'
52
- };