@webstudio-is/sdk-components-react-radix 0.218.0 → 0.219.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/__generated__/accordion.props.js +9 -906
- package/lib/__generated__/checkbox.props.js +5 -403
- package/lib/__generated__/collapsible.props.js +7 -344
- package/lib/__generated__/dialog.props.js +10 -915
- package/lib/__generated__/label.props.js +2 -183
- package/lib/__generated__/navigation-menu.props.js +13 -1294
- package/lib/__generated__/popover.props.js +5 -174
- package/lib/__generated__/radio-group.props.js +14 -561
- package/lib/__generated__/select.props.js +38 -1273
- package/lib/__generated__/switch.props.js +5 -403
- package/lib/__generated__/tabs.props.js +12 -732
- package/lib/__generated__/tooltip.props.js +6 -175
- package/lib/accordion.js +4 -4
- package/lib/accordion.template.js +12 -12
- package/lib/checkbox.js +2 -2
- package/lib/checkbox.template.js +9 -9
- package/lib/collapsible.js +3 -3
- package/lib/dialog.template.js +19 -19
- package/lib/dialog.ws.js +15 -15
- package/lib/label.template.js +3 -3
- package/lib/navigation-menu.template.js +8 -8
- package/lib/navigation-menu.ws.js +6 -6
- package/lib/popover.ws.js +4 -4
- package/lib/radio-group.js +2 -2
- package/lib/select.js +4 -6
- package/lib/select.ws.js +6 -6
- package/lib/shared/theme.js +25 -68
- package/lib/sheet.template.js +20 -20
- package/lib/switch.js +2 -2
- package/lib/switch.template.js +9 -9
- package/lib/tabs.js +4 -4
- package/lib/tabs.template.js +15 -15
- package/lib/tooltip.ws.js +4 -4
- package/lib/types/select.d.ts +3 -3
- package/package.json +22 -22
|
@@ -17,20 +17,12 @@ const e = {
|
|
|
17
17
|
type: "boolean",
|
|
18
18
|
description: "Show or hide the content of this component on the canvas. This will not affect the initial state of the component."
|
|
19
19
|
}
|
|
20
|
-
},
|
|
21
|
-
about: { required: !1, control: "text", type: "string" },
|
|
22
|
-
accessKey: {
|
|
23
|
-
required: !1,
|
|
24
|
-
control: "text",
|
|
25
|
-
type: "string",
|
|
26
|
-
description: "Keyboard shortcut to activate or add focus to the element."
|
|
27
|
-
},
|
|
20
|
+
}, o = {}, t = {
|
|
28
21
|
align: {
|
|
29
22
|
required: !1,
|
|
30
23
|
control: "radio",
|
|
31
24
|
type: "string",
|
|
32
|
-
options: ["center", "start", "end"]
|
|
33
|
-
description: "Specifies the horizontal alignment of the element."
|
|
25
|
+
options: ["center", "start", "end"]
|
|
34
26
|
},
|
|
35
27
|
alignOffset: {
|
|
36
28
|
required: !1,
|
|
@@ -39,131 +31,19 @@ const e = {
|
|
|
39
31
|
description: "The offset in pixels from the “start“ or “end“ alignment options."
|
|
40
32
|
},
|
|
41
33
|
"aria-label": {
|
|
42
|
-
description: "
|
|
34
|
+
description: "A more descriptive label for accessibility purpose",
|
|
43
35
|
required: !1,
|
|
44
36
|
control: "text",
|
|
45
37
|
type: "string"
|
|
46
38
|
},
|
|
47
39
|
arrowPadding: { required: !1, control: "number", type: "number" },
|
|
48
|
-
autoCapitalize: {
|
|
49
|
-
required: !1,
|
|
50
|
-
control: "text",
|
|
51
|
-
type: "string",
|
|
52
|
-
description: "Sets whether input is automatically capitalized when entered by user."
|
|
53
|
-
},
|
|
54
|
-
autoCorrect: { required: !1, control: "text", type: "string" },
|
|
55
|
-
autoFocus: {
|
|
56
|
-
required: !1,
|
|
57
|
-
control: "boolean",
|
|
58
|
-
type: "boolean",
|
|
59
|
-
description: "Indicates that an element should be focused on page load, or when its parent dialog is displayed."
|
|
60
|
-
},
|
|
61
|
-
autoSave: { required: !1, control: "text", type: "string" },
|
|
62
40
|
avoidCollisions: { required: !1, control: "boolean", type: "boolean" },
|
|
63
|
-
className: { required: !1, control: "text", type: "string" },
|
|
64
|
-
color: {
|
|
65
|
-
required: !1,
|
|
66
|
-
control: "color",
|
|
67
|
-
type: "string",
|
|
68
|
-
description: "This attribute sets the text color using either a named color or a color specified in the hexadecimal #RRGGBB format. Note: This is a legacy attribute. Please use the CSS color property instead."
|
|
69
|
-
},
|
|
70
|
-
content: {
|
|
71
|
-
required: !1,
|
|
72
|
-
control: "text",
|
|
73
|
-
type: "string",
|
|
74
|
-
description: "A value associated with http-equiv orname depending on the context."
|
|
75
|
-
},
|
|
76
|
-
contextMenu: {
|
|
77
|
-
required: !1,
|
|
78
|
-
control: "text",
|
|
79
|
-
type: "string",
|
|
80
|
-
description: "Defines the ID of a menu element which willserve as the element's context menu."
|
|
81
|
-
},
|
|
82
|
-
datatype: { required: !1, control: "text", type: "string" },
|
|
83
|
-
defaultValue: { required: !1, control: "text", type: "string" },
|
|
84
|
-
dir: {
|
|
85
|
-
required: !1,
|
|
86
|
-
control: "text",
|
|
87
|
-
type: "string",
|
|
88
|
-
description: "Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)"
|
|
89
|
-
},
|
|
90
|
-
draggable: {
|
|
91
|
-
required: !1,
|
|
92
|
-
control: "boolean",
|
|
93
|
-
type: "boolean",
|
|
94
|
-
description: "Defines whether the element can be dragged."
|
|
95
|
-
},
|
|
96
|
-
hidden: {
|
|
97
|
-
required: !1,
|
|
98
|
-
control: "boolean",
|
|
99
|
-
type: "boolean",
|
|
100
|
-
description: "Prevents rendering of given element, while keeping child elements, e.g. script elements, active."
|
|
101
|
-
},
|
|
102
41
|
hideWhenDetached: {
|
|
103
42
|
required: !1,
|
|
104
43
|
control: "boolean",
|
|
105
44
|
type: "boolean",
|
|
106
45
|
defaultValue: !0
|
|
107
46
|
},
|
|
108
|
-
id: {
|
|
109
|
-
required: !1,
|
|
110
|
-
control: "text",
|
|
111
|
-
type: "string",
|
|
112
|
-
description: "Often used with CSS to style a specific element. The value of this attribute must be unique."
|
|
113
|
-
},
|
|
114
|
-
inputMode: {
|
|
115
|
-
description: "Hints at the type of data that might be entered by the user while editing the element or its contents",
|
|
116
|
-
required: !1,
|
|
117
|
-
control: "select",
|
|
118
|
-
type: "string",
|
|
119
|
-
options: [
|
|
120
|
-
"search",
|
|
121
|
-
"text",
|
|
122
|
-
"none",
|
|
123
|
-
"tel",
|
|
124
|
-
"url",
|
|
125
|
-
"email",
|
|
126
|
-
"numeric",
|
|
127
|
-
"decimal"
|
|
128
|
-
]
|
|
129
|
-
},
|
|
130
|
-
is: {
|
|
131
|
-
description: "Specify that a standard HTML element should behave like a defined custom built-in element",
|
|
132
|
-
required: !1,
|
|
133
|
-
control: "text",
|
|
134
|
-
type: "string"
|
|
135
|
-
},
|
|
136
|
-
itemID: { required: !1, control: "text", type: "string" },
|
|
137
|
-
itemProp: { required: !1, control: "text", type: "string" },
|
|
138
|
-
itemRef: { required: !1, control: "text", type: "string" },
|
|
139
|
-
itemScope: { required: !1, control: "boolean", type: "boolean" },
|
|
140
|
-
itemType: { required: !1, control: "text", type: "string" },
|
|
141
|
-
lang: {
|
|
142
|
-
required: !1,
|
|
143
|
-
control: "text",
|
|
144
|
-
type: "string",
|
|
145
|
-
description: "Defines the language used in the element."
|
|
146
|
-
},
|
|
147
|
-
nonce: { required: !1, control: "text", type: "string" },
|
|
148
|
-
prefix: { required: !1, control: "text", type: "string" },
|
|
149
|
-
property: { required: !1, control: "text", type: "string" },
|
|
150
|
-
radioGroup: { required: !1, control: "text", type: "string" },
|
|
151
|
-
rel: {
|
|
152
|
-
required: !1,
|
|
153
|
-
control: "text",
|
|
154
|
-
type: "string",
|
|
155
|
-
description: "Specifies the relationship of the target object to the link object."
|
|
156
|
-
},
|
|
157
|
-
resource: { required: !1, control: "text", type: "string" },
|
|
158
|
-
results: { required: !1, control: "number", type: "number" },
|
|
159
|
-
rev: { required: !1, control: "text", type: "string" },
|
|
160
|
-
role: {
|
|
161
|
-
required: !1,
|
|
162
|
-
control: "text",
|
|
163
|
-
type: "string",
|
|
164
|
-
description: "Defines an explicit role for an element for use by assistive technologies."
|
|
165
|
-
},
|
|
166
|
-
security: { required: !1, control: "text", type: "string" },
|
|
167
47
|
side: {
|
|
168
48
|
required: !1,
|
|
169
49
|
control: "select",
|
|
@@ -178,70 +58,21 @@ const e = {
|
|
|
178
58
|
defaultValue: 4,
|
|
179
59
|
description: "The distance in pixels between the Content and the Trigger."
|
|
180
60
|
},
|
|
181
|
-
slot: {
|
|
182
|
-
required: !1,
|
|
183
|
-
control: "text",
|
|
184
|
-
type: "string",
|
|
185
|
-
description: "Assigns a slot in a shadow DOM shadow tree to an element."
|
|
186
|
-
},
|
|
187
|
-
spellCheck: {
|
|
188
|
-
required: !1,
|
|
189
|
-
control: "boolean",
|
|
190
|
-
type: "boolean",
|
|
191
|
-
description: "Indicates whether spell checking is allowed for the element."
|
|
192
|
-
},
|
|
193
61
|
sticky: {
|
|
194
62
|
required: !1,
|
|
195
63
|
control: "radio",
|
|
196
64
|
type: "string",
|
|
197
65
|
options: ["partial", "always"]
|
|
198
66
|
},
|
|
199
|
-
suppressContentEditableWarning: {
|
|
200
|
-
required: !1,
|
|
201
|
-
control: "boolean",
|
|
202
|
-
type: "boolean"
|
|
203
|
-
},
|
|
204
|
-
suppressHydrationWarning: {
|
|
205
|
-
required: !1,
|
|
206
|
-
control: "boolean",
|
|
207
|
-
type: "boolean"
|
|
208
|
-
},
|
|
209
|
-
tabIndex: {
|
|
210
|
-
required: !1,
|
|
211
|
-
control: "number",
|
|
212
|
-
type: "number",
|
|
213
|
-
description: "Overrides the browser's default tab order and follows the one specified instead."
|
|
214
|
-
},
|
|
215
|
-
title: {
|
|
216
|
-
required: !1,
|
|
217
|
-
control: "text",
|
|
218
|
-
type: "string",
|
|
219
|
-
description: "Text to be displayed in a tooltip when hovering over the element."
|
|
220
|
-
},
|
|
221
|
-
translate: {
|
|
222
|
-
required: !1,
|
|
223
|
-
control: "radio",
|
|
224
|
-
type: "string",
|
|
225
|
-
options: ["yes", "no"],
|
|
226
|
-
description: "Specify whether an element's attribute values and the values of its text node children are to be translated when the page is localized, or whether to leave them unchanged."
|
|
227
|
-
},
|
|
228
|
-
typeof: { required: !1, control: "text", type: "string" },
|
|
229
|
-
unselectable: {
|
|
230
|
-
required: !1,
|
|
231
|
-
control: "radio",
|
|
232
|
-
type: "string",
|
|
233
|
-
options: ["on", "off"]
|
|
234
|
-
},
|
|
235
67
|
updatePositionStrategy: {
|
|
236
68
|
required: !1,
|
|
237
69
|
control: "radio",
|
|
238
70
|
type: "string",
|
|
239
71
|
options: ["always", "optimized"]
|
|
240
|
-
}
|
|
241
|
-
vocab: { required: !1, control: "text", type: "string" }
|
|
72
|
+
}
|
|
242
73
|
};
|
|
243
74
|
export {
|
|
244
75
|
e as propsTooltip,
|
|
245
|
-
|
|
246
|
-
|
|
76
|
+
t as propsTooltipContent,
|
|
77
|
+
o as propsTooltipTrigger
|
|
247
78
|
};
|
package/lib/accordion.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as d } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as m } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { Header as f, Trigger as g, Content as p, Root as A, Item as l } from "@radix-ui/react-accordion";
|
|
4
4
|
import { getIndexWithinAncestorFromProps as u } from "@webstudio-is/sdk/runtime";
|
|
5
5
|
import { getClosestInstance as a } from "@webstudio-is/react-sdk/runtime";
|
|
6
|
-
const $ = m((t, o) => /* @__PURE__ */ d(
|
|
6
|
+
const $ = m((t, o) => /* @__PURE__ */ d(A, { ref: o, type: "single", ...t })), k = m(({ value: t, ...o }, e) => {
|
|
7
7
|
const n = u(o);
|
|
8
|
-
return /* @__PURE__ */ d(
|
|
9
|
-
}), v =
|
|
8
|
+
return /* @__PURE__ */ d(l, { ref: e, value: t ?? n ?? "", ...o });
|
|
9
|
+
}), v = f, w = g, y = p, c = "@webstudio-is/sdk-components-react-radix", H = {
|
|
10
10
|
onNavigatorSelect: (t, o) => {
|
|
11
11
|
var e;
|
|
12
12
|
for (const n of o.instancePath)
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { $ as o, PlaceholderValue as s, css as t } from "@webstudio-is/template";
|
|
3
3
|
import { radix as i } from "./shared/proxy.js";
|
|
4
|
-
import {
|
|
4
|
+
import { height as h, width as m, transition as a, spacing as c, weights as f, fontSize as g, 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,
|
|
8
8
|
{
|
|
9
9
|
"ws:style": t`
|
|
10
|
-
border-bottom: ${
|
|
10
|
+
border-bottom: ${w.DEFAULT} solid ${y.border};
|
|
11
11
|
`,
|
|
12
12
|
children: [
|
|
13
13
|
/* @__PURE__ */ e(
|
|
@@ -24,7 +24,7 @@ const n = (d, l) => /* @__PURE__ */ r(
|
|
|
24
24
|
flex: 1 1 0;
|
|
25
25
|
align-items: center;
|
|
26
26
|
justify-content: between;
|
|
27
|
-
padding: ${
|
|
27
|
+
padding: ${c[4]} 0;
|
|
28
28
|
font-weight: ${f.medium};
|
|
29
29
|
--accordion-trigger-icon-transform: 0deg;
|
|
30
30
|
&:hover {
|
|
@@ -41,11 +41,11 @@ const n = (d, l) => /* @__PURE__ */ r(
|
|
|
41
41
|
{
|
|
42
42
|
"ws:label": "Icon Container",
|
|
43
43
|
"ws:style": t`
|
|
44
|
-
rotate: --accordion-trigger-icon-transform;
|
|
45
|
-
height: ${
|
|
46
|
-
width: ${
|
|
44
|
+
rotate: var(--accordion-trigger-icon-transform);
|
|
45
|
+
height: ${h[4]};
|
|
46
|
+
width: ${m[4]};
|
|
47
47
|
flex-shrink: 0;
|
|
48
|
-
transition: ${
|
|
48
|
+
transition: ${a.all};
|
|
49
49
|
transition-duration: 200ms;
|
|
50
50
|
`,
|
|
51
51
|
children: /* @__PURE__ */ e(o.HtmlEmbed, { "ws:label": "Chevron Icon", code: b })
|
|
@@ -61,10 +61,10 @@ const n = (d, l) => /* @__PURE__ */ r(
|
|
|
61
61
|
{
|
|
62
62
|
"ws:style": t`
|
|
63
63
|
overflow: hidden;
|
|
64
|
-
font-size: ${
|
|
65
|
-
line-height: ${
|
|
66
|
-
transition: ${
|
|
67
|
-
padding-bottom: ${
|
|
64
|
+
font-size: ${g.sm};
|
|
65
|
+
line-height: ${p.sm};
|
|
66
|
+
transition: ${a.all};
|
|
67
|
+
padding-bottom: ${c[4]};
|
|
68
68
|
`,
|
|
69
69
|
children: new s(l)
|
|
70
70
|
}
|
package/lib/checkbox.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as c } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as f } from "react";
|
|
3
|
-
import {
|
|
4
|
-
const p = f(({ checked: o, defaultChecked: r, ...t }, e) => /* @__PURE__ */ c(
|
|
3
|
+
import { Indicator as m, Root as d } from "@radix-ui/react-checkbox";
|
|
4
|
+
const p = f(({ checked: o, defaultChecked: r, ...t }, e) => /* @__PURE__ */ c(d, { ...t, ref: e, defaultChecked: o ?? r })), x = m;
|
|
5
5
|
export {
|
|
6
6
|
p as Checkbox,
|
|
7
7
|
x as CheckboxIndicator
|
package/lib/checkbox.template.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as c, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { CheckMarkIcon as a } from "@webstudio-is/icons/svg";
|
|
3
|
-
import {
|
|
3
|
+
import { $ as t, css as o, PlaceholderValue as l } from "@webstudio-is/template";
|
|
4
4
|
import { radix as r } from "./shared/proxy.js";
|
|
5
|
-
import {
|
|
5
|
+
import { height as s, width as d, borderRadius as n, borderWidth as h, colors as i, boxShadow as b, opacity as m, spacing as p } from "./shared/theme.js";
|
|
6
6
|
const y = {
|
|
7
7
|
category: "radix",
|
|
8
8
|
description: "Use within a form to allow your users to toggle between checked and not checked. Group checkboxes by matching their “Name” properties. Unlike radios, any number of checkboxes in a group can be checked.",
|
|
@@ -13,7 +13,7 @@ const y = {
|
|
|
13
13
|
"ws:label": "Checkbox Field",
|
|
14
14
|
"ws:style": o`
|
|
15
15
|
display: flex;
|
|
16
|
-
gap: ${
|
|
16
|
+
gap: ${p[2]};
|
|
17
17
|
align-items: center;
|
|
18
18
|
`,
|
|
19
19
|
children: [
|
|
@@ -21,18 +21,18 @@ const y = {
|
|
|
21
21
|
r.Checkbox,
|
|
22
22
|
{
|
|
23
23
|
"ws:style": o`
|
|
24
|
-
height: ${
|
|
25
|
-
width: ${
|
|
24
|
+
height: ${s[4]};
|
|
25
|
+
width: ${d[4]};
|
|
26
26
|
flex-shrink: 0;
|
|
27
|
-
border-radius: ${
|
|
28
|
-
border: ${
|
|
27
|
+
border-radius: ${n.sm};
|
|
28
|
+
border: ${h.DEFAULT} solid ${i.primary};
|
|
29
29
|
&:focus-visible {
|
|
30
30
|
outline: none;
|
|
31
|
-
box-shadow: ${
|
|
31
|
+
box-shadow: ${b.ring};
|
|
32
32
|
}
|
|
33
33
|
&:disabled {
|
|
34
34
|
cursor: not-allowed;
|
|
35
|
-
opacity: ${
|
|
35
|
+
opacity: ${m[50]};
|
|
36
36
|
}
|
|
37
37
|
&[data-state="checked"] {
|
|
38
38
|
background-color: ${i.primary};
|
package/lib/collapsible.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as r, Children as a } from "react";
|
|
3
|
-
import { Root as c,
|
|
3
|
+
import { Root as c, Content as p, Trigger as C } from "@radix-ui/react-collapsible";
|
|
4
4
|
import { getClosestInstance as l } from "@webstudio-is/react-sdk/runtime";
|
|
5
5
|
const h = c, g = r(({ children: e, ...o }, t) => {
|
|
6
6
|
const n = a.toArray(e)[0];
|
|
7
|
-
return /* @__PURE__ */ i(
|
|
8
|
-
}), u =
|
|
7
|
+
return /* @__PURE__ */ i(C, { asChild: !0, ref: t, ...o, children: n ?? /* @__PURE__ */ i("button", { children: "Add button" }) });
|
|
8
|
+
}), u = p, s = "@webstudio-is/sdk-components-react-radix", P = {
|
|
9
9
|
onNavigatorSelect: (e, o) => {
|
|
10
10
|
for (const t of o.instancePath)
|
|
11
11
|
if (t.component === `${s}:CollapsibleContent`) {
|
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,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DialogIcon as e, TriggerIcon as n, OverlayIcon as i, ContentIcon as r, ButtonElementIcon as a, HeadingIcon as s, TextIcon as l } from "@webstudio-is/icons/svg";
|
|
2
2
|
import { defaultStates as c } from "@webstudio-is/sdk";
|
|
3
|
-
import { div as t,
|
|
3
|
+
import { div as t, button as p, h2 as g, p as D } from "@webstudio-is/sdk/normalize.css";
|
|
4
4
|
import { radix as o } from "./shared/meta.js";
|
|
5
|
-
import { propsDialog as d, propsDialogTrigger as m,
|
|
5
|
+
import { propsDialog as d, propsDialogTrigger as m, propsDialogOverlay as y, propsDialogContent as M, propsDialogClose as h, propsDialogTitle as C, propsDialogDescription as T } from "./__generated__/dialog.props.js";
|
|
6
6
|
import { buttonReset as f } from "./shared/preset-styles.js";
|
|
7
7
|
const O = {
|
|
8
|
-
icon:
|
|
8
|
+
icon: n,
|
|
9
9
|
contentModel: {
|
|
10
10
|
category: "none",
|
|
11
11
|
children: ["instance"]
|
|
12
12
|
}
|
|
13
13
|
}, b = {
|
|
14
|
-
icon:
|
|
14
|
+
icon: i,
|
|
15
15
|
contentModel: {
|
|
16
16
|
category: "none",
|
|
17
17
|
children: ["instance"],
|
|
@@ -21,7 +21,7 @@ const O = {
|
|
|
21
21
|
div: t
|
|
22
22
|
}
|
|
23
23
|
}, B = {
|
|
24
|
-
icon:
|
|
24
|
+
icon: r,
|
|
25
25
|
contentModel: {
|
|
26
26
|
category: "none",
|
|
27
27
|
children: ["instance"],
|
|
@@ -35,25 +35,25 @@ const O = {
|
|
|
35
35
|
div: t
|
|
36
36
|
}
|
|
37
37
|
}, E = {
|
|
38
|
-
icon:
|
|
38
|
+
icon: s,
|
|
39
39
|
contentModel: {
|
|
40
40
|
category: "none",
|
|
41
41
|
children: ["instance", "rich-text"]
|
|
42
42
|
},
|
|
43
43
|
presetStyle: {
|
|
44
|
-
h2:
|
|
44
|
+
h2: g
|
|
45
45
|
}
|
|
46
46
|
}, H = {
|
|
47
|
-
icon:
|
|
47
|
+
icon: l,
|
|
48
48
|
contentModel: {
|
|
49
49
|
category: "none",
|
|
50
50
|
children: ["instance", "rich-text"]
|
|
51
51
|
},
|
|
52
52
|
presetStyle: {
|
|
53
|
-
p:
|
|
53
|
+
p: D
|
|
54
54
|
}
|
|
55
55
|
}, R = {
|
|
56
|
-
icon:
|
|
56
|
+
icon: a,
|
|
57
57
|
label: "Close Button",
|
|
58
58
|
contentModel: {
|
|
59
59
|
category: "none",
|
|
@@ -61,10 +61,10 @@ const O = {
|
|
|
61
61
|
},
|
|
62
62
|
states: c,
|
|
63
63
|
presetStyle: {
|
|
64
|
-
button: [f,
|
|
64
|
+
button: [f, p].flat()
|
|
65
65
|
}
|
|
66
66
|
}, j = {
|
|
67
|
-
icon:
|
|
67
|
+
icon: e,
|
|
68
68
|
contentModel: {
|
|
69
69
|
category: "instance",
|
|
70
70
|
children: ["instance"],
|
|
@@ -76,10 +76,10 @@ const O = {
|
|
|
76
76
|
}, q = {
|
|
77
77
|
props: m
|
|
78
78
|
}, w = {
|
|
79
|
-
props:
|
|
79
|
+
props: M,
|
|
80
80
|
initialProps: []
|
|
81
81
|
}, z = {
|
|
82
|
-
props:
|
|
82
|
+
props: y,
|
|
83
83
|
initialProps: []
|
|
84
84
|
}, A = {
|
|
85
85
|
props: h,
|
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
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { ChevronDownIcon as w } from "@webstudio-is/icons/svg";
|
|
3
|
-
import {
|
|
3
|
+
import { css as t, $ as n, PlaceholderValue as l } from "@webstudio-is/template";
|
|
4
4
|
import { radix as r } from "./shared/proxy.js";
|
|
5
5
|
import { getButtonStyle as u } from "./shared/styles.js";
|
|
6
|
-
import { spacing as i,
|
|
6
|
+
import { spacing as i, borderRadius as h, borderWidth as v, colors as a, boxShadow as b, height as y, width as p, transition as x, fontSize as m, weights as $, lineHeight as c } from "./shared/theme.js";
|
|
7
7
|
const k = [
|
|
8
8
|
{
|
|
9
9
|
title: "Sheet",
|
|
@@ -60,7 +60,7 @@ const k = [
|
|
|
60
60
|
flex-direction: column;
|
|
61
61
|
user-select: none;
|
|
62
62
|
gap: ${i[1]};
|
|
63
|
-
border-radius: ${
|
|
63
|
+
border-radius: ${h.md};
|
|
64
64
|
padding: ${i[3]};
|
|
65
65
|
line-height: ${c.none};
|
|
66
66
|
text-decoration-line: none;
|
|
@@ -106,7 +106,7 @@ const k = [
|
|
|
106
106
|
{
|
|
107
107
|
"ws:label": "Flex Column",
|
|
108
108
|
"ws:style": t`
|
|
109
|
-
width: ${
|
|
109
|
+
width: ${p[64]};
|
|
110
110
|
display: flex;
|
|
111
111
|
gap: ${i[4]};
|
|
112
112
|
flex-direction: column;
|
|
@@ -129,8 +129,8 @@ const k = [
|
|
|
129
129
|
"ws:style": t`
|
|
130
130
|
background-color: ${a.border};
|
|
131
131
|
padding: ${i[4]};
|
|
132
|
-
width: ${
|
|
133
|
-
border-radius: ${
|
|
132
|
+
width: ${p[48]};
|
|
133
|
+
border-radius: ${h.md};
|
|
134
134
|
`,
|
|
135
135
|
children: new l("")
|
|
136
136
|
}
|
|
@@ -174,7 +174,7 @@ const k = [
|
|
|
174
174
|
margin-left: ${i[1]};
|
|
175
175
|
rotate: var(--navigation-menu-trigger-icon-transform);
|
|
176
176
|
height: ${y[4]};
|
|
177
|
-
width: ${
|
|
177
|
+
width: ${p[4]};
|
|
178
178
|
flex-shrink: 0;
|
|
179
179
|
transition: ${x.all};
|
|
180
180
|
transition-duration: 200ms;
|
|
@@ -262,7 +262,7 @@ const k = [
|
|
|
262
262
|
position: relative;
|
|
263
263
|
margin-top: ${i[1.5]};
|
|
264
264
|
overflow: hidden;
|
|
265
|
-
border-radius: ${
|
|
265
|
+
border-radius: ${h.md};
|
|
266
266
|
border: ${v.DEFAULT} solid ${a.border};
|
|
267
267
|
background-color: ${a.popover};
|
|
268
268
|
color: ${a.popoverForeground};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { NavigationMenuIcon as t, ListIcon as o, ListItemIcon as i, TriggerIcon as a, ContentIcon as r, BoxIcon as s, ViewportIcon as c } from "@webstudio-is/icons/svg";
|
|
2
2
|
import { div as e } from "@webstudio-is/sdk/normalize.css";
|
|
3
3
|
import { radix as n } from "./shared/meta.js";
|
|
4
|
-
import { propsNavigationMenu as p,
|
|
4
|
+
import { propsNavigationMenu as p, propsNavigationMenuList as g, propsNavigationMenuItem as M, propsNavigationMenuTrigger as u, propsNavigationMenuContent as l, propsNavigationMenuLink as v, propsNavigationMenuViewport as N } from "./__generated__/navigation-menu.props.js";
|
|
5
5
|
const y = {
|
|
6
6
|
icon: t,
|
|
7
7
|
contentModel: {
|
|
@@ -77,15 +77,15 @@ const y = {
|
|
|
77
77
|
}, V = {
|
|
78
78
|
props: p
|
|
79
79
|
}, S = {
|
|
80
|
-
props: g
|
|
81
|
-
}, f = {
|
|
82
80
|
props: M
|
|
83
|
-
},
|
|
81
|
+
}, f = {
|
|
84
82
|
props: u
|
|
85
|
-
},
|
|
83
|
+
}, x = {
|
|
86
84
|
props: l
|
|
87
|
-
},
|
|
85
|
+
}, A = {
|
|
88
86
|
props: v
|
|
87
|
+
}, W = {
|
|
88
|
+
props: g
|
|
89
89
|
}, B = {
|
|
90
90
|
props: N
|
|
91
91
|
};
|