@webstudio-is/sdk-components-react 0.94.0 → 0.96.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.
Files changed (127) hide show
  1. package/lib/components.js +754 -33
  2. package/lib/metas.js +3635 -33
  3. package/lib/props.js +16274 -33
  4. package/package.json +14 -11
  5. package/lib/__generated__/blockquote.props.js +0 -514
  6. package/lib/__generated__/body.props.js +0 -508
  7. package/lib/__generated__/bold.props.js +0 -508
  8. package/lib/__generated__/box.props.js +0 -527
  9. package/lib/__generated__/button.props.js +0 -564
  10. package/lib/__generated__/checkbox.props.js +0 -666
  11. package/lib/__generated__/code-text.props.js +0 -508
  12. package/lib/__generated__/form.props.js +0 -556
  13. package/lib/__generated__/fragment.props.js +0 -2
  14. package/lib/__generated__/heading.props.js +0 -516
  15. package/lib/__generated__/html-embed.props.js +0 -9
  16. package/lib/__generated__/image.props.js +0 -581
  17. package/lib/__generated__/input.props.js +0 -673
  18. package/lib/__generated__/italic.props.js +0 -508
  19. package/lib/__generated__/label.props.js +0 -520
  20. package/lib/__generated__/link.props.js +0 -562
  21. package/lib/__generated__/list-item.props.js +0 -508
  22. package/lib/__generated__/list.props.js +0 -534
  23. package/lib/__generated__/paragraph.props.js +0 -508
  24. package/lib/__generated__/radio-button.props.js +0 -666
  25. package/lib/__generated__/rich-text-link.props.js +0 -562
  26. package/lib/__generated__/separator.props.js +0 -508
  27. package/lib/__generated__/slot.props.js +0 -2
  28. package/lib/__generated__/span.props.js +0 -508
  29. package/lib/__generated__/subscript.props.js +0 -508
  30. package/lib/__generated__/superscript.props.js +0 -508
  31. package/lib/__generated__/text.props.js +0 -516
  32. package/lib/__generated__/textarea.props.js +0 -575
  33. package/lib/__generated__/vimeo-play-button.props.js +0 -563
  34. package/lib/__generated__/vimeo-preview-image.props.js +0 -580
  35. package/lib/__generated__/vimeo-spinner.props.js +0 -508
  36. package/lib/__generated__/vimeo.props.js +0 -665
  37. package/lib/blockquote.js +0 -12
  38. package/lib/blockquote.stories.js +0 -11
  39. package/lib/blockquote.ws.js +0 -75
  40. package/lib/body.js +0 -6
  41. package/lib/body.stories.js +0 -11
  42. package/lib/body.ws.js +0 -31
  43. package/lib/bold.js +0 -6
  44. package/lib/bold.stories.js +0 -11
  45. package/lib/bold.ws.js +0 -21
  46. package/lib/box.js +0 -12
  47. package/lib/box.stories.js +0 -11
  48. package/lib/box.ws.js +0 -44
  49. package/lib/button.js +0 -8
  50. package/lib/button.stories.js +0 -11
  51. package/lib/button.ws.js +0 -36
  52. package/lib/checkbox.js +0 -6
  53. package/lib/checkbox.ws.js +0 -57
  54. package/lib/code-text.js +0 -10
  55. package/lib/code-text.stories.js +0 -11
  56. package/lib/code-text.ws.js +0 -54
  57. package/lib/form.js +0 -6
  58. package/lib/form.stories.js +0 -11
  59. package/lib/form.ws.js +0 -63
  60. package/lib/fragment.js +0 -7
  61. package/lib/fragment.ws.js +0 -10
  62. package/lib/heading.js +0 -12
  63. package/lib/heading.stories.js +0 -11
  64. package/lib/heading.ws.js +0 -37
  65. package/lib/html-embed.js +0 -63
  66. package/lib/html-embed.stories.js +0 -11
  67. package/lib/html-embed.ws.js +0 -28
  68. package/lib/image.js +0 -74
  69. package/lib/image.stories.js +0 -7
  70. package/lib/image.ws.js +0 -48
  71. package/lib/input.js +0 -6
  72. package/lib/input.stories.js +0 -9
  73. package/lib/input.ws.js +0 -43
  74. package/lib/italic.js +0 -6
  75. package/lib/italic.stories.js +0 -11
  76. package/lib/italic.ws.js +0 -27
  77. package/lib/label.js +0 -6
  78. package/lib/label.ws.js +0 -40
  79. package/lib/link.js +0 -33
  80. package/lib/link.stories.js +0 -11
  81. package/lib/link.ws.js +0 -60
  82. package/lib/list-item.js +0 -12
  83. package/lib/list-item.stories.js +0 -11
  84. package/lib/list-item.ws.js +0 -32
  85. package/lib/list.js +0 -12
  86. package/lib/list.stories.js +0 -13
  87. package/lib/list.ws.js +0 -53
  88. package/lib/paragraph.js +0 -6
  89. package/lib/paragraph.stories.js +0 -11
  90. package/lib/paragraph.ws.js +0 -32
  91. package/lib/radio-button.js +0 -6
  92. package/lib/radio-button.ws.js +0 -58
  93. package/lib/rich-text-link.js +0 -6
  94. package/lib/rich-text-link.stories.js +0 -11
  95. package/lib/rich-text-link.ws.js +0 -9
  96. package/lib/separator.js +0 -12
  97. package/lib/separator.stories.js +0 -7
  98. package/lib/separator.ws.js +0 -50
  99. package/lib/slot.js +0 -14
  100. package/lib/slot.stories.js +0 -11
  101. package/lib/slot.ws.js +0 -14
  102. package/lib/span.js +0 -6
  103. package/lib/span.stories.js +0 -11
  104. package/lib/span.ws.js +0 -21
  105. package/lib/subscript.js +0 -6
  106. package/lib/subscript.stories.js +0 -11
  107. package/lib/subscript.ws.js +0 -21
  108. package/lib/superscript.js +0 -6
  109. package/lib/superscript.stories.js +0 -11
  110. package/lib/superscript.ws.js +0 -21
  111. package/lib/text.js +0 -12
  112. package/lib/text.stories.js +0 -11
  113. package/lib/text.ws.js +0 -37
  114. package/lib/textarea.js +0 -6
  115. package/lib/textarea.ws.js +0 -44
  116. package/lib/vimeo-play-button.js +0 -19
  117. package/lib/vimeo-play-button.stories.js +0 -11
  118. package/lib/vimeo-play-button.ws.js +0 -25
  119. package/lib/vimeo-preview-image.js +0 -21
  120. package/lib/vimeo-preview-image.stories.js +0 -11
  121. package/lib/vimeo-preview-image.ws.js +0 -19
  122. package/lib/vimeo-spinner.js +0 -18
  123. package/lib/vimeo-spinner.stories.js +0 -11
  124. package/lib/vimeo-spinner.ws.js +0 -23
  125. package/lib/vimeo.js +0 -279
  126. package/lib/vimeo.stories.js +0 -11
  127. package/lib/vimeo.ws.js +0 -327
@@ -1,58 +0,0 @@
1
- "use strict";
2
- import { RadioCheckedIcon } from "@webstudio-is/icons/svg";
3
- import {
4
- defaultStates
5
- } from "@webstudio-is/react-sdk";
6
- import { input } from "@webstudio-is/react-sdk/css-normalize";
7
- import { props } from "./__generated__/radio-button.props";
8
- const presetStyle = {
9
- input: [
10
- ...input,
11
- {
12
- property: "marginRight",
13
- value: { type: "unit", unit: "em", value: 0.5 }
14
- }
15
- ]
16
- };
17
- export const meta = {
18
- category: "forms",
19
- invalidAncestors: ["Button"],
20
- type: "control",
21
- label: "Radio",
22
- description: "Use within a form to allow your users to select a single option from a set of mutually exclusive choices. Group multiple radios by matching their \u201CName\u201D properties.",
23
- icon: RadioCheckedIcon,
24
- presetStyle,
25
- order: 5,
26
- states: [
27
- ...defaultStates,
28
- { selector: ":checked", label: "Checked" },
29
- { selector: ":required", label: "Required" },
30
- { selector: ":optional", label: "Optional" }
31
- // Additional states will go into submenu
32
- //{ selector: ":disabled", label: "Disabled" },
33
- //{ selector: ":enabled", label: "Enabled" },
34
- //{ selector: ":read-only", label: "Read Only" },
35
- //{ selector: ":read-write", label: "Read Write" },
36
- ],
37
- template: [
38
- {
39
- type: "instance",
40
- component: "Label",
41
- label: "Radio Field",
42
- children: [
43
- { type: "instance", component: "RadioButton", props: [], children: [] },
44
- {
45
- type: "instance",
46
- component: "Text",
47
- label: "Radio Label",
48
- props: [{ type: "string", name: "tag", value: "span" }],
49
- children: [{ type: "text", value: "Radio" }]
50
- }
51
- ]
52
- }
53
- ]
54
- };
55
- export const propsMeta = {
56
- props,
57
- initialProps: ["id", "name"]
58
- };
@@ -1,6 +0,0 @@
1
- "use strict";
2
- import { jsx } from "react/jsx-runtime";
3
- import { forwardRef } from "react";
4
- import { Link } from "./link";
5
- export const RichTextLink = forwardRef((props, ref) => /* @__PURE__ */ jsx(Link, { ...props, ref }));
6
- RichTextLink.displayName = "RichTextLink";
@@ -1,11 +0,0 @@
1
- "use strict";
2
- import { RichTextLink as LinkPrimitive } from "./rich-text-link";
3
- export default {
4
- title: "Components/RichTextLink",
5
- component: LinkPrimitive
6
- };
7
- export const RichTextLink = {
8
- args: {
9
- children: "RichTextLink"
10
- }
11
- };
@@ -1,9 +0,0 @@
1
- "use strict";
2
- import { meta as linkMeta, propsMeta as linkPropsMeta } from "./link.ws";
3
- export const meta = {
4
- ...linkMeta,
5
- category: "hidden",
6
- type: "rich-text-child",
7
- template: []
8
- };
9
- export const propsMeta = linkPropsMeta;
package/lib/separator.js DELETED
@@ -1,12 +0,0 @@
1
- "use strict";
2
- import {
3
- forwardRef,
4
- createElement
5
- } from "react";
6
- export const defaultTag = "hr";
7
- export const Separator = forwardRef(
8
- (props, ref) => {
9
- return createElement(defaultTag, { ...props, ref });
10
- }
11
- );
12
- Separator.displayName = "Separator";
@@ -1,7 +0,0 @@
1
- "use strict";
2
- import { Separator as SeparatorPrimitive } from "./separator";
3
- export default {
4
- title: "Components/Separator",
5
- component: SeparatorPrimitive
6
- };
7
- export const Separator = {};
@@ -1,50 +0,0 @@
1
- "use strict";
2
- import { DashIcon } from "@webstudio-is/icons/svg";
3
- import {
4
- defaultStates
5
- } from "@webstudio-is/react-sdk";
6
- import { hr } from "@webstudio-is/react-sdk/css-normalize";
7
- import { props } from "./__generated__/separator.props";
8
- const presetStyle = {
9
- hr: [
10
- ...hr,
11
- {
12
- property: "height",
13
- value: { type: "keyword", value: "1px" }
14
- },
15
- {
16
- property: "backgroundColor",
17
- value: { type: "keyword", value: "gray" }
18
- },
19
- {
20
- property: "borderTopStyle",
21
- value: { type: "keyword", value: "none" }
22
- },
23
- {
24
- property: "borderRightStyle",
25
- value: { type: "keyword", value: "none" }
26
- },
27
- {
28
- property: "borderLeftStyle",
29
- value: { type: "keyword", value: "none" }
30
- },
31
- {
32
- property: "borderBottomStyle",
33
- value: { type: "keyword", value: "none" }
34
- }
35
- ]
36
- };
37
- export const meta = {
38
- category: "general",
39
- type: "embed",
40
- label: "Separator",
41
- description: "Used to visually divide sections of content, helping to improve readability and organization within a webpage.",
42
- icon: DashIcon,
43
- states: defaultStates,
44
- presetStyle,
45
- order: 5
46
- };
47
- export const propsMeta = {
48
- props,
49
- initialProps: ["id"]
50
- };
package/lib/slot.js DELETED
@@ -1,14 +0,0 @@
1
- "use strict";
2
- import { jsx } from "react/jsx-runtime";
3
- import { forwardRef } from "react";
4
- export const Slot = forwardRef((props, ref) => {
5
- return /* @__PURE__ */ jsx(
6
- "div",
7
- {
8
- ...props,
9
- ref,
10
- style: { display: props.children ? "contents" : "block" }
11
- }
12
- );
13
- });
14
- Slot.displayName = "Slot";
@@ -1,11 +0,0 @@
1
- "use strict";
2
- import { Slot as SlotPrimitive } from "./slot";
3
- export default {
4
- title: "Components/Slot",
5
- component: SlotPrimitive
6
- };
7
- export const Slot = {
8
- args: {
9
- children: "Slot"
10
- }
11
- };
package/lib/slot.ws.js DELETED
@@ -1,14 +0,0 @@
1
- "use strict";
2
- import { SlotComponentIcon } from "@webstudio-is/icons/svg";
3
- export const meta = {
4
- category: "general",
5
- type: "container",
6
- label: "Slot",
7
- description: "Slot is a container for content that you want to reference across the project. Changes made to a Slot's children will be reflected in all other instances of that Slot.",
8
- icon: SlotComponentIcon,
9
- stylable: false,
10
- order: 6
11
- };
12
- export const propsMeta = {
13
- props: {}
14
- };
package/lib/span.js DELETED
@@ -1,6 +0,0 @@
1
- "use strict";
2
- import { jsx } from "react/jsx-runtime";
3
- import { forwardRef } from "react";
4
- export const defaultTag = "span";
5
- export const Span = forwardRef((props, ref) => /* @__PURE__ */ jsx("span", { ...props, ref }));
6
- Span.displayName = "Span";
@@ -1,11 +0,0 @@
1
- "use strict";
2
- import { Span as SpanPrimitive } from "./span";
3
- export default {
4
- title: "Components/Span",
5
- component: SpanPrimitive
6
- };
7
- export const Span = {
8
- args: {
9
- children: "some span text"
10
- }
11
- };
package/lib/span.ws.js DELETED
@@ -1,21 +0,0 @@
1
- "use strict";
2
- import { PaintBrushIcon } from "@webstudio-is/icons/svg";
3
- import {
4
- defaultStates
5
- } from "@webstudio-is/react-sdk";
6
- import { span } from "@webstudio-is/react-sdk/css-normalize";
7
- import { props } from "./__generated__/span.props";
8
- const presetStyle = {
9
- span
10
- };
11
- export const meta = {
12
- type: "rich-text-child",
13
- label: "Text",
14
- icon: PaintBrushIcon,
15
- states: defaultStates,
16
- presetStyle
17
- };
18
- export const propsMeta = {
19
- props,
20
- initialProps: ["id"]
21
- };
package/lib/subscript.js DELETED
@@ -1,6 +0,0 @@
1
- "use strict";
2
- import { jsx } from "react/jsx-runtime";
3
- import { forwardRef } from "react";
4
- export const defaultTag = "sub";
5
- export const Subscript = forwardRef((props, ref) => /* @__PURE__ */ jsx("sub", { ...props, ref }));
6
- Subscript.displayName = "Subscript";
@@ -1,11 +0,0 @@
1
- "use strict";
2
- import { Subscript as SubscriptPrimitive } from "./subscript";
3
- export default {
4
- title: "Components/Subscript",
5
- component: SubscriptPrimitive
6
- };
7
- export const Subscript = {
8
- args: {
9
- children: "some subscript text"
10
- }
11
- };
@@ -1,21 +0,0 @@
1
- "use strict";
2
- import { SubscriptIcon } from "@webstudio-is/icons/svg";
3
- import {
4
- defaultStates
5
- } from "@webstudio-is/react-sdk";
6
- import { sub } from "@webstudio-is/react-sdk/css-normalize";
7
- import { props } from "./__generated__/subscript.props";
8
- const presetStyle = {
9
- sub
10
- };
11
- export const meta = {
12
- type: "rich-text-child",
13
- label: "Subscript Text",
14
- icon: SubscriptIcon,
15
- states: defaultStates,
16
- presetStyle
17
- };
18
- export const propsMeta = {
19
- props,
20
- initialProps: ["id"]
21
- };
@@ -1,6 +0,0 @@
1
- "use strict";
2
- import { jsx } from "react/jsx-runtime";
3
- import { forwardRef } from "react";
4
- export const defaultTag = "sup";
5
- export const Superscript = forwardRef((props, ref) => /* @__PURE__ */ jsx("sup", { ...props, ref }));
6
- Superscript.displayName = "Bold";
@@ -1,11 +0,0 @@
1
- "use strict";
2
- import { Superscript as SuperscriptPrimitive } from "./superscript";
3
- export default {
4
- title: "Components/Superscript",
5
- component: SuperscriptPrimitive
6
- };
7
- export const Superscript = {
8
- args: {
9
- children: "some superscript text"
10
- }
11
- };
@@ -1,21 +0,0 @@
1
- "use strict";
2
- import { SuperscriptIcon } from "@webstudio-is/icons/svg";
3
- import {
4
- defaultStates
5
- } from "@webstudio-is/react-sdk";
6
- import { sup } from "@webstudio-is/react-sdk/css-normalize";
7
- import { props } from "./__generated__/superscript.props";
8
- const presetStyle = {
9
- sup
10
- };
11
- export const meta = {
12
- type: "rich-text-child",
13
- label: "Superscript Text",
14
- icon: SuperscriptIcon,
15
- states: defaultStates,
16
- presetStyle
17
- };
18
- export const propsMeta = {
19
- props,
20
- initialProps: ["id"]
21
- };
package/lib/text.js DELETED
@@ -1,12 +0,0 @@
1
- "use strict";
2
- import {
3
- createElement,
4
- forwardRef
5
- } from "react";
6
- export const defaultTag = "div";
7
- export const Text = forwardRef(
8
- ({ tag = defaultTag, ...props }, ref) => {
9
- return createElement(tag, { ...props, ref });
10
- }
11
- );
12
- Text.displayName = "Text";
@@ -1,11 +0,0 @@
1
- "use strict";
2
- import { Text as TextPrimitive } from "./text";
3
- export default {
4
- title: "Components/Text",
5
- component: TextPrimitive
6
- };
7
- export const Text = {
8
- args: {
9
- children: "text"
10
- }
11
- };
package/lib/text.ws.js DELETED
@@ -1,37 +0,0 @@
1
- "use strict";
2
- import { TextIcon } from "@webstudio-is/icons/svg";
3
- import {
4
- defaultStates
5
- } from "@webstudio-is/react-sdk";
6
- import { div } from "@webstudio-is/react-sdk/css-normalize";
7
- import { props } from "./__generated__/text.props";
8
- const presetStyle = {
9
- div: [
10
- ...div,
11
- {
12
- property: "minHeight",
13
- value: { type: "unit", unit: "em", value: 1 }
14
- }
15
- ]
16
- };
17
- export const meta = {
18
- category: "text",
19
- type: "container",
20
- label: "Text",
21
- description: "A generic container for any text content that is not a heading or a link.",
22
- icon: TextIcon,
23
- states: defaultStates,
24
- presetStyle,
25
- template: [
26
- {
27
- type: "instance",
28
- component: "Text",
29
- children: [{ type: "text", value: "The text you can edit" }]
30
- }
31
- ],
32
- order: 0
33
- };
34
- export const propsMeta = {
35
- props,
36
- initialProps: ["id", "tag"]
37
- };
package/lib/textarea.js DELETED
@@ -1,6 +0,0 @@
1
- "use strict";
2
- import { jsx } from "react/jsx-runtime";
3
- import { forwardRef } from "react";
4
- export const defaultTag = "textarea";
5
- export const Textarea = forwardRef(({ children: _children, ...props }, ref) => /* @__PURE__ */ jsx("textarea", { ...props, ref }));
6
- Textarea.displayName = "Textarea";
@@ -1,44 +0,0 @@
1
- "use strict";
2
- import { FormTextAreaIcon } from "@webstudio-is/icons/svg";
3
- import {
4
- defaultStates
5
- } from "@webstudio-is/react-sdk";
6
- import { textarea } from "@webstudio-is/react-sdk/css-normalize";
7
- import { props } from "./__generated__/textarea.props";
8
- const presetStyle = {
9
- textarea: [
10
- ...textarea,
11
- // resize doesn't work well while on canvas
12
- { property: "resize", value: { type: "keyword", value: "none" } },
13
- {
14
- property: "display",
15
- value: { type: "keyword", value: "block" }
16
- }
17
- ]
18
- };
19
- export const meta = {
20
- category: "forms",
21
- type: "control",
22
- label: "Text Area",
23
- description: "A multi-line text input for collecting longer string data from your users.",
24
- icon: FormTextAreaIcon,
25
- presetStyle,
26
- order: 4,
27
- states: [
28
- ...defaultStates,
29
- { selector: "::placeholder", label: "Placeholder" },
30
- { selector: ":valid", label: "Valid" },
31
- { selector: ":invalid", label: "Invalid" },
32
- { selector: ":required", label: "Required" },
33
- { selector: ":optional", label: "Optional" }
34
- // Additional states will go into submenu
35
- //{ selector: ":disabled", label: "Disabled" },
36
- //{ selector: ":enabled", label: "Enabled" },
37
- //{ selector: ":read-only", label: "Read Only" },
38
- //{ selector: ":read-write", label: "Read Write" },
39
- ]
40
- };
41
- export const propsMeta = {
42
- props,
43
- initialProps: ["id", "name", "placeholder", "required", "autoFocus"]
44
- };
@@ -1,19 +0,0 @@
1
- "use strict";
2
- import { jsx } from "react/jsx-runtime";
3
- import {
4
- forwardRef,
5
- useContext
6
- } from "react";
7
- import { VimeoContext } from "./vimeo";
8
- import { Button, defaultTag } from "./button";
9
- export { defaultTag };
10
- export const VimeoPlayButton = forwardRef(
11
- (props, ref) => {
12
- const vimeoContext = useContext(VimeoContext);
13
- if (vimeoContext.status !== "initial") {
14
- return null;
15
- }
16
- return /* @__PURE__ */ jsx(Button, { ...props, onClick: vimeoContext.onInitPlayer, ref });
17
- }
18
- );
19
- VimeoPlayButton.displayName = "VimeoPlayButton";
@@ -1,11 +0,0 @@
1
- "use strict";
2
- import { VimeoPlayButton as VimeoPlayButtonPrimitive } from "./vimeo-play-button";
3
- export default {
4
- title: "Components/Vimeo Play Button",
5
- component: VimeoPlayButtonPrimitive
6
- };
7
- export const VimeoPlayButton = {
8
- args: {
9
- style: { minHeight: 20, outline: "1px solid black" }
10
- }
11
- };
@@ -1,25 +0,0 @@
1
- "use strict";
2
- import {
3
- defaultStates
4
- } from "@webstudio-is/react-sdk";
5
- import { props } from "./__generated__/vimeo-play-button.props";
6
- import { ButtonElementIcon } from "@webstudio-is/icons/svg";
7
- import { button } from "@webstudio-is/react-sdk/css-normalize";
8
- import { defaultTag } from "./vimeo-play-button";
9
- const presetStyle = {
10
- button
11
- };
12
- export const meta = {
13
- category: "hidden",
14
- type: "container",
15
- invalidAncestors: ["Button"],
16
- requiredAncestors: ["Vimeo"],
17
- label: "Play Button",
18
- icon: ButtonElementIcon,
19
- presetStyle,
20
- states: defaultStates
21
- };
22
- export const propsMeta = {
23
- props,
24
- initialProps: ["id"]
25
- };
@@ -1,21 +0,0 @@
1
- "use strict";
2
- import { jsx } from "react/jsx-runtime";
3
- import {
4
- forwardRef,
5
- useContext
6
- } from "react";
7
- import { Image, defaultTag } from "./image";
8
- import { VimeoContext } from "./vimeo";
9
- const base64Preview = `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkOAMAANIAzr59FiYAAAAASUVORK5CYII=`;
10
- export const VimeoPreviewImage = forwardRef(({ src, ...rest }, ref) => {
11
- const vimeoContext = useContext(VimeoContext);
12
- return /* @__PURE__ */ jsx(
13
- Image,
14
- {
15
- ...rest,
16
- src: String(vimeoContext.previewImageUrl ?? src ?? base64Preview),
17
- ref
18
- }
19
- );
20
- });
21
- VimeoPreviewImage.displayName = "VimeoPreviewImage";
@@ -1,11 +0,0 @@
1
- "use strict";
2
- import { VimeoPreviewImage as VimeoPreviewImagePrimitive } from "./vimeo-preview-image";
3
- export default {
4
- title: "Components/Vimeo Preview Image",
5
- component: VimeoPreviewImagePrimitive
6
- };
7
- export const VimeoPreviewImage = {
8
- args: {
9
- style: { minHeight: 20, outline: "1px solid black" }
10
- }
11
- };
@@ -1,19 +0,0 @@
1
- "use strict";
2
- import {
3
- } from "@webstudio-is/react-sdk";
4
- import {
5
- propsOverrides as imagePropsOverrides,
6
- propsMeta as imagePropsMeta,
7
- meta as imageMeta
8
- } from "./image.ws";
9
- import { props } from "./__generated__/vimeo-preview-image.props";
10
- export const meta = {
11
- ...imageMeta,
12
- category: "hidden",
13
- label: "Preview Image",
14
- requiredAncestors: ["Vimeo"]
15
- };
16
- export const propsMeta = {
17
- props: { ...props, ...imagePropsOverrides },
18
- initialProps: imagePropsMeta.initialProps
19
- };
@@ -1,18 +0,0 @@
1
- "use strict";
2
- import { jsx } from "react/jsx-runtime";
3
- import {
4
- forwardRef,
5
- useContext
6
- } from "react";
7
- import { VimeoContext } from "./vimeo";
8
- const defaultTag = "div";
9
- export const VimeoSpinner = forwardRef(
10
- (props, ref) => {
11
- const vimeoContext = useContext(VimeoContext);
12
- if (vimeoContext.status !== "initialized") {
13
- return null;
14
- }
15
- return /* @__PURE__ */ jsx("div", { ...props, ref });
16
- }
17
- );
18
- VimeoSpinner.displayName = "VimeoSpinner";
@@ -1,11 +0,0 @@
1
- "use strict";
2
- import { VimeoSpinner as VimeoSpinnerPrimitive } from "./vimeo-spinner";
3
- export default {
4
- title: "Components/Vimeo Spinner",
5
- component: VimeoSpinnerPrimitive
6
- };
7
- export const VimeoSpinner = {
8
- args: {
9
- style: { minHeight: 20, outline: "1px solid black" }
10
- }
11
- };
@@ -1,23 +0,0 @@
1
- "use strict";
2
- import {
3
- defaultStates
4
- } from "@webstudio-is/react-sdk";
5
- import { props } from "./__generated__/vimeo-spinner.props";
6
- import { div } from "@webstudio-is/react-sdk/css-normalize";
7
- import { BoxIcon } from "@webstudio-is/icons/svg";
8
- const presetStyle = {
9
- div
10
- };
11
- export const meta = {
12
- type: "container",
13
- icon: BoxIcon,
14
- states: defaultStates,
15
- presetStyle,
16
- category: "hidden",
17
- label: "Spinner",
18
- requiredAncestors: ["Vimeo"]
19
- };
20
- export const propsMeta = {
21
- props,
22
- initialProps: ["id"]
23
- };