@jsb188/css 1.0.1

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/modal.css ADDED
@@ -0,0 +1,233 @@
1
+
2
+ /* Modal content container */
3
+
4
+ .mw_content {
5
+ flex: 1;
6
+ height: 100%;
7
+ }
8
+
9
+ .mw_content.w_pad {
10
+ padding-bottom: 3.5rem;
11
+ }
12
+
13
+ /* Themed container */
14
+
15
+ .mw_themed {
16
+ position: relative;
17
+ padding: 4px;
18
+ }
19
+
20
+ .mw_themed .inside.small {
21
+ width: 220px;
22
+ }
23
+
24
+ .mw_themed .inside.big {
25
+ width: 75vw;
26
+ max-width: 1000px;
27
+ }
28
+
29
+ /* Call; different interfaces */
30
+
31
+ .mw_themed.call_invite .inside {
32
+ padding: 1.75rem 1rem 1.75rem;
33
+ }
34
+
35
+ .call_active .inside {
36
+ display: flex;
37
+ flex-direction: column;
38
+ align-items: stretch;
39
+ }
40
+
41
+ .mw_themed.call_invite .inside,
42
+ .mw_themed.call_active .inside {
43
+ /* Must be slightly less than small radius */
44
+ border-radius: 5px;
45
+ background-color: var(--color-solid);
46
+ color: var(--color-contrast);
47
+ }
48
+
49
+ .mw_themed.call_active .call_controls {
50
+ padding: 8px;
51
+ border-bottom: solid 1px var(--color-solid-hover);
52
+ }
53
+
54
+ /* Normal themed container inside modal */
55
+
56
+ .mw_themed.normal {
57
+ /* Same radius as outer modal container */
58
+ border-radius: var(--radius-default);
59
+ align-self: stretch;
60
+ }
61
+
62
+ .mw_themed.normal .inside {
63
+ /* Same radius as outer modal container */
64
+ border-radius: 10px;
65
+ background-color: var(--color-bg);
66
+ }
67
+
68
+ /* Modal header */
69
+
70
+ .mw_header {
71
+ position: relative;
72
+ height: 4.5rem;
73
+ margin-bottom: .3125rem; /* 5px */
74
+ }
75
+
76
+ .mw_desc {
77
+ max-width: 580px;
78
+ }
79
+
80
+ /* Modal side nav */
81
+
82
+ .mw_snav {
83
+ align-self: stretch;
84
+ width: 240px;
85
+ padding: var(--rem-large) 0 var(--rem-large) 40px;
86
+ }
87
+
88
+ .mw_snav .msn_list {
89
+ list-style: none;
90
+ padding: var(--rem-default);
91
+ margin: 0;
92
+ }
93
+
94
+ /* Normal item */
95
+
96
+ .mw_snav .msn_item {
97
+ position: relative;
98
+ padding: .3rem .5rem;
99
+ margin: 0 0 1px;
100
+ }
101
+
102
+ .mw_snav .msn_item.pointer:hover {
103
+ background-color: var(--color-bg-alt);
104
+ }
105
+
106
+ .mw_snav .msn_item.sel {
107
+ background-color: var(--color-bg-alt) !important;
108
+ /* background-color: var(--color-bg-active) !important; */
109
+ /* background-color: var(--color-highlight) !important; */
110
+ color: var(--color-text) !important;
111
+ }
112
+
113
+ /* List title */
114
+
115
+ .mw_snav .msn_item.title {
116
+ padding: .3rem .5rem .5rem;
117
+ }
118
+
119
+ .mw_snav .msn_item.title .ic_cnt {
120
+ position: absolute;
121
+ top: -3px;
122
+ left: -32px;
123
+ width: 32px;
124
+ height: 32px;
125
+ }
126
+
127
+ /* Modal top nav */
128
+
129
+ .mw_tnav {
130
+ border-bottom: solid 9px var(--opaque-light);
131
+ }
132
+
133
+ .mw_tnav.sticky {
134
+ top: -1.25rem;
135
+ }
136
+
137
+ /* Modal save button */
138
+
139
+ .mfs_cnt {
140
+ position: absolute;
141
+ bottom: 0;
142
+ left: 256px; /* 240px + 16px */
143
+ right: 16px;
144
+ transform: translateY(100%);
145
+ transition: transform ease .15s;
146
+ padding: .75rem;
147
+ background-color: var(--color-solid);
148
+ }
149
+
150
+ .mfs_cnt.active {
151
+ box-shadow: var(--shadow-float-full);
152
+ transform: translateY(0);
153
+ }
154
+
155
+ /* Small modal list item */
156
+
157
+ .mli_small {
158
+ margin-bottom: var(--rem-tiny);
159
+ }
160
+
161
+ .mli_small.bg, .mli_small.bg_alt {
162
+ width: 100%;
163
+ border-radius: var(--radius-small);
164
+ }
165
+
166
+ .mli_small.bg:hover {
167
+ background-color: var(--color-bg-alt);
168
+ }
169
+
170
+ .mli_small.bg_alt:hover {
171
+ background-color: var(--color-bg);
172
+ }
173
+
174
+ .mli_small:last-child {
175
+ margin-bottom: 0;
176
+ }
177
+
178
+ .mli_small .ic_cnt {
179
+ min-width: 22px;
180
+ }
181
+
182
+ .mli_small.text_link {
183
+ color: var(--color-text-medium);
184
+ }
185
+
186
+ .mli_small.text_link:hover {
187
+ color: var(--color-text);
188
+ }
189
+
190
+ .mli_small.continue_list {
191
+ width: 100%;
192
+ margin-bottom: 1px;
193
+ border-radius: 0;
194
+ background-color: var(--opaque-default);
195
+ }
196
+
197
+ .mli_small.continue_list:hover {
198
+ background-color: var(--color-bg-active);
199
+ }
200
+
201
+ .mli_small.continue_list:first-child {
202
+ border-top-left-radius: var(--radius-small);
203
+ border-top-right-radius: var(--radius-small);
204
+ }
205
+
206
+ .mli_small.continue_list:last-child {
207
+ border-bottom-left-radius: var(--radius-small);
208
+ border-bottom-right-radius: var(--radius-small);
209
+ }
210
+
211
+ /* Update notes */
212
+
213
+ .mw_content_title {
214
+ padding: 3rem 1rem 2rem;
215
+ }
216
+
217
+ .mw_content_title:before {
218
+ content: ' ';
219
+ position: absolute; z-index: -1;
220
+ top: -45px; left: -25px;
221
+ width: 180px; height: 180px;
222
+ border-radius: 50%;
223
+ background-color: var(--color-primary);
224
+ opacity: .25;
225
+ }
226
+
227
+ .mw_content_title.secondary:before {
228
+ background-color: var(--color-secondary);
229
+ }
230
+
231
+ .mw_content_title.highlight:before {
232
+ background-color: var(--color-highlight);
233
+ }
@@ -0,0 +1,302 @@
1
+
2
+ /* Pop overs */
3
+
4
+ .popover {
5
+ position: fixed;
6
+ display: flex;
7
+ flex-direction: column;
8
+ align-items: flex-start;
9
+ }
10
+
11
+ .popover .tooltip {
12
+ display: inline-block;
13
+ /* padding: .58rem .7rem; */
14
+ padding: .55rem .68rem;
15
+ /* box-shadow: var(--shadow-light); */
16
+ box-shadow: var(--shadow);
17
+ /* box-shadow: var(--shadow-float-light); */
18
+ }
19
+
20
+ .popover.small .tooltip {
21
+ max-width: 150px;
22
+ }
23
+
24
+ .popover.default .tooltip {
25
+ max-width: 225px;
26
+ }
27
+
28
+ /* Pop over; options */
29
+
30
+ .pop_over_options {
31
+ display: flex; flex-direction: column;
32
+ justify-content: flex-start;
33
+ align-items: stretch;
34
+ padding: .25rem .25rem;
35
+ max-width: 225px;
36
+ }
37
+
38
+ .po_desc {
39
+ min-width: 130px;
40
+ padding: .4rem .64rem .7rem;
41
+ margin-bottom: .25rem;
42
+ }
43
+
44
+ .po_opt .saving_area {
45
+ width: 24px;
46
+ transform: translateX(-7px);
47
+ }
48
+
49
+ .po_opt {
50
+ min-width: 175px;
51
+ padding: .25rem 0 .25rem .64rem;
52
+ white-space: nowrap;
53
+ }
54
+
55
+ a.po_opt {
56
+ border-radius: 4px;
57
+ }
58
+
59
+ .po_opt .av.main {
60
+ transform: translateX(-5px);
61
+ }
62
+
63
+ .po_opt.break:before {
64
+ content: ' ';
65
+ position: absolute;
66
+ left: 0; right: 0;
67
+ height: 1px;
68
+ }
69
+
70
+ .pop_over_options.bg_contrast .po_opt.break:before {
71
+ background-color: var(--color-contrast-opaque);
72
+ }
73
+
74
+ .pop_over_options.bg_contrast .po_opt.title,
75
+ .pop_over_options.bg_contrast .po_desc {
76
+ border-bottom: solid 1px var(--color-contrast-opaque);
77
+ }
78
+
79
+ .pop_over_options.bg .po_opt.title,
80
+ .pop_over_options.bg .po_opt.break:before {
81
+ background-color: var(--color-text-light);
82
+ }
83
+
84
+ .pop_over_options.bg .po_desc {
85
+ border-bottom: solid 1px var(--color-text-light);
86
+ }
87
+
88
+ .pop_over_options.bg a {
89
+ color: var(--color-text);
90
+ }
91
+
92
+ .pop_over_options.bg a:hover {
93
+ background-color: var(--color-darker-light);
94
+ }
95
+
96
+ .po_desc:last-child {
97
+ padding-bottom: .4rem;
98
+ margin-bottom: 0;
99
+ border-bottom: none !important;
100
+ }
101
+
102
+ .po_opt.title {
103
+ padding-top: .4rem;
104
+ padding-bottom: .4rem;
105
+ margin-bottom: .25rem;
106
+ }
107
+
108
+ .po_opt .av.main {
109
+ margin: 0 .3rem 0 .2rem;
110
+ }
111
+
112
+ /* Pop over container */
113
+
114
+ .po_container {
115
+ /* padding: 4px; */
116
+ box-shadow: var(--shadow-light);
117
+ }
118
+
119
+ .po_container .inside {
120
+ display: flex;
121
+ flex-direction: column;
122
+
123
+ width: 300px;
124
+ min-height: 200px;
125
+ /* max-height: calc(100vh - 20px); */
126
+ max-height: 70vh;
127
+ /* background: var(--color-highlight) linear-gradient(180deg, var(--color-highlight-alt), var(--color-highlight)) fixed; */
128
+ }
129
+
130
+ /* Profile; header */
131
+
132
+ .pf_header_area {
133
+ width: 100%;
134
+ padding: 30% 0 0;
135
+ object-fit: cover;
136
+ background-color: var(--color-darker-light);
137
+ }
138
+
139
+ .pf_header_area.with_img {
140
+ padding: 40% 0 0;
141
+ }
142
+
143
+ .pf_header_content.medium {
144
+ margin-top: -40px;
145
+ }
146
+
147
+ .pf_header_content.large {
148
+ margin-top: -70px;
149
+ }
150
+
151
+ .pf_header_content .mpf_shadow {
152
+ box-shadow: 0 0 0 5px var(--color-primary);
153
+ }
154
+
155
+ .pf_header_content .ib_label {
156
+ transform: translateY(3px);
157
+ }
158
+
159
+ .pf_header_content .ib_label .icon {
160
+ display: inline-block;
161
+ font-size: 1.6rem;
162
+ }
163
+
164
+ .pf_friend_status_dropdown {
165
+ position: absolute;
166
+ top: 94px;
167
+ left: 100%;
168
+ transform: translateX(-7px);
169
+ }
170
+
171
+ .pf_friend_status_dropdown.has_bg {
172
+ top: 123px;
173
+ }
174
+
175
+ .pf_content_area {
176
+ padding: 1rem 0;
177
+ }
178
+
179
+ /* .pf_header_content .mpf_shadow:before {
180
+ content: ' ';
181
+ position: absolute;
182
+ left: -5px; top: 0; right: -5px; bottom: -10px;
183
+ border-radius: 50%;
184
+ background: radial-gradient(rgba(0,0,0,1), rgba(0,0,0,0));
185
+ box-shadow: 0 0 10px rgba(0,0,0,.5);
186
+ } */
187
+
188
+ /* Mini profile buttons */
189
+
190
+ .mpf_btns_cnt {
191
+ display: grid;
192
+ column-gap: .5rem;
193
+ border-top: .1875em dashed var(--color-darker-light);
194
+ }
195
+
196
+ .pf_header_content {
197
+ border-bottom: .1875em dashed var(--color-darker-light);
198
+ }
199
+
200
+ .mpf_btns_cnt.size-1 {
201
+ grid-template-columns: repeat(1, 1fr);
202
+ }
203
+
204
+ .mpf_btns_cnt.size-2 {
205
+ grid-template-columns: repeat(2, 1fr);
206
+ }
207
+
208
+ .mpf_btn {
209
+ align-self: stretch;
210
+ padding: 6px 4px 7px 6px;
211
+ background-color: var(--color-darker-light);
212
+ }
213
+
214
+ .mpf_btn:not(:first-child) {
215
+ margin-left: 5px;
216
+ }
217
+
218
+ .mpf_btn.icon_only {
219
+ align-items: center;
220
+ padding-left: 4px;
221
+ padding-right: 4px;
222
+ }
223
+
224
+ .mpf_btn svg:first-child {
225
+ margin-right: 3px;
226
+ }
227
+
228
+ .mpf_btn svg:last-child {
229
+ margin-left: 3px;
230
+ }
231
+
232
+ button.mpf_btn:hover, a.mpf_btn:hover {
233
+ background-color: var(--color-darker-default);
234
+ }
235
+
236
+ /* Card item */
237
+
238
+ .crd_item {
239
+ margin-top: 4px;
240
+ }
241
+
242
+ /* Card header */
243
+
244
+ .crd_header {
245
+ /* padding: 0; */
246
+ background-color: var(--color-darker-light);
247
+ }
248
+
249
+ .crd_header[role="button"] {
250
+ cursor: pointer;
251
+ }
252
+
253
+ .crd_header .av.main {
254
+ transform: scale(.8);
255
+ }
256
+
257
+ .crd_header .text {
258
+ padding: 6px 0 7px;
259
+ }
260
+
261
+ .crd_side {
262
+ width: 32px;
263
+ height: var(--av-tiny);
264
+ }
265
+
266
+ .crd_side.expanded {
267
+ transform: rotate(45deg);
268
+ }
269
+
270
+ /* Card links */
271
+
272
+ .crd_links_cnt {
273
+ display: grid;
274
+ grid-template-columns: repeat(3, 1fr);
275
+ row-gap: 4px;
276
+ column-gap: 4px;
277
+ padding: 14px 0 10px;
278
+ }
279
+
280
+ .crd_link {
281
+ padding: 10px 4px 8px;
282
+ background-color: var(--color-darker-light);
283
+ }
284
+
285
+ .crd_link .av.no_img {
286
+ background-color: var(--color-darker-light);
287
+ }
288
+
289
+ button.crd_link:hover {
290
+ background-color: var(--color-darker-default);
291
+ }
292
+
293
+ .crd_link .av.main {
294
+ margin-bottom: 2px;
295
+ }
296
+
297
+ /* Pop over image */
298
+
299
+ .pu_img {
300
+ max-width: 400px;
301
+ margin: 10px; /* 10px is also hard coded into the React Component */
302
+ }
package/package.json ADDED
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "@jsb188/css",
3
+ "version": "1.0.1",
4
+ "description": "Re-usable, base CSS styles for any app (NOTE: Bring your own variables).",
5
+ "license": "ISC",
6
+ "author": "jsb188",
7
+ "type": "module",
8
+ "exports": {
9
+ "./_global": "./css/_global.css",
10
+ "./alert": "./css/alert.css",
11
+ "./form": "./css/form.css",
12
+ "./layout": "./css/layout.css",
13
+ "./list": "./css/list.css",
14
+ "./loading": "./css/loading.css",
15
+ "./misc": "./css/misc.css",
16
+ "./modal": "./css/modal.css",
17
+ "./popover": "./css/popover.css"
18
+ },
19
+ "scripts": {
20
+ "test": "echo \"Error: no test specified\" && exit 1"
21
+ }
22
+ }