@luscii-healthtech/web-ui 54.5.2 → 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.
@@ -2122,6 +2122,8 @@ Modal.setAppElement = ReactModal__default.default.setAppElement;
2122
2122
  const Tag = (_a) => {
2123
2123
  var { _as = "span", _type = "neutral", _size = "large", _variant = "flat", _leadingIcon, _trailingIcon, _truncate, children, className } = _a, rest = __rest(_a, ["_as", "_type", "_size", "_variant", "_leadingIcon", "_trailingIcon", "_truncate", "children", "className"]);
2124
2124
  const isBordered = _variant === "bordered";
2125
+ const textVariant = _size === "small" ? "body-small-regular" : "body-base-regular";
2126
+ const fontWeightClass = isBordered ? _size === "small" ? "ui:font-[400]" : "ui:font-[500]" : _size === "small" ? "ui:font-[700]" : "ui:font-[600]";
2125
2127
  return jsxRuntime.jsxs(Stack, Object.assign({ as: _as, axis: "x", align: "center", borderRadius: "xxxxs", _gap: "s", className: classNames__default.default("ui:inline-flex", { "overflow-hidden": _truncate }, className, {
2126
2128
  [[
2127
2129
  "ui:bg-background-error-primary-default ui:text-text-error-primary-default",
@@ -2152,7 +2154,7 @@ const Tag = (_a) => {
2152
2154
  */
2153
2155
  "ui:px-f_base ui:py-f_s": _variant !== "bordered",
2154
2156
  "ui:border ui:px-[calc(var(--ui-semantic-spacing-base)-1px)] ui:py-[calc(var(--ui-semantic-spacing-s)-1px)]": _variant === "bordered"
2155
- }) }, rest, { children: [sizedIcon(_leadingIcon, { size: _size }), jsxRuntime.jsx(Text, { color: "current", variant: _size === "small" ? "body-small-regular" : "body-base-regular", truncate: _truncate, children }), sizedIcon(_trailingIcon, { size: _size })] }));
2157
+ }) }, rest, { children: [sizedIcon(_leadingIcon, { size: _size }), jsxRuntime.jsx(Text, { color: "current", variant: textVariant, className: fontWeightClass, truncate: _truncate, children }), sizedIcon(_trailingIcon, { size: _size })] }));
2156
2158
  };
2157
2159
  function sizedIcon(node, options) {
2158
2160
  const pixelSize = options.size === "small" ? 16 : 24;
@@ -2503,10 +2505,17 @@ function Label(props) {
2503
2505
  }
2504
2506
  const Checkbox = React__namespace.default.forwardRef((props, ref) => jsxRuntime.jsx(CheckboxInner, Object.assign({}, props, { innerRef: ref })));
2505
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(" ");
2506
2515
  const HelperAndErrorText = (props) => {
2507
2516
  const showHelperText = Boolean(props.helperText) && !props.errorText;
2508
2517
  if (showHelperText) {
2509
- 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 }) });
2510
2519
  }
2511
2520
  return jsxRuntime.jsx(Box, { id: props.describingId, children: props.errorText && jsxRuntime.jsx(Text, { variant: "sm", color: "red", children: props.errorText }) });
2512
2521
  };