@conduction/docusaurus-preset 2.6.0 → 2.6.1
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/package.json
CHANGED
|
@@ -10,7 +10,10 @@
|
|
|
10
10
|
*
|
|
11
11
|
* Mirrors the static-HTML reference at
|
|
12
12
|
* preview/components/app-mock.html#five-atoms
|
|
13
|
-
*
|
|
13
|
+
* but trimmed to the educational essentials: title, "applies to"
|
|
14
|
+
* tag, one-paragraph description, and the chassis illustration.
|
|
15
|
+
* Implementation-detail metadata (Inside / Tokens / Width / tips)
|
|
16
|
+
* lives on the design-system kit page, not here.
|
|
14
17
|
*
|
|
15
18
|
* Used by Docusaurus consumers (nextcloud-vue.conduction.nl,
|
|
16
19
|
* procest.conduction.nl, openregister.conduction.nl) to teach the
|
|
@@ -20,10 +23,6 @@
|
|
|
20
23
|
* via :global() in AtomZones.module.css. Doesn't reuse <AppMock/>'s
|
|
21
24
|
* variants — those intentionally skip the .pageHeader atom — so
|
|
22
25
|
* the page-header zone can render correctly.
|
|
23
|
-
*
|
|
24
|
-
* No props today. A future `app="..."` prop could re-tint the body
|
|
25
|
-
* accent (cobalt/mint/lavender), but the zone-focus story is
|
|
26
|
-
* inherently chassis-level, not variant-level.
|
|
27
26
|
*/
|
|
28
27
|
|
|
29
28
|
import React from 'react';
|
|
@@ -37,16 +36,6 @@ const ZONES = [
|
|
|
37
36
|
body:
|
|
38
37
|
"The Nextcloud chrome row. Sits across every page unconditionally because every Conduction app lives inside Nextcloud's workspace. The shelf icons are the cross-app navigation; per-app links never go here.",
|
|
39
38
|
focus: 'focusTopbar',
|
|
40
|
-
facts: [
|
|
41
|
-
['Inside', <>logo, 14 app-shelf icons, spacer, optional pill, bell, avatar</>],
|
|
42
|
-
['Tokens', <><code>--c-blue-cobalt</code> bg; whites at <code>0.4</code> / <code>0.7</code> / <code>1.0</code> alpha</>],
|
|
43
|
-
['Height', <><code>24px</code> fixed; <code>flex-shrink: 0</code></>],
|
|
44
|
-
],
|
|
45
|
-
tips: [
|
|
46
|
-
{ text: "The shelf shows other Nextcloud apps, never this app's own pages" },
|
|
47
|
-
{ text: 'Avatar is the only solid white circle, top-right' },
|
|
48
|
-
{ text: "Don't add a per-app logo here; the body handles that", dont: true },
|
|
49
|
-
],
|
|
50
39
|
},
|
|
51
40
|
{
|
|
52
41
|
code: '.nav',
|
|
@@ -55,16 +44,6 @@ const ZONES = [
|
|
|
55
44
|
body:
|
|
56
45
|
"The per-app sidebar. Carries this app's own primary navigation, plus a footer pinned to the bottom for global access (Settings, Feedback). The active item is the only place cobalt-100 backgrounds a row.",
|
|
57
46
|
focus: 'focusNav',
|
|
58
|
-
facts: [
|
|
59
|
-
['Inside', <>navHead (cobalt-blue card with hex glyph + label), 5–9 nav items (one with <code>.active</code>), and a <code>.footer</code> with Settings + Feedback pinned to the bottom</>],
|
|
60
|
-
['Width', <><code>22%</code>, min <code>100px</code>; <code>flex-shrink: 0</code></>],
|
|
61
|
-
['Tokens', <><code>--c-cobalt-50</code> bg; <code>--c-cobalt-100</code> right border + active bg + footer divider; <code>--c-orange-knvb</code> on the navHead hex</>],
|
|
62
|
-
],
|
|
63
|
-
tips: [
|
|
64
|
-
{ text: 'Always exactly one .active item; never zero, never two' },
|
|
65
|
-
{ text: 'Footer always carries Settings + Feedback, anchored bottom via margin-top: auto' },
|
|
66
|
-
{ text: "Don't add per-app sign-out here; the user's avatar in the topbar handles identity", dont: true },
|
|
67
|
-
],
|
|
68
47
|
},
|
|
69
48
|
{
|
|
70
49
|
code: '.col',
|
|
@@ -73,35 +52,14 @@ const ZONES = [
|
|
|
73
52
|
body:
|
|
74
53
|
'The work surface. In an App pattern, the column opens with a .pageHeader (title + actions), then KPI strip and panels. In a Desk pattern, .col nests inside .grid to become a full-bleed widget canvas with no page header.',
|
|
75
54
|
focus: 'focusCol',
|
|
76
|
-
facts: [
|
|
77
|
-
['Inside', <>App pattern: <code>.pageHeader</code> + <code>.kpiRow</code> + <code>.panelRow</code>s + tables. Desk pattern: <code>.grid</code> with <code>.w</code> widgets (no pageHeader)</>],
|
|
78
|
-
['Width', <><code>flex: 1</code>; <code>min-width: 0</code>; <code>overflow: hidden</code></>],
|
|
79
|
-
['Tokens', <>White bg; tokens scope to inner panels (<code>--c-cobalt-100</code> borders, <code>--c-mint-500</code> / <code>--c-orange-knvb</code> KPI accents)</>],
|
|
80
|
-
],
|
|
81
|
-
tips: [
|
|
82
|
-
{ text: 'The single orange accent of the variant lives somewhere in here, never in the rails' },
|
|
83
|
-
{ text: "KPI strip is the most-recognisable App-pattern signature; use it when there's a number worth surfacing" },
|
|
84
|
-
{ text: "Don't let panels overflow horizontally; min-width: 0 is load-bearing", dont: true },
|
|
85
|
-
],
|
|
86
55
|
},
|
|
87
56
|
{
|
|
88
57
|
code: '.pageHeader',
|
|
89
58
|
title: 'Page header',
|
|
90
59
|
applies: <><strong>Index</strong> · <strong>Detail</strong> · <em className={styles.never}>Desk: never</em></>,
|
|
91
60
|
body:
|
|
92
|
-
"The first row of .col on every Index and Detail template. Carries the page title (left) and exactly two action buttons (right): one ghost (
|
|
61
|
+
"The first row of .col on every Index and Detail template. Carries the page title (left) and exactly two action buttons (right): one ghost (secondary), one primary (filled cobalt). The header tracks .col's width: full-spread when the sidebar is closed, constrained when it is open.",
|
|
93
62
|
focus: 'focusPageHeader',
|
|
94
|
-
facts: [
|
|
95
|
-
['Inside', <>title-bar (left, cobalt-blue rounded rect with the page title), spacer, then exactly two action buttons: <code>.btn.ghost</code> (white with cobalt border, secondary) on the left of the pair, then <code>.btn</code> (filled cobalt, primary)</>],
|
|
96
|
-
['Height', <><code>14–16px</code> band, sits flush with <code>.col</code>'s top padding</>],
|
|
97
|
-
['Width', <>tracks <code>.col</code>: full-spread when sidebar closed, constrained when sidebar open</>],
|
|
98
|
-
['Tokens', <><code>--c-blue-cobalt</code> for the title-bar and primary button; <code>--c-cobalt-200</code> border on ghost button; white bg on ghost</>],
|
|
99
|
-
],
|
|
100
|
-
tips: [
|
|
101
|
-
{ text: 'Identical anatomy on Index and Detail; only the title changes' },
|
|
102
|
-
{ text: 'Exactly two buttons, never one, never three. If you need a third action, group into an "Actions…" dropdown behind the ghost button' },
|
|
103
|
-
{ text: "Don't render the page title as plain text inside a panel; the page header IS the title", dont: true },
|
|
104
|
-
],
|
|
105
63
|
},
|
|
106
64
|
{
|
|
107
65
|
code: '.detail',
|
|
@@ -110,16 +68,6 @@ const ZONES = [
|
|
|
110
68
|
body:
|
|
111
69
|
'The right-hand sidebar. Optional, dismissible, anchored to the active record or the active view. Carries an icon + title + description in a header, then a tabbed body (Search / Columns by default). Class stays .detail for code; we call it the Sidebar in copy.',
|
|
112
70
|
focus: 'focusDetail',
|
|
113
|
-
facts: [
|
|
114
|
-
['Inside', <><code>.sb-head</code> (icon + title + description + close), <code>.sb-tabs</code> (2–3 tabs, one <code>.active</code>), then a <code>.sb-body</code> of inputs / filters / pinned metadata</>],
|
|
115
|
-
['Width', <><code>26%</code>, min <code>130px</code>; <code>flex-shrink: 0</code></>],
|
|
116
|
-
['Tokens', <>White bg; <code>--c-cobalt-100</code> left border; <code>--c-blue-cobalt</code> active-tab underline; <code>--c-cobalt-50</code> on the icon background</>],
|
|
117
|
-
],
|
|
118
|
-
tips: [
|
|
119
|
-
{ text: "Sidebar should be dismissible; it's a drawer, not a permanent rail" },
|
|
120
|
-
{ text: 'Default tabs on an Index page: Search + Columns. Default on Detail: Overview + Activity' },
|
|
121
|
-
{ text: "Don't put global navigation here; that's .nav's job. The sidebar is scoped to the current view.", dont: true },
|
|
122
|
-
],
|
|
123
71
|
},
|
|
124
72
|
];
|
|
125
73
|
|
|
@@ -289,21 +237,6 @@ function ZoneCard({ zone }) {
|
|
|
289
237
|
</div>
|
|
290
238
|
<p className={styles.lede}>{zone.body}</p>
|
|
291
239
|
<ChassisFrame focus={zone.focus} />
|
|
292
|
-
<dl className={styles.facts}>
|
|
293
|
-
{zone.facts.map(([term, def], i) => (
|
|
294
|
-
<React.Fragment key={i}>
|
|
295
|
-
<dt>{term}</dt>
|
|
296
|
-
<dd>{def}</dd>
|
|
297
|
-
</React.Fragment>
|
|
298
|
-
))}
|
|
299
|
-
</dl>
|
|
300
|
-
<ul className={styles.tips}>
|
|
301
|
-
{zone.tips.map((tip, i) => (
|
|
302
|
-
<li key={i} className={tip.dont ? styles.dont : undefined}>
|
|
303
|
-
{tip.text}
|
|
304
|
-
</li>
|
|
305
|
-
))}
|
|
306
|
-
</ul>
|
|
307
240
|
</div>
|
|
308
241
|
);
|
|
309
242
|
}
|
|
@@ -99,72 +99,6 @@
|
|
|
99
99
|
line-height: 1.55;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
.facts {
|
|
103
|
-
margin: 0;
|
|
104
|
-
display: grid;
|
|
105
|
-
grid-template-columns: 110px 1fr;
|
|
106
|
-
gap: 8px var(--space-4);
|
|
107
|
-
font-size: 13px;
|
|
108
|
-
line-height: 1.5;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.facts dt {
|
|
112
|
-
font-family: var(--conduction-typography-font-family-code);
|
|
113
|
-
font-size: 11px;
|
|
114
|
-
letter-spacing: 0.06em;
|
|
115
|
-
text-transform: uppercase;
|
|
116
|
-
color: var(--c-cobalt-400);
|
|
117
|
-
align-self: start;
|
|
118
|
-
padding-top: 2px;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.facts dd {
|
|
122
|
-
margin: 0;
|
|
123
|
-
color: var(--c-cobalt-700);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.facts dd code {
|
|
127
|
-
font-family: var(--conduction-typography-font-family-code);
|
|
128
|
-
font-size: 12px;
|
|
129
|
-
color: var(--c-blue-cobalt);
|
|
130
|
-
background: var(--c-cobalt-50);
|
|
131
|
-
padding: 1px 5px;
|
|
132
|
-
border-radius: 3px;
|
|
133
|
-
white-space: nowrap;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
.tips {
|
|
137
|
-
list-style: none;
|
|
138
|
-
margin: 0;
|
|
139
|
-
padding: 0;
|
|
140
|
-
display: flex;
|
|
141
|
-
flex-direction: column;
|
|
142
|
-
gap: 6px;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.tips li {
|
|
146
|
-
font-size: 13px;
|
|
147
|
-
line-height: 1.5;
|
|
148
|
-
color: var(--c-cobalt-700);
|
|
149
|
-
padding-left: 18px;
|
|
150
|
-
position: relative;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
.tips li::before {
|
|
154
|
-
content: '';
|
|
155
|
-
position: absolute;
|
|
156
|
-
left: 0;
|
|
157
|
-
top: 7px;
|
|
158
|
-
width: 8px;
|
|
159
|
-
height: 9px;
|
|
160
|
-
clip-path: var(--hex-pointy-top);
|
|
161
|
-
background: var(--c-orange-knvb);
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
.tips li.dont::before {
|
|
165
|
-
background: var(--c-red-vermillion, #c0392b);
|
|
166
|
-
}
|
|
167
|
-
|
|
168
102
|
/* ============================================================
|
|
169
103
|
Zone frame (the cobalt-50 cushion that holds the chassis)
|
|
170
104
|
============================================================ */
|