11import { checkbox as vars } from "@seed-design/vars/component" ;
22import { defineRecipe } from "./helper" ;
3- import { active , checked , disabled , pseudo , not } from "./pseudo" ;
3+ import { active , checkedOrIndeterminate , disabled , pseudo } from "./pseudo" ;
44
55const checkbox = defineRecipe ( {
66 name : "checkbox" ,
@@ -56,25 +56,21 @@ const checkbox = defineRecipe({
5656 } ,
5757 } ,
5858 } ,
59- indeterminate : {
60- true : { } ,
61- false : { } ,
62- } ,
6359 variant : {
6460 square : {
6561 control : {
6662 borderWidth : vars . variantSquare . enabled . control . strokeWidth ,
6763 borderStyle : "solid" ,
6864 borderColor : vars . variantSquare . enabled . control . strokeColor ,
6965
70- [ pseudo ( checked ) ] : {
66+ [ pseudo ( checkedOrIndeterminate ) ] : {
7167 background : vars . variantSquare . enabledSelected . control . color ,
7268 borderWidth : 0 ,
7369 } ,
7470 [ pseudo ( active ) ] : {
7571 background : vars . variantSquare . pressed . control . color ,
7672 } ,
77- [ pseudo ( active , checked ) ] : {
73+ [ pseudo ( active , checkedOrIndeterminate ) ] : {
7874 background : vars . variantSquare . pressedSelected . control . color ,
7975 } ,
8076 [ pseudo ( disabled ) ] : {
@@ -86,11 +82,11 @@ const checkbox = defineRecipe({
8682 } ,
8783 } ,
8884 icon : {
89- [ pseudo ( checked ) ] : {
85+ [ pseudo ( checkedOrIndeterminate ) ] : {
9086 display : "block" ,
9187 color : vars . variantSquare . enabledSelected . icon . color ,
9288 } ,
93- [ pseudo ( disabled , checked ) ] : {
89+ [ pseudo ( disabled , checkedOrIndeterminate ) ] : {
9490 display : "block" ,
9591 color : vars . variantSquare . disabledSelected . icon . color ,
9692 } ,
@@ -105,16 +101,16 @@ const checkbox = defineRecipe({
105101 control : {
106102 background : "none" ,
107103
108- [ pseudo ( checked ) ] : {
104+ [ pseudo ( checkedOrIndeterminate ) ] : {
109105 background : "none" ,
110106 } ,
111107 [ pseudo ( active ) ] : {
112108 background : vars . variantGhost . pressed . control . color ,
113109 } ,
114- [ pseudo ( active , checked ) ] : {
110+ [ pseudo ( active , checkedOrIndeterminate ) ] : {
115111 background : vars . variantGhost . pressedSelected . control . color ,
116112 } ,
117- [ pseudo ( disabled , checked ) ] : {
113+ [ pseudo ( disabled , checkedOrIndeterminate ) ] : {
118114 background : "none" ,
119115 } ,
120116 [ pseudo ( disabled , active ) ] : {
@@ -125,10 +121,10 @@ const checkbox = defineRecipe({
125121 display : "block" ,
126122 color : vars . variantGhost . enabled . icon . color ,
127123
128- [ pseudo ( checked ) ] : {
124+ [ pseudo ( checkedOrIndeterminate ) ] : {
129125 color : vars . variantGhost . enabledSelected . icon . color ,
130126 } ,
131- [ pseudo ( disabled , checked ) ] : {
127+ [ pseudo ( disabled , checkedOrIndeterminate ) ] : {
132128 color : vars . variantGhost . disabledSelected . icon . color ,
133129 } ,
134130 [ pseudo ( disabled ) ] : {
@@ -259,7 +255,6 @@ const checkbox = defineRecipe({
259255 size : "medium" ,
260256 variant : "square" ,
261257 weight : "default" ,
262- indeterminate : false ,
263258 } ,
264259} ) ;
265260
0 commit comments