@a11ypros/a11y-ui-components 1.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.
- package/dist/components/Button/Button.css +259 -0
- package/dist/components/Button/Button.d.ts +37 -0
- package/dist/components/Button/Button.d.ts.map +1 -0
- package/dist/components/Button/Button.js +52 -0
- package/dist/components/Button/index.d.ts +3 -0
- package/dist/components/Button/index.d.ts.map +1 -0
- package/dist/components/Button/index.js +1 -0
- package/dist/components/DataTable/DataTable.css +132 -0
- package/dist/components/DataTable/DataTable.d.ts +71 -0
- package/dist/components/DataTable/DataTable.d.ts.map +1 -0
- package/dist/components/DataTable/DataTable.js +122 -0
- package/dist/components/DataTable/index.d.ts +3 -0
- package/dist/components/DataTable/index.d.ts.map +1 -0
- package/dist/components/DataTable/index.js +1 -0
- package/dist/components/Form/Checkbox.css +46 -0
- package/dist/components/Form/Checkbox.d.ts +36 -0
- package/dist/components/Form/Checkbox.d.ts.map +1 -0
- package/dist/components/Form/Checkbox.js +39 -0
- package/dist/components/Form/Fieldset.css +43 -0
- package/dist/components/Form/Fieldset.d.ts +33 -0
- package/dist/components/Form/Fieldset.d.ts.map +1 -0
- package/dist/components/Form/Fieldset.js +34 -0
- package/dist/components/Form/Input.css +76 -0
- package/dist/components/Form/Input.d.ts +37 -0
- package/dist/components/Form/Input.d.ts.map +1 -0
- package/dist/components/Form/Input.js +41 -0
- package/dist/components/Form/Label.css +13 -0
- package/dist/components/Form/Label.d.ts +30 -0
- package/dist/components/Form/Label.d.ts.map +1 -0
- package/dist/components/Form/Label.js +30 -0
- package/dist/components/Form/Radio.css +81 -0
- package/dist/components/Form/Radio.d.ts +53 -0
- package/dist/components/Form/Radio.d.ts.map +1 -0
- package/dist/components/Form/Radio.js +39 -0
- package/dist/components/Form/Select.css +69 -0
- package/dist/components/Form/Select.d.ts +51 -0
- package/dist/components/Form/Select.d.ts.map +1 -0
- package/dist/components/Form/Select.js +49 -0
- package/dist/components/Form/Textarea.css +79 -0
- package/dist/components/Form/Textarea.d.ts +44 -0
- package/dist/components/Form/Textarea.d.ts.map +1 -0
- package/dist/components/Form/Textarea.js +43 -0
- package/dist/components/Form/index.d.ts +8 -0
- package/dist/components/Form/index.d.ts.map +1 -0
- package/dist/components/Form/index.js +7 -0
- package/dist/components/Link/Link.css +70 -0
- package/dist/components/Link/Link.d.ts +34 -0
- package/dist/components/Link/Link.d.ts.map +1 -0
- package/dist/components/Link/Link.js +48 -0
- package/dist/components/Link/index.d.ts +3 -0
- package/dist/components/Link/index.d.ts.map +1 -0
- package/dist/components/Link/index.js +1 -0
- package/dist/components/Modal/Modal.css +118 -0
- package/dist/components/Modal/Modal.d.ts +64 -0
- package/dist/components/Modal/Modal.d.ts.map +1 -0
- package/dist/components/Modal/Modal.js +108 -0
- package/dist/components/Modal/index.d.ts +3 -0
- package/dist/components/Modal/index.d.ts.map +1 -0
- package/dist/components/Modal/index.js +1 -0
- package/dist/components/Tabs/Tabs.css +132 -0
- package/dist/components/Tabs/Tabs.d.ts +63 -0
- package/dist/components/Tabs/Tabs.d.ts.map +1 -0
- package/dist/components/Tabs/Tabs.js +134 -0
- package/dist/components/Tabs/index.d.ts +3 -0
- package/dist/components/Tabs/index.d.ts.map +1 -0
- package/dist/components/Tabs/index.js +1 -0
- package/dist/components/Toast/Toast.css +100 -0
- package/dist/components/Toast/Toast.d.ts +59 -0
- package/dist/components/Toast/Toast.d.ts.map +1 -0
- package/dist/components/Toast/Toast.js +91 -0
- package/dist/components/Toast/ToastProvider.css +48 -0
- package/dist/components/Toast/ToastProvider.d.ts +22 -0
- package/dist/components/Toast/ToastProvider.d.ts.map +1 -0
- package/dist/components/Toast/ToastProvider.js +33 -0
- package/dist/components/Toast/index.d.ts +5 -0
- package/dist/components/Toast/index.d.ts.map +1 -0
- package/dist/components/Toast/index.js +2 -0
- package/dist/hooks/useAriaLive.d.ts +9 -0
- package/dist/hooks/useAriaLive.d.ts.map +1 -0
- package/dist/hooks/useAriaLive.js +39 -0
- package/dist/hooks/useFocusReturn.d.ts +9 -0
- package/dist/hooks/useFocusReturn.d.ts.map +1 -0
- package/dist/hooks/useFocusReturn.js +33 -0
- package/dist/hooks/useFocusTrap.d.ts +9 -0
- package/dist/hooks/useFocusTrap.d.ts.map +1 -0
- package/dist/hooks/useFocusTrap.js +68 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +25 -0
- package/dist/styles/components.css +33 -0
- package/dist/styles/global.css +289 -0
- package/dist/styles/index.d.ts +3 -0
- package/dist/styles/index.d.ts.map +1 -0
- package/dist/styles/index.js +1 -0
- package/dist/tokens/breakpoints.d.ts +25 -0
- package/dist/tokens/breakpoints.d.ts.map +1 -0
- package/dist/tokens/breakpoints.js +23 -0
- package/dist/tokens/colors.d.ts +81 -0
- package/dist/tokens/colors.d.ts.map +1 -0
- package/dist/tokens/colors.js +86 -0
- package/dist/tokens/index.d.ts +6 -0
- package/dist/tokens/index.d.ts.map +1 -0
- package/dist/tokens/index.js +5 -0
- package/dist/tokens/motion.d.ts +30 -0
- package/dist/tokens/motion.d.ts.map +1 -0
- package/dist/tokens/motion.js +34 -0
- package/dist/tokens/spacing.d.ts +22 -0
- package/dist/tokens/spacing.d.ts.map +1 -0
- package/dist/tokens/spacing.js +20 -0
- package/dist/tokens/theme.d.ts +159 -0
- package/dist/tokens/theme.d.ts.map +1 -0
- package/dist/tokens/theme.js +15 -0
- package/dist/tokens/typography.d.ts +45 -0
- package/dist/tokens/typography.d.ts.map +1 -0
- package/dist/tokens/typography.js +56 -0
- package/dist/utils/aria.d.ts +60 -0
- package/dist/utils/aria.d.ts.map +1 -0
- package/dist/utils/aria.js +86 -0
- package/dist/utils/focus.d.ts +30 -0
- package/dist/utils/focus.d.ts.map +1 -0
- package/dist/utils/focus.js +80 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +3 -0
- package/dist/utils/keyboard.d.ts +38 -0
- package/dist/utils/keyboard.d.ts.map +1 -0
- package/dist/utils/keyboard.js +59 -0
- package/package.json +68 -0
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Global styles for the design system
|
|
3
|
+
* Includes CSS reset, focus styles, reduced motion, and high contrast support
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/* Import component styles */
|
|
7
|
+
@import './components.css';
|
|
8
|
+
|
|
9
|
+
/* CSS Custom Properties from design tokens */
|
|
10
|
+
:root {
|
|
11
|
+
/* Colors */
|
|
12
|
+
--color-primary-50: #f0f9ff;
|
|
13
|
+
--color-primary-100: #e0f2fe;
|
|
14
|
+
--color-primary-200: #bae6fd;
|
|
15
|
+
--color-primary-300: #7dd3fc;
|
|
16
|
+
--color-primary-400: #38bdf8;
|
|
17
|
+
--color-primary-500: #0ea5e9;
|
|
18
|
+
--color-primary-600: #0284c7;
|
|
19
|
+
--color-primary-700: #0369a1;
|
|
20
|
+
--color-primary-800: #075985;
|
|
21
|
+
--color-primary-900: #0c4a6e;
|
|
22
|
+
|
|
23
|
+
--color-neutral-50: #fafafa;
|
|
24
|
+
--color-neutral-100: #f5f5f5;
|
|
25
|
+
--color-neutral-200: #e5e5e5;
|
|
26
|
+
--color-neutral-300: #d4d4d4;
|
|
27
|
+
--color-neutral-400: #a3a3a3;
|
|
28
|
+
--color-neutral-500: #737373;
|
|
29
|
+
--color-neutral-600: #525252;
|
|
30
|
+
--color-neutral-700: #404040;
|
|
31
|
+
--color-neutral-800: #262626;
|
|
32
|
+
--color-neutral-900: #171717;
|
|
33
|
+
|
|
34
|
+
--color-success-500: #22c55e;
|
|
35
|
+
--color-success-600: #16a34a;
|
|
36
|
+
--color-success-700: #15803d;
|
|
37
|
+
|
|
38
|
+
--color-warning-500: #f59e0b;
|
|
39
|
+
--color-warning-600: #d97706;
|
|
40
|
+
--color-warning-700: #b45309;
|
|
41
|
+
|
|
42
|
+
--color-error-500: #ef4444;
|
|
43
|
+
--color-error-600: #dc2626;
|
|
44
|
+
--color-error-700: #b91c1c;
|
|
45
|
+
|
|
46
|
+
--color-white: #ffffff;
|
|
47
|
+
--color-black: #000000;
|
|
48
|
+
|
|
49
|
+
--color-background-default: #ffffff;
|
|
50
|
+
--color-background-secondary: #fafafa;
|
|
51
|
+
--color-background-tertiary: #f5f5f5;
|
|
52
|
+
|
|
53
|
+
--color-text-primary: #171717;
|
|
54
|
+
--color-text-secondary: #525252;
|
|
55
|
+
--color-text-tertiary: #737373;
|
|
56
|
+
--color-text-inverse: #ffffff;
|
|
57
|
+
--color-text-disabled: #a3a3a3;
|
|
58
|
+
|
|
59
|
+
--color-border-default: #bbbbbb;
|
|
60
|
+
--color-border-focus: #0ea5e9;
|
|
61
|
+
--color-border-error: #ef4444;
|
|
62
|
+
|
|
63
|
+
/* Spacing */
|
|
64
|
+
--spacing-0: 0;
|
|
65
|
+
--spacing-1: 0.25rem;
|
|
66
|
+
--spacing-2: 0.5rem;
|
|
67
|
+
--spacing-3: 0.75rem;
|
|
68
|
+
--spacing-4: 1rem;
|
|
69
|
+
--spacing-5: 1.25rem;
|
|
70
|
+
--spacing-6: 1.5rem;
|
|
71
|
+
--spacing-8: 2rem;
|
|
72
|
+
--spacing-10: 2.5rem;
|
|
73
|
+
--spacing-12: 3rem;
|
|
74
|
+
--spacing-16: 4rem;
|
|
75
|
+
--spacing-20: 5rem;
|
|
76
|
+
--spacing-24: 6rem;
|
|
77
|
+
--spacing-32: 8rem;
|
|
78
|
+
|
|
79
|
+
/* Typography */
|
|
80
|
+
--font-family-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
81
|
+
--font-family-mono: Menlo, Monaco, 'Courier New', monospace;
|
|
82
|
+
|
|
83
|
+
--font-size-xs: 0.75rem;
|
|
84
|
+
--font-size-sm: 0.875rem;
|
|
85
|
+
--font-size-base: 1rem;
|
|
86
|
+
--font-size-lg: 1.125rem;
|
|
87
|
+
--font-size-xl: 1.25rem;
|
|
88
|
+
--font-size-2xl: 1.5rem;
|
|
89
|
+
--font-size-3xl: 1.875rem;
|
|
90
|
+
--font-size-4xl: 2.25rem;
|
|
91
|
+
--font-size-5xl: 3rem;
|
|
92
|
+
|
|
93
|
+
--line-height-none: 1;
|
|
94
|
+
--line-height-tight: 1.25;
|
|
95
|
+
--line-height-snug: 1.375;
|
|
96
|
+
--line-height-normal: 1.5;
|
|
97
|
+
--line-height-relaxed: 1.625;
|
|
98
|
+
--line-height-loose: 2;
|
|
99
|
+
|
|
100
|
+
--font-weight-normal: 400;
|
|
101
|
+
--font-weight-medium: 500;
|
|
102
|
+
--font-weight-semibold: 600;
|
|
103
|
+
--font-weight-bold: 700;
|
|
104
|
+
|
|
105
|
+
/* Motion */
|
|
106
|
+
--motion-duration-fast: 150ms;
|
|
107
|
+
--motion-duration-normal: 200ms;
|
|
108
|
+
--motion-duration-slow: 300ms;
|
|
109
|
+
--motion-duration-slower: 400ms;
|
|
110
|
+
|
|
111
|
+
--motion-easing-ease-in: cubic-bezier(0.4, 0, 1, 1);
|
|
112
|
+
--motion-easing-ease-out: cubic-bezier(0, 0, 0.2, 1);
|
|
113
|
+
--motion-easing-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
|
|
114
|
+
--motion-easing-linear: linear;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/* CSS Reset */
|
|
118
|
+
*,
|
|
119
|
+
*::before,
|
|
120
|
+
*::after {
|
|
121
|
+
box-sizing: border-box;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
* {
|
|
125
|
+
margin: 0;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
html,
|
|
129
|
+
body {
|
|
130
|
+
height: 100%;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
body {
|
|
134
|
+
font-family: var(--font-family-sans);
|
|
135
|
+
font-size: var(--font-size-base);
|
|
136
|
+
line-height: var(--line-height-normal);
|
|
137
|
+
color: var(--color-text-primary);
|
|
138
|
+
background-color: var(--color-background-default);
|
|
139
|
+
-webkit-font-smoothing: antialiased;
|
|
140
|
+
-moz-osx-font-smoothing: grayscale;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
img,
|
|
144
|
+
picture,
|
|
145
|
+
video,
|
|
146
|
+
canvas,
|
|
147
|
+
svg {
|
|
148
|
+
display: block;
|
|
149
|
+
max-width: 100%;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
input,
|
|
153
|
+
button,
|
|
154
|
+
textarea,
|
|
155
|
+
select {
|
|
156
|
+
font: inherit;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
p,
|
|
160
|
+
h1,
|
|
161
|
+
h2,
|
|
162
|
+
h3,
|
|
163
|
+
h4,
|
|
164
|
+
h5,
|
|
165
|
+
h6 {
|
|
166
|
+
overflow-wrap: break-word;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/* Focus styles - WCAG 2.4.7 Focus Visible */
|
|
170
|
+
:focus-visible {
|
|
171
|
+
outline: 2px solid var(--color-border-focus);
|
|
172
|
+
outline-offset: 2px;
|
|
173
|
+
border-radius: 2px;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
:focus:not(:focus-visible) {
|
|
177
|
+
outline: none;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/* Skip links for keyboard navigation */
|
|
181
|
+
.skip-link {
|
|
182
|
+
position: absolute;
|
|
183
|
+
top: -100px;
|
|
184
|
+
left: 0;
|
|
185
|
+
z-index: 1000;
|
|
186
|
+
padding: var(--spacing-3) var(--spacing-4);
|
|
187
|
+
background-color: var(--color-background-default);
|
|
188
|
+
color: var(--color-text-primary);
|
|
189
|
+
border: 2px solid var(--color-border-focus);
|
|
190
|
+
border-radius: 0.375rem;
|
|
191
|
+
font-weight: var(--font-weight-semibold);
|
|
192
|
+
text-decoration: none;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.skip-link:focus {
|
|
196
|
+
top: var(--spacing-4);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/* Reduced motion support - WCAG 2.3.3 Animation from Interactions */
|
|
200
|
+
@media (prefers-reduced-motion: reduce) {
|
|
201
|
+
*,
|
|
202
|
+
*::before,
|
|
203
|
+
*::after {
|
|
204
|
+
animation-duration: 0.01ms !important;
|
|
205
|
+
animation-iteration-count: 1 !important;
|
|
206
|
+
transition-duration: 0.01ms !important;
|
|
207
|
+
scroll-behavior: auto !important;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/* High contrast mode support - WCAG 1.4.11 Non-text Contrast */
|
|
212
|
+
@media (prefers-contrast: high) {
|
|
213
|
+
:root {
|
|
214
|
+
--color-border-default: #000000;
|
|
215
|
+
--color-border-focus: #0000ff;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
* {
|
|
219
|
+
border-color: currentColor;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
:focus-visible {
|
|
223
|
+
outline-width: 3px;
|
|
224
|
+
outline-style: solid;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
button,
|
|
228
|
+
a,
|
|
229
|
+
input,
|
|
230
|
+
select,
|
|
231
|
+
textarea {
|
|
232
|
+
border-width: 2px;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/* Print styles */
|
|
237
|
+
@media print {
|
|
238
|
+
* {
|
|
239
|
+
background: transparent !important;
|
|
240
|
+
color: black !important;
|
|
241
|
+
box-shadow: none !important;
|
|
242
|
+
text-shadow: none !important;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
a,
|
|
246
|
+
a:visited {
|
|
247
|
+
text-decoration: underline;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
a[href]:after {
|
|
251
|
+
content: ' (' attr(href) ')';
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
abbr[title]:after {
|
|
255
|
+
content: ' (' attr(title) ')';
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
pre,
|
|
259
|
+
blockquote {
|
|
260
|
+
border: 1px solid #999;
|
|
261
|
+
page-break-inside: avoid;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
thead {
|
|
265
|
+
display: table-header-group;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
tr,
|
|
269
|
+
img {
|
|
270
|
+
page-break-inside: avoid;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
img {
|
|
274
|
+
max-width: 100% !important;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
p,
|
|
278
|
+
h2,
|
|
279
|
+
h3 {
|
|
280
|
+
orphans: 3;
|
|
281
|
+
widows: 3;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
h2,
|
|
285
|
+
h3 {
|
|
286
|
+
page-break-after: avoid;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/styles/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACvC,YAAY,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { theme } from '../tokens/theme';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Responsive breakpoints
|
|
3
|
+
* Mobile-first approach
|
|
4
|
+
*/
|
|
5
|
+
export declare const breakpoints: {
|
|
6
|
+
readonly sm: "640px";
|
|
7
|
+
readonly md: "768px";
|
|
8
|
+
readonly lg: "1024px";
|
|
9
|
+
readonly xl: "1280px";
|
|
10
|
+
readonly '2xl': "1536px";
|
|
11
|
+
};
|
|
12
|
+
export type BreakpointToken = typeof breakpoints;
|
|
13
|
+
/**
|
|
14
|
+
* Media query helpers
|
|
15
|
+
*/
|
|
16
|
+
export declare const mediaQuery: {
|
|
17
|
+
readonly sm: "@media (min-width: 640px)";
|
|
18
|
+
readonly md: "@media (min-width: 768px)";
|
|
19
|
+
readonly lg: "@media (min-width: 1024px)";
|
|
20
|
+
readonly xl: "@media (min-width: 1280px)";
|
|
21
|
+
readonly '2xl': "@media (min-width: 1536px)";
|
|
22
|
+
readonly reducedMotion: "@media (prefers-reduced-motion: reduce)";
|
|
23
|
+
readonly highContrast: "@media (prefers-contrast: high)";
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=breakpoints.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breakpoints.d.ts","sourceRoot":"","sources":["../../src/tokens/breakpoints.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,WAAW;;;;;;CAMd,CAAA;AAEV,MAAM,MAAM,eAAe,GAAG,OAAO,WAAW,CAAA;AAEhD;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;;;;CAQb,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Responsive breakpoints
|
|
3
|
+
* Mobile-first approach
|
|
4
|
+
*/
|
|
5
|
+
export const breakpoints = {
|
|
6
|
+
sm: '640px', // Small devices (landscape phones)
|
|
7
|
+
md: '768px', // Medium devices (tablets)
|
|
8
|
+
lg: '1024px', // Large devices (desktops)
|
|
9
|
+
xl: '1280px', // Extra large devices
|
|
10
|
+
'2xl': '1536px', // 2X Extra large devices
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Media query helpers
|
|
14
|
+
*/
|
|
15
|
+
export const mediaQuery = {
|
|
16
|
+
sm: `@media (min-width: ${breakpoints.sm})`,
|
|
17
|
+
md: `@media (min-width: ${breakpoints.md})`,
|
|
18
|
+
lg: `@media (min-width: ${breakpoints.lg})`,
|
|
19
|
+
xl: `@media (min-width: ${breakpoints.xl})`,
|
|
20
|
+
'2xl': `@media (min-width: ${breakpoints['2xl']})`,
|
|
21
|
+
reducedMotion: '@media (prefers-reduced-motion: reduce)',
|
|
22
|
+
highContrast: '@media (prefers-contrast: high)',
|
|
23
|
+
};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Color tokens with WCAG AA contrast ratios (4.5:1 for normal text, 3:1 for large text)
|
|
3
|
+
* All colors meet WCAG 2.1 Level AA standards
|
|
4
|
+
*/
|
|
5
|
+
export declare const colors: {
|
|
6
|
+
readonly primary: {
|
|
7
|
+
readonly 50: "#f0f9ff";
|
|
8
|
+
readonly 100: "#e0f2fe";
|
|
9
|
+
readonly 200: "#bae6fd";
|
|
10
|
+
readonly 300: "#7dd3fc";
|
|
11
|
+
readonly 400: "#38bdf8";
|
|
12
|
+
readonly 500: "#0ea5e9";
|
|
13
|
+
readonly 600: "#0284c7";
|
|
14
|
+
readonly 700: "#0369a1";
|
|
15
|
+
readonly 800: "#075985";
|
|
16
|
+
readonly 900: "#0c4a6e";
|
|
17
|
+
};
|
|
18
|
+
readonly neutral: {
|
|
19
|
+
readonly 50: "#fafafa";
|
|
20
|
+
readonly 100: "#f5f5f5";
|
|
21
|
+
readonly 200: "#bbbbbb";
|
|
22
|
+
readonly 300: "#d4d4d4";
|
|
23
|
+
readonly 400: "#a3a3a3";
|
|
24
|
+
readonly 500: "#737373";
|
|
25
|
+
readonly 600: "#525252";
|
|
26
|
+
readonly 700: "#404040";
|
|
27
|
+
readonly 800: "#262626";
|
|
28
|
+
readonly 900: "#171717";
|
|
29
|
+
};
|
|
30
|
+
readonly success: {
|
|
31
|
+
readonly 50: "#f0fdf4";
|
|
32
|
+
readonly 100: "#dcfce7";
|
|
33
|
+
readonly 200: "#bbf7d0";
|
|
34
|
+
readonly 300: "#86efac";
|
|
35
|
+
readonly 400: "#4ade80";
|
|
36
|
+
readonly 500: "#22c55e";
|
|
37
|
+
readonly 600: "#16a34a";
|
|
38
|
+
readonly 700: "#15803d";
|
|
39
|
+
};
|
|
40
|
+
readonly warning: {
|
|
41
|
+
readonly 50: "#fffbeb";
|
|
42
|
+
readonly 100: "#fef3c7";
|
|
43
|
+
readonly 200: "#fde68a";
|
|
44
|
+
readonly 300: "#fcd34d";
|
|
45
|
+
readonly 400: "#fbbf24";
|
|
46
|
+
readonly 500: "#f59e0b";
|
|
47
|
+
readonly 600: "#d97706";
|
|
48
|
+
readonly 700: "#b45309";
|
|
49
|
+
};
|
|
50
|
+
readonly error: {
|
|
51
|
+
readonly 50: "#fef2f2";
|
|
52
|
+
readonly 100: "#fee2e2";
|
|
53
|
+
readonly 200: "#fecaca";
|
|
54
|
+
readonly 300: "#fca5a5";
|
|
55
|
+
readonly 400: "#f87171";
|
|
56
|
+
readonly 500: "#ef4444";
|
|
57
|
+
readonly 600: "#dc2626";
|
|
58
|
+
readonly 700: "#b91c1c";
|
|
59
|
+
};
|
|
60
|
+
readonly white: "#ffffff";
|
|
61
|
+
readonly black: "#000000";
|
|
62
|
+
readonly background: {
|
|
63
|
+
readonly default: "#ffffff";
|
|
64
|
+
readonly secondary: "#fafafa";
|
|
65
|
+
readonly tertiary: "#f5f5f5";
|
|
66
|
+
};
|
|
67
|
+
readonly text: {
|
|
68
|
+
readonly primary: "#171717";
|
|
69
|
+
readonly secondary: "#525252";
|
|
70
|
+
readonly tertiary: "#737373";
|
|
71
|
+
readonly inverse: "#ffffff";
|
|
72
|
+
readonly disabled: "#a3a3a3";
|
|
73
|
+
};
|
|
74
|
+
readonly border: {
|
|
75
|
+
readonly default: "#bbbbbb";
|
|
76
|
+
readonly focus: "#0ea5e9";
|
|
77
|
+
readonly error: "#ef4444";
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
export type ColorToken = typeof colors;
|
|
81
|
+
//# sourceMappingURL=colors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/tokens/colors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyFT,CAAA;AAEV,MAAM,MAAM,UAAU,GAAG,OAAO,MAAM,CAAA"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Color tokens with WCAG AA contrast ratios (4.5:1 for normal text, 3:1 for large text)
|
|
3
|
+
* All colors meet WCAG 2.1 Level AA standards
|
|
4
|
+
*/
|
|
5
|
+
export const colors = {
|
|
6
|
+
// Primary palette
|
|
7
|
+
primary: {
|
|
8
|
+
50: '#f0f9ff',
|
|
9
|
+
100: '#e0f2fe',
|
|
10
|
+
200: '#bae6fd',
|
|
11
|
+
300: '#7dd3fc',
|
|
12
|
+
400: '#38bdf8',
|
|
13
|
+
500: '#0ea5e9', // Main primary - meets 4.5:1 on white
|
|
14
|
+
600: '#0284c7',
|
|
15
|
+
700: '#0369a1',
|
|
16
|
+
800: '#075985',
|
|
17
|
+
900: '#0c4a6e',
|
|
18
|
+
},
|
|
19
|
+
// Neutral grays
|
|
20
|
+
neutral: {
|
|
21
|
+
50: '#fafafa',
|
|
22
|
+
100: '#f5f5f5',
|
|
23
|
+
200: '#bbbbbb',
|
|
24
|
+
300: '#d4d4d4',
|
|
25
|
+
400: '#a3a3a3',
|
|
26
|
+
500: '#737373',
|
|
27
|
+
600: '#525252', // Meets 4.5:1 on white
|
|
28
|
+
700: '#404040', // Meets 4.5:1 on white
|
|
29
|
+
800: '#262626', // Meets 4.5:1 on white
|
|
30
|
+
900: '#171717', // Meets 4.5:1 on white
|
|
31
|
+
},
|
|
32
|
+
// Semantic colors
|
|
33
|
+
success: {
|
|
34
|
+
50: '#f0fdf4',
|
|
35
|
+
100: '#dcfce7',
|
|
36
|
+
200: '#bbf7d0',
|
|
37
|
+
300: '#86efac',
|
|
38
|
+
400: '#4ade80',
|
|
39
|
+
500: '#22c55e', // Meets 4.5:1 on white
|
|
40
|
+
600: '#16a34a',
|
|
41
|
+
700: '#15803d',
|
|
42
|
+
},
|
|
43
|
+
warning: {
|
|
44
|
+
50: '#fffbeb',
|
|
45
|
+
100: '#fef3c7',
|
|
46
|
+
200: '#fde68a',
|
|
47
|
+
300: '#fcd34d',
|
|
48
|
+
400: '#fbbf24',
|
|
49
|
+
500: '#f59e0b', // Meets 4.5:1 on white
|
|
50
|
+
600: '#d97706',
|
|
51
|
+
700: '#b45309',
|
|
52
|
+
},
|
|
53
|
+
error: {
|
|
54
|
+
50: '#fef2f2',
|
|
55
|
+
100: '#fee2e2',
|
|
56
|
+
200: '#fecaca',
|
|
57
|
+
300: '#fca5a5',
|
|
58
|
+
400: '#f87171',
|
|
59
|
+
500: '#ef4444', // Meets 4.5:1 on white
|
|
60
|
+
600: '#dc2626', // Meets 4.5:1 on white
|
|
61
|
+
700: '#b91c1c',
|
|
62
|
+
},
|
|
63
|
+
// Base colors
|
|
64
|
+
white: '#ffffff',
|
|
65
|
+
black: '#000000',
|
|
66
|
+
// Background colors
|
|
67
|
+
background: {
|
|
68
|
+
default: '#ffffff',
|
|
69
|
+
secondary: '#fafafa',
|
|
70
|
+
tertiary: '#f5f5f5',
|
|
71
|
+
},
|
|
72
|
+
// Text colors (meet contrast requirements)
|
|
73
|
+
text: {
|
|
74
|
+
primary: '#171717', // neutral.900 - 4.5:1 on white
|
|
75
|
+
secondary: '#525252', // neutral.600 - 4.5:1 on white
|
|
76
|
+
tertiary: '#737373', // neutral.500 - 4.5:1 on white (large text)
|
|
77
|
+
inverse: '#ffffff', // white - 4.5:1 on dark backgrounds
|
|
78
|
+
disabled: '#a3a3a3', // neutral.400
|
|
79
|
+
},
|
|
80
|
+
// Border colors
|
|
81
|
+
border: {
|
|
82
|
+
default: '#bbbbbb', // neutral.200
|
|
83
|
+
focus: '#0ea5e9', // primary.500
|
|
84
|
+
error: '#ef4444', // error.500
|
|
85
|
+
},
|
|
86
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tokens/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Motion tokens that respect prefers-reduced-motion
|
|
3
|
+
* All animations should check for reduced motion preference
|
|
4
|
+
*/
|
|
5
|
+
export declare const motion: {
|
|
6
|
+
readonly duration: {
|
|
7
|
+
readonly fast: "150ms";
|
|
8
|
+
readonly normal: "200ms";
|
|
9
|
+
readonly slow: "300ms";
|
|
10
|
+
readonly slower: "400ms";
|
|
11
|
+
};
|
|
12
|
+
readonly easing: {
|
|
13
|
+
readonly easeIn: "cubic-bezier(0.4, 0, 1, 1)";
|
|
14
|
+
readonly easeOut: "cubic-bezier(0, 0, 0.2, 1)";
|
|
15
|
+
readonly easeInOut: "cubic-bezier(0.4, 0, 0.2, 1)";
|
|
16
|
+
readonly linear: "linear";
|
|
17
|
+
};
|
|
18
|
+
readonly reduced: {
|
|
19
|
+
readonly duration: "0ms";
|
|
20
|
+
readonly easing: "linear";
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export type MotionToken = typeof motion;
|
|
24
|
+
/**
|
|
25
|
+
* Helper to get motion duration respecting prefers-reduced-motion
|
|
26
|
+
* Usage: const duration = getMotionDuration('normal')
|
|
27
|
+
* In CSS: use @media (prefers-reduced-motion: reduce) { animation-duration: 0ms; }
|
|
28
|
+
*/
|
|
29
|
+
export declare function getMotionDuration(key: keyof typeof motion.duration): string;
|
|
30
|
+
//# sourceMappingURL=motion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"motion.d.ts","sourceRoot":"","sources":["../../src/tokens/motion.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;CAoBT,CAAA;AAEV,MAAM,MAAM,WAAW,GAAG,OAAO,MAAM,CAAA;AAEvC;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,OAAO,MAAM,CAAC,QAAQ,GAAG,MAAM,CAK3E"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Motion tokens that respect prefers-reduced-motion
|
|
3
|
+
* All animations should check for reduced motion preference
|
|
4
|
+
*/
|
|
5
|
+
export const motion = {
|
|
6
|
+
duration: {
|
|
7
|
+
fast: '150ms',
|
|
8
|
+
normal: '200ms',
|
|
9
|
+
slow: '300ms',
|
|
10
|
+
slower: '400ms',
|
|
11
|
+
},
|
|
12
|
+
easing: {
|
|
13
|
+
easeIn: 'cubic-bezier(0.4, 0, 1, 1)',
|
|
14
|
+
easeOut: 'cubic-bezier(0, 0, 0.2, 1)',
|
|
15
|
+
easeInOut: 'cubic-bezier(0.4, 0, 0.2, 1)',
|
|
16
|
+
linear: 'linear',
|
|
17
|
+
},
|
|
18
|
+
// Reduced motion overrides (set to 0 or instant)
|
|
19
|
+
reduced: {
|
|
20
|
+
duration: '0ms',
|
|
21
|
+
easing: 'linear',
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Helper to get motion duration respecting prefers-reduced-motion
|
|
26
|
+
* Usage: const duration = getMotionDuration('normal')
|
|
27
|
+
* In CSS: use @media (prefers-reduced-motion: reduce) { animation-duration: 0ms; }
|
|
28
|
+
*/
|
|
29
|
+
export function getMotionDuration(key) {
|
|
30
|
+
if (typeof window !== 'undefined' && window.matchMedia('(prefers-reduced-motion: reduce)').matches) {
|
|
31
|
+
return motion.reduced.duration;
|
|
32
|
+
}
|
|
33
|
+
return motion.duration[key];
|
|
34
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Spacing scale using 4px base unit
|
|
3
|
+
* Follows consistent 8px grid system
|
|
4
|
+
*/
|
|
5
|
+
export declare const spacing: {
|
|
6
|
+
readonly 0: "0";
|
|
7
|
+
readonly 1: "0.25rem";
|
|
8
|
+
readonly 2: "0.5rem";
|
|
9
|
+
readonly 3: "0.75rem";
|
|
10
|
+
readonly 4: "1rem";
|
|
11
|
+
readonly 5: "1.25rem";
|
|
12
|
+
readonly 6: "1.5rem";
|
|
13
|
+
readonly 8: "2rem";
|
|
14
|
+
readonly 10: "2.5rem";
|
|
15
|
+
readonly 12: "3rem";
|
|
16
|
+
readonly 16: "4rem";
|
|
17
|
+
readonly 20: "5rem";
|
|
18
|
+
readonly 24: "6rem";
|
|
19
|
+
readonly 32: "8rem";
|
|
20
|
+
};
|
|
21
|
+
export type SpacingToken = typeof spacing;
|
|
22
|
+
//# sourceMappingURL=spacing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spacing.d.ts","sourceRoot":"","sources":["../../src/tokens/spacing.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;CAeV,CAAA;AAEV,MAAM,MAAM,YAAY,GAAG,OAAO,OAAO,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Spacing scale using 4px base unit
|
|
3
|
+
* Follows consistent 8px grid system
|
|
4
|
+
*/
|
|
5
|
+
export const spacing = {
|
|
6
|
+
0: '0',
|
|
7
|
+
1: '0.25rem', // 4px
|
|
8
|
+
2: '0.5rem', // 8px
|
|
9
|
+
3: '0.75rem', // 12px
|
|
10
|
+
4: '1rem', // 16px
|
|
11
|
+
5: '1.25rem', // 20px
|
|
12
|
+
6: '1.5rem', // 24px
|
|
13
|
+
8: '2rem', // 32px
|
|
14
|
+
10: '2.5rem', // 40px
|
|
15
|
+
12: '3rem', // 48px
|
|
16
|
+
16: '4rem', // 64px
|
|
17
|
+
20: '5rem', // 80px
|
|
18
|
+
24: '6rem', // 96px
|
|
19
|
+
32: '8rem', // 128px
|
|
20
|
+
};
|