@webstudio-is/sdk-components-react-radix 0.82.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/LICENSE +661 -0
- package/README.md +4 -0
- package/lib/__generated__/collapsible.props.js +840 -0
- package/lib/cjs/__generated__/collapsible.props.js +860 -0
- package/lib/cjs/collapsible.js +37 -0
- package/lib/cjs/collapsible.ws.js +120 -0
- package/lib/cjs/components.js +26 -0
- package/lib/cjs/metas.js +26 -0
- package/lib/cjs/package.json +1 -0
- package/lib/cjs/props.js +26 -0
- package/lib/collapsible.js +22 -0
- package/lib/collapsible.ws.js +104 -0
- package/lib/components.js +10 -0
- package/lib/metas.js +10 -0
- package/lib/props.js +10 -0
- package/lib/types/__generated__/collapsible.props.d.ts +4 -0
- package/lib/types/collapsible.d.ts +14 -0
- package/lib/types/collapsible.ws.d.ts +7 -0
- package/lib/types/components.d.ts +1 -0
- package/lib/types/metas.d.ts +1 -0
- package/lib/types/props.d.ts +1 -0
- package/package.json +62 -0
- package/src/__generated__/collapsible.props.ts +937 -0
- package/src/collapsible.tsx +53 -0
- package/src/collapsible.ws.ts +106 -0
- package/src/components.ts +5 -0
- package/src/metas.ts +5 -0
- package/src/props.ts +5 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var collapsible_exports = {};
|
|
20
|
+
__export(collapsible_exports, {
|
|
21
|
+
Collapsible: () => Collapsible,
|
|
22
|
+
CollapsibleContent: () => CollapsibleContent,
|
|
23
|
+
CollapsibleTrigger: () => CollapsibleTrigger
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(collapsible_exports);
|
|
26
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
27
|
+
var import_react = require("react");
|
|
28
|
+
var import_react_collapsible = require("@radix-ui/react-collapsible");
|
|
29
|
+
var import_react_sdk = require("@webstudio-is/react-sdk");
|
|
30
|
+
const Collapsible = import_react_collapsible.Root;
|
|
31
|
+
const displayContentsStyle = { display: "contents" };
|
|
32
|
+
const CollapsibleTrigger = (0, import_react.forwardRef)(({ children, ...props }, ref) => {
|
|
33
|
+
const firstChild = import_react.Children.toArray(children)[0];
|
|
34
|
+
const [webstudioAttributes, restProps] = (0, import_react_sdk.splitPropsWithWebstudioAttributes)(props);
|
|
35
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref, style: displayContentsStyle, ...webstudioAttributes, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_collapsible.Trigger, { asChild: true, ...restProps, children: firstChild ?? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { children: "Add button" }) }) });
|
|
36
|
+
});
|
|
37
|
+
const CollapsibleContent = import_react_collapsible.Content;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var collapsible_ws_exports = {};
|
|
20
|
+
__export(collapsible_ws_exports, {
|
|
21
|
+
metaCollapsible: () => metaCollapsible,
|
|
22
|
+
metaCollapsibleContent: () => metaCollapsibleContent,
|
|
23
|
+
metaCollapsibleTrigger: () => metaCollapsibleTrigger,
|
|
24
|
+
propsMetaCollapsible: () => propsMetaCollapsible,
|
|
25
|
+
propsMetaCollapsibleContent: () => propsMetaCollapsibleContent,
|
|
26
|
+
propsMetaCollapsibleTrigger: () => propsMetaCollapsibleTrigger
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(collapsible_ws_exports);
|
|
29
|
+
var import_svg = require("@webstudio-is/icons/svg");
|
|
30
|
+
var import_collapsible = require("./__generated__/collapsible.props");
|
|
31
|
+
const metaCollapsible = {
|
|
32
|
+
category: "radix",
|
|
33
|
+
type: "container",
|
|
34
|
+
label: "Collapsible",
|
|
35
|
+
icon: import_svg.RadioUncheckedIcon,
|
|
36
|
+
template: [
|
|
37
|
+
{
|
|
38
|
+
type: "instance",
|
|
39
|
+
component: "Collapsible",
|
|
40
|
+
props: [
|
|
41
|
+
{
|
|
42
|
+
name: "open",
|
|
43
|
+
type: "boolean",
|
|
44
|
+
value: false,
|
|
45
|
+
dataSourceRef: {
|
|
46
|
+
type: "variable",
|
|
47
|
+
name: "collapsibleOpen"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: "onOpenChange",
|
|
52
|
+
type: "action",
|
|
53
|
+
value: [
|
|
54
|
+
{
|
|
55
|
+
type: "execute",
|
|
56
|
+
args: ["open"],
|
|
57
|
+
code: `collapsibleOpen = open`
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
children: [
|
|
63
|
+
{
|
|
64
|
+
type: "instance",
|
|
65
|
+
component: "CollapsibleTrigger",
|
|
66
|
+
children: [
|
|
67
|
+
{
|
|
68
|
+
type: "instance",
|
|
69
|
+
component: "Button",
|
|
70
|
+
children: [{ type: "text", value: "Click to toggle content" }]
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
type: "instance",
|
|
76
|
+
component: "CollapsibleContent",
|
|
77
|
+
children: [
|
|
78
|
+
{
|
|
79
|
+
type: "instance",
|
|
80
|
+
component: "Text",
|
|
81
|
+
children: [{ type: "text", value: "Collapsible Content" }]
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
};
|
|
89
|
+
const metaCollapsibleTrigger = {
|
|
90
|
+
category: "hidden",
|
|
91
|
+
type: "container",
|
|
92
|
+
label: "Collapsible Trigger",
|
|
93
|
+
icon: import_svg.RadioCheckedIcon,
|
|
94
|
+
stylable: false,
|
|
95
|
+
detachable: false
|
|
96
|
+
};
|
|
97
|
+
const metaCollapsibleContent = {
|
|
98
|
+
category: "hidden",
|
|
99
|
+
type: "container",
|
|
100
|
+
label: "Collapsible Content",
|
|
101
|
+
icon: import_svg.RadioCheckedIcon,
|
|
102
|
+
detachable: false
|
|
103
|
+
};
|
|
104
|
+
const propsMetaCollapsible = {
|
|
105
|
+
props: {
|
|
106
|
+
...import_collapsible.propsCollapsible,
|
|
107
|
+
onOpenChange: {
|
|
108
|
+
type: "action",
|
|
109
|
+
control: "action",
|
|
110
|
+
required: false
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
initialProps: ["open", "onOpenChange"]
|
|
114
|
+
};
|
|
115
|
+
const propsMetaCollapsibleTrigger = {
|
|
116
|
+
props: import_collapsible.propsCollapsibleTrigger
|
|
117
|
+
};
|
|
118
|
+
const propsMetaCollapsibleContent = {
|
|
119
|
+
props: import_collapsible.propsCollapsibleContent
|
|
120
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var components_exports = {};
|
|
20
|
+
__export(components_exports, {
|
|
21
|
+
Collapsible: () => import_collapsible.Collapsible,
|
|
22
|
+
CollapsibleContent: () => import_collapsible.CollapsibleContent,
|
|
23
|
+
CollapsibleTrigger: () => import_collapsible.CollapsibleTrigger
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(components_exports);
|
|
26
|
+
var import_collapsible = require("./collapsible");
|
package/lib/cjs/metas.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var metas_exports = {};
|
|
20
|
+
__export(metas_exports, {
|
|
21
|
+
Collapsible: () => import_collapsible.metaCollapsible,
|
|
22
|
+
CollapsibleContent: () => import_collapsible.metaCollapsibleContent,
|
|
23
|
+
CollapsibleTrigger: () => import_collapsible.metaCollapsibleTrigger
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(metas_exports);
|
|
26
|
+
var import_collapsible = require("./collapsible.ws");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"commonjs"}
|
package/lib/cjs/props.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var props_exports = {};
|
|
20
|
+
__export(props_exports, {
|
|
21
|
+
Collapsible: () => import_collapsible.propsMetaCollapsible,
|
|
22
|
+
CollapsibleContent: () => import_collapsible.propsMetaCollapsibleContent,
|
|
23
|
+
CollapsibleTrigger: () => import_collapsible.propsMetaCollapsibleTrigger
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(props_exports);
|
|
26
|
+
var import_collapsible = require("./collapsible.ws");
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import {
|
|
3
|
+
forwardRef,
|
|
4
|
+
Children
|
|
5
|
+
} from "react";
|
|
6
|
+
import { Root, Trigger, Content } from "@radix-ui/react-collapsible";
|
|
7
|
+
import {
|
|
8
|
+
splitPropsWithWebstudioAttributes
|
|
9
|
+
} from "@webstudio-is/react-sdk";
|
|
10
|
+
const Collapsible = Root;
|
|
11
|
+
const displayContentsStyle = { display: "contents" };
|
|
12
|
+
const CollapsibleTrigger = forwardRef(({ children, ...props }, ref) => {
|
|
13
|
+
const firstChild = Children.toArray(children)[0];
|
|
14
|
+
const [webstudioAttributes, restProps] = splitPropsWithWebstudioAttributes(props);
|
|
15
|
+
return /* @__PURE__ */ jsx("div", { ref, style: displayContentsStyle, ...webstudioAttributes, children: /* @__PURE__ */ jsx(Trigger, { asChild: true, ...restProps, children: firstChild ?? /* @__PURE__ */ jsx("button", { children: "Add button" }) }) });
|
|
16
|
+
});
|
|
17
|
+
const CollapsibleContent = Content;
|
|
18
|
+
export {
|
|
19
|
+
Collapsible,
|
|
20
|
+
CollapsibleContent,
|
|
21
|
+
CollapsibleTrigger
|
|
22
|
+
};
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { RadioUncheckedIcon, RadioCheckedIcon } from "@webstudio-is/icons/svg";
|
|
2
|
+
import {
|
|
3
|
+
propsCollapsible,
|
|
4
|
+
propsCollapsibleContent,
|
|
5
|
+
propsCollapsibleTrigger
|
|
6
|
+
} from "./__generated__/collapsible.props";
|
|
7
|
+
const metaCollapsible = {
|
|
8
|
+
category: "radix",
|
|
9
|
+
type: "container",
|
|
10
|
+
label: "Collapsible",
|
|
11
|
+
icon: RadioUncheckedIcon,
|
|
12
|
+
template: [
|
|
13
|
+
{
|
|
14
|
+
type: "instance",
|
|
15
|
+
component: "Collapsible",
|
|
16
|
+
props: [
|
|
17
|
+
{
|
|
18
|
+
name: "open",
|
|
19
|
+
type: "boolean",
|
|
20
|
+
value: false,
|
|
21
|
+
dataSourceRef: {
|
|
22
|
+
type: "variable",
|
|
23
|
+
name: "collapsibleOpen"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: "onOpenChange",
|
|
28
|
+
type: "action",
|
|
29
|
+
value: [
|
|
30
|
+
{
|
|
31
|
+
type: "execute",
|
|
32
|
+
args: ["open"],
|
|
33
|
+
code: `collapsibleOpen = open`
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
children: [
|
|
39
|
+
{
|
|
40
|
+
type: "instance",
|
|
41
|
+
component: "CollapsibleTrigger",
|
|
42
|
+
children: [
|
|
43
|
+
{
|
|
44
|
+
type: "instance",
|
|
45
|
+
component: "Button",
|
|
46
|
+
children: [{ type: "text", value: "Click to toggle content" }]
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
type: "instance",
|
|
52
|
+
component: "CollapsibleContent",
|
|
53
|
+
children: [
|
|
54
|
+
{
|
|
55
|
+
type: "instance",
|
|
56
|
+
component: "Text",
|
|
57
|
+
children: [{ type: "text", value: "Collapsible Content" }]
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
};
|
|
65
|
+
const metaCollapsibleTrigger = {
|
|
66
|
+
category: "hidden",
|
|
67
|
+
type: "container",
|
|
68
|
+
label: "Collapsible Trigger",
|
|
69
|
+
icon: RadioCheckedIcon,
|
|
70
|
+
stylable: false,
|
|
71
|
+
detachable: false
|
|
72
|
+
};
|
|
73
|
+
const metaCollapsibleContent = {
|
|
74
|
+
category: "hidden",
|
|
75
|
+
type: "container",
|
|
76
|
+
label: "Collapsible Content",
|
|
77
|
+
icon: RadioCheckedIcon,
|
|
78
|
+
detachable: false
|
|
79
|
+
};
|
|
80
|
+
const propsMetaCollapsible = {
|
|
81
|
+
props: {
|
|
82
|
+
...propsCollapsible,
|
|
83
|
+
onOpenChange: {
|
|
84
|
+
type: "action",
|
|
85
|
+
control: "action",
|
|
86
|
+
required: false
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
initialProps: ["open", "onOpenChange"]
|
|
90
|
+
};
|
|
91
|
+
const propsMetaCollapsibleTrigger = {
|
|
92
|
+
props: propsCollapsibleTrigger
|
|
93
|
+
};
|
|
94
|
+
const propsMetaCollapsibleContent = {
|
|
95
|
+
props: propsCollapsibleContent
|
|
96
|
+
};
|
|
97
|
+
export {
|
|
98
|
+
metaCollapsible,
|
|
99
|
+
metaCollapsibleContent,
|
|
100
|
+
metaCollapsibleTrigger,
|
|
101
|
+
propsMetaCollapsible,
|
|
102
|
+
propsMetaCollapsibleContent,
|
|
103
|
+
propsMetaCollapsibleTrigger
|
|
104
|
+
};
|
package/lib/metas.js
ADDED
package/lib/props.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {
|
|
2
|
+
propsMetaCollapsible,
|
|
3
|
+
propsMetaCollapsibleTrigger,
|
|
4
|
+
propsMetaCollapsibleContent
|
|
5
|
+
} from "./collapsible.ws";
|
|
6
|
+
export {
|
|
7
|
+
propsMetaCollapsible as Collapsible,
|
|
8
|
+
propsMetaCollapsibleContent as CollapsibleContent,
|
|
9
|
+
propsMetaCollapsibleTrigger as CollapsibleTrigger
|
|
10
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { PropMeta } from "@webstudio-is/generate-arg-types";
|
|
2
|
+
export declare const propsCollapsible: Record<string, PropMeta>;
|
|
3
|
+
export declare const propsCollapsibleTrigger: Record<string, PropMeta>;
|
|
4
|
+
export declare const propsCollapsibleContent: Record<string, PropMeta>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type ReactNode, type ForwardRefExoticComponent, type ComponentPropsWithRef } from "react";
|
|
2
|
+
import { Root, Content } from "@radix-ui/react-collapsible";
|
|
3
|
+
import { type WebstudioAttributes } from "@webstudio-is/react-sdk";
|
|
4
|
+
export declare const Collapsible: ForwardRefExoticComponent<Omit<ComponentPropsWithRef<typeof Root>, "defaultOpen" | "asChild">>;
|
|
5
|
+
/**
|
|
6
|
+
* We're not exposing the 'asChild' property for the Trigger.
|
|
7
|
+
* Instead, we're enforcing 'asChild=true' for the Trigger and making it style-less.
|
|
8
|
+
* This avoids situations where the Trigger inadvertently passes all styles to its child,
|
|
9
|
+
* which would prevent us from displaying styles properly in the builder.
|
|
10
|
+
*/
|
|
11
|
+
export declare const CollapsibleTrigger: ForwardRefExoticComponent<WebstudioAttributes & {
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
14
|
+
export declare const CollapsibleContent: ForwardRefExoticComponent<Omit<ComponentPropsWithRef<typeof Content>, "asChild">>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { WsComponentMeta, WsComponentPropsMeta } from "@webstudio-is/react-sdk";
|
|
2
|
+
export declare const metaCollapsible: WsComponentMeta;
|
|
3
|
+
export declare const metaCollapsibleTrigger: WsComponentMeta;
|
|
4
|
+
export declare const metaCollapsibleContent: WsComponentMeta;
|
|
5
|
+
export declare const propsMetaCollapsible: WsComponentPropsMeta;
|
|
6
|
+
export declare const propsMetaCollapsibleTrigger: WsComponentPropsMeta;
|
|
7
|
+
export declare const propsMetaCollapsibleContent: WsComponentPropsMeta;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Collapsible, CollapsibleTrigger, CollapsibleContent, } from "./collapsible";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { metaCollapsible as Collapsible, metaCollapsibleTrigger as CollapsibleTrigger, metaCollapsibleContent as CollapsibleContent, } from "./collapsible.ws";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { propsMetaCollapsible as Collapsible, propsMetaCollapsibleTrigger as CollapsibleTrigger, propsMetaCollapsibleContent as CollapsibleContent, } from "./collapsible.ws";
|
package/package.json
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@webstudio-is/sdk-components-react-radix",
|
|
3
|
+
"version": "0.82.0",
|
|
4
|
+
"description": "Webstudio wrapper for radix library",
|
|
5
|
+
"author": "Webstudio <github@webstudio.is>",
|
|
6
|
+
"homepage": "https://webstudio.is",
|
|
7
|
+
"license": "AGPL-3.0-or-later",
|
|
8
|
+
"private": false,
|
|
9
|
+
"type": "module",
|
|
10
|
+
"sideEffects": false,
|
|
11
|
+
"files": [
|
|
12
|
+
"lib/*",
|
|
13
|
+
"src/*"
|
|
14
|
+
],
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"source": "./src/components.ts",
|
|
18
|
+
"types": "./lib/types/components.d.ts",
|
|
19
|
+
"import": "./lib/components.js",
|
|
20
|
+
"require": "./lib/cjs/components.js"
|
|
21
|
+
},
|
|
22
|
+
"./metas": {
|
|
23
|
+
"source": "./src/metas.ts",
|
|
24
|
+
"types": "./lib/types/metas.d.ts",
|
|
25
|
+
"import": "./lib/metas.js",
|
|
26
|
+
"require": "./lib/cjs/metas.js"
|
|
27
|
+
},
|
|
28
|
+
"./props": {
|
|
29
|
+
"source": "./src/props.ts",
|
|
30
|
+
"types": "./lib/types/props.d.ts",
|
|
31
|
+
"import": "./lib/props.js",
|
|
32
|
+
"require": "./lib/cjs/props.js"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"peerDependencies": {
|
|
36
|
+
"react": "^18.2.0",
|
|
37
|
+
"react-dom": "^18.2.0"
|
|
38
|
+
},
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"@radix-ui/react-collapsible": "^1.0.3",
|
|
41
|
+
"@webstudio-is/generate-arg-types": "^0.82.0",
|
|
42
|
+
"@webstudio-is/icons": "^0.82.0",
|
|
43
|
+
"@webstudio-is/react-sdk": "^0.82.0"
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@types/react": "^18.2.16",
|
|
47
|
+
"@types/react-dom": "^18.2.7",
|
|
48
|
+
"react": "^18.2.0",
|
|
49
|
+
"react-dom": "^18.2.0",
|
|
50
|
+
"typescript": "^5.1.6",
|
|
51
|
+
"@webstudio-is/scripts": "^0.0.0",
|
|
52
|
+
"@webstudio-is/tsconfig": "^1.0.6"
|
|
53
|
+
},
|
|
54
|
+
"scripts": {
|
|
55
|
+
"dev": "build-package --watch",
|
|
56
|
+
"build": "build-package",
|
|
57
|
+
"build:args": "generate-arg-types './src/*.tsx !./src/*.stories.tsx !./src/*.ws.tsx' && prettier --write \"**/*.props.ts\"",
|
|
58
|
+
"dts": "tsc --project tsconfig.dts.json",
|
|
59
|
+
"typecheck": "tsc",
|
|
60
|
+
"checks": "pnpm typecheck"
|
|
61
|
+
}
|
|
62
|
+
}
|