@master/css 2.0.0-rc.41 → 2.0.0-rc.43

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.
@@ -22,7 +22,8 @@ const config = {
22
22
  rootSize: 16,
23
23
  baseUnit: 4,
24
24
  override: false,
25
- important: false
25
+ important: false,
26
+ defaultMode: 'light'
26
27
  };
27
28
 
28
29
  exports.at = at;
@@ -62,6 +62,7 @@ export interface Config {
62
62
  syntaxes?: SyntaxDefinitions;
63
63
  rootSize?: number;
64
64
  baseUnit?: number;
65
+ defaultMode?: 'light' | 'dark' | string | false;
65
66
  scope?: string;
66
67
  important?: boolean;
67
68
  override?: boolean;
@@ -20,7 +20,8 @@ const config = {
20
20
  rootSize: 16,
21
21
  baseUnit: 4,
22
22
  override: false,
23
- important: false
23
+ important: false,
24
+ defaultMode: 'light'
24
25
  };
25
26
 
26
27
  export { animations, at, config, functions, modes, selectors, syntaxes, utilities, variables };
@@ -1003,9 +1003,6 @@ const syntaxes = {
1003
1003
  common.COLOR_VALUE_REGEX
1004
1004
  ],
1005
1005
  layer: layer.Native,
1006
- variables: [
1007
- 'text'
1008
- ],
1009
1006
  declare (value) {
1010
1007
  return {
1011
1008
  '-webkit-text-stroke-color': value
@@ -1202,7 +1199,10 @@ const syntaxes = {
1202
1199
  ambiguousValues: [
1203
1200
  common.COLOR_VALUE_REGEX
1204
1201
  ],
1205
- layer: layer.Native
1202
+ layer: layer.Native,
1203
+ variables: [
1204
+ 'frame'
1205
+ ]
1206
1206
  },
1207
1207
  'border-bottom-color': {
1208
1208
  ambiguousKeys: [
@@ -1212,7 +1212,10 @@ const syntaxes = {
1212
1212
  ambiguousValues: [
1213
1213
  common.COLOR_VALUE_REGEX
1214
1214
  ],
1215
- layer: layer.Native
1215
+ layer: layer.Native,
1216
+ variables: [
1217
+ 'frame'
1218
+ ]
1216
1219
  },
1217
1220
  'border-left-color': {
1218
1221
  ambiguousKeys: [
@@ -1222,7 +1225,10 @@ const syntaxes = {
1222
1225
  ambiguousValues: [
1223
1226
  common.COLOR_VALUE_REGEX
1224
1227
  ],
1225
- layer: layer.Native
1228
+ layer: layer.Native,
1229
+ variables: [
1230
+ 'frame'
1231
+ ]
1226
1232
  },
1227
1233
  'border-right-color': {
1228
1234
  ambiguousKeys: [
@@ -1232,7 +1238,10 @@ const syntaxes = {
1232
1238
  ambiguousValues: [
1233
1239
  common.COLOR_VALUE_REGEX
1234
1240
  ],
1235
- layer: layer.Native
1241
+ layer: layer.Native,
1242
+ variables: [
1243
+ 'frame'
1244
+ ]
1236
1245
  },
1237
1246
  'border-x-color': {
1238
1247
  ambiguousKeys: [
@@ -1243,6 +1252,9 @@ const syntaxes = {
1243
1252
  common.COLOR_VALUE_REGEX
1244
1253
  ],
1245
1254
  layer: layer.Shorthand,
1255
+ variables: [
1256
+ 'frame'
1257
+ ],
1246
1258
  declare (value) {
1247
1259
  return {
1248
1260
  'border-left-color': value,
@@ -1259,6 +1271,9 @@ const syntaxes = {
1259
1271
  common.COLOR_VALUE_REGEX
1260
1272
  ],
1261
1273
  layer: layer.Shorthand,
1274
+ variables: [
1275
+ 'frame'
1276
+ ],
1262
1277
  declare (value) {
1263
1278
  return {
1264
1279
  'border-top-color': value,
@@ -1274,7 +1289,10 @@ const syntaxes = {
1274
1289
  ambiguousValues: [
1275
1290
  common.COLOR_VALUE_REGEX
1276
1291
  ],
1277
- layer: layer.NativeShorthand
1292
+ layer: layer.NativeShorthand,
1293
+ variables: [
1294
+ 'frame'
1295
+ ]
1278
1296
  },
1279
1297
  // border radius
1280
1298
  'border-top-left-radius': {
@@ -1562,31 +1580,46 @@ const syntaxes = {
1562
1580
  key: 'bt',
1563
1581
  layer: layer.NativeShorthand,
1564
1582
  unit: 'rem',
1565
- transformValueComponents: autofillSolidStyle
1583
+ transformValueComponents: autofillSolidStyle,
1584
+ variables: [
1585
+ 'frame'
1586
+ ]
1566
1587
  },
1567
1588
  'border-bottom': {
1568
1589
  key: 'bb',
1569
1590
  layer: layer.NativeShorthand,
1570
1591
  unit: 'rem',
1571
- transformValueComponents: autofillSolidStyle
1592
+ transformValueComponents: autofillSolidStyle,
1593
+ variables: [
1594
+ 'frame'
1595
+ ]
1572
1596
  },
1573
1597
  'border-left': {
1574
1598
  key: 'bl',
1575
1599
  layer: layer.NativeShorthand,
1576
1600
  unit: 'rem',
1577
- transformValueComponents: autofillSolidStyle
1601
+ transformValueComponents: autofillSolidStyle,
1602
+ variables: [
1603
+ 'frame'
1604
+ ]
1578
1605
  },
1579
1606
  'border-right': {
1580
1607
  key: 'br',
1581
1608
  layer: layer.NativeShorthand,
1582
1609
  unit: 'rem',
1583
- transformValueComponents: autofillSolidStyle
1610
+ transformValueComponents: autofillSolidStyle,
1611
+ variables: [
1612
+ 'frame'
1613
+ ]
1584
1614
  },
1585
1615
  'border-x': {
1586
1616
  key: 'bx',
1587
1617
  unit: 'rem',
1588
1618
  layer: layer.Shorthand,
1589
1619
  transformValueComponents: autofillSolidStyle,
1620
+ variables: [
1621
+ 'frame'
1622
+ ],
1590
1623
  declare (value) {
1591
1624
  return {
1592
1625
  'border-left': value,
@@ -1599,6 +1632,9 @@ const syntaxes = {
1599
1632
  unit: 'rem',
1600
1633
  layer: layer.Shorthand,
1601
1634
  transformValueComponents: autofillSolidStyle,
1635
+ variables: [
1636
+ 'frame'
1637
+ ],
1602
1638
  declare (value) {
1603
1639
  return {
1604
1640
  'border-top': value,
@@ -1610,7 +1646,10 @@ const syntaxes = {
1610
1646
  key: 'b',
1611
1647
  unit: 'rem',
1612
1648
  layer: layer.NativeShorthand,
1613
- transformValueComponents: autofillSolidStyle
1649
+ transformValueComponents: autofillSolidStyle,
1650
+ variables: [
1651
+ 'frame'
1652
+ ]
1614
1653
  },
1615
1654
  'background-attachment': {
1616
1655
  ambiguousKeys: [
@@ -1997,7 +2036,10 @@ const syntaxes = {
1997
2036
  ambiguousValues: [
1998
2037
  common.COLOR_VALUE_REGEX
1999
2038
  ],
2000
- layer: layer.Native
2039
+ layer: layer.Native,
2040
+ variables: [
2041
+ 'frame'
2042
+ ]
2001
2043
  },
2002
2044
  'outline-offset': {
2003
2045
  unit: 'rem',
@@ -2033,7 +2075,8 @@ const syntaxes = {
2033
2075
  'outline-width',
2034
2076
  'outline-style',
2035
2077
  'outline-offset',
2036
- 'outline-color'
2078
+ 'outline-color',
2079
+ 'frame'
2037
2080
  ],
2038
2081
  transformValueComponents: autofillSolidStyle
2039
2082
  },
@@ -1001,9 +1001,6 @@ const syntaxes = {
1001
1001
  COLOR_VALUE_REGEX
1002
1002
  ],
1003
1003
  layer: Layer.Native,
1004
- variables: [
1005
- 'text'
1006
- ],
1007
1004
  declare (value) {
1008
1005
  return {
1009
1006
  '-webkit-text-stroke-color': value
@@ -1200,7 +1197,10 @@ const syntaxes = {
1200
1197
  ambiguousValues: [
1201
1198
  COLOR_VALUE_REGEX
1202
1199
  ],
1203
- layer: Layer.Native
1200
+ layer: Layer.Native,
1201
+ variables: [
1202
+ 'frame'
1203
+ ]
1204
1204
  },
1205
1205
  'border-bottom-color': {
1206
1206
  ambiguousKeys: [
@@ -1210,7 +1210,10 @@ const syntaxes = {
1210
1210
  ambiguousValues: [
1211
1211
  COLOR_VALUE_REGEX
1212
1212
  ],
1213
- layer: Layer.Native
1213
+ layer: Layer.Native,
1214
+ variables: [
1215
+ 'frame'
1216
+ ]
1214
1217
  },
1215
1218
  'border-left-color': {
1216
1219
  ambiguousKeys: [
@@ -1220,7 +1223,10 @@ const syntaxes = {
1220
1223
  ambiguousValues: [
1221
1224
  COLOR_VALUE_REGEX
1222
1225
  ],
1223
- layer: Layer.Native
1226
+ layer: Layer.Native,
1227
+ variables: [
1228
+ 'frame'
1229
+ ]
1224
1230
  },
1225
1231
  'border-right-color': {
1226
1232
  ambiguousKeys: [
@@ -1230,7 +1236,10 @@ const syntaxes = {
1230
1236
  ambiguousValues: [
1231
1237
  COLOR_VALUE_REGEX
1232
1238
  ],
1233
- layer: Layer.Native
1239
+ layer: Layer.Native,
1240
+ variables: [
1241
+ 'frame'
1242
+ ]
1234
1243
  },
1235
1244
  'border-x-color': {
1236
1245
  ambiguousKeys: [
@@ -1241,6 +1250,9 @@ const syntaxes = {
1241
1250
  COLOR_VALUE_REGEX
1242
1251
  ],
1243
1252
  layer: Layer.Shorthand,
1253
+ variables: [
1254
+ 'frame'
1255
+ ],
1244
1256
  declare (value) {
1245
1257
  return {
1246
1258
  'border-left-color': value,
@@ -1257,6 +1269,9 @@ const syntaxes = {
1257
1269
  COLOR_VALUE_REGEX
1258
1270
  ],
1259
1271
  layer: Layer.Shorthand,
1272
+ variables: [
1273
+ 'frame'
1274
+ ],
1260
1275
  declare (value) {
1261
1276
  return {
1262
1277
  'border-top-color': value,
@@ -1272,7 +1287,10 @@ const syntaxes = {
1272
1287
  ambiguousValues: [
1273
1288
  COLOR_VALUE_REGEX
1274
1289
  ],
1275
- layer: Layer.NativeShorthand
1290
+ layer: Layer.NativeShorthand,
1291
+ variables: [
1292
+ 'frame'
1293
+ ]
1276
1294
  },
1277
1295
  // border radius
1278
1296
  'border-top-left-radius': {
@@ -1560,31 +1578,46 @@ const syntaxes = {
1560
1578
  key: 'bt',
1561
1579
  layer: Layer.NativeShorthand,
1562
1580
  unit: 'rem',
1563
- transformValueComponents: autofillSolidStyle
1581
+ transformValueComponents: autofillSolidStyle,
1582
+ variables: [
1583
+ 'frame'
1584
+ ]
1564
1585
  },
1565
1586
  'border-bottom': {
1566
1587
  key: 'bb',
1567
1588
  layer: Layer.NativeShorthand,
1568
1589
  unit: 'rem',
1569
- transformValueComponents: autofillSolidStyle
1590
+ transformValueComponents: autofillSolidStyle,
1591
+ variables: [
1592
+ 'frame'
1593
+ ]
1570
1594
  },
1571
1595
  'border-left': {
1572
1596
  key: 'bl',
1573
1597
  layer: Layer.NativeShorthand,
1574
1598
  unit: 'rem',
1575
- transformValueComponents: autofillSolidStyle
1599
+ transformValueComponents: autofillSolidStyle,
1600
+ variables: [
1601
+ 'frame'
1602
+ ]
1576
1603
  },
1577
1604
  'border-right': {
1578
1605
  key: 'br',
1579
1606
  layer: Layer.NativeShorthand,
1580
1607
  unit: 'rem',
1581
- transformValueComponents: autofillSolidStyle
1608
+ transformValueComponents: autofillSolidStyle,
1609
+ variables: [
1610
+ 'frame'
1611
+ ]
1582
1612
  },
1583
1613
  'border-x': {
1584
1614
  key: 'bx',
1585
1615
  unit: 'rem',
1586
1616
  layer: Layer.Shorthand,
1587
1617
  transformValueComponents: autofillSolidStyle,
1618
+ variables: [
1619
+ 'frame'
1620
+ ],
1588
1621
  declare (value) {
1589
1622
  return {
1590
1623
  'border-left': value,
@@ -1597,6 +1630,9 @@ const syntaxes = {
1597
1630
  unit: 'rem',
1598
1631
  layer: Layer.Shorthand,
1599
1632
  transformValueComponents: autofillSolidStyle,
1633
+ variables: [
1634
+ 'frame'
1635
+ ],
1600
1636
  declare (value) {
1601
1637
  return {
1602
1638
  'border-top': value,
@@ -1608,7 +1644,10 @@ const syntaxes = {
1608
1644
  key: 'b',
1609
1645
  unit: 'rem',
1610
1646
  layer: Layer.NativeShorthand,
1611
- transformValueComponents: autofillSolidStyle
1647
+ transformValueComponents: autofillSolidStyle,
1648
+ variables: [
1649
+ 'frame'
1650
+ ]
1612
1651
  },
1613
1652
  'background-attachment': {
1614
1653
  ambiguousKeys: [
@@ -1995,7 +2034,10 @@ const syntaxes = {
1995
2034
  ambiguousValues: [
1996
2035
  COLOR_VALUE_REGEX
1997
2036
  ],
1998
- layer: Layer.Native
2037
+ layer: Layer.Native,
2038
+ variables: [
2039
+ 'frame'
2040
+ ]
1999
2041
  },
2000
2042
  'outline-offset': {
2001
2043
  unit: 'rem',
@@ -2031,7 +2073,8 @@ const syntaxes = {
2031
2073
  'outline-width',
2032
2074
  'outline-style',
2033
2075
  'outline-offset',
2034
- 'outline-color'
2076
+ 'outline-color',
2077
+ 'frame'
2035
2078
  ],
2036
2079
  transformValueComponents: autofillSolidStyle
2037
2080
  },
@@ -3,7 +3,7 @@
3
3
  var colors = require('@master/colors');
4
4
  var extend = require('@techor/extend');
5
5
 
6
- const variables = extend(colors, {
6
+ const _variables = {
7
7
  full: '100%',
8
8
  fit: 'fit-content',
9
9
  max: 'max-content',
@@ -122,6 +122,25 @@ const variables = extend(colors, {
122
122
  view: 'view-box'
123
123
  },
124
124
  current: 'currentColor',
125
+ frame: {
126
+ neutral: {
127
+ '@light': '$(slate-60)',
128
+ '@dark': '$(gray-30)'
129
+ },
130
+ light: {
131
+ '@light': '$(slate-60)/.2',
132
+ '@dark': '$(gray-30)/.2'
133
+ },
134
+ lighter: {
135
+ '@light': '$(slate-60)/.16',
136
+ '@dark': '$(gray-30)/.16'
137
+ },
138
+ lightest: {
139
+ '@light': '$(slate-60)/.12',
140
+ '@dark': '$(gray-30)/.12'
141
+ }
142
+ },
143
+ // from figma
125
144
  white: '#ffffff',
126
145
  black: '#000000',
127
146
  base: {
@@ -140,96 +159,223 @@ const variables = extend(colors, {
140
159
  '@light': '$(black)',
141
160
  '@dark': '$(white)'
142
161
  },
143
- line: {
144
- neutral: {
145
- '@light': '$(slate-60)',
146
- '@dark': '$(gray-30)'
147
- }
148
- },
149
162
  gray: {
150
163
  '@light': '$(gray-30)',
151
- '@dark': '$(gray-40)'
164
+ '@dark': '$(gray-40)',
165
+ active: {
166
+ '@light': '$(gray-40)',
167
+ '@dark': '$(gray-30)'
168
+ },
169
+ text: {
170
+ '@light': '$(gray-90)',
171
+ '@dark': '$(gray-95)'
172
+ }
152
173
  },
153
174
  slate: {
154
175
  '@light': '$(slate-30)',
155
- '@dark': '$(slate-40)'
176
+ '@dark': '$(slate-40)',
177
+ active: {
178
+ '@light': '$(slate-40)',
179
+ '@dark': '$(slate-30)'
180
+ },
181
+ text: {
182
+ '@light': '$(slate-90)',
183
+ '@dark': '$(slate-95)'
184
+ }
156
185
  },
157
186
  brown: {
158
187
  '@light': '$(brown-40)',
159
- '@dark': '$(brown-50)'
188
+ '@dark': '$(brown-50)',
189
+ active: {
190
+ '@light': '$(brown-50)',
191
+ '@dark': '$(brown-40)'
192
+ },
193
+ text: {
194
+ '@light': '$(brown-90)',
195
+ '@dark': '$(brown-95)'
196
+ }
160
197
  },
161
198
  orange: {
162
199
  '@light': '$(orange-40)',
163
- '@dark': '$(orange-50)'
200
+ '@dark': '$(orange-50)',
201
+ active: {
202
+ '@light': '$(orange-50)',
203
+ '@dark': '$(orange-40)'
204
+ },
205
+ text: {
206
+ '@light': '$(orange-90)',
207
+ '@dark': '$(orange-95)'
208
+ }
164
209
  },
165
210
  amber: {
166
211
  '@light': '$(amber-40)',
167
- '@dark': '$(amber-50)'
212
+ '@dark': '$(amber-50)',
213
+ active: {
214
+ '@light': '$(amber-50)',
215
+ '@dark': '$(amber-30)'
216
+ },
217
+ text: {
218
+ '@light': '$(amber-90)',
219
+ '@dark': '$(amber-95)'
220
+ }
168
221
  },
169
222
  yellow: {
170
223
  '@light': '$(yellow-40)',
171
- '@dark': '$(yellow-50)'
224
+ '@dark': '$(yellow-50)',
225
+ active: {
226
+ '@light': '$(yellow-50)',
227
+ '@dark': '$(yellow-30)'
228
+ },
229
+ text: {
230
+ '@light': '$(yellow-90)',
231
+ '@dark': '$(yellow-95)'
232
+ }
172
233
  },
173
234
  lime: {
174
235
  '@light': '$(lime-40)',
175
- '@dark': '$(lime-50)'
236
+ '@dark': '$(lime-50)',
237
+ active: {
238
+ '@light': '$(lime-50)',
239
+ '@dark': '$(lime-30)'
240
+ },
241
+ text: {
242
+ '@light': '$(lime-90)',
243
+ '@dark': '$(lime-95)'
244
+ }
176
245
  },
177
246
  green: {
178
247
  '@light': '$(green-40)',
179
- '@dark': '$(green-50)'
248
+ '@dark': '$(green-50)',
249
+ active: {
250
+ '@light': '$(green-50)',
251
+ '@dark': '$(green-30)'
252
+ },
253
+ text: {
254
+ '@light': '$(green-90)',
255
+ '@dark': '$(green-95)'
256
+ }
180
257
  },
181
258
  beryl: {
182
259
  '@light': '$(beryl-40)',
183
- '@dark': '$(beryl-50)'
260
+ '@dark': '$(beryl-50)',
261
+ active: {
262
+ '@light': '$(beryl-50)',
263
+ '@dark': '$(beryl-30)'
264
+ },
265
+ text: {
266
+ '@light': '$(beryl-90)',
267
+ '@dark': '$(beryl-95)'
268
+ }
184
269
  },
185
270
  teal: {
186
271
  '@light': '$(teal-40)',
187
- '@dark': '$(teal-50)'
272
+ '@dark': '$(teal-50)',
273
+ active: {
274
+ '@light': '$(teal-50)',
275
+ '@dark': '$(teal-30)'
276
+ },
277
+ text: {
278
+ '@light': '$(teal-90)',
279
+ '@dark': '$(teal-95)'
280
+ }
188
281
  },
189
282
  cyan: {
190
283
  '@light': '$(cyan-40)',
191
- '@dark': '$(cyan-50)'
284
+ '@dark': '$(cyan-50)',
285
+ active: {
286
+ '@light': '$(cyan-50)',
287
+ '@dark': '$(cyan-30)'
288
+ },
289
+ text: {
290
+ '@light': '$(cyan-90)',
291
+ '@dark': '$(cyan-95)'
292
+ }
192
293
  },
193
294
  sky: {
194
295
  '@light': '$(sky-60)',
195
- '@dark': '$(sky-50)'
296
+ '@dark': '$(sky-50)',
297
+ active: {
298
+ '@light': '$(sky-70)',
299
+ '@dark': '$(sky-40)'
300
+ },
301
+ text: '$(white)'
196
302
  },
197
303
  blue: {
198
304
  '@light': '$(blue-60)',
199
- '@dark': '$(blue-50)'
305
+ '@dark': '$(blue-50)',
306
+ active: {
307
+ '@light': '$(blue-70)',
308
+ '@dark': '$(blue-40)'
309
+ },
310
+ text: '$(white)'
200
311
  },
201
312
  indigo: {
202
313
  '@light': '$(indigo-60)',
203
- '@dark': '$(indigo-50)'
314
+ '@dark': '$(indigo-50)',
315
+ active: {
316
+ '@light': '$(indigo-70)',
317
+ '@dark': '$(indigo-40)'
318
+ },
319
+ text: '$(white)'
204
320
  },
205
321
  violet: {
206
322
  '@light': '$(violet-60)',
207
- '@dark': '$(violet-50)'
323
+ '@dark': '$(violet-50)',
324
+ active: {
325
+ '@light': '$(violet-70)',
326
+ '@dark': '$(violet-40)'
327
+ },
328
+ text: '$(white)'
208
329
  },
209
330
  purple: {
210
331
  '@light': '$(purple-60)',
211
- '@dark': '$(purple-50)'
332
+ '@dark': '$(purple-50)',
333
+ active: {
334
+ '@light': '$(purple-70)',
335
+ '@dark': '$(purple-40)'
336
+ },
337
+ text: '$(white)'
212
338
  },
213
339
  fuchsia: {
214
340
  '@light': '$(fuchsia-60)',
215
- '@dark': '$(fuchsia-50)'
341
+ '@dark': '$(fuchsia-50)',
342
+ active: {
343
+ '@light': '$(fuchsia-70)',
344
+ '@dark': '$(fuchsia-40)'
345
+ },
346
+ text: '$(white)'
216
347
  },
217
348
  pink: {
218
349
  '@light': '$(pink-60)',
219
- '@dark': '$(pink-50)'
350
+ '@dark': '$(pink-50)',
351
+ active: {
352
+ '@light': '$(pink-70)',
353
+ '@dark': '$(pink-40)'
354
+ },
355
+ text: '$(white)'
220
356
  },
221
357
  crimson: {
222
358
  '@light': '$(crimson-60)',
223
- '@dark': '$(crimson-50)'
359
+ '@dark': '$(crimson-50)',
360
+ active: {
361
+ '@light': '$(crimson-70)',
362
+ '@dark': '$(crimson-40)'
363
+ },
364
+ text: '$(white)'
224
365
  },
225
366
  red: {
226
367
  '@light': '$(red-60)',
227
- '@dark': '$(red-50)'
368
+ '@dark': '$(red-50)',
369
+ active: {
370
+ '@light': '$(red-70)',
371
+ '@dark': '$(red-40)'
372
+ },
373
+ text: '$(white)'
228
374
  },
229
375
  text: {
230
376
  invert: {
231
- '@light': '$(black)',
232
- '@dark': '$(white)'
377
+ '@light': '$(white)',
378
+ '@dark': '$(black)'
233
379
  },
234
380
  strong: {
235
381
  '@light': '$(slate-95)',
@@ -332,6 +478,7 @@ const variables = extend(colors, {
332
478
  '@dark': '$(red-30)'
333
479
  }
334
480
  }
335
- });
481
+ };
482
+ const variables = extend(colors, _variables);
336
483
 
337
484
  module.exports = variables;