jbx 2.5.0 → 2.6.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.
package/.nvmrc CHANGED
@@ -1 +1 @@
1
- v18.10
1
+ v18.x
package/README.md CHANGED
@@ -5,22 +5,22 @@ npm i jbx@latest capsize@latest styled-components@latest
5
5
  ```
6
6
 
7
7
  ```jsx
8
- import { JBX, MainHeader, Text, Space, Container } from "jbx";
8
+ import { JBX, MainHeader, Text, Space, Container } from 'jbx';
9
9
 
10
10
  function App() {
11
11
  return (
12
12
  <Container>
13
- <JBX accent={"#eb4d4b"} />
13
+ <JBX accent={'#f00'} />
14
14
  <MainHeader>React Blur</MainHeader>
15
15
  <Space h={1} />
16
16
  <Text>
17
- Tool that creates animated CSS transitions. Add sprites and get the code
18
- ready to paste in your site.
17
+ Tool that creates animated CSS transitions. Add sprites and get the code ready to paste in
18
+ your site.
19
19
  </Text>
20
20
  <Space h={2} />
21
21
  <Text>
22
- Tool that creates animated CSS transitions. Add sprites and get the code
23
- ready to paste in your site.
22
+ Tool that creates animated CSS transitions. Add sprites and get the code ready to paste in
23
+ your site.
24
24
  </Text>
25
25
  </Container>
26
26
  );
package/dist/main.css CHANGED
@@ -1,32 +1,37 @@
1
1
  html {
2
2
  box-sizing: border-box;
3
3
  }
4
-
5
- *, :before, :after {
4
+ *,
5
+ *:before,
6
+ *:after {
6
7
  box-sizing: inherit;
7
8
  }
8
9
 
9
10
  :root {
10
11
  --size: 16px;
11
- --base-font-size: 20px;
12
- --base-radius: #95a5a6;
12
+ --font-size: 20px;
13
+ --font-size-small: 17px;
14
+ --radius-small: 2px;
13
15
  }
14
16
 
15
17
  @media screen and (max-width: 1200px) {
16
18
  :root {
17
- --base-font-size: 18px;
19
+ --font-size: 18px;
20
+ --font-size-small: 16px;
21
+ --size: 14px;
18
22
  }
19
23
  }
20
24
 
21
25
  @media screen and (max-width: 600px) {
22
26
  :root {
23
- --base-font-size: 16px;
27
+ --font-size: 16px;
28
+ --font-size-small: 14px;
24
29
  }
25
30
  }
26
31
 
27
32
  * {
28
- margin: 0;
29
33
  padding: 0;
34
+ margin: 0;
30
35
  position: relative;
31
36
  }
32
37
 
@@ -34,121 +39,187 @@ body {
34
39
  touch-action: pan-y;
35
40
  }
36
41
 
37
- body, input, textarea {
38
- font-family: colfax-web, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, sans-serif;
42
+ body,
43
+ input,
44
+ textarea {
45
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
39
46
  }
40
47
 
41
48
  body {
42
- color: #000;
43
49
  background: #fcfcfd;
50
+ color: #000;
44
51
  }
45
52
 
46
- html, body, .jbx-button, .jbx-input {
47
- font-size: var(--base-font-size);
53
+ h1,
54
+ h2,
55
+ h3,
56
+ h4 {
57
+ line-height: 1;
58
+ padding: 0;
59
+ font-variation-settings: 'wdth' 107;
60
+ color: var(--base-font-color-bright);
61
+ font-weight: 650;
62
+ }
63
+
64
+ strong,
65
+ b {
66
+ font-weight: 500;
67
+ }
68
+
69
+ .jbx-h1 {
70
+ font-size: calc(var(--font-size) * 2);
71
+ font-weight: 700;
72
+ }
73
+ .jbx-h2 {
74
+ font-size: calc(var(--font-size) * 1.25);
75
+ }
76
+ .jbx-h3 {
77
+ font-size: calc(var(--font-size) * 1);
78
+ }
79
+ .jbx-h4 {
80
+ font-size: var(--font-size-small);
81
+ text-transform: uppercase;
82
+ }
83
+
84
+ /* base text */
85
+ html,
86
+ body,
87
+ .jbx-button,
88
+ .jbx-input {
89
+ font-size: var(--font-size);
48
90
  line-height: 1;
49
91
  }
50
92
 
51
93
  .jbx-code-snippet {
52
94
  border-radius: var(--size);
53
- width: 100%;
54
95
  font-family: monaco, monospace;
55
- font-size: calc(var(--size) - 3px);
96
+ border: none;
97
+ width: 100%;
98
+ font-size: calc(var(--size) - 3px);
99
+ line-height: 1.33;
56
100
  padding: var(--size) calc(var(--size) * 1.2);
101
+ background: #ecf0f1;
57
102
  color: #34495e;
58
103
  resize: none;
59
- background: #ecf0f1;
60
- border: none;
61
- line-height: 1.33;
62
104
  }
63
-
64
105
  .jbx-code-snippet:focus {
65
106
  outline: none;
66
107
  }
67
108
 
68
109
  .jbx-code-area {
69
110
  border-radius: var(--size);
70
- width: 100%;
71
111
  font-family: monaco, monospace;
72
- font-size: calc(var(--size) - 3px);
112
+ border: none;
113
+ width: 100%;
114
+ font-size: calc(var(--size) - 3px);
115
+ line-height: 1.33;
73
116
  padding: var(--size) calc(var(--size) * 1.2);
117
+ background: #ecf0f1;
74
118
  color: #34495e;
75
119
  resize: none;
76
120
  min-height: 120px;
77
- background: #ecf0f1;
78
- border: none;
79
- line-height: 1.33;
80
121
  }
81
-
82
122
  .jbx-code-area:focus {
83
123
  outline: none;
84
124
  }
85
125
 
86
126
  .jbx-button {
127
+ color: #000;
128
+ border-radius: var(--radius-small);
87
129
  appearance: none;
88
- -webkit-user-select: none;
89
130
  user-select: none;
90
131
  cursor: pointer;
91
- padding: 0 calc(var(--size) / 2);
92
- height: calc(var(--size) * 2.5);
132
+ display: inline-block;
93
133
  background-color: #eee;
134
+ box-shadow: 3px 3px 0 #ccc;
135
+ padding: 0 calc(var(--size) / 2);
94
136
  border: none;
95
- display: inline-block;
96
- box-shadow: 3px 3px #ccc;
137
+ height: calc(var(--size) * 2.5);
138
+ transition: top 0.1s, left 0.1s, box-shadow 0.05s;
97
139
  }
98
-
99
140
  .jbx-button:active {
100
141
  top: 1px;
101
142
  left: 1px;
102
- box-shadow: 2px 2px #ccc;
143
+ box-shadow: 1px 1px 0 #ccc;
103
144
  }
104
145
 
146
+ /* LINKS */
105
147
  .jbx-a {
148
+ cursor: pointer;
106
149
  color: #000;
107
- box-shadow: var(--accent-color) 0 1px 0, inset var(--accent-color) 0 -2px 0;
150
+ box-shadow: #0002 0 2px 0;
108
151
  font-weight: 500;
109
152
  text-decoration: none;
110
153
  }
111
-
112
- .jbx-a:hover {
113
- color: "#34495e";
154
+ .jbx-a::after {
155
+ content: '↗';
156
+ color: #0004;
157
+ font-size: var(--font-size-small);
158
+ position: relative;
159
+ top: -1px;
160
+ right: -1px;
161
+ transition: top 0.3s, right 0.3s, color 0.3s;
114
162
  }
115
-
116
- .jbx-h1, .jbx-h2, .jbx-h3, .jbx-h4 {
117
- margin: 0;
118
- padding: 0;
119
- font-weight: 500;
120
- line-height: 1;
163
+ .jbx-a:hover,
164
+ .jbx-block-link:hover .jbx-a {
165
+ box-shadow: var(--accent-color) 0 2px 0;
121
166
  }
122
-
123
- .jbx-h4 {
124
- font-size: calc(var(--base-font-size));
125
- letter-spacing: -.11px;
167
+ .jbx-a:hover::after,
168
+ .jbx-block-link:hover .jbx-a::after {
169
+ top: -3px;
170
+ right: -3px;
171
+ color: var(--accent-color);
126
172
  }
127
173
 
128
- .jbx-h3 {
129
- font-size: calc(var(--base-font-size) * 1.25);
130
- letter-spacing: -.22px;
174
+ .jbx-block-link {
175
+ min-width: 300px;
176
+ flex: 1;
177
+ text-decoration: none;
178
+ color: #000;
179
+ display: inline-block;
180
+ padding: var(--size);
131
181
  }
132
-
133
- .jbx-h2 {
134
- font-size: calc(var(--base-font-size) * 1.5);
135
- letter-spacing: -.33px;
182
+ a.jbx-a::before,
183
+ .jbx-block-link::before {
184
+ content: '';
185
+ display: block;
186
+ position: absolute;
187
+ background-color: #ecf0f1;
188
+ z-index: -1;
189
+ transition: transform 0.2s, opacity 0.2s;
190
+ transform: scale(0.98) translatey(4px);
191
+ opacity: 0;
192
+ top: -4px;
193
+ left: -6px;
194
+ right: -6px;
195
+ bottom: -4px;
196
+ }
197
+ .jbx-block-link::before {
198
+ border-radius: 16px;
199
+ }
200
+ a.jbx-a::before {
201
+ border-radius: 8px;
202
+ }
203
+ a.jbx-a:hover::before,
204
+ .jbx-block-link:hover::before {
205
+ transform: scale(1) translatey(0);
206
+ opacity: 1;
136
207
  }
137
208
 
138
- .jbx-h1 {
139
- font-size: calc(var(--base-font-size) * 2.5);
140
- letter-spacing: -1px;
209
+ .jbx-a {
210
+ display: inline-block;
141
211
  }
142
212
 
213
+ /* /LINKS */
214
+
143
215
  .jbx-small-text {
144
- font-size: calc(var(--base-font-size) * .8);
145
- line-height: calc(var(--base-font-size) * .6);
216
+ font-size: var(--font-size-small);
146
217
  }
147
218
 
148
219
  .jbx-container {
149
220
  max-width: 1080px;
150
- padding: calc(var(--size) * 2.5) calc(var(--size) * 1.5) calc(var(--size) * 4);
151
221
  margin: 0 auto;
222
+ padding: calc(var(--size) * 2.5) calc(var(--size) * 1.5) calc(var(--size) * 4);
152
223
  }
153
224
 
154
225
  .jbx-box {
@@ -156,101 +227,133 @@ html, body, .jbx-button, .jbx-input {
156
227
  }
157
228
 
158
229
  .jbx-inline {
159
- flex-flow: wrap;
160
230
  flex: 1;
161
231
  display: flex;
232
+ flex-wrap: wrap;
233
+ flex-direction: row;
162
234
  }
163
235
 
164
236
  .jbx-stack {
165
- flex-flow: column wrap;
166
237
  flex: 1;
167
238
  display: flex;
239
+ flex-wrap: wrap;
240
+ flex-direction: column;
241
+ }
242
+
243
+ .jbx-text {
244
+ line-height: 1.4;
168
245
  }
169
246
 
170
247
  .jbx-input {
171
248
  color: #777;
172
249
  -webkit-text-fill-color: #777;
173
250
  opacity: 1;
251
+ flex: 1;
252
+ display: block;
174
253
  appearance: none;
254
+ border: none;
255
+ border-radius: var(--radius-small);
175
256
  height: calc(var(--size) * 2.5);
176
- padding: 0 calc(var(--size) * .5);
177
257
  background-color: #eee;
178
- border: none;
179
- border-radius: 0;
180
- flex: 1;
181
- display: block;
182
- box-shadow: inset 3px 3px #0000000a, inset .5px .5px #00000008;
258
+ padding: 0 calc(var(--size) * 0.5);
259
+ box-shadow: inset rgba(0, 0, 0, 0.04) 3px 3px 0, inset rgba(0, 0, 0, 0.03) 0.5px 0.5px 0;
183
260
  }
184
261
 
185
262
  .jbx-dropzone {
186
263
  height: 120px;
187
- max-width: 320px;
188
- text-align: center;
189
- color: #000;
190
- cursor: pointer;
191
- border: 2px dashed #000;
192
- flex-direction: column;
193
264
  flex: 1;
194
- place-content: center;
265
+ display: flex;
266
+ text-align: center;
195
267
  align-items: center;
268
+ align-content: center;
269
+ justify-content: center;
270
+ flex-direction: column;
271
+ border: 2px dashed #000;
272
+ color: #000;
196
273
  padding: 0;
197
- display: flex;
274
+ cursor: pointer;
198
275
  }
199
-
200
276
  .jbx-dropzone:hover {
201
277
  border-color: #999;
202
278
  }
203
-
204
279
  .jbx-dropzone span {
205
280
  width: 100%;
206
281
  cursor: pointer;
207
282
  }
208
-
209
283
  .jbx-dropzone input {
284
+ position: absolute;
285
+ top: 0;
286
+ left: 0;
210
287
  height: 100%;
211
288
  width: 100%;
212
289
  opacity: 0;
213
290
  cursor: pointer;
214
- position: absolute;
215
- top: 0;
216
- left: 0;
217
291
  }
218
292
 
219
293
  .jbx-range {
294
+ flex: 1;
220
295
  width: 100%;
221
296
  appearance: none;
222
- background-color: var(--accent-color);
297
+ background-color: #bdc3c780;
223
298
  height: var(--size);
224
299
  border-radius: 0;
225
- flex: 1;
300
+ border-radius: var(--radius-small);
226
301
  }
227
302
 
228
303
  .jbx-range::-webkit-slider-thumb {
304
+ -webkit-appearance: none;
229
305
  appearance: none;
230
306
  box-shadow: none;
307
+ border-radius: 0;
231
308
  height: calc(var(--size) * 2);
232
309
  width: var(--size);
233
310
  background-color: #000;
234
311
  border: none;
235
- border-radius: 0;
312
+ border-radius: var(--radius-small);
236
313
  }
237
-
238
314
  .jbx-range::-moz-range-thumb {
239
315
  appearance: none;
240
316
  box-shadow: none;
317
+ border-radius: 0;
241
318
  height: calc(var(--size) * 2);
242
319
  width: var(--size);
243
320
  background-color: #000;
244
321
  border: none;
245
- border-radius: 0;
322
+ border-radius: var(--radius-small);
246
323
  }
247
-
248
324
  .jbx-range::-webkit-slider-runnable-track {
249
325
  appearance: none;
326
+ /*background-color: yellow;*/
250
327
  }
251
-
252
328
  .jbx-range:focus {
253
329
  outline: none;
254
330
  }
255
331
 
256
- /*# sourceMappingURL=main.css.map */
332
+ .jbx-bullet-container {
333
+ display: inline-block;
334
+ margin: -8px 4px -8px 0;
335
+ }
336
+
337
+ .jbx-bullet {
338
+ border: 1.5px solid #000;
339
+ color: #000;
340
+ text-align: center;
341
+ line-height: 0.99;
342
+ display: flex;
343
+ align-items: center;
344
+ justify-content: center;
345
+ font-size: calc(var(--font-size-small) - 3px);
346
+ height: calc(var(--size) * 1.25);
347
+ width: calc(var(--size) * 1.25);
348
+ border-radius: 100%;
349
+ top: -2px;
350
+ font-weight: 500;
351
+ }
352
+
353
+ .jbx-hr {
354
+ margin: calc(var(--size) * 2) auto;
355
+ width: 38.2%;
356
+ border-radius: 0;
357
+ border: none;
358
+ border-top: 2px solid #ecf0f1;
359
+ }
package/package.json CHANGED
@@ -1,15 +1,19 @@
1
1
  {
2
2
  "name": "jbx",
3
- "version": "2.5.0",
3
+ "version": "2.6.0",
4
4
  "author": "hi@javier.xyz",
5
5
  "license": "Unlicensed",
6
6
  "main": "dist/pkg.cjs.js",
7
7
  "module": "dist/pkg.esm.js",
8
8
  "types": "dist/types/index.d.ts",
9
9
  "exports": {
10
- "require": "dist/index.cjs",
11
- "import": "dist/index.mjs",
12
- "module": "dist/index.esm.js"
10
+ "require": "./dist/index.cjs",
11
+ "import": "./dist/index.mjs",
12
+ "module": "./dist/index.esm.js"
13
+ },
14
+ "scripts": {
15
+ "build": "bunchee ./src/index.tsx && cp ./src/style.css ./dist/main.css",
16
+ "watch": "bunchee -w ./src/index.tsx"
13
17
  },
14
18
  "devDependencies": {
15
19
  "@types/react": "^18.0.21",
@@ -20,9 +24,5 @@
20
24
  },
21
25
  "dependencies": {
22
26
  "jbx": "^2.4.0"
23
- },
24
- "scripts": {
25
- "build": "bunchee ./src/index.tsx",
26
- "watch": "bunchee -w ./src/index.tsx"
27
27
  }
28
- }
28
+ }
package/dist/main.css.map DELETED
@@ -1 +0,0 @@
1
- {"mappings":"AAAA;;;;AAGA;;;;AAMA;;;;;;AAMA;EACE;;;;;AAKF;EACE;;;;;AAKF;;;;;;AAMA;;;;AAIA;;;;AAMA;;;;;AAMA;;;;;AAQA;;;;;;;;;;;;;AAYA;;;;AAIA;;;;;;;;;;;;;;AAaA;;;;AAIA;;;;;;;;;;;;;AAWA;;;;;;AAMA;;;;;;;AAMA;;;;AAIA;;;;;;;AAUA;;;;;AAIA;;;;;AAIA;;;;;AAIA;;;;;AAKA;;;;;AAKA;;;;;;AAMA;;;;AAIA;;;;;;AAOA;;;;;;AAOA;;;;;;;;;;;;;;;AAeA;;;;;;;;;;;;;;;AAeA;;;;AAGA;;;;;AAIA;;;;;;;;;;AA0BA;;;;;;;;;AASA;;;;;;;;;;AAUA;;;;;;;;;;AASA;;;;AAGA","sources":["src/style.css"],"sourcesContent":["html {\n box-sizing: border-box;\n}\n*,\n*:before,\n*:after {\n box-sizing: inherit;\n}\n\n:root {\n --size: 16px;\n --base-font-size: 20px;\n --base-radius: #95a5a6;\n}\n\n@media screen and (max-width: 1200px) {\n :root {\n --base-font-size: 18px;\n }\n}\n\n@media screen and (max-width: 600px) {\n :root {\n --base-font-size: 16px;\n }\n}\n\n* {\n padding: 0;\n margin: 0;\n position: relative;\n}\n\nbody {\n touch-action: pan-y;\n}\n\nbody,\ninput,\ntextarea {\n font-family: colfax-web, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;\n}\n\nbody {\n background: #fcfcfd;\n color: #000;\n}\n\n/* base text */\nhtml,\nbody,\n.jbx-button,\n.jbx-input {\n font-size: var(--base-font-size);\n line-height: 1;\n}\n\n.jbx-code-snippet {\n border-radius: var(--size);\n font-family: monaco, monospace;\n border: none;\n width: 100%;\n font-size: calc(var(--size) - 3px);\n line-height: 1.33;\n padding: var(--size) calc(var(--size) * 1.2);\n background: #ecf0f1;\n color: #34495e;\n resize: none;\n}\n.jbx-code-snippet:focus {\n outline: none;\n}\n\n.jbx-code-area {\n border-radius: var(--size);\n font-family: monaco, monospace;\n border: none;\n width: 100%;\n font-size: calc(var(--size) - 3px);\n line-height: 1.33;\n padding: var(--size) calc(var(--size) * 1.2);\n background: #ecf0f1;\n color: #34495e;\n resize: none;\n min-height: 120px;\n}\n.jbx-code-area:focus {\n outline: none;\n}\n\n.jbx-button {\n appearance: none;\n user-select: none;\n cursor: pointer;\n display: inline-block;\n background-color: #eee;\n box-shadow: 3px 3px 0 #ccc;\n padding: 0 calc(var(--size) / 2);\n border: none;\n height: calc(var(--size) * 2.5);\n}\n.jbx-button:active {\n top: 1;\n left: 1;\n box-shadow: 2px 2px 0 #ccc;\n}\n\n.jbx-a {\n color: #000;\n box-shadow: var(--accent-color) 0 1px 0, inset var(--accent-color) 0 -2px 0;\n font-weight: 500;\n text-decoration: none;\n}\n.jbx-a:hover {\n color: '#34495e';\n}\n\n.jbx-h1,\n.jbx-h2,\n.jbx-h3,\n.jbx-h4 {\n line-height: 1;\n padding: 0;\n margin: 0;\n font-weight: 500;\n}\n\n.jbx-h4 {\n font-size: calc(var(--base-font-size));\n letter-spacing: -0.11px;\n}\n.jbx-h3 {\n font-size: calc(var(--base-font-size) * 1.25);\n letter-spacing: -0.22px;\n}\n.jbx-h2 {\n font-size: calc(var(--base-font-size) * 1.5);\n letter-spacing: -0.33px;\n}\n.jbx-h1 {\n font-size: calc(var(--base-font-size) * 2.5);\n letter-spacing: -1px;\n}\n\n.jbx-small-text {\n font-size: calc(var(--base-font-size) * 0.8);\n line-height: calc(var(--base-font-size) * 0.6);\n}\n\n.jbx-container {\n max-width: 1080px;\n margin: 0 auto;\n padding: calc(var(--size) * 2.5) calc(var(--size) * 1.5) calc(var(--size) * 4);\n}\n\n.jbx-box {\n flex: 1;\n}\n\n.jbx-inline {\n flex: 1;\n display: flex;\n flex-wrap: wrap;\n flex-direction: row;\n}\n\n.jbx-stack {\n flex: 1;\n display: flex;\n flex-wrap: wrap;\n flex-direction: column;\n}\n\n.jbx-input {\n color: #777;\n -webkit-text-fill-color: #777;\n opacity: 1;\n flex: 1;\n display: block;\n appearance: none;\n border: none;\n border-radius: 0;\n height: calc(var(--size) * 2.5);\n background-color: #eee;\n padding: 0 calc(var(--size) * 0.5);\n box-shadow: inset rgba(0, 0, 0, 0.04) 3px 3px 0, inset rgba(0, 0, 0, 0.03) 0.5px 0.5px 0;\n}\n\n.jbx-dropzone {\n height: 120px;\n flex: 1;\n max-width: 320px;\n display: flex;\n text-align: center;\n align-items: center;\n align-content: center;\n justify-content: center;\n flex-direction: column;\n border: 2px dashed #000;\n color: #000;\n padding: 0;\n cursor: pointer;\n}\n.jbx-dropzone:hover {\n border-color: #999;\n}\n.jbx-dropzone span {\n width: 100%;\n cursor: pointer;\n}\n.jbx-dropzone input {\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n opacity: 0;\n cursor: pointer;\n}\n\n/*export const Dropzone = Styled.div({\n\n\n\n },\n '& input': {\n position: 'absolute',\n top: '0',\n left: '0',\n height: '100%',\n width: '100%',\n opacity: '0',\n cursor: 'pointer'\n }\n});*/\n\n.jbx-range {\n flex: 1;\n width: 100%;\n appearance: none;\n background-color: var(--accent-color);\n height: var(--size);\n border-radius: 0;\n}\n\n.jbx-range::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n box-shadow: none;\n border-radius: 0;\n height: calc(var(--size) * 2);\n width: var(--size);\n background-color: #000;\n border: none;\n}\n.jbx-range::-moz-range-thumb {\n appearance: none;\n box-shadow: none;\n border-radius: 0;\n height: calc(var(--size) * 2);\n width: var(--size);\n background-color: #000;\n border: none;\n}\n.jbx-range::-webkit-slider-runnable-track {\n appearance: none;\n}\n.jbx-range:focus {\n outline: none;\n}\n"],"names":[],"version":3,"file":"main.css.map"}