@webstudio-is/sdk-components-react-radix 0.0.0-017f1bd
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__/accordion.props.js +64 -0
- package/lib/__generated__/checkbox.props.js +18 -0
- package/lib/__generated__/collapsible.props.js +19 -0
- package/lib/__generated__/dialog.props.js +24 -0
- package/lib/__generated__/label.props.js +4 -0
- package/lib/__generated__/navigation-menu.props.js +48 -0
- package/lib/__generated__/popover.props.js +62 -0
- package/lib/__generated__/radio-group.props.js +70 -0
- package/lib/__generated__/select.props.js +114 -0
- package/lib/__generated__/switch.props.js +18 -0
- package/lib/__generated__/tabs.props.js +65 -0
- package/lib/__generated__/tooltip.props.js +78 -0
- package/lib/accordion.js +49 -0
- package/lib/accordion.template.js +95 -0
- package/lib/accordion.ws.js +80 -0
- package/lib/checkbox.js +19 -0
- package/lib/checkbox.template.js +63 -0
- package/lib/checkbox.ws.js +36 -0
- package/lib/collapsible.js +40 -0
- package/lib/collapsible.template.js +16 -0
- package/lib/collapsible.ws.js +39 -0
- package/lib/components.js +63 -0
- package/lib/dialog.js +96 -0
- package/lib/dialog.template.js +119 -0
- package/lib/dialog.ws.js +80 -0
- package/lib/hooks.js +21 -0
- package/lib/label.js +7 -0
- package/lib/label.template.js +23 -0
- package/lib/label.ws.js +12 -0
- package/lib/metas.js +63 -0
- package/lib/navigation-menu.js +60 -0
- package/lib/navigation-menu.template.js +283 -0
- package/lib/navigation-menu.ws.js +93 -0
- package/lib/popover.js +52 -0
- package/lib/popover.template.js +63 -0
- package/lib/popover.ws.js +51 -0
- package/lib/radio-group.js +12 -0
- package/lib/radio-group.template.js +66 -0
- package/lib/radio-group.ws.js +49 -0
- package/lib/select.js +58 -0
- package/lib/select.template.js +121 -0
- package/lib/select.ws.js +89 -0
- package/lib/shared/meta.js +13 -0
- 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 +119 -0
- package/lib/sheet.template.js +129 -0
- package/lib/switch.js +11 -0
- package/lib/switch.template.js +63 -0
- package/lib/switch.ws.js +40 -0
- package/lib/tabs.js +62 -0
- package/lib/tabs.template.js +66 -0
- package/lib/tabs.ws.js +53 -0
- package/lib/templates.js +28 -0
- package/lib/tooltip.js +48 -0
- package/lib/tooltip.template.js +33 -0
- package/lib/tooltip.ws.js +35 -0
- package/lib/types/__generated__/accordion.props.d.ts +6 -0
- package/lib/types/__generated__/checkbox.props.d.ts +3 -0
- package/lib/types/__generated__/collapsible.props.d.ts +4 -0
- package/lib/types/__generated__/dialog.props.d.ts +8 -0
- package/lib/types/__generated__/label.props.d.ts +2 -0
- package/lib/types/__generated__/navigation-menu.props.d.ts +8 -0
- package/lib/types/__generated__/popover.props.d.ts +5 -0
- package/lib/types/__generated__/radio-group.props.d.ts +4 -0
- package/lib/types/__generated__/select.props.d.ts +9 -0
- package/lib/types/__generated__/switch.props.d.ts +3 -0
- package/lib/types/__generated__/tabs.props.d.ts +5 -0
- package/lib/types/__generated__/tooltip.props.d.ts +4 -0
- package/lib/types/accordion.d.ts +11 -0
- package/lib/types/accordion.template.d.ts +10 -0
- package/lib/types/accordion.ws.d.ts +6 -0
- package/lib/types/checkbox.d.ts +9 -0
- package/lib/types/checkbox.template.d.ts +2 -0
- package/lib/types/checkbox.ws.d.ts +3 -0
- package/lib/types/collapsible.d.ts +15 -0
- package/lib/types/collapsible.template.d.ts +2 -0
- package/lib/types/collapsible.ws.d.ts +4 -0
- package/lib/types/components.d.ts +12 -0
- package/lib/types/dialog.d.ts +23 -0
- package/lib/types/dialog.template.d.ts +10 -0
- package/lib/types/dialog.ws.d.ts +8 -0
- package/lib/types/hooks.d.ts +2 -0
- package/lib/types/label.d.ts +2 -0
- package/lib/types/label.template.d.ts +10 -0
- package/lib/types/label.ws.d.ts +2 -0
- package/lib/types/metas.d.ts +12 -0
- package/lib/types/navigation-menu.d.ts +10 -0
- package/lib/types/navigation-menu.template.d.ts +2 -0
- package/lib/types/navigation-menu.ws.d.ts +8 -0
- package/lib/types/popover.d.ts +16 -0
- package/lib/types/popover.template.d.ts +10 -0
- package/lib/types/popover.ws.d.ts +5 -0
- package/lib/types/props-descriptions.d.ts +29 -0
- package/lib/types/radio-group.d.ts +5 -0
- package/lib/types/radio-group.template.d.ts +2 -0
- package/lib/types/radio-group.ws.d.ts +4 -0
- package/lib/types/select.d.ts +14 -0
- package/lib/types/select.template.d.ts +2 -0
- package/lib/types/select.ws.d.ts +9 -0
- package/lib/types/shared/meta.d.ts +1 -0
- package/lib/types/shared/preset-styles.d.ts +2 -0
- package/lib/types/shared/proxy.d.ts +16 -0
- package/lib/types/shared/styles.d.ts +2 -0
- package/lib/types/shared/theme.d.ts +212 -0
- package/lib/types/sheet.template.d.ts +10 -0
- package/lib/types/switch.d.ts +4 -0
- package/lib/types/switch.template.d.ts +2 -0
- package/lib/types/switch.ws.d.ts +3 -0
- package/lib/types/tabs.d.ts +10 -0
- package/lib/types/tabs.template.d.ts +2 -0
- package/lib/types/tabs.ws.d.ts +5 -0
- package/lib/types/templates.d.ts +13 -0
- package/lib/types/tooltip.d.ts +15 -0
- package/lib/types/tooltip.template.d.ts +10 -0
- package/lib/types/tooltip.ws.d.ts +4 -0
- package/package.json +79 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
collapsible: {
|
|
3
|
+
description: "Whether an accordion item can be collapsed after it has been opened.",
|
|
4
|
+
required: !1,
|
|
5
|
+
control: "boolean",
|
|
6
|
+
type: "boolean",
|
|
7
|
+
defaultValue: !1
|
|
8
|
+
},
|
|
9
|
+
defaultValue: {
|
|
10
|
+
description: "The value of the item whose content is expanded when the accordion is initially rendered. Use\n`defaultValue` if you do not need to control the state of an accordion.",
|
|
11
|
+
required: !1,
|
|
12
|
+
control: "text",
|
|
13
|
+
type: "string"
|
|
14
|
+
},
|
|
15
|
+
dir: {
|
|
16
|
+
description: "The language read direction.",
|
|
17
|
+
required: !1,
|
|
18
|
+
control: "radio",
|
|
19
|
+
type: "string",
|
|
20
|
+
options: ["ltr", "rtl"]
|
|
21
|
+
},
|
|
22
|
+
disabled: {
|
|
23
|
+
description: `Whether or not an accordion is disabled from user interaction.
|
|
24
|
+
@defaultValue false`,
|
|
25
|
+
required: !1,
|
|
26
|
+
control: "boolean",
|
|
27
|
+
type: "boolean"
|
|
28
|
+
},
|
|
29
|
+
orientation: {
|
|
30
|
+
description: "The layout in which the Accordion operates.",
|
|
31
|
+
required: !1,
|
|
32
|
+
control: "radio",
|
|
33
|
+
type: "string",
|
|
34
|
+
defaultValue: "vertical",
|
|
35
|
+
options: ["horizontal", "vertical"]
|
|
36
|
+
},
|
|
37
|
+
value: {
|
|
38
|
+
description: "The controlled stateful value of the accordion item whose content is expanded.",
|
|
39
|
+
required: !1,
|
|
40
|
+
control: "text",
|
|
41
|
+
type: "string"
|
|
42
|
+
}
|
|
43
|
+
}, o = {
|
|
44
|
+
disabled: {
|
|
45
|
+
description: `Whether or not an accordion item is disabled from user interaction.
|
|
46
|
+
@defaultValue false`,
|
|
47
|
+
required: !1,
|
|
48
|
+
control: "boolean",
|
|
49
|
+
type: "boolean"
|
|
50
|
+
},
|
|
51
|
+
value: {
|
|
52
|
+
required: !1,
|
|
53
|
+
control: "text",
|
|
54
|
+
type: "string",
|
|
55
|
+
description: "Current value of the element"
|
|
56
|
+
}
|
|
57
|
+
}, t = {}, r = {}, n = {};
|
|
58
|
+
export {
|
|
59
|
+
e as propsAccordion,
|
|
60
|
+
n as propsAccordionContent,
|
|
61
|
+
t as propsAccordionHeader,
|
|
62
|
+
o as propsAccordionItem,
|
|
63
|
+
r as propsAccordionTrigger
|
|
64
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
checked: {
|
|
3
|
+
required: !1,
|
|
4
|
+
control: "boolean",
|
|
5
|
+
type: "boolean",
|
|
6
|
+
description: "Whether the control is checked"
|
|
7
|
+
},
|
|
8
|
+
required: {
|
|
9
|
+
required: !1,
|
|
10
|
+
control: "boolean",
|
|
11
|
+
type: "boolean",
|
|
12
|
+
description: "Whether the control is required for form submission"
|
|
13
|
+
}
|
|
14
|
+
}, o = {};
|
|
15
|
+
export {
|
|
16
|
+
e as propsCheckbox,
|
|
17
|
+
o as propsCheckboxIndicator
|
|
18
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const o = {
|
|
2
|
+
disabled: {
|
|
3
|
+
required: !1,
|
|
4
|
+
control: "boolean",
|
|
5
|
+
type: "boolean",
|
|
6
|
+
description: "Whether the form control is disabled"
|
|
7
|
+
},
|
|
8
|
+
open: {
|
|
9
|
+
required: !1,
|
|
10
|
+
control: "boolean",
|
|
11
|
+
type: "boolean",
|
|
12
|
+
description: "Show or hide the content of this component on the canvas. This will not affect the initial state of the component."
|
|
13
|
+
}
|
|
14
|
+
}, e = {}, t = {};
|
|
15
|
+
export {
|
|
16
|
+
o as propsCollapsible,
|
|
17
|
+
t as propsCollapsibleContent,
|
|
18
|
+
e as propsCollapsibleTrigger
|
|
19
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const o = {
|
|
2
|
+
open: {
|
|
3
|
+
required: !1,
|
|
4
|
+
control: "boolean",
|
|
5
|
+
type: "boolean",
|
|
6
|
+
description: "Show or hide the content of this component on the canvas. This will not affect the initial state of the component."
|
|
7
|
+
}
|
|
8
|
+
}, t = {}, e = {}, n = {}, s = {}, i = {
|
|
9
|
+
tag: {
|
|
10
|
+
required: !1,
|
|
11
|
+
control: "select",
|
|
12
|
+
type: "string",
|
|
13
|
+
options: ["h2", "h3", "h1", "h4", "h5", "h6"]
|
|
14
|
+
}
|
|
15
|
+
}, p = {};
|
|
16
|
+
export {
|
|
17
|
+
o as propsDialog,
|
|
18
|
+
s as propsDialogClose,
|
|
19
|
+
n as propsDialogContent,
|
|
20
|
+
p as propsDialogDescription,
|
|
21
|
+
e as propsDialogOverlay,
|
|
22
|
+
i as propsDialogTitle,
|
|
23
|
+
t as propsDialogTrigger
|
|
24
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
defaultValue: { required: !1, control: "text", type: "string" },
|
|
3
|
+
delayDuration: {
|
|
4
|
+
description: `The duration from when the pointer enters the trigger until the tooltip gets opened.
|
|
5
|
+
@defaultValue 200`,
|
|
6
|
+
required: !1,
|
|
7
|
+
control: "number",
|
|
8
|
+
type: "number"
|
|
9
|
+
},
|
|
10
|
+
dir: {
|
|
11
|
+
required: !1,
|
|
12
|
+
control: "radio",
|
|
13
|
+
type: "string",
|
|
14
|
+
options: ["ltr", "rtl"],
|
|
15
|
+
description: "The text directionality of the element"
|
|
16
|
+
},
|
|
17
|
+
skipDelayDuration: {
|
|
18
|
+
description: `How much time a user has to enter another trigger without incurring a delay again.
|
|
19
|
+
@defaultValue 300`,
|
|
20
|
+
required: !1,
|
|
21
|
+
control: "number",
|
|
22
|
+
type: "number"
|
|
23
|
+
},
|
|
24
|
+
value: {
|
|
25
|
+
required: !1,
|
|
26
|
+
control: "text",
|
|
27
|
+
type: "string",
|
|
28
|
+
description: "Current value of the element"
|
|
29
|
+
}
|
|
30
|
+
}, t = {}, r = {}, n = {}, o = {
|
|
31
|
+
value: {
|
|
32
|
+
required: !1,
|
|
33
|
+
control: "text",
|
|
34
|
+
type: "string",
|
|
35
|
+
description: "Current value of the element"
|
|
36
|
+
}
|
|
37
|
+
}, i = {
|
|
38
|
+
active: { required: !1, control: "boolean", type: "boolean" }
|
|
39
|
+
}, a = {};
|
|
40
|
+
export {
|
|
41
|
+
e as propsNavigationMenu,
|
|
42
|
+
n as propsNavigationMenuContent,
|
|
43
|
+
o as propsNavigationMenuItem,
|
|
44
|
+
i as propsNavigationMenuLink,
|
|
45
|
+
t as propsNavigationMenuList,
|
|
46
|
+
a as propsNavigationMenuTrigger,
|
|
47
|
+
r as propsNavigationMenuViewport
|
|
48
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
open: {
|
|
3
|
+
required: !1,
|
|
4
|
+
control: "boolean",
|
|
5
|
+
type: "boolean",
|
|
6
|
+
description: "Show or hide the content of this component on the canvas. This will not affect the initial state of the component."
|
|
7
|
+
}
|
|
8
|
+
}, o = {}, t = {
|
|
9
|
+
align: {
|
|
10
|
+
required: !1,
|
|
11
|
+
control: "radio",
|
|
12
|
+
type: "string",
|
|
13
|
+
defaultValue: "center",
|
|
14
|
+
options: ["center", "start", "end"]
|
|
15
|
+
},
|
|
16
|
+
alignOffset: {
|
|
17
|
+
required: !1,
|
|
18
|
+
control: "number",
|
|
19
|
+
type: "number",
|
|
20
|
+
description: "The offset in pixels from the “start“ or “end“ alignment options."
|
|
21
|
+
},
|
|
22
|
+
arrowPadding: { required: !1, control: "number", type: "number" },
|
|
23
|
+
avoidCollisions: { required: !1, control: "boolean", type: "boolean" },
|
|
24
|
+
hideWhenDetached: {
|
|
25
|
+
required: !1,
|
|
26
|
+
control: "boolean",
|
|
27
|
+
type: "boolean",
|
|
28
|
+
defaultValue: !0
|
|
29
|
+
},
|
|
30
|
+
side: {
|
|
31
|
+
required: !1,
|
|
32
|
+
control: "select",
|
|
33
|
+
type: "string",
|
|
34
|
+
options: ["top", "right", "bottom", "left"],
|
|
35
|
+
description: "The preferred alignment against the Trigger. May change when collisions occur."
|
|
36
|
+
},
|
|
37
|
+
sideOffset: {
|
|
38
|
+
required: !1,
|
|
39
|
+
control: "number",
|
|
40
|
+
type: "number",
|
|
41
|
+
defaultValue: 4,
|
|
42
|
+
description: "The distance in pixels between the Content and the Trigger."
|
|
43
|
+
},
|
|
44
|
+
sticky: {
|
|
45
|
+
required: !1,
|
|
46
|
+
control: "radio",
|
|
47
|
+
type: "string",
|
|
48
|
+
options: ["partial", "always"]
|
|
49
|
+
},
|
|
50
|
+
updatePositionStrategy: {
|
|
51
|
+
required: !1,
|
|
52
|
+
control: "radio",
|
|
53
|
+
type: "string",
|
|
54
|
+
options: ["always", "optimized"]
|
|
55
|
+
}
|
|
56
|
+
}, r = {};
|
|
57
|
+
export {
|
|
58
|
+
e as propsPopover,
|
|
59
|
+
r as propsPopoverClose,
|
|
60
|
+
t as propsPopoverContent,
|
|
61
|
+
o as propsPopoverTrigger
|
|
62
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
defaultValue: { required: !1, control: "text", type: "string" },
|
|
3
|
+
dir: {
|
|
4
|
+
required: !1,
|
|
5
|
+
control: "radio",
|
|
6
|
+
type: "string",
|
|
7
|
+
options: ["ltr", "rtl"],
|
|
8
|
+
description: "The text directionality of the element"
|
|
9
|
+
},
|
|
10
|
+
disabled: {
|
|
11
|
+
required: !1,
|
|
12
|
+
control: "boolean",
|
|
13
|
+
type: "boolean",
|
|
14
|
+
description: "Whether the form control is disabled"
|
|
15
|
+
},
|
|
16
|
+
loop: {
|
|
17
|
+
required: !1,
|
|
18
|
+
control: "boolean",
|
|
19
|
+
type: "boolean",
|
|
20
|
+
description: "Whether to loop the media resource"
|
|
21
|
+
},
|
|
22
|
+
name: {
|
|
23
|
+
required: !1,
|
|
24
|
+
control: "text",
|
|
25
|
+
type: "string",
|
|
26
|
+
description: "Name of the element to use for form submission and in the form.elements API"
|
|
27
|
+
},
|
|
28
|
+
orientation: {
|
|
29
|
+
required: !1,
|
|
30
|
+
control: "radio",
|
|
31
|
+
type: "string",
|
|
32
|
+
options: ["horizontal", "vertical"]
|
|
33
|
+
},
|
|
34
|
+
required: {
|
|
35
|
+
required: !1,
|
|
36
|
+
control: "boolean",
|
|
37
|
+
type: "boolean",
|
|
38
|
+
description: "Whether the control is required for form submission"
|
|
39
|
+
},
|
|
40
|
+
value: {
|
|
41
|
+
required: !1,
|
|
42
|
+
control: "text",
|
|
43
|
+
type: "string",
|
|
44
|
+
description: "Current value of the element"
|
|
45
|
+
}
|
|
46
|
+
}, o = {
|
|
47
|
+
checked: {
|
|
48
|
+
required: !1,
|
|
49
|
+
control: "boolean",
|
|
50
|
+
type: "boolean",
|
|
51
|
+
description: "Whether the control is checked"
|
|
52
|
+
},
|
|
53
|
+
required: {
|
|
54
|
+
required: !1,
|
|
55
|
+
control: "boolean",
|
|
56
|
+
type: "boolean",
|
|
57
|
+
description: "Whether the control is required for form submission"
|
|
58
|
+
},
|
|
59
|
+
value: {
|
|
60
|
+
required: !0,
|
|
61
|
+
control: "text",
|
|
62
|
+
type: "string",
|
|
63
|
+
description: "Current value of the element"
|
|
64
|
+
}
|
|
65
|
+
}, r = {};
|
|
66
|
+
export {
|
|
67
|
+
e as propsRadioGroup,
|
|
68
|
+
r as propsRadioGroupIndicator,
|
|
69
|
+
o as propsRadioGroupItem
|
|
70
|
+
};
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
autoComplete: {
|
|
3
|
+
required: !1,
|
|
4
|
+
control: "text",
|
|
5
|
+
type: "string",
|
|
6
|
+
description: "Hint for form autofill feature"
|
|
7
|
+
},
|
|
8
|
+
defaultValue: { required: !1, control: "text", type: "string" },
|
|
9
|
+
dir: {
|
|
10
|
+
required: !1,
|
|
11
|
+
control: "radio",
|
|
12
|
+
type: "string",
|
|
13
|
+
options: ["ltr", "rtl"],
|
|
14
|
+
description: "The text directionality of the element"
|
|
15
|
+
},
|
|
16
|
+
disabled: {
|
|
17
|
+
required: !1,
|
|
18
|
+
control: "boolean",
|
|
19
|
+
type: "boolean",
|
|
20
|
+
description: "Whether the form control is disabled"
|
|
21
|
+
},
|
|
22
|
+
form: {
|
|
23
|
+
required: !1,
|
|
24
|
+
control: "text",
|
|
25
|
+
type: "string",
|
|
26
|
+
description: "Associates the element with a form element"
|
|
27
|
+
},
|
|
28
|
+
name: {
|
|
29
|
+
required: !1,
|
|
30
|
+
control: "text",
|
|
31
|
+
type: "string",
|
|
32
|
+
description: "Name of the element to use for form submission and in the form.elements API"
|
|
33
|
+
},
|
|
34
|
+
open: {
|
|
35
|
+
required: !1,
|
|
36
|
+
control: "boolean",
|
|
37
|
+
type: "boolean",
|
|
38
|
+
description: "Whether the dialog box is showing"
|
|
39
|
+
},
|
|
40
|
+
required: {
|
|
41
|
+
required: !1,
|
|
42
|
+
control: "boolean",
|
|
43
|
+
type: "boolean",
|
|
44
|
+
description: "Whether the control is required for form submission"
|
|
45
|
+
},
|
|
46
|
+
value: {
|
|
47
|
+
required: !1,
|
|
48
|
+
control: "text",
|
|
49
|
+
type: "string",
|
|
50
|
+
description: "Current value of the element"
|
|
51
|
+
}
|
|
52
|
+
}, t = {}, o = {
|
|
53
|
+
placeholder: {
|
|
54
|
+
required: !1,
|
|
55
|
+
control: "text",
|
|
56
|
+
type: "string",
|
|
57
|
+
description: "User-visible label to be placed within the form control"
|
|
58
|
+
}
|
|
59
|
+
}, r = {
|
|
60
|
+
align: {
|
|
61
|
+
required: !1,
|
|
62
|
+
control: "radio",
|
|
63
|
+
type: "string",
|
|
64
|
+
options: ["center", "start", "end"]
|
|
65
|
+
},
|
|
66
|
+
alignOffset: { required: !1, control: "number", type: "number" },
|
|
67
|
+
arrowPadding: { required: !1, control: "number", type: "number" },
|
|
68
|
+
avoidCollisions: { required: !1, control: "boolean", type: "boolean" },
|
|
69
|
+
hideWhenDetached: { required: !1, control: "boolean", type: "boolean" },
|
|
70
|
+
sideOffset: { required: !1, control: "number", type: "number" },
|
|
71
|
+
sticky: {
|
|
72
|
+
required: !1,
|
|
73
|
+
control: "radio",
|
|
74
|
+
type: "string",
|
|
75
|
+
options: ["partial", "always"]
|
|
76
|
+
},
|
|
77
|
+
updatePositionStrategy: {
|
|
78
|
+
required: !1,
|
|
79
|
+
control: "radio",
|
|
80
|
+
type: "string",
|
|
81
|
+
options: ["always", "optimized"]
|
|
82
|
+
}
|
|
83
|
+
}, n = {
|
|
84
|
+
nonce: {
|
|
85
|
+
required: !1,
|
|
86
|
+
control: "text",
|
|
87
|
+
type: "string",
|
|
88
|
+
description: "Cryptographic nonce used in Content Security Policy checks [CSP]"
|
|
89
|
+
}
|
|
90
|
+
}, i = {
|
|
91
|
+
disabled: {
|
|
92
|
+
required: !1,
|
|
93
|
+
control: "boolean",
|
|
94
|
+
type: "boolean",
|
|
95
|
+
description: "Whether the form control is disabled"
|
|
96
|
+
},
|
|
97
|
+
textValue: { required: !1, control: "text", type: "string" },
|
|
98
|
+
value: {
|
|
99
|
+
required: !0,
|
|
100
|
+
control: "text",
|
|
101
|
+
type: "string",
|
|
102
|
+
description: "Current value of the element"
|
|
103
|
+
}
|
|
104
|
+
}, l = {}, s = {};
|
|
105
|
+
export {
|
|
106
|
+
e as propsSelect,
|
|
107
|
+
r as propsSelectContent,
|
|
108
|
+
i as propsSelectItem,
|
|
109
|
+
l as propsSelectItemIndicator,
|
|
110
|
+
s as propsSelectItemText,
|
|
111
|
+
t as propsSelectTrigger,
|
|
112
|
+
o as propsSelectValue,
|
|
113
|
+
n as propsSelectViewport
|
|
114
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
checked: {
|
|
3
|
+
required: !1,
|
|
4
|
+
control: "boolean",
|
|
5
|
+
type: "boolean",
|
|
6
|
+
description: "Whether the control is checked"
|
|
7
|
+
},
|
|
8
|
+
required: {
|
|
9
|
+
required: !1,
|
|
10
|
+
control: "boolean",
|
|
11
|
+
type: "boolean",
|
|
12
|
+
description: "Whether the control is required for form submission"
|
|
13
|
+
}
|
|
14
|
+
}, o = {};
|
|
15
|
+
export {
|
|
16
|
+
e as propsSwitch,
|
|
17
|
+
o as propsSwitchThumb
|
|
18
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
activationMode: {
|
|
3
|
+
description: `Whether a tab is activated automatically or manually.
|
|
4
|
+
@defaultValue automatic`,
|
|
5
|
+
required: !1,
|
|
6
|
+
control: "radio",
|
|
7
|
+
type: "string",
|
|
8
|
+
options: ["automatic", "manual"]
|
|
9
|
+
},
|
|
10
|
+
defaultValue: {
|
|
11
|
+
description: "The value of the tab to select by default, if uncontrolled",
|
|
12
|
+
required: !1,
|
|
13
|
+
control: "text",
|
|
14
|
+
type: "string"
|
|
15
|
+
},
|
|
16
|
+
dir: {
|
|
17
|
+
description: "The direction of navigation between toolbar items.",
|
|
18
|
+
required: !1,
|
|
19
|
+
control: "radio",
|
|
20
|
+
type: "string",
|
|
21
|
+
options: ["ltr", "rtl"]
|
|
22
|
+
},
|
|
23
|
+
orientation: {
|
|
24
|
+
description: `The orientation the tabs are layed out.
|
|
25
|
+
Mainly so arrow navigation is done accordingly (left & right vs. up & down)
|
|
26
|
+
@defaultValue horizontal`,
|
|
27
|
+
required: !1,
|
|
28
|
+
control: "radio",
|
|
29
|
+
type: "string",
|
|
30
|
+
options: ["horizontal", "vertical"]
|
|
31
|
+
},
|
|
32
|
+
value: {
|
|
33
|
+
description: "The value for the selected tab, if controlled",
|
|
34
|
+
required: !1,
|
|
35
|
+
control: "text",
|
|
36
|
+
type: "string"
|
|
37
|
+
}
|
|
38
|
+
}, t = {
|
|
39
|
+
loop: {
|
|
40
|
+
required: !1,
|
|
41
|
+
control: "boolean",
|
|
42
|
+
type: "boolean",
|
|
43
|
+
description: "Whether to loop the media resource"
|
|
44
|
+
}
|
|
45
|
+
}, o = {
|
|
46
|
+
value: {
|
|
47
|
+
required: !1,
|
|
48
|
+
control: "text",
|
|
49
|
+
type: "string",
|
|
50
|
+
description: "Current value of the element"
|
|
51
|
+
}
|
|
52
|
+
}, r = {
|
|
53
|
+
value: {
|
|
54
|
+
required: !1,
|
|
55
|
+
control: "text",
|
|
56
|
+
type: "string",
|
|
57
|
+
description: "Current value of the element"
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
export {
|
|
61
|
+
e as propsTabs,
|
|
62
|
+
r as propsTabsContent,
|
|
63
|
+
t as propsTabsList,
|
|
64
|
+
o as propsTabsTrigger
|
|
65
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
delayDuration: {
|
|
3
|
+
description: "The delay before the Tooltip shows after the Trigger is hovered, in milliseconds. If no value is specified, the default is 700ms",
|
|
4
|
+
required: !1,
|
|
5
|
+
control: "number",
|
|
6
|
+
type: "number"
|
|
7
|
+
},
|
|
8
|
+
disableHoverableContent: {
|
|
9
|
+
description: "When toggled, prevents the Tooltip content from showing when the Trigger is hovered.",
|
|
10
|
+
required: !1,
|
|
11
|
+
control: "boolean",
|
|
12
|
+
type: "boolean"
|
|
13
|
+
},
|
|
14
|
+
open: {
|
|
15
|
+
required: !1,
|
|
16
|
+
control: "boolean",
|
|
17
|
+
type: "boolean",
|
|
18
|
+
description: "Show or hide the content of this component on the canvas. This will not affect the initial state of the component."
|
|
19
|
+
}
|
|
20
|
+
}, o = {}, t = {
|
|
21
|
+
align: {
|
|
22
|
+
required: !1,
|
|
23
|
+
control: "radio",
|
|
24
|
+
type: "string",
|
|
25
|
+
options: ["center", "start", "end"]
|
|
26
|
+
},
|
|
27
|
+
alignOffset: {
|
|
28
|
+
required: !1,
|
|
29
|
+
control: "number",
|
|
30
|
+
type: "number",
|
|
31
|
+
description: "The offset in pixels from the “start“ or “end“ alignment options."
|
|
32
|
+
},
|
|
33
|
+
"aria-label": {
|
|
34
|
+
description: "A more descriptive label for accessibility purpose",
|
|
35
|
+
required: !1,
|
|
36
|
+
control: "text",
|
|
37
|
+
type: "string"
|
|
38
|
+
},
|
|
39
|
+
arrowPadding: { required: !1, control: "number", type: "number" },
|
|
40
|
+
avoidCollisions: { required: !1, control: "boolean", type: "boolean" },
|
|
41
|
+
hideWhenDetached: {
|
|
42
|
+
required: !1,
|
|
43
|
+
control: "boolean",
|
|
44
|
+
type: "boolean",
|
|
45
|
+
defaultValue: !0
|
|
46
|
+
},
|
|
47
|
+
side: {
|
|
48
|
+
required: !1,
|
|
49
|
+
control: "select",
|
|
50
|
+
type: "string",
|
|
51
|
+
options: ["top", "right", "bottom", "left"],
|
|
52
|
+
description: "The preferred alignment against the Trigger. May change when collisions occur."
|
|
53
|
+
},
|
|
54
|
+
sideOffset: {
|
|
55
|
+
required: !1,
|
|
56
|
+
control: "number",
|
|
57
|
+
type: "number",
|
|
58
|
+
defaultValue: 4,
|
|
59
|
+
description: "The distance in pixels between the Content and the Trigger."
|
|
60
|
+
},
|
|
61
|
+
sticky: {
|
|
62
|
+
required: !1,
|
|
63
|
+
control: "radio",
|
|
64
|
+
type: "string",
|
|
65
|
+
options: ["partial", "always"]
|
|
66
|
+
},
|
|
67
|
+
updatePositionStrategy: {
|
|
68
|
+
required: !1,
|
|
69
|
+
control: "radio",
|
|
70
|
+
type: "string",
|
|
71
|
+
options: ["always", "optimized"]
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
export {
|
|
75
|
+
e as propsTooltip,
|
|
76
|
+
t as propsTooltipContent,
|
|
77
|
+
o as propsTooltipTrigger
|
|
78
|
+
};
|
package/lib/accordion.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as m, useState as u, useEffect as f } from "react";
|
|
3
|
+
import { Header as l, Trigger as g, Content as A, Root as p, Item as h } from "@radix-ui/react-accordion";
|
|
4
|
+
import { getIndexWithinAncestorFromProps as P } from "@webstudio-is/sdk/runtime";
|
|
5
|
+
import { getClosestInstance as a } from "@webstudio-is/react-sdk/runtime";
|
|
6
|
+
const S = m(({ defaultValue: e, ...o }, n) => {
|
|
7
|
+
const t = o.value ?? e ?? "", [r, c] = u(t);
|
|
8
|
+
return f(() => c(t), [t]), /* @__PURE__ */ d(
|
|
9
|
+
p,
|
|
10
|
+
{
|
|
11
|
+
...o,
|
|
12
|
+
ref: n,
|
|
13
|
+
type: "single",
|
|
14
|
+
value: r,
|
|
15
|
+
onValueChange: c
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
}), $ = m(({ value: e, ...o }, n) => {
|
|
19
|
+
const t = P(o);
|
|
20
|
+
return /* @__PURE__ */ d(h, { ref: n, value: e ?? t ?? "", ...o });
|
|
21
|
+
}), k = l, w = g, y = A, i = "@webstudio-is/sdk-components-react-radix", H = {
|
|
22
|
+
onNavigatorSelect: (e, o) => {
|
|
23
|
+
var n;
|
|
24
|
+
for (const t of o.instancePath)
|
|
25
|
+
if (t.component === `${i}:AccordionContent`) {
|
|
26
|
+
const r = a(
|
|
27
|
+
o.instancePath,
|
|
28
|
+
t,
|
|
29
|
+
`${i}:Accordion`
|
|
30
|
+
), c = a(
|
|
31
|
+
o.instancePath,
|
|
32
|
+
t,
|
|
33
|
+
`${i}:AccordionItem`
|
|
34
|
+
);
|
|
35
|
+
if (r && c) {
|
|
36
|
+
const s = e.getPropValue(c, "value") ?? ((n = e.indexesWithinAncestors.get(c.id)) == null ? void 0 : n.toString());
|
|
37
|
+
s && e.setMemoryProp(r, "value", s);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
export {
|
|
43
|
+
S as Accordion,
|
|
44
|
+
y as AccordionContent,
|
|
45
|
+
k as AccordionHeader,
|
|
46
|
+
$ as AccordionItem,
|
|
47
|
+
w as AccordionTrigger,
|
|
48
|
+
H as hooksAccordion
|
|
49
|
+
};
|