fix(tailwind-theme): remove default exports to fix comp w/ dui3 (#4730)

This commit is contained in:
Kristaps Fabians Geikins
2025-05-13 16:18:46 +03:00
committed by GitHub
parent a8ad4eeba0
commit c8b01ffd2a
6 changed files with 6 additions and 9 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
import speckleTheme from '@speckle/tailwind-theme'
import { plugin as speckleTheme } from '@speckle/tailwind-theme'
import { tailwindContentEntries as themeEntries } from '@speckle/tailwind-theme/tailwind-configure'
import { tailwindContentEntries as uiLibEntries } from '@speckle/ui-components/tailwind-configure'
import formsPlugin from '@tailwindcss/forms'
+1 -1
View File
@@ -5,7 +5,7 @@ Tailwind theme used in frontend 2 and other apps.
## Setup
1. Install the package
1. In your tailwind config import `@speckle/tailwind-theme` and `@tailwindcss/forms` and add them to your `plugins` array
1. In your tailwind config import `plugin` from `@speckle/tailwind-theme` and `@tailwindcss/forms` and add them to your `plugins` array
1. Import `tailwindContentEntries` from `@speckle/tailwind-theme/tailwind-configure` and invoke it in the `contents` field in your Tailwind config to ensure PurgeCSS is configured correctly. It requires the CJS `require` object as its only parameter. If it isn't available (in an ESM environment), you can use node's `createRequire()`.
## Development
-2
View File
@@ -1,4 +1,2 @@
import { darkThemeVariables, lightThemeVariables, plugin } from './plugin.js'
export default plugin
export { darkThemeVariables, lightThemeVariables, plugin }
+1 -2
View File
@@ -1,5 +1,5 @@
import buildPlugin from 'tailwindcss/plugin.js'
import preset from './preset.js'
import { config as preset } from './preset.js'
export const lightThemeVariables = {
/* used only as the page background */
@@ -385,5 +385,4 @@ const plugin = buildPlugin(({ addComponents, addBase }) => {
})
}, preset)
export default plugin
export { plugin }
+1 -1
View File
@@ -97,4 +97,4 @@ const config: Config = {
plugins: [FormsPlugin]
}
export default config
export { config }
+2 -2
View File
@@ -1,4 +1,4 @@
const speckleTheme = require('@speckle/tailwind-theme')
const { plugin: speckleTheme } = require('@speckle/tailwind-theme')
const { tailwindContentEntries } = require('@speckle/tailwind-theme/tailwind-configure')
const formsPlugin = require('@tailwindcss/forms')
@@ -10,5 +10,5 @@ module.exports = {
'./src/**/*.{js,ts,jsx,tsx,vue}',
...tailwindContentEntries()
],
plugins: [speckleTheme.default, formsPlugin]
plugins: [speckleTheme, formsPlugin]
}