@vrobots/storybook 0.1.70 → 0.1.71

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vrobots/storybook",
3
3
  "private": false,
4
- "version": "0.1.70",
4
+ "version": "0.1.71",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -1,5 +1,6 @@
1
1
  export * from './ui/color-mode';
2
2
  export * from './ui/toaster';
3
+ export * from './ui/tooltip';
3
4
  export * from './Accordion';
4
5
  export * from './AvatarIconMenu';
5
6
  export * from './Breadcrumbs';
@@ -1,5 +1,6 @@
1
1
  export * from './ui/color-mode';
2
2
  export * from './ui/toaster';
3
+ export * from './ui/tooltip';
3
4
  export * from './Accordion';
4
5
  export * from './AvatarIconMenu';
5
6
  export * from './Breadcrumbs';
@@ -0,0 +1,11 @@
1
+ import { Tooltip as ChakraTooltip } from "@chakra-ui/react";
2
+ import * as React from "react";
3
+ export interface TooltipProps extends ChakraTooltip.RootProps {
4
+ showArrow?: boolean;
5
+ portalled?: boolean;
6
+ portalRef?: React.RefObject<HTMLElement | null>;
7
+ content: React.ReactNode;
8
+ contentProps?: ChakraTooltip.ContentProps;
9
+ disabled?: boolean;
10
+ }
11
+ export declare const Tooltip: React.ForwardRefExoticComponent<TooltipProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,9 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Tooltip as ChakraTooltip, Portal } from "@chakra-ui/react";
3
+ import * as React from "react";
4
+ export const Tooltip = React.forwardRef(function Tooltip(props, ref) {
5
+ const { showArrow, children, disabled, portalled = true, content, contentProps, portalRef, ...rest } = props;
6
+ if (disabled)
7
+ return children;
8
+ return (_jsxs(ChakraTooltip.Root, { ...rest, children: [_jsx(ChakraTooltip.Trigger, { asChild: true, children: children }), _jsx(Portal, { disabled: !portalled, container: portalRef, children: _jsx(ChakraTooltip.Positioner, { children: _jsxs(ChakraTooltip.Content, { ref: ref, ...contentProps, children: [showArrow && (_jsx(ChakraTooltip.Arrow, { children: _jsx(ChakraTooltip.ArrowTip, {}) })), content] }) }) })] }));
9
+ });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vrobots/storybook",
3
3
  "private": false,
4
- "version": "0.1.70",
4
+ "version": "0.1.71",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",