@webstudio-is/sdk-components-react-radix 0.90.0 → 0.92.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/lib/__generated__/accordion.props.js +6 -12
- package/lib/__generated__/checkbox.props.js +3 -6
- package/lib/__generated__/collapsible.props.js +4 -8
- package/lib/__generated__/dialog.props.js +8 -16
- package/lib/__generated__/label.props.js +2 -4
- package/lib/__generated__/navigation-menu.props.js +8 -16
- package/lib/__generated__/popover.props.js +4 -8
- package/lib/__generated__/radio-group.props.js +4 -8
- package/lib/__generated__/select.props.js +15 -19
- package/lib/__generated__/sheet.props.js +8 -16
- package/lib/__generated__/switch.props.js +3 -6
- package/lib/__generated__/tabs.props.js +5 -10
- package/lib/__generated__/tooltip.props.js +4 -8
- package/lib/accordion.js +7 -14
- package/{src/accordion.stories.tsx → lib/accordion.stories.js} +9 -12
- package/lib/accordion.ws.js +11 -22
- package/lib/checkbox.js +3 -6
- package/lib/checkbox.stories.js +19 -0
- package/lib/checkbox.ws.js +5 -10
- package/lib/collapsible.js +5 -10
- package/{src/collapsible.stories.tsx → lib/collapsible.stories.js} +9 -12
- package/lib/collapsible.ws.js +7 -14
- package/lib/components.js +13 -62
- package/lib/dialog.js +9 -18
- package/{src/dialog.stories.tsx → lib/dialog.stories.js} +9 -12
- package/lib/dialog.ws.js +17 -30
- package/lib/hooks.js +2 -4
- package/lib/label.js +2 -4
- package/lib/label.stories.js +19 -0
- package/lib/label.ws.js +3 -6
- package/lib/metas.js +55 -105
- package/lib/navigation-menu.js +9 -18
- package/{src/navigation-menu.stories.tsx → lib/navigation-menu.stories.js} +9 -12
- package/lib/navigation-menu.ws.js +16 -31
- package/lib/popover.js +5 -10
- package/{src/popover.stories.tsx → lib/popover.stories.js} +9 -12
- package/lib/popover.ws.js +7 -14
- package/lib/props-descriptions.js +2 -4
- package/lib/props.js +54 -103
- package/lib/radio-group.js +4 -8
- package/lib/radio-group.stories.js +19 -0
- package/lib/radio-group.ws.js +7 -14
- package/lib/select.js +10 -20
- package/{src/select.stories.tsx → lib/select.stories.js} +9 -12
- package/lib/select.ws.js +17 -34
- package/lib/sheet.js +9 -18
- package/{src/sheet.stories.tsx → lib/sheet.stories.js} +9 -12
- package/lib/sheet.ws.js +2 -4
- package/lib/switch.js +3 -6
- package/lib/switch.stories.js +19 -0
- package/lib/switch.ws.js +5 -10
- package/lib/tabs.js +6 -12
- package/{src/tabs.stories.tsx → lib/tabs.stories.js} +9 -12
- package/lib/tabs.ws.js +9 -18
- package/lib/theme/__generated__/tailwind-theme.js +517 -0
- package/lib/theme/styles.js +3 -6
- package/lib/theme/tailwind-classes.js +149 -301
- package/lib/theme/tailwind-colors.js +2 -4
- package/lib/tooltip.js +5 -10
- package/{src/tooltip.stories.tsx → lib/tooltip.stories.js} +9 -12
- package/lib/tooltip.ws.js +7 -14
- package/lib/types/__generated__/accordion.props.d.ts +1 -1
- package/lib/types/__generated__/checkbox.props.d.ts +1 -1
- package/lib/types/__generated__/collapsible.props.d.ts +1 -1
- package/lib/types/__generated__/dialog.props.d.ts +1 -1
- package/lib/types/__generated__/label.props.d.ts +1 -1
- package/lib/types/__generated__/navigation-menu.props.d.ts +1 -1
- package/lib/types/__generated__/popover.props.d.ts +1 -1
- package/lib/types/__generated__/radio-group.props.d.ts +1 -1
- package/lib/types/__generated__/select.props.d.ts +1 -1
- package/lib/types/__generated__/sheet.props.d.ts +1 -1
- package/lib/types/__generated__/switch.props.d.ts +1 -1
- package/lib/types/__generated__/tabs.props.d.ts +1 -1
- package/lib/types/__generated__/tooltip.props.d.ts +1 -1
- package/lib/types/accordion.d.ts +1 -1
- package/lib/types/sheet.d.ts +1 -1
- package/lib/types/theme/__generated__/tailwind-theme.d.ts +26 -0
- package/lib/types/theme/styles.d.ts +60 -60
- package/lib/types/theme/tailwind-classes.d.ts +33 -33
- package/package.json +20 -23
- package/lib/__generated__/button.props.js +0 -565
- package/lib/__generated__/input.props.js +0 -668
- package/lib/__generated__/textarea.props.js +0 -577
- package/lib/cjs/__generated__/accordion.props.js +0 -2645
- package/lib/cjs/__generated__/button.props.js +0 -585
- package/lib/cjs/__generated__/checkbox.props.js +0 -1103
- package/lib/cjs/__generated__/collapsible.props.js +0 -1050
- package/lib/cjs/__generated__/dialog.props.js +0 -2623
- package/lib/cjs/__generated__/input.props.js +0 -688
- package/lib/cjs/__generated__/label.props.js +0 -541
- package/lib/cjs/__generated__/navigation-menu.props.js +0 -2585
- package/lib/cjs/__generated__/popover.props.js +0 -582
- package/lib/cjs/__generated__/radio-group.props.js +0 -1647
- package/lib/cjs/__generated__/select.props.js +0 -3698
- package/lib/cjs/__generated__/sheet.props.js +0 -2642
- package/lib/cjs/__generated__/switch.props.js +0 -1103
- package/lib/cjs/__generated__/tabs.props.js +0 -2144
- package/lib/cjs/__generated__/textarea.props.js +0 -597
- package/lib/cjs/__generated__/tooltip.props.js +0 -593
- package/lib/cjs/accordion.js +0 -67
- package/lib/cjs/accordion.ws.js +0 -285
- package/lib/cjs/checkbox.js +0 -31
- package/lib/cjs/checkbox.ws.js +0 -174
- package/lib/cjs/collapsible.js +0 -53
- package/lib/cjs/collapsible.ws.js +0 -122
- package/lib/cjs/components.js +0 -82
- package/lib/cjs/dialog.js +0 -89
- package/lib/cjs/dialog.ws.js +0 -314
- package/lib/cjs/hooks.js +0 -43
- package/lib/cjs/label.js +0 -37
- package/lib/cjs/label.ws.js +0 -75
- package/lib/cjs/metas.js +0 -84
- package/lib/cjs/navigation-menu.js +0 -107
- package/lib/cjs/navigation-menu.ws.js +0 -514
- package/lib/cjs/package.json +0 -1
- package/lib/cjs/popover.js +0 -90
- package/lib/cjs/popover.ws.js +0 -142
- package/lib/cjs/props-descriptions.js +0 -56
- package/lib/cjs/props.js +0 -82
- package/lib/cjs/radio-group.js +0 -30
- package/lib/cjs/radio-group.ws.js +0 -191
- package/lib/cjs/select.js +0 -83
- package/lib/cjs/select.ws.js +0 -350
- package/lib/cjs/sheet.js +0 -96
- package/lib/cjs/sheet.ws.js +0 -257
- package/lib/cjs/switch.js +0 -27
- package/lib/cjs/switch.ws.js +0 -173
- package/lib/cjs/tabs.js +0 -59
- package/lib/cjs/tabs.ws.js +0 -196
- package/lib/cjs/theme/radix-common-types.js +0 -16
- package/lib/cjs/theme/styles.js +0 -96
- package/lib/cjs/theme/tailwind-classes.js +0 -819
- package/lib/cjs/theme/tailwind-colors.js +0 -45
- package/lib/cjs/theme/tailwind-theme.js +0 -46
- package/lib/cjs/tooltip.js +0 -87
- package/lib/cjs/tooltip.ws.js +0 -143
- package/lib/theme/radix-common-types.js +0 -0
- package/lib/theme/tailwind-theme.js +0 -16
- package/lib/types/__generated__/button.props.d.ts +0 -2
- package/lib/types/__generated__/input.props.d.ts +0 -2
- package/lib/types/__generated__/textarea.props.d.ts +0 -2
- package/lib/types/theme/radix-common-types.d.ts +0 -85
- package/lib/types/theme/tailwind-theme.d.ts +0 -72
- package/src/__generated__/accordion.props.ts +0 -2949
- package/src/__generated__/button.props.ts +0 -635
- package/src/__generated__/checkbox.props.ts +0 -1217
- package/src/__generated__/collapsible.props.ts +0 -1156
- package/src/__generated__/dialog.props.ts +0 -2923
- package/src/__generated__/input.props.ts +0 -748
- package/src/__generated__/label.props.ts +0 -585
- package/src/__generated__/navigation-menu.props.ts +0 -2882
- package/src/__generated__/popover.props.ts +0 -626
- package/src/__generated__/radio-group.props.ts +0 -1828
- package/src/__generated__/select.props.ts +0 -4130
- package/src/__generated__/sheet.props.ts +0 -2942
- package/src/__generated__/switch.props.ts +0 -1217
- package/src/__generated__/tabs.props.ts +0 -2386
- package/src/__generated__/textarea.props.ts +0 -645
- package/src/__generated__/tooltip.props.ts +0 -639
- package/src/accordion.tsx +0 -88
- package/src/accordion.ws.ts +0 -296
- package/src/checkbox.stories.ts +0 -22
- package/src/checkbox.tsx +0 -22
- package/src/checkbox.ws.ts +0 -154
- package/src/collapsible.tsx +0 -62
- package/src/collapsible.ws.ts +0 -115
- package/src/components.ts +0 -50
- package/src/dialog.tsx +0 -92
- package/src/dialog.ws.tsx +0 -318
- package/src/hooks.ts +0 -22
- package/src/label.stories.ts +0 -22
- package/src/label.tsx +0 -15
- package/src/label.ws.ts +0 -50
- package/src/metas.ts +0 -74
- package/src/navigation-menu.tsx +0 -130
- package/src/navigation-menu.ws.ts +0 -524
- package/src/popover.tsx +0 -96
- package/src/popover.ws.tsx +0 -128
- package/src/props-descriptions.ts +0 -43
- package/src/props.ts +0 -73
- package/src/radio-group.stories.ts +0 -22
- package/src/radio-group.tsx +0 -17
- package/src/radio-group.ws.ts +0 -178
- package/src/select.tsx +0 -112
- package/src/select.ws.ts +0 -349
- package/src/sheet.tsx +0 -79
- package/src/sheet.ws.tsx +0 -236
- package/src/switch.stories.ts +0 -22
- package/src/switch.tsx +0 -10
- package/src/switch.ws.ts +0 -146
- package/src/tabs.tsx +0 -64
- package/src/tabs.ws.ts +0 -198
- package/src/theme/radix-common-types.ts +0 -496
- package/src/theme/styles.ts +0 -76
- package/src/theme/tailwind-classes.ts +0 -1026
- package/src/theme/tailwind-colors.ts +0 -39
- package/src/theme/tailwind-theme.ts +0 -24
- package/src/tooltip.tsx +0 -95
- package/src/tooltip.ws.tsx +0 -130
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Variables source:
|
|
3
|
-
* https://github.com/shadcn-ui/ui/blob/main/apps/www/registry/themes.ts#L1
|
|
4
|
-
* https://github.com/shadcn-ui/ui/blob/5e172fc34fdf015aa0d141f52cc8c082b8ae6613/apps/www/scripts/build-registry.ts#L220
|
|
5
|
-
*
|
|
6
|
-
* Attributions
|
|
7
|
-
* MIT License
|
|
8
|
-
* Copyright (c) 2023 shadcn
|
|
9
|
-
**/
|
|
10
|
-
|
|
11
|
-
export const colors = {
|
|
12
|
-
transparent: "transparent",
|
|
13
|
-
current: "currentColor",
|
|
14
|
-
inherit: "inherit",
|
|
15
|
-
popover: "rgb(255, 255, 255)",
|
|
16
|
-
popoverForeground: "rgb(2, 8, 23)",
|
|
17
|
-
border: "rgb(226, 232, 240)",
|
|
18
|
-
background: "rgb(255, 255, 255)",
|
|
19
|
-
foreground: "hsl(222.2 84% 4.9%)",
|
|
20
|
-
ring: "rgb(148, 163, 184)",
|
|
21
|
-
mutedForeground: "rgb(100, 116, 139)",
|
|
22
|
-
muted: `hsl(210 40% 96.1%)`,
|
|
23
|
-
primary: "rgb(15, 23, 42)",
|
|
24
|
-
primaryForeground: "hsl(210 40% 98%)",
|
|
25
|
-
destructive: "rgb(239, 68, 68)",
|
|
26
|
-
destructiveForeground: "rgb(248, 250, 252)",
|
|
27
|
-
accent: "rgb(241, 245, 249)",
|
|
28
|
-
accentForeground: "rgb(15, 23, 42)",
|
|
29
|
-
input: "rgb(226, 232, 240)",
|
|
30
|
-
secondary: "rgb(241, 245, 249)",
|
|
31
|
-
secondaryForeground: "rgb(15, 23, 42)",
|
|
32
|
-
} as const;
|
|
33
|
-
|
|
34
|
-
/*
|
|
35
|
-
// Not used, leave it for the following components.
|
|
36
|
-
|
|
37
|
-
--card: 0 0% 100%;
|
|
38
|
-
--card-foreground: 222.2 84% 4.9%;
|
|
39
|
-
*/
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
// eslint-disable-next-line import/no-internal-modules
|
|
2
|
-
import defaultTheme from "tailwindcss/defaultTheme"; // Imported theme https://github.com/tailwindlabs/tailwindcss/blob/e0c52a9332a64ef7eb0ba23d2a0fd5a16fe57ab7/stubs/config.full.js
|
|
3
|
-
import type { EvaluatedDefaultTheme } from "./radix-common-types";
|
|
4
|
-
import { colors } from "./tailwind-colors";
|
|
5
|
-
|
|
6
|
-
// Override the default theme with our own colors and other values if needed
|
|
7
|
-
const localTheme = { ...defaultTheme };
|
|
8
|
-
|
|
9
|
-
export const theme = <T extends keyof EvaluatedDefaultTheme>(
|
|
10
|
-
name: T
|
|
11
|
-
): EvaluatedDefaultTheme[T] => {
|
|
12
|
-
const value = localTheme?.[name] as unknown;
|
|
13
|
-
|
|
14
|
-
if (typeof value === "function") {
|
|
15
|
-
return value({ theme, colors, breakpoints: () => ({}) });
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
return value as never;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
// Override with our own colors, and other values if needed
|
|
22
|
-
localTheme.colors = colors;
|
|
23
|
-
localTheme.borderRadius = { ...theme("borderRadius") };
|
|
24
|
-
localTheme.borderRadius.DEFAULT = "0.5rem";
|
package/src/tooltip.tsx
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
/* eslint-disable react/display-name */
|
|
2
|
-
// We can't use .displayName until this is merged https://github.com/styleguidist/react-docgen-typescript/pull/449
|
|
3
|
-
|
|
4
|
-
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
5
|
-
import { getClosestInstance, type Hook } from "@webstudio-is/react-sdk";
|
|
6
|
-
|
|
7
|
-
import {
|
|
8
|
-
forwardRef,
|
|
9
|
-
type ComponentPropsWithoutRef,
|
|
10
|
-
type ReactNode,
|
|
11
|
-
Children,
|
|
12
|
-
} from "react";
|
|
13
|
-
|
|
14
|
-
export const Tooltip = forwardRef<
|
|
15
|
-
HTMLDivElement,
|
|
16
|
-
Omit<ComponentPropsWithoutRef<typeof TooltipPrimitive.Root>, "defaultOpen">
|
|
17
|
-
>((props, _ref) => {
|
|
18
|
-
return (
|
|
19
|
-
<TooltipPrimitive.Provider>
|
|
20
|
-
<TooltipPrimitive.Root {...props} />
|
|
21
|
-
</TooltipPrimitive.Provider>
|
|
22
|
-
);
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* We're not exposing the 'asChild' property for the Trigger.
|
|
27
|
-
* Instead, we're enforcing 'asChild=true' for the Trigger and making it style-less.
|
|
28
|
-
* This avoids situations where the Trigger inadvertently passes all styles to its child,
|
|
29
|
-
* which would prevent us from displaying styles properly in the builder.
|
|
30
|
-
*/
|
|
31
|
-
export const TooltipTrigger = forwardRef<
|
|
32
|
-
HTMLButtonElement,
|
|
33
|
-
{ children: ReactNode }
|
|
34
|
-
>(({ children, ...props }, ref) => {
|
|
35
|
-
const firstChild = Children.toArray(children)[0];
|
|
36
|
-
|
|
37
|
-
return (
|
|
38
|
-
<TooltipPrimitive.Trigger asChild={true} ref={ref} {...props}>
|
|
39
|
-
{firstChild ?? <button>Add button or link</button>}
|
|
40
|
-
</TooltipPrimitive.Trigger>
|
|
41
|
-
);
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
export const TooltipContent = forwardRef<
|
|
45
|
-
HTMLDivElement,
|
|
46
|
-
ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>
|
|
47
|
-
>(({ sideOffset = 4, hideWhenDetached = true, ...props }, ref) => (
|
|
48
|
-
<TooltipPrimitive.Portal>
|
|
49
|
-
<TooltipPrimitive.Content
|
|
50
|
-
ref={ref}
|
|
51
|
-
// Do not show content if trigger is detached
|
|
52
|
-
hideWhenDetached={hideWhenDetached}
|
|
53
|
-
sideOffset={sideOffset}
|
|
54
|
-
{...props}
|
|
55
|
-
/>
|
|
56
|
-
</TooltipPrimitive.Portal>
|
|
57
|
-
));
|
|
58
|
-
|
|
59
|
-
/* BUILDER HOOKS */
|
|
60
|
-
|
|
61
|
-
const namespace = "@webstudio-is/sdk-components-react-radix";
|
|
62
|
-
|
|
63
|
-
// For each TooltipContent component within the selection,
|
|
64
|
-
// we identify its closest parent Tooltip component
|
|
65
|
-
// and update its open prop bound to variable.
|
|
66
|
-
export const hooksTooltip: Hook = {
|
|
67
|
-
onNavigatorUnselect: (context, event) => {
|
|
68
|
-
for (const instance of event.instancePath) {
|
|
69
|
-
if (instance.component === `${namespace}:TooltipContent`) {
|
|
70
|
-
const tooltip = getClosestInstance(
|
|
71
|
-
event.instancePath,
|
|
72
|
-
instance,
|
|
73
|
-
`${namespace}:Tooltip`
|
|
74
|
-
);
|
|
75
|
-
if (tooltip) {
|
|
76
|
-
context.setPropVariable(tooltip.id, "open", false);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
onNavigatorSelect: (context, event) => {
|
|
82
|
-
for (const instance of event.instancePath) {
|
|
83
|
-
if (instance.component === `${namespace}:TooltipContent`) {
|
|
84
|
-
const tooltip = getClosestInstance(
|
|
85
|
-
event.instancePath,
|
|
86
|
-
instance,
|
|
87
|
-
`${namespace}:Tooltip`
|
|
88
|
-
);
|
|
89
|
-
if (tooltip) {
|
|
90
|
-
context.setPropVariable(tooltip.id, "open", true);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
};
|
package/src/tooltip.ws.tsx
DELETED
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
import { TooltipIcon, TriggerIcon, ContentIcon } from "@webstudio-is/icons/svg";
|
|
2
|
-
import {
|
|
3
|
-
type PresetStyle,
|
|
4
|
-
type WsComponentMeta,
|
|
5
|
-
type WsComponentPropsMeta,
|
|
6
|
-
} from "@webstudio-is/react-sdk";
|
|
7
|
-
import { div } from "@webstudio-is/react-sdk/css-normalize";
|
|
8
|
-
import * as tc from "./theme/tailwind-classes";
|
|
9
|
-
import {
|
|
10
|
-
propsTooltip,
|
|
11
|
-
propsTooltipContent,
|
|
12
|
-
propsTooltipTrigger,
|
|
13
|
-
} from "./__generated__/tooltip.props";
|
|
14
|
-
import { getButtonStyles } from "./theme/styles";
|
|
15
|
-
|
|
16
|
-
const presetStyle = {
|
|
17
|
-
div,
|
|
18
|
-
} satisfies PresetStyle<"div">;
|
|
19
|
-
|
|
20
|
-
// @todo add [data-state] to button and link
|
|
21
|
-
export const metaTooltipTrigger: WsComponentMeta = {
|
|
22
|
-
category: "hidden",
|
|
23
|
-
detachable: false,
|
|
24
|
-
type: "container",
|
|
25
|
-
icon: TriggerIcon,
|
|
26
|
-
stylable: false,
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export const metaTooltipContent: WsComponentMeta = {
|
|
30
|
-
category: "hidden",
|
|
31
|
-
detachable: false,
|
|
32
|
-
type: "container",
|
|
33
|
-
presetStyle,
|
|
34
|
-
icon: ContentIcon,
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Styles source without animations:
|
|
39
|
-
* https://github.com/shadcn-ui/ui/blob/main/apps/www/registry/default/ui/tooltip.tsx
|
|
40
|
-
*
|
|
41
|
-
* Attributions
|
|
42
|
-
* MIT License
|
|
43
|
-
* Copyright (c) 2023 shadcn
|
|
44
|
-
**/
|
|
45
|
-
export const metaTooltip: WsComponentMeta = {
|
|
46
|
-
category: "radix",
|
|
47
|
-
order: 7,
|
|
48
|
-
type: "container",
|
|
49
|
-
icon: TooltipIcon,
|
|
50
|
-
stylable: false,
|
|
51
|
-
description:
|
|
52
|
-
"Displays content that is related to the trigger, when the trigger is hovered with the mouse or focused with the keyboard. You are reading an example of a tooltip right now.",
|
|
53
|
-
template: [
|
|
54
|
-
{
|
|
55
|
-
type: "instance",
|
|
56
|
-
component: "Tooltip",
|
|
57
|
-
dataSources: {
|
|
58
|
-
tooltipOpen: { type: "variable", initialValue: false },
|
|
59
|
-
},
|
|
60
|
-
props: [
|
|
61
|
-
{
|
|
62
|
-
type: "dataSource",
|
|
63
|
-
name: "open",
|
|
64
|
-
dataSourceName: "tooltipOpen",
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
name: "onOpenChange",
|
|
68
|
-
type: "action",
|
|
69
|
-
value: [
|
|
70
|
-
{ type: "execute", args: ["open"], code: `tooltipOpen = open` },
|
|
71
|
-
],
|
|
72
|
-
},
|
|
73
|
-
],
|
|
74
|
-
children: [
|
|
75
|
-
{
|
|
76
|
-
type: "instance",
|
|
77
|
-
component: "TooltipTrigger",
|
|
78
|
-
children: [
|
|
79
|
-
{
|
|
80
|
-
type: "instance",
|
|
81
|
-
component: "Button",
|
|
82
|
-
styles: getButtonStyles("outline"),
|
|
83
|
-
children: [{ type: "text", value: "Button" }],
|
|
84
|
-
},
|
|
85
|
-
],
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
type: "instance",
|
|
89
|
-
component: "TooltipContent",
|
|
90
|
-
/**
|
|
91
|
-
* z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md
|
|
92
|
-
**/
|
|
93
|
-
styles: [
|
|
94
|
-
tc.z(50),
|
|
95
|
-
tc.overflow("hidden"),
|
|
96
|
-
tc.rounded("md"),
|
|
97
|
-
tc.border(),
|
|
98
|
-
tc.bg("popover"),
|
|
99
|
-
tc.px(3),
|
|
100
|
-
tc.py(1.5),
|
|
101
|
-
tc.text("sm"),
|
|
102
|
-
tc.text("popoverForeground"),
|
|
103
|
-
tc.shadow("md"),
|
|
104
|
-
].flat(),
|
|
105
|
-
children: [
|
|
106
|
-
{
|
|
107
|
-
type: "instance",
|
|
108
|
-
component: "Text",
|
|
109
|
-
children: [{ type: "text", value: "The text you can edit" }],
|
|
110
|
-
},
|
|
111
|
-
],
|
|
112
|
-
},
|
|
113
|
-
],
|
|
114
|
-
},
|
|
115
|
-
],
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
export const propsMetaTooltip: WsComponentPropsMeta = {
|
|
119
|
-
props: propsTooltip,
|
|
120
|
-
initialProps: ["open", "delayDuration", "disableHoverableContent"],
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
export const propsMetaTooltipTrigger: WsComponentPropsMeta = {
|
|
124
|
-
props: propsTooltipTrigger,
|
|
125
|
-
};
|
|
126
|
-
|
|
127
|
-
export const propsMetaTooltipContent: WsComponentPropsMeta = {
|
|
128
|
-
props: propsTooltipContent,
|
|
129
|
-
initialProps: ["side", "sideOffset", "align", "alignOffset"],
|
|
130
|
-
};
|