@efolusi/meridian 1.21.10 → 1.23.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/LICENSE +201 -21
- package/THIRD_PARTY_NOTICES.md +3 -3
- package/ai/AgentRun.js +1 -0
- package/ai/Bubble.js +1 -0
- package/ai/ChatMessage.js +1 -0
- package/ai/Citation.js +45 -22
- package/ai/Confirmation.js +3 -2
- package/ai/Conversation.js +1 -0
- package/ai/DocumentCard.js +1 -0
- package/ai/FeedbackBar.js +1 -0
- package/ai/GeneratedImage.js +1 -0
- package/ai/Marker.js +1 -0
- package/ai/Message.js +1 -0
- package/ai/MessageScroller.js +1 -0
- package/ai/ModelSelector.js +1 -0
- package/ai/Player.js +1 -0
- package/ai/PromptComposer.d.ts +4 -0
- package/ai/PromptComposer.js +8 -1
- package/ai/PromptSteps.js +1 -0
- package/ai/Reasoning.js +1 -0
- package/ai/RichComposer.js +4 -0
- package/ai/Sandbox.js +1 -0
- package/ai/SelectionQuote.js +1 -0
- package/ai/SourceCard.js +13 -4
- package/ai/Suggestions.js +1 -0
- package/ai/Task.js +1 -0
- package/ai/Todo.js +1 -0
- package/ai/ToolCall.js +1 -0
- package/ai/Transcript.js +1 -0
- package/ai/UsageMeter.d.ts +3 -1
- package/ai/UsageMeter.js +9 -2
- package/ai/WebPreview.js +13 -4
- package/code/CodeBlock.js +27 -7
- package/code/Console.js +1 -0
- package/code/CopyField.js +25 -9
- package/code/Diff.js +1 -0
- package/code/EnvList.js +1 -0
- package/code/Exception.js +1 -0
- package/code/Terminal.js +1 -0
- package/components.css +139 -56
- package/data/BarChart.d.ts +4 -0
- package/data/BarChart.js +29 -4
- package/data/Chart.d.ts +1 -1
- package/data/Chart.js +10 -4
- package/data/DonutChart.d.ts +4 -0
- package/data/DonutChart.js +38 -8
- package/data/EmptyState.js +1 -0
- package/data/KeyValueList.js +1 -0
- package/data/LineChart.d.ts +4 -0
- package/data/LineChart.js +30 -7
- package/data/Skeleton.js +1 -0
- package/data/Sparkline.js +1 -0
- package/data/Stat.js +1 -0
- package/data/StatusDot.js +1 -0
- package/data/Table.d.ts +1 -0
- package/data/Table.js +36 -19
- package/dates/Calendar.js +44 -15
- package/dates/TimePicker.js +19 -3
- package/display/Accordion.js +1 -0
- package/display/AspectRatio.js +1 -0
- package/display/Avatar.js +1 -0
- package/display/Badge.js +1 -0
- package/display/Card.js +1 -0
- package/display/Carousel.js +24 -6
- package/display/Collapsible.js +1 -0
- package/display/Direction.js +1 -0
- package/display/Divider.js +1 -0
- package/display/Item.js +1 -0
- package/display/Kbd.js +1 -0
- package/display/Link.js +1 -0
- package/display/Resizable.js +5 -4
- package/display/ScrollArea.js +4 -2
- package/display/Separator.js +1 -0
- package/display/Tag.js +1 -0
- package/display/Timeline.js +1 -0
- package/display/Toolbar.js +2 -0
- package/display/TreeList.js +21 -13
- package/feedback/Alert.js +1 -0
- package/feedback/AlertDialog.js +31 -18
- package/feedback/Banner.js +1 -0
- package/feedback/ConfirmDialog.js +1 -0
- package/feedback/Dialog.js +37 -18
- package/feedback/Loader.js +1 -0
- package/feedback/Progress.js +1 -0
- package/feedback/Spinner.js +1 -0
- package/feedback/Toast.js +10 -3
- package/feedback/Tooltip.js +25 -6
- package/files/Attachment.js +1 -0
- package/files/FileDrop.d.ts +5 -1
- package/files/FileDrop.js +29 -1
- package/files/FileTile.js +1 -0
- package/files/FileTypeIcon.js +1 -0
- package/finance/PaymentCard.js +1 -0
- package/forms/Button.js +55 -0
- package/forms/ButtonGroup.js +1 -0
- package/forms/ButtonTile.js +3 -0
- package/forms/Checkbox.js +1 -0
- package/forms/Combobox.js +31 -9
- package/forms/Field.js +1 -0
- package/forms/IconButton.js +1 -0
- package/forms/Input.js +1 -0
- package/forms/InputGroup.js +1 -0
- package/forms/InputOTP.js +1 -0
- package/forms/Label.js +1 -0
- package/forms/NativeSelect.js +1 -0
- package/forms/NumberInput.js +22 -4
- package/forms/Questionnaire.js +2 -1
- package/forms/Radio.js +1 -0
- package/forms/Select.js +7 -4
- package/forms/Slider.js +26 -3
- package/forms/Switch.js +15 -3
- package/forms/Textarea.js +1 -0
- package/forms/Toggle.js +1 -0
- package/icons/Icon.js +6 -0
- package/icons/_svg.js +1 -1
- package/index.js +3 -3
- package/navigation/Breadcrumbs.js +1 -0
- package/navigation/Menubar.js +1 -0
- package/navigation/NavigationMenu.js +18 -5
- package/navigation/PageControl.js +2 -0
- package/navigation/Pagination.js +1 -0
- package/navigation/SegmentedControl.js +2 -0
- package/navigation/SideNav.js +3 -0
- package/navigation/Sidebar.js +75 -11
- package/navigation/SkipLink.d.ts +2 -1
- package/navigation/SkipLink.js +17 -4
- package/navigation/Steps.js +1 -0
- package/navigation/Tabs.js +1 -0
- package/navigation/TopNav.js +1 -0
- package/overlay/Command.js +2 -0
- package/overlay/ContextMenu.js +40 -13
- package/overlay/Drawer.d.ts +4 -0
- package/overlay/Drawer.js +24 -3
- package/overlay/DropdownMenu.js +40 -13
- package/overlay/HoverCard.js +29 -19
- package/overlay/Popover.js +67 -16
- package/overlay/Portal.js +97 -2
- package/overlay/Sheet.js +1 -0
- package/package.json +2 -2
- package/tailwind.preset.cjs +60 -28
- package/tokens/base.css +19 -3
- package/tokens/colors.css +248 -46
- package/tokens/effects.css +33 -20
- package/tokens/fonts.css +7 -0
- package/tokens/spacing.css +42 -17
- package/tokens/typography.css +29 -8
- package/tokens.json +689 -115
package/overlay/Portal.js
CHANGED
|
@@ -1,9 +1,27 @@
|
|
|
1
1
|
'use client';
|
|
2
|
+
|
|
2
3
|
import React from 'react';
|
|
3
4
|
// Bare imports are stripped by the bundle compiler, so this resolves to the
|
|
4
5
|
// window global there; in an ESM consumer it resolves normally. Both work.
|
|
5
6
|
import ReactDOM from 'react-dom';
|
|
6
7
|
import { useIsoLayoutEffect } from "../forms/Button.js";
|
|
8
|
+
const noopSubscribe = () => () => {};
|
|
9
|
+
const onClient = () => true;
|
|
10
|
+
const onServer = () => false;
|
|
11
|
+
/**
|
|
12
|
+
* False on the server and during hydration, true for every other client render.
|
|
13
|
+
*
|
|
14
|
+
* A Portal renders nothing on the server, so one mounted while React hydrates
|
|
15
|
+
* server HTML is a mismatch. Owners gate on this instead of deferring Portal
|
|
16
|
+
* itself: Toaster renders its portal only once this is true, and each overlay
|
|
17
|
+
* root treats itself as closed until then (`useHydrated() && open`), so an
|
|
18
|
+
* overlay open on first load opens right after hydration and its focus and
|
|
19
|
+
* placement effects, keyed on open, run with the panel present.
|
|
20
|
+
*/
|
|
21
|
+
export function useHydrated() {
|
|
22
|
+
return React.useSyncExternalStore(noopSubscribe, onClient, onServer);
|
|
23
|
+
}
|
|
24
|
+
|
|
7
25
|
/**
|
|
8
26
|
* Renders children into document.body (or `container`).
|
|
9
27
|
*
|
|
@@ -29,7 +47,19 @@ export function Portal({
|
|
|
29
47
|
if (!host) return;
|
|
30
48
|
const parent = container || document.body;
|
|
31
49
|
parent.appendChild(host);
|
|
50
|
+
// StrictMode (on by default in Next.js dev) runs the cleanup and this effect
|
|
51
|
+
// again right after mount. Detaching the host blurs whatever a dialog just
|
|
52
|
+
// focused inside it, so put that focus back once the host is attached again.
|
|
53
|
+
const refocus = host.__efRefocus;
|
|
54
|
+
host.__efRefocus = null;
|
|
55
|
+
if (refocus && refocus.isConnected && host.contains(refocus) && (document.activeElement === document.body || document.activeElement === null)) {
|
|
56
|
+
refocus.focus({
|
|
57
|
+
preventScroll: true
|
|
58
|
+
});
|
|
59
|
+
}
|
|
32
60
|
return () => {
|
|
61
|
+
const active = document.activeElement;
|
|
62
|
+
host.__efRefocus = active && host.contains(active) ? active : null;
|
|
33
63
|
if (host.parentNode) host.parentNode.removeChild(host);
|
|
34
64
|
};
|
|
35
65
|
}, [container]);
|
|
@@ -93,6 +123,10 @@ export function useAnchoredStyle(anchorRef, panelRef, {
|
|
|
93
123
|
const vh = document.documentElement.clientHeight;
|
|
94
124
|
const edge = 8;
|
|
95
125
|
const horizontal = placement === 'left' || placement === 'right';
|
|
126
|
+
// start/end are logical: in a right-to-left layout "start" is the anchor's right edge
|
|
127
|
+
const dirNode = anchor.closest('[dir]');
|
|
128
|
+
const rtl = (dirNode ? dirNode.getAttribute('dir') : document.documentElement.dir) === 'rtl';
|
|
129
|
+
const inline = !horizontal && rtl ? align === 'start' ? 'end' : align === 'end' ? 'start' : align : align;
|
|
96
130
|
const roomAfter = horizontal ? vw - a.right - offset : vh - a.bottom - offset;
|
|
97
131
|
const roomBefore = horizontal ? a.left - offset : a.top - offset;
|
|
98
132
|
const panelSize = horizontal ? p.width : p.height;
|
|
@@ -112,8 +146,8 @@ export function useAnchoredStyle(anchorRef, panelRef, {
|
|
|
112
146
|
top += crossOffset;
|
|
113
147
|
} else {
|
|
114
148
|
top = side === 'bottom' ? a.bottom + offset : a.top - offset - p.height;
|
|
115
|
-
left =
|
|
116
|
-
left += crossOffset;
|
|
149
|
+
left = inline === 'end' ? a.right - width : inline === 'center' ? a.left + a.width / 2 - width / 2 : a.left;
|
|
150
|
+
left += rtl ? -crossOffset : crossOffset;
|
|
117
151
|
}
|
|
118
152
|
left = Math.max(edge, Math.min(left, vw - width - edge));
|
|
119
153
|
top = Math.max(edge, Math.min(top, vh - p.height - edge));
|
|
@@ -141,4 +175,65 @@ export function useAnchoredStyle(anchorRef, panelRef, {
|
|
|
141
175
|
};
|
|
142
176
|
}, [open, placement, align, offset, crossOffset, matchWidth, anchorRef, panelRef]);
|
|
143
177
|
return state;
|
|
178
|
+
}
|
|
179
|
+
export const escapeLayerContext = /*#__PURE__*/React.createContext(null);
|
|
180
|
+
const handledEscapes = new WeakSet();
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Escape dismisses the innermost open layer, and only that one.
|
|
184
|
+
*
|
|
185
|
+
* Every modal and popover used to listen on `document` for itself, so a
|
|
186
|
+
* Popover inside a Dialog, or a Dialog inside a Dialog, closed together on one
|
|
187
|
+
* key press. Layers rendered inside another layer's subtree register with it
|
|
188
|
+
* through context (React context follows portals, the DOM does not), and a
|
|
189
|
+
* layer with an open child leaves the key to the child. A layer whose caller
|
|
190
|
+
* cancels the key (`preventDefault`) or that has no way out still consumes it.
|
|
191
|
+
*
|
|
192
|
+
* Returns the layer; wrap the layer's children in
|
|
193
|
+
* `<escapeLayerContext.Provider value={layer}>`. Not exported on the namespace.
|
|
194
|
+
*/
|
|
195
|
+
export function useEscapeLayer(active, onEscape) {
|
|
196
|
+
const parent = React.useContext(escapeLayerContext);
|
|
197
|
+
const layerRef = React.useRef(null);
|
|
198
|
+
if (layerRef.current === null) layerRef.current = {
|
|
199
|
+
children: 0
|
|
200
|
+
};
|
|
201
|
+
const handlerRef = React.useRef(onEscape);
|
|
202
|
+
handlerRef.current = onEscape;
|
|
203
|
+
React.useEffect(() => {
|
|
204
|
+
if (!active) return;
|
|
205
|
+
const layer = layerRef.current;
|
|
206
|
+
if (parent) parent.children += 1;
|
|
207
|
+
const key = event => {
|
|
208
|
+
if (event.key !== 'Escape' || event.defaultPrevented || layer.children > 0 || handledEscapes.has(event)) return;
|
|
209
|
+
handledEscapes.add(event);
|
|
210
|
+
handlerRef.current?.(event);
|
|
211
|
+
};
|
|
212
|
+
document.addEventListener('keydown', key);
|
|
213
|
+
return () => {
|
|
214
|
+
if (parent) parent.children -= 1;
|
|
215
|
+
document.removeEventListener('keydown', key);
|
|
216
|
+
};
|
|
217
|
+
}, [active, parent]);
|
|
218
|
+
return layerRef.current;
|
|
219
|
+
}
|
|
220
|
+
let scrollLocks = 0;
|
|
221
|
+
let savedOverflow = '';
|
|
222
|
+
/**
|
|
223
|
+
* Keep the page behind a modal from scrolling. Counted, so a dialog opened
|
|
224
|
+
* from a dialog does not restore scrolling when the inner one closes.
|
|
225
|
+
*/
|
|
226
|
+
export function useScrollLock(active) {
|
|
227
|
+
React.useEffect(() => {
|
|
228
|
+
if (!active) return;
|
|
229
|
+
if (scrollLocks === 0) {
|
|
230
|
+
savedOverflow = document.body.style.overflow;
|
|
231
|
+
document.body.style.overflow = 'hidden';
|
|
232
|
+
}
|
|
233
|
+
scrollLocks += 1;
|
|
234
|
+
return () => {
|
|
235
|
+
scrollLocks -= 1;
|
|
236
|
+
if (scrollLocks === 0) document.body.style.overflow = savedOverflow;
|
|
237
|
+
};
|
|
238
|
+
}, [active]);
|
|
144
239
|
}
|
package/overlay/Sheet.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
+
|
|
2
3
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
4
|
import React from 'react';
|
|
4
5
|
import { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from "../feedback/Dialog.js";
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@efolusi/meridian",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.23.0",
|
|
4
4
|
"description": "A general-purpose open-source design system by Efolusi: accessible React components, design tokens, blocks and example apps.",
|
|
5
|
-
"license": "
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://meridian.efolusi.com",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
package/tailwind.preset.cjs
CHANGED
|
@@ -26,35 +26,45 @@ module.exports = { theme: { extend: {
|
|
|
26
26
|
"brand-800": "var(--brand-800)",
|
|
27
27
|
"brand-900": "var(--brand-900)",
|
|
28
28
|
"brand-950": "var(--brand-950)",
|
|
29
|
-
"cocoa-950": "var(--cocoa-950)",
|
|
30
|
-
"cocoa-900": "var(--cocoa-900)",
|
|
31
29
|
"cocoa-700": "var(--cocoa-700)",
|
|
30
|
+
"cocoa-900": "var(--cocoa-900)",
|
|
31
|
+
"cocoa-950": "var(--cocoa-950)",
|
|
32
32
|
"caramel-500": "var(--caramel-500)",
|
|
33
33
|
"peach-200": "var(--peach-200)",
|
|
34
34
|
"cream-50": "var(--cream-50)",
|
|
35
|
-
"success-600": "var(--success-600)",
|
|
36
35
|
"success-100": "var(--success-100)",
|
|
37
36
|
"success-300": "var(--success-300)",
|
|
38
|
-
"
|
|
37
|
+
"success-600": "var(--success-600)",
|
|
38
|
+
"success-on-dark": "var(--success-on-dark)",
|
|
39
|
+
"success-contrast": "var(--success-contrast)",
|
|
39
40
|
"warning-100": "var(--warning-100)",
|
|
40
41
|
"warning-300": "var(--warning-300)",
|
|
41
|
-
"
|
|
42
|
-
"
|
|
42
|
+
"warning-600": "var(--warning-600)",
|
|
43
|
+
"warning-on-dark": "var(--warning-on-dark)",
|
|
44
|
+
"warning-contrast": "var(--warning-contrast)",
|
|
43
45
|
"danger-100": "var(--danger-100)",
|
|
44
46
|
"danger-300": "var(--danger-300)",
|
|
47
|
+
"danger-600": "var(--danger-600)",
|
|
48
|
+
"danger-700": "var(--danger-700)",
|
|
49
|
+
"danger-on-dark": "var(--danger-on-dark)",
|
|
50
|
+
"danger-contrast": "var(--danger-contrast)",
|
|
51
|
+
"chart-1": "var(--chart-1)",
|
|
52
|
+
"chart-2": "var(--chart-2)",
|
|
53
|
+
"chart-3": "var(--chart-3)",
|
|
54
|
+
"chart-4": "var(--chart-4)",
|
|
55
|
+
"chart-5": "var(--chart-5)",
|
|
45
56
|
"surface-page": "var(--surface-page)",
|
|
46
57
|
"surface-card": "var(--surface-card)",
|
|
58
|
+
"surface-panel": "var(--surface-panel)",
|
|
59
|
+
"surface-card-hover": "var(--surface-card-hover)",
|
|
47
60
|
"surface-sunken": "var(--surface-sunken)",
|
|
48
61
|
"surface-subtle": "var(--surface-subtle)",
|
|
49
62
|
"surface-inverse": "var(--surface-inverse)",
|
|
63
|
+
"surface-inverse-hover": "var(--surface-inverse-hover)",
|
|
64
|
+
"surface-inverse-active": "var(--surface-inverse-active)",
|
|
50
65
|
"surface-brand": "var(--surface-brand)",
|
|
51
66
|
"surface-code": "var(--surface-code)",
|
|
52
67
|
"text-code": "var(--text-code)",
|
|
53
|
-
"border-code": "var(--border-code)",
|
|
54
|
-
"success-on-dark": "var(--success-on-dark)",
|
|
55
|
-
"danger-on-dark": "var(--danger-on-dark)",
|
|
56
|
-
"warning-on-dark": "var(--warning-on-dark)",
|
|
57
|
-
"overlay-scrim": "var(--overlay-scrim)",
|
|
58
68
|
"text-on-brand-muted": "var(--text-on-brand-muted)",
|
|
59
69
|
"text-on-brand": "var(--text-on-brand)",
|
|
60
70
|
"text-on-media": "var(--text-on-media)",
|
|
@@ -66,30 +76,37 @@ module.exports = { theme: { extend: {
|
|
|
66
76
|
"text-inverse-muted": "var(--text-inverse-muted)",
|
|
67
77
|
"text-link": "var(--text-link)",
|
|
68
78
|
"text-link-hover": "var(--text-link-hover)",
|
|
79
|
+
"border-code": "var(--border-code)",
|
|
69
80
|
"border-default": "var(--border-default)",
|
|
70
81
|
"border-strong": "var(--border-strong)",
|
|
71
82
|
"border-inverse": "var(--border-inverse)",
|
|
83
|
+
"border-control": "var(--border-control)",
|
|
84
|
+
"border-control-hover": "var(--border-control-hover)",
|
|
85
|
+
"code-ink": "var(--code-ink)",
|
|
86
|
+
"code-ink-strong": "var(--code-ink-strong)",
|
|
87
|
+
"code-ink-bright": "var(--code-ink-bright)",
|
|
88
|
+
"code-ink-muted": "var(--code-ink-muted)",
|
|
89
|
+
"code-ink-subtle": "var(--code-ink-subtle)",
|
|
90
|
+
"code-ink-faint": "var(--code-ink-faint)",
|
|
91
|
+
"code-divider": "var(--code-divider)",
|
|
92
|
+
"code-edge": "var(--code-edge)",
|
|
93
|
+
"code-edge-hover": "var(--code-edge-hover)",
|
|
94
|
+
"code-raised": "var(--code-raised)",
|
|
95
|
+
"overlay-scrim": "var(--overlay-scrim)",
|
|
96
|
+
"media-backdrop": "var(--media-backdrop)",
|
|
97
|
+
"media-backdrop-dot": "var(--media-backdrop-dot)",
|
|
98
|
+
"media-scrim": "var(--media-scrim)",
|
|
99
|
+
"media-scrim-soft": "var(--media-scrim-soft)",
|
|
100
|
+
"media-scrim-strong": "var(--media-scrim-strong)",
|
|
72
101
|
"accent": "var(--accent)",
|
|
73
102
|
"accent-hover": "var(--accent-hover)",
|
|
74
103
|
"accent-active": "var(--accent-active)",
|
|
75
104
|
"accent-subtle": "var(--accent-subtle)",
|
|
76
105
|
"accent-subtle-border": "var(--accent-subtle-border)",
|
|
77
106
|
"accent-contrast": "var(--accent-contrast)",
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"text-2xs": "var(--text-2xs)",
|
|
82
|
-
"text-xs": "var(--text-xs)",
|
|
83
|
-
"text-sm": "var(--text-sm)",
|
|
84
|
-
"text-md": "var(--text-md)",
|
|
85
|
-
"text-lg": "var(--text-lg)",
|
|
86
|
-
"text-xl": "var(--text-xl)",
|
|
87
|
-
"text-2xl": "var(--text-2xl)",
|
|
88
|
-
"text-3xl": "var(--text-3xl)",
|
|
89
|
-
"text-4xl": "var(--text-4xl)",
|
|
90
|
-
"text-5xl": "var(--text-5xl)",
|
|
91
|
-
"text-6xl": "var(--text-6xl)",
|
|
92
|
-
"text-7xl": "var(--text-7xl)"
|
|
107
|
+
"accent-subtle-fg": "var(--accent-subtle-fg)",
|
|
108
|
+
"focus-ring-color": "var(--focus-ring-color)",
|
|
109
|
+
"focus-ring-offset": "var(--focus-ring-offset)"
|
|
93
110
|
},
|
|
94
111
|
"spacing": {
|
|
95
112
|
"0": "var(--space-0)",
|
|
@@ -105,10 +122,12 @@ module.exports = { theme: { extend: {
|
|
|
105
122
|
"16": "var(--space-16)",
|
|
106
123
|
"20": "var(--space-20)",
|
|
107
124
|
"24": "var(--space-24)",
|
|
108
|
-
"32": "var(--space-32)"
|
|
125
|
+
"32": "var(--space-32)",
|
|
126
|
+
"0-5": "var(--space-0-5)"
|
|
109
127
|
},
|
|
110
128
|
"borderRadius": {
|
|
111
129
|
"xs": "var(--radius-xs)",
|
|
130
|
+
"xs-plus": "var(--radius-xs-plus)",
|
|
112
131
|
"sm": "var(--radius-sm)",
|
|
113
132
|
"md": "var(--radius-md)",
|
|
114
133
|
"lg": "var(--radius-lg)",
|
|
@@ -122,7 +141,20 @@ module.exports = { theme: { extend: {
|
|
|
122
141
|
"lg": "var(--shadow-lg)",
|
|
123
142
|
"xl": "var(--shadow-xl)"
|
|
124
143
|
},
|
|
125
|
-
"fontSize": {
|
|
144
|
+
"fontSize": {
|
|
145
|
+
"2xs": "var(--text-2xs)",
|
|
146
|
+
"xs": "var(--text-xs)",
|
|
147
|
+
"sm": "var(--text-sm)",
|
|
148
|
+
"md": "var(--text-md)",
|
|
149
|
+
"lg": "var(--text-lg)",
|
|
150
|
+
"xl": "var(--text-xl)",
|
|
151
|
+
"2xl": "var(--text-2xl)",
|
|
152
|
+
"3xl": "var(--text-3xl)",
|
|
153
|
+
"4xl": "var(--text-4xl)",
|
|
154
|
+
"5xl": "var(--text-5xl)",
|
|
155
|
+
"6xl": "var(--text-6xl)",
|
|
156
|
+
"7xl": "var(--text-7xl)"
|
|
157
|
+
},
|
|
126
158
|
"zIndex": {
|
|
127
159
|
"dropdown": "var(--z-dropdown)",
|
|
128
160
|
"sticky": "var(--z-sticky)",
|
package/tokens/base.css
CHANGED
|
@@ -1,14 +1,30 @@
|
|
|
1
|
+
/* Element defaults live in @layer meridian with the components. Unlayered, they
|
|
2
|
+
beat every layered rule, so Tailwind utilities (mt-*, leading-*, font-*,
|
|
3
|
+
tracking-*) on h1-h4 and p silently lost. Inside the layer they sit below
|
|
4
|
+
`components` and `utilities` in the order tokens/layers.css registers, and
|
|
5
|
+
unlayered product CSS still wins by CSS definition. Element selectors carry
|
|
6
|
+
less specificity than any .ef-* class, so components in the same layer keep
|
|
7
|
+
their own margins, fonts and colours. */
|
|
8
|
+
@layer meridian{
|
|
1
9
|
body{margin:0;font-family:var(--font-sans);font-size:var(--text-md);line-height:var(--leading-normal);color:var(--text-primary);background:var(--surface-page);-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
|
|
2
10
|
h1,h2,h3,h4{font-family:var(--font-display);letter-spacing:var(--tracking-display);line-height:var(--leading-snug);margin:0}
|
|
3
11
|
p{margin:0}
|
|
4
12
|
/* Link defaults must not outrank layered component variants, including hover.
|
|
5
13
|
Zero specificity also lets .ef-btn keep its foreground within this layer. */
|
|
6
|
-
@layer meridian{
|
|
7
14
|
:where(a){color:var(--text-link);text-decoration:none;transition:color var(--dur-fast) var(--ease-out)}
|
|
8
15
|
:where(a:hover){color:var(--text-link-hover);text-decoration:none}
|
|
9
16
|
:where(a:focus-visible){outline:none;box-shadow:var(--focus-ring);border-radius:var(--radius-sm)}
|
|
10
|
-
}
|
|
11
17
|
code,pre,kbd{font-family:var(--font-mono)}
|
|
12
18
|
::selection{background:var(--brand-100);color:var(--cocoa-900)}
|
|
13
19
|
*,*::before,*::after{box-sizing:border-box}
|
|
14
|
-
|
|
20
|
+
/* Layered !important outranks unlayered !important, so this holds against product
|
|
21
|
+
CSS too. Delays are zeroed as well: a delayed reveal must not keep content
|
|
22
|
+
hidden, or keep it waiting, under reduce. */
|
|
23
|
+
@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-delay:0s!important;animation-iteration-count:1!important;transition-duration:.01ms!important;transition-delay:0s!important;scroll-behavior:auto!important}}
|
|
24
|
+
}
|
|
25
|
+
/* Forced colours (Windows High Contrast) remove box-shadow, and box-shadow is how
|
|
26
|
+
every component draws --focus-ring after outline:none, so focus would vanish.
|
|
27
|
+
Deliberately outside the layer: unlayered, it outranks the @layer meridian
|
|
28
|
+
component rules without !important. Highlight is a system colour, so it
|
|
29
|
+
survives the forced palette. */
|
|
30
|
+
@media (forced-colors:active){:focus-visible{outline:2px solid Highlight;outline-offset:2px}}
|
package/tokens/colors.css
CHANGED
|
@@ -1,48 +1,250 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
--
|
|
6
|
-
|
|
7
|
-
--
|
|
8
|
-
|
|
9
|
-
--
|
|
10
|
-
--
|
|
11
|
-
--
|
|
12
|
-
|
|
13
|
-
--
|
|
14
|
-
--
|
|
15
|
-
|
|
16
|
-
--
|
|
17
|
-
--
|
|
18
|
-
--
|
|
19
|
-
|
|
20
|
-
--
|
|
21
|
-
--
|
|
22
|
-
|
|
23
|
-
--
|
|
24
|
-
--
|
|
25
|
-
--
|
|
26
|
-
--
|
|
27
|
-
--
|
|
28
|
-
--
|
|
29
|
-
--
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
--
|
|
34
|
-
--
|
|
35
|
-
--
|
|
1
|
+
/* Generated from tokens.json by scripts/build.mjs. Do not edit. */
|
|
2
|
+
:root {
|
|
3
|
+
color-scheme: light;
|
|
4
|
+
--sand-25: #FCFBF9;
|
|
5
|
+
--sand-50: #FAF9F6;
|
|
6
|
+
--sand-100: #F3F1EB;
|
|
7
|
+
--sand-200: #E7E3D9;
|
|
8
|
+
--sand-300: #D5CFC0;
|
|
9
|
+
--sand-400: #B4AB97;
|
|
10
|
+
--sand-500: #948A74;
|
|
11
|
+
--sand-600: #786E59;
|
|
12
|
+
--sand-700: #5E5545;
|
|
13
|
+
--sand-800: #443D32;
|
|
14
|
+
--sand-900: #2E2922;
|
|
15
|
+
--sand-950: #1E1A14;
|
|
16
|
+
--brand-50: #F8F4E6;
|
|
17
|
+
--brand-100: #F4E9D2;
|
|
18
|
+
--brand-200: #EFCFAC;
|
|
19
|
+
--brand-300: #DFB585;
|
|
20
|
+
--brand-400: #CE9C66;
|
|
21
|
+
--brand-500: #C08A5A;
|
|
22
|
+
--brand-600: #A0693C;
|
|
23
|
+
--brand-700: #7A4E2B;
|
|
24
|
+
--brand-800: #5C3A1F;
|
|
25
|
+
--brand-900: #482818;
|
|
26
|
+
--brand-950: #2C1709;
|
|
27
|
+
--cocoa-700: var(--brand-900);
|
|
28
|
+
--cocoa-900: #3A2012;
|
|
29
|
+
--cocoa-950: var(--brand-950);
|
|
30
|
+
--caramel-500: var(--brand-500);
|
|
31
|
+
--peach-200: var(--brand-200);
|
|
32
|
+
--cream-50: var(--brand-50);
|
|
33
|
+
--success-100: #EBF5EC;
|
|
34
|
+
--success-300: #BFE0C6;
|
|
35
|
+
--success-600: #2F7A40;
|
|
36
|
+
--success-on-dark: #7FD08D;
|
|
37
|
+
--success-contrast: #FFFFFF;
|
|
38
|
+
--warning-100: #FDF3E0;
|
|
39
|
+
--warning-300: #F3D9A8;
|
|
40
|
+
--warning-600: #B45309;
|
|
41
|
+
--warning-on-dark: #F2C078;
|
|
42
|
+
--warning-contrast: #FFFFFF;
|
|
43
|
+
--danger-100: #FDEEEC;
|
|
44
|
+
--danger-300: #F5C6C0;
|
|
45
|
+
--danger-600: #C81E1E;
|
|
46
|
+
--danger-700: #B91C1C;
|
|
47
|
+
--danger-on-dark: #F49B93;
|
|
48
|
+
--danger-contrast: #FFFFFF;
|
|
49
|
+
--chart-1: #2A78D6;
|
|
50
|
+
--chart-2: #EB6834;
|
|
51
|
+
--chart-3: #1BAF7A;
|
|
52
|
+
--chart-4: #6250D6;
|
|
53
|
+
--chart-5: #E87BA4;
|
|
54
|
+
--surface-page: var(--sand-50);
|
|
55
|
+
--surface-card: #FFFFFF;
|
|
56
|
+
--surface-panel: var(--surface-card);
|
|
57
|
+
--surface-card-hover: var(--surface-sunken);
|
|
58
|
+
--surface-sunken: var(--sand-100);
|
|
59
|
+
--surface-subtle: var(--sand-25);
|
|
60
|
+
--surface-inverse: var(--sand-950);
|
|
61
|
+
--surface-inverse-hover: var(--sand-900);
|
|
62
|
+
--surface-inverse-active: var(--sand-800);
|
|
63
|
+
--surface-brand: var(--brand-900);
|
|
64
|
+
--surface-code: #14110B;
|
|
65
|
+
--text-code: #E8E3D9;
|
|
66
|
+
--text-on-brand-muted: rgba(248,244,230,.75);
|
|
67
|
+
--text-on-brand: #FFFFFF;
|
|
68
|
+
--text-on-media: var(--sand-50);
|
|
69
|
+
--text-on-media-muted: rgba(250,249,246,.75);
|
|
70
|
+
--text-primary: var(--sand-950);
|
|
71
|
+
--text-secondary: var(--sand-700);
|
|
72
|
+
--text-muted: #746A55;
|
|
73
|
+
--text-inverse: var(--sand-50);
|
|
74
|
+
--text-inverse-muted: rgba(250,249,246,.6);
|
|
75
|
+
--text-link: var(--brand-700);
|
|
76
|
+
--text-link-hover: var(--brand-900);
|
|
77
|
+
--border-code: rgba(240,235,225,.09);
|
|
78
|
+
--border-default: var(--sand-200);
|
|
79
|
+
--border-strong: var(--sand-300);
|
|
80
|
+
--border-inverse: rgba(250,249,246,.18);
|
|
81
|
+
--border-control: var(--sand-500);
|
|
82
|
+
--border-control-hover: var(--sand-700);
|
|
83
|
+
--code-ink: rgba(250,249,246,.82);
|
|
84
|
+
--code-ink-strong: rgba(250,249,246,.85);
|
|
85
|
+
--code-ink-bright: #FFFFFF;
|
|
86
|
+
--code-ink-muted: rgba(250,249,246,.6);
|
|
87
|
+
--code-ink-subtle: rgba(250,249,246,.55);
|
|
88
|
+
--code-ink-faint: rgba(250,249,246,.35);
|
|
89
|
+
--code-divider: rgba(250,249,246,.1);
|
|
90
|
+
--code-edge: rgba(250,249,246,.25);
|
|
91
|
+
--code-edge-hover: rgba(250,249,246,.5);
|
|
92
|
+
--code-raised: rgba(30,26,20,.85);
|
|
93
|
+
--overlay-scrim: rgba(31,26,20,.45);
|
|
94
|
+
--media-backdrop: #141210;
|
|
95
|
+
--media-backdrop-dot: rgba(243,239,231,.22);
|
|
96
|
+
--media-scrim: rgba(20,16,12,.55);
|
|
97
|
+
--media-scrim-soft: rgba(20,16,12,.45);
|
|
98
|
+
--media-scrim-strong: rgba(20,16,12,.7);
|
|
99
|
+
--accent: var(--brand-950);
|
|
100
|
+
--accent-hover: #1D0E04;
|
|
101
|
+
--accent-active: #120801;
|
|
102
|
+
--accent-subtle: var(--brand-50);
|
|
103
|
+
--accent-subtle-border: var(--brand-200);
|
|
104
|
+
--accent-contrast: #FFFFFF;
|
|
105
|
+
--accent-subtle-fg: var(--brand-700);
|
|
106
|
+
--focus-ring-color: var(--brand-700);
|
|
107
|
+
--focus-ring-offset: var(--surface-card);
|
|
108
|
+
--focus-ring: 0 0 0 2px var(--focus-ring-offset),0 0 0 4px var(--focus-ring-color);
|
|
109
|
+
--focus-ring-danger: 0 0 0 2px var(--focus-ring-offset),0 0 0 4px var(--danger-600);
|
|
110
|
+
--avatar-bg: var(--surface-sunken);
|
|
111
|
+
--avatar-fg: var(--text-secondary);
|
|
112
|
+
--state-hover-on-card: var(--surface-sunken);
|
|
113
|
+
--state-hover-on-panel: var(--surface-sunken);
|
|
114
|
+
--state-hover-on-tab: var(--surface-card);
|
|
115
|
+
--state-hover-on-window: var(--surface-sunken);
|
|
116
|
+
--state-pressed: var(--border-default);
|
|
36
117
|
}
|
|
37
|
-
|
|
38
|
-
[data-theme="dark"]{
|
|
39
|
-
|
|
40
|
-
--
|
|
41
|
-
--
|
|
42
|
-
--
|
|
43
|
-
--success-
|
|
44
|
-
--warning-100
|
|
45
|
-
--
|
|
46
|
-
--
|
|
118
|
+
|
|
119
|
+
[data-theme="dark"] {
|
|
120
|
+
color-scheme: dark;
|
|
121
|
+
--success-100: #1C2B1F;
|
|
122
|
+
--success-300: #2E4A34;
|
|
123
|
+
--success-600: #5FB86E;
|
|
124
|
+
--success-contrast: #1E1A14;
|
|
125
|
+
--warning-100: #2E2413;
|
|
126
|
+
--warning-300: #4A3A1D;
|
|
127
|
+
--warning-600: #D9822B;
|
|
128
|
+
--warning-contrast: #1E1A14;
|
|
129
|
+
--danger-100: #321B18;
|
|
130
|
+
--danger-300: #54291F;
|
|
131
|
+
--danger-600: #E85D4A;
|
|
132
|
+
--danger-700: #F47765;
|
|
133
|
+
--danger-contrast: #1E1A14;
|
|
134
|
+
--chart-1: #3987E5;
|
|
135
|
+
--chart-2: #D95926;
|
|
136
|
+
--chart-3: #199E70;
|
|
137
|
+
--chart-4: #9085E9;
|
|
138
|
+
--chart-5: #D55181;
|
|
139
|
+
--surface-page: #191512;
|
|
140
|
+
--surface-card: #211C17;
|
|
141
|
+
--surface-sunken: #2A251E;
|
|
142
|
+
--surface-subtle: #1D1814;
|
|
143
|
+
--surface-inverse: var(--sand-50);
|
|
144
|
+
--surface-inverse-hover: var(--sand-100);
|
|
145
|
+
--surface-inverse-active: var(--sand-200);
|
|
146
|
+
--surface-brand: var(--brand-950);
|
|
147
|
+
--text-primary: #F3EFE7;
|
|
148
|
+
--text-secondary: #C9C0B2;
|
|
149
|
+
--text-muted: #9C9280;
|
|
150
|
+
--text-inverse: var(--sand-950);
|
|
151
|
+
--text-inverse-muted: rgba(30,26,20,.55);
|
|
152
|
+
--text-link: var(--brand-400);
|
|
153
|
+
--text-link-hover: var(--brand-300);
|
|
154
|
+
--border-default: #332C24;
|
|
155
|
+
--border-strong: #453C31;
|
|
156
|
+
--border-inverse: rgba(30,26,20,.2);
|
|
157
|
+
--border-control: var(--sand-600);
|
|
158
|
+
--border-control-hover: var(--sand-400);
|
|
159
|
+
--accent: #F3EFE7;
|
|
160
|
+
--accent-hover: #FFFFFF;
|
|
161
|
+
--accent-active: #D5CFC0;
|
|
162
|
+
--accent-subtle: #2A2119;
|
|
163
|
+
--accent-subtle-border: #453728;
|
|
164
|
+
--accent-contrast: #1E1A14;
|
|
165
|
+
--accent-subtle-fg: var(--brand-400);
|
|
166
|
+
--focus-ring-color: var(--brand-400);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
[data-theme="dark"] ::selection {
|
|
170
|
+
background: var(--accent-subtle-border);
|
|
171
|
+
color: var(--text-primary);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
@media (prefers-color-scheme:dark) {
|
|
175
|
+
:root:not(:where([data-theme="light"])) {
|
|
176
|
+
color-scheme: dark;
|
|
177
|
+
--success-100: #1C2B1F;
|
|
178
|
+
--success-300: #2E4A34;
|
|
179
|
+
--success-600: #5FB86E;
|
|
180
|
+
--success-contrast: #1E1A14;
|
|
181
|
+
--warning-100: #2E2413;
|
|
182
|
+
--warning-300: #4A3A1D;
|
|
183
|
+
--warning-600: #D9822B;
|
|
184
|
+
--warning-contrast: #1E1A14;
|
|
185
|
+
--danger-100: #321B18;
|
|
186
|
+
--danger-300: #54291F;
|
|
187
|
+
--danger-600: #E85D4A;
|
|
188
|
+
--danger-700: #F47765;
|
|
189
|
+
--danger-contrast: #1E1A14;
|
|
190
|
+
--chart-1: #3987E5;
|
|
191
|
+
--chart-2: #D95926;
|
|
192
|
+
--chart-3: #199E70;
|
|
193
|
+
--chart-4: #9085E9;
|
|
194
|
+
--chart-5: #D55181;
|
|
195
|
+
--surface-page: #191512;
|
|
196
|
+
--surface-card: #211C17;
|
|
197
|
+
--surface-sunken: #2A251E;
|
|
198
|
+
--surface-subtle: #1D1814;
|
|
199
|
+
--surface-inverse: var(--sand-50);
|
|
200
|
+
--surface-inverse-hover: var(--sand-100);
|
|
201
|
+
--surface-inverse-active: var(--sand-200);
|
|
202
|
+
--surface-brand: var(--brand-950);
|
|
203
|
+
--text-primary: #F3EFE7;
|
|
204
|
+
--text-secondary: #C9C0B2;
|
|
205
|
+
--text-muted: #9C9280;
|
|
206
|
+
--text-inverse: var(--sand-950);
|
|
207
|
+
--text-inverse-muted: rgba(30,26,20,.55);
|
|
208
|
+
--text-link: var(--brand-400);
|
|
209
|
+
--text-link-hover: var(--brand-300);
|
|
210
|
+
--border-default: #332C24;
|
|
211
|
+
--border-strong: #453C31;
|
|
212
|
+
--border-inverse: rgba(30,26,20,.2);
|
|
213
|
+
--border-control: var(--sand-600);
|
|
214
|
+
--border-control-hover: var(--sand-400);
|
|
215
|
+
--accent: #F3EFE7;
|
|
216
|
+
--accent-hover: #FFFFFF;
|
|
217
|
+
--accent-active: #D5CFC0;
|
|
218
|
+
--accent-subtle: #2A2119;
|
|
219
|
+
--accent-subtle-border: #453728;
|
|
220
|
+
--accent-contrast: #1E1A14;
|
|
221
|
+
--accent-subtle-fg: var(--brand-400);
|
|
222
|
+
--focus-ring-color: var(--brand-400);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
:root:not(:where([data-theme="light"])) ::selection {
|
|
226
|
+
background: var(--accent-subtle-border);
|
|
227
|
+
color: var(--text-primary);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
@media (prefers-contrast: more) {
|
|
232
|
+
:root {
|
|
233
|
+
--text-muted: var(--text-secondary);
|
|
234
|
+
--border-default: var(--border-control);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
@media (prefers-contrast: more) {
|
|
239
|
+
[data-theme="dark"] {
|
|
240
|
+
--text-muted: var(--text-secondary);
|
|
241
|
+
--border-default: var(--border-control);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
@media (prefers-contrast: more) and (prefers-color-scheme:dark) {
|
|
246
|
+
:root:not(:where([data-theme="light"])) {
|
|
247
|
+
--text-muted: var(--text-secondary);
|
|
248
|
+
--border-default: var(--border-control);
|
|
249
|
+
}
|
|
47
250
|
}
|
|
48
|
-
[data-theme="dark"] ::selection{background:#453728;color:#F3EFE7}
|