@12-apps/payments-frontend 2.0.0 → 3.0.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.
@@ -0,0 +1,166 @@
1
+ /**
2
+ * The payments screen's own palette and geometry, taken verbatim from the
3
+ * design prototype.
4
+ *
5
+ * Local rather than theme-level on purpose. `@repo/spa-shared/theme` says it in
6
+ * as many words — "re-deriving them here would quietly restyle every admin
7
+ * screen from a function nobody thinks of as owning that" — and the platform
8
+ * primary (`#6366F1`) is a decision already made for the rest of the app. This
9
+ * screen is a designed surface with its own greens, ambers and hairlines, and
10
+ * matching it must not move a single pixel anywhere else.
11
+ *
12
+ * Every value here is a hex the prototype states, not an approximation: a
13
+ * "pixel perfect" screen that rounds its own line colour to `divider` is a
14
+ * screen that looks nearly right and reviews as wrong.
15
+ */
16
+ export const T = {
17
+ ink: '#111318',
18
+ ink2: '#3d4350',
19
+ ink3: '#6b7280',
20
+ ink4: '#9aa1ad',
21
+ line: '#e4e7ec',
22
+ line2: '#eef0f4',
23
+ bg: '#ffffff',
24
+ bg2: '#f7f8fa',
25
+
26
+ brand: '#5b5bd6',
27
+ brandInk: '#4a4ac4',
28
+ brandSoft: '#eeeefc',
29
+ brandLine: '#c9c9f2',
30
+
31
+ ok: '#0f7a4d',
32
+ okSoft: '#e8f6ef',
33
+ okLine: '#bfe5d3',
34
+ okInk: '#0b5c3a',
35
+
36
+ warn: '#b45309',
37
+ warnSoft: '#fdf1e3',
38
+ warnLine: '#f3d9b5',
39
+ warnInk: '#7c3d06',
40
+
41
+ bad: '#c02626',
42
+ badSoft: '#fdeceb',
43
+ badLine: '#f5c6c2',
44
+ badInk: '#8f1d1d',
45
+
46
+ info: '#1d6fa5',
47
+ infoSoft: '#e8f3fb',
48
+ infoLine: '#bfdcf0',
49
+ infoInk: '#14496b',
50
+
51
+ mono: '"SFMono-Regular",ui-monospace,Menlo,Consolas,monospace',
52
+ } as const;
53
+
54
+ /** The card that bounds one provider: hairline, 12px, nothing clipped. */
55
+ export const CARD_SX = {
56
+ border: `1px solid ${T.line}`,
57
+ borderRadius: '12px',
58
+ background: T.bg,
59
+ overflow: 'hidden',
60
+ } as const;
61
+
62
+ /**
63
+ * A step's panel — the bordered block a single step lives in.
64
+ *
65
+ * `overflow: hidden` matters: the action bar below sticks to its bottom edge
66
+ * and would otherwise paint over the rounded corner.
67
+ */
68
+ export const PANEL_SX = {
69
+ border: `1px solid ${T.line}`,
70
+ borderRadius: '11px',
71
+ overflow: 'hidden',
72
+ mx: '20px',
73
+ mb: '20px',
74
+ } as const;
75
+
76
+ /**
77
+ * The action bar: the primary control, always the last thing in the block the
78
+ * owner just filled.
79
+ *
80
+ * Sticky rather than merely last, so on a long step (the four credential boxes,
81
+ * the card form) the button the owner is working toward stays on screen instead
82
+ * of being something they have to go and find.
83
+ */
84
+ export const BAR_SX = {
85
+ position: 'sticky',
86
+ bottom: 0,
87
+ background: 'rgba(255,255,255,.94)',
88
+ backdropFilter: 'blur(6px)',
89
+ borderTop: `1px solid ${T.line}`,
90
+ px: '18px',
91
+ py: '12px',
92
+ display: 'flex',
93
+ alignItems: 'center',
94
+ gap: '12px',
95
+ flexWrap: 'wrap',
96
+ } as const;
97
+
98
+ /** The sentence beside the button — why it is enabled, or what just happened. */
99
+ export const BAR_MSG_SX = {
100
+ fontSize: '12.5px',
101
+ color: T.ink3,
102
+ flex: 1,
103
+ minWidth: '140px',
104
+ lineHeight: 1.4,
105
+ } as const;
106
+
107
+ /** Primary: the one thing this step is for. */
108
+ export const BTN_PRIMARY_SX = {
109
+ borderRadius: '8px',
110
+ px: '18px',
111
+ py: '10px',
112
+ fontSize: '13.5px',
113
+ fontWeight: 650,
114
+ textTransform: 'none',
115
+ boxShadow: 'none',
116
+ background: T.brand,
117
+ color: '#fff',
118
+ '&:hover': { background: T.brandInk, boxShadow: 'none' },
119
+ '&.Mui-disabled': { background: '#c9cad6', color: '#fff' },
120
+ } as const;
121
+
122
+ /** Secondary: a real alternative, not a lesser primary. */
123
+ export const BTN_SECONDARY_SX = {
124
+ borderRadius: '8px',
125
+ px: '18px',
126
+ py: '10px',
127
+ fontSize: '13.5px',
128
+ fontWeight: 650,
129
+ textTransform: 'none',
130
+ background: T.bg,
131
+ border: `1px solid ${T.line}`,
132
+ color: T.ink2,
133
+ '&:hover': { borderColor: T.ink4, background: T.bg },
134
+ } as const;
135
+
136
+ /**
137
+ * Destructive, stated quietly.
138
+ *
139
+ * "Remover conexão" sits beside the step's own button and must not compete with
140
+ * it — an owner reaches this deliberately or not at all, and a red filled button
141
+ * on every step is an invitation to misclick.
142
+ */
143
+ export const BTN_QUIET_DANGER_SX = {
144
+ background: 'none',
145
+ border: 0,
146
+ color: T.bad,
147
+ px: '6px',
148
+ py: '10px',
149
+ fontSize: '13.5px',
150
+ fontWeight: 600,
151
+ textTransform: 'none',
152
+ '&:hover': { background: 'none', textDecoration: 'underline' },
153
+ } as const;
154
+
155
+ /** An inline text control — the way between the two connection paths. */
156
+ export const LINKISH_SX = {
157
+ background: 'none',
158
+ border: 0,
159
+ color: T.brand,
160
+ fontSize: '12.5px',
161
+ p: 0,
162
+ minWidth: 0,
163
+ textTransform: 'none',
164
+ verticalAlign: 'baseline',
165
+ '&:hover': { background: 'none', textDecoration: 'underline' },
166
+ } as const;
package/src/index.ts CHANGED
@@ -56,9 +56,9 @@ export {
56
56
  // hand-composing path is unchanged.
57
57
  // ---------------------------------------------------------------------------
58
58
  export { createPaymentFlows } from './flows/create-payment-flows';
59
- export {
60
- type CheckoutCopyFE,
61
- } from './flows/copy';
59
+ // A type and nothing else now: `DEFAULT_CHECKOUT_COPY_FE` used to sit beside it
60
+ // and was the only value this module ever published (FUT-760).
61
+ export type { CheckoutCopyFE } from './flows/copy';
62
62
  export {
63
63
  type BoundCheckoutClient,
64
64
  type BuyerDetailsProps,