sid-ui 0.0.0-stage → 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/README.md +54 -2
- package/package.json +51 -4
- package/src/brand/BrandFooter.tsx +45 -0
- package/src/brand/BrandHeading.tsx +24 -0
- package/src/brand/BrandLockup.tsx +47 -0
- package/src/brand/JoinedLogo.tsx +67 -0
- package/src/brand/JoinedMark.tsx +76 -0
- package/src/brand/geometry.ts +26 -0
- package/src/brand/index.ts +11 -0
- package/src/brand/name.ts +5 -0
- package/src/brand/paint.tsx +56 -0
- package/src/components/Action.tsx +44 -0
- package/src/components/AddressSelector.tsx +99 -0
- package/src/components/BarChart.tsx +132 -0
- package/src/components/Calendar.tsx +284 -0
- package/src/components/CalendarAgenda.tsx +87 -0
- package/src/components/CalendarMonth.tsx +223 -0
- package/src/components/CalendarSchedule.tsx +210 -0
- package/src/components/Card.tsx +80 -0
- package/src/components/Charts.tsx +64 -0
- package/src/components/Chat.tsx +35 -0
- package/src/components/CitySelector.tsx +81 -0
- package/src/components/Clock.tsx +196 -0
- package/src/components/CodeInput.tsx +183 -0
- package/src/components/Container.tsx +20 -0
- package/src/components/Content.tsx +50 -0
- package/src/components/Data.tsx +43 -0
- package/src/components/DataInput.tsx +107 -0
- package/src/components/DateField.tsx +162 -0
- package/src/components/DonutChart.tsx +123 -0
- package/src/components/Drawer.tsx +110 -0
- package/src/components/Feedback.tsx +37 -0
- package/src/components/FileUploader.tsx +377 -0
- package/src/components/FunnelChart.tsx +83 -0
- package/src/components/Glyph.tsx +330 -0
- package/src/components/GoogleSignIn.tsx +67 -0
- package/src/components/GridSystem.tsx +131 -0
- package/src/components/HeatmapCalendar.tsx +167 -0
- package/src/components/KanbanBoard.tsx +421 -0
- package/src/components/Kpi.tsx +61 -0
- package/src/components/LayoutPrimitives.tsx +86 -0
- package/src/components/Lists.tsx +19 -0
- package/src/components/LocationSelector.tsx +49 -0
- package/src/components/MessageList.tsx +80 -0
- package/src/components/Nav.tsx +69 -0
- package/src/components/Navigation.tsx +52 -0
- package/src/components/Notification.tsx +115 -0
- package/src/components/NotificationTrigger.tsx +248 -0
- package/src/components/Overlay.tsx +50 -0
- package/src/components/Page.tsx +143 -0
- package/src/components/PageTabs.tsx +28 -0
- package/src/components/PickerShell.tsx +138 -0
- package/src/components/PillNav.tsx +194 -0
- package/src/components/Primitives.tsx +30 -0
- package/src/components/Rating.tsx +78 -0
- package/src/components/Responsive.tsx +128 -0
- package/src/components/ResponsiveFrame.tsx +122 -0
- package/src/components/Segment.tsx +190 -0
- package/src/components/Sparkline.tsx +52 -0
- package/src/components/StateSelector.tsx +39 -0
- package/src/components/Sticky.tsx +95 -0
- package/src/components/Table.tsx +344 -0
- package/src/components/ThemeToggle.tsx +48 -0
- package/src/components/Tile.tsx +23 -0
- package/src/components/TimeColumns.tsx +155 -0
- package/src/components/TimeDial.tsx +260 -0
- package/src/components/TimeField.tsx +196 -0
- package/src/components/TimeInput.tsx +213 -0
- package/src/components/TimeSlots.tsx +83 -0
- package/src/components/Timeline.tsx +111 -0
- package/src/components/TokenDemo.tsx +378 -0
- package/src/components/Tree.tsx +283 -0
- package/src/components/TrendChart.tsx +211 -0
- package/src/components/breakpoints.ts +42 -0
- package/src/components/calendarTypes.ts +26 -0
- package/src/components/chartMath.ts +125 -0
- package/src/components/chartParts.tsx +116 -0
- package/src/components/codeInputRules.ts +58 -0
- package/src/components/date.ts +87 -0
- package/src/components/hooks.ts +53 -0
- package/src/components/index.ts +195 -0
- package/src/components/kanban.ts +78 -0
- package/src/components/motion.ts +78 -0
- package/src/components/places-search.tsx +73 -0
- package/src/components/places.ts +209 -0
- package/src/components/size.ts +3 -0
- package/src/components/time.ts +83 -0
- package/src/components/useFileDrop.ts +104 -0
- package/src/places/geoapify.ts +129 -0
- package/src/styles/astryx.css +5 -0
- package/src/styles/components/brand.css +98 -0
- package/src/styles/components/calendar.css +680 -0
- package/src/styles/components/charts.css +659 -0
- package/src/styles/components/code-input.css +233 -0
- package/src/styles/components/google.css +11 -0
- package/src/styles/components/message-list.css +153 -0
- package/src/styles/components/notification.css +350 -0
- package/src/styles/components/picker.css +114 -0
- package/src/styles/components/pill-nav.css +179 -0
- package/src/styles/components/responsive.css +419 -0
- package/src/styles/components/sticky.css +23 -0
- package/src/styles/components/table.css +267 -0
- package/src/styles/components/time.css +526 -0
- package/src/styles/components/timeline.css +426 -0
- package/src/styles/components/tree.css +269 -0
- package/src/styles/components.css +423 -0
- package/src/styles/joined.css +4 -0
- package/src/styles/theme.css +79 -0
- package/src/styles/tokens.css +338 -0
- package/src/theme/JoinedProvider.tsx +50 -0
- package/src/theme/index.ts +3 -0
- package/src/theme/joined.d.ts +11 -0
- package/src/theme/joined.js +569 -0
- package/src/theme/joined.theme.ts +74 -0
- package/src/theme/joined.variants.d.ts +16 -0
- package/src/theme/theme.css +786 -0
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
/* Joined theme tokens — Joined (Meta) token contract.
|
|
2
|
+
Names, scales, and light/dark pairs match https://astryx.atmeta.com/docs/color
|
|
3
|
+
(and typography / spacing / shape). The only brand override is the accent:
|
|
4
|
+
Meta / Facebook blue instead of Joined's default near-black accent. */
|
|
5
|
+
|
|
6
|
+
:root {
|
|
7
|
+
color-scheme: light;
|
|
8
|
+
|
|
9
|
+
/* Primitive Meta blue series — the only brand palette we own. */
|
|
10
|
+
--color-blue-50: #e7f3ff;
|
|
11
|
+
--color-blue-100: #c5dcff;
|
|
12
|
+
--color-blue-200: #9ec2ff;
|
|
13
|
+
--color-blue-300: #6aa6ff;
|
|
14
|
+
--color-blue-400: #4599ff;
|
|
15
|
+
--color-blue-500: #2e89ff;
|
|
16
|
+
--color-blue-600: #1877f2;
|
|
17
|
+
--color-blue-700: #166fe5;
|
|
18
|
+
--color-blue-800: #0c5dc7;
|
|
19
|
+
--color-blue-900: #003978;
|
|
20
|
+
--color-blue-950: #02165e;
|
|
21
|
+
|
|
22
|
+
/* Accent — Joined's --color-accent, re-pointed at the blue series. */
|
|
23
|
+
--color-accent: light-dark(#1877f2, #2e89ff);
|
|
24
|
+
--color-accent-muted: light-dark(#e7f3ff, #253c5a);
|
|
25
|
+
--color-on-accent: #ffffff;
|
|
26
|
+
--color-text-accent: light-dark(#003978, #a1caff);
|
|
27
|
+
--color-icon-accent: light-dark(#003978, #88bcff);
|
|
28
|
+
|
|
29
|
+
--color-neutral: light-dark(#0000000f, #ffffff1a);
|
|
30
|
+
--color-background-surface: light-dark(#ffffff, #262626);
|
|
31
|
+
--color-background-body: light-dark(#f1f1f1, #1b1b1b);
|
|
32
|
+
--color-background-muted: light-dark(#f1f1f1, #1b1b1b);
|
|
33
|
+
--color-background-card: light-dark(#ffffff, #1b1b1b);
|
|
34
|
+
--color-background-popover: light-dark(#ffffff, #1b1b1b);
|
|
35
|
+
--color-overlay: light-dark(#00000080, #000000cc);
|
|
36
|
+
--color-overlay-hover: light-dark(#0000000d, #ffffff0d);
|
|
37
|
+
--color-overlay-pressed: light-dark(#0000001a, #ffffff1a);
|
|
38
|
+
|
|
39
|
+
--color-text-primary: light-dark(#000000, #ffffff);
|
|
40
|
+
--color-text-secondary: light-dark(#474747, #9e9e9e);
|
|
41
|
+
--color-text-disabled: light-dark(#919191, #525252);
|
|
42
|
+
--color-on-dark: #ffffff;
|
|
43
|
+
--color-on-light: #111111;
|
|
44
|
+
|
|
45
|
+
--color-icon-primary: light-dark(#000000, #ffffff);
|
|
46
|
+
--color-icon-secondary: light-dark(#6a6a6a, #9e9e9e);
|
|
47
|
+
--color-icon-disabled: light-dark(#919191, #525252);
|
|
48
|
+
|
|
49
|
+
--color-success: light-dark(#00490b, #a4d6a3);
|
|
50
|
+
--color-success-muted: light-dark(#bce0bb, #2b422b);
|
|
51
|
+
--color-on-success: light-dark(#ffffff, #111111);
|
|
52
|
+
--color-error: light-dark(#76000c, #ffc4be);
|
|
53
|
+
--color-error-muted: light-dark(#ffc4be, #5b2b28);
|
|
54
|
+
--color-on-error: light-dark(#ffffff, #111111);
|
|
55
|
+
--color-warning: light-dark(#4b3900, #f8d36a);
|
|
56
|
+
--color-warning-muted: light-dark(#fae19e, #453a1c);
|
|
57
|
+
--color-on-warning: #111111;
|
|
58
|
+
|
|
59
|
+
--color-border: light-dark(#00000014, #ffffff1a);
|
|
60
|
+
--color-border-emphasized: light-dark(#d4d4d4, #525252);
|
|
61
|
+
--color-skeleton: light-dark(#f1f1f1, #525252);
|
|
62
|
+
--color-track: light-dark(#ccd3db, #5a5e66);
|
|
63
|
+
--color-shadow: light-dark(#0000001a, #0000004d);
|
|
64
|
+
|
|
65
|
+
--color-background-blue: light-dark(#b9d7ff, #253c5a);
|
|
66
|
+
--color-border-blue: light-dark(#a1caff, #5aa0f8);
|
|
67
|
+
--color-icon-blue: light-dark(#003978, #88bcff);
|
|
68
|
+
--color-text-blue: light-dark(#003978, #a1caff);
|
|
69
|
+
|
|
70
|
+
/* Spacing — 4px grid, Joined --spacing-* */
|
|
71
|
+
--spacing-0: 0px;
|
|
72
|
+
--spacing-0-5: 2px;
|
|
73
|
+
--spacing-1: 4px;
|
|
74
|
+
--spacing-1-5: 6px;
|
|
75
|
+
--spacing-2: 8px;
|
|
76
|
+
--spacing-3: 12px;
|
|
77
|
+
--spacing-4: 16px;
|
|
78
|
+
--spacing-5: 20px;
|
|
79
|
+
--spacing-6: 24px;
|
|
80
|
+
--spacing-7: 28px;
|
|
81
|
+
--spacing-8: 32px;
|
|
82
|
+
--spacing-9: 36px;
|
|
83
|
+
--spacing-10: 40px;
|
|
84
|
+
--spacing-11: 44px;
|
|
85
|
+
--spacing-12: 48px;
|
|
86
|
+
--spacing-16: 64px;
|
|
87
|
+
|
|
88
|
+
/* Shape — inner → element → container → page */
|
|
89
|
+
--radius-none: 0px;
|
|
90
|
+
--radius-inner: 8px;
|
|
91
|
+
--radius-element: 12px;
|
|
92
|
+
--radius-container: 16px;
|
|
93
|
+
--radius-page: 32px;
|
|
94
|
+
--radius-chat: 28px;
|
|
95
|
+
--radius-full: 9999px;
|
|
96
|
+
|
|
97
|
+
/* Type — system UI stack, 14px × 1.2 geometric scale */
|
|
98
|
+
--font-family-body:
|
|
99
|
+
system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
|
100
|
+
--font-family-heading: var(--font-family-body);
|
|
101
|
+
--font-family-code: "SF Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
102
|
+
|
|
103
|
+
--font-size-xs: 0.625rem;
|
|
104
|
+
--font-size-sm: 0.75rem;
|
|
105
|
+
--font-size-base: 0.875rem;
|
|
106
|
+
--font-size-lg: 1.0625rem;
|
|
107
|
+
--font-size-xl: 1.25rem;
|
|
108
|
+
--font-size-2xl: 1.5rem;
|
|
109
|
+
--font-size-3xl: 1.8125rem;
|
|
110
|
+
--font-size-4xl: 2.1875rem;
|
|
111
|
+
--font-size-5xl: 2.625rem;
|
|
112
|
+
|
|
113
|
+
--font-weight-normal: 400;
|
|
114
|
+
--font-weight-medium: 500;
|
|
115
|
+
--font-weight-semibold: 600;
|
|
116
|
+
--font-weight-bold: 700;
|
|
117
|
+
|
|
118
|
+
--text-display-1-size: var(--font-size-5xl);
|
|
119
|
+
--text-heading-1-size: var(--font-size-2xl);
|
|
120
|
+
--text-heading-2-size: var(--font-size-xl);
|
|
121
|
+
--text-heading-3-size: var(--font-size-lg);
|
|
122
|
+
--text-body-size: var(--font-size-base);
|
|
123
|
+
--text-label-size: var(--font-size-base);
|
|
124
|
+
--text-supporting-size: var(--font-size-sm);
|
|
125
|
+
|
|
126
|
+
--duration-fast: 80ms;
|
|
127
|
+
--duration-normal: 120ms;
|
|
128
|
+
--duration-slow: 200ms;
|
|
129
|
+
--ease-standard: cubic-bezier(0.25, 0.1, 0.25, 1);
|
|
130
|
+
--ease-decelerate: cubic-bezier(0.16, 1, 0.3, 1);
|
|
131
|
+
|
|
132
|
+
--z-nav: 40;
|
|
133
|
+
--z-overlay: 100;
|
|
134
|
+
--z-toast: 110;
|
|
135
|
+
--z-tooltip: 120;
|
|
136
|
+
|
|
137
|
+
--control-height: 36px;
|
|
138
|
+
--control-height-sm: 32px;
|
|
139
|
+
--control-height-lg: 48px;
|
|
140
|
+
|
|
141
|
+
/* Compatibility aliases used by existing .os-* CSS */
|
|
142
|
+
--canvas: var(--color-background-body);
|
|
143
|
+
--surface: var(--color-background-surface);
|
|
144
|
+
--surface-sunken: var(--color-background-muted);
|
|
145
|
+
--surface-hover: color-mix(
|
|
146
|
+
in srgb,
|
|
147
|
+
var(--color-text-primary) 6%,
|
|
148
|
+
var(--color-background-surface)
|
|
149
|
+
);
|
|
150
|
+
--surface-selected: var(--color-neutral);
|
|
151
|
+
--border-subtle: var(--color-border);
|
|
152
|
+
--border-default: var(--color-border-emphasized);
|
|
153
|
+
--border-strong: var(--color-border-emphasized);
|
|
154
|
+
--border-focus: var(--color-accent);
|
|
155
|
+
--ink: var(--color-text-primary);
|
|
156
|
+
--ink-muted: var(--color-text-secondary);
|
|
157
|
+
--ink-faint: var(--color-text-disabled);
|
|
158
|
+
--on-primary: var(--color-on-accent);
|
|
159
|
+
--primary: var(--color-accent);
|
|
160
|
+
--primary-hover: light-dark(#166fe5, #4599ff);
|
|
161
|
+
--primary-active: light-dark(#0c5dc7, #1877f2);
|
|
162
|
+
--primary-bg: var(--color-accent-muted);
|
|
163
|
+
--link: var(--color-accent);
|
|
164
|
+
--link-hover: var(--color-text-accent);
|
|
165
|
+
--success: var(--color-success);
|
|
166
|
+
--success-bg: var(--color-success-muted);
|
|
167
|
+
--warning: var(--color-warning);
|
|
168
|
+
--warning-bg: var(--color-warning-muted);
|
|
169
|
+
--danger: var(--color-error);
|
|
170
|
+
--danger-hover: light-dark(#8a0011, #ffaea7);
|
|
171
|
+
--danger-bg: var(--color-error-muted);
|
|
172
|
+
--overlay: var(--color-overlay);
|
|
173
|
+
|
|
174
|
+
--radius-sm: var(--radius-inner);
|
|
175
|
+
--radius-md: var(--radius-element);
|
|
176
|
+
--radius-lg: var(--radius-container);
|
|
177
|
+
--radius-xl: var(--radius-container);
|
|
178
|
+
--radius-2xl: var(--radius-page);
|
|
179
|
+
--radius-pill: var(--radius-full);
|
|
180
|
+
|
|
181
|
+
/* Astryx spacing aliases used by the migrated design-system components. */
|
|
182
|
+
--space-1: var(--spacing-1);
|
|
183
|
+
--space-2: var(--spacing-2);
|
|
184
|
+
--space-3: var(--spacing-3);
|
|
185
|
+
--space-4: var(--spacing-4);
|
|
186
|
+
--space-5: var(--spacing-5);
|
|
187
|
+
--space-6: var(--spacing-6);
|
|
188
|
+
--space-8: var(--spacing-8);
|
|
189
|
+
--space-12: var(--spacing-12);
|
|
190
|
+
--space-16: var(--spacing-16);
|
|
191
|
+
|
|
192
|
+
--elevation-0: none;
|
|
193
|
+
--elevation-1: 0 1px 2px var(--color-shadow);
|
|
194
|
+
--elevation-2: 0 4px 16px var(--color-shadow);
|
|
195
|
+
--elevation-3: 0 16px 48px var(--color-shadow);
|
|
196
|
+
|
|
197
|
+
--border-width-hairline: 1px;
|
|
198
|
+
--border-width-thick: 2px;
|
|
199
|
+
--opacity-disabled: 0.45;
|
|
200
|
+
|
|
201
|
+
--font-sans: var(--font-family-body);
|
|
202
|
+
--font-mono: var(--font-family-code);
|
|
203
|
+
|
|
204
|
+
--meta-blue-50: var(--color-blue-50);
|
|
205
|
+
--meta-blue-100: var(--color-blue-100);
|
|
206
|
+
--meta-blue-200: var(--color-blue-200);
|
|
207
|
+
--meta-blue-300: var(--color-blue-300);
|
|
208
|
+
--meta-blue-400: var(--color-blue-400);
|
|
209
|
+
--meta-blue-500: var(--color-blue-500);
|
|
210
|
+
--meta-blue-600: var(--color-blue-600);
|
|
211
|
+
--meta-blue-700: var(--color-blue-700);
|
|
212
|
+
--meta-blue-800: var(--color-blue-800);
|
|
213
|
+
--meta-blue-900: var(--color-blue-900);
|
|
214
|
+
--meta-blue-950: var(--color-blue-950);
|
|
215
|
+
|
|
216
|
+
/* Data visualization series — fills for charts, meters and status marks. */
|
|
217
|
+
--color-chart-accent: light-dark(#1877f2, #4599ff);
|
|
218
|
+
--color-chart-accent-soft: light-dark(#9ec2ff, #1f4f94);
|
|
219
|
+
--color-chart-positive: light-dark(#1a8a3a, #4bb56a);
|
|
220
|
+
--color-chart-caution: light-dark(#d99a00, #f0b429);
|
|
221
|
+
--color-chart-critical: light-dark(#c5311f, #f07167);
|
|
222
|
+
--color-chart-violet: light-dark(#6b4fd8, #a08cf2);
|
|
223
|
+
--color-chart-neutral: light-dark(#b4bac4, #5a5e66);
|
|
224
|
+
--color-chart-grid: light-dark(#0000000f, #ffffff14);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
[data-theme="light"] {
|
|
228
|
+
color-scheme: light;
|
|
229
|
+
}
|
|
230
|
+
[data-theme="dark"] {
|
|
231
|
+
color-scheme: dark;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/* Type styles — Joined semantic scale */
|
|
235
|
+
.display {
|
|
236
|
+
font-family: var(--font-family-heading);
|
|
237
|
+
font-size: var(--font-size-5xl);
|
|
238
|
+
font-weight: var(--font-weight-semibold);
|
|
239
|
+
line-height: 1.24;
|
|
240
|
+
letter-spacing: -0.03em;
|
|
241
|
+
color: var(--color-text-primary);
|
|
242
|
+
}
|
|
243
|
+
.h1 {
|
|
244
|
+
font-family: var(--font-family-heading);
|
|
245
|
+
font-size: var(--text-heading-1-size);
|
|
246
|
+
font-weight: var(--font-weight-semibold);
|
|
247
|
+
line-height: 1.33;
|
|
248
|
+
letter-spacing: -0.02em;
|
|
249
|
+
color: var(--color-text-primary);
|
|
250
|
+
}
|
|
251
|
+
.h2 {
|
|
252
|
+
font-family: var(--font-family-heading);
|
|
253
|
+
font-size: var(--text-heading-2-size);
|
|
254
|
+
font-weight: var(--font-weight-semibold);
|
|
255
|
+
line-height: 1.4;
|
|
256
|
+
color: var(--color-text-primary);
|
|
257
|
+
}
|
|
258
|
+
.h3 {
|
|
259
|
+
font-family: var(--font-family-heading);
|
|
260
|
+
font-size: var(--text-heading-3-size);
|
|
261
|
+
font-weight: var(--font-weight-semibold);
|
|
262
|
+
line-height: 1.41;
|
|
263
|
+
color: var(--color-text-primary);
|
|
264
|
+
}
|
|
265
|
+
.body-lg,
|
|
266
|
+
.body,
|
|
267
|
+
.body-strong,
|
|
268
|
+
.body-sm,
|
|
269
|
+
.label,
|
|
270
|
+
.caption,
|
|
271
|
+
.button {
|
|
272
|
+
font-family: var(--font-family-body);
|
|
273
|
+
color: var(--color-text-primary);
|
|
274
|
+
}
|
|
275
|
+
.body-lg {
|
|
276
|
+
font-size: var(--font-size-lg);
|
|
277
|
+
font-weight: var(--font-weight-normal);
|
|
278
|
+
line-height: 1.41;
|
|
279
|
+
}
|
|
280
|
+
.body {
|
|
281
|
+
font-size: var(--text-body-size);
|
|
282
|
+
font-weight: var(--font-weight-normal);
|
|
283
|
+
line-height: 1.43;
|
|
284
|
+
}
|
|
285
|
+
.body-strong {
|
|
286
|
+
font-size: var(--text-body-size);
|
|
287
|
+
font-weight: var(--font-weight-medium);
|
|
288
|
+
line-height: 1.43;
|
|
289
|
+
}
|
|
290
|
+
.body-sm {
|
|
291
|
+
font-size: var(--text-supporting-size);
|
|
292
|
+
font-weight: var(--font-weight-normal);
|
|
293
|
+
line-height: 1.67;
|
|
294
|
+
}
|
|
295
|
+
.label {
|
|
296
|
+
font-size: var(--text-label-size);
|
|
297
|
+
font-weight: var(--font-weight-medium);
|
|
298
|
+
line-height: 1.43;
|
|
299
|
+
}
|
|
300
|
+
.caption {
|
|
301
|
+
font-size: var(--text-supporting-size);
|
|
302
|
+
font-weight: var(--font-weight-normal);
|
|
303
|
+
line-height: 1.67;
|
|
304
|
+
color: var(--color-text-secondary);
|
|
305
|
+
}
|
|
306
|
+
.button {
|
|
307
|
+
font-size: var(--text-label-size);
|
|
308
|
+
font-weight: var(--font-weight-medium);
|
|
309
|
+
line-height: 20px;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.text-ink {
|
|
313
|
+
color: var(--color-text-primary);
|
|
314
|
+
}
|
|
315
|
+
.text-ink-muted {
|
|
316
|
+
color: var(--color-text-secondary);
|
|
317
|
+
}
|
|
318
|
+
.text-ink-faint {
|
|
319
|
+
color: var(--color-text-disabled);
|
|
320
|
+
}
|
|
321
|
+
.text-primary {
|
|
322
|
+
color: var(--color-accent);
|
|
323
|
+
}
|
|
324
|
+
.text-link {
|
|
325
|
+
color: var(--color-accent);
|
|
326
|
+
}
|
|
327
|
+
.text-danger {
|
|
328
|
+
color: var(--color-error);
|
|
329
|
+
}
|
|
330
|
+
.text-success {
|
|
331
|
+
color: var(--color-success);
|
|
332
|
+
}
|
|
333
|
+
.text-warning {
|
|
334
|
+
color: var(--color-warning);
|
|
335
|
+
}
|
|
336
|
+
.text-on-primary {
|
|
337
|
+
color: var(--color-on-accent);
|
|
338
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { LayerProvider } from "@astryxdesign/core/Layer";
|
|
4
|
+
import { LinkProvider, type LinkComponentType } from "@astryxdesign/core/Link";
|
|
5
|
+
import { Theme, type ThemeMode } from "@astryxdesign/core/theme";
|
|
6
|
+
import { ToastViewport, type ToastPosition } from "@astryxdesign/core/Toast";
|
|
7
|
+
|
|
8
|
+
import { NotificationViewport } from "../components/NotificationTrigger";
|
|
9
|
+
|
|
10
|
+
import { joinedTheme } from "./joined";
|
|
11
|
+
|
|
12
|
+
import type { ReactNode } from "react";
|
|
13
|
+
|
|
14
|
+
export type ColorMode = ThemeMode;
|
|
15
|
+
|
|
16
|
+
export interface JoinedProviderProps {
|
|
17
|
+
children: ReactNode;
|
|
18
|
+
/** light, dark, or system. */
|
|
19
|
+
mode?: ColorMode;
|
|
20
|
+
/** Router-aware link used by Link and Button `href`, e.g. Next.js `Link`. */
|
|
21
|
+
linkComponent?: LinkComponentType;
|
|
22
|
+
/** Where toasts from useToast stack. */
|
|
23
|
+
toastPosition?: ToastPosition;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Everything an app needs to render Joined: the Astryx theme, the link
|
|
28
|
+
* component for routing, the layer root for menus and tooltips, and the
|
|
29
|
+
* toast viewport behind useToast.
|
|
30
|
+
* Pair it with `sid-ui/styles/joined.css`.
|
|
31
|
+
*/
|
|
32
|
+
export function JoinedProvider({
|
|
33
|
+
children,
|
|
34
|
+
mode = "system",
|
|
35
|
+
linkComponent,
|
|
36
|
+
toastPosition = "bottomEnd",
|
|
37
|
+
}: JoinedProviderProps) {
|
|
38
|
+
const layered = (
|
|
39
|
+
<LayerProvider>
|
|
40
|
+
<ToastViewport position={toastPosition}>
|
|
41
|
+
<NotificationViewport>{children}</NotificationViewport>
|
|
42
|
+
</ToastViewport>
|
|
43
|
+
</LayerProvider>
|
|
44
|
+
);
|
|
45
|
+
return (
|
|
46
|
+
<Theme theme={joinedTheme} mode={mode}>
|
|
47
|
+
{linkComponent ? <LinkProvider component={linkComponent}>{layered}</LinkProvider> : layered}
|
|
48
|
+
</Theme>
|
|
49
|
+
);
|
|
50
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @generated by `astryx theme build` — do not edit manually.
|
|
3
|
+
* Source: src/theme/joined.theme.ts
|
|
4
|
+
* Command: astryx theme build src/theme/joined.theme.ts --out src/theme/theme.css
|
|
5
|
+
* CLI: @astryxdesign/cli@0.6.2
|
|
6
|
+
* Core: @astryxdesign/core@0.6.2
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/// <reference path="./joined.variants.d.ts" />
|
|
10
|
+
import type { DefinedTheme } from "@astryxdesign/core/theme";
|
|
11
|
+
export declare const joinedTheme: DefinedTheme;
|