|
| 1 | +import { style } from "@vanilla-extract/css"; |
1 | 2 | import { bentoSprinkles } from "../internal";
|
2 | 3 | import { strictRecipe } from "../util/strictRecipe";
|
3 | 4 | import { vars } from "../vars.css";
|
4 | 5 | import { radioOption } from "./RadioGroupField.css";
|
5 | 6 |
|
6 |
| -export const radio = bentoSprinkles({ width: 24, height: 24 }); |
7 |
| - |
8 | 7 | export const outerRadioCircleRecipe = strictRecipe({
|
| 8 | + base: bentoSprinkles({ |
| 9 | + display: "flex", |
| 10 | + justifyContent: "center", |
| 11 | + alignItems: "center", |
| 12 | + width: 24, |
| 13 | + height: 24, |
| 14 | + borderRadius: "circled", |
| 15 | + }), |
9 | 16 | variants: {
|
10 | 17 | selected: {
|
11 | 18 | false: [
|
12 |
| - bentoSprinkles({ fill: "outlineInputEnabled" }), |
| 19 | + bentoSprinkles({ boxShadow: "outlineInputEnabled" }), |
13 | 20 | {
|
14 | 21 | selectors: {
|
15 | 22 | [`${radioOption}:hover:not([disabled]) &`]: {
|
16 |
| - fill: vars.outlineColor.outlineInputHover, |
| 23 | + boxShadow: vars.boxShadow.outlineInputHover, |
17 | 24 | },
|
18 | 25 | [`${radioOption}[disabled] &`]: {
|
19 |
| - fill: vars.outlineColor.outlineInputDisabled, |
| 26 | + boxShadow: vars.boxShadow.outlineInputDisabled, |
20 | 27 | },
|
21 | 28 | },
|
22 | 29 | },
|
23 | 30 | ],
|
24 | 31 | true: [
|
25 |
| - bentoSprinkles({ fill: "primarySolidEnabledBackground" }), |
| 32 | + bentoSprinkles({ background: "primarySolidEnabledBackground" }), |
26 | 33 | {
|
27 | 34 | selectors: {
|
28 | 35 | [`${radioOption}:hover:not([disabled]) &`]: {
|
29 |
| - fill: vars.interactiveBackgroundColor.primarySolidHoverBackground, |
| 36 | + background: vars.interactiveBackgroundColor.primarySolidHoverBackground, |
30 | 37 | },
|
31 | 38 | [`${radioOption}[disabled] &`]: {
|
32 |
| - fill: vars.interactiveBackgroundColor.disabledSolidBackground, |
| 39 | + background: vars.interactiveBackgroundColor.disabledSolidBackground, |
33 | 40 | },
|
34 | 41 | },
|
35 | 42 | },
|
36 | 43 | ],
|
37 | 44 | },
|
38 | 45 | focused: {
|
39 |
| - true: { fill: vars.interactiveBackgroundColor.primarySolidFocusBackground }, |
| 46 | + true: { background: vars.interactiveBackgroundColor.primarySolidFocusBackground }, |
40 | 47 | },
|
41 | 48 | },
|
42 | 49 | });
|
43 | 50 |
|
44 |
| -export const innerRadioCircleRecipe = strictRecipe({ |
45 |
| - base: bentoSprinkles({ fill: "backgroundPrimary" }), |
46 |
| - variants: { |
47 |
| - selected: { |
48 |
| - false: { |
49 |
| - r: "11", |
50 |
| - }, |
51 |
| - true: { r: "5" }, |
52 |
| - }, |
53 |
| - focused: { |
54 |
| - true: {}, |
55 |
| - }, |
56 |
| - }, |
57 |
| - compoundVariants: [ |
58 |
| - { |
59 |
| - variants: { selected: false, focused: true }, |
60 |
| - style: { r: "10" }, |
61 |
| - }, |
62 |
| - ], |
63 |
| -}); |
| 51 | +export const innerRadioCircle = [ |
| 52 | + bentoSprinkles({ |
| 53 | + background: "backgroundPrimary", |
| 54 | + borderRadius: "circled", |
| 55 | + }), |
| 56 | + style({ width: 10, height: 10 }), |
| 57 | +]; |
0 commit comments