@coolms/ui-react 0.1.0-alpha.15 → 0.1.0-alpha.16
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 +12 -0
- package/design-tokens.lock.json +5 -5
- package/dist/components/Collections.d.ts +4 -3
- package/dist/components/FileViewer.d.ts +40 -0
- package/dist/components/Notification.d.ts +38 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +922 -820
- package/kit.contract.json +5 -1
- package/package.json +1 -1
- package/src/kit.css +34 -4
- package/src/tokens/coolms-tokens.css +10 -0
package/kit.contract.json
CHANGED
|
@@ -16,7 +16,11 @@
|
|
|
16
16
|
"tab-strip": { "implementedBy": "TabStrip", "states": ["default", "active", "with-count"] },
|
|
17
17
|
"list": { "implementedBy": "List", "states": ["loading", "empty", "populated", "selected", "error"] },
|
|
18
18
|
"avatar": { "implementedBy": "Avatar", "states": ["picture", "initials", "presence"] },
|
|
19
|
-
"context-menu": { "implementedBy": "ContextMenu", "states": ["open", "item-danger", "item-locked", "item-refused"] }
|
|
19
|
+
"context-menu": { "implementedBy": "ContextMenu", "states": ["open", "item-danger", "item-locked", "item-refused", "item-disabled"] },
|
|
20
|
+
"file-viewer": { "implementedBy": "FileViewer", "states": ["loading", "error", "no-preview", "editing", "editing-closing", "editing-conflict", "with-edit", "with-siblings", "with-thumbnails", "with-attachment-strip", "phone"] },
|
|
21
|
+
"file-picker": { "implementedBy": "FilePicker", "states": ["loading", "empty", "error", "denied", "with-selection", "with-budget", "over-budget", "disabled-entry", "paging", "phone"] },
|
|
22
|
+
"notification": { "implementedBy": "Notification", "states": ["unread", "read", "collapsed", "expanded", "with-action", "row-action"] },
|
|
23
|
+
"pane-toolbar": { "implementedBy": "PaneToolbar", "states": ["default", "labels-partly-hidden", "labels-hidden", "overflowing", "menu-open", "with-status", "action-disabled", "action-busy", "phone"] }
|
|
20
24
|
},
|
|
21
25
|
"serverStates": {
|
|
22
26
|
"node-rwx": { "where": "src/server/capability.ts" },
|
package/package.json
CHANGED
package/src/kit.css
CHANGED
|
@@ -28,7 +28,8 @@
|
|
|
28
28
|
display: inline-flex;
|
|
29
29
|
align-items: center;
|
|
30
30
|
gap: 6px;
|
|
31
|
-
|
|
31
|
+
/* The contract's button height: 40px with a mouse, 44px on a touch screen (the token's coarse-pointer value). */
|
|
32
|
+
min-height: var(--cms-control-height-md);
|
|
32
33
|
padding: 0 12px;
|
|
33
34
|
border: 1px solid var(--cms-btn-border);
|
|
34
35
|
border-radius: var(--cms-radius);
|
|
@@ -64,7 +65,8 @@
|
|
|
64
65
|
.cms-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
|
|
65
66
|
.cms-field__label { color: var(--cms-text); font-weight: 600; }
|
|
66
67
|
.cms-input {
|
|
67
|
-
|
|
68
|
+
/* A text field's and a select's height, as a button's. */
|
|
69
|
+
min-height: var(--cms-control-height-md);
|
|
68
70
|
padding: 0 10px;
|
|
69
71
|
border: 1px solid var(--cms-border-control);
|
|
70
72
|
border-radius: var(--cms-radius);
|
|
@@ -294,11 +296,33 @@
|
|
|
294
296
|
}
|
|
295
297
|
.cms-menu__item { display: flex; align-items: center; gap: 8px; min-height: var(--cms-row-height-sm); padding: 0 10px; border-radius: var(--cms-radius-sm); cursor: pointer; }
|
|
296
298
|
.cms-menu__item:hover, .cms-menu__item:focus { background: var(--cms-hover-bg); outline: none; }
|
|
297
|
-
|
|
299
|
+
/* An item's icon and its words share one line, centred on each other. */
|
|
300
|
+
.cms-menu__label { display: flex; flex: 1; align-items: center; gap: 8px; min-width: 0; }
|
|
301
|
+
.cms-menu__label > svg { flex: none; }
|
|
298
302
|
.cms-menu__item.is-danger { color: var(--cms-danger-text); }
|
|
299
303
|
.cms-menu__item.is-refused { color: var(--cms-text-muted); cursor: not-allowed; }
|
|
300
304
|
.cms-menu__refusal { font-size: 0.8125em; }
|
|
301
305
|
|
|
306
|
+
/* One notification: its row (the title, the time, the body in one line until expanded), the chevron beside it, and a
|
|
307
|
+
button action under the text. Unread: the title in weight and a dot. */
|
|
308
|
+
.cms-notification { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; column-gap: var(--cms-space-1); padding: var(--cms-space-1) var(--cms-space-2); border-radius: var(--cms-radius-md); }
|
|
309
|
+
.cms-notification__row { display: flex; align-items: flex-start; gap: var(--cms-space-3); min-width: 0; padding: var(--cms-space-2); border-radius: var(--cms-radius-md); color: var(--cms-text); cursor: pointer; }
|
|
310
|
+
.cms-notification__row:hover { background: var(--cms-hover-bg); }
|
|
311
|
+
.cms-notification__row:focus-visible { outline: 2px solid var(--cms-focus-ring); outline-offset: 1px; }
|
|
312
|
+
.cms-notification__leading { flex: none; display: inline-flex; }
|
|
313
|
+
.cms-notification__text { display: flex; flex: 1; flex-direction: column; gap: var(--cms-space-1); min-width: 0; }
|
|
314
|
+
.cms-notification__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--cms-space-2); }
|
|
315
|
+
.cms-notification__title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
316
|
+
.cms-notification.is-unread .cms-notification__title { font-weight: var(--cms-font-weight-semibold); }
|
|
317
|
+
.cms-notification__time { flex: none; color: var(--cms-text-muted); font-size: var(--cms-font-size-meta); }
|
|
318
|
+
.cms-notification__body { overflow: hidden; color: var(--cms-text-muted); text-overflow: ellipsis; white-space: nowrap; }
|
|
319
|
+
.cms-notification.is-expanded .cms-notification__body { white-space: pre-wrap; overflow-wrap: break-word; }
|
|
320
|
+
.cms-notification__dot { flex: none; width: 8px; height: 8px; margin-top: var(--cms-space-2); border-radius: var(--cms-radius-pill); background: var(--cms-accent); }
|
|
321
|
+
.cms-notification__chevron { display: inline-flex; align-items: center; justify-content: center; width: var(--cms-control-height-md); height: var(--cms-control-height-md); border: 0; border-radius: var(--cms-radius-sm); background: transparent; color: var(--cms-text-muted); cursor: pointer; }
|
|
322
|
+
.cms-notification__chevron:hover { background: var(--cms-hover-bg); color: var(--cms-text); }
|
|
323
|
+
.cms-notification.is-expanded .cms-notification__chevron svg { transform: rotate(180deg); }
|
|
324
|
+
.cms-notification__action { grid-column: 1; justify-self: start; margin: 0 0 var(--cms-space-2) var(--cms-space-2); }
|
|
325
|
+
|
|
302
326
|
/*
|
|
303
327
|
* The Workspace: the shell, its lists, chat, the call and sign-in. Same rule as above: only --cms-* tokens. The chrome
|
|
304
328
|
* (the rail, the incoming call, the sign-in brand side) stays navy in both themes.
|
|
@@ -531,6 +555,12 @@
|
|
|
531
555
|
.cms-viewer__body { display: flex; min-height: 0; }
|
|
532
556
|
.cms-viewer__thumbnails { flex: none; width: 124px; padding: var(--cms-space-3); overflow: auto; border-right: 1px solid #2a2f38; }
|
|
533
557
|
.cms-viewer__content { position: relative; flex: 1 1 0; min-width: 0; min-height: 0; overflow: hidden; }
|
|
558
|
+
/* A state instead of the file, in the viewer's own dark colours whatever the page's scheme. */
|
|
559
|
+
.cms-viewer .cms-state { min-height: 100%; color: #a8afbb; }
|
|
560
|
+
.cms-viewer .cms-state__title { color: #f4f5f7; }
|
|
561
|
+
/* The file changed elsewhere while being edited: the question across the top of the content, above the editor. */
|
|
562
|
+
.cms-viewer__conflict { position: relative; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: var(--cms-space-2); margin: 0; padding: var(--cms-space-2) var(--cms-space-3); border-bottom: 1px solid var(--cms-warning); background: #262b34; }
|
|
563
|
+
.cms-viewer__conflict-text { flex: 1 1 16rem; min-width: 0; margin: 0; }
|
|
534
564
|
/* The next arrow stands clear of the content's own vertical scrollbar (at most 20px), down the content's right edge. */
|
|
535
565
|
.cms-viewer__side { position: absolute; top: 50%; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; margin-top: -22px; border: 0; border-radius: 50%; background: #262b34; color: inherit; cursor: pointer; }
|
|
536
566
|
.cms-viewer__side--previous { left: var(--cms-space-3); }
|
|
@@ -569,7 +599,7 @@
|
|
|
569
599
|
.cms-shell__item { justify-content: center; min-height: var(--cms-touch-target-min); }
|
|
570
600
|
.cms-shell__top { gap: var(--cms-space-3); padding: 0 var(--cms-space-4); }
|
|
571
601
|
.cms-shell__search { min-width: 0; }
|
|
572
|
-
.cms-
|
|
602
|
+
.cms-chip, .cms-tab, .cms-menu__item, .cms-list__row, .cms-panes__back, .cms-server-switch { min-height: var(--cms-touch-target-min); }
|
|
573
603
|
.cms-icon-button { min-width: var(--cms-touch-target-min); min-height: var(--cms-touch-target-min); }
|
|
574
604
|
.cms-search { height: var(--cms-touch-target-min); }
|
|
575
605
|
.cms-search__input { align-self: stretch; }
|
|
@@ -162,7 +162,11 @@
|
|
|
162
162
|
--cms-rail-width-compact: 64px;
|
|
163
163
|
--cms-tabbar-height: 56px;
|
|
164
164
|
--cms-touch-target-min: 44px;
|
|
165
|
+
--cms-control-height-sm: 32px;
|
|
166
|
+
--cms-control-height-md: 40px;
|
|
167
|
+
--cms-control-height-lg: 44px;
|
|
165
168
|
--cms-topbar-height: 64px;
|
|
169
|
+
--cms-pane-toolbar-height: calc(var(--cms-row-height) + 2 * var(--cms-space-2));
|
|
166
170
|
--cms-spinner-color: var(--cms-accent-text);
|
|
167
171
|
--cms-spinner-track: var(--cms-border);
|
|
168
172
|
--cms-spinner-size-inline: 16px;
|
|
@@ -244,3 +248,9 @@
|
|
|
244
248
|
--cms-avatar-6-bg: #374151;
|
|
245
249
|
--cms-avatar-6-fg: #e5e7eb;
|
|
246
250
|
}
|
|
251
|
+
|
|
252
|
+
@media (pointer: coarse) {
|
|
253
|
+
:root {
|
|
254
|
+
--cms-control-height-md: 44px;
|
|
255
|
+
}
|
|
256
|
+
}
|