@stokr/components-library 2.3.65-beta.1 → 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 (222) hide show
  1. package/dist/components/2FA/main-flow.js +28 -7
  2. package/dist/components/AdminDashboard/Table/ReactTable.js +123 -7
  3. package/dist/components/Chips/Chip.js +1 -2
  4. package/dist/components/Chips/Chip.styles.js +3 -2
  5. package/dist/components/Input/Input.js +33 -33
  6. package/dist/components/Input/MultiSelect.js +319 -0
  7. package/dist/components/Input/SearchInput.js +78 -0
  8. package/dist/components/Input/SearchInput.styles.js +25 -0
  9. package/dist/components/Input/Select.js +51 -28
  10. package/dist/components/Modal/SideModal.js +82 -0
  11. package/dist/components/Modal/SideModal.styles.js +21 -0
  12. package/dist/components/Payment/PaymentDetailsCard.js +189 -0
  13. package/dist/components/Payment/PaymentDisplay.js +2 -12
  14. package/dist/components/ProfileBox/ProfileBox.js +2 -1
  15. package/dist/components/Snackbar/Snackbar.js +193 -0
  16. package/dist/components/Snackbar/Snackbar.styles.js +97 -0
  17. package/dist/components/Snackbar/SnackbarProvider.js +81 -0
  18. package/dist/components/Snackbar/index.js +32 -0
  19. package/dist/components/Snackbar/useSnackbar.js +43 -0
  20. package/dist/components/StatusTag/StatusTag.js +175 -0
  21. package/dist/components/StatusTag/StatusTag.styles.js +37 -0
  22. package/dist/components/StepsProgress/StepIndicator.js +59 -0
  23. package/dist/components/StepsProgress/StepIndicator.styles.js +30 -0
  24. package/dist/components/TextLink/TextLink.styles.js +1 -1
  25. package/dist/components/Timeline/TimelineStep.js +2 -2
  26. package/dist/constants/globalVariables.js +41 -2
  27. package/dist/context/Checkbox/CheckboxContext.js +0 -1
  28. package/dist/index.js +66 -0
  29. package/dist/static/images/bmn2-logo.svg +9 -0
  30. package/dist/static/images/document-icon.svg +3 -0
  31. package/dist/static/images/plus-icon.svg +4 -0
  32. package/dist/static/images/search-icon.svg +3 -0
  33. package/dist/static/images/sent-icon.svg +10 -0
  34. package/dist/static/images/transfer-icon.svg +10 -0
  35. package/dist/utils/formatCurrencyValue.js +43 -3
  36. package/package.json +3 -2
  37. package/dist/components/2FA/EnterCode.stories.js +0 -35
  38. package/dist/components/2FA/disable-2fa-flow.stories.js +0 -31
  39. package/dist/components/2FA/enable-2fa-flow.stories.js +0 -31
  40. package/dist/components/2FA/login-with-otp-flow.stories.js +0 -31
  41. package/dist/components/2FA/main-flow.stories.js +0 -33
  42. package/dist/components/AccountBalance/AccountBalance.stories.js +0 -83
  43. package/dist/components/AdminDashboard/Table/ReactTable.stories.js +0 -406
  44. package/dist/components/AgreementItem/AgreementItem.stories.js +0 -105
  45. package/dist/components/AnalyticGraphs/Analytic.js +0 -541
  46. package/dist/components/AnalyticGraphs/Analytic.styles.js +0 -25
  47. package/dist/components/BackButton/BackButton.stories.js +0 -32
  48. package/dist/components/Background/Background.stories.js +0 -75
  49. package/dist/components/BarChart/BarChart.js +0 -263
  50. package/dist/components/BarChart/BarChart.stories.js +0 -66
  51. package/dist/components/BarChart/BarChart.styles.js +0 -26
  52. package/dist/components/BarChartLegend/BarChartLegend.js +0 -79
  53. package/dist/components/BarChartLegend/BarChartLegend.styles.js +0 -21
  54. package/dist/components/BasicTable/BasicTable.stories.js +0 -59
  55. package/dist/components/BlogPost/BlogPost.stories.js +0 -160
  56. package/dist/components/Button/Button.stories.js +0 -146
  57. package/dist/components/Button/GlareButton.stories.js +0 -132
  58. package/dist/components/CapitalRaisedSummary/CapitalRaisedSummery.stories.js +0 -42
  59. package/dist/components/ChartBox/ChartBox.js +0 -41
  60. package/dist/components/ChartBox/ChartBox.stories.js +0 -17
  61. package/dist/components/ChartBox/ChartBox.styles.js +0 -27
  62. package/dist/components/ChartBox/ChartBoxDistribution.js +0 -27
  63. package/dist/components/ChartBox/ChartBoxDistribution.stories.js +0 -18
  64. package/dist/components/ChartLegend/ChartLegend.stories.js +0 -90
  65. package/dist/components/Checkbox/Checkbox.stories.js +0 -88
  66. package/dist/components/Checklist/ChecklistCard.stories.js +0 -102
  67. package/dist/components/Checklist/UserChecklist.js +0 -184
  68. package/dist/components/Checklist/UserChecklist.stories.js +0 -317
  69. package/dist/components/Chips/Chip.stories.js +0 -36
  70. package/dist/components/Chips/ChipsWrapper.stories.js +0 -47
  71. package/dist/components/ComponentScroll/ComponentScroll.stories.js +0 -111
  72. package/dist/components/CryptoAddress/CryptoAddress.stories.js +0 -205
  73. package/dist/components/CryptoAddressDetails/CryptoAddressDetails.stories.js +0 -70
  74. package/dist/components/DonutChart/DonutChart.stories.js +0 -54
  75. package/dist/components/FAQ/FAQ.stories.js +0 -76
  76. package/dist/components/Footer/Footer.stories.js +0 -49
  77. package/dist/components/Footer/FooterLayout.stories.js +0 -26
  78. package/dist/components/Footer/FooterMenu.stories.js +0 -113
  79. package/dist/components/Footer/mangopay.png +0 -0
  80. package/dist/components/Footer/mangopay.svg +0 -20
  81. package/dist/components/ForgotPasswordModal/ForgotPasswordModal.stories.js +0 -69
  82. package/dist/components/Form/Form.stories.js +0 -32
  83. package/dist/components/FullscreenCard/FullscreenCard.styles.js +0 -27
  84. package/dist/components/Header/Header.stories.js +0 -192
  85. package/dist/components/InfoIcon/InfoIcon.stories.js +0 -299
  86. package/dist/components/InfoPanel/InfoPanel.js +0 -124
  87. package/dist/components/Input/DatePickerInput.stories.js +0 -87
  88. package/dist/components/Input/Input.stories.js +0 -142
  89. package/dist/components/Input/InputPassword.stories.js +0 -80
  90. package/dist/components/Input/InputWithButton.stories.js +0 -75
  91. package/dist/components/Input/OtpInput.stories.js +0 -57
  92. package/dist/components/Input/RangeInput.stories.js +0 -58
  93. package/dist/components/Input/Select.stories.js +0 -139
  94. package/dist/components/InvestCalculator/InvestCalculator.stories.js +0 -135
  95. package/dist/components/InvestmentStat/InvestmentStat.stories.js +0 -52
  96. package/dist/components/KYCFlow/BasicInfo.js +0 -448
  97. package/dist/components/KYCFlow/Confirmation.js +0 -46
  98. package/dist/components/KYCFlow/DocumentFileUpload.js +0 -263
  99. package/dist/components/KYCFlow/DocumentScan.js +0 -75
  100. package/dist/components/KYCFlow/DocumentScanUpload.js +0 -251
  101. package/dist/components/KYCFlow/DocumentSelect.js +0 -118
  102. package/dist/components/KYCFlow/DocumentSuccess.js +0 -63
  103. package/dist/components/KYCFlow/DocumentUpload.js +0 -53
  104. package/dist/components/KYCFlow/DocumentVerificationType.js +0 -131
  105. package/dist/components/KYCFlow/FaceScan.js +0 -54
  106. package/dist/components/KYCFlow/FaceScanRecognition.js +0 -61
  107. package/dist/components/KYCFlow/FaceScanSuccess.js +0 -56
  108. package/dist/components/KYCFlow/Terms.js +0 -119
  109. package/dist/components/KYCFlow/_styles.js +0 -111
  110. package/dist/components/KYCFlow/index.js +0 -97
  111. package/dist/components/KYCSelectBox/KYCSelectBox.styles.js +0 -29
  112. package/dist/components/LatestUpdate/LatestUpdate.stories.js +0 -58
  113. package/dist/components/Layout/Layout.stories.js +0 -60
  114. package/dist/components/LearnMoreCarousel/LearnMoreCarousel.stories.js +0 -66
  115. package/dist/components/LearnMorePage/LearnMore.stories.js +0 -48
  116. package/dist/components/LearnMorePage/LearnMoreItem.stories.js +0 -62
  117. package/dist/components/LearnMoreSection/LearnMore.stories.js +0 -30
  118. package/dist/components/LearnMoreSection/LearnMoreItem.stories.js +0 -59
  119. package/dist/components/LoginModal/LoginModal.stories.js +0 -74
  120. package/dist/components/MatomoConnect/Matomo.js +0 -228
  121. package/dist/components/MatomoConnect/Matomo_fuckup.js +0 -387
  122. package/dist/components/Modal/Modal.stories.js +0 -75
  123. package/dist/components/Modal/NewVentureModal/NewVentureModal.stories.js +0 -150
  124. package/dist/components/Modal/PaymentModal.stories.js +0 -57
  125. package/dist/components/MultiProgressBar/MultiProgressBar.stories.js +0 -67
  126. package/dist/components/Newsletter/Newsletter.stories.js +0 -16
  127. package/dist/components/NotificationContext/NotificationContext.js +0 -141
  128. package/dist/components/Number/Number.stories.js +0 -92
  129. package/dist/components/Pagination/Pagination.stories.js +0 -83
  130. package/dist/components/Pagination/PaginationControls.stories.js +0 -112
  131. package/dist/components/Payment/PaymentDisplay.stories.js +0 -302
  132. package/dist/components/Payment/TimerComponent.stories.js +0 -236
  133. package/dist/components/Process/Process.stories.js +0 -42
  134. package/dist/components/ProfileBadge/ProfileBadge.stories.js +0 -45
  135. package/dist/components/ProfileBox/ProfileBox.stories.js +0 -35
  136. package/dist/components/ProfileHeader/ProfileHeader.js +0 -252
  137. package/dist/components/ProfileHeader/ProfileHeader.styles.js +0 -65
  138. package/dist/components/ProfileStat/ProfileStat.stories.js +0 -66
  139. package/dist/components/ProofOfAddress/ProofOfAddress.styles.js +0 -53
  140. package/dist/components/QRCode/QRCode.stories.js +0 -104
  141. package/dist/components/Radio/Radio.stories.js +0 -73
  142. package/dist/components/RefreshButton/RefreshButton.stories.js +0 -38
  143. package/dist/components/RegisterAlgorand/AlgoAddressName.js +0 -138
  144. package/dist/components/RegisterAlgorand/AlgoAdressSelect.js +0 -443
  145. package/dist/components/RegisterAlgorand/AlgoConnectWallet.js +0 -47
  146. package/dist/components/RegisterAlgorand/AlgoSuccess.js +0 -38
  147. package/dist/components/RegisterAlgorand/Algorand.stories.js +0 -80
  148. package/dist/components/RegisterAlgorand/ChooseWallet.js +0 -97
  149. package/dist/components/RegisterAlgorand/SelectProject.js +0 -89
  150. package/dist/components/RegisterAlgorand/_styles.js +0 -28
  151. package/dist/components/RegisterAlgorand/flow.js +0 -409
  152. package/dist/components/RegisterAlgorand/flowWithMemo.js +0 -410
  153. package/dist/components/RegisterAlgorand/index.js +0 -48
  154. package/dist/components/RegisterConfirmModal/RegisterConfirmModal.stories.js +0 -41
  155. package/dist/components/RegisterEthereum/EthAddressLedger.js +0 -226
  156. package/dist/components/RegisterEthereum/EthAddressMetamask.js +0 -204
  157. package/dist/components/RegisterEthereum/EthAddressName.js +0 -135
  158. package/dist/components/RegisterEthereum/EthConnectLedger.js +0 -194
  159. package/dist/components/RegisterEthereum/EthConnectMetamask.js +0 -35
  160. package/dist/components/RegisterEthereum/EthFinish.js +0 -41
  161. package/dist/components/RegisterEthereum/EthIntro.js +0 -95
  162. package/dist/components/RegisterEthereum/_styles.js +0 -28
  163. package/dist/components/RegisterEthereum/index.js +0 -68
  164. package/dist/components/RegisterModal/RegisterModal.stories.js +0 -49
  165. package/dist/components/RequestDataBox/RequestDataBox.stories.js +0 -37
  166. package/dist/components/RiskQuestionnaire/RiskQuestionnaireContext.js +0 -185
  167. package/dist/components/RiskQuestionnaire/_styles.js +0 -15
  168. package/dist/components/SEO/SEO.stories.js +0 -60
  169. package/dist/components/SideLine/SideLine.stories.js +0 -28
  170. package/dist/components/SigningSubflow/SignSubAddressMetamask.js +0 -137
  171. package/dist/components/SigningSubflow/SignSubConnectLedger.js +0 -150
  172. package/dist/components/SigningSubflow/SignSubConnectMetamask.js +0 -137
  173. package/dist/components/SigningSubflow/SignSubIntro.js +0 -55
  174. package/dist/components/SigningSubflow/SignSubSendLedger.js +0 -150
  175. package/dist/components/SigningSubflow/SignSubSendMetamask.js +0 -62
  176. package/dist/components/SigningSubflow/SignSubTransactionLedger.js +0 -161
  177. package/dist/components/SigningSubflow/SignSubTransactionMetamask.js +0 -166
  178. package/dist/components/SigningSubflow/_styles.js +0 -34
  179. package/dist/components/SigningSubflow/index.js +0 -32
  180. package/dist/components/Slider/Slider.stories.js +0 -68
  181. package/dist/components/StepController/StepController.stories.js +0 -60
  182. package/dist/components/StepController/StepControllerProgress.stories.js +0 -49
  183. package/dist/components/StepsProgress/StepsProgress.stories.js +0 -49
  184. package/dist/components/Switch/Switch.stories.js +0 -81
  185. package/dist/components/Tabs/Tabs.stories.js +0 -36
  186. package/dist/components/TabsNav/TabNav.stories.js +0 -40
  187. package/dist/components/TabsNav/TabsNav.stories.js +0 -37
  188. package/dist/components/TeamOverview/TeamOverview.stories.js +0 -76
  189. package/dist/components/TermsModal/TermsModal.stories.js +0 -31
  190. package/dist/components/Text/Headline.stories.js +0 -48
  191. package/dist/components/Text/Text.stories.js +0 -70
  192. package/dist/components/Timeline/Timeline.stories.js +0 -393
  193. package/dist/components/ToDoList/ToDoList.stories.js +0 -133
  194. package/dist/components/ToDoList/ToDoListTask.stories.js +0 -70
  195. package/dist/components/TransactionDetails/TransactionDetails.stories.js +0 -55
  196. package/dist/components/TransactionDetails/TransactionDetailsTable.stories.js +0 -305
  197. package/dist/components/TransactionInfo/TransactionInfo.stories.js +0 -61
  198. package/dist/components/TwoFactorModal/TwoFactorModal.js +0 -100
  199. package/dist/components/VerifyEmailModal/VerifyEmailModal.stories.js +0 -59
  200. package/dist/components/headerHo/HeaderHo.stories.js +0 -35
  201. package/dist/components/icons/Arrow.stories.js +0 -42
  202. package/dist/components/icons/ArrowSimple.stories.js +0 -48
  203. package/dist/components/icons/Check.stories.js +0 -22
  204. package/dist/components/icons/Facebook.stories.js +0 -21
  205. package/dist/components/icons/Facebook_Logo.png +0 -0
  206. package/dist/components/icons/Info.stories.js +0 -16
  207. package/dist/components/icons/Instagram.stories.js +0 -21
  208. package/dist/components/icons/LI-In-Bug.png +0 -0
  209. package/dist/components/icons/LinkIcon.stories.js +0 -21
  210. package/dist/components/icons/LinkedIn.stories.js +0 -16
  211. package/dist/components/icons/Medium.stories.js +0 -16
  212. package/dist/components/icons/Reddit.stories.js +0 -21
  213. package/dist/components/icons/Share.stories.js +0 -16
  214. package/dist/components/icons/Telegram-Logo.png +0 -0
  215. package/dist/components/icons/Telegram.stories.js +0 -16
  216. package/dist/components/icons/Twitter.stories.js +0 -21
  217. package/dist/components/icons/X-logo-black.png +0 -0
  218. package/dist/components/icons/X.stories.js +0 -16
  219. package/dist/components/icons/Youtube.stories.js +0 -21
  220. package/dist/components/icons/youtube_social_circle_red.png +0 -0
  221. package/dist/components/taxId/TaxId.stories.js +0 -50
  222. package/dist/components/video/Video.stories.js +0 -52
@@ -1,406 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = exports.WrapperWithSubTable = exports.WithoutPagination = exports.WithSubTable = exports.WithStatusBasedHover = exports.WithRowSpecificHover = exports.WithRowHover = exports.WithHoverStylesAndContent = exports.WithHoverContent = exports.WithFixedColumnWidths = exports.WithCustomStyling = exports.DefaultWrapper = exports.Default = exports.CustomStyledTable = exports.BoxStyleTable = exports.BlueWrapper = exports.BlueTable = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- var _ReactTable = require("./ReactTable");
9
- var _ReactTableWrapper = require("./ReactTableWrapper");
10
- var _global = _interopRequireDefault(require("../../../styles/global"));
11
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
13
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
14
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
15
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
16
- function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
17
- var _default = exports.default = {
18
- title: 'Components Library/React table',
19
- component: _ReactTable.ReactTable,
20
- parameters: {
21
- docs: {
22
- description: {
23
- component: 'A flexible and customizable data table component with sorting, pagination, and custom styling options.'
24
- }
25
- }
26
- },
27
- argTypes: {
28
- data: {
29
- control: 'object'
30
- },
31
- columns: {
32
- control: 'object'
33
- },
34
- noPagination: {
35
- control: 'boolean'
36
- },
37
- blue: {
38
- control: 'boolean'
39
- },
40
- withSubTable: {
41
- control: 'boolean'
42
- },
43
- customTdStyles: {
44
- control: 'function'
45
- },
46
- customThStyles: {
47
- control: 'function'
48
- },
49
- customRowHoverStyles: {
50
- control: 'function'
51
- },
52
- customRowHoverContent: {
53
- control: 'function'
54
- }
55
- }
56
- }; // Sample columns and data for demonstration
57
- const columns = [{
58
- Header: 'ID',
59
- accessor: 'id',
60
- width: '10%',
61
- minWidth: '80px'
62
- }, {
63
- Header: 'Name',
64
- accessor: 'name',
65
- width: '30%',
66
- minWidth: '150px'
67
- }, {
68
- Header: 'Status',
69
- accessor: 'status',
70
- width: '20%',
71
- minWidth: '100px'
72
- }, {
73
- Header: '',
74
- accessor: 'dropdown',
75
- width: '40%',
76
- minWidth: '120px'
77
- }];
78
- const columnsWrapper = [{
79
- label: 'ID',
80
- key: 'id',
81
- width: '10%',
82
- minWidth: '80px'
83
- }, {
84
- label: 'Name',
85
- key: 'name',
86
- width: '30%',
87
- minWidth: '150px'
88
- }, {
89
- label: 'Status',
90
- key: 'status',
91
- width: '20%',
92
- minWidth: '100px'
93
- }, {
94
- label: '',
95
- key: 'dropdown',
96
- width: '40%',
97
- minWidth: '120px'
98
- }];
99
- const subColumns = [{
100
- Header: 'Detail ID',
101
- accessor: 'detailId'
102
- }, {
103
- Header: 'Detail Name',
104
- accessor: 'detailName'
105
- }];
106
- const subColumnsWrapper = [{
107
- label: 'Detail ID',
108
- key: 'detailId'
109
- }, {
110
- label: 'Detail Name',
111
- key: 'detailName'
112
- }];
113
- const data = [{
114
- id: 1,
115
- name: 'Alice',
116
- status: 'Active',
117
- subData: [{
118
- detailId: 101,
119
- detailName: 'Detail A1'
120
- }, {
121
- detailId: 102,
122
- detailName: 'Detail A2'
123
- }]
124
- }, {
125
- id: 2,
126
- name: 'Bob',
127
- status: 'Inactive',
128
- subData: [{
129
- detailId: 201,
130
- detailName: 'Detail B1'
131
- }, {
132
- detailId: 202,
133
- detailName: 'Detail B2'
134
- }]
135
- }, {
136
- id: 3,
137
- name: 'Carol',
138
- status: 'Active',
139
- subData: []
140
- }, {
141
- id: 4,
142
- name: 'Dave',
143
- status: 'Pending',
144
- subData: []
145
- }];
146
-
147
- // Custom styling functions
148
- const customTdStyles = (index, row, column) => {
149
- if (index === 0) {
150
- return {
151
- backgroundColor: 'lightblue',
152
- fontWeight: 'bold',
153
- paddingBottom: 0
154
- };
155
- }
156
- if (row.status === 'Inactive') {
157
- return {
158
- backgroundColor: 'lightgray'
159
- };
160
- }
161
- if (row.status === 'Pending') {
162
- return {
163
- backgroundColor: 'lightyellow'
164
- };
165
- }
166
- return {}; // default style
167
- };
168
- const customThStyles = column => {
169
- return {
170
- backgroundColor: 'lightblue'
171
- };
172
- };
173
-
174
- // Custom row hover styles function
175
- const customRowHoverStyles = (rowIndex, rowData) => {
176
- return "\n background-color: #f0f8ff !important;\n transform: scale(1.01);\n transition: all 0.2s ease-in-out;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);\n \n td {\n background-color: #f0f8ff !important;\n border-bottom-color: #0050ca !important;\n }\n ";
177
- };
178
-
179
- // Custom row hover content function
180
- const customRowHoverContent = (columnId, rowIndex, rowData) => {
181
- switch (columnId) {
182
- case 'name':
183
- // Show underlined link on hover
184
- return /*#__PURE__*/_react.default.createElement("a", {
185
- href: "/user/".concat(rowData.id),
186
- style: {
187
- textDecoration: 'underline',
188
- color: '#0050ca',
189
- fontWeight: 'bold'
190
- }
191
- }, rowData.name);
192
- case 'dropdown':
193
- // Show action buttons on hover
194
- return /*#__PURE__*/_react.default.createElement("div", {
195
- style: {
196
- display: 'flex',
197
- gap: '8px'
198
- }
199
- }, /*#__PURE__*/_react.default.createElement("button", {
200
- style: {
201
- padding: '4px 8px',
202
- fontSize: '12px',
203
- backgroundColor: '#0050ca',
204
- color: 'white',
205
- border: 'none',
206
- borderRadius: '4px',
207
- cursor: 'pointer'
208
- },
209
- onClick: () => alert("Edit ".concat(rowData.name))
210
- }, "Edit"), /*#__PURE__*/_react.default.createElement("button", {
211
- style: {
212
- padding: '4px 8px',
213
- fontSize: '12px',
214
- backgroundColor: '#dc3545',
215
- color: 'white',
216
- border: 'none',
217
- borderRadius: '4px',
218
- cursor: 'pointer'
219
- },
220
- onClick: () => alert("Delete ".concat(rowData.name))
221
- }, "Delete"));
222
- case 'status':
223
- // Show status with icon on hover
224
- const statusColors = {
225
- Active: '#28a745',
226
- Inactive: '#dc3545',
227
- Pending: '#ffc107'
228
- };
229
- return /*#__PURE__*/_react.default.createElement("div", {
230
- style: {
231
- display: 'flex',
232
- alignItems: 'center',
233
- gap: '4px'
234
- }
235
- }, /*#__PURE__*/_react.default.createElement("span", {
236
- style: {
237
- width: '8px',
238
- height: '8px',
239
- borderRadius: '50%',
240
- backgroundColor: statusColors[rowData.status] || '#6c757d'
241
- }
242
- }), rowData.status);
243
- default:
244
- return undefined;
245
- // Return undefined to use default content
246
- }
247
- };
248
-
249
- // Status-based hover styles
250
- const statusBasedHoverStyles = (rowIndex, rowData) => {
251
- switch (rowData.status) {
252
- case 'Active':
253
- return "\n background-color: #e8f5e8 !important;\n td {\n background-color: #e8f5e8 !important;\n border-bottom-color: #28a745 !important;\n }\n ";
254
- case 'Inactive':
255
- return "\n background-color: #ffe8e8 !important;\n td {\n background-color: #ffe8e8 !important;\n border-bottom-color: #dc3545 !important;\n }\n ";
256
- case 'Pending':
257
- return "\n background-color: #fff3cd !important;\n td {\n background-color: #fff3cd !important;\n border-bottom-color: #ffc107 !important;\n }\n ";
258
- default:
259
- return "\n background-color: #f8f9fa !important;\n td {\n background-color: #f8f9fa !important;\n }\n ";
260
- }
261
- };
262
-
263
- // Row-specific hover styles (example: different styles for first and last rows)
264
- const rowSpecificHoverStyles = (rowIndex, rowData) => {
265
- // Special styling for first row
266
- if (rowIndex === 0) {
267
- return "\n background-color: #e3f2fd !important;\n transform: scale(1.02);\n box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);\n td {\n background-color: #e3f2fd !important;\n border-bottom-color: #2196f3 !important;\n font-weight: bold;\n }\n ";
268
- }
269
-
270
- // Special styling for last row
271
- if (rowIndex === data.length - 1) {
272
- return "\n background-color: #f3e5f5 !important;\n transform: scale(1.02);\n box-shadow: 0 4px 12px rgba(156, 39, 176, 0.3);\n td {\n background-color: #f3e5f5 !important;\n border-bottom-color: #9c27b0 !important;\n font-weight: bold;\n }\n ";
273
- }
274
-
275
- // Default styling for other rows
276
- return "\n background-color: #f0f8ff !important;\n transform: scale(1.01);\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);\n td {\n background-color: #f0f8ff !important;\n border-bottom-color: #0050ca !important;\n }\n ";
277
- };
278
-
279
- // Function to calculate sub data
280
- const calculateSubData = row => {
281
- return row.original.subData || [];
282
- };
283
- const Template = args => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_global.default, null), /*#__PURE__*/_react.default.createElement(_ReactTable.ReactTable, args));
284
- const TemplateWrapper = args => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_global.default, null), /*#__PURE__*/_react.default.createElement(_ReactTableWrapper.ReactTableWrapper, args));
285
- const Default = exports.Default = Template.bind({});
286
- Default.args = {
287
- columns: columns,
288
- data: data,
289
- noPagination: false
290
- };
291
- const WithoutPagination = exports.WithoutPagination = Template.bind({});
292
- WithoutPagination.args = _objectSpread(_objectSpread({}, Default.args), {}, {
293
- noPagination: true
294
- });
295
- const WithCustomStyling = exports.WithCustomStyling = Template.bind({});
296
- WithCustomStyling.args = _objectSpread(_objectSpread({}, Default.args), {}, {
297
- customTdStyles: customTdStyles,
298
- customThStyles: customThStyles
299
- });
300
- const WithRowHover = exports.WithRowHover = Template.bind({});
301
- WithRowHover.args = _objectSpread(_objectSpread({}, Default.args), {}, {
302
- customRowHoverStyles: customRowHoverStyles
303
- });
304
- const WithHoverContent = exports.WithHoverContent = Template.bind({});
305
- WithHoverContent.args = _objectSpread(_objectSpread({}, Default.args), {}, {
306
- customRowHoverContent: customRowHoverContent
307
- });
308
- const WithHoverStylesAndContent = exports.WithHoverStylesAndContent = Template.bind({});
309
- WithHoverStylesAndContent.args = _objectSpread(_objectSpread({}, Default.args), {}, {
310
- customRowHoverStyles: customRowHoverStyles,
311
- customRowHoverContent: customRowHoverContent
312
- });
313
- const WithStatusBasedHover = exports.WithStatusBasedHover = Template.bind({});
314
- WithStatusBasedHover.args = _objectSpread(_objectSpread({}, Default.args), {}, {
315
- customRowHoverStyles: statusBasedHoverStyles
316
- });
317
- const WithRowSpecificHover = exports.WithRowSpecificHover = Template.bind({});
318
- WithRowSpecificHover.args = _objectSpread(_objectSpread({}, Default.args), {}, {
319
- customRowHoverStyles: rowSpecificHoverStyles
320
- });
321
- const WithFixedColumnWidths = exports.WithFixedColumnWidths = Template.bind({});
322
- WithFixedColumnWidths.args = _objectSpread(_objectSpread({}, Default.args), {}, {
323
- customRowHoverContent: customRowHoverContent,
324
- customRowHoverStyles: customRowHoverStyles
325
- });
326
- const WithSubTable = exports.WithSubTable = Template.bind({});
327
- WithSubTable.args = _objectSpread(_objectSpread({}, Default.args), {}, {
328
- withSubTable: true,
329
- subColumns: subColumns,
330
- calculateSubData: calculateSubData
331
- });
332
- const BlueTable = exports.BlueTable = Template.bind({});
333
- BlueTable.args = _objectSpread(_objectSpread({}, Default.args), {}, {
334
- blue: true
335
- });
336
-
337
- // Wrapper examples
338
- const DefaultWrapper = exports.DefaultWrapper = TemplateWrapper.bind({});
339
- DefaultWrapper.args = {
340
- columns: columnsWrapper,
341
- data: data,
342
- noPagination: false
343
- };
344
- const WrapperWithSubTable = exports.WrapperWithSubTable = TemplateWrapper.bind({});
345
- WrapperWithSubTable.args = {
346
- columns: columnsWrapper,
347
- data: data,
348
- withSubTable: true,
349
- subColumns: subColumnsWrapper,
350
- calculateSubData: calculateSubData
351
- };
352
- const BlueWrapper = exports.BlueWrapper = TemplateWrapper.bind({});
353
- BlueWrapper.args = {
354
- columns: columnsWrapper,
355
- data: data,
356
- blue: true
357
- };
358
-
359
- // Box-style table example
360
- const BoxStyleTable = exports.BoxStyleTable = Template.bind({});
361
- BoxStyleTable.args = _objectSpread(_objectSpread({}, Default.args), {}, {
362
- customRowStyles: (rowIndex, rowData) => {
363
- // return {
364
- // border: '1px solid #e1e1e1',
365
- // borderRadius: '8px',
366
- // marginBottom: '12px',
367
- // borderRight: '1px solid red !important',
368
-
369
- // backgroundColor: '#ffffff',
370
- // }
371
- return "\n border: 1px solid #e1e1e1;\n border-radius: 8px;\n margin-bottom: 12px;\n background-color: #ffffff;\n\n td{\n border:inherit;\n border-right:none;\n border-left:none;\n \n &:first-child {\n border-left:inherit;\n border-top-left-radius:4px;\n border-bottom-left-radius:4px;\n }\n &:last-child {\n border-right:inherit;\n border-top-right-radius:4px;\n border-bottom-right-radius:4px;\n }\n }\n ";
372
- },
373
- customRowHoverStyles: (rowIndex, rowData) => ({
374
- backgroundColor: '#e1e1e1'
375
- }),
376
- customTableStyles: () => ({
377
- borderSpacing: '0 20px'
378
- })
379
- });
380
-
381
- // Table with custom styling
382
- const CustomStyledTable = exports.CustomStyledTable = Template.bind({});
383
- CustomStyledTable.args = _objectSpread(_objectSpread({}, Default.args), {}, {
384
- customTableStyles: () => ({
385
- border: '2px solid #4caf50',
386
- borderRadius: '12px',
387
- overflow: 'hidden',
388
- boxShadow: '0 8px 16px rgba(76, 175, 80, 0.2)',
389
- backgroundColor: '#f8fff8'
390
- }),
391
- customRowStyles: (rowIndex, rowData) => ({
392
- backgroundColor: rowIndex % 2 === 0 ? '#ffffff' : '#f0f8f0',
393
- borderBottom: '1px solid #e8f5e8'
394
- }),
395
- customRowHoverStyles: (rowIndex, rowData) => ({
396
- backgroundColor: '#e8f5e8',
397
- transform: 'scale(1.01)'
398
- }),
399
- customThStyles: column => ({
400
- backgroundColor: '#4caf50',
401
- color: '#ffffff',
402
- fontWeight: 'bold',
403
- textTransform: 'uppercase',
404
- letterSpacing: '0.5px'
405
- })
406
- });
@@ -1,105 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = exports.AgreementItemOverview = exports.AgreementItemExample = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- var _AgreementItem = _interopRequireDefault(require("./AgreementItem"));
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
- // import Checkbox, { CheckboxPropTypes } from '../Checkbox/Checkbox'
13
- var _default = exports.default = {
14
- title: 'Components Library/Agreement Item',
15
- component: _AgreementItem.default,
16
- argTypes: {
17
- title: {
18
- type: 'string',
19
- defaultValue: ''
20
- },
21
- text: {
22
- type: 'string',
23
- defaultValue: '',
24
- required: true
25
- },
26
- withTermsLink: {
27
- type: 'boolean'
28
- },
29
- ventureName: {
30
- type: 'string'
31
- },
32
- info: {
33
- type: 'string',
34
- defaultValue: ''
35
- },
36
- checkbox: {
37
- type: 'shape',
38
- defaultValue: {
39
- id: '',
40
- name: '',
41
- text: '',
42
- label: '',
43
- value: '',
44
- checked: false,
45
- large: false,
46
- error: false,
47
- touched: false
48
- }
49
- },
50
- checkboxWithFileDownload: {
51
- type: 'shape',
52
- defaultValue: {
53
- id: '',
54
- name: '',
55
- text: '',
56
- label: '',
57
- value: '',
58
- checked: false,
59
- large: false,
60
- error: false,
61
- touched: false
62
- }
63
- }
64
- }
65
- };
66
- 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(_AgreementItem.default, args)));
67
- const AgreementItemOverview = exports.AgreementItemOverview = Template.bind({});
68
- AgreementItemOverview.args = {
69
- title: 'Agreement Item Title',
70
- text: 'some Text',
71
- withTermsLink: true,
72
- ventureName: 'Venture Name',
73
- info: 'Info'
74
- };
75
- const AgreementItemExample = exports.AgreementItemExample = Template.bind({});
76
- AgreementItemExample.args = {
77
- title: 'disclaimer',
78
- text: 'Before being able to view any fund offering, you, as a prospective investor, must confirm a few things. Please read check the boxes',
79
- withTermsLink: true,
80
- ventureName: 'Algorand',
81
- info: 'Info',
82
- checkbox: {
83
- checked: true
84
- },
85
- checkboxWithFileDownload: {
86
- checked: true
87
- }
88
- };
89
-
90
- //doublecheck:
91
- // CheckboxPropTypes....
92
- // events/actions not incooporated
93
- // onChange: { type: 'function', action: 'onChange' },
94
- // onBlur: { type: 'function', action: 'onBlur' },
95
- // onFocus: { type: 'function', action: 'onFocus' },
96
-
97
- // 'Please read check the boxes to the right.' - is bad english in Disclaimer
98
-
99
- // change since Merge:
100
- //OfferingPageLink
101
- //TermsOfOfferingLink
102
- //withTermsLink
103
- // ventureName
104
- //checkboxwithfiledownload
105
- //hardcoded texts all taken out.