From 17355d609045ee25f8763b3def24cbb00965cebe Mon Sep 17 00:00:00 2001 From: rdjanuar Date: Mon, 11 Aug 2025 13:47:04 +0700 Subject: [PATCH 1/8] fix(InputMenu): issue focusing element using label --- src/runtime/components/InputMenu.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/runtime/components/InputMenu.vue b/src/runtime/components/InputMenu.vue index 61bf14e388..e60ef5d5d6 100644 --- a/src/runtime/components/InputMenu.vue +++ b/src/runtime/components/InputMenu.vue @@ -413,7 +413,6 @@ defineExpose({ - + Date: Mon, 11 Aug 2025 13:58:26 +0700 Subject: [PATCH 2/8] test: update snapshot --- test/components/__snapshots__/InputMenu-vue.spec.ts.snap | 2 +- test/components/__snapshots__/InputMenu.spec.ts.snap | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/components/__snapshots__/InputMenu-vue.spec.ts.snap b/test/components/__snapshots__/InputMenu-vue.spec.ts.snap index 7839858d5a..79fb3e2ffc 100644 --- a/test/components/__snapshots__/InputMenu-vue.spec.ts.snap +++ b/test/components/__snapshots__/InputMenu-vue.spec.ts.snap @@ -214,7 +214,7 @@ exports[`InputMenu > renders with icon correctly 1`] = ` `; exports[`InputMenu > renders with id correctly 1`] = ` -"
+"
diff --git a/test/components/__snapshots__/InputMenu.spec.ts.snap b/test/components/__snapshots__/InputMenu.spec.ts.snap index 3ec56ade0d..9a5c04a002 100644 --- a/test/components/__snapshots__/InputMenu.spec.ts.snap +++ b/test/components/__snapshots__/InputMenu.spec.ts.snap @@ -223,7 +223,7 @@ exports[`InputMenu > renders with icon correctly 1`] = ` `; exports[`InputMenu > renders with id correctly 1`] = ` -"
+"
From 212b5e1838990beb36d0ad068aa9085027763be1 Mon Sep 17 00:00:00 2001 From: rdjanuar Date: Tue, 12 Aug 2025 10:26:40 +0700 Subject: [PATCH 3/8] up --- src/runtime/components/Select.vue | 7 ++++++- src/theme/select.ts | 11 ++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/runtime/components/Select.vue b/src/runtime/components/Select.vue index 09268beb98..2c9a37172d 100644 --- a/src/runtime/components/Select.vue +++ b/src/runtime/components/Select.vue @@ -264,7 +264,12 @@ defineExpose({ @update:model-value="onUpdate" @update:open="onUpdateOpen" > - + diff --git a/src/theme/select.ts b/src/theme/select.ts index 8980bb4041..870f860e8d 100644 --- a/src/theme/select.ts +++ b/src/theme/select.ts @@ -81,6 +81,15 @@ export default (options: Required) => { empty: 'p-2 text-base' } } - } + }, + compoundVariants: [...(options.theme.colors || []).map((color: string) => ({ + color, + variant: ['outline', 'subtle'], + class: `focus:ring-2 focus:ring-inset focus:ring-${color}` + })), { + color: 'neutral', + variant: ['outline', 'subtle'], + class: 'focus:ring-2 focus:ring-inset focus:ring-inverted' + }] }, input(options)) } From 662e263a7d7663bc044f6d9cb8af0fc59b0412b7 Mon Sep 17 00:00:00 2001 From: rdjanuar Date: Tue, 12 Aug 2025 10:38:36 +0700 Subject: [PATCH 4/8] up --- .../__snapshots__/Select-vue.spec.ts.snap | 92 ++++++++-------- .../__snapshots__/Select.spec.ts.snap | 92 ++++++++-------- .../__snapshots__/SelectMenu-vue.spec.ts.snap | 102 +++++++++--------- .../__snapshots__/SelectMenu.spec.ts.snap | 102 +++++++++--------- 4 files changed, 194 insertions(+), 194 deletions(-) diff --git a/test/components/__snapshots__/Select-vue.spec.ts.snap b/test/components/__snapshots__/Select-vue.spec.ts.snap index 887a1ea11f..ebf93d8423 100644 --- a/test/components/__snapshots__/Select-vue.spec.ts.snap +++ b/test/components/__snapshots__/Select-vue.spec.ts.snap @@ -1,7 +1,7 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`Select > renders with ariaLabel correctly 1`] = ` -" @@ -28,7 +28,7 @@ exports[`Select > renders with ariaLabel correctly 1`] = ` `; exports[`Select > renders with arrow correctly 1`] = ` -" @@ -54,28 +54,28 @@ exports[`Select > renders with arrow correctly 1`] = ` `; exports[`Select > renders with avatar and leadingIcon correctly 1`] = ` -" +" " `; exports[`Select > renders with avatar and trailingIcon correctly 1`] = ` -" +" " `; exports[`Select > renders with avatar correctly 1`] = ` -" +" " `; exports[`Select > renders with class correctly 1`] = ` -" @@ -102,7 +102,7 @@ exports[`Select > renders with class correctly 1`] = ` `; exports[`Select > renders with defaultValue correctly 1`] = ` -" @@ -129,7 +129,7 @@ exports[`Select > renders with defaultValue correctly 1`] = ` `; exports[`Select > renders with disabled correctly 1`] = ` -" @@ -156,14 +156,14 @@ exports[`Select > renders with disabled correctly 1`] = ` `; exports[`Select > renders with icon correctly 1`] = ` -" +" " `; exports[`Select > renders with id correctly 1`] = ` -" @@ -190,7 +190,7 @@ exports[`Select > renders with id correctly 1`] = ` `; exports[`Select > renders with item slot correctly 1`] = ` -" @@ -217,7 +217,7 @@ exports[`Select > renders with item slot correctly 1`] = ` `; exports[`Select > renders with item-label slot correctly 1`] = ` -" @@ -244,7 +244,7 @@ exports[`Select > renders with item-label slot correctly 1`] = ` `; exports[`Select > renders with item-leading slot correctly 1`] = ` -" @@ -271,7 +271,7 @@ exports[`Select > renders with item-leading slot correctly 1`] = ` `; exports[`Select > renders with item-trailing slot correctly 1`] = ` -" @@ -298,7 +298,7 @@ exports[`Select > renders with item-trailing slot correctly 1`] = ` `; exports[`Select > renders with items correctly 1`] = ` -" @@ -325,7 +325,7 @@ exports[`Select > renders with items correctly 1`] = ` `; exports[`Select > renders with labelKey correctly 1`] = ` -" @@ -352,14 +352,14 @@ exports[`Select > renders with labelKey correctly 1`] = ` `; exports[`Select > renders with leading and icon correctly 1`] = ` -" +" " `; exports[`Select > renders with leading slot correctly 1`] = ` -" +" @@ -384,35 +384,35 @@ exports[`Select > renders with leading slot correctly 1`] = ` `; exports[`Select > renders with leadingIcon correctly 1`] = ` -" +" " `; exports[`Select > renders with loading and avatar correctly 1`] = ` -" +" " `; exports[`Select > renders with loading correctly 1`] = ` -" +" " `; exports[`Select > renders with loading trailing and avatar correctly 1`] = ` -" +" " `; exports[`Select > renders with loading trailing correctly 1`] = ` -" @@ -421,14 +421,14 @@ exports[`Select > renders with loading trailing correctly 1`] = ` `; exports[`Select > renders with loadingIcon correctly 1`] = ` -" +" " `; exports[`Select > renders with modelValue correctly 1`] = ` -" @@ -455,7 +455,7 @@ exports[`Select > renders with modelValue correctly 1`] = ` `; exports[`Select > renders with multiple and modelValue correctly 1`] = ` -" @@ -482,7 +482,7 @@ exports[`Select > renders with multiple and modelValue correctly 1`] = ` `; exports[`Select > renders with multiple correctly 1`] = ` -" @@ -509,7 +509,7 @@ exports[`Select > renders with multiple correctly 1`] = ` `; exports[`Select > renders with name correctly 1`] = ` -" @@ -590,7 +590,7 @@ exports[`Select > renders with neutral variant none correctly 1`] = ` `; exports[`Select > renders with neutral variant outline correctly 1`] = ` -" @@ -644,7 +644,7 @@ exports[`Select > renders with neutral variant soft correctly 1`] = ` `; exports[`Select > renders with neutral variant subtle correctly 1`] = ` -" @@ -671,7 +671,7 @@ exports[`Select > renders with neutral variant subtle correctly 1`] = ` `; exports[`Select > renders with placeholder correctly 1`] = ` -" @@ -752,7 +752,7 @@ exports[`Select > renders with primary variant none correctly 1`] = ` `; exports[`Select > renders with primary variant outline correctly 1`] = ` -" @@ -806,7 +806,7 @@ exports[`Select > renders with primary variant soft correctly 1`] = ` `; exports[`Select > renders with primary variant subtle correctly 1`] = ` -" @@ -833,7 +833,7 @@ exports[`Select > renders with primary variant subtle correctly 1`] = ` `; exports[`Select > renders with required correctly 1`] = ` -" @@ -860,7 +860,7 @@ exports[`Select > renders with required correctly 1`] = ` `; exports[`Select > renders with selectedIcon correctly 1`] = ` -" @@ -887,7 +887,7 @@ exports[`Select > renders with selectedIcon correctly 1`] = ` `; exports[`Select > renders with size lg correctly 1`] = ` -" @@ -914,7 +914,7 @@ exports[`Select > renders with size lg correctly 1`] = ` `; exports[`Select > renders with size md correctly 1`] = ` -" @@ -941,7 +941,7 @@ exports[`Select > renders with size md correctly 1`] = ` `; exports[`Select > renders with size sm correctly 1`] = ` -" @@ -968,7 +968,7 @@ exports[`Select > renders with size sm correctly 1`] = ` `; exports[`Select > renders with size xl correctly 1`] = ` -" @@ -995,7 +995,7 @@ exports[`Select > renders with size xl correctly 1`] = ` `; exports[`Select > renders with size xs correctly 1`] = ` -" @@ -1022,7 +1022,7 @@ exports[`Select > renders with size xs correctly 1`] = ` `; exports[`Select > renders with trailing and icon correctly 1`] = ` -" @@ -1031,7 +1031,7 @@ exports[`Select > renders with trailing and icon correctly 1`] = ` `; exports[`Select > renders with trailing slot correctly 1`] = ` -" @@ -1058,7 +1058,7 @@ exports[`Select > renders with trailing slot correctly 1`] = ` `; exports[`Select > renders with trailingIcon correctly 1`] = ` -" @@ -1067,7 +1067,7 @@ exports[`Select > renders with trailingIcon correctly 1`] = ` `; exports[`Select > renders with trailingIcon correctly 2`] = ` -" @@ -1094,7 +1094,7 @@ exports[`Select > renders with trailingIcon correctly 2`] = ` `; exports[`Select > renders with ui correctly 1`] = ` -" @@ -1121,7 +1121,7 @@ exports[`Select > renders with ui correctly 1`] = ` `; exports[`Select > renders with valueKey correctly 1`] = ` -" diff --git a/test/components/__snapshots__/Select.spec.ts.snap b/test/components/__snapshots__/Select.spec.ts.snap index 1948536c62..e691812714 100644 --- a/test/components/__snapshots__/Select.spec.ts.snap +++ b/test/components/__snapshots__/Select.spec.ts.snap @@ -1,7 +1,7 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`Select > renders with ariaLabel correctly 1`] = ` -" @@ -28,7 +28,7 @@ exports[`Select > renders with ariaLabel correctly 1`] = ` `; exports[`Select > renders with arrow correctly 1`] = ` -" @@ -54,28 +54,28 @@ exports[`Select > renders with arrow correctly 1`] = ` `; exports[`Select > renders with avatar and leadingIcon correctly 1`] = ` -" +" " `; exports[`Select > renders with avatar and trailingIcon correctly 1`] = ` -" +" " `; exports[`Select > renders with avatar correctly 1`] = ` -" +" " `; exports[`Select > renders with class correctly 1`] = ` -" @@ -102,7 +102,7 @@ exports[`Select > renders with class correctly 1`] = ` `; exports[`Select > renders with defaultValue correctly 1`] = ` -" @@ -129,7 +129,7 @@ exports[`Select > renders with defaultValue correctly 1`] = ` `; exports[`Select > renders with disabled correctly 1`] = ` -" @@ -156,14 +156,14 @@ exports[`Select > renders with disabled correctly 1`] = ` `; exports[`Select > renders with icon correctly 1`] = ` -" +" " `; exports[`Select > renders with id correctly 1`] = ` -" @@ -190,7 +190,7 @@ exports[`Select > renders with id correctly 1`] = ` `; exports[`Select > renders with item slot correctly 1`] = ` -" @@ -217,7 +217,7 @@ exports[`Select > renders with item slot correctly 1`] = ` `; exports[`Select > renders with item-label slot correctly 1`] = ` -" @@ -244,7 +244,7 @@ exports[`Select > renders with item-label slot correctly 1`] = ` `; exports[`Select > renders with item-leading slot correctly 1`] = ` -" @@ -271,7 +271,7 @@ exports[`Select > renders with item-leading slot correctly 1`] = ` `; exports[`Select > renders with item-trailing slot correctly 1`] = ` -" @@ -298,7 +298,7 @@ exports[`Select > renders with item-trailing slot correctly 1`] = ` `; exports[`Select > renders with items correctly 1`] = ` -" @@ -325,7 +325,7 @@ exports[`Select > renders with items correctly 1`] = ` `; exports[`Select > renders with labelKey correctly 1`] = ` -" @@ -352,14 +352,14 @@ exports[`Select > renders with labelKey correctly 1`] = ` `; exports[`Select > renders with leading and icon correctly 1`] = ` -" +" " `; exports[`Select > renders with leading slot correctly 1`] = ` -" +" @@ -384,35 +384,35 @@ exports[`Select > renders with leading slot correctly 1`] = ` `; exports[`Select > renders with leadingIcon correctly 1`] = ` -" +" " `; exports[`Select > renders with loading and avatar correctly 1`] = ` -" +" " `; exports[`Select > renders with loading correctly 1`] = ` -" +" " `; exports[`Select > renders with loading trailing and avatar correctly 1`] = ` -" +" " `; exports[`Select > renders with loading trailing correctly 1`] = ` -" @@ -421,14 +421,14 @@ exports[`Select > renders with loading trailing correctly 1`] = ` `; exports[`Select > renders with loadingIcon correctly 1`] = ` -" +" " `; exports[`Select > renders with modelValue correctly 1`] = ` -" @@ -455,7 +455,7 @@ exports[`Select > renders with modelValue correctly 1`] = ` `; exports[`Select > renders with multiple and modelValue correctly 1`] = ` -" @@ -482,7 +482,7 @@ exports[`Select > renders with multiple and modelValue correctly 1`] = ` `; exports[`Select > renders with multiple correctly 1`] = ` -" @@ -509,7 +509,7 @@ exports[`Select > renders with multiple correctly 1`] = ` `; exports[`Select > renders with name correctly 1`] = ` -" @@ -590,7 +590,7 @@ exports[`Select > renders with neutral variant none correctly 1`] = ` `; exports[`Select > renders with neutral variant outline correctly 1`] = ` -" @@ -644,7 +644,7 @@ exports[`Select > renders with neutral variant soft correctly 1`] = ` `; exports[`Select > renders with neutral variant subtle correctly 1`] = ` -" @@ -671,7 +671,7 @@ exports[`Select > renders with neutral variant subtle correctly 1`] = ` `; exports[`Select > renders with placeholder correctly 1`] = ` -" @@ -752,7 +752,7 @@ exports[`Select > renders with primary variant none correctly 1`] = ` `; exports[`Select > renders with primary variant outline correctly 1`] = ` -" @@ -806,7 +806,7 @@ exports[`Select > renders with primary variant soft correctly 1`] = ` `; exports[`Select > renders with primary variant subtle correctly 1`] = ` -" @@ -833,7 +833,7 @@ exports[`Select > renders with primary variant subtle correctly 1`] = ` `; exports[`Select > renders with required correctly 1`] = ` -" @@ -860,7 +860,7 @@ exports[`Select > renders with required correctly 1`] = ` `; exports[`Select > renders with selectedIcon correctly 1`] = ` -" @@ -887,7 +887,7 @@ exports[`Select > renders with selectedIcon correctly 1`] = ` `; exports[`Select > renders with size lg correctly 1`] = ` -" @@ -914,7 +914,7 @@ exports[`Select > renders with size lg correctly 1`] = ` `; exports[`Select > renders with size md correctly 1`] = ` -" @@ -941,7 +941,7 @@ exports[`Select > renders with size md correctly 1`] = ` `; exports[`Select > renders with size sm correctly 1`] = ` -" @@ -968,7 +968,7 @@ exports[`Select > renders with size sm correctly 1`] = ` `; exports[`Select > renders with size xl correctly 1`] = ` -" @@ -995,7 +995,7 @@ exports[`Select > renders with size xl correctly 1`] = ` `; exports[`Select > renders with size xs correctly 1`] = ` -" @@ -1022,7 +1022,7 @@ exports[`Select > renders with size xs correctly 1`] = ` `; exports[`Select > renders with trailing and icon correctly 1`] = ` -" @@ -1031,7 +1031,7 @@ exports[`Select > renders with trailing and icon correctly 1`] = ` `; exports[`Select > renders with trailing slot correctly 1`] = ` -" @@ -1058,7 +1058,7 @@ exports[`Select > renders with trailing slot correctly 1`] = ` `; exports[`Select > renders with trailingIcon correctly 1`] = ` -" @@ -1067,7 +1067,7 @@ exports[`Select > renders with trailingIcon correctly 1`] = ` `; exports[`Select > renders with trailingIcon correctly 2`] = ` -" @@ -1094,7 +1094,7 @@ exports[`Select > renders with trailingIcon correctly 2`] = ` `; exports[`Select > renders with ui correctly 1`] = ` -" @@ -1121,7 +1121,7 @@ exports[`Select > renders with ui correctly 1`] = ` `; exports[`Select > renders with valueKey correctly 1`] = ` -" diff --git a/test/components/__snapshots__/SelectMenu-vue.spec.ts.snap b/test/components/__snapshots__/SelectMenu-vue.spec.ts.snap index d39db868cb..4978be33c5 100644 --- a/test/components/__snapshots__/SelectMenu-vue.spec.ts.snap +++ b/test/components/__snapshots__/SelectMenu-vue.spec.ts.snap @@ -1,7 +1,7 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`SelectMenu > renders with ariaLabel correctly 1`] = ` -" @@ -37,7 +37,7 @@ exports[`SelectMenu > renders with ariaLabel correctly 1`] = ` `; exports[`SelectMenu > renders with arrow correctly 1`] = ` -" @@ -72,28 +72,28 @@ exports[`SelectMenu > renders with arrow correctly 1`] = ` `; exports[`SelectMenu > renders with avatar and leadingIcon correctly 1`] = ` -" +" " `; exports[`SelectMenu > renders with avatar and trailingIcon correctly 1`] = ` -" +" " `; exports[`SelectMenu > renders with avatar correctly 1`] = ` -" +" " `; exports[`SelectMenu > renders with class correctly 1`] = ` -" @@ -129,7 +129,7 @@ exports[`SelectMenu > renders with class correctly 1`] = ` `; exports[`SelectMenu > renders with create-item-label slot correctly 1`] = ` -" @@ -160,7 +160,7 @@ exports[`SelectMenu > renders with create-item-label slot correctly 1`] = ` `; exports[`SelectMenu > renders with default slot correctly 1`] = ` -" @@ -196,7 +196,7 @@ exports[`SelectMenu > renders with default slot correctly 1`] = ` `; exports[`SelectMenu > renders with defaultValue correctly 1`] = ` -" @@ -232,7 +232,7 @@ exports[`SelectMenu > renders with defaultValue correctly 1`] = ` `; exports[`SelectMenu > renders with disabled correctly 1`] = ` -" @@ -268,14 +268,14 @@ exports[`SelectMenu > renders with disabled correctly 1`] = ` `; exports[`SelectMenu > renders with icon correctly 1`] = ` -" +" " `; exports[`SelectMenu > renders with id correctly 1`] = ` -" @@ -311,7 +311,7 @@ exports[`SelectMenu > renders with id correctly 1`] = ` `; exports[`SelectMenu > renders with item slot correctly 1`] = ` -" @@ -347,7 +347,7 @@ exports[`SelectMenu > renders with item slot correctly 1`] = ` `; exports[`SelectMenu > renders with item-label slot correctly 1`] = ` -" @@ -383,7 +383,7 @@ exports[`SelectMenu > renders with item-label slot correctly 1`] = ` `; exports[`SelectMenu > renders with item-leading slot correctly 1`] = ` -" @@ -419,7 +419,7 @@ exports[`SelectMenu > renders with item-leading slot correctly 1`] = ` `; exports[`SelectMenu > renders with item-trailing slot correctly 1`] = ` -" @@ -455,7 +455,7 @@ exports[`SelectMenu > renders with item-trailing slot correctly 1`] = ` `; exports[`SelectMenu > renders with items correctly 1`] = ` -" @@ -491,7 +491,7 @@ exports[`SelectMenu > renders with items correctly 1`] = ` `; exports[`SelectMenu > renders with labelKey correctly 1`] = ` -" @@ -527,14 +527,14 @@ exports[`SelectMenu > renders with labelKey correctly 1`] = ` `; exports[`SelectMenu > renders with leading and icon correctly 1`] = ` -" +" " `; exports[`SelectMenu > renders with leading slot correctly 1`] = ` -" +" @@ -568,35 +568,35 @@ exports[`SelectMenu > renders with leading slot correctly 1`] = ` `; exports[`SelectMenu > renders with leadingIcon correctly 1`] = ` -" +" " `; exports[`SelectMenu > renders with loading and avatar correctly 1`] = ` -" +" " `; exports[`SelectMenu > renders with loading correctly 1`] = ` -" +" " `; exports[`SelectMenu > renders with loading trailing and avatar correctly 1`] = ` -" +" " `; exports[`SelectMenu > renders with loading trailing correctly 1`] = ` -" @@ -605,14 +605,14 @@ exports[`SelectMenu > renders with loading trailing correctly 1`] = ` `; exports[`SelectMenu > renders with loadingIcon correctly 1`] = ` -" +" " `; exports[`SelectMenu > renders with modelValue correctly 1`] = ` -" @@ -648,7 +648,7 @@ exports[`SelectMenu > renders with modelValue correctly 1`] = ` `; exports[`SelectMenu > renders with multiple and modelValue correctly 1`] = ` -" @@ -684,7 +684,7 @@ exports[`SelectMenu > renders with multiple and modelValue correctly 1`] = ` `; exports[`SelectMenu > renders with multiple correctly 1`] = ` -" @@ -720,7 +720,7 @@ exports[`SelectMenu > renders with multiple correctly 1`] = ` `; exports[`SelectMenu > renders with name correctly 1`] = ` -" @@ -828,7 +828,7 @@ exports[`SelectMenu > renders with neutral variant none correctly 1`] = ` `; exports[`SelectMenu > renders with neutral variant outline correctly 1`] = ` -" @@ -900,7 +900,7 @@ exports[`SelectMenu > renders with neutral variant soft correctly 1`] = ` `; exports[`SelectMenu > renders with neutral variant subtle correctly 1`] = ` -" @@ -936,7 +936,7 @@ exports[`SelectMenu > renders with neutral variant subtle correctly 1`] = ` `; exports[`SelectMenu > renders with placeholder correctly 1`] = ` -" @@ -1044,7 +1044,7 @@ exports[`SelectMenu > renders with primary variant none correctly 1`] = ` `; exports[`SelectMenu > renders with primary variant outline correctly 1`] = ` -" @@ -1116,7 +1116,7 @@ exports[`SelectMenu > renders with primary variant soft correctly 1`] = ` `; exports[`SelectMenu > renders with primary variant subtle correctly 1`] = ` -" @@ -1152,7 +1152,7 @@ exports[`SelectMenu > renders with primary variant subtle correctly 1`] = ` `; exports[`SelectMenu > renders with required correctly 1`] = ` -" @@ -1188,7 +1188,7 @@ exports[`SelectMenu > renders with required correctly 1`] = ` `; exports[`SelectMenu > renders with searchInput icon correctly 1`] = ` -" @@ -1223,7 +1223,7 @@ exports[`SelectMenu > renders with searchInput icon correctly 1`] = ` `; exports[`SelectMenu > renders with searchInput placeholder correctly 1`] = ` -" @@ -1259,7 +1259,7 @@ exports[`SelectMenu > renders with searchInput placeholder correctly 1`] = ` `; exports[`SelectMenu > renders with selectedIcon correctly 1`] = ` -" @@ -1295,7 +1295,7 @@ exports[`SelectMenu > renders with selectedIcon correctly 1`] = ` `; exports[`SelectMenu > renders with size lg correctly 1`] = ` -" @@ -1331,7 +1331,7 @@ exports[`SelectMenu > renders with size lg correctly 1`] = ` `; exports[`SelectMenu > renders with size md correctly 1`] = ` -" @@ -1367,7 +1367,7 @@ exports[`SelectMenu > renders with size md correctly 1`] = ` `; exports[`SelectMenu > renders with size sm correctly 1`] = ` -" @@ -1403,7 +1403,7 @@ exports[`SelectMenu > renders with size sm correctly 1`] = ` `; exports[`SelectMenu > renders with size xl correctly 1`] = ` -" @@ -1439,7 +1439,7 @@ exports[`SelectMenu > renders with size xl correctly 1`] = ` `; exports[`SelectMenu > renders with size xs correctly 1`] = ` -" @@ -1475,7 +1475,7 @@ exports[`SelectMenu > renders with size xs correctly 1`] = ` `; exports[`SelectMenu > renders with trailing and icon correctly 1`] = ` -" @@ -1484,7 +1484,7 @@ exports[`SelectMenu > renders with trailing and icon correctly 1`] = ` `; exports[`SelectMenu > renders with trailing slot correctly 1`] = ` -" @@ -1520,7 +1520,7 @@ exports[`SelectMenu > renders with trailing slot correctly 1`] = ` `; exports[`SelectMenu > renders with trailingIcon correctly 1`] = ` -" @@ -1529,7 +1529,7 @@ exports[`SelectMenu > renders with trailingIcon correctly 1`] = ` `; exports[`SelectMenu > renders with trailingIcon correctly 2`] = ` -" @@ -1565,7 +1565,7 @@ exports[`SelectMenu > renders with trailingIcon correctly 2`] = ` `; exports[`SelectMenu > renders with ui correctly 1`] = ` -" @@ -1601,7 +1601,7 @@ exports[`SelectMenu > renders with ui correctly 1`] = ` `; exports[`SelectMenu > renders with valueKey correctly 1`] = ` -" @@ -1637,7 +1637,7 @@ exports[`SelectMenu > renders with valueKey correctly 1`] = ` `; exports[`SelectMenu > renders without searchInput correctly 1`] = ` -" diff --git a/test/components/__snapshots__/SelectMenu.spec.ts.snap b/test/components/__snapshots__/SelectMenu.spec.ts.snap index f9214bbd32..54e6c6ee46 100644 --- a/test/components/__snapshots__/SelectMenu.spec.ts.snap +++ b/test/components/__snapshots__/SelectMenu.spec.ts.snap @@ -1,7 +1,7 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`SelectMenu > renders with ariaLabel correctly 1`] = ` -" @@ -37,7 +37,7 @@ exports[`SelectMenu > renders with ariaLabel correctly 1`] = ` `; exports[`SelectMenu > renders with arrow correctly 1`] = ` -" @@ -72,28 +72,28 @@ exports[`SelectMenu > renders with arrow correctly 1`] = ` `; exports[`SelectMenu > renders with avatar and leadingIcon correctly 1`] = ` -" +" " `; exports[`SelectMenu > renders with avatar and trailingIcon correctly 1`] = ` -" +" " `; exports[`SelectMenu > renders with avatar correctly 1`] = ` -" +" " `; exports[`SelectMenu > renders with class correctly 1`] = ` -" @@ -129,7 +129,7 @@ exports[`SelectMenu > renders with class correctly 1`] = ` `; exports[`SelectMenu > renders with create-item-label slot correctly 1`] = ` -" @@ -160,7 +160,7 @@ exports[`SelectMenu > renders with create-item-label slot correctly 1`] = ` `; exports[`SelectMenu > renders with default slot correctly 1`] = ` -" @@ -196,7 +196,7 @@ exports[`SelectMenu > renders with default slot correctly 1`] = ` `; exports[`SelectMenu > renders with defaultValue correctly 1`] = ` -" @@ -232,7 +232,7 @@ exports[`SelectMenu > renders with defaultValue correctly 1`] = ` `; exports[`SelectMenu > renders with disabled correctly 1`] = ` -" @@ -268,14 +268,14 @@ exports[`SelectMenu > renders with disabled correctly 1`] = ` `; exports[`SelectMenu > renders with icon correctly 1`] = ` -" +" " `; exports[`SelectMenu > renders with id correctly 1`] = ` -" @@ -311,7 +311,7 @@ exports[`SelectMenu > renders with id correctly 1`] = ` `; exports[`SelectMenu > renders with item slot correctly 1`] = ` -" @@ -347,7 +347,7 @@ exports[`SelectMenu > renders with item slot correctly 1`] = ` `; exports[`SelectMenu > renders with item-label slot correctly 1`] = ` -" @@ -383,7 +383,7 @@ exports[`SelectMenu > renders with item-label slot correctly 1`] = ` `; exports[`SelectMenu > renders with item-leading slot correctly 1`] = ` -" @@ -419,7 +419,7 @@ exports[`SelectMenu > renders with item-leading slot correctly 1`] = ` `; exports[`SelectMenu > renders with item-trailing slot correctly 1`] = ` -" @@ -455,7 +455,7 @@ exports[`SelectMenu > renders with item-trailing slot correctly 1`] = ` `; exports[`SelectMenu > renders with items correctly 1`] = ` -" @@ -491,7 +491,7 @@ exports[`SelectMenu > renders with items correctly 1`] = ` `; exports[`SelectMenu > renders with labelKey correctly 1`] = ` -" @@ -527,14 +527,14 @@ exports[`SelectMenu > renders with labelKey correctly 1`] = ` `; exports[`SelectMenu > renders with leading and icon correctly 1`] = ` -" +" " `; exports[`SelectMenu > renders with leading slot correctly 1`] = ` -" +" @@ -568,35 +568,35 @@ exports[`SelectMenu > renders with leading slot correctly 1`] = ` `; exports[`SelectMenu > renders with leadingIcon correctly 1`] = ` -" +" " `; exports[`SelectMenu > renders with loading and avatar correctly 1`] = ` -" +" " `; exports[`SelectMenu > renders with loading correctly 1`] = ` -" +" " `; exports[`SelectMenu > renders with loading trailing and avatar correctly 1`] = ` -" +" " `; exports[`SelectMenu > renders with loading trailing correctly 1`] = ` -" @@ -605,14 +605,14 @@ exports[`SelectMenu > renders with loading trailing correctly 1`] = ` `; exports[`SelectMenu > renders with loadingIcon correctly 1`] = ` -" +" " `; exports[`SelectMenu > renders with modelValue correctly 1`] = ` -" @@ -648,7 +648,7 @@ exports[`SelectMenu > renders with modelValue correctly 1`] = ` `; exports[`SelectMenu > renders with multiple and modelValue correctly 1`] = ` -" @@ -684,7 +684,7 @@ exports[`SelectMenu > renders with multiple and modelValue correctly 1`] = ` `; exports[`SelectMenu > renders with multiple correctly 1`] = ` -" @@ -720,7 +720,7 @@ exports[`SelectMenu > renders with multiple correctly 1`] = ` `; exports[`SelectMenu > renders with name correctly 1`] = ` -" @@ -828,7 +828,7 @@ exports[`SelectMenu > renders with neutral variant none correctly 1`] = ` `; exports[`SelectMenu > renders with neutral variant outline correctly 1`] = ` -" @@ -900,7 +900,7 @@ exports[`SelectMenu > renders with neutral variant soft correctly 1`] = ` `; exports[`SelectMenu > renders with neutral variant subtle correctly 1`] = ` -" @@ -936,7 +936,7 @@ exports[`SelectMenu > renders with neutral variant subtle correctly 1`] = ` `; exports[`SelectMenu > renders with placeholder correctly 1`] = ` -" @@ -1044,7 +1044,7 @@ exports[`SelectMenu > renders with primary variant none correctly 1`] = ` `; exports[`SelectMenu > renders with primary variant outline correctly 1`] = ` -" @@ -1116,7 +1116,7 @@ exports[`SelectMenu > renders with primary variant soft correctly 1`] = ` `; exports[`SelectMenu > renders with primary variant subtle correctly 1`] = ` -" @@ -1152,7 +1152,7 @@ exports[`SelectMenu > renders with primary variant subtle correctly 1`] = ` `; exports[`SelectMenu > renders with required correctly 1`] = ` -" @@ -1188,7 +1188,7 @@ exports[`SelectMenu > renders with required correctly 1`] = ` `; exports[`SelectMenu > renders with searchInput icon correctly 1`] = ` -" @@ -1223,7 +1223,7 @@ exports[`SelectMenu > renders with searchInput icon correctly 1`] = ` `; exports[`SelectMenu > renders with searchInput placeholder correctly 1`] = ` -" @@ -1259,7 +1259,7 @@ exports[`SelectMenu > renders with searchInput placeholder correctly 1`] = ` `; exports[`SelectMenu > renders with selectedIcon correctly 1`] = ` -" @@ -1295,7 +1295,7 @@ exports[`SelectMenu > renders with selectedIcon correctly 1`] = ` `; exports[`SelectMenu > renders with size lg correctly 1`] = ` -" @@ -1331,7 +1331,7 @@ exports[`SelectMenu > renders with size lg correctly 1`] = ` `; exports[`SelectMenu > renders with size md correctly 1`] = ` -" @@ -1367,7 +1367,7 @@ exports[`SelectMenu > renders with size md correctly 1`] = ` `; exports[`SelectMenu > renders with size sm correctly 1`] = ` -" @@ -1403,7 +1403,7 @@ exports[`SelectMenu > renders with size sm correctly 1`] = ` `; exports[`SelectMenu > renders with size xl correctly 1`] = ` -" @@ -1439,7 +1439,7 @@ exports[`SelectMenu > renders with size xl correctly 1`] = ` `; exports[`SelectMenu > renders with size xs correctly 1`] = ` -" @@ -1475,7 +1475,7 @@ exports[`SelectMenu > renders with size xs correctly 1`] = ` `; exports[`SelectMenu > renders with trailing and icon correctly 1`] = ` -" @@ -1484,7 +1484,7 @@ exports[`SelectMenu > renders with trailing and icon correctly 1`] = ` `; exports[`SelectMenu > renders with trailing slot correctly 1`] = ` -" @@ -1520,7 +1520,7 @@ exports[`SelectMenu > renders with trailing slot correctly 1`] = ` `; exports[`SelectMenu > renders with trailingIcon correctly 1`] = ` -" @@ -1529,7 +1529,7 @@ exports[`SelectMenu > renders with trailingIcon correctly 1`] = ` `; exports[`SelectMenu > renders with trailingIcon correctly 2`] = ` -" @@ -1565,7 +1565,7 @@ exports[`SelectMenu > renders with trailingIcon correctly 2`] = ` `; exports[`SelectMenu > renders with ui correctly 1`] = ` -" @@ -1601,7 +1601,7 @@ exports[`SelectMenu > renders with ui correctly 1`] = ` `; exports[`SelectMenu > renders with valueKey correctly 1`] = ` -" @@ -1637,7 +1637,7 @@ exports[`SelectMenu > renders with valueKey correctly 1`] = ` `; exports[`SelectMenu > renders without searchInput correctly 1`] = ` -" From d1530cae76053f7f50a4676aea42aaf2b9f6b998 Mon Sep 17 00:00:00 2001 From: Benjamin Canac Date: Thu, 14 Aug 2025 11:07:39 +0200 Subject: [PATCH 5/8] up --- src/theme/select.ts | 11 +- .../__snapshots__/SelectMenu-vue.spec.ts.snap | 102 +++++++++--------- .../__snapshots__/SelectMenu.spec.ts.snap | 102 +++++++++--------- 3 files changed, 103 insertions(+), 112 deletions(-) diff --git a/src/theme/select.ts b/src/theme/select.ts index 870f860e8d..8980bb4041 100644 --- a/src/theme/select.ts +++ b/src/theme/select.ts @@ -81,15 +81,6 @@ export default (options: Required) => { empty: 'p-2 text-base' } } - }, - compoundVariants: [...(options.theme.colors || []).map((color: string) => ({ - color, - variant: ['outline', 'subtle'], - class: `focus:ring-2 focus:ring-inset focus:ring-${color}` - })), { - color: 'neutral', - variant: ['outline', 'subtle'], - class: 'focus:ring-2 focus:ring-inset focus:ring-inverted' - }] + } }, input(options)) } diff --git a/test/components/__snapshots__/SelectMenu-vue.spec.ts.snap b/test/components/__snapshots__/SelectMenu-vue.spec.ts.snap index 4978be33c5..d39db868cb 100644 --- a/test/components/__snapshots__/SelectMenu-vue.spec.ts.snap +++ b/test/components/__snapshots__/SelectMenu-vue.spec.ts.snap @@ -1,7 +1,7 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`SelectMenu > renders with ariaLabel correctly 1`] = ` -" @@ -37,7 +37,7 @@ exports[`SelectMenu > renders with ariaLabel correctly 1`] = ` `; exports[`SelectMenu > renders with arrow correctly 1`] = ` -" @@ -72,28 +72,28 @@ exports[`SelectMenu > renders with arrow correctly 1`] = ` `; exports[`SelectMenu > renders with avatar and leadingIcon correctly 1`] = ` -" +" " `; exports[`SelectMenu > renders with avatar and trailingIcon correctly 1`] = ` -" +" " `; exports[`SelectMenu > renders with avatar correctly 1`] = ` -" +" " `; exports[`SelectMenu > renders with class correctly 1`] = ` -" @@ -129,7 +129,7 @@ exports[`SelectMenu > renders with class correctly 1`] = ` `; exports[`SelectMenu > renders with create-item-label slot correctly 1`] = ` -" @@ -160,7 +160,7 @@ exports[`SelectMenu > renders with create-item-label slot correctly 1`] = ` `; exports[`SelectMenu > renders with default slot correctly 1`] = ` -" @@ -196,7 +196,7 @@ exports[`SelectMenu > renders with default slot correctly 1`] = ` `; exports[`SelectMenu > renders with defaultValue correctly 1`] = ` -" @@ -232,7 +232,7 @@ exports[`SelectMenu > renders with defaultValue correctly 1`] = ` `; exports[`SelectMenu > renders with disabled correctly 1`] = ` -" @@ -268,14 +268,14 @@ exports[`SelectMenu > renders with disabled correctly 1`] = ` `; exports[`SelectMenu > renders with icon correctly 1`] = ` -" +" " `; exports[`SelectMenu > renders with id correctly 1`] = ` -" @@ -311,7 +311,7 @@ exports[`SelectMenu > renders with id correctly 1`] = ` `; exports[`SelectMenu > renders with item slot correctly 1`] = ` -" @@ -347,7 +347,7 @@ exports[`SelectMenu > renders with item slot correctly 1`] = ` `; exports[`SelectMenu > renders with item-label slot correctly 1`] = ` -" @@ -383,7 +383,7 @@ exports[`SelectMenu > renders with item-label slot correctly 1`] = ` `; exports[`SelectMenu > renders with item-leading slot correctly 1`] = ` -" @@ -419,7 +419,7 @@ exports[`SelectMenu > renders with item-leading slot correctly 1`] = ` `; exports[`SelectMenu > renders with item-trailing slot correctly 1`] = ` -" @@ -455,7 +455,7 @@ exports[`SelectMenu > renders with item-trailing slot correctly 1`] = ` `; exports[`SelectMenu > renders with items correctly 1`] = ` -" @@ -491,7 +491,7 @@ exports[`SelectMenu > renders with items correctly 1`] = ` `; exports[`SelectMenu > renders with labelKey correctly 1`] = ` -" @@ -527,14 +527,14 @@ exports[`SelectMenu > renders with labelKey correctly 1`] = ` `; exports[`SelectMenu > renders with leading and icon correctly 1`] = ` -" +" " `; exports[`SelectMenu > renders with leading slot correctly 1`] = ` -" +" @@ -568,35 +568,35 @@ exports[`SelectMenu > renders with leading slot correctly 1`] = ` `; exports[`SelectMenu > renders with leadingIcon correctly 1`] = ` -" +" " `; exports[`SelectMenu > renders with loading and avatar correctly 1`] = ` -" +" " `; exports[`SelectMenu > renders with loading correctly 1`] = ` -" +" " `; exports[`SelectMenu > renders with loading trailing and avatar correctly 1`] = ` -" +" " `; exports[`SelectMenu > renders with loading trailing correctly 1`] = ` -" @@ -605,14 +605,14 @@ exports[`SelectMenu > renders with loading trailing correctly 1`] = ` `; exports[`SelectMenu > renders with loadingIcon correctly 1`] = ` -" +" " `; exports[`SelectMenu > renders with modelValue correctly 1`] = ` -" @@ -648,7 +648,7 @@ exports[`SelectMenu > renders with modelValue correctly 1`] = ` `; exports[`SelectMenu > renders with multiple and modelValue correctly 1`] = ` -" @@ -684,7 +684,7 @@ exports[`SelectMenu > renders with multiple and modelValue correctly 1`] = ` `; exports[`SelectMenu > renders with multiple correctly 1`] = ` -" @@ -720,7 +720,7 @@ exports[`SelectMenu > renders with multiple correctly 1`] = ` `; exports[`SelectMenu > renders with name correctly 1`] = ` -" @@ -828,7 +828,7 @@ exports[`SelectMenu > renders with neutral variant none correctly 1`] = ` `; exports[`SelectMenu > renders with neutral variant outline correctly 1`] = ` -" @@ -900,7 +900,7 @@ exports[`SelectMenu > renders with neutral variant soft correctly 1`] = ` `; exports[`SelectMenu > renders with neutral variant subtle correctly 1`] = ` -" @@ -936,7 +936,7 @@ exports[`SelectMenu > renders with neutral variant subtle correctly 1`] = ` `; exports[`SelectMenu > renders with placeholder correctly 1`] = ` -" @@ -1044,7 +1044,7 @@ exports[`SelectMenu > renders with primary variant none correctly 1`] = ` `; exports[`SelectMenu > renders with primary variant outline correctly 1`] = ` -" @@ -1116,7 +1116,7 @@ exports[`SelectMenu > renders with primary variant soft correctly 1`] = ` `; exports[`SelectMenu > renders with primary variant subtle correctly 1`] = ` -" @@ -1152,7 +1152,7 @@ exports[`SelectMenu > renders with primary variant subtle correctly 1`] = ` `; exports[`SelectMenu > renders with required correctly 1`] = ` -" @@ -1188,7 +1188,7 @@ exports[`SelectMenu > renders with required correctly 1`] = ` `; exports[`SelectMenu > renders with searchInput icon correctly 1`] = ` -" @@ -1223,7 +1223,7 @@ exports[`SelectMenu > renders with searchInput icon correctly 1`] = ` `; exports[`SelectMenu > renders with searchInput placeholder correctly 1`] = ` -" @@ -1259,7 +1259,7 @@ exports[`SelectMenu > renders with searchInput placeholder correctly 1`] = ` `; exports[`SelectMenu > renders with selectedIcon correctly 1`] = ` -" @@ -1295,7 +1295,7 @@ exports[`SelectMenu > renders with selectedIcon correctly 1`] = ` `; exports[`SelectMenu > renders with size lg correctly 1`] = ` -" @@ -1331,7 +1331,7 @@ exports[`SelectMenu > renders with size lg correctly 1`] = ` `; exports[`SelectMenu > renders with size md correctly 1`] = ` -" @@ -1367,7 +1367,7 @@ exports[`SelectMenu > renders with size md correctly 1`] = ` `; exports[`SelectMenu > renders with size sm correctly 1`] = ` -" @@ -1403,7 +1403,7 @@ exports[`SelectMenu > renders with size sm correctly 1`] = ` `; exports[`SelectMenu > renders with size xl correctly 1`] = ` -" @@ -1439,7 +1439,7 @@ exports[`SelectMenu > renders with size xl correctly 1`] = ` `; exports[`SelectMenu > renders with size xs correctly 1`] = ` -" @@ -1475,7 +1475,7 @@ exports[`SelectMenu > renders with size xs correctly 1`] = ` `; exports[`SelectMenu > renders with trailing and icon correctly 1`] = ` -" @@ -1484,7 +1484,7 @@ exports[`SelectMenu > renders with trailing and icon correctly 1`] = ` `; exports[`SelectMenu > renders with trailing slot correctly 1`] = ` -" @@ -1520,7 +1520,7 @@ exports[`SelectMenu > renders with trailing slot correctly 1`] = ` `; exports[`SelectMenu > renders with trailingIcon correctly 1`] = ` -" @@ -1529,7 +1529,7 @@ exports[`SelectMenu > renders with trailingIcon correctly 1`] = ` `; exports[`SelectMenu > renders with trailingIcon correctly 2`] = ` -" @@ -1565,7 +1565,7 @@ exports[`SelectMenu > renders with trailingIcon correctly 2`] = ` `; exports[`SelectMenu > renders with ui correctly 1`] = ` -" @@ -1601,7 +1601,7 @@ exports[`SelectMenu > renders with ui correctly 1`] = ` `; exports[`SelectMenu > renders with valueKey correctly 1`] = ` -" @@ -1637,7 +1637,7 @@ exports[`SelectMenu > renders with valueKey correctly 1`] = ` `; exports[`SelectMenu > renders without searchInput correctly 1`] = ` -" diff --git a/test/components/__snapshots__/SelectMenu.spec.ts.snap b/test/components/__snapshots__/SelectMenu.spec.ts.snap index 54e6c6ee46..f9214bbd32 100644 --- a/test/components/__snapshots__/SelectMenu.spec.ts.snap +++ b/test/components/__snapshots__/SelectMenu.spec.ts.snap @@ -1,7 +1,7 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`SelectMenu > renders with ariaLabel correctly 1`] = ` -" @@ -37,7 +37,7 @@ exports[`SelectMenu > renders with ariaLabel correctly 1`] = ` `; exports[`SelectMenu > renders with arrow correctly 1`] = ` -" @@ -72,28 +72,28 @@ exports[`SelectMenu > renders with arrow correctly 1`] = ` `; exports[`SelectMenu > renders with avatar and leadingIcon correctly 1`] = ` -" +" " `; exports[`SelectMenu > renders with avatar and trailingIcon correctly 1`] = ` -" +" " `; exports[`SelectMenu > renders with avatar correctly 1`] = ` -" +" " `; exports[`SelectMenu > renders with class correctly 1`] = ` -" @@ -129,7 +129,7 @@ exports[`SelectMenu > renders with class correctly 1`] = ` `; exports[`SelectMenu > renders with create-item-label slot correctly 1`] = ` -" @@ -160,7 +160,7 @@ exports[`SelectMenu > renders with create-item-label slot correctly 1`] = ` `; exports[`SelectMenu > renders with default slot correctly 1`] = ` -" @@ -196,7 +196,7 @@ exports[`SelectMenu > renders with default slot correctly 1`] = ` `; exports[`SelectMenu > renders with defaultValue correctly 1`] = ` -" @@ -232,7 +232,7 @@ exports[`SelectMenu > renders with defaultValue correctly 1`] = ` `; exports[`SelectMenu > renders with disabled correctly 1`] = ` -" @@ -268,14 +268,14 @@ exports[`SelectMenu > renders with disabled correctly 1`] = ` `; exports[`SelectMenu > renders with icon correctly 1`] = ` -" +" " `; exports[`SelectMenu > renders with id correctly 1`] = ` -" @@ -311,7 +311,7 @@ exports[`SelectMenu > renders with id correctly 1`] = ` `; exports[`SelectMenu > renders with item slot correctly 1`] = ` -" @@ -347,7 +347,7 @@ exports[`SelectMenu > renders with item slot correctly 1`] = ` `; exports[`SelectMenu > renders with item-label slot correctly 1`] = ` -" @@ -383,7 +383,7 @@ exports[`SelectMenu > renders with item-label slot correctly 1`] = ` `; exports[`SelectMenu > renders with item-leading slot correctly 1`] = ` -" @@ -419,7 +419,7 @@ exports[`SelectMenu > renders with item-leading slot correctly 1`] = ` `; exports[`SelectMenu > renders with item-trailing slot correctly 1`] = ` -" @@ -455,7 +455,7 @@ exports[`SelectMenu > renders with item-trailing slot correctly 1`] = ` `; exports[`SelectMenu > renders with items correctly 1`] = ` -" @@ -491,7 +491,7 @@ exports[`SelectMenu > renders with items correctly 1`] = ` `; exports[`SelectMenu > renders with labelKey correctly 1`] = ` -" @@ -527,14 +527,14 @@ exports[`SelectMenu > renders with labelKey correctly 1`] = ` `; exports[`SelectMenu > renders with leading and icon correctly 1`] = ` -" +" " `; exports[`SelectMenu > renders with leading slot correctly 1`] = ` -" +" @@ -568,35 +568,35 @@ exports[`SelectMenu > renders with leading slot correctly 1`] = ` `; exports[`SelectMenu > renders with leadingIcon correctly 1`] = ` -" +" " `; exports[`SelectMenu > renders with loading and avatar correctly 1`] = ` -" +" " `; exports[`SelectMenu > renders with loading correctly 1`] = ` -" +" " `; exports[`SelectMenu > renders with loading trailing and avatar correctly 1`] = ` -" +" " `; exports[`SelectMenu > renders with loading trailing correctly 1`] = ` -" @@ -605,14 +605,14 @@ exports[`SelectMenu > renders with loading trailing correctly 1`] = ` `; exports[`SelectMenu > renders with loadingIcon correctly 1`] = ` -" +" " `; exports[`SelectMenu > renders with modelValue correctly 1`] = ` -" @@ -648,7 +648,7 @@ exports[`SelectMenu > renders with modelValue correctly 1`] = ` `; exports[`SelectMenu > renders with multiple and modelValue correctly 1`] = ` -" @@ -684,7 +684,7 @@ exports[`SelectMenu > renders with multiple and modelValue correctly 1`] = ` `; exports[`SelectMenu > renders with multiple correctly 1`] = ` -" @@ -720,7 +720,7 @@ exports[`SelectMenu > renders with multiple correctly 1`] = ` `; exports[`SelectMenu > renders with name correctly 1`] = ` -" @@ -828,7 +828,7 @@ exports[`SelectMenu > renders with neutral variant none correctly 1`] = ` `; exports[`SelectMenu > renders with neutral variant outline correctly 1`] = ` -" @@ -900,7 +900,7 @@ exports[`SelectMenu > renders with neutral variant soft correctly 1`] = ` `; exports[`SelectMenu > renders with neutral variant subtle correctly 1`] = ` -" @@ -936,7 +936,7 @@ exports[`SelectMenu > renders with neutral variant subtle correctly 1`] = ` `; exports[`SelectMenu > renders with placeholder correctly 1`] = ` -" @@ -1044,7 +1044,7 @@ exports[`SelectMenu > renders with primary variant none correctly 1`] = ` `; exports[`SelectMenu > renders with primary variant outline correctly 1`] = ` -" @@ -1116,7 +1116,7 @@ exports[`SelectMenu > renders with primary variant soft correctly 1`] = ` `; exports[`SelectMenu > renders with primary variant subtle correctly 1`] = ` -" @@ -1152,7 +1152,7 @@ exports[`SelectMenu > renders with primary variant subtle correctly 1`] = ` `; exports[`SelectMenu > renders with required correctly 1`] = ` -" @@ -1188,7 +1188,7 @@ exports[`SelectMenu > renders with required correctly 1`] = ` `; exports[`SelectMenu > renders with searchInput icon correctly 1`] = ` -" @@ -1223,7 +1223,7 @@ exports[`SelectMenu > renders with searchInput icon correctly 1`] = ` `; exports[`SelectMenu > renders with searchInput placeholder correctly 1`] = ` -" @@ -1259,7 +1259,7 @@ exports[`SelectMenu > renders with searchInput placeholder correctly 1`] = ` `; exports[`SelectMenu > renders with selectedIcon correctly 1`] = ` -" @@ -1295,7 +1295,7 @@ exports[`SelectMenu > renders with selectedIcon correctly 1`] = ` `; exports[`SelectMenu > renders with size lg correctly 1`] = ` -" @@ -1331,7 +1331,7 @@ exports[`SelectMenu > renders with size lg correctly 1`] = ` `; exports[`SelectMenu > renders with size md correctly 1`] = ` -" @@ -1367,7 +1367,7 @@ exports[`SelectMenu > renders with size md correctly 1`] = ` `; exports[`SelectMenu > renders with size sm correctly 1`] = ` -" @@ -1403,7 +1403,7 @@ exports[`SelectMenu > renders with size sm correctly 1`] = ` `; exports[`SelectMenu > renders with size xl correctly 1`] = ` -" @@ -1439,7 +1439,7 @@ exports[`SelectMenu > renders with size xl correctly 1`] = ` `; exports[`SelectMenu > renders with size xs correctly 1`] = ` -" @@ -1475,7 +1475,7 @@ exports[`SelectMenu > renders with size xs correctly 1`] = ` `; exports[`SelectMenu > renders with trailing and icon correctly 1`] = ` -" @@ -1484,7 +1484,7 @@ exports[`SelectMenu > renders with trailing and icon correctly 1`] = ` `; exports[`SelectMenu > renders with trailing slot correctly 1`] = ` -" @@ -1520,7 +1520,7 @@ exports[`SelectMenu > renders with trailing slot correctly 1`] = ` `; exports[`SelectMenu > renders with trailingIcon correctly 1`] = ` -" @@ -1529,7 +1529,7 @@ exports[`SelectMenu > renders with trailingIcon correctly 1`] = ` `; exports[`SelectMenu > renders with trailingIcon correctly 2`] = ` -" @@ -1565,7 +1565,7 @@ exports[`SelectMenu > renders with trailingIcon correctly 2`] = ` `; exports[`SelectMenu > renders with ui correctly 1`] = ` -" @@ -1601,7 +1601,7 @@ exports[`SelectMenu > renders with ui correctly 1`] = ` `; exports[`SelectMenu > renders with valueKey correctly 1`] = ` -" @@ -1637,7 +1637,7 @@ exports[`SelectMenu > renders with valueKey correctly 1`] = ` `; exports[`SelectMenu > renders without searchInput correctly 1`] = ` -" From 616f7ddc09eeb6e3c9d613491e04afad5fb2b15b Mon Sep 17 00:00:00 2001 From: Benjamin Canac Date: Thu, 14 Aug 2025 11:24:08 +0200 Subject: [PATCH 6/8] up --- src/runtime/components/InputMenu.vue | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/runtime/components/InputMenu.vue b/src/runtime/components/InputMenu.vue index 17c93acb27..6c0cf41b9e 100644 --- a/src/runtime/components/InputMenu.vue +++ b/src/runtime/components/InputMenu.vue @@ -426,11 +426,7 @@ defineExpose({ @update:open="onUpdateOpen" @keydown.enter="$event.preventDefault()" > - + Date: Thu, 14 Aug 2025 11:31:05 +0200 Subject: [PATCH 7/8] update snapshots --- test/components/__snapshots__/InputMenu-vue.spec.ts.snap | 2 +- test/components/__snapshots__/InputMenu.spec.ts.snap | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/components/__snapshots__/InputMenu-vue.spec.ts.snap b/test/components/__snapshots__/InputMenu-vue.spec.ts.snap index 0591c10647..f0ca8a23bd 100644 --- a/test/components/__snapshots__/InputMenu-vue.spec.ts.snap +++ b/test/components/__snapshots__/InputMenu-vue.spec.ts.snap @@ -219,7 +219,7 @@ exports[`InputMenu > renders with icon correctly 1`] = ` `; exports[`InputMenu > renders with id correctly 1`] = ` -"
+"
diff --git a/test/components/__snapshots__/InputMenu.spec.ts.snap b/test/components/__snapshots__/InputMenu.spec.ts.snap index 36e76069e7..0fd97506a0 100644 --- a/test/components/__snapshots__/InputMenu.spec.ts.snap +++ b/test/components/__snapshots__/InputMenu.spec.ts.snap @@ -223,7 +223,7 @@ exports[`InputMenu > renders with icon correctly 1`] = ` `; exports[`InputMenu > renders with id correctly 1`] = ` -"
+"
From 69c64f36bf970618ab429d9780c8b3ffccaf270a Mon Sep 17 00:00:00 2001 From: Benjamin Canac Date: Thu, 14 Aug 2025 11:59:41 +0200 Subject: [PATCH 8/8] put back `focus:` classes on Select --- src/theme/select-menu.ts | 11 ++- src/theme/select.ts | 11 ++- .../__snapshots__/Select-vue.spec.ts.snap | 92 +++++++++---------- .../__snapshots__/Select.spec.ts.snap | 92 +++++++++---------- 4 files changed, 112 insertions(+), 94 deletions(-) diff --git a/src/theme/select-menu.ts b/src/theme/select-menu.ts index c8fa433186..6a420a5fc5 100644 --- a/src/theme/select-menu.ts +++ b/src/theme/select-menu.ts @@ -8,6 +8,15 @@ export default (options: Required) => { input: 'border-b border-default', focusScope: 'flex flex-col min-h-0', content: (content: string) => [content, 'origin-(--reka-combobox-content-transform-origin) w-(--reka-combobox-trigger-width)'] - } + }, + compoundVariants: (prev: Record[]) => prev.map(item => ({ + ...item, + class: typeof item.class === 'string' ? replaceFocus(item.class) : item.class + })) }, select(options)) } + +function replaceFocus(str: string): string { + return str + .replace(/focus:/g, 'focus-visible:') +} diff --git a/src/theme/select.ts b/src/theme/select.ts index 8980bb4041..b59fb15a67 100644 --- a/src/theme/select.ts +++ b/src/theme/select.ts @@ -81,6 +81,15 @@ export default (options: Required) => { empty: 'p-2 text-base' } } - } + }, + compoundVariants: (prev: Record[]) => prev.map(item => ({ + ...item, + class: typeof item.class === 'string' ? replaceFocus(item.class) : item.class + })) }, input(options)) } + +function replaceFocus(str: string): string { + return str + .replace(/focus-visible:/g, 'focus:') +} diff --git a/test/components/__snapshots__/Select-vue.spec.ts.snap b/test/components/__snapshots__/Select-vue.spec.ts.snap index 5ad87eb80f..b27a651e65 100644 --- a/test/components/__snapshots__/Select-vue.spec.ts.snap +++ b/test/components/__snapshots__/Select-vue.spec.ts.snap @@ -1,7 +1,7 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`Select > renders with ariaLabel correctly 1`] = ` -" @@ -28,7 +28,7 @@ exports[`Select > renders with ariaLabel correctly 1`] = ` `; exports[`Select > renders with arrow correctly 1`] = ` -" @@ -54,28 +54,28 @@ exports[`Select > renders with arrow correctly 1`] = ` `; exports[`Select > renders with avatar and leadingIcon correctly 1`] = ` -" +" " `; exports[`Select > renders with avatar and trailingIcon correctly 1`] = ` -" +" " `; exports[`Select > renders with avatar correctly 1`] = ` -" +" " `; exports[`Select > renders with class correctly 1`] = ` -" @@ -102,7 +102,7 @@ exports[`Select > renders with class correctly 1`] = ` `; exports[`Select > renders with defaultValue correctly 1`] = ` -" @@ -129,7 +129,7 @@ exports[`Select > renders with defaultValue correctly 1`] = ` `; exports[`Select > renders with disabled correctly 1`] = ` -" @@ -156,14 +156,14 @@ exports[`Select > renders with disabled correctly 1`] = ` `; exports[`Select > renders with icon correctly 1`] = ` -" +" " `; exports[`Select > renders with id correctly 1`] = ` -" @@ -190,7 +190,7 @@ exports[`Select > renders with id correctly 1`] = ` `; exports[`Select > renders with item slot correctly 1`] = ` -" @@ -217,7 +217,7 @@ exports[`Select > renders with item slot correctly 1`] = ` `; exports[`Select > renders with item-label slot correctly 1`] = ` -" @@ -244,7 +244,7 @@ exports[`Select > renders with item-label slot correctly 1`] = ` `; exports[`Select > renders with item-leading slot correctly 1`] = ` -" @@ -271,7 +271,7 @@ exports[`Select > renders with item-leading slot correctly 1`] = ` `; exports[`Select > renders with item-trailing slot correctly 1`] = ` -" @@ -298,7 +298,7 @@ exports[`Select > renders with item-trailing slot correctly 1`] = ` `; exports[`Select > renders with items correctly 1`] = ` -" @@ -325,7 +325,7 @@ exports[`Select > renders with items correctly 1`] = ` `; exports[`Select > renders with labelKey correctly 1`] = ` -" @@ -352,14 +352,14 @@ exports[`Select > renders with labelKey correctly 1`] = ` `; exports[`Select > renders with leading and icon correctly 1`] = ` -" +" " `; exports[`Select > renders with leading slot correctly 1`] = ` -" +" @@ -384,35 +384,35 @@ exports[`Select > renders with leading slot correctly 1`] = ` `; exports[`Select > renders with leadingIcon correctly 1`] = ` -" +" " `; exports[`Select > renders with loading and avatar correctly 1`] = ` -" +" " `; exports[`Select > renders with loading correctly 1`] = ` -" +" " `; exports[`Select > renders with loading trailing and avatar correctly 1`] = ` -" +" " `; exports[`Select > renders with loading trailing correctly 1`] = ` -" @@ -421,14 +421,14 @@ exports[`Select > renders with loading trailing correctly 1`] = ` `; exports[`Select > renders with loadingIcon correctly 1`] = ` -" +" " `; exports[`Select > renders with modelValue correctly 1`] = ` -" @@ -455,7 +455,7 @@ exports[`Select > renders with modelValue correctly 1`] = ` `; exports[`Select > renders with multiple and modelValue correctly 1`] = ` -" @@ -482,7 +482,7 @@ exports[`Select > renders with multiple and modelValue correctly 1`] = ` `; exports[`Select > renders with multiple correctly 1`] = ` -" @@ -509,7 +509,7 @@ exports[`Select > renders with multiple correctly 1`] = ` `; exports[`Select > renders with name correctly 1`] = ` -" @@ -590,7 +590,7 @@ exports[`Select > renders with neutral variant none correctly 1`] = ` `; exports[`Select > renders with neutral variant outline correctly 1`] = ` -" @@ -644,7 +644,7 @@ exports[`Select > renders with neutral variant soft correctly 1`] = ` `; exports[`Select > renders with neutral variant subtle correctly 1`] = ` -" @@ -671,7 +671,7 @@ exports[`Select > renders with neutral variant subtle correctly 1`] = ` `; exports[`Select > renders with placeholder correctly 1`] = ` -" @@ -752,7 +752,7 @@ exports[`Select > renders with primary variant none correctly 1`] = ` `; exports[`Select > renders with primary variant outline correctly 1`] = ` -" @@ -806,7 +806,7 @@ exports[`Select > renders with primary variant soft correctly 1`] = ` `; exports[`Select > renders with primary variant subtle correctly 1`] = ` -" @@ -833,7 +833,7 @@ exports[`Select > renders with primary variant subtle correctly 1`] = ` `; exports[`Select > renders with required correctly 1`] = ` -" @@ -860,7 +860,7 @@ exports[`Select > renders with required correctly 1`] = ` `; exports[`Select > renders with selectedIcon correctly 1`] = ` -" @@ -887,7 +887,7 @@ exports[`Select > renders with selectedIcon correctly 1`] = ` `; exports[`Select > renders with size lg correctly 1`] = ` -" @@ -914,7 +914,7 @@ exports[`Select > renders with size lg correctly 1`] = ` `; exports[`Select > renders with size md correctly 1`] = ` -" @@ -941,7 +941,7 @@ exports[`Select > renders with size md correctly 1`] = ` `; exports[`Select > renders with size sm correctly 1`] = ` -" @@ -968,7 +968,7 @@ exports[`Select > renders with size sm correctly 1`] = ` `; exports[`Select > renders with size xl correctly 1`] = ` -" @@ -995,7 +995,7 @@ exports[`Select > renders with size xl correctly 1`] = ` `; exports[`Select > renders with size xs correctly 1`] = ` -" @@ -1022,7 +1022,7 @@ exports[`Select > renders with size xs correctly 1`] = ` `; exports[`Select > renders with trailing and icon correctly 1`] = ` -" @@ -1031,7 +1031,7 @@ exports[`Select > renders with trailing and icon correctly 1`] = ` `; exports[`Select > renders with trailing slot correctly 1`] = ` -" @@ -1058,7 +1058,7 @@ exports[`Select > renders with trailing slot correctly 1`] = ` `; exports[`Select > renders with trailingIcon correctly 1`] = ` -" @@ -1067,7 +1067,7 @@ exports[`Select > renders with trailingIcon correctly 1`] = ` `; exports[`Select > renders with trailingIcon correctly 2`] = ` -" @@ -1094,7 +1094,7 @@ exports[`Select > renders with trailingIcon correctly 2`] = ` `; exports[`Select > renders with ui correctly 1`] = ` -" @@ -1121,7 +1121,7 @@ exports[`Select > renders with ui correctly 1`] = ` `; exports[`Select > renders with valueKey correctly 1`] = ` -" diff --git a/test/components/__snapshots__/Select.spec.ts.snap b/test/components/__snapshots__/Select.spec.ts.snap index ffbf32ce17..d4da9a2f4a 100644 --- a/test/components/__snapshots__/Select.spec.ts.snap +++ b/test/components/__snapshots__/Select.spec.ts.snap @@ -1,7 +1,7 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`Select > renders with ariaLabel correctly 1`] = ` -" @@ -28,7 +28,7 @@ exports[`Select > renders with ariaLabel correctly 1`] = ` `; exports[`Select > renders with arrow correctly 1`] = ` -" @@ -54,28 +54,28 @@ exports[`Select > renders with arrow correctly 1`] = ` `; exports[`Select > renders with avatar and leadingIcon correctly 1`] = ` -" +" " `; exports[`Select > renders with avatar and trailingIcon correctly 1`] = ` -" +" " `; exports[`Select > renders with avatar correctly 1`] = ` -" +" " `; exports[`Select > renders with class correctly 1`] = ` -" @@ -102,7 +102,7 @@ exports[`Select > renders with class correctly 1`] = ` `; exports[`Select > renders with defaultValue correctly 1`] = ` -" @@ -129,7 +129,7 @@ exports[`Select > renders with defaultValue correctly 1`] = ` `; exports[`Select > renders with disabled correctly 1`] = ` -" @@ -156,14 +156,14 @@ exports[`Select > renders with disabled correctly 1`] = ` `; exports[`Select > renders with icon correctly 1`] = ` -" +" " `; exports[`Select > renders with id correctly 1`] = ` -" @@ -190,7 +190,7 @@ exports[`Select > renders with id correctly 1`] = ` `; exports[`Select > renders with item slot correctly 1`] = ` -" @@ -217,7 +217,7 @@ exports[`Select > renders with item slot correctly 1`] = ` `; exports[`Select > renders with item-label slot correctly 1`] = ` -" @@ -244,7 +244,7 @@ exports[`Select > renders with item-label slot correctly 1`] = ` `; exports[`Select > renders with item-leading slot correctly 1`] = ` -" @@ -271,7 +271,7 @@ exports[`Select > renders with item-leading slot correctly 1`] = ` `; exports[`Select > renders with item-trailing slot correctly 1`] = ` -" @@ -298,7 +298,7 @@ exports[`Select > renders with item-trailing slot correctly 1`] = ` `; exports[`Select > renders with items correctly 1`] = ` -" @@ -325,7 +325,7 @@ exports[`Select > renders with items correctly 1`] = ` `; exports[`Select > renders with labelKey correctly 1`] = ` -" @@ -352,14 +352,14 @@ exports[`Select > renders with labelKey correctly 1`] = ` `; exports[`Select > renders with leading and icon correctly 1`] = ` -" +" " `; exports[`Select > renders with leading slot correctly 1`] = ` -" +" @@ -384,35 +384,35 @@ exports[`Select > renders with leading slot correctly 1`] = ` `; exports[`Select > renders with leadingIcon correctly 1`] = ` -" +" " `; exports[`Select > renders with loading and avatar correctly 1`] = ` -" +" " `; exports[`Select > renders with loading correctly 1`] = ` -" +" " `; exports[`Select > renders with loading trailing and avatar correctly 1`] = ` -" +" " `; exports[`Select > renders with loading trailing correctly 1`] = ` -" @@ -421,14 +421,14 @@ exports[`Select > renders with loading trailing correctly 1`] = ` `; exports[`Select > renders with loadingIcon correctly 1`] = ` -" +" " `; exports[`Select > renders with modelValue correctly 1`] = ` -" @@ -455,7 +455,7 @@ exports[`Select > renders with modelValue correctly 1`] = ` `; exports[`Select > renders with multiple and modelValue correctly 1`] = ` -" @@ -482,7 +482,7 @@ exports[`Select > renders with multiple and modelValue correctly 1`] = ` `; exports[`Select > renders with multiple correctly 1`] = ` -" @@ -509,7 +509,7 @@ exports[`Select > renders with multiple correctly 1`] = ` `; exports[`Select > renders with name correctly 1`] = ` -" @@ -590,7 +590,7 @@ exports[`Select > renders with neutral variant none correctly 1`] = ` `; exports[`Select > renders with neutral variant outline correctly 1`] = ` -" @@ -644,7 +644,7 @@ exports[`Select > renders with neutral variant soft correctly 1`] = ` `; exports[`Select > renders with neutral variant subtle correctly 1`] = ` -" @@ -671,7 +671,7 @@ exports[`Select > renders with neutral variant subtle correctly 1`] = ` `; exports[`Select > renders with placeholder correctly 1`] = ` -" @@ -752,7 +752,7 @@ exports[`Select > renders with primary variant none correctly 1`] = ` `; exports[`Select > renders with primary variant outline correctly 1`] = ` -" @@ -806,7 +806,7 @@ exports[`Select > renders with primary variant soft correctly 1`] = ` `; exports[`Select > renders with primary variant subtle correctly 1`] = ` -" @@ -833,7 +833,7 @@ exports[`Select > renders with primary variant subtle correctly 1`] = ` `; exports[`Select > renders with required correctly 1`] = ` -" @@ -860,7 +860,7 @@ exports[`Select > renders with required correctly 1`] = ` `; exports[`Select > renders with selectedIcon correctly 1`] = ` -" @@ -887,7 +887,7 @@ exports[`Select > renders with selectedIcon correctly 1`] = ` `; exports[`Select > renders with size lg correctly 1`] = ` -" @@ -914,7 +914,7 @@ exports[`Select > renders with size lg correctly 1`] = ` `; exports[`Select > renders with size md correctly 1`] = ` -" @@ -941,7 +941,7 @@ exports[`Select > renders with size md correctly 1`] = ` `; exports[`Select > renders with size sm correctly 1`] = ` -" @@ -968,7 +968,7 @@ exports[`Select > renders with size sm correctly 1`] = ` `; exports[`Select > renders with size xl correctly 1`] = ` -" @@ -995,7 +995,7 @@ exports[`Select > renders with size xl correctly 1`] = ` `; exports[`Select > renders with size xs correctly 1`] = ` -" @@ -1022,7 +1022,7 @@ exports[`Select > renders with size xs correctly 1`] = ` `; exports[`Select > renders with trailing and icon correctly 1`] = ` -" @@ -1031,7 +1031,7 @@ exports[`Select > renders with trailing and icon correctly 1`] = ` `; exports[`Select > renders with trailing slot correctly 1`] = ` -" @@ -1058,7 +1058,7 @@ exports[`Select > renders with trailing slot correctly 1`] = ` `; exports[`Select > renders with trailingIcon correctly 1`] = ` -" @@ -1067,7 +1067,7 @@ exports[`Select > renders with trailingIcon correctly 1`] = ` `; exports[`Select > renders with trailingIcon correctly 2`] = ` -" @@ -1094,7 +1094,7 @@ exports[`Select > renders with trailingIcon correctly 2`] = ` `; exports[`Select > renders with ui correctly 1`] = ` -" @@ -1121,7 +1121,7 @@ exports[`Select > renders with ui correctly 1`] = ` `; exports[`Select > renders with valueKey correctly 1`] = ` -"