@jsb188/css 1.1.4 → 1.1.6

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/css/form.css CHANGED
@@ -4,7 +4,10 @@
4
4
  .form_el {
5
5
  display: flex;
6
6
  flex-direction: column;
7
- /* margin-top: .35rem; */
7
+ }
8
+
9
+ .no_resize {
10
+ resize: none;
8
11
  }
9
12
 
10
13
  /* Form containers - same padding for all form elements */
@@ -14,29 +17,85 @@
14
17
  padding: .58rem;
15
18
  }
16
19
 
20
+ .form_cnt.smaller,
21
+ .form_el.smaller input, .form_el.smaller textarea, .form_el.smaller .tx_virtualizer {
22
+ /* If less is needed, use .lh_1 .lh_2 to further flatten the height */
23
+ padding: .32rem 6px;
24
+ }
25
+
17
26
  /* Input */
18
27
 
19
28
  .form_cnt.outline,
20
29
  .form_el input, .form_el textarea, .form_el .tx_virtualizer {
21
- border: solid 1px var(--color-text-light);
30
+ border: solid 1px var(--color-darker-light);
22
31
  background-color: transparent;
23
- /* opacity: .2; */
24
- /* box-shadow: 0 2px 4px var(--color-main), 0 4px 10px var(--color-main); */
32
+ }
33
+
34
+ /* Invisible input (use this to make inputs clickable with separate render component) */
35
+
36
+ .invis_input {
37
+ border: none;
38
+ padding: 0; margin: 0;
39
+ color: rgba(0,0,0,0);
40
+ background-color: rgba(0,0,0,0);
41
+ }
42
+
43
+ .invis_input:focus {
44
+ outline: none;
45
+ }
46
+
47
+ .invis_input::selection {
48
+ background: rgba(0,0,0,0);
49
+ color: rgba(0,0,0,0);
50
+ }
51
+
52
+ input.invis_input[type="number"] {
53
+ appearance: none;
54
+ -webkit-appearance: none;
55
+ -moz-appearance: textfield;
56
+ }
57
+
58
+ input.invis_input::-webkit-outer-spin-button,
59
+ input.invis_input::-webkit-inner-spin-button {
60
+ -webkit-appearance: none;
61
+ margin: 0;
25
62
  }
26
63
 
27
64
  /* Input */
28
65
 
29
66
  .form_el input::placeholder, .form_el textarea::placeholder {
30
- color: var(--color-text-medium);
67
+ color: var(--color-text-light);
31
68
  }
32
69
 
33
70
  .form_el input:focus, .form_el textarea:focus, [contenteditable='true']:focus {
34
71
  outline: none;
35
72
  }
36
73
 
37
- .form_el input:focus, .form_el textarea:focus {
38
- /* Consider adding theme colors here */
39
- box-shadow: var(--shadow-light);
74
+ /* .focus_shadow input:focus, .focus_shadow textarea:focus, .focus_shadow [contenteditable='true']:focus {
75
+ box-shadow: 0 0 20px rgba(0,0,0,.05);
76
+ box-shadow: 0 0 40px rgba(var(--color-main),.15), 0 0 1px rgba(0,0,0,.32);
77
+ } */
78
+
79
+ .form_not_allowed input, .form_not_allowed textarea, .form_not_allowed [role="button"] {
80
+ cursor: not-allowed !important;
81
+ }
82
+
83
+ .form_el:hover .form_input:not(.disabled):not(.error) {
84
+ background-color: rgba(var(--color-main), .04) !important;
85
+ }
86
+
87
+ .form_el .form_input:not(.error):not(.disabled):focus, .form_el:not(.error):not(.disabled):hover .form_input:not(.error):not(.disabled):focus,
88
+ .form_el.focused .form_input:not(.error):not(.disabled) {
89
+ background-color: rgba(var(--color-main), .075) !important;
90
+ }
91
+
92
+ .form_el:not(.disabled):hover .form_el_r,
93
+ .form_el:not(.disabled).focused .form_el_r {
94
+ background: linear-gradient(to left, var(--color-main-bg) 50%, rgba(var(--color-main), 0)) !important;
95
+ }
96
+
97
+ .form_el .form_input:not(.disabled):not(.error):focus, .form_el.focused .form_input:not(.disabled):not(.error) {
98
+ border-color: var(--color-text-default) !important;
40
99
  }
41
100
 
42
101
  [contenteditable='true']:empty:before {
@@ -44,50 +103,29 @@
44
103
  color: var(--color-text-light);
45
104
  }
46
105
 
47
- .form_el.error input {
48
- border-color: rgb(var(--color-error));
49
- background-color: rgb(var(--color-error-faded));
106
+ .form_el.error .form_input, .form_el .form_input.error {
107
+ border-color: rgb(var(--color-error)) !important;
108
+ background-color: rgba(var(--color-error-faded), .1) !important;
50
109
  }
51
110
 
52
111
  .form_el.c input {
53
112
  text-align: center;
54
113
  }
55
114
 
56
- /* Input: subtle */
115
+ /* Input preset: lighter */
116
+ .form_el.lighter .form_input, .form_el.lighter .tx_virtualizer {
117
+ border: solid 1px var(--color-darker-light);
118
+ }
119
+
120
+ /* Input preset: subtle */
57
121
 
58
122
  .form_el.subtle input {
59
123
  width: 120px;
60
124
  padding: .35rem;
61
125
  }
62
126
 
63
- /* Use this for file input click, etc */
64
-
65
- .invis_input {
66
- visibility: hidden;
67
- position: absolute;
68
- }
69
-
70
127
  /* Textarea */
71
128
 
72
- .form_el textarea {
73
- position: relative;
74
- z-index: 1;
75
- min-height: 150px;
76
- }
77
-
78
- .form_el.in_modal textarea {
79
- width: 300px;
80
- max-width: 100%;
81
- resize: none;
82
- }
83
-
84
- .form_el.in_modal_large textarea {
85
- width: 375px;
86
- max-width: 100%;
87
- min-height: 400px;
88
- resize: none;
89
- }
90
-
91
129
  .form_el.fs textarea {
92
130
  width: 100% !important;
93
131
  }
@@ -105,6 +143,14 @@
105
143
 
106
144
  /* Label */
107
145
 
146
+ .form_el label {
147
+ color: var(--color-text-medium);
148
+ }
149
+
150
+ .form_el:has(input:focus) label {
151
+ color: var(--color-text-bold);
152
+ }
153
+
108
154
  .form_el label .label_r .icon {
109
155
  transform: translateY(1px);
110
156
  }
@@ -137,36 +183,20 @@ fieldset input[type="radio"] {
137
183
 
138
184
  /* Clickable button at right; use this for inputs */
139
185
 
140
- .form_el.has_r input {
141
- padding-right: 3rem;
142
- }
143
-
144
186
  .form_el.has_r .form_el_r {
145
- position: absolute;
146
- top: 0; right: 0; bottom: 0;
147
- width: 3rem;
148
- padding-left: .5rem;
149
- }
150
-
151
- .form_el.has_r .form_el_r.a_r {
152
- width: 3rem;
153
- text-decoration: underline;
154
- padding-left: 0;
155
- padding-right: .5875rem;
156
- }
157
-
158
- .form_el_r {
159
- color: var(--color-text-medium);
187
+ position:absolute;
188
+ top: 1px; right: 1px; bottom: 1px;
189
+ width: 3.5rem;
190
+ padding-left: 1.5rem;
191
+ background: linear-gradient(to left, rgba(var(--color-bg), 1) 50%, rgba(var(--color-bg), 0));
160
192
  }
161
193
 
162
- .form_el_r:hover {
194
+ /* .active is for <PopOverButton /> active state, not ::active */
195
+ .active .form_el_r,
196
+ .focused .form_el_r, .form_el_r.btn:hover {
163
197
  color: var(--color-text);
164
198
  }
165
199
 
166
- .btn:active:not(:disabled) {
167
- transform: translateY(1px);
168
- }
169
-
170
200
  /* Preset; none */
171
201
 
172
202
  .form_el.none input, .form_el.none textarea {
@@ -182,27 +212,10 @@ fieldset input[type="radio"] {
182
212
 
183
213
  .form_el.fill input, .form_el.fill textarea {
184
214
  border: none;
185
- background-color: var(--color-bg-alt);
215
+ background-color: rgb(var(--color-bg-alt));
186
216
  /* border-radius: var(--radius-default); */
187
217
  }
188
218
 
189
- /* Preset: fill large */
190
-
191
- .form_el.fill_large input {
192
- border: none;
193
- background-color: var(--color-reverse-opaque);
194
- padding: var(--rem-default);
195
- font-size: var(--text-xlarge);
196
- }
197
-
198
- .form_el.fill_large.has_r input {
199
- padding-right: 3.25rem;
200
- }
201
-
202
- .form_el.fill_large.has_r .form_el_r {
203
- right: .5rem;
204
- }
205
-
206
219
  /* Preset: inside outline container */
207
220
 
208
221
  .form_el.inside_outline {
@@ -212,14 +225,14 @@ fieldset input[type="radio"] {
212
225
 
213
226
  .stripe_form_line {
214
227
  padding-bottom: .5rem;
215
- border-bottom: solid 1px var(--color-text-light);
228
+ border-bottom: solid 1px var(--color-darker-light);
216
229
  }
217
230
 
218
231
  .form_el.inside_outline input {
219
232
  border: none;
220
233
  border-radius: 0;
221
- border-bottom: solid 1px var(--color-text-light);
222
- /* background-color: var(--color-bg-alt); */
234
+ border-bottom: solid 1px var(--color-darker-light);
235
+ /* background-color: rgb(var(--color-bg-alt)); */
223
236
  padding-top: 0; padding-left: 0; padding-right: 0;
224
237
  margin-bottom: .05rem;
225
238
  transform: translateY(-.1rem);
@@ -255,7 +268,7 @@ fieldset input[type="radio"] {
255
268
  height: 2.64em;
256
269
  padding: 0 var(--rem-small);
257
270
  /* border-bottom-width: 4px; */
258
- /* background-color: var(--color-bg); */
271
+ /* background-color: rgb(var(--color-bg)); */
259
272
  }
260
273
 
261
274
  .btn.full {
@@ -267,7 +280,7 @@ fieldset input[type="radio"] {
267
280
  }
268
281
 
269
282
  .btn.fw:hover:not(:disabled), .btn.fw:active:not(:disabled) {
270
- background-color: var(--color-bg-alt);
283
+ background-color: rgb(var(--color-bg-alt));
271
284
  }
272
285
 
273
286
  .btn.fw:active:not(:disabled) {
@@ -287,7 +300,7 @@ fieldset input[type="radio"] {
287
300
  background-color: var(--color-solid-hover) !important;
288
301
  }
289
302
 
290
- .btn.em:active, .btn.em:disabled {
303
+ .btn.em:active, .btn.em:disabled, .btn.em.disabled {
291
304
  transform: translateY(2px);
292
305
  box-shadow: none;
293
306
  }
@@ -296,7 +309,7 @@ fieldset input[type="radio"] {
296
309
  background-color: var(--color-solid-active) !important;
297
310
  }
298
311
 
299
- .btn.em:disabled {
312
+ .btn.em:disabled, .btn.em.disabled {
300
313
  background-color: var(--color-solid-hover) !important;
301
314
  }
302
315
 
@@ -306,31 +319,41 @@ fieldset input[type="radio"] {
306
319
  background-color: rgba(0,0,0,.1);
307
320
  }
308
321
 
309
- .btn.subtle:disabled {
322
+ .btn.subtle:disabled, .btn.subtle.disabled {
310
323
  color: var(--color-text-medium);
311
324
  }
312
325
 
313
- .btn.subtle:not(:disabled):hover, .btn.cl_err:not(:disabled):hover {
326
+ .btn.subtle:not(:disabled):not(.disabled):hover, .btn.cl_err:not(:disabled):not(.disabled):hover {
314
327
  background-color: rgba(0,0,0,.2);
315
328
  }
316
329
 
317
- .btn.subtle:not(:disabled):active, .btn.cl_err:not(:disabled):active {
330
+ .btn.subtle:not(:disabled):not(.disabled):active, .btn.cl_err:not(:disabled):not(.disabled):active {
318
331
  background-color: rgba(0,0,0,.25);
319
332
  }
320
333
 
321
334
  /* Outline */
322
335
 
323
336
  .btn.outline {
324
- border: solid 2px var(--color-text-light);
325
- background-color: var(--color-bg-alt);
337
+ border: solid 2px var(--color-darker-light);
338
+ background-color: rgb(var(--color-bg-alt));
339
+ }
340
+
341
+ .btn.outline:not(:disabled):not(.disabled):hover {
342
+ background-color: rgb(var(--color-bg-active));
343
+ }
344
+
345
+ .btn.outline:not(:disabled):not(.disabled):active {
346
+ background-color: rgb(var(--color-bg-medium));
326
347
  }
327
348
 
328
- .btn.outline:not(:disabled):hover {
329
- background-color: var(--color-bg-active);
349
+ /* Subtle outline */
350
+
351
+ .btn.outline_subtle {
352
+ box-shadow: inset 0 0 0 2px var(--color-darker-light);
330
353
  }
331
354
 
332
- .btn.outline:not(:disabled):active {
333
- background-color: var(--color-bg-medium);
355
+ .btn.outline_subtle:not(:disabled):not(.disabled):hover {
356
+ background-color: var(--color-darker-soft);
334
357
  }
335
358
 
336
359
  /* Inline button */
@@ -344,12 +367,14 @@ fieldset input[type="radio"] {
344
367
  /* Button sizes */
345
368
 
346
369
  .btn.sm {
347
- padding: .3rem .45rem;
370
+ min-width: 52px;
371
+ padding: .35rem .45rem;
348
372
  border-radius: var(--radius-small);
349
373
  }
350
374
 
351
375
  .btn.df {
352
- padding: .58rem;
376
+ min-width: 58px;
377
+ padding: .5rem .64rem;
353
378
  border-radius: var(--radius-small);
354
379
  }
355
380
 
@@ -363,38 +388,6 @@ fieldset input[type="radio"] {
363
388
  border-radius: var(--radius-small-wrap);
364
389
  }
365
390
 
366
- /* Form break */
367
-
368
- .form_break {
369
- position: relative;
370
- color: var(--color-text-medium);
371
- }
372
-
373
- .form_break .line:before {
374
- content: '.';
375
- color: transparent;
376
- }
377
-
378
- .form_break .text:before, .form_break .text:after, .form_break .line:after {
379
- content: ' ';
380
- position: absolute;
381
- top: 50%;
382
- height: 1px;
383
- background-color: var(--color-text-light);
384
- }
385
-
386
- .form_break .line:after {
387
- left: 0; right: 0;
388
- }
389
-
390
- .form_break .text:before {
391
- left: 0; right: 57%;
392
- }
393
-
394
- .form_break .text:after {
395
- left: 57%; right: 0;
396
- }
397
-
398
391
  /* Side input button */
399
392
 
400
393
  .form_input_btn {
@@ -436,8 +429,8 @@ fieldset input[type="radio"] {
436
429
  }
437
430
 
438
431
  .ib_label .icon {
439
- margin: -5px -4px -3px;
440
- font-size: 1.6em;
432
+ font-size: 1rem;
433
+ margin: -4px -2px;
441
434
  }
442
435
 
443
436
  .ib_label .indicator {
@@ -469,7 +462,7 @@ fieldset input[type="radio"] {
469
462
 
470
463
  /* Color indicators */
471
464
 
472
- .indicator {
465
+ .ib_label .indicator, .color_indicator {
473
466
  width: 10px;
474
467
  /*
475
468
  height: 1em;
@@ -477,4 +470,4 @@ fieldset input[type="radio"] {
477
470
  */
478
471
  height: 14px;
479
472
  border-radius: 3px;
480
- }
473
+ }
package/css/layout.css CHANGED
@@ -2,7 +2,7 @@
2
2
  /* Route based styles */
3
3
 
4
4
  body.p_auth {
5
- background-color: var(--color-bg-alt);
5
+ background-color: rgb(var(--color-bg-alt));
6
6
  }
7
7
 
8
8
  /* Content & Modal wrapper */
@@ -13,6 +13,33 @@ body.p_auth {
13
13
  margin-right: auto;
14
14
  }
15
15
 
16
+ .mw {
17
+ max-height: calc(100vh - 50px);
18
+ /* max-height: calc(100vh - var(--rem-medium) - var(--rem-medium)); */
19
+ }
20
+
21
+ .mw .scr_area {
22
+ /* 45px is the height of modal header toolbar */
23
+ max-height: calc(100vh - 50px - 45px);
24
+ /* max-height: calc(100vh - var(--rem-medium) - var(--rem-medium) - 45px); */
25
+ }
26
+
27
+ .mw_adjust_center {
28
+ padding-top: calc(25px * 2);
29
+ /* padding-top: calc(var(--rem-medium) * 2); */
30
+ }
31
+
32
+ .mw_adjust_center .mw {
33
+ /* This hides the bottom rounded corners */
34
+ max-height: calc(100vh - 50px + 14px);
35
+ /* max-height: calc(100vh - var(--rem-medium) - var(--rem-medium) + 14px); */
36
+ }
37
+
38
+ .mw_adjust_center .mw .scr_area {
39
+ /* 45px is the height of modal header toolbar */
40
+ max-height: calc(100vh - 50px - 31px);
41
+ }
42
+
16
43
  .cw.tn, .mw.tn {
17
44
  /* was .tiny */
18
45
  max-width: 380px;
@@ -36,6 +63,10 @@ body.p_auth {
36
63
  }
37
64
 
38
65
  .cw.lg, .mw.lg {
66
+ max-width: 1280px;
67
+ }
68
+
69
+ .cw.xl, .mw.xl {
39
70
  max-width: 1440px;
40
71
  }
41
72
 
@@ -51,14 +82,14 @@ body.p_auth {
51
82
  /* Sidebar */
52
83
 
53
84
  .w_lsidebar {
54
- padding-right: var(--sidebar-wt);
85
+ padding-right: var(--sidebar-wt);
55
86
  }
56
87
 
57
88
  /* Content with right <aside /> sticky sidebar */
58
89
 
59
- .pg_aside {
90
+ .app_aside {
60
91
  width: var(--aside-wt);
61
- top: var(--rem-medium);
92
+ top: 0;
62
93
  }
63
94
 
64
95
  /* Floating message */
@@ -77,3 +108,101 @@ body.p_auth {
77
108
  .floating_msg {
78
109
  margin: 0 -1rem;
79
110
  }
111
+
112
+ /* Helpers, to work with layout variables */
113
+
114
+ .min_h_toolbar_screen {
115
+ min-height: calc(100vh - var(--toolbar-ht));
116
+ }
117
+
118
+ .max_h_toolbar_screen {
119
+ max-height: calc(100vh - var(--toolbar-ht));
120
+ }
121
+
122
+ /* App layout; toolbar title */
123
+
124
+ #app_toolbar_title {
125
+ height: var(--toolbar-ht);
126
+ flex-shrink: 0;
127
+ }
128
+
129
+ /* App layout; account nav */
130
+
131
+ #app_toolbar_right {
132
+ position: absolute;
133
+ top: 0; right: 0; z-index: 50;
134
+ height: var(--toolbar-ht);
135
+ }
136
+
137
+ /* App layout; sidebar */
138
+
139
+ #app_sidebar {
140
+ position: relative;
141
+ width: var(--sidebar-wt);
142
+ transition: width ease .2s;
143
+ }
144
+
145
+ .app_sidebar_inside {
146
+ position: absolute;
147
+ top: 0;
148
+ left: 0;
149
+ bottom: 0;
150
+ width: var(--sidebar-wt);
151
+ transition: left ease .2s;
152
+ }
153
+
154
+ .app_sidebar_inside_width {
155
+ width: calc(var(--sidebar-wt) - 27px);
156
+ }
157
+
158
+ /* App layout; sidebar mobile responsive design */
159
+
160
+ @media (max-width: 1024px) {
161
+ #app_sidebar {
162
+ width: 0;
163
+ }
164
+ }
165
+
166
+ /* App layout; main content (scroll area) */
167
+
168
+ .app_scr {
169
+ /* position: relative; */
170
+ overflow-x: hidden;
171
+ overflow-y: scroll;
172
+ -webkit-overflow-scrolling: touch;
173
+ /* scroll-behavior: smooth; */
174
+ /* After a recent update, this no longer works in Chrome */
175
+ /* overflow-y: overlay; */
176
+ scrollbar-gutter: auto;
177
+ /* In "new" Google Chrome, this will make the scrollbar invisible, so we must turn it off. */
178
+ /* scrollbar-width: thin; */
179
+
180
+ /* This is for bottom-up chat style virtualized list */
181
+ overflow-anchor: none;
182
+ }
183
+
184
+ .app_scr::-webkit-scrollbar {
185
+ width: 18px;
186
+ /* background-color: rgb(var(--color-bg-alt)); */
187
+ }
188
+
189
+ .app_scr::-webkit-scrollbar-track {
190
+ box-shadow: inset 0 0 0 5px rgb(var(--color-bg));
191
+ border-radius: 9px;
192
+ }
193
+
194
+ .app_scr::-webkit-scrollbar-thumb {
195
+ z-index: -1;
196
+ /* Use this for invisible style */
197
+ /* background-color: rgb(var(--color-bg-active)); */
198
+ background-color: transparent;
199
+ box-shadow: inset 0 0 0 5px rgb(var(--color-bg));
200
+ /* transform: scale(.5); */
201
+ border-radius: 9px;
202
+ min-height: 100px;
203
+ }
204
+
205
+ .app_scr:hover::-webkit-scrollbar-thumb {
206
+ /* background-color: rgb(var(--color-bg-medium)); */
207
+ background-color: rgb(var(--color-bg-active));
208
+ }