@coolms/ui-react 0.1.0-alpha.32 → 0.1.0-alpha.34
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 +20 -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 +41 -15
- package/dist/components/SectionHeader.d.ts +1 -1
- package/dist/components/Structure.d.ts +3 -1
- package/dist/components/Workspace.d.ts +0 -16
- package/dist/index.d.ts +3 -1
- package/dist/index.js +1340 -1190
- package/kit.contract.json +2 -2
- package/package.json +1 -1
- package/src/kit.css +39 -20
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,7 +278,7 @@
|
|
|
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); }
|
|
@@ -292,17 +292,29 @@
|
|
|
292
292
|
.cms-screen__back::before { content: ""; width: 0; height: 100%; margin-inline-end: calc(-1 * var(--cms-space-1)); }
|
|
293
293
|
.cms-screen__back-name { flex: 1 1 24px; min-width: 24px; max-width: max-content; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
294
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; }
|
|
295
306
|
.cms-screen__trailing { display: flex; flex: none; align-items: center; gap: var(--cms-space-1); }
|
|
296
307
|
.cms-screen__search { display: flex; flex: 1 1 auto; min-width: 0; }
|
|
297
308
|
.cms-screen__search > * { flex: 1 1 auto; min-width: 0; }
|
|
298
309
|
.cms-screen__icon { width: var(--cms-control-height-md); height: var(--cms-control-height-md); }
|
|
299
|
-
|
|
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); }
|
|
300
312
|
.cms-screen__content { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; }
|
|
301
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); }
|
|
302
|
-
/* bar-hidden: the bar
|
|
303
|
-
(and brings
|
|
304
|
-
.cms-screen[data-bar-hidden] > .cms-screen__bar
|
|
305
|
-
@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; } }
|
|
306
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)); }
|
|
307
319
|
|
|
308
320
|
/* Avatar */
|
|
@@ -351,6 +363,11 @@
|
|
|
351
363
|
/* An item's icon and its words share one line, centred on each other. */
|
|
352
364
|
.cms-menu__label { display: flex; flex: 1; align-items: center; gap: 8px; min-width: 0; }
|
|
353
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); }
|
|
354
371
|
.cms-menu__item.is-danger { color: var(--cms-danger-text); }
|
|
355
372
|
.cms-menu__item.is-refused { color: var(--cms-text-muted); cursor: not-allowed; }
|
|
356
373
|
.cms-menu__refusal { font-size: 0.8125em; }
|
|
@@ -380,7 +397,7 @@
|
|
|
380
397
|
*/
|
|
381
398
|
.cms-icon { flex: none; }
|
|
382
399
|
.cms-icon--blank { display: inline-block; }
|
|
383
|
-
: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 {
|
|
384
401
|
outline: 2px solid var(--cms-focus-ring);
|
|
385
402
|
outline-offset: 2px;
|
|
386
403
|
}
|
|
@@ -453,14 +470,17 @@
|
|
|
453
470
|
.cms-search__input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--cms-text); font: inherit; outline: none; }
|
|
454
471
|
.cms-search__input::placeholder { color: var(--cms-text-muted); }
|
|
455
472
|
|
|
456
|
-
/*
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
.cms-
|
|
461
|
-
.cms-
|
|
462
|
-
|
|
463
|
-
|
|
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; }
|
|
464
484
|
|
|
465
485
|
/* Panes */
|
|
466
486
|
.cms-panes { display: grid; height: 100%; min-height: 0; }
|
|
@@ -518,7 +538,7 @@
|
|
|
518
538
|
.cms-mail-row:is(.is-selecting, .is-checked, :has(:focus-visible)) .cms-mail-row__check { opacity: 1; }
|
|
519
539
|
.cms-mail-row:is(.is-selecting, .is-checked, :has(:focus-visible)) .cms-mail-row__lead > .cms-avatar { visibility: hidden; }
|
|
520
540
|
/* Hover, only where hover exists: a touch screen keeps a tapped control's hover after the tap (a row's tint, an
|
|
521
|
-
icon button's, a
|
|
541
|
+
icon button's, a filter's, a toolbar action's tooltip). */
|
|
522
542
|
@media (hover: hover) and (pointer: fine) {
|
|
523
543
|
.cms-list__row:not(.is-selected):hover { background: var(--cms-surface-hover); }
|
|
524
544
|
.cms-notification__row:hover { background: var(--cms-hover-bg); }
|
|
@@ -527,7 +547,7 @@
|
|
|
527
547
|
.cms-mail-row:hover .cms-mail-row__lead > .cms-avatar { visibility: hidden; }
|
|
528
548
|
.cms-icon-button:hover { background: var(--cms-hover-bg); color: var(--cms-text); }
|
|
529
549
|
.cms-screen__back:hover { background: var(--cms-hover-bg); color: var(--cms-text); }
|
|
530
|
-
.cms-
|
|
550
|
+
.cms-filter-menu:not(.cms-filter-menu--active):hover { background: var(--cms-hover-bg); color: var(--cms-text); }
|
|
531
551
|
.cms-pane-toolbar__action:hover:not([aria-disabled='true']) { background: var(--cms-btn-hover-bg); }
|
|
532
552
|
.cms-pane-toolbar__more:hover { background: var(--cms-btn-hover-bg); }
|
|
533
553
|
.cms-pane-toolbar__action:hover > .cms-pane-toolbar__tip { display: block; }
|
|
@@ -696,15 +716,14 @@
|
|
|
696
716
|
.cms-shell__item { justify-content: center; min-height: var(--cms-touch-target-min); }
|
|
697
717
|
.cms-shell__top { gap: var(--cms-space-3); padding: 0 var(--cms-space-4); }
|
|
698
718
|
.cms-shell__search { min-width: 0; }
|
|
699
|
-
.cms-
|
|
700
|
-
.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); }
|
|
701
721
|
.cms-search { height: var(--cms-touch-target-min); }
|
|
702
722
|
.cms-search__input { align-self: stretch; }
|
|
703
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; }
|
|
704
724
|
.cms-signin-form__forgot { display: inline-flex; align-items: center; min-height: var(--cms-touch-target-min); }
|
|
705
725
|
.cms-call-bar { flex-wrap: wrap; }
|
|
706
726
|
.cms-call-bar__icon { width: var(--cms-touch-target-min); height: var(--cms-touch-target-min); }
|
|
707
|
-
.cms-chip { height: auto; }
|
|
708
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); }
|
|
709
728
|
.cms-splitter { display: none; }
|
|
710
729
|
.cms-panes__pane { display: none; }
|