@efolusi/meridian 1.6.0 → 1.7.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/ai/Conversation.js +2 -1
- package/ai/Player.js +18 -1
- package/ai/SelectionQuote.js +2 -1
- package/ai/Transcript.js +2 -1
- package/ai/UsageMeter.js +2 -2
- package/code/Console.js +4 -1
- package/code/Terminal.js +2 -0
- package/components.css +6 -2
- package/dates/Calendar.js +11 -6
- package/display/AspectRatio.js +1 -1
- package/display/Avatar.js +12 -3
- package/display/Carousel.js +2 -1
- package/display/Tag.js +30 -7
- package/feedback/Progress.js +4 -1
- package/feedback/Tooltip.js +2 -1
- package/forms/Button.js +15 -0
- package/forms/FormField.js +1 -0
- package/navigation/Menubar.js +4 -1
- package/navigation/Tabs.js +2 -2
- package/overlay/ContextMenu.js +2 -1
- package/overlay/HoverCard.js +11 -0
- package/overlay/Portal.js +3 -2
- package/package.json +3 -1
- package/tailwind.preset.cjs +125 -0
- package/tokens.json +622 -0
package/ai/Conversation.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
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
3
|
import React from 'react';
|
|
4
|
+
import { prefersReducedMotion } from "../forms/Button.js";
|
|
4
5
|
import { Icon } from "../icons/Icon.js";
|
|
5
6
|
export const Conversation = /*#__PURE__*/React.forwardRef(function Conversation({
|
|
6
7
|
height = 420,
|
|
@@ -27,7 +28,7 @@ export const Conversation = /*#__PURE__*/React.forwardRef(function Conversation(
|
|
|
27
28
|
const v = viewport.current;
|
|
28
29
|
if (v) v.scrollTo({
|
|
29
30
|
top: v.scrollHeight,
|
|
30
|
-
behavior: behavior || 'smooth'
|
|
31
|
+
behavior: prefersReducedMotion() ? 'auto' : behavior || 'smooth'
|
|
31
32
|
});
|
|
32
33
|
};
|
|
33
34
|
React.useEffect(() => {
|
package/ai/Player.js
CHANGED
|
@@ -128,10 +128,27 @@ export const Player = /*#__PURE__*/React.forwardRef(function Player({
|
|
|
128
128
|
className: "ef-player__wave",
|
|
129
129
|
role: "slider",
|
|
130
130
|
"aria-label": "Seek",
|
|
131
|
+
tabIndex: 0,
|
|
131
132
|
"aria-valuemin": 0,
|
|
132
133
|
"aria-valuemax": Math.round(dur),
|
|
133
134
|
"aria-valuenow": Math.round(t),
|
|
134
|
-
|
|
135
|
+
"aria-valuetext": `${formatTime(t, dur)} of ${formatTime(dur)}`,
|
|
136
|
+
onPointerDown: onPointerDown,
|
|
137
|
+
onKeyDown: e => {
|
|
138
|
+
if (e.key === 'ArrowRight' || e.key === 'ArrowUp') {
|
|
139
|
+
e.preventDefault();
|
|
140
|
+
jumpTo(t + 5);
|
|
141
|
+
} else if (e.key === 'ArrowLeft' || e.key === 'ArrowDown') {
|
|
142
|
+
e.preventDefault();
|
|
143
|
+
jumpTo(t - 5);
|
|
144
|
+
} else if (e.key === 'Home') {
|
|
145
|
+
e.preventDefault();
|
|
146
|
+
jumpTo(0);
|
|
147
|
+
} else if (e.key === 'End') {
|
|
148
|
+
e.preventDefault();
|
|
149
|
+
jumpTo(dur);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
135
152
|
}, bars.map((p, i) => /*#__PURE__*/React.createElement("span", {
|
|
136
153
|
key: i,
|
|
137
154
|
className: `ef-player__bar${!dur && playing ? ' ef-player__bar--loading' : (i + 0.5) / bars.length <= ratio ? ' ef-player__bar--played' : ''}`,
|
package/ai/SelectionQuote.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
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
3
|
import React from 'react';
|
|
4
|
+
import { useIsoLayoutEffect } from "../forms/Button.js";
|
|
4
5
|
import { Icon } from "../icons/Icon.js";
|
|
5
6
|
export function SelectionQuote({
|
|
6
7
|
children,
|
|
@@ -63,7 +64,7 @@ export function SelectionQuote({
|
|
|
63
64
|
document.removeEventListener('keydown', key);
|
|
64
65
|
};
|
|
65
66
|
}, []);
|
|
66
|
-
|
|
67
|
+
useIsoLayoutEffect(() => {
|
|
67
68
|
if (!sel || !barRef.current || !contRef.current) return;
|
|
68
69
|
const bar = barRef.current.getBoundingClientRect();
|
|
69
70
|
const cont = contRef.current.getBoundingClientRect();
|
package/ai/Transcript.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
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
3
|
import React from 'react';
|
|
4
|
+
import { prefersReducedMotion } from "../forms/Button.js";
|
|
4
5
|
import { formatTime } from "./Player.js";
|
|
5
6
|
export function Transcript({
|
|
6
7
|
title = 'Transcript',
|
|
@@ -32,7 +33,7 @@ export function Transcript({
|
|
|
32
33
|
const target = row.offsetTop - v.clientHeight / 2 + row.offsetHeight / 2;
|
|
33
34
|
v.scrollTo({
|
|
34
35
|
top: Math.max(0, target),
|
|
35
|
-
behavior: 'smooth'
|
|
36
|
+
behavior: prefersReducedMotion() ? 'auto' : 'smooth'
|
|
36
37
|
});
|
|
37
38
|
}, [active, auto]);
|
|
38
39
|
return /*#__PURE__*/React.createElement("div", _extends({}, rest, {
|
package/ai/UsageMeter.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
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
3
|
import React from 'react';
|
|
4
|
-
import { cssPct } from "../forms/Button.js";
|
|
4
|
+
import { cssPct, prefersReducedMotion } from "../forms/Button.js";
|
|
5
5
|
export function UsageMeter({
|
|
6
6
|
used = 0,
|
|
7
7
|
limit = 100,
|
|
@@ -18,7 +18,7 @@ export function UsageMeter({
|
|
|
18
18
|
}) {
|
|
19
19
|
const [shown, setShown] = React.useState(animated ? 0 : used);
|
|
20
20
|
React.useEffect(() => {
|
|
21
|
-
if (!animated) {
|
|
21
|
+
if (!animated || prefersReducedMotion()) {
|
|
22
22
|
setShown(used);
|
|
23
23
|
return;
|
|
24
24
|
}
|
package/code/Console.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
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
3
|
import React from 'react';
|
|
4
|
+
import { prefersReducedMotion } from "../forms/Button.js";
|
|
4
5
|
import { Icon } from "../icons/Icon.js";
|
|
5
6
|
const GLYPH = {
|
|
6
7
|
info: 'info',
|
|
@@ -79,6 +80,8 @@ export function Console({
|
|
|
79
80
|
}, entries.length, " entries")), /*#__PURE__*/React.createElement("div", {
|
|
80
81
|
ref: viewport,
|
|
81
82
|
className: "ef-console__scroll",
|
|
83
|
+
role: "log",
|
|
84
|
+
"aria-live": "polite",
|
|
82
85
|
style: {
|
|
83
86
|
height
|
|
84
87
|
},
|
|
@@ -93,7 +96,7 @@ export function Console({
|
|
|
93
96
|
const v = viewport.current;
|
|
94
97
|
if (v) v.scrollTo({
|
|
95
98
|
top: v.scrollHeight,
|
|
96
|
-
behavior: 'smooth'
|
|
99
|
+
behavior: prefersReducedMotion() ? 'auto' : 'smooth'
|
|
97
100
|
});
|
|
98
101
|
}
|
|
99
102
|
}, /*#__PURE__*/React.createElement(Icon, {
|
package/code/Terminal.js
CHANGED
package/components.css
CHANGED
|
@@ -161,7 +161,8 @@
|
|
|
161
161
|
.ef-player__top{display:flex;align-items:center;gap:10px}
|
|
162
162
|
.ef-player__title{flex:1;min-width:0;font-size:13.5px;font-weight:var(--weight-semibold);color:var(--text-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
|
163
163
|
.ef-player__meta{font-size:12px;color:var(--text-muted)}
|
|
164
|
-
.ef-player__wave{position:relative;display:flex;align-items:center;justify-content:space-between;height:44px;cursor:pointer;touch-action:none}
|
|
164
|
+
.ef-player__wave{position:relative;display:flex;align-items:center;justify-content:space-between;height:44px;cursor:pointer;touch-action:none;border-radius:var(--radius-sm)}
|
|
165
|
+
.ef-player__wave:focus-visible{outline:none;box-shadow:var(--focus-ring)}
|
|
165
166
|
.ef-player__bar{flex:none;width:2.5px;border-radius:var(--radius-full);background:var(--sand-300,#D9D2C3);transition:background .2s var(--ease-out)}
|
|
166
167
|
.ef-player__bar--played{background:var(--accent)}
|
|
167
168
|
.ef-player__bar--loading{animation:ef-player-load 1.2s ease-in-out infinite}
|
|
@@ -729,9 +730,12 @@ button.ef-listitem:focus-visible{outline:none;box-shadow:var(--focus-ring)}
|
|
|
729
730
|
.ef-scrollarea::-webkit-scrollbar-thumb{background:var(--border-strong);border-radius:var(--radius-full);border:2px solid transparent;background-clip:content-box}
|
|
730
731
|
.ef-scrollarea::-webkit-scrollbar-thumb:hover{background:var(--text-muted);border:2px solid transparent;background-clip:content-box}
|
|
731
732
|
/* components/display/Tag.jsx */
|
|
732
|
-
.ef-tag{display:inline-flex;align-items:center;gap:6px;height:26px;padding:0 10px;border-radius:var(--radius-sm);background:transparent;border:1px solid var(--border-strong);color:var(--text-secondary);font-size:var(--text-sm);font-weight:var(--weight-medium);white-space:nowrap;transition:background var(--dur-fast) var(--ease-out),border-color var(--dur-fast) var(--ease-out)}
|
|
733
|
+
.ef-tag{display:inline-flex;align-items:center;gap:6px;height:26px;padding:0 10px;border-radius:var(--radius-sm);background:transparent;border:1px solid var(--border-strong);color:var(--text-secondary);font-family:var(--font-sans);font-size:var(--text-sm);font-weight:var(--weight-medium);white-space:nowrap;transition:background var(--dur-fast) var(--ease-out),border-color var(--dur-fast) var(--ease-out)}
|
|
733
734
|
.ef-tag--interactive{cursor:pointer}
|
|
734
735
|
.ef-tag--interactive:hover{background:var(--surface-sunken);border-color:var(--sand-400)}
|
|
736
|
+
.ef-tag--interactive:focus-visible{outline:none;box-shadow:var(--focus-ring)}
|
|
737
|
+
.ef-tag__body{display:inline-flex;align-items:center;gap:6px;border:none;background:transparent;padding:0;margin:0;font:inherit;color:inherit;cursor:pointer;border-radius:var(--radius-sm)}
|
|
738
|
+
.ef-tag__body:focus-visible{outline:none;box-shadow:var(--focus-ring)}
|
|
735
739
|
.ef-tag__x{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;margin:-3px -9px -3px -5px;border:none;border-radius:var(--radius-sm);background:transparent;color:var(--text-muted);cursor:pointer;padding:0;transition:background var(--dur-fast) var(--ease-out),color var(--dur-fast) var(--ease-out)}
|
|
736
740
|
.ef-tag__x:hover{background:var(--sand-200);color:var(--text-primary)}
|
|
737
741
|
.ef-tag__x:focus-visible{outline:none;box-shadow:var(--focus-ring)}
|
package/dates/Calendar.js
CHANGED
|
@@ -37,7 +37,11 @@ export function Calendar({
|
|
|
37
37
|
};
|
|
38
38
|
React.useEffect(() => {
|
|
39
39
|
const g = gridRef.current;
|
|
40
|
-
if (!g
|
|
40
|
+
if (!g) return;
|
|
41
|
+
// A month change unmounts the focused day and drops focus to <body>;
|
|
42
|
+
// reclaiming it from there is restoration, not stealing.
|
|
43
|
+
const ae = document.activeElement;
|
|
44
|
+
if (!(g.contains(ae) || ae === document.body)) return;
|
|
41
45
|
const btn = g.querySelector(`[data-iso="${focusTarget}"]`);
|
|
42
46
|
if (btn) btn.focus();
|
|
43
47
|
}, [focusTarget, y, m]);
|
|
@@ -60,12 +64,13 @@ export function Calendar({
|
|
|
60
64
|
} else if (e.key === 'End') {
|
|
61
65
|
e.preventDefault();
|
|
62
66
|
move(6 - dow());
|
|
63
|
-
} else if (e.key === 'PageUp') {
|
|
67
|
+
} else if (e.key === 'PageUp' || e.key === 'PageDown') {
|
|
64
68
|
e.preventDefault();
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
+
const base = new Date(focusTarget + 'T00:00:00');
|
|
70
|
+
const [ty, tm] = e.key === 'PageUp' ? m === 0 ? [y - 1, 11] : [y, m - 1] : m === 11 ? [y + 1, 0] : [y, m + 1];
|
|
71
|
+
const clamped = Math.min(base.getDate(), new Date(ty, tm + 1, 0).getDate());
|
|
72
|
+
setFocusIso(iso(new Date(ty, tm, clamped)));
|
|
73
|
+
setView([ty, tm]);
|
|
69
74
|
}
|
|
70
75
|
};
|
|
71
76
|
const rows = Array.from({
|
package/display/AspectRatio.js
CHANGED
package/display/Avatar.js
CHANGED
|
@@ -10,6 +10,14 @@ export function Avatar({
|
|
|
10
10
|
className,
|
|
11
11
|
...rest
|
|
12
12
|
}) {
|
|
13
|
+
// A dead avatar URL falls back to the initials instead of a broken image.
|
|
14
|
+
// The reset must be an effect: remounting the img would not clear state that
|
|
15
|
+
// lives up here in Avatar.
|
|
16
|
+
const [broken, setBroken] = React.useState(false);
|
|
17
|
+
React.useEffect(() => {
|
|
18
|
+
setBroken(false);
|
|
19
|
+
}, [src]);
|
|
20
|
+
const showImg = !!src && !broken;
|
|
13
21
|
const initials = name.trim().split(/\s+/).map(w => w[0]).slice(0, 2).join('').toUpperCase();
|
|
14
22
|
let h = 0;
|
|
15
23
|
for (let i = 0; i < name.length; i++) h = h * 31 + name.charCodeAt(i) >>> 0;
|
|
@@ -21,13 +29,14 @@ export function Avatar({
|
|
|
21
29
|
width: size,
|
|
22
30
|
height: size,
|
|
23
31
|
fontSize: Math.round(size * 0.38),
|
|
24
|
-
background:
|
|
32
|
+
background: showImg ? 'var(--sand-100)' : bg,
|
|
25
33
|
color: fg,
|
|
26
34
|
...style
|
|
27
35
|
}
|
|
28
|
-
}, rest),
|
|
36
|
+
}, rest), showImg ? /*#__PURE__*/React.createElement("img", {
|
|
29
37
|
src: src,
|
|
30
|
-
alt: name
|
|
38
|
+
alt: name,
|
|
39
|
+
onError: () => setBroken(true)
|
|
31
40
|
}) : initials || '•');
|
|
32
41
|
}
|
|
33
42
|
export function AvatarGroup({
|
package/display/Carousel.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
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
3
|
import React from 'react';
|
|
4
|
+
import { prefersReducedMotion } from "../forms/Button.js";
|
|
4
5
|
import { Icon } from "../icons/Icon.js";
|
|
5
6
|
export function Carousel({
|
|
6
7
|
children,
|
|
@@ -25,7 +26,7 @@ export function Carousel({
|
|
|
25
26
|
const el = track.current;
|
|
26
27
|
if (el) el.scrollTo({
|
|
27
28
|
left: i * step(),
|
|
28
|
-
behavior: 'smooth'
|
|
29
|
+
behavior: prefersReducedMotion() ? 'auto' : 'smooth'
|
|
29
30
|
});
|
|
30
31
|
};
|
|
31
32
|
const onScroll = () => {
|
package/display/Tag.js
CHANGED
|
@@ -11,14 +11,12 @@ export function Tag({
|
|
|
11
11
|
className,
|
|
12
12
|
...rest
|
|
13
13
|
}) {
|
|
14
|
-
|
|
15
|
-
className: `ef-tag${onClick ? ' ef-tag--interactive' : ''}${className ? ' ' + className : ''}`,
|
|
16
|
-
onClick: onClick,
|
|
17
|
-
style: style
|
|
18
|
-
}, rest), icon ? /*#__PURE__*/React.createElement(Icon, {
|
|
14
|
+
const body = /*#__PURE__*/React.createElement(React.Fragment, null, icon ? /*#__PURE__*/React.createElement(Icon, {
|
|
19
15
|
name: icon,
|
|
20
16
|
size: 13
|
|
21
|
-
}) : null, children
|
|
17
|
+
}) : null, children);
|
|
18
|
+
const removeBtn = onRemove ? /*#__PURE__*/React.createElement("button", {
|
|
19
|
+
type: "button",
|
|
22
20
|
className: "ef-tag__x",
|
|
23
21
|
"aria-label": "Remove",
|
|
24
22
|
onClick: e => {
|
|
@@ -28,5 +26,30 @@ export function Tag({
|
|
|
28
26
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
29
27
|
name: "x",
|
|
30
28
|
size: 12
|
|
31
|
-
})) : null
|
|
29
|
+
})) : null;
|
|
30
|
+
// A clickable tag has to be a real button, or the keyboard never reaches it.
|
|
31
|
+
// With onRemove present the root cannot be one (interactive content must not
|
|
32
|
+
// nest), so the label becomes an inner button beside the remove button.
|
|
33
|
+
if (onClick && !onRemove) {
|
|
34
|
+
return /*#__PURE__*/React.createElement("button", _extends({
|
|
35
|
+
type: "button",
|
|
36
|
+
className: `ef-tag ef-tag--interactive${className ? ' ' + className : ''}`,
|
|
37
|
+
onClick: onClick,
|
|
38
|
+
style: style
|
|
39
|
+
}, rest), body);
|
|
40
|
+
}
|
|
41
|
+
if (onClick) {
|
|
42
|
+
return /*#__PURE__*/React.createElement("span", _extends({
|
|
43
|
+
className: `ef-tag ef-tag--interactive${className ? ' ' + className : ''}`,
|
|
44
|
+
style: style
|
|
45
|
+
}, rest), /*#__PURE__*/React.createElement("button", {
|
|
46
|
+
type: "button",
|
|
47
|
+
className: "ef-tag__body",
|
|
48
|
+
onClick: onClick
|
|
49
|
+
}, body), removeBtn);
|
|
50
|
+
}
|
|
51
|
+
return /*#__PURE__*/React.createElement("span", _extends({
|
|
52
|
+
className: `ef-tag${className ? ' ' + className : ''}`,
|
|
53
|
+
style: style
|
|
54
|
+
}, rest), body, removeBtn);
|
|
32
55
|
}
|
package/feedback/Progress.js
CHANGED
|
@@ -13,16 +13,19 @@ export function Progress({
|
|
|
13
13
|
...rest
|
|
14
14
|
}) {
|
|
15
15
|
const pct = Math.min(100, Math.max(0, value / max * 100));
|
|
16
|
+
const labelId = React.useId();
|
|
16
17
|
return /*#__PURE__*/React.createElement("div", _extends({}, rest, {
|
|
17
18
|
className: `ef-progress ef-progress--${tone}${className ? ' ' + className : ''}`,
|
|
18
19
|
style: style,
|
|
19
20
|
role: "progressbar",
|
|
20
21
|
"aria-valuenow": value,
|
|
21
22
|
"aria-valuemin": 0,
|
|
22
|
-
"aria-valuemax": max
|
|
23
|
+
"aria-valuemax": max,
|
|
24
|
+
"aria-labelledby": label ? labelId : undefined
|
|
23
25
|
}), (label || showValue) && /*#__PURE__*/React.createElement("div", {
|
|
24
26
|
className: "ef-progress__head"
|
|
25
27
|
}, /*#__PURE__*/React.createElement("span", {
|
|
28
|
+
id: labelId,
|
|
26
29
|
className: "ef-progress__label"
|
|
27
30
|
}, label), showValue ? /*#__PURE__*/React.createElement("span", {
|
|
28
31
|
className: "ef-progress__val"
|
package/feedback/Tooltip.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
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
3
|
import React from 'react';
|
|
4
|
+
import { useIsoLayoutEffect } from "../forms/Button.js";
|
|
4
5
|
import { Portal, useAnchoredStyle } from "../overlay/Portal.js";
|
|
5
6
|
export function Tooltip({
|
|
6
7
|
label,
|
|
@@ -29,7 +30,7 @@ export function Tooltip({
|
|
|
29
30
|
// Keep the arrow over the trigger's centre even when the bubble has been
|
|
30
31
|
// shifted to stay on screen, so it never points at empty space.
|
|
31
32
|
const [arrowX, setArrowX] = React.useState(null);
|
|
32
|
-
|
|
33
|
+
useIsoLayoutEffect(() => {
|
|
33
34
|
if (!open || !ref.current || !bubbleRef.current) {
|
|
34
35
|
setArrowX(null);
|
|
35
36
|
return;
|
package/forms/Button.js
CHANGED
|
@@ -37,6 +37,21 @@ export function cssPct(value) {
|
|
|
37
37
|
* anchor an overlay, trap focus, or measure. Lowercase, so it stays an internal
|
|
38
38
|
* helper rather than part of the public namespace.
|
|
39
39
|
*/
|
|
40
|
+
/**
|
|
41
|
+
* useLayoutEffect that is silent on the server.
|
|
42
|
+
*
|
|
43
|
+
* React warns when useLayoutEffect renders under renderToString; the effect
|
|
44
|
+
* body is positioning work that only means anything with a DOM, so downgrading
|
|
45
|
+
* to useEffect on the server is behaviour-identical. Lowercase: internal.
|
|
46
|
+
*/
|
|
47
|
+
export const useIsoLayoutEffect = typeof window === 'undefined' ? React.useEffect : React.useLayoutEffect;
|
|
48
|
+
/**
|
|
49
|
+
* The CSS kill-switch cannot reach JS-driven motion — rAF count-ups and
|
|
50
|
+
* scrollTo({behavior:'smooth'}) — so those call sites ask here. Lowercase: internal.
|
|
51
|
+
*/
|
|
52
|
+
export function prefersReducedMotion() {
|
|
53
|
+
return typeof window !== 'undefined' && !!window.matchMedia && window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
54
|
+
}
|
|
40
55
|
export function mergeRefs(...refs) {
|
|
41
56
|
return node => {
|
|
42
57
|
for (const r of refs) {
|
package/forms/FormField.js
CHANGED
|
@@ -107,6 +107,7 @@ export function FormField({
|
|
|
107
107
|
value: ctx
|
|
108
108
|
}, typeof children === 'function' ? children(wiring) : children), hasError ? /*#__PURE__*/React.createElement("span", {
|
|
109
109
|
id: noteId,
|
|
110
|
+
role: "alert",
|
|
110
111
|
className: "ef-field__error"
|
|
111
112
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
112
113
|
name: "circle-alert",
|
package/navigation/Menubar.js
CHANGED
|
@@ -17,7 +17,10 @@ export function Menubar({
|
|
|
17
17
|
if (ref.current && !ref.current.contains(e.target)) setOpen(null);
|
|
18
18
|
};
|
|
19
19
|
const key = e => {
|
|
20
|
-
if (e.key
|
|
20
|
+
if (e.key !== 'Escape') return;
|
|
21
|
+
const btns = ref.current ? ref.current.querySelectorAll('.ef-menubar__btn') : [];
|
|
22
|
+
if (btns[open]) btns[open].focus();
|
|
23
|
+
setOpen(null);
|
|
21
24
|
};
|
|
22
25
|
document.addEventListener('mousedown', away);
|
|
23
26
|
document.addEventListener('keydown', key);
|
package/navigation/Tabs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
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
3
|
import React from 'react';
|
|
4
4
|
import { Icon } from "../icons/Icon.js";
|
|
5
|
-
import { mergeRefs } from "../forms/Button.js";
|
|
5
|
+
import { mergeRefs, useIsoLayoutEffect } from "../forms/Button.js";
|
|
6
6
|
export const Tabs = /*#__PURE__*/React.forwardRef(function Tabs({
|
|
7
7
|
items,
|
|
8
8
|
value,
|
|
@@ -16,7 +16,7 @@ export const Tabs = /*#__PURE__*/React.forwardRef(function Tabs({
|
|
|
16
16
|
left: 0,
|
|
17
17
|
width: 0
|
|
18
18
|
});
|
|
19
|
-
|
|
19
|
+
useIsoLayoutEffect(() => {
|
|
20
20
|
const el = ref.current && ref.current.querySelector('[data-active="true"]');
|
|
21
21
|
if (el) setInk({
|
|
22
22
|
left: el.offsetLeft,
|
package/overlay/ContextMenu.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
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
3
|
import React from 'react';
|
|
4
|
+
import { useIsoLayoutEffect } from "../forms/Button.js";
|
|
4
5
|
import { Portal } from "./Portal.js";
|
|
5
6
|
import { Icon } from "../icons/Icon.js";
|
|
6
7
|
export function ContextMenu({
|
|
@@ -23,7 +24,7 @@ export function ContextMenu({
|
|
|
23
24
|
};
|
|
24
25
|
// A fixed panel still escapes overflow, but nothing kept it inside the viewport:
|
|
25
26
|
// right-clicking near the bottom or right edge pushed items off-screen.
|
|
26
|
-
|
|
27
|
+
useIsoLayoutEffect(() => {
|
|
27
28
|
const panel = panelRef.current;
|
|
28
29
|
if (!pos || !panel) return;
|
|
29
30
|
const r = panel.getBoundingClientRect();
|
package/overlay/HoverCard.js
CHANGED
|
@@ -34,6 +34,17 @@ export function HoverCard({
|
|
|
34
34
|
t.current = setTimeout(() => setOpen(false), closeDelay);
|
|
35
35
|
};
|
|
36
36
|
React.useEffect(() => () => clearTimeout(t.current), []);
|
|
37
|
+
React.useEffect(() => {
|
|
38
|
+
if (!open) return;
|
|
39
|
+
const key = e => {
|
|
40
|
+
if (e.key === 'Escape') {
|
|
41
|
+
clearTimeout(t.current);
|
|
42
|
+
setOpen(false);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
document.addEventListener('keydown', key);
|
|
46
|
+
return () => document.removeEventListener('keydown', key);
|
|
47
|
+
}, [open]);
|
|
37
48
|
return /*#__PURE__*/React.createElement("span", _extends({}, rest, {
|
|
38
49
|
ref: ref,
|
|
39
50
|
className: `ef-hovercard${className ? ' ' + className : ''}`,
|
package/overlay/Portal.js
CHANGED
|
@@ -3,6 +3,7 @@ import React from 'react';
|
|
|
3
3
|
// Bare imports are stripped by the bundle compiler, so this resolves to the
|
|
4
4
|
// window global there; in an ESM consumer it resolves normally. Both work.
|
|
5
5
|
import ReactDOM from 'react-dom';
|
|
6
|
+
import { useIsoLayoutEffect } from "../forms/Button.js";
|
|
6
7
|
/**
|
|
7
8
|
* Renders children into document.body (or `container`).
|
|
8
9
|
*
|
|
@@ -23,7 +24,7 @@ export function Portal({
|
|
|
23
24
|
// and this layout effect attaches it before paint. Gating the render on a
|
|
24
25
|
// "mounted" state instead would leave the panel absent when the parent measures
|
|
25
26
|
// it for placement, which puts every anchored overlay at the viewport origin.
|
|
26
|
-
|
|
27
|
+
useIsoLayoutEffect(() => {
|
|
27
28
|
const host = hostRef.current;
|
|
28
29
|
if (!host) return;
|
|
29
30
|
const parent = container || document.body;
|
|
@@ -63,7 +64,7 @@ export function useAnchoredStyle(anchorRef, panelRef, {
|
|
|
63
64
|
},
|
|
64
65
|
side: placement
|
|
65
66
|
});
|
|
66
|
-
|
|
67
|
+
useIsoLayoutEffect(() => {
|
|
67
68
|
if (!open) {
|
|
68
69
|
setState(s => s.style.visibility === 'hidden' ? s : {
|
|
69
70
|
...s,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@efolusi/meridian",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "A general-purpose open-source design system by Efolusi: accessible React components, design tokens, blocks and example apps.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://meridian.efolusi.com",
|
|
@@ -23,6 +23,8 @@
|
|
|
23
23
|
"./components.css": "./components.css",
|
|
24
24
|
"./tokens/*": "./tokens/*",
|
|
25
25
|
"./package.json": "./package.json",
|
|
26
|
+
"./tokens.json": "./tokens.json",
|
|
27
|
+
"./tailwind.preset.cjs": "./tailwind.preset.cjs",
|
|
26
28
|
"./assets/*": "./assets/*",
|
|
27
29
|
"./*.js": {
|
|
28
30
|
"types": "./*.d.ts",
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
// Meridian Tailwind preset — maps Meridian's CSS custom properties to
|
|
2
|
+
// Tailwind utilities. Load tokens (styles.css) alongside this preset.
|
|
3
|
+
// tailwind.config.js: module.exports = { presets: [require('./tailwind.preset.js')] }
|
|
4
|
+
module.exports = { theme: { extend: {
|
|
5
|
+
"colors": {
|
|
6
|
+
"sand-25": "var(--sand-25)",
|
|
7
|
+
"sand-50": "var(--sand-50)",
|
|
8
|
+
"sand-100": "var(--sand-100)",
|
|
9
|
+
"sand-200": "var(--sand-200)",
|
|
10
|
+
"sand-300": "var(--sand-300)",
|
|
11
|
+
"sand-400": "var(--sand-400)",
|
|
12
|
+
"sand-500": "var(--sand-500)",
|
|
13
|
+
"sand-600": "var(--sand-600)",
|
|
14
|
+
"sand-700": "var(--sand-700)",
|
|
15
|
+
"sand-800": "var(--sand-800)",
|
|
16
|
+
"sand-900": "var(--sand-900)",
|
|
17
|
+
"sand-950": "var(--sand-950)",
|
|
18
|
+
"brand-50": "var(--brand-50)",
|
|
19
|
+
"brand-100": "var(--brand-100)",
|
|
20
|
+
"brand-200": "var(--brand-200)",
|
|
21
|
+
"brand-300": "var(--brand-300)",
|
|
22
|
+
"brand-400": "var(--brand-400)",
|
|
23
|
+
"brand-500": "var(--brand-500)",
|
|
24
|
+
"brand-600": "var(--brand-600)",
|
|
25
|
+
"brand-700": "var(--brand-700)",
|
|
26
|
+
"brand-800": "var(--brand-800)",
|
|
27
|
+
"brand-900": "var(--brand-900)",
|
|
28
|
+
"brand-950": "var(--brand-950)",
|
|
29
|
+
"cocoa-950": "var(--cocoa-950)",
|
|
30
|
+
"cocoa-900": "var(--cocoa-900)",
|
|
31
|
+
"cocoa-700": "var(--cocoa-700)",
|
|
32
|
+
"caramel-500": "var(--caramel-500)",
|
|
33
|
+
"peach-200": "var(--peach-200)",
|
|
34
|
+
"cream-50": "var(--cream-50)",
|
|
35
|
+
"success-600": "var(--success-600)",
|
|
36
|
+
"success-100": "var(--success-100)",
|
|
37
|
+
"success-300": "var(--success-300)",
|
|
38
|
+
"warning-600": "var(--warning-600)",
|
|
39
|
+
"warning-100": "var(--warning-100)",
|
|
40
|
+
"warning-300": "var(--warning-300)",
|
|
41
|
+
"danger-600": "var(--danger-600)",
|
|
42
|
+
"danger-700": "var(--danger-700)",
|
|
43
|
+
"danger-100": "var(--danger-100)",
|
|
44
|
+
"danger-300": "var(--danger-300)",
|
|
45
|
+
"surface-page": "var(--surface-page)",
|
|
46
|
+
"surface-card": "var(--surface-card)",
|
|
47
|
+
"surface-sunken": "var(--surface-sunken)",
|
|
48
|
+
"surface-subtle": "var(--surface-subtle)",
|
|
49
|
+
"surface-inverse": "var(--surface-inverse)",
|
|
50
|
+
"surface-brand": "var(--surface-brand)",
|
|
51
|
+
"surface-code": "var(--surface-code)",
|
|
52
|
+
"text-code": "var(--text-code)",
|
|
53
|
+
"border-code": "var(--border-code)",
|
|
54
|
+
"overlay-scrim": "var(--overlay-scrim)",
|
|
55
|
+
"text-on-brand-muted": "var(--text-on-brand-muted)",
|
|
56
|
+
"text-primary": "var(--text-primary)",
|
|
57
|
+
"text-secondary": "var(--text-secondary)",
|
|
58
|
+
"text-muted": "var(--text-muted)",
|
|
59
|
+
"text-inverse": "var(--text-inverse)",
|
|
60
|
+
"text-link": "var(--text-link)",
|
|
61
|
+
"border-default": "var(--border-default)",
|
|
62
|
+
"border-strong": "var(--border-strong)",
|
|
63
|
+
"border-inverse": "var(--border-inverse)",
|
|
64
|
+
"accent": "var(--accent)",
|
|
65
|
+
"accent-hover": "var(--accent-hover)",
|
|
66
|
+
"accent-active": "var(--accent-active)",
|
|
67
|
+
"accent-subtle": "var(--accent-subtle)",
|
|
68
|
+
"accent-subtle-border": "var(--accent-subtle-border)",
|
|
69
|
+
"accent-contrast": "var(--accent-contrast)",
|
|
70
|
+
"danger-contrast": "var(--danger-contrast)",
|
|
71
|
+
"text-2xs": "var(--text-2xs)",
|
|
72
|
+
"text-xs": "var(--text-xs)",
|
|
73
|
+
"text-sm": "var(--text-sm)",
|
|
74
|
+
"text-md": "var(--text-md)",
|
|
75
|
+
"text-lg": "var(--text-lg)",
|
|
76
|
+
"text-xl": "var(--text-xl)",
|
|
77
|
+
"text-2xl": "var(--text-2xl)",
|
|
78
|
+
"text-3xl": "var(--text-3xl)",
|
|
79
|
+
"text-4xl": "var(--text-4xl)",
|
|
80
|
+
"text-5xl": "var(--text-5xl)",
|
|
81
|
+
"text-6xl": "var(--text-6xl)",
|
|
82
|
+
"text-7xl": "var(--text-7xl)"
|
|
83
|
+
},
|
|
84
|
+
"spacing": {
|
|
85
|
+
"0": "var(--space-0)",
|
|
86
|
+
"1": "var(--space-1)",
|
|
87
|
+
"2": "var(--space-2)",
|
|
88
|
+
"3": "var(--space-3)",
|
|
89
|
+
"4": "var(--space-4)",
|
|
90
|
+
"5": "var(--space-5)",
|
|
91
|
+
"6": "var(--space-6)",
|
|
92
|
+
"8": "var(--space-8)",
|
|
93
|
+
"10": "var(--space-10)",
|
|
94
|
+
"12": "var(--space-12)",
|
|
95
|
+
"16": "var(--space-16)",
|
|
96
|
+
"20": "var(--space-20)",
|
|
97
|
+
"24": "var(--space-24)",
|
|
98
|
+
"32": "var(--space-32)"
|
|
99
|
+
},
|
|
100
|
+
"borderRadius": {
|
|
101
|
+
"sm": "var(--radius-sm)",
|
|
102
|
+
"md": "var(--radius-md)",
|
|
103
|
+
"lg": "var(--radius-lg)",
|
|
104
|
+
"xl": "var(--radius-xl)",
|
|
105
|
+
"full": "var(--radius-full)"
|
|
106
|
+
},
|
|
107
|
+
"boxShadow": {
|
|
108
|
+
"xs": "var(--shadow-xs)",
|
|
109
|
+
"sm": "var(--shadow-sm)",
|
|
110
|
+
"md": "var(--shadow-md)",
|
|
111
|
+
"lg": "var(--shadow-lg)",
|
|
112
|
+
"xl": "var(--shadow-xl)",
|
|
113
|
+
"pop": "var(--shadow-pop)"
|
|
114
|
+
},
|
|
115
|
+
"fontSize": {},
|
|
116
|
+
"zIndex": {
|
|
117
|
+
"dropdown": "var(--z-dropdown)",
|
|
118
|
+
"sticky": "var(--z-sticky)",
|
|
119
|
+
"overlay": "var(--z-overlay)",
|
|
120
|
+
"modal": "var(--z-modal)",
|
|
121
|
+
"popover": "var(--z-popover)",
|
|
122
|
+
"toast": "var(--z-toast)",
|
|
123
|
+
"tooltip": "var(--z-tooltip)"
|
|
124
|
+
}
|
|
125
|
+
} } };
|
package/tokens.json
ADDED
|
@@ -0,0 +1,622 @@
|
|
|
1
|
+
{
|
|
2
|
+
"sand": {
|
|
3
|
+
"25": {
|
|
4
|
+
"$value": "#FCFBF9",
|
|
5
|
+
"$type": "color"
|
|
6
|
+
},
|
|
7
|
+
"50": {
|
|
8
|
+
"$value": "#FAF9F6",
|
|
9
|
+
"$type": "color"
|
|
10
|
+
},
|
|
11
|
+
"100": {
|
|
12
|
+
"$value": "#F3F1EB",
|
|
13
|
+
"$type": "color"
|
|
14
|
+
},
|
|
15
|
+
"200": {
|
|
16
|
+
"$value": "#E7E3D9",
|
|
17
|
+
"$type": "color"
|
|
18
|
+
},
|
|
19
|
+
"300": {
|
|
20
|
+
"$value": "#D5CFC0",
|
|
21
|
+
"$type": "color"
|
|
22
|
+
},
|
|
23
|
+
"400": {
|
|
24
|
+
"$value": "#B4AB97",
|
|
25
|
+
"$type": "color"
|
|
26
|
+
},
|
|
27
|
+
"500": {
|
|
28
|
+
"$value": "#948A74",
|
|
29
|
+
"$type": "color"
|
|
30
|
+
},
|
|
31
|
+
"600": {
|
|
32
|
+
"$value": "#786E59",
|
|
33
|
+
"$type": "color"
|
|
34
|
+
},
|
|
35
|
+
"700": {
|
|
36
|
+
"$value": "#5E5545",
|
|
37
|
+
"$type": "color"
|
|
38
|
+
},
|
|
39
|
+
"800": {
|
|
40
|
+
"$value": "#443D32",
|
|
41
|
+
"$type": "color"
|
|
42
|
+
},
|
|
43
|
+
"900": {
|
|
44
|
+
"$value": "#2E2922",
|
|
45
|
+
"$type": "color"
|
|
46
|
+
},
|
|
47
|
+
"950": {
|
|
48
|
+
"$value": "#1E1A14",
|
|
49
|
+
"$type": "color"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"brand": {
|
|
53
|
+
"50": {
|
|
54
|
+
"$value": "#F8F4E6",
|
|
55
|
+
"$type": "color"
|
|
56
|
+
},
|
|
57
|
+
"100": {
|
|
58
|
+
"$value": "#F4E9D2",
|
|
59
|
+
"$type": "color"
|
|
60
|
+
},
|
|
61
|
+
"200": {
|
|
62
|
+
"$value": "#EFCFAC",
|
|
63
|
+
"$type": "color"
|
|
64
|
+
},
|
|
65
|
+
"300": {
|
|
66
|
+
"$value": "#DFB585",
|
|
67
|
+
"$type": "color"
|
|
68
|
+
},
|
|
69
|
+
"400": {
|
|
70
|
+
"$value": "#CE9C66",
|
|
71
|
+
"$type": "color"
|
|
72
|
+
},
|
|
73
|
+
"500": {
|
|
74
|
+
"$value": "#C08A5A",
|
|
75
|
+
"$type": "color"
|
|
76
|
+
},
|
|
77
|
+
"600": {
|
|
78
|
+
"$value": "#A0693C",
|
|
79
|
+
"$type": "color"
|
|
80
|
+
},
|
|
81
|
+
"700": {
|
|
82
|
+
"$value": "#7A4E2B",
|
|
83
|
+
"$type": "color"
|
|
84
|
+
},
|
|
85
|
+
"800": {
|
|
86
|
+
"$value": "#5C3A1F",
|
|
87
|
+
"$type": "color"
|
|
88
|
+
},
|
|
89
|
+
"900": {
|
|
90
|
+
"$value": "#482818",
|
|
91
|
+
"$type": "color"
|
|
92
|
+
},
|
|
93
|
+
"950": {
|
|
94
|
+
"$value": "#2C1709",
|
|
95
|
+
"$type": "color"
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"cocoa": {
|
|
99
|
+
"950": {
|
|
100
|
+
"$value": "var(--brand-950)",
|
|
101
|
+
"$type": "color"
|
|
102
|
+
},
|
|
103
|
+
"900": {
|
|
104
|
+
"$value": "#3A2012",
|
|
105
|
+
"$type": "color"
|
|
106
|
+
},
|
|
107
|
+
"700": {
|
|
108
|
+
"$value": "var(--brand-900)",
|
|
109
|
+
"$type": "color"
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"caramel": {
|
|
113
|
+
"500": {
|
|
114
|
+
"$value": "var(--brand-500)",
|
|
115
|
+
"$type": "color"
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"peach": {
|
|
119
|
+
"200": {
|
|
120
|
+
"$value": "var(--brand-200)",
|
|
121
|
+
"$type": "color"
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"cream": {
|
|
125
|
+
"50": {
|
|
126
|
+
"$value": "var(--brand-50)",
|
|
127
|
+
"$type": "color"
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"success": {
|
|
131
|
+
"600": {
|
|
132
|
+
"$value": "#2F7A40",
|
|
133
|
+
"$type": "color"
|
|
134
|
+
},
|
|
135
|
+
"100": {
|
|
136
|
+
"$value": "#EBF5EC",
|
|
137
|
+
"$type": "color"
|
|
138
|
+
},
|
|
139
|
+
"300": {
|
|
140
|
+
"$value": "#BFE0C6",
|
|
141
|
+
"$type": "color"
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
"warning": {
|
|
145
|
+
"600": {
|
|
146
|
+
"$value": "#B45309",
|
|
147
|
+
"$type": "color"
|
|
148
|
+
},
|
|
149
|
+
"100": {
|
|
150
|
+
"$value": "#FDF3E0",
|
|
151
|
+
"$type": "color"
|
|
152
|
+
},
|
|
153
|
+
"300": {
|
|
154
|
+
"$value": "#F3D9A8",
|
|
155
|
+
"$type": "color"
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
"danger": {
|
|
159
|
+
"600": {
|
|
160
|
+
"$value": "#C81E1E",
|
|
161
|
+
"$type": "color"
|
|
162
|
+
},
|
|
163
|
+
"700": {
|
|
164
|
+
"$value": "#B91C1C",
|
|
165
|
+
"$type": "color"
|
|
166
|
+
},
|
|
167
|
+
"100": {
|
|
168
|
+
"$value": "#FDEEEC",
|
|
169
|
+
"$type": "color"
|
|
170
|
+
},
|
|
171
|
+
"300": {
|
|
172
|
+
"$value": "#F5C6C0",
|
|
173
|
+
"$type": "color"
|
|
174
|
+
},
|
|
175
|
+
"contrast": {
|
|
176
|
+
"$value": "#FFFFFF",
|
|
177
|
+
"$type": "color"
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
"surface": {
|
|
181
|
+
"page": {
|
|
182
|
+
"$value": "var(--sand-50)",
|
|
183
|
+
"$type": "color"
|
|
184
|
+
},
|
|
185
|
+
"card": {
|
|
186
|
+
"$value": "#FFFFFF",
|
|
187
|
+
"$type": "color"
|
|
188
|
+
},
|
|
189
|
+
"sunken": {
|
|
190
|
+
"$value": "var(--sand-100)",
|
|
191
|
+
"$type": "color"
|
|
192
|
+
},
|
|
193
|
+
"subtle": {
|
|
194
|
+
"$value": "var(--sand-25)",
|
|
195
|
+
"$type": "color"
|
|
196
|
+
},
|
|
197
|
+
"inverse": {
|
|
198
|
+
"$value": "var(--sand-950)",
|
|
199
|
+
"$type": "color"
|
|
200
|
+
},
|
|
201
|
+
"brand": {
|
|
202
|
+
"$value": "var(--brand-900)",
|
|
203
|
+
"$type": "color"
|
|
204
|
+
},
|
|
205
|
+
"code": {
|
|
206
|
+
"$value": "#14110B",
|
|
207
|
+
"$type": "color"
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"text": {
|
|
211
|
+
"code": {
|
|
212
|
+
"$value": "#E8E3D9",
|
|
213
|
+
"$type": "color"
|
|
214
|
+
},
|
|
215
|
+
"on-brand-muted": {
|
|
216
|
+
"$value": "rgba(248,244,230,.75)",
|
|
217
|
+
"$type": "color"
|
|
218
|
+
},
|
|
219
|
+
"primary": {
|
|
220
|
+
"$value": "var(--sand-950)",
|
|
221
|
+
"$type": "color"
|
|
222
|
+
},
|
|
223
|
+
"secondary": {
|
|
224
|
+
"$value": "var(--sand-700)",
|
|
225
|
+
"$type": "color"
|
|
226
|
+
},
|
|
227
|
+
"muted": {
|
|
228
|
+
"$value": "#746A55",
|
|
229
|
+
"$type": "color"
|
|
230
|
+
},
|
|
231
|
+
"inverse": {
|
|
232
|
+
"$value": "var(--sand-50)",
|
|
233
|
+
"$type": "color"
|
|
234
|
+
},
|
|
235
|
+
"link": {
|
|
236
|
+
"$value": "var(--brand-700)",
|
|
237
|
+
"$type": "color"
|
|
238
|
+
},
|
|
239
|
+
"2xs": {
|
|
240
|
+
"$value": "11px",
|
|
241
|
+
"$type": "color"
|
|
242
|
+
},
|
|
243
|
+
"xs": {
|
|
244
|
+
"$value": "12px",
|
|
245
|
+
"$type": "color"
|
|
246
|
+
},
|
|
247
|
+
"sm": {
|
|
248
|
+
"$value": "13px",
|
|
249
|
+
"$type": "color"
|
|
250
|
+
},
|
|
251
|
+
"md": {
|
|
252
|
+
"$value": "14px",
|
|
253
|
+
"$type": "color"
|
|
254
|
+
},
|
|
255
|
+
"lg": {
|
|
256
|
+
"$value": "16px",
|
|
257
|
+
"$type": "color"
|
|
258
|
+
},
|
|
259
|
+
"xl": {
|
|
260
|
+
"$value": "18px",
|
|
261
|
+
"$type": "color"
|
|
262
|
+
},
|
|
263
|
+
"2xl": {
|
|
264
|
+
"$value": "21px",
|
|
265
|
+
"$type": "color"
|
|
266
|
+
},
|
|
267
|
+
"3xl": {
|
|
268
|
+
"$value": "26px",
|
|
269
|
+
"$type": "color"
|
|
270
|
+
},
|
|
271
|
+
"4xl": {
|
|
272
|
+
"$value": "34px",
|
|
273
|
+
"$type": "color"
|
|
274
|
+
},
|
|
275
|
+
"5xl": {
|
|
276
|
+
"$value": "44px",
|
|
277
|
+
"$type": "color"
|
|
278
|
+
},
|
|
279
|
+
"6xl": {
|
|
280
|
+
"$value": "60px",
|
|
281
|
+
"$type": "color"
|
|
282
|
+
},
|
|
283
|
+
"7xl": {
|
|
284
|
+
"$value": "76px",
|
|
285
|
+
"$type": "color"
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
"border": {
|
|
289
|
+
"code": {
|
|
290
|
+
"$value": "rgba(240,235,225,.09)",
|
|
291
|
+
"$type": "color"
|
|
292
|
+
},
|
|
293
|
+
"default": {
|
|
294
|
+
"$value": "var(--sand-200)",
|
|
295
|
+
"$type": "color"
|
|
296
|
+
},
|
|
297
|
+
"strong": {
|
|
298
|
+
"$value": "var(--sand-300)",
|
|
299
|
+
"$type": "color"
|
|
300
|
+
},
|
|
301
|
+
"inverse": {
|
|
302
|
+
"$value": "rgba(250,249,246,.18)",
|
|
303
|
+
"$type": "color"
|
|
304
|
+
}
|
|
305
|
+
},
|
|
306
|
+
"overlay": {
|
|
307
|
+
"scrim": {
|
|
308
|
+
"$value": "rgba(31,26,20,.45)",
|
|
309
|
+
"$type": "color"
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
"accent": {
|
|
313
|
+
"_": {
|
|
314
|
+
"$value": "var(--brand-950)",
|
|
315
|
+
"$type": "color"
|
|
316
|
+
},
|
|
317
|
+
"hover": {
|
|
318
|
+
"$value": "#1D0E04",
|
|
319
|
+
"$type": "color"
|
|
320
|
+
},
|
|
321
|
+
"active": {
|
|
322
|
+
"$value": "#120801",
|
|
323
|
+
"$type": "color"
|
|
324
|
+
},
|
|
325
|
+
"subtle": {
|
|
326
|
+
"$value": "var(--brand-50)",
|
|
327
|
+
"$type": "color"
|
|
328
|
+
},
|
|
329
|
+
"subtle-border": {
|
|
330
|
+
"$value": "var(--brand-200)",
|
|
331
|
+
"$type": "color"
|
|
332
|
+
},
|
|
333
|
+
"contrast": {
|
|
334
|
+
"$value": "#FFFFFF",
|
|
335
|
+
"$type": "color"
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
"focus": {
|
|
339
|
+
"ring-color": {
|
|
340
|
+
"$value": "var(--brand-700)",
|
|
341
|
+
"$type": "other"
|
|
342
|
+
},
|
|
343
|
+
"ring-offset": {
|
|
344
|
+
"$value": "var(--surface-card)",
|
|
345
|
+
"$type": "other"
|
|
346
|
+
},
|
|
347
|
+
"ring": {
|
|
348
|
+
"$value": "0 0 0 2px var(--focus-ring-offset),0 0 0 4px var(--focus-ring-color)",
|
|
349
|
+
"$type": "shadow"
|
|
350
|
+
},
|
|
351
|
+
"ring-danger": {
|
|
352
|
+
"$value": "0 0 0 2px var(--focus-ring-offset),0 0 0 4px var(--danger-600)",
|
|
353
|
+
"$type": "other"
|
|
354
|
+
}
|
|
355
|
+
},
|
|
356
|
+
"font": {
|
|
357
|
+
"display": {
|
|
358
|
+
"$value": "'Bricolage Grotesque','Figtree',ui-sans-serif,system-ui,sans-serif",
|
|
359
|
+
"$type": "fontFamily"
|
|
360
|
+
},
|
|
361
|
+
"sans": {
|
|
362
|
+
"$value": "'Figtree',ui-sans-serif,system-ui,-apple-system,'Segoe UI',sans-serif",
|
|
363
|
+
"$type": "fontFamily"
|
|
364
|
+
},
|
|
365
|
+
"mono": {
|
|
366
|
+
"$value": "'JetBrains Mono',ui-monospace,'SF Mono',Menlo,monospace",
|
|
367
|
+
"$type": "fontFamily"
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
"leading": {
|
|
371
|
+
"tight": {
|
|
372
|
+
"$value": "1.05",
|
|
373
|
+
"$type": "dimension"
|
|
374
|
+
},
|
|
375
|
+
"snug": {
|
|
376
|
+
"$value": "1.25",
|
|
377
|
+
"$type": "dimension"
|
|
378
|
+
},
|
|
379
|
+
"normal": {
|
|
380
|
+
"$value": "1.5",
|
|
381
|
+
"$type": "dimension"
|
|
382
|
+
},
|
|
383
|
+
"relaxed": {
|
|
384
|
+
"$value": "1.65",
|
|
385
|
+
"$type": "dimension"
|
|
386
|
+
}
|
|
387
|
+
},
|
|
388
|
+
"tracking": {
|
|
389
|
+
"display": {
|
|
390
|
+
"$value": "-0.02em",
|
|
391
|
+
"$type": "dimension"
|
|
392
|
+
},
|
|
393
|
+
"tight": {
|
|
394
|
+
"$value": "-0.01em",
|
|
395
|
+
"$type": "dimension"
|
|
396
|
+
},
|
|
397
|
+
"wide": {
|
|
398
|
+
"$value": "0.06em",
|
|
399
|
+
"$type": "dimension"
|
|
400
|
+
}
|
|
401
|
+
},
|
|
402
|
+
"weight": {
|
|
403
|
+
"regular": {
|
|
404
|
+
"$value": "400",
|
|
405
|
+
"$type": "other"
|
|
406
|
+
},
|
|
407
|
+
"medium": {
|
|
408
|
+
"$value": "500",
|
|
409
|
+
"$type": "other"
|
|
410
|
+
},
|
|
411
|
+
"semibold": {
|
|
412
|
+
"$value": "600",
|
|
413
|
+
"$type": "other"
|
|
414
|
+
},
|
|
415
|
+
"bold": {
|
|
416
|
+
"$value": "700",
|
|
417
|
+
"$type": "other"
|
|
418
|
+
},
|
|
419
|
+
"display": {
|
|
420
|
+
"$value": "680",
|
|
421
|
+
"$type": "other"
|
|
422
|
+
}
|
|
423
|
+
},
|
|
424
|
+
"space": {
|
|
425
|
+
"0": {
|
|
426
|
+
"$value": "0",
|
|
427
|
+
"$type": "dimension"
|
|
428
|
+
},
|
|
429
|
+
"1": {
|
|
430
|
+
"$value": "4px",
|
|
431
|
+
"$type": "dimension"
|
|
432
|
+
},
|
|
433
|
+
"2": {
|
|
434
|
+
"$value": "8px",
|
|
435
|
+
"$type": "dimension"
|
|
436
|
+
},
|
|
437
|
+
"3": {
|
|
438
|
+
"$value": "12px",
|
|
439
|
+
"$type": "dimension"
|
|
440
|
+
},
|
|
441
|
+
"4": {
|
|
442
|
+
"$value": "16px",
|
|
443
|
+
"$type": "dimension"
|
|
444
|
+
},
|
|
445
|
+
"5": {
|
|
446
|
+
"$value": "20px",
|
|
447
|
+
"$type": "dimension"
|
|
448
|
+
},
|
|
449
|
+
"6": {
|
|
450
|
+
"$value": "24px",
|
|
451
|
+
"$type": "dimension"
|
|
452
|
+
},
|
|
453
|
+
"8": {
|
|
454
|
+
"$value": "32px",
|
|
455
|
+
"$type": "dimension"
|
|
456
|
+
},
|
|
457
|
+
"10": {
|
|
458
|
+
"$value": "40px",
|
|
459
|
+
"$type": "dimension"
|
|
460
|
+
},
|
|
461
|
+
"12": {
|
|
462
|
+
"$value": "48px",
|
|
463
|
+
"$type": "dimension"
|
|
464
|
+
},
|
|
465
|
+
"16": {
|
|
466
|
+
"$value": "64px",
|
|
467
|
+
"$type": "dimension"
|
|
468
|
+
},
|
|
469
|
+
"20": {
|
|
470
|
+
"$value": "80px",
|
|
471
|
+
"$type": "dimension"
|
|
472
|
+
},
|
|
473
|
+
"24": {
|
|
474
|
+
"$value": "96px",
|
|
475
|
+
"$type": "dimension"
|
|
476
|
+
},
|
|
477
|
+
"32": {
|
|
478
|
+
"$value": "128px",
|
|
479
|
+
"$type": "dimension"
|
|
480
|
+
}
|
|
481
|
+
},
|
|
482
|
+
"radius": {
|
|
483
|
+
"sm": {
|
|
484
|
+
"$value": "4px",
|
|
485
|
+
"$type": "dimension"
|
|
486
|
+
},
|
|
487
|
+
"md": {
|
|
488
|
+
"$value": "8px",
|
|
489
|
+
"$type": "dimension"
|
|
490
|
+
},
|
|
491
|
+
"lg": {
|
|
492
|
+
"$value": "12px",
|
|
493
|
+
"$type": "dimension"
|
|
494
|
+
},
|
|
495
|
+
"xl": {
|
|
496
|
+
"$value": "16px",
|
|
497
|
+
"$type": "dimension"
|
|
498
|
+
},
|
|
499
|
+
"full": {
|
|
500
|
+
"$value": "999px",
|
|
501
|
+
"$type": "dimension"
|
|
502
|
+
}
|
|
503
|
+
},
|
|
504
|
+
"container": {
|
|
505
|
+
"max": {
|
|
506
|
+
"$value": "1200px",
|
|
507
|
+
"$type": "dimension"
|
|
508
|
+
},
|
|
509
|
+
"text": {
|
|
510
|
+
"$value": "720px",
|
|
511
|
+
"$type": "dimension"
|
|
512
|
+
}
|
|
513
|
+
},
|
|
514
|
+
"control": {
|
|
515
|
+
"h-sm": {
|
|
516
|
+
"$value": "28px",
|
|
517
|
+
"$type": "dimension"
|
|
518
|
+
},
|
|
519
|
+
"h-md": {
|
|
520
|
+
"$value": "36px",
|
|
521
|
+
"$type": "dimension"
|
|
522
|
+
},
|
|
523
|
+
"h-lg": {
|
|
524
|
+
"$value": "44px",
|
|
525
|
+
"$type": "dimension"
|
|
526
|
+
}
|
|
527
|
+
},
|
|
528
|
+
"table": {
|
|
529
|
+
"pad-y": {
|
|
530
|
+
"$value": "12px",
|
|
531
|
+
"$type": "dimension"
|
|
532
|
+
},
|
|
533
|
+
"pad-x": {
|
|
534
|
+
"$value": "16px",
|
|
535
|
+
"$type": "dimension"
|
|
536
|
+
}
|
|
537
|
+
},
|
|
538
|
+
"shadow": {
|
|
539
|
+
"xs": {
|
|
540
|
+
"$value": "0 1px 2px rgba(46,41,34,.05)",
|
|
541
|
+
"$type": "shadow"
|
|
542
|
+
},
|
|
543
|
+
"sm": {
|
|
544
|
+
"$value": "0 1px 3px rgba(46,41,34,.07)",
|
|
545
|
+
"$type": "shadow"
|
|
546
|
+
},
|
|
547
|
+
"md": {
|
|
548
|
+
"$value": "0 4px 12px rgba(46,41,34,.08)",
|
|
549
|
+
"$type": "shadow"
|
|
550
|
+
},
|
|
551
|
+
"lg": {
|
|
552
|
+
"$value": "0 12px 28px rgba(46,41,34,.12)",
|
|
553
|
+
"$type": "shadow"
|
|
554
|
+
},
|
|
555
|
+
"xl": {
|
|
556
|
+
"$value": "0 16px 40px rgba(31,26,20,.18),0 2px 8px rgba(31,26,20,.08)",
|
|
557
|
+
"$type": "shadow"
|
|
558
|
+
},
|
|
559
|
+
"pop": {
|
|
560
|
+
"$value": "var(--shadow-xl)",
|
|
561
|
+
"$type": "shadow"
|
|
562
|
+
}
|
|
563
|
+
},
|
|
564
|
+
"z": {
|
|
565
|
+
"dropdown": {
|
|
566
|
+
"$value": "1000",
|
|
567
|
+
"$type": "number"
|
|
568
|
+
},
|
|
569
|
+
"sticky": {
|
|
570
|
+
"$value": "1100",
|
|
571
|
+
"$type": "number"
|
|
572
|
+
},
|
|
573
|
+
"overlay": {
|
|
574
|
+
"$value": "1200",
|
|
575
|
+
"$type": "number"
|
|
576
|
+
},
|
|
577
|
+
"modal": {
|
|
578
|
+
"$value": "1300",
|
|
579
|
+
"$type": "number"
|
|
580
|
+
},
|
|
581
|
+
"popover": {
|
|
582
|
+
"$value": "1400",
|
|
583
|
+
"$type": "number"
|
|
584
|
+
},
|
|
585
|
+
"toast": {
|
|
586
|
+
"$value": "1500",
|
|
587
|
+
"$type": "number"
|
|
588
|
+
},
|
|
589
|
+
"tooltip": {
|
|
590
|
+
"$value": "1600",
|
|
591
|
+
"$type": "number"
|
|
592
|
+
}
|
|
593
|
+
},
|
|
594
|
+
"ease": {
|
|
595
|
+
"spring": {
|
|
596
|
+
"$value": "cubic-bezier(.3,1.04,.35,1)",
|
|
597
|
+
"$type": "cubicBezier"
|
|
598
|
+
},
|
|
599
|
+
"out": {
|
|
600
|
+
"$value": "cubic-bezier(.22,1,.36,1)",
|
|
601
|
+
"$type": "cubicBezier"
|
|
602
|
+
},
|
|
603
|
+
"in-out": {
|
|
604
|
+
"$value": "cubic-bezier(.65,0,.35,1)",
|
|
605
|
+
"$type": "cubicBezier"
|
|
606
|
+
}
|
|
607
|
+
},
|
|
608
|
+
"dur": {
|
|
609
|
+
"fast": {
|
|
610
|
+
"$value": "100ms",
|
|
611
|
+
"$type": "duration"
|
|
612
|
+
},
|
|
613
|
+
"med": {
|
|
614
|
+
"$value": "160ms",
|
|
615
|
+
"$type": "duration"
|
|
616
|
+
},
|
|
617
|
+
"slow": {
|
|
618
|
+
"$value": "240ms",
|
|
619
|
+
"$type": "duration"
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
}
|