@rakeyshgidwani/roger-ui-bank-theme-stan-design 0.1.6 → 0.1.7
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/CHANGELOG.md +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.esm.js +18 -1
- package/dist/index.js +18 -1
- package/dist/setupTests.d.ts +124 -0
- package/dist/setupTests.esm.js +122 -0
- package/dist/setupTests.js +122 -0
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/src/index.css +1046 -0
- package/src/index.ts +18 -0
- package/src/plugins/theme-css-generator.ts +354 -0
- package/src/setupTests.ts +124 -0
- package/src/stories/README.md +39 -0
- package/src/stories/components/ThemeDebugger.tsx +143 -0
- package/src/stories/index.ts +29 -0
- package/src/stories/storybook-theme-imports.css +51 -0
- package/src/styles/base/fonts.css +30 -0
- package/src/styles/base/generated-theme-variables.css +573 -0
- package/src/styles/base/index.css +7 -0
- package/src/styles/base/reset.css +48 -0
- package/src/styles/base/theme.css +1068 -0
- package/src/styles/base/typography.css +68 -0
- package/src/styles/base/variables.css +5 -0
- package/src/styles/components/CLAUDE.md +62 -0
- package/src/styles/components/base/badge.css +428 -0
- package/src/styles/components/base/button.css +774 -0
- package/src/styles/components/base/card.css +601 -0
- package/src/styles/components/base/checkbox.css +442 -0
- package/src/styles/components/base/index.css +9 -0
- package/src/styles/components/base/input.css +887 -0
- package/src/styles/components/base/label.css +296 -0
- package/src/styles/components/data-display/chart.css +353 -0
- package/src/styles/components/data-display/data-grid.css +619 -0
- package/src/styles/components/data-display/index.css +9 -0
- package/src/styles/components/data-display/list.css +560 -0
- package/src/styles/components/data-display/table.css +498 -0
- package/src/styles/components/data-display/timeline.css +764 -0
- package/src/styles/components/data-display/tree.css +881 -0
- package/src/styles/components/feedback/alert.css +358 -0
- package/src/styles/components/feedback/index.css +7 -0
- package/src/styles/components/feedback/progress.css +435 -0
- package/src/styles/components/feedback/skeleton.css +337 -0
- package/src/styles/components/feedback/toast.css +564 -0
- package/src/styles/components/index.css +17 -0
- package/src/styles/components/navigation/breadcrumb.css +465 -0
- package/src/styles/components/navigation/index.css +9 -0
- package/src/styles/components/navigation/menu.css +572 -0
- package/src/styles/components/navigation/pagination.css +635 -0
- package/src/styles/components/navigation/sidebar.css +807 -0
- package/src/styles/components/navigation/stepper.css +519 -0
- package/src/styles/components/navigation/tabs.css +404 -0
- package/src/styles/components/overlay/backdrop.css +243 -0
- package/src/styles/components/overlay/index.css +8 -0
- package/src/styles/components/overlay/modal.css +482 -0
- package/src/styles/components/overlay/popover.css +607 -0
- package/src/styles/components/overlay/portal.css +213 -0
- package/src/styles/components/overlay/tooltip.css +488 -0
- package/src/styles/generated-theme-variables.css +573 -0
- package/src/styles/index.css +5 -0
- package/src/styles/layers/index.css +54 -0
- package/src/styles/layers/overrides.css +108 -0
- package/src/styles/layers/validation.css +159 -0
- package/src/styles/layers/validation.js +310 -0
- package/src/styles/themes/default.css +450 -0
- package/src/styles/themes/enterprise.css +370 -0
- package/src/styles/themes/harvey.css +436 -0
- package/src/styles/themes/index.css +4 -0
- package/src/styles/themes/stan-design.css +572 -0
- package/src/styles/utilities/advanced-transition-system.css +467 -0
- package/src/styles/utilities/battery-conscious-animations.css +289 -0
- package/src/styles/utilities/enterprise-mobile-experience.css +817 -0
- package/src/styles/utilities/hardware-acceleration.css +121 -0
- package/src/styles/utilities/index.css +20 -0
- package/src/styles/utilities/mobile-skeleton-loading.css +596 -0
- package/src/styles/utilities/semantic-input-system.css +451 -0
- package/src/styles/utilities/touch-friendly-interface.css +247 -0
- package/src/styles/utilities/touch-optimization.css +165 -0
- package/src/test-utils/index.ts +7 -0
- package/src/test-utils/theme-testing.tsx +219 -0
- package/src/testing/test-automation.ts +627 -0
- package/src/testing/test-utils.tsx +367 -0
|
@@ -0,0 +1,451 @@
|
|
|
1
|
+
/* Semantic Input System & Mobile Keyboard Optimization Styles */
|
|
2
|
+
|
|
3
|
+
/* Base Input Styles */
|
|
4
|
+
.semantic-input {
|
|
5
|
+
position: relative;
|
|
6
|
+
display: block;
|
|
7
|
+
width: 100%;
|
|
8
|
+
min-height: 44px; /* Touch-friendly minimum size */
|
|
9
|
+
padding: 12px 16px;
|
|
10
|
+
font-size: 16px; /* Prevent zoom on iOS */
|
|
11
|
+
line-height: 1.5;
|
|
12
|
+
color: var(--cs-text-primary);
|
|
13
|
+
background-color: var(--cs-bg-primary);
|
|
14
|
+
border: 2px solid var(--cs-border);
|
|
15
|
+
border-radius: 8px;
|
|
16
|
+
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
17
|
+
outline: none;
|
|
18
|
+
box-sizing: border-box;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.semantic-input:focus {
|
|
22
|
+
border-color: var(--cs-primary);
|
|
23
|
+
box-shadow: 0 0 0 3px rgba(var(--cs-primary-rgb), 0.1);
|
|
24
|
+
transform: translateY(-1px);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.semantic-input:hover {
|
|
28
|
+
border-color: var(--cs-accent);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/* Input Type Variants */
|
|
32
|
+
.semantic-input[type="email"] {
|
|
33
|
+
inputmode: email;
|
|
34
|
+
autocomplete: email;
|
|
35
|
+
autocapitalize: none;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.semantic-input[type="tel"] {
|
|
39
|
+
inputmode: tel;
|
|
40
|
+
autocomplete: tel;
|
|
41
|
+
autocapitalize: none;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.semantic-input[type="number"] {
|
|
45
|
+
inputmode: decimal;
|
|
46
|
+
autocomplete: off;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.semantic-input[type="search"] {
|
|
50
|
+
inputmode: search;
|
|
51
|
+
autocomplete: off;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.semantic-input[type="url"] {
|
|
55
|
+
inputmode: url;
|
|
56
|
+
autocomplete: url;
|
|
57
|
+
autocapitalize: none;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/* Mobile Keyboard Optimization */
|
|
61
|
+
.semantic-input-mobile {
|
|
62
|
+
/* iOS-specific optimizations */
|
|
63
|
+
-webkit-appearance: none;
|
|
64
|
+
-webkit-tap-highlight-color: transparent;
|
|
65
|
+
|
|
66
|
+
/* Android-specific optimizations */
|
|
67
|
+
-webkit-user-select: text;
|
|
68
|
+
user-select: text;
|
|
69
|
+
|
|
70
|
+
/* Touch-friendly sizing */
|
|
71
|
+
min-height: 48px;
|
|
72
|
+
padding: 14px 18px;
|
|
73
|
+
|
|
74
|
+
/* Prevent zoom on focus */
|
|
75
|
+
font-size: 16px;
|
|
76
|
+
|
|
77
|
+
/* Smooth scrolling */
|
|
78
|
+
-webkit-overflow-scrolling: touch;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/* Touch-Friendly Behavior */
|
|
82
|
+
.semantic-input-touch {
|
|
83
|
+
/* Touch target optimization */
|
|
84
|
+
min-height: 44px;
|
|
85
|
+
min-width: 44px;
|
|
86
|
+
|
|
87
|
+
/* Touch feedback */
|
|
88
|
+
transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.semantic-input-touch:active {
|
|
92
|
+
transform: scale(0.98);
|
|
93
|
+
background-color: var(--cs-bg-secondary);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.semantic-input-touch:hover {
|
|
97
|
+
transform: translateY(-2px);
|
|
98
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/* High Contrast Mode Support */
|
|
102
|
+
@media (prefers-contrast: high) {
|
|
103
|
+
.semantic-input {
|
|
104
|
+
border-width: 3px;
|
|
105
|
+
border-color: var(--cs-text-primary);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.semantic-input:focus {
|
|
109
|
+
border-color: var(--cs-accent);
|
|
110
|
+
box-shadow: 0 0 0 4px var(--cs-accent);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/* Reduced Motion Support */
|
|
115
|
+
@media (prefers-reduced-motion: reduce) {
|
|
116
|
+
.semantic-input,
|
|
117
|
+
.semantic-input-touch {
|
|
118
|
+
transition: none;
|
|
119
|
+
transform: none;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.semantic-input:focus,
|
|
123
|
+
.semantic-input-touch:hover {
|
|
124
|
+
transform: none;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/* Focus Management */
|
|
129
|
+
.semantic-input:focus-visible {
|
|
130
|
+
outline: 3px solid var(--cs-primary);
|
|
131
|
+
outline-offset: 2px;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.semantic-input-focus-trap {
|
|
135
|
+
position: relative;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.semantic-input-focus-trap::before {
|
|
139
|
+
content: '';
|
|
140
|
+
position: absolute;
|
|
141
|
+
top: -4px;
|
|
142
|
+
left: -4px;
|
|
143
|
+
right: -4px;
|
|
144
|
+
bottom: -4px;
|
|
145
|
+
border: 2px solid transparent;
|
|
146
|
+
border-radius: 12px;
|
|
147
|
+
pointer-events: none;
|
|
148
|
+
transition: border-color 0.2s ease;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.semantic-input-focus-trap:focus-within::before {
|
|
152
|
+
border-color: var(--cs-primary);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/* Accessibility Enhancements */
|
|
156
|
+
.semantic-input-aria {
|
|
157
|
+
/* Screen reader optimizations */
|
|
158
|
+
aria-label: attr(aria-label);
|
|
159
|
+
aria-describedby: attr(aria-describedby);
|
|
160
|
+
aria-invalid: attr(aria-invalid);
|
|
161
|
+
aria-required: attr(aria-required);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/* Skip Links */
|
|
165
|
+
.semantic-skip-link {
|
|
166
|
+
position: absolute;
|
|
167
|
+
top: -40px;
|
|
168
|
+
left: 6px;
|
|
169
|
+
background: var(--cs-primary);
|
|
170
|
+
color: white;
|
|
171
|
+
padding: 8px 16px;
|
|
172
|
+
text-decoration: none;
|
|
173
|
+
border-radius: 4px;
|
|
174
|
+
z-index: 1000;
|
|
175
|
+
transition: top 0.3s ease;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.semantic-skip-link:focus {
|
|
179
|
+
top: 6px;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/* Input Groups */
|
|
183
|
+
.semantic-input-group {
|
|
184
|
+
display: flex;
|
|
185
|
+
flex-direction: column;
|
|
186
|
+
gap: 16px;
|
|
187
|
+
margin-bottom: 24px;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.semantic-input-group-row {
|
|
191
|
+
display: flex;
|
|
192
|
+
gap: 16px;
|
|
193
|
+
align-items: flex-start;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.semantic-input-group-row .semantic-input {
|
|
197
|
+
flex: 1;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/* Input Labels */
|
|
201
|
+
.semantic-input-label {
|
|
202
|
+
display: block;
|
|
203
|
+
margin-bottom: 8px;
|
|
204
|
+
font-weight: 600;
|
|
205
|
+
color: var(--cs-text-primary);
|
|
206
|
+
font-size: 14px;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.semantic-input-label.required::after {
|
|
210
|
+
content: ' *';
|
|
211
|
+
color: var(--cs-error);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/* Input Helpers */
|
|
215
|
+
.semantic-input-helper {
|
|
216
|
+
margin-top: 4px;
|
|
217
|
+
font-size: 12px;
|
|
218
|
+
color: var(--cs-text-secondary);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.semantic-input-error {
|
|
222
|
+
margin-top: 4px;
|
|
223
|
+
font-size: 12px;
|
|
224
|
+
color: var(--cs-error);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.semantic-input-success {
|
|
228
|
+
margin-top: 4px;
|
|
229
|
+
font-size: 12px;
|
|
230
|
+
color: var(--cs-success);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/* Input States */
|
|
234
|
+
.semantic-input[aria-invalid="true"] {
|
|
235
|
+
border-color: var(--cs-error);
|
|
236
|
+
background-color: rgba(var(--cs-error-rgb), 0.05);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.semantic-input[aria-invalid="true"]:focus {
|
|
240
|
+
border-color: var(--cs-error);
|
|
241
|
+
box-shadow: 0 0 0 3px rgba(var(--cs-error-rgb), 0.1);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.semantic-input[disabled] {
|
|
245
|
+
opacity: 0.6;
|
|
246
|
+
cursor: not-allowed;
|
|
247
|
+
background-color: var(--cs-bg-secondary);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.semantic-input[readonly] {
|
|
251
|
+
background-color: var(--cs-bg-secondary);
|
|
252
|
+
cursor: default;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/* Mobile-Specific Optimizations */
|
|
256
|
+
@media (max-width: 768px) {
|
|
257
|
+
.semantic-input {
|
|
258
|
+
min-height: 48px;
|
|
259
|
+
padding: 16px 20px;
|
|
260
|
+
font-size: 16px;
|
|
261
|
+
border-radius: 12px;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.semantic-input-group-row {
|
|
265
|
+
flex-direction: column;
|
|
266
|
+
gap: 12px;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.semantic-input-group-row .semantic-input {
|
|
270
|
+
width: 100%;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/* Tablet Optimizations */
|
|
275
|
+
@media (min-width: 769px) and (max-width: 1024px) {
|
|
276
|
+
.semantic-input {
|
|
277
|
+
min-height: 46px;
|
|
278
|
+
padding: 14px 18px;
|
|
279
|
+
border-radius: 10px;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/* Desktop Enhancements */
|
|
284
|
+
@media (min-width: 1025px) {
|
|
285
|
+
.semantic-input:hover {
|
|
286
|
+
border-color: var(--cs-accent);
|
|
287
|
+
transform: translateY(-1px);
|
|
288
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.semantic-input:focus {
|
|
292
|
+
transform: translateY(-2px);
|
|
293
|
+
box-shadow: 0 4px 16px rgba(var(--cs-primary-rgb), 0.15);
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
/* Dark Theme Support */
|
|
298
|
+
@media (prefers-color-scheme: dark) {
|
|
299
|
+
.semantic-input {
|
|
300
|
+
background-color: var(--cs-bg-secondary);
|
|
301
|
+
border-color: var(--cs-border);
|
|
302
|
+
color: var(--cs-text-primary);
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.semantic-input:focus {
|
|
306
|
+
background-color: var(--cs-bg-primary);
|
|
307
|
+
border-color: var(--cs-primary);
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
/* High DPI Display Support */
|
|
312
|
+
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
|
|
313
|
+
.semantic-input {
|
|
314
|
+
border-width: 1px;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.semantic-input:focus {
|
|
318
|
+
border-width: 2px;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
/* Print Styles */
|
|
323
|
+
@media print {
|
|
324
|
+
.semantic-input {
|
|
325
|
+
border: 1px solid #000;
|
|
326
|
+
background: transparent;
|
|
327
|
+
color: #000;
|
|
328
|
+
box-shadow: none;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.semantic-input:focus {
|
|
332
|
+
outline: 2px solid #000;
|
|
333
|
+
outline-offset: 2px;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
/* Animation Keyframes */
|
|
338
|
+
@keyframes semanticInputFocus {
|
|
339
|
+
0% {
|
|
340
|
+
transform: scale(1);
|
|
341
|
+
box-shadow: 0 0 0 0 rgba(var(--cs-primary-rgb), 0.4);
|
|
342
|
+
}
|
|
343
|
+
50% {
|
|
344
|
+
transform: scale(1.02);
|
|
345
|
+
box-shadow: 0 0 0 8px rgba(var(--cs-primary-rgb), 0);
|
|
346
|
+
}
|
|
347
|
+
100% {
|
|
348
|
+
transform: scale(1);
|
|
349
|
+
box-shadow: 0 0 0 0 rgba(var(--cs-primary-rgb), 0);
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
@keyframes semanticInputError {
|
|
354
|
+
0%, 100% {
|
|
355
|
+
transform: translateX(0);
|
|
356
|
+
}
|
|
357
|
+
25% {
|
|
358
|
+
transform: translateX(-4px);
|
|
359
|
+
}
|
|
360
|
+
75% {
|
|
361
|
+
transform: translateX(4px);
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
/* Error Animation */
|
|
366
|
+
.semantic-input[aria-invalid="true"]:focus {
|
|
367
|
+
animation: semanticInputError 0.3s ease-in-out;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
/* Success State */
|
|
371
|
+
.semantic-input[data-valid="true"] {
|
|
372
|
+
border-color: var(--cs-success);
|
|
373
|
+
background-color: rgba(var(--cs-success-rgb), 0.05);
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
.semantic-input[data-valid="true"]:focus {
|
|
377
|
+
border-color: var(--cs-success);
|
|
378
|
+
box-shadow: 0 0 0 3px rgba(var(--cs-success-rgb), 0.1);
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
/* Loading State */
|
|
382
|
+
.semantic-input[data-loading="true"] {
|
|
383
|
+
position: relative;
|
|
384
|
+
color: transparent;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
.semantic-input[data-loading="true"]::after {
|
|
388
|
+
content: '';
|
|
389
|
+
position: absolute;
|
|
390
|
+
top: 50%;
|
|
391
|
+
left: 50%;
|
|
392
|
+
width: 20px;
|
|
393
|
+
height: 20px;
|
|
394
|
+
margin: -10px 0 0 -10px;
|
|
395
|
+
border: 2px solid var(--cs-border);
|
|
396
|
+
border-top-color: var(--cs-primary);
|
|
397
|
+
border-radius: 50%;
|
|
398
|
+
animation: spin 1s linear infinite;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
@keyframes spin {
|
|
402
|
+
to {
|
|
403
|
+
transform: rotate(360deg);
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
/* Responsive Typography */
|
|
408
|
+
.semantic-input {
|
|
409
|
+
font-size: clamp(14px, 2.5vw, 16px);
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
/* Touch Device Optimizations */
|
|
413
|
+
@media (hover: none) and (pointer: coarse) {
|
|
414
|
+
.semantic-input {
|
|
415
|
+
min-height: 48px;
|
|
416
|
+
padding: 16px 20px;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
.semantic-input:active {
|
|
420
|
+
transform: scale(0.98);
|
|
421
|
+
background-color: var(--cs-bg-secondary);
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
/* Keyboard Navigation Indicators */
|
|
426
|
+
.semantic-input:focus-visible {
|
|
427
|
+
outline: 3px solid var(--cs-primary);
|
|
428
|
+
outline-offset: 2px;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
/* Voice Control Support */
|
|
432
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
433
|
+
.semantic-input[data-voice-active="true"] {
|
|
434
|
+
animation: semanticInputFocus 0.6s ease-out;
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
/* Performance Optimizations */
|
|
439
|
+
.semantic-input {
|
|
440
|
+
will-change: transform, border-color, box-shadow;
|
|
441
|
+
contain: layout style paint;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
/* Battery Optimization */
|
|
445
|
+
@media (prefers-reduced-motion: reduce) {
|
|
446
|
+
.semantic-input {
|
|
447
|
+
will-change: auto;
|
|
448
|
+
contain: none;
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
/* Story 13: Touch-Friendly Interface & 44px Target Compliance */
|
|
2
|
+
|
|
3
|
+
/* ===== 44px Touch Target Compliance ===== */
|
|
4
|
+
.touch-target {
|
|
5
|
+
min-height: 44px;
|
|
6
|
+
min-width: 44px;
|
|
7
|
+
touch-action: manipulation;
|
|
8
|
+
-webkit-tap-highlight-color: transparent;
|
|
9
|
+
-webkit-touch-callout: none;
|
|
10
|
+
-webkit-user-select: none;
|
|
11
|
+
user-select: none;
|
|
12
|
+
cursor: pointer;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.touch-target-large {
|
|
16
|
+
min-height: 48px;
|
|
17
|
+
min-width: 48px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.touch-target-extra-large {
|
|
21
|
+
min-height: 56px;
|
|
22
|
+
min-width: 56px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* Touch target spacing */
|
|
26
|
+
.touch-spacing {
|
|
27
|
+
margin: 8px;
|
|
28
|
+
padding: 12px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.touch-spacing-compact {
|
|
32
|
+
margin: 4px;
|
|
33
|
+
padding: 8px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.touch-spacing-generous {
|
|
37
|
+
margin: 12px;
|
|
38
|
+
padding: 16px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* ===== Touch-Friendly Interface Design ===== */
|
|
42
|
+
.touch-friendly-button {
|
|
43
|
+
@apply touch-target;
|
|
44
|
+
@apply touch-spacing;
|
|
45
|
+
@apply bg-cs-primary text-white;
|
|
46
|
+
@apply rounded-lg font-medium;
|
|
47
|
+
@apply transition-all duration-200 ease-out;
|
|
48
|
+
@apply hover:bg-cs-primary-hover active:bg-cs-primary-active;
|
|
49
|
+
@apply focus:outline-none focus:ring-2 focus:ring-cs-primary focus:ring-offset-2;
|
|
50
|
+
@apply disabled:opacity-50 disabled:cursor-not-allowed;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.touch-friendly-button-secondary {
|
|
54
|
+
@apply touch-target;
|
|
55
|
+
@apply touch-spacing;
|
|
56
|
+
@apply bg-cs-secondary text-cs-text-primary;
|
|
57
|
+
@apply rounded-lg font-medium;
|
|
58
|
+
@apply transition-all duration-200 ease-out;
|
|
59
|
+
@apply hover:bg-cs-secondary-hover active:bg-cs-secondary-active;
|
|
60
|
+
@apply focus:outline-none focus:ring-2 focus:ring-cs-secondary focus:ring-offset-2;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.touch-friendly-input {
|
|
64
|
+
@apply touch-target;
|
|
65
|
+
@apply touch-spacing-compact;
|
|
66
|
+
@apply bg-cs-surface-bg border border-cs-border;
|
|
67
|
+
@apply rounded-lg text-cs-text-primary;
|
|
68
|
+
@apply transition-all duration-200 ease-out;
|
|
69
|
+
@apply focus:outline-none focus:ring-2 focus:ring-cs-primary focus:border-cs-primary;
|
|
70
|
+
@apply placeholder:text-cs-text-secondary;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.touch-friendly-card {
|
|
74
|
+
@apply touch-target;
|
|
75
|
+
@apply touch-spacing;
|
|
76
|
+
@apply bg-cs-surface-bg border border-cs-border;
|
|
77
|
+
@apply rounded-lg shadow-sm;
|
|
78
|
+
@apply transition-all duration-200 ease-out;
|
|
79
|
+
@apply hover:shadow-md active:shadow-lg;
|
|
80
|
+
@apply focus:outline-none focus:ring-2 focus:ring-cs-primary;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* ===== Smooth Touch Interactions ===== */
|
|
84
|
+
.touch-interaction {
|
|
85
|
+
touch-action: manipulation;
|
|
86
|
+
-webkit-tap-highlight-color: transparent;
|
|
87
|
+
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.touch-feedback {
|
|
91
|
+
transform: scale(0.98);
|
|
92
|
+
transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.touch-feedback:active {
|
|
96
|
+
transform: scale(0.95);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.touch-ripple {
|
|
100
|
+
position: relative;
|
|
101
|
+
overflow: hidden;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.touch-ripple::after {
|
|
105
|
+
content: '';
|
|
106
|
+
position: absolute;
|
|
107
|
+
top: 50%;
|
|
108
|
+
left: 50%;
|
|
109
|
+
width: 0;
|
|
110
|
+
height: 0;
|
|
111
|
+
border-radius: 50%;
|
|
112
|
+
background: rgba(255, 255, 255, 0.3);
|
|
113
|
+
transform: translate(-50%, -50%);
|
|
114
|
+
transition: width 0.3s, height 0.3s;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.touch-ripple:active::after {
|
|
118
|
+
width: 200px;
|
|
119
|
+
height: 200px;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/* ===== Performance Optimization ===== */
|
|
123
|
+
.touch-performance {
|
|
124
|
+
will-change: transform;
|
|
125
|
+
backface-visibility: hidden;
|
|
126
|
+
transform: translateZ(0);
|
|
127
|
+
-webkit-transform: translateZ(0);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.touch-optimized {
|
|
131
|
+
touch-action: manipulation;
|
|
132
|
+
-webkit-overflow-scrolling: touch;
|
|
133
|
+
overscroll-behavior: contain;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/* ===== Accessibility Compliance ===== */
|
|
137
|
+
.touch-accessible {
|
|
138
|
+
@apply touch-target;
|
|
139
|
+
@apply focus:outline-none focus:ring-2 focus:ring-cs-primary focus:ring-offset-2;
|
|
140
|
+
@apply aria-pressed:bg-cs-primary aria-pressed:text-white;
|
|
141
|
+
@apply aria-expanded:bg-cs-secondary aria-expanded:text-cs-text-primary;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.touch-screen-reader {
|
|
145
|
+
@apply sr-only;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/* ===== Touch Gesture Support ===== */
|
|
149
|
+
.touch-gesture {
|
|
150
|
+
touch-action: pan-x pan-y;
|
|
151
|
+
-webkit-overflow-scrolling: touch;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.touch-gesture-horizontal {
|
|
155
|
+
touch-action: pan-x;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.touch-gesture-vertical {
|
|
159
|
+
touch-action: pan-y;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.touch-gesture-zoom {
|
|
163
|
+
touch-action: pinch-zoom;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/* ===== Touch State Indicators ===== */
|
|
167
|
+
.touch-state-hover {
|
|
168
|
+
@apply hover:bg-cs-hover-bg hover:border-cs-primary;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.touch-state-active {
|
|
172
|
+
@apply active:bg-cs-active-bg active:border-cs-primary;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.touch-state-focus {
|
|
176
|
+
@apply focus:bg-cs-focus-bg focus:border-cs-primary;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.touch-state-disabled {
|
|
180
|
+
@apply disabled:opacity-50 disabled:cursor-not-allowed;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/* ===== Responsive Touch Design ===== */
|
|
184
|
+
@media (max-width: 768px) {
|
|
185
|
+
.touch-target {
|
|
186
|
+
min-height: 48px;
|
|
187
|
+
min-width: 48px;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.touch-spacing {
|
|
191
|
+
margin: 12px;
|
|
192
|
+
padding: 16px;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.touch-spacing-compact {
|
|
196
|
+
margin: 8px;
|
|
197
|
+
padding: 12px;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
@media (max-width: 480px) {
|
|
202
|
+
.touch-target {
|
|
203
|
+
min-height: 52px;
|
|
204
|
+
min-width: 52px;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.touch-spacing {
|
|
208
|
+
margin: 16px;
|
|
209
|
+
padding: 20px;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/* ===== Touch Animation Performance ===== */
|
|
214
|
+
.touch-animation-optimized {
|
|
215
|
+
will-change: transform, opacity;
|
|
216
|
+
transform: translateZ(0);
|
|
217
|
+
-webkit-transform: translateZ(0);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.touch-animation-smooth {
|
|
221
|
+
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.touch-animation-fast {
|
|
225
|
+
transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/* ===== Touch Feedback States ===== */
|
|
229
|
+
.touch-success {
|
|
230
|
+
@apply bg-cs-success text-white;
|
|
231
|
+
@apply hover:bg-cs-success-hover active:bg-cs-success-active;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.touch-warning {
|
|
235
|
+
@apply bg-cs-warning text-white;
|
|
236
|
+
@apply hover:bg-cs-warning-hover active:bg-cs-warning-active;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.touch-error {
|
|
240
|
+
@apply bg-cs-error text-white;
|
|
241
|
+
@apply hover:bg-cs-error-hover active:bg-cs-error-active;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.touch-info {
|
|
245
|
+
@apply bg-cs-info text-white;
|
|
246
|
+
@apply hover:bg-cs-info-hover active:bg-cs-info-active;
|
|
247
|
+
}
|