@bgord/design 0.27.33 → 0.27.36

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/README.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @bgord/design
2
2
 
3
+ Breakpoints
4
+
5
+ | Definition | Value |
6
+ | ---------- | ------------------------------ |
7
+ | data-md-\* | @media (max-width: ${value}px) |
8
+
9
+ | Key | Value |
10
+ | --- | :-----------------------: |
11
+ | 768 | @media (max-width: 768px) |
12
+
13
+ > You can use almost all design tokens after `data-md`, e.g `data-md-mx`.
14
+
3
15
  ## Margins
4
16
 
5
17
  | Definition | Value |
@@ -14,7 +26,6 @@
14
26
 
15
27
  | Key | Value |
16
28
  | ----- | :---: |
17
- | | |
18
29
  | 0 | 0 |
19
30
  | 3 | 3px |
20
31
  | 6 | 6px |
@@ -52,191 +63,377 @@
52
63
  | auto | auto |
53
64
  | unset | unset |
54
65
 
55
- export const Displays: Record<DisplayType, string> = {
56
- flex: 'flex',
57
- block: 'block',
58
- 'inline-block': 'inline-block',
59
- none: 'none',
60
- };
61
-
62
- export const AxisPlacements: Record<AxisPlacementType, string> = {
63
- start: 'flex-start',
64
- end: 'flex-end',
65
- between: 'space-between',
66
- center: 'center',
67
- baseline: 'baseline',
68
- };
69
-
70
- export const Positions: Record<PositionType, string> = {
71
- static: 'static',
72
- relative: 'relative',
73
- absolute: 'absolute',
74
- fixed: 'fixed',
75
- sticky: 'sticky',
76
- unset: 'unset',
77
- };
78
-
79
- export const FlexWraps: Record<FlexWrapTypes, string> = {
80
- nowrap: 'nowrap',
81
- wrap: 'wrap',
82
- 'wrap-reverse': 'wrap-reverse',
83
- unset: 'unset',
84
- };
85
-
86
- export const ZIndexes: Record<ZIndexType, string> = {
87
- '-1': '-1',
88
- '0': '0',
89
- '1': '1',
90
- '2': '2',
91
- '3': '3',
92
- };
93
-
94
- export const Widths: Record<WidthType, string> = {
95
- '100%': '100%',
96
- auto: 'auto',
97
- unset: 'unset',
98
- };
99
-
100
- export const FontSizes: Record<FontSizeType, string> = {
101
- 12: '12',
102
- 14: '14',
103
- 16: '16',
104
- 20: '20',
105
- 24: '24',
106
- 32: '32',
107
- 36: '36',
108
- };
109
-
110
- export const FontWeights: Record<FontWeightType, string> = {
111
- '300': '300',
112
- '400': '400',
113
- '500': '500',
114
- '700': '700',
115
- '900': '900',
116
- unset: 'unset',
117
- };
118
-
119
- export const LineHeights: Record<LineHeightType, string> = {
120
- '12': '12',
121
- '16': '16',
122
- '20': '20',
123
- '24': '24',
124
- '32': '32',
125
- '36': '36',
126
- unset: 'unset',
127
- };
128
-
129
- export const FlexDirections: Record<FlexDirectionType, string> = {
130
- row: 'row',
131
- 'row-reverse': 'row-reverse',
132
- column: 'column',
133
- 'column-reverse': 'column-reverse',
134
- };
135
-
136
- export const Grayscale: Record<GrayscaleType, string> = {
137
- white: '#F9FAFB',
138
- 'gray-100': '#F3F4F6',
139
- 'gray-200': '#E5E7EB',
140
- 'gray-300': '#D1D5DB',
141
- 'gray-400': '#9CA3AF',
142
- 'gray-500': '#6B7280',
143
- 'gray-600': '#4B5563',
144
- 'gray-700': '#374151',
145
- 'gray-800': '#1F2937',
146
- black: '#111827',
147
- };
148
-
149
- export const Greens: Record<GreenType, string> = {
150
- 'green-100': 'hsl(112, 50%, 85%)',
151
- 'green-200': 'hsl(112, 50%, 75%)',
152
- 'green-300': 'hsl(112, 50%, 65%)',
153
- 'green-400': 'hsl(112, 50%, 55%)',
154
- 'green-500': 'hsl(112, 50%, 45%)',
155
- 'green-600': 'hsl(112, 50%, 35%)',
156
- 'green-700': 'hsl(112, 50%, 25%)',
157
- 'green-800': 'hsl(112, 50%, 20%)',
158
- };
159
-
160
- export const Reds: Record<RedType, string> = {
161
- 'red-100': 'hsl(5, 80%, 90%)',
162
- 'red-200': 'hsl(5, 80%, 83%)',
163
- 'red-300': 'hsl(5, 80%, 72.5%)',
164
- 'red-400': 'hsl(5, 80%, 62.5%)',
165
- 'red-500': 'hsl(5, 80%, 52.5%)',
166
- 'red-600': 'hsl(5, 80%, 42%)',
167
- 'red-700': 'hsl(5, 80%, 32.5%)',
168
- 'red-800': 'hsl(5, 80%, 22.5%)',
169
- };
170
-
171
- export const Oranges: Record<OrangeType, string> = {
172
- 'orange-100': 'hsl(25, 88%, 85%)',
173
- 'orange-200': 'hsl(25, 88%, 75%)',
174
- 'orange-300': 'hsl(25, 88%, 65%)',
175
- 'orange-400': 'hsl(25, 88%, 55%)',
176
- 'orange-500': 'hsl(25, 88%, 45%)',
177
- 'orange-600': 'hsl(25, 88%, 37.5%)',
178
- 'orange-700': 'hsl(25, 88%, 27.5%)',
179
- 'orange-800': 'hsl(25, 88%, 20%)',
180
- };
181
-
182
- export const Breakpoints: Record<BreakpointType, number> = {
183
- md: 768,
184
- };
185
-
186
- export const LetterSpacings: Record<LetterSpacingType, number> = {
187
- '0.5': 0.5,
188
- '1': 1,
189
- '1.5': 1.5,
190
- '2': 2,
191
- };
192
-
193
- export const FlexGrows: Record<FlexGrowType, string> = {
194
- '1': '1',
195
- unset: 'unset',
196
- };
197
-
198
- export const BorderWidths: Record<BorderWidthType, number> = {
199
- '1': 1,
200
- '2': 2,
201
- '4': 4,
202
- '6': 6,
203
- '12': 12,
204
- };
205
-
206
- export const BorderColors: Record<BorderColorType, string> = {
207
- ...Grayscale,
208
- transparent: 'transparent',
209
- };
210
-
211
- export const BorderRadiuses: Record<BorderRadiusType, string> = {
212
- '0': '0',
213
- '1': '1px',
214
- '2': '2px',
215
- '4': '4px',
216
- '50%': '50%',
217
- };
218
-
219
- export const MaxWidths: Record<MaxWidthType, string> = {
220
- '100%': '100%',
221
- '1296': '1296px',
222
- '768': '768px',
223
- '528': '528px',
224
- '320': '320px',
225
- unset: 'unset',
226
- };
227
-
228
- export const Transforms: Record<TransformType, string> = {
229
- uppercase: 'uppercase',
230
- lowercase: 'lowercase',
231
- capitalize: 'capitalize',
232
- 'upper-first': 'upper-first',
233
- truncate: 'truncate',
234
- center: 'center',
235
- none: 'none',
236
- };
237
-
238
- export const Overflows: Record<OverflowType, string> = {
239
- auto: 'auto',
240
- scroll: 'scroll',
241
- hidden: 'hidden',
242
- };
66
+ ## Displays
67
+
68
+ | Definition | Value |
69
+ | ------------ | ------- |
70
+ | data-display | display |
71
+
72
+ | Key | Value |
73
+ | ------------ | :----------: |
74
+ | | |
75
+ | flex | flex |
76
+ | block | block |
77
+ | inline-block | inline-block |
78
+ | none | none |
79
+
80
+ ## Axis placements
81
+
82
+ | Definition | Value |
83
+ | ---------- | --------------- |
84
+ | data-main | justify-content |
85
+ | data-cross | align-items |
86
+
87
+ | Key | Value |
88
+ | -------- | :-----------: |
89
+ | start | flex-start |
90
+ | end | flex-end |
91
+ | between | space-between |
92
+ | center | center |
93
+ | baseline | baseline |
94
+
95
+ ## Positions
96
+
97
+ | Definition | Value |
98
+ | ------------- | -------- |
99
+ | data-position | position |
100
+
101
+ | Key | Value |
102
+ | -------- | :------: |
103
+ | static | static |
104
+ | relative | relative |
105
+ | absolute | absolute |
106
+ | fixed | fixed |
107
+ | sticky | sticky |
108
+ | unset | unset |
109
+
110
+ ## Flex wraps
111
+
112
+ | Definition | Value |
113
+ | ---------- | --------- |
114
+ | data-wrap | flex-wrap |
115
+
116
+ | Key | Value |
117
+ | ------------ | :----------: |
118
+ | nowrap | nowrap |
119
+ | wrap | wrap |
120
+ | wrap-reverse | wrap-reverse |
121
+ | unset | unset |
122
+
123
+ ## Z indexes
124
+
125
+ | Definition | Value |
126
+ | ---------- | ------- |
127
+ | data-z | z-index |
128
+
129
+ | Key | Value |
130
+ | --- | :---: |
131
+ | -1 | -1 |
132
+ | 0 | 0 |
133
+ | 1 | 1 |
134
+ | 2 | 2 |
135
+ | 3 | 3 |
136
+
137
+ ## Widths
138
+
139
+ | Definition | Value |
140
+ | ---------- | ----- |
141
+ | data-width | width |
142
+
143
+ | Key | Value |
144
+ | ----- | :---: |
145
+ | 100% | 100% |
146
+ | auto | auto |
147
+ | unset | unset |
148
+
149
+ ## Font sizes
150
+
151
+ | Definition | Value |
152
+ | ---------- | --------- |
153
+ | data-fs | font-size |
154
+
155
+ | Key | Value |
156
+ | --- | :---: |
157
+ | 12 | 12 |
158
+ | 14 | 14 |
159
+ | 16 | 16 |
160
+ | 20 | 20 |
161
+ | 24 | 24 |
162
+ | 32 | 32 |
163
+ | 36 | 36 |
164
+
165
+ ## Font weights
166
+
167
+ | Definition | Value |
168
+ | ---------- | ----------- |
169
+ | data-fw | font-weight |
170
+
171
+ | Key | Value |
172
+ | ----- | :---: |
173
+ | 300 | 300 |
174
+ | 400 | 400 |
175
+ | 500 | 500 |
176
+ | 700 | 700 |
177
+ | 900 | 900 |
178
+ | unset | unset |
179
+
180
+ ## Font colors
181
+
182
+ | Definition | Value |
183
+ | ---------- | ----- |
184
+ | data-color | color |
185
+
186
+ Possible values: see the Colors section.
187
+
188
+ ## Line heights
189
+
190
+ | Definition | Value |
191
+ | ---------- | ----------- |
192
+ | data-lh | line-height |
193
+
194
+ | Key | Value |
195
+ | ----- | :---: |
196
+ | 12 | 12 |
197
+ | 16 | 16 |
198
+ | 20 | 20 |
199
+ | 24 | 24 |
200
+ | 32 | 32 |
201
+ | 36 | 36 |
202
+ | unset | unset |
203
+
204
+ ## Flex directions
205
+
206
+ | Definition | Value |
207
+ | -------------- | -------------- |
208
+ | data-direction | flex-direction |
209
+
210
+ | Key | Value |
211
+ | -------------- | :------------: |
212
+ | row | row |
213
+ | row-reverse | row-reverse |
214
+ | column | column |
215
+ | column-reverse | column-reverse |
216
+
217
+ ## Letter spacings
218
+
219
+ | Definition | Value |
220
+ | ---------- | -------------- |
221
+ | data-ls | letter-spacing |
222
+
223
+ | Key | Value |
224
+ | --- | :---: |
225
+ | 0.5 | 0.5 |
226
+ | 1 | 1 |
227
+ | 1.5 | 1.5 |
228
+ | 2 | 2 |
229
+
230
+ ## Flex grows
231
+
232
+ | Definition | Value |
233
+ | ---------- | --------- |
234
+ | data-grow | flex-grow |
235
+
236
+ | Key | Value |
237
+ | ----- | :---: |
238
+ | 1 | 1 |
239
+ | unset | unset |
240
+
241
+ ## Border widths
242
+
243
+ | Definition | Value |
244
+ | ---------- | ------------------------- |
245
+ | data-bw | border-width |
246
+ | data-bwx | border-width-{right,left} |
247
+ | data-bwy | border-width-{top,bottom} |
248
+ | data-bwt | border-width-top |
249
+ | data-bwr | border-width-right |
250
+ | data-bwb | border-width-bottom |
251
+ | data-bwl | border-width-left |
252
+
253
+ | Key | Value |
254
+ | --- | :---: |
255
+ | 1 | 1 |
256
+ | 2 | 2 |
257
+ | 4 | 4 |
258
+ | 6 | 6 |
259
+ | 12 | 12 |
260
+
261
+ ## Border radiuses
262
+
263
+ | Definition | Value |
264
+ | ---------- | ------------- |
265
+ | data-br | border-radius |
266
+
267
+ | Key | Value |
268
+ | --- | :---: |
269
+ | 0 | 0 |
270
+ | 1 | 1px |
271
+ | 2 | 2px |
272
+ | 4 | 4px |
273
+ | 50% | 50% |
274
+
275
+ ## Max widths
276
+
277
+ | Definition | Value |
278
+ | -------------- | --------- |
279
+ | data-max-width | max-width |
280
+
281
+ | Key | Value |
282
+ | ----- | :----: |
283
+ | 100% | 100% |
284
+ | 1296 | 1296px |
285
+ | 768 | 768px |
286
+ | 528 | 528px |
287
+ | 320 | 320px |
288
+ | unset | unset |
289
+
290
+ ## Transforms
291
+
292
+ | Definition | Value |
293
+ | -------------- | -------------- |
294
+ | data-direction | flex-direction |
295
+
296
+ | Key | Value |
297
+ | ----------- | :---------: |
298
+ | uppercase | uppercase |
299
+ | lowercase | lowercase |
300
+ | capitalize | capitalize |
301
+ | upper-first | upper-first |
302
+ | truncate | truncate |
303
+ | center | center |
304
+ | none | none |
305
+
306
+ ## Overflows
307
+
308
+ | Definition | Value |
309
+ | ------------- | -------- |
310
+ | data-overflow | overflow |
311
+
312
+ | Key | Value |
313
+ | ------ | :----: |
314
+ | auto | auto |
315
+ | scroll | scroll |
316
+ | hidden | hidden |
317
+
318
+ ## Heights
319
+
320
+ | Definition | Value |
321
+ | ----------- | ------ |
322
+ | data-height | height |
323
+
324
+ | Key | Value |
325
+ | ----- | :---: |
326
+ | 100% | 100% |
327
+ | auto | auto |
328
+ | unset | unset |
329
+
330
+ ## Positioners
331
+
332
+ | Definition | Value |
333
+ | ----------- | ------ |
334
+ | data-top | top |
335
+ | data-right | right |
336
+ | data-bottom | bottom |
337
+ | data-left | left |
338
+ | data-inset | inset |
339
+
340
+ | Key | Value |
341
+ | --- | :---: |
342
+ | 0 | 0 |
343
+
344
+ ## Transform
345
+
346
+ > Accepts multiple values.
347
+
348
+ | Definition | Value |
349
+ | -------------- | -------------- |
350
+ | data-transform | text-transform |
351
+ | data-transform | \* |
352
+
353
+ | Key | Value |
354
+ | ----------- | :------------------------------------------------------------: |
355
+ | uppercase | uppercase |
356
+ | lowercase | lowercase |
357
+ | capitalize | capitalize |
358
+ | upper-first | :first-letter { text-transform: uppercase } |
359
+ | center | text-align: center |
360
+ | none | none |
361
+ | truncate | overflow: hidden, white-space: nowrap, text-overflow: ellipsis |
362
+
363
+ ## Backgrounds
364
+
365
+ | Definition | Value |
366
+ | ---------- | ---------------- |
367
+ | data-bg | background-color |
368
+
369
+ Possible values: see the Colors section.
370
+
371
+ ## Border colors
372
+
373
+ | Definition | Value |
374
+ | ---------- | ------------------------- |
375
+ | data-bc | border-color |
376
+ | data-bcx | border-color-{right,left} |
377
+ | data-bcy | border-color-{top,bottom} |
378
+ | data-bct | border-color-top |
379
+ | data-bcr | border-color-right |
380
+ | data-bcb | border-color-bottom |
381
+ | data-bcl | border-color-left |
382
+
383
+ Possible values: see the Colors section.
384
+
385
+ ## Colors
386
+
387
+ Grayscale
388
+
389
+ | Key | Value |
390
+ | -------- | :-----: |
391
+ | white | #F9FAFB |
392
+ | gray-100 | #F3F4F6 |
393
+ | gray-200 | #E5E7EB |
394
+ | gray-300 | #D1D5DB |
395
+ | gray-400 | #9CA3AF |
396
+ | gray-500 | #6B7280 |
397
+ | gray-600 | #4B5563 |
398
+ | gray-700 | #374151 |
399
+ | gray-800 | #1F2937 |
400
+ | black | #111827 |
401
+
402
+ Green
403
+
404
+ | Key | Value |
405
+ | --------- | :----------------: |
406
+ | green-100 | hsl(112, 50%, 85%) |
407
+ | green-200 | hsl(112, 50%, 75%) |
408
+ | green-300 | hsl(112, 50%, 65%) |
409
+ | green-400 | hsl(112, 50%, 55%) |
410
+ | green-500 | hsl(112, 50%, 45%) |
411
+ | green-600 | hsl(112, 50%, 35%) |
412
+ | green-700 | hsl(112, 50%, 25%) |
413
+ | green-800 | hsl(112, 50%, 20%) |
414
+
415
+ Red
416
+
417
+ | Key | Value |
418
+ | ------- | :----------------: |
419
+ | red-100 | hsl(5, 80%, 90%) |
420
+ | red-200 | hsl(5, 80%, 83%) |
421
+ | red-300 | hsl(5, 80%, 72.5%) |
422
+ | red-400 | hsl(5, 80%, 62.5%) |
423
+ | red-500 | hsl(5, 80%, 52.5%) |
424
+ | red-600 | hsl(5, 80%, 42%) |
425
+ | red-700 | hsl(5, 80%, 32.5%) |
426
+ | red-800 | hsl(5, 80%, 22.5%) |
427
+
428
+ Orange
429
+
430
+ | Key | Value |
431
+ | ---------- | :-----------------: |
432
+ | orange-100 | hsl(25, 88%, 85%) |
433
+ | orange-200 | hsl(25, 88%, 75%) |
434
+ | orange-300 | hsl(25, 88%, 65%) |
435
+ | orange-400 | hsl(25, 88%, 55%) |
436
+ | orange-500 | hsl(25, 88%, 45%) |
437
+ | orange-600 | hsl(25, 88%, 37.5%) |
438
+ | orange-700 | hsl(25, 88%, 27.5%) |
439
+ | orange-800 | hsl(25, 88%, 20%) |
@@ -2005,6 +2005,11 @@ var TransformsGenerator = /*#__PURE__*/function (_AbstractGenerator) {
2005
2005
  continue;
2006
2006
  }
2007
2007
 
2008
+ if (key === 'nowrap') {
2009
+ output += "*[data-transform~='nowrap'] {\n white-space: nowrap;\n}\n";
2010
+ continue;
2011
+ }
2012
+
2008
2013
  output += "*[data-transform~='" + key + "'] {\n text-transform: " + value + ";\n}\n";
2009
2014
  }
2010
2015
 
@@ -2288,6 +2293,7 @@ var Transforms = {
2288
2293
  'upper-first': 'upper-first',
2289
2294
  truncate: 'truncate',
2290
2295
  center: 'center',
2296
+ nowrap: 'nowrap',
2291
2297
  none: 'none'
2292
2298
  };
2293
2299
  var Overflows = {
@@ -2356,26 +2362,32 @@ var GeneratorProcessor = /*#__PURE__*/function () {
2356
2362
  output = _context.t5 += _context.sent;
2357
2363
  _context.t6 = output;
2358
2364
  _context.next = 29;
2359
- return new File('src/ui/anima.css').read();
2365
+ return new File('src/ui/textarea.css').read();
2360
2366
 
2361
2367
  case 29:
2362
2368
  output = _context.t6 += _context.sent;
2363
2369
  _context.t7 = output;
2364
2370
  _context.next = 33;
2365
- return new File('src/rules/title-truncate.css').read();
2371
+ return new File('src/ui/anima.css').read();
2366
2372
 
2367
2373
  case 33:
2368
2374
  output = _context.t7 += _context.sent;
2369
2375
  _context.t8 = output;
2370
2376
  _context.next = 37;
2371
- return new File('src/rules/target-blank-referer.css').read();
2377
+ return new File('src/rules/title-truncate.css').read();
2372
2378
 
2373
2379
  case 37:
2374
2380
  output = _context.t8 += _context.sent;
2375
- _context.next = 40;
2381
+ _context.t9 = output;
2382
+ _context.next = 41;
2383
+ return new File('src/rules/target-blank-referer.css').read();
2384
+
2385
+ case 41:
2386
+ output = _context.t9 += _context.sent;
2387
+ _context.next = 44;
2376
2388
  return new File('dist/main.css').save(output);
2377
2389
 
2378
- case 40:
2390
+ case 44:
2379
2391
  case "end":
2380
2392
  return _context.stop();
2381
2393
  }