@linzjs/lui 17.47.2 → 17.48.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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [17.48.0](https://github.com/linz/lui/compare/v17.47.2...v17.48.0) (2023-04-04)
2
+
3
+
4
+ ### Features
5
+
6
+ * allow tooltip to accept different types of content ([3542191](https://github.com/linz/lui/commit/3542191608525ed76c5ec039891192c725fd11e5))
7
+
1
8
  ## [17.47.2](https://github.com/linz/lui/compare/v17.47.1...v17.47.2) (2023-04-03)
2
9
 
3
10
 
@@ -1,9 +1,9 @@
1
1
  import { ReactNode } from 'react';
2
- import { Placement } from 'tippy.js';
2
+ import { Placement, Content } from 'tippy.js';
3
3
  import 'tippy.js/dist/border.css';
4
4
  import 'tippy.js/dist/tippy.css';
5
5
  export interface ILuiTooltipProperties {
6
- message: string;
6
+ message: Content;
7
7
  placement?: Placement;
8
8
  trigger?: string;
9
9
  children: ReactNode;
package/dist/index.js CHANGED
@@ -59804,9 +59804,6 @@ var getKey = function () { return id++; };
59804
59804
  var LuiTooltip = function (props) {
59805
59805
  var children = props.children, message = props.message, placement = props.placement, trigger = props.trigger, _a = props.animation, animation = _a === void 0 ? true : _a, _b = props.followCursor, followCursor$1 = _b === void 0 ? false : _b, _c = props.mode, mode = _c === void 0 ? 'default' : _c, _d = props.interactive, interactive = _d === void 0 ? false : _d, _e = props.allowHTML, allowHTML = _e === void 0 ? false : _e, _f = props.offset, offset = _f === void 0 ? [0, 18] : _f;
59806
59806
  var id = "LuiToolTip_".concat(React.useMemo(getKey, []));
59807
- if (typeof message !== 'string') {
59808
- throw new Error('LuiTooltip message must be a string!');
59809
- }
59810
59807
  React.useEffect(function () {
59811
59808
  tippy("#".concat(id), {
59812
59809
  content: message,