@cboxdk/cbox-ui 0.10.4 → 0.11.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/README.md +90 -7
- package/dist/index.d.ts +214 -6
- package/dist/index.js +1646 -326
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/tokens/shell.css +229 -4
package/package.json
CHANGED
package/tokens/shell.css
CHANGED
|
@@ -11,6 +11,9 @@
|
|
|
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;
|
|
@@ -45,6 +48,7 @@
|
|
|
45
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; }
|
|
46
49
|
/* "Skip to content": the first focusable element, hidden until it has focus. */
|
|
47
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; }
|
|
48
52
|
.cbx-skip-link:focus, .cbx-skip-link:focus-visible { transform: none; }
|
|
49
53
|
/* The skip link moves focus to <main>; the page container itself needs no ring. */
|
|
50
54
|
.cbx-shell-main:focus, .cbx-shell-main:focus-visible { outline: none; }
|
|
@@ -119,6 +123,17 @@
|
|
|
119
123
|
.cbx-tone { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--cbx-tone-neutral); }
|
|
120
124
|
.cbx-tone-production { background: var(--cbx-tone-production); }
|
|
121
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; }
|
|
122
137
|
.cbx-tools { display: flex; align-items: center; gap: 8px; flex: none; margin-left: auto; }
|
|
123
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); }
|
|
124
139
|
.cbx-search-button:hover { border-color: var(--border-strong); color: var(--foreground); }
|
|
@@ -261,12 +276,21 @@ textarea.cbx-input { height: auto; padding: 10px 12px; resize: vertical; min-hei
|
|
|
261
276
|
|
|
262
277
|
/* ── Palette (§6) ───────────────────────────────────────────────────────────── */
|
|
263
278
|
.cbx-overlay { position: fixed; inset: 0; z-index: 70; font-family: var(--cbx-font-sans); font-size: 14px; line-height: 1.45; color: var(--foreground); }
|
|
264
|
-
.cbx-palette-backdrop { display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; background: oklch(0.18 0.01 80 / 0.32); animation: cbx-fade 150ms var(--cbx-ease); }
|
|
279
|
+
.cbx-palette-backdrop { display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; background: oklch(0.18 0.01 80 / calc(0.32 * var(--cbx-scrim, 1))); animation: cbx-fade 150ms var(--cbx-ease); }
|
|
265
280
|
@keyframes cbx-fade { from { opacity: 0; } }
|
|
266
281
|
.cbx-palette { display: flex; flex-direction: column; width: min(640px, 100%); max-height: min(560px, 76vh); overflow: hidden; background: var(--popover); color: var(--popover-foreground); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--cbx-shadow); outline: none; animation: cbx-pop 200ms var(--cbx-ease); }
|
|
267
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); }
|
|
268
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); }
|
|
269
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; }
|
|
270
294
|
.cbx-palette-list { flex: 1; min-height: 0; overflow-y: auto; padding: 0 12px 8px; overscroll-behavior: contain; scroll-behavior: smooth; }
|
|
271
295
|
.cbx-palette-group { display: flex; flex-direction: column; gap: 4px; }
|
|
272
296
|
.cbx-palette-group .cbx-row { padding: 0 12px; gap: 12px; cursor: pointer; }
|
|
@@ -319,7 +343,10 @@ textarea.cbx-input { height: auto; padding: 10px 12px; resize: vertical; min-hei
|
|
|
319
343
|
.cbx-help-foot .cbx-row-action:disabled { opacity: 0.55; cursor: default; }
|
|
320
344
|
|
|
321
345
|
/* ── Sheets (phone) ─────────────────────────────────────────────────────────── */
|
|
322
|
-
|
|
346
|
+
/* A dragged sheet fades its scrim through --cbx-scrim (0–1); the sheet sits inside the scrim, so
|
|
347
|
+
* the scrim's own opacity cannot be used. Registered so it can transition. */
|
|
348
|
+
@property --cbx-scrim { syntax: '<number>'; inherits: false; initial-value: 1; }
|
|
349
|
+
.cbx-sheet-backdrop { background: oklch(0.18 0.01 80 / calc(0.45 * var(--cbx-scrim, 1))); animation: cbx-fade 150ms var(--cbx-ease); }
|
|
323
350
|
.cbx-sheet { position: absolute; display: flex; flex-direction: column; background: var(--popover); color: var(--popover-foreground); outline: none; box-shadow: var(--cbx-shadow); }
|
|
324
351
|
.cbx-sheet-left { inset: 0 auto 0 0; width: min(340px, 88vw); border-right: 1px solid var(--border); animation: cbx-slide-left 200ms var(--cbx-ease); }
|
|
325
352
|
.cbx-sheet-bottom { left: 0; right: 0; bottom: 0; max-height: 88svh; border-top: 1px solid var(--border); border-radius: 16px 16px 0 0; animation: cbx-slide-up 200ms var(--cbx-ease); }
|
|
@@ -328,7 +355,11 @@ textarea.cbx-input { height: auto; padding: 10px 12px; resize: vertical; min-hei
|
|
|
328
355
|
.cbx-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 56px; flex: none; padding: 0 8px 0 20px; border-bottom: 1px solid var(--border); }
|
|
329
356
|
.cbx-sheet-head .cbx-back { margin: 0 0 0 -12px; }
|
|
330
357
|
.cbx-sheet-title { font-size: 15px; }
|
|
331
|
-
.cbx-sheet-body { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 12px 24px; overscroll-behavior: contain; }
|
|
358
|
+
.cbx-sheet-body { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 12px 24px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
|
|
359
|
+
/* One scroller per sheet: its body. A list or menu inside it that is a scroll container of its own
|
|
360
|
+
* (the app grid, a context list) traps an iOS gesture at its edge, so the sheet stops scrolling
|
|
361
|
+
* back the other way. Inside a sheet they grow with their content instead. */
|
|
362
|
+
.cbx-sheet-body :is(.cbx-menu, .cbx-list) { overflow: visible; max-height: none; }
|
|
332
363
|
.cbx-sheet-body > .cbx-list { margin: 0; }
|
|
333
364
|
.cbx-sheet-body .cbx-menu-apps { width: auto; padding: 4px 0; }
|
|
334
365
|
.cbx-sheet-pages { display: flex; flex-direction: column; gap: 4px; padding-left: 28px; }
|
|
@@ -348,7 +379,6 @@ textarea.cbx-input { height: auto; padding: 10px 12px; resize: vertical; min-hei
|
|
|
348
379
|
.cbx-only-mobile { display: inline-flex !important; }
|
|
349
380
|
.cbx-rail-slot, .cbx-subnav { display: none; }
|
|
350
381
|
.cbx-header { gap: 6px; padding: 0 8px; }
|
|
351
|
-
.cbx-context-mobile { flex: 1 1 auto; max-width: none; }
|
|
352
382
|
.cbx-search-button { width: 40px; height: 40px; justify-content: center; padding: 0; border-color: transparent; background: none; }
|
|
353
383
|
.cbx-search-button .cbx-search-label, .cbx-search-button .cbx-kbd { display: none; }
|
|
354
384
|
.cbx-tool { width: 40px; height: 40px; padding: 0; justify-content: center; border-color: transparent; background: none; }
|
|
@@ -368,3 +398,198 @@ textarea.cbx-input { height: auto; padding: 10px 12px; resize: vertical; min-hei
|
|
|
368
398
|
@media (prefers-reduced-motion: reduce) {
|
|
369
399
|
.cbx-shell *, .cbx-overlay *, .cbx-popover, .cbx-rail, .cbx-rail-slot { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
|
|
370
400
|
}
|
|
401
|
+
|
|
402
|
+
/* ── Phone (V6, below 768px) ─────────────────────────────────────────────────── */
|
|
403
|
+
/* The phone renders its own chrome: a top bar with the context pill, the area's title and pages,
|
|
404
|
+
* a bottom tab bar, More as a full screen, and bottom sheets. Lists are grouped cards. */
|
|
405
|
+
.cbx-shell.is-mobile { flex-direction: column; padding-bottom: calc(72px + env(safe-area-inset-bottom)); font-size: 15px; }
|
|
406
|
+
.cbx-shell.is-mobile .cbx-shell-column { width: 100%; }
|
|
407
|
+
.cbx-shell.is-mobile [hidden] { display: none !important; }
|
|
408
|
+
.cbx-shell.is-mobile { background: var(--canvas, var(--background)); }
|
|
409
|
+
.cbx-shell.is-mobile .cbx-shell-main.canvas-gradient { background: transparent; }
|
|
410
|
+
.cbx-m-bar { display: flex; align-items: center; gap: 2px; min-height: 52px; padding: 8px 8px 0; }
|
|
411
|
+
/* The chrome flows with the page; only its top bar stays in view while the page scrolls. */
|
|
412
|
+
.cbx-m-chrome { display: contents; }
|
|
413
|
+
.cbx-m-chrome > .cbx-m-bar { position: sticky; top: 0; z-index: 30; padding-bottom: 4px; min-height: 56px; background: var(--canvas, var(--background)); }
|
|
414
|
+
.cbx-m-spacer { flex: 1; }
|
|
415
|
+
.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); }
|
|
416
|
+
.cbx-m-pill .cbx-chip { width: 30px; height: 30px; border-radius: 15px; font-size: 11px; }
|
|
417
|
+
.cbx-m-pill-text { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; line-height: 1.15; }
|
|
418
|
+
.cbx-m-pill-top { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: var(--muted-foreground); }
|
|
419
|
+
.cbx-m-pill-main { display: flex; align-items: center; gap: 5px; max-width: 150px; min-width: 0; font-size: 14px; font-weight: 600; }
|
|
420
|
+
.cbx-m-pill-chevron { flex: none; color: var(--muted-foreground); }
|
|
421
|
+
.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); }
|
|
422
|
+
.cbx-m-icon.is-primary { color: var(--primary); }
|
|
423
|
+
.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); }
|
|
424
|
+
.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); }
|
|
425
|
+
.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; }
|
|
426
|
+
.cbx-m-chips { display: flex; gap: 6px; overflow-x: auto; padding: 12px 16px 10px; scrollbar-width: none; scroll-behavior: smooth; }
|
|
427
|
+
.cbx-m-chips::-webkit-scrollbar { display: none; }
|
|
428
|
+
.cbx-m-chips-gap { height: 12px; }
|
|
429
|
+
.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; }
|
|
430
|
+
.cbx-m-chip.is-on { background: var(--accent-soft); color: var(--primary); font-weight: 600; }
|
|
431
|
+
:is(.dark, [data-theme='dark']) .cbx-m-chip.is-on { color: oklch(0.85 0.09 258); }
|
|
432
|
+
.cbx-m-chip .cbx-nav-lock { margin-left: 0; }
|
|
433
|
+
.cbx-m-back { display: flex; align-items: center; gap: 2px; height: 44px; padding: 0 8px 0 2px; color: var(--primary); font-size: 16px; }
|
|
434
|
+
.cbx-m-gap { height: 14px; }
|
|
435
|
+
|
|
436
|
+
/* Bottom tab bar */
|
|
437
|
+
.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); }
|
|
438
|
+
.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; }
|
|
439
|
+
.cbx-tab > span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
440
|
+
.cbx-tab.is-on { color: var(--primary); font-weight: 600; }
|
|
441
|
+
:is(.dark, [data-theme='dark']) .cbx-tab.is-on { color: oklch(0.78 0.13 258); }
|
|
442
|
+
|
|
443
|
+
/* More */
|
|
444
|
+
.cbx-more { outline: none; }
|
|
445
|
+
.cbx-more-page { display: flex; flex-direction: column; padding-bottom: 8px; }
|
|
446
|
+
.cbx-more-page > :not(.cbx-m-bar):not(.cbx-m-big):not(.cbx-m-gap) { margin-left: 16px; margin-right: 16px; }
|
|
447
|
+
.cbx-more-page > .cbx-pane { padding: 0; }
|
|
448
|
+
.cbx-more-page > .cbx-pane .cbx-list { max-height: none; margin: 0; }
|
|
449
|
+
|
|
450
|
+
/* Grouped rows: the phone's lists, More, the sheets */
|
|
451
|
+
.cbx-group { display: flex; flex-direction: column; margin: 0 0 18px; overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: var(--card); }
|
|
452
|
+
.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; }
|
|
453
|
+
.cbx-grow:last-child { border-bottom: 0; }
|
|
454
|
+
@media (hover: hover) { .cbx-grow:not(.is-static):hover { background: var(--secondary); } }
|
|
455
|
+
.cbx-grow.is-tall { min-height: 64px; }
|
|
456
|
+
.cbx-grow.is-static { cursor: default; }
|
|
457
|
+
.cbx-grow.is-accent, .cbx-grow.is-accent svg { color: var(--primary); }
|
|
458
|
+
: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); }
|
|
459
|
+
.cbx-grow.is-danger { color: var(--destructive-text, var(--destructive)); }
|
|
460
|
+
.cbx-grow.is-muted { color: var(--muted-foreground); }
|
|
461
|
+
.cbx-grow.is-empty .cbx-grow-label { color: var(--muted-foreground); }
|
|
462
|
+
.cbx-grow[aria-current] .cbx-grow-label { font-weight: 600; }
|
|
463
|
+
.cbx-grow-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
464
|
+
.cbx-grow-text { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.3; }
|
|
465
|
+
.cbx-grow-strong { font-weight: 600; }
|
|
466
|
+
.cbx-grow-sub { font-size: 12.5px; color: var(--muted-foreground); }
|
|
467
|
+
.cbx-grow-count { flex: none; font-family: var(--cbx-font-mono); font-size: 12px; color: var(--muted-foreground); }
|
|
468
|
+
.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); }
|
|
469
|
+
.cbx-grow-trail, .cbx-grow-icon { flex: none; color: var(--muted-foreground); }
|
|
470
|
+
.cbx-grow-check { flex: none; color: var(--primary); }
|
|
471
|
+
.cbx-grow .cbx-nav-lock { margin-left: 0; }
|
|
472
|
+
.cbx-grow .cbx-tone { width: 12px; height: 12px; }
|
|
473
|
+
.cbx-grow > .cbx-chip { width: 32px; height: 32px; border-radius: 9px; font-size: 12px; }
|
|
474
|
+
.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); }
|
|
475
|
+
.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; }
|
|
476
|
+
.cbx-tile.is-plain { background: var(--secondary); color: var(--muted-foreground); }
|
|
477
|
+
.cbx-tile.is-accent { background: var(--accent-soft); color: var(--primary); }
|
|
478
|
+
:is(.dark, [data-theme='dark']) .cbx-tile.is-accent { color: oklch(0.85 0.09 258); }
|
|
479
|
+
.cbx-tile.is-primary { background: var(--primary); color: var(--primary-foreground); }
|
|
480
|
+
.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; }
|
|
481
|
+
.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); }
|
|
482
|
+
.cbx-field-search:focus-within { box-shadow: 0 0 0 2px var(--ring); }
|
|
483
|
+
.cbx-field-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none !important; background: none; color: var(--foreground); font-size: 16px; }
|
|
484
|
+
.cbx-field-search input::placeholder { color: var(--muted-foreground); }
|
|
485
|
+
.cbx-field-search input::-webkit-search-cancel-button { display: none; }
|
|
486
|
+
.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); }
|
|
487
|
+
.cbx-seg button { min-height: 42px; border-radius: 7px; color: var(--muted-foreground); font-size: 14px; text-align: center; }
|
|
488
|
+
.cbx-seg button.is-on { background: var(--secondary); color: var(--foreground); font-weight: 600; }
|
|
489
|
+
|
|
490
|
+
/* Sheets: a handle, a quiet head, grouped rows */
|
|
491
|
+
.cbx-sheet-bottom { max-height: 88svh; }
|
|
492
|
+
.cbx-sheet-bottom.is-tall { height: 90svh; max-height: 90svh; }
|
|
493
|
+
.cbx-sheet-bottom.is-full { height: 94svh; max-height: 94svh; }
|
|
494
|
+
/* Detents (sheet-drag.ts): a sheet that fits its content opens at most about half way (60%), a tall
|
|
495
|
+
* one at 90% and the palette at 94%; dragging resizes it between half and 92% and closes it.
|
|
496
|
+
* Heights follow what is really visible (`--cbx-vvh`, the visual viewport) and the sheet sits
|
|
497
|
+
* above the on-screen keyboard (`--cbx-keyboard`), so no field ends up under it. */
|
|
498
|
+
.cbx-sheet-bottom { bottom: var(--cbx-keyboard, 0px); max-height: min(60dvh, calc(var(--cbx-vvh, 100dvh) - 8px)); }
|
|
499
|
+
.cbx-sheet-bottom.is-tall { height: 90dvh; max-height: calc(var(--cbx-vvh, 100dvh) - 8px); }
|
|
500
|
+
.cbx-sheet-bottom.is-full { height: 94dvh; max-height: calc(var(--cbx-vvh, 100dvh) - 8px); }
|
|
501
|
+
.cbx-sheet-bottom[data-cbx-dragging] { user-select: none; -webkit-user-select: none; }
|
|
502
|
+
/* The grab handle and the header drag the sheet; the browser must not pan or zoom from them. */
|
|
503
|
+
.cbx-sheet-grab { touch-action: none; }
|
|
504
|
+
.cbx-sheet-handle { position: relative; flex: none; width: 40px; height: 5px; margin: 8px auto 2px; border-radius: 3px; background: var(--border); cursor: grab; }
|
|
505
|
+
.cbx-sheet-handle::before { content: ''; position: absolute; inset: -8px -60px -6px; }
|
|
506
|
+
[data-cbx-dragging] .cbx-sheet-handle { cursor: grabbing; background: var(--muted-foreground); }
|
|
507
|
+
.cbx-sheet-bottom .cbx-sheet-head { min-height: 50px; padding: 2px 6px 6px; border-bottom: 0; }
|
|
508
|
+
.cbx-sheet-bottom .cbx-sheet-title { flex: 1; padding: 0 6px; font-size: 17px; font-weight: 650; }
|
|
509
|
+
.cbx-sheet-bottom .cbx-sheet-head.has-back .cbx-sheet-title { padding: 0; }
|
|
510
|
+
.cbx-sheet-bottom .cbx-sheet-head .cbx-icon-button { width: 44px; height: 44px; }
|
|
511
|
+
.cbx-sheet-bottom .cbx-sheet-body { padding: 0 16px 30px; }
|
|
512
|
+
.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; }
|
|
513
|
+
.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); }
|
|
514
|
+
.cbx-sheet-right .cbx-sheet-head { padding: 0 8px 0 12px; }
|
|
515
|
+
.cbx-sheet-right .cbx-sheet-title { flex: 1; font-size: 16px; }
|
|
516
|
+
.cbx-sheet-right .cbx-sheet-body { padding: 16px 20px 24px; }
|
|
517
|
+
@keyframes cbx-slide-right { from { transform: translateX(16px); opacity: 0; } }
|
|
518
|
+
.cbx-sheet-level .cbx-pane .cbx-list { max-height: none; }
|
|
519
|
+
.cbx-sheet-body > .cbx-group:last-child { margin-bottom: 0; }
|
|
520
|
+
|
|
521
|
+
/* Help on the phone */
|
|
522
|
+
.cbx-askbar { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; padding: 8px 8px 8px 14px; border-radius: 14px; background: var(--secondary); }
|
|
523
|
+
.cbx-askbar:focus-within { box-shadow: 0 0 0 2px var(--ring); }
|
|
524
|
+
.cbx-askbar input { flex: 1; min-width: 0; height: 34px; border: 0; outline: none !important; background: none; color: var(--foreground); font-size: 16px; }
|
|
525
|
+
.cbx-askbar input::placeholder { color: var(--muted-foreground); }
|
|
526
|
+
.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; }
|
|
527
|
+
.cbx-askbar-send:disabled { opacity: 0.55; cursor: default; }
|
|
528
|
+
.cbx-ctxnote { display: flex; align-items: center; gap: 6px; margin: 0; padding: 0 2px 12px; font-size: 12.5px; color: var(--muted-foreground); }
|
|
529
|
+
.cbx-pbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
|
|
530
|
+
.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; }
|
|
531
|
+
.cbx-pbtns .cbx-pbtn { margin: 0; }
|
|
532
|
+
.cbx-pbtn:disabled { opacity: 0.55; cursor: default; }
|
|
533
|
+
.cbx-help-sheet .cbx-help-article-title { margin: 4px 0 14px; font-family: var(--cbx-font-display); font-size: 22px; line-height: 1.25; }
|
|
534
|
+
.cbx-help-sheet .cbx-help-article p { margin: 0 0 12px; }
|
|
535
|
+
.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; }
|
|
536
|
+
.cbx-help-sheet .cbx-grow.is-unread .cbx-grow-strong { font-weight: 700; }
|
|
537
|
+
.cbx-help-sheet .cbx-help-notice { margin: 0 0 12px; }
|
|
538
|
+
|
|
539
|
+
/* The palette as the phone's sheet */
|
|
540
|
+
.cbx-palette-backdrop.is-sheet { align-items: flex-end; padding: 0; }
|
|
541
|
+
.cbx-palette-backdrop.is-sheet { padding-bottom: var(--cbx-keyboard, 0px); }
|
|
542
|
+
.cbx-palette.is-sheet { width: 100%; height: 94svh; max-height: 94svh; height: 94dvh; max-height: calc(var(--cbx-vvh, 100dvh) - 8px); border: 0; border-top: 1px solid var(--border); border-radius: 16px 16px 0 0; animation: cbx-slide-up 200ms var(--cbx-ease); }
|
|
543
|
+
.cbx-palette.is-sheet .cbx-palette-search { height: auto; gap: 6px; padding: 6px 16px 0; border-bottom: 0; }
|
|
544
|
+
.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); }
|
|
545
|
+
.cbx-palette.is-sheet .cbx-palette-field:focus-within { box-shadow: 0 0 0 2px var(--ring); }
|
|
546
|
+
.cbx-palette.is-sheet .cbx-palette-search input { font-size: 16px; }
|
|
547
|
+
.cbx-palette.is-sheet .cbx-scopes { padding: 10px 16px 6px; }
|
|
548
|
+
.cbx-palette.is-sheet .cbx-scope { height: 32px; }
|
|
549
|
+
.cbx-palette.is-sheet .cbx-palette-list { padding: 0 16px 30px; }
|
|
550
|
+
.cbx-palette.is-sheet .cbx-palette-group { gap: 0; }
|
|
551
|
+
.cbx-palette.is-sheet .cbx-pane-heading { margin: 12px 0 6px; padding: 0 4px 0 14px; }
|
|
552
|
+
.cbx-palette.is-sheet .cbx-palette-rows { gap: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: var(--card); }
|
|
553
|
+
.cbx-palette.is-sheet .cbx-palette-group .cbx-row { min-height: 54px; padding: 0 14px; border-radius: 0; border-bottom: 1px solid var(--border); }
|
|
554
|
+
.cbx-palette.is-sheet .cbx-palette-group .cbx-row:last-child { border-bottom: 0; }
|
|
555
|
+
.cbx-palette.is-sheet .cbx-row-text { flex-direction: column; align-items: flex-start; gap: 0; line-height: 1.3; }
|
|
556
|
+
.cbx-palette.is-sheet .cbx-row-text .cbx-row-name { width: 100%; font-size: 15px; font-weight: 600; }
|
|
557
|
+
.cbx-palette.is-sheet .cbx-row-text .cbx-row-label { max-width: 100%; font-size: 12.5px; }
|
|
558
|
+
.cbx-palette.is-sheet .cbx-row-icon { align-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--secondary); }
|
|
559
|
+
.cbx-palette.is-sheet .cbx-row-trail { display: none; }
|
|
560
|
+
|
|
561
|
+
/* The create sheet (V7) */
|
|
562
|
+
.cbx-create-sheet .cbx-sheet-head.has-back .cbx-sheet-title { text-align: center; }
|
|
563
|
+
.cbx-create-sheet .cbx-sheet-body { display: flex; flex-direction: column; }
|
|
564
|
+
.cbx-create-tree .cbx-field-search { margin-top: 0; }
|
|
565
|
+
.cbx-create-env { display: flex; align-items: center; gap: 6px; margin: 0 2px 12px; font-size: 12.5px; color: var(--muted-foreground); }
|
|
566
|
+
.cbx-create-form:not([hidden]) { display: flex; flex-direction: column; flex: 1; }
|
|
567
|
+
.cbx-cform { display: flex; flex-direction: column; flex: 1; }
|
|
568
|
+
.cbx-cfield { margin: 0 0 14px; }
|
|
569
|
+
.cbx-cfield-label { display: block; margin: 0 2px 6px; font-size: 13px; font-weight: 600; }
|
|
570
|
+
.cbx-cfield .cbx-group { margin: 0; }
|
|
571
|
+
.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; }
|
|
572
|
+
.cbx-cinput::placeholder { color: var(--muted-foreground); }
|
|
573
|
+
.cbx-cinput:focus { border-color: var(--ring); }
|
|
574
|
+
.cbx-create-submit { width: 100%; height: 46px; margin-top: auto; border-radius: 12px; font-size: 15px; }
|
|
575
|
+
|
|
576
|
+
/* ── Phone feel (0.11.1) ─────────────────────────────────────────────────────── */
|
|
577
|
+
/* No double-tap zoom on the chrome and in overlays (pinch-zoom stays). */
|
|
578
|
+
.cbx-shell.is-mobile, .cbx-overlay, .cbx-popover { touch-action: manipulation; }
|
|
579
|
+
/* The page scrolls under a fixed top bar and tab bar without the whole document rubber-banding. */
|
|
580
|
+
:root:has(.cbx-shell.is-mobile) { overscroll-behavior-y: none; }
|
|
581
|
+
/* The on-screen keyboard is up: the tab bar steps aside instead of riding up over the fields. */
|
|
582
|
+
:root[data-cbx-keyboard] .cbx-tabbar { display: none; }
|
|
583
|
+
/* Every scroller in a sheet or a menu scrolls on its own, in both directions. */
|
|
584
|
+
.cbx-palette-list, .cbx-help-body, .cbx-list, .cbx-rail-nav, .cbx-subnav { -webkit-overflow-scrolling: touch; }
|
|
585
|
+
/* iOS zooms into any field under 16px when it takes focus. The shell's own fields are 16px on a
|
|
586
|
+
* phone or a touch screen; the page's fields are 16px in the phone layout (an app that styles its
|
|
587
|
+
* fields in a later cascade layer keeps its own size, and should keep it at 16px or more there). */
|
|
588
|
+
@media (max-width: 767px), (pointer: coarse) {
|
|
589
|
+
:is(.cbx-overlay, .cbx-popover, .cbx-m-chrome, .cbx-more, .cbx-help) :is(input:not([type='checkbox']):not([type='radio']):not([type='range']), select, textarea) { font-size: 16px; }
|
|
590
|
+
}
|
|
591
|
+
.cbx-shell.is-mobile .cbx-m-page :is(input:not([type='checkbox']):not([type='radio']):not([type='range']), select, textarea) { font-size: 16px; }
|
|
592
|
+
/* A page heading that repeats the top bar's large title (PageHeader's own, or one marked
|
|
593
|
+
* `data-cbx-page-title`) stays for screen readers only; a `?` beside it goes (the top bar has Help). */
|
|
594
|
+
.cbx-shell.is-mobile [data-cbx-same-title] { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; border: 0 !important; }
|
|
595
|
+
.cbx-shell.is-mobile [data-cbx-same-title] button { display: none !important; }
|