@luscii-healthtech/web-ui 54.5.3 → 54.6.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/index.development.js +8 -1
- 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/Input/LabeledInput.d.ts +3 -0
- package/dist/src/components/forms/shared/HelperAndErrorText.d.ts +6 -0
- package/dist/src/generated/components/Input/LabeledInput.d.ts +3 -0
- package/dist/src/generated/components/forms/shared/HelperAndErrorText.d.ts +6 -0
- package/dist/stories/LabeledInput.stories.d.ts +9 -0
- package/dist/web-ui-tailwind.css +25 -0
- package/dist/web-ui.esm.js +1 -1
- package/dist/web-ui.esm.js.map +1 -1
- package/package.json +1 -1
|
@@ -2505,10 +2505,17 @@ function Label(props) {
|
|
|
2505
2505
|
}
|
|
2506
2506
|
const Checkbox = React__namespace.default.forwardRef((props, ref) => jsxRuntime.jsx(CheckboxInner, Object.assign({}, props, { innerRef: ref })));
|
|
2507
2507
|
|
|
2508
|
+
const linkClasses = [
|
|
2509
|
+
"ui:[&_a]:text-primary",
|
|
2510
|
+
"ui:[&_a]:cursor-pointer",
|
|
2511
|
+
"ui:[&_a:hover]:underline",
|
|
2512
|
+
"ui:[&_a:hover]:text-primary-dark",
|
|
2513
|
+
"ui:[&_a:focus]:outline-primary"
|
|
2514
|
+
].join(" ");
|
|
2508
2515
|
const HelperAndErrorText = (props) => {
|
|
2509
2516
|
const showHelperText = Boolean(props.helperText) && !props.errorText;
|
|
2510
2517
|
if (showHelperText) {
|
|
2511
|
-
return jsxRuntime.jsx(Box, { id: props.describingId, children: jsxRuntime.jsx(Text, { variant: "sm", color: "slate-500", children: props.helperText }) });
|
|
2518
|
+
return jsxRuntime.jsx(Box, { id: props.describingId, children: jsxRuntime.jsx(Text, { variant: "sm", color: "slate-500", containsDangerousHtml: typeof props.helperText === "string", className: linkClasses, children: props.helperText }) });
|
|
2512
2519
|
}
|
|
2513
2520
|
return jsxRuntime.jsx(Box, { id: props.describingId, children: props.errorText && jsxRuntime.jsx(Text, { variant: "sm", color: "red", children: props.errorText }) });
|
|
2514
2521
|
};
|