@onereach/styles 2.19.1-beta.1289.0 → 2.19.1-beta.1291.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.1289.0",
3
+ "version": "2.19.1-beta.1291.0",
4
4
  "description": "Styles for or-ui-next",
5
5
  "main": "./main.css",
6
6
  "unpkg": "./main.css",
@@ -24,17 +24,28 @@ 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
+
27
35
  spacing: parseSpacingTokens(spacingTokens),
28
36
 
29
37
  backgroundColor: {
30
38
  // Avoid using `text` colors as a background (only for corner cases)
31
39
  ...parseColorTokens(colorTokens, ['generic', 'background', 'text']),
32
40
  'transparent': 'transparent',
41
+ 'current': 'currentColor',
42
+ 'inherit': 'inherit',
33
43
  },
34
44
 
35
45
  textColor: {
36
46
  ...parseColorTokens(colorTokens, ['generic', 'text']),
37
47
  'transparent': 'transparent',
48
+ 'current': 'currentColor',
38
49
  'inherit': 'inherit',
39
50
  },
40
51
 
@@ -42,20 +53,28 @@ module.exports = {
42
53
  ...parseColorTokens(colorTokens, ['generic']),
43
54
  'transparent': 'transparent',
44
55
  'current': 'currentColor',
56
+ 'inherit': 'inherit',
45
57
  },
46
58
 
47
59
  outlineColor: {
48
60
  ...parseColorTokens(colorTokens, ['generic']),
49
61
  'transparent': 'transparent',
50
62
  'current': 'currentColor',
63
+ 'inherit': 'inherit',
51
64
  },
52
65
 
53
66
  fill: {
54
67
  ...parseColorTokens(colorTokens, ['generic', 'background', 'text']),
68
+ 'transparent': 'transparent',
69
+ 'current': 'currentColor',
70
+ 'inherit': 'inherit',
55
71
  },
56
72
 
57
73
  stroke: {
58
74
  ...parseColorTokens(colorTokens, ['generic', 'background', 'text']),
75
+ 'transparent': 'transparent',
76
+ 'current': 'currentColor',
77
+ 'inherit': 'inherit',
59
78
  },
60
79
 
61
80
  content: {
@@ -114,8 +133,8 @@ module.exports = {
114
133
  },
115
134
 
116
135
  boxShadow: {
136
+ 'generic': '0 1px 1px rgba(0 0 0 / 0.24), 0 0 1px rgba(0 0 0 / 0.16)',
117
137
  ...parseBoxShadowTokens(boxShadowTokens),
118
- DEFAULT: '0 1px 1px rgba(0 0 0 / 0.24), 0 0 1px rgba(0 0 0 / 0.16)',
119
138
  },
120
139
 
121
140
  fontFamily: {
@@ -127,89 +146,24 @@ module.exports = {
127
146
  fontSize: {
128
147
  ...parseFontSizeTokens(typographyTokens),
129
148
  'icon': ['1.15em', { lineHeight: 1 }],
130
- 'inherit': ['inherit', { lineHeight: 'inherit' }],
149
+ 'inherit': 'inherit',
131
150
  },
132
151
 
133
152
  fontWeight: {
134
153
  ...parseFontWeightTokens(typographyTokens),
135
- 'icon': undefined,
136
154
  'inherit': 'inherit',
137
155
  },
138
156
 
139
- transitionDuration: {
140
- 'short': '100ms',
141
- 'medium': '250ms',
142
- 'long': '400ms',
143
- },
157
+ letterSpacing: false,
144
158
 
145
- transitionTimingFunction: {
146
- 'standard': 'cubic-bezier(0.2, 0, 0, 1)',
159
+ lineHeight: {
160
+ 'inherit': 'inherit',
147
161
  },
148
162
  },
149
163
 
150
164
  plugins: [
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 }) => {
165
+ plugin(({ addBase, addUtilities, addVariant, theme }) => {
208
166
  addBase({
209
- '*': {
210
- userSelect: 'none',
211
- },
212
-
213
167
  ':root': {
214
168
  fontFamily: theme('fontFamily.body-1-regular'),
215
169
  fontSize: theme('fontSize.body-1-regular'),
@@ -217,506 +171,62 @@ module.exports = {
217
171
  },
218
172
  });
219
173
 
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
- };
316
- },
317
-
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
- };
377
- },
378
-
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
- };
407
- },
408
- }, {
409
- values: {
410
- 'primary': 'primary',
411
- 'primary-dark': 'primary..-dark',
412
-
413
- // 'secondary': 'secondary',
414
- // 'secondary-dark': 'secondary..-dark',
415
-
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',
174
+ addUtilities({
175
+ '.font-icon-outlined': {
176
+ fontVariationSettings: '"opsz" 48, "wght" 400, "FILL" 0, "GRAD" 0',
589
177
  },
590
- });
591
-
592
- // Borders
593
- matchUtilities({
594
- 'theme-border-1': (value) => {
595
- const [color, suffix = ''] = value.split('..');
596
178
 
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
- };
179
+ '.font-icon-outlined-bold': {
180
+ fontVariationSettings: '"opsz" 24, "wght" 700, "FILL" 0, "GRAD" 0',
606
181
  },
607
- }, {
608
- values: {
609
- 'outline': 'outline',
610
- 'outline-dark': 'outline..-dark',
611
-
612
- 'primary': 'primary',
613
- 'primary-dark': 'primary..-dark',
614
182
 
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',
183
+ '.font-icon-filled': {
184
+ fontVariationSettings: '"opsz" 48, "wght" 400, "FILL" 1, "GRAD" 0',
632
185
  },
633
- });
634
186
 
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',
187
+ '.font-icon-filled-bold': {
188
+ fontVariationSettings: '"opsz" 24, "wght" 700, "FILL" 1, "GRAD" 0',
674
189
  },
675
190
  });
676
191
 
192
+ // TODO: Remove when migration complete
677
193
  addUtilities({
678
- '.theme-border-underline': {
679
- borderStyle: 'none',
680
- borderBottomStyle: 'solid',
194
+ '.visually-hidden': {
195
+ width: 0,
196
+ height: 0,
197
+ visibility: 'hidden',
681
198
  },
682
199
  });
683
200
 
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',
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)');
700
204
 
701
- 'secondary': 'secondary',
702
- 'secondary-dark': 'secondary..-dark',
205
+ addVariant('active', [
206
+ '&:active:not(.pointer-events-none)',
207
+ '&[active]:not(.pointer-events-none)',
208
+ ]);
703
209
 
704
- 'tertiary': 'tertiary',
705
- 'tertiary-dark': 'tertiary..-dark',
706
-
707
- 'success': 'success',
708
- 'success-dark': 'success..-dark',
210
+ addVariant('enabled', '&:not([disabled])');
211
+ addVariant('disabled', '&[disabled]');
709
212
 
710
- 'warning': 'warning',
711
- 'warning-dark': 'warning..-dark',
213
+ addVariant('valid', '&:not([invalid])');
214
+ addVariant('invalid', '&[invalid]');
712
215
 
713
- 'error': 'error',
714
- 'error-dark': 'error..-dark',
216
+ addVariant('readwrite', '&:not([readonly])');
217
+ addVariant('readonly', '&[readonly]');
715
218
 
716
- 'transparent': 'transparent',
717
- 'current': 'current',
718
- },
719
- });
219
+ addVariant('checked', [
220
+ '&[type="checkbox"]:checked:not(:indeterminate)',
221
+ '&[type="radio"]:checked',
222
+ ]);
720
223
  }),
721
224
  ],
225
+
226
+ safelist: [
227
+ {
228
+ pattern: /^text-(.+)$/,
229
+ variants: ['hover'],
230
+ },
231
+ ],
722
232
  };