@webstudio-is/sdk-components-react 0.0.0-021f2d4

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 (316) hide show
  1. package/LICENSE +661 -0
  2. package/README.md +3 -0
  3. package/lib/__generated__/blockquote.props.js +514 -0
  4. package/lib/__generated__/body.props.js +508 -0
  5. package/lib/__generated__/bold.props.js +508 -0
  6. package/lib/__generated__/box.props.js +527 -0
  7. package/lib/__generated__/button.props.js +570 -0
  8. package/lib/__generated__/checkbox.props.js +672 -0
  9. package/lib/__generated__/code-text.props.js +509 -0
  10. package/lib/__generated__/form.props.js +556 -0
  11. package/lib/__generated__/head-link.props.js +620 -0
  12. package/lib/__generated__/head-meta.props.js +532 -0
  13. package/lib/__generated__/head-title.props.js +508 -0
  14. package/lib/__generated__/head.props.js +508 -0
  15. package/lib/__generated__/heading.props.js +516 -0
  16. package/lib/__generated__/html-embed.props.js +13 -0
  17. package/lib/__generated__/image.props.js +593 -0
  18. package/lib/__generated__/input.props.js +696 -0
  19. package/lib/__generated__/italic.props.js +508 -0
  20. package/lib/__generated__/label.props.js +520 -0
  21. package/lib/__generated__/link.props.js +578 -0
  22. package/lib/__generated__/list-item.props.js +514 -0
  23. package/lib/__generated__/list.props.js +534 -0
  24. package/lib/__generated__/markdown-embed.props.js +7 -0
  25. package/lib/__generated__/option.props.js +532 -0
  26. package/lib/__generated__/paragraph.props.js +508 -0
  27. package/lib/__generated__/radio-button.props.js +672 -0
  28. package/lib/__generated__/select.props.js +556 -0
  29. package/lib/__generated__/separator.props.js +508 -0
  30. package/lib/__generated__/span.props.js +508 -0
  31. package/lib/__generated__/subscript.props.js +508 -0
  32. package/lib/__generated__/superscript.props.js +508 -0
  33. package/lib/__generated__/text.props.js +516 -0
  34. package/lib/__generated__/textarea.props.js +587 -0
  35. package/lib/__generated__/time.props.js +312 -0
  36. package/lib/__generated__/vimeo-play-button.props.js +569 -0
  37. package/lib/__generated__/vimeo-preview-image.props.js +591 -0
  38. package/lib/__generated__/vimeo-spinner.props.js +508 -0
  39. package/lib/__generated__/vimeo.props.js +673 -0
  40. package/lib/__generated__/webhook-form.props.js +569 -0
  41. package/lib/__generated__/xml-node.props.js +21 -0
  42. package/lib/__generated__/xml-time.props.js +18 -0
  43. package/lib/__generated__/youtube.props.js +665 -0
  44. package/lib/blockquote.js +9 -0
  45. package/lib/blockquote.template.js +11 -0
  46. package/lib/blockquote.ws.js +63 -0
  47. package/lib/body.js +7 -0
  48. package/lib/body.ws.js +29 -0
  49. package/lib/bold.js +7 -0
  50. package/lib/bold.ws.js +20 -0
  51. package/lib/box.js +9 -0
  52. package/lib/box.ws.js +31 -0
  53. package/lib/button.js +9 -0
  54. package/lib/button.template.js +11 -0
  55. package/lib/button.ws.js +27 -0
  56. package/lib/checkbox.js +15 -0
  57. package/lib/checkbox.template.js +14 -0
  58. package/lib/checkbox.ws.js +38 -0
  59. package/lib/code-text.js +10 -0
  60. package/lib/code-text.ws.js +59 -0
  61. package/lib/components.js +89 -0
  62. package/lib/content-embed.template.js +83 -0
  63. package/lib/form.js +7 -0
  64. package/lib/form.ws.js +30 -0
  65. package/lib/fragment.js +7 -0
  66. package/lib/fragment.ws.js +10 -0
  67. package/lib/head-link.js +23 -0
  68. package/lib/head-link.ws.js +19 -0
  69. package/lib/head-meta.js +23 -0
  70. package/lib/head-meta.ws.js +19 -0
  71. package/lib/head-slot.js +54 -0
  72. package/lib/head-slot.template.js +15 -0
  73. package/lib/head-slot.ws.js +25 -0
  74. package/lib/head-title.js +23 -0
  75. package/lib/head-title.ws.js +18 -0
  76. package/lib/heading.js +9 -0
  77. package/lib/heading.template.js +11 -0
  78. package/lib/heading.ws.js +28 -0
  79. package/lib/home_wsKvRSqvkajPPBeycZ-C8.svg +3 -0
  80. package/lib/hooks.js +6 -0
  81. package/lib/html-embed-patchers.js +29 -0
  82. package/lib/html-embed.js +112 -0
  83. package/lib/html-embed.ws.js +46 -0
  84. package/lib/image.js +38 -0
  85. package/lib/image.ws.js +60 -0
  86. package/lib/input.js +17 -0
  87. package/lib/input.ws.js +54 -0
  88. package/lib/italic.js +7 -0
  89. package/lib/italic.ws.js +26 -0
  90. package/lib/label.js +7 -0
  91. package/lib/label.template.js +10 -0
  92. package/lib/label.ws.js +27 -0
  93. package/lib/link.js +15 -0
  94. package/lib/link.template.js +11 -0
  95. package/lib/link.ws.js +47 -0
  96. package/lib/list-item.js +9 -0
  97. package/lib/list-item.template.js +11 -0
  98. package/lib/list-item.ws.js +26 -0
  99. package/lib/list.js +6 -0
  100. package/lib/list.template.js +15 -0
  101. package/lib/list.ws.js +48 -0
  102. package/lib/markdown-embed.js +19 -0
  103. package/lib/markdown-embed.template.js +75 -0
  104. package/lib/markdown-embed.ws.js +33 -0
  105. package/lib/metas.js +90 -0
  106. package/lib/option.js +7 -0
  107. package/lib/option.ws.js +44 -0
  108. package/lib/paragraph.js +7 -0
  109. package/lib/paragraph.template.js +11 -0
  110. package/lib/paragraph.ws.js +23 -0
  111. package/lib/props.js +90 -0
  112. package/lib/radio-button.js +15 -0
  113. package/lib/radio-button.template.js +14 -0
  114. package/lib/radio-button.ws.js +40 -0
  115. package/lib/rich-text-link.ws.js +9 -0
  116. package/lib/select.js +19 -0
  117. package/lib/select.template.js +16 -0
  118. package/lib/select.ws.js +44 -0
  119. package/lib/separator.js +9 -0
  120. package/lib/separator.ws.js +48 -0
  121. package/lib/slot.js +14 -0
  122. package/lib/slot.ws.js +14 -0
  123. package/lib/span.js +7 -0
  124. package/lib/span.ws.js +20 -0
  125. package/lib/subscript.js +7 -0
  126. package/lib/subscript.ws.js +20 -0
  127. package/lib/superscript.js +7 -0
  128. package/lib/superscript.ws.js +20 -0
  129. package/lib/templates.js +38 -0
  130. package/lib/text.js +10 -0
  131. package/lib/text.template.js +11 -0
  132. package/lib/text.ws.js +25 -0
  133. package/lib/textarea.js +7 -0
  134. package/lib/textarea.ws.js +55 -0
  135. package/lib/time.js +319 -0
  136. package/lib/time.ws.js +21 -0
  137. package/lib/types/__generated__/blockquote.props.d.ts +2 -0
  138. package/lib/types/__generated__/body.props.d.ts +2 -0
  139. package/lib/types/__generated__/bold.props.d.ts +2 -0
  140. package/lib/types/__generated__/box.props.d.ts +2 -0
  141. package/lib/types/__generated__/button.props.d.ts +2 -0
  142. package/lib/types/__generated__/checkbox.props.d.ts +2 -0
  143. package/lib/types/__generated__/code-text.props.d.ts +2 -0
  144. package/lib/types/__generated__/form.props.d.ts +2 -0
  145. package/lib/types/__generated__/fragment.props.d.ts +2 -0
  146. package/lib/types/__generated__/head-link.props.d.ts +2 -0
  147. package/lib/types/__generated__/head-meta.props.d.ts +2 -0
  148. package/lib/types/__generated__/head-slot.props.d.ts +2 -0
  149. package/lib/types/__generated__/head-title.props.d.ts +2 -0
  150. package/lib/types/__generated__/head.props.d.ts +2 -0
  151. package/lib/types/__generated__/heading.props.d.ts +2 -0
  152. package/lib/types/__generated__/html-embed.props.d.ts +2 -0
  153. package/lib/types/__generated__/image.props.d.ts +2 -0
  154. package/lib/types/__generated__/input.props.d.ts +2 -0
  155. package/lib/types/__generated__/italic.props.d.ts +2 -0
  156. package/lib/types/__generated__/label.props.d.ts +2 -0
  157. package/lib/types/__generated__/link.props.d.ts +2 -0
  158. package/lib/types/__generated__/list-item.props.d.ts +2 -0
  159. package/lib/types/__generated__/list.props.d.ts +2 -0
  160. package/lib/types/__generated__/markdown-embed.props.d.ts +2 -0
  161. package/lib/types/__generated__/option.props.d.ts +2 -0
  162. package/lib/types/__generated__/paragraph.props.d.ts +2 -0
  163. package/lib/types/__generated__/radio-button.props.d.ts +2 -0
  164. package/lib/types/__generated__/rich-text-link.props.d.ts +2 -0
  165. package/lib/types/__generated__/select.props.d.ts +2 -0
  166. package/lib/types/__generated__/separator.props.d.ts +2 -0
  167. package/lib/types/__generated__/slot.props.d.ts +2 -0
  168. package/lib/types/__generated__/span.props.d.ts +2 -0
  169. package/lib/types/__generated__/subscript.props.d.ts +2 -0
  170. package/lib/types/__generated__/superscript.props.d.ts +2 -0
  171. package/lib/types/__generated__/text.props.d.ts +2 -0
  172. package/lib/types/__generated__/textarea.props.d.ts +2 -0
  173. package/lib/types/__generated__/time.props.d.ts +2 -0
  174. package/lib/types/__generated__/vimeo-play-button.props.d.ts +2 -0
  175. package/lib/types/__generated__/vimeo-preview-image.props.d.ts +2 -0
  176. package/lib/types/__generated__/vimeo-spinner.props.d.ts +2 -0
  177. package/lib/types/__generated__/vimeo.props.d.ts +2 -0
  178. package/lib/types/__generated__/webhook-form.props.d.ts +2 -0
  179. package/lib/types/__generated__/xml-node.props.d.ts +2 -0
  180. package/lib/types/__generated__/xml-time.props.d.ts +2 -0
  181. package/lib/types/__generated__/youtube.props.d.ts +2 -0
  182. package/lib/types/blockquote.d.ts +2 -0
  183. package/lib/types/blockquote.template.d.ts +2 -0
  184. package/lib/types/blockquote.ws.d.ts +3 -0
  185. package/lib/types/body.d.ts +2 -0
  186. package/lib/types/body.ws.d.ts +3 -0
  187. package/lib/types/bold.d.ts +2 -0
  188. package/lib/types/bold.ws.d.ts +3 -0
  189. package/lib/types/box.d.ts +8 -0
  190. package/lib/types/box.ws.d.ts +3 -0
  191. package/lib/types/button.d.ts +2 -0
  192. package/lib/types/button.template.d.ts +2 -0
  193. package/lib/types/button.ws.d.ts +3 -0
  194. package/lib/types/checkbox.d.ts +4 -0
  195. package/lib/types/checkbox.template.d.ts +2 -0
  196. package/lib/types/checkbox.ws.d.ts +3 -0
  197. package/lib/types/code-text.d.ts +4 -0
  198. package/lib/types/code-text.ws.d.ts +3 -0
  199. package/lib/types/components.d.ts +44 -0
  200. package/lib/types/content-embed.template.d.ts +2 -0
  201. package/lib/types/form.d.ts +2 -0
  202. package/lib/types/form.ws.d.ts +3 -0
  203. package/lib/types/fragment.d.ts +6 -0
  204. package/lib/types/fragment.ws.d.ts +3 -0
  205. package/lib/types/head-link.d.ts +8 -0
  206. package/lib/types/head-link.ws.d.ts +3 -0
  207. package/lib/types/head-meta.d.ts +2 -0
  208. package/lib/types/head-meta.ws.d.ts +3 -0
  209. package/lib/types/head-slot.d.ts +9 -0
  210. package/lib/types/head-slot.template.d.ts +2 -0
  211. package/lib/types/head-slot.ws.d.ts +3 -0
  212. package/lib/types/head-title.d.ts +2 -0
  213. package/lib/types/head-title.ws.d.ts +3 -0
  214. package/lib/types/heading.d.ts +8 -0
  215. package/lib/types/heading.template.d.ts +2 -0
  216. package/lib/types/heading.ws.d.ts +3 -0
  217. package/lib/types/hooks.d.ts +2 -0
  218. package/lib/types/html-embed-patchers.d.ts +2 -0
  219. package/lib/types/html-embed.d.ts +12 -0
  220. package/lib/types/html-embed.test.d.ts +1 -0
  221. package/lib/types/html-embed.ws.d.ts +3 -0
  222. package/lib/types/image.d.ts +8 -0
  223. package/lib/types/image.ws.d.ts +3 -0
  224. package/lib/types/input.d.ts +4 -0
  225. package/lib/types/input.ws.d.ts +3 -0
  226. package/lib/types/italic.d.ts +2 -0
  227. package/lib/types/italic.ws.d.ts +3 -0
  228. package/lib/types/label.d.ts +2 -0
  229. package/lib/types/label.template.d.ts +2 -0
  230. package/lib/types/label.ws.d.ts +3 -0
  231. package/lib/types/link.d.ts +11 -0
  232. package/lib/types/link.template.d.ts +2 -0
  233. package/lib/types/link.ws.d.ts +3 -0
  234. package/lib/types/list-item.d.ts +2 -0
  235. package/lib/types/list-item.template.d.ts +2 -0
  236. package/lib/types/list-item.ws.d.ts +3 -0
  237. package/lib/types/list.d.ts +10 -0
  238. package/lib/types/list.template.d.ts +2 -0
  239. package/lib/types/list.ws.d.ts +3 -0
  240. package/lib/types/markdown-embed.d.ts +7 -0
  241. package/lib/types/markdown-embed.template.d.ts +2 -0
  242. package/lib/types/markdown-embed.ws.d.ts +3 -0
  243. package/lib/types/metas.d.ts +44 -0
  244. package/lib/types/option.d.ts +2 -0
  245. package/lib/types/option.ws.d.ts +3 -0
  246. package/lib/types/paragraph.d.ts +2 -0
  247. package/lib/types/paragraph.template.d.ts +2 -0
  248. package/lib/types/paragraph.ws.d.ts +3 -0
  249. package/lib/types/props.d.ts +44 -0
  250. package/lib/types/radio-button.d.ts +4 -0
  251. package/lib/types/radio-button.template.d.ts +2 -0
  252. package/lib/types/radio-button.ws.d.ts +3 -0
  253. package/lib/types/rich-text-link.d.ts +1 -0
  254. package/lib/types/rich-text-link.ws.d.ts +3 -0
  255. package/lib/types/select.d.ts +4 -0
  256. package/lib/types/select.template.d.ts +2 -0
  257. package/lib/types/select.ws.d.ts +3 -0
  258. package/lib/types/separator.d.ts +2 -0
  259. package/lib/types/separator.ws.d.ts +3 -0
  260. package/lib/types/slot.d.ts +6 -0
  261. package/lib/types/slot.ws.d.ts +3 -0
  262. package/lib/types/span.d.ts +2 -0
  263. package/lib/types/span.ws.d.ts +3 -0
  264. package/lib/types/subscript.d.ts +2 -0
  265. package/lib/types/subscript.ws.d.ts +3 -0
  266. package/lib/types/superscript.d.ts +2 -0
  267. package/lib/types/superscript.ws.d.ts +3 -0
  268. package/lib/types/templates.d.ts +18 -0
  269. package/lib/types/test-utils/cartesian.d.ts +2 -0
  270. package/lib/types/text.d.ts +8 -0
  271. package/lib/types/text.template.d.ts +2 -0
  272. package/lib/types/text.ws.d.ts +3 -0
  273. package/lib/types/textarea.d.ts +2 -0
  274. package/lib/types/textarea.ws.d.ts +3 -0
  275. package/lib/types/time.d.ts +18 -0
  276. package/lib/types/time.test.d.ts +1 -0
  277. package/lib/types/time.ws.d.ts +3 -0
  278. package/lib/types/vimeo-play-button.d.ts +3 -0
  279. package/lib/types/vimeo-play-button.ws.d.ts +3 -0
  280. package/lib/types/vimeo-preview-image.d.ts +284 -0
  281. package/lib/types/vimeo-preview-image.ws.d.ts +3 -0
  282. package/lib/types/vimeo-spinner.d.ts +1 -0
  283. package/lib/types/vimeo-spinner.ws.d.ts +3 -0
  284. package/lib/types/vimeo.d.ts +85 -0
  285. package/lib/types/vimeo.template.d.ts +2 -0
  286. package/lib/types/vimeo.ws.d.ts +3 -0
  287. package/lib/types/webhook-form.d.ts +9 -0
  288. package/lib/types/webhook-form.template.d.ts +2 -0
  289. package/lib/types/webhook-form.ws.d.ts +3 -0
  290. package/lib/types/xml-node.d.ts +13 -0
  291. package/lib/types/xml-node.ws.d.ts +3 -0
  292. package/lib/types/xml-time.d.ts +6 -0
  293. package/lib/types/xml-time.ws.d.ts +3 -0
  294. package/lib/types/youtube.d.ts +143 -0
  295. package/lib/types/youtube.template.d.ts +2 -0
  296. package/lib/types/youtube.ws.d.ts +3 -0
  297. package/lib/vimeo-play-button.js +18 -0
  298. package/lib/vimeo-play-button.ws.js +31 -0
  299. package/lib/vimeo-preview-image.js +19 -0
  300. package/lib/vimeo-preview-image.ws.js +27 -0
  301. package/lib/vimeo-spinner.js +13 -0
  302. package/lib/vimeo-spinner.ws.js +25 -0
  303. package/lib/vimeo.js +216 -0
  304. package/lib/vimeo.template.js +93 -0
  305. package/lib/vimeo.ws.js +40 -0
  306. package/lib/webhook-form.js +9 -0
  307. package/lib/webhook-form.template.js +49 -0
  308. package/lib/webhook-form.ws.js +26 -0
  309. package/lib/xml-node.js +60 -0
  310. package/lib/xml-node.ws.js +16 -0
  311. package/lib/xml-time.js +25 -0
  312. package/lib/xml-time.ws.js +16 -0
  313. package/lib/youtube.js +206 -0
  314. package/lib/youtube.template.js +97 -0
  315. package/lib/youtube.ws.js +51 -0
  316. package/package.json +77 -0
@@ -0,0 +1,63 @@
1
+ import { BlockquoteIcon as t } from "@webstudio-is/icons/svg";
2
+ import { defaultStates as e } from "@webstudio-is/sdk";
3
+ import { props as p } from "./__generated__/blockquote.props.js";
4
+ const r = {
5
+ blockquote: [
6
+ {
7
+ property: "marginTop",
8
+ value: { type: "unit", value: 0, unit: "number" }
9
+ },
10
+ {
11
+ property: "marginRight",
12
+ value: { type: "unit", value: 0, unit: "number" }
13
+ },
14
+ {
15
+ property: "marginBottom",
16
+ value: { type: "unit", value: 10, unit: "px" }
17
+ },
18
+ {
19
+ property: "marginLeft",
20
+ value: { type: "unit", value: 0, unit: "number" }
21
+ },
22
+ {
23
+ property: "paddingTop",
24
+ value: { type: "unit", value: 10, unit: "px" }
25
+ },
26
+ {
27
+ property: "paddingBottom",
28
+ value: { type: "unit", value: 10, unit: "px" }
29
+ },
30
+ {
31
+ property: "paddingLeft",
32
+ value: { type: "unit", value: 20, unit: "px" }
33
+ },
34
+ {
35
+ property: "paddingRight",
36
+ value: { type: "unit", value: 20, unit: "px" }
37
+ },
38
+ {
39
+ property: "borderLeftWidth",
40
+ value: { type: "unit", value: 5, unit: "px" }
41
+ },
42
+ {
43
+ property: "borderLeftStyle",
44
+ value: { type: "keyword", value: "solid" }
45
+ },
46
+ {
47
+ property: "borderLeftColor",
48
+ value: { type: "rgb", r: 226, g: 226, b: 226, alpha: 1 }
49
+ }
50
+ ]
51
+ }, i = {
52
+ type: "container",
53
+ icon: t,
54
+ states: e,
55
+ presetStyle: r
56
+ }, n = {
57
+ props: p,
58
+ initialProps: ["id", "className", "cite"]
59
+ };
60
+ export {
61
+ i as meta,
62
+ n as propsMeta
63
+ };
package/lib/body.js ADDED
@@ -0,0 +1,7 @@
1
+ import { jsx as d } from "react/jsx-runtime";
2
+ import { forwardRef as m } from "react";
3
+ const f = m((o, r) => /* @__PURE__ */ d("body", { ...o, ref: r }));
4
+ f.displayName = "Body";
5
+ export {
6
+ f as Body
7
+ };
package/lib/body.ws.js ADDED
@@ -0,0 +1,29 @@
1
+ import { BodyIcon as o } from "@webstudio-is/icons/svg";
2
+ import { defaultStates as t } from "@webstudio-is/sdk";
3
+ import { body as e } from "@webstudio-is/sdk/normalize.css";
4
+ import { props as r } from "./__generated__/body.props.js";
5
+ const a = {
6
+ body: [
7
+ ...e,
8
+ {
9
+ property: "WebkitFontSmoothing",
10
+ value: { type: "keyword", value: "antialiased" }
11
+ },
12
+ {
13
+ property: "MozOsxFontSmoothing",
14
+ value: { type: "keyword", value: "grayscale" }
15
+ }
16
+ ]
17
+ }, m = {
18
+ type: "container",
19
+ icon: o,
20
+ states: t,
21
+ presetStyle: a
22
+ }, y = {
23
+ props: r,
24
+ initialProps: ["id", "className"]
25
+ };
26
+ export {
27
+ m as meta,
28
+ y as propsMeta
29
+ };
package/lib/bold.js ADDED
@@ -0,0 +1,7 @@
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ import { forwardRef as d } from "react";
3
+ const f = d((o, r) => /* @__PURE__ */ m("b", { ...o, ref: r }));
4
+ f.displayName = "Bold";
5
+ export {
6
+ f as Bold
7
+ };
package/lib/bold.ws.js ADDED
@@ -0,0 +1,20 @@
1
+ import { BoldIcon as t } from "@webstudio-is/icons/svg";
2
+ import { defaultStates as o } from "@webstudio-is/sdk";
3
+ import { b as e } from "@webstudio-is/sdk/normalize.css";
4
+ import { props as r } from "./__generated__/bold.props.js";
5
+ const p = {
6
+ b: e
7
+ }, l = {
8
+ type: "rich-text-child",
9
+ label: "Bold Text",
10
+ icon: t,
11
+ states: o,
12
+ presetStyle: p
13
+ }, c = {
14
+ props: r,
15
+ initialProps: ["id", "className"]
16
+ };
17
+ export {
18
+ l as meta,
19
+ c as propsMeta
20
+ };
package/lib/box.js ADDED
@@ -0,0 +1,9 @@
1
+ import { forwardRef as t, createElement as a } from "react";
2
+ const d = "div", f = t(
3
+ ({ tag: e = d, ...o }, r) => a(e, { ...o, ref: r })
4
+ );
5
+ f.displayName = "Box";
6
+ export {
7
+ f as Box,
8
+ d as defaultTag
9
+ };
package/lib/box.ws.js ADDED
@@ -0,0 +1,31 @@
1
+ import { BoxIcon as t } from "@webstudio-is/icons/svg";
2
+ import { defaultStates as e } from "@webstudio-is/sdk";
3
+ import { div as o, address as r, article as a, aside as i, figure as n, footer as s, header as c, main as p, nav as d, section as m } from "@webstudio-is/sdk/normalize.css";
4
+ import { props as f } from "./__generated__/box.props.js";
5
+ const g = {
6
+ div: o,
7
+ address: r,
8
+ article: a,
9
+ aside: i,
10
+ figure: n,
11
+ footer: s,
12
+ header: c,
13
+ main: p,
14
+ nav: d,
15
+ section: m
16
+ }, v = {
17
+ category: "general",
18
+ type: "container",
19
+ description: "A container for content. By default this is a Div, but the tag can be changed in settings.",
20
+ icon: t,
21
+ states: e,
22
+ presetStyle: g,
23
+ order: 0
24
+ }, b = {
25
+ props: f,
26
+ initialProps: ["id", "className", "tag"]
27
+ };
28
+ export {
29
+ v as meta,
30
+ b as propsMeta
31
+ };
package/lib/button.js ADDED
@@ -0,0 +1,9 @@
1
+ import { jsx as f } from "react/jsx-runtime";
2
+ import { forwardRef as i } from "react";
3
+ const n = i(
4
+ ({ type: t = "submit", children: o, ...r }, m) => /* @__PURE__ */ f("button", { type: t, ...r, ref: m, children: o })
5
+ );
6
+ n.displayName = "Button";
7
+ export {
8
+ n as Button
9
+ };
@@ -0,0 +1,11 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { $ as o, PlaceholderValue as e } from "@webstudio-is/template";
3
+ const n = {
4
+ category: "forms",
5
+ order: 2,
6
+ description: "Use a button to submit forms or trigger actions within a page. Do not use a button to navigate users to another resource or another page - that’s what a link is used for.",
7
+ template: /* @__PURE__ */ t(o.Button, { children: new e("Button text you can edit") })
8
+ };
9
+ export {
10
+ n as meta
11
+ };
@@ -0,0 +1,27 @@
1
+ import { ButtonElementIcon as t } from "@webstudio-is/icons/svg";
2
+ import { defaultStates as e } from "@webstudio-is/sdk";
3
+ import { button as o } from "@webstudio-is/sdk/normalize.css";
4
+ import { props as n } from "./__generated__/button.props.js";
5
+ const a = {
6
+ button: o
7
+ }, p = {
8
+ icon: t,
9
+ type: "container",
10
+ constraints: {
11
+ relation: "ancestor",
12
+ component: { $nin: ["Button", "Link"] }
13
+ },
14
+ presetStyle: a,
15
+ states: [
16
+ ...e,
17
+ { selector: ":disabled", label: "Disabled" },
18
+ { selector: ":enabled", label: "Enabled" }
19
+ ]
20
+ }, c = {
21
+ props: n,
22
+ initialProps: ["id", "className", "type", "aria-label"]
23
+ };
24
+ export {
25
+ p as meta,
26
+ c as propsMeta
27
+ };
@@ -0,0 +1,15 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { forwardRef as d } from "react";
3
+ const h = d(({ children: i, checked: e, defaultChecked: r, ...o }, c) => /* @__PURE__ */ t(
4
+ "input",
5
+ {
6
+ ...o,
7
+ defaultChecked: e ?? r,
8
+ type: "checkbox",
9
+ ref: c
10
+ }
11
+ ));
12
+ h.displayName = "Checkbox";
13
+ export {
14
+ h as Checkbox
15
+ };
@@ -0,0 +1,14 @@
1
+ import { jsxs as r, jsx as o } from "react/jsx-runtime";
2
+ import { $ as e, PlaceholderValue as c } from "@webstudio-is/template";
3
+ const l = {
4
+ category: "forms",
5
+ description: "Use within a form to allow your users to toggle between checked and not checked. Group checkboxes by matching their “Name” properties. Unlike radios, any number of checkboxes in a group can be checked.",
6
+ order: 6,
7
+ template: /* @__PURE__ */ r(e.Label, { "ws:label": "Checkbox Field", children: [
8
+ /* @__PURE__ */ o(e.Checkbox, {}),
9
+ /* @__PURE__ */ o(e.Text, { "ws:label": "Checkbox Label", tag: "span", children: new c("Checkbox") })
10
+ ] })
11
+ };
12
+ export {
13
+ l as meta
14
+ };
@@ -0,0 +1,38 @@
1
+ import { CheckboxCheckedIcon as e } from "@webstudio-is/icons/svg";
2
+ import { defaultStates as t } from "@webstudio-is/sdk";
3
+ import { checkbox as o } from "@webstudio-is/sdk/normalize.css";
4
+ import { props as l } from "./__generated__/checkbox.props.js";
5
+ const r = {
6
+ input: [
7
+ ...o,
8
+ {
9
+ property: "marginRight",
10
+ value: { type: "unit", unit: "em", value: 0.5 }
11
+ }
12
+ ]
13
+ }, s = {
14
+ constraints: {
15
+ relation: "ancestor",
16
+ component: { $nin: ["Button", "Link"] }
17
+ },
18
+ type: "control",
19
+ icon: e,
20
+ presetStyle: r,
21
+ states: [
22
+ ...t,
23
+ { selector: ":checked", label: "Checked" },
24
+ { selector: ":required", label: "Required" },
25
+ { selector: ":optional", label: "Optional" },
26
+ { selector: ":disabled", label: "Disabled" },
27
+ { selector: ":enabled", label: "Enabled" },
28
+ { selector: ":read-only", label: "Read Only" },
29
+ { selector: ":read-write", label: "Read Write" }
30
+ ]
31
+ }, p = {
32
+ props: l,
33
+ initialProps: ["id", "className", "name", "value", "required", "checked"]
34
+ };
35
+ export {
36
+ s as meta,
37
+ p as propsMeta
38
+ };
@@ -0,0 +1,10 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { forwardRef as i } from "react";
3
+ const d = ({
4
+ innerRef: e,
5
+ ...t
6
+ }) => /* @__PURE__ */ r("code", { ...t, style: { padding: 20 }, ref: e, children: 'Open the "Settings" panel to edit the code.' }), l = i(({ code: e, children: t, ...n }, o) => t === void 0 && e === void 0 || String(e).trim().length === 0 ? /* @__PURE__ */ r(d, { innerRef: o, ...n }) : /* @__PURE__ */ r("code", { ...n, ref: o, children: e ?? t }));
7
+ l.displayName = "CodeText";
8
+ export {
9
+ l as CodeText
10
+ };
@@ -0,0 +1,59 @@
1
+ import { BracesIcon as e } from "@webstudio-is/icons/svg";
2
+ import { defaultStates as t } from "@webstudio-is/sdk";
3
+ import { code as o } from "@webstudio-is/sdk/normalize.css";
4
+ import { props as r } from "./__generated__/code-text.props.js";
5
+ const p = {
6
+ code: [
7
+ ...o,
8
+ {
9
+ property: "display",
10
+ value: { type: "keyword", value: "block" }
11
+ },
12
+ {
13
+ property: "whiteSpaceCollapse",
14
+ value: { type: "keyword", value: "preserve" }
15
+ },
16
+ {
17
+ property: "textWrapMode",
18
+ value: { type: "keyword", value: "wrap" }
19
+ },
20
+ {
21
+ property: "paddingLeft",
22
+ value: { type: "unit", value: 0.2, unit: "em" }
23
+ },
24
+ {
25
+ property: "paddingRight",
26
+ value: { type: "unit", value: 0.2, unit: "em" }
27
+ },
28
+ {
29
+ property: "backgroundColor",
30
+ value: { type: "rgb", r: 238, g: 238, b: 238, alpha: 1 }
31
+ }
32
+ ]
33
+ }, s = {
34
+ category: "general",
35
+ type: "embed",
36
+ description: "Use this component when you want to display code as text on the page.",
37
+ icon: e,
38
+ constraints: {
39
+ relation: "ancestor",
40
+ component: { $neq: "CodeText" }
41
+ },
42
+ states: t,
43
+ presetStyle: p,
44
+ order: 5
45
+ }, d = {
46
+ props: {
47
+ ...r,
48
+ code: {
49
+ required: !0,
50
+ control: "codetext",
51
+ type: "string"
52
+ }
53
+ },
54
+ initialProps: ["id", "className", "lang", "code"]
55
+ };
56
+ export {
57
+ s as meta,
58
+ d as propsMeta
59
+ };
@@ -0,0 +1,89 @@
1
+ import { Slot as e } from "./slot.js";
2
+ import { Fragment as m } from "./fragment.js";
3
+ import { HtmlEmbed as x } from "./html-embed.js";
4
+ import { MarkdownEmbed as a } from "./markdown-embed.js";
5
+ import { Body as n } from "./body.js";
6
+ import { Box as l } from "./box.js";
7
+ import { Text as k } from "./text.js";
8
+ import { Heading as T } from "./heading.js";
9
+ import { Paragraph as c } from "./paragraph.js";
10
+ import { Link as B, Link as L } from "./link.js";
11
+ import { Span as g } from "./span.js";
12
+ import { Bold as I } from "./bold.js";
13
+ import { Italic as V } from "./italic.js";
14
+ import { Superscript as R } from "./superscript.js";
15
+ import { Subscript as y } from "./subscript.js";
16
+ import { Button as E } from "./button.js";
17
+ import { Input as X } from "./input.js";
18
+ import { WebhookForm as v } from "./webhook-form.js";
19
+ import { Form as O } from "./form.js";
20
+ import { Image as Y } from "./image.js";
21
+ import { Blockquote as z } from "./blockquote.js";
22
+ import { List as D } from "./list.js";
23
+ import { ListItem as J } from "./list-item.js";
24
+ import { Separator as Q } from "./separator.js";
25
+ import { CodeText as Z } from "./code-text.js";
26
+ import { Label as $ } from "./label.js";
27
+ import { Textarea as ro } from "./textarea.js";
28
+ import { RadioButton as to } from "./radio-button.js";
29
+ import { Checkbox as po } from "./checkbox.js";
30
+ import { Vimeo as fo } from "./vimeo.js";
31
+ import { YouTube as io } from "./youtube.js";
32
+ import { VimeoPreviewImage as lo } from "./vimeo-preview-image.js";
33
+ import { VimeoPlayButton as ko } from "./vimeo-play-button.js";
34
+ import { VimeoSpinner as To } from "./vimeo-spinner.js";
35
+ import { XmlNode as co } from "./xml-node.js";
36
+ import { XmlTime as Bo } from "./xml-time.js";
37
+ import { Time as Ho } from "./time.js";
38
+ import { Select as Fo } from "./select.js";
39
+ import { Option as ho } from "./option.js";
40
+ import { HeadSlot as Po } from "./head-slot.js";
41
+ import { HeadLink as wo } from "./head-link.js";
42
+ import { HeadMeta as Co } from "./head-meta.js";
43
+ import { HeadTitle as Mo } from "./head-title.js";
44
+ export {
45
+ z as Blockquote,
46
+ n as Body,
47
+ I as Bold,
48
+ l as Box,
49
+ E as Button,
50
+ po as Checkbox,
51
+ Z as CodeText,
52
+ v as Form,
53
+ m as Fragment,
54
+ wo as HeadLink,
55
+ Co as HeadMeta,
56
+ Po as HeadSlot,
57
+ Mo as HeadTitle,
58
+ T as Heading,
59
+ x as HtmlEmbed,
60
+ Y as Image,
61
+ X as Input,
62
+ V as Italic,
63
+ $ as Label,
64
+ B as Link,
65
+ D as List,
66
+ J as ListItem,
67
+ a as MarkdownEmbed,
68
+ ho as Option,
69
+ c as Paragraph,
70
+ to as RadioButton,
71
+ O as RemixForm,
72
+ L as RichTextLink,
73
+ Fo as Select,
74
+ Q as Separator,
75
+ e as Slot,
76
+ g as Span,
77
+ y as Subscript,
78
+ R as Superscript,
79
+ k as Text,
80
+ ro as Textarea,
81
+ Ho as Time,
82
+ fo as Vimeo,
83
+ ko as VimeoPlayButton,
84
+ lo as VimeoPreviewImage,
85
+ To as VimeoSpinner,
86
+ co as XmlNode,
87
+ Bo as XmlTime,
88
+ io as YouTube
89
+ };
@@ -0,0 +1,83 @@
1
+ import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
+ import { $ as a, ws as t } from "@webstudio-is/template";
3
+ import { imagePlaceholderDataUrl as o } from "@webstudio-is/image";
4
+ import { ContentEmbedIcon as n } from "@webstudio-is/icons/svg";
5
+ const s = `
6
+ <h1>Styling HTML with Content Embed</h1>
7
+ <p>Content Embed allows styling of HTML, which primarily comes from external data.</p>
8
+ <h2>How to Use Content Embed</h2>
9
+ <ul>
10
+ <li>Every element is shown in the Navigator.</li>
11
+ <li>Apply styles and Tokens to each element.</li>
12
+ <li>Adjustments to elements apply universally within this embed, ensuring consistency across your content.</li>
13
+ </ul>
14
+ <hr>
15
+ <h2>This sample text contains all the elements that can be styled.</h2>
16
+ <p>Any elements that were not used above are used below.</p>
17
+ <h3>Heading 3</h3>
18
+ <h4>Heading 4</h4>
19
+ <h5>Heading 5</h5>
20
+ <h6>Heading 6</h6>
21
+ <p><a href="#">Links</a> connect your content to relevant resources.</p>
22
+ <p><strong>Bold text</strong> makes your important points stand out.</p>
23
+ <p><em>Italic text</em> is great for emphasizing terms.</p>
24
+ <ol>
25
+ <li>First Step</li>
26
+ <li>Second Step</li>
27
+ </ol>
28
+ <img src="${o}">
29
+ <blockquote>Capture attention with a powerful quote.</blockquote>
30
+ <p>Using <code>console.log("Hello World");</code> will log to the console.</p>
31
+ <table>
32
+ <tr>
33
+ <th>Header 1</th>
34
+ <th>Header 2</th>
35
+ <th>Header 3</th>
36
+ </tr>
37
+ <tr>
38
+ <td>Cell 1.1</td>
39
+ <td>Cell 1.2</td>
40
+ <td>Cell 1.3</td>
41
+ </tr>
42
+ <tr>
43
+ <td>Cell 2.1</td>
44
+ <td>Cell 2.2</td>
45
+ <td>Cell 2.3</td>
46
+ </tr>
47
+ <tr>
48
+ <td>Cell 3.1</td>
49
+ <td>Cell 3.2</td>
50
+ <td>Cell 3.3</td>
51
+ </tr>
52
+ </table>
53
+ `.trim(), h = {
54
+ category: "data",
55
+ icon: n,
56
+ description: "Content Embed allows styling of HTML, which can be provided via the Code property statically or loaded dynamically from any Resource, for example, from a CMS.",
57
+ order: 3,
58
+ template: /* @__PURE__ */ l(a.HtmlEmbed, { "ws:label": "Content Embed", code: s, children: [
59
+ /* @__PURE__ */ e(t.descendant, { "ws:label": "Paragraph", selector: " p" }),
60
+ /* @__PURE__ */ e(t.descendant, { "ws:label": "Heading 1", selector: " h1" }),
61
+ /* @__PURE__ */ e(t.descendant, { "ws:label": "Heading 2", selector: " h2" }),
62
+ /* @__PURE__ */ e(t.descendant, { "ws:label": "Heading 3", selector: " h3" }),
63
+ /* @__PURE__ */ e(t.descendant, { "ws:label": "Heading 4", selector: " h4" }),
64
+ /* @__PURE__ */ e(t.descendant, { "ws:label": "Heading 5", selector: " h5" }),
65
+ /* @__PURE__ */ e(t.descendant, { "ws:label": "Heading 6", selector: " h6" }),
66
+ /* @__PURE__ */ e(t.descendant, { "ws:label": "Bold", selector: " :where(strong, b)" }),
67
+ /* @__PURE__ */ e(t.descendant, { "ws:label": "Italic", selector: " :where(em, i)" }),
68
+ /* @__PURE__ */ e(t.descendant, { "ws:label": "Link", selector: " a" }),
69
+ /* @__PURE__ */ e(t.descendant, { "ws:label": "Image", selector: " img" }),
70
+ /* @__PURE__ */ e(t.descendant, { "ws:label": "Blockquote", selector: " blockquote" }),
71
+ /* @__PURE__ */ e(t.descendant, { "ws:label": "Code Text", selector: " code" }),
72
+ /* @__PURE__ */ e(t.descendant, { "ws:label": "List", selector: " :where(ul, ol)" }),
73
+ /* @__PURE__ */ e(t.descendant, { "ws:label": "List Item", selector: " li" }),
74
+ /* @__PURE__ */ e(t.descendant, { "ws:label": "Separator", selector: " hr" }),
75
+ /* @__PURE__ */ e(t.descendant, { "ws:label": "Table", selector: " table" }),
76
+ /* @__PURE__ */ e(t.descendant, { "ws:label": "Table Row", selector: " tr" }),
77
+ /* @__PURE__ */ e(t.descendant, { "ws:label": "Table Header Cell", selector: " th" }),
78
+ /* @__PURE__ */ e(t.descendant, { "ws:label": "Table Cell", selector: " td" })
79
+ ] })
80
+ };
81
+ export {
82
+ h as meta
83
+ };
package/lib/form.js ADDED
@@ -0,0 +1,7 @@
1
+ import { jsx as f } from "react/jsx-runtime";
2
+ import { forwardRef as p } from "react";
3
+ const t = p(({ children: o, ...r }, m) => /* @__PURE__ */ f("form", { ...r, ref: m, children: o }));
4
+ t.displayName = "Form";
5
+ export {
6
+ t as Form
7
+ };
package/lib/form.ws.js ADDED
@@ -0,0 +1,30 @@
1
+ import { FormIcon as t } from "@webstudio-is/icons/svg";
2
+ import { defaultStates as o } from "@webstudio-is/sdk";
3
+ import { form as r } from "@webstudio-is/sdk/normalize.css";
4
+ import { props as e } from "./__generated__/form.props.js";
5
+ const n = {
6
+ form: [
7
+ ...r,
8
+ { property: "minHeight", value: { type: "unit", unit: "px", value: 20 } }
9
+ ]
10
+ }, p = {
11
+ category: "forms",
12
+ type: "container",
13
+ label: "Form",
14
+ constraints: {
15
+ relation: "ancestor",
16
+ component: { $nin: ["Form", "Button", "Link"] }
17
+ },
18
+ description: "Create filters, surveys, searches and more.",
19
+ icon: t,
20
+ states: o,
21
+ presetStyle: n,
22
+ order: 0
23
+ }, c = {
24
+ props: e,
25
+ initialProps: ["id", "className", "action"]
26
+ };
27
+ export {
28
+ p as meta,
29
+ c as propsMeta
30
+ };
@@ -0,0 +1,7 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { forwardRef as o } from "react";
3
+ const m = o((r, t) => /* @__PURE__ */ e("div", { ...r, ref: t, style: { display: "contents" } }));
4
+ m.displayName = "Fragment";
5
+ export {
6
+ m as Fragment
7
+ };
@@ -0,0 +1,10 @@
1
+ const o = {
2
+ type: "container",
3
+ icon: ""
4
+ }, t = {
5
+ props: {}
6
+ };
7
+ export {
8
+ o as meta,
9
+ t as propsMeta
10
+ };
@@ -0,0 +1,23 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { ReactSdkContext as c } from "@webstudio-is/react-sdk/runtime";
3
+ import { forwardRef as m, useContext as d } from "react";
4
+ import { XmlNode as l } from "./xml-node.js";
5
+ const p = "link", O = ["rel", "hrefLang", "href", "type", "as"], u = m(({ ...e }, n) => {
6
+ const { renderer: i } = d(c), s = /* @__PURE__ */ new Set([...O, ...Object.keys(e)]), r = {};
7
+ for (const t of s)
8
+ t in e && e[t] !== void 0 && (r[t] = e[t]);
9
+ if (i === void 0)
10
+ return /* @__PURE__ */ o("link", { ...r });
11
+ const a = Object.fromEntries(
12
+ Object.entries(r).map(([t, f]) => [
13
+ t == null ? void 0 : t.toLowerCase(),
14
+ f
15
+ ])
16
+ );
17
+ return /* @__PURE__ */ o(l, { tag: p, ...a, ref: n });
18
+ });
19
+ u.displayName = "HeadLink";
20
+ export {
21
+ u as HeadLink,
22
+ p as defaultTag
23
+ };
@@ -0,0 +1,19 @@
1
+ import { ResourceIcon as o } from "@webstudio-is/icons/svg";
2
+ import "@webstudio-is/sdk";
3
+ import { props as t } from "./__generated__/head-link.props.js";
4
+ const p = {
5
+ category: "hidden",
6
+ icon: o,
7
+ type: "container",
8
+ constraints: {
9
+ relation: "parent",
10
+ component: { $eq: "HeadSlot" }
11
+ }
12
+ }, a = {
13
+ props: t,
14
+ initialProps: ["rel", "hrefLang", "href", "type", "as"]
15
+ };
16
+ export {
17
+ p as meta,
18
+ a as propsMeta
19
+ };
@@ -0,0 +1,23 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { ReactSdkContext as i } from "@webstudio-is/react-sdk/runtime";
3
+ import { forwardRef as d, useContext as f } from "react";
4
+ import { XmlNode as p } from "./xml-node.js";
5
+ const O = "meta", l = ["property", "name", "content"], u = d(({ ...e }, n) => {
6
+ const { renderer: a } = f(i), m = /* @__PURE__ */ new Set([...l, ...Object.keys(e)]), o = {};
7
+ for (const t of m)
8
+ t in e && e[t] !== void 0 && (o[t] = e[t]);
9
+ if (a === void 0)
10
+ return /* @__PURE__ */ r("meta", { ...o });
11
+ const s = Object.fromEntries(
12
+ Object.entries(o).map(([t, c]) => [
13
+ t == null ? void 0 : t.toLowerCase(),
14
+ c
15
+ ])
16
+ );
17
+ return /* @__PURE__ */ r(p, { tag: O, ...s, ref: n });
18
+ });
19
+ u.displayName = "HeadMeta";
20
+ export {
21
+ u as HeadMeta,
22
+ O as defaultTag
23
+ };