@webstudio-is/sdk-components-react 0.191.0 → 0.191.4

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 (243) hide show
  1. package/package.json +7 -7
  2. package/lib/__generated__/blockquote.props.js +0 -514
  3. package/lib/__generated__/body.props.js +0 -508
  4. package/lib/__generated__/bold.props.js +0 -508
  5. package/lib/__generated__/box.props.js +0 -527
  6. package/lib/__generated__/button.props.js +0 -570
  7. package/lib/__generated__/checkbox.props.js +0 -672
  8. package/lib/__generated__/code-text.props.js +0 -509
  9. package/lib/__generated__/form.props.js +0 -556
  10. package/lib/__generated__/heading.props.js +0 -516
  11. package/lib/__generated__/html-embed.props.js +0 -13
  12. package/lib/__generated__/image.props.js +0 -592
  13. package/lib/__generated__/input.props.js +0 -696
  14. package/lib/__generated__/italic.props.js +0 -508
  15. package/lib/__generated__/label.props.js +0 -520
  16. package/lib/__generated__/link.props.js +0 -568
  17. package/lib/__generated__/list-item.props.js +0 -514
  18. package/lib/__generated__/list.props.js +0 -534
  19. package/lib/__generated__/markdown-embed.props.js +0 -7
  20. package/lib/__generated__/option.props.js +0 -532
  21. package/lib/__generated__/paragraph.props.js +0 -508
  22. package/lib/__generated__/radio-button.props.js +0 -672
  23. package/lib/__generated__/select.props.js +0 -556
  24. package/lib/__generated__/separator.props.js +0 -508
  25. package/lib/__generated__/span.props.js +0 -508
  26. package/lib/__generated__/subscript.props.js +0 -508
  27. package/lib/__generated__/superscript.props.js +0 -508
  28. package/lib/__generated__/text.props.js +0 -516
  29. package/lib/__generated__/textarea.props.js +0 -587
  30. package/lib/__generated__/time.props.js +0 -312
  31. package/lib/__generated__/vimeo-play-button.props.js +0 -569
  32. package/lib/__generated__/vimeo-preview-image.props.js +0 -586
  33. package/lib/__generated__/vimeo-spinner.props.js +0 -508
  34. package/lib/__generated__/vimeo.props.js +0 -674
  35. package/lib/__generated__/xml-node.props.js +0 -7
  36. package/lib/__generated__/xml-time.props.js +0 -18
  37. package/lib/blockquote.js +0 -9
  38. package/lib/blockquote.ws.js +0 -79
  39. package/lib/body.js +0 -7
  40. package/lib/body.ws.js +0 -30
  41. package/lib/bold.js +0 -7
  42. package/lib/bold.ws.js +0 -20
  43. package/lib/box.js +0 -9
  44. package/lib/box.ws.js +0 -31
  45. package/lib/button.js +0 -9
  46. package/lib/button.ws.js +0 -44
  47. package/lib/checkbox.js +0 -15
  48. package/lib/checkbox.ws.js +0 -59
  49. package/lib/code-text.js +0 -10
  50. package/lib/code-text.ws.js +0 -60
  51. package/lib/components.js +0 -79
  52. package/lib/content-embed.ws.js +0 -77
  53. package/lib/form.js +0 -7
  54. package/lib/form.ws.js +0 -31
  55. package/lib/fragment.js +0 -7
  56. package/lib/fragment.ws.js +0 -11
  57. package/lib/heading.js +0 -9
  58. package/lib/heading.ws.js +0 -45
  59. package/lib/home_wsKvRSqvkajPPBeycZ-C8.svg +0 -3
  60. package/lib/hooks.js +0 -5
  61. package/lib/html-embed-patchers.js +0 -29
  62. package/lib/html-embed.js +0 -112
  63. package/lib/html-embed.ws.js +0 -46
  64. package/lib/image.js +0 -40
  65. package/lib/image.ws.js +0 -65
  66. package/lib/input.js +0 -17
  67. package/lib/input.ws.js +0 -55
  68. package/lib/italic.js +0 -7
  69. package/lib/italic.ws.js +0 -26
  70. package/lib/label.js +0 -7
  71. package/lib/label.ws.js +0 -43
  72. package/lib/link.js +0 -15
  73. package/lib/link.ws.js +0 -68
  74. package/lib/list-item.js +0 -9
  75. package/lib/list-item.ws.js +0 -40
  76. package/lib/list.js +0 -6
  77. package/lib/list.ws.js +0 -92
  78. package/lib/markdown-embed.js +0 -14
  79. package/lib/markdown-embed.ws.js +0 -111
  80. package/lib/metas.js +0 -81
  81. package/lib/option.js +0 -7
  82. package/lib/option.ws.js +0 -47
  83. package/lib/paragraph.js +0 -7
  84. package/lib/paragraph.ws.js +0 -40
  85. package/lib/props.js +0 -79
  86. package/lib/radio-button.js +0 -15
  87. package/lib/radio-button.ws.js +0 -61
  88. package/lib/rich-text-link.js +0 -8
  89. package/lib/rich-text-link.ws.js +0 -11
  90. package/lib/select.js +0 -19
  91. package/lib/select.ws.js +0 -97
  92. package/lib/separator.js +0 -9
  93. package/lib/separator.ws.js +0 -48
  94. package/lib/slot.js +0 -14
  95. package/lib/slot.ws.js +0 -15
  96. package/lib/span.js +0 -7
  97. package/lib/span.ws.js +0 -20
  98. package/lib/subscript.js +0 -7
  99. package/lib/subscript.ws.js +0 -20
  100. package/lib/superscript.js +0 -7
  101. package/lib/superscript.ws.js +0 -20
  102. package/lib/text.js +0 -10
  103. package/lib/text.ws.js +0 -41
  104. package/lib/textarea.js +0 -7
  105. package/lib/textarea.ws.js +0 -56
  106. package/lib/time.js +0 -319
  107. package/lib/time.ws.js +0 -22
  108. package/lib/types/__generated__/blockquote.props.d.ts +0 -2
  109. package/lib/types/__generated__/body.props.d.ts +0 -2
  110. package/lib/types/__generated__/bold.props.d.ts +0 -2
  111. package/lib/types/__generated__/box.props.d.ts +0 -2
  112. package/lib/types/__generated__/button.props.d.ts +0 -2
  113. package/lib/types/__generated__/checkbox.props.d.ts +0 -2
  114. package/lib/types/__generated__/code-text.props.d.ts +0 -2
  115. package/lib/types/__generated__/form.props.d.ts +0 -2
  116. package/lib/types/__generated__/fragment.props.d.ts +0 -2
  117. package/lib/types/__generated__/heading.props.d.ts +0 -2
  118. package/lib/types/__generated__/html-embed.props.d.ts +0 -2
  119. package/lib/types/__generated__/image.props.d.ts +0 -2
  120. package/lib/types/__generated__/input.props.d.ts +0 -2
  121. package/lib/types/__generated__/italic.props.d.ts +0 -2
  122. package/lib/types/__generated__/label.props.d.ts +0 -2
  123. package/lib/types/__generated__/link.props.d.ts +0 -2
  124. package/lib/types/__generated__/list-item.props.d.ts +0 -2
  125. package/lib/types/__generated__/list.props.d.ts +0 -2
  126. package/lib/types/__generated__/local-date.props.d.ts +0 -2
  127. package/lib/types/__generated__/markdown-embed.props.d.ts +0 -2
  128. package/lib/types/__generated__/option.props.d.ts +0 -2
  129. package/lib/types/__generated__/paragraph.props.d.ts +0 -2
  130. package/lib/types/__generated__/radio-button.props.d.ts +0 -2
  131. package/lib/types/__generated__/rich-text-link.props.d.ts +0 -2
  132. package/lib/types/__generated__/select.props.d.ts +0 -2
  133. package/lib/types/__generated__/separator.props.d.ts +0 -2
  134. package/lib/types/__generated__/slot.props.d.ts +0 -2
  135. package/lib/types/__generated__/span.props.d.ts +0 -2
  136. package/lib/types/__generated__/subscript.props.d.ts +0 -2
  137. package/lib/types/__generated__/superscript.props.d.ts +0 -2
  138. package/lib/types/__generated__/text.props.d.ts +0 -2
  139. package/lib/types/__generated__/textarea.props.d.ts +0 -2
  140. package/lib/types/__generated__/time.props.d.ts +0 -2
  141. package/lib/types/__generated__/vimeo-play-button.props.d.ts +0 -2
  142. package/lib/types/__generated__/vimeo-preview-image.props.d.ts +0 -2
  143. package/lib/types/__generated__/vimeo-spinner.props.d.ts +0 -2
  144. package/lib/types/__generated__/vimeo.props.d.ts +0 -2
  145. package/lib/types/__generated__/xml-node.props.d.ts +0 -2
  146. package/lib/types/__generated__/xml-time.props.d.ts +0 -2
  147. package/lib/types/blockquote.d.ts +0 -2
  148. package/lib/types/blockquote.ws.d.ts +0 -3
  149. package/lib/types/body.d.ts +0 -2
  150. package/lib/types/body.ws.d.ts +0 -3
  151. package/lib/types/bold.d.ts +0 -2
  152. package/lib/types/bold.ws.d.ts +0 -3
  153. package/lib/types/box.d.ts +0 -8
  154. package/lib/types/box.ws.d.ts +0 -3
  155. package/lib/types/button.d.ts +0 -2
  156. package/lib/types/button.ws.d.ts +0 -3
  157. package/lib/types/checkbox.d.ts +0 -4
  158. package/lib/types/checkbox.ws.d.ts +0 -3
  159. package/lib/types/code-text.d.ts +0 -4
  160. package/lib/types/code-text.ws.d.ts +0 -3
  161. package/lib/types/components.d.ts +0 -39
  162. package/lib/types/content-embed.ws.d.ts +0 -2
  163. package/lib/types/form.d.ts +0 -2
  164. package/lib/types/form.ws.d.ts +0 -3
  165. package/lib/types/fragment.d.ts +0 -6
  166. package/lib/types/fragment.ws.d.ts +0 -3
  167. package/lib/types/heading.d.ts +0 -8
  168. package/lib/types/heading.ws.d.ts +0 -3
  169. package/lib/types/hooks.d.ts +0 -2
  170. package/lib/types/html-embed-patchers.d.ts +0 -2
  171. package/lib/types/html-embed.d.ts +0 -12
  172. package/lib/types/html-embed.test.d.ts +0 -1
  173. package/lib/types/html-embed.ws.d.ts +0 -3
  174. package/lib/types/image.d.ts +0 -8
  175. package/lib/types/image.ws.d.ts +0 -11
  176. package/lib/types/input.d.ts +0 -4
  177. package/lib/types/input.ws.d.ts +0 -3
  178. package/lib/types/italic.d.ts +0 -2
  179. package/lib/types/italic.ws.d.ts +0 -3
  180. package/lib/types/label.d.ts +0 -2
  181. package/lib/types/label.ws.d.ts +0 -3
  182. package/lib/types/link.d.ts +0 -7
  183. package/lib/types/link.ws.d.ts +0 -3
  184. package/lib/types/list-item.d.ts +0 -2
  185. package/lib/types/list-item.ws.d.ts +0 -3
  186. package/lib/types/list.d.ts +0 -10
  187. package/lib/types/list.ws.d.ts +0 -3
  188. package/lib/types/markdown-embed.d.ts +0 -7
  189. package/lib/types/markdown-embed.ws.d.ts +0 -3
  190. package/lib/types/metas.d.ts +0 -40
  191. package/lib/types/option.d.ts +0 -2
  192. package/lib/types/option.ws.d.ts +0 -3
  193. package/lib/types/paragraph.d.ts +0 -2
  194. package/lib/types/paragraph.ws.d.ts +0 -3
  195. package/lib/types/props.d.ts +0 -39
  196. package/lib/types/radio-button.d.ts +0 -4
  197. package/lib/types/radio-button.ws.d.ts +0 -3
  198. package/lib/types/rich-text-link.d.ts +0 -2
  199. package/lib/types/rich-text-link.ws.d.ts +0 -3
  200. package/lib/types/select.d.ts +0 -4
  201. package/lib/types/select.ws.d.ts +0 -3
  202. package/lib/types/separator.d.ts +0 -2
  203. package/lib/types/separator.ws.d.ts +0 -3
  204. package/lib/types/slot.d.ts +0 -6
  205. package/lib/types/slot.ws.d.ts +0 -3
  206. package/lib/types/span.d.ts +0 -2
  207. package/lib/types/span.ws.d.ts +0 -3
  208. package/lib/types/subscript.d.ts +0 -2
  209. package/lib/types/subscript.ws.d.ts +0 -3
  210. package/lib/types/superscript.d.ts +0 -2
  211. package/lib/types/superscript.ws.d.ts +0 -3
  212. package/lib/types/test-utils/cartesian.d.ts +0 -2
  213. package/lib/types/text.d.ts +0 -8
  214. package/lib/types/text.ws.d.ts +0 -3
  215. package/lib/types/textarea.d.ts +0 -2
  216. package/lib/types/textarea.ws.d.ts +0 -3
  217. package/lib/types/time.d.ts +0 -18
  218. package/lib/types/time.test.d.ts +0 -1
  219. package/lib/types/time.ws.d.ts +0 -3
  220. package/lib/types/vimeo-play-button.d.ts +0 -3
  221. package/lib/types/vimeo-play-button.ws.d.ts +0 -3
  222. package/lib/types/vimeo-preview-image.d.ts +0 -284
  223. package/lib/types/vimeo-preview-image.ws.d.ts +0 -3
  224. package/lib/types/vimeo-spinner.d.ts +0 -1
  225. package/lib/types/vimeo-spinner.ws.d.ts +0 -3
  226. package/lib/types/vimeo.d.ts +0 -75
  227. package/lib/types/vimeo.ws.d.ts +0 -3
  228. package/lib/types/xml-node.d.ts +0 -13
  229. package/lib/types/xml-node.ws.d.ts +0 -3
  230. package/lib/types/xml-time.d.ts +0 -6
  231. package/lib/types/xml-time.ws.d.ts +0 -3
  232. package/lib/vimeo-play-button.js +0 -15
  233. package/lib/vimeo-play-button.ws.js +0 -33
  234. package/lib/vimeo-preview-image.js +0 -19
  235. package/lib/vimeo-preview-image.ws.js +0 -20
  236. package/lib/vimeo-spinner.js +0 -13
  237. package/lib/vimeo-spinner.ws.js +0 -26
  238. package/lib/vimeo.js +0 -215
  239. package/lib/vimeo.ws.js +0 -330
  240. package/lib/xml-node.js +0 -44
  241. package/lib/xml-node.ws.js +0 -18
  242. package/lib/xml-time.js +0 -25
  243. package/lib/xml-time.ws.js +0 -18
package/lib/select.ws.js DELETED
@@ -1,97 +0,0 @@
1
- import { SelectIcon as e } from "@webstudio-is/icons/svg";
2
- import { defaultStates as t } from "@webstudio-is/react-sdk";
3
- import { select as n } from "@webstudio-is/sdk/normalize.css";
4
- import { props as l } from "./__generated__/select.props.js";
5
- const o = {
6
- select: [
7
- ...n,
8
- {
9
- property: "display",
10
- value: { type: "keyword", value: "block" }
11
- }
12
- ]
13
- }, s = {
14
- category: "forms",
15
- invalidAncestors: ["Button", "Link"],
16
- constraints: {
17
- relation: "ancestor",
18
- component: { $nin: ["Button", "Link"] }
19
- },
20
- type: "container",
21
- description: "A drop-down menu for users to select a single option from a predefined list.",
22
- icon: e,
23
- presetStyle: o,
24
- order: 4,
25
- states: [
26
- ...t,
27
- { selector: "::placeholder", label: "Placeholder" },
28
- { selector: ":valid", label: "Valid" },
29
- { selector: ":invalid", label: "Invalid" },
30
- { selector: ":required", label: "Required" },
31
- { selector: ":optional", label: "Optional" }
32
- ],
33
- template: [
34
- {
35
- type: "instance",
36
- component: "Select",
37
- label: "Select",
38
- children: [
39
- {
40
- type: "instance",
41
- component: "Option",
42
- label: "Option",
43
- props: [
44
- { type: "string", name: "label", value: "Please choose an option" },
45
- { type: "string", name: "value", value: "" }
46
- ],
47
- children: []
48
- },
49
- {
50
- type: "instance",
51
- component: "Option",
52
- label: "Option",
53
- props: [
54
- { type: "string", name: "label", value: "Option A" },
55
- { type: "string", name: "value", value: "a" }
56
- ],
57
- children: []
58
- },
59
- {
60
- type: "instance",
61
- component: "Option",
62
- label: "Option",
63
- props: [
64
- { type: "string", name: "label", value: "Option B" },
65
- { type: "string", name: "value", value: "b" }
66
- ],
67
- children: []
68
- },
69
- {
70
- type: "instance",
71
- component: "Option",
72
- label: "Option",
73
- props: [
74
- { type: "string", name: "label", value: "Option C" },
75
- { type: "string", name: "value", value: "c" }
76
- ],
77
- children: []
78
- }
79
- ]
80
- }
81
- ]
82
- }, c = {
83
- props: l,
84
- initialProps: [
85
- "id",
86
- "className",
87
- "name",
88
- "value",
89
- "multiple",
90
- "required",
91
- "autoFocus"
92
- ]
93
- };
94
- export {
95
- s as meta,
96
- c as propsMeta
97
- };
package/lib/separator.js DELETED
@@ -1,9 +0,0 @@
1
- import { forwardRef as a, createElement as t } from "react";
2
- const o = "hr", p = a(
3
- (r, e) => t(o, { ...r, ref: e })
4
- );
5
- p.displayName = "Separator";
6
- export {
7
- p as Separator,
8
- o as defaultTag
9
- };
@@ -1,48 +0,0 @@
1
- import { DashIcon as e } from "@webstudio-is/icons/svg";
2
- import { defaultStates as o } from "@webstudio-is/react-sdk";
3
- import { hr as r } from "@webstudio-is/sdk/normalize.css";
4
- import { props as t } from "./__generated__/separator.props.js";
5
- const p = {
6
- hr: [
7
- ...r,
8
- {
9
- property: "height",
10
- value: { type: "keyword", value: "1px" }
11
- },
12
- {
13
- property: "backgroundColor",
14
- value: { type: "keyword", value: "gray" }
15
- },
16
- {
17
- property: "borderTopStyle",
18
- value: { type: "keyword", value: "none" }
19
- },
20
- {
21
- property: "borderRightStyle",
22
- value: { type: "keyword", value: "none" }
23
- },
24
- {
25
- property: "borderLeftStyle",
26
- value: { type: "keyword", value: "none" }
27
- },
28
- {
29
- property: "borderBottomStyle",
30
- value: { type: "keyword", value: "none" }
31
- }
32
- ]
33
- }, n = {
34
- category: "general",
35
- type: "embed",
36
- description: "Used to visually divide sections of content, helping to improve readability and organization within a webpage.",
37
- icon: e,
38
- states: o,
39
- presetStyle: p,
40
- order: 5
41
- }, d = {
42
- props: t,
43
- initialProps: ["id", "className"]
44
- };
45
- export {
46
- n as meta,
47
- d as propsMeta
48
- };
package/lib/slot.js DELETED
@@ -1,14 +0,0 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { forwardRef as e } from "react";
3
- const l = e((o, t) => /* @__PURE__ */ r(
4
- "div",
5
- {
6
- ...o,
7
- ref: t,
8
- style: { display: o.children ? "contents" : "block" }
9
- }
10
- ));
11
- l.displayName = "Slot";
12
- export {
13
- l as Slot
14
- };
package/lib/slot.ws.js DELETED
@@ -1,15 +0,0 @@
1
- import { SlotComponentIcon as t } from "@webstudio-is/icons/svg";
2
- const o = {
3
- category: "general",
4
- type: "container",
5
- 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.",
6
- icon: t,
7
- stylable: !1,
8
- order: 6
9
- }, n = {
10
- props: {}
11
- };
12
- export {
13
- o as meta,
14
- n as propsMeta
15
- };
package/lib/span.js DELETED
@@ -1,7 +0,0 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { forwardRef as a } from "react";
3
- const m = a((o, p) => /* @__PURE__ */ r("span", { ...o, ref: p }));
4
- m.displayName = "Span";
5
- export {
6
- m as Span
7
- };
package/lib/span.ws.js DELETED
@@ -1,20 +0,0 @@
1
- import { PaintBrushIcon as t } from "@webstudio-is/icons/svg";
2
- import { defaultStates as o } from "@webstudio-is/react-sdk";
3
- import { span as r } from "@webstudio-is/sdk/normalize.css";
4
- import { props as e } from "./__generated__/span.props.js";
5
- const s = {
6
- span: r
7
- }, c = {
8
- type: "rich-text-child",
9
- label: "Text",
10
- icon: t,
11
- states: o,
12
- presetStyle: s
13
- }, n = {
14
- props: e,
15
- initialProps: ["id", "className"]
16
- };
17
- export {
18
- c as meta,
19
- n as propsMeta
20
- };
package/lib/subscript.js DELETED
@@ -1,7 +0,0 @@
1
- import { jsx as p } from "react/jsx-runtime";
2
- import { forwardRef as s } from "react";
3
- const t = s((r, o) => /* @__PURE__ */ p("sub", { ...r, ref: o }));
4
- t.displayName = "Subscript";
5
- export {
6
- t as Subscript
7
- };
@@ -1,20 +0,0 @@
1
- import { SubscriptIcon as t } from "@webstudio-is/icons/svg";
2
- import { defaultStates as o } from "@webstudio-is/react-sdk";
3
- import { sub as r } from "@webstudio-is/sdk/normalize.css";
4
- import { props as s } from "./__generated__/subscript.props.js";
5
- const e = {
6
- sub: r
7
- }, a = {
8
- type: "rich-text-child",
9
- label: "Subscript Text",
10
- icon: t,
11
- states: o,
12
- presetStyle: e
13
- }, l = {
14
- props: s,
15
- initialProps: ["id", "className"]
16
- };
17
- export {
18
- a as meta,
19
- l as propsMeta
20
- };
@@ -1,7 +0,0 @@
1
- import { jsx as p } from "react/jsx-runtime";
2
- import { forwardRef as m } from "react";
3
- const s = m((r, o) => /* @__PURE__ */ p("sup", { ...r, ref: o }));
4
- s.displayName = "Bold";
5
- export {
6
- s as Superscript
7
- };
@@ -1,20 +0,0 @@
1
- import { SuperscriptIcon as t } from "@webstudio-is/icons/svg";
2
- import { defaultStates as r } from "@webstudio-is/react-sdk";
3
- import { sup as o } from "@webstudio-is/sdk/normalize.css";
4
- import { props as p } from "./__generated__/superscript.props.js";
5
- const e = {
6
- sup: o
7
- }, a = {
8
- type: "rich-text-child",
9
- label: "Superscript Text",
10
- icon: t,
11
- states: r,
12
- presetStyle: e
13
- }, l = {
14
- props: p,
15
- initialProps: ["id", "className"]
16
- };
17
- export {
18
- a as meta,
19
- l as propsMeta
20
- };
package/lib/text.js DELETED
@@ -1,10 +0,0 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import { forwardRef as f } from "react";
3
- const m = "div", s = f(
4
- ({ tag: t = m, children: o, ...r }, a) => /* @__PURE__ */ e(t, { ...r, ref: a, children: o })
5
- );
6
- s.displayName = "Text";
7
- export {
8
- s as Text,
9
- m as defaultTag
10
- };
package/lib/text.ws.js DELETED
@@ -1,41 +0,0 @@
1
- import { TextIcon as t } from "@webstudio-is/icons/svg";
2
- import { defaultStates as e } from "@webstudio-is/react-sdk";
3
- import { div as o } from "@webstudio-is/sdk/normalize.css";
4
- import { props as n } from "./__generated__/text.props.js";
5
- const r = {
6
- div: [
7
- ...o,
8
- {
9
- property: "minHeight",
10
- value: { type: "unit", unit: "em", value: 1 }
11
- }
12
- ]
13
- }, s = {
14
- category: "text",
15
- type: "container",
16
- description: "A generic container for any text content that is not a heading or a link.",
17
- icon: t,
18
- states: e,
19
- presetStyle: r,
20
- order: 0,
21
- template: [
22
- {
23
- type: "instance",
24
- component: "Text",
25
- children: [
26
- {
27
- type: "text",
28
- value: "The text you can edit",
29
- placeholder: !0
30
- }
31
- ]
32
- }
33
- ]
34
- }, m = {
35
- props: n,
36
- initialProps: ["id", "className", "tag"]
37
- };
38
- export {
39
- s as meta,
40
- m as propsMeta
41
- };
package/lib/textarea.js DELETED
@@ -1,7 +0,0 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { forwardRef as d } from "react";
3
- const f = d(({ children: i, value: e, defaultValue: r, ...a }, t) => /* @__PURE__ */ o("textarea", { ...a, defaultValue: e ?? r, ref: t }));
4
- f.displayName = "Textarea";
5
- export {
6
- f as Textarea
7
- };
@@ -1,56 +0,0 @@
1
- import { FormTextAreaIcon as e } from "@webstudio-is/icons/svg";
2
- import { defaultStates as t } from "@webstudio-is/react-sdk";
3
- import { textarea as o } from "@webstudio-is/sdk/normalize.css";
4
- import { props as r } from "./__generated__/textarea.props.js";
5
- const l = {
6
- textarea: [
7
- ...o,
8
- // resize doesn't work well while on canvas
9
- { property: "resize", value: { type: "keyword", value: "none" } },
10
- {
11
- property: "display",
12
- value: { type: "keyword", value: "block" }
13
- }
14
- ]
15
- }, p = {
16
- category: "forms",
17
- type: "control",
18
- label: "Text Area",
19
- description: "A multi-line text input for collecting longer string data from your users.",
20
- icon: e,
21
- presetStyle: l,
22
- order: 4,
23
- invalidAncestors: ["Button", "Link"],
24
- constraints: {
25
- relation: "ancestor",
26
- component: { $nin: ["Button", "Link"] }
27
- },
28
- states: [
29
- ...t,
30
- { selector: "::placeholder", label: "Placeholder" },
31
- { selector: ":valid", label: "Valid" },
32
- { selector: ":invalid", label: "Invalid" },
33
- { selector: ":required", label: "Required" },
34
- { selector: ":optional", label: "Optional" }
35
- // Additional states will go into submenu
36
- //{ selector: ":disabled", label: "Disabled" },
37
- //{ selector: ":enabled", label: "Enabled" },
38
- //{ selector: ":read-only", label: "Read Only" },
39
- //{ selector: ":read-write", label: "Read Write" },
40
- ]
41
- }, c = {
42
- props: r,
43
- initialProps: [
44
- "id",
45
- "className",
46
- "name",
47
- "value",
48
- "placeholder",
49
- "required",
50
- "autoFocus"
51
- ]
52
- };
53
- export {
54
- p as meta,
55
- c as propsMeta
56
- };