@webstudio-is/sdk-components-react-radix 0.175.0 → 0.179.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
@@ -302,9 +302,11 @@ import {
302
302
  ReactSdkContext as ReactSdkContext3
303
303
  } from "@webstudio-is/react-sdk/runtime";
304
304
  import { jsx as jsx9 } from "react/jsx-runtime";
305
- var Select = forwardRef9((props, _ref) => {
306
- return /* @__PURE__ */ jsx9(Root9, { ...props });
307
- });
305
+ var Select = forwardRef9(
306
+ ({ value, defaultValue, ...props }, _ref) => {
307
+ return /* @__PURE__ */ jsx9(Root9, { ...props, defaultValue: value ?? defaultValue });
308
+ }
309
+ );
308
310
  var SelectTrigger = forwardRef9((props, ref) => {
309
311
  const { renderer } = useContext3(ReactSdkContext3);
310
312
  const onPointerDown = renderer === "canvas" ? (event) => {
@@ -324,25 +326,34 @@ var SelectItemIndicator = ItemIndicator;
324
326
  var SelectItemText = ItemText;
325
327
 
326
328
  // src/switch.tsx
329
+ import {
330
+ forwardRef as forwardRef10
331
+ } from "react";
327
332
  import { Root as Root10, Thumb } from "@radix-ui/react-switch";
328
- var Switch = Root10;
333
+ import { jsx as jsx10 } from "react/jsx-runtime";
334
+ var Switch = forwardRef10(({ checked, defaultChecked, ...props }, ref) => {
335
+ return /* @__PURE__ */ jsx10(Root10, { ...props, ref, defaultChecked: checked ?? defaultChecked });
336
+ });
329
337
  var SwitchThumb = Thumb;
330
338
 
331
339
  // src/checkbox.tsx
332
340
  import {
333
- forwardRef as forwardRef10
341
+ forwardRef as forwardRef11
334
342
  } from "react";
335
343
  import { Root as Root11, Indicator } from "@radix-ui/react-checkbox";
336
- import { jsx as jsx10 } from "react/jsx-runtime";
337
- var Checkbox = forwardRef10((props, ref) => {
338
- return /* @__PURE__ */ jsx10(Root11, { ref, ...props });
344
+ import { jsx as jsx11 } from "react/jsx-runtime";
345
+ var Checkbox = forwardRef11(({ checked, defaultChecked, ...props }, ref) => {
346
+ return /* @__PURE__ */ jsx11(Root11, { ...props, ref, defaultChecked: checked ?? defaultChecked });
339
347
  });
340
348
  var CheckboxIndicator = Indicator;
341
349
 
342
350
  // src/radio-group.tsx
343
- import "react";
351
+ import {
352
+ forwardRef as forwardRef12
353
+ } from "react";
344
354
  import { Root as Root12, Item as Item4, Indicator as Indicator2 } from "@radix-ui/react-radio-group";
345
- var RadioGroup = Root12;
355
+ import { jsx as jsx12 } from "react/jsx-runtime";
356
+ var RadioGroup = forwardRef12(({ value, defaultValue, ...props }, ref) => /* @__PURE__ */ jsx12(Root12, { ...props, defaultValue: value ?? defaultValue, ref }));
346
357
  var RadioGroupItem = Item4;
347
358
  var RadioGroupIndicator = Indicator2;
348
359
  export {
package/lib/hooks.js CHANGED
@@ -583,9 +583,11 @@ import {
583
583
  ReactSdkContext as ReactSdkContext3
584
584
  } from "@webstudio-is/react-sdk/runtime";
585
585
  import { jsx as jsx9 } from "react/jsx-runtime";
586
- var Select = forwardRef9((props, _ref) => {
587
- return /* @__PURE__ */ jsx9(Root8, { ...props });
588
- });
586
+ var Select = forwardRef9(
587
+ ({ value, defaultValue, ...props }, _ref) => {
588
+ return /* @__PURE__ */ jsx9(Root8, { ...props, defaultValue: value ?? defaultValue });
589
+ }
590
+ );
589
591
  var SelectTrigger = forwardRef9((props, ref) => {
590
592
  const { renderer } = useContext3(ReactSdkContext3);
591
593
  const onPointerDown = renderer === "canvas" ? (event) => {
package/lib/props.js CHANGED
@@ -13953,12 +13953,6 @@ var propsNavigationMenuContent = {
13953
13953
  type: "string",
13954
13954
  description: "Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)"
13955
13955
  },
13956
- disableOutsidePointerEvents: {
13957
- description: "When `true`, hover/focus/click interactions will be disabled on elements outside\nthe `DismissableLayer`. Users will need to click twice on outside elements to\ninteract with them: once to close the `DismissableLayer`, and again to trigger the element.",
13958
- required: false,
13959
- control: "boolean",
13960
- type: "boolean"
13961
- },
13962
13956
  draggable: {
13963
13957
  required: false,
13964
13958
  control: "boolean",
@@ -19957,7 +19951,7 @@ var metaSelect = {
19957
19951
  };
19958
19952
  var propsMetaSelect = {
19959
19953
  props: propsSelect,
19960
- initialProps: ["value", "open", "name", "required"]
19954
+ initialProps: ["name", "value", "open", "required"]
19961
19955
  };
19962
19956
  var propsMetaSelectTrigger = {
19963
19957
  props: propsSelectTrigger
@@ -21192,7 +21186,7 @@ var metaSwitchThumb = {
21192
21186
  };
21193
21187
  var propsMetaSwitch = {
21194
21188
  props: propsSwitch,
21195
- initialProps: ["id", "className", "checked", "name", "required"]
21189
+ initialProps: ["id", "className", "name", "value", "checked", "required"]
21196
21190
  };
21197
21191
  var propsMetaSwitchThumb = {
21198
21192
  props: propsSwitchThumb
@@ -22402,7 +22396,7 @@ var metaCheckbox = {
22402
22396
  };
22403
22397
  var propsMetaCheckbox = {
22404
22398
  props: propsCheckbox,
22405
- initialProps: ["id", "className", "checked", "name", "required"]
22399
+ initialProps: ["id", "className", "name", "value", "required", "checked"]
22406
22400
  };
22407
22401
  var propsMetaCheckboxIndicator = {
22408
22402
  props: propsCheckboxIndicator
@@ -24155,7 +24149,7 @@ var metaRadioGroupItem = {
24155
24149
  };
24156
24150
  var propsMetaRadioGroup = {
24157
24151
  props: propsRadioGroup,
24158
- initialProps: ["id", "className", "value", "name", "required"]
24152
+ initialProps: ["id", "className", "name", "value", "required"]
24159
24153
  };
24160
24154
  var propsMetaRadioGroupItem = {
24161
24155
  props: propsRadioGroupItem,
@@ -2,7 +2,8 @@ import { type ForwardRefExoticComponent, type ComponentProps } from "react";
2
2
  import { Indicator } from "@radix-ui/react-checkbox";
3
3
  export declare const Checkbox: ForwardRefExoticComponent<Omit<Omit<Omit<import("@radix-ui/react-checkbox").CheckboxProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & {
4
4
  ref?: ((instance: HTMLButtonElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLButtonElement> | null | undefined;
5
- }, "checked"> & {
5
+ }, "defaultChecked" | "checked"> & {
6
6
  checked: boolean;
7
+ defaultChecked?: boolean;
7
8
  }, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
8
9
  export declare const CheckboxIndicator: ForwardRefExoticComponent<ComponentProps<typeof Indicator> & React.RefAttributes<HTMLSpanElement>>;
@@ -1,5 +1,5 @@
1
1
  import { type ForwardRefExoticComponent, type ComponentProps, type RefAttributes } from "react";
2
- import { Root, Item, Indicator } from "@radix-ui/react-radio-group";
3
- export declare const RadioGroup: ForwardRefExoticComponent<ComponentProps<typeof Root> & RefAttributes<HTMLDivElement>>;
2
+ import { Item, Indicator } from "@radix-ui/react-radio-group";
3
+ export declare const RadioGroup: ForwardRefExoticComponent<Omit<import("@radix-ui/react-radio-group").RadioGroupProps & RefAttributes<HTMLDivElement> & RefAttributes<"div">, "ref"> & RefAttributes<HTMLDivElement>>;
4
4
  export declare const RadioGroupItem: ForwardRefExoticComponent<ComponentProps<typeof Item> & RefAttributes<HTMLButtonElement>>;
5
5
  export declare const RadioGroupIndicator: ForwardRefExoticComponent<ComponentProps<typeof Indicator> & RefAttributes<HTMLSpanElement>>;
@@ -1,4 +1,4 @@
1
- import type { ForwardRefExoticComponent, ComponentProps, RefAttributes } from "react";
2
- import { Root, Thumb } from "@radix-ui/react-switch";
3
- export declare const Switch: ForwardRefExoticComponent<ComponentProps<typeof Root> & RefAttributes<HTMLButtonElement>>;
1
+ import { type ForwardRefExoticComponent, type ComponentProps, type RefAttributes } from "react";
2
+ import { Thumb } from "@radix-ui/react-switch";
3
+ export declare const Switch: ForwardRefExoticComponent<Omit<import("@radix-ui/react-switch").SwitchProps & RefAttributes<HTMLButtonElement>, "ref"> & RefAttributes<HTMLButtonElement>>;
4
4
  export declare const SwitchThumb: ForwardRefExoticComponent<ComponentProps<typeof Thumb> & RefAttributes<HTMLSpanElement>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webstudio-is/sdk-components-react-radix",
3
- "version": "0.175.0",
3
+ "version": "0.179.0",
4
4
  "description": "Webstudio wrapper for radix library",
5
5
  "author": "Webstudio <github@webstudio.is>",
6
6
  "homepage": "https://webstudio.is",
@@ -51,10 +51,10 @@
51
51
  "@radix-ui/react-switch": "^1.1.0",
52
52
  "@radix-ui/react-tabs": "^1.1.0",
53
53
  "@radix-ui/react-tooltip": "^1.1.2",
54
- "@webstudio-is/css-engine": "0.175.0",
55
- "@webstudio-is/react-sdk": "0.175.0",
56
- "@webstudio-is/sdk": "0.175.0",
57
- "@webstudio-is/icons": "0.175.0"
54
+ "@webstudio-is/css-engine": "0.179.0",
55
+ "@webstudio-is/icons": "0.179.0",
56
+ "@webstudio-is/react-sdk": "0.179.0",
57
+ "@webstudio-is/sdk": "0.179.0"
58
58
  },
59
59
  "devDependencies": {
60
60
  "@types/node": "^20.12.7",
@@ -66,13 +66,13 @@
66
66
  "typescript": "^5.5.2",
67
67
  "@webstudio-is/css-data": "0.0.0",
68
68
  "@webstudio-is/generate-arg-types": "0.0.0",
69
- "@webstudio-is/sdk-components-react": "0.175.0",
69
+ "@webstudio-is/sdk-components-react": "0.179.0",
70
70
  "@webstudio-is/sdk-cli": "^0.94.0",
71
71
  "@webstudio-is/tsconfig": "1.0.7"
72
72
  },
73
73
  "scripts": {
74
74
  "build": "rm -rf lib && esbuild src/components.ts src/metas.ts src/props.ts src/hooks.ts --outdir=lib --bundle --format=esm --packages=external",
75
- "build:args": "NODE_OPTIONS=--conditions=webstudio generate-arg-types './src/*.tsx !./src/*.stories.tsx !./src/*.ws.ts' -e asChild -e modal -e defaultOpen -e defaultChecked && prettier --write \"**/*.props.ts\"",
75
+ "build:args": "NODE_OPTIONS=--conditions=webstudio generate-arg-types './src/*.tsx !./src/*.stories.tsx !./src/*.ws.ts !./src/*.test.{ts,tsx}' -e asChild -e modal -e defaultOpen -e defaultChecked && prettier --write \"**/*.props.ts\"",
76
76
  "build:tailwind": "tsx scripts/generate-tailwind-theme.ts && prettier --write src/theme/__generated__",
77
77
  "build:stories": "webstudio-sdk generate-stories && prettier --write \"src/__generated__/*.stories.tsx\"",
78
78
  "dts": "tsc --project tsconfig.dts.json",