@fabrika/ui 0.0.0-stage → 0.0.1
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/README.md +22 -2
- package/package.json +35 -5
- package/src/AppShell.tsx +54 -0
- package/src/Button.tsx +47 -0
- package/src/Card.tsx +57 -0
- package/src/Columns.tsx +32 -0
- package/src/DataTable.tsx +224 -0
- package/src/Dialog.tsx +158 -0
- package/src/Field.tsx +91 -0
- package/src/FieldList.tsx +30 -0
- package/src/FilterBar.tsx +24 -0
- package/src/Form.tsx +58 -0
- package/src/PageHeader.tsx +35 -0
- package/src/StatusPill.tsx +18 -0
- package/src/Tabs.tsx +74 -0
- package/src/Timeline.tsx +37 -0
- package/src/Toast.tsx +80 -0
- package/src/class-names.ts +4 -0
- package/src/components.css +1312 -0
- package/src/index.ts +68 -0
- package/src/inputs.tsx +164 -0
- package/src/layout.tsx +40 -0
- package/src/router.tsx +279 -0
- package/src/states.tsx +78 -0
- package/src/styles.css +2 -0
- package/src/theme.css +125 -0
- package/src/tone.ts +1 -0
package/src/theme.css
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The @fabrika/ui design tokens. This file holds custom properties and `color-scheme` only: an application overrides any of them in its
|
|
3
|
+
* own stylesheet, imported after `@fabrika/ui/styles.css`. Every component rule reads these tokens and nothing else.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
:root {
|
|
7
|
+
/* Native controls (file inputs, date pickers, scrollbars) follow the token set. */
|
|
8
|
+
color-scheme: light;
|
|
9
|
+
--fui-font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
10
|
+
--fui-font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
|
|
11
|
+
--fui-text-xs: 11px;
|
|
12
|
+
--fui-text-sm: 12px;
|
|
13
|
+
--fui-text-md: 14px;
|
|
14
|
+
--fui-text-lg: 16px;
|
|
15
|
+
--fui-text-xl: 18px;
|
|
16
|
+
--fui-text-2xl: 22px;
|
|
17
|
+
--fui-line-height: 1.45;
|
|
18
|
+
--fui-line-height-tight: 1.2;
|
|
19
|
+
--fui-weight-regular: 400;
|
|
20
|
+
--fui-weight-medium: 500;
|
|
21
|
+
--fui-weight-semibold: 600;
|
|
22
|
+
|
|
23
|
+
--fui-bg: #f6f7f9;
|
|
24
|
+
--fui-surface: #ffffff;
|
|
25
|
+
--fui-surface-muted: #f0f2f5;
|
|
26
|
+
--fui-border: #e1e4ea;
|
|
27
|
+
--fui-border-strong: #c7ccd6;
|
|
28
|
+
--fui-text: #1b1f27;
|
|
29
|
+
--fui-text-muted: #545c6b;
|
|
30
|
+
--fui-text-subtle: #7d8595;
|
|
31
|
+
--fui-accent: #3b5bdb;
|
|
32
|
+
--fui-accent-hover: #3049b8;
|
|
33
|
+
--fui-accent-contrast: #ffffff;
|
|
34
|
+
--fui-accent-soft: #e9edfc;
|
|
35
|
+
--fui-focus: #5b78e8;
|
|
36
|
+
--fui-overlay: rgba(17, 21, 30, 0.42);
|
|
37
|
+
--fui-skeleton: #e6e9ee;
|
|
38
|
+
|
|
39
|
+
--fui-success: #2b8a57;
|
|
40
|
+
--fui-success-soft: #e5f4ec;
|
|
41
|
+
--fui-success-text: #1d6b42;
|
|
42
|
+
--fui-warning: #c27a12;
|
|
43
|
+
--fui-warning-soft: #fbf1df;
|
|
44
|
+
--fui-warning-text: #8a5409;
|
|
45
|
+
--fui-danger: #c93a3a;
|
|
46
|
+
--fui-danger-soft: #fbe9e9;
|
|
47
|
+
--fui-danger-text: #a12a2a;
|
|
48
|
+
--fui-info: #2f7fb8;
|
|
49
|
+
--fui-info-soft: #e5f1f9;
|
|
50
|
+
--fui-info-text: #1f6190;
|
|
51
|
+
|
|
52
|
+
--fui-space-1: 4px;
|
|
53
|
+
--fui-space-2: 8px;
|
|
54
|
+
--fui-space-3: 12px;
|
|
55
|
+
--fui-space-4: 16px;
|
|
56
|
+
--fui-space-5: 20px;
|
|
57
|
+
--fui-space-6: 24px;
|
|
58
|
+
--fui-space-7: 32px;
|
|
59
|
+
--fui-space-8: 40px;
|
|
60
|
+
--fui-radius-sm: 4px;
|
|
61
|
+
--fui-radius-md: 6px;
|
|
62
|
+
--fui-radius-lg: 10px;
|
|
63
|
+
--fui-radius-full: 999px;
|
|
64
|
+
--fui-border-width: 1px;
|
|
65
|
+
--fui-focus-width: 2px;
|
|
66
|
+
--fui-shadow-sm: 0 1px 2px rgba(17, 21, 30, 0.06);
|
|
67
|
+
--fui-shadow-md: 0 2px 8px rgba(17, 21, 30, 0.08), 0 1px 2px rgba(17, 21, 30, 0.06);
|
|
68
|
+
--fui-shadow-lg: 0 12px 32px rgba(17, 21, 30, 0.16), 0 2px 6px rgba(17, 21, 30, 0.08);
|
|
69
|
+
|
|
70
|
+
--fui-sidebar-width: 232px;
|
|
71
|
+
--fui-shell-min-height: 100vh;
|
|
72
|
+
--fui-side-panel-width: 320px;
|
|
73
|
+
--fui-content-max-width: 1280px;
|
|
74
|
+
--fui-dialog-width: 480px;
|
|
75
|
+
--fui-toast-width: 360px;
|
|
76
|
+
--fui-control-height: 32px;
|
|
77
|
+
--fui-control-height-sm: 26px;
|
|
78
|
+
--fui-row-height: 36px;
|
|
79
|
+
--fui-check-size: 14px;
|
|
80
|
+
--fui-spinner-size: 14px;
|
|
81
|
+
--fui-dot-size: 6px;
|
|
82
|
+
--fui-transition: 120ms ease-out;
|
|
83
|
+
--fui-disabled-opacity: 0.6;
|
|
84
|
+
--fui-spin-duration: 700ms;
|
|
85
|
+
--fui-pulse-duration: 1.2s;
|
|
86
|
+
--fui-z-sticky: 2;
|
|
87
|
+
--fui-z-overlay: 100;
|
|
88
|
+
--fui-z-toast: 110;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
:root[data-theme='dark'] {
|
|
92
|
+
color-scheme: dark;
|
|
93
|
+
--fui-bg: #12151b;
|
|
94
|
+
--fui-surface: #191d25;
|
|
95
|
+
--fui-surface-muted: #20252f;
|
|
96
|
+
--fui-border: #2c323d;
|
|
97
|
+
--fui-border-strong: #3d4552;
|
|
98
|
+
--fui-text: #e6e9ef;
|
|
99
|
+
--fui-text-muted: #a8b0bf;
|
|
100
|
+
--fui-text-subtle: #7c8596;
|
|
101
|
+
--fui-accent: #7390f0;
|
|
102
|
+
--fui-accent-hover: #8ba3f4;
|
|
103
|
+
--fui-accent-contrast: #0e1220;
|
|
104
|
+
--fui-accent-soft: #232d4d;
|
|
105
|
+
--fui-focus: #8ba3f4;
|
|
106
|
+
--fui-overlay: rgba(5, 7, 11, 0.6);
|
|
107
|
+
--fui-skeleton: #262b35;
|
|
108
|
+
|
|
109
|
+
--fui-success: #4cb27c;
|
|
110
|
+
--fui-success-soft: #173326;
|
|
111
|
+
--fui-success-text: #7fd0a4;
|
|
112
|
+
--fui-warning: #e0a043;
|
|
113
|
+
--fui-warning-soft: #3a2c14;
|
|
114
|
+
--fui-warning-text: #f0c27e;
|
|
115
|
+
--fui-danger: #e46a6a;
|
|
116
|
+
--fui-danger-soft: #3b1d1f;
|
|
117
|
+
--fui-danger-text: #f2a0a0;
|
|
118
|
+
--fui-info: #5aa6db;
|
|
119
|
+
--fui-info-soft: #16293a;
|
|
120
|
+
--fui-info-text: #93c6ea;
|
|
121
|
+
|
|
122
|
+
--fui-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
|
|
123
|
+
--fui-shadow-md: 0 2px 8px rgba(0, 0, 0, 0.35), 0 1px 2px rgba(0, 0, 0, 0.3);
|
|
124
|
+
--fui-shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.35);
|
|
125
|
+
}
|
package/src/tone.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type Tone = 'neutral' | 'info' | 'success' | 'warning' | 'danger' | 'accent'
|