Skip to content

Commit

Permalink
fix(Tabs): add visible focus indicator on active tabs (#690)
Browse files Browse the repository at this point in the history
  • Loading branch information
HigherOrderLogic committed Sep 27, 2023
1 parent b306138 commit be734fc
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
},
"dependencies": {
"@egoist/tailwindcss-icons": "^1.1.0",
"@headlessui/tailwindcss": "^0.2.0",
"@headlessui/vue": "^1.7.16",
"@iconify-json/heroicons": "^1.1.12",
"@nuxt/kit": "^3.7.3",
Expand Down
12 changes: 12 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { defineNuxtModule, installModule, addComponentsDir, addImportsDir, creat
import defaultColors from 'tailwindcss/colors.js'
import { defaultExtractor as createDefaultExtractor } from 'tailwindcss/lib/lib/defaultExtractor.js'
import { iconsPlugin, getIconCollections } from '@egoist/tailwindcss-icons'
import headlessUiPlugin from '@headlessui/tailwindcss'
import { name, version } from '../package.json'
import { generateSafelist, excludeColors, customSafelistExtractor } from './colors'
import createTemplates from './templates'
Expand Down Expand Up @@ -135,6 +136,7 @@ export default defineNuxtModule<ModuleOptions>({

tailwindConfig.plugins = tailwindConfig.plugins || []
tailwindConfig.plugins.push(iconsPlugin({ collections: getIconCollections(options.icons as any[]) }))
tailwindConfig.plugins.push(headlessUiPlugin({}))
})

createTemplates(nuxt)
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/ui.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,7 @@ export const tabs = {
shadow: 'shadow-sm'
},
tab: {
base: 'relative inline-flex items-center justify-center flex-shrink-0 w-full whitespace-nowrap focus:outline-none disabled:cursor-not-allowed disabled:opacity-75 transition-colors duration-200 ease-out',
base: 'relative inline-flex items-center justify-center flex-shrink-0 w-full whitespace-nowrap ui-focus-visible:outline-0 ui-focus-visible:ring-2 ui-focus-visible:ring-primary-500 dark:ui-focus-visible:ring-primary-400 ui-not-focus-visible:outline-none focus:outline-none disabled:cursor-not-allowed disabled:opacity-75 transition-colors duration-200 ease-out',
background: '',
active: 'text-gray-900 dark:text-white',
inactive: 'text-gray-500 dark:text-gray-400',
Expand Down

1 comment on commit be734fc

@vercel
Copy link

@vercel vercel bot commented on be734fc Sep 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

ui – ./

ui.nuxt.com
ui-git-dev-nuxt-js.vercel.app
ui-nuxt-js.vercel.app

Please sign in to comment.