aab23c9077
* 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
47 lines
1.1 KiB
JSON
47 lines
1.1 KiB
JSON
{
|
|
"name": "headlessui",
|
|
"version": "0.0.1",
|
|
"description": "Headless UI components for various libraries like React and Vue",
|
|
"main": "index.js",
|
|
"repository": "https://github.com/tailwindlabs/headlessui",
|
|
"license": "MIT",
|
|
"private": true,
|
|
"workspaces": [
|
|
"packages/*"
|
|
],
|
|
"scripts": {
|
|
"react": "yarn workspace @headlessui/react",
|
|
"vue": "yarn workspace @headlessui/vue",
|
|
"shared": "yarn workspace @headlessui/shared",
|
|
"build": "yarn workspaces run build",
|
|
"test": "./scripts/test.sh",
|
|
"lint": "./scripts/lint.sh"
|
|
},
|
|
"husky": {
|
|
"hooks": {
|
|
"pre-commit": "lint-staged"
|
|
}
|
|
},
|
|
"lint-staged": {
|
|
"*.{js,jsx,ts,tsx}": "tsdx lint"
|
|
},
|
|
"prettier": {
|
|
"printWidth": 100,
|
|
"semi": false,
|
|
"singleQuote": true,
|
|
"trailingComma": "es5"
|
|
},
|
|
"devDependencies": {
|
|
"@tailwindcss/ui": "^0.6.2",
|
|
"@testing-library/jest-dom": "^5.11.4",
|
|
"@types/node": "^14.11.10",
|
|
"husky": "^4.3.0",
|
|
"lint-staged": "^10.4.2",
|
|
"prismjs": "^1.22.0",
|
|
"tailwindcss": "^1.9.4",
|
|
"tsdx": "^0.14.1",
|
|
"tslib": "^2.0.3",
|
|
"typescript": "^3.9.7"
|
|
}
|
|
}
|