cynx-ui 1.2.27 → 1.2.29
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/components/ActionsMenu.jsx +6 -6
- package/components/ActivityCard.jsx +5 -5
- package/components/Badge.jsx +13 -13
- package/components/BrandingCard.jsx +3 -3
- package/components/Button.jsx +14 -25
- package/components/CircularProgress.jsx +1 -1
- package/components/Confirm.jsx +3 -3
- package/components/DatePicker.jsx +11 -11
- package/components/Dropdown.jsx +1 -1
- package/components/HoverCard.jsx +3 -3
- package/components/Input.jsx +5 -5
- package/components/LineProgress.jsx +1 -1
- package/components/Modal.jsx +5 -5
- package/components/MultiSelect.jsx +2 -2
- package/components/SearchableDropdown.jsx +1 -1
- package/components/Select.jsx +4 -4
- package/components/Skeleton.jsx +1 -1
- package/components/StatBarCard.jsx +2 -2
- package/components/StatsBar.jsx +9 -9
- package/components/StatsCard.jsx +3 -3
- package/components/TabBar.jsx +4 -3
- package/components/Tabs.jsx +2 -2
- package/components/Toggle.jsx +8 -8
- package/components/UptimeBar.jsx +4 -4
- package/package.json +1 -1
|
@@ -75,12 +75,12 @@ export function ActionsMenu({ items, align = 'right' }) {
|
|
|
75
75
|
type="button"
|
|
76
76
|
onClick={toggle}
|
|
77
77
|
style={{
|
|
78
|
-
width:
|
|
78
|
+
width: 32, height: 32, borderRadius: 'var(--rads,8px)',
|
|
79
79
|
border: isOpen ? '1px solid var(--accent,#f99e2c)' : '1px solid var(--border-light,#d7d8e0)',
|
|
80
|
-
background: '
|
|
80
|
+
background: 'var(--surface,#fff)',
|
|
81
81
|
cursor: 'pointer', display: 'flex', alignItems: 'center', justifyContent: 'center',
|
|
82
82
|
color: isOpen ? 'var(--accent)' : 'var(--muted,#797b8d)', transition: 'all .14s',
|
|
83
|
-
boxShadow: isOpen ? '
|
|
83
|
+
boxShadow: isOpen ? 'var(--pd, rgba(249,158,44,.12))' : 'var(--shadow, 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06))',
|
|
84
84
|
}}
|
|
85
85
|
>
|
|
86
86
|
<svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor">
|
|
@@ -93,9 +93,9 @@ export function ActionsMenu({ items, align = 'right' }) {
|
|
|
93
93
|
ref={menuRef}
|
|
94
94
|
style={{
|
|
95
95
|
position: 'fixed', zIndex: 8100, minWidth: 180, padding: 5,
|
|
96
|
-
background: '
|
|
96
|
+
background: 'var(--surface,#fff)', border: '1.5px solid var(--border-light,#e2e8f0)',
|
|
97
97
|
borderRadius: 'var(--rads,8px)',
|
|
98
|
-
boxShadow: '0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.06)',
|
|
98
|
+
boxShadow: 'var(--shadow-lg, 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.06))',
|
|
99
99
|
animation: closing
|
|
100
100
|
? 'actionsClose .14s ease forwards'
|
|
101
101
|
: 'actionsDrop .14s cubic-bezier(.16,1,.3,1)',
|
|
@@ -116,7 +116,7 @@ export function ActionsMenu({ items, align = 'right' }) {
|
|
|
116
116
|
fontWeight: 500,
|
|
117
117
|
}}
|
|
118
118
|
onMouseEnter={e => {
|
|
119
|
-
e.currentTarget.style.background = item.variant === 'danger' ? 'rgba(246,71,71,.08)' : item.variant === 'warning' ? 'rgba(249,158,44,.08)' : 'var(--grey-1,#f5f5f8)';
|
|
119
|
+
e.currentTarget.style.background = item.variant === 'danger' ? 'var(--dd, rgba(246,71,71,.08))' : item.variant === 'warning' ? 'var(--pd, rgba(249,158,44,.08))' : 'var(--grey-1,#f5f5f8)';
|
|
120
120
|
}}
|
|
121
121
|
onMouseLeave={e => { e.currentTarget.style.background = 'transparent'; }}
|
|
122
122
|
>
|
|
@@ -79,8 +79,8 @@ export default function ActivityCard({
|
|
|
79
79
|
|
|
80
80
|
return (
|
|
81
81
|
<div ref={containerRef} style={{
|
|
82
|
-
background: '
|
|
83
|
-
boxShadow: '0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04)',
|
|
82
|
+
background: 'var(--surface,#fff)', border: '1px solid var(--border)', borderRadius: 'var(--rad)',
|
|
83
|
+
boxShadow: 'var(--shadow, 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04))',
|
|
84
84
|
padding: '14px 18px', position: 'relative', ...style,
|
|
85
85
|
}}>
|
|
86
86
|
{/* Header */}
|
|
@@ -134,9 +134,9 @@ export default function ActivityCard({
|
|
|
134
134
|
{hovered !== null && (
|
|
135
135
|
<div style={{
|
|
136
136
|
position: 'absolute', left: tooltipPos.x, top: tooltipPos.y,
|
|
137
|
-
transform: 'translate(-50%, -100%)', background: '
|
|
137
|
+
transform: 'translate(-50%, -100%)', background: 'var(--surface,#fff)',
|
|
138
138
|
border: '1px solid var(--border)', borderRadius: 'var(--rads, 8px)',
|
|
139
|
-
boxShadow: '0 4px 12px rgba(0,0,0,.12)', padding: '10px 14px',
|
|
139
|
+
boxShadow: 'var(--smd, 0 4px 12px rgba(0,0,0,.12))', padding: '10px 14px',
|
|
140
140
|
pointerEvents: 'none', zIndex: 100, whiteSpace: 'nowrap',
|
|
141
141
|
animation: 'hoverCardIn .15s ease',
|
|
142
142
|
}}>
|
|
@@ -161,7 +161,7 @@ export default function ActivityCard({
|
|
|
161
161
|
<div style={{
|
|
162
162
|
position: 'absolute', left: '50%', bottom: -5,
|
|
163
163
|
transform: 'translateX(-50%) rotate(45deg)',
|
|
164
|
-
width: 8, height: 8, background: '
|
|
164
|
+
width: 8, height: 8, background: 'var(--surface,#fff)',
|
|
165
165
|
borderRight: '1px solid var(--border)', borderBottom: '1px solid var(--border)',
|
|
166
166
|
}} />
|
|
167
167
|
</div>
|
package/components/Badge.jsx
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
const VARIANTS = {
|
|
2
|
-
ok: { bg: 'var(--success-bg,rgba(39,174,96,.1))', color: 'var(--success,#27ae60)', border: 'rgba(39,174,96,.2)', dot: 'var(--success,#27ae60)' },
|
|
3
|
-
err: { bg: 'var(--danger-bg,rgba(246,71,71,.1))', color: 'var(--danger,#f64747)', border: 'rgba(246,71,71,.2)', dot: 'var(--danger,#f64747)' },
|
|
2
|
+
ok: { bg: 'var(--success-bg,rgba(39,174,96,.1))', color: 'var(--success,#27ae60)', border: 'var(--sd, rgba(39,174,96,.2))', dot: 'var(--success,#27ae60)' },
|
|
3
|
+
err: { bg: 'var(--danger-bg,rgba(246,71,71,.1))', color: 'var(--danger,#f64747)', border: 'var(--dd, rgba(246,71,71,.2))', dot: 'var(--danger,#f64747)' },
|
|
4
4
|
warn: { bg: 'var(--accent-bg,rgba(249,158,44,.1))', color: 'var(--accent,#f99e2c)', border: 'var(--accent-border,rgba(249,158,44,.25))', dot: 'var(--accent,#f99e2c)' },
|
|
5
|
-
blue: { bg: 'var(--blue-bg,rgba(39,130,228,.1))', color: 'var(--blue,#2782e4)', border: 'rgba(39,130,228,.2)', dot: 'var(--blue,#2782e4)' },
|
|
5
|
+
blue: { bg: 'var(--blue-bg,rgba(39,130,228,.1))', color: 'var(--blue,#2782e4)', border: 'var(--infd, rgba(39,130,228,.2))', dot: 'var(--blue,#2782e4)' },
|
|
6
6
|
dim: { bg: 'var(--grey-1,#f5f5f8)', color: 'var(--grey-4,#797b8d)', border: 'var(--border,#d7d8e0)', dot: 'var(--grey-4,#797b8d)' },
|
|
7
7
|
purple: { bg: 'rgba(139,92,246,.1)', color: '#8b5cf6', border: 'rgba(139,92,246,.2)', dot: '#8b5cf6' },
|
|
8
8
|
teal: { bg: 'rgba(20,184,166,.1)', color: '#14b8a6', border: 'rgba(20,184,166,.2)', dot: '#14b8a6' },
|
|
9
9
|
pink: { bg: 'rgba(236,72,153,.1)', color: '#ec4899', border: 'rgba(236,72,153,.2)', dot: '#ec4899' },
|
|
10
10
|
ghost: { bg: 'transparent', color: 'var(--t2,var(--grey-4,#797b8d))', border: 'var(--bd,var(--border,#d7d8e0))', dot: 'var(--t3,var(--grey-4,#797b8d))' },
|
|
11
|
-
paid: { bg: 'rgba(30,41,59,.08)', color: '#1e293b', border: 'rgba(30,41,59,.15)', dot: '#1e293b' },
|
|
12
|
-
invoiced: { bg: 'rgba(120,120,130,.08)', color: '#787882', border: 'rgba(120,120,130,.15)', dot: '#787882' },
|
|
13
|
-
verified: { bg: 'rgba(34,197,94,.08)', color: '#22c55e', border: 'rgba(34,197,94,.15)', dot: '#22c55e' },
|
|
11
|
+
paid: { bg: 'var(--pd, rgba(30,41,59,.08))', color: 'var(--t, #1e293b)', border: 'var(--accent-border, rgba(30,41,59,.15))', dot: 'var(--t, #1e293b)' },
|
|
12
|
+
invoiced: { bg: 'rgba(120,120,130,.08)', color: 'var(--t2, #787882)', border: 'rgba(120,120,130,.15)', dot: 'var(--t2, #787882)' },
|
|
13
|
+
verified: { bg: 'var(--sd, rgba(34,197,94,.08))', color: 'var(--s, #22c55e)', border: 'var(--sd, rgba(34,197,94,.15))', dot: 'var(--s, #22c55e)' },
|
|
14
14
|
partial: { bg: 'rgba(100,100,110,.08)', color: '#64646e', border: 'rgba(100,100,110,.15)', dot: '#64646e' },
|
|
15
|
-
deleted: { bg: 'rgba(239,68,68,.08)', color: '#ef4444', border: 'rgba(239,68,68,.15)', dot: '#ef4444' },
|
|
16
|
-
update: { bg: 'rgba(249,115,22,.08)', color: '#f97316', border: 'rgba(249,115,22,.15)', dot: '#f97316' },
|
|
17
|
-
ready: { bg: 'rgba(234,179,8,.08)', color: '#eab308', border: 'rgba(234,179,8,.15)', dot: '#eab308' },
|
|
18
|
-
new: { bg: 'rgba(59,130,246,.08)', color: '#3b82f6', border: 'rgba(59,130,246,.15)', dot: '#3b82f6' },
|
|
19
|
-
active: { bg: 'transparent', color: '#22c55e', border: 'none', dot: '#22c55e', noPad: true },
|
|
20
|
-
inactive: { bg: 'transparent', color: '#ef4444', border: 'none', dot: '#ef4444', noPad: true },
|
|
21
|
-
pending: { bg: 'transparent', color: '#d97706', border: 'none', dot: '#d97706', noPad: true, pulse: true },
|
|
15
|
+
deleted: { bg: 'var(--dd, rgba(239,68,68,.08))', color: 'var(--d, #ef4444)', border: 'var(--dd, rgba(239,68,68,.15))', dot: 'var(--d, #ef4444)' },
|
|
16
|
+
update: { bg: 'var(--wd, rgba(249,115,22,.08))', color: 'var(--w, #f97316)', border: 'var(--wd, rgba(249,115,22,.15))', dot: 'var(--w, #f97316)' },
|
|
17
|
+
ready: { bg: 'var(--wd, rgba(234,179,8,.08))', color: 'var(--w, #eab308)', border: 'var(--wd, rgba(234,179,8,.15))', dot: 'var(--w, #eab308)' },
|
|
18
|
+
new: { bg: 'var(--infd, rgba(59,130,246,.08))', color: 'var(--inf, #3b82f6)', border: 'var(--infd, rgba(59,130,246,.15))', dot: 'var(--inf, #3b82f6)' },
|
|
19
|
+
active: { bg: 'transparent', color: 'var(--s, #22c55e)', border: 'none', dot: 'var(--s, #22c55e)', noPad: true },
|
|
20
|
+
inactive: { bg: 'transparent', color: 'var(--d, #ef4444)', border: 'none', dot: 'var(--d, #ef4444)', noPad: true },
|
|
21
|
+
pending: { bg: 'transparent', color: 'var(--w, #d97706)', border: 'none', dot: 'var(--w, #d97706)', noPad: true, pulse: true },
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
const SHAPES = {
|
|
@@ -57,7 +57,7 @@ export function BrandingCard({ label, hint, value, onUpload, onRemove, saving, o
|
|
|
57
57
|
display: 'flex', alignItems: 'center', justifyContent: 'space-between',
|
|
58
58
|
padding: '10px 12px', borderRadius: 'var(--rads)',
|
|
59
59
|
border: '1px solid var(--border-light)', background: 'var(--surface)',
|
|
60
|
-
boxShadow: '0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06)',
|
|
60
|
+
boxShadow: 'var(--shadow, 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06))',
|
|
61
61
|
...cardStyle,
|
|
62
62
|
}}>
|
|
63
63
|
{(hasExisting || previewUrl) ? (
|
|
@@ -76,9 +76,9 @@ export function BrandingCard({ label, hint, value, onUpload, onRemove, saving, o
|
|
|
76
76
|
</div>
|
|
77
77
|
)}
|
|
78
78
|
<div style={{ display: 'flex', gap: 4, flexShrink: 0 }}>
|
|
79
|
-
<Button variant="ghost" size="xs" type="button" icon={<Pencil size={11} />} onClick={() => setEditOpen(true)} style={cardStyle ? { background: '
|
|
79
|
+
<Button variant="ghost" size="xs" type="button" icon={<Pencil size={11} />} onClick={() => setEditOpen(true)} style={cardStyle ? { background: 'var(--surface,#fff)', color: 'var(--t, #333)' } : undefined}>Edit</Button>
|
|
80
80
|
{hasExisting && (
|
|
81
|
-
<Button variant="ghost" size="xs" type="button" icon={<Trash2 size={11} />} style={cardStyle ? { background: '
|
|
81
|
+
<Button variant="ghost" size="xs" type="button" icon={<Trash2 size={11} />} style={cardStyle ? { background: 'var(--surface,#fff)', color: 'var(--danger)' } : { color: 'var(--danger)' }}
|
|
82
82
|
onClick={handleRemove} disabled={saving}>Remove</Button>
|
|
83
83
|
)}
|
|
84
84
|
</div>
|
package/components/Button.jsx
CHANGED
|
@@ -2,7 +2,7 @@ import { Spinner } from './Spinner';
|
|
|
2
2
|
|
|
3
3
|
const VARIANTS = {
|
|
4
4
|
default: {
|
|
5
|
-
background: '
|
|
5
|
+
background: 'var(--surface,#fff)',
|
|
6
6
|
color: 'var(--def-btn-text,#0f111c)',
|
|
7
7
|
border: '1px solid var(--bd,#d7d8e0)',
|
|
8
8
|
hoverBg: 'var(--grey-1,#f5f5f8)',
|
|
@@ -10,7 +10,7 @@ const VARIANTS = {
|
|
|
10
10
|
},
|
|
11
11
|
primary: {
|
|
12
12
|
background: 'var(--accent,#f99e2c)',
|
|
13
|
-
color: '
|
|
13
|
+
color: 'var(--def-btn-text,#fff)',
|
|
14
14
|
border: '1px solid transparent',
|
|
15
15
|
hoverBg: 'var(--accent-hover,#e68d1f)',
|
|
16
16
|
hoverShadow: '0 2px 8px rgba(249,158,44,.35)',
|
|
@@ -18,29 +18,29 @@ const VARIANTS = {
|
|
|
18
18
|
secondary: {
|
|
19
19
|
background: 'var(--blue-bg,rgba(39,130,228,.1))',
|
|
20
20
|
color: 'var(--blue,#2782e4)',
|
|
21
|
-
border: '1px solid rgba(39,130,228,.2)',
|
|
22
|
-
hoverBg: 'rgba(39,130,228,.18)',
|
|
21
|
+
border: '1px solid var(--infd, rgba(39,130,228,.2))',
|
|
22
|
+
hoverBg: 'var(--infd, rgba(39,130,228,.18))',
|
|
23
23
|
hoverShadow: '0 2px 8px rgba(39,130,228,.25)',
|
|
24
24
|
},
|
|
25
25
|
danger: {
|
|
26
26
|
background: 'var(--danger-bg,rgba(246,71,71,.1))',
|
|
27
27
|
color: 'var(--danger,#f64747)',
|
|
28
|
-
border: '1px solid rgba(246,71,71,.2)',
|
|
29
|
-
hoverBg: 'rgba(246,71,71,.18)',
|
|
28
|
+
border: '1px solid var(--dd, rgba(246,71,71,.2))',
|
|
29
|
+
hoverBg: 'var(--dd, rgba(246,71,71,.18))',
|
|
30
30
|
hoverShadow: '0 2px 8px rgba(246,71,71,.25)',
|
|
31
31
|
},
|
|
32
32
|
success: {
|
|
33
33
|
background: 'var(--success-bg,rgba(39,174,96,.1))',
|
|
34
34
|
color: 'var(--success,#27ae60)',
|
|
35
|
-
border: '1px solid rgba(39,174,96,.2)',
|
|
36
|
-
hoverBg: 'rgba(39,174,96,.18)',
|
|
35
|
+
border: '1px solid var(--sd, rgba(39,174,96,.2))',
|
|
36
|
+
hoverBg: 'var(--sd, rgba(39,174,96,.18))',
|
|
37
37
|
hoverShadow: '0 2px 8px rgba(39,174,96,.25)',
|
|
38
38
|
},
|
|
39
39
|
warning: {
|
|
40
40
|
background: 'var(--accent-bg,rgba(249,158,44,.1))',
|
|
41
41
|
color: 'var(--accent,#f99e2c)',
|
|
42
42
|
border: '1px solid var(--accent-border,rgba(249,158,44,.25))',
|
|
43
|
-
hoverBg: 'rgba(249,158,44,.18)',
|
|
43
|
+
hoverBg: 'var(--pd, rgba(249,158,44,.18))',
|
|
44
44
|
hoverShadow: '0 2px 8px rgba(249,158,44,.25)',
|
|
45
45
|
},
|
|
46
46
|
ghost: {
|
|
@@ -80,21 +80,10 @@ const VARIANTS = {
|
|
|
80
80
|
};
|
|
81
81
|
|
|
82
82
|
const SIZES = {
|
|
83
|
-
xs: { padding: '4px 8px', fontSize: 12, height:
|
|
83
|
+
xs: { padding: '4px 8px', fontSize: 12, height: 32 },
|
|
84
84
|
sm: { padding: '4px 8px', fontSize: 12, height: 32 },
|
|
85
|
-
md: { padding: '8px 16px', fontSize: 13, height:
|
|
86
|
-
lg: { padding: '10px 20px', fontSize: 14, height:
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
const ICON_STYLE = {
|
|
90
|
-
padding: 0,
|
|
91
|
-
width: 30,
|
|
92
|
-
height: 30,
|
|
93
|
-
borderRadius: 'var(--rads,8px)',
|
|
94
|
-
display: 'inline-flex',
|
|
95
|
-
alignItems: 'center',
|
|
96
|
-
justifyContent: 'center',
|
|
97
|
-
lineHeight: 0,
|
|
85
|
+
md: { padding: '8px 16px', fontSize: 13, height: 32 },
|
|
86
|
+
lg: { padding: '10px 20px', fontSize: 14, height: 32 },
|
|
98
87
|
};
|
|
99
88
|
|
|
100
89
|
export default function Button({
|
|
@@ -141,8 +130,8 @@ export default function Button({
|
|
|
141
130
|
border: v.border,
|
|
142
131
|
padding: isIconOnly ? 0 : s.padding,
|
|
143
132
|
fontSize: s.fontSize,
|
|
144
|
-
height:
|
|
145
|
-
width: isIconOnly ?
|
|
133
|
+
height: s.height,
|
|
134
|
+
width: isIconOnly ? s.height : undefined,
|
|
146
135
|
...(v.paddingLeft !== undefined && { paddingLeft: v.paddingLeft }),
|
|
147
136
|
...(v.paddingRight !== undefined && { paddingRight: v.paddingRight }),
|
|
148
137
|
...(v.boxShadow !== undefined && { boxShadow: v.boxShadow }),
|
package/components/Confirm.jsx
CHANGED
|
@@ -37,13 +37,13 @@ export function ConfirmRoot() {
|
|
|
37
37
|
<div style={{
|
|
38
38
|
background: 'var(--surface)', border: '1px solid var(--border)',
|
|
39
39
|
borderRadius: 14, width: '100%', maxWidth: 400,
|
|
40
|
-
boxShadow: '0 20px 60px rgba(0,0,0,.4)',
|
|
40
|
+
boxShadow: 'var(--slg, 0 20px 60px rgba(0,0,0,.4))',
|
|
41
41
|
animation: `${closing ? 'modalClose' : 'modalPop'} .25s cubic-bezier(.4,0,.2,1) forwards`,
|
|
42
42
|
}}>
|
|
43
43
|
<div style={{ padding: '20px 20px 0', display: 'flex', gap: 14, alignItems: 'flex-start' }}>
|
|
44
44
|
<div style={{
|
|
45
45
|
width: 36, height: 36, borderRadius: '50%', flexShrink: 0,
|
|
46
|
-
background: state.danger ? 'rgba(246,71,71,.1)' : 'rgba(249,158,44,.1)',
|
|
46
|
+
background: state.danger ? 'var(--dd, rgba(246,71,71,.1))' : 'var(--pd, rgba(249,158,44,.1))',
|
|
47
47
|
display: 'flex', alignItems: 'center', justifyContent: 'center',
|
|
48
48
|
}}>
|
|
49
49
|
<AlertTriangle size={17} color={state.danger ? 'var(--danger)' : 'var(--warning)'} />
|
|
@@ -64,7 +64,7 @@ export function ConfirmRoot() {
|
|
|
64
64
|
background: 'var(--grey-1)', borderRadius: '0 0 14px 14px',
|
|
65
65
|
}}>
|
|
66
66
|
<Button variant="ghost" size="sm" onClick={() => answer(false)}>Cancel</Button>
|
|
67
|
-
<Button variant={state.danger ? 'ghost' : 'primary'} size="sm" style={state.danger ? { background: 'var(--danger)', color: '
|
|
67
|
+
<Button variant={state.danger ? 'ghost' : 'primary'} size="sm" style={state.danger ? { background: 'var(--danger)', color: 'var(--def-btn-text,#fff)', border: 'none' } : {}} onClick={() => answer(true)}>
|
|
68
68
|
{state.confirmLabel || 'Confirm'}
|
|
69
69
|
</Button>
|
|
70
70
|
</div>
|
|
@@ -122,7 +122,7 @@ export function DatePicker({ value, onChange, placeholder = 'Select date', badge
|
|
|
122
122
|
: new Date(y, m + 1, c.day);
|
|
123
123
|
return (
|
|
124
124
|
<div key={i} onClick={() => { pick(date); }}
|
|
125
|
-
style={{ textAlign: 'center', padding: '6px 2px', fontSize: '.78rem', color: 'var(--muted)', cursor: 'pointer', borderRadius:
|
|
125
|
+
style={{ textAlign: 'center', padding: '6px 2px', fontSize: '.78rem', color: 'var(--muted)', cursor: 'pointer', borderRadius: 'var(--radxs, 6px)', transition: 'background .12s' }}
|
|
126
126
|
onMouseEnter={e => e.currentTarget.style.background = 'var(--grey-1)'}
|
|
127
127
|
onMouseLeave={e => e.currentTarget.style.background = 'transparent'}>
|
|
128
128
|
{c.day}
|
|
@@ -141,9 +141,9 @@ export function DatePicker({ value, onChange, placeholder = 'Select date', badge
|
|
|
141
141
|
<div key={i} onClick={() => !dis && pick(date)} style={{
|
|
142
142
|
position: 'relative', textAlign: 'center', padding: '6px 2px',
|
|
143
143
|
fontSize: '.8rem', fontWeight: sel ? 700 : today ? 600 : 400,
|
|
144
|
-
borderRadius:
|
|
144
|
+
borderRadius: 'var(--radxs, 6px)', cursor: dis ? 'not-allowed' : 'pointer',
|
|
145
145
|
background: sel ? 'var(--accent)' : 'transparent',
|
|
146
|
-
color: sel ? '
|
|
146
|
+
color: sel ? 'var(--def-btn-text,#fff)' : dis ? 'var(--border)' : today ? 'var(--accent)' : 'var(--primary-text)',
|
|
147
147
|
border: today && !sel ? '1.5px solid var(--accent)' : '1.5px solid transparent',
|
|
148
148
|
transition: 'background .12s, color .12s',
|
|
149
149
|
}}
|
|
@@ -174,8 +174,8 @@ export function DatePicker({ value, onChange, placeholder = 'Select date', badge
|
|
|
174
174
|
const sel = value && value.getFullYear() === y && value.getMonth() === i;
|
|
175
175
|
return (
|
|
176
176
|
<div key={i} onClick={() => { const c = new Date(cursor); c.setMonth(i); setCursor(c); setView('day'); }}
|
|
177
|
-
style={{ textAlign: 'center', padding: '10px 4px', borderRadius:
|
|
178
|
-
background: sel ? 'var(--accent)' : 'transparent', color: sel ? '
|
|
177
|
+
style={{ textAlign: 'center', padding: '10px 4px', borderRadius: 'var(--radxs, 6px)', fontSize: '.82rem', fontWeight: 600, cursor: 'pointer',
|
|
178
|
+
background: sel ? 'var(--accent)' : 'transparent', color: sel ? 'var(--def-btn-text,#fff)' : 'var(--primary-text)',
|
|
179
179
|
transition: 'background .12s', }}
|
|
180
180
|
onMouseEnter={e => { if (!sel) e.currentTarget.style.background = 'var(--grey-1)'; }}
|
|
181
181
|
onMouseLeave={e => { if (!sel) e.currentTarget.style.background = 'transparent'; }}>
|
|
@@ -197,8 +197,8 @@ export function DatePicker({ value, onChange, placeholder = 'Select date', badge
|
|
|
197
197
|
const sel = value && value.getFullYear() === yr;
|
|
198
198
|
return (
|
|
199
199
|
<div key={yr} onClick={() => { const c = new Date(cursor); c.setFullYear(yr); setCursor(c); setView('month'); }}
|
|
200
|
-
style={{ textAlign: 'center', padding: '10px 4px', borderRadius:
|
|
201
|
-
background: sel ? 'var(--accent)' : 'transparent', color: sel ? '
|
|
200
|
+
style={{ textAlign: 'center', padding: '10px 4px', borderRadius: 'var(--radxs, 6px)', fontSize: '.82rem', fontWeight: 600, cursor: 'pointer',
|
|
201
|
+
background: sel ? 'var(--accent)' : 'transparent', color: sel ? 'var(--def-btn-text,#fff)' : 'var(--primary-text)',
|
|
202
202
|
transition: 'background .12s', }}
|
|
203
203
|
onMouseEnter={e => { if (!sel) e.currentTarget.style.background = 'var(--grey-1)'; }}
|
|
204
204
|
onMouseLeave={e => { if (!sel) e.currentTarget.style.background = 'transparent'; }}>
|
|
@@ -248,23 +248,23 @@ export function DatePicker({ value, onChange, placeholder = 'Select date', badge
|
|
|
248
248
|
<div ref={dropRef} style={{
|
|
249
249
|
position: 'fixed', top: pos.top, left: pos.left, width: pos.width, zIndex: 9000,
|
|
250
250
|
background: 'var(--surface)', border: '1px solid var(--border)',
|
|
251
|
-
borderRadius:
|
|
251
|
+
borderRadius: 'var(--rad, 10px)', boxShadow: 'var(--shadow-lg)',
|
|
252
252
|
padding: '10px 12px',
|
|
253
253
|
animation: 'dp-in .12s ease',
|
|
254
254
|
}}>
|
|
255
255
|
{/* Calendar header */}
|
|
256
256
|
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', marginBottom: 8 }}>
|
|
257
|
-
<button type="button" onClick={() => nav(-1)} style={{ background: 'none', border: 'none', cursor: 'pointer', padding: 4, borderRadius:
|
|
257
|
+
<button type="button" onClick={() => nav(-1)} style={{ background: 'none', border: 'none', cursor: 'pointer', padding: 4, borderRadius: 'var(--radxs, 6px)', color: 'var(--muted)', display: 'flex', alignItems: 'center' }}
|
|
258
258
|
onMouseEnter={e => e.currentTarget.style.background = 'var(--grey-1)'}
|
|
259
259
|
onMouseLeave={e => e.currentTarget.style.background = 'none'}>
|
|
260
260
|
<ChevronLeft size={15} />
|
|
261
261
|
</button>
|
|
262
|
-
<button type="button" onClick={cycleView} style={{ background: 'none', border: 'none', cursor: 'pointer', fontSize: '.82rem', fontWeight: 700, color: 'var(--primary-text)', padding: '4px 8px', borderRadius:
|
|
262
|
+
<button type="button" onClick={cycleView} style={{ background: 'none', border: 'none', cursor: 'pointer', fontSize: '.82rem', fontWeight: 700, color: 'var(--primary-text)', padding: '4px 8px', borderRadius: 'var(--radxs, 6px)', fontFamily: 'var(--sans)' }}
|
|
263
263
|
onMouseEnter={e => e.currentTarget.style.background = 'var(--grey-1)'}
|
|
264
264
|
onMouseLeave={e => e.currentTarget.style.background = 'none'}>
|
|
265
265
|
{headerLabel}
|
|
266
266
|
</button>
|
|
267
|
-
<button type="button" onClick={() => nav(1)} style={{ background: 'none', border: 'none', cursor: 'pointer', padding: 4, borderRadius:
|
|
267
|
+
<button type="button" onClick={() => nav(1)} style={{ background: 'none', border: 'none', cursor: 'pointer', padding: 4, borderRadius: 'var(--radxs, 6px)', color: 'var(--muted)', display: 'flex', alignItems: 'center' }}
|
|
268
268
|
onMouseEnter={e => e.currentTarget.style.background = 'var(--grey-1)'}
|
|
269
269
|
onMouseLeave={e => e.currentTarget.style.background = 'none'}>
|
|
270
270
|
<ChevronRight size={15} />
|
package/components/Dropdown.jsx
CHANGED
|
@@ -99,7 +99,7 @@ export default function Dropdown({ value, onChange, options, placeholder = 'Sele
|
|
|
99
99
|
width: '100%', display: 'flex', alignItems: 'center', justifyContent: 'space-between',
|
|
100
100
|
padding: '8px 11px', background: 'var(--input-bg)',
|
|
101
101
|
border: `1px solid ${open ? 'var(--accent)' : 'var(--border)'}`,
|
|
102
|
-
boxShadow: open ? '
|
|
102
|
+
boxShadow: open ? 'var(--pd, rgba(249,158,44,.12))' : 'var(--shadow)',
|
|
103
103
|
borderRadius: 'var(--rads)', cursor: disabled ? 'not-allowed' : 'pointer',
|
|
104
104
|
color: selected ? 'var(--primary-text)' : 'var(--muted)',
|
|
105
105
|
fontSize: '.82rem', fontFamily: 'var(--sans)', transition: 'all .14s',
|
package/components/HoverCard.jsx
CHANGED
|
@@ -49,11 +49,11 @@ export default function HoverCard({ trigger, children, position = 'top', width =
|
|
|
49
49
|
transform: 'translateX(-50%)',
|
|
50
50
|
zIndex: 9999,
|
|
51
51
|
minWidth: width,
|
|
52
|
-
background: '
|
|
52
|
+
background: 'var(--surface,#fff)',
|
|
53
53
|
border: '1px solid var(--border)',
|
|
54
54
|
borderRadius: 'var(--rads, 8px)',
|
|
55
55
|
padding: '10px 14px',
|
|
56
|
-
boxShadow: '0 4px 12px rgba(0,0,0,.12)',
|
|
56
|
+
boxShadow: 'var(--smd, 0 4px 12px rgba(0,0,0,.12))',
|
|
57
57
|
pointerEvents: 'none',
|
|
58
58
|
animation: 'hoverCardIn .15s ease',
|
|
59
59
|
...style,
|
|
@@ -63,7 +63,7 @@ export default function HoverCard({ trigger, children, position = 'top', width =
|
|
|
63
63
|
position: 'absolute', left: '50%',
|
|
64
64
|
[position === 'top' ? 'bottom' : 'top']: -5,
|
|
65
65
|
transform: 'translateX(-50%) rotate(45deg)',
|
|
66
|
-
width: 8, height: 8, background: '
|
|
66
|
+
width: 8, height: 8, background: 'var(--surface,#fff)',
|
|
67
67
|
borderRight: '1px solid var(--border)',
|
|
68
68
|
borderBottom: position === 'top' ? 'none' : '1px solid var(--border)',
|
|
69
69
|
borderTop: position === 'top' ? '1px solid var(--border)' : 'none',
|
package/components/Input.jsx
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { useRef, useState } from 'react';
|
|
2
2
|
|
|
3
3
|
const SIZES = {
|
|
4
|
-
xs: { height:
|
|
4
|
+
xs: { height: 32, fontSize: 11, paddingH: 8 },
|
|
5
5
|
sm: { height: 32, fontSize: 12, paddingH: 9 },
|
|
6
|
-
md: { height:
|
|
7
|
-
lg: { height:
|
|
6
|
+
md: { height: 32, fontSize: 13, paddingH: 11 },
|
|
7
|
+
lg: { height: 32, fontSize: 14, paddingH: 14 },
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
export default function Input({
|
|
@@ -114,9 +114,9 @@ export default function Input({
|
|
|
114
114
|
outline: 'none',
|
|
115
115
|
transition: 'border-color .14s, box-shadow .14s',
|
|
116
116
|
boxShadow: error
|
|
117
|
-
? '
|
|
117
|
+
? 'var(--dd, rgba(246,71,71,.12)), var(--shadow,0 1px 3px rgba(20,22,41,.1))'
|
|
118
118
|
: focused
|
|
119
|
-
? '
|
|
119
|
+
? 'var(--pd, rgba(249,158,44,.12)), var(--shadow,0 1px 3px rgba(20,22,41,.1))'
|
|
120
120
|
: 'var(--shadow,0 1px 3px rgba(20,22,41,.1))',
|
|
121
121
|
opacity: props.disabled ? 0.5 : 1,
|
|
122
122
|
cursor: props.disabled ? 'not-allowed' : undefined,
|
package/components/Modal.jsx
CHANGED
|
@@ -43,9 +43,9 @@ const STYLES = `
|
|
|
43
43
|
width: 48px; height: 48px; border-radius: 50%; margin: 0 auto 12px;
|
|
44
44
|
display: flex; align-items: center; justify-content: center;
|
|
45
45
|
}
|
|
46
|
-
.confirm-icon.danger { background: rgba(246,71,71,.1); }
|
|
47
|
-
.confirm-icon.warning { background: rgba(249,158,44,.1); }
|
|
48
|
-
.confirm-icon.info { background: rgba(39,130,228,.1); }
|
|
46
|
+
.confirm-icon.danger { background: var(--dd, rgba(246,71,71,.1)); }
|
|
47
|
+
.confirm-icon.warning { background: var(--pd, rgba(249,158,44,.1)); }
|
|
48
|
+
.confirm-icon.info { background: var(--infd, rgba(39,130,228,.1)); }
|
|
49
49
|
|
|
50
50
|
/* Modal scale */
|
|
51
51
|
@keyframes modalIn {
|
|
@@ -149,7 +149,7 @@ export function Modal({ open, onClose, onBeforeClose, title, children, footer, m
|
|
|
149
149
|
style={{
|
|
150
150
|
background: 'var(--surface)', border: '1px solid var(--border)',
|
|
151
151
|
borderRadius: 14, width: '100%', maxWidth, maxHeight: '60vh',
|
|
152
|
-
boxShadow: '0 20px 60px rgba(0,0,0,.25)',
|
|
152
|
+
boxShadow: 'var(--slg, 0 20px 60px rgba(0,0,0,.25))',
|
|
153
153
|
overflow: 'hidden', display: 'flex', flexDirection: 'column',
|
|
154
154
|
animation: `${closing ? 'modalCardOut' : 'modalCardIn'} .26s cubic-bezier(.4,0,.2,1) forwards`,
|
|
155
155
|
}}
|
|
@@ -196,7 +196,7 @@ export function Confirm({ open, onClose, onConfirm, title, message, variant = 'd
|
|
|
196
196
|
<div className={`confirm-icon ${variant}`} style={{
|
|
197
197
|
width: 48, height: 48, borderRadius: '50%', margin: '0 auto 12px',
|
|
198
198
|
display: 'flex', alignItems: 'center', justifyContent: 'center',
|
|
199
|
-
background: variant === 'danger' ? 'rgba(246,71,71,.1)' : variant === 'warning' ? 'rgba(249,158,44,.1)' : 'rgba(39,130,228,.1)',
|
|
199
|
+
background: variant === 'danger' ? 'var(--dd, rgba(246,71,71,.1))' : variant === 'warning' ? 'var(--pd, rgba(249,158,44,.1))' : 'var(--infd, rgba(39,130,228,.1))',
|
|
200
200
|
}}>{icon}</div>
|
|
201
201
|
<div style={{ fontSize: '.9rem', fontWeight: 700, marginBottom: 8 }}>{title}</div>
|
|
202
202
|
{message && <div style={{ fontSize: '.8rem', color: 'var(--muted)', lineHeight: 1.5 }}>{message}</div>}
|
|
@@ -128,11 +128,11 @@ export default function MultiSelect({ value = [], onChange, options = [], placeh
|
|
|
128
128
|
<div ref={btnRef} style={{ position: 'relative' }}>
|
|
129
129
|
<button type="button" onClick={toggleOpen} style={{
|
|
130
130
|
display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 6,
|
|
131
|
-
width: '100%', padding: '6px 10px', minHeight:
|
|
131
|
+
width: '100%', padding: '6px 10px', minHeight: 32,
|
|
132
132
|
border: `1px solid ${open ? 'var(--accent)' : 'var(--border)'}`,
|
|
133
133
|
borderRadius: 'var(--rads)',
|
|
134
134
|
background: 'var(--surface)',
|
|
135
|
-
boxShadow: open ? '
|
|
135
|
+
boxShadow: open ? 'var(--pd, rgba(249,158,44,.12))' : 'var(--shadow)',
|
|
136
136
|
cursor: 'pointer', fontSize: '.8rem', fontFamily: 'var(--sans)',
|
|
137
137
|
transition: 'border-color .15s, box-shadow .15s',
|
|
138
138
|
}}
|
|
@@ -63,7 +63,7 @@ export function SearchableDropdown({ value, onChange, options = [], placeholder
|
|
|
63
63
|
border: `1px solid ${open ? 'var(--accent)' : 'var(--border)'}`, borderRadius: 'var(--rads)',
|
|
64
64
|
background: 'var(--surface)', color: selected ? 'var(--primary-text)' : 'var(--muted)',
|
|
65
65
|
cursor: 'pointer', fontSize: '.8rem', fontFamily: 'var(--sans)',
|
|
66
|
-
transition: 'border-color .15s', boxShadow: open ? '
|
|
66
|
+
transition: 'border-color .15s', boxShadow: open ? 'var(--pd, rgba(249,158,44,.12))' : 'var(--shadow)',
|
|
67
67
|
}}
|
|
68
68
|
onMouseEnter={e => { if (!open) e.currentTarget.style.borderColor = 'var(--accent)'; }}
|
|
69
69
|
onMouseLeave={e => { if (!open) e.currentTarget.style.borderColor = 'var(--border)'; }}>
|
package/components/Select.jsx
CHANGED
|
@@ -128,7 +128,7 @@ export default function Select({
|
|
|
128
128
|
justifyContent: 'space-between',
|
|
129
129
|
gap: 8,
|
|
130
130
|
padding: '8px 11px',
|
|
131
|
-
height:
|
|
131
|
+
height: 32,
|
|
132
132
|
background: 'var(--sf,var(--surface))',
|
|
133
133
|
border: `1.5px solid ${open ? 'var(--accent)' : 'var(--bd2,var(--border))'}`,
|
|
134
134
|
borderRadius: 'var(--rmd,var(--rads))',
|
|
@@ -139,7 +139,7 @@ export default function Select({
|
|
|
139
139
|
color: 'var(--t,var(--primary-text))',
|
|
140
140
|
outline: 'none',
|
|
141
141
|
transition: 'border-color var(--tr,.15s), box-shadow var(--tr,.15s)',
|
|
142
|
-
boxShadow: open ? '
|
|
142
|
+
boxShadow: open ? 'var(--infd, rgba(37,99,235,.1))' : 'var(--shadow,0 1px 3px rgba(20,22,41,.1))',
|
|
143
143
|
}}
|
|
144
144
|
>
|
|
145
145
|
<div style={{ flex: 1, minWidth: 0, display: 'flex', alignItems: 'center' }}>
|
|
@@ -219,7 +219,7 @@ export default function Select({
|
|
|
219
219
|
style={{
|
|
220
220
|
width: '100%',
|
|
221
221
|
padding: '7px 10px',
|
|
222
|
-
height:
|
|
222
|
+
height: 32,
|
|
223
223
|
background: 'var(--sf2,var(--grey-1))',
|
|
224
224
|
border: '1.5px solid var(--bd2,var(--border))',
|
|
225
225
|
borderRadius: 'var(--rmd,var(--rads))',
|
|
@@ -278,7 +278,7 @@ export default function Select({
|
|
|
278
278
|
left: 3.5,
|
|
279
279
|
width: 4.5,
|
|
280
280
|
height: 7,
|
|
281
|
-
border: 'solid
|
|
281
|
+
border: 'solid var(--def-btn-text,#fff)',
|
|
282
282
|
borderWidth: '0 1.5px 1.5px 0',
|
|
283
283
|
transform: 'rotate(45deg)',
|
|
284
284
|
}} />
|
package/components/Skeleton.jsx
CHANGED
|
@@ -70,7 +70,7 @@ export function SkeletonCard({ rows = 3, style = {} }) {
|
|
|
70
70
|
border: '1px solid var(--border-light, #ebebf0)',
|
|
71
71
|
borderRadius: 'var(--rad, 10px)',
|
|
72
72
|
padding: '14px 16px',
|
|
73
|
-
boxShadow: '0 1px 3px rgba(0,0,0,.04)',
|
|
73
|
+
boxShadow: 'var(--shadow, 0 1px 3px rgba(0,0,0,.04))',
|
|
74
74
|
...style,
|
|
75
75
|
}}>
|
|
76
76
|
<div style={{
|
|
@@ -5,8 +5,8 @@ export default function StatBarCard({ title, icon, items, style }) {
|
|
|
5
5
|
|
|
6
6
|
return (
|
|
7
7
|
<div style={{
|
|
8
|
-
background: '
|
|
9
|
-
boxShadow: '0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04)',
|
|
8
|
+
background: 'var(--surface,#fff)', border: '1px solid var(--border)', borderRadius: 'var(--rad)',
|
|
9
|
+
boxShadow: 'var(--shadow, 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04))',
|
|
10
10
|
padding: '12px 14px', minWidth: 220, ...style,
|
|
11
11
|
}}>
|
|
12
12
|
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', marginBottom: 10 }}>
|
package/components/StatsBar.jsx
CHANGED
|
@@ -39,7 +39,7 @@ const groupStyle = {
|
|
|
39
39
|
borderRadius: 7,
|
|
40
40
|
border: '1px solid var(--border)',
|
|
41
41
|
background: 'var(--surface)',
|
|
42
|
-
boxShadow: '0 1px 2px rgba(0,0,0,.05)',
|
|
42
|
+
boxShadow: 'var(--shadow, 0 1px 2px rgba(0,0,0,.05))',
|
|
43
43
|
};
|
|
44
44
|
|
|
45
45
|
export default function StatsBar({ total = 0, active = 0, blocked = 0, actions = 0, type }) {
|
|
@@ -57,8 +57,8 @@ export default function StatsBar({ total = 0, active = 0, blocked = 0, actions =
|
|
|
57
57
|
</div>
|
|
58
58
|
<div style={sep} />
|
|
59
59
|
<div style={itemStyle}>
|
|
60
|
-
<span style={iconWrap('#22c55e')}><Users size={10} /></span>
|
|
61
|
-
{dot('#22c55e')}
|
|
60
|
+
<span style={iconWrap('var(--s, #22c55e)')}><Users size={10} /></span>
|
|
61
|
+
{dot('var(--s, #22c55e)')}
|
|
62
62
|
<span>{active}</span>
|
|
63
63
|
</div>
|
|
64
64
|
</div>
|
|
@@ -66,20 +66,20 @@ export default function StatsBar({ total = 0, active = 0, blocked = 0, actions =
|
|
|
66
66
|
{/* Status group */}
|
|
67
67
|
<div style={groupStyle}>
|
|
68
68
|
<div style={itemStyle}>
|
|
69
|
-
<span style={iconWrap('#ef4444')}><ShieldAlert size={10} /></span>
|
|
70
|
-
{dot('#ef4444')}
|
|
69
|
+
<span style={iconWrap('var(--d, #ef4444)')}><ShieldAlert size={10} /></span>
|
|
70
|
+
{dot('var(--d, #ef4444)')}
|
|
71
71
|
<span>{blocked}</span>
|
|
72
72
|
</div>
|
|
73
73
|
<div style={sep} />
|
|
74
74
|
<div style={itemStyle}>
|
|
75
|
-
<span style={iconWrap('#f59e0b')}><Activity size={10} /></span>
|
|
76
|
-
{dot('#f59e0b')}
|
|
75
|
+
<span style={iconWrap('var(--w, #f59e0b)')}><Activity size={10} /></span>
|
|
76
|
+
{dot('var(--w, #f59e0b)')}
|
|
77
77
|
<span>{actions}</span>
|
|
78
78
|
</div>
|
|
79
79
|
<div style={sep} />
|
|
80
80
|
<div style={itemStyle}>
|
|
81
|
-
<span style={iconWrap('#94a3b8')}><WifiOff size={10} /></span>
|
|
82
|
-
{dot('#94a3b8')}
|
|
81
|
+
<span style={iconWrap('var(--t3, #94a3b8)')}><WifiOff size={10} /></span>
|
|
82
|
+
{dot('var(--t3, #94a3b8)')}
|
|
83
83
|
<span>{total - active}</span>
|
|
84
84
|
</div>
|
|
85
85
|
</div>
|
package/components/StatsCard.jsx
CHANGED
|
@@ -9,7 +9,7 @@ const BASE = {
|
|
|
9
9
|
borderRadius: 'var(--rad,10px)',
|
|
10
10
|
background: 'var(--surface,#fff)',
|
|
11
11
|
border: '1px solid var(--border)',
|
|
12
|
-
boxShadow: '0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04)',
|
|
12
|
+
boxShadow: 'var(--shadow, 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04))',
|
|
13
13
|
minWidth: 0,
|
|
14
14
|
transition: 'border-color .15s',
|
|
15
15
|
};
|
|
@@ -26,14 +26,14 @@ export default function StatsCard({
|
|
|
26
26
|
variant = 'default',
|
|
27
27
|
icon,
|
|
28
28
|
iconColor = 'var(--blue)',
|
|
29
|
-
iconBg = 'rgba(39,130,228,.1)',
|
|
29
|
+
iconBg = 'var(--infd, rgba(39,130,228,.1))',
|
|
30
30
|
title,
|
|
31
31
|
value,
|
|
32
32
|
subtitle,
|
|
33
33
|
percent,
|
|
34
34
|
percentColor,
|
|
35
35
|
progressSize = 'sm',
|
|
36
|
-
progressTrackColor = '#e8e8ec',
|
|
36
|
+
progressTrackColor = 'var(--bd2, #e8e8ec)',
|
|
37
37
|
headRight,
|
|
38
38
|
className = '',
|
|
39
39
|
style = {},
|
package/components/TabBar.jsx
CHANGED
|
@@ -69,11 +69,12 @@ export default function TabBar({ tabs, active, onChange, capitalize = false, pad
|
|
|
69
69
|
onClick={() => onChange(t.id)}
|
|
70
70
|
style={{
|
|
71
71
|
display: 'flex', alignItems: 'center', gap: 5,
|
|
72
|
-
|
|
72
|
+
height: 24,
|
|
73
|
+
padding: padding || '0 12px',
|
|
73
74
|
border: 'none',
|
|
74
75
|
borderRadius: 'var(--radxs, 6px)',
|
|
75
|
-
background: isActive ? '
|
|
76
|
-
boxShadow: isActive ? '0 1px 2px rgba(0,0,0,.06)' : 'none',
|
|
76
|
+
background: isActive ? 'var(--surface,#fff)' : 'transparent',
|
|
77
|
+
boxShadow: isActive ? 'var(--shadow, 0 1px 2px rgba(0,0,0,.06))' : 'none',
|
|
77
78
|
fontSize: '.75rem', fontWeight: isActive ? 600 : 500,
|
|
78
79
|
color: isActive ? 'var(--primary-text, #0f111c)' : 'var(--muted, #9b9daa)',
|
|
79
80
|
cursor: 'pointer',
|
package/components/Tabs.jsx
CHANGED
|
@@ -11,8 +11,8 @@ export function Tabs({ tabs, value, onChange, style }) {
|
|
|
11
11
|
padding: '5px 12px',
|
|
12
12
|
border: 'none',
|
|
13
13
|
borderRadius: 'var(--radxs, 6px)',
|
|
14
|
-
background: active ? '
|
|
15
|
-
boxShadow: active ? '0 1px 2px rgba(0,0,0,.06)' : 'none',
|
|
14
|
+
background: active ? 'var(--surface,#fff)' : 'transparent',
|
|
15
|
+
boxShadow: active ? 'var(--shadow, 0 1px 2px rgba(0,0,0,.06))' : 'none',
|
|
16
16
|
fontSize: '.75rem', fontWeight: active ? 600 : 500,
|
|
17
17
|
color: active ? 'var(--primary-text, #0f111c)' : 'var(--muted, #9b9daa)',
|
|
18
18
|
cursor: 'pointer',
|
package/components/Toggle.jsx
CHANGED
|
@@ -5,13 +5,13 @@ const SIZES = {
|
|
|
5
5
|
};
|
|
6
6
|
|
|
7
7
|
const COLORS = {
|
|
8
|
-
primary: '#f99e2c',
|
|
9
|
-
success: '#27ae60',
|
|
10
|
-
warning: '#f59e0b',
|
|
11
|
-
danger: '#f64747',
|
|
8
|
+
primary: 'var(--accent, #f99e2c)',
|
|
9
|
+
success: 'var(--s, #27ae60)',
|
|
10
|
+
warning: 'var(--w, #f59e0b)',
|
|
11
|
+
danger: 'var(--d, #f64747)',
|
|
12
12
|
};
|
|
13
13
|
|
|
14
|
-
const OFF_COLOR = '#d7d8e0';
|
|
14
|
+
const OFF_COLOR = 'var(--bd, #d7d8e0)';
|
|
15
15
|
|
|
16
16
|
export default function Toggle({
|
|
17
17
|
checked = false,
|
|
@@ -46,7 +46,7 @@ export default function Toggle({
|
|
|
46
46
|
position:'relative', width: s.w, height: s.h, borderRadius: s.r,
|
|
47
47
|
background: trackBg, flexShrink: 0,
|
|
48
48
|
transition: 'background .25s ease',
|
|
49
|
-
boxShadow: '0 1px 3px rgba(20,22,41,.1)',
|
|
49
|
+
boxShadow: 'var(--shadow, 0 1px 3px rgba(20,22,41,.1))',
|
|
50
50
|
}}>
|
|
51
51
|
<span style={{
|
|
52
52
|
position:'absolute', top:'50%',
|
|
@@ -55,8 +55,8 @@ export default function Toggle({
|
|
|
55
55
|
: 'translateY(-50%) scale(1)',
|
|
56
56
|
left: checked ? s.on : s.off,
|
|
57
57
|
width: s.dot, height: s.dot,
|
|
58
|
-
background: '
|
|
59
|
-
boxShadow: '0 1px 3px rgba(0,0,0,.25)',
|
|
58
|
+
background: 'var(--surface,#fff)', borderRadius: '50%',
|
|
59
|
+
boxShadow: 'var(--shadow, 0 1px 3px rgba(0,0,0,.25))',
|
|
60
60
|
transition: 'left .3s cubic-bezier(.34,1.56,.64,1), transform .2s ease',
|
|
61
61
|
willChange: 'left',
|
|
62
62
|
}} />
|
package/components/UptimeBar.jsx
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { useMemo, useState, useRef } from 'react';
|
|
2
2
|
|
|
3
3
|
const card = {
|
|
4
|
-
background: '
|
|
4
|
+
background: 'var(--surface,#fff)',
|
|
5
5
|
border: '1px solid var(--border)',
|
|
6
6
|
borderRadius: 'var(--rad)',
|
|
7
|
-
boxShadow: '0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04)',
|
|
7
|
+
boxShadow: 'var(--shadow, 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04))',
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
const MONTHS = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];
|
|
@@ -144,10 +144,10 @@ export default function UptimeBar({
|
|
|
144
144
|
left: tooltipPos.x,
|
|
145
145
|
top: tooltipPos.y,
|
|
146
146
|
transform: 'translate(-50%, -100%)',
|
|
147
|
-
background: '
|
|
147
|
+
background: 'var(--surface,#fff)',
|
|
148
148
|
border: '1px solid var(--border)',
|
|
149
149
|
borderRadius: 'var(--rads)',
|
|
150
|
-
boxShadow: '0 4px 12px rgba(0,0,0,.12)',
|
|
150
|
+
boxShadow: 'var(--smd, 0 4px 12px rgba(0,0,0,.12))',
|
|
151
151
|
padding: '8px 12px',
|
|
152
152
|
pointerEvents: 'none',
|
|
153
153
|
zIndex: 100,
|