Files
gniza4cp/whm/gniza4cp-whm/assets/node_modules/daisyui/index.js
shuki a162536585 Rename product from gniza to gniza4cp across entire codebase
- CLI binary: bin/gniza -> bin/gniza4cp
- Install path: /usr/local/gniza4cp/
- Config path: /etc/gniza4cp/
- Log path: /var/log/gniza4cp/
- WHM plugin: gniza4cp-whm/
- cPanel plugin: cpanel/gniza4cp/
- AdminBin: Gniza4cp::Restore
- Perl modules: Gniza4cpWHM::*, Gniza4cpCPanel::*
- DaisyUI theme: gniza4cp
- All internal references, branding, paths updated
- Git remote updated to gniza4cp repo
2026-03-05 21:03:30 +02:00

62 lines
1.9 KiB
JavaScript

const version = "5.5.19"
import { pluginOptionsHandler } from "./functions/pluginOptionsHandler.js"
import { plugin } from "./functions/plugin.js"
import variables from "./functions/variables.js"
import themesObject from "./theme/object.js"
import { base, components, utilities } from "./imports.js"
export default plugin.withOptions(
(options) => {
return ({ addBase, addComponents, addUtilities, addVariant }) => {
const {
include,
exclude,
prefix = "",
} = pluginOptionsHandler(options, addBase, themesObject, version)
const shouldIncludeItem = (name) => {
if (include && exclude) {
return include.includes(name) && !exclude.includes(name)
}
if (include) {
return include.includes(name)
}
if (exclude) {
return !exclude.includes(name)
}
return true
}
Object.entries(base).forEach(([name, item]) => {
if (!shouldIncludeItem(name)) return
item({ addBase, prefix })
})
Object.entries(components).forEach(([name, item]) => {
if (!shouldIncludeItem(name)) return
item({ addComponents, prefix })
})
Object.entries(utilities).forEach(([name, item]) => {
if (!shouldIncludeItem(name)) return
item({ addUtilities, prefix })
})
// drawer variants. Can not be nested in layers so defined here
addVariant(
`${prefix}is-drawer-close`,
`&:where(.${prefix}drawer-toggle:not(:checked) ~ .${prefix}drawer-side, .${prefix}drawer-toggle:not(:checked) ~ .${prefix}drawer-side *)`,
)
addVariant(
`${prefix}is-drawer-open`,
`&:where(.${prefix}drawer-toggle:checked ~ .${prefix}drawer-side, .${prefix}drawer-toggle:checked ~ .${prefix}drawer-side *)`,
)
}
},
() => ({
theme: {
extend: variables,
},
}),
)