@abtnode/ux 1.16.14-beta-c308dc3b → 1.16.14-beta-cb53c14b

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 (202) hide show
  1. package/es/actions.js +97 -0
  2. package/es/analytics/card.js +92 -0
  3. package/es/analytics/chart.js +96 -0
  4. package/es/analytics/cpu.js +36 -0
  5. package/es/analytics/disk.js +111 -0
  6. package/es/analytics/memory.js +72 -0
  7. package/es/analytics/runtime.js +173 -0
  8. package/es/analytics/traffic.js +259 -0
  9. package/es/blocklet/access/config-access.js +307 -0
  10. package/es/blocklet/access/index.js +216 -0
  11. package/es/blocklet/actions.js +474 -0
  12. package/es/blocklet/add-cert.js +177 -0
  13. package/es/blocklet/agreement-app.js +21 -0
  14. package/es/blocklet/agreement.js +127 -0
  15. package/es/blocklet/app-avatar.js +57 -0
  16. package/es/blocklet/audit-logs.js +259 -0
  17. package/es/blocklet/blocklet-source.js +48 -0
  18. package/es/blocklet/bundle-avatar.js +64 -0
  19. package/es/blocklet/component/add.js +1308 -0
  20. package/es/blocklet/component/configuration.js +122 -0
  21. package/es/blocklet/component/delete.js +134 -0
  22. package/es/blocklet/component/environment.js +370 -0
  23. package/es/blocklet/component/index.js +975 -0
  24. package/es/blocklet/component/line.js +20 -0
  25. package/es/blocklet/component/navigation/locale-tabs.js +225 -0
  26. package/es/blocklet/component/navigation/navigation-actions.js +112 -0
  27. package/es/blocklet/component/navigation/navigation-dialog.js +607 -0
  28. package/es/blocklet/component/navigation/navigation-preview.js +101 -0
  29. package/es/blocklet/component/navigation/simple-select.js +124 -0
  30. package/es/blocklet/component/select-store.js +155 -0
  31. package/es/blocklet/component/setting.js +109 -0
  32. package/es/blocklet/component/sortable-tree.js +126 -0
  33. package/es/blocklet/component/space-connector.js +199 -0
  34. package/es/blocklet/component/space-selector.js +178 -0
  35. package/es/blocklet/component/start.js +101 -0
  36. package/es/blocklet/component/store-blocklet-list.js +200 -0
  37. package/es/blocklet/component/switch-control.js +57 -0
  38. package/es/blocklet/config-navigation.js +331 -0
  39. package/es/blocklet/configuration.js +603 -0
  40. package/es/blocklet/disk-info.js +75 -0
  41. package/es/blocklet/icons.js +18 -0
  42. package/es/blocklet/install-from-url.js +337 -0
  43. package/es/blocklet/log.js +90 -0
  44. package/es/blocklet/migration.js +149 -0
  45. package/es/blocklet/mode.js +19 -0
  46. package/es/blocklet/notification/email.js +257 -0
  47. package/es/blocklet/notification/index.js +49 -0
  48. package/es/blocklet/oauth/auth0.js +145 -0
  49. package/es/blocklet/oauth/common-settings.js +133 -0
  50. package/es/blocklet/oauth/federated-detail-dialog.js +175 -0
  51. package/es/blocklet/oauth/federated-invite-dialog.js +83 -0
  52. package/es/blocklet/oauth/federated-join-dialog.js +111 -0
  53. package/es/blocklet/oauth/federated-site-list.js +338 -0
  54. package/es/blocklet/oauth/federated.js +81 -0
  55. package/es/blocklet/oauth/index.js +69 -0
  56. package/es/blocklet/overview.js +293 -0
  57. package/es/blocklet/page-group.js +19 -0
  58. package/es/blocklet/preferences/app-sk.js +142 -0
  59. package/es/blocklet/preferences/index.js +305 -0
  60. package/es/blocklet/purchase/common.js +95 -0
  61. package/es/blocklet/purchase/component-purchase.js +237 -0
  62. package/es/blocklet/purchase/index.js +4 -0
  63. package/es/blocklet/router/action/add-domain-alias.js +167 -0
  64. package/es/blocklet/router/action/add-rule.js +211 -0
  65. package/es/blocklet/router/action/config-routing-rule.js +232 -0
  66. package/es/blocklet/router/action/delete-domain-alias.js +99 -0
  67. package/es/blocklet/router/action/delete-rule.js +108 -0
  68. package/es/blocklet/router/action/update-rule.js +209 -0
  69. package/es/blocklet/router/domain-actions.js +64 -0
  70. package/es/blocklet/router/domain-status.js +88 -0
  71. package/es/blocklet/router/rule-actions.js +66 -0
  72. package/es/blocklet/router/rule-list.js +190 -0
  73. package/es/blocklet/router/util.js +131 -0
  74. package/es/blocklet/runtime-info.js +68 -0
  75. package/es/blocklet/status.js +91 -0
  76. package/es/blocklet/storage/action.js +134 -0
  77. package/es/blocklet/storage/backups.js +241 -0
  78. package/es/blocklet/storage/connect-to.js +373 -0
  79. package/es/blocklet/storage/connected.js +198 -0
  80. package/es/blocklet/storage/delete.js +113 -0
  81. package/es/blocklet/storage/disconnect.js +243 -0
  82. package/es/blocklet/storage/index.js +19 -0
  83. package/es/blocklet/storage/item.js +558 -0
  84. package/es/blocklet/storage/preview-nft.js +286 -0
  85. package/es/blocklet/transfer-owner.js +198 -0
  86. package/es/blocklet/types.js +18 -0
  87. package/es/blocklet/util.js +145 -0
  88. package/es/blocklet/version.js +141 -0
  89. package/es/card-selector.js +134 -0
  90. package/es/certificate.js +105 -0
  91. package/es/chain.js +13 -0
  92. package/es/click-to-copy.js +22 -0
  93. package/es/confirm.js +149 -0
  94. package/es/contexts/audit-log.js +152 -0
  95. package/es/contexts/blocklet.js +10 -0
  96. package/es/contexts/deleting-blocklets.js +70 -0
  97. package/es/contexts/node.js +17 -0
  98. package/es/contexts/session.js +8 -0
  99. package/es/contexts/team.js +10 -0
  100. package/es/delete-confirm.js +121 -0
  101. package/es/did-address.js +46 -0
  102. package/es/dot.js +14 -0
  103. package/es/exchange-passport.js +102 -0
  104. package/es/form/form-select-input.js +184 -0
  105. package/es/form/form-text-input.js +178 -0
  106. package/es/form/form-wrapper.js +88 -0
  107. package/es/form/input-triggers.js +98 -0
  108. package/es/form/required.js +8 -0
  109. package/es/hooks/blocklet.js +229 -0
  110. package/es/hooks/confirm.js +90 -0
  111. package/es/hooks/mobile-width.js +11 -0
  112. package/es/hooks/url-evaluation.js +155 -0
  113. package/es/hooks/use-app-logo.js +16 -0
  114. package/es/hooks/use-backup-progress.js +31 -0
  115. package/es/hooks/use-blocklet-info-for-connect-did-spaces.js +50 -0
  116. package/es/hooks/use-bundle-logo.js +27 -0
  117. package/es/hooks/use-navigation.js +347 -0
  118. package/es/hooks/use-passport-id.js +14 -0
  119. package/es/hooks/use-subscription.js +22 -0
  120. package/es/icons/empty-space-nft.svg +59 -0
  121. package/es/icons/empty-spaces-nft.svg +58 -0
  122. package/es/icons/long-arrow.svg +5 -0
  123. package/es/icons/space-connected.svg +3 -0
  124. package/es/icons/space-disconnect.svg +3 -0
  125. package/es/index.js +3 -0
  126. package/es/invitation/invitation-app.js +58 -0
  127. package/es/invitation/invitation-login.js +68 -0
  128. package/es/invitation/invitation-passport.js +144 -0
  129. package/es/invitation/invitation-receive.js +138 -0
  130. package/es/invitation/invitation-success.js +93 -0
  131. package/es/invitation/invitation-user.js +90 -0
  132. package/es/invitation/invitation.js +90 -0
  133. package/es/issue-passport.js +142 -0
  134. package/es/launch-blocklet/content-layout.js +58 -0
  135. package/es/launch-blocklet/page-header.js +43 -0
  136. package/es/layout/addon.js +114 -0
  137. package/es/layout/feedback.js +55 -0
  138. package/es/locales/en.js +1534 -0
  139. package/es/locales/index.js +9 -0
  140. package/es/locales/zh.js +1537 -0
  141. package/es/logs/clock.js +11 -0
  142. package/es/logs/download.js +132 -0
  143. package/es/logs/log-terminal.js +253 -0
  144. package/es/lost-passport.js +452 -0
  145. package/es/nav-logo.js +219 -0
  146. package/es/passport-tag.js +43 -0
  147. package/es/permission.js +57 -0
  148. package/es/relative-time.js +53 -0
  149. package/es/result-message.js +11 -0
  150. package/es/schema-form/color-input.js +98 -0
  151. package/es/schema-form/common-prop-types.js +13 -0
  152. package/es/schema-form/index.js +215 -0
  153. package/es/schema-form/passport-input.js +54 -0
  154. package/es/schema-form/text-input.js +57 -0
  155. package/es/store/add.js +179 -0
  156. package/es/store/delete.js +96 -0
  157. package/es/store/item.js +76 -0
  158. package/es/subscription.js +144 -0
  159. package/es/table-icons.js +34 -0
  160. package/es/table.js +52 -0
  161. package/es/tag.js +21 -0
  162. package/es/team/members/actions.js +89 -0
  163. package/es/team/members/index.js +636 -0
  164. package/es/team/members/invitations.js +188 -0
  165. package/es/team/members/invite-member.js +208 -0
  166. package/es/team/members/issue-passport.js +152 -0
  167. package/es/team/members/member.js +408 -0
  168. package/es/team/members/passport-issuances.js +155 -0
  169. package/es/team/members/passports.js +364 -0
  170. package/es/team/members/toggle-user-approval.js +122 -0
  171. package/es/team/members/transfer-node.js +256 -0
  172. package/es/team/members/util.js +14 -0
  173. package/es/team/passports/color.js +126 -0
  174. package/es/team/passports/detail.js +312 -0
  175. package/es/team/passports/index.js +282 -0
  176. package/es/team/passports/mutate-role.js +198 -0
  177. package/es/team/passports/trusted-factories.js +221 -0
  178. package/es/team/passports/trusted-factory.js +343 -0
  179. package/es/team/passports/trusted-issuer.js +296 -0
  180. package/es/team/passports/trusted-issuers.js +226 -0
  181. package/es/team/search-input.js +46 -0
  182. package/es/team/styles/dialog.js +72 -0
  183. package/es/team/styles/list-header.js +31 -0
  184. package/es/util/api.js +6 -0
  185. package/es/util/constants.js +2 -0
  186. package/es/util/index.js +598 -0
  187. package/es/util/mode.js +4 -0
  188. package/es/util/space-gateway.js +51 -0
  189. package/es/util/spaces.js +151 -0
  190. package/es/who-can-access/config.js +38 -0
  191. package/es/wrap-locale.js +15 -0
  192. package/lib/blocklet/component/space-connector.js +1 -1
  193. package/lib/blocklet/component/space-selector.js +1 -1
  194. package/lib/blocklet/storage/backups.js +1 -1
  195. package/lib/blocklet/storage/connect-to.js +1 -1
  196. package/lib/blocklet/storage/connected.js +1 -1
  197. package/lib/blocklet/storage/disconnect.js +1 -1
  198. package/lib/blocklet/storage/index.js +1 -1
  199. package/lib/blocklet/storage/item.js +1 -1
  200. package/lib/invitation/invitation-receive.js +1 -1
  201. package/lib/team/passports/trusted-factory.js +1 -1
  202. package/package.json +81 -18
@@ -0,0 +1,452 @@
1
+ /* eslint-disable react/no-unstable-nested-components */
2
+ /* eslint-disable react/jsx-one-expression-per-line */
3
+ import { useState, useContext } from 'react';
4
+ import styled from '@emotion/styled';
5
+ import { useNavigate, Link } from 'react-router-dom';
6
+ import Typography from '@mui/material/Typography';
7
+ import Container from '@mui/material/Container';
8
+ import CheckCircleIcon from '@mui/icons-material/CheckCircle';
9
+ import Box from '@mui/material/Box';
10
+ import Stepper from '@mui/material/Stepper';
11
+ import Step from '@mui/material/Step';
12
+ import StepLabel from '@mui/material/StepLabel';
13
+ import ViewListIcon from '@mui/icons-material/ViewList';
14
+ import GetAppIcon from '@mui/icons-material/GetApp';
15
+ import CompleteIcon from '@mui/icons-material/Done';
16
+ import Avatar from '@mui/material/Avatar';
17
+ import Button from '@arcblock/ux/lib/Button';
18
+ import { LocaleContext } from '@arcblock/ux/lib/Locale/context';
19
+ import useBrowser from '@arcblock/react-hooks/lib/useBrowser';
20
+ import DidConnect from '@arcblock/did-connect/lib/Connect';
21
+ import { WELLKNOWN_SERVICE_PATH_PREFIX } from '@abtnode/constant';
22
+ import CardSelector from './card-selector';
23
+ import DidAddress from './did-address';
24
+ import wrapLocale from './wrap-locale';
25
+ import usePassportId from './hooks/use-passport-id';
26
+ import { jsx as _jsx } from "react/jsx-runtime";
27
+ import { jsxs as _jsxs } from "react/jsx-runtime";
28
+ const isFromWallet = () => {
29
+ const {
30
+ searchParams
31
+ } = new URL(window.location.href);
32
+ return searchParams.get('fromWallet') === '1';
33
+ };
34
+
35
+ // eslint-disable-next-line react/prop-types
36
+ function ColorStepIcon({
37
+ icon,
38
+ active,
39
+ completed
40
+ }) {
41
+ const icons = {
42
+ 1: /*#__PURE__*/_jsx(ViewListIcon, {
43
+ className: "step-icon"
44
+ }),
45
+ 2: /*#__PURE__*/_jsx(GetAppIcon, {
46
+ className: "step-icon"
47
+ }),
48
+ 3: /*#__PURE__*/_jsx(CompleteIcon, {
49
+ className: "step-icon"
50
+ })
51
+ };
52
+ const classNames = ['step-icon-w'];
53
+ if (active) {
54
+ classNames.push('step-icon-w--active');
55
+ }
56
+ if (completed) {
57
+ classNames.push('step-icon-w--completed');
58
+ }
59
+ return /*#__PURE__*/_jsx("div", {
60
+ className: classNames.join(' '),
61
+ children: icons[String(icon)]
62
+ });
63
+ }
64
+
65
+ // eslint-disable-next-line react/prop-types
66
+ function LostPassport({
67
+ SessionContext,
68
+ webWalletUrl,
69
+ createPassportSvg,
70
+ passportColor
71
+ }) {
72
+ const {
73
+ api,
74
+ session
75
+ } = useContext(SessionContext);
76
+ const {
77
+ t,
78
+ locale
79
+ } = useContext(LocaleContext);
80
+ const [user, setUser] = useState(false);
81
+ const [passport, setPassport] = useState(false);
82
+ const [success, setSuccess] = useState(false);
83
+ const navigate = useNavigate();
84
+ const [activeStep, setActiveStep] = useState(0);
85
+ const {
86
+ setPassportId
87
+ } = usePassportId();
88
+ const {
89
+ wallet: isWalletWebview
90
+ } = useBrowser();
91
+
92
+ // eslint-disable-next-line no-undef
93
+ const {
94
+ searchParams
95
+ } = new URL(window.location.href);
96
+ const onNext = () => {
97
+ setActiveStep(activeStep + 1);
98
+ };
99
+ const onGetUser = result => {
100
+ setUser(result.user);
101
+ };
102
+ const onSelectPassport = () => {
103
+ onNext();
104
+ };
105
+ const onReceivePassport = result => {
106
+ if (result?.passportId) {
107
+ setPassportId(result.passportId);
108
+ }
109
+ setSuccess(true);
110
+ onNext();
111
+ };
112
+ const onUsePassport = () => {
113
+ if (isWalletWebview && isFromWallet()) {
114
+ import('dsbridge').then(jsBridge => {
115
+ jsBridge.call('arcClosePage');
116
+ });
117
+ return;
118
+ }
119
+ try {
120
+ session.logout();
121
+ } catch (err) {
122
+ // Do nothing
123
+ }
124
+ const redirect = searchParams.get('redirect');
125
+ if (redirect) {
126
+ navigate(redirect, {
127
+ replace: true
128
+ });
129
+ return;
130
+ }
131
+ if ((window.env?.apiPrefix || '').startsWith(WELLKNOWN_SERVICE_PATH_PREFIX)) {
132
+ navigate(`${WELLKNOWN_SERVICE_PATH_PREFIX}/login`, {
133
+ replace: true
134
+ });
135
+ return;
136
+ }
137
+ navigate('/', {
138
+ replace: true
139
+ });
140
+ };
141
+ const handleChange = event => {
142
+ setPassport(event.target.value);
143
+ };
144
+ const steps = [{
145
+ label: t('lostPassport.selectPassport'),
146
+ content: () => {
147
+ if (!user) {
148
+ return /*#__PURE__*/_jsx(DidConnect, {
149
+ popup: true,
150
+ open: true,
151
+ hideCloseButton: true,
152
+ className: "connect",
153
+ action: "lost-passport-list",
154
+ forceConnected: false,
155
+ autoConnect: false,
156
+ checkFn: api.get,
157
+ checkTimeout: 10 * 60 * 1000,
158
+ webWalletUrl: webWalletUrl,
159
+ onSuccess: onGetUser,
160
+ locale: locale,
161
+ messages: {
162
+ title: t('lostPassport.dialog.title'),
163
+ scan: t('lostPassport.dialog.scan'),
164
+ confirm: t('lostPassport.dialog.confirm'),
165
+ success: t('lostPassport.dialog.success')
166
+ }
167
+ });
168
+ }
169
+ return /*#__PURE__*/_jsxs(Box, {
170
+ className: "select-passport",
171
+ children: [/*#__PURE__*/_jsxs(Box, {
172
+ my: 1,
173
+ display: "flex",
174
+ alignItems: "center",
175
+ className: "user-info",
176
+ children: [/*#__PURE__*/_jsx(Avatar, {
177
+ src: user.avatar,
178
+ style: {
179
+ width: 48,
180
+ height: 48,
181
+ backgroundColor: 'transparent',
182
+ marginRight: 16
183
+ }
184
+ }), /*#__PURE__*/_jsxs(Box, {
185
+ children: [/*#__PURE__*/_jsx(Box, {
186
+ className: "name",
187
+ children: user.fullName
188
+ }), /*#__PURE__*/_jsx(Box, {
189
+ className: "did",
190
+ mt: 1,
191
+ children: /*#__PURE__*/_jsx(DidAddress, {
192
+ did: user.did
193
+ })
194
+ })]
195
+ })]
196
+ }), /*#__PURE__*/_jsx("div", {
197
+ children: /*#__PURE__*/_jsx(CardSelector, {
198
+ width: 230,
199
+ height: 306,
200
+ cardSpace: 24,
201
+ list: user.passportTypes.map(x => {
202
+ return {
203
+ src: createPassportSvg({
204
+ title: x.title,
205
+ issuer: x.issuer.name,
206
+ issuerDid: x.issuer.id,
207
+ ownerDid: user.did,
208
+ ownerName: user.fullName,
209
+ ownerAvatarUrl: user.avatar,
210
+ isDataUrl: true,
211
+ preferredColor: passportColor || 'auto'
212
+ }),
213
+ name: x.title
214
+ };
215
+ }),
216
+ onSelect: index => handleChange({
217
+ target: {
218
+ value: user.passportTypes[index].name
219
+ }
220
+ }),
221
+ defaultIndex: 0
222
+ })
223
+ }), /*#__PURE__*/_jsx(Box, {
224
+ textAlign: "center",
225
+ children: /*#__PURE__*/_jsx(Button, {
226
+ variant: "contained",
227
+ color: "primary",
228
+ onClick: () => onSelectPassport(),
229
+ disabled: !passport,
230
+ children: t('common.next')
231
+ })
232
+ })]
233
+ });
234
+ }
235
+ }, {
236
+ label: t('lostPassport.receivePassport'),
237
+ content: () => {
238
+ const extraParams = {
239
+ receiverDid: user.did,
240
+ passportName: passport,
241
+ teamDid: window?.blocklet?.did || ''
242
+ };
243
+ return /*#__PURE__*/_jsx(DidConnect, {
244
+ popup: true,
245
+ open: true,
246
+ hideCloseButton: true,
247
+ className: "connect",
248
+ action: "lost-passport-issue",
249
+ checkFn: api.get,
250
+ checkTimeout: 10 * 60 * 1000,
251
+ webWalletUrl: webWalletUrl,
252
+ onSuccess: onReceivePassport,
253
+ locale: locale,
254
+ messages: {
255
+ title: `${t('lostPassport.dialog.title')}`,
256
+ scan: t('lostPassport.dialog.scan'),
257
+ confirm: t('lostPassport.dialog.confirm'),
258
+ success: t('lostPassport.dialog.success')
259
+ },
260
+ extraParams: extraParams
261
+ });
262
+ }
263
+ }, {
264
+ label: t('common.complete'),
265
+ content: () => /*#__PURE__*/_jsxs(Box, {
266
+ textAlign: "center",
267
+ children: [/*#__PURE__*/_jsx(Box, {
268
+ mb: 3,
269
+ color: "success.main",
270
+ children: /*#__PURE__*/_jsx(CheckCircleIcon, {
271
+ style: {
272
+ fontSize: 60
273
+ }
274
+ })
275
+ }), /*#__PURE__*/_jsx(Typography, {
276
+ component: "p",
277
+ variant: "body1",
278
+ className: "subheader",
279
+ children: t('issuePassport.dialog.success')
280
+ }), /*#__PURE__*/_jsx(Button, {
281
+ style: {
282
+ marginTop: 40
283
+ },
284
+ variant: "contained",
285
+ color: "primary",
286
+ onClick: onUsePassport,
287
+ children: t('issuePassport.dialog.loginWithPassport')
288
+ })]
289
+ })
290
+ }];
291
+ return /*#__PURE__*/_jsx(Div, {
292
+ children: /*#__PURE__*/_jsxs("div", {
293
+ className: "stepper",
294
+ children: [/*#__PURE__*/_jsx(Stepper, {
295
+ className: "stepper-progress",
296
+ alternativeLabel: true,
297
+ activeStep: activeStep,
298
+ children: steps.map(({
299
+ label
300
+ }) => /*#__PURE__*/_jsx(Step, {
301
+ children: /*#__PURE__*/_jsx(StepLabel, {
302
+ StepIconComponent: ColorStepIcon,
303
+ children: label
304
+ })
305
+ }, label))
306
+ }), /*#__PURE__*/_jsx("div", {
307
+ className: "stepper-content",
308
+ children: steps[activeStep].content()
309
+ }), !success && /*#__PURE__*/_jsx(Box, {
310
+ textAlign: "center",
311
+ fontSize: 12,
312
+ children: /*#__PURE__*/_jsx(Link, {
313
+ to: "/",
314
+ style: {
315
+ color: '#4598FA'
316
+ },
317
+ children: t('lostPassport.return')
318
+ })
319
+ })]
320
+ })
321
+ });
322
+ }
323
+ const Div = styled(Container)`
324
+ padding-top: 46px;
325
+ padding-bottom: 46px;
326
+ height: 100%;
327
+ overflow: auto;
328
+ display: flex;
329
+ flex-direction: column;
330
+ align-items: center;
331
+ justify-content: center;
332
+ @media (max-width: ${props => props.theme.breakpoints.values.sm}px) {
333
+ display: block;
334
+ }
335
+ .header {
336
+ text-align: center;
337
+ margin-bottom: 24px;
338
+ }
339
+
340
+ .stepper {
341
+ padding: 24px;
342
+ height: auto;
343
+ width: 100%;
344
+ min-height: 640px;
345
+ display: flex;
346
+ flex-direction: column;
347
+
348
+ .stepper-progress {
349
+ padding: 0;
350
+ flex: 0;
351
+ margin-bottom: 24px;
352
+
353
+ .MuiStepLabel-label.MuiStepLabel-alternativeLabel {
354
+ margin-top: 8px;
355
+ }
356
+
357
+ .MuiStepConnector-alternativeLabel {
358
+ top: 24px;
359
+ }
360
+
361
+ .MuiStepConnector-lineHorizontal {
362
+ height: 3px;
363
+ border: none;
364
+ background-color: #eaeaf0;
365
+ border-radius: 1px;
366
+ }
367
+
368
+ .step-icon-w {
369
+ background-color: ${props => props.theme.palette.grey[500]};
370
+ z-index: 1;
371
+ color: ${props => props.theme.palette.common.white};
372
+ width: 50px;
373
+ height: 50px;
374
+ display: flex;
375
+ border-radius: 50%;
376
+ justify-content: center;
377
+ align-items: center;
378
+ .step-icon {
379
+ font-size: 30px;
380
+ }
381
+ }
382
+
383
+ .step-icon-w--active {
384
+ background-color: ${props => props.theme.palette.primary.main};
385
+ }
386
+
387
+ .step-icon-w--completed {
388
+ background-color: ${props => props.theme.palette.secondary.main};
389
+ }
390
+ }
391
+
392
+ .stepper-content {
393
+ padding: 0 64px;
394
+ flex: 1;
395
+ display: flex;
396
+ justify-content: center;
397
+ align-items: center;
398
+ margin-bottom: 24px;
399
+
400
+ .stepper-icon {
401
+ margin-left: 40px;
402
+ }
403
+
404
+ .stepper-auth {
405
+ padding: 0;
406
+
407
+ .auth-title {
408
+ margin-bottom: 16px;
409
+ }
410
+ }
411
+
412
+ .stepper-tip {
413
+ text-align: center;
414
+ margin-bottom: 16px;
415
+ }
416
+ @media (max-width: ${props => props.theme.breakpoints.values.sm}px) {
417
+ padding: 0;
418
+ }
419
+ }
420
+
421
+ .stepper-actions {
422
+ flex: 0;
423
+ text-align: right;
424
+ padding: 0 64px;
425
+ display: none;
426
+ .step-button {
427
+ margin-right: 8px;
428
+ }
429
+ }
430
+
431
+ .select-passport {
432
+ width: 80%;
433
+ @media (max-width: ${props => props.theme.breakpoints.values.sm}px) {
434
+ width: 100%;
435
+ }
436
+ }
437
+
438
+ .user-info {
439
+ .name {
440
+ font-weight: 500;
441
+ font-size: 18px;
442
+ line-height: 25px;
443
+ color: #222222;
444
+ }
445
+ }
446
+ }
447
+
448
+ .connect {
449
+ background: #fafafa;
450
+ }
451
+ `;
452
+ export default wrapLocale(LostPassport);
package/es/nav-logo.js ADDED
@@ -0,0 +1,219 @@
1
+ import PropTypes from 'prop-types';
2
+ import styled from '@emotion/styled';
3
+ import { jsx as _jsx } from "react/jsx-runtime";
4
+ import { Fragment as _Fragment } from "react/jsx-runtime";
5
+ import { jsxs as _jsxs } from "react/jsx-runtime";
6
+ export default function LogoContainer({
7
+ logo,
8
+ name,
9
+ subname,
10
+ previousData,
11
+ ...rest
12
+ }) {
13
+ let logoEle = /*#__PURE__*/_jsx(LogoImg, {
14
+ logo: logo
15
+ });
16
+ let nameEle = name;
17
+ let subnameEle = subname;
18
+ if (previousData.logo) {
19
+ logoEle = /*#__PURE__*/_jsxs(_Fragment, {
20
+ children: [/*#__PURE__*/_jsx(LogoImg, {
21
+ logo: logo,
22
+ className: "left-fade-in-ele"
23
+ }), /*#__PURE__*/_jsx(LogoImg, {
24
+ logo: previousData.logo,
25
+ className: "postion-abs left-fade-out-ele"
26
+ })]
27
+ });
28
+ }
29
+ if (previousData.name && previousData.name !== name) {
30
+ nameEle = /*#__PURE__*/_jsxs(_Fragment, {
31
+ children: [/*#__PURE__*/_jsx("span", {
32
+ className: "right-fade-in-ele",
33
+ style: {
34
+ display: 'inline-block'
35
+ },
36
+ children: name
37
+ }), /*#__PURE__*/_jsx("span", {
38
+ className: "postion-abs right-fade-out-ele",
39
+ children: previousData.name
40
+ })]
41
+ });
42
+ }
43
+ if (previousData.subname && previousData.subname !== subname) {
44
+ subnameEle = /*#__PURE__*/_jsxs(_Fragment, {
45
+ children: [/*#__PURE__*/_jsx("span", {
46
+ className: "right-fade-in-ele",
47
+ style: {
48
+ display: 'inline-block'
49
+ },
50
+ children: subname
51
+ }), /*#__PURE__*/_jsx("span", {
52
+ className: "postion-abs right-fade-out-ele",
53
+ children: previousData.subname
54
+ })]
55
+ });
56
+ }
57
+ return /*#__PURE__*/_jsx(Container, {
58
+ ...rest,
59
+ children: /*#__PURE__*/_jsxs("div", {
60
+ className: "logo-inner",
61
+ children: [/*#__PURE__*/_jsx("div", {
62
+ className: "logo-img-content",
63
+ children: logoEle
64
+ }), /*#__PURE__*/_jsxs("div", {
65
+ className: `logo-info ${!name && !subname ? 'zero-left' : ''}`,
66
+ children: [/*#__PURE__*/_jsx("div", {
67
+ className: "logo-name",
68
+ children: nameEle
69
+ }), /*#__PURE__*/_jsx("div", {
70
+ className: "logo-subname",
71
+ children: subnameEle
72
+ })]
73
+ })]
74
+ })
75
+ });
76
+ }
77
+ LogoContainer.propTypes = {
78
+ logo: PropTypes.element.isRequired,
79
+ name: PropTypes.string,
80
+ subname: PropTypes.string,
81
+ previousData: PropTypes.object
82
+ };
83
+ LogoContainer.defaultProps = {
84
+ name: '',
85
+ subname: '',
86
+ previousData: {
87
+ logo: '',
88
+ name: '',
89
+ subname: ''
90
+ }
91
+ };
92
+
93
+ // eslint-disable-next-line react/prop-types
94
+ function LogoImg({
95
+ logo,
96
+ ...rest
97
+ }) {
98
+ return /*#__PURE__*/_jsx(LogoImgDiv, {
99
+ ...rest,
100
+ children: logo
101
+ });
102
+ }
103
+ const LogoImgDiv = styled.div`
104
+ display: block;
105
+ > * {
106
+ display: block;
107
+ }
108
+ `;
109
+ const Container = styled.div`
110
+ position: relative;
111
+ display: block;
112
+
113
+ .logo-inner {
114
+ display: flex;
115
+ align-items: center;
116
+ height: 100%;
117
+ .logo-img-content {
118
+ position: relative;
119
+ display: block;
120
+ }
121
+ .logo-info {
122
+ display: flex;
123
+ flex-direction: column;
124
+ justify-content: center;
125
+ margin-left: 10px;
126
+ letter-spacing: 0.1px;
127
+ &.zero-left {
128
+ margin-left: 0%;
129
+ }
130
+ .logo-name {
131
+ position: relative;
132
+ line-height: 16px;
133
+ font-size: 16px;
134
+ color: #121319;
135
+ }
136
+ .logo-subname {
137
+ position: relative;
138
+ line-height: 13px;
139
+ font-size: 13px;
140
+ color: #7d8085;
141
+ }
142
+ }
143
+ }
144
+
145
+ .postion-abs {
146
+ position: absolute;
147
+ left: 0;
148
+ top: 0;
149
+ height: 100%;
150
+ }
151
+
152
+ .right-fade-out-ele {
153
+ animation: right-fade-out ease 0.5s;
154
+ animation-delay: 2s;
155
+ animation-fill-mode: forwards;
156
+ }
157
+
158
+ .right-fade-in-ele {
159
+ animation: right-fade-in ease 0.5s;
160
+ animation-delay: 2s;
161
+ animation-fill-mode: both;
162
+ }
163
+
164
+ @keyframes right-fade-out {
165
+ 0% {
166
+ opacity: 1;
167
+ transform: translate(0, 0);
168
+ }
169
+ 100% {
170
+ opacity: 0;
171
+ transform: translate(8px, 0);
172
+ }
173
+ }
174
+
175
+ @keyframes right-fade-in {
176
+ 0% {
177
+ opacity: 0;
178
+ transform: translate(8px, 0);
179
+ }
180
+ 100% {
181
+ opacity: 1;
182
+ transform: translate(0, 0);
183
+ }
184
+ }
185
+
186
+ .left-fade-out-ele {
187
+ animation: left-fade-out ease 0.5s;
188
+ animation-delay: 2s;
189
+ animation-fill-mode: forwards;
190
+ }
191
+
192
+ .left-fade-in-ele {
193
+ animation: left-fade-in ease 0.5s;
194
+ animation-delay: 2s;
195
+ animation-fill-mode: both;
196
+ }
197
+
198
+ @keyframes left-fade-out {
199
+ 0% {
200
+ opacity: 1;
201
+ transform: translate(0, 0);
202
+ }
203
+ 100% {
204
+ opacity: 0;
205
+ transform: translate(-8px, 0);
206
+ }
207
+ }
208
+
209
+ @keyframes left-fade-in {
210
+ 0% {
211
+ opacity: 0;
212
+ transform: translate(-8px, 0);
213
+ }
214
+ 100% {
215
+ opacity: 1;
216
+ transform: translate(0, 0);
217
+ }
218
+ }
219
+ `;
@@ -0,0 +1,43 @@
1
+ import PropTypes from 'prop-types';
2
+ import styled from '@emotion/styled';
3
+ import CloseIcon from '@mui/icons-material/Close';
4
+ import { jsx as _jsx } from "react/jsx-runtime";
5
+ import { jsxs as _jsxs } from "react/jsx-runtime";
6
+ export default function PassportTag(props) {
7
+ const {
8
+ passport,
9
+ onDelete,
10
+ ...rest
11
+ } = props;
12
+ return /*#__PURE__*/_jsxs(Tag, {
13
+ ...rest,
14
+ children: [passport.title || passport.name, ' ', !!onDelete && /*#__PURE__*/_jsx(CloseIcon, {
15
+ "data-cy": "delete-issuance",
16
+ className: "delete",
17
+ onClick: onDelete
18
+ })]
19
+ });
20
+ }
21
+ PassportTag.propTypes = {
22
+ passport: PropTypes.object.isRequired,
23
+ onDelete: PropTypes.func
24
+ };
25
+ PassportTag.defaultProps = {
26
+ onDelete: null
27
+ };
28
+ const Tag = styled.span`
29
+ display: inline-flex;
30
+ padding: 2px 8px;
31
+ background: ${props => props.theme.palette.primary.main};
32
+ border-radius: 100vw;
33
+ font-weight: 400;
34
+ font-size: 12px;
35
+ line-height: 22px;
36
+ color: #fff;
37
+ align-items: center;
38
+ .delete {
39
+ font-size: 1em;
40
+ margin-left: 6px;
41
+ cursor: pointer;
42
+ }
43
+ `;