@coolms/ui-react 0.1.0-alpha.6 → 0.1.0-alpha.8

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coolms/ui-react",
3
- "version": "0.1.0-alpha.6",
3
+ "version": "0.1.0-alpha.8",
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",
package/src/kit.css CHANGED
@@ -500,7 +500,8 @@
500
500
  .cms-signin-form__create { justify-content: center; height: 48px; border-color: var(--cms-border-input); border-radius: var(--cms-radius-control); color: var(--cms-text); font-weight: var(--cms-font-weight-semibold); text-decoration: none; }
501
501
 
502
502
  /* The file viewer: dark whatever the scheme, covering the page. It never scrolls as a document; its content does. */
503
- .cms-viewer { position: fixed; inset: 0; z-index: 1000; display: grid; grid-template-rows: 56px minmax(0, 1fr) auto auto; background: #0e1116; color: #f4f5f7; }
503
+ /* One column no wider than the screen: a bar wider than a phone scrolls in its place, it does not widen the viewer. */
504
+ .cms-viewer { position: fixed; inset: 0; z-index: 1000; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 56px minmax(0, 1fr) auto auto; background: #0e1116; color: #f4f5f7; }
504
505
  .cms-viewer:focus { outline: none; }
505
506
  .cms-viewer__top { display: flex; align-items: center; gap: var(--cms-space-2); min-width: 0; padding: 0 var(--cms-space-3); border-bottom: 1px solid #2a2f38; }
506
507
  .cms-viewer__badge { flex: none; display: inline-flex; }
@@ -528,7 +529,7 @@
528
529
  .cms-viewer__dots { display: none; position: absolute; left: 0; right: 0; bottom: var(--cms-space-2); z-index: 2; justify-content: center; gap: 6px; }
529
530
  .cms-viewer__dots i { width: 7px; height: 7px; border-radius: 50%; background: #6c7482; }
530
531
  .cms-viewer__dots i.is-current { background: #f4f5f7; }
531
- .cms-viewer__bar { display: flex; align-items: center; justify-content: center; gap: var(--cms-space-1); min-height: 48px; padding: 0 var(--cms-space-2); border-top: 1px solid #2a2f38; color: #d6dae1; white-space: nowrap; }
532
+ .cms-viewer__bar { display: flex; align-items: center; justify-content: safe center; gap: var(--cms-space-1); min-height: 48px; padding: 0 var(--cms-space-2); overflow-x: auto; border-top: 1px solid #2a2f38; color: #d6dae1; white-space: nowrap; }
532
533
  @media (max-width: 1199.98px) {
533
534
  .cms-viewer__icon, .cms-viewer__button { min-height: var(--cms-touch-target-min); min-width: var(--cms-touch-target-min); }
534
535
  }
@@ -598,3 +599,43 @@
598
599
  .cms-signin__brand { display: none; }
599
600
  .cms-signin__form { padding: var(--cms-space-6) var(--cms-space-4); }
600
601
  }
602
+
603
+ /* File picker: a dialog of fixed height whose list scrolls; on a phone the whole screen, its foot kept at the bottom. */
604
+ .cms-modal.cms-file-picker { width: min(640px, 100%); height: min(560px, calc(100vh - 32px)); }
605
+ .cms-file-picker .cms-modal__body { display: flex; flex: 1 1 auto; flex-direction: column; gap: var(--cms-space-2); min-height: 0; overflow: hidden; }
606
+ .cms-file-picker__top { display: flex; flex-wrap: wrap; align-items: center; gap: var(--cms-space-2); }
607
+ .cms-file-picker__space { flex: none; }
608
+ .cms-file-picker__path { display: flex; flex: 1 1 auto; align-items: center; gap: var(--cms-space-1); min-width: 0; }
609
+ .cms-file-picker__path ol { display: flex; gap: var(--cms-space-1); min-width: 0; margin: 0; padding: 0; overflow: hidden; list-style: none; }
610
+ .cms-file-picker__path li { display: flex; gap: var(--cms-space-1); min-width: 0; }
611
+ .cms-file-picker__path li + li::before { content: '/'; color: var(--cms-text-muted); }
612
+ .cms-file-picker__crumb { min-width: 0; padding: 0; overflow: hidden; border: 0; background: none; color: var(--cms-accent); font: inherit; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
613
+ .cms-file-picker__crumb[aria-current='location'] { color: var(--cms-text); cursor: default; }
614
+ .cms-file-picker__chip { flex: none; padding: var(--cms-space-1) var(--cms-space-2); border: 1px solid var(--cms-border); border-radius: var(--cms-radius-md); background: var(--cms-surface-muted); color: var(--cms-text); font: inherit; cursor: pointer; }
615
+ .cms-file-picker__chosen { display: flex; flex-direction: column; gap: var(--cms-space-2); max-height: 40%; padding: var(--cms-space-2); overflow: auto; border: 1px solid var(--cms-border-light); border-radius: var(--cms-radius-md); }
616
+ .cms-file-picker__chosen ul { margin: 0; padding: 0; list-style: none; }
617
+ .cms-file-picker__chosen li { display: flex; align-items: center; gap: var(--cms-space-2); }
618
+ .cms-file-picker__chosen .cms-button { align-self: flex-start; }
619
+ .cms-file-picker__list { flex: 1 1 auto; min-height: 0; overflow: auto; border: 1px solid var(--cms-border-light); border-radius: var(--cms-radius-md); }
620
+ .cms-file-picker__entries:focus-visible { outline: 2px solid var(--cms-focus-ring); outline-offset: -2px; }
621
+ .cms-file-picker__entry { display: flex; align-items: center; gap: var(--cms-space-2); min-height: 40px; padding: 0 var(--cms-space-3); border-bottom: 1px solid var(--cms-border-light); cursor: pointer; }
622
+ .cms-file-picker__entry.is-active { background: var(--cms-surface-hover); }
623
+ .cms-file-picker__entry.is-ticked { box-shadow: inset 3px 0 0 var(--cms-accent); }
624
+ .cms-file-picker__entry.is-disabled { color: var(--cms-text-muted); cursor: not-allowed; }
625
+ .cms-file-picker__tick { display: inline-flex; flex: none; width: 16px; color: var(--cms-accent); }
626
+ .cms-file-picker__name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
627
+ .cms-file-picker__text { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; padding: var(--cms-space-1) 0; }
628
+ .cms-file-picker__reason { color: var(--cms-text-muted); font-size: 0.875em; }
629
+ .cms-file-picker__size { flex: none; color: var(--cms-text-secondary); font-size: 0.875em; }
630
+ .cms-file-picker__paging { padding: var(--cms-space-2) var(--cms-space-3); }
631
+ .cms-file-picker__foot { display: flex; flex: 1 1 auto; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--cms-space-2); }
632
+ .cms-file-picker__summary { display: flex; flex-direction: column; color: var(--cms-text-secondary); font-size: 0.875em; }
633
+ .cms-file-picker__summary .is-over { color: var(--cms-danger); }
634
+ .cms-file-picker__actions { display: flex; gap: var(--cms-space-2); margin-left: auto; }
635
+ @media (max-width: 599.98px) {
636
+ .cms-modal-scrim:has(.cms-file-picker) { padding: 0; }
637
+ .cms-modal.cms-file-picker { width: 100%; height: 100%; max-height: none; border: 0; border-radius: 0; }
638
+ .cms-file-picker__entry, .cms-file-picker__crumb, .cms-file-picker__chip, .cms-file-picker__space .cms-select { min-height: var(--cms-touch-target-min); }
639
+ .cms-file-picker__actions { width: 100%; }
640
+ .cms-file-picker__actions .cms-button { flex: 1 1 0; }
641
+ }