@webstudio-is/sdk-components-react 0.175.0 → 0.181.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 +32 -6
- package/lib/props.js +5 -19
- package/package.json +8 -8
package/lib/components.js
CHANGED
|
@@ -377,7 +377,17 @@ Button.displayName = "Button";
|
|
|
377
377
|
// src/input.tsx
|
|
378
378
|
import { forwardRef as forwardRef18 } from "react";
|
|
379
379
|
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
380
|
-
var Input = forwardRef18(
|
|
380
|
+
var Input = forwardRef18(
|
|
381
|
+
({ children: _children, type = "text", value, defaultValue, ...props }, ref) => /* @__PURE__ */ jsx17(
|
|
382
|
+
"input",
|
|
383
|
+
{
|
|
384
|
+
...props,
|
|
385
|
+
defaultValue: value ?? defaultValue,
|
|
386
|
+
type,
|
|
387
|
+
ref
|
|
388
|
+
}
|
|
389
|
+
)
|
|
390
|
+
);
|
|
381
391
|
Input.displayName = "Input";
|
|
382
392
|
|
|
383
393
|
// src/form.tsx
|
|
@@ -516,20 +526,36 @@ Label.displayName = "Label";
|
|
|
516
526
|
// src/textarea.tsx
|
|
517
527
|
import { forwardRef as forwardRef27 } from "react";
|
|
518
528
|
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
519
|
-
var Textarea = forwardRef27(({ children: _children, ...props }, ref) => /* @__PURE__ */ jsx24("textarea", { ...props, ref }));
|
|
529
|
+
var Textarea = forwardRef27(({ children: _children, value, defaultValue, ...props }, ref) => /* @__PURE__ */ jsx24("textarea", { ...props, defaultValue: value ?? defaultValue, ref }));
|
|
520
530
|
Textarea.displayName = "Textarea";
|
|
521
531
|
|
|
522
532
|
// src/radio-button.tsx
|
|
523
533
|
import { forwardRef as forwardRef28 } from "react";
|
|
524
534
|
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
525
|
-
var RadioButton = forwardRef28(({ children: _children, ...props }, ref) => /* @__PURE__ */ jsx25(
|
|
535
|
+
var RadioButton = forwardRef28(({ children: _children, checked, defaultChecked, ...props }, ref) => /* @__PURE__ */ jsx25(
|
|
536
|
+
"input",
|
|
537
|
+
{
|
|
538
|
+
...props,
|
|
539
|
+
defaultChecked: checked ?? defaultChecked,
|
|
540
|
+
type: "radio",
|
|
541
|
+
ref
|
|
542
|
+
}
|
|
543
|
+
));
|
|
526
544
|
RadioButton.displayName = "RadioButton";
|
|
527
545
|
|
|
528
546
|
// src/checkbox.tsx
|
|
529
547
|
import { forwardRef as forwardRef29 } from "react";
|
|
530
548
|
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
531
|
-
var Checkbox = forwardRef29(({ children: _children, ...props }, ref) => {
|
|
532
|
-
return /* @__PURE__ */ jsx26(
|
|
549
|
+
var Checkbox = forwardRef29(({ children: _children, checked, defaultChecked, ...props }, ref) => {
|
|
550
|
+
return /* @__PURE__ */ jsx26(
|
|
551
|
+
"input",
|
|
552
|
+
{
|
|
553
|
+
...props,
|
|
554
|
+
defaultChecked: checked ?? defaultChecked,
|
|
555
|
+
type: "checkbox",
|
|
556
|
+
ref
|
|
557
|
+
}
|
|
558
|
+
);
|
|
533
559
|
});
|
|
534
560
|
Checkbox.displayName = "Checkbox";
|
|
535
561
|
|
|
@@ -1274,7 +1300,7 @@ import {
|
|
|
1274
1300
|
} from "@webstudio-is/react-sdk/runtime";
|
|
1275
1301
|
import { forwardRef as forwardRef36 } from "react";
|
|
1276
1302
|
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
1277
|
-
var Select = forwardRef36((props, ref) => /* @__PURE__ */ jsx33("select", { ...props, ref }));
|
|
1303
|
+
var Select = forwardRef36(({ value, defaultValue, ...props }, ref) => /* @__PURE__ */ jsx33("select", { ...props, defaultValue: value ?? defaultValue, ref }));
|
|
1278
1304
|
Select.displayName = "Select";
|
|
1279
1305
|
|
|
1280
1306
|
// src/option.tsx
|
package/lib/props.js
CHANGED
|
@@ -7387,6 +7387,7 @@ var propsMeta18 = {
|
|
|
7387
7387
|
"id",
|
|
7388
7388
|
"className",
|
|
7389
7389
|
"name",
|
|
7390
|
+
"value",
|
|
7390
7391
|
"type",
|
|
7391
7392
|
"placeholder",
|
|
7392
7393
|
"required",
|
|
@@ -12504,6 +12505,7 @@ var propsMeta27 = {
|
|
|
12504
12505
|
"id",
|
|
12505
12506
|
"className",
|
|
12506
12507
|
"name",
|
|
12508
|
+
"value",
|
|
12507
12509
|
"placeholder",
|
|
12508
12510
|
"required",
|
|
12509
12511
|
"autoFocus"
|
|
@@ -13234,15 +13236,7 @@ var meta8 = {
|
|
|
13234
13236
|
};
|
|
13235
13237
|
var propsMeta28 = {
|
|
13236
13238
|
props: props25,
|
|
13237
|
-
initialProps: [
|
|
13238
|
-
"id",
|
|
13239
|
-
"className",
|
|
13240
|
-
"name",
|
|
13241
|
-
"value",
|
|
13242
|
-
"required",
|
|
13243
|
-
"checked",
|
|
13244
|
-
"defaultChecked"
|
|
13245
|
-
]
|
|
13239
|
+
initialProps: ["id", "className", "name", "value", "required", "checked"]
|
|
13246
13240
|
};
|
|
13247
13241
|
|
|
13248
13242
|
// src/checkbox.ws.ts
|
|
@@ -13967,15 +13961,7 @@ var meta9 = {
|
|
|
13967
13961
|
};
|
|
13968
13962
|
var propsMeta29 = {
|
|
13969
13963
|
props: props26,
|
|
13970
|
-
initialProps: [
|
|
13971
|
-
"id",
|
|
13972
|
-
"className",
|
|
13973
|
-
"name",
|
|
13974
|
-
"value",
|
|
13975
|
-
"required",
|
|
13976
|
-
"checked",
|
|
13977
|
-
"defaultChecked"
|
|
13978
|
-
]
|
|
13964
|
+
initialProps: ["id", "className", "name", "value", "required", "checked"]
|
|
13979
13965
|
};
|
|
13980
13966
|
|
|
13981
13967
|
// src/vimeo.ws.ts
|
|
@@ -17346,8 +17332,8 @@ var propsMeta36 = {
|
|
|
17346
17332
|
"id",
|
|
17347
17333
|
"className",
|
|
17348
17334
|
"name",
|
|
17335
|
+
"value",
|
|
17349
17336
|
"multiple",
|
|
17350
|
-
"defaultValue",
|
|
17351
17337
|
"required",
|
|
17352
17338
|
"autoFocus"
|
|
17353
17339
|
]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webstudio-is/sdk-components-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.181.0",
|
|
4
4
|
"description": "Webstudio default library for react",
|
|
5
5
|
"author": "Webstudio <github@webstudio.is>",
|
|
6
6
|
"homepage": "https://webstudio.is",
|
|
@@ -42,10 +42,10 @@
|
|
|
42
42
|
"@react-aria/utils": "^3.21.0",
|
|
43
43
|
"colord": "^2.9.3",
|
|
44
44
|
"micromark": "^4.0.0",
|
|
45
|
-
"@webstudio-is/icons": "0.
|
|
46
|
-
"@webstudio-is/image": "0.
|
|
47
|
-
"@webstudio-is/react-sdk": "0.
|
|
48
|
-
"@webstudio-is/sdk": "0.
|
|
45
|
+
"@webstudio-is/icons": "0.181.0",
|
|
46
|
+
"@webstudio-is/image": "0.181.0",
|
|
47
|
+
"@webstudio-is/react-sdk": "0.181.0",
|
|
48
|
+
"@webstudio-is/sdk": "0.181.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@jest/globals": "^29.7.0",
|
|
@@ -56,13 +56,13 @@
|
|
|
56
56
|
"react": "18.3.0-canary-14898b6a9-20240318",
|
|
57
57
|
"react-dom": "18.3.0-canary-14898b6a9-20240318",
|
|
58
58
|
"typescript": "5.5.2",
|
|
59
|
+
"@webstudio-is/jest-config": "1.0.7",
|
|
59
60
|
"@webstudio-is/generate-arg-types": "0.0.0",
|
|
60
|
-
"@webstudio-is/tsconfig": "1.0.7"
|
|
61
|
-
"@webstudio-is/jest-config": "1.0.7"
|
|
61
|
+
"@webstudio-is/tsconfig": "1.0.7"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"build": "rm -rf lib && esbuild src/components.ts src/metas.ts src/props.ts --outdir=lib --bundle --format=esm --packages=external",
|
|
65
|
-
"build:args": "NODE_OPTIONS=--conditions=webstudio generate-arg-types './src/*.tsx !./src/*.stories.tsx !./src/*.ws.ts' && prettier --write \"**/*.props.ts\"",
|
|
65
|
+
"build:args": "NODE_OPTIONS=--conditions=webstudio generate-arg-types './src/*.tsx !./src/*.stories.tsx !./src/*.test.{ts,tsx} !./src/*.ws.ts' && prettier --write \"**/*.props.ts\"",
|
|
66
66
|
"dts": "tsc --project tsconfig.dts.json",
|
|
67
67
|
"test": "NODE_OPTIONS=--experimental-vm-modules jest",
|
|
68
68
|
"typecheck": "tsc"
|