@react-spectrum/codemods 0.7.3 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/s1-to-s2/src/codemods/components/ColorField/transform.js +0 -3
- package/dist/s1-to-s2/src/codemods/components/ComboBox/transform.js +0 -3
- package/dist/s1-to-s2/src/codemods/components/SearchField/transform.js +0 -3
- package/dist/s1-to-s2/src/codemods/components/TextArea/transform.js +0 -3
- package/dist/s1-to-s2/src/codemods/components/TextField/transform.js +0 -3
- package/dist/s1-to-s2/src/codemods/shared/unsafeStyle.js +1 -0
- package/package.json +4 -4
|
@@ -5,15 +5,12 @@ const transforms_1 = require("../../shared/transforms");
|
|
|
5
5
|
/**
|
|
6
6
|
* Transforms ColorField:
|
|
7
7
|
* - Remove isQuiet (it is no longer supported in Spectrum 2).
|
|
8
|
-
* - Remove placeholder (it has been removed due to accessibility issues).
|
|
9
8
|
* - Change validationState="invalid" to isInvalid.
|
|
10
9
|
* - Remove validationState="valid" (it is no longer supported in Spectrum 2).
|
|
11
10
|
*/
|
|
12
11
|
function transformColorField(path) {
|
|
13
12
|
// Remove isQuiet
|
|
14
13
|
(0, transforms_1.removeProp)(path, { propName: 'isQuiet' });
|
|
15
|
-
// Remove placeholder
|
|
16
|
-
(0, transforms_1.removeProp)(path, { propName: 'placeholder' });
|
|
17
14
|
// Change validationState="invalid" to isInvalid
|
|
18
15
|
(0, transforms_1.updatePropNameAndValue)(path, {
|
|
19
16
|
oldPropName: 'validationState',
|
|
@@ -6,7 +6,6 @@ const transforms_1 = require("../../shared/transforms");
|
|
|
6
6
|
* Transforms ComboBox:
|
|
7
7
|
* - Change menuWidth value from a DimensionValue to a pixel value.
|
|
8
8
|
* - Remove isQuiet (it is no longer supported in Spectrum 2).
|
|
9
|
-
* - Remove placeholder (it is no longer supported in Spectrum 2).
|
|
10
9
|
* - Change validationState="invalid" to isInvalid.
|
|
11
10
|
* - Remove validationState="valid" (it is no longer supported in Spectrum 2).
|
|
12
11
|
*/
|
|
@@ -15,8 +14,6 @@ function transformComboBox(path) {
|
|
|
15
14
|
(0, transforms_1.convertDimensionValueToPx)(path, { propName: 'menuWidth' });
|
|
16
15
|
// Remove isQuiet
|
|
17
16
|
(0, transforms_1.removeProp)(path, { propName: 'isQuiet' });
|
|
18
|
-
// Remove placeholder
|
|
19
|
-
(0, transforms_1.removeProp)(path, { propName: 'placeholder' });
|
|
20
17
|
// Change validationState="invalid" to isInvalid
|
|
21
18
|
(0, transforms_1.updatePropNameAndValue)(path, {
|
|
22
19
|
oldPropName: 'validationState',
|
|
@@ -4,15 +4,12 @@ exports.default = transformSearchField;
|
|
|
4
4
|
const transforms_1 = require("../../shared/transforms");
|
|
5
5
|
/**
|
|
6
6
|
* Transforms SearchField:
|
|
7
|
-
* - Remove placeholder (it has been removed due to accessibility issues).
|
|
8
7
|
* - Comment out icon (it has not been implemented yet).
|
|
9
8
|
* - Remove isQuiet (it is no longer supported in Spectrum 2).
|
|
10
9
|
* - Change validationState="invalid" to isInvalid.
|
|
11
10
|
* - Remove validationState="valid" (it is no longer supported in Spectrum 2).
|
|
12
11
|
*/
|
|
13
12
|
function transformSearchField(path) {
|
|
14
|
-
// Remove placeholder
|
|
15
|
-
(0, transforms_1.removeProp)(path, { propName: 'placeholder' });
|
|
16
13
|
// Comment out icon
|
|
17
14
|
(0, transforms_1.commentOutProp)(path, { propName: 'icon' });
|
|
18
15
|
// Remove isQuiet
|
|
@@ -6,7 +6,6 @@ const transforms_1 = require("../../shared/transforms");
|
|
|
6
6
|
* Transforms TextArea:
|
|
7
7
|
* - Comment out icon (it has not been implemented yet).
|
|
8
8
|
* - Remove isQuiet (it is no longer supported in Spectrum 2).
|
|
9
|
-
* - Remove placeholder (it has been removed due to accessibility issues).
|
|
10
9
|
* - Change validationState="invalid" to isInvalid.
|
|
11
10
|
* - Remove validationState="valid" (it is no longer supported in Spectrum 2).
|
|
12
11
|
*/
|
|
@@ -15,8 +14,6 @@ function transformTextArea(path) {
|
|
|
15
14
|
(0, transforms_1.commentOutProp)(path, { propName: 'icon' });
|
|
16
15
|
// Remove isQuiet
|
|
17
16
|
(0, transforms_1.removeProp)(path, { propName: 'isQuiet' });
|
|
18
|
-
// Remove placeholder
|
|
19
|
-
(0, transforms_1.removeProp)(path, { propName: 'placeholder' });
|
|
20
17
|
// Change validationState="invalid" to isInvalid
|
|
21
18
|
(0, transforms_1.updatePropNameAndValue)(path, {
|
|
22
19
|
oldPropName: 'validationState',
|
|
@@ -6,7 +6,6 @@ const transforms_1 = require("../../shared/transforms");
|
|
|
6
6
|
* Transforms TextField:
|
|
7
7
|
* - Comment out icon (it has not been implemented yet).
|
|
8
8
|
* - Remove isQuiet (it is no longer supported in Spectrum 2).
|
|
9
|
-
* - Remove placeholder (it has been removed due to accessibility issues).
|
|
10
9
|
* - Change validationState="invalid" to isInvalid.
|
|
11
10
|
* - Remove validationState="valid" (it is no longer supported in Spectrum 2).
|
|
12
11
|
*/
|
|
@@ -15,8 +14,6 @@ function transformTextField(path) {
|
|
|
15
14
|
(0, transforms_1.commentOutProp)(path, { propName: 'icon' });
|
|
16
15
|
// Remove isQuiet
|
|
17
16
|
(0, transforms_1.removeProp)(path, { propName: 'isQuiet' });
|
|
18
|
-
// Remove placeholder
|
|
19
|
-
(0, transforms_1.removeProp)(path, { propName: 'placeholder' });
|
|
20
17
|
// Change validationState="invalid" to isInvalid
|
|
21
18
|
(0, transforms_1.updatePropNameAndValue)(path, {
|
|
22
19
|
oldPropName: 'validationState',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-spectrum/codemods",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"bin": "dist/index.js",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"@babel/parser": "^7.24.5",
|
|
25
25
|
"@babel/traverse": "^7.24.5",
|
|
26
26
|
"@babel/types": "^7.24.5",
|
|
27
|
-
"@react-spectrum/s2": "^0.
|
|
28
|
-
"@react-types/shared": "^3.32.
|
|
27
|
+
"@react-spectrum/s2": "^0.12.0",
|
|
28
|
+
"@react-types/shared": "^3.32.1",
|
|
29
29
|
"@types/node": "^22",
|
|
30
30
|
"boxen": "^5.1.2",
|
|
31
31
|
"build": "^0.1.4",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"publishConfig": {
|
|
51
51
|
"access": "public"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "0bda51183baa23306342af32a82012ea0fe0f2dc"
|
|
54
54
|
}
|