@@ -7,18 +7,18 @@ export type MultiSelectVariants = VariantProps<typeof multiSelect> & Classes<typ
77
88export const select = tv ( {
99 slots : {
10- base : "relative" ,
10+ base : "relative w-full " ,
1111 select : "block w-full rtl:text-right" ,
1212 close : "absolute right-8 top-1/2 -translate-y-1/2 text-gray-400 hover:text-black" ,
1313 svg : ""
1414 } ,
1515 variants : {
1616 underline : {
1717 true : {
18- select : "text-gray-500 bg-transparent border-0 border-b-2 border-gray-200 appearance-none dark:text-gray-400 dark:border-gray-700 focus:outline-hidden focus:ring-0 focus:border-gray-200 peer px-0!"
18+ select : "text-gray-500 bg-transparent rounded-none! border-0 border-b-2 border-gray-200 appearance-none dark:text-gray-400 dark:border-gray-700 focus:outline-hidden focus:ring-0 focus:border-gray-200 peer px-0!"
1919 } ,
2020 false : {
21- select : "text-gray-900 bg-gray-50 border border-gray-300 rounded-lg focus:outline-hidden focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500"
21+ select : "text-gray-900 bg-gray-50 border border-gray-300 focus:outline-hidden focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500"
2222 }
2323 } ,
2424 size : {
@@ -31,6 +31,13 @@ export const select = tv({
3131 select : "cursor-not-allowed opacity-50"
3232 } ,
3333 false : { }
34+ } ,
35+ grouped : {
36+ false : { base : "rounded-lg" , select : "rounded-lg" } ,
37+ true : {
38+ base : "first:rounded-s-lg last:rounded-e-lg not-first:-ms-px group" ,
39+ select : "group-first:rounded-s-lg group-last:rounded-e-lg group-not-first:-ms-px h-full"
40+ }
3441 }
3542 } ,
3643 defaultVariants : {
@@ -41,8 +48,8 @@ export const select = tv({
4148
4249export const multiSelect = tv ( {
4350 slots : {
44- base : "relative border border-gray-300 flex items-center rounded-lg gap-2 dark:border-gray-600 ring-primary-500 dark:ring-primary-500 focus-visible:outline-hidden" ,
45- select : "flex flex-wrap gap-2 " ,
51+ base : "relative border border-gray-300 w-full flex items-center gap-2 dark:border-gray-600 ring-primary-500 dark:ring-primary-500 focus-visible:outline-hidden" ,
52+ select : "" ,
4653 dropdown : "absolute z-50 p-3 flex flex-col gap-1 max-h-64 bg-white border border-gray-300 dark:bg-gray-700 dark:border-gray-600 start-0 top-[calc(100%+1rem)] rounded-lg cursor-pointer overflow-y-scroll w-full" ,
4754 item : "py-2 px-3 rounded-lg text-gray-600 hover:text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:text-gray-300 dark:hover:bg-gray-600" ,
4855 close : "p-0 focus:ring-gray-400 dark:text-white" ,
@@ -73,6 +80,13 @@ export const multiSelect = tv({
7380 true : {
7481 item : "bg-gray-100 text-black font-semibold hover:text-black dark:text-white dark:bg-gray-600 dark:hover:text-white"
7582 }
83+ } ,
84+ grouped : {
85+ false : { base : "rounded-lg" , select : "rounded-lg" } ,
86+ true : {
87+ base : "first:rounded-s-lg last:rounded-e-lg not-first:-ms-px group" ,
88+ select : "group-first:rounded-s-lg group-last:rounded-e-lg group-not-first:-ms-px h-full"
89+ }
7690 }
7791 } ,
7892 // Add compoundVariants here
0 commit comments