zark-design 1.0.0 → 2.0.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/bin/cli.js +7 -6
- package/package.json +2 -2
- package/templates/README.md +264 -0
- package/templates/html/components.css +740 -0
- package/templates/html/index.html +135 -0
- package/templates/html/showcase.html +3550 -0
- package/templates/{tokens.css → html/tokens.css} +89 -112
- package/templates/jsx/App.example.jsx +229 -0
- package/templates/jsx/components/AlertCritical.jsx +43 -0
- package/templates/jsx/components/Avatar.jsx +41 -0
- package/templates/jsx/components/Badge.jsx +12 -0
- package/templates/jsx/components/Banner.jsx +42 -0
- package/templates/jsx/components/Button.jsx +43 -0
- package/templates/jsx/components/Chip.jsx +28 -0
- package/templates/jsx/components/CodeBlock.jsx +42 -0
- package/templates/jsx/components/EmptyState.jsx +27 -0
- package/templates/jsx/components/Funnel.jsx +55 -0
- package/templates/jsx/components/Input.jsx +53 -0
- package/templates/jsx/components/KanbanColumn.jsx +51 -0
- package/templates/jsx/components/Kbd.jsx +11 -0
- package/templates/jsx/components/LeadCard.jsx +79 -0
- package/templates/jsx/components/Modal.jsx +57 -0
- package/templates/jsx/components/Panel.jsx +25 -0
- package/templates/jsx/components/Section.jsx +28 -0
- package/templates/jsx/components/Segmented.jsx +26 -0
- package/templates/jsx/components/Sidebar.jsx +49 -0
- package/templates/jsx/components/Spec.jsx +19 -0
- package/templates/jsx/components/StatCard.jsx +44 -0
- package/templates/jsx/components/TableActions.jsx +34 -0
- package/templates/jsx/components/Tag.jsx +21 -0
- package/templates/jsx/components/TagDot.jsx +26 -0
- package/templates/jsx/components/Toast.jsx +25 -0
- package/templates/jsx/components/Toggle.jsx +29 -0
- package/templates/jsx/components.css +740 -0
- package/templates/{icons.jsx → jsx/icons.jsx} +20 -9
- package/templates/jsx/index.js +31 -0
- package/templates/jsx/tokens.css +283 -0
- package/templates/jsx/tokens.js +62 -0
- package/templates/REFERENCE.md +0 -376
- package/templates/SHOWCASE.html +0 -254
- package/templates/brand.jsx +0 -89
- package/templates/components.jsx +0 -385
- package/templates/design-canvas.jsx +0 -789
- package/templates/foundations.jsx +0 -363
- package/templates/layouts.jsx +0 -232
- package/templates/patterns.jsx +0 -268
- package/templates/primitives.jsx +0 -306
- package/templates/visual-references/pasted-1777605750385-0.png +0 -0
- package/templates/visual-references/pasted-1777605766298-0.png +0 -0
- package/templates/visual-references/pasted-1777605775820-0.png +0 -0
- package/templates/visual-references/pasted-1777605789833-0.png +0 -0
- package/templates/visual-references/pasted-1777605802420-0.png +0 -0
- package/templates/visual-references/pasted-1777605812470-0.png +0 -0
- package/templates/visual-references/pasted-1777605817688-0.png +0 -0
- package/templates/visual-references/pasted-1777605828485-0.png +0 -0
- package/templates/visual-references/pasted-1777605837137-0.png +0 -0
- package/templates/visual-references/pasted-1777605849789-0.png +0 -0
- package/templates/visual-references/pasted-1777605864942-0.png +0 -0
- package/templates/visual-references/pasted-1777605877920-0.png +0 -0
- package/templates/visual-references/pasted-1777605897353-0.png +0 -0
- /package/templates/{assets/zark-logo.png → html/assets/logo-zark-laranja.png} +0 -0
- /package/templates/{assets → html/assets}/zark-icon.png +0 -0
- /package/templates/{visual-references/logo-zark-principal.png → jsx/assets/logo-zark-laranja.png} +0 -0
- /package/templates/{visual-references/icon-zark.png → jsx/assets/zark-icon.png} +0 -0
package/templates/patterns.jsx
DELETED
|
@@ -1,268 +0,0 @@
|
|
|
1
|
-
// Zark — Patterns: modal, onboarding, code-block, data table, date picker, banner
|
|
2
|
-
|
|
3
|
-
const ModalShowcase = () => (
|
|
4
|
-
<Panel title="Modal — onboarding step" padded={false}>
|
|
5
|
-
<div style={{
|
|
6
|
-
padding: 32, background: `
|
|
7
|
-
radial-gradient(ellipse at top, var(--paper) 0%, var(--canvas) 80%)
|
|
8
|
-
`, position:'relative', minHeight: 380,
|
|
9
|
-
}}>
|
|
10
|
-
<div style={{
|
|
11
|
-
position:'absolute', inset:0,
|
|
12
|
-
background:'rgba(20, 17, 12, 0.04)',
|
|
13
|
-
backdropFilter:'blur(2px)',
|
|
14
|
-
}}/>
|
|
15
|
-
<div style={{
|
|
16
|
-
position:'relative', maxWidth: 460, margin:'24px auto',
|
|
17
|
-
background:'var(--surface)',
|
|
18
|
-
border:'1px solid var(--line-200)',
|
|
19
|
-
borderRadius:'var(--r-2xl)',
|
|
20
|
-
boxShadow:'var(--shadow-modal)',
|
|
21
|
-
overflow:'hidden',
|
|
22
|
-
}}>
|
|
23
|
-
<div style={{ padding:'24px 24px 0' }}>
|
|
24
|
-
<div style={{ display:'flex', justifyContent:'space-between', alignItems:'flex-start', marginBottom: 6 }}>
|
|
25
|
-
<h3 style={{ margin: 0, fontSize: 20, fontWeight: 600, fontFamily:'var(--font-display)', letterSpacing:'-0.012em', color:'var(--ink-700)' }}>Let's get you started</h3>
|
|
26
|
-
<Tag tone="default" size="xs" square>Optional</Tag>
|
|
27
|
-
</div>
|
|
28
|
-
<p style={{ margin:'0 0 16px', fontSize: 12, color:'var(--ink-400)' }}>Complete these quick actions to earn bonus credits for your account.</p>
|
|
29
|
-
<div style={{ display:'flex', alignItems:'center', justifyContent:'space-between', marginBottom: 8 }}>
|
|
30
|
-
<div style={{ display:'flex', gap: 4 }}>
|
|
31
|
-
<span style={{ width: 28, height: 4, borderRadius: 2, background:'var(--ember-500)' }}/>
|
|
32
|
-
<span style={{ width: 12, height: 4, borderRadius: 2, background:'var(--ink-100)' }}/>
|
|
33
|
-
<span style={{ width: 12, height: 4, borderRadius: 2, background:'var(--ink-100)' }}/>
|
|
34
|
-
<span style={{ width: 12, height: 4, borderRadius: 2, background:'var(--ink-100)' }}/>
|
|
35
|
-
</div>
|
|
36
|
-
<Tag tone="default" size="xs" square>Step 1 of 4</Tag>
|
|
37
|
-
</div>
|
|
38
|
-
</div>
|
|
39
|
-
<div style={{ padding: 4 }}>
|
|
40
|
-
{[
|
|
41
|
-
{t:'Email Verified', d:'Your email has been verified', claimed: true, c: ''},
|
|
42
|
-
{t:'Star our GitHub repo', d:'Check out our open source code and contribute', c:'+100 credits'},
|
|
43
|
-
{t:'Join our Discord', d:'Connect with us and get community help', c:'+50 credits'},
|
|
44
|
-
{t:'Follow us on X', d:'Stay updated on new features and launches', c:'+50 credits'},
|
|
45
|
-
].map(item => (
|
|
46
|
-
<div key={item.t} style={{ padding:'12px 20px', borderRadius:'var(--r-md)', display:'flex', alignItems:'center', justifyContent:'space-between' }}>
|
|
47
|
-
<div>
|
|
48
|
-
<div style={{ fontSize: 13, fontWeight: 500, color: item.claimed ? 'var(--success-700)' : 'var(--ember-700)' }}>{item.t}</div>
|
|
49
|
-
<div style={{ fontSize: 11, color:'var(--ink-400)', marginTop: 2 }}>{item.d}</div>
|
|
50
|
-
</div>
|
|
51
|
-
{item.claimed ? <Tag tone="success" size="xs">Claimed</Tag> : <span style={{ fontSize: 12, color:'var(--ink-500)', fontFamily:'var(--font-mono)' }}>{item.c}</span>}
|
|
52
|
-
</div>
|
|
53
|
-
))}
|
|
54
|
-
</div>
|
|
55
|
-
<div style={{ padding:'16px 20px', borderTop:'1px solid var(--line-100)', display:'flex', justifyContent:'flex-end' }}>
|
|
56
|
-
<Button variant="secondary">Continue</Button>
|
|
57
|
-
</div>
|
|
58
|
-
</div>
|
|
59
|
-
</div>
|
|
60
|
-
</Panel>
|
|
61
|
-
);
|
|
62
|
-
|
|
63
|
-
const CodeBlock = () => (
|
|
64
|
-
<Panel title="Code block — MCP integration">
|
|
65
|
-
<div style={{
|
|
66
|
-
background:'var(--surface)',
|
|
67
|
-
border:'1px solid var(--line-200)',
|
|
68
|
-
borderRadius:'var(--r-lg)',
|
|
69
|
-
padding: 16,
|
|
70
|
-
fontFamily:'var(--font-mono)', fontSize: 12, lineHeight: 1.7,
|
|
71
|
-
color:'var(--ink-600)', position:'relative',
|
|
72
|
-
}}>
|
|
73
|
-
<div style={{ position:'absolute', top: 10, right: 10, display:'flex', gap: 4 }}>
|
|
74
|
-
<Button variant="ghost" size="xs" icon={<Icons.Eye size={12}/>}/>
|
|
75
|
-
<Button variant="ghost" size="xs" icon={<Icons.Copy size={12}/>}/>
|
|
76
|
-
</div>
|
|
77
|
-
<div>{'{'}</div>
|
|
78
|
-
<div style={{ paddingLeft: 16 }}><span style={{ color:'var(--code-fg)' }}>"mcpServers"</span>: {'{'}</div>
|
|
79
|
-
<div style={{ paddingLeft: 32 }}><span style={{ color:'var(--code-fg)' }}>"zark-mcp"</span>: {'{'}</div>
|
|
80
|
-
<div style={{ paddingLeft: 48 }}><span style={{ color:'var(--code-fg)' }}>"command"</span>: <span style={{ color:'var(--success-700)' }}>"npx"</span>,</div>
|
|
81
|
-
<div style={{ paddingLeft: 48 }}><span style={{ color:'var(--code-fg)' }}>"args"</span>: [<span style={{ color:'var(--success-700)' }}>"-y"</span>, <span style={{ color:'var(--success-700)' }}>"zark-mcp"</span>],</div>
|
|
82
|
-
<div style={{ paddingLeft: 48 }}><span style={{ color:'var(--code-fg)' }}>"env"</span>: {'{'}</div>
|
|
83
|
-
<div style={{ paddingLeft: 64 }}><span style={{ color:'var(--code-fg)' }}>"ZARK_API_KEY"</span>: <span style={{ color:'var(--success-700)' }}>"$API_KEY"</span></div>
|
|
84
|
-
<div style={{ paddingLeft: 48 }}>{'}'}</div>
|
|
85
|
-
<div style={{ paddingLeft: 32 }}>{'}'}</div>
|
|
86
|
-
<div style={{ paddingLeft: 16 }}>{'}'}</div>
|
|
87
|
-
<div>{'}'}</div>
|
|
88
|
-
</div>
|
|
89
|
-
</Panel>
|
|
90
|
-
);
|
|
91
|
-
|
|
92
|
-
const DataTableShowcase = () => (
|
|
93
|
-
<Panel title="Data table" padded={false}>
|
|
94
|
-
<div style={{
|
|
95
|
-
padding:'14px 18px',
|
|
96
|
-
borderBottom:'1px solid var(--line-100)',
|
|
97
|
-
display:'flex', alignItems:'center', justifyContent:'space-between',
|
|
98
|
-
}}>
|
|
99
|
-
<div style={{ display:'flex', gap: 8, alignItems:'center' }}>
|
|
100
|
-
<div style={{ width: 240 }}><Input size="sm" icon={<Icons.Search size={12}/>} placeholder="Search..."/></div>
|
|
101
|
-
<Button variant="secondary" size="sm" icon={<Icons.Filter size={12}/>}>/scrape</Button>
|
|
102
|
-
</div>
|
|
103
|
-
<Button variant="secondary" size="sm" icon={<Icons.Calendar size={12}/>} iconRight={<Icons.ChevDown size={12}/>}>Custom range</Button>
|
|
104
|
-
</div>
|
|
105
|
-
<div>
|
|
106
|
-
<div style={{
|
|
107
|
-
display:'grid', gridTemplateColumns:'120px 1fr 100px 60px 140px 40px',
|
|
108
|
-
padding:'10px 18px',
|
|
109
|
-
fontFamily:'var(--font-mono)', fontSize: 10,
|
|
110
|
-
letterSpacing:'var(--ls-wider)', textTransform:'uppercase',
|
|
111
|
-
color:'var(--ink-300)',
|
|
112
|
-
borderBottom:'1px solid var(--line-100)',
|
|
113
|
-
}}>
|
|
114
|
-
<span>Endpoint</span><span>URL</span><span>Status</span><span>Cr</span><span>Date</span><span></span>
|
|
115
|
-
</div>
|
|
116
|
-
{[
|
|
117
|
-
['/SCRAPE','https://www.zark.dev/careers','Completed','1','Sep 08, 25 09:57 AM'],
|
|
118
|
-
['/SCRAPE','https://www.zark.dev/playground/extract','Completed','2','Sep 08, 25 09:57 AM'],
|
|
119
|
-
['/SCRAPE','https://www.zark.dev/extract','Failed','0','Sep 08, 25 09:55 AM'],
|
|
120
|
-
['/SCRAPE','https://www.zark.dev/templates','Completed','1','Sep 08, 25 09:54 AM'],
|
|
121
|
-
['/SCRAPE','https://www.zark.dev/signin/signup','Pending','—','Sep 08, 25 09:50 AM'],
|
|
122
|
-
].map((row, i) => (
|
|
123
|
-
<div key={i} style={{
|
|
124
|
-
display:'grid', gridTemplateColumns:'120px 1fr 100px 60px 140px 40px',
|
|
125
|
-
padding:'14px 18px', alignItems:'center',
|
|
126
|
-
borderBottom: i < 4 ? '1px solid var(--line-100)' : 'none',
|
|
127
|
-
fontSize: 12,
|
|
128
|
-
}}>
|
|
129
|
-
<Tag tone="mono" size="xs" square>{row[0]}</Tag>
|
|
130
|
-
<span style={{ color:'var(--ink-600)', fontFamily:'var(--font-mono)', overflow:'hidden', textOverflow:'ellipsis', whiteSpace:'nowrap' }}>{row[1]}</span>
|
|
131
|
-
<Tag tone={row[2]==='Completed'?'success': row[2]==='Failed'?'danger':'warning'} size="xs">{row[2]}</Tag>
|
|
132
|
-
<span style={{ color:'var(--ink-500)', fontFamily:'var(--font-mono)' }}>{row[3]}</span>
|
|
133
|
-
<span style={{ color:'var(--ink-400)', fontFamily:'var(--font-mono)', fontSize: 11 }}>{row[4]}</span>
|
|
134
|
-
<Icons.Download size={14} style={{ color:'var(--ink-300)', cursor:'pointer' }}/>
|
|
135
|
-
</div>
|
|
136
|
-
))}
|
|
137
|
-
</div>
|
|
138
|
-
</Panel>
|
|
139
|
-
);
|
|
140
|
-
|
|
141
|
-
const DatePickerShowcase = () => {
|
|
142
|
-
const month = (label, sel = []) => (
|
|
143
|
-
<div>
|
|
144
|
-
<div style={{ fontSize: 13, fontWeight: 600, color:'var(--ink-700)', textAlign:'center', marginBottom: 8 }}>{label}</div>
|
|
145
|
-
<div style={{ display:'grid', gridTemplateColumns:'repeat(7, 1fr)', gap: 2, fontFamily:'var(--font-mono)', fontSize: 10, color:'var(--ink-300)' }}>
|
|
146
|
-
{['Mo','Tu','We','Th','Fr','Sa','Su'].map(d=><div key={d} style={{ textAlign:'center', padding:'4px 0' }}>{d}</div>)}
|
|
147
|
-
</div>
|
|
148
|
-
<div style={{ display:'grid', gridTemplateColumns:'repeat(7, 1fr)', gap: 2, fontSize: 11 }}>
|
|
149
|
-
{Array.from({length: 30}, (_, i) => i + 1).map(d => {
|
|
150
|
-
const isSel = sel.includes(d);
|
|
151
|
-
return (
|
|
152
|
-
<div key={d} style={{
|
|
153
|
-
aspectRatio:'1/1', display:'flex', alignItems:'center', justifyContent:'center',
|
|
154
|
-
borderRadius:'var(--r-sm)',
|
|
155
|
-
background: isSel ? 'var(--ember-500)' : 'transparent',
|
|
156
|
-
color: isSel ? '#fff' : 'var(--ink-600)',
|
|
157
|
-
fontWeight: isSel ? 600 : 400,
|
|
158
|
-
cursor:'pointer',
|
|
159
|
-
}}>{d}</div>
|
|
160
|
-
);
|
|
161
|
-
})}
|
|
162
|
-
</div>
|
|
163
|
-
</div>
|
|
164
|
-
);
|
|
165
|
-
return (
|
|
166
|
-
<Panel title="Date range picker">
|
|
167
|
-
<div style={{
|
|
168
|
-
background:'var(--surface)', border:'1px solid var(--line-200)',
|
|
169
|
-
borderRadius:'var(--r-xl)', boxShadow:'var(--shadow-lg)',
|
|
170
|
-
maxWidth: 560, padding: 16,
|
|
171
|
-
}}>
|
|
172
|
-
<div style={{ display:'flex', alignItems:'center', justifyContent:'space-between', marginBottom: 12 }}>
|
|
173
|
-
<div style={{ fontSize: 13, fontWeight: 600, color:'var(--ink-600)' }}>Date Range</div>
|
|
174
|
-
<Icons.Close size={14} style={{ color:'var(--ink-400)', cursor:'pointer' }}/>
|
|
175
|
-
</div>
|
|
176
|
-
<div style={{ display:'flex', justifyContent:'space-between', marginBottom: 8, padding:'0 8px' }}>
|
|
177
|
-
<Icons.ChevLeft size={14} style={{ color:'var(--ink-400)', cursor:'pointer' }}/>
|
|
178
|
-
<Icons.ChevRight size={14} style={{ color:'var(--ink-400)', cursor:'pointer' }}/>
|
|
179
|
-
</div>
|
|
180
|
-
<div style={{ display:'grid', gridTemplateColumns:'1fr 1fr', gap: 24 }}>
|
|
181
|
-
{month('September 2025', [1, 8])}
|
|
182
|
-
{month('October 2025')}
|
|
183
|
-
</div>
|
|
184
|
-
<div style={{ display:'flex', justifyContent:'flex-end', gap: 8, marginTop: 16 }}>
|
|
185
|
-
<Button variant="secondary" size="sm">Cancel</Button>
|
|
186
|
-
<Button variant="primary" size="sm">Apply</Button>
|
|
187
|
-
</div>
|
|
188
|
-
</div>
|
|
189
|
-
</Panel>
|
|
190
|
-
);
|
|
191
|
-
};
|
|
192
|
-
|
|
193
|
-
const BannerShowcase = () => (
|
|
194
|
-
<Panel title="Banners & toasts">
|
|
195
|
-
<ComponentRow label="Top announcement bar">
|
|
196
|
-
<div style={{
|
|
197
|
-
width:'100%',
|
|
198
|
-
background:'var(--paper)',
|
|
199
|
-
border:'1px solid var(--line-200)',
|
|
200
|
-
borderRadius:'var(--r-md)',
|
|
201
|
-
padding:'10px 16px',
|
|
202
|
-
textAlign:'center',
|
|
203
|
-
fontSize: 13, color:'var(--ink-600)',
|
|
204
|
-
}}>
|
|
205
|
-
We just raised our Series A and shipped Zark v2 🎉 <a style={{ color:'var(--ember-700)', textDecoration:'underline' }}>Read the blog.</a>
|
|
206
|
-
</div>
|
|
207
|
-
</ComponentRow>
|
|
208
|
-
<ComponentRow label="In-page tip card">
|
|
209
|
-
<div style={{
|
|
210
|
-
display:'flex', gap: 12, padding: 14,
|
|
211
|
-
background:'var(--surface)',
|
|
212
|
-
border:'1px solid var(--line-200)',
|
|
213
|
-
borderRadius:'var(--r-lg)',
|
|
214
|
-
maxWidth: 320,
|
|
215
|
-
boxShadow:'var(--shadow-md)',
|
|
216
|
-
}}>
|
|
217
|
-
<Icons.Sparkles size={16} style={{ color:'var(--ember-500)', marginTop: 2 }}/>
|
|
218
|
-
<div style={{ flex: 1 }}>
|
|
219
|
-
<div style={{ fontSize: 12, fontFamily:'var(--font-mono)', letterSpacing:'var(--ls-wider)', color:'var(--ink-300)', textTransform:'uppercase', marginBottom: 4 }}>What's New</div>
|
|
220
|
-
<div style={{ fontSize: 13, fontWeight: 600, color:'var(--ink-700)', marginBottom: 4 }}>Introducing Zark v2</div>
|
|
221
|
-
<div style={{ fontSize: 12, color:'var(--ink-400)', lineHeight: 1.45 }}>10x faster scraping, news and image search, smart crawling and more.</div>
|
|
222
|
-
</div>
|
|
223
|
-
<Icons.Close size={12} style={{ color:'var(--ink-300)', cursor:'pointer' }}/>
|
|
224
|
-
</div>
|
|
225
|
-
</ComponentRow>
|
|
226
|
-
<ComponentRow label="Toast / pill">
|
|
227
|
-
<div style={{
|
|
228
|
-
display:'inline-flex', alignItems:'center', gap: 8,
|
|
229
|
-
padding:'8px 14px',
|
|
230
|
-
background:'var(--ink-700)',
|
|
231
|
-
color:'#fff',
|
|
232
|
-
borderRadius:'var(--r-pill)',
|
|
233
|
-
fontSize: 12, boxShadow:'var(--shadow-lg)',
|
|
234
|
-
}}>
|
|
235
|
-
Welcome to Zark! <Icons.Flame size={14} style={{ color:'var(--ember-400)' }}/>
|
|
236
|
-
</div>
|
|
237
|
-
<div style={{
|
|
238
|
-
display:'inline-flex', alignItems:'center', gap: 8,
|
|
239
|
-
padding:'8px 14px',
|
|
240
|
-
background:'var(--success-500)', color:'#fff',
|
|
241
|
-
borderRadius:'var(--r-pill)', fontSize: 12,
|
|
242
|
-
}}>
|
|
243
|
-
<Icons.Check size={14}/> Copied as Markdown
|
|
244
|
-
</div>
|
|
245
|
-
</ComponentRow>
|
|
246
|
-
</Panel>
|
|
247
|
-
);
|
|
248
|
-
|
|
249
|
-
const PatternsSection = () => (
|
|
250
|
-
<Section
|
|
251
|
-
id="patterns"
|
|
252
|
-
eyebrow="06 — Patterns"
|
|
253
|
-
title="Composed patterns, not isolated parts"
|
|
254
|
-
description="These templates encode opinion: the URL pill always sits inside an ascii field, code blocks always include eye+copy affordances, modals always announce a step counter, tables lead with a mono endpoint tag. Reach for these before improvising."
|
|
255
|
-
>
|
|
256
|
-
<div style={{ display:'grid', gridTemplateColumns:'1fr 1fr', gap: 24 }}>
|
|
257
|
-
<ModalShowcase/>
|
|
258
|
-
<CodeBlock/>
|
|
259
|
-
</div>
|
|
260
|
-
<DataTableShowcase/>
|
|
261
|
-
<div style={{ display:'grid', gridTemplateColumns:'1fr 1fr', gap: 24 }}>
|
|
262
|
-
<DatePickerShowcase/>
|
|
263
|
-
<BannerShowcase/>
|
|
264
|
-
</div>
|
|
265
|
-
</Section>
|
|
266
|
-
);
|
|
267
|
-
|
|
268
|
-
window.PatternsSection = PatternsSection;
|
package/templates/primitives.jsx
DELETED
|
@@ -1,306 +0,0 @@
|
|
|
1
|
-
// Zark — Primitives: Button, Input, Toggle, Tag, Badge, Tabs, Card, etc.
|
|
2
|
-
|
|
3
|
-
const Section = ({ id, eyebrow, title, description, children, columns }) => (
|
|
4
|
-
<section id={id} style={{
|
|
5
|
-
borderTop:'1px solid var(--line-200)',
|
|
6
|
-
padding:'72px 64px 80px',
|
|
7
|
-
}}>
|
|
8
|
-
<div style={{ maxWidth:1200, margin:'0 auto' }}>
|
|
9
|
-
<header style={{
|
|
10
|
-
display:'grid',
|
|
11
|
-
gridTemplateColumns:'minmax(220px, 280px) 1fr',
|
|
12
|
-
gap: 64,
|
|
13
|
-
marginBottom: 48,
|
|
14
|
-
alignItems:'start',
|
|
15
|
-
}}>
|
|
16
|
-
<div>
|
|
17
|
-
<div style={{
|
|
18
|
-
fontFamily:'var(--font-mono)', fontSize: 11,
|
|
19
|
-
letterSpacing:'var(--ls-widest)', textTransform:'uppercase',
|
|
20
|
-
color:'var(--ember-600)', marginBottom: 12,
|
|
21
|
-
}}>{eyebrow}</div>
|
|
22
|
-
<h2 style={{
|
|
23
|
-
fontFamily:'var(--font-display)',
|
|
24
|
-
fontSize: 'var(--fs-3xl)', lineHeight:'var(--lh-tight)',
|
|
25
|
-
letterSpacing:'var(--ls-tight)', margin: 0,
|
|
26
|
-
color:'var(--ink-700)',
|
|
27
|
-
}}>{title}</h2>
|
|
28
|
-
</div>
|
|
29
|
-
<p style={{
|
|
30
|
-
margin:0, color:'var(--ink-400)', fontSize:'var(--fs-lg)',
|
|
31
|
-
lineHeight: 1.55, maxWidth: 640,
|
|
32
|
-
}}>{description}</p>
|
|
33
|
-
</header>
|
|
34
|
-
<div style={{
|
|
35
|
-
display:'grid',
|
|
36
|
-
gridTemplateColumns: columns || '1fr',
|
|
37
|
-
gap: 24,
|
|
38
|
-
}}>
|
|
39
|
-
{children}
|
|
40
|
-
</div>
|
|
41
|
-
</div>
|
|
42
|
-
</section>
|
|
43
|
-
);
|
|
44
|
-
|
|
45
|
-
const Panel = ({ title, kicker, children, padded = true, style }) => (
|
|
46
|
-
<div style={{
|
|
47
|
-
background:'var(--surface)',
|
|
48
|
-
border:'1px solid var(--line-200)',
|
|
49
|
-
borderRadius:'var(--r-xl)',
|
|
50
|
-
overflow:'hidden',
|
|
51
|
-
...style,
|
|
52
|
-
}}>
|
|
53
|
-
{(title || kicker) && (
|
|
54
|
-
<div style={{
|
|
55
|
-
padding:'14px 18px',
|
|
56
|
-
borderBottom:'1px solid var(--line-100)',
|
|
57
|
-
display:'flex', alignItems:'center', justifyContent:'space-between',
|
|
58
|
-
background:'var(--paper)',
|
|
59
|
-
}}>
|
|
60
|
-
<div style={{ fontSize: 13, fontWeight: 600, color:'var(--ink-600)' }}>{title}</div>
|
|
61
|
-
{kicker && <div style={{
|
|
62
|
-
fontFamily:'var(--font-mono)', fontSize: 10,
|
|
63
|
-
letterSpacing:'var(--ls-wider)', textTransform:'uppercase',
|
|
64
|
-
color:'var(--ink-300)',
|
|
65
|
-
}}>{kicker}</div>}
|
|
66
|
-
</div>
|
|
67
|
-
)}
|
|
68
|
-
<div style={{ padding: padded ? 24 : 0 }}>{children}</div>
|
|
69
|
-
</div>
|
|
70
|
-
);
|
|
71
|
-
|
|
72
|
-
const Spec = ({ label, value, mono }) => (
|
|
73
|
-
<div style={{ display:'flex', justifyContent:'space-between', gap:16, padding:'8px 0', borderBottom:'1px dashed var(--line-200)', fontSize: 12 }}>
|
|
74
|
-
<span style={{ color:'var(--ink-400)' }}>{label}</span>
|
|
75
|
-
<span style={{ color:'var(--ink-600)', fontFamily: mono ? 'var(--font-mono)' : 'inherit' }}>{value}</span>
|
|
76
|
-
</div>
|
|
77
|
-
);
|
|
78
|
-
|
|
79
|
-
// ---------- BUTTON ----------
|
|
80
|
-
const buttonVariants = {
|
|
81
|
-
primary: {
|
|
82
|
-
bg:'var(--ember-600)', fg:'#fff', border:'transparent',
|
|
83
|
-
bgHover:'var(--ember-700)',
|
|
84
|
-
},
|
|
85
|
-
secondary: {
|
|
86
|
-
bg:'var(--surface)', fg:'var(--ink-700)', border:'var(--line-300)',
|
|
87
|
-
bgHover:'var(--paper)',
|
|
88
|
-
},
|
|
89
|
-
ghost: {
|
|
90
|
-
bg:'transparent', fg:'var(--ink-600)', border:'transparent',
|
|
91
|
-
bgHover:'var(--ink-50)',
|
|
92
|
-
},
|
|
93
|
-
soft: {
|
|
94
|
-
bg:'var(--ember-50)', fg:'var(--ember-700)', border:'transparent',
|
|
95
|
-
bgHover:'var(--ember-100)',
|
|
96
|
-
},
|
|
97
|
-
danger: {
|
|
98
|
-
bg:'var(--surface)', fg:'var(--danger-700)', border:'var(--line-300)',
|
|
99
|
-
bgHover:'var(--danger-50)',
|
|
100
|
-
},
|
|
101
|
-
};
|
|
102
|
-
const buttonSizes = {
|
|
103
|
-
xs: { h: 22, px: 8, fs: 11, gap: 4, r: 'var(--r-sm)' },
|
|
104
|
-
sm: { h: 28, px: 10, fs: 12, gap: 6, r: 'var(--r-md)' },
|
|
105
|
-
md: { h: 32, px: 12, fs: 13, gap: 6, r: 'var(--r-md)' },
|
|
106
|
-
lg: { h: 40, px: 16, fs: 14, gap: 8, r: 'var(--r-lg)' },
|
|
107
|
-
};
|
|
108
|
-
const Button = ({ variant='secondary', size='md', icon, iconRight, children, full, ...rest }) => {
|
|
109
|
-
const v = buttonVariants[variant];
|
|
110
|
-
const s = buttonSizes[size];
|
|
111
|
-
const [hover, setHover] = React.useState(false);
|
|
112
|
-
return (
|
|
113
|
-
<button
|
|
114
|
-
onMouseEnter={()=>setHover(true)}
|
|
115
|
-
onMouseLeave={()=>setHover(false)}
|
|
116
|
-
style={{
|
|
117
|
-
display:'inline-flex', alignItems:'center', justifyContent:'center',
|
|
118
|
-
gap: s.gap,
|
|
119
|
-
height: s.h,
|
|
120
|
-
padding: `0 ${s.px}px`,
|
|
121
|
-
fontSize: s.fs, fontWeight: 500,
|
|
122
|
-
fontFamily:'var(--font-sans)',
|
|
123
|
-
color: v.fg,
|
|
124
|
-
background: hover ? v.bgHover : v.bg,
|
|
125
|
-
border: `1px solid ${v.border === 'transparent' ? 'transparent' : v.border}`,
|
|
126
|
-
borderRadius: s.r,
|
|
127
|
-
cursor:'pointer',
|
|
128
|
-
whiteSpace:'nowrap',
|
|
129
|
-
transition:'background var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out)',
|
|
130
|
-
boxShadow: variant==='primary' ? 'inset 0 1px 0 rgba(255,255,255,0.18), 0 1px 2px rgba(168, 53, 8, 0.18)' :
|
|
131
|
-
variant==='secondary' ? 'var(--shadow-xs)' : 'none',
|
|
132
|
-
width: full ? '100%' : 'auto',
|
|
133
|
-
}}
|
|
134
|
-
{...rest}
|
|
135
|
-
>
|
|
136
|
-
{icon}
|
|
137
|
-
{children}
|
|
138
|
-
{iconRight}
|
|
139
|
-
</button>
|
|
140
|
-
);
|
|
141
|
-
};
|
|
142
|
-
|
|
143
|
-
// ---------- INPUT ----------
|
|
144
|
-
const Input = ({ icon, suffix, value, onChange, placeholder, mono, size='md', invalid, ...rest }) => {
|
|
145
|
-
const sizes = { sm:{h:28,fs:12,px:8}, md:{h:36,fs:13,px:12}, lg:{h:44,fs:14,px:14} };
|
|
146
|
-
const s = sizes[size];
|
|
147
|
-
return (
|
|
148
|
-
<label style={{
|
|
149
|
-
display:'inline-flex', alignItems:'center', gap: 6,
|
|
150
|
-
height: s.h,
|
|
151
|
-
padding: `0 ${s.px}px`,
|
|
152
|
-
background:'var(--surface)',
|
|
153
|
-
border:`1px solid ${invalid ? 'var(--danger-500)' : 'var(--line-300)'}`,
|
|
154
|
-
borderRadius:'var(--r-lg)',
|
|
155
|
-
width:'100%',
|
|
156
|
-
transition:'box-shadow var(--t-fast), border-color var(--t-fast)',
|
|
157
|
-
}}
|
|
158
|
-
onFocus={e=>e.currentTarget.style.boxShadow='var(--ring-focus)'}
|
|
159
|
-
onBlur={e=>e.currentTarget.style.boxShadow='none'}
|
|
160
|
-
>
|
|
161
|
-
{icon && <span style={{ color:'var(--ink-300)', display:'inline-flex' }}>{icon}</span>}
|
|
162
|
-
<input
|
|
163
|
-
value={value} onChange={onChange} placeholder={placeholder}
|
|
164
|
-
style={{
|
|
165
|
-
flex:1, border:'none', outline:'none', background:'transparent',
|
|
166
|
-
fontSize: s.fs, color:'var(--ink-700)',
|
|
167
|
-
fontFamily: mono ? 'var(--font-mono)' : 'var(--font-sans)',
|
|
168
|
-
minWidth: 0,
|
|
169
|
-
}}
|
|
170
|
-
{...rest}
|
|
171
|
-
/>
|
|
172
|
-
{suffix && <span style={{ color:'var(--ink-300)' }}>{suffix}</span>}
|
|
173
|
-
</label>
|
|
174
|
-
);
|
|
175
|
-
};
|
|
176
|
-
|
|
177
|
-
// ---------- TAG / BADGE ----------
|
|
178
|
-
const Tag = ({ tone = 'default', size='sm', children, square }) => {
|
|
179
|
-
const tones = {
|
|
180
|
-
default:{ bg:'var(--ink-50)', fg:'var(--ink-500)' },
|
|
181
|
-
ember: { bg:'var(--ember-50)', fg:'var(--ember-700)' },
|
|
182
|
-
mono: { bg:'var(--tag-bg)', fg:'var(--tag-fg)' },
|
|
183
|
-
success:{ bg:'var(--success-50)', fg:'var(--success-700)' },
|
|
184
|
-
warning:{ bg:'var(--warning-50)', fg:'var(--warning-700)' },
|
|
185
|
-
danger: { bg:'var(--danger-50)', fg:'var(--danger-700)' },
|
|
186
|
-
info: { bg:'var(--info-50)', fg:'var(--info-700)' },
|
|
187
|
-
};
|
|
188
|
-
const sizes = { xs:{fs:10,h:18,px:6}, sm:{fs:11,h:22,px:8}, md:{fs:12,h:26,px:10} };
|
|
189
|
-
const t = tones[tone]; const s = sizes[size];
|
|
190
|
-
return (
|
|
191
|
-
<span style={{
|
|
192
|
-
display:'inline-flex', alignItems:'center', gap:4,
|
|
193
|
-
height: s.h, padding:`0 ${s.px}px`,
|
|
194
|
-
background:t.bg, color:t.fg,
|
|
195
|
-
fontSize:s.fs, fontWeight:500,
|
|
196
|
-
fontFamily:'var(--font-mono)',
|
|
197
|
-
letterSpacing:'var(--ls-wide)',
|
|
198
|
-
textTransform:'uppercase',
|
|
199
|
-
borderRadius: square ? 'var(--r-sm)' : 'var(--r-pill)',
|
|
200
|
-
}}>{children}</span>
|
|
201
|
-
);
|
|
202
|
-
};
|
|
203
|
-
|
|
204
|
-
const Badge = ({ count, tone='ember' }) => (
|
|
205
|
-
<span style={{
|
|
206
|
-
display:'inline-flex', alignItems:'center', justifyContent:'center',
|
|
207
|
-
minWidth:18, height:18, padding:'0 5px',
|
|
208
|
-
background: tone==='ember' ? 'var(--ember-500)' : 'var(--ink-600)',
|
|
209
|
-
color:'#fff', fontSize:10, fontWeight:600,
|
|
210
|
-
borderRadius:'var(--r-pill)',
|
|
211
|
-
}}>{count}</span>
|
|
212
|
-
);
|
|
213
|
-
|
|
214
|
-
// ---------- TOGGLE ----------
|
|
215
|
-
const Toggle = ({ on, onChange, size='md' }) => {
|
|
216
|
-
const sizes = { sm:{w:28,h:16,d:12}, md:{w:36,h:20,d:16}, lg:{w:44,h:24,d:20} };
|
|
217
|
-
const s = sizes[size];
|
|
218
|
-
return (
|
|
219
|
-
<button onClick={()=>onChange?.(!on)} style={{
|
|
220
|
-
width: s.w, height: s.h, padding: 2,
|
|
221
|
-
borderRadius:'var(--r-pill)',
|
|
222
|
-
background: on ? 'var(--ember-500)' : 'var(--ink-100)',
|
|
223
|
-
border:'none', cursor:'pointer', position:'relative',
|
|
224
|
-
transition:'background var(--t-base) var(--ease-out)',
|
|
225
|
-
}}>
|
|
226
|
-
<span style={{
|
|
227
|
-
position:'absolute', top:2,
|
|
228
|
-
left: on ? s.w - s.d - 2 : 2,
|
|
229
|
-
width: s.d, height: s.d, borderRadius:'50%',
|
|
230
|
-
background:'#fff',
|
|
231
|
-
boxShadow:'0 1px 2px rgba(0,0,0,0.18)',
|
|
232
|
-
transition:'left var(--t-base) var(--ease-out)',
|
|
233
|
-
}}/>
|
|
234
|
-
</button>
|
|
235
|
-
);
|
|
236
|
-
};
|
|
237
|
-
|
|
238
|
-
// ---------- TABS / SEGMENTED ----------
|
|
239
|
-
const Segmented = ({ items, value, onChange, size='md' }) => {
|
|
240
|
-
const sizes = { sm:{h:28,fs:12,px:10}, md:{h:34,fs:13,px:12} };
|
|
241
|
-
const s = sizes[size];
|
|
242
|
-
return (
|
|
243
|
-
<div style={{
|
|
244
|
-
display:'inline-flex', padding:3, gap:2,
|
|
245
|
-
background:'var(--ink-50)',
|
|
246
|
-
border:'1px solid var(--line-200)',
|
|
247
|
-
borderRadius:'var(--r-lg)',
|
|
248
|
-
}}>
|
|
249
|
-
{items.map(it => {
|
|
250
|
-
const active = it.value === value;
|
|
251
|
-
return (
|
|
252
|
-
<button key={it.value} onClick={()=>onChange?.(it.value)} style={{
|
|
253
|
-
display:'inline-flex', alignItems:'center', gap:6,
|
|
254
|
-
height: s.h, padding:`0 ${s.px}px`,
|
|
255
|
-
fontSize: s.fs, fontWeight: active ? 600 : 500,
|
|
256
|
-
color: active ? 'var(--ink-700)' : 'var(--ink-400)',
|
|
257
|
-
background: active ? 'var(--surface)' : 'transparent',
|
|
258
|
-
border:'none', cursor:'pointer',
|
|
259
|
-
borderRadius:'var(--r-md)',
|
|
260
|
-
boxShadow: active ? 'var(--shadow-xs), 0 0 0 1px var(--line-200)' : 'none',
|
|
261
|
-
transition:'all var(--t-fast)',
|
|
262
|
-
}}>{it.icon}{it.label}{it.tag && <Tag tone="mono" size="xs">{it.tag}</Tag>}</button>
|
|
263
|
-
);
|
|
264
|
-
})}
|
|
265
|
-
</div>
|
|
266
|
-
);
|
|
267
|
-
};
|
|
268
|
-
|
|
269
|
-
// ---------- AVATAR ----------
|
|
270
|
-
const Avatar = ({ name, size = 24, color = 'var(--ember-500)', square }) => (
|
|
271
|
-
<span style={{
|
|
272
|
-
width: size, height: size,
|
|
273
|
-
background: color, color:'#fff',
|
|
274
|
-
borderRadius: square ? 'var(--r-sm)' : '50%',
|
|
275
|
-
display:'inline-flex', alignItems:'center', justifyContent:'center',
|
|
276
|
-
fontSize: size * 0.42, fontWeight: 600,
|
|
277
|
-
fontFamily:'var(--font-display)',
|
|
278
|
-
flexShrink: 0,
|
|
279
|
-
}}>{(name || '?').charAt(0).toUpperCase()}</span>
|
|
280
|
-
);
|
|
281
|
-
|
|
282
|
-
// ---------- KBD ----------
|
|
283
|
-
const Kbd = ({ children }) => (
|
|
284
|
-
<span style={{
|
|
285
|
-
display:'inline-flex', alignItems:'center', justifyContent:'center',
|
|
286
|
-
minWidth: 18, height: 18, padding:'0 4px',
|
|
287
|
-
fontFamily:'var(--font-mono)', fontSize: 10,
|
|
288
|
-
color:'var(--ink-400)',
|
|
289
|
-
background:'var(--surface)',
|
|
290
|
-
border:'1px solid var(--line-200)',
|
|
291
|
-
borderBottomWidth: 2,
|
|
292
|
-
borderRadius:'var(--r-sm)',
|
|
293
|
-
}}>{children}</span>
|
|
294
|
-
);
|
|
295
|
-
|
|
296
|
-
window.Section = Section;
|
|
297
|
-
window.Panel = Panel;
|
|
298
|
-
window.Spec = Spec;
|
|
299
|
-
window.Button = Button;
|
|
300
|
-
window.Input = Input;
|
|
301
|
-
window.Tag = Tag;
|
|
302
|
-
window.Badge = Badge;
|
|
303
|
-
window.Toggle = Toggle;
|
|
304
|
-
window.Segmented = Segmented;
|
|
305
|
-
window.Avatar = Avatar;
|
|
306
|
-
window.Kbd = Kbd;
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
/package/templates/{visual-references/logo-zark-principal.png → jsx/assets/logo-zark-laranja.png}
RENAMED
|
File without changes
|
|
File without changes
|