@webstudio-is/sdk-components-react-radix 0.196.0 → 0.198.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__/select.props.js +6 -0
- package/lib/__generated__/tabs.props.js +2 -2
- package/lib/accordion.template.js +95 -0
- package/lib/accordion.ws.js +53 -205
- package/lib/checkbox.template.js +63 -0
- package/lib/checkbox.ws.js +22 -119
- package/lib/collapsible.template.js +16 -0
- package/lib/collapsible.ws.js +21 -71
- package/lib/dialog.template.js +119 -0
- package/lib/dialog.ws.js +60 -237
- package/lib/label.template.js +23 -0
- package/lib/label.ws.js +12 -36
- package/lib/metas.js +48 -50
- package/lib/navigation-menu.template.js +283 -0
- package/lib/navigation-menu.ws.js +54 -420
- package/lib/popover.template.js +33 -0
- package/lib/popover.ws.js +19 -79
- package/lib/radio-group.template.js +66 -0
- package/lib/radio-group.ws.js +27 -125
- package/lib/select.template.js +121 -0
- package/lib/select.ws.js +61 -262
- 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 +1 -1
- package/lib/switch.template.js +63 -0
- package/lib/switch.ws.js +22 -106
- package/lib/tabs.template.js +66 -0
- package/lib/tabs.ws.js +36 -131
- package/lib/templates.js +28 -1
- package/lib/tooltip.template.js +33 -0
- package/lib/tooltip.ws.js +24 -84
- 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__/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.template.d.ts +10 -0
- package/lib/types/accordion.ws.d.ts +1 -1
- package/lib/types/checkbox.d.ts +1 -1
- package/lib/types/checkbox.template.d.ts +2 -0
- package/lib/types/checkbox.ws.d.ts +1 -1
- package/lib/types/collapsible.template.d.ts +2 -0
- package/lib/types/collapsible.ws.d.ts +1 -1
- package/lib/types/dialog.template.d.ts +10 -0
- package/lib/types/dialog.ws.d.ts +1 -9
- package/lib/types/label.template.d.ts +10 -0
- package/lib/types/label.ws.d.ts +1 -1
- package/lib/types/metas.d.ts +0 -1
- package/lib/types/navigation-menu.template.d.ts +2 -0
- package/lib/types/navigation-menu.ws.d.ts +1 -1
- package/lib/types/popover.template.d.ts +10 -0
- package/lib/types/popover.ws.d.ts +1 -9
- package/lib/types/radio-group.template.d.ts +2 -0
- package/lib/types/radio-group.ws.d.ts +1 -1
- package/lib/types/select.template.d.ts +2 -0
- package/lib/types/select.ws.d.ts +1 -1
- package/lib/types/shared/preset-styles.d.ts +2 -0
- package/lib/types/shared/proxy.d.ts +17 -0
- package/lib/types/shared/styles.d.ts +2 -0
- package/lib/types/shared/theme.d.ts +212 -0
- package/lib/types/{sheet.ws.d.ts → sheet.template.d.ts} +2 -2
- package/lib/types/switch.template.d.ts +2 -0
- package/lib/types/switch.ws.d.ts +1 -1
- package/lib/types/tabs.template.d.ts +2 -0
- package/lib/types/tabs.ws.d.ts +1 -1
- package/lib/types/templates.d.ts +13 -0
- package/lib/types/tooltip.template.d.ts +10 -0
- package/lib/types/tooltip.ws.d.ts +1 -9
- package/package.json +25 -22
- package/lib/sheet.ws.js +0 -217
- package/lib/theme/__generated__/tailwind-theme.js +0 -503
- package/lib/theme/styles.js +0 -52
- package/lib/theme/tailwind-classes.js +0 -474
- package/lib/types/__generated__/sheet.props.d.ts +0 -8
- package/lib/types/theme/__generated__/tailwind-theme.d.ts +0 -26
- package/lib/types/theme/styles.d.ts +0 -278
- package/lib/types/theme/tailwind-classes.d.ts +0 -104
- package/lib/types/theme/tailwind-colors.d.ts +0 -31
package/lib/collapsible.ws.js
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import { CollapsibleIcon as
|
|
1
|
+
import { CollapsibleIcon as e, TriggerIcon as n, ContentIcon as t } from "@webstudio-is/icons/svg";
|
|
2
2
|
import { div as l } from "@webstudio-is/sdk/normalize.css";
|
|
3
|
-
import { propsCollapsible as p, propsCollapsibleTrigger as
|
|
4
|
-
|
|
5
|
-
const e = {
|
|
3
|
+
import { propsCollapsible as p, propsCollapsibleTrigger as s, propsCollapsibleContent as r } from "./__generated__/collapsible.props.js";
|
|
4
|
+
const o = {
|
|
6
5
|
div: l
|
|
7
|
-
},
|
|
8
|
-
category: "radix",
|
|
9
|
-
order: 5,
|
|
6
|
+
}, C = {
|
|
10
7
|
type: "container",
|
|
11
8
|
constraints: [
|
|
12
9
|
{
|
|
@@ -18,72 +15,25 @@ const e = {
|
|
|
18
15
|
component: { $eq: "CollapsibleContent" }
|
|
19
16
|
}
|
|
20
17
|
],
|
|
21
|
-
presetStyle:
|
|
22
|
-
icon:
|
|
23
|
-
|
|
24
|
-
template: [
|
|
25
|
-
{
|
|
26
|
-
type: "instance",
|
|
27
|
-
component: "Collapsible",
|
|
28
|
-
props: [],
|
|
29
|
-
children: [
|
|
30
|
-
{
|
|
31
|
-
type: "instance",
|
|
32
|
-
component: "CollapsibleTrigger",
|
|
33
|
-
children: [
|
|
34
|
-
{
|
|
35
|
-
type: "instance",
|
|
36
|
-
component: "Button",
|
|
37
|
-
styles: a("outline"),
|
|
38
|
-
children: [
|
|
39
|
-
{
|
|
40
|
-
type: "text",
|
|
41
|
-
value: "Click to toggle content",
|
|
42
|
-
placeholder: !0
|
|
43
|
-
}
|
|
44
|
-
]
|
|
45
|
-
}
|
|
46
|
-
]
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
type: "instance",
|
|
50
|
-
component: "CollapsibleContent",
|
|
51
|
-
children: [
|
|
52
|
-
{
|
|
53
|
-
type: "instance",
|
|
54
|
-
component: "Text",
|
|
55
|
-
children: [
|
|
56
|
-
{
|
|
57
|
-
type: "text",
|
|
58
|
-
value: "Collapsible Content",
|
|
59
|
-
placeholder: !0
|
|
60
|
-
}
|
|
61
|
-
]
|
|
62
|
-
}
|
|
63
|
-
]
|
|
64
|
-
}
|
|
65
|
-
]
|
|
66
|
-
}
|
|
67
|
-
]
|
|
68
|
-
}, g = {
|
|
69
|
-
category: "hidden",
|
|
18
|
+
presetStyle: o,
|
|
19
|
+
icon: e
|
|
20
|
+
}, b = {
|
|
70
21
|
type: "container",
|
|
71
|
-
icon:
|
|
22
|
+
icon: n,
|
|
72
23
|
stylable: !1,
|
|
73
24
|
constraints: {
|
|
74
25
|
relation: "ancestor",
|
|
75
26
|
component: { $eq: "Collapsible" }
|
|
76
27
|
}
|
|
77
|
-
},
|
|
78
|
-
category: "hidden",
|
|
28
|
+
}, m = {
|
|
79
29
|
type: "container",
|
|
80
|
-
presetStyle:
|
|
81
|
-
icon:
|
|
30
|
+
presetStyle: o,
|
|
31
|
+
icon: t,
|
|
82
32
|
constraints: {
|
|
83
33
|
relation: "ancestor",
|
|
84
34
|
component: { $eq: "Collapsible" }
|
|
85
35
|
}
|
|
86
|
-
},
|
|
36
|
+
}, g = {
|
|
87
37
|
props: {
|
|
88
38
|
...p,
|
|
89
39
|
onOpenChange: {
|
|
@@ -93,16 +43,16 @@ const e = {
|
|
|
93
43
|
}
|
|
94
44
|
},
|
|
95
45
|
initialProps: ["open", "onOpenChange"]
|
|
96
|
-
},
|
|
97
|
-
props:
|
|
98
|
-
},
|
|
46
|
+
}, d = {
|
|
47
|
+
props: s
|
|
48
|
+
}, y = {
|
|
99
49
|
props: r
|
|
100
50
|
};
|
|
101
51
|
export {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
52
|
+
C as metaCollapsible,
|
|
53
|
+
m as metaCollapsibleContent,
|
|
54
|
+
b as metaCollapsibleTrigger,
|
|
55
|
+
g as propsMetaCollapsible,
|
|
56
|
+
y as propsMetaCollapsibleContent,
|
|
57
|
+
d as propsMetaCollapsibleTrigger
|
|
108
58
|
};
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { LargeXIcon as p } from "@webstudio-is/icons/svg";
|
|
3
|
+
import { $ as l, PlaceholderValue as r, css as i } from "@webstudio-is/template";
|
|
4
|
+
import { radix as o } from "./shared/proxy.js";
|
|
5
|
+
import { zIndex as d, blur as m, width as u, spacing as t, maxWidth as w, borderWidth as $, colors as a, boxShadow as s, fontSize as c, lineHeight as y, letterSpacing as b, fontSizeLineHeight as x, borderRadius as f, opacity as g, height as h } from "./shared/theme.js";
|
|
6
|
+
import { getButtonStyle as D } from "./shared/styles.js";
|
|
7
|
+
const S = {
|
|
8
|
+
category: "radix",
|
|
9
|
+
description: "Displays content with an overlay that covers the window, triggered by a button. Clicking the overlay will close the dialog.",
|
|
10
|
+
order: 4,
|
|
11
|
+
template: /* @__PURE__ */ n(o.Dialog, { children: [
|
|
12
|
+
/* @__PURE__ */ e(o.DialogTrigger, { children: /* @__PURE__ */ e(l.Button, { "ws:style": D("outline"), children: new r("Button") }) }),
|
|
13
|
+
/* @__PURE__ */ e(
|
|
14
|
+
o.DialogOverlay,
|
|
15
|
+
{
|
|
16
|
+
"ws:style": i`
|
|
17
|
+
position: fixed;
|
|
18
|
+
inset: 0;
|
|
19
|
+
z-index: ${d[50]};
|
|
20
|
+
background-color: rgb(255 255 255 / 0.8);
|
|
21
|
+
backdrop-filter: ${m.sm};
|
|
22
|
+
/* To allow positioning Content */
|
|
23
|
+
display: flex;
|
|
24
|
+
overflow: auto;
|
|
25
|
+
`,
|
|
26
|
+
children: /* @__PURE__ */ n(
|
|
27
|
+
o.DialogContent,
|
|
28
|
+
{
|
|
29
|
+
"ws:style": i`
|
|
30
|
+
width: ${u.full};
|
|
31
|
+
z-index: ${d[50]};
|
|
32
|
+
display: flex;
|
|
33
|
+
flex-direction: column;
|
|
34
|
+
gap: ${t[4]};
|
|
35
|
+
margin: auto;
|
|
36
|
+
max-width: ${w.lg};
|
|
37
|
+
border: ${$.DEFAULT} solid ${a.border};
|
|
38
|
+
background-color: ${a.background};
|
|
39
|
+
padding: ${t[6]};
|
|
40
|
+
box-shadow: ${s.lg};
|
|
41
|
+
position: relative;
|
|
42
|
+
`,
|
|
43
|
+
children: [
|
|
44
|
+
/* @__PURE__ */ n(
|
|
45
|
+
l.Box,
|
|
46
|
+
{
|
|
47
|
+
"ws:label": "Dialog Header",
|
|
48
|
+
"ws:style": i`
|
|
49
|
+
display: flex;
|
|
50
|
+
flex-direction: column;
|
|
51
|
+
gap: ${t[2]};
|
|
52
|
+
`,
|
|
53
|
+
children: [
|
|
54
|
+
/* @__PURE__ */ e(
|
|
55
|
+
o.DialogTitle,
|
|
56
|
+
{
|
|
57
|
+
"ws:style": i`
|
|
58
|
+
font-size: ${c.lg};
|
|
59
|
+
line-height: ${y.none};
|
|
60
|
+
letter-spacing: ${b.tight};
|
|
61
|
+
margin: 0;
|
|
62
|
+
`,
|
|
63
|
+
children: new r("Dialog Title you can edit")
|
|
64
|
+
}
|
|
65
|
+
),
|
|
66
|
+
/* @__PURE__ */ e(
|
|
67
|
+
o.DialogDescription,
|
|
68
|
+
{
|
|
69
|
+
"ws:style": i`
|
|
70
|
+
font-size: ${c.sm};
|
|
71
|
+
line-height: ${x.sm};
|
|
72
|
+
color: ${a.mutedForeground};
|
|
73
|
+
margin: 0;
|
|
74
|
+
`,
|
|
75
|
+
children: new r("Dialog description text you can edit")
|
|
76
|
+
}
|
|
77
|
+
)
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
),
|
|
81
|
+
/* @__PURE__ */ e(l.Text, { children: new r("The text you can edit") }),
|
|
82
|
+
/* @__PURE__ */ e(
|
|
83
|
+
o.DialogClose,
|
|
84
|
+
{
|
|
85
|
+
"ws:label": "Close Button",
|
|
86
|
+
"ws:style": i`
|
|
87
|
+
position: absolute;
|
|
88
|
+
right: ${t[4]};
|
|
89
|
+
top: ${t[4]};
|
|
90
|
+
border-radius: ${f.sm};
|
|
91
|
+
opacity: ${g[70]};
|
|
92
|
+
display: flex;
|
|
93
|
+
align-items: center;
|
|
94
|
+
justify-content: center;
|
|
95
|
+
height: ${h[4]};
|
|
96
|
+
width: ${h[4]};
|
|
97
|
+
border: 0;
|
|
98
|
+
background-color: transparent;
|
|
99
|
+
outline: none;
|
|
100
|
+
&:hover {
|
|
101
|
+
opacity: ${g[100]};
|
|
102
|
+
}
|
|
103
|
+
&:focus-visible {
|
|
104
|
+
box-shadow: ${s.ring};
|
|
105
|
+
}
|
|
106
|
+
`,
|
|
107
|
+
children: /* @__PURE__ */ e(l.HtmlEmbed, { "ws:label": "Close Icon", code: p })
|
|
108
|
+
}
|
|
109
|
+
)
|
|
110
|
+
]
|
|
111
|
+
}
|
|
112
|
+
)
|
|
113
|
+
}
|
|
114
|
+
)
|
|
115
|
+
] })
|
|
116
|
+
};
|
|
117
|
+
export {
|
|
118
|
+
S as meta
|
|
119
|
+
};
|
package/lib/dialog.ws.js
CHANGED
|
@@ -1,29 +1,26 @@
|
|
|
1
|
-
import { TriggerIcon as
|
|
2
|
-
import { defaultStates as
|
|
3
|
-
import { button as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}, se = {
|
|
14
|
-
category: "hidden",
|
|
1
|
+
import { TriggerIcon as t, OverlayIcon as e, ContentIcon as n, HeadingIcon as i, TextIcon as a, ButtonElementIcon as r, DialogIcon as s } from "@webstudio-is/icons/svg";
|
|
2
|
+
import { defaultStates as l } from "@webstudio-is/sdk";
|
|
3
|
+
import { button as p, div as c, h2 as g, p as D } from "@webstudio-is/sdk/normalize.css";
|
|
4
|
+
import { propsDialog as m, propsDialogTrigger as y, propsDialogContent as C, propsDialogOverlay as d, propsDialogClose as q, propsDialogTitle as $, propsDialogDescription as f } from "./__generated__/dialog.props.js";
|
|
5
|
+
import { buttonReset as T } from "./shared/preset-styles.js";
|
|
6
|
+
const o = {
|
|
7
|
+
div: c
|
|
8
|
+
}, P = {
|
|
9
|
+
h2: g
|
|
10
|
+
}, v = {
|
|
11
|
+
p: D
|
|
12
|
+
}, O = {
|
|
15
13
|
type: "container",
|
|
16
|
-
icon:
|
|
14
|
+
icon: t,
|
|
17
15
|
stylable: !1,
|
|
18
16
|
constraints: {
|
|
19
17
|
relation: "ancestor",
|
|
20
18
|
component: { $eq: "Dialog" }
|
|
21
19
|
}
|
|
22
|
-
},
|
|
23
|
-
category: "hidden",
|
|
20
|
+
}, x = {
|
|
24
21
|
type: "container",
|
|
25
|
-
presetStyle:
|
|
26
|
-
icon:
|
|
22
|
+
presetStyle: o,
|
|
23
|
+
icon: e,
|
|
27
24
|
constraints: [
|
|
28
25
|
{
|
|
29
26
|
relation: "ancestor",
|
|
@@ -34,11 +31,10 @@ const c = {
|
|
|
34
31
|
component: { $eq: "DialogContent" }
|
|
35
32
|
}
|
|
36
33
|
]
|
|
37
|
-
},
|
|
38
|
-
category: "hidden",
|
|
34
|
+
}, B = {
|
|
39
35
|
type: "container",
|
|
40
|
-
presetStyle:
|
|
41
|
-
icon:
|
|
36
|
+
presetStyle: o,
|
|
37
|
+
icon: n,
|
|
42
38
|
constraints: [
|
|
43
39
|
{
|
|
44
40
|
relation: "ancestor",
|
|
@@ -61,40 +57,35 @@ const c = {
|
|
|
61
57
|
component: { $eq: "DialogClose" }
|
|
62
58
|
}
|
|
63
59
|
]
|
|
64
|
-
},
|
|
65
|
-
category: "hidden",
|
|
60
|
+
}, h = {
|
|
66
61
|
type: "container",
|
|
67
|
-
presetStyle:
|
|
68
|
-
icon:
|
|
62
|
+
presetStyle: P,
|
|
63
|
+
icon: i,
|
|
69
64
|
constraints: {
|
|
70
65
|
relation: "ancestor",
|
|
71
66
|
component: { $eq: "DialogContent" }
|
|
72
67
|
}
|
|
73
|
-
},
|
|
74
|
-
category: "hidden",
|
|
68
|
+
}, E = {
|
|
75
69
|
type: "container",
|
|
76
|
-
presetStyle:
|
|
77
|
-
icon:
|
|
70
|
+
presetStyle: v,
|
|
71
|
+
icon: a,
|
|
78
72
|
constraints: {
|
|
79
73
|
relation: "ancestor",
|
|
80
74
|
component: { $eq: "DialogContent" }
|
|
81
75
|
}
|
|
82
|
-
},
|
|
83
|
-
category: "hidden",
|
|
76
|
+
}, H = {
|
|
84
77
|
type: "container",
|
|
85
78
|
presetStyle: {
|
|
86
|
-
button: [
|
|
79
|
+
button: [T, p].flat()
|
|
87
80
|
},
|
|
88
|
-
states:
|
|
89
|
-
icon:
|
|
81
|
+
states: l,
|
|
82
|
+
icon: r,
|
|
90
83
|
label: "Close Button",
|
|
91
84
|
constraints: {
|
|
92
85
|
relation: "ancestor",
|
|
93
86
|
component: { $eq: "DialogContent" }
|
|
94
87
|
}
|
|
95
|
-
},
|
|
96
|
-
category: "radix",
|
|
97
|
-
order: 4,
|
|
88
|
+
}, R = {
|
|
98
89
|
type: "container",
|
|
99
90
|
constraints: [
|
|
100
91
|
{
|
|
@@ -106,210 +97,42 @@ const c = {
|
|
|
106
97
|
component: { $eq: "DialogOverlay" }
|
|
107
98
|
}
|
|
108
99
|
],
|
|
109
|
-
icon:
|
|
110
|
-
stylable: !1
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
{
|
|
114
|
-
type: "instance",
|
|
115
|
-
component: "Dialog",
|
|
116
|
-
children: [
|
|
117
|
-
{
|
|
118
|
-
type: "instance",
|
|
119
|
-
component: "DialogTrigger",
|
|
120
|
-
children: [
|
|
121
|
-
{
|
|
122
|
-
type: "instance",
|
|
123
|
-
component: "Button",
|
|
124
|
-
styles: _("outline"),
|
|
125
|
-
children: [{ type: "text", value: "Button", placeholder: !0 }]
|
|
126
|
-
}
|
|
127
|
-
]
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
type: "instance",
|
|
131
|
-
component: "DialogOverlay",
|
|
132
|
-
/**
|
|
133
|
-
* fixed inset-0 z-50 bg-background/80 backdrop-blur-sm
|
|
134
|
-
* flex
|
|
135
|
-
**/
|
|
136
|
-
styles: [
|
|
137
|
-
T(),
|
|
138
|
-
$(0),
|
|
139
|
-
n(50),
|
|
140
|
-
t("background", 80),
|
|
141
|
-
q("sm"),
|
|
142
|
-
// To allow positioning Content
|
|
143
|
-
e(),
|
|
144
|
-
I("auto")
|
|
145
|
-
].flat(),
|
|
146
|
-
children: [
|
|
147
|
-
{
|
|
148
|
-
type: "instance",
|
|
149
|
-
component: "DialogContent",
|
|
150
|
-
/**
|
|
151
|
-
* fixed w-full z-50
|
|
152
|
-
* grid gap-4 max-w-lg
|
|
153
|
-
* m-auto
|
|
154
|
-
* border bg-background p-6 shadow-lg
|
|
155
|
-
**/
|
|
156
|
-
styles: [
|
|
157
|
-
a("full"),
|
|
158
|
-
n(50),
|
|
159
|
-
e(),
|
|
160
|
-
e("col"),
|
|
161
|
-
i(4),
|
|
162
|
-
P("auto"),
|
|
163
|
-
S("lg"),
|
|
164
|
-
l(),
|
|
165
|
-
t("background"),
|
|
166
|
-
w(6),
|
|
167
|
-
B("lg"),
|
|
168
|
-
M()
|
|
169
|
-
].flat(),
|
|
170
|
-
children: [
|
|
171
|
-
{
|
|
172
|
-
type: "instance",
|
|
173
|
-
component: "Box",
|
|
174
|
-
label: "Dialog Header",
|
|
175
|
-
styles: [e(), e("col"), i(1)].flat(),
|
|
176
|
-
children: [
|
|
177
|
-
{
|
|
178
|
-
type: "instance",
|
|
179
|
-
component: "DialogTitle",
|
|
180
|
-
/**
|
|
181
|
-
* text-lg leading-none tracking-tight
|
|
182
|
-
**/
|
|
183
|
-
styles: [
|
|
184
|
-
r(0),
|
|
185
|
-
O("none"),
|
|
186
|
-
o("lg"),
|
|
187
|
-
k("tight")
|
|
188
|
-
].flat(),
|
|
189
|
-
children: [
|
|
190
|
-
{
|
|
191
|
-
type: "text",
|
|
192
|
-
value: "Dialog Title you can edit",
|
|
193
|
-
placeholder: !0
|
|
194
|
-
}
|
|
195
|
-
]
|
|
196
|
-
},
|
|
197
|
-
{
|
|
198
|
-
type: "instance",
|
|
199
|
-
component: "DialogDescription",
|
|
200
|
-
/**
|
|
201
|
-
* text-sm text-muted-foreground
|
|
202
|
-
**/
|
|
203
|
-
styles: [
|
|
204
|
-
r(0),
|
|
205
|
-
o("sm"),
|
|
206
|
-
o("mutedForeground")
|
|
207
|
-
].flat(),
|
|
208
|
-
children: [
|
|
209
|
-
{
|
|
210
|
-
type: "text",
|
|
211
|
-
value: "Dialog description text you can edit",
|
|
212
|
-
placeholder: !0
|
|
213
|
-
}
|
|
214
|
-
]
|
|
215
|
-
}
|
|
216
|
-
]
|
|
217
|
-
},
|
|
218
|
-
{
|
|
219
|
-
type: "instance",
|
|
220
|
-
component: "Text",
|
|
221
|
-
children: [
|
|
222
|
-
{
|
|
223
|
-
type: "text",
|
|
224
|
-
value: "The text you can edit",
|
|
225
|
-
placeholder: !0
|
|
226
|
-
}
|
|
227
|
-
]
|
|
228
|
-
},
|
|
229
|
-
{
|
|
230
|
-
type: "instance",
|
|
231
|
-
component: "DialogClose",
|
|
232
|
-
/**
|
|
233
|
-
* absolute right-4 top-4
|
|
234
|
-
* rounded-sm opacity-70
|
|
235
|
-
* ring-offset-background
|
|
236
|
-
* hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2
|
|
237
|
-
* flex items-center justify-center h-4 w-4
|
|
238
|
-
**/
|
|
239
|
-
styles: [
|
|
240
|
-
H(),
|
|
241
|
-
E(4),
|
|
242
|
-
j(4),
|
|
243
|
-
z("sm"),
|
|
244
|
-
s(70),
|
|
245
|
-
e(),
|
|
246
|
-
F("center"),
|
|
247
|
-
L("center"),
|
|
248
|
-
R(4),
|
|
249
|
-
a(4),
|
|
250
|
-
l(0),
|
|
251
|
-
t("transparent"),
|
|
252
|
-
W(),
|
|
253
|
-
X(s(100)),
|
|
254
|
-
A(G("ring", 2, "background", 2))
|
|
255
|
-
].flat(),
|
|
256
|
-
children: [
|
|
257
|
-
{
|
|
258
|
-
type: "instance",
|
|
259
|
-
component: "HtmlEmbed",
|
|
260
|
-
label: "Close Icon",
|
|
261
|
-
props: [
|
|
262
|
-
{
|
|
263
|
-
type: "string",
|
|
264
|
-
name: "code",
|
|
265
|
-
value: h
|
|
266
|
-
}
|
|
267
|
-
],
|
|
268
|
-
children: []
|
|
269
|
-
}
|
|
270
|
-
]
|
|
271
|
-
}
|
|
272
|
-
]
|
|
273
|
-
}
|
|
274
|
-
]
|
|
275
|
-
}
|
|
276
|
-
]
|
|
277
|
-
}
|
|
278
|
-
]
|
|
279
|
-
}, De = {
|
|
280
|
-
props: J,
|
|
100
|
+
icon: s,
|
|
101
|
+
stylable: !1
|
|
102
|
+
}, j = {
|
|
103
|
+
props: m,
|
|
281
104
|
initialProps: []
|
|
282
|
-
},
|
|
283
|
-
props:
|
|
284
|
-
},
|
|
285
|
-
props:
|
|
105
|
+
}, k = {
|
|
106
|
+
props: y
|
|
107
|
+
}, w = {
|
|
108
|
+
props: C,
|
|
286
109
|
initialProps: []
|
|
287
|
-
},
|
|
288
|
-
props:
|
|
110
|
+
}, z = {
|
|
111
|
+
props: d,
|
|
289
112
|
initialProps: []
|
|
290
|
-
},
|
|
291
|
-
props:
|
|
113
|
+
}, A = {
|
|
114
|
+
props: q,
|
|
292
115
|
initialProps: []
|
|
293
|
-
},
|
|
294
|
-
props:
|
|
116
|
+
}, F = {
|
|
117
|
+
props: $,
|
|
295
118
|
initialProps: []
|
|
296
|
-
},
|
|
297
|
-
props:
|
|
119
|
+
}, G = {
|
|
120
|
+
props: f,
|
|
298
121
|
initialProps: []
|
|
299
122
|
};
|
|
300
123
|
export {
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
124
|
+
R as metaDialog,
|
|
125
|
+
H as metaDialogClose,
|
|
126
|
+
B as metaDialogContent,
|
|
127
|
+
E as metaDialogDescription,
|
|
128
|
+
x as metaDialogOverlay,
|
|
129
|
+
h as metaDialogTitle,
|
|
130
|
+
O as metaDialogTrigger,
|
|
131
|
+
j as propsMetaDialog,
|
|
132
|
+
A as propsMetaDialogClose,
|
|
133
|
+
w as propsMetaDialogContent,
|
|
134
|
+
G as propsMetaDialogDescription,
|
|
135
|
+
z as propsMetaDialogOverlay,
|
|
136
|
+
F as propsMetaDialogTitle,
|
|
137
|
+
k as propsMetaDialogTrigger
|
|
315
138
|
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { css as t, PlaceholderValue as o } from "@webstudio-is/template";
|
|
3
|
+
import { radix as i } from "./shared/proxy.js";
|
|
4
|
+
import { fontSize as r, lineHeight as n, weights as h } from "./shared/theme.js";
|
|
5
|
+
const p = {
|
|
6
|
+
category: "radix",
|
|
7
|
+
description: "An accessible label to describe the purpose of an input. Match the “For” property on the label with the “ID” of the input to connect them.",
|
|
8
|
+
order: 102,
|
|
9
|
+
template: /* @__PURE__ */ e(
|
|
10
|
+
i.Label,
|
|
11
|
+
{
|
|
12
|
+
"ws:style": t`
|
|
13
|
+
font-size: ${r.sm};
|
|
14
|
+
line-height: ${n.none};
|
|
15
|
+
font-weight: ${h.medium};
|
|
16
|
+
`,
|
|
17
|
+
children: new o("Form Label")
|
|
18
|
+
}
|
|
19
|
+
)
|
|
20
|
+
};
|
|
21
|
+
export {
|
|
22
|
+
p as meta
|
|
23
|
+
};
|
package/lib/label.ws.js
CHANGED
|
@@ -1,43 +1,19 @@
|
|
|
1
|
-
import { LabelIcon as
|
|
2
|
-
import { defaultStates as o } from "@webstudio-is/
|
|
1
|
+
import { LabelIcon as t } from "@webstudio-is/icons/svg";
|
|
2
|
+
import { defaultStates as o } from "@webstudio-is/sdk";
|
|
3
3
|
import { label as r } from "@webstudio-is/sdk/normalize.css";
|
|
4
|
-
import { props as
|
|
5
|
-
|
|
6
|
-
const n = {
|
|
4
|
+
import { props as e } from "./__generated__/label.props.js";
|
|
5
|
+
const p = {
|
|
7
6
|
label: r
|
|
8
|
-
},
|
|
9
|
-
category: "radix",
|
|
10
|
-
order: 102,
|
|
7
|
+
}, l = {
|
|
11
8
|
type: "container",
|
|
12
|
-
icon:
|
|
13
|
-
presetStyle:
|
|
14
|
-
states: o
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
{
|
|
18
|
-
type: "instance",
|
|
19
|
-
component: "Label",
|
|
20
|
-
styles: [
|
|
21
|
-
// text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70
|
|
22
|
-
a("sm"),
|
|
23
|
-
l("medium"),
|
|
24
|
-
p("none")
|
|
25
|
-
// We are not supporting peer like styles yet
|
|
26
|
-
].flat(),
|
|
27
|
-
children: [{ type: "text", value: "Form Label", placeholder: !0 }]
|
|
28
|
-
}
|
|
29
|
-
]
|
|
30
|
-
}, f = {
|
|
31
|
-
props: {
|
|
32
|
-
...t,
|
|
33
|
-
htmlFor: {
|
|
34
|
-
...t.htmlFor,
|
|
35
|
-
label: "For"
|
|
36
|
-
}
|
|
37
|
-
},
|
|
9
|
+
icon: t,
|
|
10
|
+
presetStyle: p,
|
|
11
|
+
states: o
|
|
12
|
+
}, n = {
|
|
13
|
+
props: e,
|
|
38
14
|
initialProps: ["id", "className", "htmlFor"]
|
|
39
15
|
};
|
|
40
16
|
export {
|
|
41
|
-
|
|
42
|
-
|
|
17
|
+
l as meta,
|
|
18
|
+
n as propsMeta
|
|
43
19
|
};
|