@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
package/lib/popover.ws.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PopoverIcon as e, TriggerIcon as n, ContentIcon as r } from "@webstudio-is/icons/svg";
|
|
2
2
|
import { div as t } from "@webstudio-is/sdk/normalize.css";
|
|
3
3
|
import { radix as o } from "./shared/meta.js";
|
|
4
4
|
import { propsPopover as p, propsPopoverTrigger as i, propsPopoverContent as s } from "./__generated__/popover.props.js";
|
|
5
5
|
const v = {
|
|
6
|
-
icon:
|
|
6
|
+
icon: n,
|
|
7
7
|
contentModel: {
|
|
8
8
|
category: "none",
|
|
9
9
|
children: ["instance"]
|
|
10
10
|
}
|
|
11
11
|
}, d = {
|
|
12
|
-
icon:
|
|
12
|
+
icon: r,
|
|
13
13
|
contentModel: {
|
|
14
14
|
category: "none",
|
|
15
15
|
children: ["instance"]
|
|
@@ -18,7 +18,7 @@ const v = {
|
|
|
18
18
|
div: t
|
|
19
19
|
}
|
|
20
20
|
}, l = {
|
|
21
|
-
icon:
|
|
21
|
+
icon: e,
|
|
22
22
|
contentModel: {
|
|
23
23
|
category: "instance",
|
|
24
24
|
children: ["instance"],
|
package/lib/radio-group.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as m } from "react";
|
|
3
|
-
import {
|
|
4
|
-
const u = m(({ value: o, defaultValue: r, ...t }, a) => /* @__PURE__ */ i(
|
|
3
|
+
import { Item as d, Indicator as p, Root as e } from "@radix-ui/react-radio-group";
|
|
4
|
+
const u = m(({ value: o, defaultValue: r, ...t }, a) => /* @__PURE__ */ i(e, { ...t, defaultValue: o ?? r, ref: a })), R = d, s = p;
|
|
5
5
|
export {
|
|
6
6
|
u as RadioGroup,
|
|
7
7
|
s as RadioGroupIndicator,
|
package/lib/select.js
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { jsx as c } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as s, useContext as l } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { Viewport as m, Item as p, ItemIndicator as f, ItemText as S, Root as d, Trigger as u, Value as I, Portal as P, Content as g } from "@radix-ui/react-select";
|
|
4
4
|
import { ReactSdkContext as x, getClosestInstance as i } from "@webstudio-is/react-sdk/runtime";
|
|
5
|
-
const v = s(
|
|
6
|
-
({ value: e, defaultValue: t, ...o }, n) => /* @__PURE__ */ c(m, { ...o, defaultValue: e ?? t })
|
|
7
|
-
), T = s((e, t) => {
|
|
5
|
+
const v = s(({ value: e, defaultValue: t, ...o }, n) => /* @__PURE__ */ c(d, { ...o, defaultValue: e ?? t })), T = s((e, t) => {
|
|
8
6
|
const { renderer: o } = l(x);
|
|
9
|
-
return /* @__PURE__ */ c(
|
|
7
|
+
return /* @__PURE__ */ c(u, { onPointerDown: o === "canvas" ? (a) => {
|
|
10
8
|
a.preventDefault();
|
|
11
9
|
} : void 0, ref: t, ...e });
|
|
12
|
-
}), $ = s((e, t) => /* @__PURE__ */ c(
|
|
10
|
+
}), $ = s((e, t) => /* @__PURE__ */ c(I, { ref: t, ...e })), k = s((e, t) => /* @__PURE__ */ c(P, { children: /* @__PURE__ */ c(g, { ref: t, ...e, position: "popper" }) })), D = m, R = p, y = f, M = S, r = "@webstudio-is/sdk-components-react-radix", N = {
|
|
13
11
|
onNavigatorUnselect: (e, t) => {
|
|
14
12
|
for (const o of t.instancePath)
|
|
15
13
|
if (o.component === `${r}:SelectContent`) {
|
package/lib/select.ws.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { SelectIcon as o, TriggerIcon as c, FormTextFieldIcon as r,
|
|
1
|
+
import { SelectIcon as o, TriggerIcon as c, FormTextFieldIcon as r, ViewportIcon as l, ContentIcon as p, ItemIcon as s, CheckMarkIcon as a, TextIcon as i } from "@webstudio-is/icons/svg";
|
|
2
2
|
import { button as S, 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 d, propsSelectTrigger as m, propsSelectValue as I,
|
|
4
|
+
import { propsSelect as d, propsSelectTrigger as m, propsSelectValue as I, propsSelectViewport as g, propsSelectContent as M, propsSelectItem as y, propsSelectItemIndicator as T, propsSelectItemText as h } from "./__generated__/select.props.js";
|
|
5
5
|
const w = {
|
|
6
6
|
icon: o,
|
|
7
7
|
contentModel: {
|
|
@@ -30,7 +30,7 @@ const w = {
|
|
|
30
30
|
span: t
|
|
31
31
|
}
|
|
32
32
|
}, v = {
|
|
33
|
-
icon:
|
|
33
|
+
icon: p,
|
|
34
34
|
contentModel: {
|
|
35
35
|
category: "none",
|
|
36
36
|
children: ["instance"],
|
|
@@ -40,7 +40,7 @@ const w = {
|
|
|
40
40
|
div: n
|
|
41
41
|
}
|
|
42
42
|
}, P = {
|
|
43
|
-
icon:
|
|
43
|
+
icon: l,
|
|
44
44
|
contentModel: {
|
|
45
45
|
category: "none",
|
|
46
46
|
children: ["instance"],
|
|
@@ -88,9 +88,9 @@ const w = {
|
|
|
88
88
|
props: I,
|
|
89
89
|
initialProps: ["placeholder"]
|
|
90
90
|
}, B = {
|
|
91
|
-
props: g
|
|
92
|
-
}, D = {
|
|
93
91
|
props: M
|
|
92
|
+
}, D = {
|
|
93
|
+
props: g
|
|
94
94
|
}, E = {
|
|
95
95
|
props: y,
|
|
96
96
|
initialProps: ["value"]
|
package/lib/shared/theme.js
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
const
|
|
1
|
+
const n = {
|
|
2
2
|
sm: "0.875rem",
|
|
3
3
|
lg: "1.125rem"
|
|
4
4
|
}, t = {
|
|
5
|
-
sm: "1.25rem"
|
|
6
|
-
|
|
7
|
-
}, p = {
|
|
5
|
+
sm: "1.25rem"
|
|
6
|
+
}, g = {
|
|
8
7
|
none: "1",
|
|
9
8
|
snug: "1.375"
|
|
10
9
|
}, s = {
|
|
11
10
|
medium: "500"
|
|
12
|
-
},
|
|
11
|
+
}, c = {
|
|
13
12
|
tight: "-0.025em"
|
|
14
13
|
}, m = {
|
|
15
14
|
0: "0px",
|
|
@@ -47,34 +46,22 @@ const o = {
|
|
|
47
46
|
"1.5": "0.375rem",
|
|
48
47
|
"2.5": "0.625rem",
|
|
49
48
|
"3.5": "0.875rem"
|
|
50
|
-
},
|
|
51
|
-
...m,
|
|
52
|
-
full: "100%"
|
|
53
|
-
}, x = {
|
|
49
|
+
}, p = {
|
|
54
50
|
...m,
|
|
55
51
|
full: "100%"
|
|
56
52
|
}, i = {
|
|
57
|
-
|
|
58
|
-
xs: "20rem",
|
|
59
|
-
sm: "24rem",
|
|
60
|
-
md: "28rem",
|
|
61
|
-
lg: "32rem",
|
|
62
|
-
xl: "36rem",
|
|
63
|
-
prose: "65ch"
|
|
53
|
+
...m
|
|
64
54
|
}, b = {
|
|
65
|
-
|
|
55
|
+
sm: "24rem",
|
|
56
|
+
lg: "32rem"
|
|
57
|
+
}, x = {
|
|
66
58
|
2: "2px",
|
|
67
|
-
4: "4px",
|
|
68
|
-
8: "8px",
|
|
69
59
|
DEFAULT: "1px"
|
|
70
60
|
}, d = {
|
|
71
61
|
sm: "0.125rem",
|
|
72
62
|
md: "0.375rem",
|
|
73
63
|
full: "9999px"
|
|
74
64
|
}, r = {
|
|
75
|
-
transparent: "transparent",
|
|
76
|
-
current: "currentColor",
|
|
77
|
-
inherit: "inherit",
|
|
78
65
|
popover: "rgb(255, 255, 255)",
|
|
79
66
|
popoverForeground: "rgb(2, 8, 23)",
|
|
80
67
|
border: "rgb(226, 232, 240)",
|
|
@@ -85,58 +72,28 @@ const o = {
|
|
|
85
72
|
muted: "hsl(210 40% 96.1%)",
|
|
86
73
|
primary: "rgb(15, 23, 42)",
|
|
87
74
|
primaryForeground: "hsl(210 40% 98%)",
|
|
88
|
-
destructive: "rgb(239, 68, 68)",
|
|
89
|
-
destructiveForeground: "rgb(248, 250, 252)",
|
|
90
75
|
accent: "rgb(241, 245, 249)",
|
|
91
76
|
accentForeground: "rgb(15, 23, 42)",
|
|
92
|
-
input: "rgb(226, 232, 240)"
|
|
93
|
-
|
|
94
|
-
secondaryForeground: "rgb(15, 23, 42)"
|
|
95
|
-
}, u = {
|
|
77
|
+
input: "rgb(226, 232, 240)"
|
|
78
|
+
}, l = {
|
|
96
79
|
all: "all 150ms cubic-bezier(0.4, 0, 0.2, 1)",
|
|
97
80
|
transform: "transform 150ms cubic-bezier(0.4, 0, 0.2, 1)"
|
|
98
|
-
},
|
|
99
|
-
0: "0",
|
|
100
|
-
5: "0.05",
|
|
101
|
-
10: "0.1",
|
|
102
|
-
20: "0.2",
|
|
103
|
-
25: "0.25",
|
|
104
|
-
30: "0.3",
|
|
105
|
-
40: "0.4",
|
|
81
|
+
}, u = {
|
|
106
82
|
50: "0.5",
|
|
107
|
-
60: "0.6",
|
|
108
83
|
70: "0.7",
|
|
109
|
-
75: "0.75",
|
|
110
|
-
80: "0.8",
|
|
111
|
-
90: "0.9",
|
|
112
|
-
95: "0.95",
|
|
113
84
|
100: "1"
|
|
114
|
-
},
|
|
115
|
-
|
|
116
|
-
1: "1px",
|
|
117
|
-
2: "2px",
|
|
118
|
-
4: "4px",
|
|
119
|
-
8: "8px",
|
|
120
|
-
DEFAULT: "3px"
|
|
85
|
+
}, o = {
|
|
86
|
+
2: "2px"
|
|
121
87
|
}, e = {
|
|
122
|
-
|
|
123
|
-
1: "1px",
|
|
124
|
-
2: "2px",
|
|
125
|
-
4: "4px",
|
|
126
|
-
8: "8px"
|
|
88
|
+
2: "2px"
|
|
127
89
|
}, a = {
|
|
128
90
|
sm: "0 1px 2px 0 rgb(0 0 0 / 0.05)",
|
|
129
91
|
md: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
|
|
130
92
|
lg: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",
|
|
131
93
|
// 0 0 0 ringOffsetWidth ringOffsetColor
|
|
132
94
|
// 0 0 0 ringWidth + ringOffsetWidth ringColor
|
|
133
|
-
ring: `0 0 0 ${e[2]} ${r.background}, 0 0 0 calc(${
|
|
95
|
+
ring: `0 0 0 ${e[2]} ${r.background}, 0 0 0 calc(${o[2]} + ${e[2]}) ${r.ring}`
|
|
134
96
|
}, h = {
|
|
135
|
-
0: "0",
|
|
136
|
-
10: "10",
|
|
137
|
-
20: "20",
|
|
138
|
-
30: "30",
|
|
139
|
-
40: "40",
|
|
140
97
|
50: "50"
|
|
141
98
|
}, f = {
|
|
142
99
|
sm: "blur(0 1px 2px 0 rgb(0 0 0 / 0.05))"
|
|
@@ -144,19 +101,19 @@ const o = {
|
|
|
144
101
|
export {
|
|
145
102
|
f as blur,
|
|
146
103
|
d as borderRadius,
|
|
147
|
-
|
|
104
|
+
x as borderWidth,
|
|
148
105
|
a as boxShadow,
|
|
149
106
|
r as colors,
|
|
150
|
-
|
|
107
|
+
n as fontSize,
|
|
151
108
|
t as fontSizeLineHeight,
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
109
|
+
i as height,
|
|
110
|
+
c as letterSpacing,
|
|
111
|
+
g as lineHeight,
|
|
112
|
+
b as maxWidth,
|
|
113
|
+
u as opacity,
|
|
157
114
|
m as spacing,
|
|
158
|
-
|
|
115
|
+
l as transition,
|
|
159
116
|
s as weights,
|
|
160
|
-
|
|
117
|
+
p as width,
|
|
161
118
|
h as zIndex
|
|
162
119
|
};
|
package/lib/sheet.template.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { MenuIcon as s, LargeXIcon as b } from "@webstudio-is/icons/svg";
|
|
3
|
-
import { $ as o,
|
|
3
|
+
import { $ as o, PlaceholderValue as n, css as i } from "@webstudio-is/template";
|
|
4
4
|
import { radix as t } from "./shared/proxy.js";
|
|
5
|
-
import {
|
|
5
|
+
import { fontSize as d, lineHeight as p, letterSpacing as u, fontSizeLineHeight as w, colors as a, spacing as l, borderRadius as f, opacity as c, height as g, boxShadow as h, width as x, zIndex as m, borderWidth as $, maxWidth as y, blur as S } from "./shared/theme.js";
|
|
6
6
|
import { getButtonStyle as D } from "./shared/styles.js";
|
|
7
7
|
const B = {
|
|
8
8
|
category: "radix",
|
|
@@ -18,9 +18,9 @@ const B = {
|
|
|
18
18
|
"ws:style": i`
|
|
19
19
|
position: fixed;
|
|
20
20
|
inset: 0;
|
|
21
|
-
z-index: ${
|
|
21
|
+
z-index: ${m[50]};
|
|
22
22
|
background-color: rgb(255 255 255 / 0.8);
|
|
23
|
-
backdrop-filter: ${
|
|
23
|
+
backdrop-filter: ${S.sm};
|
|
24
24
|
/* To allow positioning Content */
|
|
25
25
|
display: flex;
|
|
26
26
|
flex-direction: column;
|
|
@@ -31,19 +31,19 @@ const B = {
|
|
|
31
31
|
{
|
|
32
32
|
"ws:label": "Sheet Content",
|
|
33
33
|
"ws:style": i`
|
|
34
|
-
width: ${
|
|
35
|
-
z-index: ${
|
|
34
|
+
width: ${x.full};
|
|
35
|
+
z-index: ${m[50]};
|
|
36
36
|
display: flex;
|
|
37
37
|
flex-direction: column;
|
|
38
38
|
gap: ${l[4]};
|
|
39
|
-
border: ${
|
|
39
|
+
border: ${$.DEFAULT} solid ${a.border};
|
|
40
40
|
background-color: ${a.background};
|
|
41
41
|
padding: ${l[6]};
|
|
42
|
-
box-shadow: ${
|
|
42
|
+
box-shadow: ${h.lg};
|
|
43
43
|
position: relative;
|
|
44
44
|
/* side=left */
|
|
45
45
|
margin-right: auto;
|
|
46
|
-
max-width: ${
|
|
46
|
+
max-width: ${y.sm};
|
|
47
47
|
flex-grow: 1;
|
|
48
48
|
`,
|
|
49
49
|
children: [
|
|
@@ -63,9 +63,9 @@ const B = {
|
|
|
63
63
|
{
|
|
64
64
|
"ws:label": "Sheet Title",
|
|
65
65
|
"ws:style": i`
|
|
66
|
-
font-size: ${
|
|
67
|
-
line-height: ${
|
|
68
|
-
letter-spacing: ${
|
|
66
|
+
font-size: ${d.lg};
|
|
67
|
+
line-height: ${p.none};
|
|
68
|
+
letter-spacing: ${u.tight};
|
|
69
69
|
margin: 0;
|
|
70
70
|
`,
|
|
71
71
|
children: new n("Sheet Title")
|
|
@@ -76,8 +76,8 @@ const B = {
|
|
|
76
76
|
{
|
|
77
77
|
"ws:label": "Sheet Description",
|
|
78
78
|
"ws:style": i`
|
|
79
|
-
font-size: ${
|
|
80
|
-
line-height: ${
|
|
79
|
+
font-size: ${d.sm};
|
|
80
|
+
line-height: ${w.sm};
|
|
81
81
|
color: ${a.mutedForeground};
|
|
82
82
|
margin: 0;
|
|
83
83
|
`,
|
|
@@ -97,21 +97,21 @@ const B = {
|
|
|
97
97
|
position: absolute;
|
|
98
98
|
right: ${l[4]};
|
|
99
99
|
top: ${l[4]};
|
|
100
|
-
border-radius: ${
|
|
101
|
-
opacity: ${
|
|
100
|
+
border-radius: ${f.sm};
|
|
101
|
+
opacity: ${c[70]};
|
|
102
102
|
display: flex;
|
|
103
103
|
align-items: center;
|
|
104
104
|
justify-content: center;
|
|
105
|
-
height: ${
|
|
106
|
-
width: ${
|
|
105
|
+
height: ${g[4]};
|
|
106
|
+
width: ${g[4]};
|
|
107
107
|
border: 0;
|
|
108
108
|
background-color: transparent;
|
|
109
109
|
outline: none;
|
|
110
110
|
&:hover {
|
|
111
|
-
opacity: ${
|
|
111
|
+
opacity: ${c[100]};
|
|
112
112
|
}
|
|
113
113
|
&:focus-visible {
|
|
114
|
-
box-shadow: ${
|
|
114
|
+
box-shadow: ${h.ring};
|
|
115
115
|
}
|
|
116
116
|
`,
|
|
117
117
|
children: /* @__PURE__ */ e(o.HtmlEmbed, { "ws:label": "Close Icon", code: b })
|
package/lib/switch.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as f } from "react";
|
|
3
|
-
import {
|
|
4
|
-
const d = f(({ defaultChecked: o, checked: r, ...t }, m) => /* @__PURE__ */ e(
|
|
3
|
+
import { Thumb as c, Root as h } from "@radix-ui/react-switch";
|
|
4
|
+
const d = f(({ defaultChecked: o, checked: r, ...t }, m) => /* @__PURE__ */ e(h, { ...t, ref: m, defaultChecked: r ?? o })), n = c;
|
|
5
5
|
export {
|
|
6
6
|
d as Switch,
|
|
7
7
|
n as SwitchThumb
|
package/lib/switch.template.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { css as r } from "@webstudio-is/template";
|
|
3
3
|
import { radix as e } from "./shared/proxy.js";
|
|
4
|
-
import {
|
|
4
|
+
import { height as d, width as s, borderRadius as a, colors as t, boxShadow as i, transition as n, borderWidth as c, opacity as l } from "./shared/theme.js";
|
|
5
5
|
const m = {
|
|
6
6
|
category: "radix",
|
|
7
7
|
description: "A control that allows the user to toggle between checked and not checked.",
|
|
@@ -17,15 +17,15 @@ const m = {
|
|
|
17
17
|
cursor: pointer;
|
|
18
18
|
align-items: center;
|
|
19
19
|
border-radius: ${a.full};
|
|
20
|
-
border: ${
|
|
21
|
-
transition: ${
|
|
20
|
+
border: ${c[2]} solid transparent;
|
|
21
|
+
transition: ${n.all};
|
|
22
22
|
&:focus-visible {
|
|
23
23
|
outline: none;
|
|
24
|
-
box-shadow: ${
|
|
24
|
+
box-shadow: ${i.ring};
|
|
25
25
|
}
|
|
26
26
|
&:disabled {
|
|
27
27
|
cursor: not-allowed;
|
|
28
|
-
opacity: ${
|
|
28
|
+
opacity: ${l[50]};
|
|
29
29
|
}
|
|
30
30
|
&[data-state="checked"] {
|
|
31
31
|
background-color: ${t.primary};
|
|
@@ -40,12 +40,12 @@ const m = {
|
|
|
40
40
|
"ws:style": r`
|
|
41
41
|
pointer-events: none;
|
|
42
42
|
display: block;
|
|
43
|
-
height: ${
|
|
44
|
-
width: ${
|
|
43
|
+
height: ${d[5]};
|
|
44
|
+
width: ${s[5]};
|
|
45
45
|
border-radius: ${a.full};
|
|
46
46
|
background-color: ${t.background};
|
|
47
|
-
box-shadow: ${
|
|
48
|
-
transition: ${
|
|
47
|
+
box-shadow: ${i.lg};
|
|
48
|
+
transition: ${n.transform};
|
|
49
49
|
&[data-state="checked"] {
|
|
50
50
|
transform: translateX(20px);
|
|
51
51
|
}
|
package/lib/tabs.js
CHANGED
|
@@ -2,13 +2,13 @@ import { jsx as i } from "react/jsx-runtime";
|
|
|
2
2
|
import u from "await-interaction-response";
|
|
3
3
|
import { forwardRef as c, useCallback as f } from "react";
|
|
4
4
|
import { useControllableState as b } from "@radix-ui/react-use-controllable-state";
|
|
5
|
-
import {
|
|
5
|
+
import { List as p, Root as T, Trigger as d, Content as h } from "@radix-ui/react-tabs";
|
|
6
6
|
import { getIndexWithinAncestorFromProps as g } from "@webstudio-is/sdk/runtime";
|
|
7
7
|
import { getClosestInstance as l } from "@webstudio-is/react-sdk/runtime";
|
|
8
8
|
const k = c(({ defaultValue: e, ...n }, o) => {
|
|
9
9
|
const [t, a] = b({
|
|
10
10
|
prop: n.value,
|
|
11
|
-
defaultProp: e,
|
|
11
|
+
defaultProp: e ?? "",
|
|
12
12
|
onChange: n.onValueChange
|
|
13
13
|
}), s = f(
|
|
14
14
|
async (m) => {
|
|
@@ -17,7 +17,7 @@ const k = c(({ defaultValue: e, ...n }, o) => {
|
|
|
17
17
|
[a]
|
|
18
18
|
);
|
|
19
19
|
return /* @__PURE__ */ i(
|
|
20
|
-
|
|
20
|
+
T,
|
|
21
21
|
{
|
|
22
22
|
ref: o,
|
|
23
23
|
...n,
|
|
@@ -25,7 +25,7 @@ const k = c(({ defaultValue: e, ...n }, o) => {
|
|
|
25
25
|
onValueChange: s
|
|
26
26
|
}
|
|
27
27
|
);
|
|
28
|
-
}), w =
|
|
28
|
+
}), w = p, y = c(({ value: e, ...n }, o) => {
|
|
29
29
|
const t = g(n);
|
|
30
30
|
return /* @__PURE__ */ i(d, { ref: o, value: e ?? t ?? "", ...n });
|
|
31
31
|
}), A = c(({ value: e, ...n }, o) => {
|
package/lib/tabs.template.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { jsxs as s, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { PlaceholderValue as o, css as a } from "@webstudio-is/template";
|
|
3
3
|
import { radix as e } from "./shared/proxy.js";
|
|
4
|
-
import { borderRadius as l,
|
|
4
|
+
import { height as g, borderRadius as l, colors as n, spacing as i, fontSize as h, fontSizeLineHeight as u, weights as b, transition as p, boxShadow as r, opacity as m } from "./shared/theme.js";
|
|
5
5
|
const d = a`
|
|
6
6
|
display: inline-flex;
|
|
7
7
|
align-items: center;
|
|
8
8
|
justify-content: center;
|
|
9
9
|
white-space: nowrap;
|
|
10
10
|
border-radius: ${l.md};
|
|
11
|
-
padding: ${
|
|
12
|
-
font-size: ${
|
|
13
|
-
line-height: ${
|
|
14
|
-
font-weight: ${
|
|
15
|
-
transition: ${
|
|
11
|
+
padding: ${i[1.5]} ${i[3]};
|
|
12
|
+
font-size: ${h.sm};
|
|
13
|
+
line-height: ${u.sm};
|
|
14
|
+
font-weight: ${b.medium};
|
|
15
|
+
transition: ${p.all};
|
|
16
16
|
&:focus-visible {
|
|
17
17
|
outline: 2px solid transparent;
|
|
18
18
|
outline-offset: 2px;
|
|
@@ -20,15 +20,15 @@ const d = a`
|
|
|
20
20
|
}
|
|
21
21
|
&:disabled {
|
|
22
22
|
pointer-events: none;
|
|
23
|
-
opacity: ${
|
|
23
|
+
opacity: ${m[50]};
|
|
24
24
|
}
|
|
25
25
|
&[data-state="active"] {
|
|
26
|
-
background-color: ${
|
|
27
|
-
color: ${
|
|
26
|
+
background-color: ${n.background};
|
|
27
|
+
color: ${n.foreground};
|
|
28
28
|
box-shadow: ${r.sm};
|
|
29
29
|
}
|
|
30
30
|
`, c = a`
|
|
31
|
-
margin-top: ${
|
|
31
|
+
margin-top: ${i[2]};
|
|
32
32
|
&:focus-visible {
|
|
33
33
|
outline: none;
|
|
34
34
|
box-shadow: ${r.ring};
|
|
@@ -43,13 +43,13 @@ const d = a`
|
|
|
43
43
|
{
|
|
44
44
|
"ws:style": a`
|
|
45
45
|
display: inline-flex;
|
|
46
|
-
height: ${
|
|
46
|
+
height: ${g[10]};
|
|
47
47
|
align-items: center;
|
|
48
48
|
justify-content: center;
|
|
49
49
|
border-radius: ${l.md};
|
|
50
|
-
background-color: ${
|
|
51
|
-
padding: ${
|
|
52
|
-
color: ${
|
|
50
|
+
background-color: ${n.muted};
|
|
51
|
+
padding: ${i[1]};
|
|
52
|
+
color: ${n.mutedForeground};
|
|
53
53
|
`,
|
|
54
54
|
children: [
|
|
55
55
|
/* @__PURE__ */ t(e.TabsTrigger, { "ws:style": d, children: new o("Account") }),
|
package/lib/tooltip.ws.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TooltipIcon as t, TriggerIcon as n, ContentIcon as e } from "@webstudio-is/icons/svg";
|
|
2
2
|
import { div as i } from "@webstudio-is/sdk/normalize.css";
|
|
3
3
|
import { radix as o } from "./shared/meta.js";
|
|
4
4
|
import { propsTooltip as r, propsTooltipTrigger as p, propsTooltipContent as s } from "./__generated__/tooltip.props.js";
|
|
5
5
|
const g = {
|
|
6
|
-
icon:
|
|
6
|
+
icon: n,
|
|
7
7
|
contentModel: {
|
|
8
8
|
category: "none",
|
|
9
9
|
children: ["instance"]
|
|
10
10
|
}
|
|
11
11
|
}, d = {
|
|
12
|
-
icon:
|
|
12
|
+
icon: e,
|
|
13
13
|
contentModel: {
|
|
14
14
|
category: "none",
|
|
15
15
|
children: ["instance"]
|
|
@@ -18,7 +18,7 @@ const g = {
|
|
|
18
18
|
div: i
|
|
19
19
|
}
|
|
20
20
|
}, m = {
|
|
21
|
-
icon:
|
|
21
|
+
icon: t,
|
|
22
22
|
contentModel: {
|
|
23
23
|
category: "instance",
|
|
24
24
|
children: ["instance"],
|
package/lib/types/select.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { type ForwardRefExoticComponent, type ComponentProps, type RefAttributes } from "react";
|
|
2
|
-
import { Item, ItemIndicator, ItemText, Viewport } from "@radix-ui/react-select";
|
|
1
|
+
import { type ForwardRefExoticComponent, type ComponentProps, type RefAttributes, type ComponentPropsWithRef } from "react";
|
|
2
|
+
import { Root, Item, ItemIndicator, ItemText, Viewport } from "@radix-ui/react-select";
|
|
3
3
|
import { type Hook } from "@webstudio-is/react-sdk/runtime";
|
|
4
|
-
export declare const Select: ForwardRefExoticComponent<
|
|
4
|
+
export declare const Select: ForwardRefExoticComponent<ComponentPropsWithRef<typeof Root>>;
|
|
5
5
|
export declare const SelectTrigger: ForwardRefExoticComponent<Omit<import("@radix-ui/react-select").SelectTriggerProps & RefAttributes<HTMLButtonElement>, "ref"> & RefAttributes<HTMLButtonElement>>;
|
|
6
6
|
export declare const SelectValue: ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/react-select").SelectValueProps & RefAttributes<HTMLSpanElement>, "ref">, "placeholder"> & {
|
|
7
7
|
placeholder?: string;
|
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.219.0",
|
|
4
4
|
"description": "Webstudio wrapper for radix library",
|
|
5
5
|
"author": "Webstudio <github@webstudio.is>",
|
|
6
6
|
"homepage": "https://webstudio.is",
|
|
@@ -44,36 +44,36 @@
|
|
|
44
44
|
"react-dom": "18.3.0-canary-14898b6a9-20240318"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@radix-ui/react-accordion": "^1.2.
|
|
48
|
-
"@radix-ui/react-checkbox": "^1.
|
|
49
|
-
"@radix-ui/react-collapsible": "^1.1.
|
|
50
|
-
"@radix-ui/react-dialog": "^1.1.
|
|
51
|
-
"@radix-ui/react-label": "^2.1.
|
|
52
|
-
"@radix-ui/react-navigation-menu": "^1.2.
|
|
53
|
-
"@radix-ui/react-popover": "^1.1.
|
|
54
|
-
"@radix-ui/react-radio-group": "^1.
|
|
55
|
-
"@radix-ui/react-select": "^2.
|
|
56
|
-
"@radix-ui/react-switch": "^1.
|
|
57
|
-
"@radix-ui/react-tabs": "^1.1.
|
|
58
|
-
"@radix-ui/react-tooltip": "^1.
|
|
59
|
-
"@radix-ui/react-use-controllable-state": "^1.
|
|
47
|
+
"@radix-ui/react-accordion": "^1.2.8",
|
|
48
|
+
"@radix-ui/react-checkbox": "^1.2.3",
|
|
49
|
+
"@radix-ui/react-collapsible": "^1.1.8",
|
|
50
|
+
"@radix-ui/react-dialog": "^1.1.11",
|
|
51
|
+
"@radix-ui/react-label": "^2.1.4",
|
|
52
|
+
"@radix-ui/react-navigation-menu": "^1.2.10",
|
|
53
|
+
"@radix-ui/react-popover": "^1.1.11",
|
|
54
|
+
"@radix-ui/react-radio-group": "^1.3.4",
|
|
55
|
+
"@radix-ui/react-select": "^2.2.2",
|
|
56
|
+
"@radix-ui/react-switch": "^1.2.2",
|
|
57
|
+
"@radix-ui/react-tabs": "^1.1.9",
|
|
58
|
+
"@radix-ui/react-tooltip": "^1.2.4",
|
|
59
|
+
"@radix-ui/react-use-controllable-state": "^1.2.2",
|
|
60
60
|
"await-interaction-response": "^0.0.2",
|
|
61
|
-
"@webstudio-is/css-engine": "0.
|
|
62
|
-
"@webstudio-is/
|
|
63
|
-
"@webstudio-is/
|
|
64
|
-
"@webstudio-is/sdk": "0.
|
|
61
|
+
"@webstudio-is/css-engine": "0.219.0",
|
|
62
|
+
"@webstudio-is/react-sdk": "0.219.0",
|
|
63
|
+
"@webstudio-is/icons": "0.219.0",
|
|
64
|
+
"@webstudio-is/sdk": "0.219.0"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"@types/react": "^18.2.70",
|
|
68
68
|
"@types/react-dom": "^18.2.25",
|
|
69
69
|
"react": "18.3.0-canary-14898b6a9-20240318",
|
|
70
70
|
"react-dom": "18.3.0-canary-14898b6a9-20240318",
|
|
71
|
-
"@webstudio-is/css-data": "0.0.0",
|
|
72
71
|
"@webstudio-is/generate-arg-types": "0.0.0",
|
|
72
|
+
"@webstudio-is/css-data": "0.0.0",
|
|
73
73
|
"@webstudio-is/sdk-cli": "^0.94.0",
|
|
74
|
-
"@webstudio-is/
|
|
75
|
-
"@webstudio-is/
|
|
76
|
-
"@webstudio-is/
|
|
74
|
+
"@webstudio-is/template": "0.219.0",
|
|
75
|
+
"@webstudio-is/tsconfig": "1.0.7",
|
|
76
|
+
"@webstudio-is/sdk-components-react": "0.219.0"
|
|
77
77
|
},
|
|
78
78
|
"scripts": {
|
|
79
79
|
"build": "vite build --config ../../vite.sdk-components.config.ts",
|