@jsb188/css 1.1.11 → 1.1.13

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
@@ -13,6 +13,7 @@
13
13
 
14
14
  .form_cnt,
15
15
  .form_el input,
16
+ .form_el .form_select,
16
17
  .form_el textarea,
17
18
  .form_el .tx_virtualizer {
18
19
  padding: 0.58rem;
@@ -24,22 +25,37 @@ fieldset.form_cnt {
24
25
 
25
26
  .form_cnt.smaller,
26
27
  .form_el.smaller input,
28
+ .form_el.smaller .form_select,
27
29
  .form_el.smaller textarea,
28
30
  .form_el.smaller .tx_virtualizer {
29
31
  /* If less is needed, use .lh_1 .lh_2 to further flatten the height */
30
32
  padding: 0.32rem 6px;
31
33
  }
32
34
 
35
+ .form_cnt.tiny,
36
+ .form_el.tiny input,
37
+ .form_el.tiny .form_select,
38
+ .form_el.tiny textarea,
39
+ .form_el.tiny .tx_virtualizer {
40
+ padding: var(--form-tiny-padding-top, var(--form-tiny-padding-y, 2px)) var(--form-tiny-padding-x, 5px)
41
+ var(--form-tiny-padding-y, 2px);
42
+ }
43
+
33
44
  /* Input */
34
45
 
35
46
  .form_cnt.outline,
36
47
  .form_el input,
48
+ .form_el .form_select,
37
49
  .form_el textarea,
38
50
  .form_el .tx_virtualizer {
39
51
  border: solid 1px var(--color-darker-light);
40
52
  background-color: transparent;
41
53
  }
42
54
 
55
+ .form_el .form_select {
56
+ outline: 2px solid transparent;
57
+ }
58
+
43
59
  /* Invisible input (use this to make inputs clickable with separate render component) */
44
60
 
45
61
  .invis_input {
@@ -72,6 +88,35 @@ input.invis_input::-webkit-inner-spin-button {
72
88
  margin: 0;
73
89
  }
74
90
 
91
+ /* Number input with native increment and decrement controls hidden */
92
+
93
+ input.no_number_spinner[type="number"] {
94
+ appearance: textfield;
95
+ -moz-appearance: textfield;
96
+ }
97
+
98
+ input.no_number_spinner::-webkit-outer-spin-button,
99
+ input.no_number_spinner::-webkit-inner-spin-button {
100
+ -webkit-appearance: none;
101
+ margin: 0;
102
+ }
103
+
104
+ /* Input width follows its current value within the available container width */
105
+
106
+ .input_field_sizing {
107
+ field-sizing: content;
108
+ min-width: 1ch;
109
+ max-width: 100%;
110
+ }
111
+
112
+ /* Outlined input container shrink-wraps its field and trailing content */
113
+
114
+ .input_with_postfix {
115
+ display: inline-flex;
116
+ width: fit-content;
117
+ max-width: 100%;
118
+ }
119
+
75
120
  /* Native checkbox rendered as a toggle switch */
76
121
 
77
122
  input.toggle_switch {
@@ -88,6 +133,9 @@ input.toggle_switch {
88
133
  outline-color 0.125s ease-in-out;
89
134
  }
90
135
 
136
+ input.toggle_switch.av_xxxs {
137
+ --toggle-switch-height: calc(1.5rem * 0.7142857);
138
+ }
91
139
  input.toggle_switch.av_xs {
92
140
  --toggle-switch-height: calc(var(--av-xsmall) * 0.7142857);
93
141
  }
@@ -157,11 +205,14 @@ textarea.error:focus,
157
205
  }
158
206
 
159
207
  input:not(.stock):not(.toggle_switch):focus,
208
+ .form_select:focus,
209
+ .form_select.active,
160
210
  textarea:not(.stock):focus,
161
211
  [contenteditable="true"]:not(.stock):focus,
162
212
  .form_el input.focus:not(.toggle_switch),
163
213
  .form_el.focused textarea.form_el,
164
214
  .form_el.focused input:not(.toggle_switch),
215
+ .form_el.focused .form_select,
165
216
  .form_el.focused textarea,
166
217
  .form_el.error.focused .form_input,
167
218
  .form_el.focused .form_input.error {
@@ -171,6 +222,11 @@ textarea:not(.stock):focus,
171
222
  box-shadow: 0 0 40px rgba(var(--color-main), 0.1);
172
223
  }
173
224
 
225
+ input:is([type="checkbox"], [type="radio"]):focus:not(:focus-visible) {
226
+ outline: none;
227
+ box-shadow: none;
228
+ }
229
+
174
230
  .form_input:not(.disabled):not(.error):hover,
175
231
  .form_el:hover .form_input:not(.disabled):not(.error),
176
232
  .form_el_hv:hover {
@@ -178,6 +234,8 @@ textarea:not(.stock):focus,
178
234
  }
179
235
 
180
236
  input:not(.error):not(.disabled):not(.stock):not(.toggle_switch):focus,
237
+ .form_select:not(.error):not(.disabled):focus,
238
+ .form_select.active:not(.error):not(.disabled),
181
239
  textarea:not(.error):not(.disabled):not(.stock):focus,
182
240
  [contenteditable="true"]:not(.error):not(.disabled):not(.stock):focus,
183
241
  .form_input:not(.disabled):not(.error):focus:hover,
@@ -200,11 +258,7 @@ textarea.focus_bg:focus,
200
258
 
201
259
  .form_el:not(.disabled):hover .form_el_r,
202
260
  .form_el:not(.disabled).focused .form_el_r {
203
- background: linear-gradient(
204
- to left,
205
- var(--color-main-bg) 50%,
206
- rgba(var(--color-main), 0)
207
- ) !important;
261
+ background: linear-gradient(to left, var(--color-main-bg) 50%, rgba(var(--color-main), 0)) !important;
208
262
  }
209
263
 
210
264
  [contenteditable="true"]:empty:before {
@@ -212,7 +266,8 @@ textarea.focus_bg:focus,
212
266
  color: var(--color-text-light);
213
267
  }
214
268
 
215
- .form_el.c input {
269
+ .form_el.c input,
270
+ .form_el.c .form_select {
216
271
  text-align: center;
217
272
  }
218
273
 
@@ -225,7 +280,8 @@ textarea.focus_bg:focus,
225
280
 
226
281
  /* Input preset: subtle */
227
282
 
228
- .form_el.subtle input {
283
+ .form_el.subtle input,
284
+ .form_el.subtle .form_select {
229
285
  width: 120px;
230
286
  padding: 0.35rem;
231
287
  }
@@ -259,11 +315,14 @@ textarea.focus_bg:focus,
259
315
  left: 0;
260
316
  right: 0;
261
317
  visibility: hidden;
318
+ /* Match native textarea wrapping, including indentation and unbroken URLs. */
319
+ white-space: pre-wrap;
320
+ overflow-wrap: break-word;
262
321
  }
263
322
 
264
323
  .form_el .tx_virtualizer:after {
265
324
  /* This allows trailing empty line breaks to be calculated */
266
- content: ".";
325
+ content: " ";
267
326
  }
268
327
 
269
328
  /* Label */
@@ -273,7 +332,10 @@ label.form_el {
273
332
  color: var(--color-text-medium);
274
333
  }
275
334
 
276
- .form_el:has(input:focus) label {
335
+ .form_el.focused label,
336
+ .form_el:has(input:focus) label,
337
+ .form_el:has(.form_select:focus) label,
338
+ .form_el:has(.form_select.active) label {
277
339
  color: var(--color-text-bold);
278
340
  }
279
341
 
@@ -307,11 +369,12 @@ fieldset input[type="radio"] {
307
369
  bottom: 1px;
308
370
  width: 3.5rem;
309
371
  padding-left: 1.5rem;
310
- background: linear-gradient(
311
- to left,
312
- rgba(var(--color-bg), 1) 50%,
313
- rgba(var(--color-bg), 0)
314
- );
372
+ background: linear-gradient(to left, rgba(var(--color-bg), 1) 50%, rgba(var(--color-bg), 0));
373
+ }
374
+
375
+ .form_el.tiny.has_r .form_el_r {
376
+ width: 2.25rem;
377
+ padding-left: 0.15rem;
315
378
  }
316
379
 
317
380
  /* .active is for <PopOverButton /> active state, not ::active */
@@ -324,12 +387,15 @@ fieldset input[type="radio"] {
324
387
  /* Preset; none */
325
388
 
326
389
  .form_el.none input,
390
+ .form_el.none .form_select,
327
391
  .form_el.none textarea {
328
392
  border: none;
329
393
  background-color: transparent;
330
394
  }
331
395
 
332
396
  .form_el.none input:focus,
397
+ .form_el.none .form_select:focus,
398
+ .form_el.none .form_select.active,
333
399
  .form_el.none textarea:focus {
334
400
  box-shadow: none;
335
401
  }
@@ -337,6 +403,7 @@ fieldset input[type="radio"] {
337
403
  /* Preset: fill */
338
404
 
339
405
  .form_el.fill input,
406
+ .form_el.fill .form_select,
340
407
  .form_el.fill textarea {
341
408
  border: none;
342
409
  background-color: rgb(var(--color-bg-alt));
@@ -350,12 +417,8 @@ fieldset input[type="radio"] {
350
417
  padding: 0 0.42rem;
351
418
  }
352
419
 
353
- .stripe_form_line {
354
- padding-bottom: 0.5rem;
355
- border-bottom: solid 1px var(--color-darker-light);
356
- }
357
-
358
- .form_el.inside_outline input {
420
+ .form_el.inside_outline input,
421
+ .form_el.inside_outline .form_select {
359
422
  border: none;
360
423
  border-radius: 0;
361
424
  border-bottom: solid 1px var(--color-darker-light);
@@ -367,12 +430,15 @@ fieldset input[type="radio"] {
367
430
  transform: translateY(-0.1rem);
368
431
  }
369
432
 
370
- .form_el.inside_outline input:focus {
433
+ .form_el.inside_outline input:focus,
434
+ .form_el.inside_outline .form_select:focus,
435
+ .form_el.inside_outline .form_select.active {
371
436
  box-shadow: none;
372
437
  border-bottom-color: var(--color-text-bold);
373
438
  }
374
439
 
375
- .form_el.inside_outline.error input {
440
+ .form_el.inside_outline.error input,
441
+ .form_el.inside_outline.error .form_select {
376
442
  border-bottom-color: rgb(var(--color-error-active));
377
443
  }
378
444
 
@@ -533,6 +599,12 @@ a.btn.outline {
533
599
 
534
600
  /* Button sizes */
535
601
 
602
+ .btn.xs {
603
+ min-width: 48px;
604
+ padding: 0.3rem 0.4rem;
605
+ border-radius: var(--radius-small);
606
+ }
607
+
536
608
  .btn.sm {
537
609
  min-width: 52px;
538
610
  padding: 0.35rem 0.45rem;
@@ -550,6 +622,11 @@ a.btn.outline {
550
622
  border-radius: var(--radius-small-wrap);
551
623
  }
552
624
 
625
+ .btn.md.ft_md,
626
+ .btn.md.ft_lg {
627
+ padding-bottom: 0.8rem;
628
+ }
629
+
553
630
  .btn.lg {
554
631
  padding: 0.9rem 1.2rem 0.9rem;
555
632
  border-radius: var(--radius-small-wrap);
package/css/layout.css CHANGED
@@ -42,16 +42,30 @@ body.p_auth {
42
42
 
43
43
  .mw.centered_big {
44
44
  flex: 1;
45
- max-height: 800px;
45
+ max-height: 900px;
46
46
  max-width: 1440px;
47
47
  }
48
48
 
49
49
  /* Medium, centered modal page */
50
50
 
51
- .mw.centered_medium {
51
+ .mw.centered_medium_wide {
52
52
  flex: 1;
53
53
  max-height: 600px;
54
- max-width: 1080px;
54
+ max-width: 1060px;
55
+ }
56
+
57
+ .mw.centered_medium_tall {
58
+ flex: 1;
59
+ max-height: 900px;
60
+ max-width: 1060px;
61
+ }
62
+
63
+ /* Small, centered modal page */
64
+
65
+ .mw.centered_small_tall {
66
+ flex: 1;
67
+ max-height: 900px;
68
+ max-width: 780px;
55
69
  }
56
70
 
57
71
  /* Top-fixed position modal content wrappers */
@@ -194,7 +208,7 @@ body.p_auth {
194
208
  /* Content with right <aside /> sticky sidebar */
195
209
 
196
210
  .w_app_side {
197
- margin-right: var(--aside-wt);
211
+ padding-right: var(--aside-wt);
198
212
  }
199
213
 
200
214
  .app_aside {
@@ -204,6 +218,17 @@ body.p_auth {
204
218
  padding-top: var(--toolbar-ht);
205
219
  }
206
220
 
221
+ /* Account for the toolbar's additional 40px filters row. */
222
+ .app_aside.with_toolbar_filters {
223
+ padding-top: calc(var(--toolbar-ht) + 40px);
224
+ }
225
+
226
+ @media (--gte-mobile-landscape) {
227
+ .app_aside:not(.without_scrollbar) {
228
+ right: var(--app-scrollbar-size);
229
+ }
230
+ }
231
+
207
232
  /* Floating message */
208
233
 
209
234
  .floating_msg_cnt {
@@ -313,6 +338,8 @@ body.p_auth {
313
338
  /* App layout; main content (scroll area) */
314
339
 
315
340
  .app_scr {
341
+ --app-scrollbar-size: 19px;
342
+
316
343
  /* position: relative; */
317
344
  overflow-x: hidden;
318
345
  overflow-y: scroll;
@@ -326,7 +353,7 @@ body.p_auth {
326
353
  overflow-x: scroll;
327
354
  }
328
355
 
329
- .app_scr.of_x.auto_x {
356
+ .app_scr.auto_x {
330
357
  overflow-x: auto;
331
358
  }
332
359
 
@@ -338,7 +365,6 @@ body.p_auth {
338
365
  @media (--gte-mobile-portrait) {
339
366
  .app_scr {
340
367
  -webkit-overflow-scrolling: touch;
341
- /* scroll-behavior: smooth; */
342
368
  /* After a recent update, this no longer works in Chrome */
343
369
  /* overflow-y: overlay; */
344
370
  scrollbar-gutter: auto;
@@ -351,8 +377,8 @@ body.p_auth {
351
377
 
352
378
  .app_scr::-webkit-scrollbar {
353
379
  /* This size must match SHEET_CANVAS_APP_SCROLLBAR_SIZE in @jsb188:sheet/src/modules/Sheet-Controller.tsx. */
354
- width: 19px;
355
- height: 19px;
380
+ width: var(--app-scrollbar-size);
381
+ height: var(--app-scrollbar-size);
356
382
  background-color: rgb(var(--color-bg));
357
383
  }
358
384
 
package/css/loading.css CHANGED
@@ -15,10 +15,18 @@
15
15
  .dot {
16
16
  width: 0.3rem;
17
17
  height: 0.3rem;
18
- margin: 0 0.35rem;
19
18
  }
20
19
 
21
- .dot.tn {
20
+ .dot.xxs {
21
+ /* 4px */
22
+ width: 0.25rem;
23
+ height: 0.25rem;
24
+ /* 3px */
25
+ /*width: 0.21875rem;*/
26
+ /*height: 0.21875rem;*/
27
+ }
28
+
29
+ .dot.xs {
22
30
  width: 0.3rem;
23
31
  height: 0.3rem;
24
32
  margin: 0 0.09rem;
@@ -51,7 +59,7 @@
51
59
  .activity .dot {
52
60
  opacity: 1;
53
61
  flex-shrink: 0;
54
- background-color: var(--color-text);
62
+ background-color: var(--color-text-bold);
55
63
  }
56
64
 
57
65
  .bg_err .dot,
package/css/misc.css CHANGED
@@ -1,80 +1,7 @@
1
- /* Themes container */
2
-
3
- .themes_cnt {
4
- /* -10 for item padding; -5 for border */
5
- margin: 2rem -15px;
6
- }
7
-
8
- /* Boxed item */
9
-
10
- .box_item {
11
- position: relative;
12
- width: 118px;
13
- padding: 9px;
14
- margin: 8px 8px 0;
15
- border: solid 5px transparent;
16
- }
17
-
18
- .box_item:disabled {
19
- cursor: not-allowed;
20
- }
21
-
22
- .box_item:hover {
23
- background-color: rgb(var(--color-bg-alt));
24
- }
25
-
26
- .box_item.sel {
27
- border-color: rgb(var(--color-bg-alt));
28
- }
29
-
30
- .box_item.sel:hover {
31
- border-color: rgb(var(--color-bg-active));
32
- }
33
-
34
- /* Circle inside box item */
35
-
36
- .cl_circle {
37
- width: 70px;
38
- height: 70px;
39
- border-radius: 50%;
40
- background-size: 125% auto;
41
- background-position: 50% 25%;
42
- }
43
-
44
- /* Icon inside circle svg */
45
-
46
- .box_item .icon_cnt {
47
- position: absolute;
48
- top: 9px;
49
- left: 15px;
50
- right: 15px;
51
- /* This size is hard-coded to the SVG circle size in [MiscElements.tsx] */
52
- height: 70px;
53
- }
54
-
55
- /* Close icon */
56
-
57
- .box_item .close {
58
- position: absolute;
59
- top: -11px;
60
- right: -11px;
61
- }
62
-
63
1
  /* Shorcut key button */
64
2
 
65
3
  .shortcut {
66
4
  display: inline-block;
67
5
  padding: 3px 6px 2px;
68
- margin: 0 7px;
69
6
  border-radius: 5px;
70
- transform: translateY(-1px);
71
- box-shadow: 0 0 0 1px var(--color-solid-hover);
72
- }
73
-
74
- .shortcut:first-child {
75
- margin-left: 0;
76
- }
77
-
78
- .shortcut:last-child {
79
- margin-right: 0;
80
7
  }
package/css/modal.css CHANGED
@@ -1,15 +1,3 @@
1
- /* Modal content container */
2
-
3
- .mw_content {
4
- flex: 1;
5
- height: 100%;
6
- overflow-y: auto;
7
- }
8
-
9
- .mw_content.w_pad {
10
- padding-bottom: 3.5rem;
11
- }
12
-
13
1
  /* Themed container */
14
2
 
15
3
  .mw_themed {
@@ -82,31 +70,6 @@
82
70
  background-color: rgba(var(--color-darker-rgb), 0.1);
83
71
  }
84
72
 
85
- /* Modal side nav */
86
-
87
- .mw_snav {
88
- align-self: stretch;
89
- width: 270px;
90
- padding: var(--rem-large) 0 var(--rem-large) 40px;
91
- }
92
-
93
- /* Modal save button */
94
-
95
- .mfs_cnt {
96
- position: absolute;
97
- bottom: 0;
98
- left: 286px; /* 270px + 16px */
99
- right: 16px;
100
- transform: translateY(100%);
101
- transition: transform ease 0.15s;
102
- padding: 0.75rem;
103
- }
104
-
105
- .mfs_cnt.active {
106
- box-shadow: var(--shadow-float-full);
107
- transform: translateY(0);
108
- }
109
-
110
73
  /* Update notes */
111
74
 
112
75
  .mw_content_title {
package/css/popover.css CHANGED
@@ -19,7 +19,7 @@
19
19
  }
20
20
 
21
21
  .popover.default .tooltip:not(.w_override) {
22
- max-width: 225px;
22
+ max-width: 200px;
23
23
  }
24
24
 
25
25
  /* Pop over; list */
@@ -54,14 +54,9 @@
54
54
  right: 0;
55
55
  padding: 5px 0.4rem 8px;
56
56
  margin-bottom: 0.3rem;
57
- }
58
-
59
- .po_subtitle_cover {
60
- position: absolute;
61
- top: -5px;
62
- left: 0;
63
- right: 0;
64
- height: 5px;
57
+ box-shadow:
58
+ 0 -5px 0 rgb(var(--color-bg)),
59
+ 0 0 7px rgb(var(--color-bg));
65
60
  }
66
61
 
67
62
  /* Pop over; list item */
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@jsb188/css",
3
- "version": "1.1.11",
3
+ "version": "1.1.13",
4
4
  "description": "Re-usable, base CSS styles for any app (NOTE: Bring your own variables).",
5
- "license": "ISC",
5
+ "license": "MIT",
6
6
  "author": "jsb188",
7
7
  "type": "module",
8
8
  "exports": {
@@ -20,5 +20,15 @@
20
20
  "scripts": {
21
21
  "gen:responsive-css": "node ./scripts/generateResponsiveCss.js",
22
22
  "test": "echo \"Error: no test specified\" && exit 1"
23
- }
23
+ },
24
+ "peerDependencies": {},
25
+ "files": [
26
+ "css/**/*.{ts,tsx,css,svg}",
27
+ "scripts/generateResponsiveCss.js",
28
+ "!**/*.test.*",
29
+ "!**/*.spec.*",
30
+ "!**/tests/**",
31
+ "!**/*.md",
32
+ "!**/.DS_Store"
33
+ ]
24
34
  }