@cboxdk/cbox-ui 0.10.3 → 0.11.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/README.md +76 -9
- package/dist/index.d.ts +226 -10
- package/dist/index.js +1273 -352
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/tailwind.preset.js +4 -0
- package/tokens/cbox.css +17 -0
- package/tokens/shell.css +195 -9
package/package.json
CHANGED
package/tailwind.preset.js
CHANGED
|
@@ -65,20 +65,24 @@ module.exports = {
|
|
|
65
65
|
DEFAULT: 'var(--success)',
|
|
66
66
|
foreground: 'var(--success-foreground)',
|
|
67
67
|
soft: 'var(--success-soft)',
|
|
68
|
+
text: 'var(--success-text)',
|
|
68
69
|
},
|
|
69
70
|
warning: {
|
|
70
71
|
DEFAULT: 'var(--warning)',
|
|
71
72
|
foreground: 'var(--warning-foreground)',
|
|
72
73
|
soft: 'var(--warning-soft)',
|
|
74
|
+
text: 'var(--warning-text)',
|
|
73
75
|
},
|
|
74
76
|
info: {
|
|
75
77
|
DEFAULT: 'var(--info)',
|
|
76
78
|
soft: 'var(--info-soft)',
|
|
79
|
+
text: 'var(--info-text)',
|
|
77
80
|
},
|
|
78
81
|
destructive: {
|
|
79
82
|
DEFAULT: 'var(--destructive)',
|
|
80
83
|
foreground: 'var(--destructive-foreground)',
|
|
81
84
|
soft: 'var(--destructive-soft)',
|
|
85
|
+
text: 'var(--destructive-text)',
|
|
82
86
|
},
|
|
83
87
|
border: 'var(--border)',
|
|
84
88
|
input: 'var(--input)',
|
package/tokens/cbox.css
CHANGED
|
@@ -41,6 +41,13 @@
|
|
|
41
41
|
--info: oklch(0.62 0.16 230);
|
|
42
42
|
--info-soft: oklch(0.62 0.16 230 / 0.12);
|
|
43
43
|
|
|
44
|
+
/* Tone text: words and icons in a tone on its soft tint, a card or the canvas. The fills
|
|
45
|
+
* above are too light for small text; these reach 4.5:1 (WCAG AA) on all three. */
|
|
46
|
+
--success-text: oklch(0.48 0.13 145);
|
|
47
|
+
--info-text: oklch(0.48 0.13 230);
|
|
48
|
+
--warning-text: oklch(0.48 0.11 65);
|
|
49
|
+
--destructive-text: oklch(0.50 0.19 25);
|
|
50
|
+
|
|
44
51
|
--destructive: oklch(0.58 0.21 25);
|
|
45
52
|
--destructive-foreground: oklch(0.99 0.003 247);
|
|
46
53
|
--destructive-soft: oklch(0.58 0.21 25 / 0.12);
|
|
@@ -108,6 +115,11 @@
|
|
|
108
115
|
--info: oklch(0.7 0.16 230);
|
|
109
116
|
--info-soft: oklch(0.7 0.16 230 / 0.16);
|
|
110
117
|
|
|
118
|
+
--success-text: oklch(0.74 0.16 145);
|
|
119
|
+
--info-text: oklch(0.7 0.16 230);
|
|
120
|
+
--warning-text: oklch(0.78 0.16 70);
|
|
121
|
+
--destructive-text: oklch(0.76 0.15 25);
|
|
122
|
+
|
|
111
123
|
--destructive: oklch(0.68 0.21 25);
|
|
112
124
|
--destructive-foreground: oklch(0.16 0.01 250);
|
|
113
125
|
--destructive-soft: oklch(0.68 0.21 25 / 0.16);
|
|
@@ -190,6 +202,11 @@
|
|
|
190
202
|
--color-destructive-foreground: var(--destructive-foreground);
|
|
191
203
|
--color-destructive-soft: var(--destructive-soft);
|
|
192
204
|
|
|
205
|
+
--color-success-text: var(--success-text);
|
|
206
|
+
--color-info-text: var(--info-text);
|
|
207
|
+
--color-warning-text: var(--warning-text);
|
|
208
|
+
--color-destructive-text: var(--destructive-text);
|
|
209
|
+
|
|
193
210
|
--color-border: var(--border);
|
|
194
211
|
--color-border-strong: var(--border-strong);
|
|
195
212
|
--color-input: var(--input);
|
package/tokens/shell.css
CHANGED
|
@@ -11,12 +11,17 @@
|
|
|
11
11
|
--cbx-tone-production: var(--success);
|
|
12
12
|
--cbx-tone-sandbox: var(--warning);
|
|
13
13
|
--cbx-tone-neutral: oklch(0.62 0.01 80);
|
|
14
|
+
--cbx-tone-staging: var(--info);
|
|
15
|
+
--cbx-tone-preview: var(--chart-5);
|
|
16
|
+
--cbx-tone-development: var(--cbx-tone-neutral);
|
|
14
17
|
--cbx-font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
15
18
|
--cbx-font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
16
19
|
--cbx-font-display: 'Plus Jakarta Sans', system-ui, sans-serif;
|
|
20
|
+
/* The document scrolls, not a box inside the shell: Inertia resets the scroll on a new page and
|
|
21
|
+
* restores it on back and forward, and a full-page screenshot shows the whole page. The rail,
|
|
22
|
+
* the header, the subnav and docked Help stay in view with `position: sticky`. */
|
|
17
23
|
display: flex;
|
|
18
|
-
height: 100svh;
|
|
19
|
-
overflow: hidden;
|
|
24
|
+
min-height: 100svh;
|
|
20
25
|
font-family: var(--cbx-font-sans);
|
|
21
26
|
font-size: 14px;
|
|
22
27
|
line-height: 1.45;
|
|
@@ -43,6 +48,7 @@
|
|
|
43
48
|
.cbx-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
|
|
44
49
|
/* "Skip to content": the first focusable element, hidden until it has focus. */
|
|
45
50
|
.cbx-skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 8px 14px; border-radius: 8px; background: var(--primary); color: var(--primary-foreground) !important; font-size: 14px; font-weight: 600; box-shadow: var(--cbx-shadow); transform: translateY(calc(-100% - 16px)); }
|
|
51
|
+
.cbx-skip-link:not(:focus) { box-shadow: none; }
|
|
46
52
|
.cbx-skip-link:focus, .cbx-skip-link:focus-visible { transform: none; }
|
|
47
53
|
/* The skip link moves focus to <main>; the page container itself needs no ring. */
|
|
48
54
|
.cbx-shell-main:focus, .cbx-shell-main:focus-visible { outline: none; }
|
|
@@ -53,7 +59,7 @@
|
|
|
53
59
|
.cbx-icon-button:hover { background: var(--secondary); color: var(--foreground); }
|
|
54
60
|
|
|
55
61
|
/* ── Rail (tier 1) ───────────────────────────────────────────────────────────── */
|
|
56
|
-
.cbx-rail-slot { position:
|
|
62
|
+
.cbx-rail-slot { position: sticky; top: 0; align-self: flex-start; height: 100svh; flex: 0 0 64px; width: 64px; z-index: 40; transition: flex-basis 300ms var(--cbx-ease), width 300ms var(--cbx-ease); }
|
|
57
63
|
.cbx-rail-slot[data-pinned='true'] { flex-basis: 222px; width: 222px; }
|
|
58
64
|
.cbx-rail { position: absolute; inset: 6px auto 6px 6px; width: 52px; display: flex; flex-direction: column; padding: 6px; border: 1px solid var(--border); border-radius: 12px; background: var(--sidebar); color: var(--sidebar-foreground); overflow: hidden; transition: width 200ms var(--cbx-ease), box-shadow 200ms var(--cbx-ease); }
|
|
59
65
|
.cbx-rail[data-open='true'] { width: 210px; }
|
|
@@ -100,7 +106,7 @@
|
|
|
100
106
|
|
|
101
107
|
/* ── Column, header, banner ─────────────────────────────────────────────────── */
|
|
102
108
|
.cbx-shell-column { display: flex; flex: 1 1 auto; min-width: 0; flex-direction: column; }
|
|
103
|
-
.cbx-header { position:
|
|
109
|
+
.cbx-header { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; height: 56px; flex: none; padding: 0 16px 0 12px; background: var(--background); border-bottom: 1px solid var(--border); }
|
|
104
110
|
.cbx-context { display: flex; align-items: center; gap: 2px; min-width: 0; flex: 1 1 auto; }
|
|
105
111
|
.cbx-trigger { display: flex; align-items: center; gap: 8px; height: 32px; min-width: 0; max-width: 360px; padding: 0 6px 0 5px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--foreground); transition: background 150ms var(--cbx-ease); }
|
|
106
112
|
.cbx-trigger:hover, .cbx-trigger.is-open { background: var(--secondary); }
|
|
@@ -117,6 +123,17 @@
|
|
|
117
123
|
.cbx-tone { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--cbx-tone-neutral); }
|
|
118
124
|
.cbx-tone-production { background: var(--cbx-tone-production); }
|
|
119
125
|
.cbx-tone-sandbox { background: var(--cbx-tone-sandbox); }
|
|
126
|
+
.cbx-tone-staging { background: var(--cbx-tone-staging); }
|
|
127
|
+
.cbx-tone-preview { background: var(--cbx-tone-preview); }
|
|
128
|
+
.cbx-tone-development { background: var(--cbx-tone-development); }
|
|
129
|
+
/* An environment's colour for the "Not production" banner tint. */
|
|
130
|
+
.cbx-env-production { --cbx-env: var(--cbx-tone-production); }
|
|
131
|
+
.cbx-env-sandbox { --cbx-env: var(--cbx-tone-sandbox); }
|
|
132
|
+
.cbx-env-neutral { --cbx-env: var(--cbx-tone-neutral); }
|
|
133
|
+
.cbx-env-staging { --cbx-env: var(--cbx-tone-staging); }
|
|
134
|
+
.cbx-env-preview { --cbx-env: var(--cbx-tone-preview); }
|
|
135
|
+
.cbx-env-development { --cbx-env: var(--cbx-tone-development); }
|
|
136
|
+
.cbx-banner-env { gap: 8px; background: color-mix(in oklch, var(--cbx-env) 16%, var(--background)); font-weight: 500; }
|
|
120
137
|
.cbx-tools { display: flex; align-items: center; gap: 8px; flex: none; margin-left: auto; }
|
|
121
138
|
.cbx-search-button { display: flex; align-items: center; gap: 8px; width: 232px; height: 32px; padding: 0 6px 0 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--muted-foreground); font-size: 13px; transition: border-color 150ms var(--cbx-ease), color 150ms var(--cbx-ease); }
|
|
122
139
|
.cbx-search-button:hover { border-color: var(--border-strong); color: var(--foreground); }
|
|
@@ -135,10 +152,10 @@
|
|
|
135
152
|
.cbx-banner-text { min-width: 0; }
|
|
136
153
|
.cbx-banner-action { margin-left: auto; font-weight: 600; text-decoration: underline; white-space: nowrap; }
|
|
137
154
|
.cbx-shell-body { display: flex; flex: 1; min-height: 0; }
|
|
138
|
-
.cbx-shell-main { flex: 1; min-width: 0;
|
|
155
|
+
.cbx-shell-main { flex: 1; min-width: 0; scroll-margin-top: 56px; }
|
|
139
156
|
|
|
140
157
|
/* ── Subnav (tier 2) ────────────────────────────────────────────────────────── */
|
|
141
|
-
.cbx-subnav { width: 210px; flex: none; overflow-y: auto; padding: 12px 8px; background: var(--background); border-right: 1px solid var(--border); overscroll-behavior: contain; }
|
|
158
|
+
.cbx-subnav { position: sticky; top: 56px; align-self: flex-start; height: calc(100svh - 56px); width: 210px; flex: none; overflow-y: auto; padding: 12px 8px; background: var(--background); border-right: 1px solid var(--border); overscroll-behavior: contain; }
|
|
142
159
|
.cbx-subnav[data-collapsed='true'] { width: 26px; padding: 0; }
|
|
143
160
|
.cbx-subnav-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; padding: 0 4px 0 12px; margin-bottom: 8px; font-size: 13px; }
|
|
144
161
|
.cbx-subnav-list { display: flex; flex-direction: column; gap: 4px; }
|
|
@@ -265,6 +282,15 @@ textarea.cbx-input { height: auto; padding: 10px 12px; resize: vertical; min-hei
|
|
|
265
282
|
.cbx-palette-search { display: flex; align-items: center; gap: 12px; height: 56px; flex: none; padding: 0 16px; border-bottom: 1px solid var(--border); color: var(--muted-foreground); }
|
|
266
283
|
.cbx-palette-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none !important; background: none; font-size: 16px; color: var(--foreground); }
|
|
267
284
|
.cbx-palette-search input::-webkit-search-cancel-button { display: none; }
|
|
285
|
+
.cbx-palette-field { display: contents; }
|
|
286
|
+
.cbx-scopes { display: flex; gap: 6px; flex: none; overflow-x: auto; padding: 10px 16px 2px; scrollbar-width: none; }
|
|
287
|
+
.cbx-scopes::-webkit-scrollbar { display: none; }
|
|
288
|
+
.cbx-scope { flex: none; height: 30px; padding: 0 12px; border-radius: 15px; background: var(--secondary); color: var(--foreground); font-size: 13px; white-space: nowrap; text-align: center; }
|
|
289
|
+
.cbx-scope.is-on { background: var(--accent-soft); color: var(--primary); font-weight: 600; }
|
|
290
|
+
:is(.dark, [data-theme='dark']) .cbx-scope.is-on { color: oklch(0.85 0.09 258); }
|
|
291
|
+
.cbx-palette-rows { display: flex; flex-direction: column; gap: 4px; }
|
|
292
|
+
.cbx-row-text { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
|
|
293
|
+
.cbx-palette-cancel { flex: none; padding: 0 2px 0 6px; color: var(--primary); font-size: 16px; }
|
|
268
294
|
.cbx-palette-list { flex: 1; min-height: 0; overflow-y: auto; padding: 0 12px 8px; overscroll-behavior: contain; scroll-behavior: smooth; }
|
|
269
295
|
.cbx-palette-group { display: flex; flex-direction: column; gap: 4px; }
|
|
270
296
|
.cbx-palette-group .cbx-row { padding: 0 12px; gap: 12px; cursor: pointer; }
|
|
@@ -274,14 +300,14 @@ textarea.cbx-input { height: auto; padding: 10px 12px; resize: vertical; min-hei
|
|
|
274
300
|
.cbx-palette-foot .cbx-kbd + .cbx-kbd { margin-left: 2px; }
|
|
275
301
|
|
|
276
302
|
/* ── Help column (§7) ───────────────────────────────────────────────────────── */
|
|
277
|
-
.cbx-help { display: flex; flex-direction: column; flex: 0 0 360px; width: 360px; min-height: 0; background: var(--background); border-left: 1px solid var(--border); outline: none; }
|
|
303
|
+
.cbx-help { position: sticky; top: 0; align-self: flex-start; height: 100svh; display: flex; flex-direction: column; flex: 0 0 360px; width: 360px; min-height: 0; background: var(--background); border-left: 1px solid var(--border); outline: none; }
|
|
278
304
|
.cbx-help[hidden] { display: none; }
|
|
279
305
|
/* Help left open from an earlier visit only shows docked: below 1280px it waits for the person,
|
|
280
306
|
also on the server-rendered first paint, before the client knows the width. */
|
|
281
307
|
@media (max-width: 1279px) { .cbx-help[data-restored="true"] { display: none; } }
|
|
282
308
|
@media (min-width: 1440px) { .cbx-help { flex-basis: 400px; width: 400px; } }
|
|
283
309
|
@media (max-width: 1279px) {
|
|
284
|
-
.cbx-help { position: fixed; inset: 0; z-index: 65; width: auto; border-left: 0; animation: cbx-fade 150ms var(--cbx-ease); }
|
|
310
|
+
.cbx-help { position: fixed; inset: 0; z-index: 65; width: auto; height: auto; align-self: stretch; border-left: 0; animation: cbx-fade 150ms var(--cbx-ease); }
|
|
285
311
|
}
|
|
286
312
|
.cbx-help-head { display: flex; align-items: center; gap: 8px; height: 56px; flex: none; padding: 0 12px 0 16px; border-bottom: 1px solid var(--border); }
|
|
287
313
|
.cbx-help-mark { color: var(--primary); flex: none; }
|
|
@@ -346,7 +372,6 @@ textarea.cbx-input { height: auto; padding: 10px 12px; resize: vertical; min-hei
|
|
|
346
372
|
.cbx-only-mobile { display: inline-flex !important; }
|
|
347
373
|
.cbx-rail-slot, .cbx-subnav { display: none; }
|
|
348
374
|
.cbx-header { gap: 6px; padding: 0 8px; }
|
|
349
|
-
.cbx-context-mobile { flex: 1 1 auto; max-width: none; }
|
|
350
375
|
.cbx-search-button { width: 40px; height: 40px; justify-content: center; padding: 0; border-color: transparent; background: none; }
|
|
351
376
|
.cbx-search-button .cbx-search-label, .cbx-search-button .cbx-kbd { display: none; }
|
|
352
377
|
.cbx-tool { width: 40px; height: 40px; padding: 0; justify-content: center; border-color: transparent; background: none; }
|
|
@@ -366,3 +391,164 @@ textarea.cbx-input { height: auto; padding: 10px 12px; resize: vertical; min-hei
|
|
|
366
391
|
@media (prefers-reduced-motion: reduce) {
|
|
367
392
|
.cbx-shell *, .cbx-overlay *, .cbx-popover, .cbx-rail, .cbx-rail-slot { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
|
|
368
393
|
}
|
|
394
|
+
|
|
395
|
+
/* ── Phone (V6, below 768px) ─────────────────────────────────────────────────── */
|
|
396
|
+
/* The phone renders its own chrome: a top bar with the context pill, the area's title and pages,
|
|
397
|
+
* a bottom tab bar, More as a full screen, and bottom sheets. Lists are grouped cards. */
|
|
398
|
+
.cbx-shell.is-mobile { flex-direction: column; padding-bottom: calc(72px + env(safe-area-inset-bottom)); font-size: 15px; }
|
|
399
|
+
.cbx-shell.is-mobile .cbx-shell-column { width: 100%; }
|
|
400
|
+
.cbx-shell.is-mobile [hidden] { display: none !important; }
|
|
401
|
+
.cbx-shell.is-mobile { background: var(--canvas, var(--background)); }
|
|
402
|
+
.cbx-shell.is-mobile .cbx-shell-main.canvas-gradient { background: transparent; }
|
|
403
|
+
.cbx-m-bar { display: flex; align-items: center; gap: 2px; min-height: 52px; padding: 8px 8px 0; }
|
|
404
|
+
/* The chrome flows with the page; only its top bar stays in view while the page scrolls. */
|
|
405
|
+
.cbx-m-chrome { display: contents; }
|
|
406
|
+
.cbx-m-chrome > .cbx-m-bar { position: sticky; top: 0; z-index: 30; padding-bottom: 4px; min-height: 56px; background: var(--canvas, var(--background)); }
|
|
407
|
+
.cbx-m-spacer { flex: 1; }
|
|
408
|
+
.cbx-m-pill { display: flex; align-items: center; gap: 8px; height: 40px; min-width: 0; max-width: 220px; padding: 0 10px 0 4px; border-radius: 20px; background: var(--secondary); color: var(--foreground); }
|
|
409
|
+
.cbx-m-pill .cbx-chip { width: 30px; height: 30px; border-radius: 15px; font-size: 11px; }
|
|
410
|
+
.cbx-m-pill-text { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; line-height: 1.15; }
|
|
411
|
+
.cbx-m-pill-top { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: var(--muted-foreground); }
|
|
412
|
+
.cbx-m-pill-main { display: flex; align-items: center; gap: 5px; max-width: 150px; min-width: 0; font-size: 14px; font-weight: 600; }
|
|
413
|
+
.cbx-m-pill-chevron { flex: none; color: var(--muted-foreground); }
|
|
414
|
+
.cbx-m-icon { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; border-radius: 10px; color: var(--foreground); }
|
|
415
|
+
.cbx-m-icon.is-primary { color: var(--primary); }
|
|
416
|
+
.cbx-m-dot { position: absolute; top: 9px; right: 9px; width: 8px; height: 8px; border-radius: 4px; background: var(--primary); box-shadow: 0 0 0 2px var(--background); }
|
|
417
|
+
.cbx-m-title, .cbx-m-big { margin: 0; padding: 2px 16px 0; font-family: var(--cbx-font-display); font-size: 30px; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; color: var(--foreground); }
|
|
418
|
+
.cbx-m-env { display: flex; align-items: center; gap: 8px; margin: 8px 16px 0; padding: 8px 12px; border-radius: 10px; background: color-mix(in oklch, var(--cbx-env, var(--cbx-tone-sandbox)) 18%, var(--background)); color: var(--foreground); font-size: 13px; font-weight: 600; line-height: 1.35; }
|
|
419
|
+
.cbx-m-chips { display: flex; gap: 6px; overflow-x: auto; padding: 12px 16px 10px; scrollbar-width: none; scroll-behavior: smooth; }
|
|
420
|
+
.cbx-m-chips::-webkit-scrollbar { display: none; }
|
|
421
|
+
.cbx-m-chips-gap { height: 12px; }
|
|
422
|
+
.cbx-m-chip { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 36px; padding: 0 14px; border-radius: 18px; background: var(--secondary); color: var(--foreground); font-size: 14px; white-space: nowrap; }
|
|
423
|
+
.cbx-m-chip.is-on { background: var(--accent-soft); color: var(--primary); font-weight: 600; }
|
|
424
|
+
:is(.dark, [data-theme='dark']) .cbx-m-chip.is-on { color: oklch(0.85 0.09 258); }
|
|
425
|
+
.cbx-m-chip .cbx-nav-lock { margin-left: 0; }
|
|
426
|
+
.cbx-m-back { display: flex; align-items: center; gap: 2px; height: 44px; padding: 0 8px 0 2px; color: var(--primary); font-size: 16px; }
|
|
427
|
+
.cbx-m-gap { height: 14px; }
|
|
428
|
+
|
|
429
|
+
/* Bottom tab bar */
|
|
430
|
+
.cbx-tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 6px 6px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: var(--card); }
|
|
431
|
+
.cbx-tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0; min-height: 52px; padding: 6px 0; border-radius: 10px; color: var(--muted-foreground); font-size: 11px; text-align: center; }
|
|
432
|
+
.cbx-tab > span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
433
|
+
.cbx-tab.is-on { color: var(--primary); font-weight: 600; }
|
|
434
|
+
:is(.dark, [data-theme='dark']) .cbx-tab.is-on { color: oklch(0.78 0.13 258); }
|
|
435
|
+
|
|
436
|
+
/* More */
|
|
437
|
+
.cbx-more { outline: none; }
|
|
438
|
+
.cbx-more-page { display: flex; flex-direction: column; padding-bottom: 8px; }
|
|
439
|
+
.cbx-more-page > :not(.cbx-m-bar):not(.cbx-m-big):not(.cbx-m-gap) { margin-left: 16px; margin-right: 16px; }
|
|
440
|
+
.cbx-more-page > .cbx-pane { padding: 0; }
|
|
441
|
+
.cbx-more-page > .cbx-pane .cbx-list { max-height: none; margin: 0; }
|
|
442
|
+
|
|
443
|
+
/* Grouped rows: the phone's lists, More, the sheets */
|
|
444
|
+
.cbx-group { display: flex; flex-direction: column; margin: 0 0 18px; overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: var(--card); }
|
|
445
|
+
.cbx-grow { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 50px; padding: 0 14px; border-bottom: 1px solid var(--border); color: var(--foreground); font-size: 15px; text-align: left; }
|
|
446
|
+
.cbx-grow:last-child { border-bottom: 0; }
|
|
447
|
+
@media (hover: hover) { .cbx-grow:not(.is-static):hover { background: var(--secondary); } }
|
|
448
|
+
.cbx-grow.is-tall { min-height: 64px; }
|
|
449
|
+
.cbx-grow.is-static { cursor: default; }
|
|
450
|
+
.cbx-grow.is-accent, .cbx-grow.is-accent svg { color: var(--primary); }
|
|
451
|
+
:is(.dark, [data-theme='dark']) .cbx-grow.is-accent, :is(.dark, [data-theme='dark']) .cbx-grow.is-accent svg { color: oklch(0.78 0.13 258); }
|
|
452
|
+
.cbx-grow.is-danger { color: var(--destructive-text, var(--destructive)); }
|
|
453
|
+
.cbx-grow.is-muted { color: var(--muted-foreground); }
|
|
454
|
+
.cbx-grow.is-empty .cbx-grow-label { color: var(--muted-foreground); }
|
|
455
|
+
.cbx-grow[aria-current] .cbx-grow-label { font-weight: 600; }
|
|
456
|
+
.cbx-grow-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
457
|
+
.cbx-grow-text { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.3; }
|
|
458
|
+
.cbx-grow-strong { font-weight: 600; }
|
|
459
|
+
.cbx-grow-sub { font-size: 12.5px; color: var(--muted-foreground); }
|
|
460
|
+
.cbx-grow-count { flex: none; font-family: var(--cbx-font-mono); font-size: 12px; color: var(--muted-foreground); }
|
|
461
|
+
.cbx-grow-value { flex: 0 1 auto; max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: var(--muted-foreground); }
|
|
462
|
+
.cbx-grow-trail, .cbx-grow-icon { flex: none; color: var(--muted-foreground); }
|
|
463
|
+
.cbx-grow-check { flex: none; color: var(--primary); }
|
|
464
|
+
.cbx-grow .cbx-nav-lock { margin-left: 0; }
|
|
465
|
+
.cbx-grow .cbx-tone { width: 12px; height: 12px; }
|
|
466
|
+
.cbx-grow > .cbx-chip { width: 32px; height: 32px; border-radius: 9px; font-size: 12px; }
|
|
467
|
+
.cbx-eyebrow { margin: 0; padding: 0 4px 6px 14px; font-family: var(--cbx-font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-foreground); }
|
|
468
|
+
.cbx-tile { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 30px; height: 30px; border-radius: 8px; background: oklch(var(--cbx-tile-l) var(--cbx-tile-c) var(--cbx-hue, 258)); color: oklch(var(--cbx-tile-fg-l) 0.12 var(--cbx-hue, 258)); font-size: 11px; font-weight: 700; }
|
|
469
|
+
.cbx-tile.is-plain { background: var(--secondary); color: var(--muted-foreground); }
|
|
470
|
+
.cbx-tile.is-accent { background: var(--accent-soft); color: var(--primary); }
|
|
471
|
+
:is(.dark, [data-theme='dark']) .cbx-tile.is-accent { color: oklch(0.85 0.09 258); }
|
|
472
|
+
.cbx-tile.is-primary { background: var(--primary); color: var(--primary-foreground); }
|
|
473
|
+
.cbx-badge { flex: none; padding: 3px 7px; border-radius: 10px; background: var(--primary); color: var(--primary-foreground); font-size: 11px; font-weight: 700; line-height: 1.2; }
|
|
474
|
+
.cbx-field-search { display: flex; align-items: center; gap: 8px; height: 42px; margin: 10px 0 16px; padding: 0 12px; border-radius: 10px; background: var(--secondary); color: var(--muted-foreground); }
|
|
475
|
+
.cbx-field-search:focus-within { box-shadow: 0 0 0 2px var(--ring); }
|
|
476
|
+
.cbx-field-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none !important; background: none; color: var(--foreground); font-size: 16px; }
|
|
477
|
+
.cbx-field-search input::placeholder { color: var(--muted-foreground); }
|
|
478
|
+
.cbx-field-search input::-webkit-search-cancel-button { display: none; }
|
|
479
|
+
.cbx-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin: 0 0 18px; padding: 4px; border: 1px solid var(--border); border-radius: 10px; background: var(--background); }
|
|
480
|
+
.cbx-seg button { min-height: 42px; border-radius: 7px; color: var(--muted-foreground); font-size: 14px; text-align: center; }
|
|
481
|
+
.cbx-seg button.is-on { background: var(--secondary); color: var(--foreground); font-weight: 600; }
|
|
482
|
+
|
|
483
|
+
/* Sheets: a handle, a quiet head, grouped rows */
|
|
484
|
+
.cbx-sheet-bottom { max-height: 88svh; }
|
|
485
|
+
.cbx-sheet-bottom.is-tall { height: 90svh; max-height: 90svh; }
|
|
486
|
+
.cbx-sheet-bottom.is-full { height: 94svh; max-height: 94svh; }
|
|
487
|
+
.cbx-sheet-handle { flex: none; width: 40px; height: 4px; margin: 8px auto 2px; border-radius: 2px; background: var(--border); }
|
|
488
|
+
.cbx-sheet-bottom .cbx-sheet-head { min-height: 50px; padding: 2px 6px 6px; border-bottom: 0; }
|
|
489
|
+
.cbx-sheet-bottom .cbx-sheet-title { flex: 1; padding: 0 6px; font-size: 17px; font-weight: 650; }
|
|
490
|
+
.cbx-sheet-bottom .cbx-sheet-head.has-back .cbx-sheet-title { padding: 0; }
|
|
491
|
+
.cbx-sheet-bottom .cbx-sheet-head .cbx-icon-button { width: 44px; height: 44px; }
|
|
492
|
+
.cbx-sheet-bottom .cbx-sheet-body { padding: 0 16px 30px; }
|
|
493
|
+
.cbx-sheet-back { display: flex; align-items: center; gap: 2px; flex: none; height: 44px; padding: 0 8px 0 2px; color: var(--primary); font-size: 16px; }
|
|
494
|
+
.cbx-sheet-right { top: 0; right: 0; bottom: 0; width: min(480px, 100vw); border-left: 1px solid var(--border); animation: cbx-slide-right 200ms var(--cbx-ease); }
|
|
495
|
+
.cbx-sheet-right .cbx-sheet-head { padding: 0 8px 0 12px; }
|
|
496
|
+
.cbx-sheet-right .cbx-sheet-title { flex: 1; font-size: 16px; }
|
|
497
|
+
.cbx-sheet-right .cbx-sheet-body { padding: 16px 20px 24px; }
|
|
498
|
+
@keyframes cbx-slide-right { from { transform: translateX(16px); opacity: 0; } }
|
|
499
|
+
.cbx-sheet-level .cbx-pane .cbx-list { max-height: none; }
|
|
500
|
+
.cbx-sheet-body > .cbx-group:last-child { margin-bottom: 0; }
|
|
501
|
+
|
|
502
|
+
/* Help on the phone */
|
|
503
|
+
.cbx-askbar { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; padding: 8px 8px 8px 14px; border-radius: 14px; background: var(--secondary); }
|
|
504
|
+
.cbx-askbar:focus-within { box-shadow: 0 0 0 2px var(--ring); }
|
|
505
|
+
.cbx-askbar input { flex: 1; min-width: 0; height: 34px; border: 0; outline: none !important; background: none; color: var(--foreground); font-size: 16px; }
|
|
506
|
+
.cbx-askbar input::placeholder { color: var(--muted-foreground); }
|
|
507
|
+
.cbx-askbar-send { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 34px; height: 34px; border-radius: 17px; background: var(--primary); color: var(--primary-foreground) !important; }
|
|
508
|
+
.cbx-askbar-send:disabled { opacity: 0.55; cursor: default; }
|
|
509
|
+
.cbx-ctxnote { display: flex; align-items: center; gap: 6px; margin: 0; padding: 0 2px 12px; font-size: 12.5px; color: var(--muted-foreground); }
|
|
510
|
+
.cbx-pbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
|
|
511
|
+
.cbx-pbtn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 46px; margin: 0 0 12px; border-radius: 12px; background: var(--secondary); color: var(--foreground); font-size: 14px; font-weight: 600; text-align: center; }
|
|
512
|
+
.cbx-pbtns .cbx-pbtn { margin: 0; }
|
|
513
|
+
.cbx-pbtn:disabled { opacity: 0.55; cursor: default; }
|
|
514
|
+
.cbx-help-sheet .cbx-help-article-title { margin: 4px 0 14px; font-family: var(--cbx-font-display); font-size: 22px; line-height: 1.25; }
|
|
515
|
+
.cbx-help-sheet .cbx-help-article p { margin: 0 0 12px; }
|
|
516
|
+
.cbx-help-sheet .cbx-help-article .cbx-eyebrow { margin: 20px 0 0; padding: 0 4px 6px 2px; font-family: var(--cbx-font-mono); font-size: 11px; }
|
|
517
|
+
.cbx-help-sheet .cbx-grow.is-unread .cbx-grow-strong { font-weight: 700; }
|
|
518
|
+
.cbx-help-sheet .cbx-help-notice { margin: 0 0 12px; }
|
|
519
|
+
|
|
520
|
+
/* The palette as the phone's sheet */
|
|
521
|
+
.cbx-palette-backdrop.is-sheet { align-items: flex-end; padding: 0; }
|
|
522
|
+
.cbx-palette.is-sheet { width: 100%; height: 94svh; max-height: 94svh; border: 0; border-top: 1px solid var(--border); border-radius: 16px 16px 0 0; animation: cbx-slide-up 200ms var(--cbx-ease); }
|
|
523
|
+
.cbx-palette.is-sheet .cbx-palette-search { height: auto; gap: 6px; padding: 6px 16px 0; border-bottom: 0; }
|
|
524
|
+
.cbx-palette.is-sheet .cbx-palette-field { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; height: 42px; padding: 0 12px; border-radius: 10px; background: var(--secondary); color: var(--muted-foreground); }
|
|
525
|
+
.cbx-palette.is-sheet .cbx-palette-field:focus-within { box-shadow: 0 0 0 2px var(--ring); }
|
|
526
|
+
.cbx-palette.is-sheet .cbx-palette-search input { font-size: 16px; }
|
|
527
|
+
.cbx-palette.is-sheet .cbx-scopes { padding: 10px 16px 6px; }
|
|
528
|
+
.cbx-palette.is-sheet .cbx-scope { height: 32px; }
|
|
529
|
+
.cbx-palette.is-sheet .cbx-palette-list { padding: 0 16px 30px; }
|
|
530
|
+
.cbx-palette.is-sheet .cbx-palette-group { gap: 0; }
|
|
531
|
+
.cbx-palette.is-sheet .cbx-pane-heading { margin: 12px 0 6px; padding: 0 4px 0 14px; }
|
|
532
|
+
.cbx-palette.is-sheet .cbx-palette-rows { gap: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: var(--card); }
|
|
533
|
+
.cbx-palette.is-sheet .cbx-palette-group .cbx-row { min-height: 54px; padding: 0 14px; border-radius: 0; border-bottom: 1px solid var(--border); }
|
|
534
|
+
.cbx-palette.is-sheet .cbx-palette-group .cbx-row:last-child { border-bottom: 0; }
|
|
535
|
+
.cbx-palette.is-sheet .cbx-row-text { flex-direction: column; align-items: flex-start; gap: 0; line-height: 1.3; }
|
|
536
|
+
.cbx-palette.is-sheet .cbx-row-text .cbx-row-name { width: 100%; font-size: 15px; font-weight: 600; }
|
|
537
|
+
.cbx-palette.is-sheet .cbx-row-text .cbx-row-label { max-width: 100%; font-size: 12.5px; }
|
|
538
|
+
.cbx-palette.is-sheet .cbx-row-icon { align-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--secondary); }
|
|
539
|
+
.cbx-palette.is-sheet .cbx-row-trail { display: none; }
|
|
540
|
+
|
|
541
|
+
/* The create sheet (V7) */
|
|
542
|
+
.cbx-create-sheet .cbx-sheet-head.has-back .cbx-sheet-title { text-align: center; }
|
|
543
|
+
.cbx-create-sheet .cbx-sheet-body { display: flex; flex-direction: column; }
|
|
544
|
+
.cbx-create-tree .cbx-field-search { margin-top: 0; }
|
|
545
|
+
.cbx-create-env { display: flex; align-items: center; gap: 6px; margin: 0 2px 12px; font-size: 12.5px; color: var(--muted-foreground); }
|
|
546
|
+
.cbx-create-form:not([hidden]) { display: flex; flex-direction: column; flex: 1; }
|
|
547
|
+
.cbx-cform { display: flex; flex-direction: column; flex: 1; }
|
|
548
|
+
.cbx-cfield { margin: 0 0 14px; }
|
|
549
|
+
.cbx-cfield-label { display: block; margin: 0 2px 6px; font-size: 13px; font-weight: 600; }
|
|
550
|
+
.cbx-cfield .cbx-group { margin: 0; }
|
|
551
|
+
.cbx-cinput { width: 100%; height: 46px; padding: 0 12px; border: 1px solid transparent; border-radius: 10px; background: var(--secondary); color: var(--foreground); font-size: 16px; outline: none; }
|
|
552
|
+
.cbx-cinput::placeholder { color: var(--muted-foreground); }
|
|
553
|
+
.cbx-cinput:focus { border-color: var(--ring); }
|
|
554
|
+
.cbx-create-submit { width: 100%; height: 46px; margin-top: auto; border-radius: 12px; font-size: 15px; }
|