diff --git a/playground/pages/button.vue b/playground/pages/button.vue index 2bc5ab03..e17967b2 100644 --- a/playground/pages/button.vue +++ b/playground/pages/button.vue @@ -21,19 +21,11 @@ const variants = Object.keys(theme.variants.variant) Loading - - - Loading -
Loading - - - Loading -
diff --git a/src/theme/breadcrumb.ts b/src/theme/breadcrumb.ts index 2fd28152..d83d8b9c 100644 --- a/src/theme/breadcrumb.ts +++ b/src/theme/breadcrumb.ts @@ -33,7 +33,7 @@ export default { active: false, to: true, class: { - item: 'hover:text-gray-900 dark:hover:text-white' + item: 'hover:text-gray-900 dark:hover:text-white transition-colors' } }] } diff --git a/src/theme/button.ts b/src/theme/button.ts index 7771b96a..ae9708d0 100644 --- a/src/theme/button.ts +++ b/src/theme/button.ts @@ -2,7 +2,7 @@ import { buttonGroupVariant } from './button-group' export default (config: { colors: string[] }) => ({ slots: { - base: 'rounded-md font-medium inline-flex items-center focus:outline-none disabled:cursor-not-allowed disabled:opacity-75', + base: 'rounded-md font-medium inline-flex items-center focus:outline-none disabled:cursor-not-allowed disabled:opacity-75 transition-colors', label: '', leadingIcon: 'shrink-0', leadingAvatar: 'shrink-0', diff --git a/src/theme/command-palette.ts b/src/theme/command-palette.ts index 96dd0041..e3c0bc97 100644 --- a/src/theme/command-palette.ts +++ b/src/theme/command-palette.ts @@ -8,8 +8,8 @@ export default { group: 'p-1 isolate', empty: 'py-6 text-center text-sm', label: 'p-1.5 text-xs font-semibold text-gray-900 dark:text-white', - item: 'group relative w-full flex items-center gap-1.5 p-1.5 text-sm select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75 text-gray-700 dark:text-gray-200 data-highlighted:text-gray-900 dark:data-highlighted:text-white data-highlighted:before:bg-gray-50 dark:data-highlighted:before:bg-gray-800/50', - itemLeadingIcon: 'shrink-0 size-5 text-gray-400 dark:text-gray-500 group-data-highlighted:text-gray-700 dark:group-data-highlighted:text-gray-200', + item: 'group relative w-full flex items-center gap-1.5 p-1.5 text-sm select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75 text-gray-700 dark:text-gray-200 data-highlighted:text-gray-900 dark:data-highlighted:text-white data-highlighted:before:bg-gray-50 dark:data-highlighted:before:bg-gray-800/50 transition-colors before:transition-colors', + itemLeadingIcon: 'shrink-0 size-5 text-gray-400 dark:text-gray-500 group-data-highlighted:text-gray-700 dark:group-data-highlighted:text-gray-200 transition-colors', itemLeadingAvatar: 'shrink-0', itemLeadingChip: 'shrink-0 mx-1.5', itemTrailing: 'ms-auto inline-flex gap-1.5 items-center', diff --git a/src/theme/context-menu.ts b/src/theme/context-menu.ts index 8387fc09..926dd327 100644 --- a/src/theme/context-menu.ts +++ b/src/theme/context-menu.ts @@ -19,8 +19,8 @@ export default { itemLeadingIcon: 'text-gray-700 dark:text-gray-200' }, false: { - item: 'text-gray-700 dark:text-gray-200 data-highlighted:text-gray-900 dark:data-highlighted:text-white data-[state=open]:text-gray-900 dark:data-[state=open]:text-white data-highlighted:before:bg-gray-50 dark:data-highlighted:before:bg-gray-800/50 data-[state=open]:before:bg-gray-50 dark:data-[state=open]:before:bg-gray-800/50', - itemLeadingIcon: 'text-gray-400 dark:text-gray-500 group-data-highlighted:text-gray-700 dark:group-data-highlighted:text-gray-200 group-data-[state=open]:text-gray-700 dark:group-data-[state=open]:text-gray-200' + item: 'text-gray-700 dark:text-gray-200 data-highlighted:text-gray-900 dark:data-highlighted:text-white data-[state=open]:text-gray-900 dark:data-[state=open]:text-white data-highlighted:before:bg-gray-50 dark:data-highlighted:before:bg-gray-800/50 data-[state=open]:before:bg-gray-50 dark:data-[state=open]:before:bg-gray-800/50 transition-colors before:transition-colors', + itemLeadingIcon: 'text-gray-400 dark:text-gray-500 group-data-highlighted:text-gray-700 dark:group-data-highlighted:text-gray-200 group-data-[state=open]:text-gray-700 dark:group-data-[state=open]:text-gray-200 transition-colors' } } } diff --git a/src/theme/dropdown-menu.ts b/src/theme/dropdown-menu.ts index 99294b46..5fabf796 100644 --- a/src/theme/dropdown-menu.ts +++ b/src/theme/dropdown-menu.ts @@ -20,8 +20,8 @@ export default { itemLeadingIcon: 'text-gray-700 dark:text-gray-200' }, false: { - item: 'text-gray-700 dark:text-gray-200 data-highlighted:text-gray-900 dark:data-highlighted:text-white data-[state=open]:text-gray-900 dark:data-[state=open]:text-white data-highlighted:before:bg-gray-50 dark:data-highlighted:before:bg-gray-800/50 data-[state=open]:before:bg-gray-50 dark:data-[state=open]:before:bg-gray-800/50', - itemLeadingIcon: 'text-gray-400 dark:text-gray-500 group-data-highlighted:text-gray-700 dark:group-data-highlighted:text-gray-200 group-data-[state=open]:text-gray-700 dark:group-data-[state=open]:text-gray-200' + item: 'text-gray-700 dark:text-gray-200 data-highlighted:text-gray-900 dark:data-highlighted:text-white data-[state=open]:text-gray-900 dark:data-[state=open]:text-white data-highlighted:before:bg-gray-50 dark:data-highlighted:before:bg-gray-800/50 data-[state=open]:before:bg-gray-50 dark:data-[state=open]:before:bg-gray-800/50 transition-colors before:transition-colors', + itemLeadingIcon: 'text-gray-400 dark:text-gray-500 group-data-highlighted:text-gray-700 dark:group-data-highlighted:text-gray-200 group-data-[state=open]:text-gray-700 dark:group-data-[state=open]:text-gray-200 transition-colors' } } } diff --git a/src/theme/input-menu.ts b/src/theme/input-menu.ts index 59ed34ec..fb0bbdf3 100644 --- a/src/theme/input-menu.ts +++ b/src/theme/input-menu.ts @@ -11,8 +11,8 @@ export default (config: { colors: string[] }) => { empty: 'py-2 text-center text-sm text-gray-500 dark:text-gray-400', label: 'p-1.5 text-xs font-semibold text-gray-900 dark:text-white', separator: '-mx-1 my-1 h-px bg-gray-200 dark:bg-gray-800', - item: 'group relative w-full flex items-center gap-1.5 p-1.5 text-sm select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75 text-gray-700 dark:text-gray-200 data-highlighted:text-gray-900 dark:data-highlighted:text-white data-highlighted:before:bg-gray-50 dark:data-highlighted:before:bg-gray-800/50', - itemLeadingIcon: 'shrink-0 size-5 text-gray-400 dark:text-gray-500 group-data-highlighted:text-gray-700 dark:group-data-highlighted:text-gray-200', + item: 'group relative w-full flex items-center gap-1.5 p-1.5 text-sm select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75 text-gray-700 dark:text-gray-200 data-highlighted:text-gray-900 dark:data-highlighted:text-white data-highlighted:before:bg-gray-50 dark:data-highlighted:before:bg-gray-800/50 transition-colors before:transition-colors', + itemLeadingIcon: 'shrink-0 size-5 text-gray-400 dark:text-gray-500 group-data-highlighted:text-gray-700 dark:group-data-highlighted:text-gray-200 transition-colors', itemLeadingAvatar: 'shrink-0', itemLeadingChip: 'shrink-0 mx-1.5', itemTrailing: 'ms-auto inline-flex gap-1.5 items-center', diff --git a/src/theme/link.ts b/src/theme/link.ts index 25255262..240021e1 100644 --- a/src/theme/link.ts +++ b/src/theme/link.ts @@ -3,7 +3,7 @@ export default { variants: { active: { true: 'text-primary-500 dark:text-primary-400', - false: 'text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-200' + false: 'text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-200 transition-colors' }, disabled: { true: 'cursor-not-allowed opacity-75' diff --git a/src/theme/navigation-menu.ts b/src/theme/navigation-menu.ts index 3bbe63f5..b16c0a3e 100644 --- a/src/theme/navigation-menu.ts +++ b/src/theme/navigation-menu.ts @@ -16,7 +16,7 @@ export default { horizontal: { root: 'w-full items-center justify-between', list: 'flex items-center', - item: 'px-2.5 py-3.5 before:inset-x-0 before:inset-y-2 hover:before:bg-gray-50 dark:hover:before:bg-gray-800/50 after:absolute after:bottom-0 after:inset-x-2.5 after:block after:h-0.5 after:mt-2 after:rounded-full' + item: 'px-2.5 py-3.5 before:inset-x-0 before:inset-y-2 after:absolute after:bottom-0 after:inset-x-2.5 after:block after:h-0.5 after:mt-2 after:rounded-full' }, vertical: { root: 'flex-col', @@ -43,8 +43,8 @@ export default { disabled: false, active: false, class: { - item: 'hover:text-gray-900 dark:hover:text-white', - itemLeadingIcon: 'group-hover:text-gray-700 dark:group-hover:text-gray-200' + item: 'hover:text-gray-900 dark:hover:text-white transition-colors', + itemLeadingIcon: 'group-hover:text-gray-700 dark:group-hover:text-gray-200 transition-colors' } }, { orientation: 'horizontal', @@ -52,6 +52,12 @@ export default { class: { item: 'after:bg-primary-500 dark:after:bg-primary-400' } + }, { + orientation: 'horizontal', + disabled: false, + class: { + item: 'hover:before:bg-gray-50 dark:hover:before:bg-gray-800/50 before:transition-colors' + } }, { orientation: 'vertical', active: true, @@ -61,8 +67,9 @@ export default { }, { orientation: 'vertical', active: false, + disabled: false, class: { - item: 'hover:before:bg-gray-50 dark:hover:before:bg-gray-800/50' + item: 'hover:before:bg-gray-50 dark:hover:before:bg-gray-800/50 before:transition-colors' } }] } diff --git a/src/theme/select.ts b/src/theme/select.ts index b1eea5d7..eef4e455 100644 --- a/src/theme/select.ts +++ b/src/theme/select.ts @@ -11,8 +11,8 @@ export default (config: { colors: string[] }) => { empty: 'py-2 text-center text-sm text-gray-500 dark:text-gray-400', label: 'p-1.5 text-xs font-semibold text-gray-900 dark:text-white', separator: '-mx-1 my-1 h-px bg-gray-200 dark:bg-gray-800', - item: 'group relative w-full flex items-center gap-1.5 p-1.5 text-sm select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75 text-gray-700 dark:text-gray-200 data-highlighted:text-gray-900 dark:data-highlighted:text-white data-highlighted:before:bg-gray-50 dark:data-highlighted:before:bg-gray-800/50', - itemLeadingIcon: 'shrink-0 size-5 text-gray-400 dark:text-gray-500 group-data-highlighted:text-gray-700 dark:group-data-highlighted:text-gray-200', + item: 'group relative w-full flex items-center gap-1.5 p-1.5 text-sm select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75 text-gray-700 dark:text-gray-200 data-highlighted:text-gray-900 dark:data-highlighted:text-white data-highlighted:before:bg-gray-50 dark:data-highlighted:before:bg-gray-800/50 transition-colors before:transition-colors', + itemLeadingIcon: 'shrink-0 size-5 text-gray-400 dark:text-gray-500 group-data-highlighted:text-gray-700 dark:group-data-highlighted:text-gray-200 transition-colors', itemLeadingAvatar: 'shrink-0', itemLeadingChip: 'shrink-0 mx-1.5', itemTrailing: 'ms-auto inline-flex gap-1.5 items-center', diff --git a/test/components/__snapshots__/Breadcrumb.spec.ts.snap b/test/components/__snapshots__/Breadcrumb.spec.ts.snap index c57f035e..f6e8e4b8 100644 --- a/test/components/__snapshots__/Breadcrumb.spec.ts.snap +++ b/test/components/__snapshots__/Breadcrumb.spec.ts.snap @@ -3,7 +3,7 @@ exports[`Breadcrumb > renders with class correctly 1`] = ` "
    -
  1. Home
  2. +
  3. Home
  4. Navigation
  5. @@ -16,7 +16,7 @@ exports[`Breadcrumb > renders with class correctly 1`] = ` exports[`Breadcrumb > renders with custom slot correctly 1`] = ` "
      -
    1. Home
    2. +
    3. Home
    4. Navigation
    5. @@ -29,7 +29,7 @@ exports[`Breadcrumb > renders with custom slot correctly 1`] = ` exports[`Breadcrumb > renders with item slot correctly 1`] = ` "
        -
      1. Item slot
      2. +
      3. Item slot
      4. Item slot
      5. @@ -42,7 +42,7 @@ exports[`Breadcrumb > renders with item slot correctly 1`] = ` exports[`Breadcrumb > renders with item-label slot correctly 1`] = ` "
          -
        1. Item label slot
        2. +
        3. Item label slot
        4. Item label slot
        5. @@ -55,7 +55,7 @@ exports[`Breadcrumb > renders with item-label slot correctly 1`] = ` exports[`Breadcrumb > renders with item-leading slot correctly 1`] = ` "
            -
          1. Item leading slotHome
          2. +
          3. Item leading slotHome
          4. Item leading slotNavigation
          5. @@ -68,7 +68,7 @@ exports[`Breadcrumb > renders with item-leading slot correctly 1`] = ` exports[`Breadcrumb > renders with item-trailing slot correctly 1`] = ` "
              -
            1. HomeItem trailing slot
            2. +
            3. HomeItem trailing slot
            4. NavigationItem trailing slot
            5. @@ -81,7 +81,7 @@ exports[`Breadcrumb > renders with item-trailing slot correctly 1`] = ` exports[`Breadcrumb > renders with items correctly 1`] = ` "
                -
              1. Home
              2. +
              3. Home
              4. Navigation
              5. @@ -94,7 +94,7 @@ exports[`Breadcrumb > renders with items correctly 1`] = ` exports[`Breadcrumb > renders with separator slot correctly 1`] = ` "
                  -
                1. Home
                2. +
                3. Home
                4. Navigation
                5. @@ -107,7 +107,7 @@ exports[`Breadcrumb > renders with separator slot correctly 1`] = ` exports[`Breadcrumb > renders with separatorIcon correctly 1`] = ` "
                    -
                  1. Home
                  2. +
                  3. Home
                  4. Navigation
                  5. diff --git a/test/components/__snapshots__/Button.spec.ts.snap b/test/components/__snapshots__/Button.spec.ts.snap index d785b5b3..51467a9e 100644 --- a/test/components/__snapshots__/Button.spec.ts.snap +++ b/test/components/__snapshots__/Button.spec.ts.snap @@ -1,228 +1,228 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`Button > renders with block correctly 1`] = ` -"" `; -exports[`Button > renders with class correctly 1`] = `""`; +exports[`Button > renders with class correctly 1`] = `""`; exports[`Button > renders with color black correctly 1`] = ` -"" `; exports[`Button > renders with color gray correctly 1`] = ` -"" `; exports[`Button > renders with color green correctly 1`] = ` -"" `; exports[`Button > renders with color primary correctly 1`] = ` -"" `; exports[`Button > renders with color red correctly 1`] = ` -"" `; exports[`Button > renders with color white correctly 1`] = ` -"" `; exports[`Button > renders with default slot correctly 1`] = ` -"" `; exports[`Button > renders with disabled correctly 1`] = ` -"" `; exports[`Button > renders with icon correctly 1`] = ` -"" `; exports[`Button > renders with label correctly 1`] = ` -"" `; exports[`Button > renders with leading and icon correctly 1`] = ` -"" `; exports[`Button > renders with leading slot correctly 1`] = ` -"" `; exports[`Button > renders with leadingIcon correctly 1`] = ` -"" `; exports[`Button > renders with loading correctly 1`] = ` -"" `; exports[`Button > renders with loadingIcon correctly 1`] = ` -"" `; exports[`Button > renders with size lg correctly 1`] = ` -"" `; exports[`Button > renders with size md correctly 1`] = ` -"" `; exports[`Button > renders with size sm correctly 1`] = ` -"" `; exports[`Button > renders with size xl correctly 1`] = ` -"" `; exports[`Button > renders with size xs correctly 1`] = ` -"" `; exports[`Button > renders with square correctly 1`] = ` -"" `; exports[`Button > renders with trailing and icon correctly 1`] = ` -"" `; exports[`Button > renders with trailing slot correctly 1`] = ` -"" `; exports[`Button > renders with trailingIcon correctly 1`] = ` -"" `; exports[`Button > renders with truncate correctly 1`] = ` -"" `; -exports[`Button > renders with ui correctly 1`] = `""`; +exports[`Button > renders with ui correctly 1`] = `""`; exports[`Button > renders with variant ghost correctly 1`] = ` -"" `; exports[`Button > renders with variant link correctly 1`] = ` -"" `; exports[`Button > renders with variant outline correctly 1`] = ` -"" `; exports[`Button > renders with variant soft correctly 1`] = ` -"" `; exports[`Button > renders with variant solid correctly 1`] = ` -"" `; exports[`Button > renders with variant subtle correctly 1`] = ` -"" diff --git a/test/components/__snapshots__/ButtonGroup.spec.ts.snap b/test/components/__snapshots__/ButtonGroup.spec.ts.snap index f52df280..3f66ed33 100644 --- a/test/components/__snapshots__/ButtonGroup.spec.ts.snap +++ b/test/components/__snapshots__/ButtonGroup.spec.ts.snap @@ -5,7 +5,7 @@ exports[`ButtonGroup > renders orientation vertical with default slot correctly
                    -
                  @@ -21,7 +21,7 @@ exports[`ButtonGroup > renders with default slot correctly 1`] = `
                  -
                @@ -33,7 +33,7 @@ exports[`ButtonGroup > renders with size lg correctly 1`] = `
                -
              @@ -45,7 +45,7 @@ exports[`ButtonGroup > renders with size md correctly 1`] = `
              -
            @@ -57,7 +57,7 @@ exports[`ButtonGroup > renders with size sm correctly 1`] = `
            -
          @@ -69,7 +69,7 @@ exports[`ButtonGroup > renders with size xl correctly 1`] = `
          -
        @@ -81,7 +81,7 @@ exports[`ButtonGroup > renders with size xs correctly 1`] = `
        -
      diff --git a/test/components/__snapshots__/CommandPalette.spec.ts.snap b/test/components/__snapshots__/CommandPalette.spec.ts.snap index b630e5a3..dab956a5 100644 --- a/test/components/__snapshots__/CommandPalette.spec.ts.snap +++ b/test/components/__snapshots__/CommandPalette.spec.ts.snap @@ -11,38 +11,38 @@ exports[`CommandPalette > renders with as correctly 1`] = `