@onereach/styles 2.19.1-beta.1320.0 → 2.19.1-beta.1322.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onereach/styles",
3
- "version": "2.19.1-beta.1320.0",
3
+ "version": "2.19.1-beta.1322.0",
4
4
  "description": "Styles for or-ui-next",
5
5
  "main": "./main.css",
6
6
  "unpkg": "./main.css",
@@ -24,28 +24,17 @@ module.exports = {
24
24
  darkMode: ['class', '[data-theme="dark"]'],
25
25
 
26
26
  theme: {
27
- screens: {
28
- 'sm': '640px',
29
- 'md': '768px',
30
- 'lg': '1024px',
31
- 'xl': '1280px',
32
- '2xl': '1536px',
33
- },
34
-
35
27
  spacing: parseSpacingTokens(spacingTokens),
36
28
 
37
29
  backgroundColor: {
38
30
  // Avoid using `text` colors as a background (only for corner cases)
39
31
  ...parseColorTokens(colorTokens, ['generic', 'background', 'text']),
40
32
  'transparent': 'transparent',
41
- 'current': 'currentColor',
42
- 'inherit': 'inherit',
43
33
  },
44
34
 
45
35
  textColor: {
46
36
  ...parseColorTokens(colorTokens, ['generic', 'text']),
47
37
  'transparent': 'transparent',
48
- 'current': 'currentColor',
49
38
  'inherit': 'inherit',
50
39
  },
51
40
 
@@ -53,28 +42,20 @@ module.exports = {
53
42
  ...parseColorTokens(colorTokens, ['generic']),
54
43
  'transparent': 'transparent',
55
44
  'current': 'currentColor',
56
- 'inherit': 'inherit',
57
45
  },
58
46
 
59
47
  outlineColor: {
60
48
  ...parseColorTokens(colorTokens, ['generic']),
61
49
  'transparent': 'transparent',
62
50
  'current': 'currentColor',
63
- 'inherit': 'inherit',
64
51
  },
65
52
 
66
53
  fill: {
67
54
  ...parseColorTokens(colorTokens, ['generic', 'background', 'text']),
68
- 'transparent': 'transparent',
69
- 'current': 'currentColor',
70
- 'inherit': 'inherit',
71
55
  },
72
56
 
73
57
  stroke: {
74
58
  ...parseColorTokens(colorTokens, ['generic', 'background', 'text']),
75
- 'transparent': 'transparent',
76
- 'current': 'currentColor',
77
- 'inherit': 'inherit',
78
59
  },
79
60
 
80
61
  content: {
@@ -133,8 +114,8 @@ module.exports = {
133
114
  },
134
115
 
135
116
  boxShadow: {
136
- 'generic': '0 1px 1px rgba(0 0 0 / 0.24), 0 0 1px rgba(0 0 0 / 0.16)',
137
117
  ...parseBoxShadowTokens(boxShadowTokens),
118
+ DEFAULT: '0 1px 1px rgba(0 0 0 / 0.24), 0 0 1px rgba(0 0 0 / 0.16)',
138
119
  },
139
120
 
140
121
  fontFamily: {
@@ -145,8 +126,7 @@ module.exports = {
145
126
 
146
127
  fontSize: {
147
128
  ...parseFontSizeTokens(typographyTokens),
148
- 'icon': ['1.15em', { lineHeight: 1 }],
149
- 'inherit': 'inherit',
129
+ 'inherit': ['inherit', { lineHeight: 'inherit' }],
150
130
  },
151
131
 
152
132
  fontWeight: {
@@ -154,16 +134,80 @@ module.exports = {
154
134
  'inherit': 'inherit',
155
135
  },
156
136
 
157
- letterSpacing: false,
137
+ transitionDuration: {
138
+ 'short': '100ms',
139
+ 'medium': '250ms',
140
+ 'long': '400ms',
141
+ },
158
142
 
159
- lineHeight: {
160
- 'inherit': 'inherit',
143
+ transitionTimingFunction: {
144
+ 'standard': 'cubic-bezier(0.2, 0, 0, 1)',
161
145
  },
162
146
  },
163
147
 
164
148
  plugins: [
165
- plugin(({ addBase, addUtilities, addVariant, theme }) => {
149
+ // Core
150
+ plugin(({ addUtilities, addVariant }) => {
151
+ addVariant('enabled', '&:not([disabled])');
152
+ addVariant('disabled', '&[disabled]');
153
+
154
+ addVariant('read-write', '&:not([readonly])');
155
+ addVariant('read-only', '&[readonly]');
156
+
157
+ addVariant('valid', '&:not([invalid])');
158
+ addVariant('invalid', '&[invalid]');
159
+
160
+ addVariant('required', '&[required]');
161
+ addVariant('optional', '&:not([required])');
162
+
163
+ addVariant('checked', ['&[checked]', '&:checked']);
164
+ addVariant('selected', ['&[selected]', '&:checked']);
165
+ addVariant('activated', ['&[activated]']);
166
+
167
+ addVariant('hover', '&:hover:not(.interactivity-none)');
168
+ addVariant('focus', '&:focus-visible:not(.interactivity-none)');
169
+ addVariant('focus-within', '&:focus-within:not(.interactivity-none)');
170
+ addVariant('active', '&:active:not(.interactivity-none)');
171
+
172
+ addVariant('link', '& :any-link');
173
+
174
+ // TODO: Remove when migration complete
175
+ addUtilities({
176
+ '.visually-hidden': {
177
+ width: 0,
178
+ height: 0,
179
+ visibility: 'hidden',
180
+ },
181
+ });
182
+ }),
183
+
184
+ // Interactivity
185
+ plugin(({ addUtilities }) => {
186
+ addUtilities({
187
+ '.interactivity-auto': {
188
+ pointerEvents: 'auto',
189
+ cursor: 'pointer',
190
+
191
+ '&[disabled]': {
192
+ pointerEvents: 'none',
193
+ cursor: 'default',
194
+ },
195
+ },
196
+
197
+ '.interactivity-none': {
198
+ pointerEvents: 'none',
199
+ cursor: 'default',
200
+ },
201
+ });
202
+ }),
203
+
204
+ // Typography
205
+ plugin(({ addBase, matchUtilities, theme }) => {
166
206
  addBase({
207
+ '*': {
208
+ userSelect: 'none',
209
+ },
210
+
167
211
  ':root': {
168
212
  fontFamily: theme('fontFamily.body-1-regular'),
169
213
  fontSize: theme('fontSize.body-1-regular'),
@@ -171,62 +215,506 @@ module.exports = {
171
215
  },
172
216
  });
173
217
 
174
- addUtilities({
175
- '.font-icon-outlined': {
176
- fontVariationSettings: '"opsz" 48, "wght" 400, "FILL" 0, "GRAD" 0',
218
+ matchUtilities({
219
+ 'typography': (value) => {
220
+ const fontSizeConfig = theme('fontSize');
221
+
222
+ const [fontSizeDesktop, optionsDesktop] = fontSizeConfig[value] ?? [];
223
+ const [fontSizeMobile, optionsMobile] = fontSizeConfig[`mobile-${value}`] ?? [];
224
+
225
+ return {
226
+ fontFamily: theme(`fontFamily.mobile-${value}`) ?? theme(`fontFamily.${value}`),
227
+ fontWeight: theme(`fontWeight.mobile-${value}`) ?? theme(`fontWeight.${value}`),
228
+ fontSize: fontSizeMobile ?? fontSizeDesktop,
229
+ lineHeight: optionsMobile?.lineHeight ?? optionsDesktop?.lineHeight,
230
+
231
+ [`@media (min-width: ${theme('screens.md')})`]: {
232
+ fontFamily: theme(`fontFamily.${value}`),
233
+ fontWeight: theme(`fontWeight.${value}`),
234
+ fontSize: fontSizeDesktop,
235
+ lineHeight: optionsDesktop?.lineHeight,
236
+ },
237
+ };
238
+ },
239
+ }, {
240
+ values: {
241
+ 'headline-1': 'headline-1',
242
+ 'headline-2': 'headline-2',
243
+ 'headline-3': 'headline-3',
244
+ 'headline-4': 'headline-4',
245
+ 'body-1-regular': 'body-1-regular',
246
+ 'body-1-semibold': 'body-1-semibold',
247
+ 'body-1-bold': 'body-1-bold',
248
+ 'body-2-regular': 'body-2-regular',
249
+ 'body-2-semibold': 'body-2-semibold',
250
+ 'body-2-bold': 'body-2-bold',
251
+ 'caption-regular': 'caption-regular',
252
+ 'caption-semibold': 'caption-semibold',
253
+ 'caption-bold': 'caption-bold',
254
+ 'button': 'button',
255
+ 'icon': 'icon',
256
+
257
+ 'inherit': 'inherit',
258
+ },
259
+ });
260
+ }),
261
+
262
+ // Iconography
263
+ plugin(({ matchUtilities }) => {
264
+ matchUtilities({
265
+ 'iconography': (value) => ({
266
+ fontVariationSettings: value,
267
+ }),
268
+ }, {
269
+ values: {
270
+ 'outlined': '"opsz" 48, "wght" 400, "FILL" 0, "GRAD" 0',
271
+ 'outlined-bold': '"opsz" 24, "wght" 700, "FILL" 0, "GRAD" 0',
272
+
273
+ 'filled': '"opsz" 48, "wght" 400, "FILL" 1, "GRAD" 0',
274
+ 'filled-bold': '"opsz" 24, "wght" 700, "FILL" 1, "GRAD" 0',
275
+
276
+ 'inherit': 'inherit',
277
+ },
278
+ });
279
+ }),
280
+
281
+ // Theme
282
+ plugin(({ addUtilities, matchUtilities, theme }) => {
283
+ // Presets
284
+ matchUtilities({
285
+ 'theme-preset-1': (value) => {
286
+ const [color, suffix = ''] = value.split('..');
287
+
288
+ return {
289
+ backgroundColor: theme(`backgroundColor.${color}` + suffix),
290
+ color: theme(`textColor.on-${color}` + suffix),
291
+
292
+ borderStyle: 'none',
293
+ outlineStyle: 'none',
294
+
295
+ '&[disabled]': {
296
+ backgroundColor: `${theme('backgroundColor.disabled' + suffix)} !important`,
297
+ color: `${theme('textColor.on-disabled' + suffix)} !important`,
298
+ },
299
+
300
+ '&:not(.interactivity-none)': {
301
+ '&:hover, &:focus-visible': {
302
+ backgroundColor: theme(`backgroundColor.${color}-hover` + suffix),
303
+ },
304
+
305
+ '&:active': {
306
+ backgroundColor: theme(`backgroundColor.${color}` + suffix),
307
+ },
308
+ },
309
+
310
+ transitionProperty: 'all',
311
+ transitionDuration: theme('transitionDuration.short'),
312
+ transitionTimingFunction: theme('transitionTimingFunction.standard'),
313
+ };
177
314
  },
178
315
 
179
- '.font-icon-outlined-bold': {
180
- fontVariationSettings: '"opsz" 24, "wght" 700, "FILL" 0, "GRAD" 0',
316
+ 'theme-preset-2': (value) => {
317
+ const [color, suffix = ''] = value.split('..');
318
+
319
+ return {
320
+ backgroundColor: theme(`backgroundColor.${color}-opacity-0-08` + suffix),
321
+ color: theme(`textColor.${color}` + suffix),
322
+
323
+ borderStyle: 'none',
324
+ outlineStyle: 'none',
325
+
326
+ '&[disabled]': {
327
+ backgroundColor: `${theme('backgroundColor.disabled' + suffix)} !important`,
328
+ color: `${theme('textColor.on-disabled' + suffix)} !important`,
329
+ },
330
+
331
+ '&:not(.interactivity-none)': {
332
+ '&:hover, &:focus-visible': {
333
+ backgroundColor: theme(`backgroundColor.${color}-opacity-0-12` + suffix),
334
+ },
335
+
336
+ '&:active': {
337
+ backgroundColor: theme(`backgroundColor.${color}-opacity-0-16` + suffix),
338
+ },
339
+ },
340
+
341
+ transitionProperty: 'all',
342
+ transitionDuration: theme('transitionDuration.short'),
343
+ transitionTimingFunction: theme('transitionTimingFunction.standard'),
344
+ };
345
+ },
346
+
347
+ 'theme-preset-3': (value) => {
348
+ const [color, suffix = ''] = value.split('..');
349
+
350
+ return {
351
+ backgroundColor: 'transparent',
352
+ color: theme(`textColor.${color}` + suffix),
353
+
354
+ borderStyle: 'none',
355
+ outlineStyle: 'none',
356
+
357
+ '&[disabled]': {
358
+ color: `${theme('textColor.on-disabled' + suffix)} !important`,
359
+ },
360
+
361
+ '&:not(.interactivity-none)': {
362
+ '&:hover, &:focus-visible': {
363
+ backgroundColor: theme(`backgroundColor.${color}-opacity-0-08` + suffix),
364
+ },
365
+
366
+ '&:active': {
367
+ backgroundColor: theme(`backgroundColor.${color}-opacity-0-16` + suffix),
368
+ },
369
+ },
370
+
371
+ transitionProperty: 'all',
372
+ transitionDuration: theme('transitionDuration.short'),
373
+ transitionTimingFunction: theme('transitionTimingFunction.standard'),
374
+ };
181
375
  },
182
376
 
183
- '.font-icon-filled': {
184
- fontVariationSettings: '"opsz" 48, "wght" 400, "FILL" 1, "GRAD" 0',
377
+ 'theme-preset-4': (value) => {
378
+ const [color, suffix = ''] = value.split('..');
379
+
380
+ return {
381
+ backgroundColor: 'transparent',
382
+ color: theme(`textColor.${color}` + suffix),
383
+
384
+ borderStyle: 'none',
385
+ outlineStyle: 'none',
386
+
387
+ '&[disabled]': {
388
+ color: `${theme('textColor.on-disabled' + suffix)} !important`,
389
+ },
390
+
391
+ '&:not(.interactivity-none)': {
392
+ '&:hover, &:focus-visible': {
393
+ color: theme(`textColor.${color}-hover` + suffix),
394
+ },
395
+
396
+ '&:active': {
397
+ color: theme(`textColor.${color}` + suffix),
398
+ },
399
+ },
400
+
401
+ transitionProperty: 'all',
402
+ transitionDuration: theme('transitionDuration.short'),
403
+ transitionTimingFunction: theme('transitionTimingFunction.standard'),
404
+ };
185
405
  },
406
+ }, {
407
+ values: {
408
+ 'primary': 'primary',
409
+ 'primary-dark': 'primary..-dark',
410
+
411
+ // 'secondary': 'secondary',
412
+ // 'secondary-dark': 'secondary..-dark',
186
413
 
187
- '.font-icon-filled-bold': {
188
- fontVariationSettings: '"opsz" 24, "wght" 700, "FILL" 1, "GRAD" 0',
414
+ // 'tertiary': 'tertiary',
415
+ // 'tertiary-dark': 'tertiary..-dark',
416
+
417
+ 'success': 'success',
418
+ 'success-dark': 'success..-dark',
419
+
420
+ 'warning': 'warning',
421
+ 'warning-dark': 'warning..-dark',
422
+
423
+ 'error': 'error',
424
+ 'error-dark': 'error..-dark',
425
+ },
426
+ });
427
+
428
+ // Backgrounds
429
+ matchUtilities({
430
+ 'theme-background': (value) => {
431
+ const [color, suffix = ''] = value.split('..');
432
+
433
+ return {
434
+ backgroundColor: theme(`backgroundColor.${color}` + suffix, color),
435
+
436
+ '&[disabled]': {
437
+ backgroundColor: `${theme('backgroundColor.disabled' + suffix)} !important`,
438
+ },
439
+ };
440
+ },
441
+ }, {
442
+ values: {
443
+ 'default': 'background',
444
+ 'default-dark': 'background..-dark',
445
+
446
+ 'disabled': 'disabled',
447
+ 'disabled-dark': 'disabled..-dark',
448
+
449
+ 'primary': 'primary',
450
+ 'primary-dark': 'primary..-dark',
451
+
452
+ 'secondary': 'secondary',
453
+ 'secondary-dark': 'secondary..-dark',
454
+
455
+ 'tertiary': 'tertiary',
456
+ 'tertiary-dark': 'tertiary..-dark',
457
+
458
+ 'success': 'success',
459
+ 'success-dark': 'success..-dark',
460
+
461
+ 'warning': 'warning',
462
+ 'warning-dark': 'warning..-dark',
463
+
464
+ 'error': 'error',
465
+ 'error-dark': 'error..-dark',
466
+
467
+ 'primary-container': 'primary-container',
468
+ 'primary-container-dark': 'primary-container..-dark',
469
+
470
+ 'secondary-container': 'secondary-container',
471
+ 'secondary-container-dark': 'secondary-container..-dark',
472
+
473
+ 'tertiary-container': 'tertiary-container',
474
+ 'tertiary-container-dark': 'tertiary-container..-dark',
475
+
476
+ 'success-container': 'success-container',
477
+ 'success-container-dark': 'success-container..-dark',
478
+
479
+ 'warning-container': 'warning-container',
480
+ 'warning-container-dark': 'warning-container..-dark',
481
+
482
+ 'error-container': 'error-container',
483
+ 'error-container-dark': 'error-container..-dark',
484
+
485
+ 'primary-tinting': 'primary-opacity-0-08',
486
+ 'primary-tinting-dark': 'primary-opacity-0-08..-dark',
487
+
488
+ // 'secondary-tinting': 'secondary-opacity-0-08',
489
+ // 'secondary-tinting-dark': 'secondary-opacity-0-08..-dark',
490
+
491
+ // 'tertiary-tinting': 'tertiary-opacity-0-08',
492
+ // 'tertiary-tinting-dark': 'tertiary-opacity-0-08..-dark',
493
+
494
+ 'success-tinting': 'success-opacity-0-08',
495
+ 'success-tinting-dark': 'success-opacity-0-08..-dark',
496
+
497
+ 'warning-tinting': 'warning-opacity-0-08',
498
+ 'warning-tinting-dark': 'warning-opacity-0-08..-dark',
499
+
500
+ 'error-tinting': 'error-opacity-0-08',
501
+ 'error-tinting-dark': 'error-opacity-0-08..-dark',
502
+
503
+ 'transparent': 'transparent',
504
+ },
505
+ });
506
+
507
+ // Foregrounds
508
+ matchUtilities({
509
+ 'theme-foreground': (value) => {
510
+ const [color, suffix = ''] = value.split('..');
511
+
512
+ return {
513
+ color: theme(`textColor.${color}` + suffix, color),
514
+
515
+ '&[disabled]': {
516
+ color: `${theme('textColor.on-disabled' + suffix)} !important`,
517
+ },
518
+ };
519
+ },
520
+ }, {
521
+ values: {
522
+ 'default': 'on-background',
523
+ 'default-dark': 'on-background..-dark',
524
+
525
+ 'disabled': 'on-disabled',
526
+ 'disabled-dark': 'on-disabled..-dark',
527
+
528
+ 'outline': 'outline',
529
+ 'outline-dark': 'outline..-dark',
530
+
531
+ 'primary': 'primary',
532
+ 'primary-dark': 'primary..-dark',
533
+
534
+ 'secondary': 'secondary',
535
+ 'secondary-dark': 'secondary..-dark',
536
+
537
+ 'tertiary': 'tertiary',
538
+ 'tertiary-dark': 'tertiary..-dark',
539
+
540
+ 'success': 'success',
541
+ 'success-dark': 'success..-dark',
542
+
543
+ 'warning': 'warning',
544
+ 'warning-dark': 'warning..-dark',
545
+
546
+ 'error': 'error',
547
+ 'error-dark': 'error..-dark',
548
+
549
+ 'on-primary': 'on-primary',
550
+ 'on-primary-dark': 'on-primary..-dark',
551
+
552
+ 'on-secondary': 'on-secondary',
553
+ 'on-secondary-dark': 'on-secondary..-dark',
554
+
555
+ 'on-tertiary': 'on-tertiary',
556
+ 'on-tertiary-dark': 'on-tertiary..-dark',
557
+
558
+ 'on-success': 'on-success',
559
+ 'on-success-dark': 'on-success..-dark',
560
+
561
+ 'on-warning': 'on-warning',
562
+ 'on-warning-dark': 'on-warning..-dark',
563
+
564
+ 'on-error': 'on-error',
565
+ 'on-error-dark': 'on-error..-dark',
566
+
567
+ 'on-primary-container': 'on-primary-container',
568
+ 'on-primary-container-dark': 'on-primary-container..-dark',
569
+
570
+ 'on-secondary-container': 'on-secondary-container',
571
+ 'on-secondary-container-dark': 'on-secondary-container..-dark',
572
+
573
+ 'on-tertiary-container': 'on-tertiary-container',
574
+ 'on-tertiary-container-dark': 'on-tertiary-container..-dark',
575
+
576
+ 'on-success-container': 'on-success-container',
577
+ 'on-success-container-dark': 'on-success-container..-dark',
578
+
579
+ 'on-warning-container': 'on-warning-container',
580
+ 'on-warning-container-dark': 'on-warning-container..-dark',
581
+
582
+ 'on-error-container': 'on-error-container',
583
+ 'on-error-container-dark': 'on-error-container..-dark',
584
+
585
+ 'transparent': 'transparent',
586
+ 'inherit': 'inherit',
587
+ },
588
+ });
589
+
590
+ // Borders
591
+ matchUtilities({
592
+ 'theme-border-1': (value) => {
593
+ const [color, suffix = ''] = value.split('..');
594
+
595
+ return {
596
+ borderColor: theme(`borderColor.${color}` + suffix, color),
597
+ borderStyle: 'solid',
598
+ borderWidth: 1,
599
+
600
+ '&[disabled]': {
601
+ borderColor: `${theme('borderColor.disabled' + suffix)} !important`,
602
+ },
603
+ };
604
+ },
605
+ }, {
606
+ values: {
607
+ 'outline': 'outline',
608
+ 'outline-dark': 'outline..-dark',
609
+
610
+ 'primary': 'primary',
611
+ 'primary-dark': 'primary..-dark',
612
+
613
+ 'secondary': 'secondary',
614
+ 'secondary-dark': 'secondary..-dark',
615
+
616
+ 'tertiary': 'tertiary',
617
+ 'tertiary-dark': 'tertiary..-dark',
618
+
619
+ 'success': 'success',
620
+ 'success-dark': 'success..-dark',
621
+
622
+ 'warning': 'warning',
623
+ 'warning-dark': 'warning..-dark',
624
+
625
+ 'error': 'error',
626
+ 'error-dark': 'error..-dark',
627
+
628
+ 'transparent': 'transparent',
629
+ 'current': 'current',
630
+ },
631
+ });
632
+
633
+ matchUtilities({
634
+ 'theme-border-2': (value) => {
635
+ const [color, suffix = ''] = value.split('..');
636
+
637
+ return {
638
+ borderColor: theme(`borderColor.${color}` + suffix, color),
639
+ borderStyle: 'solid',
640
+ borderWidth: 2,
641
+
642
+ '&[disabled]': {
643
+ borderColor: `${theme('borderColor.disabled' + suffix)} !important`,
644
+ },
645
+ };
646
+ },
647
+ }, {
648
+ values: {
649
+ 'outline': 'outline',
650
+ 'outline-dark': 'outline..-dark',
651
+
652
+ 'primary': 'primary',
653
+ 'primary-dark': 'primary..-dark',
654
+
655
+ 'secondary': 'secondary',
656
+ 'secondary-dark': 'secondary..-dark',
657
+
658
+ 'tertiary': 'tertiary',
659
+ 'tertiary-dark': 'tertiary..-dark',
660
+
661
+ 'success': 'success',
662
+ 'success-dark': 'success..-dark',
663
+
664
+ 'warning': 'warning',
665
+ 'warning-dark': 'warning..-dark',
666
+
667
+ 'error': 'error',
668
+ 'error-dark': 'error..-dark',
669
+
670
+ 'transparent': 'transparent',
671
+ 'current': 'current',
189
672
  },
190
673
  });
191
674
 
192
- // TODO: Remove when migration complete
193
675
  addUtilities({
194
- '.visually-hidden': {
195
- width: 0,
196
- height: 0,
197
- visibility: 'hidden',
676
+ '.theme-border-underline': {
677
+ borderStyle: 'none',
678
+ borderBottomStyle: 'solid',
198
679
  },
199
680
  });
200
681
 
201
- addVariant('hover', '&:hover:not(.pointer-events-none)');
202
- addVariant('focus-visible', '&:focus-visible:not(.pointer-events-none)');
203
- addVariant('focus-within', '&:focus-within:not(.pointer-events-none)');
682
+ // Outlines
683
+ matchUtilities({
684
+ 'theme-outline': (value) => {
685
+ const [color, suffix = ''] = value.split('..');
686
+
687
+ return {
688
+ outlineColor: theme(`outlineColor.${color}-opacity-0-16` + suffix, color),
689
+ outlineStyle: 'solid',
690
+ outlineWidth: 2,
691
+ outlineOffset: 0,
692
+ };
693
+ },
694
+ }, {
695
+ values: {
696
+ 'primary': 'primary',
697
+ 'primary-dark': 'primary..-dark',
204
698
 
205
- addVariant('active', [
206
- '&:active:not(.pointer-events-none)',
207
- '&[active]:not(.pointer-events-none)',
208
- ]);
699
+ 'secondary': 'secondary',
700
+ 'secondary-dark': 'secondary..-dark',
209
701
 
210
- addVariant('enabled', '&:not([disabled])');
211
- addVariant('disabled', '&[disabled]');
702
+ 'tertiary': 'tertiary',
703
+ 'tertiary-dark': 'tertiary..-dark',
212
704
 
213
- addVariant('valid', '&:not([invalid])');
214
- addVariant('invalid', '&[invalid]');
705
+ 'success': 'success',
706
+ 'success-dark': 'success..-dark',
215
707
 
216
- addVariant('readwrite', '&:not([readonly])');
217
- addVariant('readonly', '&[readonly]');
708
+ 'warning': 'warning',
709
+ 'warning-dark': 'warning..-dark',
218
710
 
219
- addVariant('checked', [
220
- '&[type="checkbox"]:checked:not(:indeterminate)',
221
- '&[type="radio"]:checked',
222
- ]);
223
- }),
224
- ],
711
+ 'error': 'error',
712
+ 'error-dark': 'error..-dark',
225
713
 
226
- safelist: [
227
- {
228
- pattern: /^text-(.+)$/,
229
- variants: ['hover'],
230
- },
714
+ 'transparent': 'transparent',
715
+ 'current': 'current',
716
+ },
717
+ });
718
+ }),
231
719
  ],
232
720
  };