@linzjs/lui 17.49.0 → 17.49.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/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## [17.49.1](https://github.com/linz/lui/compare/v17.49.0...v17.49.1) (2023-04-04)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * do not use React's PropsWithChildren and make message optional so people can just use the standard Tippy property "content" ([a750a47](https://github.com/linz/lui/commit/a750a47a1f46079686ae0d186a3be0ccf87207f3))
7
+ * ensure backward compatibility ([ffbb5ab](https://github.com/linz/lui/commit/ffbb5ab631a3ae9aa5a01941d29ac5043409fe7b))
8
+ * style paragraphs in tooltip ([1d4d3ad](https://github.com/linz/lui/commit/1d4d3ad717cc2372c883d7a946c0a7a9d6e251e3))
9
+
1
10
  # [17.49.0](https://github.com/linz/lui/compare/v17.48.0...v17.49.0) (2023-04-04)
2
11
 
3
12
 
@@ -1,7 +1,7 @@
1
- import { PropsWithChildren } from 'react';
1
+ /// <reference types="react" />
2
2
  import { TippyProps } from '@tippyjs/react';
3
- export declare type ILuiTooltipProperties = PropsWithChildren<TippyProps> & {
4
- message: TippyProps['content'];
3
+ export declare type ILuiTooltipProperties = TippyProps & {
4
+ message?: TippyProps['content'];
5
5
  mode?: 'default' | 'info' | 'error';
6
6
  };
7
7
  export declare const LuiTooltip: (props: ILuiTooltipProperties) => JSX.Element;
package/dist/index.js CHANGED
@@ -60178,8 +60178,9 @@ var index = /*#__PURE__*/forwardRef( /*#__PURE__*/TippyGenerator(tippy));
60178
60178
  var Tippy = index;
60179
60179
 
60180
60180
  var LuiTooltip = function (props) {
60181
- var children = props.children, content = props.content, message = props.message, placement = props.placement, offset = props.offset, _a = props.mode, mode = _a === void 0 ? 'default' : _a, plugins = props.plugins, arrow = props.arrow, className = props.className, rest = __rest(props, ["children", "content", "message", "placement", "offset", "mode", "plugins", "arrow", "className"]);
60182
- var tippyProps = __assign(__assign({}, rest), { content: content !== null && content !== void 0 ? content : message, theme: mode, placement: placement !== null && placement !== void 0 ? placement : 'bottom', offset: offset !== null && offset !== void 0 ? offset : [0, 18], className: "LuiTooltip ".concat(className !== null && className !== void 0 ? className : ''), arrow: arrow !== null && arrow !== void 0 ? arrow : false, plugins: __spreadArray(__spreadArray([], (plugins || []), true), [followCursor], false) });
60181
+ var _a;
60182
+ var children = props.children, _b = props.content, content = _b === void 0 ? props.message : _b, _c = props.theme, theme = _c === void 0 ? (_a = props.mode) !== null && _a !== void 0 ? _a : 'default' : _c, _d = props.offset, offset = _d === void 0 ? [0, 18] : _d, _e = props.arrow, arrow = _e === void 0 ? false : _e, plugins = props.plugins, rest = __rest(props, ["children", "content", "theme", "offset", "arrow", "plugins"]);
60183
+ var tippyProps = __assign(__assign({}, rest), { content: content, theme: theme, offset: offset, arrow: arrow, plugins: __spreadArray(__spreadArray([], (plugins || []), true), [followCursor], false) });
60183
60184
  return React__default["default"].createElement(Tippy, __assign({}, tippyProps), children);
60184
60185
  };
60185
60186