@webstudio-is/sdk-components-react-radix 0.99.1-e132cba.0 → 0.100.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/components.js +3 -3
- package/lib/hooks.js +3 -3
- package/lib/props.js +2 -1
- package/lib/types/accordion.d.ts +5 -3
- package/lib/types/tabs.d.ts +6 -2
- package/package.json +11 -9
- package/lib/types/checkbox.stories.d.ts +0 -11
- package/lib/types/label.stories.d.ts +0 -9
- package/lib/types/radio-group.stories.d.ts +0 -9
- package/lib/types/switch.stories.d.ts +0 -9
package/lib/components.js
CHANGED
|
@@ -103,11 +103,11 @@ var Tabs = Root5;
|
|
|
103
103
|
var TabsList = List;
|
|
104
104
|
var TabsTrigger = forwardRef5(({ value, ...props }, ref) => {
|
|
105
105
|
const index = getIndexWithinAncestorFromComponentProps(props);
|
|
106
|
-
return /* @__PURE__ */ jsx5(Trigger5, { ref, value: value ?? index, ...props });
|
|
106
|
+
return /* @__PURE__ */ jsx5(Trigger5, { ref, value: value ?? index ?? "", ...props });
|
|
107
107
|
});
|
|
108
108
|
var TabsContent = forwardRef5(({ value, ...props }, ref) => {
|
|
109
109
|
const index = getIndexWithinAncestorFromComponentProps(props);
|
|
110
|
-
return /* @__PURE__ */ jsx5(Content5, { ref, value: value ?? index, ...props });
|
|
110
|
+
return /* @__PURE__ */ jsx5(Content5, { ref, value: value ?? index ?? "", ...props });
|
|
111
111
|
});
|
|
112
112
|
|
|
113
113
|
// src/label.tsx
|
|
@@ -139,7 +139,7 @@ var Accordion = forwardRef7((props, ref) => {
|
|
|
139
139
|
});
|
|
140
140
|
var AccordionItem = forwardRef7(({ value, ...props }, ref) => {
|
|
141
141
|
const index = getIndexWithinAncestorFromComponentProps2(props);
|
|
142
|
-
return /* @__PURE__ */ jsx7(Item, { ref, value: value ?? index, ...props });
|
|
142
|
+
return /* @__PURE__ */ jsx7(Item, { ref, value: value ?? index ?? "", ...props });
|
|
143
143
|
});
|
|
144
144
|
var AccordionHeader = Header;
|
|
145
145
|
var AccordionTrigger = Trigger6;
|
package/lib/hooks.js
CHANGED
|
@@ -40,11 +40,11 @@ import {
|
|
|
40
40
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
41
41
|
var TabsTrigger = forwardRef2(({ value, ...props }, ref) => {
|
|
42
42
|
const index = getIndexWithinAncestorFromComponentProps(props);
|
|
43
|
-
return /* @__PURE__ */ jsx2(Trigger2, { ref, value: value ?? index, ...props });
|
|
43
|
+
return /* @__PURE__ */ jsx2(Trigger2, { ref, value: value ?? index ?? "", ...props });
|
|
44
44
|
});
|
|
45
45
|
var TabsContent = forwardRef2(({ value, ...props }, ref) => {
|
|
46
46
|
const index = getIndexWithinAncestorFromComponentProps(props);
|
|
47
|
-
return /* @__PURE__ */ jsx2(Content2, { ref, value: value ?? index, ...props });
|
|
47
|
+
return /* @__PURE__ */ jsx2(Content2, { ref, value: value ?? index ?? "", ...props });
|
|
48
48
|
});
|
|
49
49
|
var namespace2 = "@webstudio-is/sdk-components-react-radix";
|
|
50
50
|
var hooksTabs = {
|
|
@@ -305,7 +305,7 @@ var Accordion = forwardRef7((props, ref) => {
|
|
|
305
305
|
});
|
|
306
306
|
var AccordionItem = forwardRef7(({ value, ...props }, ref) => {
|
|
307
307
|
const index = getIndexWithinAncestorFromComponentProps2(props);
|
|
308
|
-
return /* @__PURE__ */ jsx7(Item, { ref, value: value ?? index, ...props });
|
|
308
|
+
return /* @__PURE__ */ jsx7(Item, { ref, value: value ?? index ?? "", ...props });
|
|
309
309
|
});
|
|
310
310
|
var namespace7 = "@webstudio-is/sdk-components-react-radix";
|
|
311
311
|
var hooksAccordion = {
|
package/lib/props.js
CHANGED
|
@@ -12120,7 +12120,8 @@ var propsMetaAccordion = {
|
|
|
12120
12120
|
initialProps: ["value", "collapsible"]
|
|
12121
12121
|
};
|
|
12122
12122
|
var propsMetaAccordionItem = {
|
|
12123
|
-
props: propsAccordionItem
|
|
12123
|
+
props: propsAccordionItem,
|
|
12124
|
+
initialProps: ["value"]
|
|
12124
12125
|
};
|
|
12125
12126
|
var propsMetaAccordionHeader = {
|
|
12126
12127
|
props: propsAccordionHeader
|
package/lib/types/accordion.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ForwardRefExoticComponent, type ComponentPropsWithRef } from "react";
|
|
2
2
|
import { Header, Trigger, Content } from "@radix-ui/react-accordion";
|
|
3
3
|
import { type Hook } from "@webstudio-is/react-sdk";
|
|
4
|
-
export declare const Accordion: ForwardRefExoticComponent<Omit<
|
|
4
|
+
export declare const Accordion: ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/react-accordion").AccordionSingleProps & import("react").RefAttributes<HTMLDivElement>, "ref">, "type" | "value" | "defaultValue" | "asChild" | "onValueChange"> & {
|
|
5
5
|
value: string;
|
|
6
6
|
onValueChange: (value: string) => void;
|
|
7
7
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
8
|
-
export declare const AccordionItem: ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/react-accordion").AccordionItemProps & import("react").RefAttributes<HTMLDivElement>, "ref">, "
|
|
8
|
+
export declare const AccordionItem: ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/react-accordion").AccordionItemProps & import("react").RefAttributes<HTMLDivElement>, "ref">, "value"> & {
|
|
9
|
+
value?: string | undefined;
|
|
10
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
9
11
|
export declare const AccordionHeader: ForwardRefExoticComponent<Omit<ComponentPropsWithRef<typeof Header>, "asChild">>;
|
|
10
12
|
export declare const AccordionTrigger: ForwardRefExoticComponent<Omit<ComponentPropsWithRef<typeof Trigger>, "asChild">>;
|
|
11
13
|
export declare const AccordionContent: ForwardRefExoticComponent<Omit<ComponentPropsWithRef<typeof Content>, "asChild">>;
|
package/lib/types/tabs.d.ts
CHANGED
|
@@ -3,6 +3,10 @@ import { Root } from "@radix-ui/react-tabs";
|
|
|
3
3
|
import { type Hook } from "@webstudio-is/react-sdk";
|
|
4
4
|
export declare const Tabs: ForwardRefExoticComponent<Omit<ComponentPropsWithRef<typeof Root>, "asChild" | "defaultValue">>;
|
|
5
5
|
export declare const TabsList: ForwardRefExoticComponent<import("@radix-ui/react-tabs").TabsListProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
|
-
export declare const TabsTrigger: ForwardRefExoticComponent<Omit<import("@radix-ui/react-tabs").TabsTriggerProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> &
|
|
7
|
-
|
|
6
|
+
export declare const TabsTrigger: ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/react-tabs").TabsTriggerProps & import("react").RefAttributes<HTMLButtonElement>, "ref">, "value"> & {
|
|
7
|
+
value?: string | undefined;
|
|
8
|
+
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
export declare const TabsContent: ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/react-tabs").TabsContentProps & import("react").RefAttributes<HTMLDivElement>, "ref">, "value"> & {
|
|
10
|
+
value?: string | undefined;
|
|
11
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
8
12
|
export declare const hooksTabs: Hook;
|
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.100.0",
|
|
4
4
|
"description": "Webstudio wrapper for radix library",
|
|
5
5
|
"author": "Webstudio <github@webstudio.is>",
|
|
6
6
|
"homepage": "https://webstudio.is",
|
|
@@ -55,9 +55,9 @@
|
|
|
55
55
|
"@radix-ui/react-switch": "^1.0.3",
|
|
56
56
|
"@radix-ui/react-tabs": "^1.0.4",
|
|
57
57
|
"@radix-ui/react-tooltip": "^1.0.6",
|
|
58
|
-
"@webstudio-is/css-engine": "
|
|
59
|
-
"@webstudio-is/icons": "
|
|
60
|
-
"@webstudio-is/react-sdk": "
|
|
58
|
+
"@webstudio-is/css-engine": "0.100.0",
|
|
59
|
+
"@webstudio-is/icons": "0.100.0",
|
|
60
|
+
"@webstudio-is/react-sdk": "0.100.0"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@storybook/react": "^7.4.0",
|
|
@@ -67,17 +67,19 @@
|
|
|
67
67
|
"react-dom": "^18.2.0",
|
|
68
68
|
"tailwindcss": "^3.3.3",
|
|
69
69
|
"typescript": "^5.2.2",
|
|
70
|
-
"@webstudio-is/css-data": "
|
|
71
|
-
"@webstudio-is/generate-arg-types": "
|
|
72
|
-
"@webstudio-is/sdk-
|
|
73
|
-
"@webstudio-is/
|
|
74
|
-
"@webstudio-is/
|
|
70
|
+
"@webstudio-is/css-data": "0.100.0",
|
|
71
|
+
"@webstudio-is/generate-arg-types": "0.100.0",
|
|
72
|
+
"@webstudio-is/sdk-cli": "^0.94.0",
|
|
73
|
+
"@webstudio-is/sdk-components-react": "0.100.0",
|
|
74
|
+
"@webstudio-is/storybook-config": "0.0.0",
|
|
75
|
+
"@webstudio-is/tsconfig": "1.0.7"
|
|
75
76
|
},
|
|
76
77
|
"scripts": {
|
|
77
78
|
"dev": "rm -rf lib && esbuild 'src/**/*.ts' 'src/**/*.tsx' --outdir=lib --watch",
|
|
78
79
|
"build": "rm -rf lib && esbuild src/components.ts src/metas.ts src/props.ts src/hooks.ts --outdir=lib --bundle --format=esm --packages=external",
|
|
79
80
|
"build:args": "NODE_OPTIONS=--conditions=source generate-arg-types './src/*.tsx !./src/*.stories.tsx !./src/*.ws.tsx' -e asChild -e modal -e defaultValue -e defaultOpen -e defaultChecked && prettier --write \"**/*.props.ts\"",
|
|
80
81
|
"build:tailwind": "tsx scripts/generate-tailwind-theme.ts && prettier --write src/theme/__generated__",
|
|
82
|
+
"build:stories": "webstudio-sdk generate-stories && prettier --write \"src/__generated__/*.stories.tsx\"",
|
|
81
83
|
"dts": "tsc --project tsconfig.dts.json",
|
|
82
84
|
"typecheck": "tsc",
|
|
83
85
|
"checks": "pnpm typecheck",
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { StoryObj } from "@storybook/react";
|
|
3
|
-
import { Checkbox as CheckboxPrimitive } from "./checkbox";
|
|
4
|
-
declare const _default: {
|
|
5
|
-
title: string;
|
|
6
|
-
component: import("react").ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/react-checkbox").CheckboxProps & import("react").RefAttributes<HTMLButtonElement>, "checked"> & {
|
|
7
|
-
checked: boolean;
|
|
8
|
-
}, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
9
|
-
};
|
|
10
|
-
export default _default;
|
|
11
|
-
export declare const Checkbox: StoryObj<typeof CheckboxPrimitive>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { StoryObj } from "@storybook/react";
|
|
3
|
-
import { Label as LabelPrimitive } from "./label";
|
|
4
|
-
declare const _default: {
|
|
5
|
-
title: string;
|
|
6
|
-
component: import("react").ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/react-label").LabelProps & import("react").RefAttributes<HTMLLabelElement>, "ref">, "asChild"> & import("react").RefAttributes<HTMLLabelElement>>;
|
|
7
|
-
};
|
|
8
|
-
export default _default;
|
|
9
|
-
export declare const Label: StoryObj<typeof LabelPrimitive>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { StoryObj } from "@storybook/react";
|
|
3
|
-
import { RadioGroup as RadioGroupPrimitive } from "./radio-group";
|
|
4
|
-
declare const _default: {
|
|
5
|
-
title: string;
|
|
6
|
-
component: import("react").ForwardRefExoticComponent<import("@radix-ui/react-radio-group").RadioGroupProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
-
};
|
|
8
|
-
export default _default;
|
|
9
|
-
export declare const RadioGroup: StoryObj<typeof RadioGroupPrimitive>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { StoryObj } from "@storybook/react";
|
|
3
|
-
import { Switch as SwitchPrimitive } from "./switch";
|
|
4
|
-
declare const _default: {
|
|
5
|
-
title: string;
|
|
6
|
-
component: import("react").ForwardRefExoticComponent<import("@radix-ui/react-switch").SwitchProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
7
|
-
};
|
|
8
|
-
export default _default;
|
|
9
|
-
export declare const Switch: StoryObj<typeof SwitchPrimitive>;
|