@khanacademy/wonder-blocks-form 7.0.2 → 7.1.1
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/CHANGELOG.md +559 -523
- package/LICENSE +21 -0
- package/dist/es/index.js +25 -24
- package/dist/index.js +25 -24
- package/package.json +13 -13
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2018 Khan Academy
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/es/index.js
CHANGED
|
@@ -365,28 +365,29 @@ const ChoiceInternal = React.forwardRef(function ChoiceInternal(props, ref) {
|
|
|
365
365
|
}, description);
|
|
366
366
|
};
|
|
367
367
|
const ChoiceCore = getChoiceCoreComponent();
|
|
368
|
-
return React.createElement(Id, {
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
368
|
+
return (React.createElement(Id, {
|
|
369
|
+
id: id
|
|
370
|
+
}, uniqueId => {
|
|
371
|
+
const descriptionId = description ? `${uniqueId}-description` : undefined;
|
|
372
|
+
return React.createElement(View, {
|
|
373
|
+
style: style,
|
|
374
|
+
className: className
|
|
375
|
+
}, React.createElement(View, {
|
|
376
|
+
style: styles$4.wrapper,
|
|
377
|
+
tabIndex: -1
|
|
378
|
+
}, React.createElement(ChoiceCore, _extends({}, coreProps, {
|
|
379
|
+
id: uniqueId,
|
|
380
|
+
checked: checked,
|
|
381
|
+
"aria-describedby": descriptionId,
|
|
382
|
+
onClick: handleClick,
|
|
383
|
+
disabled: disabled,
|
|
384
|
+
error: error,
|
|
385
|
+
ref: ref
|
|
386
|
+
})), React.createElement(Strut, {
|
|
387
|
+
size: spacing.xSmall_8
|
|
388
|
+
}), label && getLabel(uniqueId)), description && getDescription(descriptionId));
|
|
389
|
+
})
|
|
390
|
+
);
|
|
390
391
|
});
|
|
391
392
|
const styles$4 = StyleSheet.create({
|
|
392
393
|
wrapper: {
|
|
@@ -987,7 +988,7 @@ var labeledTextField = React.forwardRef((props, ref) => React.createElement(Labe
|
|
|
987
988
|
})));
|
|
988
989
|
|
|
989
990
|
const _excluded = ["onChange", "value", "placeholder", "disabled", "id", "testId", "style", "readOnly", "autoComplete", "name", "className", "autoFocus", "rows", "spellCheck", "wrap", "minLength", "maxLength", "onClick", "onKeyDown", "onKeyUp", "onFocus", "onBlur", "validate", "onValidate", "required", "resizeType", "rootStyle", "error", "instantValidation"];
|
|
990
|
-
const
|
|
991
|
+
const StyledTextarea = addStyle("textarea");
|
|
991
992
|
const TextArea = React.forwardRef(function TextArea(props, ref) {
|
|
992
993
|
const {
|
|
993
994
|
onChange,
|
|
@@ -1051,7 +1052,7 @@ const TextArea = React.forwardRef(function TextArea(props, ref) {
|
|
|
1051
1052
|
style: [{
|
|
1052
1053
|
width: "100%"
|
|
1053
1054
|
}, rootStyle]
|
|
1054
|
-
}, React.createElement(
|
|
1055
|
+
}, React.createElement(StyledTextarea, _extends({
|
|
1055
1056
|
id: uniqueId,
|
|
1056
1057
|
"data-testid": testId,
|
|
1057
1058
|
ref: ref,
|
package/dist/index.js
CHANGED
|
@@ -394,28 +394,29 @@ const ChoiceInternal = React__namespace.forwardRef(function ChoiceInternal(props
|
|
|
394
394
|
}, description);
|
|
395
395
|
};
|
|
396
396
|
const ChoiceCore = getChoiceCoreComponent();
|
|
397
|
-
return React__namespace.createElement(wonderBlocksCore.Id, {
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
397
|
+
return (React__namespace.createElement(wonderBlocksCore.Id, {
|
|
398
|
+
id: id
|
|
399
|
+
}, uniqueId => {
|
|
400
|
+
const descriptionId = description ? `${uniqueId}-description` : undefined;
|
|
401
|
+
return React__namespace.createElement(wonderBlocksCore.View, {
|
|
402
|
+
style: style,
|
|
403
|
+
className: className
|
|
404
|
+
}, React__namespace.createElement(wonderBlocksCore.View, {
|
|
405
|
+
style: styles$4.wrapper,
|
|
406
|
+
tabIndex: -1
|
|
407
|
+
}, React__namespace.createElement(ChoiceCore, _extends__default["default"]({}, coreProps, {
|
|
408
|
+
id: uniqueId,
|
|
409
|
+
checked: checked,
|
|
410
|
+
"aria-describedby": descriptionId,
|
|
411
|
+
onClick: handleClick,
|
|
412
|
+
disabled: disabled,
|
|
413
|
+
error: error,
|
|
414
|
+
ref: ref
|
|
415
|
+
})), React__namespace.createElement(wonderBlocksLayout.Strut, {
|
|
416
|
+
size: wonderBlocksTokens.spacing.xSmall_8
|
|
417
|
+
}), label && getLabel(uniqueId)), description && getDescription(descriptionId));
|
|
418
|
+
})
|
|
419
|
+
);
|
|
419
420
|
});
|
|
420
421
|
const styles$4 = aphrodite.StyleSheet.create({
|
|
421
422
|
wrapper: {
|
|
@@ -1016,7 +1017,7 @@ var labeledTextField = React__namespace.forwardRef((props, ref) => React__namesp
|
|
|
1016
1017
|
})));
|
|
1017
1018
|
|
|
1018
1019
|
const _excluded = ["onChange", "value", "placeholder", "disabled", "id", "testId", "style", "readOnly", "autoComplete", "name", "className", "autoFocus", "rows", "spellCheck", "wrap", "minLength", "maxLength", "onClick", "onKeyDown", "onKeyUp", "onFocus", "onBlur", "validate", "onValidate", "required", "resizeType", "rootStyle", "error", "instantValidation"];
|
|
1019
|
-
const
|
|
1020
|
+
const StyledTextarea = wonderBlocksCore.addStyle("textarea");
|
|
1020
1021
|
const TextArea = React__namespace.forwardRef(function TextArea(props, ref) {
|
|
1021
1022
|
const {
|
|
1022
1023
|
onChange,
|
|
@@ -1080,7 +1081,7 @@ const TextArea = React__namespace.forwardRef(function TextArea(props, ref) {
|
|
|
1080
1081
|
style: [{
|
|
1081
1082
|
width: "100%"
|
|
1082
1083
|
}, rootStyle]
|
|
1083
|
-
}, React__namespace.createElement(
|
|
1084
|
+
}, React__namespace.createElement(StyledTextarea, _extends__default["default"]({
|
|
1084
1085
|
id: uniqueId,
|
|
1085
1086
|
"data-testid": testId,
|
|
1086
1087
|
ref: ref,
|
package/package.json
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@khanacademy/wonder-blocks-form",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.1.1",
|
|
4
4
|
"design": "v1",
|
|
5
5
|
"description": "Form components for Wonder Blocks.",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/es/index.js",
|
|
8
8
|
"types": "dist/index.d.ts",
|
|
9
|
-
"scripts": {
|
|
10
|
-
"test": "echo \"Error: no test specified\" && exit 1",
|
|
11
|
-
"prepublishOnly": "../../utils/publish/package-pre-publish-check.sh"
|
|
12
|
-
},
|
|
13
9
|
"author": "",
|
|
14
10
|
"license": "MIT",
|
|
15
11
|
"publishConfig": {
|
|
16
12
|
"access": "public"
|
|
17
13
|
},
|
|
18
14
|
"dependencies": {
|
|
19
|
-
"@babel/runtime": "^7.
|
|
20
|
-
"@khanacademy/wonder-blocks-clickable": "
|
|
21
|
-
"@khanacademy/wonder-blocks-core": "
|
|
22
|
-
"@khanacademy/wonder-blocks-icon": "
|
|
23
|
-
"@khanacademy/wonder-blocks-layout": "
|
|
24
|
-
"@khanacademy/wonder-blocks-tokens": "
|
|
25
|
-
"@khanacademy/wonder-blocks-typography": "
|
|
15
|
+
"@babel/runtime": "^7.24.5",
|
|
16
|
+
"@khanacademy/wonder-blocks-clickable": "6.1.1",
|
|
17
|
+
"@khanacademy/wonder-blocks-core": "12.1.1",
|
|
18
|
+
"@khanacademy/wonder-blocks-icon": "5.1.1",
|
|
19
|
+
"@khanacademy/wonder-blocks-layout": "3.1.1",
|
|
20
|
+
"@khanacademy/wonder-blocks-tokens": "4.2.1",
|
|
21
|
+
"@khanacademy/wonder-blocks-typography": "3.1.1"
|
|
26
22
|
},
|
|
27
23
|
"peerDependencies": {
|
|
24
|
+
"@phosphor-icons/core": "^2.0.2",
|
|
28
25
|
"aphrodite": "^1.2.5",
|
|
29
26
|
"react": "18.2.0"
|
|
30
27
|
},
|
|
31
28
|
"devDependencies": {
|
|
32
|
-
"@khanacademy/wb-dev-build-settings": "
|
|
29
|
+
"@khanacademy/wb-dev-build-settings": "2.1.1"
|
|
30
|
+
},
|
|
31
|
+
"scripts": {
|
|
32
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
33
33
|
}
|
|
34
34
|
}
|