@indico-data/design-system 3.6.3 → 3.6.4

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/lib/index.js CHANGED
@@ -43263,7 +43263,7 @@ function v4(options, buf, offset) {
43263
43263
  }
43264
43264
 
43265
43265
  const Truncate = (_a) => {
43266
- var { numLines = 1, truncateString, tooltipOptions = {} } = _a, rest = __rest(_a, ["numLines", "truncateString", "tooltipOptions"]);
43266
+ var { numLines = 1, tooltipOptions = {}, children } = _a, rest = __rest(_a, ["numLines", "tooltipOptions", "children"]);
43267
43267
  const [isTruncated, setIsTruncated] = React.useState(false);
43268
43268
  const id = React.useMemo(() => v4().replace(/[^a-zA-Z0-9-_]/g, '_'), []);
43269
43269
  const ref = React.useRef(null);
@@ -43289,7 +43289,7 @@ const Truncate = (_a) => {
43289
43289
  return (jsxRuntime.jsxs("div", { className: "truncate-wrapper", style: truncateStyle, children: [jsxRuntime.jsx("span", Object.assign({ ref: ref, "data-testid": `truncate-${id}-${isTruncated ? 'truncated' : 'not-truncated'}`, "data-tooltip-id": id, className: classNames('truncate', {
43290
43290
  'truncate--multi-line': numLines > 1,
43291
43291
  'truncate--single-line': numLines === 1,
43292
- }) }, rest, { children: truncateString })), isTruncated && truncateString && !tooltipOptions.disabled && (jsxRuntime.jsx(Tooltip, Object.assign({}, tooltipOptions, { id: id, children: truncateString })))] }));
43292
+ }) }, rest, { children: children })), isTruncated && children && !tooltipOptions.disabled && (jsxRuntime.jsx(Tooltip, Object.assign({}, tooltipOptions, { id: id, children: children })))] }));
43293
43293
  };
43294
43294
 
43295
43295
  function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}