@webstudio-is/sdk-components-react 0.163.0 → 0.168.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 +7 -7
- package/lib/metas.js +121 -12
- package/lib/props.js +29 -3
- package/package.json +7 -13
package/lib/components.js
CHANGED
|
@@ -263,7 +263,7 @@ var defaultTag2 = "div";
|
|
|
263
263
|
var Text = forwardRef6(
|
|
264
264
|
({ tag = defaultTag2, children, ...props }, ref) => {
|
|
265
265
|
const Tag = tag;
|
|
266
|
-
return /* @__PURE__ */ jsx5(Tag, { ...props, ref, children
|
|
266
|
+
return /* @__PURE__ */ jsx5(Tag, { ...props, ref, children });
|
|
267
267
|
}
|
|
268
268
|
);
|
|
269
269
|
Text.displayName = "Text";
|
|
@@ -275,7 +275,7 @@ var defaultTag3 = "h1";
|
|
|
275
275
|
var Heading = forwardRef7(
|
|
276
276
|
({ tag = defaultTag3, children, ...props }, ref) => {
|
|
277
277
|
const Tag = tag;
|
|
278
|
-
return /* @__PURE__ */ jsx6(Tag, { ...props, ref, children
|
|
278
|
+
return /* @__PURE__ */ jsx6(Tag, { ...props, ref, children });
|
|
279
279
|
}
|
|
280
280
|
);
|
|
281
281
|
Heading.displayName = "Heading";
|
|
@@ -283,7 +283,7 @@ Heading.displayName = "Heading";
|
|
|
283
283
|
// src/paragraph.tsx
|
|
284
284
|
import { forwardRef as forwardRef8 } from "react";
|
|
285
285
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
286
|
-
var Paragraph = forwardRef8(({ children, ...props }, ref) => /* @__PURE__ */ jsx7("p", { ...props, ref, children
|
|
286
|
+
var Paragraph = forwardRef8(({ children, ...props }, ref) => /* @__PURE__ */ jsx7("p", { ...props, ref, children }));
|
|
287
287
|
Paragraph.displayName = "Paragraph";
|
|
288
288
|
|
|
289
289
|
// src/link.tsx
|
|
@@ -291,7 +291,7 @@ import { forwardRef as forwardRef9 } from "react";
|
|
|
291
291
|
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
292
292
|
var Link = forwardRef9(
|
|
293
293
|
({ children, ...props }, ref) => {
|
|
294
|
-
return /* @__PURE__ */ jsx8("a", { ...props, href: props.href ?? "#", ref, children
|
|
294
|
+
return /* @__PURE__ */ jsx8("a", { ...props, href: props.href ?? "#", ref, children });
|
|
295
295
|
}
|
|
296
296
|
);
|
|
297
297
|
Link.displayName = "Link";
|
|
@@ -336,7 +336,7 @@ Subscript.displayName = "Subscript";
|
|
|
336
336
|
import { forwardRef as forwardRef16 } from "react";
|
|
337
337
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
338
338
|
var Button = forwardRef16(
|
|
339
|
-
({ type = "submit", children, ...props }, ref) => /* @__PURE__ */ jsx15("button", { type, ...props, ref, children
|
|
339
|
+
({ type = "submit", children, ...props }, ref) => /* @__PURE__ */ jsx15("button", { type, ...props, ref, children })
|
|
340
340
|
);
|
|
341
341
|
Button.displayName = "Button";
|
|
342
342
|
|
|
@@ -423,7 +423,7 @@ import { forwardRef as forwardRef20 } from "react";
|
|
|
423
423
|
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
424
424
|
var Blockquote = forwardRef20(
|
|
425
425
|
({ children, ...props }, ref) => {
|
|
426
|
-
return /* @__PURE__ */ jsx19("blockquote", { ...props, ref, children
|
|
426
|
+
return /* @__PURE__ */ jsx19("blockquote", { ...props, ref, children });
|
|
427
427
|
}
|
|
428
428
|
);
|
|
429
429
|
Blockquote.displayName = "Blockquote";
|
|
@@ -446,7 +446,7 @@ import { forwardRef as forwardRef22 } from "react";
|
|
|
446
446
|
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
447
447
|
var ListItem = forwardRef22(
|
|
448
448
|
({ children, ...props }, ref) => {
|
|
449
|
-
return /* @__PURE__ */ jsx20("li", { ...props, ref, children
|
|
449
|
+
return /* @__PURE__ */ jsx20("li", { ...props, ref, children });
|
|
450
450
|
}
|
|
451
451
|
);
|
|
452
452
|
ListItem.displayName = "ListItem";
|
package/lib/metas.js
CHANGED
|
@@ -260,7 +260,20 @@ var meta7 = {
|
|
|
260
260
|
icon: TextIcon,
|
|
261
261
|
states: defaultStates3,
|
|
262
262
|
presetStyle: presetStyle3,
|
|
263
|
-
order: 0
|
|
263
|
+
order: 0,
|
|
264
|
+
template: [
|
|
265
|
+
{
|
|
266
|
+
type: "instance",
|
|
267
|
+
component: "Text",
|
|
268
|
+
children: [
|
|
269
|
+
{
|
|
270
|
+
type: "text",
|
|
271
|
+
value: "The text you can edit",
|
|
272
|
+
placeholder: true
|
|
273
|
+
}
|
|
274
|
+
]
|
|
275
|
+
}
|
|
276
|
+
]
|
|
264
277
|
};
|
|
265
278
|
|
|
266
279
|
// src/heading.ws.ts
|
|
@@ -286,7 +299,20 @@ var meta8 = {
|
|
|
286
299
|
invalidAncestors: ["Heading"],
|
|
287
300
|
states: defaultStates4,
|
|
288
301
|
presetStyle: presetStyle4,
|
|
289
|
-
order: 1
|
|
302
|
+
order: 1,
|
|
303
|
+
template: [
|
|
304
|
+
{
|
|
305
|
+
type: "instance",
|
|
306
|
+
component: "Heading",
|
|
307
|
+
children: [
|
|
308
|
+
{
|
|
309
|
+
type: "text",
|
|
310
|
+
value: "Heading text you can edit",
|
|
311
|
+
placeholder: true
|
|
312
|
+
}
|
|
313
|
+
]
|
|
314
|
+
}
|
|
315
|
+
]
|
|
290
316
|
};
|
|
291
317
|
|
|
292
318
|
// src/paragraph.ws.ts
|
|
@@ -307,7 +333,20 @@ var meta9 = {
|
|
|
307
333
|
invalidAncestors: ["Paragraph"],
|
|
308
334
|
states: defaultStates5,
|
|
309
335
|
presetStyle: presetStyle5,
|
|
310
|
-
order: 2
|
|
336
|
+
order: 2,
|
|
337
|
+
template: [
|
|
338
|
+
{
|
|
339
|
+
type: "instance",
|
|
340
|
+
component: "Paragraph",
|
|
341
|
+
children: [
|
|
342
|
+
{
|
|
343
|
+
type: "text",
|
|
344
|
+
value: "Paragraph text you can edit",
|
|
345
|
+
placeholder: true
|
|
346
|
+
}
|
|
347
|
+
]
|
|
348
|
+
}
|
|
349
|
+
]
|
|
311
350
|
};
|
|
312
351
|
|
|
313
352
|
// src/link.ws.ts
|
|
@@ -907,6 +946,19 @@ var meta10 = {
|
|
|
907
946
|
selector: "[aria-current=page]",
|
|
908
947
|
label: "Current page"
|
|
909
948
|
}
|
|
949
|
+
],
|
|
950
|
+
template: [
|
|
951
|
+
{
|
|
952
|
+
type: "instance",
|
|
953
|
+
component: "Link",
|
|
954
|
+
children: [
|
|
955
|
+
{
|
|
956
|
+
type: "text",
|
|
957
|
+
value: "Link text you can edit",
|
|
958
|
+
placeholder: true
|
|
959
|
+
}
|
|
960
|
+
]
|
|
961
|
+
}
|
|
910
962
|
]
|
|
911
963
|
};
|
|
912
964
|
var propsMeta2 = {
|
|
@@ -1042,7 +1094,20 @@ var meta17 = {
|
|
|
1042
1094
|
{ selector: ":disabled", label: "Disabled" },
|
|
1043
1095
|
{ selector: ":enabled", label: "Enabled" }
|
|
1044
1096
|
],
|
|
1045
|
-
order: 2
|
|
1097
|
+
order: 2,
|
|
1098
|
+
template: [
|
|
1099
|
+
{
|
|
1100
|
+
type: "instance",
|
|
1101
|
+
component: "Button",
|
|
1102
|
+
children: [
|
|
1103
|
+
{
|
|
1104
|
+
type: "text",
|
|
1105
|
+
value: "Button text you can edit",
|
|
1106
|
+
placeholder: true
|
|
1107
|
+
}
|
|
1108
|
+
]
|
|
1109
|
+
}
|
|
1110
|
+
]
|
|
1046
1111
|
};
|
|
1047
1112
|
|
|
1048
1113
|
// src/input.ws.ts
|
|
@@ -1807,7 +1872,20 @@ var meta21 = {
|
|
|
1807
1872
|
icon: BlockquoteIcon,
|
|
1808
1873
|
states: defaultStates16,
|
|
1809
1874
|
presetStyle: presetStyle16,
|
|
1810
|
-
order: 3
|
|
1875
|
+
order: 3,
|
|
1876
|
+
template: [
|
|
1877
|
+
{
|
|
1878
|
+
type: "instance",
|
|
1879
|
+
component: "Blockquote",
|
|
1880
|
+
children: [
|
|
1881
|
+
{
|
|
1882
|
+
type: "text",
|
|
1883
|
+
value: "Blockquote text you can edit",
|
|
1884
|
+
placeholder: true
|
|
1885
|
+
}
|
|
1886
|
+
]
|
|
1887
|
+
}
|
|
1888
|
+
]
|
|
1811
1889
|
};
|
|
1812
1890
|
|
|
1813
1891
|
// src/list.ws.ts
|
|
@@ -1865,17 +1943,35 @@ var meta22 = {
|
|
|
1865
1943
|
{
|
|
1866
1944
|
type: "instance",
|
|
1867
1945
|
component: "ListItem",
|
|
1868
|
-
children: [
|
|
1946
|
+
children: [
|
|
1947
|
+
{
|
|
1948
|
+
type: "text",
|
|
1949
|
+
value: "List Item text you can edit",
|
|
1950
|
+
placeholder: true
|
|
1951
|
+
}
|
|
1952
|
+
]
|
|
1869
1953
|
},
|
|
1870
1954
|
{
|
|
1871
1955
|
type: "instance",
|
|
1872
1956
|
component: "ListItem",
|
|
1873
|
-
children: [
|
|
1957
|
+
children: [
|
|
1958
|
+
{
|
|
1959
|
+
type: "text",
|
|
1960
|
+
value: "List Item text you can edit",
|
|
1961
|
+
placeholder: true
|
|
1962
|
+
}
|
|
1963
|
+
]
|
|
1874
1964
|
},
|
|
1875
1965
|
{
|
|
1876
1966
|
type: "instance",
|
|
1877
1967
|
component: "ListItem",
|
|
1878
|
-
children: [
|
|
1968
|
+
children: [
|
|
1969
|
+
{
|
|
1970
|
+
type: "text",
|
|
1971
|
+
value: "List Item text you can edit",
|
|
1972
|
+
placeholder: true
|
|
1973
|
+
}
|
|
1974
|
+
]
|
|
1879
1975
|
}
|
|
1880
1976
|
]
|
|
1881
1977
|
}
|
|
@@ -1900,7 +1996,20 @@ var meta23 = {
|
|
|
1900
1996
|
icon: ListItemIcon,
|
|
1901
1997
|
states: defaultStates18,
|
|
1902
1998
|
presetStyle: presetStyle18,
|
|
1903
|
-
order: 4
|
|
1999
|
+
order: 4,
|
|
2000
|
+
template: [
|
|
2001
|
+
{
|
|
2002
|
+
type: "instance",
|
|
2003
|
+
component: "ListItem",
|
|
2004
|
+
children: [
|
|
2005
|
+
{
|
|
2006
|
+
type: "text",
|
|
2007
|
+
value: "List Item text you can edit",
|
|
2008
|
+
placeholder: true
|
|
2009
|
+
}
|
|
2010
|
+
]
|
|
2011
|
+
}
|
|
2012
|
+
]
|
|
1904
2013
|
};
|
|
1905
2014
|
|
|
1906
2015
|
// src/separator.ws.ts
|
|
@@ -3049,7 +3158,7 @@ var meta26 = {
|
|
|
3049
3158
|
{
|
|
3050
3159
|
type: "instance",
|
|
3051
3160
|
component: "Label",
|
|
3052
|
-
children: [{ type: "text", value: "Form Label" }]
|
|
3161
|
+
children: [{ type: "text", value: "Form Label", placeholder: true }]
|
|
3053
3162
|
}
|
|
3054
3163
|
]
|
|
3055
3164
|
};
|
|
@@ -3152,7 +3261,7 @@ var meta28 = {
|
|
|
3152
3261
|
component: "Text",
|
|
3153
3262
|
label: "Radio Label",
|
|
3154
3263
|
props: [{ type: "string", name: "tag", value: "span" }],
|
|
3155
|
-
children: [{ type: "text", value: "Radio" }]
|
|
3264
|
+
children: [{ type: "text", value: "Radio", placeholder: true }]
|
|
3156
3265
|
}
|
|
3157
3266
|
]
|
|
3158
3267
|
}
|
|
@@ -3205,7 +3314,7 @@ var meta29 = {
|
|
|
3205
3314
|
component: "Text",
|
|
3206
3315
|
label: "Checkbox Label",
|
|
3207
3316
|
props: [{ type: "string", name: "tag", value: "span" }],
|
|
3208
|
-
children: [{ type: "text", value: "Checkbox" }]
|
|
3317
|
+
children: [{ type: "text", value: "Checkbox", placeholder: true }]
|
|
3209
3318
|
}
|
|
3210
3319
|
]
|
|
3211
3320
|
}
|
package/lib/props.js
CHANGED
|
@@ -3285,6 +3285,19 @@ var meta = {
|
|
|
3285
3285
|
selector: "[aria-current=page]",
|
|
3286
3286
|
label: "Current page"
|
|
3287
3287
|
}
|
|
3288
|
+
],
|
|
3289
|
+
template: [
|
|
3290
|
+
{
|
|
3291
|
+
type: "instance",
|
|
3292
|
+
component: "Link",
|
|
3293
|
+
children: [
|
|
3294
|
+
{
|
|
3295
|
+
type: "text",
|
|
3296
|
+
value: "Link text you can edit",
|
|
3297
|
+
placeholder: true
|
|
3298
|
+
}
|
|
3299
|
+
]
|
|
3300
|
+
}
|
|
3288
3301
|
]
|
|
3289
3302
|
};
|
|
3290
3303
|
var propsMeta9 = {
|
|
@@ -6474,7 +6487,20 @@ var meta3 = {
|
|
|
6474
6487
|
{ selector: ":disabled", label: "Disabled" },
|
|
6475
6488
|
{ selector: ":enabled", label: "Enabled" }
|
|
6476
6489
|
],
|
|
6477
|
-
order: 2
|
|
6490
|
+
order: 2,
|
|
6491
|
+
template: [
|
|
6492
|
+
{
|
|
6493
|
+
type: "instance",
|
|
6494
|
+
component: "Button",
|
|
6495
|
+
children: [
|
|
6496
|
+
{
|
|
6497
|
+
type: "text",
|
|
6498
|
+
value: "Button text you can edit",
|
|
6499
|
+
placeholder: true
|
|
6500
|
+
}
|
|
6501
|
+
]
|
|
6502
|
+
}
|
|
6503
|
+
]
|
|
6478
6504
|
};
|
|
6479
6505
|
var propsMeta16 = {
|
|
6480
6506
|
props: props13,
|
|
@@ -13008,7 +13034,7 @@ var meta7 = {
|
|
|
13008
13034
|
component: "Text",
|
|
13009
13035
|
label: "Radio Label",
|
|
13010
13036
|
props: [{ type: "string", name: "tag", value: "span" }],
|
|
13011
|
-
children: [{ type: "text", value: "Radio" }]
|
|
13037
|
+
children: [{ type: "text", value: "Radio", placeholder: true }]
|
|
13012
13038
|
}
|
|
13013
13039
|
]
|
|
13014
13040
|
}
|
|
@@ -13741,7 +13767,7 @@ var meta8 = {
|
|
|
13741
13767
|
component: "Text",
|
|
13742
13768
|
label: "Checkbox Label",
|
|
13743
13769
|
props: [{ type: "string", name: "tag", value: "span" }],
|
|
13744
|
-
children: [{ type: "text", value: "Checkbox" }]
|
|
13770
|
+
children: [{ type: "text", value: "Checkbox", placeholder: true }]
|
|
13745
13771
|
}
|
|
13746
13772
|
]
|
|
13747
13773
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webstudio-is/sdk-components-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.168.0",
|
|
4
4
|
"description": "Webstudio default library for react",
|
|
5
5
|
"author": "Webstudio <github@webstudio.is>",
|
|
6
6
|
"homepage": "https://webstudio.is",
|
|
@@ -36,15 +36,12 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@react-aria/utils": "^3.21.0",
|
|
38
38
|
"colord": "^2.9.3",
|
|
39
|
-
"@webstudio-is/icons": "0.
|
|
40
|
-
"@webstudio-is/image": "0.
|
|
41
|
-
"@webstudio-is/react-sdk": "0.
|
|
39
|
+
"@webstudio-is/icons": "0.168.0",
|
|
40
|
+
"@webstudio-is/image": "0.168.0",
|
|
41
|
+
"@webstudio-is/react-sdk": "0.168.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@jest/globals": "^29.7.0",
|
|
45
|
-
"@storybook/addon-essentials": "^8.1.2",
|
|
46
|
-
"@storybook/addon-links": "^8.1.2",
|
|
47
|
-
"@storybook/react": "^8.1.2",
|
|
48
45
|
"@testing-library/jest-dom": "^6.4.2",
|
|
49
46
|
"@testing-library/react": "^14.2.2",
|
|
50
47
|
"@types/react": "^18.2.70",
|
|
@@ -54,9 +51,8 @@
|
|
|
54
51
|
"react-dom": "18.3.0-canary-14898b6a9-20240318",
|
|
55
52
|
"typescript": "5.4.5",
|
|
56
53
|
"@webstudio-is/generate-arg-types": "0.0.0",
|
|
57
|
-
"@webstudio-is/
|
|
58
|
-
"@webstudio-is/
|
|
59
|
-
"@webstudio-is/tsconfig": "1.0.7"
|
|
54
|
+
"@webstudio-is/tsconfig": "1.0.7",
|
|
55
|
+
"@webstudio-is/jest-config": "1.0.7"
|
|
60
56
|
},
|
|
61
57
|
"scripts": {
|
|
62
58
|
"dev": "rm -rf lib && esbuild 'src/**/*.ts' 'src/**/*.tsx' --outdir=lib --watch",
|
|
@@ -65,8 +61,6 @@
|
|
|
65
61
|
"dts": "tsc --project tsconfig.dts.json",
|
|
66
62
|
"test": "NODE_OPTIONS=--experimental-vm-modules jest",
|
|
67
63
|
"typecheck": "tsc",
|
|
68
|
-
"checks": "pnpm typecheck"
|
|
69
|
-
"storybook:dev": "storybook dev -p 6006 --static-dir=./public",
|
|
70
|
-
"storybook:build": "storybook build"
|
|
64
|
+
"checks": "pnpm typecheck"
|
|
71
65
|
}
|
|
72
66
|
}
|