@webstudio-is/sdk-components-react-radix 0.194.0 → 0.195.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/dialog.ws.js +20 -16
- package/lib/hooks.js +7 -9
- package/lib/navigation-menu.ws.js +2 -2
- package/package.json +7 -7
- package/lib/sheet.js +0 -43
- package/lib/types/sheet.d.ts +0 -16
package/lib/dialog.ws.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { TriggerIcon as p, OverlayIcon as g, ContentIcon as d, HeadingIcon as y, TextIcon as m, ButtonElementIcon as D, DialogIcon as u, LargeXIcon as h } from "@webstudio-is/icons/svg";
|
|
2
2
|
import { defaultStates as f } from "@webstudio-is/react-sdk";
|
|
3
3
|
import { button as v, div as b, h2 as C, p as x } from "@webstudio-is/sdk/normalize.css";
|
|
4
|
-
import { fixed as T, inset as $, z as n, bg as t, backdropBlur as q, flex as e, overflow as I, w as
|
|
4
|
+
import { fixed as T, inset as $, z as n, bg as t, backdropBlur as q, flex as e, overflow as I, w as a, gap as i, m as P, maxW as S, border as l, p as w, shadow as B, relative as M, my as r, leading as O, text as o, tracking as k, absolute as H, right as E, top as j, rounded as z, opacity as s, items as F, justify as L, h as R, outline as W, hover as X, focus as A, ring as G } from "./theme/tailwind-classes.js";
|
|
5
5
|
import { propsDialog as J, propsDialogTrigger as K, propsDialogContent as N, propsDialogOverlay as Q, propsDialogClose as U, propsDialogTitle as V, propsDialogDescription as Y } from "./__generated__/dialog.props.js";
|
|
6
6
|
import { buttonReset as Z, getButtonStyles as _ } from "./theme/styles.js";
|
|
7
|
-
const
|
|
7
|
+
const c = {
|
|
8
8
|
div: b
|
|
9
9
|
}, ee = {
|
|
10
10
|
h2: C
|
|
11
11
|
}, te = {
|
|
12
12
|
p: x
|
|
13
|
-
},
|
|
13
|
+
}, se = {
|
|
14
14
|
category: "hidden",
|
|
15
15
|
type: "container",
|
|
16
16
|
icon: p,
|
|
@@ -19,10 +19,10 @@ const s = {
|
|
|
19
19
|
relation: "ancestor",
|
|
20
20
|
component: { $eq: "Dialog" }
|
|
21
21
|
}
|
|
22
|
-
},
|
|
22
|
+
}, ce = {
|
|
23
23
|
category: "hidden",
|
|
24
24
|
type: "container",
|
|
25
|
-
presetStyle:
|
|
25
|
+
presetStyle: c,
|
|
26
26
|
icon: g,
|
|
27
27
|
constraints: [
|
|
28
28
|
{
|
|
@@ -37,21 +37,25 @@ const s = {
|
|
|
37
37
|
}, pe = {
|
|
38
38
|
category: "hidden",
|
|
39
39
|
type: "container",
|
|
40
|
-
presetStyle:
|
|
40
|
+
presetStyle: c,
|
|
41
41
|
icon: d,
|
|
42
42
|
constraints: [
|
|
43
43
|
{
|
|
44
44
|
relation: "ancestor",
|
|
45
45
|
component: { $eq: "DialogOverlay" }
|
|
46
46
|
},
|
|
47
|
+
// often deleted by users
|
|
48
|
+
// though radix starts throwing warnings in console
|
|
49
|
+
/*
|
|
47
50
|
{
|
|
48
51
|
relation: "descendant",
|
|
49
|
-
component: { $eq: "DialogTitle" }
|
|
52
|
+
component: { $eq: "DialogTitle" },
|
|
50
53
|
},
|
|
51
54
|
{
|
|
52
55
|
relation: "descendant",
|
|
53
|
-
component: { $eq: "DialogDescription" }
|
|
56
|
+
component: { $eq: "DialogDescription" },
|
|
54
57
|
},
|
|
58
|
+
*/
|
|
55
59
|
{
|
|
56
60
|
relation: "descendant",
|
|
57
61
|
component: { $eq: "DialogClose" }
|
|
@@ -150,11 +154,11 @@ const s = {
|
|
|
150
154
|
* border bg-background p-6 shadow-lg
|
|
151
155
|
**/
|
|
152
156
|
styles: [
|
|
153
|
-
|
|
157
|
+
a("full"),
|
|
154
158
|
n(50),
|
|
155
159
|
e(),
|
|
156
160
|
e("col"),
|
|
157
|
-
|
|
161
|
+
i(4),
|
|
158
162
|
P("auto"),
|
|
159
163
|
S("lg"),
|
|
160
164
|
l(),
|
|
@@ -168,7 +172,7 @@ const s = {
|
|
|
168
172
|
type: "instance",
|
|
169
173
|
component: "Box",
|
|
170
174
|
label: "Dialog Header",
|
|
171
|
-
styles: [e(), e("col"),
|
|
175
|
+
styles: [e(), e("col"), i(1)].flat(),
|
|
172
176
|
children: [
|
|
173
177
|
{
|
|
174
178
|
type: "instance",
|
|
@@ -237,16 +241,16 @@ const s = {
|
|
|
237
241
|
E(4),
|
|
238
242
|
j(4),
|
|
239
243
|
z("sm"),
|
|
240
|
-
|
|
244
|
+
s(70),
|
|
241
245
|
e(),
|
|
242
246
|
F("center"),
|
|
243
247
|
L("center"),
|
|
244
248
|
R(4),
|
|
245
|
-
|
|
249
|
+
a(4),
|
|
246
250
|
l(0),
|
|
247
251
|
t("transparent"),
|
|
248
252
|
W(),
|
|
249
|
-
X(
|
|
253
|
+
X(s(100)),
|
|
250
254
|
A(G("ring", 2, "background", 2))
|
|
251
255
|
].flat(),
|
|
252
256
|
children: [
|
|
@@ -298,9 +302,9 @@ export {
|
|
|
298
302
|
ye as metaDialogClose,
|
|
299
303
|
pe as metaDialogContent,
|
|
300
304
|
de as metaDialogDescription,
|
|
301
|
-
|
|
305
|
+
ce as metaDialogOverlay,
|
|
302
306
|
ge as metaDialogTitle,
|
|
303
|
-
|
|
307
|
+
se as metaDialogTrigger,
|
|
304
308
|
De as propsMetaDialog,
|
|
305
309
|
ve as propsMetaDialogClose,
|
|
306
310
|
he as propsMetaDialogContent,
|
package/lib/hooks.js
CHANGED
|
@@ -2,12 +2,11 @@ import { hooksCollapsible as o } from "./collapsible.js";
|
|
|
2
2
|
import { hooksTabs as r } from "./tabs.js";
|
|
3
3
|
import { hooksDialog as m } from "./dialog.js";
|
|
4
4
|
import { hooksPopover as i } from "./popover.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
const S = [
|
|
5
|
+
import { hooksTooltip as t } from "./tooltip.js";
|
|
6
|
+
import { hooksAccordion as p } from "./accordion.js";
|
|
7
|
+
import { hooksNavigationMenu as s } from "./navigation-menu.js";
|
|
8
|
+
import { hooksSelect as h } from "./select.js";
|
|
9
|
+
const g = [
|
|
11
10
|
o,
|
|
12
11
|
r,
|
|
13
12
|
m,
|
|
@@ -15,9 +14,8 @@ const S = [
|
|
|
15
14
|
t,
|
|
16
15
|
p,
|
|
17
16
|
s,
|
|
18
|
-
h
|
|
19
|
-
k
|
|
17
|
+
h
|
|
20
18
|
];
|
|
21
19
|
export {
|
|
22
|
-
|
|
20
|
+
g as hooks
|
|
23
21
|
};
|
|
@@ -387,7 +387,7 @@ const o = {
|
|
|
387
387
|
component: { $eq: "NavigationMenu" }
|
|
388
388
|
},
|
|
389
389
|
{
|
|
390
|
-
relation: "
|
|
390
|
+
relation: "descendant",
|
|
391
391
|
component: { $eq: "NavigationMenuItem" }
|
|
392
392
|
}
|
|
393
393
|
],
|
|
@@ -398,7 +398,7 @@ const o = {
|
|
|
398
398
|
type: "container",
|
|
399
399
|
icon: I,
|
|
400
400
|
constraints: {
|
|
401
|
-
relation: "
|
|
401
|
+
relation: "ancestor",
|
|
402
402
|
component: { $eq: "NavigationMenuList" }
|
|
403
403
|
},
|
|
404
404
|
presetStyle: o,
|
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.195.0",
|
|
4
4
|
"description": "Webstudio wrapper for radix library",
|
|
5
5
|
"author": "Webstudio <github@webstudio.is>",
|
|
6
6
|
"homepage": "https://webstudio.is",
|
|
@@ -53,10 +53,10 @@
|
|
|
53
53
|
"@radix-ui/react-tooltip": "^1.1.4",
|
|
54
54
|
"@radix-ui/react-use-controllable-state": "^1.1.0",
|
|
55
55
|
"await-interaction-response": "^0.0.2",
|
|
56
|
-
"@webstudio-is/
|
|
57
|
-
"@webstudio-is/react-sdk": "0.
|
|
58
|
-
"@webstudio-is/
|
|
59
|
-
"@webstudio-is/sdk": "0.
|
|
56
|
+
"@webstudio-is/icons": "0.195.0",
|
|
57
|
+
"@webstudio-is/react-sdk": "0.195.0",
|
|
58
|
+
"@webstudio-is/css-engine": "0.195.0",
|
|
59
|
+
"@webstudio-is/sdk": "0.195.0"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@types/node": "^22.9.3",
|
|
@@ -66,10 +66,10 @@
|
|
|
66
66
|
"react-dom": "18.3.0-canary-14898b6a9-20240318",
|
|
67
67
|
"tailwindcss": "^3.3.3",
|
|
68
68
|
"@webstudio-is/css-data": "0.0.0",
|
|
69
|
-
"@webstudio-is/sdk-components-react": "0.194.0",
|
|
70
69
|
"@webstudio-is/generate-arg-types": "0.0.0",
|
|
71
70
|
"@webstudio-is/sdk-cli": "^0.94.0",
|
|
72
|
-
"@webstudio-is/tsconfig": "1.0.7"
|
|
71
|
+
"@webstudio-is/tsconfig": "1.0.7",
|
|
72
|
+
"@webstudio-is/sdk-components-react": "0.195.0"
|
|
73
73
|
},
|
|
74
74
|
"scripts": {
|
|
75
75
|
"build": "vite build --config ../../vite.sdk-components.config.ts",
|
package/lib/sheet.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as f } from "react";
|
|
3
|
-
import { getClosestInstance as r } from "@webstudio-is/react-sdk/runtime";
|
|
4
|
-
import { DialogContent as h } from "./dialog.js";
|
|
5
|
-
f(
|
|
6
|
-
({ tag: n = "nav", side: t = "left", role: e = "navigation", children: o, ...i }, c) => /* @__PURE__ */ s(
|
|
7
|
-
h,
|
|
8
|
-
{
|
|
9
|
-
asChild: !0,
|
|
10
|
-
"data-side": t,
|
|
11
|
-
role: e,
|
|
12
|
-
...i,
|
|
13
|
-
children: /* @__PURE__ */ s(n, { ref: c, children: o })
|
|
14
|
-
}
|
|
15
|
-
)
|
|
16
|
-
);
|
|
17
|
-
const a = "@webstudio-is/sdk-components-react-radix", P = {
|
|
18
|
-
onNavigatorUnselect: (n, t) => {
|
|
19
|
-
for (const e of t.instancePath)
|
|
20
|
-
if (e.component === `${a}:SheetOverlay`) {
|
|
21
|
-
const o = r(
|
|
22
|
-
t.instancePath,
|
|
23
|
-
e,
|
|
24
|
-
`${a}:Sheet`
|
|
25
|
-
);
|
|
26
|
-
o && n.setMemoryProp(o, "open", void 0);
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
onNavigatorSelect: (n, t) => {
|
|
30
|
-
for (const e of t.instancePath)
|
|
31
|
-
if (e.component === `${a}:SheetOverlay`) {
|
|
32
|
-
const o = r(
|
|
33
|
-
t.instancePath,
|
|
34
|
-
e,
|
|
35
|
-
`${a}:Sheet`
|
|
36
|
-
);
|
|
37
|
-
o && n.setMemoryProp(o, "open", !0);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
export {
|
|
42
|
-
P as hooksSheet
|
|
43
|
-
};
|
package/lib/types/sheet.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { type Hook } from "@webstudio-is/react-sdk/runtime";
|
|
2
|
-
export declare const Sheet: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-dialog").DialogProps, "defaultOpen"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
3
|
-
export declare const SheetTrigger: import("react").ForwardRefExoticComponent<{
|
|
4
|
-
children: import("react").ReactNode;
|
|
5
|
-
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
6
|
-
export declare const SheetOverlay: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-dialog").DialogOverlayProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
-
export declare const SheetClose: import("react").ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
8
|
-
export declare const SheetTitle: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-dialog").DialogTitleProps & import("react").RefAttributes<HTMLHeadingElement> & {
|
|
9
|
-
tag?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
10
|
-
}, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
11
|
-
export declare const SheetDescription: import("react").ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogDescriptionProps & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
12
|
-
export declare const SheetContent: import("react").ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/react-dialog").DialogContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
|
|
13
|
-
tag?: "div" | "nav";
|
|
14
|
-
side?: "top" | "right" | "bottom" | "left";
|
|
15
|
-
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
16
|
-
export declare const hooksSheet: Hook;
|