@coolms/ui-react 0.1.0-alpha.31 → 0.1.0-alpha.33
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/CHANGELOG.md +21 -0
- package/design-tokens.lock.json +3 -3
- package/dist/components/Collections.d.ts +11 -2
- package/dist/components/FilterMenu.d.ts +51 -0
- package/dist/components/Icon.d.ts +1 -1
- package/dist/components/ListHead.d.ts +15 -0
- package/dist/components/ScreenShell.d.ts +48 -15
- package/dist/components/SectionHeader.d.ts +1 -1
- package/dist/components/Workspace.d.ts +0 -16
- package/dist/index.d.ts +3 -1
- package/dist/index.js +1328 -1157
- package/kit.contract.json +2 -2
- package/package.json +1 -1
- package/src/kit.css +49 -25
package/kit.contract.json
CHANGED
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
"tab-strip": { "implementedBy": "TabStrip", "states": ["default", "active", "with-count"] },
|
|
18
18
|
"list": { "implementedBy": "List", "states": ["loading", "empty", "populated", "selected", "error", "pulled"] },
|
|
19
19
|
"avatar": { "implementedBy": "Avatar", "states": ["picture", "initials", "presence", "connection", "deleted"] },
|
|
20
|
-
"filter-
|
|
21
|
-
"screen-shell": { "implementedBy": "ScreenShell", "states": ["root", "nested", "with-
|
|
20
|
+
"filter-menu": { "implementedBy": "FilterMenu", "states": ["default", "active", "open", "focused"] },
|
|
21
|
+
"screen-shell": { "implementedBy": "ScreenShell", "states": ["root", "nested", "with-filter", "filtered", "filter-in-more", "with-primary-action", "with-primary-menu", "with-more", "pulling", "refreshing", "searching", "bar-hidden"] },
|
|
22
22
|
"context-menu": { "implementedBy": "ContextMenu", "states": ["open", "item-danger", "item-locked", "item-refused", "item-disabled"] },
|
|
23
23
|
"file-viewer": { "implementedBy": "FileViewer", "states": ["loading", "error", "no-preview", "editing", "editing-closing", "editing-conflict", "with-edit", "with-siblings", "with-thumbnails", "with-attachment-strip", "phone"] },
|
|
24
24
|
"file-picker": { "implementedBy": "FilePicker", "states": ["loading", "empty", "error", "denied", "with-selection", "with-budget", "over-budget", "disabled-entry", "paging", "phone"] },
|
package/package.json
CHANGED
package/src/kit.css
CHANGED
|
@@ -278,26 +278,43 @@
|
|
|
278
278
|
.cms-list__count { min-width: 18px; height: 18px; font-size: var(--cms-font-size-label-sm); }
|
|
279
279
|
.cms-list__pull { display: flex; align-items: center; justify-content: center; gap: var(--cms-space-2); min-height: var(--cms-control-height-sm); overflow: hidden; color: var(--cms-text-muted); font-size: var(--cms-font-size-meta); }
|
|
280
280
|
|
|
281
|
-
/* The screen shell (contract screen-shell): one bar, the
|
|
281
|
+
/* The screen shell (contract screen-shell): one bar, the content scrolling on its own, the primary floating
|
|
282
282
|
at the bottom right above the section bar. */
|
|
283
283
|
.cms-screen { position: relative; display: flex; flex-direction: column; height: 100%; min-height: 0; background: var(--cms-surface); }
|
|
284
284
|
.cms-screen__bar { display: flex; flex: none; align-items: center; gap: var(--cms-space-2); height: var(--cms-topbar-height); padding: 0 var(--cms-space-2); border-bottom: 1px solid var(--cms-border-light); }
|
|
285
|
-
|
|
285
|
+
/* Back gives way before the title: it takes all of the missing width, down to its icon, and only then is the title cut.
|
|
286
|
+
The weight is large enough that the title's own share rounds to nothing: a share of a hundredth of a pixel would cut it. */
|
|
287
|
+
.cms-screen__leading { display: flex; flex: 0 1000000 auto; align-items: center; max-width: 40%; min-width: var(--cms-touch-target-min); }
|
|
286
288
|
.cms-screen__leading:empty { display: none; }
|
|
287
|
-
|
|
288
|
-
.
|
|
289
|
+
/* Back is one row: the strut makes it the full height, so a name with no room for a readable piece wraps under it and is
|
|
290
|
+
not drawn. The name stays in the text, so Back is still named by it. Clipped, not scrolled: a find in the page moves nothing. */
|
|
291
|
+
.cms-screen__back { display: inline-flex; flex-wrap: wrap; align-content: flex-start; align-items: center; overflow: hidden; overflow: clip; gap: var(--cms-space-1); min-width: 0; height: var(--cms-control-height-md); padding: 0 var(--cms-space-2); border: 0; border-radius: var(--cms-radius-control); background: transparent; color: var(--cms-text-muted); font: inherit; text-decoration: none; cursor: pointer; }
|
|
292
|
+
.cms-screen__back::before { content: ""; width: 0; height: 100%; margin-inline-end: calc(-1 * var(--cms-space-1)); }
|
|
293
|
+
.cms-screen__back-name { flex: 1 1 24px; min-width: 24px; max-width: max-content; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
289
294
|
.cms-screen__title { flex: 1 1 auto; min-width: 0; margin: 0; overflow: hidden; font-size: var(--cms-font-size-title-md); font-weight: var(--cms-font-weight-semibold); text-overflow: ellipsis; white-space: nowrap; }
|
|
295
|
+
/* The title with the filter's choice: the place's name gives way first, down to 24px of it; with less it is not drawn,
|
|
296
|
+
nor its dot, and the choice has the whole title, cut last. The title is one line: the place and its dot wrap under it
|
|
297
|
+
and are clipped there, so they stay in the text. Their share of the line is theirs up to what they need. */
|
|
298
|
+
.cms-screen__title--filtered { display: flex; flex-wrap: wrap-reverse; align-content: flex-end; height: 1lh; overflow: hidden; overflow: clip; }
|
|
299
|
+
.cms-screen__title-place { display: flex; flex: 1 1 40px; min-width: 0; max-width: max-content; }
|
|
300
|
+
.cms-screen__title-name { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
|
|
301
|
+
.cms-screen__title-dot { flex: none; white-space: pre; }
|
|
302
|
+
.cms-screen__title-choice { flex: 0 1 auto; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
|
|
303
|
+
/* The place's name and the choice's whole, measured and not drawn: it takes no room and reaches past nothing. */
|
|
304
|
+
.cms-screen__ruler { position: absolute; width: 0; height: 0; overflow: hidden; font-size: var(--cms-font-size-title-md); font-weight: var(--cms-font-weight-semibold); visibility: hidden; }
|
|
305
|
+
.cms-screen__ruler > span { display: inline-block; white-space: pre; }
|
|
290
306
|
.cms-screen__trailing { display: flex; flex: none; align-items: center; gap: var(--cms-space-1); }
|
|
291
307
|
.cms-screen__search { display: flex; flex: 1 1 auto; min-width: 0; }
|
|
292
308
|
.cms-screen__search > * { flex: 1 1 auto; min-width: 0; }
|
|
293
309
|
.cms-screen__icon { width: var(--cms-control-height-md); height: var(--cms-control-height-md); }
|
|
294
|
-
|
|
310
|
+
/* More while the filter in it is not the default one; its hover keeps the accent. */
|
|
311
|
+
.cms-icon-button.cms-screen__icon.cms-screen__icon--active { background: var(--cms-accent-light); color: var(--cms-accent-text); }
|
|
295
312
|
.cms-screen__content { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; }
|
|
296
313
|
.cms-screen__primary { position: absolute; right: var(--cms-space-4); bottom: var(--cms-space-4); z-index: 2; width: calc(var(--cms-control-height-lg) + var(--cms-space-3)); height: calc(var(--cms-control-height-lg) + var(--cms-space-3)); min-height: 0; padding: 0; border-radius: 50%; justify-content: center; box-shadow: var(--cms-shadow-md); }
|
|
297
|
-
/* bar-hidden: the bar
|
|
298
|
-
(and brings
|
|
299
|
-
.cms-screen[data-bar-hidden] > .cms-screen__bar
|
|
300
|
-
@media (prefers-reduced-motion: reduce) { .cms-screen__bar
|
|
314
|
+
/* bar-hidden: the bar steps out of view, collapsed rather than removed, so focus can still reach it
|
|
315
|
+
(and brings it back). */
|
|
316
|
+
.cms-screen[data-bar-hidden] > .cms-screen__bar { height: 0; min-height: 0; padding-top: 0; padding-bottom: 0; border-bottom-width: 0; overflow: hidden; }
|
|
317
|
+
@media (prefers-reduced-motion: reduce) { .cms-screen__bar { transition: none; animation: none; } }
|
|
301
318
|
.cms-screen--with-primary .cms-screen__content { padding-bottom: calc(var(--cms-control-height-lg) + var(--cms-space-3) + 2 * var(--cms-space-4)); }
|
|
302
319
|
|
|
303
320
|
/* Avatar */
|
|
@@ -346,6 +363,11 @@
|
|
|
346
363
|
/* An item's icon and its words share one line, centred on each other. */
|
|
347
364
|
.cms-menu__label { display: flex; flex: 1; align-items: center; gap: 8px; min-width: 0; }
|
|
348
365
|
.cms-menu__label > svg { flex: none; }
|
|
366
|
+
/* A single choice's mark: its place is kept on every choice, so the labels line up. */
|
|
367
|
+
.cms-menu__check { display: inline-flex; flex: none; width: 16px; color: var(--cms-accent-text); }
|
|
368
|
+
/* A group of choices among other items: a line before it, its name over it. */
|
|
369
|
+
.cms-menu__separator { height: 1px; margin: var(--cms-space-1) 0; background: var(--cms-border); }
|
|
370
|
+
.cms-menu__group { padding: var(--cms-space-1) 10px; color: var(--cms-text-muted); font-size: var(--cms-font-size-meta); }
|
|
349
371
|
.cms-menu__item.is-danger { color: var(--cms-danger-text); }
|
|
350
372
|
.cms-menu__item.is-refused { color: var(--cms-text-muted); cursor: not-allowed; }
|
|
351
373
|
.cms-menu__refusal { font-size: 0.8125em; }
|
|
@@ -375,7 +397,7 @@
|
|
|
375
397
|
*/
|
|
376
398
|
.cms-icon { flex: none; }
|
|
377
399
|
.cms-icon--blank { display: inline-block; }
|
|
378
|
-
:where(.cms-shell__item, .cms-
|
|
400
|
+
:where(.cms-shell__item, .cms-filter-menu, .cms-mail-row__open, .cms-mail-row__check, .cms-call-button, .cms-call-bar__icon, .cms-composer__send-round, .cms-signin-form__show):focus-visible {
|
|
379
401
|
outline: 2px solid var(--cms-focus-ring);
|
|
380
402
|
outline-offset: 2px;
|
|
381
403
|
}
|
|
@@ -448,14 +470,17 @@
|
|
|
448
470
|
.cms-search__input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--cms-text); font: inherit; outline: none; }
|
|
449
471
|
.cms-search__input::placeholder { color: var(--cms-text-muted); }
|
|
450
472
|
|
|
451
|
-
/*
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
.cms-
|
|
456
|
-
.cms-
|
|
457
|
-
|
|
458
|
-
|
|
473
|
+
/* The filter (contract filter-menu): on the default choice the funnel alone, on any other the choice's name in the
|
|
474
|
+
accent: whole, up to the button's most width, then cut with an ellipsis, so a very long one leaves the list's name room. */
|
|
475
|
+
.cms-filter-menu { display: inline-flex; flex: none; align-items: center; justify-content: center; gap: var(--cms-space-1); box-sizing: border-box; width: var(--cms-control-height-md); height: var(--cms-control-height-md); padding: 0; border: 0; border-radius: var(--cms-radius-control); background: transparent; color: var(--cms-text-muted); font: inherit; white-space: nowrap; cursor: pointer; }
|
|
476
|
+
.cms-filter-menu--active { background: var(--cms-accent-light); color: var(--cms-accent-text); }
|
|
477
|
+
.cms-filter-menu--named { width: auto; max-width: 176px; padding: 0 var(--cms-space-2) 0 var(--cms-space-3); }
|
|
478
|
+
.cms-filter-menu__choice { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
|
|
479
|
+
|
|
480
|
+
/* A list's second row: the name gives way, the filter keeps its place and its whole width. */
|
|
481
|
+
.cms-list-head { display: flex; align-items: center; gap: var(--cms-space-2); box-sizing: border-box; width: 100%; min-width: 0; height: var(--cms-pane-header-height); min-height: var(--cms-pane-header-height); }
|
|
482
|
+
.cms-list-head__leading { display: inline-flex; flex: none; align-items: center; }
|
|
483
|
+
.cms-list-head__name { flex: 1 1 auto; min-width: 0; margin: 0; overflow: hidden; color: var(--cms-text); font-size: var(--cms-font-size-title-sm); font-weight: var(--cms-font-weight-semibold); text-overflow: ellipsis; white-space: nowrap; }
|
|
459
484
|
|
|
460
485
|
/* Panes */
|
|
461
486
|
.cms-panes { display: grid; height: 100%; min-height: 0; }
|
|
@@ -465,8 +490,8 @@
|
|
|
465
490
|
.cms-panes--sized { position: relative; }
|
|
466
491
|
.cms-panes--sized.cms-panes--two { grid-template-columns: var(--split-pane-0) minmax(0, 1fr); }
|
|
467
492
|
.cms-panes--sized.cms-panes--three { grid-template-columns: var(--split-pane-0) var(--split-pane-1) minmax(0, 1fr); }
|
|
468
|
-
/* The splitter (contract `splitter`): an 8px strip between two columns that draws nothing at rest; on hover
|
|
469
|
-
dragged
|
|
493
|
+
/* The splitter (contract `splitter`): an 8px strip between two columns that draws nothing at rest; on hover and while
|
|
494
|
+
dragged, the accent line down its middle; with keyboard focus, the same line in the focus ring's colour. */
|
|
470
495
|
.cms-splitter { position: relative; z-index: 2; flex: none; align-self: stretch; width: 8px; margin-inline: -4px; cursor: col-resize; touch-action: none; }
|
|
471
496
|
.cms-splitter:hover, .cms-splitter.is-dragging { background: linear-gradient(to right, transparent 3px, var(--cms-accent) 3px, var(--cms-accent) 5px, transparent 5px); }
|
|
472
497
|
/* Keyboard focus is the same one line, in the focus ring's colour: a ring around the 8px strip would draw two. */
|
|
@@ -513,7 +538,7 @@
|
|
|
513
538
|
.cms-mail-row:is(.is-selecting, .is-checked, :has(:focus-visible)) .cms-mail-row__check { opacity: 1; }
|
|
514
539
|
.cms-mail-row:is(.is-selecting, .is-checked, :has(:focus-visible)) .cms-mail-row__lead > .cms-avatar { visibility: hidden; }
|
|
515
540
|
/* Hover, only where hover exists: a touch screen keeps a tapped control's hover after the tap (a row's tint, an
|
|
516
|
-
icon button's, a
|
|
541
|
+
icon button's, a filter's, a toolbar action's tooltip). */
|
|
517
542
|
@media (hover: hover) and (pointer: fine) {
|
|
518
543
|
.cms-list__row:not(.is-selected):hover { background: var(--cms-surface-hover); }
|
|
519
544
|
.cms-notification__row:hover { background: var(--cms-hover-bg); }
|
|
@@ -522,7 +547,7 @@
|
|
|
522
547
|
.cms-mail-row:hover .cms-mail-row__lead > .cms-avatar { visibility: hidden; }
|
|
523
548
|
.cms-icon-button:hover { background: var(--cms-hover-bg); color: var(--cms-text); }
|
|
524
549
|
.cms-screen__back:hover { background: var(--cms-hover-bg); color: var(--cms-text); }
|
|
525
|
-
.cms-
|
|
550
|
+
.cms-filter-menu:not(.cms-filter-menu--active):hover { background: var(--cms-hover-bg); color: var(--cms-text); }
|
|
526
551
|
.cms-pane-toolbar__action:hover:not([aria-disabled='true']) { background: var(--cms-btn-hover-bg); }
|
|
527
552
|
.cms-pane-toolbar__more:hover { background: var(--cms-btn-hover-bg); }
|
|
528
553
|
.cms-pane-toolbar__action:hover > .cms-pane-toolbar__tip { display: block; }
|
|
@@ -691,15 +716,14 @@
|
|
|
691
716
|
.cms-shell__item { justify-content: center; min-height: var(--cms-touch-target-min); }
|
|
692
717
|
.cms-shell__top { gap: var(--cms-space-3); padding: 0 var(--cms-space-4); }
|
|
693
718
|
.cms-shell__search { min-width: 0; }
|
|
694
|
-
.cms-
|
|
695
|
-
.cms-icon-button { min-width: var(--cms-touch-target-min); min-height: var(--cms-touch-target-min); }
|
|
719
|
+
.cms-tab, .cms-menu__item, .cms-list__row, .cms-panes__back, .cms-server-switch { min-height: var(--cms-touch-target-min); }
|
|
720
|
+
.cms-icon-button, .cms-filter-menu { min-width: var(--cms-touch-target-min); min-height: var(--cms-touch-target-min); }
|
|
696
721
|
.cms-search { height: var(--cms-touch-target-min); }
|
|
697
722
|
.cms-search__input { align-self: stretch; }
|
|
698
723
|
.cms-signin-form__show { display: inline-flex; align-items: center; justify-content: center; min-width: var(--cms-touch-target-min); min-height: var(--cms-touch-target-min); right: 0; }
|
|
699
724
|
.cms-signin-form__forgot { display: inline-flex; align-items: center; min-height: var(--cms-touch-target-min); }
|
|
700
725
|
.cms-call-bar { flex-wrap: wrap; }
|
|
701
726
|
.cms-call-bar__icon { width: var(--cms-touch-target-min); height: var(--cms-touch-target-min); }
|
|
702
|
-
.cms-chip { height: auto; }
|
|
703
727
|
.cms-panes--two, .cms-panes--three, .cms-panes--sized.cms-panes--two, .cms-panes--sized.cms-panes--three { grid-template-columns: minmax(0, 320px) minmax(0, 1fr); }
|
|
704
728
|
.cms-splitter { display: none; }
|
|
705
729
|
.cms-panes__pane { display: none; }
|