@luscii-healthtech/web-ui 62.0.0 → 62.0.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/dist/esm/components/Textarea/LabeledTextarea.js +3 -3
- package/dist/esm/components/Textarea/LabeledTextarea.js.map +1 -1
- package/dist/index.development.js +3 -3
- package/dist/index.development.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/src/components/Textarea/LabeledTextarea.d.ts +40 -3
- package/dist/src/generated/components/Textarea/LabeledTextarea.d.ts +40 -3
- package/dist/stories/LabeledTextarea.stories.d.ts +9 -2
- package/package.json +1 -1
|
@@ -8,14 +8,14 @@ import { HelperAndErrorText } from '../forms/shared/HelperAndErrorText.js';
|
|
|
8
8
|
import { LabelText } from '../forms/shared/LabelText.js';
|
|
9
9
|
import { Textarea } from './Textarea.js';
|
|
10
10
|
|
|
11
|
-
const LabeledTextarea =
|
|
12
|
-
const { className, helperText, errorText, label, width, fullWidth, id, "aria-describedby": ariaDescribedBy } = props, rest = __rest(props, ["className", "helperText", "errorText", "label", "width", "fullWidth", "id", "aria-describedby"]);
|
|
11
|
+
const LabeledTextarea = (props) => {
|
|
12
|
+
const { ref, className, helperText, errorText, label, width, fullWidth, id, "aria-describedby": ariaDescribedBy } = props, rest = __rest(props, ["ref", "className", "helperText", "errorText", "label", "width", "fullWidth", "id", "aria-describedby"]);
|
|
13
13
|
const generatedTextareaId = React__default.useId();
|
|
14
14
|
const textareaId = id || generatedTextareaId;
|
|
15
15
|
const helperErrorTextId = React__default.useId();
|
|
16
16
|
const fieldWidth = width !== null && width !== void 0 ? width : fullWidth ? "full" : void 0;
|
|
17
17
|
return jsxs(Stack, { _gap: "base", align: fieldWidth ? "stretch" : void 0, className: classNames(fieldWidth && calculateResponsiveWidthClasses(fieldWidth), className), children: [label && jsx(LabelText, { as: "label", htmlFor: textareaId, children: label }), jsx(Textarea, Object.assign({}, rest, { id: textareaId, ref, isError: Boolean(errorText), "aria-invalid": Boolean(errorText) || rest["aria-invalid"] || void 0, "aria-describedby": [ariaDescribedBy, helperErrorTextId].filter(Boolean).join(" ") })), jsx(HelperAndErrorText, { helperText, errorText, describingId: helperErrorTextId })] });
|
|
18
|
-
}
|
|
18
|
+
};
|
|
19
19
|
|
|
20
20
|
export { LabeledTextarea };
|
|
21
21
|
//# sourceMappingURL=LabeledTextarea.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LabeledTextarea.js","sources":["../../../../../../src/components/Textarea/LabeledTextarea.tsx"],"sourcesContent":[null],"names":["React","_jsxs","_jsx"],"mappings":";;;;;;;;;;AAyFO,MAAM,eAAA,
|
|
1
|
+
{"version":3,"file":"LabeledTextarea.js","sources":["../../../../../../src/components/Textarea/LabeledTextarea.tsx"],"sourcesContent":[null],"names":["React","_jsxs","_jsx"],"mappings":";;;;;;;;;;AAyFO,MAAM,eAAA,GAAkB,CAC7B,KAAA,KACE;AAIF,EAAA,MAAM,EACJ,GAAA,EACA,SAAA,EACA,UAAA,EACA,SAAA,EACA,KAAA,EACA,KAAA,EACA,SAAA,EACA,EAAA,EACA,kBAAA,EAAoB,eAAA,EAAe,GAEjC,KAAA,EADC,OAAI,MAAA,CACL,KAAA,EAXE,CAAA,KAAA,EAAA,WAAA,EAAA,YAAA,EAAA,WAAA,EAAA,OAAA,EAAA,OAAA,EAAA,WAAA,EAAA,IAAA,EAAA,kBAAA,CAWL,CAAA;AAED,EAAA,MAAM,mBAAA,GAAsBA,eAAM,KAAA;AAClC,EAAA,MAAM,aAAa,EAAA,IAAM,mBAAA;AACzB,EAAA,MAAM,iBAAA,GAAoBA,eAAM,KAAA;AAChC,EAAA,MAAM,aAAa,KAAA,aAAA,UAAK,MAAA,GAAL,KAAA,GAAU,YAAY,MAAA,GAAS,MAAA;AAQlD,EAAA,OACEC,KAAC,KAAA,IACC,IAAA,EAAK,MAAA,EACL,OAAO,UAAA,GAAa,SAAA,GAAY,MAAA,EAChC,SAAA,EAAW,WACT,UAAA,IAAc,+BAAA,CAAgC,UAAU,CAAA,EACxD,SAAS,CAAA,EACV,QAAA,EAAA,CAEA,KAAA,IACCC,IAAC,SAAA,EAAS,EAAC,EAAA,EAAG,OAAA,EAAQ,SAAS,UAAA,EAAU,QAAA,EACtC,KAAA,KAGLA,GAAA,CAAC,QAAA,EAAQ,OAAA,MAAA,CAAA,IACH,IAAA,EAAI,EACR,EAAA,EAAI,UAAA,EACJ,KACA,OAAA,EAAS,OAAA,CAAQ,SAAS,CAAA,EAAC,gBACb,OAAA,CAAQ,SAAS,CAAA,IAAK,IAAA,CAAK,cAAc,CAAA,IAAK,MAAA,EAAS,kBAAA,EACnD,CAAC,iBAAiB,iBAAiB,CAAA,CAClD,MAAA,CAAO,OAAO,EACd,IAAA,CAAK,GAAG,CAAA,EAAC,CAAA,CAAA,EAGdA,GAAA,CAAC,kBAAA,EAAkB,EACjB,YACA,SAAA,EACA,YAAA,EAAc,mBAAiB,CAC/B,GAAA,CAAA;AAGR;;"}
|
|
@@ -2811,14 +2811,14 @@ const Textarea = React__namespace.default.forwardRef((_a, ref) => {
|
|
|
2811
2811
|
]), style, ref }));
|
|
2812
2812
|
});
|
|
2813
2813
|
|
|
2814
|
-
const LabeledTextarea =
|
|
2815
|
-
const { className, helperText, errorText, label, width, fullWidth, id, "aria-describedby": ariaDescribedBy } = props, rest = __rest(props, ["className", "helperText", "errorText", "label", "width", "fullWidth", "id", "aria-describedby"]);
|
|
2814
|
+
const LabeledTextarea = (props) => {
|
|
2815
|
+
const { ref, className, helperText, errorText, label, width, fullWidth, id, "aria-describedby": ariaDescribedBy } = props, rest = __rest(props, ["ref", "className", "helperText", "errorText", "label", "width", "fullWidth", "id", "aria-describedby"]);
|
|
2816
2816
|
const generatedTextareaId = React__namespace.default.useId();
|
|
2817
2817
|
const textareaId = id || generatedTextareaId;
|
|
2818
2818
|
const helperErrorTextId = React__namespace.default.useId();
|
|
2819
2819
|
const fieldWidth = width !== null && width !== void 0 ? width : fullWidth ? "full" : void 0;
|
|
2820
2820
|
return jsxRuntime.jsxs(Stack, { _gap: "base", align: fieldWidth ? "stretch" : void 0, className: classNames__default.default(fieldWidth && calculateResponsiveWidthClasses(fieldWidth), className), children: [label && jsxRuntime.jsx(LabelText, { as: "label", htmlFor: textareaId, children: label }), jsxRuntime.jsx(Textarea, Object.assign({}, rest, { id: textareaId, ref, isError: Boolean(errorText), "aria-invalid": Boolean(errorText) || rest["aria-invalid"] || void 0, "aria-describedby": [ariaDescribedBy, helperErrorTextId].filter(Boolean).join(" ") })), jsxRuntime.jsx(HelperAndErrorText, { helperText, errorText, describingId: helperErrorTextId })] });
|
|
2821
|
-
}
|
|
2821
|
+
};
|
|
2822
2822
|
|
|
2823
2823
|
const Actions$1 = (props) => {
|
|
2824
2824
|
const { children, className } = props, rest = __rest(props, ["children", "className"]);
|