@ark-ui/solid 0.8.0 → 0.9.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 +16 -32
- package/accordion/accordion-context.d.ts +4 -21
- package/accordion/index.cjs +24 -0
- package/accordion/index.d.ts +2 -0
- package/accordion/index.mjs +7 -0
- package/accordion/use-accordion.d.ts +3 -11
- package/avatar/avatar-context.d.ts +4 -20
- package/avatar/index.cjs +20 -0
- package/avatar/index.d.ts +1 -0
- package/avatar/index.mjs +5 -0
- package/avatar/use-avatar.d.ts +3 -11
- package/carousel/carousel-context.d.ts +4 -59
- package/carousel/carousel-indicator-group.cjs +16 -0
- package/carousel/carousel-indicator-group.d.ts +4 -0
- package/carousel/carousel-indicator-group.mjs +12 -0
- package/carousel/carousel-indicator.cjs +18 -0
- package/carousel/carousel-indicator.d.ts +6 -0
- package/carousel/carousel-indicator.mjs +14 -0
- package/carousel/carousel-slide.d.ts +1 -1
- package/carousel/index.cjs +29 -0
- package/carousel/index.d.ts +3 -0
- package/carousel/index.mjs +11 -0
- package/carousel/use-carousel.d.ts +3 -31
- package/checkbox/checkbox-context.d.ts +4 -27
- package/checkbox/index.cjs +22 -0
- package/checkbox/index.d.ts +2 -1
- package/checkbox/index.mjs +6 -0
- package/checkbox/use-checkbox.d.ts +3 -15
- package/color-picker/color-picker-area-context.cjs +13 -0
- package/color-picker/color-picker-area-context.d.ts +3 -0
- package/color-picker/color-picker-area-context.mjs +8 -0
- package/color-picker/color-picker-area-gradient.cjs +18 -0
- package/color-picker/color-picker-area-gradient.d.ts +4 -0
- package/color-picker/color-picker-area-gradient.mjs +14 -0
- package/color-picker/color-picker-area-thumb.cjs +18 -0
- package/color-picker/color-picker-area-thumb.d.ts +4 -0
- package/color-picker/color-picker-area-thumb.mjs +14 -0
- package/color-picker/color-picker-area.cjs +24 -0
- package/color-picker/color-picker-area.d.ts +5 -0
- package/color-picker/color-picker-area.mjs +20 -0
- package/color-picker/color-picker-channel-input.cjs +18 -0
- package/color-picker/color-picker-channel-input.d.ts +6 -0
- package/color-picker/color-picker-channel-input.mjs +14 -0
- package/color-picker/color-picker-channel-slider-background.cjs +18 -0
- package/color-picker/color-picker-channel-slider-background.d.ts +4 -0
- package/color-picker/color-picker-channel-slider-background.mjs +14 -0
- package/color-picker/color-picker-channel-slider-context.cjs +13 -0
- package/color-picker/color-picker-channel-slider-context.d.ts +3 -0
- package/color-picker/color-picker-channel-slider-context.mjs +8 -0
- package/color-picker/color-picker-channel-slider-thumb.cjs +18 -0
- package/color-picker/color-picker-channel-slider-thumb.d.ts +4 -0
- package/color-picker/color-picker-channel-slider-thumb.mjs +14 -0
- package/color-picker/color-picker-channel-slider-track.cjs +24 -0
- package/color-picker/color-picker-channel-slider-track.d.ts +6 -0
- package/color-picker/color-picker-channel-slider-track.mjs +20 -0
- package/color-picker/color-picker-content.cjs +16 -0
- package/color-picker/color-picker-content.d.ts +4 -0
- package/color-picker/color-picker-content.mjs +12 -0
- package/color-picker/color-picker-context.cjs +13 -0
- package/color-picker/color-picker-context.d.ts +7 -0
- package/color-picker/color-picker-context.mjs +8 -0
- package/color-picker/color-picker-eye-dropper-trigger.cjs +16 -0
- package/color-picker/color-picker-eye-dropper-trigger.d.ts +4 -0
- package/color-picker/color-picker-eye-dropper-trigger.mjs +12 -0
- package/color-picker/color-picker-swatch-background.cjs +18 -0
- package/color-picker/color-picker-swatch-background.d.ts +4 -0
- package/color-picker/color-picker-swatch-background.mjs +14 -0
- package/color-picker/color-picker-swatch-context.cjs +13 -0
- package/color-picker/color-picker-swatch-context.d.ts +3 -0
- package/color-picker/color-picker-swatch-context.mjs +8 -0
- package/color-picker/color-picker-swatch-group.cjs +15 -0
- package/color-picker/color-picker-swatch-group.d.ts +4 -0
- package/color-picker/color-picker-swatch-group.mjs +11 -0
- package/color-picker/color-picker-swatch.cjs +28 -0
- package/color-picker/color-picker-swatch.d.ts +6 -0
- package/color-picker/color-picker-swatch.mjs +24 -0
- package/color-picker/color-picker.anatomy.cjs +11 -0
- package/color-picker/color-picker.anatomy.d.ts +3 -0
- package/color-picker/color-picker.anatomy.mjs +6 -0
- package/color-picker/color-picker.cjs +23 -0
- package/color-picker/color-picker.d.ts +8 -0
- package/color-picker/color-picker.mjs +19 -0
- package/color-picker/index.cjs +41 -0
- package/color-picker/index.d.ts +17 -0
- package/color-picker/index.mjs +17 -0
- package/color-picker/use-color-picker.cjs +36 -0
- package/color-picker/use-color-picker.d.ts +7 -0
- package/color-picker/use-color-picker.mjs +13 -0
- package/combobox/combobox-clear-trigger.cjs +16 -0
- package/combobox/combobox-clear-trigger.d.ts +4 -0
- package/combobox/combobox-clear-trigger.mjs +12 -0
- package/combobox/combobox-context.d.ts +4 -55
- package/combobox/combobox-option-group.cjs +16 -0
- package/combobox/combobox-option-group.d.ts +6 -0
- package/combobox/combobox-option-group.mjs +12 -0
- package/combobox/index.cjs +34 -0
- package/combobox/index.d.ts +3 -0
- package/combobox/index.mjs +12 -0
- package/combobox/use-combobox.d.ts +3 -28
- package/date-picker/date-picker-context.d.ts +4 -254
- package/date-picker/date-picker-grid.d.ts +1 -1
- package/date-picker/date-picker-view-trigger.d.ts +1 -1
- package/date-picker/index.cjs +59 -0
- package/date-picker/index.d.ts +3 -0
- package/date-picker/index.mjs +26 -0
- package/date-picker/use-date-picker.d.ts +3 -128
- package/dialog/dialog-context.d.ts +4 -24
- package/dialog/index.cjs +30 -0
- package/dialog/index.d.ts +1 -0
- package/dialog/index.mjs +10 -0
- package/dialog/use-dialog.d.ts +3 -13
- package/editable/editable-context.d.ts +4 -38
- package/editable/index.cjs +32 -0
- package/editable/index.d.ts +1 -0
- package/editable/index.mjs +11 -0
- package/editable/use-editable.d.ts +3 -20
- package/environment/environment-context.cjs +1 -0
- package/environment/environment-context.mjs +1 -0
- package/environment/index.cjs +11 -0
- package/environment/index.mjs +2 -0
- package/hover-card/hover-card-context.d.ts +4 -23
- package/hover-card/index.cjs +26 -0
- package/hover-card/index.d.ts +1 -0
- package/hover-card/index.mjs +8 -0
- package/hover-card/use-hover-card.d.ts +3 -12
- package/index.cjs +180 -108
- package/index.mjs +58 -22
- package/menu/index.cjs +40 -0
- package/menu/index.d.ts +1 -0
- package/menu/index.mjs +15 -0
- package/merge-style.cjs +2 -0
- package/merge-style.mjs +2 -0
- package/number-input/index.cjs +28 -0
- package/number-input/index.d.ts +1 -0
- package/number-input/index.mjs +9 -0
- package/number-input/number-input-context.d.ts +4 -44
- package/number-input/use-number-input.d.ts +3 -23
- package/package.json +50 -51
- package/pagination/index.cjs +25 -0
- package/pagination/index.d.ts +1 -0
- package/pagination/index.mjs +9 -0
- package/pagination/pagination-context.d.ts +4 -45
- package/pagination/pagination-ellipsis.d.ts +1 -1
- package/pagination/use-pagination.d.ts +3 -24
- package/pin-input/index.cjs +22 -0
- package/pin-input/index.d.ts +1 -0
- package/pin-input/index.mjs +6 -0
- package/pin-input/pin-input-context.d.ts +4 -32
- package/pin-input/use-pin-input.d.ts +3 -17
- package/popover/index.cjs +34 -0
- package/popover/index.d.ts +1 -0
- package/popover/index.mjs +12 -0
- package/popover/popover-context.d.ts +4 -33
- package/popover/use-popover.d.ts +3 -17
- package/pressable/index.cjs +11 -0
- package/pressable/index.mjs +2 -0
- package/pressable/use-pressable.d.ts +3 -5
- package/radio-group/index.cjs +28 -0
- package/radio-group/index.d.ts +2 -0
- package/radio-group/index.mjs +9 -0
- package/radio-group/radio-context.cjs +1 -0
- package/radio-group/radio-context.d.ts +11 -2
- package/radio-group/radio-context.mjs +1 -0
- package/radio-group/radio-group-context.d.ts +4 -49
- package/radio-group/use-radio-group.d.ts +3 -26
- package/range-slider/index.cjs +32 -0
- package/range-slider/index.d.ts +1 -0
- package/range-slider/index.mjs +11 -0
- package/range-slider/range-slider-context.d.ts +4 -58
- package/range-slider/use-range-slider.d.ts +3 -30
- package/rating-group/index.cjs +24 -0
- package/rating-group/index.d.ts +2 -0
- package/rating-group/index.mjs +7 -0
- package/rating-group/rating-context.cjs +1 -0
- package/rating-group/rating-context.mjs +1 -0
- package/rating-group/rating-group-context.d.ts +4 -31
- package/rating-group/use-rating-group.d.ts +3 -16
- package/segment-group/index.cjs +27 -0
- package/segment-group/index.d.ts +2 -0
- package/segment-group/index.mjs +10 -0
- package/segment-group/segment-context.cjs +1 -0
- package/segment-group/segment-context.d.ts +11 -2
- package/segment-group/segment-context.mjs +1 -0
- package/segment-group/segment-group-context.d.ts +4 -49
- package/segment-group/use-segment-group.d.ts +3 -26
- package/select/index.cjs +30 -0
- package/select/index.d.ts +1 -0
- package/select/index.mjs +10 -0
- package/select/select-context.d.ts +4 -50
- package/select/use-select.d.ts +3 -26
- package/slider/index.cjs +32 -0
- package/slider/index.d.ts +1 -0
- package/slider/index.mjs +11 -0
- package/slider/slider-context.d.ts +4 -48
- package/slider/use-slider.d.ts +3 -25
- package/splitter/index.cjs +20 -0
- package/splitter/index.d.ts +1 -0
- package/splitter/index.mjs +5 -0
- package/splitter/splitter-context.d.ts +4 -46
- package/splitter/use-splitter.d.ts +4 -25
- package/ssr-spread.cjs +1 -0
- package/ssr-spread.mjs +1 -0
- package/switch/index.cjs +24 -0
- package/switch/index.d.ts +1 -0
- package/switch/index.mjs +7 -0
- package/switch/switch-context.d.ts +4 -24
- package/switch/use-switch.d.ts +3 -13
- package/tabs/index.cjs +24 -0
- package/tabs/index.d.ts +1 -0
- package/tabs/index.mjs +7 -0
- package/tabs/tabs-context.d.ts +4 -29
- package/tabs/use-tabs.d.ts +3 -15
- package/tags-input/index.cjs +30 -0
- package/tags-input/index.d.ts +1 -0
- package/tags-input/index.mjs +10 -0
- package/tags-input/tags-input-context.d.ts +4 -49
- package/tags-input/use-tags-input.d.ts +3 -26
- package/toast/index.cjs +29 -0
- package/toast/index.d.ts +1 -0
- package/toast/index.mjs +9 -0
- package/toast/toast-item-context.d.ts +4 -35
- package/toast/toast.cjs +6 -1
- package/toast/toast.mjs +7 -2
- package/toast/use-toast-item.d.ts +3 -18
- package/tooltip/index.cjs +26 -0
- package/tooltip/index.d.ts +1 -0
- package/tooltip/index.mjs +8 -0
- package/tooltip/tooltip-context.d.ts +4 -33
- package/tooltip/use-tooltip.d.ts +3 -17
|
@@ -1,38 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { PropTypes } from '@zag-js/solid';
|
|
2
|
+
import type { PublicApi } from '@zag-js/toast';
|
|
3
|
+
import type { Accessor } from 'solid-js';
|
|
3
4
|
import type { ContextProviderComponent } from 'solid-js/types/reactive/signal';
|
|
4
5
|
import { type UseToastItemReturn } from './use-toast-item';
|
|
5
6
|
export type ToastItemContext = UseToastItemReturn;
|
|
6
|
-
export declare const ToastItemProvider: ContextProviderComponent<Accessor<
|
|
7
|
-
type: Type;
|
|
8
|
-
title: string | undefined;
|
|
9
|
-
description: string | undefined;
|
|
10
|
-
placement: Placement;
|
|
11
|
-
isVisible: boolean;
|
|
12
|
-
isPaused: boolean;
|
|
13
|
-
isRtl: boolean;
|
|
14
|
-
pause(): void;
|
|
15
|
-
resume(): void;
|
|
16
|
-
dismiss(): void;
|
|
17
|
-
render(): any;
|
|
18
|
-
rootProps: JSX.HTMLAttributes<any>;
|
|
19
|
-
titleProps: JSX.HTMLAttributes<any>;
|
|
20
|
-
descriptionProps: JSX.HTMLAttributes<any>;
|
|
21
|
-
closeTriggerProps: JSX.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
22
|
-
}>>, useToastItemContext: () => Accessor<{
|
|
23
|
-
type: Type;
|
|
24
|
-
title: string | undefined;
|
|
25
|
-
description: string | undefined;
|
|
26
|
-
placement: Placement;
|
|
27
|
-
isVisible: boolean;
|
|
28
|
-
isPaused: boolean;
|
|
29
|
-
isRtl: boolean;
|
|
30
|
-
pause(): void;
|
|
31
|
-
resume(): void;
|
|
32
|
-
dismiss(): void;
|
|
33
|
-
render(): any;
|
|
34
|
-
rootProps: JSX.HTMLAttributes<any>;
|
|
35
|
-
titleProps: JSX.HTMLAttributes<any>;
|
|
36
|
-
descriptionProps: JSX.HTMLAttributes<any>;
|
|
37
|
-
closeTriggerProps: JSX.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
38
|
-
}>;
|
|
7
|
+
export declare const ToastItemProvider: ContextProviderComponent<Accessor<PublicApi<PropTypes>>>, useToastItemContext: () => Accessor<PublicApi<PropTypes>>;
|
package/toast/toast.cjs
CHANGED
|
@@ -13,10 +13,15 @@ const Toast = props => {
|
|
|
13
13
|
const [toastParams, localProps] = createSplitProps.createSplitProps()(props, ['toast']);
|
|
14
14
|
const api = useToastItem.useToastItem(toastParams);
|
|
15
15
|
const rootProps = solid.mergeProps(() => api().rootProps, localProps);
|
|
16
|
+
const customToast = api().render();
|
|
16
17
|
return web.createComponent(toastItemContext.ToastItemProvider, {
|
|
17
18
|
value: api,
|
|
18
19
|
get children() {
|
|
19
|
-
return web.createComponent(factory.ark.div, rootProps
|
|
20
|
+
return web.createComponent(factory.ark.div, web.mergeProps(rootProps, {
|
|
21
|
+
get children() {
|
|
22
|
+
return customToast || props.children;
|
|
23
|
+
}
|
|
24
|
+
}));
|
|
20
25
|
}
|
|
21
26
|
});
|
|
22
27
|
};
|
package/toast/toast.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createComponent } from 'solid-js/web';
|
|
1
|
+
import { createComponent, mergeProps as mergeProps$1 } from 'solid-js/web';
|
|
2
2
|
import { mergeProps } from '@zag-js/solid';
|
|
3
3
|
import { createSplitProps } from '../create-split-props.mjs';
|
|
4
4
|
import { ark } from '../factory.mjs';
|
|
@@ -9,10 +9,15 @@ const Toast = props => {
|
|
|
9
9
|
const [toastParams, localProps] = createSplitProps()(props, ['toast']);
|
|
10
10
|
const api = useToastItem(toastParams);
|
|
11
11
|
const rootProps = mergeProps(() => api().rootProps, localProps);
|
|
12
|
+
const customToast = api().render();
|
|
12
13
|
return createComponent(ToastItemProvider, {
|
|
13
14
|
value: api,
|
|
14
15
|
get children() {
|
|
15
|
-
return createComponent(ark.div, rootProps
|
|
16
|
+
return createComponent(ark.div, mergeProps$1(rootProps, {
|
|
17
|
+
get children() {
|
|
18
|
+
return customToast || props.children;
|
|
19
|
+
}
|
|
20
|
+
}));
|
|
16
21
|
}
|
|
17
22
|
});
|
|
18
23
|
};
|
|
@@ -1,23 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PropTypes } from '@zag-js/solid';
|
|
2
|
+
import type { Accessor } from 'solid-js';
|
|
2
3
|
import * as toast from '@zag-js/toast';
|
|
3
4
|
export type UseToastItemProps = {
|
|
4
5
|
toast: toast.Service;
|
|
5
6
|
};
|
|
6
7
|
export type UseToastItemReturn = ReturnType<typeof useToastItem>;
|
|
7
|
-
export declare const useToastItem: (props: UseToastItemProps) => Accessor<
|
|
8
|
-
type: toast.Type;
|
|
9
|
-
title: string | undefined;
|
|
10
|
-
description: string | undefined;
|
|
11
|
-
placement: toast.Placement;
|
|
12
|
-
isVisible: boolean;
|
|
13
|
-
isPaused: boolean;
|
|
14
|
-
isRtl: boolean;
|
|
15
|
-
pause(): void;
|
|
16
|
-
resume(): void;
|
|
17
|
-
dismiss(): void;
|
|
18
|
-
render(): any;
|
|
19
|
-
rootProps: JSX.HTMLAttributes<any>;
|
|
20
|
-
titleProps: JSX.HTMLAttributes<any>;
|
|
21
|
-
descriptionProps: JSX.HTMLAttributes<any>;
|
|
22
|
-
closeTriggerProps: JSX.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
23
|
-
}>;
|
|
8
|
+
export declare const useToastItem: (props: UseToastItemProps) => Accessor<toast.PublicApi<PropTypes>>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const tooltip = require('./tooltip.cjs');
|
|
6
|
+
const tooltipArrow = require('./tooltip-arrow.cjs');
|
|
7
|
+
const tooltipArrowTip = require('./tooltip-arrow-tip.cjs');
|
|
8
|
+
const tooltipContent = require('./tooltip-content.cjs');
|
|
9
|
+
const tooltipContext = require('./tooltip-context.cjs');
|
|
10
|
+
const tooltipPositioner = require('./tooltip-positioner.cjs');
|
|
11
|
+
const tooltipTrigger = require('./tooltip-trigger.cjs');
|
|
12
|
+
const pagination = require('@zag-js/pagination');
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
exports.Tooltip = tooltip.Tooltip;
|
|
17
|
+
exports.TooltipArrow = tooltipArrow.TooltipArrow;
|
|
18
|
+
exports.TooltipArrowTip = tooltipArrowTip.TooltipArrowTip;
|
|
19
|
+
exports.TooltipContent = tooltipContent.TooltipContent;
|
|
20
|
+
exports.useTooltipContext = tooltipContext.useTooltipContext;
|
|
21
|
+
exports.TooltipPositioner = tooltipPositioner.TooltipPositioner;
|
|
22
|
+
exports.TooltipTrigger = tooltipTrigger.TooltipTrigger;
|
|
23
|
+
Object.defineProperty(exports, 'tooltipAnatomy', {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: () => pagination.anatomy
|
|
26
|
+
});
|
package/tooltip/index.d.ts
CHANGED
|
@@ -3,5 +3,6 @@ export { tooltipAnatomy } from './tooltip-anatomy';
|
|
|
3
3
|
export { TooltipArrow, type TooltipArrowProps } from './tooltip-arrow';
|
|
4
4
|
export { TooltipArrowTip, type TooltipArrowTipProps } from './tooltip-arrow-tip';
|
|
5
5
|
export { TooltipContent, type TooltipContentProps } from './tooltip-content';
|
|
6
|
+
export { useTooltipContext } from './tooltip-context';
|
|
6
7
|
export { TooltipPositioner, type TooltipPositionerProps } from './tooltip-positioner';
|
|
7
8
|
export { TooltipTrigger, type TooltipTriggerProps } from './tooltip-trigger';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { Tooltip } from './tooltip.mjs';
|
|
2
|
+
export { TooltipArrow } from './tooltip-arrow.mjs';
|
|
3
|
+
export { TooltipArrowTip } from './tooltip-arrow-tip.mjs';
|
|
4
|
+
export { TooltipContent } from './tooltip-content.mjs';
|
|
5
|
+
export { useTooltipContext } from './tooltip-context.mjs';
|
|
6
|
+
export { TooltipPositioner } from './tooltip-positioner.mjs';
|
|
7
|
+
export { TooltipTrigger } from './tooltip-trigger.mjs';
|
|
8
|
+
export { anatomy as tooltipAnatomy } from '@zag-js/pagination';
|
|
@@ -1,36 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { PropTypes } from '@zag-js/solid';
|
|
2
|
+
import type { PublicApi } from '@zag-js/tooltip';
|
|
3
|
+
import type { Accessor } from 'solid-js';
|
|
3
4
|
import type { ContextProviderComponent } from 'solid-js/types/reactive/signal';
|
|
4
5
|
import { type UseTooltipReturn } from './use-tooltip';
|
|
5
6
|
export type TooltipContext = UseTooltipReturn;
|
|
6
|
-
export declare const TooltipProvider: ContextProviderComponent<Accessor<
|
|
7
|
-
isOpen: boolean;
|
|
8
|
-
open(): void;
|
|
9
|
-
close(): void;
|
|
10
|
-
getAnimationState(): {
|
|
11
|
-
enter: boolean;
|
|
12
|
-
exit: boolean;
|
|
13
|
-
};
|
|
14
|
-
setPositioning(options?: Partial<PositioningOptions> | undefined): void;
|
|
15
|
-
triggerProps: JSX.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
16
|
-
arrowProps: JSX.HTMLAttributes<any>;
|
|
17
|
-
arrowTipProps: JSX.HTMLAttributes<any>;
|
|
18
|
-
positionerProps: JSX.HTMLAttributes<any>;
|
|
19
|
-
contentProps: JSX.HTMLAttributes<any>;
|
|
20
|
-
labelProps: JSX.HTMLAttributes<any>;
|
|
21
|
-
}>>, useTooltipContext: () => Accessor<{
|
|
22
|
-
isOpen: boolean;
|
|
23
|
-
open(): void;
|
|
24
|
-
close(): void;
|
|
25
|
-
getAnimationState(): {
|
|
26
|
-
enter: boolean;
|
|
27
|
-
exit: boolean;
|
|
28
|
-
};
|
|
29
|
-
setPositioning(options?: Partial<PositioningOptions> | undefined): void;
|
|
30
|
-
triggerProps: JSX.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
31
|
-
arrowProps: JSX.HTMLAttributes<any>;
|
|
32
|
-
arrowTipProps: JSX.HTMLAttributes<any>;
|
|
33
|
-
positionerProps: JSX.HTMLAttributes<any>;
|
|
34
|
-
contentProps: JSX.HTMLAttributes<any>;
|
|
35
|
-
labelProps: JSX.HTMLAttributes<any>;
|
|
36
|
-
}>;
|
|
7
|
+
export declare const TooltipProvider: ContextProviderComponent<Accessor<PublicApi<PropTypes>>>, useTooltipContext: () => Accessor<PublicApi<PropTypes>>;
|
package/tooltip/use-tooltip.d.ts
CHANGED
|
@@ -1,21 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PropTypes } from '@zag-js/solid';
|
|
2
|
+
import type { Accessor } from 'solid-js';
|
|
2
3
|
import * as tooltip from '@zag-js/tooltip';
|
|
3
4
|
import { type Optional } from '../types';
|
|
4
5
|
export type UseTooltipProps = Optional<tooltip.Context, 'id'>;
|
|
5
6
|
export type UseTooltipReturn = ReturnType<typeof useTooltip>;
|
|
6
|
-
export declare const useTooltip: (props: UseTooltipProps) => Accessor<
|
|
7
|
-
isOpen: boolean;
|
|
8
|
-
open(): void;
|
|
9
|
-
close(): void;
|
|
10
|
-
getAnimationState(): {
|
|
11
|
-
enter: boolean;
|
|
12
|
-
exit: boolean;
|
|
13
|
-
};
|
|
14
|
-
setPositioning(options?: Partial<tooltip.PositioningOptions> | undefined): void;
|
|
15
|
-
triggerProps: JSX.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
16
|
-
arrowProps: JSX.HTMLAttributes<any>;
|
|
17
|
-
arrowTipProps: JSX.HTMLAttributes<any>;
|
|
18
|
-
positionerProps: JSX.HTMLAttributes<any>;
|
|
19
|
-
contentProps: JSX.HTMLAttributes<any>;
|
|
20
|
-
labelProps: JSX.HTMLAttributes<any>;
|
|
21
|
-
}>;
|
|
7
|
+
export declare const useTooltip: (props: UseTooltipProps) => Accessor<tooltip.PublicApi<PropTypes>>;
|