Files
headlessui/packages/@headlessui-vue/package.json
T
Robin Malfait aab23c9077 feat: add render features + render strategy (#106)
* add unmount strategy to README (React)

* add unmount strategy to README (Vue)

* add different render features (React)

* use render features in Menu and Listbox (React)

* add different render features (Vue)

* use render features in Menu and Listbox (Vue)

* bump dependencies

* add ability to change the ref property using `refName`

Example use case:

```tsx
// Some components have this API with an `innerRef`. The suggested approach is to use
// `React.forwardRef` so that you get the actual `ref` value. However if you already have this
// `innerRef` API than we can use the `refName="innerRef"` to give the `ref` prop a good name. It
// defaults to `ref` so that it still works everywhere else.

function MyButton({ innerRef, ...props }) {
  return <button ref={innerRef} {...props} />
}

<Menu.Button as={MyButton} refName="innerRef" />
```

* small cleanup, move refs to props we control

* add tests for the render abstraction (Render)

+ use the unique __ symbol as a default value in the Props type for the
  omitable props.

* use render features in Transition (React)

* add/update Transition examples to also showcase the `unmount={false}` render strategy

* bump dependencies

* add example with nested unmount/hide transitions

* add unmount to Transition documentation
2020-10-18 15:34:05 +02:00

45 lines
1.1 KiB
JSON

{
"name": "@headlessui/vue",
"version": "0.2.0",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"module": "dist/headlessui.esm.js",
"license": "MIT",
"files": [
"dist"
],
"engines": {
"node": ">=10"
},
"repository": {
"type": "git",
"url": "git+https://github.com/tailwindlabs/headlessui.git",
"directory": "packages/@headlessui-vue"
},
"publishConfig": {
"access": "public"
},
"scripts": {
"playground": "vite serve examples",
"playground:build": "NODE_ENV=production vite build examples",
"prepublishOnly": "npm run build",
"build": "../../scripts/build.sh",
"test": "../../scripts/test.sh",
"lint": "../../scripts/lint.sh"
},
"peerDependencies": {
"vue": "^3.0.0-rc.13"
},
"devDependencies": {
"@popperjs/core": "^2.5.3",
"@testing-library/vue": "^5.1.0",
"@types/debounce": "^1.2.0",
"@vue/compiler-sfc": "3.0.1",
"@vue/test-utils": "^2.0.0-beta.7",
"husky": "^4.3.0",
"vite": "^1.0.0-rc.4",
"vue": "^3.0.0-rc.13",
"vue-router": "^4.0.0-beta.13"
}
}