diff --git a/src/theme/switch.ts b/src/theme/switch.ts index 5090383f..83c683e5 100644 --- a/src/theme/switch.ts +++ b/src/theme/switch.ts @@ -1,7 +1,7 @@ export default (config: { colors: string[] }) => ({ slots: { root: 'relative flex items-start', - base: 'peer inline-flex shrink-0 items-center rounded-full border-2 border-transparent transition-colors duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-white dark:focus-visible:ring-offset-gray-900 data-[state=unchecked]:bg-gray-200 dark:data-[state=unchecked]:bg-gray-700', + base: 'inline-flex items-center shrink-0 rounded-full border-2 border-transparent transition-colors duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-white dark:focus-visible:ring-offset-gray-900 data-[state=unchecked]:bg-gray-200 dark:data-[state=unchecked]:bg-gray-700', container: 'flex items-center', thumb: 'group pointer-events-none block rounded-full bg-white dark:bg-gray-900 shadow-lg ring-0 transition-transform duration-200 data-[state=unchecked]:translate-x-0 flex items-center justify-center', icon: 'absolute shrink-0 group-data-[state=unchecked]:text-gray-400 dark:group-data-[state=unchecked]:text-gray-500 transition-[color,opacity] duration-200 opacity-0 size-10/12', diff --git a/test/components/__snapshots__/Switch.spec.ts.snap b/test/components/__snapshots__/Switch.spec.ts.snap index 9757b2be..8ebbd91a 100644 --- a/test/components/__snapshots__/Switch.spec.ts.snap +++ b/test/components/__snapshots__/Switch.spec.ts.snap @@ -3,7 +3,7 @@ exports[`Switch > renders with as correctly 1`] = ` "
-
+
@@ -12,7 +12,7 @@ exports[`Switch > renders with as correctly 1`] = ` exports[`Switch > renders with checkedIcon correctly 1`] = ` "
-
+
@@ -21,7 +21,7 @@ exports[`Switch > renders with checkedIcon correctly 1`] = ` exports[`Switch > renders with class correctly 1`] = ` "
-
+
@@ -30,7 +30,7 @@ exports[`Switch > renders with class correctly 1`] = ` exports[`Switch > renders with color green correctly 1`] = ` "
-
+
@@ -39,7 +39,7 @@ exports[`Switch > renders with color green correctly 1`] = ` exports[`Switch > renders with color primary correctly 1`] = ` "
-
+
@@ -48,7 +48,7 @@ exports[`Switch > renders with color primary correctly 1`] = ` exports[`Switch > renders with color red correctly 1`] = ` "
-
+
@@ -57,7 +57,7 @@ exports[`Switch > renders with color red correctly 1`] = ` exports[`Switch > renders with defaultValue correctly 1`] = ` "
-
+
@@ -66,7 +66,7 @@ exports[`Switch > renders with defaultValue correctly 1`] = ` exports[`Switch > renders with description correctly 1`] = ` "
-
+
@@ -77,7 +77,7 @@ exports[`Switch > renders with description correctly 1`] = ` exports[`Switch > renders with description slot correctly 1`] = ` "
-
+
@@ -88,7 +88,7 @@ exports[`Switch > renders with description slot correctly 1`] = ` exports[`Switch > renders with disabled correctly 1`] = ` "
-
+
@@ -97,7 +97,7 @@ exports[`Switch > renders with disabled correctly 1`] = ` exports[`Switch > renders with id correctly 1`] = ` "
-
+
@@ -106,7 +106,7 @@ exports[`Switch > renders with id correctly 1`] = ` exports[`Switch > renders with label correctly 1`] = ` "
-
+
@@ -117,7 +117,7 @@ exports[`Switch > renders with label correctly 1`] = ` exports[`Switch > renders with label slot correctly 1`] = ` "
-
+
@@ -128,7 +128,7 @@ exports[`Switch > renders with label slot correctly 1`] = ` exports[`Switch > renders with loading correctly 1`] = ` "
-
+
@@ -137,7 +137,7 @@ exports[`Switch > renders with loading correctly 1`] = ` exports[`Switch > renders with loadingIcon correctly 1`] = ` "
-
+
@@ -146,7 +146,7 @@ exports[`Switch > renders with loadingIcon correctly 1`] = ` exports[`Switch > renders with name correctly 1`] = ` "
-
+
@@ -155,7 +155,7 @@ exports[`Switch > renders with name correctly 1`] = ` exports[`Switch > renders with required correctly 1`] = ` "
-
+
@@ -166,7 +166,7 @@ exports[`Switch > renders with required correctly 1`] = ` exports[`Switch > renders with size lg correctly 1`] = ` "
-
+
@@ -175,7 +175,7 @@ exports[`Switch > renders with size lg correctly 1`] = ` exports[`Switch > renders with size md correctly 1`] = ` "
-
+
@@ -184,7 +184,7 @@ exports[`Switch > renders with size md correctly 1`] = ` exports[`Switch > renders with size sm correctly 1`] = ` "
-
+
@@ -193,7 +193,7 @@ exports[`Switch > renders with size sm correctly 1`] = ` exports[`Switch > renders with size xl correctly 1`] = ` "
-
+
@@ -202,7 +202,7 @@ exports[`Switch > renders with size xl correctly 1`] = ` exports[`Switch > renders with size xs correctly 1`] = ` "
-
+
@@ -211,7 +211,7 @@ exports[`Switch > renders with size xs correctly 1`] = ` exports[`Switch > renders with ui correctly 1`] = ` "
-
+
@@ -220,7 +220,7 @@ exports[`Switch > renders with ui correctly 1`] = ` exports[`Switch > renders with uncheckedIcon correctly 1`] = ` "
-
+
@@ -229,7 +229,7 @@ exports[`Switch > renders with uncheckedIcon correctly 1`] = ` exports[`Switch > renders with value correctly 1`] = ` "
-
+