diff --git a/src/runtime/components/Checkbox.vue b/src/runtime/components/Checkbox.vue index 735ab2e2..43f24908 100644 --- a/src/runtime/components/Checkbox.vue +++ b/src/runtime/components/Checkbox.vue @@ -88,7 +88,7 @@ function onChecked() { :class="ui.base()" @update:checked="onChecked" > - + diff --git a/src/theme/checkbox.ts b/src/theme/checkbox.ts index b0db6428..8e4fdd90 100644 --- a/src/theme/checkbox.ts +++ b/src/theme/checkbox.ts @@ -1,11 +1,10 @@ export default (config: { colors: string[] }) => ({ slots: { root: 'relative flex items-start', - base: 'shrink-0 text-white dark:text-gray-900 rounded ring ring-inset ring-gray-300 dark:ring-gray-700 focus:outline-none focus-visible:outline-2 focus-visible:outline-offset-2', + base: 'shrink-0 flex items-center justify-center text-white dark:text-gray-900 rounded ring ring-inset ring-gray-300 dark:ring-gray-700 focus:outline-none focus-visible:outline-2 focus-visible:outline-offset-2', container: 'flex items-center', wrapper: 'ms-2', - indicator: 'flex items-center justify-center', - icon: 'size-10/12', + icon: 'shrink-0 size-full', label: 'block font-medium text-gray-700 dark:text-gray-200', description: 'text-gray-500 dark:text-gray-400' }, diff --git a/test/components/__snapshots__/Checkbox.spec.ts.snap b/test/components/__snapshots__/Checkbox.spec.ts.snap index aec1f322..80f08180 100644 --- a/test/components/__snapshots__/Checkbox.spec.ts.snap +++ b/test/components/__snapshots__/Checkbox.spec.ts.snap @@ -2,7 +2,7 @@ exports[`Checkbox > renders with class correctly 1`] = ` "
-
@@ -13,7 +13,7 @@ exports[`Checkbox > renders with class correctly 1`] = ` exports[`Checkbox > renders with color green correctly 1`] = ` "
-
@@ -24,7 +24,7 @@ exports[`Checkbox > renders with color green correctly 1`] = ` exports[`Checkbox > renders with color primary correctly 1`] = ` "
-
@@ -35,7 +35,7 @@ exports[`Checkbox > renders with color primary correctly 1`] = ` exports[`Checkbox > renders with color red correctly 1`] = ` "
-
@@ -46,7 +46,7 @@ exports[`Checkbox > renders with color red correctly 1`] = ` exports[`Checkbox > renders with defaultValue correctly 1`] = ` "
-
+
@@ -55,7 +55,7 @@ exports[`Checkbox > renders with defaultValue correctly 1`] = ` exports[`Checkbox > renders with description correctly 1`] = ` "
-
@@ -68,7 +68,7 @@ exports[`Checkbox > renders with description correctly 1`] = ` exports[`Checkbox > renders with description slot correctly 1`] = ` "
-
@@ -81,7 +81,7 @@ exports[`Checkbox > renders with description slot correctly 1`] = ` exports[`Checkbox > renders with disabled correctly 1`] = ` "
-
@@ -92,7 +92,7 @@ exports[`Checkbox > renders with disabled correctly 1`] = ` exports[`Checkbox > renders with icon correctly 1`] = ` "
-
@@ -103,7 +103,7 @@ exports[`Checkbox > renders with icon correctly 1`] = ` exports[`Checkbox > renders with id correctly 1`] = ` "
-
@@ -114,7 +114,7 @@ exports[`Checkbox > renders with id correctly 1`] = ` exports[`Checkbox > renders with indeterminate correctly 1`] = ` "
-
+
@@ -123,7 +123,7 @@ exports[`Checkbox > renders with indeterminate correctly 1`] = ` exports[`Checkbox > renders with indeterminateIcon correctly 1`] = ` "
-
+
@@ -132,7 +132,7 @@ exports[`Checkbox > renders with indeterminateIcon correctly 1`] = ` exports[`Checkbox > renders with label correctly 1`] = ` "
-
@@ -145,7 +145,7 @@ exports[`Checkbox > renders with label correctly 1`] = ` exports[`Checkbox > renders with label slot correctly 1`] = ` "
-
@@ -158,7 +158,7 @@ exports[`Checkbox > renders with label slot correctly 1`] = ` exports[`Checkbox > renders with name correctly 1`] = ` "
-
@@ -169,7 +169,7 @@ exports[`Checkbox > renders with name correctly 1`] = ` exports[`Checkbox > renders with required correctly 1`] = ` "
-
@@ -182,7 +182,7 @@ exports[`Checkbox > renders with required correctly 1`] = ` exports[`Checkbox > renders with size lg correctly 1`] = ` "
-
@@ -193,7 +193,7 @@ exports[`Checkbox > renders with size lg correctly 1`] = ` exports[`Checkbox > renders with size md correctly 1`] = ` "
-
@@ -204,7 +204,7 @@ exports[`Checkbox > renders with size md correctly 1`] = ` exports[`Checkbox > renders with size sm correctly 1`] = ` "
-
@@ -215,7 +215,7 @@ exports[`Checkbox > renders with size sm correctly 1`] = ` exports[`Checkbox > renders with size xl correctly 1`] = ` "
-
@@ -226,7 +226,7 @@ exports[`Checkbox > renders with size xl correctly 1`] = ` exports[`Checkbox > renders with size xs correctly 1`] = ` "
-
@@ -237,7 +237,7 @@ exports[`Checkbox > renders with size xs correctly 1`] = ` exports[`Checkbox > renders with ui correctly 1`] = ` "
-
@@ -248,7 +248,7 @@ exports[`Checkbox > renders with ui correctly 1`] = ` exports[`Checkbox > renders with value correctly 1`] = ` "
-