@trackunit/react-form-components 0.0.40 → 0.0.43
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/index.cjs +2 -1
- package/index.js +2 -1
- package/package.json +2 -2
package/index.cjs
CHANGED
|
@@ -466,7 +466,8 @@ const NumberField = React.forwardRef((_a, ref) => {
|
|
|
466
466
|
*/
|
|
467
467
|
const OptionCard = React.forwardRef((_a, ref) => {
|
|
468
468
|
var { icon, heading, subheading, description, disabled, id, value, className, dataTestId } = _a, rest = __rest(_a, ["icon", "heading", "subheading", "description", "disabled", "id", "value", "className", "dataTestId"]);
|
|
469
|
-
|
|
469
|
+
const htmlForId = id !== null && id !== void 0 ? id : "option-card-" + uuid.v4();
|
|
470
|
+
return (jsxRuntime.jsxs(Container$3, Object.assign({ "data-testid": dataTestId }, { children: [jsxRuntime.jsx("input", Object.assign({ ref: ref, id: htmlForId, type: "radio", value: value, className: "hidden peer" }, rest)), jsxRuntime.jsxs(Label, Object.assign({ htmlFor: htmlForId, className: className, "$disabled": disabled }, { children: [disabled && icon && React.cloneElement(icon, { className: `${icon.props.className} text-secondary-400` }), !disabled && icon, heading && (jsxRuntime.jsx(reactComponents.Heading, Object.assign({ variant: "secondary", subtle: disabled }, { children: heading }))), (subheading || description) && (jsxRuntime.jsxs(Content, { children: [subheading && (jsxRuntime.jsx(reactComponents.Text, Object.assign({ weight: "thick", align: "center", subtle: disabled }, { children: subheading }))), description && (jsxRuntime.jsx(reactComponents.Text, Object.assign({ subtle: true, align: "center" }, { children: description })))] }))] }))] })));
|
|
470
471
|
});
|
|
471
472
|
const Container$3 = tailwindStyledComponents.tw.div `
|
|
472
473
|
contents
|
package/index.js
CHANGED
|
@@ -437,7 +437,8 @@ const NumberField = forwardRef((_a, ref) => {
|
|
|
437
437
|
*/
|
|
438
438
|
const OptionCard = forwardRef((_a, ref) => {
|
|
439
439
|
var { icon, heading, subheading, description, disabled, id, value, className, dataTestId } = _a, rest = __rest(_a, ["icon", "heading", "subheading", "description", "disabled", "id", "value", "className", "dataTestId"]);
|
|
440
|
-
|
|
440
|
+
const htmlForId = id !== null && id !== void 0 ? id : "option-card-" + v4();
|
|
441
|
+
return (jsxs(Container$3, Object.assign({ "data-testid": dataTestId }, { children: [jsx("input", Object.assign({ ref: ref, id: htmlForId, type: "radio", value: value, className: "hidden peer" }, rest)), jsxs(Label, Object.assign({ htmlFor: htmlForId, className: className, "$disabled": disabled }, { children: [disabled && icon && cloneElement(icon, { className: `${icon.props.className} text-secondary-400` }), !disabled && icon, heading && (jsx(Heading, Object.assign({ variant: "secondary", subtle: disabled }, { children: heading }))), (subheading || description) && (jsxs(Content, { children: [subheading && (jsx(Text, Object.assign({ weight: "thick", align: "center", subtle: disabled }, { children: subheading }))), description && (jsx(Text, Object.assign({ subtle: true, align: "center" }, { children: description })))] }))] }))] })));
|
|
441
442
|
});
|
|
442
443
|
const Container$3 = tw.div `
|
|
443
444
|
contents
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-form-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.43",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@trackunit/i18n-library-translation": "0.0.53",
|
|
8
|
-
"@trackunit/react-components": "0.1.
|
|
8
|
+
"@trackunit/react-components": "0.1.99",
|
|
9
9
|
"@trackunit/tailwind-styled-components": "0.0.56",
|
|
10
10
|
"date-fns": "2.29.3",
|
|
11
11
|
"libphonenumber-js": "1.10.30",
|