@pollar/react 0.11.4-rc.2 → 0.11.4

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.
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  React bindings for [Pollar](https://pollar.xyz) — drop-in authentication UI, transaction modals, and hooks for
4
4
  Stellar and Solana applications.
5
5
 
6
- > **0.11.4** (candidate `0.11.4-rc.1` on the `next` tag, which requires `@pollar/core@^0.11.4-rc.1`).
6
+ > **0.11.4** (requires `@pollar/core@^0.11.4`).
7
7
  > **KYC by ramp corridor**: `<RampWidget>` lists routes locked by a requirement step and opens that
8
8
  > step - `<KycModal>`, `<RequirementFormModal>`, `<RegistryCheckModal>` or `<ProviderRegistrationModal>`
9
9
  > (all exported) - then quotes again; `openKycModal()` without a corridor walks the app's own KYC
@@ -32,6 +32,14 @@ Stellar and Solana applications.
32
32
  > pointless KYC poll), and three failures that printed as raw error codes get sentences.
33
33
  > `RampWidgetTemplateProps` gains an optional `onboardingStatus`.
34
34
  >
35
+ > **Cards**: `<CardModal>`, opened with `openCardModal()` from `usePollar()`, walks the user through
36
+ > the card provider's steps, sign-up and issuing, then shows the card with the app's logo and card
37
+ > label, its balance and movements, funding from the wallet (each funding's step while it is in
38
+ > flight) and the number revealed on the device. **Wallets on demand**: `usePollar()` exposes
39
+ > `hasWallet` and `createWallet`, and signed in without a wallet `<WalletButton>` offers Create wallet
40
+ > to an app that creates wallets on demand. The modals that act on the session close when it ends,
41
+ > and form fields are checked before sending.
42
+ >
35
43
  > Earlier: **0.11.3** required `@pollar/core@^0.11.3`. A **pre-built `PollarClient`
36
44
  > passed to `PollarProvider` no longer loses passkey support**: the provider installs the
37
45
  > browser passkey ceremony on every path (via core's new `setPasskeyDefaults()`), and an
package/dist/index.css CHANGED
@@ -1279,6 +1279,9 @@ html.dark .pollar-send-inline-action {
1279
1279
  font-size: 0.75rem;
1280
1280
  color: var(--pollar-error-text, #dc2626);
1281
1281
  }
1282
+ .pollar-input[aria-invalid=true] {
1283
+ border-color: var(--pollar-error-text, #dc2626);
1284
+ }
1282
1285
  .pollar-form-textarea {
1283
1286
  height: auto;
1284
1287
  min-height: 88px;
@@ -2828,6 +2831,196 @@ html.dark .pollar-send-inline-action {
2828
2831
  font-weight: 600;
2829
2832
  }
2830
2833
 
2834
+ /* src/components/card-modal/CardModal.css */
2835
+ .pollar-card-modal {
2836
+ max-width: 460px;
2837
+ }
2838
+ .pollar-card-visual {
2839
+ position: relative;
2840
+ aspect-ratio: 1.586;
2841
+ border-radius: 16px;
2842
+ padding: 1.25rem;
2843
+ color: #fff;
2844
+ background:
2845
+ linear-gradient(
2846
+ 135deg,
2847
+ var(--pollar-accent) 0%,
2848
+ color-mix(in srgb, var(--pollar-accent) 55%, #000) 100%);
2849
+ box-shadow: 0 12px 32px color-mix(in srgb, var(--pollar-accent) 35%, transparent);
2850
+ display: flex;
2851
+ flex-direction: column;
2852
+ justify-content: space-between;
2853
+ margin-bottom: 1rem;
2854
+ }
2855
+ .pollar-card-visual-top {
2856
+ display: flex;
2857
+ justify-content: space-between;
2858
+ align-items: flex-start;
2859
+ font-size: 0.8125rem;
2860
+ font-weight: 600;
2861
+ opacity: 0.9;
2862
+ }
2863
+ .pollar-card-brand {
2864
+ display: inline-flex;
2865
+ align-items: center;
2866
+ gap: 0.5rem;
2867
+ min-width: 0;
2868
+ }
2869
+ .pollar-card-brand-logo {
2870
+ width: 24px;
2871
+ height: 24px;
2872
+ border-radius: 6px;
2873
+ object-fit: contain;
2874
+ background: rgba(255, 255, 255, 0.9);
2875
+ padding: 2px;
2876
+ flex-shrink: 0;
2877
+ }
2878
+ .pollar-card-visual-chip {
2879
+ width: 36px;
2880
+ height: 26px;
2881
+ border-radius: 6px;
2882
+ background:
2883
+ linear-gradient(
2884
+ 135deg,
2885
+ #f5d98a,
2886
+ #c9a24a);
2887
+ }
2888
+ .pollar-card-visual-number {
2889
+ font-family:
2890
+ ui-monospace,
2891
+ SFMono-Regular,
2892
+ Menlo,
2893
+ monospace;
2894
+ font-size: 1.25rem;
2895
+ letter-spacing: 0.14em;
2896
+ word-break: break-all;
2897
+ }
2898
+ .pollar-card-visual-bottom {
2899
+ display: flex;
2900
+ justify-content: space-between;
2901
+ align-items: flex-end;
2902
+ font-size: 0.75rem;
2903
+ }
2904
+ .pollar-card-visual-bottom span {
2905
+ display: block;
2906
+ opacity: 0.75;
2907
+ font-size: 0.625rem;
2908
+ letter-spacing: 0.08em;
2909
+ text-transform: uppercase;
2910
+ }
2911
+ .pollar-card-visual-bottom strong {
2912
+ font-family:
2913
+ ui-monospace,
2914
+ SFMono-Regular,
2915
+ Menlo,
2916
+ monospace;
2917
+ font-weight: 600;
2918
+ font-size: 0.875rem;
2919
+ }
2920
+ .pollar-card-status {
2921
+ padding: 0.125rem 0.5rem;
2922
+ border-radius: 999px;
2923
+ background: rgba(255, 255, 255, 0.2);
2924
+ font-size: 0.6875rem;
2925
+ text-transform: capitalize;
2926
+ }
2927
+ .pollar-card-balance {
2928
+ display: grid;
2929
+ grid-template-columns: repeat(3, 1fr);
2930
+ gap: 0.5rem;
2931
+ margin-bottom: 1rem;
2932
+ }
2933
+ .pollar-card-balance div {
2934
+ padding: 0.625rem;
2935
+ border-radius: 10px;
2936
+ background: color-mix(in srgb, var(--pollar-muted) 10%, transparent);
2937
+ }
2938
+ .pollar-card-balance span {
2939
+ display: block;
2940
+ font-size: 0.6875rem;
2941
+ color: var(--pollar-muted);
2942
+ }
2943
+ .pollar-card-balance strong {
2944
+ font-size: 0.9375rem;
2945
+ }
2946
+ .pollar-card-tx {
2947
+ display: flex;
2948
+ justify-content: space-between;
2949
+ gap: 0.75rem;
2950
+ padding: 0.625rem 0;
2951
+ border-top: 1px solid color-mix(in srgb, var(--pollar-muted) 20%, transparent);
2952
+ font-size: 0.8125rem;
2953
+ }
2954
+ .pollar-card-funding-title {
2955
+ display: inline-flex;
2956
+ align-items: center;
2957
+ gap: 0.4rem;
2958
+ }
2959
+ .pollar-card-tx-meta {
2960
+ display: block;
2961
+ font-size: 0.6875rem;
2962
+ color: var(--pollar-muted);
2963
+ }
2964
+ .pollar-card-tx-amount {
2965
+ white-space: nowrap;
2966
+ font-variant-numeric: tabular-nums;
2967
+ }
2968
+ .pollar-card-tx-amount[data-direction=credit] {
2969
+ color: #15803d;
2970
+ }
2971
+ .pollar-card-grid {
2972
+ display: grid;
2973
+ grid-template-columns: 1fr 1fr;
2974
+ gap: 0 0.75rem;
2975
+ }
2976
+ .pollar-card-grid .pollar-card-grid-full {
2977
+ grid-column: 1 / -1;
2978
+ }
2979
+ .pollar-card-terms {
2980
+ display: flex;
2981
+ gap: 0.5rem;
2982
+ align-items: flex-start;
2983
+ font-size: 0.8125rem;
2984
+ margin: 0.5rem 0 1rem;
2985
+ }
2986
+ .pollar-card-terms input {
2987
+ margin-top: 0.2rem;
2988
+ }
2989
+ .pollar-card-link {
2990
+ color: var(--pollar-accent);
2991
+ font-weight: 600;
2992
+ text-decoration: underline;
2993
+ background: none;
2994
+ border: 0;
2995
+ padding: 0;
2996
+ font: inherit;
2997
+ cursor: pointer;
2998
+ }
2999
+ .pollar-card-section-title {
3000
+ margin: 1rem 0 0.25rem;
3001
+ font-size: 0.8125rem;
3002
+ font-weight: 600;
3003
+ color: var(--pollar-muted);
3004
+ }
3005
+ .pollar-card-deposit {
3006
+ padding: 0.75rem;
3007
+ border-radius: 10px;
3008
+ background: color-mix(in srgb, var(--pollar-muted) 10%, transparent);
3009
+ font-size: 0.8125rem;
3010
+ margin-bottom: 0.75rem;
3011
+ }
3012
+ .pollar-card-deposit code {
3013
+ display: block;
3014
+ margin: 0.375rem 0;
3015
+ font-size: 0.75rem;
3016
+ word-break: break-all;
3017
+ }
3018
+ .pollar-card-note {
3019
+ font-size: 0.75rem;
3020
+ color: var(--pollar-muted);
3021
+ margin: 0.5rem 0 0;
3022
+ }
3023
+
2831
3024
  /* src/components/sessions-modal/SessionsModal.css */
2832
3025
  .pollar-sessions-modal {
2833
3026
  display: flex;