@webstudio-is/sdk-components-react-radix 0.88.0 → 0.89.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 +605 -109
- package/lib/__generated__/button.props.js +161 -29
- package/lib/__generated__/checkbox.props.js +284 -51
- package/lib/__generated__/collapsible.props.js +234 -42
- package/lib/__generated__/dialog.props.js +611 -110
- package/lib/__generated__/input.props.js +264 -47
- package/lib/__generated__/label.props.js +123 -22
- package/lib/__generated__/navigation-menu.props.js +563 -102
- package/lib/__generated__/popover.props.js +129 -25
- package/lib/__generated__/radio-group.props.js +421 -76
- package/lib/__generated__/select.props.js +876 -160
- package/lib/__generated__/sheet.props.js +591 -110
- package/lib/__generated__/switch.props.js +284 -51
- package/lib/__generated__/tabs.props.js +506 -91
- package/lib/__generated__/textarea.props.js +177 -31
- package/lib/__generated__/tooltip.props.js +131 -27
- package/lib/accordion.ws.js +1 -0
- package/lib/checkbox.ws.js +2 -0
- package/lib/cjs/__generated__/accordion.props.js +605 -109
- package/lib/cjs/__generated__/button.props.js +161 -29
- package/lib/cjs/__generated__/checkbox.props.js +284 -51
- package/lib/cjs/__generated__/collapsible.props.js +234 -42
- package/lib/cjs/__generated__/dialog.props.js +611 -110
- package/lib/cjs/__generated__/input.props.js +264 -47
- package/lib/cjs/__generated__/label.props.js +123 -22
- package/lib/cjs/__generated__/navigation-menu.props.js +563 -102
- package/lib/cjs/__generated__/popover.props.js +129 -25
- package/lib/cjs/__generated__/radio-group.props.js +421 -76
- package/lib/cjs/__generated__/select.props.js +875 -159
- package/lib/cjs/__generated__/sheet.props.js +591 -110
- package/lib/cjs/__generated__/switch.props.js +284 -51
- package/lib/cjs/__generated__/tabs.props.js +506 -91
- package/lib/cjs/__generated__/textarea.props.js +177 -31
- package/lib/cjs/__generated__/tooltip.props.js +131 -27
- package/lib/cjs/accordion.ws.js +1 -0
- package/lib/cjs/checkbox.ws.js +2 -0
- package/lib/cjs/collapsible.ws.js +1 -0
- package/lib/cjs/dialog.ws.js +1 -0
- package/lib/cjs/label.ws.js +1 -0
- package/lib/cjs/navigation-menu.ws.js +1 -0
- package/lib/cjs/popover.ws.js +1 -0
- package/lib/cjs/props-descriptions.js +56 -0
- package/lib/cjs/radio-group.ws.js +3 -0
- package/lib/cjs/select.js +3 -1
- package/lib/cjs/select.ws.js +1 -0
- package/lib/cjs/sheet.ws.js +1 -0
- package/lib/cjs/switch.ws.js +2 -0
- package/lib/cjs/tabs.ws.js +1 -0
- package/lib/cjs/tooltip.ws.js +1 -0
- package/lib/collapsible.ws.js +1 -0
- package/lib/dialog.ws.js +1 -0
- package/lib/label.ws.js +1 -0
- package/lib/navigation-menu.ws.js +1 -0
- package/lib/popover.ws.js +1 -0
- package/lib/props-descriptions.js +36 -0
- package/lib/radio-group.ws.js +3 -0
- package/lib/select.js +3 -1
- package/lib/select.ws.js +1 -0
- package/lib/sheet.ws.js +1 -0
- package/lib/switch.ws.js +2 -0
- package/lib/tabs.ws.js +1 -0
- package/lib/tooltip.ws.js +1 -0
- package/lib/types/props-descriptions.d.ts +29 -0
- package/lib/types/select.d.ts +4 -2
- package/package.json +6 -6
- package/src/__generated__/accordion.props.ts +675 -103
- package/src/__generated__/button.props.ts +180 -27
- package/src/__generated__/checkbox.props.ts +317 -48
- package/src/__generated__/collapsible.props.ts +261 -40
- package/src/__generated__/dialog.props.ts +682 -104
- package/src/__generated__/input.props.ts +292 -44
- package/src/__generated__/label.props.ts +137 -21
- package/src/__generated__/navigation-menu.props.ts +629 -96
- package/src/__generated__/popover.props.ts +142 -21
- package/src/__generated__/radio-group.props.ts +470 -71
- package/src/__generated__/select.props.ts +979 -153
- package/src/__generated__/sheet.props.ts +657 -99
- package/src/__generated__/switch.props.ts +317 -48
- package/src/__generated__/tabs.props.ts +565 -86
- package/src/__generated__/textarea.props.ts +195 -30
- package/src/__generated__/tooltip.props.ts +145 -23
- package/src/accordion.ws.ts +2 -0
- package/src/checkbox.ws.ts +3 -0
- package/src/collapsible.ws.ts +2 -0
- package/src/dialog.ws.tsx +2 -0
- package/src/label.ws.ts +2 -0
- package/src/navigation-menu.ws.ts +1 -0
- package/src/popover.ws.tsx +1 -0
- package/src/props-descriptions.ts +43 -0
- package/src/radio-group.ws.ts +4 -0
- package/src/select.tsx +8 -3
- package/src/select.ws.ts +2 -0
- package/src/sheet.ws.tsx +2 -0
- package/src/switch.ws.ts +3 -0
- package/src/tabs.ws.ts +2 -0
- package/src/tooltip.ws.tsx +2 -0
package/lib/cjs/select.ws.js
CHANGED
package/lib/cjs/sheet.ws.js
CHANGED
|
@@ -40,6 +40,7 @@ const meta = {
|
|
|
40
40
|
type: "container",
|
|
41
41
|
icon: import_svg.HamburgerMenuIcon,
|
|
42
42
|
stylable: false,
|
|
43
|
+
description: "Displays content in a menu that slides out from the side of the screen, triggered by a button. Use this component for a typical mobile hamburger menu.",
|
|
43
44
|
template: [
|
|
44
45
|
{
|
|
45
46
|
type: "instance",
|
package/lib/cjs/switch.ws.js
CHANGED
|
@@ -44,6 +44,7 @@ const metaSwitch = {
|
|
|
44
44
|
category: "radix",
|
|
45
45
|
order: 11,
|
|
46
46
|
type: "container",
|
|
47
|
+
description: "A control that allows the user to toggle between checked and not checked.",
|
|
47
48
|
icon: import_svg.SwitchIcon,
|
|
48
49
|
states: [
|
|
49
50
|
...import_react_sdk.defaultStates,
|
|
@@ -144,6 +145,7 @@ const metaSwitch = {
|
|
|
144
145
|
const metaSwitchThumb = {
|
|
145
146
|
category: "hidden",
|
|
146
147
|
type: "container",
|
|
148
|
+
detachable: false,
|
|
147
149
|
icon: import_svg.TriggerIcon,
|
|
148
150
|
states: [
|
|
149
151
|
...import_react_sdk.defaultStates,
|
package/lib/cjs/tabs.ws.js
CHANGED
|
@@ -78,6 +78,7 @@ const metaTabs = {
|
|
|
78
78
|
type: "container",
|
|
79
79
|
icon: import_svg.TabsIcon,
|
|
80
80
|
presetStyle,
|
|
81
|
+
description: "A set of panels with content that are displayed one at a time. Duplicate both a tab trigger and tab content to add more tabs. Triggers and content are connected according to their order in the Navigator.",
|
|
81
82
|
template: [
|
|
82
83
|
{
|
|
83
84
|
type: "instance",
|
package/lib/cjs/tooltip.ws.js
CHANGED
|
@@ -65,6 +65,7 @@ const metaTooltip = {
|
|
|
65
65
|
type: "container",
|
|
66
66
|
icon: import_svg.TooltipIcon,
|
|
67
67
|
stylable: false,
|
|
68
|
+
description: "Displays content that is related to the trigger, when the trigger is hovered with the mouse or focused with the keyboard. You are reading an example of a tooltip right now.",
|
|
68
69
|
template: [
|
|
69
70
|
{
|
|
70
71
|
type: "instance",
|
package/lib/collapsible.ws.js
CHANGED
package/lib/dialog.ws.js
CHANGED
|
@@ -79,6 +79,7 @@ const metaDialog = {
|
|
|
79
79
|
type: "container",
|
|
80
80
|
icon: DialogIcon,
|
|
81
81
|
stylable: false,
|
|
82
|
+
description: "Displays content with an overlay that covers the window, triggered by a button. Clicking the overlay will close the dialog.",
|
|
82
83
|
template: [
|
|
83
84
|
{
|
|
84
85
|
type: "instance",
|
package/lib/label.ws.js
CHANGED
|
@@ -15,6 +15,7 @@ const meta = {
|
|
|
15
15
|
icon: LabelIcon,
|
|
16
16
|
presetStyle,
|
|
17
17
|
states: defaultStates,
|
|
18
|
+
description: "An accessible label to describe the purpose of an input. Match the \u201CFor\u201D property on the label with the \u201CID\u201D of the input to connect them.",
|
|
18
19
|
template: [
|
|
19
20
|
{
|
|
20
21
|
type: "instance",
|
package/lib/popover.ws.js
CHANGED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
const open = "Show or hide the content of this component on the canvas. This will not affect the initial state of the component.";
|
|
2
|
+
const alignOffset = "The offset in pixels from the \u201Cstart\u201C or \u201Cend\u201C alignment options.";
|
|
3
|
+
const sideOffset = "The distance in pixels between the Content and the Trigger.";
|
|
4
|
+
const side = "The preferred alignment against the Trigger. May change when collisions occur.";
|
|
5
|
+
const propsDescriptions = {
|
|
6
|
+
Dialog: {
|
|
7
|
+
open
|
|
8
|
+
},
|
|
9
|
+
Sheet: {
|
|
10
|
+
open
|
|
11
|
+
},
|
|
12
|
+
Collapsible: {
|
|
13
|
+
open
|
|
14
|
+
},
|
|
15
|
+
Popover: {
|
|
16
|
+
open
|
|
17
|
+
},
|
|
18
|
+
PopoverContent: {
|
|
19
|
+
alignOffset,
|
|
20
|
+
sideOffset,
|
|
21
|
+
side
|
|
22
|
+
},
|
|
23
|
+
Tooltip: {
|
|
24
|
+
open,
|
|
25
|
+
delayDuration: "The delay before the Tooltip shows after the Trigger is hovered, in milliseconds. If no value is specified, the default is 700ms",
|
|
26
|
+
disableHoverableContent: "When toggled, prevents the Tooltip content from showing when the Trigger is hovered."
|
|
27
|
+
},
|
|
28
|
+
TooltipContent: {
|
|
29
|
+
alignOffset,
|
|
30
|
+
sideOffset,
|
|
31
|
+
side
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
export {
|
|
35
|
+
propsDescriptions
|
|
36
|
+
};
|
package/lib/radio-group.ws.js
CHANGED
|
@@ -79,6 +79,7 @@ const metaRadioGroup = {
|
|
|
79
79
|
category: "radix",
|
|
80
80
|
order: 100,
|
|
81
81
|
type: "container",
|
|
82
|
+
description: "A set of checkable buttons\u2014known as radio buttons\u2014where no more than one of the buttons can be checked at a time.",
|
|
82
83
|
icon: RadioCheckedIcon,
|
|
83
84
|
states: [
|
|
84
85
|
...defaultStates,
|
|
@@ -134,6 +135,7 @@ const metaRadioGroup = {
|
|
|
134
135
|
const metaRadioGroupItem = {
|
|
135
136
|
category: "hidden",
|
|
136
137
|
type: "container",
|
|
138
|
+
requiredAncestors: ["RadioGroup"],
|
|
137
139
|
icon: ItemIcon,
|
|
138
140
|
states: defaultStates,
|
|
139
141
|
presetStyle: {
|
|
@@ -143,6 +145,7 @@ const metaRadioGroupItem = {
|
|
|
143
145
|
const metaRadioGroupIndicator = {
|
|
144
146
|
category: "hidden",
|
|
145
147
|
type: "container",
|
|
148
|
+
detachable: false,
|
|
146
149
|
icon: TriggerIcon,
|
|
147
150
|
states: defaultStates,
|
|
148
151
|
presetStyle: {
|
package/lib/select.js
CHANGED
|
@@ -21,7 +21,9 @@ const Select = forwardRef(({ value, ...props }, _ref) => {
|
|
|
21
21
|
return /* @__PURE__ */ jsx(Root, { value, ...props });
|
|
22
22
|
});
|
|
23
23
|
const SelectTrigger = Trigger;
|
|
24
|
-
const SelectValue =
|
|
24
|
+
const SelectValue = forwardRef((props, ref) => {
|
|
25
|
+
return /* @__PURE__ */ jsx(Value, { ref, ...props });
|
|
26
|
+
});
|
|
25
27
|
const SelectContent = forwardRef((props, ref) => {
|
|
26
28
|
return /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(Content, { ref, ...props, position: "popper" }) });
|
|
27
29
|
});
|
package/lib/select.ws.js
CHANGED
package/lib/sheet.ws.js
CHANGED
|
@@ -7,6 +7,7 @@ const meta = {
|
|
|
7
7
|
type: "container",
|
|
8
8
|
icon: HamburgerMenuIcon,
|
|
9
9
|
stylable: false,
|
|
10
|
+
description: "Displays content in a menu that slides out from the side of the screen, triggered by a button. Use this component for a typical mobile hamburger menu.",
|
|
10
11
|
template: [
|
|
11
12
|
{
|
|
12
13
|
type: "instance",
|
package/lib/switch.ws.js
CHANGED
|
@@ -10,6 +10,7 @@ const metaSwitch = {
|
|
|
10
10
|
category: "radix",
|
|
11
11
|
order: 11,
|
|
12
12
|
type: "container",
|
|
13
|
+
description: "A control that allows the user to toggle between checked and not checked.",
|
|
13
14
|
icon: SwitchIcon,
|
|
14
15
|
states: [
|
|
15
16
|
...defaultStates,
|
|
@@ -110,6 +111,7 @@ const metaSwitch = {
|
|
|
110
111
|
const metaSwitchThumb = {
|
|
111
112
|
category: "hidden",
|
|
112
113
|
type: "container",
|
|
114
|
+
detachable: false,
|
|
113
115
|
icon: TriggerIcon,
|
|
114
116
|
states: [
|
|
115
117
|
...defaultStates,
|
package/lib/tabs.ws.js
CHANGED
|
@@ -48,6 +48,7 @@ const metaTabs = {
|
|
|
48
48
|
type: "container",
|
|
49
49
|
icon: TabsIcon,
|
|
50
50
|
presetStyle,
|
|
51
|
+
description: "A set of panels with content that are displayed one at a time. Duplicate both a tab trigger and tab content to add more tabs. Triggers and content are connected according to their order in the Navigator.",
|
|
51
52
|
template: [
|
|
52
53
|
{
|
|
53
54
|
type: "instance",
|
package/lib/tooltip.ws.js
CHANGED
|
@@ -32,6 +32,7 @@ const metaTooltip = {
|
|
|
32
32
|
type: "container",
|
|
33
33
|
icon: TooltipIcon,
|
|
34
34
|
stylable: false,
|
|
35
|
+
description: "Displays content that is related to the trigger, when the trigger is hovered with the mouse or focused with the keyboard. You are reading an example of a tooltip right now.",
|
|
35
36
|
template: [
|
|
36
37
|
{
|
|
37
38
|
type: "instance",
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare const propsDescriptions: {
|
|
2
|
+
Dialog: {
|
|
3
|
+
open: string;
|
|
4
|
+
};
|
|
5
|
+
Sheet: {
|
|
6
|
+
open: string;
|
|
7
|
+
};
|
|
8
|
+
Collapsible: {
|
|
9
|
+
open: string;
|
|
10
|
+
};
|
|
11
|
+
Popover: {
|
|
12
|
+
open: string;
|
|
13
|
+
};
|
|
14
|
+
PopoverContent: {
|
|
15
|
+
alignOffset: string;
|
|
16
|
+
sideOffset: string;
|
|
17
|
+
side: string;
|
|
18
|
+
};
|
|
19
|
+
Tooltip: {
|
|
20
|
+
open: string;
|
|
21
|
+
delayDuration: string;
|
|
22
|
+
disableHoverableContent: string;
|
|
23
|
+
};
|
|
24
|
+
TooltipContent: {
|
|
25
|
+
alignOffset: string;
|
|
26
|
+
sideOffset: string;
|
|
27
|
+
side: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
package/lib/types/select.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { type ForwardRefExoticComponent, type ComponentPropsWithRef } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { Trigger, Item, ItemIndicator, ItemText, Viewport } from "@radix-ui/react-select";
|
|
3
3
|
import { type Hook } from "@webstudio-is/react-sdk";
|
|
4
4
|
export declare const Select: ForwardRefExoticComponent<import("@radix-ui/react-select").SelectProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
5
|
export declare const SelectTrigger: ForwardRefExoticComponent<ComponentPropsWithRef<typeof Trigger>>;
|
|
6
|
-
export declare const SelectValue: ForwardRefExoticComponent<
|
|
6
|
+
export declare const SelectValue: ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/react-select").SelectValueProps & import("react").RefAttributes<HTMLSpanElement>, "ref">, "placeholder"> & {
|
|
7
|
+
placeholder?: string | undefined;
|
|
8
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
9
|
export declare const SelectContent: ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/react-select").SelectContentProps & import("react").RefAttributes<HTMLDivElement>, "ref">, "position" | "side"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
8
10
|
export declare const SelectViewport: ForwardRefExoticComponent<ComponentPropsWithRef<typeof Viewport>>;
|
|
9
11
|
export declare const SelectItem: ForwardRefExoticComponent<ComponentPropsWithRef<typeof Item>>;
|
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.89.0",
|
|
4
4
|
"description": "Webstudio wrapper for radix library",
|
|
5
5
|
"author": "Webstudio <github@webstudio.is>",
|
|
6
6
|
"homepage": "https://webstudio.is",
|
|
@@ -56,10 +56,10 @@
|
|
|
56
56
|
"@radix-ui/react-tabs": "^1.0.4",
|
|
57
57
|
"@radix-ui/react-tooltip": "^1.0.6",
|
|
58
58
|
"tailwindcss": "^3.3.3",
|
|
59
|
-
"@webstudio-is/css-data": "^0.
|
|
60
|
-
"@webstudio-is/generate-arg-types": "^0.
|
|
61
|
-
"@webstudio-is/icons": "^0.
|
|
62
|
-
"@webstudio-is/react-sdk": "^0.
|
|
59
|
+
"@webstudio-is/css-data": "^0.89.0",
|
|
60
|
+
"@webstudio-is/generate-arg-types": "^0.89.0",
|
|
61
|
+
"@webstudio-is/icons": "^0.89.0",
|
|
62
|
+
"@webstudio-is/react-sdk": "^0.89.0"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@storybook/react": "^7.2.1",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"react-dom": "^18.2.0",
|
|
70
70
|
"typescript": "^5.1.6",
|
|
71
71
|
"@webstudio-is/scripts": "^0.0.0",
|
|
72
|
-
"@webstudio-is/sdk-components-react": "^0.
|
|
72
|
+
"@webstudio-is/sdk-components-react": "^0.89.0",
|
|
73
73
|
"@webstudio-is/storybook-config": "^0.0.0",
|
|
74
74
|
"@webstudio-is/tsconfig": "^1.0.7"
|
|
75
75
|
},
|