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