Files
headlessui/packages/@headlessui-tailwindcss/package.json
T
Robin Malfait 39c5bd3230 Add @headlessui/tailwindcss plugin (#1487)
* add `@headlessui/tailwindcss` plugin

* expose `data-headlessui-state="..."` data attribute

All components that expose boolean props in their render prop / v-slot
will receive a `data-headlessui-state="..."` attribute.

If it exposes boolean values but all are false, then there will be an
empty `data-headlessui-state=""`. If the current component is rendering
a `Fragment` then we don't expose those attributes.

* use tailwindcss in `playground-react` and `playground-vue`

We were using the CDN, but now that we have the
`@headlessui/tailwindcss` plugin, it's a bit easier to configure it
natively and import the plugin.

* ensure to build the `@headlessui/tailwindcss` package before starting the playground

* refactor `listbox` example to use the @headlessui/tailwindcss plugin

* update changelog

* bump Tailwind CSS to latest insiders version

* correctly generate types

* type `tailwind.config.js` files for playgrounds

* add todo for when `:has()` is available
2022-05-24 22:51:02 +02:00

45 lines
1.0 KiB
JSON

{
"name": "@headlessui/tailwindcss",
"version": "0.0.0",
"description": "A complementary Tailwind CSS plugin",
"main": "dist/index.cjs",
"types": "dist/index.d.ts",
"license": "MIT",
"files": [
"README.md",
"dist"
],
"exports": {
"require": "./dist/index.cjs"
},
"sideEffects": false,
"engines": {
"node": ">=10"
},
"repository": {
"type": "git",
"url": "git+https://github.com/tailwindlabs/headlessui.git",
"directory": "packages/@headlessui-tailwindcss"
},
"publishConfig": {
"access": "public"
},
"scripts": {
"prepublishOnly": "npm run build",
"build": "../../scripts/build.sh --external:tailwindcss && node ./scripts/fix-types.js",
"watch": "../../scripts/watch.sh --external:tailwindcss",
"test": "../../scripts/test.sh",
"lint": "../../scripts/lint.sh",
"clean": "rimraf ./dist"
},
"peerDependencies": {
"tailwindcss": "^3.0"
},
"devDependencies": {
"esbuild": "^0.11.18"
},
"dependencies": {
"tailwindcss": "^0.0.0-insiders.83b4811"
}
}