@protoflexo/proto-ui 0.1.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/fonts.css ADDED
@@ -0,0 +1,93 @@
1
+ /*
2
+ * Flex Font Faces
3
+ * Proprietary fonts hosted via Vercel Blob.
4
+ *
5
+ * TODO: Replace placeholder URLs with actual Vercel Blob URLs after upload.
6
+ * For now, fonts fall back to system fonts defined in tokens.css.
7
+ */
8
+
9
+ /* ── ABCDiatype ──────────────────────────────────────────── */
10
+
11
+ @font-face {
12
+ font-family: 'ABCDiatype';
13
+ src: url('__BLOB_URL__/ABCDiatype-Regular.woff2') format('woff2');
14
+ font-weight: 400;
15
+ font-style: normal;
16
+ font-display: swap;
17
+ }
18
+
19
+ @font-face {
20
+ font-family: 'ABCDiatype';
21
+ src: url('__BLOB_URL__/ABCDiatype-RegularItalic.woff2') format('woff2');
22
+ font-weight: 400;
23
+ font-style: italic;
24
+ font-display: swap;
25
+ }
26
+
27
+ @font-face {
28
+ font-family: 'ABCDiatype';
29
+ src: url('__BLOB_URL__/ABCDiatype-Medium.woff2') format('woff2');
30
+ font-weight: 500;
31
+ font-style: normal;
32
+ font-display: swap;
33
+ }
34
+
35
+ @font-face {
36
+ font-family: 'ABCDiatype';
37
+ src: url('__BLOB_URL__/ABCDiatype-MediumItalic.woff2') format('woff2');
38
+ font-weight: 500;
39
+ font-style: italic;
40
+ font-display: swap;
41
+ }
42
+
43
+ @font-face {
44
+ font-family: 'ABCDiatype';
45
+ src: url('__BLOB_URL__/ABCDiatype-Bold.woff2') format('woff2');
46
+ font-weight: 700;
47
+ font-style: normal;
48
+ font-display: swap;
49
+ }
50
+
51
+ @font-face {
52
+ font-family: 'ABCDiatype';
53
+ src: url('__BLOB_URL__/ABCDiatype-BoldItalic.woff2') format('woff2');
54
+ font-weight: 700;
55
+ font-style: italic;
56
+ font-display: swap;
57
+ }
58
+
59
+ /* ── ABCDiatypeSemi-Mono ─────────────────────────────────── */
60
+
61
+ @font-face {
62
+ font-family: 'ABCDiatypeSemi-Mono';
63
+ src: url('__BLOB_URL__/ABCDiatypeSemi-Mono-Regular.woff2') format('woff2');
64
+ font-weight: 400;
65
+ font-style: normal;
66
+ font-display: swap;
67
+ }
68
+
69
+ @font-face {
70
+ font-family: 'ABCDiatypeSemi-Mono';
71
+ src: url('__BLOB_URL__/ABCDiatypeSemi-Mono-Medium.woff2') format('woff2');
72
+ font-weight: 500;
73
+ font-style: normal;
74
+ font-display: swap;
75
+ }
76
+
77
+ @font-face {
78
+ font-family: 'ABCDiatypeSemi-Mono';
79
+ src: url('__BLOB_URL__/ABCDiatypeSemi-Mono-Bold.woff2') format('woff2');
80
+ font-weight: 700;
81
+ font-style: normal;
82
+ font-display: swap;
83
+ }
84
+
85
+ /* ── CooperBT ────────────────────────────────────────────── */
86
+
87
+ @font-face {
88
+ font-family: 'CooperBT-Medium';
89
+ src: url('__BLOB_URL__/CooperBT-Medium.woff2') format('woff2');
90
+ font-weight: 500;
91
+ font-style: normal;
92
+ font-display: swap;
93
+ }
@@ -0,0 +1,485 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import React$1 from 'react';
3
+
4
+ interface FlexProviderProps {
5
+ children: React.ReactNode;
6
+ }
7
+ /**
8
+ * FlexProvider ensures Flex design tokens, typography, and fonts
9
+ * are available in the document. Wrap your app root with this.
10
+ *
11
+ * In prototypes, CSS files are loaded via <link> tags in index.html,
12
+ * so FlexProvider is mainly a semantic wrapper. It can also inject
13
+ * tokens programmatically when CSS files aren't loaded via HTML.
14
+ */
15
+ declare function FlexProvider({ children }: FlexProviderProps): react_jsx_runtime.JSX.Element;
16
+
17
+ /**
18
+ * Flex Design System Tokens (TypeScript)
19
+ * Extracted from genoa/src/rxp/unistyles.ts and genoa/src/rxp/globalStyles.ts
20
+ *
21
+ * Use these when you need token values in JS (e.g., inline styles, dynamic calculations).
22
+ * For CSS styling, prefer the CSS custom properties in tokens.css.
23
+ */
24
+ declare const palette: {
25
+ readonly brandPurple: {
26
+ readonly '01': "#2C194D";
27
+ readonly '02': "#6A3DB8";
28
+ readonly '03': "#DDC6F9";
29
+ readonly '04': "#EEE2FC";
30
+ readonly '05': "#E3E1E6";
31
+ };
32
+ readonly offWhite: "#F7F7F7";
33
+ readonly offBlack: "#1D1D1D";
34
+ readonly white: "#FFFFFF";
35
+ readonly black: "#000000";
36
+ readonly grayPurple: {
37
+ readonly '01': "#EDEBF1";
38
+ readonly '02': "#D5D1DB";
39
+ readonly '03': "#C0BACA";
40
+ readonly '04': "#ABA3B8";
41
+ readonly '05': "#958CA6";
42
+ readonly '06': "#807594";
43
+ readonly '07': "#6B5E82";
44
+ readonly '08': "#564771";
45
+ };
46
+ readonly gray: {
47
+ readonly '01': "#F3F3F3";
48
+ readonly '02': "#EEEEEE";
49
+ readonly '03': "#E2E2E2";
50
+ readonly '04': "#BBBBBB";
51
+ readonly '05': "#949494";
52
+ readonly '06': "#737373";
53
+ readonly '07': "#6A6A6A";
54
+ readonly '08': "#535353";
55
+ };
56
+ readonly success: {
57
+ readonly '01': "#01795C";
58
+ readonly '02': "#67AF9D";
59
+ readonly '03': "#B3D7CE";
60
+ readonly '04': "#E6F2EF";
61
+ };
62
+ readonly error: {
63
+ readonly '01': "#7A0800";
64
+ readonly '02': "#E27474";
65
+ readonly '03': "#F0BABA";
66
+ readonly '04': "#FAE8E8";
67
+ };
68
+ readonly warning: {
69
+ readonly '01': "#C8880A";
70
+ readonly '05': "#FFF5E2";
71
+ };
72
+ readonly red: {
73
+ readonly '01': "#CE1818";
74
+ };
75
+ readonly blue: {
76
+ readonly '01': "#00359C";
77
+ readonly '02': "#1C53BA";
78
+ readonly '03': "#6CA3EB";
79
+ readonly '04': "#B1D4FF";
80
+ readonly '05': "#E5EEFF";
81
+ };
82
+ };
83
+ declare const spacing: {
84
+ readonly 12: 2;
85
+ readonly 18: 3;
86
+ readonly 25: 4;
87
+ readonly 37: 6;
88
+ readonly 50: 8;
89
+ readonly 75: 12;
90
+ readonly 87: 14;
91
+ readonly 100: 16;
92
+ readonly 112: 18;
93
+ readonly 125: 20;
94
+ readonly 150: 24;
95
+ readonly 175: 28;
96
+ readonly 200: 32;
97
+ readonly 250: 40;
98
+ readonly 275: 44;
99
+ readonly 300: 48;
100
+ readonly 325: 52;
101
+ readonly 350: 56;
102
+ readonly 375: 60;
103
+ readonly 400: 64;
104
+ readonly 500: 80;
105
+ readonly 600: 96;
106
+ readonly 725: 116;
107
+ readonly 800: 128;
108
+ readonly 900: 144;
109
+ };
110
+ declare const radius: {
111
+ readonly none: 0;
112
+ readonly xs: 2;
113
+ readonly sm: 4;
114
+ readonly md: 8;
115
+ readonly mlg: 10;
116
+ readonly lg: 12;
117
+ readonly xl: 16;
118
+ readonly xxl: 20;
119
+ readonly xxxl: 24;
120
+ readonly super: 100;
121
+ readonly full: 9999;
122
+ };
123
+ declare const fontFamily: {
124
+ readonly sans: "'ABCDiatype', system-ui, -apple-system, sans-serif";
125
+ readonly serif: "'CooperBT-Medium', Georgia, serif";
126
+ readonly mono: "'ABCDiatypeSemi-Mono', ui-monospace, monospace";
127
+ };
128
+ declare const fontSize: {
129
+ readonly 250: 10;
130
+ readonly 300: 12;
131
+ readonly 350: 14;
132
+ readonly 400: 16;
133
+ readonly 450: 18;
134
+ readonly 500: 20;
135
+ readonly 550: 22;
136
+ readonly 600: 24;
137
+ readonly 700: 28;
138
+ readonly 800: 32;
139
+ readonly 900: 36;
140
+ readonly 1000: 40;
141
+ readonly 1200: 48;
142
+ };
143
+ declare const lineHeight: {
144
+ readonly 350: 14;
145
+ readonly 400: 16;
146
+ readonly 450: 18;
147
+ readonly 475: 19;
148
+ readonly 500: 20;
149
+ readonly 550: 22;
150
+ readonly 600: 24;
151
+ readonly 700: 28;
152
+ readonly 850: 34;
153
+ readonly 925: 37;
154
+ readonly 1050: 42;
155
+ readonly 1225: 49;
156
+ };
157
+ declare const fontWeight: {
158
+ readonly regular: 400;
159
+ readonly medium: 500;
160
+ readonly bold: 700;
161
+ };
162
+
163
+ /**
164
+ * Hook to access Flex design tokens in JavaScript.
165
+ * Returns the full token set for use in inline styles.
166
+ */
167
+ declare function useFlexTheme(): {
168
+ palette: {
169
+ readonly brandPurple: {
170
+ readonly '01': "#2C194D";
171
+ readonly '02': "#6A3DB8";
172
+ readonly '03': "#DDC6F9";
173
+ readonly '04': "#EEE2FC";
174
+ readonly '05': "#E3E1E6";
175
+ };
176
+ readonly offWhite: "#F7F7F7";
177
+ readonly offBlack: "#1D1D1D";
178
+ readonly white: "#FFFFFF";
179
+ readonly black: "#000000";
180
+ readonly grayPurple: {
181
+ readonly '01': "#EDEBF1";
182
+ readonly '02': "#D5D1DB";
183
+ readonly '03': "#C0BACA";
184
+ readonly '04': "#ABA3B8";
185
+ readonly '05': "#958CA6";
186
+ readonly '06': "#807594";
187
+ readonly '07': "#6B5E82";
188
+ readonly '08': "#564771";
189
+ };
190
+ readonly gray: {
191
+ readonly '01': "#F3F3F3";
192
+ readonly '02': "#EEEEEE";
193
+ readonly '03': "#E2E2E2";
194
+ readonly '04': "#BBBBBB";
195
+ readonly '05': "#949494";
196
+ readonly '06': "#737373";
197
+ readonly '07': "#6A6A6A";
198
+ readonly '08': "#535353";
199
+ };
200
+ readonly success: {
201
+ readonly '01': "#01795C";
202
+ readonly '02': "#67AF9D";
203
+ readonly '03': "#B3D7CE";
204
+ readonly '04': "#E6F2EF";
205
+ };
206
+ readonly error: {
207
+ readonly '01': "#7A0800";
208
+ readonly '02': "#E27474";
209
+ readonly '03': "#F0BABA";
210
+ readonly '04': "#FAE8E8";
211
+ };
212
+ readonly warning: {
213
+ readonly '01': "#C8880A";
214
+ readonly '05': "#FFF5E2";
215
+ };
216
+ readonly red: {
217
+ readonly '01': "#CE1818";
218
+ };
219
+ readonly blue: {
220
+ readonly '01': "#00359C";
221
+ readonly '02': "#1C53BA";
222
+ readonly '03': "#6CA3EB";
223
+ readonly '04': "#B1D4FF";
224
+ readonly '05': "#E5EEFF";
225
+ };
226
+ };
227
+ spacing: {
228
+ readonly 12: 2;
229
+ readonly 18: 3;
230
+ readonly 25: 4;
231
+ readonly 37: 6;
232
+ readonly 50: 8;
233
+ readonly 75: 12;
234
+ readonly 87: 14;
235
+ readonly 100: 16;
236
+ readonly 112: 18;
237
+ readonly 125: 20;
238
+ readonly 150: 24;
239
+ readonly 175: 28;
240
+ readonly 200: 32;
241
+ readonly 250: 40;
242
+ readonly 275: 44;
243
+ readonly 300: 48;
244
+ readonly 325: 52;
245
+ readonly 350: 56;
246
+ readonly 375: 60;
247
+ readonly 400: 64;
248
+ readonly 500: 80;
249
+ readonly 600: 96;
250
+ readonly 725: 116;
251
+ readonly 800: 128;
252
+ readonly 900: 144;
253
+ };
254
+ radius: {
255
+ readonly none: 0;
256
+ readonly xs: 2;
257
+ readonly sm: 4;
258
+ readonly md: 8;
259
+ readonly mlg: 10;
260
+ readonly lg: 12;
261
+ readonly xl: 16;
262
+ readonly xxl: 20;
263
+ readonly xxxl: 24;
264
+ readonly super: 100;
265
+ readonly full: 9999;
266
+ };
267
+ fontFamily: {
268
+ readonly sans: "'ABCDiatype', system-ui, -apple-system, sans-serif";
269
+ readonly serif: "'CooperBT-Medium', Georgia, serif";
270
+ readonly mono: "'ABCDiatypeSemi-Mono', ui-monospace, monospace";
271
+ };
272
+ fontSize: {
273
+ readonly 250: 10;
274
+ readonly 300: 12;
275
+ readonly 350: 14;
276
+ readonly 400: 16;
277
+ readonly 450: 18;
278
+ readonly 500: 20;
279
+ readonly 550: 22;
280
+ readonly 600: 24;
281
+ readonly 700: 28;
282
+ readonly 800: 32;
283
+ readonly 900: 36;
284
+ readonly 1000: 40;
285
+ readonly 1200: 48;
286
+ };
287
+ lineHeight: {
288
+ readonly 350: 14;
289
+ readonly 400: 16;
290
+ readonly 450: 18;
291
+ readonly 475: 19;
292
+ readonly 500: 20;
293
+ readonly 550: 22;
294
+ readonly 600: 24;
295
+ readonly 700: 28;
296
+ readonly 850: 34;
297
+ readonly 925: 37;
298
+ readonly 1050: 42;
299
+ readonly 1225: 49;
300
+ };
301
+ fontWeight: {
302
+ readonly regular: 400;
303
+ readonly medium: 500;
304
+ readonly bold: 700;
305
+ };
306
+ };
307
+
308
+ /**
309
+ * All typography variant types from Genoa's design system.
310
+ * Maps 1:1 to the .flex-type-* CSS classes in typography.css.
311
+ */
312
+ type TypographyType = 'hero.lg' | 'hero.lg.italic' | 'hero.lg.number' | 'hero.md' | 'hero.md.italic' | 'hero.sm' | 'hero.sm.expressive' | 'hero.sm.expressive.italic' | 'hero.sm.number' | 'page.title' | 'section.title' | 'title.number' | 'header.sm' | 'headline' | 'body' | 'body.md' | 'body.sm' | 'body.xs' | 'body.bold' | 'body.md.bold' | 'body.input' | 'body.hyperlink' | 'body.md.hyperlink' | 'label' | 'label.sm' | 'label.sm.bold' | 'label.sm.hyperlink' | 'button' | 'button.sm' | 'number' | 'number.bold' | 'caption' | 'caption.hyperlink' | 'overline';
313
+ interface TypographyProps {
314
+ type?: TypographyType;
315
+ color?: string;
316
+ weight?: 400 | 500 | 700;
317
+ align?: 'left' | 'center' | 'right';
318
+ as?: keyof React$1.JSX.IntrinsicElements;
319
+ style?: React$1.CSSProperties;
320
+ children?: React$1.ReactNode;
321
+ className?: string;
322
+ }
323
+ declare function Typography({ type, color, weight, align, as, style, children, className, }: TypographyProps): React$1.ReactElement<{
324
+ style: React$1.CSSProperties;
325
+ className: string | undefined;
326
+ }, string | React$1.JSXElementConstructor<any>>;
327
+
328
+ interface DividerProps {
329
+ color?: string;
330
+ spacing?: number;
331
+ style?: React$1.CSSProperties;
332
+ }
333
+ declare function Divider({ color, spacing, style }: DividerProps): react_jsx_runtime.JSX.Element;
334
+
335
+ interface ButtonProps {
336
+ variant?: 'primary' | 'secondary' | 'outline' | 'minimal' | 'destructive';
337
+ size?: 'default' | 'sm';
338
+ disabled?: boolean;
339
+ loading?: boolean;
340
+ icon?: React$1.ReactNode;
341
+ fullWidth?: boolean;
342
+ onClick?: () => void;
343
+ children?: React$1.ReactNode;
344
+ style?: React$1.CSSProperties;
345
+ type?: 'button' | 'submit' | 'reset';
346
+ }
347
+ declare function Button({ variant, size, disabled, loading, icon, fullWidth, onClick, children, style, type, }: ButtonProps): react_jsx_runtime.JSX.Element;
348
+
349
+ interface TextFieldProps {
350
+ label?: string;
351
+ value?: string;
352
+ placeholder?: string;
353
+ helperText?: string;
354
+ error?: string;
355
+ disabled?: boolean;
356
+ type?: 'text' | 'password' | 'email' | 'number' | 'tel' | 'url';
357
+ onChange?: (value: string) => void;
358
+ onFocus?: () => void;
359
+ onBlur?: () => void;
360
+ style?: React$1.CSSProperties;
361
+ inputStyle?: React$1.CSSProperties;
362
+ }
363
+ declare function TextField({ label, value, placeholder, helperText, error, disabled, type, onChange, onFocus, onBlur, style, inputStyle, }: TextFieldProps): react_jsx_runtime.JSX.Element;
364
+
365
+ interface CheckboxProps {
366
+ checked?: boolean;
367
+ onChange?: (checked: boolean) => void;
368
+ label?: string;
369
+ disabled?: boolean;
370
+ style?: React$1.CSSProperties;
371
+ }
372
+ declare function Checkbox({ checked, onChange, label, disabled, style }: CheckboxProps): react_jsx_runtime.JSX.Element;
373
+
374
+ interface RadioProps {
375
+ selected?: boolean;
376
+ onSelect?: () => void;
377
+ label?: string;
378
+ disabled?: boolean;
379
+ style?: React$1.CSSProperties;
380
+ }
381
+ declare function Radio({ selected, onSelect, label, disabled, style }: RadioProps): react_jsx_runtime.JSX.Element;
382
+
383
+ interface ToggleProps {
384
+ checked?: boolean;
385
+ onChange?: (checked: boolean) => void;
386
+ disabled?: boolean;
387
+ style?: React$1.CSSProperties;
388
+ }
389
+ declare function Toggle({ checked, onChange, disabled, style }: ToggleProps): react_jsx_runtime.JSX.Element;
390
+
391
+ interface CardProps {
392
+ variant?: 'default' | 'subdued' | 'brand' | 'elevated';
393
+ selected?: boolean;
394
+ onClick?: () => void;
395
+ header?: React$1.ReactNode;
396
+ children?: React$1.ReactNode;
397
+ style?: React$1.CSSProperties;
398
+ }
399
+ declare function Card({ variant, selected, onClick, header, children, style, }: CardProps): react_jsx_runtime.JSX.Element;
400
+
401
+ interface ListItemProps {
402
+ title: string;
403
+ subtitle?: string;
404
+ leading?: React$1.ReactNode;
405
+ trailing?: React$1.ReactNode;
406
+ onClick?: () => void;
407
+ divider?: boolean;
408
+ style?: React$1.CSSProperties;
409
+ }
410
+ declare function ListItem({ title, subtitle, leading, trailing, onClick, divider, style, }: ListItemProps): react_jsx_runtime.JSX.Element;
411
+
412
+ interface PageProps {
413
+ children: React$1.ReactNode;
414
+ stickyFooter?: React$1.ReactNode;
415
+ backgroundColor?: string;
416
+ style?: React$1.CSSProperties;
417
+ }
418
+ declare function Page({ children, stickyFooter, backgroundColor, style }: PageProps): react_jsx_runtime.JSX.Element;
419
+
420
+ interface ModalProps {
421
+ open: boolean;
422
+ onClose: () => void;
423
+ title?: string;
424
+ children?: React$1.ReactNode;
425
+ style?: React$1.CSSProperties;
426
+ }
427
+ declare function Modal({ open, onClose, title, children, style }: ModalProps): react_jsx_runtime.JSX.Element | null;
428
+
429
+ interface SelectProps {
430
+ label?: string;
431
+ value?: string;
432
+ options: {
433
+ label: string;
434
+ value: string;
435
+ }[];
436
+ onChange?: (value: string) => void;
437
+ placeholder?: string;
438
+ error?: string;
439
+ disabled?: boolean;
440
+ style?: React$1.CSSProperties;
441
+ }
442
+ declare function Select({ label, value, options, onChange, placeholder, error, disabled, style, }: SelectProps): react_jsx_runtime.JSX.Element;
443
+
444
+ interface ToastProps {
445
+ title: string;
446
+ description?: string;
447
+ variant?: 'brand' | 'success' | 'warning' | 'error';
448
+ visible: boolean;
449
+ onDismiss?: () => void;
450
+ duration?: number;
451
+ }
452
+ declare function Toast({ title, description, variant, visible, onDismiss, duration }: ToastProps): react_jsx_runtime.JSX.Element | null;
453
+ /** Simple hook for managing toast state */
454
+ declare function useToast(): {
455
+ toastProps: ToastProps;
456
+ show: (props: Omit<ToastProps, "visible" | "onDismiss">) => void;
457
+ dismiss: () => void;
458
+ };
459
+
460
+ interface SkeletonProps {
461
+ width?: number | string;
462
+ height?: number | string;
463
+ borderRadius?: number | string;
464
+ style?: React$1.CSSProperties;
465
+ }
466
+ declare function Skeleton({ width, height, borderRadius, style, }: SkeletonProps): react_jsx_runtime.JSX.Element;
467
+
468
+ interface ProgressBarProps {
469
+ progress: number;
470
+ width?: number | string;
471
+ height?: number;
472
+ style?: React$1.CSSProperties;
473
+ }
474
+ declare function ProgressBar({ progress, width, height, style, }: ProgressBarProps): react_jsx_runtime.JSX.Element;
475
+
476
+ interface AccordionProps {
477
+ title: string;
478
+ children: React$1.ReactNode;
479
+ defaultOpen?: boolean;
480
+ onChange?: (open: boolean) => void;
481
+ style?: React$1.CSSProperties;
482
+ }
483
+ declare function Accordion({ title, children, defaultOpen, onChange, style, }: AccordionProps): react_jsx_runtime.JSX.Element;
484
+
485
+ export { Accordion, type AccordionProps, Button, type ButtonProps, Card, type CardProps, Checkbox, type CheckboxProps, Divider, FlexProvider, ListItem, type ListItemProps, Modal, type ModalProps, Page, type PageProps, ProgressBar, type ProgressBarProps, Radio, type RadioProps, Select, type SelectProps, Skeleton, type SkeletonProps, TextField, type TextFieldProps, Toast, type ToastProps, Toggle, type ToggleProps, Typography, type TypographyProps, type TypographyType, fontFamily, fontSize, fontWeight, lineHeight, palette, radius, spacing, useFlexTheme, useToast };