@webstudio-is/sdk-components-react-radix 0.105.0 → 0.106.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 CHANGED
@@ -33,7 +33,8 @@ var DialogOverlay = forwardRef2((props, ref) => {
33
33
  });
34
34
  var DialogContent = DialogPrimitive.Content;
35
35
  var DialogClose = DialogPrimitive.Close;
36
- var DialogTitle = DialogPrimitive.Title;
36
+ var defaultTag = "h1";
37
+ var DialogTitle2 = forwardRef2(({ tag: Tag = defaultTag, children, ...props }, ref) => /* @__PURE__ */ jsx2(DialogPrimitive.DialogTitle, { asChild: true, children: /* @__PURE__ */ jsx2(Tag, { ref, ...props, children: children ?? "Heading title you can edit" }) }));
37
38
  var DialogDescription = DialogPrimitive.Description;
38
39
 
39
40
  // src/popover.tsx
@@ -199,11 +200,8 @@ import {
199
200
  } from "@radix-ui/react-select";
200
201
  import { getClosestInstance as getClosestInstance8 } from "@webstudio-is/react-sdk";
201
202
  import { jsx as jsx9 } from "react/jsx-runtime";
202
- var Select = forwardRef9(({ value, ...props }, _ref) => {
203
- if (value === "") {
204
- value = void 0;
205
- }
206
- return /* @__PURE__ */ jsx9(Root9, { value, ...props });
203
+ var Select = forwardRef9((props, _ref) => {
204
+ return /* @__PURE__ */ jsx9(Root9, { ...props });
207
205
  });
208
206
  var SelectTrigger = Trigger8;
209
207
  var SelectValue = forwardRef9((props, ref) => {
@@ -255,7 +253,7 @@ export {
255
253
  DialogContent,
256
254
  DialogDescription,
257
255
  DialogOverlay,
258
- DialogTitle,
256
+ DialogTitle2 as DialogTitle,
259
257
  DialogTrigger,
260
258
  Label,
261
259
  NavigationMenu,
package/lib/hooks.js CHANGED
@@ -84,6 +84,8 @@ var DialogOverlay = forwardRef3((props, ref) => {
84
84
  return /* @__PURE__ */ jsx3(DialogPrimitive.DialogPortal, { children: /* @__PURE__ */ jsx3(DialogPrimitive.Overlay, { ref, ...props }) });
85
85
  });
86
86
  var DialogContent = DialogPrimitive.Content;
87
+ var defaultTag = "h1";
88
+ var DialogTitle2 = forwardRef3(({ tag: Tag = defaultTag, children, ...props }, ref) => /* @__PURE__ */ jsx3(DialogPrimitive.DialogTitle, { asChild: true, children: /* @__PURE__ */ jsx3(Tag, { ref, ...props, children: children ?? "Heading title you can edit" }) }));
87
89
  var namespace3 = "@webstudio-is/sdk-components-react-radix";
88
90
  var hooksDialog = {
89
91
  onNavigatorUnselect: (context, event) => {
@@ -424,11 +426,8 @@ import {
424
426
  } from "@radix-ui/react-select";
425
427
  import { getClosestInstance as getClosestInstance9 } from "@webstudio-is/react-sdk";
426
428
  import { jsx as jsx9 } from "react/jsx-runtime";
427
- var Select = forwardRef9(({ value, ...props }, _ref) => {
428
- if (value === "") {
429
- value = void 0;
430
- }
431
- return /* @__PURE__ */ jsx9(Root8, { value, ...props });
429
+ var Select = forwardRef9((props, _ref) => {
430
+ return /* @__PURE__ */ jsx9(Root8, { ...props });
432
431
  });
433
432
  var SelectValue = forwardRef9((props, ref) => {
434
433
  return /* @__PURE__ */ jsx9(Value, { ref, ...props });
package/lib/props.js CHANGED
@@ -4387,6 +4387,13 @@ var propsDialogTitle = {
4387
4387
  type: "number",
4388
4388
  description: "Overrides the browser's default tab order and follows the one specified instead."
4389
4389
  },
4390
+ tag: {
4391
+ required: false,
4392
+ control: "select",
4393
+ type: "string",
4394
+ defaultValue: "h1",
4395
+ options: ["h2", "h3", "h1", "h4", "h5", "h6"]
4396
+ },
4390
4397
  title: {
4391
4398
  required: false,
4392
4399
  control: "text",
@@ -14,6 +14,10 @@ export declare const DialogTrigger: import("react").ForwardRefExoticComponent<{
14
14
  export declare const DialogOverlay: import("react").ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
15
15
  export declare const DialogContent: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogContentProps & import("react").RefAttributes<HTMLDivElement>>;
16
16
  export declare const DialogClose: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
17
- export declare const DialogTitle: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogTitleProps & import("react").RefAttributes<HTMLHeadingElement>>;
17
+ type Tag = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
18
+ export declare const DialogTitle: import("react").ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & import("react").RefAttributes<HTMLHeadingElement> & {
19
+ tag?: Tag | undefined;
20
+ }, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
18
21
  export declare const DialogDescription: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogDescriptionProps & import("react").RefAttributes<HTMLParagraphElement>>;
19
22
  export declare const hooksDialog: Hook;
23
+ export {};
@@ -6,7 +6,9 @@ export declare const SheetTrigger: import("react").ForwardRefExoticComponent<{
6
6
  } & import("react").RefAttributes<HTMLButtonElement>>;
7
7
  export declare const SheetOverlay: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-dialog").DialogOverlayProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
8
8
  export declare const SheetClose: import("react").ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
9
- export declare const SheetTitle: import("react").ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogTitleProps & import("react").RefAttributes<HTMLHeadingElement>>;
9
+ export declare const SheetTitle: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-dialog").DialogTitleProps & import("react").RefAttributes<HTMLHeadingElement> & {
10
+ tag?: ("h1" | "h2" | "h3" | "h4" | "h5" | "h6") | undefined;
11
+ }, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
10
12
  export declare const SheetDescription: import("react").ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogDescriptionProps & import("react").RefAttributes<HTMLParagraphElement>>;
11
13
  export declare const SheetContent: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-dialog").DialogContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
12
14
  tag?: "div" | "nav" | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webstudio-is/sdk-components-react-radix",
3
- "version": "0.105.0",
3
+ "version": "0.106.0",
4
4
  "description": "Webstudio wrapper for radix library",
5
5
  "author": "Webstudio <github@webstudio.is>",
6
6
  "homepage": "https://webstudio.is",
@@ -46,18 +46,18 @@
46
46
  "@radix-ui/react-accordion": "^1.1.2",
47
47
  "@radix-ui/react-checkbox": "^1.0.4",
48
48
  "@radix-ui/react-collapsible": "^1.0.3",
49
- "@radix-ui/react-dialog": "^1.0.4",
49
+ "@radix-ui/react-dialog": "^1.0.5",
50
50
  "@radix-ui/react-label": "^2.0.2",
51
- "@radix-ui/react-navigation-menu": "^1.1.3",
52
- "@radix-ui/react-popover": "^1.0.6",
51
+ "@radix-ui/react-navigation-menu": "^1.1.4",
52
+ "@radix-ui/react-popover": "^1.0.7",
53
53
  "@radix-ui/react-radio-group": "^1.1.3",
54
- "@radix-ui/react-select": "^1.2.2",
54
+ "@radix-ui/react-select": "^2.0.0",
55
55
  "@radix-ui/react-switch": "^1.0.3",
56
56
  "@radix-ui/react-tabs": "^1.0.4",
57
- "@radix-ui/react-tooltip": "^1.0.6",
58
- "@webstudio-is/css-engine": "0.105.0",
59
- "@webstudio-is/icons": "0.105.0",
60
- "@webstudio-is/react-sdk": "0.105.0"
57
+ "@radix-ui/react-tooltip": "^1.0.7",
58
+ "@webstudio-is/css-engine": "0.106.0",
59
+ "@webstudio-is/icons": "0.106.0",
60
+ "@webstudio-is/react-sdk": "0.106.0"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@storybook/react": "^7.4.0",
@@ -67,17 +67,17 @@
67
67
  "react-dom": "^18.2.0",
68
68
  "tailwindcss": "^3.3.3",
69
69
  "typescript": "^5.2.2",
70
- "@webstudio-is/css-data": "0.105.0",
71
- "@webstudio-is/generate-arg-types": "0.105.0",
70
+ "@webstudio-is/css-data": "0.106.0",
71
+ "@webstudio-is/generate-arg-types": "0.106.0",
72
72
  "@webstudio-is/sdk-cli": "^0.94.0",
73
- "@webstudio-is/sdk-components-react": "0.105.0",
73
+ "@webstudio-is/sdk-components-react": "0.106.0",
74
74
  "@webstudio-is/storybook-config": "0.0.0",
75
75
  "@webstudio-is/tsconfig": "1.0.7"
76
76
  },
77
77
  "scripts": {
78
78
  "dev": "rm -rf lib && esbuild 'src/**/*.ts' 'src/**/*.tsx' --outdir=lib --watch",
79
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",
80
- "build:args": "NODE_OPTIONS=--conditions=webstudio generate-arg-types './src/accordion.tsx !./src/*.stories.tsx !./src/*.ws.tsx' -e asChild -e modal -e defaultValue -e defaultOpen -e defaultChecked && prettier --write \"**/*.props.ts\"",
80
+ "build:args": "NODE_OPTIONS=--conditions=webstudio 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\"",
81
81
  "build:tailwind": "tsx scripts/generate-tailwind-theme.ts && prettier --write src/theme/__generated__",
82
82
  "build:stories": "webstudio-sdk generate-stories && prettier --write \"src/__generated__/*.stories.tsx\"",
83
83
  "dts": "tsc --project tsconfig.dts.json",