@webstudio-is/sdk-components-react-radix 0.260.2 → 0.261.1
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/accordion.template.js +12 -6
- package/lib/accordion.ws.js +41 -26
- package/lib/checkbox.ws.js +16 -10
- package/lib/collapsible.ws.js +29 -17
- package/lib/dialog.ws.js +39 -27
- package/lib/navigation-menu.ws.js +51 -39
- package/lib/popover.ws.js +26 -18
- package/lib/radio-group.ws.js +4 -4
- package/lib/select.ws.js +38 -26
- package/lib/switch.ws.js +4 -4
- package/lib/tabs.ws.js +26 -19
- package/lib/tooltip.ws.js +21 -11
- package/package.json +8 -8
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { $ as o, PlaceholderValue as
|
|
2
|
+
import { $ as o, PlaceholderValue as a, css as t } from "@webstudio-is/template";
|
|
3
3
|
import { radix as i } from "./shared/proxy.js";
|
|
4
|
-
import { height as h, width as m, transition as
|
|
4
|
+
import { height as h, width as m, transition as s, spacing as c, weights as g, fontSize as f, fontSizeLineHeight as p, borderWidth as w, colors as y } from "./shared/theme.js";
|
|
5
5
|
import { ChevronDownIcon as b } from "@webstudio-is/icons/svg";
|
|
6
6
|
const n = (d, l) => /* @__PURE__ */ r(
|
|
7
7
|
i.AccordionItem,
|
|
@@ -35,7 +35,7 @@ const n = (d, l) => /* @__PURE__ */ r(
|
|
|
35
35
|
}
|
|
36
36
|
`,
|
|
37
37
|
children: [
|
|
38
|
-
/* @__PURE__ */ e(o.Text, { children: new
|
|
38
|
+
/* @__PURE__ */ e(o.Text, { children: new a(d) }),
|
|
39
39
|
/* @__PURE__ */ e(
|
|
40
40
|
o.Box,
|
|
41
41
|
{
|
|
@@ -45,7 +45,7 @@ const n = (d, l) => /* @__PURE__ */ r(
|
|
|
45
45
|
height: ${h[4]};
|
|
46
46
|
width: ${m[4]};
|
|
47
47
|
flex-shrink: 0;
|
|
48
|
-
transition: ${
|
|
48
|
+
transition: ${s.all};
|
|
49
49
|
transition-duration: 200ms;
|
|
50
50
|
`,
|
|
51
51
|
children: /* @__PURE__ */ e(o.HtmlEmbed, { "ws:label": "Chevron Icon", code: b })
|
|
@@ -63,10 +63,16 @@ const n = (d, l) => /* @__PURE__ */ r(
|
|
|
63
63
|
overflow: hidden;
|
|
64
64
|
font-size: ${f.sm};
|
|
65
65
|
line-height: ${p.sm};
|
|
66
|
-
transition: ${
|
|
66
|
+
transition: ${s.all};
|
|
67
67
|
padding-bottom: ${c[4]};
|
|
68
|
+
&[data-state="closed"] {
|
|
69
|
+
height: 0;
|
|
70
|
+
}
|
|
71
|
+
&[data-state="open"] {
|
|
72
|
+
height: var(--radix-accordion-content-height);
|
|
73
|
+
}
|
|
68
74
|
`,
|
|
69
|
-
children: new
|
|
75
|
+
children: new a(l)
|
|
70
76
|
}
|
|
71
77
|
)
|
|
72
78
|
]
|
package/lib/accordion.ws.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { AccordionIcon as
|
|
2
|
-
import { div as
|
|
1
|
+
import { AccordionIcon as o, ItemIcon as n, HeaderIcon as c, TriggerIcon as r, ContentIcon as a } from "@webstudio-is/icons/svg";
|
|
2
|
+
import { div as t, h3 as s, button as l } from "@webstudio-is/sdk/normalize.css";
|
|
3
3
|
import { radix as e } from "./shared/meta.js";
|
|
4
|
-
import { buttonReset as
|
|
5
|
-
import { propsAccordion as
|
|
6
|
-
const
|
|
7
|
-
icon:
|
|
4
|
+
import { buttonReset as i } from "./shared/preset-styles.js";
|
|
5
|
+
import { propsAccordion as d, propsAccordionItem as p, propsAccordionHeader as m, propsAccordionTrigger as b, propsAccordionContent as g } from "./__generated__/accordion.props.js";
|
|
6
|
+
const C = {
|
|
7
|
+
icon: o,
|
|
8
8
|
contentModel: {
|
|
9
9
|
category: "instance",
|
|
10
10
|
children: ["instance"],
|
|
11
11
|
descendants: [e.AccordionItem]
|
|
12
12
|
},
|
|
13
|
-
presetStyle: { div:
|
|
13
|
+
presetStyle: { div: t },
|
|
14
14
|
initialProps: ["value", "collapsible"],
|
|
15
|
-
props:
|
|
16
|
-
},
|
|
15
|
+
props: d
|
|
16
|
+
}, v = {
|
|
17
17
|
label: "Item",
|
|
18
18
|
icon: n,
|
|
19
19
|
indexWithinAncestor: e.Accordion,
|
|
@@ -22,20 +22,28 @@ const v = {
|
|
|
22
22
|
children: ["instance"],
|
|
23
23
|
descendants: [e.AccordionHeader, e.AccordionContent]
|
|
24
24
|
},
|
|
25
|
-
|
|
25
|
+
states: [
|
|
26
|
+
{ label: "Open", selector: '[data-state="open"]' },
|
|
27
|
+
{ label: "Closed", selector: '[data-state="closed"]' }
|
|
28
|
+
],
|
|
29
|
+
presetStyle: { div: t },
|
|
26
30
|
initialProps: ["value"],
|
|
27
|
-
props:
|
|
28
|
-
},
|
|
31
|
+
props: p
|
|
32
|
+
}, x = {
|
|
29
33
|
label: "Item Header",
|
|
30
|
-
icon:
|
|
34
|
+
icon: c,
|
|
31
35
|
contentModel: {
|
|
32
36
|
category: "none",
|
|
33
37
|
children: ["instance"],
|
|
34
38
|
descendants: [e.AccordionTrigger]
|
|
35
39
|
},
|
|
40
|
+
states: [
|
|
41
|
+
{ label: "Open", selector: '[data-state="open"]' },
|
|
42
|
+
{ label: "Closed", selector: '[data-state="closed"]' }
|
|
43
|
+
],
|
|
36
44
|
presetStyle: {
|
|
37
45
|
h3: [
|
|
38
|
-
...
|
|
46
|
+
...s,
|
|
39
47
|
{
|
|
40
48
|
property: "margin-top",
|
|
41
49
|
value: { type: "unit", unit: "px", value: 0 }
|
|
@@ -47,34 +55,41 @@ const v = {
|
|
|
47
55
|
]
|
|
48
56
|
},
|
|
49
57
|
props: m
|
|
50
|
-
},
|
|
58
|
+
}, f = {
|
|
51
59
|
label: "Item Trigger",
|
|
52
|
-
icon:
|
|
60
|
+
icon: r,
|
|
53
61
|
contentModel: {
|
|
54
62
|
category: "none",
|
|
55
63
|
children: ["instance", "rich-text"]
|
|
56
64
|
},
|
|
57
|
-
states: [
|
|
65
|
+
states: [
|
|
66
|
+
{ label: "Open", selector: '[data-state="open"]' },
|
|
67
|
+
{ label: "Closed", selector: '[data-state="closed"]' }
|
|
68
|
+
],
|
|
58
69
|
presetStyle: {
|
|
59
|
-
button: [
|
|
70
|
+
button: [l, i].flat()
|
|
60
71
|
},
|
|
61
|
-
props:
|
|
72
|
+
props: b
|
|
62
73
|
}, H = {
|
|
63
74
|
label: "Item Content",
|
|
64
|
-
icon:
|
|
75
|
+
icon: a,
|
|
65
76
|
contentModel: {
|
|
66
77
|
category: "none",
|
|
67
78
|
children: ["instance", "rich-text"]
|
|
68
79
|
},
|
|
80
|
+
states: [
|
|
81
|
+
{ label: "Open", selector: '[data-state="open"]' },
|
|
82
|
+
{ label: "Closed", selector: '[data-state="closed"]' }
|
|
83
|
+
],
|
|
69
84
|
presetStyle: {
|
|
70
|
-
div:
|
|
85
|
+
div: t
|
|
71
86
|
},
|
|
72
|
-
props:
|
|
87
|
+
props: g
|
|
73
88
|
};
|
|
74
89
|
export {
|
|
75
|
-
|
|
90
|
+
C as metaAccordion,
|
|
76
91
|
H as metaAccordionContent,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
92
|
+
x as metaAccordionHeader,
|
|
93
|
+
v as metaAccordionItem,
|
|
94
|
+
f as metaAccordionTrigger
|
|
80
95
|
};
|
package/lib/checkbox.ws.js
CHANGED
|
@@ -1,32 +1,38 @@
|
|
|
1
1
|
import { CheckboxCheckedIcon as e, TriggerIcon as t } from "@webstudio-is/icons/svg";
|
|
2
|
-
import { button as
|
|
3
|
-
import { radix as
|
|
4
|
-
import { buttonReset as
|
|
5
|
-
import { propsCheckbox as
|
|
2
|
+
import { button as c, span as a } from "@webstudio-is/sdk/normalize.css";
|
|
3
|
+
import { radix as o } from "./shared/meta.js";
|
|
4
|
+
import { buttonReset as n } from "./shared/preset-styles.js";
|
|
5
|
+
import { propsCheckbox as r, propsCheckboxIndicator as s } from "./__generated__/checkbox.props.js";
|
|
6
6
|
const m = {
|
|
7
7
|
icon: e,
|
|
8
8
|
contentModel: {
|
|
9
9
|
category: "instance",
|
|
10
10
|
children: ["instance"],
|
|
11
|
-
descendants: [
|
|
11
|
+
descendants: [o.CheckboxIndicator]
|
|
12
12
|
},
|
|
13
13
|
states: [
|
|
14
|
-
{ label: "Checked", selector:
|
|
15
|
-
{ label: "Unchecked", selector:
|
|
14
|
+
{ label: "Checked", selector: '[data-state="checked"]' },
|
|
15
|
+
{ label: "Unchecked", selector: '[data-state="unchecked"]' },
|
|
16
|
+
{ label: "Indeterminate", selector: '[data-state="indeterminate"]' }
|
|
16
17
|
],
|
|
17
18
|
presetStyle: {
|
|
18
|
-
button: [
|
|
19
|
+
button: [c, n].flat()
|
|
19
20
|
},
|
|
20
21
|
initialProps: ["id", "class", "name", "value", "required", "checked"],
|
|
21
|
-
props:
|
|
22
|
+
props: r
|
|
22
23
|
}, k = {
|
|
23
24
|
icon: t,
|
|
24
25
|
contentModel: {
|
|
25
26
|
category: "none",
|
|
26
27
|
children: ["instance", "rich-text"]
|
|
27
28
|
},
|
|
29
|
+
states: [
|
|
30
|
+
{ label: "Checked", selector: '[data-state="checked"]' },
|
|
31
|
+
{ label: "Unchecked", selector: '[data-state="unchecked"]' },
|
|
32
|
+
{ label: "Indeterminate", selector: '[data-state="indeterminate"]' }
|
|
33
|
+
],
|
|
28
34
|
presetStyle: {
|
|
29
|
-
span:
|
|
35
|
+
span: a
|
|
30
36
|
},
|
|
31
37
|
props: s
|
|
32
38
|
};
|
package/lib/collapsible.ws.js
CHANGED
|
@@ -1,39 +1,51 @@
|
|
|
1
|
-
import { CollapsibleIcon as
|
|
2
|
-
import { div as
|
|
1
|
+
import { CollapsibleIcon as o, TriggerIcon as l, ContentIcon as s } from "@webstudio-is/icons/svg";
|
|
2
|
+
import { div as t } from "@webstudio-is/sdk/normalize.css";
|
|
3
3
|
import { radix as e } from "./shared/meta.js";
|
|
4
|
-
import { propsCollapsible as
|
|
5
|
-
const
|
|
6
|
-
icon:
|
|
4
|
+
import { propsCollapsible as a, propsCollapsibleTrigger as n, propsCollapsibleContent as r } from "./__generated__/collapsible.props.js";
|
|
5
|
+
const C = {
|
|
6
|
+
icon: o,
|
|
7
7
|
contentModel: {
|
|
8
8
|
category: "instance",
|
|
9
9
|
children: ["instance"],
|
|
10
10
|
descendants: [e.CollapsibleTrigger, e.CollapsibleContent]
|
|
11
11
|
},
|
|
12
|
+
states: [
|
|
13
|
+
{ label: "Open", selector: '[data-state="open"]' },
|
|
14
|
+
{ label: "Closed", selector: '[data-state="closed"]' }
|
|
15
|
+
],
|
|
12
16
|
presetStyle: {
|
|
13
|
-
div:
|
|
17
|
+
div: t
|
|
14
18
|
},
|
|
15
19
|
initialProps: ["open"],
|
|
16
|
-
props:
|
|
17
|
-
},
|
|
18
|
-
icon:
|
|
20
|
+
props: a
|
|
21
|
+
}, b = {
|
|
22
|
+
icon: l,
|
|
19
23
|
contentModel: {
|
|
20
24
|
category: "none",
|
|
21
25
|
children: ["instance", "rich-text"]
|
|
22
26
|
},
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
27
|
+
states: [
|
|
28
|
+
{ label: "Open", selector: '[data-state="open"]' },
|
|
29
|
+
{ label: "Closed", selector: '[data-state="closed"]' }
|
|
30
|
+
],
|
|
31
|
+
props: n
|
|
32
|
+
}, g = {
|
|
33
|
+
icon: s,
|
|
26
34
|
contentModel: {
|
|
27
35
|
category: "none",
|
|
28
36
|
children: ["instance", "rich-text"]
|
|
29
37
|
},
|
|
38
|
+
states: [
|
|
39
|
+
{ label: "Open", selector: '[data-state="open"]' },
|
|
40
|
+
{ label: "Closed", selector: '[data-state="closed"]' }
|
|
41
|
+
],
|
|
30
42
|
presetStyle: {
|
|
31
|
-
div:
|
|
43
|
+
div: t
|
|
32
44
|
},
|
|
33
|
-
props:
|
|
45
|
+
props: r
|
|
34
46
|
};
|
|
35
47
|
export {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
48
|
+
C as metaCollapsible,
|
|
49
|
+
g as metaCollapsibleContent,
|
|
50
|
+
b as metaCollapsibleTrigger
|
|
39
51
|
};
|
package/lib/dialog.ws.js
CHANGED
|
@@ -1,39 +1,51 @@
|
|
|
1
|
-
import { DialogIcon as t, TriggerIcon as n, OverlayIcon as
|
|
2
|
-
import { div as
|
|
3
|
-
import { radix as
|
|
4
|
-
import { propsDialog as
|
|
5
|
-
import { buttonReset as
|
|
6
|
-
const
|
|
1
|
+
import { DialogIcon as t, TriggerIcon as n, OverlayIcon as a, ContentIcon as l, ButtonElementIcon as s, HeadingIcon as i, TextIcon as r } from "@webstudio-is/icons/svg";
|
|
2
|
+
import { div as o, button as c, h2 as p, p as g } from "@webstudio-is/sdk/normalize.css";
|
|
3
|
+
import { radix as e } from "./shared/meta.js";
|
|
4
|
+
import { propsDialog as d, propsDialogTrigger as D, propsDialogOverlay as m, propsDialogContent as y, propsDialogClose as h, propsDialogTitle as C, propsDialogDescription as b } from "./__generated__/dialog.props.js";
|
|
5
|
+
import { buttonReset as T } from "./shared/preset-styles.js";
|
|
6
|
+
const u = {
|
|
7
7
|
icon: n,
|
|
8
8
|
contentModel: {
|
|
9
9
|
category: "none",
|
|
10
10
|
children: ["instance"]
|
|
11
11
|
},
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
states: [
|
|
13
|
+
{ label: "Open", selector: '[data-state="open"]' },
|
|
14
|
+
{ label: "Closed", selector: '[data-state="closed"]' }
|
|
15
|
+
],
|
|
16
|
+
props: D
|
|
17
|
+
}, v = {
|
|
18
|
+
icon: a,
|
|
15
19
|
contentModel: {
|
|
16
20
|
category: "none",
|
|
17
21
|
children: ["instance"],
|
|
18
|
-
descendants: [
|
|
22
|
+
descendants: [e.DialogContent]
|
|
19
23
|
},
|
|
20
|
-
|
|
24
|
+
states: [
|
|
25
|
+
{ label: "Open", selector: '[data-state="open"]' },
|
|
26
|
+
{ label: "Closed", selector: '[data-state="closed"]' }
|
|
27
|
+
],
|
|
28
|
+
presetStyle: { div: o },
|
|
21
29
|
props: m
|
|
22
|
-
},
|
|
23
|
-
icon:
|
|
30
|
+
}, S = {
|
|
31
|
+
icon: l,
|
|
24
32
|
contentModel: {
|
|
25
33
|
category: "none",
|
|
26
34
|
children: ["instance"],
|
|
27
35
|
descendants: [
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
36
|
+
e.DialogTitle,
|
|
37
|
+
e.DialogDescription,
|
|
38
|
+
e.DialogClose
|
|
31
39
|
]
|
|
32
40
|
},
|
|
33
|
-
|
|
41
|
+
states: [
|
|
42
|
+
{ label: "Open", selector: '[data-state="open"]' },
|
|
43
|
+
{ label: "Closed", selector: '[data-state="closed"]' }
|
|
44
|
+
],
|
|
45
|
+
presetStyle: { div: o },
|
|
34
46
|
props: y
|
|
35
47
|
}, B = {
|
|
36
|
-
icon:
|
|
48
|
+
icon: i,
|
|
37
49
|
contentModel: {
|
|
38
50
|
category: "none",
|
|
39
51
|
children: ["instance", "rich-text"]
|
|
@@ -41,22 +53,22 @@ const S = {
|
|
|
41
53
|
presetStyle: { h2: p },
|
|
42
54
|
props: C
|
|
43
55
|
}, E = {
|
|
44
|
-
icon:
|
|
56
|
+
icon: r,
|
|
45
57
|
contentModel: {
|
|
46
58
|
category: "none",
|
|
47
59
|
children: ["instance", "rich-text"]
|
|
48
60
|
},
|
|
49
61
|
presetStyle: { p: g },
|
|
50
|
-
props:
|
|
62
|
+
props: b
|
|
51
63
|
}, H = {
|
|
52
|
-
icon:
|
|
64
|
+
icon: s,
|
|
53
65
|
label: "Close Button",
|
|
54
66
|
contentModel: {
|
|
55
67
|
category: "none",
|
|
56
68
|
children: ["instance", "rich-text"]
|
|
57
69
|
},
|
|
58
70
|
presetStyle: {
|
|
59
|
-
button: [
|
|
71
|
+
button: [T, c].flat()
|
|
60
72
|
},
|
|
61
73
|
props: h
|
|
62
74
|
}, P = {
|
|
@@ -64,17 +76,17 @@ const S = {
|
|
|
64
76
|
contentModel: {
|
|
65
77
|
category: "instance",
|
|
66
78
|
children: ["instance"],
|
|
67
|
-
descendants: [
|
|
79
|
+
descendants: [e.DialogTrigger, e.DialogOverlay]
|
|
68
80
|
},
|
|
69
81
|
initialProps: ["open"],
|
|
70
|
-
props:
|
|
82
|
+
props: d
|
|
71
83
|
};
|
|
72
84
|
export {
|
|
73
85
|
P as metaDialog,
|
|
74
86
|
H as metaDialogClose,
|
|
75
|
-
|
|
87
|
+
S as metaDialogContent,
|
|
76
88
|
E as metaDialogDescription,
|
|
77
|
-
|
|
89
|
+
v as metaDialogOverlay,
|
|
78
90
|
B as metaDialogTitle,
|
|
79
|
-
|
|
91
|
+
u as metaDialogTrigger
|
|
80
92
|
};
|
|
@@ -1,93 +1,105 @@
|
|
|
1
|
-
import { NavigationMenuIcon as t, ListIcon as o, ListItemIcon as
|
|
2
|
-
import { div as
|
|
3
|
-
import { radix as
|
|
4
|
-
import { propsNavigationMenu as
|
|
5
|
-
const
|
|
1
|
+
import { NavigationMenuIcon as t, ListIcon as o, ListItemIcon as a, TriggerIcon as i, ContentIcon as s, BoxIcon as r, ViewportIcon as c } from "@webstudio-is/icons/svg";
|
|
2
|
+
import { div as n } from "@webstudio-is/sdk/normalize.css";
|
|
3
|
+
import { radix as e } from "./shared/meta.js";
|
|
4
|
+
import { propsNavigationMenu as l, propsNavigationMenuList as p, propsNavigationMenuItem as g, propsNavigationMenuTrigger as d, propsNavigationMenuContent as M, propsNavigationMenuLink as u, propsNavigationMenuViewport as v } from "./__generated__/navigation-menu.props.js";
|
|
5
|
+
const I = {
|
|
6
6
|
icon: t,
|
|
7
7
|
contentModel: {
|
|
8
8
|
category: "instance",
|
|
9
9
|
children: ["instance"],
|
|
10
|
-
descendants: [
|
|
10
|
+
descendants: [e.NavigationMenuList, e.NavigationMenuViewport]
|
|
11
11
|
},
|
|
12
12
|
presetStyle: {
|
|
13
|
-
div:
|
|
13
|
+
div: n
|
|
14
14
|
},
|
|
15
|
-
props:
|
|
16
|
-
},
|
|
15
|
+
props: l
|
|
16
|
+
}, L = {
|
|
17
17
|
icon: o,
|
|
18
18
|
label: "Menu List",
|
|
19
19
|
contentModel: {
|
|
20
20
|
category: "none",
|
|
21
21
|
children: ["instance"],
|
|
22
|
-
descendants: [
|
|
22
|
+
descendants: [e.NavigationMenuItem]
|
|
23
23
|
},
|
|
24
24
|
presetStyle: {
|
|
25
|
-
div:
|
|
25
|
+
div: n
|
|
26
26
|
},
|
|
27
|
-
props:
|
|
28
|
-
},
|
|
29
|
-
icon:
|
|
27
|
+
props: p
|
|
28
|
+
}, h = {
|
|
29
|
+
icon: a,
|
|
30
30
|
label: "Menu Item",
|
|
31
|
-
indexWithinAncestor:
|
|
31
|
+
indexWithinAncestor: e.NavigationMenu,
|
|
32
32
|
contentModel: {
|
|
33
33
|
category: "none",
|
|
34
34
|
children: ["instance"],
|
|
35
35
|
descendants: [
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
e.NavigationMenuTrigger,
|
|
37
|
+
e.NavigationMenuContent,
|
|
38
|
+
e.NavigationMenuLink
|
|
39
39
|
]
|
|
40
40
|
},
|
|
41
41
|
presetStyle: {
|
|
42
|
-
div:
|
|
42
|
+
div: n
|
|
43
43
|
},
|
|
44
|
-
props:
|
|
45
|
-
},
|
|
46
|
-
icon:
|
|
44
|
+
props: g
|
|
45
|
+
}, C = {
|
|
46
|
+
icon: i,
|
|
47
47
|
label: "Menu Trigger",
|
|
48
48
|
contentModel: {
|
|
49
49
|
category: "none",
|
|
50
50
|
children: ["instance"]
|
|
51
51
|
},
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
states: [
|
|
53
|
+
{ label: "Open", selector: '[data-state="open"]' },
|
|
54
|
+
{ label: "Closed", selector: '[data-state="closed"]' }
|
|
55
|
+
],
|
|
56
|
+
props: d
|
|
57
|
+
}, k = {
|
|
58
|
+
icon: s,
|
|
55
59
|
label: "Menu Content",
|
|
56
60
|
contentModel: {
|
|
57
61
|
category: "none",
|
|
58
62
|
children: ["instance"],
|
|
59
|
-
descendants: [
|
|
63
|
+
descendants: [e.NavigationMenuLink]
|
|
60
64
|
},
|
|
65
|
+
states: [
|
|
66
|
+
{ label: "Open", selector: '[data-state="open"]' },
|
|
67
|
+
{ label: "Closed", selector: '[data-state="closed"]' }
|
|
68
|
+
],
|
|
61
69
|
presetStyle: {
|
|
62
|
-
div:
|
|
70
|
+
div: n
|
|
63
71
|
},
|
|
64
|
-
props:
|
|
65
|
-
},
|
|
66
|
-
icon:
|
|
72
|
+
props: M
|
|
73
|
+
}, w = {
|
|
74
|
+
icon: r,
|
|
67
75
|
label: "Accessible Link Wrapper",
|
|
68
76
|
contentModel: {
|
|
69
77
|
category: "none",
|
|
70
78
|
children: ["instance"]
|
|
71
79
|
},
|
|
72
|
-
props:
|
|
80
|
+
props: u
|
|
73
81
|
}, S = {
|
|
74
|
-
icon:
|
|
82
|
+
icon: c,
|
|
75
83
|
label: "Menu Viewport",
|
|
76
84
|
contentModel: {
|
|
77
85
|
category: "none",
|
|
78
86
|
children: ["instance"]
|
|
79
87
|
},
|
|
88
|
+
states: [
|
|
89
|
+
{ label: "Open", selector: '[data-state="open"]' },
|
|
90
|
+
{ label: "Closed", selector: '[data-state="closed"]' }
|
|
91
|
+
],
|
|
80
92
|
presetStyle: {
|
|
81
|
-
div:
|
|
93
|
+
div: n
|
|
82
94
|
},
|
|
83
95
|
props: v
|
|
84
96
|
};
|
|
85
97
|
export {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
98
|
+
I as metaNavigationMenu,
|
|
99
|
+
k as metaNavigationMenuContent,
|
|
100
|
+
h as metaNavigationMenuItem,
|
|
101
|
+
w as metaNavigationMenuLink,
|
|
102
|
+
L as metaNavigationMenuList,
|
|
103
|
+
C as metaNavigationMenuTrigger,
|
|
92
104
|
S as metaNavigationMenuViewport
|
|
93
105
|
};
|
package/lib/popover.ws.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { PopoverIcon as
|
|
2
|
-
import { div as
|
|
3
|
-
import { radix as
|
|
4
|
-
import { propsPopover as
|
|
1
|
+
import { PopoverIcon as o, TriggerIcon as t, ContentIcon as n, ButtonElementIcon as r } from "@webstudio-is/icons/svg";
|
|
2
|
+
import { div as s, button as p } from "@webstudio-is/sdk/normalize.css";
|
|
3
|
+
import { radix as e } from "./shared/meta.js";
|
|
4
|
+
import { propsPopover as a, propsPopoverTrigger as c, propsPopoverContent as l, propsPopoverClose as i } from "./__generated__/popover.props.js";
|
|
5
5
|
import { buttonReset as d } from "./shared/preset-styles.js";
|
|
6
6
|
const C = {
|
|
7
7
|
icon: t,
|
|
@@ -9,29 +9,37 @@ const C = {
|
|
|
9
9
|
category: "none",
|
|
10
10
|
children: ["instance"]
|
|
11
11
|
},
|
|
12
|
+
states: [
|
|
13
|
+
{ label: "Open", selector: '[data-state="open"]' },
|
|
14
|
+
{ label: "Closed", selector: '[data-state="closed"]' }
|
|
15
|
+
],
|
|
12
16
|
props: c
|
|
13
|
-
},
|
|
17
|
+
}, b = {
|
|
14
18
|
icon: n,
|
|
15
19
|
contentModel: {
|
|
16
20
|
category: "none",
|
|
17
21
|
children: ["instance"],
|
|
18
|
-
descendants: [
|
|
22
|
+
descendants: [e.PopoverClose]
|
|
19
23
|
},
|
|
24
|
+
states: [
|
|
25
|
+
{ label: "Open", selector: '[data-state="open"]' },
|
|
26
|
+
{ label: "Closed", selector: '[data-state="closed"]' }
|
|
27
|
+
],
|
|
20
28
|
presetStyle: {
|
|
21
|
-
div:
|
|
29
|
+
div: s
|
|
22
30
|
},
|
|
23
31
|
initialProps: ["side", "sideOffset", "align", "alignOffset"],
|
|
24
|
-
props:
|
|
25
|
-
},
|
|
26
|
-
icon:
|
|
32
|
+
props: l
|
|
33
|
+
}, y = {
|
|
34
|
+
icon: o,
|
|
27
35
|
contentModel: {
|
|
28
36
|
category: "instance",
|
|
29
37
|
children: ["instance"],
|
|
30
|
-
descendants: [
|
|
38
|
+
descendants: [e.PopoverTrigger, e.PopoverContent]
|
|
31
39
|
},
|
|
32
40
|
initialProps: ["open"],
|
|
33
|
-
props:
|
|
34
|
-
},
|
|
41
|
+
props: a
|
|
42
|
+
}, h = {
|
|
35
43
|
icon: r,
|
|
36
44
|
label: "Close Button",
|
|
37
45
|
contentModel: {
|
|
@@ -39,13 +47,13 @@ const C = {
|
|
|
39
47
|
children: ["instance", "rich-text"]
|
|
40
48
|
},
|
|
41
49
|
presetStyle: {
|
|
42
|
-
button: [d,
|
|
50
|
+
button: [d, p].flat()
|
|
43
51
|
},
|
|
44
|
-
props:
|
|
52
|
+
props: i
|
|
45
53
|
};
|
|
46
54
|
export {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
55
|
+
y as metaPopover,
|
|
56
|
+
h as metaPopoverClose,
|
|
57
|
+
b as metaPopoverContent,
|
|
50
58
|
C as metaPopoverTrigger
|
|
51
59
|
};
|
package/lib/radio-group.ws.js
CHANGED
|
@@ -23,8 +23,8 @@ const R = {
|
|
|
23
23
|
descendants: [e.RadioGroupIndicator]
|
|
24
24
|
},
|
|
25
25
|
states: [
|
|
26
|
-
{ label: "Checked", selector:
|
|
27
|
-
{ label: "Unchecked", selector:
|
|
26
|
+
{ label: "Checked", selector: '[data-state="checked"]' },
|
|
27
|
+
{ label: "Unchecked", selector: '[data-state="unchecked"]' }
|
|
28
28
|
],
|
|
29
29
|
presetStyle: {
|
|
30
30
|
button: [n, d].flat()
|
|
@@ -38,8 +38,8 @@ const R = {
|
|
|
38
38
|
children: ["instance"]
|
|
39
39
|
},
|
|
40
40
|
states: [
|
|
41
|
-
{ label: "Checked", selector:
|
|
42
|
-
{ label: "Unchecked", selector:
|
|
41
|
+
{ label: "Checked", selector: '[data-state="checked"]' },
|
|
42
|
+
{ label: "Unchecked", selector: '[data-state="unchecked"]' }
|
|
43
43
|
],
|
|
44
44
|
presetStyle: {
|
|
45
45
|
span: c
|
package/lib/select.ws.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { SelectIcon as o, TriggerIcon as c, FormTextFieldIcon as
|
|
1
|
+
import { SelectIcon as o, TriggerIcon as c, FormTextFieldIcon as l, ViewportIcon as r, ContentIcon as a, ItemIcon as s, CheckMarkIcon as p, TextIcon as i } from "@webstudio-is/icons/svg";
|
|
2
2
|
import { button as d, span as t, div as n } from "@webstudio-is/sdk/normalize.css";
|
|
3
3
|
import { radix as e } from "./shared/meta.js";
|
|
4
|
-
import { propsSelect as S, propsSelectTrigger as m, propsSelectValue as I, propsSelectViewport as g, propsSelectContent as
|
|
5
|
-
const
|
|
4
|
+
import { propsSelect as S, propsSelectTrigger as m, propsSelectValue as I, propsSelectViewport as g, propsSelectContent as h, propsSelectItem as y, propsSelectItemIndicator as b, propsSelectItemText as T } from "./__generated__/select.props.js";
|
|
5
|
+
const V = {
|
|
6
6
|
icon: o,
|
|
7
7
|
contentModel: {
|
|
8
8
|
category: "instance",
|
|
@@ -11,18 +11,22 @@ const b = {
|
|
|
11
11
|
},
|
|
12
12
|
initialProps: ["name", "value", "open", "required"],
|
|
13
13
|
props: S
|
|
14
|
-
},
|
|
14
|
+
}, k = {
|
|
15
15
|
icon: c,
|
|
16
16
|
contentModel: {
|
|
17
17
|
category: "none",
|
|
18
18
|
children: ["instance"],
|
|
19
19
|
descendants: [e.SelectValue]
|
|
20
20
|
},
|
|
21
|
+
states: [
|
|
22
|
+
{ label: "Open", selector: '[data-state="open"]' },
|
|
23
|
+
{ label: "Closed", selector: '[data-state="closed"]' }
|
|
24
|
+
],
|
|
21
25
|
presetStyle: { button: d },
|
|
22
26
|
props: m
|
|
23
|
-
},
|
|
27
|
+
}, f = {
|
|
24
28
|
label: "Value",
|
|
25
|
-
icon:
|
|
29
|
+
icon: l,
|
|
26
30
|
contentModel: {
|
|
27
31
|
category: "none",
|
|
28
32
|
children: []
|
|
@@ -30,17 +34,21 @@ const b = {
|
|
|
30
34
|
presetStyle: { span: t },
|
|
31
35
|
initialProps: ["placeholder"],
|
|
32
36
|
props: I
|
|
33
|
-
},
|
|
34
|
-
icon:
|
|
37
|
+
}, w = {
|
|
38
|
+
icon: a,
|
|
35
39
|
contentModel: {
|
|
36
40
|
category: "none",
|
|
37
41
|
children: ["instance"],
|
|
38
42
|
descendants: [e.SelectViewport]
|
|
39
43
|
},
|
|
44
|
+
states: [
|
|
45
|
+
{ label: "Open", selector: '[data-state="open"]' },
|
|
46
|
+
{ label: "Closed", selector: '[data-state="closed"]' }
|
|
47
|
+
],
|
|
40
48
|
presetStyle: { div: n },
|
|
41
|
-
props:
|
|
42
|
-
},
|
|
43
|
-
icon:
|
|
49
|
+
props: h
|
|
50
|
+
}, v = {
|
|
51
|
+
icon: r,
|
|
44
52
|
contentModel: {
|
|
45
53
|
category: "none",
|
|
46
54
|
children: ["instance"],
|
|
@@ -48,42 +56,46 @@ const b = {
|
|
|
48
56
|
},
|
|
49
57
|
presetStyle: { div: n },
|
|
50
58
|
props: g
|
|
51
|
-
},
|
|
52
|
-
icon:
|
|
59
|
+
}, P = {
|
|
60
|
+
icon: s,
|
|
53
61
|
contentModel: {
|
|
54
62
|
category: "none",
|
|
55
63
|
children: ["instance"],
|
|
56
64
|
descendants: [e.SelectItemIndicator, e.SelectItemText]
|
|
57
65
|
},
|
|
66
|
+
states: [
|
|
67
|
+
{ label: "Checked", selector: '[data-state="checked"]' },
|
|
68
|
+
{ label: "Unchecked", selector: '[data-state="unchecked"]' }
|
|
69
|
+
],
|
|
58
70
|
presetStyle: { div: n },
|
|
59
71
|
initialProps: ["value"],
|
|
60
|
-
props:
|
|
72
|
+
props: y
|
|
61
73
|
}, F = {
|
|
62
74
|
label: "Indicator",
|
|
63
|
-
icon:
|
|
75
|
+
icon: p,
|
|
64
76
|
contentModel: {
|
|
65
77
|
category: "none",
|
|
66
78
|
children: ["instance"]
|
|
67
79
|
},
|
|
68
80
|
presetStyle: { span: t },
|
|
69
|
-
props:
|
|
70
|
-
},
|
|
81
|
+
props: b
|
|
82
|
+
}, O = {
|
|
71
83
|
label: "Item Text",
|
|
72
|
-
icon:
|
|
84
|
+
icon: i,
|
|
73
85
|
contentModel: {
|
|
74
86
|
category: "none",
|
|
75
87
|
children: ["instance", "rich-text"]
|
|
76
88
|
},
|
|
77
89
|
presetStyle: { span: t },
|
|
78
|
-
props:
|
|
90
|
+
props: T
|
|
79
91
|
};
|
|
80
92
|
export {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
93
|
+
V as metaSelect,
|
|
94
|
+
w as metaSelectContent,
|
|
95
|
+
P as metaSelectItem,
|
|
84
96
|
F as metaSelectItemIndicator,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
97
|
+
O as metaSelectItemText,
|
|
98
|
+
k as metaSelectTrigger,
|
|
99
|
+
f as metaSelectValue,
|
|
100
|
+
v as metaSelectViewport
|
|
89
101
|
};
|
package/lib/switch.ws.js
CHANGED
|
@@ -11,8 +11,8 @@ const m = {
|
|
|
11
11
|
descendants: [a.SwitchThumb]
|
|
12
12
|
},
|
|
13
13
|
states: [
|
|
14
|
-
{ label: "Checked", selector:
|
|
15
|
-
{ label: "Unchecked", selector:
|
|
14
|
+
{ label: "Checked", selector: '[data-state="checked"]' },
|
|
15
|
+
{ label: "Unchecked", selector: '[data-state="unchecked"]' }
|
|
16
16
|
],
|
|
17
17
|
presetStyle: {
|
|
18
18
|
button: [c, n].flat()
|
|
@@ -26,8 +26,8 @@ const m = {
|
|
|
26
26
|
children: ["instance"]
|
|
27
27
|
},
|
|
28
28
|
states: [
|
|
29
|
-
{ label: "Checked", selector:
|
|
30
|
-
{ label: "Unchecked", selector:
|
|
29
|
+
{ label: "Checked", selector: '[data-state="checked"]' },
|
|
30
|
+
{ label: "Unchecked", selector: '[data-state="unchecked"]' }
|
|
31
31
|
],
|
|
32
32
|
presetStyle: {
|
|
33
33
|
span: o
|
package/lib/tabs.ws.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { TabsIcon as n, HeaderIcon as
|
|
2
|
-
import { div as e, button as
|
|
1
|
+
import { TabsIcon as n, HeaderIcon as a, TriggerIcon as o, ContentIcon as s } from "@webstudio-is/icons/svg";
|
|
2
|
+
import { div as e, button as r } from "@webstudio-is/sdk/normalize.css";
|
|
3
3
|
import { radix as t } from "./shared/meta.js";
|
|
4
4
|
import { buttonReset as c } from "./shared/preset-styles.js";
|
|
5
|
-
import { propsTabs as i, propsTabsList as
|
|
6
|
-
const
|
|
5
|
+
import { propsTabs as i, propsTabsList as l, propsTabsTrigger as p, propsTabsContent as b } from "./__generated__/tabs.props.js";
|
|
6
|
+
const h = {
|
|
7
7
|
icon: n,
|
|
8
8
|
contentModel: {
|
|
9
9
|
category: "instance",
|
|
@@ -12,42 +12,49 @@ const y = {
|
|
|
12
12
|
},
|
|
13
13
|
presetStyle: { div: e },
|
|
14
14
|
props: i
|
|
15
|
-
},
|
|
16
|
-
icon:
|
|
15
|
+
}, y = {
|
|
16
|
+
icon: a,
|
|
17
17
|
contentModel: {
|
|
18
18
|
category: "none",
|
|
19
19
|
children: ["instance"],
|
|
20
20
|
descendants: [t.TabsTrigger]
|
|
21
21
|
},
|
|
22
22
|
presetStyle: { div: e },
|
|
23
|
-
props:
|
|
24
|
-
},
|
|
25
|
-
icon:
|
|
23
|
+
props: l
|
|
24
|
+
}, f = {
|
|
25
|
+
icon: o,
|
|
26
26
|
label: "Tab Trigger",
|
|
27
27
|
indexWithinAncestor: t.Tabs,
|
|
28
28
|
contentModel: {
|
|
29
29
|
category: "none",
|
|
30
30
|
children: ["instance", "rich-text"]
|
|
31
31
|
},
|
|
32
|
-
states: [
|
|
32
|
+
states: [
|
|
33
|
+
{ label: "Active", selector: '[data-state="active"]' },
|
|
34
|
+
{ label: "Inactive", selector: '[data-state="inactive"]' }
|
|
35
|
+
],
|
|
33
36
|
presetStyle: {
|
|
34
|
-
button: [
|
|
37
|
+
button: [r, c].flat()
|
|
35
38
|
},
|
|
36
|
-
props:
|
|
37
|
-
},
|
|
39
|
+
props: p
|
|
40
|
+
}, x = {
|
|
38
41
|
label: "Tab Content",
|
|
39
|
-
icon:
|
|
42
|
+
icon: s,
|
|
40
43
|
indexWithinAncestor: t.Tabs,
|
|
41
44
|
contentModel: {
|
|
42
45
|
category: "none",
|
|
43
46
|
children: ["instance", "rich-text"]
|
|
44
47
|
},
|
|
48
|
+
states: [
|
|
49
|
+
{ label: "Active", selector: '[data-state="active"]' },
|
|
50
|
+
{ label: "Inactive", selector: '[data-state="inactive"]' }
|
|
51
|
+
],
|
|
45
52
|
presetStyle: { div: e },
|
|
46
|
-
props:
|
|
53
|
+
props: b
|
|
47
54
|
};
|
|
48
55
|
export {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
56
|
+
h as metaTabs,
|
|
57
|
+
x as metaTabsContent,
|
|
58
|
+
y as metaTabsList,
|
|
59
|
+
f as metaTabsTrigger
|
|
53
60
|
};
|
package/lib/tooltip.ws.js
CHANGED
|
@@ -1,32 +1,42 @@
|
|
|
1
|
-
import { TooltipIcon as t, TriggerIcon as
|
|
2
|
-
import { div as
|
|
3
|
-
import { radix as
|
|
4
|
-
import { propsTooltip as
|
|
1
|
+
import { TooltipIcon as t, TriggerIcon as o, ContentIcon as n } from "@webstudio-is/icons/svg";
|
|
2
|
+
import { div as a } from "@webstudio-is/sdk/normalize.css";
|
|
3
|
+
import { radix as e } from "./shared/meta.js";
|
|
4
|
+
import { propsTooltip as l, propsTooltipTrigger as s, propsTooltipContent as i } from "./__generated__/tooltip.props.js";
|
|
5
5
|
const g = {
|
|
6
|
-
icon:
|
|
6
|
+
icon: o,
|
|
7
7
|
contentModel: {
|
|
8
8
|
category: "none",
|
|
9
9
|
children: ["instance"]
|
|
10
10
|
},
|
|
11
|
-
|
|
11
|
+
states: [
|
|
12
|
+
{ label: "Closed", selector: '[data-state="closed"]' },
|
|
13
|
+
{ label: "Delayed open", selector: '[data-state="delayed-open"]' },
|
|
14
|
+
{ label: "Instant open", selector: '[data-state="instant-open"]' }
|
|
15
|
+
],
|
|
16
|
+
props: s
|
|
12
17
|
}, T = {
|
|
13
|
-
icon:
|
|
18
|
+
icon: n,
|
|
14
19
|
contentModel: {
|
|
15
20
|
category: "none",
|
|
16
21
|
children: ["instance"]
|
|
17
22
|
},
|
|
18
|
-
|
|
23
|
+
states: [
|
|
24
|
+
{ label: "Closed", selector: '[data-state="closed"]' },
|
|
25
|
+
{ label: "Delayed open", selector: '[data-state="delayed-open"]' },
|
|
26
|
+
{ label: "Instant open", selector: '[data-state="instant-open"]' }
|
|
27
|
+
],
|
|
28
|
+
presetStyle: { div: a },
|
|
19
29
|
initialProps: ["side", "sideOffset", "align", "alignOffset"],
|
|
20
|
-
props:
|
|
30
|
+
props: i
|
|
21
31
|
}, m = {
|
|
22
32
|
icon: t,
|
|
23
33
|
contentModel: {
|
|
24
34
|
category: "instance",
|
|
25
35
|
children: ["instance"],
|
|
26
|
-
descendants: [
|
|
36
|
+
descendants: [e.TooltipTrigger, e.TooltipContent]
|
|
27
37
|
},
|
|
28
38
|
initialProps: ["open", "delayDuration", "disableHoverableContent"],
|
|
29
|
-
props:
|
|
39
|
+
props: l
|
|
30
40
|
};
|
|
31
41
|
export {
|
|
32
42
|
m as metaTooltip,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webstudio-is/sdk-components-react-radix",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.261.1",
|
|
4
4
|
"description": "Webstudio wrapper for radix library",
|
|
5
5
|
"author": "Webstudio <github@webstudio.is>",
|
|
6
6
|
"homepage": "https://webstudio.is",
|
|
@@ -52,22 +52,22 @@
|
|
|
52
52
|
"@radix-ui/react-tabs": "^1.1.9",
|
|
53
53
|
"@radix-ui/react-tooltip": "^1.2.4",
|
|
54
54
|
"await-interaction-response": "^0.0.2",
|
|
55
|
-
"@webstudio-is/css-engine": "0.
|
|
56
|
-
"@webstudio-is/icons": "0.
|
|
57
|
-
"@webstudio-is/sdk": "0.
|
|
58
|
-
"@webstudio-is/
|
|
55
|
+
"@webstudio-is/css-engine": "0.261.1",
|
|
56
|
+
"@webstudio-is/icons": "0.261.1",
|
|
57
|
+
"@webstudio-is/react-sdk": "0.261.1",
|
|
58
|
+
"@webstudio-is/sdk": "0.261.1"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@types/react": "^18.2.70",
|
|
62
62
|
"@types/react-dom": "^18.2.25",
|
|
63
63
|
"react": "18.3.0-canary-14898b6a9-20240318",
|
|
64
64
|
"react-dom": "18.3.0-canary-14898b6a9-20240318",
|
|
65
|
-
"@webstudio-is/css-data": "0.0.0",
|
|
66
65
|
"@webstudio-is/generate-arg-types": "0.0.0",
|
|
66
|
+
"@webstudio-is/css-data": "0.0.0",
|
|
67
67
|
"@webstudio-is/sdk-cli": "^0.94.0",
|
|
68
|
-
"@webstudio-is/template": "0.260.2",
|
|
69
68
|
"@webstudio-is/tsconfig": "1.0.7",
|
|
70
|
-
"@webstudio-is/sdk-components-react": "0.
|
|
69
|
+
"@webstudio-is/sdk-components-react": "0.261.1",
|
|
70
|
+
"@webstudio-is/template": "0.261.1"
|
|
71
71
|
},
|
|
72
72
|
"scripts": {
|
|
73
73
|
"build": "vite build --config ../../vite.sdk-components.config.ts",
|