@webstudio-is/sdk-components-react-radix 0.0.0-5844e28 → 0.0.0-73cd6ea
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 +15 -2582
- package/lib/__generated__/checkbox.props.js +5 -1071
- package/lib/__generated__/collapsible.props.js +7 -1012
- package/lib/__generated__/dialog.props.js +10 -2585
- package/lib/__generated__/label.props.js +2 -517
- package/lib/__generated__/navigation-menu.props.js +13 -3625
- package/lib/__generated__/popover.props.js +7 -509
- package/lib/__generated__/radio-group.props.js +19 -1568
- package/lib/__generated__/select.props.js +42 -3615
- package/lib/__generated__/switch.props.js +5 -1071
- package/lib/__generated__/tabs.props.js +17 -2073
- package/lib/__generated__/tooltip.props.js +6 -503
- package/lib/accordion.js +33 -20
- package/lib/accordion.template.js +14 -14
- package/lib/accordion.ws.js +56 -93
- package/lib/checkbox.js +17 -6
- package/lib/checkbox.template.js +10 -10
- package/lib/checkbox.ws.js +26 -41
- package/lib/collapsible.js +29 -26
- package/lib/collapsible.ws.js +28 -48
- package/lib/components.js +46 -45
- package/lib/dialog.js +50 -56
- package/lib/dialog.template.js +19 -19
- package/lib/dialog.ws.js +68 -126
- package/lib/label.template.js +3 -3
- package/lib/label.ws.js +8 -15
- package/lib/metas.js +45 -44
- package/lib/navigation-menu.js +21 -20
- package/lib/navigation-menu.template.js +8 -8
- package/lib/navigation-menu.ws.js +71 -102
- package/lib/popover.js +36 -32
- package/lib/popover.template.js +50 -20
- package/lib/popover.ws.js +45 -44
- package/lib/radio-group.js +10 -7
- package/lib/radio-group.ws.js +37 -61
- package/lib/select.js +49 -37
- package/lib/select.ws.js +71 -137
- package/lib/shared/meta.js +13 -0
- package/lib/shared/preset-styles.js +29 -29
- package/lib/shared/theme.js +25 -68
- package/lib/sheet.template.js +32 -32
- package/lib/switch.js +9 -6
- package/lib/switch.template.js +9 -9
- package/lib/switch.ws.js +29 -52
- package/lib/tabs.js +50 -53
- package/lib/tabs.template.js +16 -16
- package/lib/tabs.ws.js +41 -76
- package/lib/tooltip.js +34 -31
- package/lib/tooltip.ws.js +27 -42
- package/lib/types/__generated__/popover.props.d.ts +1 -0
- package/lib/types/accordion.ws.d.ts +1 -6
- package/lib/types/checkbox.ws.d.ts +1 -3
- package/lib/types/collapsible.d.ts +2 -2
- package/lib/types/collapsible.ws.d.ts +1 -4
- package/lib/types/components.d.ts +1 -1
- package/lib/types/dialog.ws.d.ts +1 -8
- package/lib/types/label.ws.d.ts +1 -2
- package/lib/types/metas.d.ts +1 -1
- package/lib/types/navigation-menu.ws.d.ts +1 -8
- package/lib/types/popover.d.ts +1 -0
- package/lib/types/popover.ws.d.ts +2 -4
- package/lib/types/radio-group.d.ts +1 -1
- package/lib/types/radio-group.ws.d.ts +1 -4
- package/lib/types/select.d.ts +3 -3
- package/lib/types/select.ws.d.ts +1 -9
- package/lib/types/shared/meta.d.ts +1 -0
- package/lib/types/shared/preset-styles.d.ts +2 -2
- package/lib/types/shared/proxy.d.ts +1 -0
- package/lib/types/switch.ws.d.ts +1 -3
- package/lib/types/tabs.d.ts +1 -4
- package/lib/types/tabs.ws.d.ts +1 -5
- package/lib/types/tooltip.ws.d.ts +1 -4
- package/package.json +21 -27
- package/lib/props.js +0 -62
- package/lib/types/props.d.ts +0 -12
package/lib/components.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { Collapsible as t, CollapsibleContent as r, CollapsibleTrigger as i } from "./collapsible.js";
|
|
2
2
|
import { Dialog as a, DialogClose as l, DialogContent as g, DialogDescription as p, DialogOverlay as c, DialogTitle as m, DialogTrigger as T } from "./dialog.js";
|
|
3
|
-
import { Popover as C,
|
|
4
|
-
import { Tooltip as
|
|
5
|
-
import { Tabs as
|
|
6
|
-
import { Label as
|
|
7
|
-
import { Accordion as
|
|
8
|
-
import { NavigationMenu as
|
|
9
|
-
import { Select as
|
|
10
|
-
import { Switch as
|
|
11
|
-
import { Checkbox as
|
|
12
|
-
import { RadioGroup as
|
|
3
|
+
import { Popover as C, PopoverClose as d, PopoverContent as f, PopoverTrigger as s } from "./popover.js";
|
|
4
|
+
import { Tooltip as v, TooltipContent as b, TooltipTrigger as S } from "./tooltip.js";
|
|
5
|
+
import { Tabs as D, TabsContent as M, TabsList as N, TabsTrigger as h } from "./tabs.js";
|
|
6
|
+
import { Label as w } from "./label.js";
|
|
7
|
+
import { Accordion as P, AccordionContent as k, AccordionHeader as G, AccordionItem as R, AccordionTrigger as V } from "./accordion.js";
|
|
8
|
+
import { NavigationMenu as H, NavigationMenuContent as O, NavigationMenuItem as j, NavigationMenuLink as q, NavigationMenuList as z, NavigationMenuTrigger as B, NavigationMenuViewport as E } from "./navigation-menu.js";
|
|
9
|
+
import { Select as J, SelectContent as K, SelectItem as Q, SelectItemIndicator as U, SelectItemText as W, SelectTrigger as X, SelectValue as Y, SelectViewport as Z } from "./select.js";
|
|
10
|
+
import { Switch as $, SwitchThumb as oo } from "./switch.js";
|
|
11
|
+
import { Checkbox as to, CheckboxIndicator as ro } from "./checkbox.js";
|
|
12
|
+
import { RadioGroup as no, RadioGroupIndicator as ao, RadioGroupItem as lo } from "./radio-group.js";
|
|
13
13
|
export {
|
|
14
|
-
|
|
14
|
+
P as Accordion,
|
|
15
15
|
k as AccordionContent,
|
|
16
16
|
G as AccordionHeader,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
R as AccordionItem,
|
|
18
|
+
V as AccordionTrigger,
|
|
19
|
+
to as Checkbox,
|
|
20
|
+
ro as CheckboxIndicator,
|
|
21
21
|
t as Collapsible,
|
|
22
22
|
r as CollapsibleContent,
|
|
23
23
|
i as CollapsibleTrigger,
|
|
@@ -28,35 +28,36 @@ export {
|
|
|
28
28
|
c as DialogOverlay,
|
|
29
29
|
m as DialogTitle,
|
|
30
30
|
T as DialogTrigger,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
31
|
+
w as Label,
|
|
32
|
+
H as NavigationMenu,
|
|
33
|
+
O as NavigationMenuContent,
|
|
34
|
+
j as NavigationMenuItem,
|
|
35
|
+
q as NavigationMenuLink,
|
|
36
|
+
z as NavigationMenuList,
|
|
37
|
+
B as NavigationMenuTrigger,
|
|
38
|
+
E as NavigationMenuViewport,
|
|
39
39
|
C as Popover,
|
|
40
|
-
d as
|
|
41
|
-
f as
|
|
42
|
-
|
|
43
|
-
no as
|
|
44
|
-
ao as
|
|
45
|
-
|
|
46
|
-
J as
|
|
47
|
-
K as
|
|
48
|
-
Q as
|
|
49
|
-
U as
|
|
50
|
-
W as
|
|
51
|
-
X as
|
|
52
|
-
Y as
|
|
53
|
-
|
|
54
|
-
$ as
|
|
55
|
-
|
|
56
|
-
D as
|
|
57
|
-
M as
|
|
58
|
-
N as
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
40
|
+
d as PopoverClose,
|
|
41
|
+
f as PopoverContent,
|
|
42
|
+
s as PopoverTrigger,
|
|
43
|
+
no as RadioGroup,
|
|
44
|
+
ao as RadioGroupIndicator,
|
|
45
|
+
lo as RadioGroupItem,
|
|
46
|
+
J as Select,
|
|
47
|
+
K as SelectContent,
|
|
48
|
+
Q as SelectItem,
|
|
49
|
+
U as SelectItemIndicator,
|
|
50
|
+
W as SelectItemText,
|
|
51
|
+
X as SelectTrigger,
|
|
52
|
+
Y as SelectValue,
|
|
53
|
+
Z as SelectViewport,
|
|
54
|
+
$ as Switch,
|
|
55
|
+
oo as SwitchThumb,
|
|
56
|
+
D as Tabs,
|
|
57
|
+
M as TabsContent,
|
|
58
|
+
N as TabsList,
|
|
59
|
+
h as TabsTrigger,
|
|
60
|
+
v as Tooltip,
|
|
61
|
+
b as TooltipContent,
|
|
62
|
+
S as TooltipTrigger
|
|
62
63
|
};
|
package/lib/dialog.js
CHANGED
|
@@ -1,92 +1,86 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import v from "await-interaction-response";
|
|
3
|
+
import { forwardRef as c, useContext as p, useState as k, useEffect as d, useCallback as w, Children as y, useRef as A } from "react";
|
|
3
4
|
import * as a from "@radix-ui/react-dialog";
|
|
4
|
-
import { ReactSdkContext as
|
|
5
|
-
import { useControllableState as w } from "@radix-ui/react-use-controllable-state";
|
|
6
|
-
import y from "await-interaction-response";
|
|
5
|
+
import { ReactSdkContext as D, getClosestInstance as m } from "@webstudio-is/react-sdk/runtime";
|
|
7
6
|
const C = (t) => {
|
|
8
7
|
const { target: e } = t;
|
|
9
8
|
return !(!(e instanceof HTMLAnchorElement) || e.hasAttribute("href") === !1 || e.href === "#" || e.hasAttribute("target") && e.target === "_blank" || t.ctrlKey || t.metaKey);
|
|
10
9
|
}, O = c((t, e) => {
|
|
11
|
-
const { renderer:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
},
|
|
19
|
-
[s]
|
|
20
|
-
);
|
|
21
|
-
return m(() => {
|
|
22
|
-
if (o !== void 0 || n === !1)
|
|
10
|
+
const { renderer: n } = p(D), o = t.open ?? !1, [r, l] = k(o);
|
|
11
|
+
d(() => l(o), [o]);
|
|
12
|
+
const i = w(async (f) => {
|
|
13
|
+
await v(), l(f);
|
|
14
|
+
}, []);
|
|
15
|
+
return d(() => {
|
|
16
|
+
if (n !== void 0 || r === !1)
|
|
23
17
|
return;
|
|
24
|
-
const
|
|
25
|
-
const { target:
|
|
26
|
-
if (C(
|
|
27
|
-
if (!(
|
|
18
|
+
const f = (g) => {
|
|
19
|
+
const { target: h } = g;
|
|
20
|
+
if (C(g) !== !1) {
|
|
21
|
+
if (!(h instanceof HTMLAnchorElement))
|
|
28
22
|
return !1;
|
|
29
|
-
|
|
23
|
+
h.closest('[role="dialog"]') && (i == null || i(!1));
|
|
30
24
|
}
|
|
31
25
|
};
|
|
32
|
-
return window.addEventListener("click",
|
|
33
|
-
}, [
|
|
26
|
+
return window.addEventListener("click", f), () => window.removeEventListener("click", f);
|
|
27
|
+
}, [r, i, n]), /* @__PURE__ */ s(
|
|
34
28
|
a.Root,
|
|
35
29
|
{
|
|
36
30
|
...t,
|
|
37
|
-
onOpenChange:
|
|
38
|
-
open:
|
|
31
|
+
onOpenChange: i,
|
|
32
|
+
open: r
|
|
39
33
|
}
|
|
40
34
|
);
|
|
41
|
-
}), x = c(({ children: t, ...e },
|
|
42
|
-
const
|
|
43
|
-
return /* @__PURE__ */
|
|
44
|
-
}), M = c((t, e) => /* @__PURE__ */
|
|
45
|
-
const
|
|
46
|
-
return
|
|
47
|
-
if (
|
|
35
|
+
}), x = c(({ children: t, ...e }, n) => {
|
|
36
|
+
const o = y.toArray(t)[0];
|
|
37
|
+
return /* @__PURE__ */ s(a.Trigger, { ref: n, asChild: !0, ...e, children: o ?? /* @__PURE__ */ s("button", { children: "Add button or link" }) });
|
|
38
|
+
}), M = c((t, e) => /* @__PURE__ */ s(a.DialogPortal, { children: /* @__PURE__ */ s(a.Overlay, { ref: e, ...t }) })), R = c((t, e) => {
|
|
39
|
+
const n = A(!1), { renderer: o } = p(D);
|
|
40
|
+
return d(() => {
|
|
41
|
+
if (o !== void 0)
|
|
48
42
|
return;
|
|
49
|
-
|
|
50
|
-
const
|
|
51
|
-
const { target:
|
|
52
|
-
if (C(
|
|
53
|
-
if (!(
|
|
43
|
+
n.current = !1;
|
|
44
|
+
const r = (l) => {
|
|
45
|
+
const { target: i } = l;
|
|
46
|
+
if (C(l) !== !1) {
|
|
47
|
+
if (!(i instanceof HTMLAnchorElement))
|
|
54
48
|
return !1;
|
|
55
|
-
|
|
49
|
+
i.closest('[role="dialog"]') && (n.current = !0);
|
|
56
50
|
}
|
|
57
51
|
};
|
|
58
|
-
return window.addEventListener("click",
|
|
59
|
-
}, [
|
|
52
|
+
return window.addEventListener("click", r), () => window.removeEventListener("click", r);
|
|
53
|
+
}, [o]), /* @__PURE__ */ s(
|
|
60
54
|
a.Content,
|
|
61
55
|
{
|
|
62
56
|
ref: e,
|
|
63
57
|
...t,
|
|
64
|
-
onCloseAutoFocus: (
|
|
65
|
-
|
|
58
|
+
onCloseAutoFocus: (r) => {
|
|
59
|
+
n.current && r.preventDefault();
|
|
66
60
|
}
|
|
67
61
|
}
|
|
68
62
|
);
|
|
69
|
-
}), $ = a.Close,
|
|
63
|
+
}), $ = a.Close, E = "h1", N = c(({ tag: t = E, children: e, ...n }, o) => /* @__PURE__ */ s(a.DialogTitle, { asChild: !0, children: /* @__PURE__ */ s(t, { ref: o, ...n, children: e }) })), S = a.Description, u = "@webstudio-is/sdk-components-react-radix", F = {
|
|
70
64
|
onNavigatorUnselect: (t, e) => {
|
|
71
|
-
for (const
|
|
72
|
-
if (
|
|
73
|
-
const
|
|
65
|
+
for (const n of e.instancePath)
|
|
66
|
+
if (n.component === `${u}:DialogOverlay`) {
|
|
67
|
+
const o = m(
|
|
74
68
|
e.instancePath,
|
|
75
|
-
|
|
76
|
-
`${
|
|
69
|
+
n,
|
|
70
|
+
`${u}:Dialog`
|
|
77
71
|
);
|
|
78
|
-
|
|
72
|
+
o && t.setMemoryProp(o, "open", void 0);
|
|
79
73
|
}
|
|
80
74
|
},
|
|
81
75
|
onNavigatorSelect: (t, e) => {
|
|
82
|
-
for (const
|
|
83
|
-
if (
|
|
84
|
-
const
|
|
76
|
+
for (const n of e.instancePath)
|
|
77
|
+
if (n.component === `${u}:DialogOverlay`) {
|
|
78
|
+
const o = m(
|
|
85
79
|
e.instancePath,
|
|
86
|
-
|
|
87
|
-
`${
|
|
80
|
+
n,
|
|
81
|
+
`${u}:Dialog`
|
|
88
82
|
);
|
|
89
|
-
|
|
83
|
+
o && t.setMemoryProp(o, "open", !0);
|
|
90
84
|
}
|
|
91
85
|
}
|
|
92
86
|
};
|
package/lib/dialog.template.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import { LargeXIcon as p } from "@webstudio-is/icons/svg";
|
|
3
3
|
import { $ as l, PlaceholderValue as r, css as i } from "@webstudio-is/template";
|
|
4
4
|
import { radix as o } from "./shared/proxy.js";
|
|
5
|
-
import {
|
|
5
|
+
import { fontSize as d, lineHeight as m, letterSpacing as u, fontSizeLineHeight as w, colors as a, spacing as t, borderRadius as $, opacity as s, height as c, boxShadow as g, width as y, zIndex as h, maxWidth as b, borderWidth as x, blur as f } from "./shared/theme.js";
|
|
6
6
|
import { getButtonStyle as D } from "./shared/styles.js";
|
|
7
7
|
const S = {
|
|
8
8
|
category: "radix",
|
|
@@ -16,9 +16,9 @@ const S = {
|
|
|
16
16
|
"ws:style": i`
|
|
17
17
|
position: fixed;
|
|
18
18
|
inset: 0;
|
|
19
|
-
z-index: ${
|
|
19
|
+
z-index: ${h[50]};
|
|
20
20
|
background-color: rgb(255 255 255 / 0.8);
|
|
21
|
-
backdrop-filter: ${
|
|
21
|
+
backdrop-filter: ${f.sm};
|
|
22
22
|
/* To allow positioning Content */
|
|
23
23
|
display: flex;
|
|
24
24
|
overflow: auto;
|
|
@@ -27,17 +27,17 @@ const S = {
|
|
|
27
27
|
o.DialogContent,
|
|
28
28
|
{
|
|
29
29
|
"ws:style": i`
|
|
30
|
-
width: ${
|
|
31
|
-
z-index: ${
|
|
30
|
+
width: ${y.full};
|
|
31
|
+
z-index: ${h[50]};
|
|
32
32
|
display: flex;
|
|
33
33
|
flex-direction: column;
|
|
34
34
|
gap: ${t[4]};
|
|
35
35
|
margin: auto;
|
|
36
|
-
max-width: ${
|
|
37
|
-
border: ${
|
|
36
|
+
max-width: ${b.lg};
|
|
37
|
+
border: ${x.DEFAULT} solid ${a.border};
|
|
38
38
|
background-color: ${a.background};
|
|
39
39
|
padding: ${t[6]};
|
|
40
|
-
box-shadow: ${
|
|
40
|
+
box-shadow: ${g.lg};
|
|
41
41
|
position: relative;
|
|
42
42
|
`,
|
|
43
43
|
children: [
|
|
@@ -55,9 +55,9 @@ const S = {
|
|
|
55
55
|
o.DialogTitle,
|
|
56
56
|
{
|
|
57
57
|
"ws:style": i`
|
|
58
|
-
font-size: ${
|
|
59
|
-
line-height: ${
|
|
60
|
-
letter-spacing: ${
|
|
58
|
+
font-size: ${d.lg};
|
|
59
|
+
line-height: ${m.none};
|
|
60
|
+
letter-spacing: ${u.tight};
|
|
61
61
|
margin: 0;
|
|
62
62
|
`,
|
|
63
63
|
children: new r("Dialog Title you can edit")
|
|
@@ -67,8 +67,8 @@ const S = {
|
|
|
67
67
|
o.DialogDescription,
|
|
68
68
|
{
|
|
69
69
|
"ws:style": i`
|
|
70
|
-
font-size: ${
|
|
71
|
-
line-height: ${
|
|
70
|
+
font-size: ${d.sm};
|
|
71
|
+
line-height: ${w.sm};
|
|
72
72
|
color: ${a.mutedForeground};
|
|
73
73
|
margin: 0;
|
|
74
74
|
`,
|
|
@@ -87,21 +87,21 @@ const S = {
|
|
|
87
87
|
position: absolute;
|
|
88
88
|
right: ${t[4]};
|
|
89
89
|
top: ${t[4]};
|
|
90
|
-
border-radius: ${
|
|
91
|
-
opacity: ${
|
|
90
|
+
border-radius: ${$.sm};
|
|
91
|
+
opacity: ${s[70]};
|
|
92
92
|
display: flex;
|
|
93
93
|
align-items: center;
|
|
94
94
|
justify-content: center;
|
|
95
|
-
height: ${
|
|
96
|
-
width: ${
|
|
95
|
+
height: ${c[4]};
|
|
96
|
+
width: ${c[4]};
|
|
97
97
|
border: 0;
|
|
98
98
|
background-color: transparent;
|
|
99
99
|
outline: none;
|
|
100
100
|
&:hover {
|
|
101
|
-
opacity: ${
|
|
101
|
+
opacity: ${s[100]};
|
|
102
102
|
}
|
|
103
103
|
&:focus-visible {
|
|
104
|
-
box-shadow: ${
|
|
104
|
+
box-shadow: ${g.ring};
|
|
105
105
|
}
|
|
106
106
|
`,
|
|
107
107
|
children: /* @__PURE__ */ e(l.HtmlEmbed, { "ws:label": "Close Icon", code: p })
|
package/lib/dialog.ws.js
CHANGED
|
@@ -1,138 +1,80 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { propsDialog as D, propsDialogTrigger as
|
|
5
|
-
import { buttonReset as
|
|
6
|
-
const
|
|
7
|
-
type: "container",
|
|
8
|
-
icon: t,
|
|
9
|
-
constraints: {
|
|
10
|
-
relation: "ancestor",
|
|
11
|
-
component: { $eq: "Dialog" }
|
|
12
|
-
}
|
|
13
|
-
}, P = {
|
|
14
|
-
type: "container",
|
|
15
|
-
presetStyle: {
|
|
16
|
-
div: o
|
|
17
|
-
},
|
|
1
|
+
import { DialogIcon as t, TriggerIcon as n, OverlayIcon as i, ContentIcon as r, ButtonElementIcon as c, HeadingIcon as l, TextIcon as a } from "@webstudio-is/icons/svg";
|
|
2
|
+
import { div as e, button as s, h2 as p, p as g } from "@webstudio-is/sdk/normalize.css";
|
|
3
|
+
import { radix as o } 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 T } from "./__generated__/dialog.props.js";
|
|
5
|
+
import { buttonReset as I } from "./shared/preset-styles.js";
|
|
6
|
+
const S = {
|
|
18
7
|
icon: n,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
component: { $eq: "Dialog" }
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
relation: "descendant",
|
|
26
|
-
component: { $eq: "DialogContent" }
|
|
27
|
-
}
|
|
28
|
-
]
|
|
29
|
-
}, S = {
|
|
30
|
-
type: "container",
|
|
31
|
-
presetStyle: {
|
|
32
|
-
div: o
|
|
8
|
+
contentModel: {
|
|
9
|
+
category: "none",
|
|
10
|
+
children: ["instance"]
|
|
33
11
|
},
|
|
34
|
-
|
|
35
|
-
constraints: [
|
|
36
|
-
{
|
|
37
|
-
relation: "ancestor",
|
|
38
|
-
component: { $eq: "DialogOverlay" }
|
|
39
|
-
},
|
|
40
|
-
// often deleted by users
|
|
41
|
-
// though radix starts throwing warnings in console
|
|
42
|
-
/*
|
|
43
|
-
{
|
|
44
|
-
relation: "descendant",
|
|
45
|
-
component: { $eq: "DialogTitle" },
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
relation: "descendant",
|
|
49
|
-
component: { $eq: "DialogDescription" },
|
|
50
|
-
},
|
|
51
|
-
*/
|
|
52
|
-
{
|
|
53
|
-
relation: "descendant",
|
|
54
|
-
component: { $eq: "DialogClose" }
|
|
55
|
-
}
|
|
56
|
-
]
|
|
12
|
+
props: d
|
|
57
13
|
}, b = {
|
|
58
|
-
type: "container",
|
|
59
|
-
presetStyle: {
|
|
60
|
-
h2: l
|
|
61
|
-
},
|
|
62
14
|
icon: i,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}, x = {
|
|
68
|
-
type: "container",
|
|
69
|
-
presetStyle: {
|
|
70
|
-
p: c
|
|
15
|
+
contentModel: {
|
|
16
|
+
category: "none",
|
|
17
|
+
children: ["instance"],
|
|
18
|
+
descendants: [o.DialogContent]
|
|
71
19
|
},
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
20
|
+
presetStyle: { div: e },
|
|
21
|
+
props: m
|
|
22
|
+
}, O = {
|
|
23
|
+
icon: r,
|
|
24
|
+
contentModel: {
|
|
25
|
+
category: "none",
|
|
26
|
+
children: ["instance"],
|
|
27
|
+
descendants: [
|
|
28
|
+
o.DialogTitle,
|
|
29
|
+
o.DialogDescription,
|
|
30
|
+
o.DialogClose
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
presetStyle: { div: e },
|
|
34
|
+
props: y
|
|
77
35
|
}, B = {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
36
|
+
icon: l,
|
|
37
|
+
contentModel: {
|
|
38
|
+
category: "none",
|
|
39
|
+
children: ["instance", "rich-text"]
|
|
81
40
|
},
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
label: "Close Button",
|
|
85
|
-
constraints: {
|
|
86
|
-
relation: "ancestor",
|
|
87
|
-
component: { $eq: "DialogContent" }
|
|
88
|
-
}
|
|
89
|
-
}, h = {
|
|
90
|
-
type: "container",
|
|
91
|
-
icon: s,
|
|
92
|
-
constraints: [
|
|
93
|
-
{
|
|
94
|
-
relation: "descendant",
|
|
95
|
-
component: { $eq: "DialogTrigger" }
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
relation: "descendant",
|
|
99
|
-
component: { $eq: "DialogOverlay" }
|
|
100
|
-
}
|
|
101
|
-
]
|
|
41
|
+
presetStyle: { h2: p },
|
|
42
|
+
props: C
|
|
102
43
|
}, E = {
|
|
103
|
-
|
|
104
|
-
|
|
44
|
+
icon: a,
|
|
45
|
+
contentModel: {
|
|
46
|
+
category: "none",
|
|
47
|
+
children: ["instance", "rich-text"]
|
|
48
|
+
},
|
|
49
|
+
presetStyle: { p: g },
|
|
50
|
+
props: T
|
|
105
51
|
}, H = {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
},
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
52
|
+
icon: c,
|
|
53
|
+
label: "Close Button",
|
|
54
|
+
contentModel: {
|
|
55
|
+
category: "none",
|
|
56
|
+
children: ["instance", "rich-text"]
|
|
57
|
+
},
|
|
58
|
+
presetStyle: {
|
|
59
|
+
button: [I, s].flat()
|
|
60
|
+
},
|
|
61
|
+
props: h
|
|
62
|
+
}, P = {
|
|
63
|
+
icon: t,
|
|
64
|
+
contentModel: {
|
|
65
|
+
category: "instance",
|
|
66
|
+
children: ["instance"],
|
|
67
|
+
descendants: [o.DialogTrigger, o.DialogOverlay]
|
|
68
|
+
},
|
|
69
|
+
initialProps: ["open"],
|
|
70
|
+
props: D
|
|
122
71
|
};
|
|
123
72
|
export {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
E as propsMetaDialog,
|
|
132
|
-
k as propsMetaDialogClose,
|
|
133
|
-
R as propsMetaDialogContent,
|
|
134
|
-
z as propsMetaDialogDescription,
|
|
135
|
-
j as propsMetaDialogOverlay,
|
|
136
|
-
w as propsMetaDialogTitle,
|
|
137
|
-
H as propsMetaDialogTrigger
|
|
73
|
+
P as metaDialog,
|
|
74
|
+
H as metaDialogClose,
|
|
75
|
+
O as metaDialogContent,
|
|
76
|
+
E as metaDialogDescription,
|
|
77
|
+
b as metaDialogOverlay,
|
|
78
|
+
B as metaDialogTitle,
|
|
79
|
+
S as metaDialogTrigger
|
|
138
80
|
};
|
package/lib/label.template.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { PlaceholderValue as t, css as o } from "@webstudio-is/template";
|
|
3
3
|
import { radix as i } from "./shared/proxy.js";
|
|
4
4
|
import { fontSize as r, lineHeight as n, weights as h } from "./shared/theme.js";
|
|
5
5
|
const p = {
|
|
@@ -9,12 +9,12 @@ const p = {
|
|
|
9
9
|
template: /* @__PURE__ */ e(
|
|
10
10
|
i.Label,
|
|
11
11
|
{
|
|
12
|
-
"ws:style":
|
|
12
|
+
"ws:style": o`
|
|
13
13
|
font-size: ${r.sm};
|
|
14
14
|
line-height: ${n.none};
|
|
15
15
|
font-weight: ${h.medium};
|
|
16
16
|
`,
|
|
17
|
-
children: new
|
|
17
|
+
children: new t("Form Label")
|
|
18
18
|
}
|
|
19
19
|
)
|
|
20
20
|
};
|
package/lib/label.ws.js
CHANGED
|
@@ -1,19 +1,12 @@
|
|
|
1
|
-
import { LabelIcon as
|
|
2
|
-
import { defaultStates as o } from "@webstudio-is/sdk";
|
|
1
|
+
import { LabelIcon as o } from "@webstudio-is/icons/svg";
|
|
3
2
|
import { label as r } from "@webstudio-is/sdk/normalize.css";
|
|
4
|
-
import { props as
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
presetStyle: p,
|
|
11
|
-
states: o
|
|
12
|
-
}, n = {
|
|
13
|
-
props: e,
|
|
14
|
-
initialProps: ["id", "className", "htmlFor"]
|
|
3
|
+
import { props as t } from "./__generated__/label.props.js";
|
|
4
|
+
const m = {
|
|
5
|
+
icon: o,
|
|
6
|
+
presetStyle: { label: r },
|
|
7
|
+
initialProps: ["id", "class", "for"],
|
|
8
|
+
props: t
|
|
15
9
|
};
|
|
16
10
|
export {
|
|
17
|
-
|
|
18
|
-
n as propsMeta
|
|
11
|
+
m as meta
|
|
19
12
|
};
|