diff --git a/src/plugins/components/checkbox-headless.ts b/src/plugins/components/checkbox-headless.ts deleted file mode 100644 index a89caee..0000000 --- a/src/plugins/components/checkbox-headless.ts +++ /dev/null @@ -1,57 +0,0 @@ -import plugin from 'tailwindcss/plugin' -import { defu } from 'defu' -import { type PluginOption, defaultPluginOptions } from '../options' - -const defaultCheckboxHeadlessConfig = { - label: { - text: 'muted-400', - textSize: 'sm', - font: 'sans', - }, - input: { - size: 'full', - }, -} - -export default plugin.withOptions( - function (options: PluginOption) { - let { prefix } = defu(options, defaultPluginOptions) - - if (prefix) { - prefix = `${prefix}-` - } - - return function ({ addComponents, theme }) { - const config = theme( - 'shurikenUi.checkboxHeadless' - ) satisfies typeof defaultCheckboxHeadlessConfig - - addComponents({ - [`.${prefix}checkbox-headless`]: { - [`@apply relative`]: {}, - - [`.${prefix}checkbox-headless-label`]: { - [`@apply text-${config.label.text} mb-1 inline-block cursor-pointer select-none font-${config.label.font} text-${config.label.textSize}`]: - {}, - }, - [`.${prefix}checkbox-headless-inner`]: { - [`@apply relative`]: {}, - [`.${prefix}checkbox-headless-input`]: { - [`@apply absolute inset-0 z-20 h-${config.input.size} w-${config.input.size} cursor-pointer disabled:cursor-not-allowed opacity-0`]: - {}, - }, - }, - }, - }) - } - }, - function () { - return { - theme: { - shurikenUi: { - checkboxHeadless: defaultCheckboxHeadlessConfig, - }, - }, - } - } -) diff --git a/src/plugins/components/index.ts b/src/plugins/components/index.ts index 3c466e8..da9023e 100644 --- a/src/plugins/components/index.ts +++ b/src/plugins/components/index.ts @@ -13,7 +13,6 @@ import buttonIcon from './button-icon' import button from './button' import card from './card' import checkbox from './checkbox' -import checkboxHeadless from './checkbox-headless' import dropdownDivider from './dropdown-divider' import dropdownItem from './dropdown-item' import dropdown from './dropdown' @@ -41,7 +40,6 @@ import progressCircle from './progress-circle' import progress from './progress' import prose from './prose' import radio from './radio' -import radioHeadless from './radio-headless' import select from './select' import slimscroll from './slimscroll' import snack from './snack' @@ -70,7 +68,6 @@ const components = [ button, card, checkbox, - checkboxHeadless, dropdownDivider, dropdownItem, dropdown, @@ -98,7 +95,6 @@ const components = [ progress, prose, radio, - radioHeadless, select, slimscroll, snack, diff --git a/src/plugins/components/radio-headless.ts b/src/plugins/components/radio-headless.ts deleted file mode 100644 index d43bcf2..0000000 --- a/src/plugins/components/radio-headless.ts +++ /dev/null @@ -1,57 +0,0 @@ -import plugin from 'tailwindcss/plugin' -import { defu } from 'defu' -import { type PluginOption, defaultPluginOptions } from '../options' - -const defaultRadioHeadlessConfig = { - label: { - text: 'muted-400', - textSize: 'sm', - font: 'sans', - }, - input: { - size: 'full', - }, -} - -export default plugin.withOptions( - function (options: PluginOption) { - let { prefix } = defu(options, defaultPluginOptions) - - if (prefix) { - prefix = `${prefix}-` - } - - return function ({ addComponents, theme }) { - const config = theme( - 'shurikenUi.radioHeadless' - ) satisfies typeof defaultRadioHeadlessConfig - - addComponents({ - [`.${prefix}radio-headless`]: { - [`@apply relative`]: {}, - - [`.${prefix}radio-headless-label`]: { - [`@apply text-${config.label.text} mb-1 inline-block cursor-pointer select-none font-${config.label.font} text-${config.label.textSize}`]: - {}, - }, - [`.${prefix}radio-headless-inner`]: { - [`@apply relative`]: {}, - [`.${prefix}radio-headless-input`]: { - [`@apply absolute inset-0 z-20 h-${config.input.size} w-${config.input.size} cursor-pointer disabled:cursor-not-allowed opacity-0`]: - {}, - }, - }, - }, - }) - } - }, - function () { - return { - theme: { - shurikenUi: { - radioHeadless: defaultRadioHeadlessConfig, - }, - }, - } - } -)