@webstudio-is/react-sdk 0.62.0 → 0.63.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/cjs/components/blockquote.ws.js +2 -0
- package/lib/cjs/components/body.ws.js +2 -0
- package/lib/cjs/components/bold.ws.js +2 -0
- package/lib/cjs/components/box.ws.js +2 -0
- package/lib/cjs/components/button.ws.js +2 -1
- package/lib/cjs/components/checkbox-field.ws.js +2 -0
- package/lib/cjs/components/checkbox.ws.js +2 -0
- package/lib/cjs/components/code.ws.js +2 -0
- package/lib/cjs/components/component-meta.js +12 -1
- package/lib/cjs/components/form.ws.js +2 -0
- package/lib/cjs/components/heading.ws.js +2 -0
- package/lib/cjs/components/image.ws.js +2 -0
- package/lib/cjs/components/input.ws.js +2 -0
- package/lib/cjs/components/italic.ws.js +2 -0
- package/lib/cjs/components/label.ws.js +2 -0
- package/lib/cjs/components/link.ws.js +13 -1
- package/lib/cjs/components/list-item.ws.js +2 -0
- package/lib/cjs/components/list.ws.js +2 -0
- package/lib/cjs/components/paragraph.ws.js +2 -0
- package/lib/cjs/components/radio-button-field.ws.js +2 -0
- package/lib/cjs/components/radio-button.ws.js +2 -0
- package/lib/cjs/components/separator.ws.js +2 -0
- package/lib/cjs/components/span.ws.js +2 -0
- package/lib/cjs/components/subscript.ws.js +2 -0
- package/lib/cjs/components/superscript.ws.js +2 -0
- package/lib/cjs/components/text-block.ws.js +2 -0
- package/lib/cjs/components/textarea.ws.js +2 -0
- package/lib/cjs/css/normalize.js +1 -1
- package/lib/cjs/css/presets.js +19 -1
- package/lib/cjs/index.js +2 -1
- package/lib/components/blockquote.ws.js +4 -0
- package/lib/components/body.ws.js +4 -0
- package/lib/components/bold.ws.js +4 -0
- package/lib/components/box.ws.js +4 -0
- package/lib/components/button.ws.js +4 -1
- package/lib/components/checkbox-field.ws.js +4 -0
- package/lib/components/checkbox.ws.js +4 -0
- package/lib/components/code.ws.js +4 -0
- package/lib/components/component-meta.js +12 -1
- package/lib/components/form.ws.js +4 -0
- package/lib/components/heading.ws.js +4 -0
- package/lib/components/image.ws.js +4 -0
- package/lib/components/input.ws.js +4 -0
- package/lib/components/italic.ws.js +4 -0
- package/lib/components/label.ws.js +4 -0
- package/lib/components/link.ws.js +15 -1
- package/lib/components/list-item.ws.js +4 -0
- package/lib/components/list.ws.js +4 -0
- package/lib/components/paragraph.ws.js +4 -0
- package/lib/components/radio-button-field.ws.js +4 -0
- package/lib/components/radio-button.ws.js +4 -0
- package/lib/components/separator.ws.js +4 -0
- package/lib/components/span.ws.js +4 -0
- package/lib/components/subscript.ws.js +4 -0
- package/lib/components/superscript.ws.js +4 -0
- package/lib/components/text-block.ws.js +4 -0
- package/lib/components/textarea.ws.js +4 -0
- package/lib/css/normalize.js +2 -2
- package/lib/css/presets.js +19 -1
- package/lib/index.js +4 -2
- package/lib/types/components/blockquote.ws.d.ts +1 -1
- package/lib/types/components/body.ws.d.ts +1 -1
- package/lib/types/components/bold.ws.d.ts +1 -1
- package/lib/types/components/box.ws.d.ts +1 -1
- package/lib/types/components/button.ws.d.ts +1 -1
- package/lib/types/components/checkbox-field.ws.d.ts +1 -1
- package/lib/types/components/checkbox.ws.d.ts +1 -1
- package/lib/types/components/code.ws.d.ts +1 -1
- package/lib/types/components/component-meta.d.ts +16 -6
- package/lib/types/components/form.ws.d.ts +1 -1
- package/lib/types/components/heading.ws.d.ts +1 -1
- package/lib/types/components/image.ws.d.ts +1 -1
- package/lib/types/components/input.ws.d.ts +1 -1
- package/lib/types/components/italic.ws.d.ts +1 -1
- package/lib/types/components/label.ws.d.ts +1 -1
- package/lib/types/components/link.ws.d.ts +1 -1
- package/lib/types/components/list-item.ws.d.ts +1 -1
- package/lib/types/components/list.ws.d.ts +1 -1
- package/lib/types/components/paragraph.ws.d.ts +1 -1
- package/lib/types/components/radio-button-field.ws.d.ts +1 -1
- package/lib/types/components/radio-button.ws.d.ts +1 -1
- package/lib/types/components/separator.ws.d.ts +1 -1
- package/lib/types/components/span.ws.d.ts +1 -1
- package/lib/types/components/subscript.ws.d.ts +1 -1
- package/lib/types/components/superscript.ws.d.ts +1 -1
- package/lib/types/components/text-block.ws.d.ts +1 -1
- package/lib/types/components/textarea.ws.d.ts +1 -1
- package/lib/types/css/normalize.d.ts +2 -0
- package/lib/types/css/presets.d.ts +3 -2
- package/lib/types/index.d.ts +1 -1
- package/package.json +11 -11
- package/src/components/blockquote.ws.tsx +6 -4
- package/src/components/body.ws.tsx +6 -4
- package/src/components/bold.ws.tsx +6 -4
- package/src/components/box.ws.ts +6 -4
- package/src/components/button.ws.tsx +6 -5
- package/src/components/checkbox-field.ws.tsx +6 -4
- package/src/components/checkbox.ws.tsx +6 -4
- package/src/components/code.ws.tsx +6 -4
- package/src/components/component-meta.ts +11 -0
- package/src/components/form.ws.tsx +6 -4
- package/src/components/heading.ws.tsx +6 -4
- package/src/components/image.ws.tsx +6 -4
- package/src/components/input.ws.tsx +6 -4
- package/src/components/italic.ws.tsx +6 -4
- package/src/components/label.ws.tsx +6 -4
- package/src/components/link.ws.tsx +17 -5
- package/src/components/list-item.ws.tsx +6 -4
- package/src/components/list.ws.tsx +6 -4
- package/src/components/paragraph.ws.tsx +6 -4
- package/src/components/radio-button-field.ws.tsx +6 -4
- package/src/components/radio-button.ws.tsx +6 -4
- package/src/components/separator.ws.tsx +6 -4
- package/src/components/span.ws.tsx +6 -4
- package/src/components/subscript.ws.tsx +6 -4
- package/src/components/superscript.ws.tsx +6 -4
- package/src/components/text-block.ws.tsx +6 -4
- package/src/components/textarea.ws.tsx +6 -4
- package/src/css/normalize.ts +20 -18
- package/src/css/presets.ts +20 -2
- package/src/index.ts +1 -0
|
@@ -23,6 +23,7 @@ __export(blockquote_ws_exports, {
|
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(blockquote_ws_exports);
|
|
25
25
|
var import_icons = require("@webstudio-is/icons");
|
|
26
|
+
var import_component_meta = require("./component-meta");
|
|
26
27
|
var import_blockquote = require("./__generated__/blockquote.props");
|
|
27
28
|
const presetStyle = {
|
|
28
29
|
blockquote: [
|
|
@@ -77,6 +78,7 @@ const meta = {
|
|
|
77
78
|
type: "rich-text",
|
|
78
79
|
label: "Blockquote",
|
|
79
80
|
Icon: import_icons.BlockquoteIcon,
|
|
81
|
+
states: import_component_meta.defaultStates,
|
|
80
82
|
presetStyle,
|
|
81
83
|
children: [{ type: "text", value: "Blockquote you can edit" }]
|
|
82
84
|
};
|
|
@@ -24,6 +24,7 @@ __export(body_ws_exports, {
|
|
|
24
24
|
module.exports = __toCommonJS(body_ws_exports);
|
|
25
25
|
var import_icons = require("@webstudio-is/icons");
|
|
26
26
|
var import_normalize = require("../css/normalize");
|
|
27
|
+
var import_component_meta = require("./component-meta");
|
|
27
28
|
var import_body = require("./__generated__/body.props");
|
|
28
29
|
const presetStyle = {
|
|
29
30
|
body: [
|
|
@@ -56,6 +57,7 @@ const meta = {
|
|
|
56
57
|
type: "container",
|
|
57
58
|
label: "Body",
|
|
58
59
|
Icon: import_icons.BodyIcon,
|
|
60
|
+
states: import_component_meta.defaultStates,
|
|
59
61
|
presetStyle
|
|
60
62
|
};
|
|
61
63
|
const propsMeta = {
|
|
@@ -23,6 +23,7 @@ __export(bold_ws_exports, {
|
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(bold_ws_exports);
|
|
25
25
|
var import_icons = require("@webstudio-is/icons");
|
|
26
|
+
var import_component_meta = require("./component-meta");
|
|
26
27
|
var import_bold = require("./__generated__/bold.props");
|
|
27
28
|
var import_normalize = require("../css/normalize");
|
|
28
29
|
const presetStyle = {
|
|
@@ -32,6 +33,7 @@ const meta = {
|
|
|
32
33
|
type: "rich-text-child",
|
|
33
34
|
label: "Bold Text",
|
|
34
35
|
Icon: import_icons.BoldIcon,
|
|
36
|
+
states: import_component_meta.defaultStates,
|
|
35
37
|
presetStyle
|
|
36
38
|
};
|
|
37
39
|
const propsMeta = {
|
|
@@ -23,6 +23,7 @@ __export(box_ws_exports, {
|
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(box_ws_exports);
|
|
25
25
|
var import_icons = require("@webstudio-is/icons");
|
|
26
|
+
var import_component_meta = require("./component-meta");
|
|
26
27
|
var import_box = require("./__generated__/box.props");
|
|
27
28
|
var import_normalize = require("../css/normalize");
|
|
28
29
|
const presetStyle = {
|
|
@@ -42,6 +43,7 @@ const meta = {
|
|
|
42
43
|
type: "container",
|
|
43
44
|
label: "Box",
|
|
44
45
|
Icon: import_icons.BoxIcon,
|
|
46
|
+
states: import_component_meta.defaultStates,
|
|
45
47
|
presetStyle
|
|
46
48
|
};
|
|
47
49
|
const propsMeta = {
|
|
@@ -24,6 +24,7 @@ __export(button_ws_exports, {
|
|
|
24
24
|
module.exports = __toCommonJS(button_ws_exports);
|
|
25
25
|
var import_icons = require("@webstudio-is/icons");
|
|
26
26
|
var import_normalize = require("../css/normalize");
|
|
27
|
+
var import_component_meta = require("./component-meta");
|
|
27
28
|
var import_button = require("./__generated__/button.props");
|
|
28
29
|
const presetStyle = {
|
|
29
30
|
button: import_normalize.button
|
|
@@ -35,7 +36,7 @@ const meta = {
|
|
|
35
36
|
Icon: import_icons.ButtonElementIcon,
|
|
36
37
|
presetStyle,
|
|
37
38
|
states: [
|
|
38
|
-
|
|
39
|
+
...import_component_meta.defaultStates,
|
|
39
40
|
{ selector: ":disabled", label: "Disabled" },
|
|
40
41
|
{ selector: ":enabled", label: "Enabled" }
|
|
41
42
|
]
|
|
@@ -23,6 +23,7 @@ __export(checkbox_field_ws_exports, {
|
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(checkbox_field_ws_exports);
|
|
25
25
|
var import_icons = require("@webstudio-is/icons");
|
|
26
|
+
var import_component_meta = require("./component-meta");
|
|
26
27
|
var import_checkbox_field = require("./__generated__/checkbox-field.props");
|
|
27
28
|
var import_normalize = require("../css/normalize");
|
|
28
29
|
const presetStyle = {
|
|
@@ -36,6 +37,7 @@ const meta = {
|
|
|
36
37
|
type: "container",
|
|
37
38
|
label: "Checkbox Field",
|
|
38
39
|
Icon: import_icons.CheckboxCheckedIcon,
|
|
40
|
+
states: import_component_meta.defaultStates,
|
|
39
41
|
presetStyle,
|
|
40
42
|
children: [
|
|
41
43
|
{ type: "instance", component: "Checkbox", props: [], children: [] },
|
|
@@ -23,6 +23,7 @@ __export(checkbox_ws_exports, {
|
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(checkbox_ws_exports);
|
|
25
25
|
var import_icons = require("@webstudio-is/icons");
|
|
26
|
+
var import_component_meta = require("./component-meta");
|
|
26
27
|
var import_normalize = require("../css/normalize");
|
|
27
28
|
var import_checkbox = require("./__generated__/checkbox.props");
|
|
28
29
|
const presetStyle = {
|
|
@@ -40,6 +41,7 @@ const meta = {
|
|
|
40
41
|
Icon: import_icons.CheckboxCheckedIcon,
|
|
41
42
|
presetStyle,
|
|
42
43
|
states: [
|
|
44
|
+
...import_component_meta.defaultStates,
|
|
43
45
|
{ selector: ":checked", label: "Checked" },
|
|
44
46
|
{ selector: ":required", label: "Required" },
|
|
45
47
|
{ selector: ":optional", label: "Optional" },
|
|
@@ -23,6 +23,7 @@ __export(code_ws_exports, {
|
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(code_ws_exports);
|
|
25
25
|
var import_icons = require("@webstudio-is/icons");
|
|
26
|
+
var import_component_meta = require("./component-meta");
|
|
26
27
|
var import_code = require("./code");
|
|
27
28
|
var import_code2 = require("./__generated__/code.props");
|
|
28
29
|
var import_normalize = require("../css/normalize");
|
|
@@ -56,6 +57,7 @@ const meta = {
|
|
|
56
57
|
type: "rich-text",
|
|
57
58
|
label: "Code",
|
|
58
59
|
Icon: import_icons.CodeIcon,
|
|
60
|
+
states: import_component_meta.defaultStates,
|
|
59
61
|
presetStyle,
|
|
60
62
|
children: [{ type: "text", value: "Code you can edit" }]
|
|
61
63
|
};
|
|
@@ -19,7 +19,9 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
19
19
|
var component_meta_exports = {};
|
|
20
20
|
__export(component_meta_exports, {
|
|
21
21
|
ComponentState: () => ComponentState,
|
|
22
|
-
componentCategories: () => componentCategories
|
|
22
|
+
componentCategories: () => componentCategories,
|
|
23
|
+
defaultStates: () => defaultStates,
|
|
24
|
+
stateCategories: () => stateCategories
|
|
23
25
|
});
|
|
24
26
|
module.exports = __toCommonJS(component_meta_exports);
|
|
25
27
|
var import_zod = require("zod");
|
|
@@ -35,10 +37,19 @@ const componentCategories = [
|
|
|
35
37
|
"media",
|
|
36
38
|
"forms"
|
|
37
39
|
];
|
|
40
|
+
const stateCategories = ["states", "component-states"];
|
|
38
41
|
const ComponentState = import_zod.z.object({
|
|
42
|
+
category: import_zod.z.enum(stateCategories).optional(),
|
|
39
43
|
selector: import_zod.z.string(),
|
|
40
44
|
label: import_zod.z.string()
|
|
41
45
|
});
|
|
46
|
+
const defaultStates = [
|
|
47
|
+
{ selector: ":hover", label: "Hover" },
|
|
48
|
+
{ selector: ":active", label: "Active" },
|
|
49
|
+
{ selector: ":focus", label: "Focus" },
|
|
50
|
+
{ selector: ":focus-visible", label: "Focus Visible" },
|
|
51
|
+
{ selector: ":focus-within", label: "Focus Within" }
|
|
52
|
+
];
|
|
42
53
|
const WsComponentMeta = import_zod.z.object({
|
|
43
54
|
category: import_zod.z.enum(componentCategories).optional(),
|
|
44
55
|
// container - can accept other components with dnd
|
|
@@ -24,6 +24,7 @@ __export(form_ws_exports, {
|
|
|
24
24
|
module.exports = __toCommonJS(form_ws_exports);
|
|
25
25
|
var import_icons = require("@webstudio-is/icons");
|
|
26
26
|
var import_normalize = require("../css/normalize");
|
|
27
|
+
var import_component_meta = require("./component-meta");
|
|
27
28
|
var import_form = require("./__generated__/form.props");
|
|
28
29
|
const presetStyle = {
|
|
29
30
|
form: [
|
|
@@ -36,6 +37,7 @@ const meta = {
|
|
|
36
37
|
type: "container",
|
|
37
38
|
label: "Form",
|
|
38
39
|
Icon: import_icons.FormIcon,
|
|
40
|
+
states: import_component_meta.defaultStates,
|
|
39
41
|
presetStyle,
|
|
40
42
|
children: [
|
|
41
43
|
{
|
|
@@ -24,6 +24,7 @@ __export(heading_ws_exports, {
|
|
|
24
24
|
module.exports = __toCommonJS(heading_ws_exports);
|
|
25
25
|
var import_icons = require("@webstudio-is/icons");
|
|
26
26
|
var import_normalize = require("../css/normalize");
|
|
27
|
+
var import_component_meta = require("./component-meta");
|
|
27
28
|
var import_heading = require("./__generated__/heading.props");
|
|
28
29
|
const presetStyle = {
|
|
29
30
|
h1: import_normalize.h1,
|
|
@@ -39,6 +40,7 @@ const meta = {
|
|
|
39
40
|
label: "Heading",
|
|
40
41
|
Icon: import_icons.HeadingIcon,
|
|
41
42
|
children: [{ type: "text", value: "Heading you can edit" }],
|
|
43
|
+
states: import_component_meta.defaultStates,
|
|
42
44
|
presetStyle
|
|
43
45
|
};
|
|
44
46
|
const propsMeta = {
|
|
@@ -24,6 +24,7 @@ __export(image_ws_exports, {
|
|
|
24
24
|
module.exports = __toCommonJS(image_ws_exports);
|
|
25
25
|
var import_icons = require("@webstudio-is/icons");
|
|
26
26
|
var import_normalize = require("../css/normalize");
|
|
27
|
+
var import_component_meta = require("./component-meta");
|
|
27
28
|
var import_image = require("./__generated__/image.props");
|
|
28
29
|
const presetStyle = {
|
|
29
30
|
img: [
|
|
@@ -46,6 +47,7 @@ const meta = {
|
|
|
46
47
|
type: "embed",
|
|
47
48
|
label: "Image",
|
|
48
49
|
Icon: import_icons.ImageIcon,
|
|
50
|
+
states: import_component_meta.defaultStates,
|
|
49
51
|
presetStyle
|
|
50
52
|
};
|
|
51
53
|
const propsMeta = {
|
|
@@ -24,6 +24,7 @@ __export(input_ws_exports, {
|
|
|
24
24
|
module.exports = __toCommonJS(input_ws_exports);
|
|
25
25
|
var import_icons = require("@webstudio-is/icons");
|
|
26
26
|
var import_normalize = require("../css/normalize");
|
|
27
|
+
var import_component_meta = require("./component-meta");
|
|
27
28
|
var import_input = require("./__generated__/input.props");
|
|
28
29
|
const presetStyle = {
|
|
29
30
|
input: import_normalize.input
|
|
@@ -35,6 +36,7 @@ const meta = {
|
|
|
35
36
|
Icon: import_icons.FormTextFieldIcon,
|
|
36
37
|
presetStyle,
|
|
37
38
|
states: [
|
|
39
|
+
...import_component_meta.defaultStates,
|
|
38
40
|
{ selector: "::placeholder", label: "Placeholder" },
|
|
39
41
|
{ selector: ":valid", label: "Valid" },
|
|
40
42
|
{ selector: ":invalid", label: "Invalid" },
|
|
@@ -23,6 +23,7 @@ __export(italic_ws_exports, {
|
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(italic_ws_exports);
|
|
25
25
|
var import_icons = require("@webstudio-is/icons");
|
|
26
|
+
var import_component_meta = require("./component-meta");
|
|
26
27
|
var import_italic = require("./__generated__/italic.props");
|
|
27
28
|
var import_normalize = require("../css/normalize");
|
|
28
29
|
const presetStyle = {
|
|
@@ -38,6 +39,7 @@ const meta = {
|
|
|
38
39
|
type: "rich-text-child",
|
|
39
40
|
label: "Italic Text",
|
|
40
41
|
Icon: import_icons.TextItalicIcon,
|
|
42
|
+
states: import_component_meta.defaultStates,
|
|
41
43
|
presetStyle
|
|
42
44
|
};
|
|
43
45
|
const propsMeta = {
|
|
@@ -23,6 +23,7 @@ __export(label_ws_exports, {
|
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(label_ws_exports);
|
|
25
25
|
var import_icons = require("@webstudio-is/icons");
|
|
26
|
+
var import_component_meta = require("./component-meta");
|
|
26
27
|
var import_label = require("./__generated__/label.props");
|
|
27
28
|
var import_normalize = require("../css/normalize");
|
|
28
29
|
const presetStyle = {
|
|
@@ -36,6 +37,7 @@ const meta = {
|
|
|
36
37
|
type: "rich-text",
|
|
37
38
|
label: "Input Label",
|
|
38
39
|
Icon: import_icons.TextBlockIcon,
|
|
40
|
+
states: import_component_meta.defaultStates,
|
|
39
41
|
presetStyle,
|
|
40
42
|
children: [{ type: "text", value: "Form Label" }]
|
|
41
43
|
};
|
|
@@ -24,6 +24,7 @@ __export(link_ws_exports, {
|
|
|
24
24
|
module.exports = __toCommonJS(link_ws_exports);
|
|
25
25
|
var import_icons = require("@webstudio-is/icons");
|
|
26
26
|
var import_normalize = require("../css/normalize");
|
|
27
|
+
var import_component_meta = require("./component-meta");
|
|
27
28
|
var import_link = require("./__generated__/link.props");
|
|
28
29
|
const presetStyle = {
|
|
29
30
|
a: [
|
|
@@ -44,7 +45,18 @@ const meta = {
|
|
|
44
45
|
label: "Link Text",
|
|
45
46
|
Icon: import_icons.LinkIcon,
|
|
46
47
|
presetStyle,
|
|
47
|
-
states: [
|
|
48
|
+
states: [
|
|
49
|
+
...import_component_meta.defaultStates,
|
|
50
|
+
{
|
|
51
|
+
selector: ":visited",
|
|
52
|
+
label: "Visited"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
category: "component-states",
|
|
56
|
+
selector: "[aria-current=page]",
|
|
57
|
+
label: "Current page"
|
|
58
|
+
}
|
|
59
|
+
],
|
|
48
60
|
children: [{ type: "text", value: "Link text you can edit" }]
|
|
49
61
|
};
|
|
50
62
|
const propsMeta = {
|
|
@@ -24,6 +24,7 @@ __export(list_item_ws_exports, {
|
|
|
24
24
|
module.exports = __toCommonJS(list_item_ws_exports);
|
|
25
25
|
var import_icons = require("@webstudio-is/icons");
|
|
26
26
|
var import_normalize = require("../css/normalize");
|
|
27
|
+
var import_component_meta = require("./component-meta");
|
|
27
28
|
var import_list_item = require("./__generated__/list-item.props");
|
|
28
29
|
const presetStyle = {
|
|
29
30
|
li: import_normalize.li
|
|
@@ -35,6 +36,7 @@ const meta = {
|
|
|
35
36
|
label: "List Item",
|
|
36
37
|
Icon: import_icons.ListItemIcon,
|
|
37
38
|
children: [{ type: "text", value: "List Item you can edit" }],
|
|
39
|
+
states: import_component_meta.defaultStates,
|
|
38
40
|
presetStyle
|
|
39
41
|
};
|
|
40
42
|
const propsMeta = {
|
|
@@ -23,6 +23,7 @@ __export(list_ws_exports, {
|
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(list_ws_exports);
|
|
25
25
|
var import_icons = require("@webstudio-is/icons");
|
|
26
|
+
var import_component_meta = require("./component-meta");
|
|
26
27
|
var import_list = require("./__generated__/list.props");
|
|
27
28
|
var import_normalize = require("../css/normalize");
|
|
28
29
|
const presetStyle = {
|
|
@@ -62,6 +63,7 @@ const meta = {
|
|
|
62
63
|
type: "container",
|
|
63
64
|
label: "List",
|
|
64
65
|
Icon: import_icons.ListIcon,
|
|
66
|
+
states: import_component_meta.defaultStates,
|
|
65
67
|
presetStyle,
|
|
66
68
|
children: []
|
|
67
69
|
};
|
|
@@ -24,6 +24,7 @@ __export(paragraph_ws_exports, {
|
|
|
24
24
|
module.exports = __toCommonJS(paragraph_ws_exports);
|
|
25
25
|
var import_icons = require("@webstudio-is/icons");
|
|
26
26
|
var import_normalize = require("../css/normalize");
|
|
27
|
+
var import_component_meta = require("./component-meta");
|
|
27
28
|
var import_paragraph = require("./__generated__/paragraph.props");
|
|
28
29
|
const presetStyle = {
|
|
29
30
|
p: import_normalize.p
|
|
@@ -34,6 +35,7 @@ const meta = {
|
|
|
34
35
|
label: "Paragraph",
|
|
35
36
|
Icon: import_icons.TextAlignLeftIcon,
|
|
36
37
|
children: [{ type: "text", value: "Pragraph you can edit" }],
|
|
38
|
+
states: import_component_meta.defaultStates,
|
|
37
39
|
presetStyle
|
|
38
40
|
};
|
|
39
41
|
const propsMeta = {
|
|
@@ -23,6 +23,7 @@ __export(radio_button_field_ws_exports, {
|
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(radio_button_field_ws_exports);
|
|
25
25
|
var import_icons = require("@webstudio-is/icons");
|
|
26
|
+
var import_component_meta = require("./component-meta");
|
|
26
27
|
var import_radio_button_field = require("./__generated__/radio-button-field.props");
|
|
27
28
|
var import_normalize = require("../css/normalize");
|
|
28
29
|
const presetStyle = {
|
|
@@ -36,6 +37,7 @@ const meta = {
|
|
|
36
37
|
type: "container",
|
|
37
38
|
label: "Radio Button Field",
|
|
38
39
|
Icon: import_icons.RadioCheckedIcon,
|
|
40
|
+
states: import_component_meta.defaultStates,
|
|
39
41
|
presetStyle,
|
|
40
42
|
children: [
|
|
41
43
|
{ type: "instance", component: "RadioButton", props: [], children: [] },
|
|
@@ -23,6 +23,7 @@ __export(radio_button_ws_exports, {
|
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(radio_button_ws_exports);
|
|
25
25
|
var import_icons = require("@webstudio-is/icons");
|
|
26
|
+
var import_component_meta = require("./component-meta");
|
|
26
27
|
var import_normalize = require("../css/normalize");
|
|
27
28
|
var import_radio_button = require("./__generated__/radio-button.props");
|
|
28
29
|
const presetStyle = {
|
|
@@ -40,6 +41,7 @@ const meta = {
|
|
|
40
41
|
Icon: import_icons.RadioCheckedIcon,
|
|
41
42
|
presetStyle,
|
|
42
43
|
states: [
|
|
44
|
+
...import_component_meta.defaultStates,
|
|
43
45
|
{ selector: ":checked", label: "Checked" },
|
|
44
46
|
{ selector: ":required", label: "Required" },
|
|
45
47
|
{ selector: ":optional", label: "Optional" },
|
|
@@ -23,6 +23,7 @@ __export(separator_ws_exports, {
|
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(separator_ws_exports);
|
|
25
25
|
var import_icons = require("@webstudio-is/icons");
|
|
26
|
+
var import_component_meta = require("./component-meta");
|
|
26
27
|
var import_separator = require("./__generated__/separator.props");
|
|
27
28
|
var import_normalize = require("../css/normalize");
|
|
28
29
|
const presetStyle = {
|
|
@@ -59,6 +60,7 @@ const meta = {
|
|
|
59
60
|
type: "embed",
|
|
60
61
|
label: "Separator",
|
|
61
62
|
Icon: import_icons.DashIcon,
|
|
63
|
+
states: import_component_meta.defaultStates,
|
|
62
64
|
presetStyle,
|
|
63
65
|
children: []
|
|
64
66
|
};
|
|
@@ -24,6 +24,7 @@ __export(span_ws_exports, {
|
|
|
24
24
|
module.exports = __toCommonJS(span_ws_exports);
|
|
25
25
|
var import_icons = require("@webstudio-is/icons");
|
|
26
26
|
var import_normalize = require("../css/normalize");
|
|
27
|
+
var import_component_meta = require("./component-meta");
|
|
27
28
|
var import_span = require("./__generated__/span.props");
|
|
28
29
|
const presetStyle = {
|
|
29
30
|
span: import_normalize.span
|
|
@@ -32,6 +33,7 @@ const meta = {
|
|
|
32
33
|
type: "rich-text-child",
|
|
33
34
|
label: "Styled Text",
|
|
34
35
|
Icon: import_icons.PaintBrushIcon,
|
|
36
|
+
states: import_component_meta.defaultStates,
|
|
35
37
|
presetStyle
|
|
36
38
|
};
|
|
37
39
|
const propsMeta = {
|
|
@@ -24,6 +24,7 @@ __export(subscript_ws_exports, {
|
|
|
24
24
|
module.exports = __toCommonJS(subscript_ws_exports);
|
|
25
25
|
var import_icons = require("@webstudio-is/icons");
|
|
26
26
|
var import_normalize = require("../css/normalize");
|
|
27
|
+
var import_component_meta = require("./component-meta");
|
|
27
28
|
var import_subscript = require("./__generated__/subscript.props");
|
|
28
29
|
const presetStyle = {
|
|
29
30
|
sub: import_normalize.sub
|
|
@@ -32,6 +33,7 @@ const meta = {
|
|
|
32
33
|
type: "rich-text-child",
|
|
33
34
|
label: "Subscript Text",
|
|
34
35
|
Icon: import_icons.SubscriptIcon,
|
|
36
|
+
states: import_component_meta.defaultStates,
|
|
35
37
|
presetStyle
|
|
36
38
|
};
|
|
37
39
|
const propsMeta = {
|
|
@@ -24,6 +24,7 @@ __export(superscript_ws_exports, {
|
|
|
24
24
|
module.exports = __toCommonJS(superscript_ws_exports);
|
|
25
25
|
var import_icons = require("@webstudio-is/icons");
|
|
26
26
|
var import_normalize = require("../css/normalize");
|
|
27
|
+
var import_component_meta = require("./component-meta");
|
|
27
28
|
var import_superscript = require("./__generated__/superscript.props");
|
|
28
29
|
const presetStyle = {
|
|
29
30
|
sup: import_normalize.sup
|
|
@@ -32,6 +33,7 @@ const meta = {
|
|
|
32
33
|
type: "rich-text-child",
|
|
33
34
|
label: "Superscript Text",
|
|
34
35
|
Icon: import_icons.SuperscriptIcon,
|
|
36
|
+
states: import_component_meta.defaultStates,
|
|
35
37
|
presetStyle
|
|
36
38
|
};
|
|
37
39
|
const propsMeta = {
|
|
@@ -23,6 +23,7 @@ __export(text_block_ws_exports, {
|
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(text_block_ws_exports);
|
|
25
25
|
var import_icons = require("@webstudio-is/icons");
|
|
26
|
+
var import_component_meta = require("./component-meta");
|
|
26
27
|
var import_text_block = require("./__generated__/text-block.props");
|
|
27
28
|
var import_normalize = require("../css/normalize");
|
|
28
29
|
const presetStyle = {
|
|
@@ -39,6 +40,7 @@ const meta = {
|
|
|
39
40
|
type: "rich-text",
|
|
40
41
|
label: "Text Block",
|
|
41
42
|
Icon: import_icons.TextBlockIcon,
|
|
43
|
+
states: import_component_meta.defaultStates,
|
|
42
44
|
presetStyle,
|
|
43
45
|
children: [{ type: "text", value: "Block of text you can edit" }]
|
|
44
46
|
};
|
|
@@ -24,6 +24,7 @@ __export(textarea_ws_exports, {
|
|
|
24
24
|
module.exports = __toCommonJS(textarea_ws_exports);
|
|
25
25
|
var import_icons = require("@webstudio-is/icons");
|
|
26
26
|
var import_normalize = require("../css/normalize");
|
|
27
|
+
var import_component_meta = require("./component-meta");
|
|
27
28
|
var import_textarea = require("./__generated__/textarea.props");
|
|
28
29
|
const presetStyle = {
|
|
29
30
|
textarea: [
|
|
@@ -39,6 +40,7 @@ const meta = {
|
|
|
39
40
|
Icon: import_icons.FormTextAreaIcon,
|
|
40
41
|
presetStyle,
|
|
41
42
|
states: [
|
|
43
|
+
...import_component_meta.defaultStates,
|
|
42
44
|
{ selector: "::placeholder", label: "Placeholder" },
|
|
43
45
|
{ selector: ":valid", label: "Valid" },
|
|
44
46
|
{ selector: ":invalid", label: "Invalid" },
|
package/lib/cjs/css/normalize.js
CHANGED
|
@@ -93,7 +93,7 @@ const h5 = baseStyle;
|
|
|
93
93
|
const h6 = baseStyle;
|
|
94
94
|
const i = baseStyle;
|
|
95
95
|
const img = baseStyle;
|
|
96
|
-
const a =
|
|
96
|
+
const a = [boxSizing, ...import_presets.borders, ...import_presets.linkColors];
|
|
97
97
|
const li = baseStyle;
|
|
98
98
|
const ul = baseStyle;
|
|
99
99
|
const ol = baseStyle;
|
package/lib/cjs/css/presets.js
CHANGED
|
@@ -18,7 +18,8 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var presets_exports = {};
|
|
20
20
|
__export(presets_exports, {
|
|
21
|
-
borders: () => borders
|
|
21
|
+
borders: () => borders,
|
|
22
|
+
linkColors: () => linkColors
|
|
22
23
|
});
|
|
23
24
|
module.exports = __toCommonJS(presets_exports);
|
|
24
25
|
const borders = [
|
|
@@ -39,3 +40,20 @@ const borders = [
|
|
|
39
40
|
value: { type: "unit", value: 1, unit: "px" }
|
|
40
41
|
}
|
|
41
42
|
];
|
|
43
|
+
const linkColors = [
|
|
44
|
+
{
|
|
45
|
+
property: "color",
|
|
46
|
+
value: { type: "rgb", r: 0, g: 0, b: 238, alpha: 1 }
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
state: ":active",
|
|
50
|
+
property: "color",
|
|
51
|
+
// chrome and safari use rgb(255, 0, 0)
|
|
52
|
+
value: { type: "rgb", r: 238, g: 0, b: 0, alpha: 1 }
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
state: ":visited",
|
|
56
|
+
property: "color",
|
|
57
|
+
value: { type: "rgb", r: 85, g: 26, b: 139, alpha: 1 }
|
|
58
|
+
}
|
|
59
|
+
];
|
package/lib/cjs/index.js
CHANGED
|
@@ -22,7 +22,8 @@ __export(src_exports, {
|
|
|
22
22
|
componentCategories: () => import_component_meta.componentCategories,
|
|
23
23
|
customComponentMetas: () => import_custom_components.customComponentMetas,
|
|
24
24
|
customComponentPropsMetas: () => import_custom_components.customComponentPropsMetas,
|
|
25
|
-
customComponents: () => import_custom_components.customComponents
|
|
25
|
+
customComponents: () => import_custom_components.customComponents,
|
|
26
|
+
stateCategories: () => import_component_meta.stateCategories
|
|
26
27
|
});
|
|
27
28
|
module.exports = __toCommonJS(src_exports);
|
|
28
29
|
__reExport(src_exports, require("./css"), module.exports);
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { BlockquoteIcon } from "@webstudio-is/icons";
|
|
2
|
+
import {
|
|
3
|
+
defaultStates
|
|
4
|
+
} from "./component-meta";
|
|
2
5
|
import { props } from "./__generated__/blockquote.props";
|
|
3
6
|
const presetStyle = {
|
|
4
7
|
blockquote: [
|
|
@@ -53,6 +56,7 @@ const meta = {
|
|
|
53
56
|
type: "rich-text",
|
|
54
57
|
label: "Blockquote",
|
|
55
58
|
Icon: BlockquoteIcon,
|
|
59
|
+
states: defaultStates,
|
|
56
60
|
presetStyle,
|
|
57
61
|
children: [{ type: "text", value: "Blockquote you can edit" }]
|
|
58
62
|
};
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { BodyIcon } from "@webstudio-is/icons";
|
|
2
2
|
import { body } from "../css/normalize";
|
|
3
|
+
import {
|
|
4
|
+
defaultStates
|
|
5
|
+
} from "./component-meta";
|
|
3
6
|
import { props } from "./__generated__/body.props";
|
|
4
7
|
const presetStyle = {
|
|
5
8
|
body: [
|
|
@@ -32,6 +35,7 @@ const meta = {
|
|
|
32
35
|
type: "container",
|
|
33
36
|
label: "Body",
|
|
34
37
|
Icon: BodyIcon,
|
|
38
|
+
states: defaultStates,
|
|
35
39
|
presetStyle
|
|
36
40
|
};
|
|
37
41
|
const propsMeta = {
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { BoldIcon } from "@webstudio-is/icons";
|
|
2
|
+
import {
|
|
3
|
+
defaultStates
|
|
4
|
+
} from "./component-meta";
|
|
2
5
|
import { props } from "./__generated__/bold.props";
|
|
3
6
|
import { b } from "../css/normalize";
|
|
4
7
|
const presetStyle = {
|
|
@@ -8,6 +11,7 @@ const meta = {
|
|
|
8
11
|
type: "rich-text-child",
|
|
9
12
|
label: "Bold Text",
|
|
10
13
|
Icon: BoldIcon,
|
|
14
|
+
states: defaultStates,
|
|
11
15
|
presetStyle
|
|
12
16
|
};
|
|
13
17
|
const propsMeta = {
|
package/lib/components/box.ws.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { BoxIcon } from "@webstudio-is/icons";
|
|
2
|
+
import {
|
|
3
|
+
defaultStates
|
|
4
|
+
} from "./component-meta";
|
|
2
5
|
import { props } from "./__generated__/box.props";
|
|
3
6
|
import {
|
|
4
7
|
div,
|
|
@@ -29,6 +32,7 @@ const meta = {
|
|
|
29
32
|
type: "container",
|
|
30
33
|
label: "Box",
|
|
31
34
|
Icon: BoxIcon,
|
|
35
|
+
states: defaultStates,
|
|
32
36
|
presetStyle
|
|
33
37
|
};
|
|
34
38
|
const propsMeta = {
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { ButtonElementIcon } from "@webstudio-is/icons";
|
|
2
2
|
import { button } from "../css/normalize";
|
|
3
|
+
import {
|
|
4
|
+
defaultStates
|
|
5
|
+
} from "./component-meta";
|
|
3
6
|
import { props } from "./__generated__/button.props";
|
|
4
7
|
const presetStyle = {
|
|
5
8
|
button
|
|
@@ -11,7 +14,7 @@ const meta = {
|
|
|
11
14
|
Icon: ButtonElementIcon,
|
|
12
15
|
presetStyle,
|
|
13
16
|
states: [
|
|
14
|
-
|
|
17
|
+
...defaultStates,
|
|
15
18
|
{ selector: ":disabled", label: "Disabled" },
|
|
16
19
|
{ selector: ":enabled", label: "Enabled" }
|
|
17
20
|
]
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { CheckboxCheckedIcon } from "@webstudio-is/icons";
|
|
2
|
+
import {
|
|
3
|
+
defaultStates
|
|
4
|
+
} from "./component-meta";
|
|
2
5
|
import { props } from "./__generated__/checkbox-field.props";
|
|
3
6
|
import { label } from "../css/normalize";
|
|
4
7
|
const presetStyle = {
|
|
@@ -12,6 +15,7 @@ const meta = {
|
|
|
12
15
|
type: "container",
|
|
13
16
|
label: "Checkbox Field",
|
|
14
17
|
Icon: CheckboxCheckedIcon,
|
|
18
|
+
states: defaultStates,
|
|
15
19
|
presetStyle,
|
|
16
20
|
children: [
|
|
17
21
|
{ type: "instance", component: "Checkbox", props: [], children: [] },
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { CheckboxCheckedIcon } from "@webstudio-is/icons";
|
|
2
|
+
import {
|
|
3
|
+
defaultStates
|
|
4
|
+
} from "./component-meta";
|
|
2
5
|
import { input } from "../css/normalize";
|
|
3
6
|
import { props } from "./__generated__/checkbox.props";
|
|
4
7
|
const presetStyle = {
|
|
@@ -16,6 +19,7 @@ const meta = {
|
|
|
16
19
|
Icon: CheckboxCheckedIcon,
|
|
17
20
|
presetStyle,
|
|
18
21
|
states: [
|
|
22
|
+
...defaultStates,
|
|
19
23
|
{ selector: ":checked", label: "Checked" },
|
|
20
24
|
{ selector: ":required", label: "Required" },
|
|
21
25
|
{ selector: ":optional", label: "Optional" },
|