@k2b/cloud 0.24.0 → 0.25.0

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.
@@ -0,0 +1,169 @@
1
+ /* The shared file chooser (@k2b/cloud/browser/files). It opens in the workspace
2
+ frame, which takes the whole screen on phones. On wider screens it keeps one
3
+ fixed, smaller size, so moving between sources, folders, and states never
4
+ resizes or moves the frame. Unlayered, like the shared frame rules. */
5
+ @media (min-width: 48rem) {
6
+ .k2b-ui .k2b-dialog.k2b-panel-dialog-frame.cloud-file-chooser-dialog {
7
+ width: min(var(--k2b-dialog-available-width), 44rem);
8
+ height: min(40rem, 86dvh, var(--k2b-dialog-available-height));
9
+ }
10
+ }
11
+
12
+ .cloud-file-chooser {
13
+ display: contents;
14
+ }
15
+
16
+ /* Path and filter sit between header and body with the panel's own inset and
17
+ keep one height in every view. */
18
+ .cloud-file-chooser__toolbar {
19
+ display: flex;
20
+ flex-wrap: wrap;
21
+ align-items: center;
22
+ gap: 0.5rem 0.75rem;
23
+ padding: 0 var(--k2b-panel-dialog-inset) 0.75rem;
24
+ }
25
+
26
+ .cloud-file-chooser__crumbs {
27
+ display: flex;
28
+ flex: 1 1 18rem;
29
+ align-items: center;
30
+ gap: 0.25rem;
31
+ min-width: 0;
32
+ }
33
+
34
+ /* One line: a deep path scrolls sideways instead of wrapping and pushing the list down. */
35
+ .cloud-file-chooser__crumbs ol {
36
+ display: flex;
37
+ align-items: center;
38
+ gap: 0.125rem;
39
+ min-width: 0;
40
+ margin: 0;
41
+ padding: 0;
42
+ overflow-x: auto;
43
+ list-style: none;
44
+ scrollbar-width: none;
45
+ }
46
+
47
+ .cloud-file-chooser__crumbs li {
48
+ display: flex;
49
+ flex: none;
50
+ align-items: center;
51
+ gap: 0.25rem;
52
+ color: var(--k2b-text-muted);
53
+ }
54
+
55
+ .cloud-file-chooser__filter {
56
+ flex: 1 1 14rem;
57
+ max-width: 100%;
58
+ }
59
+
60
+ @media (min-width: 40rem) {
61
+ .cloud-file-chooser__filter {
62
+ flex: 0 0 14rem;
63
+ }
64
+ }
65
+
66
+ .cloud-file-chooser__icon {
67
+ font-size: 1.375rem;
68
+ color: var(--k2b-text-secondary);
69
+ }
70
+
71
+ .cloud-file-chooser__icon[data-selected="true"] {
72
+ color: var(--k2b-action);
73
+ }
74
+
75
+ .cloud-file-chooser__meta {
76
+ display: flex;
77
+ align-items: center;
78
+ gap: 0.375rem;
79
+ overflow: hidden;
80
+ white-space: nowrap;
81
+ }
82
+
83
+ .cloud-file-chooser__tag {
84
+ flex: none;
85
+ }
86
+
87
+ .cloud-file-chooser__state {
88
+ min-height: 100%;
89
+ }
90
+
91
+ .cloud-file-chooser__more {
92
+ display: flex;
93
+ flex-direction: column;
94
+ align-items: flex-start;
95
+ gap: 0.5rem;
96
+ padding: 0.75rem;
97
+ }
98
+
99
+ .cloud-file-chooser__more:empty {
100
+ display: none;
101
+ }
102
+
103
+ .cloud-file-chooser__downloads {
104
+ display: flex;
105
+ flex-direction: column;
106
+ gap: 1rem;
107
+ margin: 0;
108
+ padding: 0.25rem 0;
109
+ list-style: none;
110
+ }
111
+
112
+ .cloud-file-chooser__download-line {
113
+ display: flex;
114
+ align-items: baseline;
115
+ justify-content: space-between;
116
+ gap: 0.75rem;
117
+ margin-bottom: 0.375rem;
118
+ font-size: 0.875rem;
119
+ }
120
+
121
+ .cloud-file-chooser__download-name {
122
+ min-width: 0;
123
+ overflow: hidden;
124
+ text-overflow: ellipsis;
125
+ white-space: nowrap;
126
+ }
127
+
128
+ .cloud-file-chooser__download-state {
129
+ flex: none;
130
+ font-variant-numeric: tabular-nums;
131
+ color: var(--k2b-text-secondary);
132
+ }
133
+
134
+ .cloud-file-chooser__download-state[data-state="error"] {
135
+ color: var(--k2b-danger-text);
136
+ }
137
+
138
+ /* One line that gives way to the buttons: a longer status never wraps the footer and moves the body. */
139
+ .cloud-file-chooser__status {
140
+ flex: 1 1 0;
141
+ min-width: 0;
142
+ overflow: hidden;
143
+ font-size: 0.8125rem;
144
+ line-height: 1.25rem;
145
+ color: var(--k2b-text-secondary);
146
+ text-overflow: ellipsis;
147
+ white-space: nowrap;
148
+ }
149
+
150
+ /* Phones have no room beside the buttons: the status takes its own line above them. The line stays when it is
151
+ empty, so the footer keeps one height in every view. */
152
+ @media (max-width: 39.999rem) {
153
+ .cloud-file-chooser__status {
154
+ flex-basis: 100%;
155
+ min-height: 1.25rem;
156
+ }
157
+ }
158
+
159
+ /* Rows keep their own padding; pulling the list out by it lines icons up with the title and path. */
160
+ .cloud-file-chooser .k2b-file-grid {
161
+ margin-inline: -0.75rem;
162
+ }
163
+
164
+ .cloud-file-chooser__actions {
165
+ display: flex;
166
+ flex: none;
167
+ gap: 0.5rem;
168
+ margin-left: auto;
169
+ }
@@ -30,6 +30,7 @@
30
30
  @import "./effects.css";
31
31
  @import "./input.css";
32
32
  @import "./resource-search.css";
33
+ @import "./file-chooser.css";
33
34
 
34
35
  @theme {
35
36
  --color-dark: rgb(9 9 11);