@ark-ui/react 0.0.0-rc-20230323053839 → 0.0.0-rc-20230323110837
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/dialog/dialog.d.ts
CHANGED
|
@@ -3,6 +3,6 @@ import { type Assign } from '../types';
|
|
|
3
3
|
import { type DialogContext } from './dialog-context';
|
|
4
4
|
import { type UseDialogProps } from './use-dialog';
|
|
5
5
|
export type DialogProps = Assign<PropsWithChildren<UseDialogProps>, {
|
|
6
|
-
children?: ReactNode | ((
|
|
6
|
+
children?: ReactNode | ((props: DialogContext) => ReactNode);
|
|
7
7
|
}>;
|
|
8
8
|
export declare const Dialog: (props: DialogProps) => JSX.Element;
|
package/dist/tooltip/tooltip.cjs
CHANGED
|
@@ -3,13 +3,15 @@
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
5
|
const jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
const runIfFn = require('../run-if-fn.cjs');
|
|
6
7
|
const tooltipContext = require('./tooltip-context.cjs');
|
|
7
8
|
const useTooltip = require('./use-tooltip.cjs');
|
|
8
9
|
|
|
9
10
|
const Tooltip = (props) => {
|
|
10
11
|
const { children, ...useTooltipProps } = props;
|
|
11
12
|
const tooltip = useTooltip.useTooltip(useTooltipProps);
|
|
12
|
-
|
|
13
|
+
const view = runIfFn.runIfFn(children, tooltip);
|
|
14
|
+
return /* @__PURE__ */ jsxRuntime.jsx(tooltipContext.TooltipProvider, { value: tooltip, children: view });
|
|
13
15
|
};
|
|
14
16
|
|
|
15
17
|
exports.Tooltip = Tooltip;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import { type PropsWithChildren } from 'react';
|
|
1
|
+
import { type PropsWithChildren, type ReactNode } from 'react';
|
|
2
|
+
import type { Assign } from '../types';
|
|
3
|
+
import { type TooltipContext } from './tooltip-context';
|
|
2
4
|
import { type UseTooltipProps } from './use-tooltip';
|
|
3
|
-
export type TooltipProps = PropsWithChildren<UseTooltipProps
|
|
5
|
+
export type TooltipProps = Assign<PropsWithChildren<UseTooltipProps>, {
|
|
6
|
+
children?: ReactNode | ((props: TooltipContext) => ReactNode);
|
|
7
|
+
}>;
|
|
4
8
|
export declare const Tooltip: (props: TooltipProps) => JSX.Element;
|
package/dist/tooltip/tooltip.mjs
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { runIfFn } from '../run-if-fn.mjs';
|
|
2
3
|
import { TooltipProvider } from './tooltip-context.mjs';
|
|
3
4
|
import { useTooltip } from './use-tooltip.mjs';
|
|
4
5
|
|
|
5
6
|
const Tooltip = (props) => {
|
|
6
7
|
const { children, ...useTooltipProps } = props;
|
|
7
8
|
const tooltip = useTooltip(useTooltipProps);
|
|
8
|
-
|
|
9
|
+
const view = runIfFn(children, tooltip);
|
|
10
|
+
return /* @__PURE__ */ jsx(TooltipProvider, { value: tooltip, children: view });
|
|
9
11
|
};
|
|
10
12
|
|
|
11
13
|
export { Tooltip };
|