@asteby/storefront-react 0.18.0 → 0.20.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.
package/dist/account.css CHANGED
@@ -38,3 +38,206 @@
38
38
  cursor: pointer;
39
39
  font: inherit;
40
40
  }
41
+
42
+ /*
43
+ * Order screens (<OrderList>, <OrderProgress>, <NextActionBar>, <ShipmentCard>, <InvoiceList>, <PendingPaymentCard>,
44
+ * <RefundList>). Optional and neutral: no brand colors, everything reads currentColor. Variables:
45
+ * --sf-account-muted secondary text --sf-account-line hairlines and card borders
46
+ * --sf-account-gap spacing between blocks --sf-account-radius card radius
47
+ * --sf-tone-done / --sf-tone-current / --sf-tone-problem / --sf-tone-muted semantic tones (default: currentColor)
48
+ * --sf-skeleton-height height of a loading card (fixed: no layout shift)
49
+ * Contrast of the tones is the store's responsibility: they are applied to TEXT, so pick colors with 4.5:1 or better.
50
+ */
51
+ [data-sf-orders-list],
52
+ [data-sf-pending] ul,
53
+ [data-sf-invoice-list] {
54
+ list-style: none;
55
+ margin: 0;
56
+ padding: 0;
57
+ display: grid;
58
+ gap: var(--sf-account-gap, 1rem);
59
+ }
60
+ [data-sf-order],
61
+ [data-sf-shipment],
62
+ [data-sf-voucher],
63
+ [data-sf-invoice-doc],
64
+ [data-sf-refund],
65
+ [data-sf-payment] {
66
+ border: 1px solid var(--sf-account-line, color-mix(in srgb, currentColor 22%, transparent));
67
+ border-radius: var(--sf-account-radius, 0.5rem);
68
+ padding: var(--sf-account-gap, 1rem);
69
+ }
70
+ [data-sf-order] > header,
71
+ [data-sf-shipment-header],
72
+ [data-sf-voucher] > header {
73
+ display: flex;
74
+ flex-wrap: wrap;
75
+ align-items: center;
76
+ justify-content: space-between;
77
+ gap: 0.5rem 1rem;
78
+ }
79
+ [data-sf-order] h2,
80
+ [data-sf-order] h3,
81
+ [data-sf-order] h4 {
82
+ margin: 0;
83
+ }
84
+ [data-sf-order-meta],
85
+ [data-sf-shipment-dates],
86
+ [data-sf-invoice-note],
87
+ [data-sf-voucher-expiry] {
88
+ color: var(--sf-account-muted, color-mix(in srgb, currentColor 72%, transparent));
89
+ }
90
+ [data-sf-tone='done'] {
91
+ color: var(--sf-tone-done, inherit);
92
+ }
93
+ [data-sf-tone='current'] {
94
+ color: var(--sf-tone-current, inherit);
95
+ }
96
+ [data-sf-tone='problem'] {
97
+ color: var(--sf-tone-problem, #b42318);
98
+ font-weight: 600;
99
+ }
100
+ [data-sf-tone='muted'] {
101
+ color: var(--sf-tone-muted, var(--sf-account-muted, inherit));
102
+ }
103
+ [data-sf-order-badge],
104
+ [data-sf-shipment-state],
105
+ [data-sf-voucher-badge] {
106
+ font-weight: 600;
107
+ }
108
+
109
+ /* progress: a vertical list on phones, a row from 40rem */
110
+ [data-sf-progress-list] {
111
+ list-style: none;
112
+ margin: 0;
113
+ padding: 0;
114
+ display: grid;
115
+ gap: 0.75rem;
116
+ }
117
+ [data-sf-step] {
118
+ display: grid;
119
+ grid-template-columns: 1.5rem 1fr;
120
+ align-items: baseline;
121
+ column-gap: 0.5rem;
122
+ }
123
+ [data-sf-step] time {
124
+ grid-column: 2;
125
+ color: var(--sf-account-muted, color-mix(in srgb, currentColor 72%, transparent));
126
+ font-size: 0.875em;
127
+ }
128
+ [data-sf-step-state='pending'] {
129
+ color: var(--sf-account-muted, color-mix(in srgb, currentColor 72%, transparent));
130
+ }
131
+ [data-sf-step-state='current'] [data-sf-step-label],
132
+ [data-sf-step-state='problem'] [data-sf-step-label] {
133
+ font-weight: 700;
134
+ }
135
+ [data-sf-step-state='problem'] {
136
+ color: var(--sf-tone-problem, #b42318);
137
+ }
138
+ @media (min-width: 40rem) {
139
+ [data-sf-progress-list] {
140
+ grid-auto-flow: column;
141
+ grid-auto-columns: 1fr;
142
+ }
143
+ [data-sf-step] {
144
+ grid-template-columns: 1fr;
145
+ justify-items: start;
146
+ }
147
+ [data-sf-step] time {
148
+ grid-column: 1;
149
+ }
150
+ }
151
+
152
+ /* actions: every target at least 44x44 (WCAG 2.5.5 AAA; 2.5.8 AA asks 24x24) */
153
+ [data-sf-action-bar] {
154
+ display: flex;
155
+ flex-wrap: wrap;
156
+ gap: 0.5rem 0.75rem;
157
+ }
158
+ [data-sf-action],
159
+ [data-sf-copy],
160
+ [data-sf-retry],
161
+ [data-sf-shipment-toggle],
162
+ [data-sf-shipment-track],
163
+ [data-sf-shipment-label],
164
+ [data-sf-invoice-download],
165
+ [data-sf-voucher-print],
166
+ [data-sf-voucher-download],
167
+ [data-sf-orders-more] {
168
+ display: inline-flex;
169
+ align-items: center;
170
+ justify-content: center;
171
+ min-height: 44px;
172
+ min-width: 44px;
173
+ padding-inline: 0.75rem;
174
+ }
175
+ [data-sf-action]:focus-visible,
176
+ [data-sf-copy]:focus-visible,
177
+ [data-sf-retry]:focus-visible,
178
+ [data-sf-order-link]:focus-visible,
179
+ [data-sf-shipment-toggle]:focus-visible,
180
+ [data-sf-shipment-label]:focus-visible,
181
+ [data-sf-shipment-track]:focus-visible,
182
+ [data-sf-invoice-download]:focus-visible,
183
+ [data-sf-voucher-print]:focus-visible,
184
+ [data-sf-voucher-download]:focus-visible,
185
+ [data-sf-orders-more]:focus-visible {
186
+ outline: 3px solid currentColor;
187
+ outline-offset: 2px;
188
+ }
189
+
190
+ /* shipment events */
191
+ [data-sf-shipment-events] {
192
+ list-style: none;
193
+ margin: 0;
194
+ padding: 0;
195
+ display: grid;
196
+ gap: 0.5rem;
197
+ }
198
+ [data-sf-event-description],
199
+ [data-sf-event-location] {
200
+ color: var(--sf-account-muted, color-mix(in srgb, currentColor 72%, transparent));
201
+ }
202
+
203
+ /* voucher */
204
+ [data-sf-voucher-value] {
205
+ font: 700 1.25rem/1.3 ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
206
+ letter-spacing: 0.04em;
207
+ overflow-wrap: anywhere;
208
+ user-select: all;
209
+ }
210
+ [data-sf-voucher-barcode] {
211
+ overflow-x: auto;
212
+ background: #fff;
213
+ padding: 0.5rem;
214
+ }
215
+ [data-sf-voucher-barcode] svg {
216
+ display: block;
217
+ margin-inline: auto;
218
+ max-width: 100%;
219
+ height: auto;
220
+ }
221
+ [data-sf-voucher-actions] {
222
+ display: flex;
223
+ flex-wrap: wrap;
224
+ gap: 0.5rem 0.75rem;
225
+ }
226
+
227
+ /* loading: fixed height so nothing jumps when the real cards arrive */
228
+ [data-sf-skeleton] {
229
+ min-height: var(--sf-skeleton-height, 11rem);
230
+ border-radius: var(--sf-account-radius, 0.5rem);
231
+ background: color-mix(in srgb, currentColor 10%, transparent);
232
+ animation: sf-account-pulse 1.4s ease-in-out infinite;
233
+ }
234
+ @keyframes sf-account-pulse {
235
+ 50% {
236
+ opacity: 0.55;
237
+ }
238
+ }
239
+ @media (prefers-reduced-motion: reduce) {
240
+ [data-sf-skeleton] {
241
+ animation: none;
242
+ }
243
+ }