@cboxdk/cbox-ui 0.19.4 → 0.19.6
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 +1 -1
- package/tokens/controls.css +18 -6
- package/tokens/shell.css +3 -1
package/package.json
CHANGED
package/tokens/controls.css
CHANGED
|
@@ -282,11 +282,6 @@
|
|
|
282
282
|
.cbx-ui-datetime { display: flex; flex-wrap: wrap; gap: 8px; }
|
|
283
283
|
.cbx-ui-datetime > .cbx-ui-combo:first-child { flex: 1 1 9.5rem; }
|
|
284
284
|
.cbx-ui-datetime > .cbx-ui-combo:first-child .cbx-ui-combo-trigger { width: 100%; }
|
|
285
|
-
@media (pointer: coarse) {
|
|
286
|
-
.cbx-ui-date-grid th { width: 42px; }
|
|
287
|
-
.cbx-ui-date-day { width: 42px; height: 42px; font-size: 14px; }
|
|
288
|
-
.cbx-ui-date-chip { height: 34px; padding: 0 12px; }
|
|
289
|
-
}
|
|
290
285
|
.cbx-ui-combo-note .cbx-ui-combo-icon { margin-top: 1px; color: currentColor; }
|
|
291
286
|
.cbx-ui-combo-footer { display: flex; flex: none; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); color: var(--info-text); font-weight: 500; text-decoration: none; }
|
|
292
287
|
.cbx-ui-combo-footer:hover { background: var(--info-soft); }
|
|
@@ -474,7 +469,6 @@
|
|
|
474
469
|
.cbx-ui-iconbtn:hover { background: var(--secondary); color: var(--foreground); }
|
|
475
470
|
.cbx-ui-iconbtn:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
|
|
476
471
|
.cbx-ui-iconbtn > svg { width: 16px; height: 16px; }
|
|
477
|
-
@media (pointer: coarse) { .cbx-ui-iconbtn { width: 40px; height: 40px; } }
|
|
478
472
|
|
|
479
473
|
/* ── Sheet: never a centred modal. A bottom sheet on a phone, a panel from the right from
|
|
480
474
|
768px. The body is the only scroller, so the title and the actions stay put. */
|
|
@@ -542,4 +536,22 @@
|
|
|
542
536
|
@keyframes cbx-ui-sheet-up { from { transform: translateY(100%); } }
|
|
543
537
|
@keyframes cbx-ui-sheet-side { from { transform: translateX(100%); } }
|
|
544
538
|
@media (prefers-reduced-motion: reduce) { .cbx-ui-overlay, .cbx-ui-sheet { animation: none; } }
|
|
539
|
+
|
|
540
|
+
/* ── Touch (pointer: coarse): every control takes a tap across at least 44px. Fields, pickers,
|
|
541
|
+
buttons, options and calendar days grow to 44px; small visual controls (ticks, the switch,
|
|
542
|
+
a tag's ×, icon buttons, preset chips, the small button) keep their look and get a 44px hit
|
|
543
|
+
area from ::before, so rows and tables keep their density. */
|
|
544
|
+
@media (pointer: coarse) {
|
|
545
|
+
.cbx-ui-input:not(textarea), .cbx-ui-combo-trigger, .cbx-ui-combo-search { height: 44px; }
|
|
546
|
+
.cbx-ui-tags { min-height: 44px; padding-block: 9px; }
|
|
547
|
+
.cbx-ui-btn:not(.cbx-ui-btn--sm) { height: 44px; padding-inline: 16px; }
|
|
548
|
+
.cbx-ui-combo-option, .cbx-ui-combo-link { min-height: 44px; }
|
|
549
|
+
.cbx-ui-date-grid th { width: 44px; }
|
|
550
|
+
.cbx-ui-date-day, .cbx-ui-date-nav { width: 44px; height: 44px; font-size: 14px; }
|
|
551
|
+
:is(.cbx-ui-btn--sm, .cbx-ui-iconbtn, .cbx-ui-date-chip, .cbx-ui-tag-remove) { position: relative; }
|
|
552
|
+
:is(.cbx-ui-btn--sm, .cbx-ui-date-chip)::before { content: ''; position: absolute; inset: -9px 0; }
|
|
553
|
+
:is(.cbx-ui-iconbtn, .cbx-ui-tag-remove)::before { content: ''; position: absolute; inset: 50% auto auto 50%; width: 44px; height: 44px; translate: -50% -50%; }
|
|
554
|
+
.cbx-ui-check-box::before, .cbx-ui-radio-box::before { inset: -14px; }
|
|
555
|
+
.cbx-ui-switch::before { inset: -13px -4px; }
|
|
556
|
+
}
|
|
545
557
|
}
|
package/tokens/shell.css
CHANGED
|
@@ -450,7 +450,9 @@ textarea.cbx-input { height: auto; padding: 10px 12px; resize: vertical; min-hei
|
|
|
450
450
|
.cbx-m-chrome { display: contents; }
|
|
451
451
|
.cbx-m-chrome > .cbx-m-bar { position: sticky; top: 0; z-index: 30; padding-bottom: 4px; min-height: 56px; background: var(--canvas, var(--background)); }
|
|
452
452
|
.cbx-m-spacer { flex: 1; }
|
|
453
|
-
.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); }
|
|
453
|
+
.cbx-m-pill { position: relative; 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); }
|
|
454
|
+
/* Drawn 40px tall beside the 44px icons; a finger gets the same 44px as they do (§12.2). */
|
|
455
|
+
.cbx-m-pill::before { content: ''; position: absolute; inset: -2px 0; }
|
|
454
456
|
.cbx-m-pill .cbx-chip { width: 30px; height: 30px; border-radius: 15px; font-size: 11px; }
|
|
455
457
|
.cbx-m-pill-text { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; line-height: 1.15; }
|
|
456
458
|
.cbx-m-pill-top { max-width: min(150px, 100%); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: var(--muted-foreground); }
|