@block-auth.io/angular 0.3.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/.turbo/turbo-build.log +7 -7
  2. package/.turbo/turbo-lint.log +4 -4
  3. package/.turbo/turbo-test.log +1400 -94
  4. package/.turbo/turbo-typecheck.log +19 -19
  5. package/CHANGELOG.md +46 -0
  6. package/package.json +3 -3
  7. package/src/lib/components/btns/btn-base-provider.component.test.ts +14 -0
  8. package/src/lib/components/btns/btn-base-provider.component.ts +7 -1
  9. package/src/lib/components/btns/btn-block-auth.component.test.ts +27 -1
  10. package/src/lib/components/btns/btn-block-auth.component.ts +6 -2
  11. package/src/lib/components/contents/content-signup.component.test.ts +8 -0
  12. package/src/lib/components/contents/content-signup.component.ts +15 -18
  13. package/src/lib/components/dds/dropdown-profile-btn.component.ts +5 -3
  14. package/src/lib/components/flow-block-auth.component.test.ts +2 -0
  15. package/src/lib/components/flow-block-auth.component.ts +10 -8
  16. package/src/lib/components/modals/modal-signin.component.ts +2 -2
  17. package/src/lib/components/modals/modal-signup.component.ts +1 -1
  18. package/src/lib/components/sections/internals/providers-buttons.component.ts +1 -11
  19. package/src/lib/components/sections/login-section.component.ts +4 -5
  20. package/src/lib/components/txns/internals/permissions-required-modal.component.ts +1 -1
  21. package/src/lib/components/txns/internals/solicited-data-modal.component.test.ts +39 -0
  22. package/src/lib/components/txns/internals/solicited-data-modal.component.ts +25 -10
  23. package/src/lib/components/txns/internals/txn.component.test.ts +13 -0
  24. package/src/lib/components/txns/internals/txn.component.ts +15 -23
  25. package/src/lib/components/txns/txns-overview.component.ts +49 -12
  26. package/src/lib/primitives/horizontal-loader.component.test.ts +3 -2
  27. package/src/lib/primitives/horizontal-loader.component.ts +15 -39
  28. package/src/lib/primitives/img-loader.component.test.ts +10 -0
  29. package/src/lib/primitives/img-loader.component.ts +5 -2
  30. package/src/lib/primitives/oval-spinner.component.test.ts +10 -2
  31. package/src/lib/primitives/oval-spinner.component.ts +35 -57
  32. package/src/lib/primitives/progressbar.component.test.ts +27 -11
  33. package/src/lib/primitives/progressbar.component.ts +24 -81
  34. package/src/lib/primitives/providersStyles.ts +0 -50
  35. package/src/lib/transitions.css +0 -4
@@ -1,93 +1,36 @@
1
- import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
1
+ import { ChangeDetectionStrategy, Component, input } from '@angular/core';
2
+
3
+ export type ProgressbarStep = 1 | 2 | 3;
2
4
 
3
- // El original orquesta 12
4
- // AnimationControls de framer-motion; siguiendo el port Vue, esa coreografía
5
- // se sustituye por un único porcentaje derivado de los mismos props (`percent`)
6
- // que revela una capa coloreada superpuesta a la de fondo mediante `clip-path`,
7
- // animado con `transition` CSS. El subrayado decorativo no se reproduce.
8
- //
9
- // `activeUnderlineWhenFillStep1`/`activeUnderlineWhenFillToStep2` se aceptan
10
- // por paridad de API pero no afectan a `percent` (solo controlaban el
11
- // subrayado). Prioridad de `percent`: gana el flag del paso más avanzado
12
- // (misma elección deliberada documentada en Progressbar.vue).
13
5
  @Component({
14
6
  selector: 'ba-progressbar',
15
7
  standalone: true,
16
8
  changeDetection: ChangeDetectionStrategy.OnPush,
17
9
  template: `
18
- <div class="bas-relative bas-flex bas-h-[54px] bas-w-60 bas-flex-row bas-items-center bas-justify-between">
19
- <!-- Fondo apagado (siempre visible) -->
20
- <svg height="30" width="30" style="z-index: 1" xmlns="http://www.w3.org/2000/svg">
21
- <path d="M4,15a11,11 0 1,0 22,0a11,11 0 1,0 -22,0" stroke="#acd4e4" stroke-width="5" fill="transparent" />
22
- </svg>
23
- <svg width="82" height="8" style="position: absolute; left: 26px; z-index: 0" xmlns="http://www.w3.org/2000/svg">
24
- <path fill="#c4e0ec" d="M0 0h90v10H0Z" />
25
- </svg>
26
- <svg height="30" width="30" style="z-index: 1" xmlns="http://www.w3.org/2000/svg">
27
- <path d="M4,15a11,11 0 1,0 22,0a11,11 0 1,0 -22,0" stroke="#acd4e4" stroke-width="5" fill="transparent" />
28
- </svg>
29
- <svg width="82" height="8" style="position: absolute; left: 130px; z-index: 0" xmlns="http://www.w3.org/2000/svg">
30
- <path fill="#c4e0ec" d="M0 0h90v10H0Z" />
31
- </svg>
32
- <svg height="30" width="30" style="z-index: 1" xmlns="http://www.w3.org/2000/svg">
33
- <path d="M4,15a11,11 0 1,0 22,0a11,11 0 1,0 -22,0" stroke="#acd4e4" stroke-width="5" fill="transparent" />
34
- </svg>
35
-
36
- <!-- Capa coloreada, revelada según percent -->
37
- <div
38
- class="bas-absolute bas-flex bas-h-full bas-w-full bas-flex-row bas-items-center bas-justify-between bas-progress-fill"
39
- [style.clip-path]="'inset(0 ' + (100 - percent()) + '% 0 0)'"
40
- data-testid="progressbar-fill"
41
- [attr.data-percent]="percent()"
42
- >
43
- <svg height="30" width="30" style="z-index: 1" xmlns="http://www.w3.org/2000/svg">
44
- <path d="M4,15a11,11 0 1,0 22,0a11,11 0 1,0 -22,0" stroke="#1961a4" stroke-width="5" fill="transparent" />
45
- <circle r="5" cx="15" cy="15" fill="#1961a4" />
46
- </svg>
47
- <svg width="84" height="8" style="position: absolute; left: 26px; z-index: 0" xmlns="http://www.w3.org/2000/svg">
48
- <path fill="#1961a4" d="M0 0h90v10H0Z" />
49
- </svg>
50
- <svg height="30" width="30" style="z-index: 1" xmlns="http://www.w3.org/2000/svg">
51
- <path d="M4,15a11,11 0 1,0 22,0a11,11 0 1,0 -22,0" stroke="#1961a4" stroke-width="5" fill="transparent" />
52
- <circle r="5" cx="15" cy="15" fill="#1961a4" />
53
- </svg>
54
- <svg width="84" height="8" style="position: absolute; left: 130px; z-index: 0" xmlns="http://www.w3.org/2000/svg">
55
- <path fill="#1961a4" d="M0 0h90v10H0Z" />
56
- </svg>
57
- <svg height="30" width="30" style="z-index: 1" xmlns="http://www.w3.org/2000/svg">
58
- <path d="M4,15a11,11 0 1,0 22,0a11,11 0 1,0 -22,0" stroke="#1961a4" stroke-width="5" fill="transparent" />
59
- <circle r="5" cx="15" cy="15" fill="#1961a4" />
60
- </svg>
61
- </div>
10
+ <div
11
+ class="bal-ba-stepper"
12
+ [attr.data-step]="step()"
13
+ data-testid="progressbar"
14
+ role="progressbar"
15
+ aria-valuemin="1"
16
+ aria-valuemax="3"
17
+ [attr.aria-valuenow]="step()"
18
+ >
19
+ <span class="bal-ba-stepper-track">
20
+ <span class="bal-ba-stepper-fill"></span>
21
+ </span>
22
+ @for (node of steps; track node) {
23
+ <span
24
+ class="bal-ba-stepper-node"
25
+ [attr.data-state]="node < step() ? 'done' : node === step() ? 'active' : 'pending'"
26
+ ></span>
27
+ }
28
+ <span class="bal-ba-stepper-indicator"></span>
62
29
  </div>
63
30
  `,
64
- styles: [
65
- `
66
- .bas-progress-fill {
67
- transition: clip-path 0.6s ease;
68
- }
69
- `,
70
- ],
71
31
  })
72
32
  export class ProgressbarComponent {
73
- step1 = input(false);
74
- step2 = input(false);
75
- step3 = input(false);
76
- goBackToStep1 = input(false);
77
- goBackToStep2 = input(false);
78
- fillStep1 = input(false);
79
- activeUnderlineWhenFillStep1 = input(false);
80
- fillToStep2 = input(false);
81
- activeUnderlineWhenFillToStep2 = input(false);
33
+ step = input.required<ProgressbarStep>();
82
34
 
83
- percent = computed(() => {
84
- if (this.step3()) return 100;
85
- if (this.step2()) return 50;
86
- if (this.step1()) return 15;
87
- if (this.goBackToStep2()) return 50;
88
- if (this.goBackToStep1()) return 15;
89
- if (this.fillToStep2()) return 50;
90
- if (this.fillStep1()) return 15;
91
- return 0;
92
- });
35
+ protected readonly steps: ProgressbarStep[] = [1, 2, 3];
93
36
  }
@@ -15,10 +15,6 @@ export interface ProviderStyle {
15
15
  loaderColor: string;
16
16
  /** Color base de marca. */
17
17
  colorBase: string;
18
- /** Clase `bas-*` de borde aplicada cuando el provider está seleccionado. */
19
- borderStyles: string;
20
- /** Clase `bas-*` de borde aplicada en hover. */
21
- hoverBorderStyles: string;
22
18
  }
23
19
 
24
20
  export const providersStyles: Record<string, ProviderStyle> = {
@@ -29,8 +25,6 @@ export const providersStyles: Record<string, ProviderStyle> = {
29
25
  imgBgColor: '#eff6ff',
30
26
  loaderColor: '#1961a4',
31
27
  colorBase: '#1961a4',
32
- borderStyles: 'bas-border-[var(--bal-primary-100)]',
33
- hoverBorderStyles: 'hover:bas-border-[var(--bal-primary-300)]',
34
28
  },
35
29
  google: {
36
30
  name: 'Google',
@@ -39,8 +33,6 @@ export const providersStyles: Record<string, ProviderStyle> = {
39
33
  imgBgColor: '#fef2f2',
40
34
  loaderColor: '#ef4444',
41
35
  colorBase: '#dc2626',
42
- borderStyles: 'bas-border-red-400',
43
- hoverBorderStyles: 'hover:bas-border-red-600',
44
36
  },
45
37
  metamask: {
46
38
  name: 'MetaMask',
@@ -49,8 +41,6 @@ export const providersStyles: Record<string, ProviderStyle> = {
49
41
  imgBgColor: '#fff7ed',
50
42
  loaderColor: '#f97316',
51
43
  colorBase: '#ea580c',
52
- borderStyles: 'bas-border-orange-400',
53
- hoverBorderStyles: 'hover:bas-border-orange-600',
54
44
  },
55
45
  microsoft: {
56
46
  name: 'Microsoft',
@@ -59,8 +49,6 @@ export const providersStyles: Record<string, ProviderStyle> = {
59
49
  imgBgColor: '#eff6ff',
60
50
  loaderColor: '#106ebe',
61
51
  colorBase: '#106ebe',
62
- borderStyles: 'bas-border-[#1d8dec]',
63
- hoverBorderStyles: 'hover:bas-border-[#106ebe]',
64
52
  },
65
53
  phantom: {
66
54
  name: 'Phantom',
@@ -69,8 +57,6 @@ export const providersStyles: Record<string, ProviderStyle> = {
69
57
  imgBgColor: '#faf5ff',
70
58
  loaderColor: '#9333ea',
71
59
  colorBase: '#9333ea',
72
- borderStyles: 'bas-border-purple-400',
73
- hoverBorderStyles: 'hover:bas-border-purple-600',
74
60
  },
75
61
  trustWallet: {
76
62
  name: 'Trust Wallet',
@@ -79,8 +65,6 @@ export const providersStyles: Record<string, ProviderStyle> = {
79
65
  imgBgColor: '#f0f9ff',
80
66
  loaderColor: '#0b69ff',
81
67
  colorBase: '#0b69ff',
82
- borderStyles: 'bas-border-blue-400',
83
- hoverBorderStyles: 'hover:bas-border-blue-600',
84
68
  },
85
69
  binance: {
86
70
  name: 'Binance',
@@ -89,8 +73,6 @@ export const providersStyles: Record<string, ProviderStyle> = {
89
73
  imgBgColor: '#f0f9ff',
90
74
  loaderColor: '#0b69ff',
91
75
  colorBase: '#0b69ff',
92
- borderStyles: 'bas-border-blue-400',
93
- hoverBorderStyles: 'hover:bas-border-blue-600',
94
76
  },
95
77
  uniswap: {
96
78
  name: 'Uniswap',
@@ -99,8 +81,6 @@ export const providersStyles: Record<string, ProviderStyle> = {
99
81
  imgBgColor: '#f0f9ff',
100
82
  loaderColor: '#0b69ff',
101
83
  colorBase: '#0b69ff',
102
- borderStyles: 'bas-border-blue-400',
103
- hoverBorderStyles: 'hover:bas-border-blue-600',
104
84
  },
105
85
  bitget: {
106
86
  name: 'Bitget',
@@ -109,8 +89,6 @@ export const providersStyles: Record<string, ProviderStyle> = {
109
89
  imgBgColor: '#f0f9ff',
110
90
  loaderColor: '#0b69ff',
111
91
  colorBase: '#0b69ff',
112
- borderStyles: 'bas-border-blue-400',
113
- hoverBorderStyles: 'hover:bas-border-blue-600',
114
92
  },
115
93
  legder: {
116
94
  name: 'Legder',
@@ -119,8 +97,6 @@ export const providersStyles: Record<string, ProviderStyle> = {
119
97
  imgBgColor: '#f0f9ff',
120
98
  loaderColor: '#0b69ff',
121
99
  colorBase: '#0b69ff',
122
- borderStyles: 'bas-border-blue-400',
123
- hoverBorderStyles: 'hover:bas-border-blue-600',
124
100
  },
125
101
  robinhood: {
126
102
  name: 'Robinhood',
@@ -129,8 +105,6 @@ export const providersStyles: Record<string, ProviderStyle> = {
129
105
  imgBgColor: '#f0f9ff',
130
106
  loaderColor: '#0b69ff',
131
107
  colorBase: '#0b69ff',
132
- borderStyles: 'bas-border-blue-400',
133
- hoverBorderStyles: 'hover:bas-border-blue-600',
134
108
  },
135
109
  blockchaincom: {
136
110
  name: 'Blockchain.com',
@@ -139,8 +113,6 @@ export const providersStyles: Record<string, ProviderStyle> = {
139
113
  imgBgColor: '#f0f9ff',
140
114
  loaderColor: '#0b69ff',
141
115
  colorBase: '#0b69ff',
142
- borderStyles: 'bas-border-blue-400',
143
- hoverBorderStyles: 'hover:bas-border-blue-600',
144
116
  },
145
117
  magiceden: {
146
118
  name: 'Magic Eden',
@@ -149,8 +121,6 @@ export const providersStyles: Record<string, ProviderStyle> = {
149
121
  imgBgColor: '#f0f9ff',
150
122
  loaderColor: '#0b69ff',
151
123
  colorBase: '#0b69ff',
152
- borderStyles: 'bas-border-blue-400',
153
- hoverBorderStyles: 'hover:bas-border-blue-600',
154
124
  },
155
125
  kraken: {
156
126
  name: 'Kraken',
@@ -159,8 +129,6 @@ export const providersStyles: Record<string, ProviderStyle> = {
159
129
  imgBgColor: '#f0f9ff',
160
130
  loaderColor: '#0b69ff',
161
131
  colorBase: '#0b69ff',
162
- borderStyles: 'bas-border-blue-400',
163
- hoverBorderStyles: 'hover:bas-border-blue-600',
164
132
  },
165
133
  coinbase: {
166
134
  name: 'Coinbase',
@@ -169,8 +137,6 @@ export const providersStyles: Record<string, ProviderStyle> = {
169
137
  imgBgColor: '#f0f9ff',
170
138
  loaderColor: '#0b69ff',
171
139
  colorBase: '#0b69ff',
172
- borderStyles: 'bas-border-blue-400',
173
- hoverBorderStyles: 'hover:bas-border-blue-600',
174
140
  },
175
141
  enjin: {
176
142
  name: 'Enjin',
@@ -179,8 +145,6 @@ export const providersStyles: Record<string, ProviderStyle> = {
179
145
  imgBgColor: '#f0f9ff',
180
146
  loaderColor: '#0b69ff',
181
147
  colorBase: '#0b69ff',
182
- borderStyles: 'bas-border-blue-400',
183
- hoverBorderStyles: 'hover:bas-border-blue-600',
184
148
  },
185
149
  coincircle: {
186
150
  name: 'Coincircle',
@@ -189,8 +153,6 @@ export const providersStyles: Record<string, ProviderStyle> = {
189
153
  imgBgColor: '#f0f9ff',
190
154
  loaderColor: '#0b69ff',
191
155
  colorBase: '#0b69ff',
192
- borderStyles: 'bas-border-blue-400',
193
- hoverBorderStyles: 'hover:bas-border-blue-600',
194
156
  },
195
157
  crossmint: {
196
158
  name: 'Crossmint',
@@ -199,8 +161,6 @@ export const providersStyles: Record<string, ProviderStyle> = {
199
161
  imgBgColor: '#f0f9ff',
200
162
  loaderColor: '#0b69ff',
201
163
  colorBase: '#0b69ff',
202
- borderStyles: 'bas-border-blue-400',
203
- hoverBorderStyles: 'hover:bas-border-blue-600',
204
164
  },
205
165
  ronin: {
206
166
  name: 'Ronin',
@@ -209,8 +169,6 @@ export const providersStyles: Record<string, ProviderStyle> = {
209
169
  imgBgColor: '#f0f9ff',
210
170
  loaderColor: '#0b69ff',
211
171
  colorBase: '#0b69ff',
212
- borderStyles: 'bas-border-blue-400',
213
- hoverBorderStyles: 'hover:bas-border-blue-600',
214
172
  },
215
173
  thirdweb: {
216
174
  name: 'Thirdweb',
@@ -219,8 +177,6 @@ export const providersStyles: Record<string, ProviderStyle> = {
219
177
  imgBgColor: '#f0f9ff',
220
178
  loaderColor: '#0b69ff',
221
179
  colorBase: '#0b69ff',
222
- borderStyles: 'bas-border-blue-400',
223
- hoverBorderStyles: 'hover:bas-border-blue-600',
224
180
  },
225
181
  wemix: {
226
182
  name: 'Wemix',
@@ -229,8 +185,6 @@ export const providersStyles: Record<string, ProviderStyle> = {
229
185
  imgBgColor: '#f0f9ff',
230
186
  loaderColor: '#0b69ff',
231
187
  colorBase: '#0b69ff',
232
- borderStyles: 'bas-border-blue-400',
233
- hoverBorderStyles: 'hover:bas-border-blue-600',
234
188
  },
235
189
  bitbox: {
236
190
  name: 'Bitbox',
@@ -239,8 +193,6 @@ export const providersStyles: Record<string, ProviderStyle> = {
239
193
  imgBgColor: '#f0f9ff',
240
194
  loaderColor: '#0b69ff',
241
195
  colorBase: '#0b69ff',
242
- borderStyles: 'bas-border-blue-400',
243
- hoverBorderStyles: 'hover:bas-border-blue-600',
244
196
  },
245
197
  moonpay: {
246
198
  name: 'Moonpay',
@@ -249,8 +201,6 @@ export const providersStyles: Record<string, ProviderStyle> = {
249
201
  imgBgColor: '#f0f9ff',
250
202
  loaderColor: '#0b69ff',
251
203
  colorBase: '#0b69ff',
252
- borderStyles: 'bas-border-blue-400',
253
- hoverBorderStyles: 'hover:bas-border-blue-600',
254
204
  },
255
205
  };
256
206
 
@@ -17,7 +17,3 @@
17
17
  .bas-expand-enter-active, .bas-expand-leave-active { transition: max-height 0.25s ease, opacity 0.25s ease; overflow: hidden; }
18
18
  .bas-expand-enter-from, .bas-expand-leave-to { max-height: 0; opacity: 0; }
19
19
  .bas-expand-enter-to, .bas-expand-leave-from { max-height: 600px; }
20
-
21
- /* spinner oval — sustituye a react-loader-spinner */
22
- @keyframes bas-spin { to { transform: rotate(360deg); } }
23
- .bas-oval-spin { animation: bas-spin 0.8s linear infinite; }