@webstudio-is/sdk-components-react-radix 0.0.0-021f2d4
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/LICENSE +661 -0
- package/README.md +4 -0
- package/lib/__generated__/accordion.props.js +2631 -0
- package/lib/__generated__/checkbox.props.js +1084 -0
- package/lib/__generated__/collapsible.props.js +1024 -0
- package/lib/__generated__/dialog.props.js +2599 -0
- package/lib/__generated__/label.props.js +519 -0
- package/lib/__generated__/navigation-menu.props.js +3660 -0
- package/lib/__generated__/popover.props.js +564 -0
- package/lib/__generated__/radio-group.props.js +1619 -0
- package/lib/__generated__/select.props.js +3687 -0
- package/lib/__generated__/switch.props.js +1084 -0
- package/lib/__generated__/tabs.props.js +2121 -0
- package/lib/__generated__/tooltip.props.js +575 -0
- package/lib/accordion.js +36 -0
- package/lib/accordion.template.js +95 -0
- package/lib/accordion.ws.js +117 -0
- package/lib/checkbox.js +8 -0
- package/lib/checkbox.template.js +63 -0
- package/lib/checkbox.ws.js +51 -0
- package/lib/collapsible.js +37 -0
- package/lib/collapsible.template.js +16 -0
- package/lib/collapsible.ws.js +59 -0
- package/lib/components.js +62 -0
- package/lib/dialog.js +102 -0
- package/lib/dialog.template.js +119 -0
- package/lib/dialog.ws.js +138 -0
- package/lib/hooks.js +21 -0
- package/lib/label.js +7 -0
- package/lib/label.template.js +23 -0
- package/lib/label.ws.js +19 -0
- package/lib/metas.js +62 -0
- package/lib/navigation-menu.js +59 -0
- package/lib/navigation-menu.template.js +283 -0
- package/lib/navigation-menu.ws.js +124 -0
- package/lib/popover.js +48 -0
- package/lib/popover.template.js +33 -0
- package/lib/popover.ws.js +50 -0
- package/lib/props.js +62 -0
- package/lib/radio-group.js +9 -0
- package/lib/radio-group.template.js +66 -0
- package/lib/radio-group.ws.js +73 -0
- package/lib/select.js +46 -0
- package/lib/select.template.js +121 -0
- package/lib/select.ws.js +155 -0
- package/lib/shared/preset-styles.js +38 -0
- package/lib/shared/proxy.js +5 -0
- package/lib/shared/styles.js +51 -0
- package/lib/shared/theme.js +162 -0
- package/lib/sheet.template.js +129 -0
- package/lib/switch.js +8 -0
- package/lib/switch.template.js +63 -0
- package/lib/switch.ws.js +63 -0
- package/lib/tabs.js +65 -0
- package/lib/tabs.template.js +66 -0
- package/lib/tabs.ws.js +88 -0
- package/lib/templates.js +28 -0
- package/lib/tooltip.js +45 -0
- package/lib/tooltip.template.js +33 -0
- package/lib/tooltip.ws.js +50 -0
- package/lib/types/__generated__/accordion.props.d.ts +6 -0
- package/lib/types/__generated__/checkbox.props.d.ts +3 -0
- package/lib/types/__generated__/collapsible.props.d.ts +4 -0
- package/lib/types/__generated__/dialog.props.d.ts +8 -0
- package/lib/types/__generated__/label.props.d.ts +2 -0
- package/lib/types/__generated__/navigation-menu.props.d.ts +8 -0
- package/lib/types/__generated__/popover.props.d.ts +4 -0
- package/lib/types/__generated__/radio-group.props.d.ts +4 -0
- package/lib/types/__generated__/select.props.d.ts +9 -0
- package/lib/types/__generated__/switch.props.d.ts +3 -0
- package/lib/types/__generated__/tabs.props.d.ts +5 -0
- package/lib/types/__generated__/tooltip.props.d.ts +4 -0
- package/lib/types/accordion.d.ts +11 -0
- package/lib/types/accordion.template.d.ts +10 -0
- package/lib/types/accordion.ws.d.ts +11 -0
- package/lib/types/checkbox.d.ts +9 -0
- package/lib/types/checkbox.template.d.ts +2 -0
- package/lib/types/checkbox.ws.d.ts +5 -0
- package/lib/types/collapsible.d.ts +15 -0
- package/lib/types/collapsible.template.d.ts +2 -0
- package/lib/types/collapsible.ws.d.ts +7 -0
- package/lib/types/components.d.ts +12 -0
- package/lib/types/dialog.d.ts +23 -0
- package/lib/types/dialog.template.d.ts +10 -0
- package/lib/types/dialog.ws.d.ts +15 -0
- package/lib/types/hooks.d.ts +2 -0
- package/lib/types/label.d.ts +2 -0
- package/lib/types/label.template.d.ts +10 -0
- package/lib/types/label.ws.d.ts +3 -0
- package/lib/types/metas.d.ts +12 -0
- package/lib/types/navigation-menu.d.ts +10 -0
- package/lib/types/navigation-menu.template.d.ts +2 -0
- package/lib/types/navigation-menu.ws.d.ts +15 -0
- package/lib/types/popover.d.ts +15 -0
- package/lib/types/popover.template.d.ts +10 -0
- package/lib/types/popover.ws.d.ts +7 -0
- package/lib/types/props-descriptions.d.ts +29 -0
- package/lib/types/props.d.ts +12 -0
- package/lib/types/radio-group.d.ts +5 -0
- package/lib/types/radio-group.template.d.ts +2 -0
- package/lib/types/radio-group.ws.d.ts +7 -0
- package/lib/types/select.d.ts +14 -0
- package/lib/types/select.template.d.ts +2 -0
- package/lib/types/select.ws.d.ts +17 -0
- package/lib/types/shared/preset-styles.d.ts +2 -0
- package/lib/types/shared/proxy.d.ts +15 -0
- package/lib/types/shared/styles.d.ts +2 -0
- package/lib/types/shared/theme.d.ts +212 -0
- package/lib/types/sheet.template.d.ts +10 -0
- package/lib/types/switch.d.ts +4 -0
- package/lib/types/switch.template.d.ts +2 -0
- package/lib/types/switch.ws.d.ts +5 -0
- package/lib/types/tabs.d.ts +13 -0
- package/lib/types/tabs.template.d.ts +2 -0
- package/lib/types/tabs.ws.d.ts +9 -0
- package/lib/types/templates.d.ts +13 -0
- package/lib/types/tooltip.d.ts +15 -0
- package/lib/types/tooltip.template.d.ts +10 -0
- package/lib/types/tooltip.ws.d.ts +7 -0
- package/package.json +85 -0
package/lib/tabs.js
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as c, useCallback as m } from "react";
|
|
3
|
+
import { Root as f, List as b, Trigger as p, Content as T } from "@radix-ui/react-tabs";
|
|
4
|
+
import { getIndexWithinAncestorFromComponentProps as g, getClosestInstance as l } from "@webstudio-is/react-sdk/runtime";
|
|
5
|
+
import { useControllableState as d } from "@radix-ui/react-use-controllable-state";
|
|
6
|
+
import h from "await-interaction-response";
|
|
7
|
+
const S = c(({ defaultValue: e, ...t }, o) => {
|
|
8
|
+
const [n, a] = d({
|
|
9
|
+
prop: t.value,
|
|
10
|
+
defaultProp: e,
|
|
11
|
+
onChange: t.onValueChange
|
|
12
|
+
}), s = m(
|
|
13
|
+
async (u) => {
|
|
14
|
+
await h(), a(u);
|
|
15
|
+
},
|
|
16
|
+
[a]
|
|
17
|
+
);
|
|
18
|
+
return /* @__PURE__ */ i(
|
|
19
|
+
f,
|
|
20
|
+
{
|
|
21
|
+
ref: o,
|
|
22
|
+
...t,
|
|
23
|
+
value: n,
|
|
24
|
+
onValueChange: s
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
}), k = b, w = c(({ value: e, ...t }, o) => {
|
|
28
|
+
const n = g(t);
|
|
29
|
+
return /* @__PURE__ */ i(p, { ref: o, value: e ?? n ?? "", ...t });
|
|
30
|
+
}), y = c(({ value: e, ...t }, o) => {
|
|
31
|
+
const n = g(t);
|
|
32
|
+
return /* @__PURE__ */ i(T, { ref: o, value: e ?? n ?? "", ...t });
|
|
33
|
+
}), r = "@webstudio-is/sdk-components-react-radix", A = {
|
|
34
|
+
onNavigatorSelect: (e, t) => {
|
|
35
|
+
var o;
|
|
36
|
+
for (const n of t.instancePath)
|
|
37
|
+
if (n.component === `${r}:TabsContent` || n.component === `${r}:TabsTrigger`) {
|
|
38
|
+
const a = l(
|
|
39
|
+
t.instancePath,
|
|
40
|
+
n,
|
|
41
|
+
`${r}:Tabs`
|
|
42
|
+
), s = e.getPropValue(n, "value") ?? ((o = e.indexesWithinAncestors.get(n.id)) == null ? void 0 : o.toString());
|
|
43
|
+
a && s && e.setMemoryProp(a, "value", s);
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
onNavigatorUnselect: (e, t) => {
|
|
47
|
+
var o;
|
|
48
|
+
for (const n of t.instancePath)
|
|
49
|
+
if (n.component === `${r}:TabsContent` || n.component === `${r}:TabsTrigger`) {
|
|
50
|
+
const a = l(
|
|
51
|
+
t.instancePath,
|
|
52
|
+
n,
|
|
53
|
+
`${r}:Tabs`
|
|
54
|
+
), s = e.getPropValue(n, "value") ?? ((o = e.indexesWithinAncestors.get(n.id)) == null ? void 0 : o.toString());
|
|
55
|
+
a && s && e.setMemoryProp(a, "value", void 0);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
export {
|
|
60
|
+
S as Tabs,
|
|
61
|
+
y as TabsContent,
|
|
62
|
+
k as TabsList,
|
|
63
|
+
w as TabsTrigger,
|
|
64
|
+
A as hooksTabs
|
|
65
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { jsxs as s, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { css as a, PlaceholderValue as o } from "@webstudio-is/template";
|
|
3
|
+
import { radix as e } from "./shared/proxy.js";
|
|
4
|
+
import { borderRadius as l, spacing as n, fontSize as g, fontSizeLineHeight as h, weights as u, transition as b, boxShadow as r, opacity as p, colors as i, height as m } from "./shared/theme.js";
|
|
5
|
+
const d = a`
|
|
6
|
+
display: inline-flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
white-space: nowrap;
|
|
10
|
+
border-radius: ${l.md};
|
|
11
|
+
padding: ${n[1.5]} ${n[3]};
|
|
12
|
+
font-size: ${g.sm};
|
|
13
|
+
line-height: ${h.sm};
|
|
14
|
+
font-weight: ${u.medium};
|
|
15
|
+
transition: ${b.all};
|
|
16
|
+
&:focus-visible {
|
|
17
|
+
outline: 2px solid transparent;
|
|
18
|
+
outline-offset: 2px;
|
|
19
|
+
box-shadow: ${r.ring};
|
|
20
|
+
}
|
|
21
|
+
&:disabled {
|
|
22
|
+
pointer-events: none;
|
|
23
|
+
opacity: ${p[50]};
|
|
24
|
+
}
|
|
25
|
+
&[data-state="active"] {
|
|
26
|
+
background-color: ${i.background};
|
|
27
|
+
color: ${i.foreground};
|
|
28
|
+
box-shadow: ${r.sm};
|
|
29
|
+
}
|
|
30
|
+
`, c = a`
|
|
31
|
+
margin-top: ${n[2]};
|
|
32
|
+
&:focus-visible {
|
|
33
|
+
outline: none;
|
|
34
|
+
box-shadow: ${r.ring};
|
|
35
|
+
}
|
|
36
|
+
`, x = {
|
|
37
|
+
category: "radix",
|
|
38
|
+
description: "A set of panels with content that are displayed one at a time. Duplicate both a tab trigger and tab content to add more tabs. Triggers and content are connected according to their order in the Navigator.",
|
|
39
|
+
order: 2,
|
|
40
|
+
template: /* @__PURE__ */ s(e.Tabs, { defaultValue: "0", children: [
|
|
41
|
+
/* @__PURE__ */ s(
|
|
42
|
+
e.TabsList,
|
|
43
|
+
{
|
|
44
|
+
"ws:style": a`
|
|
45
|
+
display: inline-flex;
|
|
46
|
+
height: ${m[10]};
|
|
47
|
+
align-items: center;
|
|
48
|
+
justify-content: center;
|
|
49
|
+
border-radius: ${l.md};
|
|
50
|
+
background-color: ${i.muted};
|
|
51
|
+
padding: ${n[1]};
|
|
52
|
+
color: ${i.mutedForeground};
|
|
53
|
+
`,
|
|
54
|
+
children: [
|
|
55
|
+
/* @__PURE__ */ t(e.TabsTrigger, { "ws:style": d, children: new o("Account") }),
|
|
56
|
+
/* @__PURE__ */ t(e.TabsTrigger, { "ws:style": d, children: new o("Password") })
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
),
|
|
60
|
+
/* @__PURE__ */ t(e.TabsContent, { "ws:style": c, children: new o("Make changes to your account here.") }),
|
|
61
|
+
/* @__PURE__ */ t(e.TabsContent, { "ws:style": c, children: new o("Change your password here.") })
|
|
62
|
+
] })
|
|
63
|
+
};
|
|
64
|
+
export {
|
|
65
|
+
x as meta
|
|
66
|
+
};
|
package/lib/tabs.ws.js
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { TabsIcon as e, HeaderIcon as n, TriggerIcon as o, ContentIcon as s } from "@webstudio-is/icons/svg";
|
|
2
|
+
import { defaultStates as a } from "@webstudio-is/sdk";
|
|
3
|
+
import { button as r, div as c } from "@webstudio-is/sdk/normalize.css";
|
|
4
|
+
import { buttonReset as i } from "./shared/preset-styles.js";
|
|
5
|
+
import { propsTabs as p, propsTabsList as T, propsTabsTrigger as b, propsTabsContent as m } from "./__generated__/tabs.props.js";
|
|
6
|
+
const t = {
|
|
7
|
+
div: c
|
|
8
|
+
}, y = {
|
|
9
|
+
type: "container",
|
|
10
|
+
icon: e,
|
|
11
|
+
constraints: [
|
|
12
|
+
{
|
|
13
|
+
relation: "descendant",
|
|
14
|
+
component: { $eq: "TabsTrigger" }
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
relation: "descendant",
|
|
18
|
+
component: { $eq: "TabsList" }
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
relation: "descendant",
|
|
22
|
+
component: { $eq: "TabsContent" }
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
presetStyle: t
|
|
26
|
+
}, $ = {
|
|
27
|
+
type: "container",
|
|
28
|
+
icon: n,
|
|
29
|
+
constraints: {
|
|
30
|
+
relation: "ancestor",
|
|
31
|
+
component: { $eq: "Tabs" }
|
|
32
|
+
},
|
|
33
|
+
presetStyle: t
|
|
34
|
+
}, C = {
|
|
35
|
+
type: "container",
|
|
36
|
+
icon: o,
|
|
37
|
+
constraints: [
|
|
38
|
+
{
|
|
39
|
+
relation: "ancestor",
|
|
40
|
+
component: { $eq: "TabsList" }
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
relation: "ancestor",
|
|
44
|
+
component: { $neq: "TabsTrigger" }
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
indexWithinAncestor: "Tabs",
|
|
48
|
+
label: "Tab Trigger",
|
|
49
|
+
states: [
|
|
50
|
+
...a,
|
|
51
|
+
{
|
|
52
|
+
category: "component-states",
|
|
53
|
+
label: "Active",
|
|
54
|
+
selector: "[data-state=active]"
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
presetStyle: {
|
|
58
|
+
button: [r, i].flat()
|
|
59
|
+
}
|
|
60
|
+
}, L = {
|
|
61
|
+
type: "container",
|
|
62
|
+
label: "Tab Content",
|
|
63
|
+
icon: s,
|
|
64
|
+
constraints: {
|
|
65
|
+
relation: "ancestor",
|
|
66
|
+
component: { $eq: "Tabs" }
|
|
67
|
+
},
|
|
68
|
+
indexWithinAncestor: "Tabs",
|
|
69
|
+
presetStyle: t
|
|
70
|
+
}, u = {
|
|
71
|
+
props: p
|
|
72
|
+
}, I = {
|
|
73
|
+
props: T
|
|
74
|
+
}, M = {
|
|
75
|
+
props: b
|
|
76
|
+
}, v = {
|
|
77
|
+
props: m
|
|
78
|
+
};
|
|
79
|
+
export {
|
|
80
|
+
y as metaTabs,
|
|
81
|
+
L as metaTabsContent,
|
|
82
|
+
$ as metaTabsList,
|
|
83
|
+
C as metaTabsTrigger,
|
|
84
|
+
u as propsMetaTabs,
|
|
85
|
+
v as propsMetaTabsContent,
|
|
86
|
+
I as propsMetaTabsList,
|
|
87
|
+
M as propsMetaTabsTrigger
|
|
88
|
+
};
|
package/lib/templates.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { meta as a } from "./label.template.js";
|
|
2
|
+
import { meta as r } from "./tabs.template.js";
|
|
3
|
+
import { meta as p } from "./sheet.template.js";
|
|
4
|
+
import { meta as x } from "./dialog.template.js";
|
|
5
|
+
import { meta as i } from "./switch.template.js";
|
|
6
|
+
import { meta as c } from "./checkbox.template.js";
|
|
7
|
+
import { meta as h } from "./collapsible.template.js";
|
|
8
|
+
import { meta as S } from "./accordion.template.js";
|
|
9
|
+
import { meta as g } from "./tooltip.template.js";
|
|
10
|
+
import { meta as v } from "./popover.template.js";
|
|
11
|
+
import { meta as T } from "./radio-group.template.js";
|
|
12
|
+
import { meta as w } from "./select.template.js";
|
|
13
|
+
import { meta as D } from "./navigation-menu.template.js";
|
|
14
|
+
export {
|
|
15
|
+
S as Accordion,
|
|
16
|
+
c as Checkbox,
|
|
17
|
+
h as Collapsible,
|
|
18
|
+
x as Dialog,
|
|
19
|
+
a as Label,
|
|
20
|
+
D as NavigationMenu,
|
|
21
|
+
v as Popover,
|
|
22
|
+
T as RadioGroup,
|
|
23
|
+
w as Select,
|
|
24
|
+
p as Sheet,
|
|
25
|
+
i as Switch,
|
|
26
|
+
r as Tabs,
|
|
27
|
+
g as Tooltip
|
|
28
|
+
};
|
package/lib/tooltip.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import * as e from "@radix-ui/react-tooltip";
|
|
3
|
+
import { getClosestInstance as a } from "@webstudio-is/react-sdk/runtime";
|
|
4
|
+
import { forwardRef as c, Children as p } from "react";
|
|
5
|
+
const m = c((t, o) => /* @__PURE__ */ r(e.Provider, { children: /* @__PURE__ */ r(e.Root, { ...t }) })), h = c(({ children: t, ...o }, n) => {
|
|
6
|
+
const i = p.toArray(t)[0];
|
|
7
|
+
return /* @__PURE__ */ r(e.Trigger, { asChild: !0, ref: n, ...o, children: i ?? /* @__PURE__ */ r("button", { children: "Add button or link" }) });
|
|
8
|
+
}), T = c(({ sideOffset: t = 4, hideWhenDetached: o = !0, ...n }, i) => /* @__PURE__ */ r(e.Portal, { children: /* @__PURE__ */ r(
|
|
9
|
+
e.Content,
|
|
10
|
+
{
|
|
11
|
+
ref: i,
|
|
12
|
+
hideWhenDetached: o,
|
|
13
|
+
sideOffset: t,
|
|
14
|
+
...n
|
|
15
|
+
}
|
|
16
|
+
) })), s = "@webstudio-is/sdk-components-react-radix", P = {
|
|
17
|
+
onNavigatorUnselect: (t, o) => {
|
|
18
|
+
for (const n of o.instancePath)
|
|
19
|
+
if (n.component === `${s}:TooltipContent`) {
|
|
20
|
+
const i = a(
|
|
21
|
+
o.instancePath,
|
|
22
|
+
n,
|
|
23
|
+
`${s}:Tooltip`
|
|
24
|
+
);
|
|
25
|
+
i && t.setMemoryProp(i, "open", void 0);
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
onNavigatorSelect: (t, o) => {
|
|
29
|
+
for (const n of o.instancePath)
|
|
30
|
+
if (n.component === `${s}:TooltipContent`) {
|
|
31
|
+
const i = a(
|
|
32
|
+
o.instancePath,
|
|
33
|
+
n,
|
|
34
|
+
`${s}:Tooltip`
|
|
35
|
+
);
|
|
36
|
+
i && t.setMemoryProp(i, "open", !0);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
export {
|
|
41
|
+
m as Tooltip,
|
|
42
|
+
T as TooltipContent,
|
|
43
|
+
h as TooltipTrigger,
|
|
44
|
+
P as hooksTooltip
|
|
45
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsxs as d, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { $ as t, PlaceholderValue as r, css as l } from "@webstudio-is/template";
|
|
3
|
+
import { radix as e } from "./shared/proxy.js";
|
|
4
|
+
import { getButtonStyle as s } from "./shared/styles.js";
|
|
5
|
+
import { zIndex as a, borderRadius as h, colors as i, spacing as n, fontSize as p, fontSizeLineHeight as c, boxShadow as m } from "./shared/theme.js";
|
|
6
|
+
const $ = {
|
|
7
|
+
category: "radix",
|
|
8
|
+
description: "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.",
|
|
9
|
+
order: 7,
|
|
10
|
+
template: /* @__PURE__ */ d(e.Tooltip, { children: [
|
|
11
|
+
/* @__PURE__ */ o(e.TooltipTrigger, { children: /* @__PURE__ */ o(t.Button, { "ws:style": s("outline"), children: new r("Button") }) }),
|
|
12
|
+
/* @__PURE__ */ o(
|
|
13
|
+
e.TooltipContent,
|
|
14
|
+
{
|
|
15
|
+
"ws:style": l`
|
|
16
|
+
z-index: ${a[50]};
|
|
17
|
+
overflow: hidden;
|
|
18
|
+
border-radius: ${h.md};
|
|
19
|
+
background-color: ${i.popover};
|
|
20
|
+
padding: ${n[1.5]} ${n[3]};
|
|
21
|
+
font-size: ${p.sm};
|
|
22
|
+
line-height: ${c.sm};
|
|
23
|
+
color: ${i.popoverForeground};
|
|
24
|
+
box-shadow: ${m.md};
|
|
25
|
+
`,
|
|
26
|
+
children: /* @__PURE__ */ o(t.Text, { children: new r("The text you can edit") })
|
|
27
|
+
}
|
|
28
|
+
)
|
|
29
|
+
] })
|
|
30
|
+
};
|
|
31
|
+
export {
|
|
32
|
+
$ as meta
|
|
33
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { TriggerIcon as o, ContentIcon as t, TooltipIcon as n } from "@webstudio-is/icons/svg";
|
|
2
|
+
import { div as e } from "@webstudio-is/sdk/normalize.css";
|
|
3
|
+
import { propsTooltip as i, propsTooltipTrigger as p, propsTooltipContent as r } from "./__generated__/tooltip.props.js";
|
|
4
|
+
const l = {
|
|
5
|
+
type: "container",
|
|
6
|
+
icon: o,
|
|
7
|
+
constraints: {
|
|
8
|
+
relation: "ancestor",
|
|
9
|
+
component: { $eq: "Tooltip" }
|
|
10
|
+
}
|
|
11
|
+
}, T = {
|
|
12
|
+
type: "container",
|
|
13
|
+
icon: t,
|
|
14
|
+
presetStyle: {
|
|
15
|
+
div: e
|
|
16
|
+
},
|
|
17
|
+
constraints: {
|
|
18
|
+
relation: "ancestor",
|
|
19
|
+
component: { $eq: "Tooltip" }
|
|
20
|
+
}
|
|
21
|
+
}, m = {
|
|
22
|
+
type: "container",
|
|
23
|
+
constraints: [
|
|
24
|
+
{
|
|
25
|
+
relation: "descendant",
|
|
26
|
+
component: { $eq: "TooltipTrigger" }
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
relation: "descendant",
|
|
30
|
+
component: { $eq: "TooltipContent" }
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
icon: n
|
|
34
|
+
}, g = {
|
|
35
|
+
props: i,
|
|
36
|
+
initialProps: ["open", "delayDuration", "disableHoverableContent"]
|
|
37
|
+
}, d = {
|
|
38
|
+
props: p
|
|
39
|
+
}, f = {
|
|
40
|
+
props: r,
|
|
41
|
+
initialProps: ["side", "sideOffset", "align", "alignOffset"]
|
|
42
|
+
};
|
|
43
|
+
export {
|
|
44
|
+
m as metaTooltip,
|
|
45
|
+
T as metaTooltipContent,
|
|
46
|
+
l as metaTooltipTrigger,
|
|
47
|
+
g as propsMetaTooltip,
|
|
48
|
+
f as propsMetaTooltipContent,
|
|
49
|
+
d as propsMetaTooltipTrigger
|
|
50
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { PropMeta } from "@webstudio-is/sdk";
|
|
2
|
+
export declare const propsAccordion: Record<string, PropMeta>;
|
|
3
|
+
export declare const propsAccordionItem: Record<string, PropMeta>;
|
|
4
|
+
export declare const propsAccordionHeader: Record<string, PropMeta>;
|
|
5
|
+
export declare const propsAccordionTrigger: Record<string, PropMeta>;
|
|
6
|
+
export declare const propsAccordionContent: Record<string, PropMeta>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { PropMeta } from "@webstudio-is/sdk";
|
|
2
|
+
export declare const propsDialog: Record<string, PropMeta>;
|
|
3
|
+
export declare const propsDialogTrigger: Record<string, PropMeta>;
|
|
4
|
+
export declare const propsDialogOverlay: Record<string, PropMeta>;
|
|
5
|
+
export declare const propsDialogContent: Record<string, PropMeta>;
|
|
6
|
+
export declare const propsDialogClose: Record<string, PropMeta>;
|
|
7
|
+
export declare const propsDialogTitle: Record<string, PropMeta>;
|
|
8
|
+
export declare const propsDialogDescription: Record<string, PropMeta>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { PropMeta } from "@webstudio-is/sdk";
|
|
2
|
+
export declare const propsNavigationMenu: Record<string, PropMeta>;
|
|
3
|
+
export declare const propsNavigationMenuList: Record<string, PropMeta>;
|
|
4
|
+
export declare const propsNavigationMenuViewport: Record<string, PropMeta>;
|
|
5
|
+
export declare const propsNavigationMenuContent: Record<string, PropMeta>;
|
|
6
|
+
export declare const propsNavigationMenuItem: Record<string, PropMeta>;
|
|
7
|
+
export declare const propsNavigationMenuLink: Record<string, PropMeta>;
|
|
8
|
+
export declare const propsNavigationMenuTrigger: Record<string, PropMeta>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { PropMeta } from "@webstudio-is/sdk";
|
|
2
|
+
export declare const propsSelect: Record<string, PropMeta>;
|
|
3
|
+
export declare const propsSelectTrigger: Record<string, PropMeta>;
|
|
4
|
+
export declare const propsSelectValue: Record<string, PropMeta>;
|
|
5
|
+
export declare const propsSelectContent: Record<string, PropMeta>;
|
|
6
|
+
export declare const propsSelectViewport: Record<string, PropMeta>;
|
|
7
|
+
export declare const propsSelectItem: Record<string, PropMeta>;
|
|
8
|
+
export declare const propsSelectItemIndicator: Record<string, PropMeta>;
|
|
9
|
+
export declare const propsSelectItemText: Record<string, PropMeta>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { PropMeta } from "@webstudio-is/sdk";
|
|
2
|
+
export declare const propsTabs: Record<string, PropMeta>;
|
|
3
|
+
export declare const propsTabsList: Record<string, PropMeta>;
|
|
4
|
+
export declare const propsTabsTrigger: Record<string, PropMeta>;
|
|
5
|
+
export declare const propsTabsContent: Record<string, PropMeta>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ForwardRefExoticComponent, type ComponentProps, type RefAttributes } from "react";
|
|
2
|
+
import { Header, Trigger, Content } from "@radix-ui/react-accordion";
|
|
3
|
+
import { type Hook } from "@webstudio-is/react-sdk/runtime";
|
|
4
|
+
export declare const Accordion: ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/react-accordion").AccordionSingleProps & RefAttributes<HTMLDivElement>, "ref">, "type" | "asChild"> & RefAttributes<HTMLDivElement>>;
|
|
5
|
+
export declare const AccordionItem: ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/react-accordion").AccordionItemProps & RefAttributes<HTMLDivElement>, "ref">, "value"> & {
|
|
6
|
+
value?: string;
|
|
7
|
+
} & RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export declare const AccordionHeader: ForwardRefExoticComponent<Omit<ComponentProps<typeof Header>, "asChild"> & RefAttributes<HTMLHeadingElement>>;
|
|
9
|
+
export declare const AccordionTrigger: ForwardRefExoticComponent<Omit<ComponentProps<typeof Trigger>, "asChild"> & RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
export declare const AccordionContent: ForwardRefExoticComponent<Omit<ComponentProps<typeof Content>, "asChild"> & RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export declare const hooksAccordion: Hook;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type TemplateMeta } from "@webstudio-is/template";
|
|
2
|
+
/**
|
|
3
|
+
* Styles source without animations:
|
|
4
|
+
* https://github.com/shadcn-ui/ui/blob/main/apps/www/registry/default/ui/accordion.tsx
|
|
5
|
+
*
|
|
6
|
+
* Attributions
|
|
7
|
+
* MIT License
|
|
8
|
+
* Copyright (c) 2023 shadcn
|
|
9
|
+
**/
|
|
10
|
+
export declare const meta: TemplateMeta;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type WsComponentMeta, type WsComponentPropsMeta } from "@webstudio-is/sdk";
|
|
2
|
+
export declare const metaAccordion: WsComponentMeta;
|
|
3
|
+
export declare const metaAccordionItem: WsComponentMeta;
|
|
4
|
+
export declare const metaAccordionHeader: WsComponentMeta;
|
|
5
|
+
export declare const metaAccordionTrigger: WsComponentMeta;
|
|
6
|
+
export declare const metaAccordionContent: WsComponentMeta;
|
|
7
|
+
export declare const propsMetaAccordion: WsComponentPropsMeta;
|
|
8
|
+
export declare const propsMetaAccordionItem: WsComponentPropsMeta;
|
|
9
|
+
export declare const propsMetaAccordionHeader: WsComponentPropsMeta;
|
|
10
|
+
export declare const propsMetaAccordionTrigger: WsComponentPropsMeta;
|
|
11
|
+
export declare const propsMetaAccordionContent: WsComponentPropsMeta;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ForwardRefExoticComponent, type ComponentProps } from "react";
|
|
2
|
+
import { Indicator } from "@radix-ui/react-checkbox";
|
|
3
|
+
export declare const Checkbox: ForwardRefExoticComponent<Omit<Omit<Omit<import("@radix-ui/react-checkbox").CheckboxProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
4
|
+
ref?: ((instance: HTMLButtonElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
5
|
+
}, "defaultChecked" | "checked"> & {
|
|
6
|
+
checked?: boolean;
|
|
7
|
+
defaultChecked?: boolean;
|
|
8
|
+
}, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
export declare const CheckboxIndicator: ForwardRefExoticComponent<ComponentProps<typeof Indicator> & React.RefAttributes<HTMLSpanElement>>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type WsComponentMeta, type WsComponentPropsMeta } from "@webstudio-is/sdk";
|
|
2
|
+
export declare const metaCheckbox: WsComponentMeta;
|
|
3
|
+
export declare const metaCheckboxIndicator: WsComponentMeta;
|
|
4
|
+
export declare const propsMetaCheckbox: WsComponentPropsMeta;
|
|
5
|
+
export declare const propsMetaCheckboxIndicator: WsComponentPropsMeta;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type ReactNode, type ForwardRefExoticComponent, type ComponentProps, type RefAttributes } from "react";
|
|
2
|
+
import { Root, Content } from "@radix-ui/react-collapsible";
|
|
3
|
+
import { type Hook } from "@webstudio-is/react-sdk/runtime";
|
|
4
|
+
export declare const Collapsible: ForwardRefExoticComponent<Omit<ComponentProps<typeof Root>, "defaultOpen" | "asChild"> & RefAttributes<HTMLDivElement>>;
|
|
5
|
+
/**
|
|
6
|
+
* We're not exposing the 'asChild' property for the Trigger.
|
|
7
|
+
* Instead, we're enforcing 'asChild=true' for the Trigger and making it style-less.
|
|
8
|
+
* This avoids situations where the Trigger inadvertently passes all styles to its child,
|
|
9
|
+
* which would prevent us from displaying styles properly in the builder.
|
|
10
|
+
*/
|
|
11
|
+
export declare const CollapsibleTrigger: ForwardRefExoticComponent<{
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
} & RefAttributes<HTMLButtonElement>>;
|
|
14
|
+
export declare const CollapsibleContent: ForwardRefExoticComponent<Omit<ComponentProps<typeof Content>, "asChild"> & RefAttributes<HTMLDivElement>>;
|
|
15
|
+
export declare const hooksCollapsible: Hook;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { WsComponentMeta, WsComponentPropsMeta } from "@webstudio-is/sdk";
|
|
2
|
+
export declare const metaCollapsible: WsComponentMeta;
|
|
3
|
+
export declare const metaCollapsibleTrigger: WsComponentMeta;
|
|
4
|
+
export declare const metaCollapsibleContent: WsComponentMeta;
|
|
5
|
+
export declare const propsMetaCollapsible: WsComponentPropsMeta;
|
|
6
|
+
export declare const propsMetaCollapsibleTrigger: WsComponentPropsMeta;
|
|
7
|
+
export declare const propsMetaCollapsibleContent: WsComponentPropsMeta;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { Collapsible, CollapsibleTrigger, CollapsibleContent, } from "./collapsible";
|
|
2
|
+
export { Dialog, DialogTrigger, DialogOverlay, DialogContent, DialogClose, DialogTitle, DialogDescription, } from "./dialog";
|
|
3
|
+
export { Popover, PopoverTrigger, PopoverContent } from "./popover";
|
|
4
|
+
export { Tooltip, TooltipTrigger, TooltipContent } from "./tooltip";
|
|
5
|
+
export { Tabs, TabsList, TabsTrigger, TabsContent } from "./tabs";
|
|
6
|
+
export { Label } from "./label";
|
|
7
|
+
export { Accordion, AccordionItem, AccordionHeader, AccordionTrigger, AccordionContent, } from "./accordion";
|
|
8
|
+
export { NavigationMenu, NavigationMenuList, NavigationMenuItem, NavigationMenuTrigger, NavigationMenuContent, NavigationMenuLink, NavigationMenuViewport, } from "./navigation-menu";
|
|
9
|
+
export { Select, SelectTrigger, SelectValue, SelectViewport, SelectContent, SelectItem, SelectItemIndicator, SelectItemText, } from "./select";
|
|
10
|
+
export { Switch, SwitchThumb } from "./switch";
|
|
11
|
+
export { Checkbox, CheckboxIndicator } from "./checkbox";
|
|
12
|
+
export { RadioGroup, RadioGroupItem, RadioGroupIndicator } from "./radio-group";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
3
|
+
import { type Hook } from "@webstudio-is/react-sdk/runtime";
|
|
4
|
+
export declare const Dialog: import("react").ForwardRefExoticComponent<Omit<DialogPrimitive.DialogProps, "defaultOpen"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
|
+
/**
|
|
6
|
+
* We're not exposing the 'asChild' property for the Trigger.
|
|
7
|
+
* Instead, we're enforcing 'asChild=true' for the Trigger and making it style-less.
|
|
8
|
+
* This avoids situations where the Trigger inadvertently passes all styles to its child,
|
|
9
|
+
* which would prevent us from displaying styles properly in the builder.
|
|
10
|
+
*/
|
|
11
|
+
export declare const DialogTrigger: import("react").ForwardRefExoticComponent<{
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
14
|
+
export declare const DialogOverlay: import("react").ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
15
|
+
export declare const DialogContent: import("react").ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
16
|
+
export declare const DialogClose: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
17
|
+
type Tag = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
18
|
+
export declare const DialogTitle: import("react").ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & import("react").RefAttributes<HTMLHeadingElement> & {
|
|
19
|
+
tag?: Tag;
|
|
20
|
+
}, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
21
|
+
export declare const DialogDescription: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogDescriptionProps & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
22
|
+
export declare const hooksDialog: Hook;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type TemplateMeta } from "@webstudio-is/template";
|
|
2
|
+
/**
|
|
3
|
+
* Styles source without animations:
|
|
4
|
+
* https://github.com/shadcn-ui/ui/blob/main/apps/www/registry/default/ui/dialog.tsx
|
|
5
|
+
*
|
|
6
|
+
* Attributions
|
|
7
|
+
* MIT License
|
|
8
|
+
* Copyright (c) 2023 shadcn
|
|
9
|
+
**/
|
|
10
|
+
export declare const meta: TemplateMeta;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type WsComponentMeta, type WsComponentPropsMeta } from "@webstudio-is/sdk";
|
|
2
|
+
export declare const metaDialogTrigger: WsComponentMeta;
|
|
3
|
+
export declare const metaDialogOverlay: WsComponentMeta;
|
|
4
|
+
export declare const metaDialogContent: WsComponentMeta;
|
|
5
|
+
export declare const metaDialogTitle: WsComponentMeta;
|
|
6
|
+
export declare const metaDialogDescription: WsComponentMeta;
|
|
7
|
+
export declare const metaDialogClose: WsComponentMeta;
|
|
8
|
+
export declare const metaDialog: WsComponentMeta;
|
|
9
|
+
export declare const propsMetaDialog: WsComponentPropsMeta;
|
|
10
|
+
export declare const propsMetaDialogTrigger: WsComponentPropsMeta;
|
|
11
|
+
export declare const propsMetaDialogContent: WsComponentPropsMeta;
|
|
12
|
+
export declare const propsMetaDialogOverlay: WsComponentPropsMeta;
|
|
13
|
+
export declare const propsMetaDialogClose: WsComponentPropsMeta;
|
|
14
|
+
export declare const propsMetaDialogTitle: WsComponentPropsMeta;
|
|
15
|
+
export declare const propsMetaDialogDescription: WsComponentPropsMeta;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
2
|
+
export declare const Label: import("react").ForwardRefExoticComponent<Omit<Omit<LabelPrimitive.LabelProps & import("react").RefAttributes<HTMLLabelElement>, "ref">, "asChild"> & import("react").RefAttributes<HTMLLabelElement>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type TemplateMeta } from "@webstudio-is/template";
|
|
2
|
+
/**
|
|
3
|
+
* Styles source without animations:
|
|
4
|
+
* https://github.com/shadcn-ui/ui/blob/main/apps/www/registry/default/ui/label.tsx
|
|
5
|
+
*
|
|
6
|
+
* Attributions
|
|
7
|
+
* MIT License
|
|
8
|
+
* Copyright (c) 2023 shadcn
|
|
9
|
+
**/
|
|
10
|
+
export declare const meta: TemplateMeta;
|