@coolms/ui-react 0.1.0-alpha.34 → 0.1.0-alpha.36

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/kit.contract.json CHANGED
@@ -13,7 +13,7 @@
13
13
  "state": { "implementedBy": "State", "states": ["loading", "empty", "error", "denied", "page", "block", "inline", "with-action", "delayed"] },
14
14
  "error-banner": { "implementedBy": "ErrorBanner", "states": ["default", "with-retry"] },
15
15
  "page-header": { "implementedBy": "PageHeader", "states": ["default", "with-actions", "with-back-link"] },
16
- "section-header": { "implementedBy": "SectionHeader", "states": ["default", "with-primary", "with-primary-menu", "with-more", "action-disabled", "with-context", "full-width"] },
16
+ "section-header": { "implementedBy": "SectionHeader", "states": ["default", "with-primary", "with-primary-menu", "with-more", "with-secondary", "secondary-icon", "secondary-in-more", "lone-menu-only", "action-disabled", "with-context", "with-description", "meta-hidden", "meta-cut", "primary-icon", "primary-in-more", "full-width"] },
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"] },
@@ -23,7 +23,7 @@
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"] },
25
25
  "notification": { "implementedBy": "Notification", "states": ["unread", "read", "collapsed", "expanded", "with-action", "row-action"] },
26
- "pane-toolbar": { "implementedBy": "PaneToolbar", "states": ["default", "labels-partly-hidden", "labels-hidden", "overflowing", "menu-open", "with-status", "action-disabled", "action-busy", "phone"] },
26
+ "pane-toolbar": { "implementedBy": "PaneToolbar", "states": ["default", "labels-partly-hidden", "labels-hidden", "overflowing", "menu-open", "with-status", "action-disabled", "action-busy", "phone", "lone-menu-only"] },
27
27
  "splitter": { "implementedBy": "Splitter", "states": ["default", "hover", "dragging", "focused", "at-min", "at-max"] }
28
28
  },
29
29
  "serverStates": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coolms/ui-react",
3
- "version": "0.1.0-alpha.34",
3
+ "version": "0.1.0-alpha.36",
4
4
  "description": "The CoolMS UI kit for React: the components of the CoolMS UI contract, styled by the CoolMS design tokens",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -42,7 +42,8 @@
42
42
  "demo": "vite --config demo/vite.config.ts",
43
43
  "demo:build": "vite build --config demo/vite.config.ts",
44
44
  "check:layout": "node tools/check-layout.mjs",
45
- "verify": "npm run tokens:check && npm run check && npm run typecheck && npm test && npm run build && npm run check:built && npm run check:types-resolution && npm run check:package && npm run demo:build && npm run check:layout",
45
+ "check:ui-text": "node tools/check-ui-text.mjs",
46
+ "verify": "npm run tokens:check && npm run check && npm run check:ui-text && npm run typecheck && npm test && npm run build && npm run check:built && npm run check:types-resolution && npm run check:package && npm run demo:build && npm run check:layout",
46
47
  "build": "vite build --config vite.lib.config.ts && tsc -p tsconfig.build.json",
47
48
  "check:built": "node tools/check-built.mjs",
48
49
  "check:types-resolution": "node tools/check-types-resolution.mjs",
package/src/kit.css CHANGED
@@ -218,8 +218,24 @@
218
218
  .cms-section-header--full { padding-inline: var(--cms-space-5); }
219
219
  .cms-section-header__row { display: flex; align-items: center; gap: var(--cms-space-2); height: var(--cms-pane-toolbar-height); min-width: 0; white-space: nowrap; }
220
220
  .cms-section-header__row > .cms-icon { flex: none; color: var(--cms-text-secondary); }
221
- .cms-section-header__title { flex: 1 1 auto; min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; font-size: var(--cms-font-size-title-md); font-weight: 600; color: var(--cms-text); }
222
- .cms-section-header__actions { display: flex; align-items: center; gap: var(--cms-space-1); flex: none; }
221
+ .cms-section-header__row { position: relative; }
222
+ .cms-section-header__title { flex: 0 1 auto; min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; font-size: var(--cms-font-size-title-md); font-weight: 600; color: var(--cms-text); }
223
+ .cms-section-header__description { flex: none; color: var(--cms-text-muted); font-size: var(--cms-font-size-meta); }
224
+ .cms-section-header__meta { display: inline-flex; flex: none; align-items: center; min-width: 0; }
225
+ /* The last step: the chips that are the only place their fact appears are cut, the last first, each its whole text kept. */
226
+ .cms-section-header__row--chips-cut .cms-section-header__meta { overflow: hidden; text-overflow: ellipsis; }
227
+ .cms-section-header__actions { display: flex; align-items: center; gap: var(--cms-space-1); flex: none; margin-inline-start: auto; }
228
+ .cms-section-header__secondary { gap: var(--cms-space-1); }
229
+ .cms-section-header__secondary--bare, .cms-section-header__primary--bare { padding-inline: var(--cms-space-2); }
230
+ .cms-section-header__secondary[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
231
+ /* The parts measured out of sight, in a box of no size: each keeps its own width, and the page none of it. */
232
+ .cms-section-header__measure { position: absolute; top: 0; left: 0; display: flex; width: 0; height: 0; overflow: hidden; visibility: hidden; pointer-events: none; }
233
+ .cms-section-header__measure > span { flex: none; display: inline-flex; }
234
+ /* On a touch screen (a coarse pointer) an action shown as its icon is at least a touch target; a desktop browser in a
235
+ narrow window keeps desktop-size buttons. */
236
+ @media (pointer: coarse) {
237
+ .cms-section-header__secondary--bare, .cms-section-header__primary--bare, .cms-section-header__more { min-width: var(--cms-touch-target-min, 44px); min-height: var(--cms-touch-target-min, 44px); }
238
+ }
223
239
  .cms-section-header__primary { display: inline-flex; align-items: center; }
224
240
  .cms-section-header__primary .cms-button[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
225
241
  .cms-section-header__primary--split > .cms-button:first-child { border-start-end-radius: 0; border-end-end-radius: 0; }
@@ -486,7 +502,16 @@
486
502
  .cms-panes { display: grid; height: 100%; min-height: 0; }
487
503
  .cms-panes--two { grid-template-columns: 340px 1fr; }
488
504
  .cms-panes--three { grid-template-columns: 240px 380px 1fr; }
489
- .cms-panes__pane { min-width: 0; min-height: 0; overflow: auto; border-right: 1px solid var(--cms-border); background: var(--cms-surface); }
505
+ .cms-panes__pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: auto; border-right: 1px solid var(--cms-border); background: var(--cms-surface); }
506
+ /* A column (contract split-panes, grid: each pane has exactly one scroll region): its head stays at the top and its body
507
+ scrolls on its own, filling the rest of the pane, the screen shell or any box of a definite height. */
508
+ .cms-column { display: flex; flex-direction: column; flex: 1 1 auto; height: 100%; min-width: 0; min-height: 0; }
509
+ .cms-column__head { flex: none; }
510
+ .cms-column__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
511
+ /* In a screen shell (a phone) the shell's bar is the head that stays and its content the one scroll region, which pull
512
+ to refresh reads: a column there grows with its list and does not scroll on its own. */
513
+ .cms-screen__content .cms-column { flex: none; height: auto; }
514
+ .cms-screen__content .cms-column__body { overflow-y: visible; }
490
515
  .cms-panes--sized { position: relative; }
491
516
  .cms-panes--sized.cms-panes--two { grid-template-columns: var(--split-pane-0) minmax(0, 1fr); }
492
517
  .cms-panes--sized.cms-panes--three { grid-template-columns: var(--split-pane-0) var(--split-pane-1) minmax(0, 1fr); }
@@ -501,7 +526,7 @@
501
526
  .cms-panes.is-resizing { cursor: col-resize; user-select: none; }
502
527
  .cms-panes__pane:first-child { background: var(--cms-bg); }
503
528
  .cms-panes__pane:last-child { border-right: 0; }
504
- .cms-panes__back { display: none; align-items: center; gap: var(--cms-space-1); padding: var(--cms-space-3) var(--cms-space-4); border-bottom: 1px solid var(--cms-border); color: var(--cms-text); font-weight: var(--cms-font-weight-semibold); text-decoration: none; }
529
+ .cms-panes__back { display: none; flex: none; align-items: center; gap: var(--cms-space-1); padding: var(--cms-space-3) var(--cms-space-4); border-bottom: 1px solid var(--cms-border); color: var(--cms-text); font-weight: var(--cms-font-weight-semibold); text-decoration: none; }
505
530
 
506
531
  /* Mail row */
507
532
  .cms-mail-row {
@@ -729,7 +754,7 @@
729
754
  .cms-panes__pane { display: none; }
730
755
  .cms-panes__pane[data-offset='0'],
731
756
  .cms-panes__pane[data-offset='1'],
732
- .cms-panes[data-active='0'] .cms-panes__pane[data-offset='-1'] { display: block; }
757
+ .cms-panes[data-active='0'] .cms-panes__pane[data-offset='-1'] { display: flex; }
733
758
  .cms-panes--three[data-active='2'] .cms-panes__back { display: flex; }
734
759
  .cms-signin__brand { padding: var(--cms-space-8); }
735
760
  .cms-signin__features { grid-template-columns: minmax(0, 1fr); }
@@ -829,8 +854,9 @@
829
854
  .cms-pane-toolbar:has(.cms-pane-toolbar__action:focus-visible > .cms-pane-toolbar__tip), .cms-pane-toolbar:has(.cms-pane-toolbar__action[data-reason-shown] > .cms-pane-toolbar__tip) { overflow: visible; }
830
855
  .cms-pane-toolbar__measure { position: absolute; top: 0; left: 0; display: flex; visibility: hidden; pointer-events: none; }
831
856
  .cms-pane-toolbar__measure > span, .cms-pane-toolbar__measure > div { flex: none; }
832
- /* At tablet and phone widths each action is at least a touch target, in the same row. */
833
- @media (max-width: 1199.98px) {
857
+ /* On a touch screen (a coarse pointer) each action is at least a touch target, in the same row; a desktop browser in a
858
+ narrow window keeps desktop-size buttons. */
859
+ @media (pointer: coarse) {
834
860
  .cms-pane-toolbar__action { min-height: var(--cms-touch-target-min, 44px); }
835
861
  .cms-pane-toolbar__action--bare, .cms-pane-toolbar__more { min-width: var(--cms-touch-target-min, 44px); min-height: var(--cms-touch-target-min, 44px); }
836
862
  }
@@ -115,6 +115,7 @@
115
115
  --cms-list-row-height-three-line: 84px;
116
116
  --cms-row-selected: #eef2f7;
117
117
  --cms-border-input: #8b929c;
118
+ --cms-border-input-focus: #374151;
118
119
  --cms-success-strong: #15803d;
119
120
  --cms-avatar-1-bg: #dbeafe;
120
121
  --cms-avatar-1-fg: #1e3a8a;
@@ -240,6 +241,7 @@
240
241
  --cms-shadow-lg: 0 8px 24px rgba(0,0,0,.55), 0 4px 8px rgba(0,0,0,.40);
241
242
  --cms-row-selected: #243450;
242
243
  --cms-border-input: #6b7f96;
244
+ --cms-border-input-focus: #c9d3e0;
243
245
  --cms-success-strong: #4ade80;
244
246
  --cms-avatar-1-bg: #1e3a8a;
245
247
  --cms-avatar-1-fg: #dbeafe;