mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-11-09 05:26:24 +09:00
## Description - always use defaultValue and defaultChecked props when passing to react - expose value and checked as props, remove default* - reorder initial props to make more sense (name, value, checked - in this order) Affected components: Forms: - checkbox - radio - input - select - textarea Radix: - checkbox - radio group - select - switch ## Steps for reproduction 1. test each component named above how bound and unbound value/checked works 2. use in regular form and bind to url params 3. use in webhook form ## Code Review - [ ] hi @john, I need you to do - test it on preview ## Before requesting a review - [ ] made a self-review - [ ] added inline comments where things may be not obvious (the "why", not "what") ## Before merging - [ ] tested locally and on preview environment (preview dev login: 5de6) - [ ] updated [test cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md) document - [ ] added tests - [ ] if any new env variables are added, added them to `.env` file --------- Co-authored-by: Ivan Starkov <istarkov@gmail.com> Co-authored-by: Bogdan Chadkin <opensource@trysound.io>
71 lines
2.3 KiB
JSON
71 lines
2.3 KiB
JSON
{
|
|
"name": "@webstudio-is/sdk-components-react",
|
|
"version": "0.175.0",
|
|
"description": "Webstudio default library for react",
|
|
"author": "Webstudio <github@webstudio.is>",
|
|
"homepage": "https://webstudio.is",
|
|
"license": "AGPL-3.0-or-later",
|
|
"private": false,
|
|
"type": "module",
|
|
"sideEffects": false,
|
|
"files": [
|
|
"lib/*",
|
|
"!*.{test,stories}.*"
|
|
],
|
|
"exports": {
|
|
".": {
|
|
"webstudio": "./src/components.ts",
|
|
"types": "./lib/types/components.d.ts",
|
|
"import": "./lib/components.js"
|
|
},
|
|
"./metas": {
|
|
"webstudio": "./src/metas.ts",
|
|
"types": "./lib/types/metas.d.ts",
|
|
"import": "./lib/metas.js"
|
|
},
|
|
"./props": {
|
|
"webstudio": "./src/props.ts",
|
|
"types": "./lib/types/props.d.ts",
|
|
"import": "./lib/props.js"
|
|
},
|
|
"./hooks": {
|
|
"webstudio": "./src/hooks.ts",
|
|
"types": "./lib/types/hooks.d.ts",
|
|
"import": "./lib/hooks.js"
|
|
}
|
|
},
|
|
"scripts": {
|
|
"build": "rm -rf lib && esbuild src/components.ts src/metas.ts src/props.ts --outdir=lib --bundle --format=esm --packages=external",
|
|
"build:args": "NODE_OPTIONS=--conditions=webstudio generate-arg-types './src/*.tsx !./src/*.stories.tsx !./src/*.test.{ts,tsx} !./src/*.ws.ts' && prettier --write \"**/*.props.ts\"",
|
|
"dts": "tsc --project tsconfig.dts.json",
|
|
"test": "NODE_OPTIONS=--experimental-vm-modules jest",
|
|
"typecheck": "tsc"
|
|
},
|
|
"peerDependencies": {
|
|
"react": "18.3.0-canary-14898b6a9-20240318",
|
|
"react-dom": "18.3.0-canary-14898b6a9-20240318"
|
|
},
|
|
"dependencies": {
|
|
"@react-aria/utils": "^3.21.0",
|
|
"@webstudio-is/icons": "workspace:*",
|
|
"@webstudio-is/image": "workspace:*",
|
|
"@webstudio-is/react-sdk": "workspace:*",
|
|
"@webstudio-is/sdk": "workspace:*",
|
|
"colord": "^2.9.3",
|
|
"micromark": "^4.0.0"
|
|
},
|
|
"devDependencies": {
|
|
"@jest/globals": "^29.7.0",
|
|
"@testing-library/react": "^14.2.2",
|
|
"@types/react": "^18.2.70",
|
|
"@types/react-dom": "^18.2.25",
|
|
"@webstudio-is/generate-arg-types": "workspace:*",
|
|
"@webstudio-is/jest-config": "workspace:*",
|
|
"@webstudio-is/tsconfig": "workspace:*",
|
|
"jest-environment-jsdom": "^29.7.0",
|
|
"react": "18.3.0-canary-14898b6a9-20240318",
|
|
"react-dom": "18.3.0-canary-14898b6a9-20240318",
|
|
"typescript": "5.5.2"
|
|
}
|
|
}
|