@webstudio-is/sdk-components-react-radix 0.88.0 → 0.90.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 +21 -9
- 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 +19 -9
- package/lib/cjs/checkbox.ws.js +2 -0
- package/lib/cjs/collapsible.ws.js +1 -0
- package/lib/cjs/dialog.ws.js +19 -5
- 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 +16 -1
- package/lib/cjs/switch.ws.js +2 -0
- package/lib/cjs/tabs.ws.js +12 -2
- package/lib/cjs/theme/styles.js +0 -4
- package/lib/cjs/tooltip.ws.js +1 -0
- package/lib/collapsible.ws.js +1 -0
- package/lib/dialog.ws.js +22 -7
- 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 +17 -2
- package/lib/switch.ws.js +2 -0
- package/lib/tabs.ws.js +14 -2
- package/lib/theme/styles.js +0 -4
- package/lib/tooltip.ws.js +1 -0
- package/lib/types/accordion.ws.d.ts +1 -1
- package/lib/types/props-descriptions.d.ts +29 -0
- package/lib/types/select.d.ts +4 -2
- package/lib/types/tabs.ws.d.ts +1 -1
- 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 +22 -11
- package/src/checkbox.ws.ts +3 -0
- package/src/collapsible.ws.ts +2 -0
- package/src/dialog.ws.tsx +22 -7
- 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 +18 -2
- package/src/switch.ws.ts +3 -0
- package/src/tabs.ws.ts +17 -6
- package/src/theme/styles.ts +0 -4
- package/src/tooltip.ws.tsx +2 -0
package/lib/cjs/popover.ws.js
CHANGED
|
@@ -0,0 +1,56 @@
|
|
|
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_descriptions_exports = {};
|
|
20
|
+
__export(props_descriptions_exports, {
|
|
21
|
+
propsDescriptions: () => propsDescriptions
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(props_descriptions_exports);
|
|
24
|
+
const open = "Show or hide the content of this component on the canvas. This will not affect the initial state of the component.";
|
|
25
|
+
const alignOffset = "The offset in pixels from the \u201Cstart\u201C or \u201Cend\u201C alignment options.";
|
|
26
|
+
const sideOffset = "The distance in pixels between the Content and the Trigger.";
|
|
27
|
+
const side = "The preferred alignment against the Trigger. May change when collisions occur.";
|
|
28
|
+
const propsDescriptions = {
|
|
29
|
+
Dialog: {
|
|
30
|
+
open
|
|
31
|
+
},
|
|
32
|
+
Sheet: {
|
|
33
|
+
open
|
|
34
|
+
},
|
|
35
|
+
Collapsible: {
|
|
36
|
+
open
|
|
37
|
+
},
|
|
38
|
+
Popover: {
|
|
39
|
+
open
|
|
40
|
+
},
|
|
41
|
+
PopoverContent: {
|
|
42
|
+
alignOffset,
|
|
43
|
+
sideOffset,
|
|
44
|
+
side
|
|
45
|
+
},
|
|
46
|
+
Tooltip: {
|
|
47
|
+
open,
|
|
48
|
+
delayDuration: "The delay before the Tooltip shows after the Trigger is hovered, in milliseconds. If no value is specified, the default is 700ms",
|
|
49
|
+
disableHoverableContent: "When toggled, prevents the Tooltip content from showing when the Trigger is hovered."
|
|
50
|
+
},
|
|
51
|
+
TooltipContent: {
|
|
52
|
+
alignOffset,
|
|
53
|
+
sideOffset,
|
|
54
|
+
side
|
|
55
|
+
}
|
|
56
|
+
};
|
|
@@ -105,6 +105,7 @@ const metaRadioGroup = {
|
|
|
105
105
|
category: "radix",
|
|
106
106
|
order: 100,
|
|
107
107
|
type: "container",
|
|
108
|
+
description: "A set of checkable buttons\u2014known as radio buttons\u2014where no more than one of the buttons can be checked at a time.",
|
|
108
109
|
icon: import_svg.RadioCheckedIcon,
|
|
109
110
|
states: [
|
|
110
111
|
...import_react_sdk.defaultStates,
|
|
@@ -160,6 +161,7 @@ const metaRadioGroup = {
|
|
|
160
161
|
const metaRadioGroupItem = {
|
|
161
162
|
category: "hidden",
|
|
162
163
|
type: "container",
|
|
164
|
+
requiredAncestors: ["RadioGroup"],
|
|
163
165
|
icon: import_svg.ItemIcon,
|
|
164
166
|
states: import_react_sdk.defaultStates,
|
|
165
167
|
presetStyle: {
|
|
@@ -169,6 +171,7 @@ const metaRadioGroupItem = {
|
|
|
169
171
|
const metaRadioGroupIndicator = {
|
|
170
172
|
category: "hidden",
|
|
171
173
|
type: "container",
|
|
174
|
+
detachable: false,
|
|
172
175
|
icon: import_svg.TriggerIcon,
|
|
173
176
|
states: import_react_sdk.defaultStates,
|
|
174
177
|
presetStyle: {
|
package/lib/cjs/select.js
CHANGED
|
@@ -40,7 +40,9 @@ const Select = (0, import_react.forwardRef)(({ value, ...props }, _ref) => {
|
|
|
40
40
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_select.Root, { value, ...props });
|
|
41
41
|
});
|
|
42
42
|
const SelectTrigger = import_react_select.Trigger;
|
|
43
|
-
const SelectValue =
|
|
43
|
+
const SelectValue = (0, import_react.forwardRef)((props, ref) => {
|
|
44
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_select.Value, { ref, ...props });
|
|
45
|
+
});
|
|
44
46
|
const SelectContent = (0, import_react.forwardRef)((props, ref) => {
|
|
45
47
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_select.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_select.Content, { ref, ...props, position: "popper" }) });
|
|
46
48
|
});
|
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",
|
|
@@ -230,7 +231,21 @@ const meta = {
|
|
|
230
231
|
tc.hover(tc.opacity(100)),
|
|
231
232
|
tc.focus(tc.ring("ring", 2, "background", 2))
|
|
232
233
|
].flat(),
|
|
233
|
-
children: [
|
|
234
|
+
children: [
|
|
235
|
+
{
|
|
236
|
+
type: "instance",
|
|
237
|
+
component: "HtmlEmbed",
|
|
238
|
+
label: "Close Icon",
|
|
239
|
+
props: [
|
|
240
|
+
{
|
|
241
|
+
type: "string",
|
|
242
|
+
name: "code",
|
|
243
|
+
value: import_svg.LargeXIcon
|
|
244
|
+
}
|
|
245
|
+
],
|
|
246
|
+
children: []
|
|
247
|
+
}
|
|
248
|
+
]
|
|
234
249
|
}
|
|
235
250
|
]
|
|
236
251
|
}
|
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
|
@@ -39,6 +39,7 @@ __export(tabs_ws_exports, {
|
|
|
39
39
|
});
|
|
40
40
|
module.exports = __toCommonJS(tabs_ws_exports);
|
|
41
41
|
var import_svg = require("@webstudio-is/icons/svg");
|
|
42
|
+
var import_react_sdk = require("@webstudio-is/react-sdk");
|
|
42
43
|
var import_css_normalize = require("@webstudio-is/react-sdk/css-normalize");
|
|
43
44
|
var tc = __toESM(require("./theme/tailwind-classes"), 1);
|
|
44
45
|
var import_styles = require("./theme/styles");
|
|
@@ -78,6 +79,7 @@ const metaTabs = {
|
|
|
78
79
|
type: "container",
|
|
79
80
|
icon: import_svg.TabsIcon,
|
|
80
81
|
presetStyle,
|
|
82
|
+
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
83
|
template: [
|
|
82
84
|
{
|
|
83
85
|
type: "instance",
|
|
@@ -159,6 +161,14 @@ const metaTabsTrigger = {
|
|
|
159
161
|
invalidAncestors: ["TabsTrigger"],
|
|
160
162
|
indexWithinAncestor: "Tabs",
|
|
161
163
|
label: "Tab Trigger",
|
|
164
|
+
states: [
|
|
165
|
+
...import_react_sdk.defaultStates,
|
|
166
|
+
{
|
|
167
|
+
category: "component-states",
|
|
168
|
+
label: "Active",
|
|
169
|
+
selector: "[data-state=active]"
|
|
170
|
+
}
|
|
171
|
+
],
|
|
162
172
|
presetStyle: {
|
|
163
173
|
button: [import_css_normalize.button, import_styles.buttonReset].flat()
|
|
164
174
|
}
|
|
@@ -166,11 +176,11 @@ const metaTabsTrigger = {
|
|
|
166
176
|
const metaTabsContent = {
|
|
167
177
|
category: "hidden",
|
|
168
178
|
type: "container",
|
|
179
|
+
label: "Tab Content",
|
|
169
180
|
icon: import_svg.ContentIcon,
|
|
170
181
|
requiredAncestors: ["Tabs"],
|
|
171
182
|
indexWithinAncestor: "Tabs",
|
|
172
|
-
presetStyle
|
|
173
|
-
label: "Tab Content"
|
|
183
|
+
presetStyle
|
|
174
184
|
};
|
|
175
185
|
const propsMetaTabs = {
|
|
176
186
|
props: import_tabs.propsTabs
|
package/lib/cjs/theme/styles.js
CHANGED
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
|
@@ -5,7 +5,8 @@ import {
|
|
|
5
5
|
OverlayIcon,
|
|
6
6
|
HeadingIcon,
|
|
7
7
|
TextIcon,
|
|
8
|
-
ButtonElementIcon
|
|
8
|
+
ButtonElementIcon,
|
|
9
|
+
LargeXIcon
|
|
9
10
|
} from "@webstudio-is/icons/svg";
|
|
10
11
|
import {
|
|
11
12
|
} from "@webstudio-is/react-sdk";
|
|
@@ -20,13 +21,10 @@ import {
|
|
|
20
21
|
propsDialogTitle,
|
|
21
22
|
propsDialogDescription
|
|
22
23
|
} from "./__generated__/dialog.props";
|
|
23
|
-
import { getButtonStyles } from "./theme/styles";
|
|
24
|
+
import { buttonReset, getButtonStyles } from "./theme/styles";
|
|
24
25
|
const presetStyle = {
|
|
25
26
|
div
|
|
26
27
|
};
|
|
27
|
-
const buttonPresetStyle = {
|
|
28
|
-
button
|
|
29
|
-
};
|
|
30
28
|
const titlePresetStyle = {
|
|
31
29
|
h2
|
|
32
30
|
};
|
|
@@ -69,7 +67,9 @@ const metaDialogDescription = {
|
|
|
69
67
|
const metaDialogClose = {
|
|
70
68
|
category: "hidden",
|
|
71
69
|
type: "container",
|
|
72
|
-
presetStyle:
|
|
70
|
+
presetStyle: {
|
|
71
|
+
button: [buttonReset, button].flat()
|
|
72
|
+
},
|
|
73
73
|
icon: ButtonElementIcon,
|
|
74
74
|
label: "Close Button"
|
|
75
75
|
};
|
|
@@ -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",
|
|
@@ -232,7 +233,21 @@ const metaDialog = {
|
|
|
232
233
|
tc.hover(tc.opacity(100)),
|
|
233
234
|
tc.focus(tc.ring("ring", 2, "background", 2))
|
|
234
235
|
].flat(),
|
|
235
|
-
children: [
|
|
236
|
+
children: [
|
|
237
|
+
{
|
|
238
|
+
type: "instance",
|
|
239
|
+
component: "HtmlEmbed",
|
|
240
|
+
label: "Close Icon",
|
|
241
|
+
props: [
|
|
242
|
+
{
|
|
243
|
+
type: "string",
|
|
244
|
+
name: "code",
|
|
245
|
+
value: LargeXIcon
|
|
246
|
+
}
|
|
247
|
+
],
|
|
248
|
+
children: []
|
|
249
|
+
}
|
|
250
|
+
]
|
|
236
251
|
}
|
|
237
252
|
]
|
|
238
253
|
}
|
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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HamburgerMenuIcon } from "@webstudio-is/icons/svg";
|
|
1
|
+
import { HamburgerMenuIcon, LargeXIcon } from "@webstudio-is/icons/svg";
|
|
2
2
|
import * as tc from "./theme/tailwind-classes";
|
|
3
3
|
import { getButtonStyles } from "./theme/styles";
|
|
4
4
|
const meta = {
|
|
@@ -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",
|
|
@@ -197,7 +198,21 @@ const meta = {
|
|
|
197
198
|
tc.hover(tc.opacity(100)),
|
|
198
199
|
tc.focus(tc.ring("ring", 2, "background", 2))
|
|
199
200
|
].flat(),
|
|
200
|
-
children: [
|
|
201
|
+
children: [
|
|
202
|
+
{
|
|
203
|
+
type: "instance",
|
|
204
|
+
component: "HtmlEmbed",
|
|
205
|
+
label: "Close Icon",
|
|
206
|
+
props: [
|
|
207
|
+
{
|
|
208
|
+
type: "string",
|
|
209
|
+
name: "code",
|
|
210
|
+
value: LargeXIcon
|
|
211
|
+
}
|
|
212
|
+
],
|
|
213
|
+
children: []
|
|
214
|
+
}
|
|
215
|
+
]
|
|
201
216
|
}
|
|
202
217
|
]
|
|
203
218
|
}
|
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
|
@@ -4,6 +4,9 @@ import {
|
|
|
4
4
|
TabsIcon,
|
|
5
5
|
TriggerIcon
|
|
6
6
|
} from "@webstudio-is/icons/svg";
|
|
7
|
+
import {
|
|
8
|
+
defaultStates
|
|
9
|
+
} from "@webstudio-is/react-sdk";
|
|
7
10
|
import { button, div } from "@webstudio-is/react-sdk/css-normalize";
|
|
8
11
|
import * as tc from "./theme/tailwind-classes";
|
|
9
12
|
import { buttonReset } from "./theme/styles";
|
|
@@ -48,6 +51,7 @@ const metaTabs = {
|
|
|
48
51
|
type: "container",
|
|
49
52
|
icon: TabsIcon,
|
|
50
53
|
presetStyle,
|
|
54
|
+
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
55
|
template: [
|
|
52
56
|
{
|
|
53
57
|
type: "instance",
|
|
@@ -129,6 +133,14 @@ const metaTabsTrigger = {
|
|
|
129
133
|
invalidAncestors: ["TabsTrigger"],
|
|
130
134
|
indexWithinAncestor: "Tabs",
|
|
131
135
|
label: "Tab Trigger",
|
|
136
|
+
states: [
|
|
137
|
+
...defaultStates,
|
|
138
|
+
{
|
|
139
|
+
category: "component-states",
|
|
140
|
+
label: "Active",
|
|
141
|
+
selector: "[data-state=active]"
|
|
142
|
+
}
|
|
143
|
+
],
|
|
132
144
|
presetStyle: {
|
|
133
145
|
button: [button, buttonReset].flat()
|
|
134
146
|
}
|
|
@@ -136,11 +148,11 @@ const metaTabsTrigger = {
|
|
|
136
148
|
const metaTabsContent = {
|
|
137
149
|
category: "hidden",
|
|
138
150
|
type: "container",
|
|
151
|
+
label: "Tab Content",
|
|
139
152
|
icon: ContentIcon,
|
|
140
153
|
requiredAncestors: ["Tabs"],
|
|
141
154
|
indexWithinAncestor: "Tabs",
|
|
142
|
-
presetStyle
|
|
143
|
-
label: "Tab Content"
|
|
155
|
+
presetStyle
|
|
144
156
|
};
|
|
145
157
|
const propsMetaTabs = {
|
|
146
158
|
props: propsTabs
|
package/lib/theme/styles.js
CHANGED
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",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type WsComponentMeta, type WsComponentPropsMeta } from "@webstudio-is/react-sdk";
|
|
2
2
|
export declare const metaAccordion: WsComponentMeta;
|
|
3
3
|
export declare const metaAccordionItem: WsComponentMeta;
|
|
4
4
|
export declare const metaAccordionHeader: WsComponentMeta;
|
|
@@ -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/lib/types/tabs.ws.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type WsComponentMeta, type WsComponentPropsMeta } from "@webstudio-is/react-sdk";
|
|
2
2
|
export declare const metaTabs: WsComponentMeta;
|
|
3
3
|
export declare const metaTabsList: WsComponentMeta;
|
|
4
4
|
export declare const metaTabsTrigger: WsComponentMeta;
|
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.90.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.90.0",
|
|
60
|
+
"@webstudio-is/generate-arg-types": "^0.90.0",
|
|
61
|
+
"@webstudio-is/icons": "^0.90.0",
|
|
62
|
+
"@webstudio-is/react-sdk": "^0.90.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.90.0",
|
|
73
73
|
"@webstudio-is/storybook-config": "^0.0.0",
|
|
74
74
|
"@webstudio-is/tsconfig": "^1.0.7"
|
|
75
75
|
},
|