@webstudio-is/react-sdk 0.5.0 → 0.5.1
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/arg-types/utils.d.ts +19 -1
- package/lib/arg-types/utils.d.ts.map +1 -1
- package/lib/arg-types/utils.js +7 -6
- package/lib/components/body.d.ts +3 -0
- package/lib/components/body.d.ts.map +1 -0
- package/lib/components/body.js +8 -0
- package/lib/components/body.props.json +2234 -0
- package/lib/components/body.stories.d.ts +7 -0
- package/lib/components/body.stories.d.ts.map +1 -0
- package/lib/components/body.stories.js +16 -0
- package/lib/components/body.ws.d.ts +5 -0
- package/lib/components/body.ws.d.ts.map +1 -0
- package/lib/components/body.ws.js +64 -0
- package/lib/components/bold.props.json +37 -7
- package/lib/components/bold.ws.d.ts +5 -0
- package/lib/components/bold.ws.d.ts.map +1 -0
- package/lib/components/bold.ws.js +14 -0
- package/lib/components/box.d.ts +7 -2
- package/lib/components/box.d.ts.map +1 -1
- package/lib/components/box.js +3 -2
- package/lib/components/box.props.json +102 -7
- package/lib/components/box.stories.d.ts +6 -2
- package/lib/components/box.stories.d.ts.map +1 -1
- package/lib/components/box.ws.d.ts +5 -0
- package/lib/components/box.ws.d.ts.map +1 -0
- package/lib/components/box.ws.js +21 -0
- package/lib/components/button.d.ts +1 -4
- package/lib/components/button.d.ts.map +1 -1
- package/lib/components/button.props.json +42 -8
- package/lib/components/button.ws.d.ts +5 -0
- package/lib/components/button.ws.d.ts.map +1 -0
- package/lib/components/button.ws.js +15 -0
- package/lib/components/component-type.d.ts +17 -0
- package/lib/components/component-type.d.ts.map +1 -0
- package/lib/components/component-type.js +28 -0
- package/lib/components/form.props.json +37 -7
- package/lib/components/form.ws.d.ts +5 -0
- package/lib/components/form.ws.d.ts.map +1 -0
- package/lib/components/form.ws.js +26 -0
- package/lib/components/heading.d.ts +2 -2
- package/lib/components/heading.d.ts.map +1 -1
- package/lib/components/heading.js +1 -4
- package/lib/components/heading.props.json +45 -8
- package/lib/components/heading.stories.d.ts +2 -2
- package/lib/components/heading.ws.d.ts +5 -0
- package/lib/components/heading.ws.d.ts.map +1 -0
- package/lib/components/heading.ws.js +15 -0
- package/lib/components/index.d.ts +11 -10
- package/lib/components/index.d.ts.map +1 -1
- package/lib/components/index.js +25 -23
- package/lib/components/index.test.d.ts +2 -0
- package/lib/components/index.test.d.ts.map +1 -0
- package/lib/components/index.test.js +33 -0
- package/lib/components/input.props.json +46 -8
- package/lib/components/input.ws.d.ts +5 -0
- package/lib/components/input.ws.d.ts.map +1 -0
- package/lib/components/input.ws.js +14 -0
- package/lib/components/italic.props.json +37 -7
- package/lib/components/italic.ws.d.ts +5 -0
- package/lib/components/italic.ws.d.ts.map +1 -0
- package/lib/components/italic.ws.js +14 -0
- package/lib/components/link.d.ts +2 -2
- package/lib/components/link.d.ts.map +1 -1
- package/lib/components/link.props.json +37 -7
- package/lib/components/link.stories.d.ts +6 -2
- package/lib/components/link.stories.d.ts.map +1 -1
- package/lib/components/link.ws.d.ts +5 -0
- package/lib/components/link.ws.d.ts.map +1 -0
- package/lib/components/link.ws.js +27 -0
- package/lib/components/meta.d.ts +1 -0
- package/lib/components/meta.d.ts.map +1 -1
- package/lib/components/meta.js +3 -1
- package/lib/components/paragraph.props.json +37 -7
- package/lib/components/paragraph.ws.d.ts +5 -0
- package/lib/components/paragraph.ws.d.ts.map +1 -0
- package/lib/components/paragraph.ws.js +15 -0
- package/lib/components/text-block.props.json +37 -7
- package/lib/components/text-block.ws.d.ts +5 -0
- package/lib/components/text-block.ws.d.ts.map +1 -0
- package/lib/components/text-block.ws.js +23 -0
- package/lib/css/get-browser-style.js +1 -1
- package/lib/css/keyword-values.d.ts.map +1 -1
- package/lib/css/keyword-values.js +1149 -396
- package/lib/css/properties.d.ts.map +1 -1
- package/lib/css/properties.js +3194 -3194
- package/lib/css/units.js +1 -1
- package/lib/db/instance.d.ts +5 -2
- package/lib/db/instance.d.ts.map +1 -1
- package/lib/db/instance.js +9 -1
- package/lib/db/types.d.ts +1 -2
- package/lib/db/types.d.ts.map +1 -1
- package/lib/pubsub/publish.js +1 -1
- package/lib/pubsub/subscribe.d.ts.map +1 -1
- package/lib/pubsub/subscribe.js +1 -2
- package/lib/stitches/css.d.ts.map +1 -1
- package/lib/stitches/css.js +1 -0
- package/lib/stitches/to-css.js +2 -3
- package/lib/tree/create-elements-tree.d.ts.map +1 -1
- package/lib/tree/create-elements-tree.js +43 -12
- package/lib/tree/root.js +3 -3
- package/lib/tree/wrapper-component.js +2 -2
- package/lib/user-props/all-user-props.d.ts.map +1 -1
- package/lib/user-props/all-user-props.js +5 -4
- package/lib/user-props/use-user-props.js +1 -1
- package/package.json +7 -9
- package/lib/prisma.server.d.ts +0 -3
- package/lib/prisma.server.d.ts.map +0 -1
- package/lib/prisma.server.js +0 -8
- package/prisma/schema.prisma +0 -71
|
@@ -623,7 +623,10 @@
|
|
|
623
623
|
"control": {
|
|
624
624
|
"type": "radio"
|
|
625
625
|
},
|
|
626
|
-
"options": [
|
|
626
|
+
"options": [
|
|
627
|
+
"yes",
|
|
628
|
+
"no"
|
|
629
|
+
]
|
|
627
630
|
},
|
|
628
631
|
"radioGroup": {
|
|
629
632
|
"defaultValue": null,
|
|
@@ -1116,7 +1119,10 @@
|
|
|
1116
1119
|
"control": {
|
|
1117
1120
|
"type": "radio"
|
|
1118
1121
|
},
|
|
1119
|
-
"options": [
|
|
1122
|
+
"options": [
|
|
1123
|
+
"on",
|
|
1124
|
+
"off"
|
|
1125
|
+
]
|
|
1120
1126
|
},
|
|
1121
1127
|
"inputMode": {
|
|
1122
1128
|
"defaultValue": null,
|
|
@@ -1279,7 +1285,12 @@
|
|
|
1279
1285
|
"control": {
|
|
1280
1286
|
"type": "radio"
|
|
1281
1287
|
},
|
|
1282
|
-
"options": [
|
|
1288
|
+
"options": [
|
|
1289
|
+
"list",
|
|
1290
|
+
"none",
|
|
1291
|
+
"inline",
|
|
1292
|
+
"both"
|
|
1293
|
+
]
|
|
1283
1294
|
},
|
|
1284
1295
|
"aria-busy": {
|
|
1285
1296
|
"defaultValue": null,
|
|
@@ -1543,7 +1554,14 @@
|
|
|
1543
1554
|
"control": {
|
|
1544
1555
|
"type": "select"
|
|
1545
1556
|
},
|
|
1546
|
-
"options": [
|
|
1557
|
+
"options": [
|
|
1558
|
+
"link",
|
|
1559
|
+
"none",
|
|
1560
|
+
"copy",
|
|
1561
|
+
"execute",
|
|
1562
|
+
"move",
|
|
1563
|
+
"popup"
|
|
1564
|
+
]
|
|
1547
1565
|
},
|
|
1548
1566
|
"aria-errormessage": {
|
|
1549
1567
|
"defaultValue": null,
|
|
@@ -1820,7 +1838,11 @@
|
|
|
1820
1838
|
"control": {
|
|
1821
1839
|
"type": "radio"
|
|
1822
1840
|
},
|
|
1823
|
-
"options": [
|
|
1841
|
+
"options": [
|
|
1842
|
+
"off",
|
|
1843
|
+
"assertive",
|
|
1844
|
+
"polite"
|
|
1845
|
+
]
|
|
1824
1846
|
},
|
|
1825
1847
|
"aria-modal": {
|
|
1826
1848
|
"defaultValue": null,
|
|
@@ -1918,7 +1940,10 @@
|
|
|
1918
1940
|
"control": {
|
|
1919
1941
|
"type": "radio"
|
|
1920
1942
|
},
|
|
1921
|
-
"options": [
|
|
1943
|
+
"options": [
|
|
1944
|
+
"horizontal",
|
|
1945
|
+
"vertical"
|
|
1946
|
+
]
|
|
1922
1947
|
},
|
|
1923
1948
|
"aria-owns": {
|
|
1924
1949
|
"defaultValue": null,
|
|
@@ -2287,7 +2312,12 @@
|
|
|
2287
2312
|
"control": {
|
|
2288
2313
|
"type": "radio"
|
|
2289
2314
|
},
|
|
2290
|
-
"options": [
|
|
2315
|
+
"options": [
|
|
2316
|
+
"none",
|
|
2317
|
+
"ascending",
|
|
2318
|
+
"descending",
|
|
2319
|
+
"other"
|
|
2320
|
+
]
|
|
2291
2321
|
},
|
|
2292
2322
|
"aria-valuemax": {
|
|
2293
2323
|
"defaultValue": null,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form.ws.d.ts","sourceRoot":"","sources":["../../src/components/form.ws.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAc9B,QAAA,MAAM,IAAI,EAAE,eAAe,CAAC,OAAO,IAAI,CAStC,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const icons_1 = require("@webstudio-is/icons");
|
|
4
|
+
const form_1 = require("./form");
|
|
5
|
+
const defaultStyle = {
|
|
6
|
+
minHeight: {
|
|
7
|
+
type: "unit",
|
|
8
|
+
unit: "px",
|
|
9
|
+
value: 20,
|
|
10
|
+
},
|
|
11
|
+
boxSizing: {
|
|
12
|
+
type: "keyword",
|
|
13
|
+
value: "border-box",
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
const meta = {
|
|
17
|
+
Icon: icons_1.FormIcon,
|
|
18
|
+
Component: form_1.Form,
|
|
19
|
+
defaultStyle,
|
|
20
|
+
canAcceptChildren: true,
|
|
21
|
+
isContentEditable: false,
|
|
22
|
+
isInlineOnly: false,
|
|
23
|
+
isListed: true,
|
|
24
|
+
label: "Form",
|
|
25
|
+
};
|
|
26
|
+
exports.default = meta;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type ComponentProps } from "react";
|
|
2
2
|
declare const defaultTag = "h1";
|
|
3
3
|
declare type Props = ComponentProps<typeof defaultTag> & {
|
|
4
4
|
tag?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
5
5
|
};
|
|
6
|
-
export declare const Heading:
|
|
6
|
+
export declare const Heading: import("react").ForwardRefExoticComponent<Pick<Props, "key" | "tag" | keyof import("react").HTMLAttributes<HTMLHeadingElement>> & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
7
7
|
export {};
|
|
8
8
|
//# sourceMappingURL=heading.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"heading.d.ts","sourceRoot":"","sources":["../../src/components/heading.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"heading.d.ts","sourceRoot":"","sources":["../../src/components/heading.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,OAAO,CAAC;AAEf,QAAA,MAAM,UAAU,OAAO,CAAC;AAExB,aAAK,KAAK,GAAG,cAAc,CAAC,OAAO,UAAU,CAAC,GAAG;IAC/C,GAAG,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CAC/C,CAAC;AAEF,eAAO,MAAM,OAAO,sLAInB,CAAC"}
|
|
@@ -3,10 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Heading = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
const defaultTag = "h1";
|
|
6
|
-
exports.Heading = (0, react_1.forwardRef)(({ tag, ...props }, ref) => {
|
|
6
|
+
exports.Heading = (0, react_1.forwardRef)(({ tag = defaultTag, ...props }, ref) => {
|
|
7
7
|
return (0, react_1.createElement)(tag, { ...props, ref });
|
|
8
8
|
});
|
|
9
|
-
exports.Heading.defaultProps = {
|
|
10
|
-
tag: "h1",
|
|
11
|
-
};
|
|
12
9
|
exports.Heading.displayName = "Heading";
|
|
@@ -447,7 +447,10 @@
|
|
|
447
447
|
"control": {
|
|
448
448
|
"type": "radio"
|
|
449
449
|
},
|
|
450
|
-
"options": [
|
|
450
|
+
"options": [
|
|
451
|
+
"yes",
|
|
452
|
+
"no"
|
|
453
|
+
]
|
|
451
454
|
},
|
|
452
455
|
"radioGroup": {
|
|
453
456
|
"defaultValue": null,
|
|
@@ -940,7 +943,10 @@
|
|
|
940
943
|
"control": {
|
|
941
944
|
"type": "radio"
|
|
942
945
|
},
|
|
943
|
-
"options": [
|
|
946
|
+
"options": [
|
|
947
|
+
"on",
|
|
948
|
+
"off"
|
|
949
|
+
]
|
|
944
950
|
},
|
|
945
951
|
"inputMode": {
|
|
946
952
|
"defaultValue": null,
|
|
@@ -1103,7 +1109,12 @@
|
|
|
1103
1109
|
"control": {
|
|
1104
1110
|
"type": "radio"
|
|
1105
1111
|
},
|
|
1106
|
-
"options": [
|
|
1112
|
+
"options": [
|
|
1113
|
+
"list",
|
|
1114
|
+
"none",
|
|
1115
|
+
"inline",
|
|
1116
|
+
"both"
|
|
1117
|
+
]
|
|
1107
1118
|
},
|
|
1108
1119
|
"aria-busy": {
|
|
1109
1120
|
"defaultValue": null,
|
|
@@ -1367,7 +1378,14 @@
|
|
|
1367
1378
|
"control": {
|
|
1368
1379
|
"type": "select"
|
|
1369
1380
|
},
|
|
1370
|
-
"options": [
|
|
1381
|
+
"options": [
|
|
1382
|
+
"link",
|
|
1383
|
+
"none",
|
|
1384
|
+
"copy",
|
|
1385
|
+
"execute",
|
|
1386
|
+
"move",
|
|
1387
|
+
"popup"
|
|
1388
|
+
]
|
|
1371
1389
|
},
|
|
1372
1390
|
"aria-errormessage": {
|
|
1373
1391
|
"defaultValue": null,
|
|
@@ -1644,7 +1662,11 @@
|
|
|
1644
1662
|
"control": {
|
|
1645
1663
|
"type": "radio"
|
|
1646
1664
|
},
|
|
1647
|
-
"options": [
|
|
1665
|
+
"options": [
|
|
1666
|
+
"off",
|
|
1667
|
+
"assertive",
|
|
1668
|
+
"polite"
|
|
1669
|
+
]
|
|
1648
1670
|
},
|
|
1649
1671
|
"aria-modal": {
|
|
1650
1672
|
"defaultValue": null,
|
|
@@ -1742,7 +1764,10 @@
|
|
|
1742
1764
|
"control": {
|
|
1743
1765
|
"type": "radio"
|
|
1744
1766
|
},
|
|
1745
|
-
"options": [
|
|
1767
|
+
"options": [
|
|
1768
|
+
"horizontal",
|
|
1769
|
+
"vertical"
|
|
1770
|
+
]
|
|
1746
1771
|
},
|
|
1747
1772
|
"aria-owns": {
|
|
1748
1773
|
"defaultValue": null,
|
|
@@ -2111,7 +2136,12 @@
|
|
|
2111
2136
|
"control": {
|
|
2112
2137
|
"type": "radio"
|
|
2113
2138
|
},
|
|
2114
|
-
"options": [
|
|
2139
|
+
"options": [
|
|
2140
|
+
"none",
|
|
2141
|
+
"ascending",
|
|
2142
|
+
"descending",
|
|
2143
|
+
"other"
|
|
2144
|
+
]
|
|
2115
2145
|
},
|
|
2116
2146
|
"aria-valuemax": {
|
|
2117
2147
|
"defaultValue": null,
|
|
@@ -2241,6 +2271,13 @@
|
|
|
2241
2271
|
"control": {
|
|
2242
2272
|
"type": "select"
|
|
2243
2273
|
},
|
|
2244
|
-
"options": [
|
|
2274
|
+
"options": [
|
|
2275
|
+
"h1",
|
|
2276
|
+
"h2",
|
|
2277
|
+
"h3",
|
|
2278
|
+
"h4",
|
|
2279
|
+
"h5",
|
|
2280
|
+
"h6"
|
|
2281
|
+
]
|
|
2245
2282
|
}
|
|
2246
2283
|
}
|
|
@@ -2,9 +2,9 @@ import React from "react";
|
|
|
2
2
|
import type { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
3
3
|
declare const _default: ComponentMeta<React.ForwardRefExoticComponent<Pick<React.ClassAttributes<HTMLHeadingElement> & React.HTMLAttributes<HTMLHeadingElement> & {
|
|
4
4
|
tag?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | undefined;
|
|
5
|
-
}, "key" | keyof React.HTMLAttributes<HTMLHeadingElement
|
|
5
|
+
}, "key" | "tag" | keyof React.HTMLAttributes<HTMLHeadingElement>> & React.RefAttributes<HTMLHeadingElement>>>;
|
|
6
6
|
export default _default;
|
|
7
7
|
export declare const Heading: ComponentStory<React.ForwardRefExoticComponent<Pick<React.ClassAttributes<HTMLHeadingElement> & React.HTMLAttributes<HTMLHeadingElement> & {
|
|
8
8
|
tag?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | undefined;
|
|
9
|
-
}, "key" | keyof React.HTMLAttributes<HTMLHeadingElement
|
|
9
|
+
}, "key" | "tag" | keyof React.HTMLAttributes<HTMLHeadingElement>> & React.RefAttributes<HTMLHeadingElement>>>;
|
|
10
10
|
//# sourceMappingURL=heading.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"heading.ws.d.ts","sourceRoot":"","sources":["../../src/components/heading.ws.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,QAAA,MAAM,IAAI,EAAE,eAAe,CAAC,OAAO,OAAO,CASzC,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const icons_1 = require("@webstudio-is/icons");
|
|
4
|
+
const heading_1 = require("./heading");
|
|
5
|
+
const meta = {
|
|
6
|
+
Icon: icons_1.HeadingIcon,
|
|
7
|
+
Component: heading_1.Heading,
|
|
8
|
+
canAcceptChildren: false,
|
|
9
|
+
isContentEditable: true,
|
|
10
|
+
isInlineOnly: false,
|
|
11
|
+
isListed: true,
|
|
12
|
+
label: "Heading",
|
|
13
|
+
children: ["Heading you can edit"],
|
|
14
|
+
};
|
|
15
|
+
exports.default = meta;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
1
|
+
export { default as Body } from "./body.ws";
|
|
2
|
+
export { default as Box } from "./box.ws";
|
|
3
|
+
export { default as TextBlock } from "./text-block.ws";
|
|
4
|
+
export { default as Heading } from "./heading.ws";
|
|
5
|
+
export { default as Paragraph } from "./paragraph.ws";
|
|
6
|
+
export { default as Link } from "./link.ws";
|
|
7
|
+
export { default as Bold } from "./bold.ws";
|
|
8
|
+
export { default as Italic } from "./italic.ws";
|
|
9
|
+
export { default as Button } from "./button.ws";
|
|
10
|
+
export { default as Input } from "./input.ws";
|
|
11
|
+
export { default as Form } from "./form.ws";
|
|
11
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,WAAW,CAAC"}
|
package/lib/components/index.js
CHANGED
|
@@ -1,26 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
4
|
};
|
|
16
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
6
|
+
exports.Form = exports.Input = exports.Button = exports.Italic = exports.Bold = exports.Link = exports.Paragraph = exports.Heading = exports.TextBlock = exports.Box = exports.Body = void 0;
|
|
7
|
+
var body_ws_1 = require("./body.ws");
|
|
8
|
+
Object.defineProperty(exports, "Body", { enumerable: true, get: function () { return __importDefault(body_ws_1).default; } });
|
|
9
|
+
var box_ws_1 = require("./box.ws");
|
|
10
|
+
Object.defineProperty(exports, "Box", { enumerable: true, get: function () { return __importDefault(box_ws_1).default; } });
|
|
11
|
+
var text_block_ws_1 = require("./text-block.ws");
|
|
12
|
+
Object.defineProperty(exports, "TextBlock", { enumerable: true, get: function () { return __importDefault(text_block_ws_1).default; } });
|
|
13
|
+
var heading_ws_1 = require("./heading.ws");
|
|
14
|
+
Object.defineProperty(exports, "Heading", { enumerable: true, get: function () { return __importDefault(heading_ws_1).default; } });
|
|
15
|
+
var paragraph_ws_1 = require("./paragraph.ws");
|
|
16
|
+
Object.defineProperty(exports, "Paragraph", { enumerable: true, get: function () { return __importDefault(paragraph_ws_1).default; } });
|
|
17
|
+
var link_ws_1 = require("./link.ws");
|
|
18
|
+
Object.defineProperty(exports, "Link", { enumerable: true, get: function () { return __importDefault(link_ws_1).default; } });
|
|
19
|
+
var bold_ws_1 = require("./bold.ws");
|
|
20
|
+
Object.defineProperty(exports, "Bold", { enumerable: true, get: function () { return __importDefault(bold_ws_1).default; } });
|
|
21
|
+
var italic_ws_1 = require("./italic.ws");
|
|
22
|
+
Object.defineProperty(exports, "Italic", { enumerable: true, get: function () { return __importDefault(italic_ws_1).default; } });
|
|
23
|
+
var button_ws_1 = require("./button.ws");
|
|
24
|
+
Object.defineProperty(exports, "Button", { enumerable: true, get: function () { return __importDefault(button_ws_1).default; } });
|
|
25
|
+
var input_ws_1 = require("./input.ws");
|
|
26
|
+
Object.defineProperty(exports, "Input", { enumerable: true, get: function () { return __importDefault(input_ws_1).default; } });
|
|
27
|
+
var form_ws_1 = require("./form.ws");
|
|
28
|
+
Object.defineProperty(exports, "Form", { enumerable: true, get: function () { return __importDefault(form_ws_1).default; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../../src/components/index.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
const components = __importStar(require("./index"));
|
|
27
|
+
const component_type_1 = require("./component-type");
|
|
28
|
+
test.each(Object.entries(components))("validating meta definition of %s", (name, component) => {
|
|
29
|
+
if (name === "default") {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
component_type_1.WsComponentMetaSchema.parse(component);
|
|
33
|
+
});
|
|
@@ -330,7 +330,15 @@
|
|
|
330
330
|
"control": {
|
|
331
331
|
"type": "select"
|
|
332
332
|
},
|
|
333
|
-
"options": [
|
|
333
|
+
"options": [
|
|
334
|
+
"enter",
|
|
335
|
+
"done",
|
|
336
|
+
"go",
|
|
337
|
+
"next",
|
|
338
|
+
"previous",
|
|
339
|
+
"search",
|
|
340
|
+
"send"
|
|
341
|
+
]
|
|
334
342
|
},
|
|
335
343
|
"formAction": {
|
|
336
344
|
"defaultValue": null,
|
|
@@ -1198,7 +1206,10 @@
|
|
|
1198
1206
|
"control": {
|
|
1199
1207
|
"type": "radio"
|
|
1200
1208
|
},
|
|
1201
|
-
"options": [
|
|
1209
|
+
"options": [
|
|
1210
|
+
"yes",
|
|
1211
|
+
"no"
|
|
1212
|
+
]
|
|
1202
1213
|
},
|
|
1203
1214
|
"radioGroup": {
|
|
1204
1215
|
"defaultValue": null,
|
|
@@ -1691,7 +1702,10 @@
|
|
|
1691
1702
|
"control": {
|
|
1692
1703
|
"type": "radio"
|
|
1693
1704
|
},
|
|
1694
|
-
"options": [
|
|
1705
|
+
"options": [
|
|
1706
|
+
"on",
|
|
1707
|
+
"off"
|
|
1708
|
+
]
|
|
1695
1709
|
},
|
|
1696
1710
|
"inputMode": {
|
|
1697
1711
|
"defaultValue": null,
|
|
@@ -1854,7 +1868,12 @@
|
|
|
1854
1868
|
"control": {
|
|
1855
1869
|
"type": "radio"
|
|
1856
1870
|
},
|
|
1857
|
-
"options": [
|
|
1871
|
+
"options": [
|
|
1872
|
+
"list",
|
|
1873
|
+
"none",
|
|
1874
|
+
"inline",
|
|
1875
|
+
"both"
|
|
1876
|
+
]
|
|
1858
1877
|
},
|
|
1859
1878
|
"aria-busy": {
|
|
1860
1879
|
"defaultValue": null,
|
|
@@ -2118,7 +2137,14 @@
|
|
|
2118
2137
|
"control": {
|
|
2119
2138
|
"type": "select"
|
|
2120
2139
|
},
|
|
2121
|
-
"options": [
|
|
2140
|
+
"options": [
|
|
2141
|
+
"link",
|
|
2142
|
+
"none",
|
|
2143
|
+
"copy",
|
|
2144
|
+
"execute",
|
|
2145
|
+
"move",
|
|
2146
|
+
"popup"
|
|
2147
|
+
]
|
|
2122
2148
|
},
|
|
2123
2149
|
"aria-errormessage": {
|
|
2124
2150
|
"defaultValue": null,
|
|
@@ -2395,7 +2421,11 @@
|
|
|
2395
2421
|
"control": {
|
|
2396
2422
|
"type": "radio"
|
|
2397
2423
|
},
|
|
2398
|
-
"options": [
|
|
2424
|
+
"options": [
|
|
2425
|
+
"off",
|
|
2426
|
+
"assertive",
|
|
2427
|
+
"polite"
|
|
2428
|
+
]
|
|
2399
2429
|
},
|
|
2400
2430
|
"aria-modal": {
|
|
2401
2431
|
"defaultValue": null,
|
|
@@ -2493,7 +2523,10 @@
|
|
|
2493
2523
|
"control": {
|
|
2494
2524
|
"type": "radio"
|
|
2495
2525
|
},
|
|
2496
|
-
"options": [
|
|
2526
|
+
"options": [
|
|
2527
|
+
"horizontal",
|
|
2528
|
+
"vertical"
|
|
2529
|
+
]
|
|
2497
2530
|
},
|
|
2498
2531
|
"aria-owns": {
|
|
2499
2532
|
"defaultValue": null,
|
|
@@ -2862,7 +2895,12 @@
|
|
|
2862
2895
|
"control": {
|
|
2863
2896
|
"type": "radio"
|
|
2864
2897
|
},
|
|
2865
|
-
"options": [
|
|
2898
|
+
"options": [
|
|
2899
|
+
"none",
|
|
2900
|
+
"ascending",
|
|
2901
|
+
"descending",
|
|
2902
|
+
"other"
|
|
2903
|
+
]
|
|
2866
2904
|
},
|
|
2867
2905
|
"aria-valuemax": {
|
|
2868
2906
|
"defaultValue": null,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input.ws.d.ts","sourceRoot":"","sources":["../../src/components/input.ws.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,QAAA,MAAM,IAAI,EAAE,eAAe,CAAC,OAAO,KAAK,CAQvC,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const icons_1 = require("@webstudio-is/icons");
|
|
4
|
+
const input_1 = require("./input");
|
|
5
|
+
const meta = {
|
|
6
|
+
Icon: icons_1.InputIcon,
|
|
7
|
+
Component: input_1.Input,
|
|
8
|
+
canAcceptChildren: false,
|
|
9
|
+
isContentEditable: false,
|
|
10
|
+
isInlineOnly: false,
|
|
11
|
+
isListed: true,
|
|
12
|
+
label: "Input",
|
|
13
|
+
};
|
|
14
|
+
exports.default = meta;
|
|
@@ -447,7 +447,10 @@
|
|
|
447
447
|
"control": {
|
|
448
448
|
"type": "radio"
|
|
449
449
|
},
|
|
450
|
-
"options": [
|
|
450
|
+
"options": [
|
|
451
|
+
"yes",
|
|
452
|
+
"no"
|
|
453
|
+
]
|
|
451
454
|
},
|
|
452
455
|
"radioGroup": {
|
|
453
456
|
"defaultValue": null,
|
|
@@ -940,7 +943,10 @@
|
|
|
940
943
|
"control": {
|
|
941
944
|
"type": "radio"
|
|
942
945
|
},
|
|
943
|
-
"options": [
|
|
946
|
+
"options": [
|
|
947
|
+
"on",
|
|
948
|
+
"off"
|
|
949
|
+
]
|
|
944
950
|
},
|
|
945
951
|
"inputMode": {
|
|
946
952
|
"defaultValue": null,
|
|
@@ -1103,7 +1109,12 @@
|
|
|
1103
1109
|
"control": {
|
|
1104
1110
|
"type": "radio"
|
|
1105
1111
|
},
|
|
1106
|
-
"options": [
|
|
1112
|
+
"options": [
|
|
1113
|
+
"list",
|
|
1114
|
+
"none",
|
|
1115
|
+
"inline",
|
|
1116
|
+
"both"
|
|
1117
|
+
]
|
|
1107
1118
|
},
|
|
1108
1119
|
"aria-busy": {
|
|
1109
1120
|
"defaultValue": null,
|
|
@@ -1367,7 +1378,14 @@
|
|
|
1367
1378
|
"control": {
|
|
1368
1379
|
"type": "select"
|
|
1369
1380
|
},
|
|
1370
|
-
"options": [
|
|
1381
|
+
"options": [
|
|
1382
|
+
"link",
|
|
1383
|
+
"none",
|
|
1384
|
+
"copy",
|
|
1385
|
+
"execute",
|
|
1386
|
+
"move",
|
|
1387
|
+
"popup"
|
|
1388
|
+
]
|
|
1371
1389
|
},
|
|
1372
1390
|
"aria-errormessage": {
|
|
1373
1391
|
"defaultValue": null,
|
|
@@ -1644,7 +1662,11 @@
|
|
|
1644
1662
|
"control": {
|
|
1645
1663
|
"type": "radio"
|
|
1646
1664
|
},
|
|
1647
|
-
"options": [
|
|
1665
|
+
"options": [
|
|
1666
|
+
"off",
|
|
1667
|
+
"assertive",
|
|
1668
|
+
"polite"
|
|
1669
|
+
]
|
|
1648
1670
|
},
|
|
1649
1671
|
"aria-modal": {
|
|
1650
1672
|
"defaultValue": null,
|
|
@@ -1742,7 +1764,10 @@
|
|
|
1742
1764
|
"control": {
|
|
1743
1765
|
"type": "radio"
|
|
1744
1766
|
},
|
|
1745
|
-
"options": [
|
|
1767
|
+
"options": [
|
|
1768
|
+
"horizontal",
|
|
1769
|
+
"vertical"
|
|
1770
|
+
]
|
|
1746
1771
|
},
|
|
1747
1772
|
"aria-owns": {
|
|
1748
1773
|
"defaultValue": null,
|
|
@@ -2111,7 +2136,12 @@
|
|
|
2111
2136
|
"control": {
|
|
2112
2137
|
"type": "radio"
|
|
2113
2138
|
},
|
|
2114
|
-
"options": [
|
|
2139
|
+
"options": [
|
|
2140
|
+
"none",
|
|
2141
|
+
"ascending",
|
|
2142
|
+
"descending",
|
|
2143
|
+
"other"
|
|
2144
|
+
]
|
|
2115
2145
|
},
|
|
2116
2146
|
"aria-valuemax": {
|
|
2117
2147
|
"defaultValue": null,
|