@upstart.gg/sdk 0.0.104 → 0.0.106

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 (254) hide show
  1. package/dist/shared/ajv.d.ts +2 -0
  2. package/dist/shared/ajv.d.ts.map +1 -1
  3. package/dist/shared/ajv.js +1 -1
  4. package/dist/shared/attributes.js +1 -1
  5. package/dist/shared/brick-manifest.js +1 -1
  6. package/dist/shared/bricks/manifests/accordion.manifest.js +1 -1
  7. package/dist/shared/bricks/manifests/all-manifests.js +1 -1
  8. package/dist/shared/bricks/manifests/button.manifest.js +1 -1
  9. package/dist/shared/bricks/manifests/card.manifest.js +1 -1
  10. package/dist/shared/bricks/manifests/carousel.manifest.js +1 -1
  11. package/dist/shared/bricks/manifests/container.manifest.js +1 -1
  12. package/dist/shared/bricks/manifests/divider.manifest.js +1 -1
  13. package/dist/shared/bricks/manifests/footer.manifest.d.ts +1 -1
  14. package/dist/shared/bricks/manifests/footer.manifest.d.ts.map +1 -1
  15. package/dist/shared/bricks/manifests/footer.manifest.js +1 -1
  16. package/dist/shared/bricks/manifests/form.manifest.js +1 -1
  17. package/dist/shared/bricks/manifests/hero.manifest.js +1 -1
  18. package/dist/shared/bricks/manifests/icon.manifest.js +1 -1
  19. package/dist/shared/bricks/manifests/image.manifest.js +1 -1
  20. package/dist/shared/bricks/manifests/images-gallery.manifest.js +1 -1
  21. package/dist/shared/bricks/manifests/map.manifest.js +1 -1
  22. package/dist/shared/bricks/manifests/navbar.manifest.js +1 -1
  23. package/dist/shared/bricks/manifests/sidebar.manifest.js +1 -1
  24. package/dist/shared/bricks/manifests/social-links.manifest.js +1 -1
  25. package/dist/shared/bricks/manifests/testimonials.manifest.js +1 -1
  26. package/dist/shared/bricks/manifests/text.manifest.js +1 -1
  27. package/dist/shared/bricks/manifests/timeline.manifest.js +1 -1
  28. package/dist/shared/bricks/manifests/video.manifest.js +1 -1
  29. package/dist/shared/bricks/props/border.d.ts.map +1 -1
  30. package/dist/shared/bricks/props/border.js +1 -1
  31. package/dist/shared/bricks/props/container.js +1 -1
  32. package/dist/shared/bricks/props/effects.js +1 -1
  33. package/dist/shared/bricks.d.ts.map +1 -1
  34. package/dist/shared/bricks.js +1 -1
  35. package/dist/shared/{chunk-TCZBR3ZU.js → chunk-2DI5SIVV.js} +1 -1
  36. package/dist/shared/{chunk-O22VV7YR.js → chunk-33FU4KGU.js} +1 -1
  37. package/dist/shared/{chunk-WCNVFVDK.js → chunk-3ZGRY444.js} +1 -1
  38. package/dist/shared/{chunk-CUCUHPQ7.js → chunk-6OKXZL6R.js} +1 -1
  39. package/dist/shared/chunk-7E67XSKP.js +3 -0
  40. package/dist/shared/{chunk-LJQXN32B.js → chunk-AMGHA7QH.js} +1 -1
  41. package/dist/shared/{chunk-QALNFBY7.js → chunk-DC5DWF7B.js} +1 -1
  42. package/dist/shared/{chunk-I43NIQ2K.js → chunk-DY2YCYZ6.js} +1 -1
  43. package/dist/shared/{chunk-CEXHD4BO.js → chunk-E4UAVLKC.js} +2 -2
  44. package/dist/shared/{chunk-ZFTWLZ3G.js → chunk-EHH677K5.js} +1 -1
  45. package/dist/shared/{chunk-POYVTV5F.js → chunk-FD3KX2U7.js} +1 -1
  46. package/dist/shared/chunk-G3JO5DM5.js +3 -0
  47. package/dist/shared/{chunk-I5S2MPPR.js → chunk-H7OYUKBW.js} +1 -1
  48. package/dist/shared/{chunk-ATVHWZSA.js → chunk-HBM4DPIW.js} +1 -1
  49. package/dist/shared/chunk-HIBTEX2T.js +3 -0
  50. package/dist/shared/{chunk-E2EBTWJI.js → chunk-I3HSLGFA.js} +1 -1
  51. package/dist/shared/{chunk-UISES3HA.js → chunk-IXJX7EQ3.js} +1 -1
  52. package/dist/shared/{chunk-5IEGQ7YT.js → chunk-JAAPJQNK.js} +1 -1
  53. package/dist/shared/{chunk-UK6H3FDX.js → chunk-JDBVMPSI.js} +1 -1
  54. package/dist/shared/{chunk-F6MLW6DO.js → chunk-JH3NRO6M.js} +1 -1
  55. package/dist/shared/{chunk-ZNVRYEO7.js → chunk-L3TKLJKK.js} +1 -1
  56. package/dist/shared/{chunk-TEPFFY32.js → chunk-LOFXGDAK.js} +1 -1
  57. package/dist/shared/chunk-O3FJP65T.js +3 -0
  58. package/dist/shared/{chunk-7L3UOEMR.js → chunk-PX7QSNLO.js} +1 -1
  59. package/dist/shared/{chunk-22KRCQK5.js → chunk-U76JDFWJ.js} +1 -1
  60. package/dist/shared/{chunk-CW5FWW5W.js → chunk-UYZP24VV.js} +1 -1
  61. package/dist/shared/chunk-X42WBJTN.js +3 -0
  62. package/dist/shared/{chunk-OQIFFJ7I.js → chunk-XB3X4P3I.js} +1 -1
  63. package/dist/shared/chunk-XDCGA4WT.js +3 -0
  64. package/dist/shared/chunk-YGHBFXR6.js +3 -0
  65. package/dist/shared/{chunk-WEQRYCPD.js → chunk-ZWYLKIBI.js} +1 -1
  66. package/dist/shared/datasources/external/rss/fetcher.d.ts +1 -1
  67. package/dist/shared/datasources/external/rss/fetcher.d.ts.map +1 -1
  68. package/dist/shared/images.js +1 -1
  69. package/dist/shared/page.js +1 -1
  70. package/dist/shared/responsive.js +1 -1
  71. package/dist/shared/site.js +1 -1
  72. package/dist/shared/sitemap.js +1 -1
  73. package/dist/shared/theme.js +1 -1
  74. package/dist/shared/utils/schema.d.ts +6 -8
  75. package/dist/shared/utils/schema.d.ts.map +1 -1
  76. package/dist/shared/utils/schema.js +1 -1
  77. package/package.json +5 -9
  78. package/dist/shared/chunk-F63ANNAK.js +0 -3
  79. package/dist/shared/chunk-GPKRRX3D.js +0 -3
  80. package/dist/shared/chunk-HQQYIKTE.js +0 -3
  81. package/dist/shared/chunk-JFDOR3UH.js +0 -3
  82. package/dist/shared/chunk-OD2PRCLH.js +0 -3
  83. package/dist/shared/chunk-PK6UAFPW.js +0 -3
  84. package/dist/shared/chunk-VDHLON5R.js +0 -3
  85. package/src/node/cli/api.ts +0 -101
  86. package/src/node/cli/commands/cmd-build.ts +0 -64
  87. package/src/node/cli/commands/login/cmd-login.ts +0 -111
  88. package/src/node/cli/commands/logout/cmd-logout.ts +0 -11
  89. package/src/node/cli/commands/publish/cmd-publish.ts +0 -135
  90. package/src/node/cli/commands/publish/parse-gitignore.ts +0 -278
  91. package/src/node/cli/commands/publish/uploader.ts +0 -333
  92. package/src/node/cli/constants.ts +0 -14
  93. package/src/node/cli/is-logged-in.ts +0 -28
  94. package/src/node/cli/program.ts +0 -77
  95. package/src/node/cli/store.ts +0 -64
  96. package/src/node/cli/tests/api.test.ts +0 -161
  97. package/src/node/cli/types.ts +0 -34
  98. package/src/node/cli/utils.ts +0 -20
  99. package/src/node/shared/config.ts +0 -69
  100. package/src/node/shared/logger.ts +0 -44
  101. package/src/shared/ajv.ts +0 -103
  102. package/src/shared/analytics/init.ts +0 -14
  103. package/src/shared/analytics/track.ts +0 -21
  104. package/src/shared/analytics/types.ts +0 -13
  105. package/src/shared/attributes.ts +0 -211
  106. package/src/shared/brick-manifest.ts +0 -110
  107. package/src/shared/bricks/manifests/accordion.manifest.ts +0 -179
  108. package/src/shared/bricks/manifests/all-manifests.ts +0 -92
  109. package/src/shared/bricks/manifests/button.manifest.ts +0 -145
  110. package/src/shared/bricks/manifests/card.manifest.ts +0 -269
  111. package/src/shared/bricks/manifests/carousel.manifest.ts +0 -106
  112. package/src/shared/bricks/manifests/container.manifest.ts +0 -357
  113. package/src/shared/bricks/manifests/divider.manifest.ts +0 -121
  114. package/src/shared/bricks/manifests/footer.manifest.ts +0 -487
  115. package/src/shared/bricks/manifests/form.manifest.ts +0 -112
  116. package/src/shared/bricks/manifests/hero.manifest.ts +0 -132
  117. package/src/shared/bricks/manifests/icon.manifest.ts +0 -130
  118. package/src/shared/bricks/manifests/image.manifest.ts +0 -203
  119. package/src/shared/bricks/manifests/images-gallery.manifest.ts +0 -227
  120. package/src/shared/bricks/manifests/map.manifest.ts +0 -75
  121. package/src/shared/bricks/manifests/navbar.manifest.ts +0 -344
  122. package/src/shared/bricks/manifests/sidebar.manifest.ts +0 -90
  123. package/src/shared/bricks/manifests/social-links.manifest.ts +0 -370
  124. package/src/shared/bricks/manifests/testimonials.manifest.ts +0 -397
  125. package/src/shared/bricks/manifests/tests/header.manifest.test.ts +0 -10
  126. package/src/shared/bricks/manifests/text.manifest.ts +0 -164
  127. package/src/shared/bricks/manifests/timeline.manifest.ts +0 -456
  128. package/src/shared/bricks/manifests/video.manifest.ts +0 -59
  129. package/src/shared/bricks/props/_style-presets.ts +0 -352
  130. package/src/shared/bricks/props/align.ts +0 -59
  131. package/src/shared/bricks/props/background.ts +0 -118
  132. package/src/shared/bricks/props/boolean.ts +0 -11
  133. package/src/shared/bricks/props/border.ts +0 -84
  134. package/src/shared/bricks/props/color.ts +0 -24
  135. package/src/shared/bricks/props/common.ts +0 -37
  136. package/src/shared/bricks/props/container.ts +0 -356
  137. package/src/shared/bricks/props/css-length.ts +0 -25
  138. package/src/shared/bricks/props/datasource.ts +0 -60
  139. package/src/shared/bricks/props/date.ts +0 -24
  140. package/src/shared/bricks/props/effects.ts +0 -123
  141. package/src/shared/bricks/props/enum.ts +0 -42
  142. package/src/shared/bricks/props/file.ts +0 -12
  143. package/src/shared/bricks/props/geolocation.ts +0 -30
  144. package/src/shared/bricks/props/helpers.ts +0 -101
  145. package/src/shared/bricks/props/image.ts +0 -90
  146. package/src/shared/bricks/props/number.ts +0 -16
  147. package/src/shared/bricks/props/padding.ts +0 -21
  148. package/src/shared/bricks/props/position.ts +0 -27
  149. package/src/shared/bricks/props/preset.ts +0 -136
  150. package/src/shared/bricks/props/string.ts +0 -56
  151. package/src/shared/bricks/props/tests/align.test.ts +0 -37
  152. package/src/shared/bricks/props/tests/background.test.ts +0 -102
  153. package/src/shared/bricks/props/tests/border.test.ts +0 -38
  154. package/src/shared/bricks/props/tests/effects.test.ts +0 -37
  155. package/src/shared/bricks/props/tests/helpers.test.ts +0 -133
  156. package/src/shared/bricks/props/tests/image.test.ts +0 -71
  157. package/src/shared/bricks/props/tests/padding.ts +0 -12
  158. package/src/shared/bricks/props/tests/string.test.ts +0 -79
  159. package/src/shared/bricks/props/text.ts +0 -66
  160. package/src/shared/bricks/props/types.ts +0 -57
  161. package/src/shared/bricks.ts +0 -232
  162. package/src/shared/context.ts +0 -39
  163. package/src/shared/datarecords/external/airtable/handler.ts +0 -21
  164. package/src/shared/datarecords/external/airtable/options.ts +0 -22
  165. package/src/shared/datarecords/external/generic-webhook/handler.ts +0 -10
  166. package/src/shared/datarecords/external/generic-webhook/options.ts +0 -13
  167. package/src/shared/datarecords/external/google/oauth/config.ts +0 -30
  168. package/src/shared/datarecords/external/google/sheets/handler.ts +0 -26
  169. package/src/shared/datarecords/external/google/sheets/options.ts +0 -9
  170. package/src/shared/datarecords/types.ts +0 -120
  171. package/src/shared/datarecords.ts +0 -5
  172. package/src/shared/datasources/README.md +0 -3
  173. package/src/shared/datasources/external/facebook/posts/fetcher.ts +0 -52
  174. package/src/shared/datasources/external/facebook/posts/sample.ts +0 -35
  175. package/src/shared/datasources/external/facebook/posts/schema.ts +0 -33
  176. package/src/shared/datasources/external/facebook/posts/tests/fetcher.test.ts +0 -73
  177. package/src/shared/datasources/external/http-json/fetcher.ts +0 -28
  178. package/src/shared/datasources/external/http-json/options.ts +0 -12
  179. package/src/shared/datasources/external/http-json/schema.ts +0 -6
  180. package/src/shared/datasources/external/http-json/tests/fetcher.test.ts +0 -70
  181. package/src/shared/datasources/external/instagram/feed/fetcher.ts +0 -33
  182. package/src/shared/datasources/external/instagram/feed/sample.ts +0 -22
  183. package/src/shared/datasources/external/instagram/feed/schema.ts +0 -23
  184. package/src/shared/datasources/external/instagram/feed/tests/fetcher.test.ts +0 -64
  185. package/src/shared/datasources/external/mastodon/account/fetcher.ts +0 -24
  186. package/src/shared/datasources/external/mastodon/account/sample.ts +0 -33
  187. package/src/shared/datasources/external/mastodon/account/schema.ts +0 -45
  188. package/src/shared/datasources/external/mastodon/account/tests/fetcher.test.ts +0 -47
  189. package/src/shared/datasources/external/mastodon/options.ts +0 -11
  190. package/src/shared/datasources/external/mastodon/status/fetcher.ts +0 -35
  191. package/src/shared/datasources/external/mastodon/status/sample.array.ts +0 -59
  192. package/src/shared/datasources/external/mastodon/status/sample.single.ts +0 -55
  193. package/src/shared/datasources/external/mastodon/status/schema.ts +0 -130
  194. package/src/shared/datasources/external/mastodon/status/tests/fetcher.test.ts +0 -74
  195. package/src/shared/datasources/external/meta/oauth/config.ts +0 -16
  196. package/src/shared/datasources/external/meta/options.ts +0 -11
  197. package/src/shared/datasources/external/rss/fetcher.ts +0 -29
  198. package/src/shared/datasources/external/rss/options.ts +0 -11
  199. package/src/shared/datasources/external/rss/sample.ts +0 -22
  200. package/src/shared/datasources/external/rss/schema.ts +0 -42
  201. package/src/shared/datasources/external/threads/media/fetcher.ts +0 -53
  202. package/src/shared/datasources/external/threads/media/sample.ts +0 -44
  203. package/src/shared/datasources/external/threads/media/schema.ts +0 -37
  204. package/src/shared/datasources/external/tiktok/oauth/config.ts +0 -17
  205. package/src/shared/datasources/external/tiktok/video/fetcher.ts +0 -39
  206. package/src/shared/datasources/external/tiktok/video/options.ts +0 -12
  207. package/src/shared/datasources/external/tiktok/video/sample.ts +0 -26
  208. package/src/shared/datasources/external/tiktok/video/schema.ts +0 -27
  209. package/src/shared/datasources/external/youtube/list/fetcher.ts +0 -37
  210. package/src/shared/datasources/external/youtube/list/options.ts +0 -15
  211. package/src/shared/datasources/external/youtube/list/sample.ts +0 -33
  212. package/src/shared/datasources/external/youtube/list/schema.ts +0 -38
  213. package/src/shared/datasources/external/youtube/oauth/config.ts +0 -15
  214. package/src/shared/datasources/fetcher.ts +0 -17
  215. package/src/shared/datasources/internal/blog/schema.ts +0 -69
  216. package/src/shared/datasources/internal/changelog/schema.ts +0 -48
  217. package/src/shared/datasources/internal/contact-info/schema.ts +0 -20
  218. package/src/shared/datasources/internal/cv/schema.ts +0 -217
  219. package/src/shared/datasources/internal/faq/schema.ts +0 -27
  220. package/src/shared/datasources/internal/job-board/schema.ts +0 -228
  221. package/src/shared/datasources/internal/links/schema.ts +0 -15
  222. package/src/shared/datasources/internal/recipes/schema.ts +0 -42
  223. package/src/shared/datasources/internal/restaurant/schema.ts +0 -225
  224. package/src/shared/datasources/provider-options.ts +0 -7
  225. package/src/shared/datasources/samples.ts +0 -26
  226. package/src/shared/datasources/schemas.ts +0 -45
  227. package/src/shared/datasources/types.ts +0 -276
  228. package/src/shared/datasources/utils.ts +0 -16
  229. package/src/shared/datasources.ts +0 -42
  230. package/src/shared/env.ts +0 -23
  231. package/src/shared/errors.ts +0 -1
  232. package/src/shared/images.ts +0 -44
  233. package/src/shared/index.ts +0 -3
  234. package/src/shared/layout-constants.ts +0 -25
  235. package/src/shared/manifest.ts +0 -50
  236. package/src/shared/oauth.ts +0 -16
  237. package/src/shared/page.ts +0 -61
  238. package/src/shared/prompt.ts +0 -9
  239. package/src/shared/responsive.ts +0 -5
  240. package/src/shared/site.ts +0 -97
  241. package/src/shared/sitemap.ts +0 -66
  242. package/src/shared/social-icons.ts +0 -307
  243. package/src/shared/tests/attributes.test.ts +0 -37
  244. package/src/shared/theme.ts +0 -245
  245. package/src/shared/themes/README.md +0 -34
  246. package/src/shared/themes/color-system.ts +0 -127
  247. package/src/shared/utils/canvas-data-uri.ts +0 -2
  248. package/src/shared/utils/invariant.ts +0 -25
  249. package/src/shared/utils/json-date.ts +0 -8
  250. package/src/shared/utils/merge.ts +0 -12
  251. package/src/shared/utils/object-hash.ts +0 -7
  252. package/src/shared/utils/schema.ts +0 -35
  253. package/src/shared/utils/try-catch.ts +0 -12
  254. package/src/shared/utils/typed-ref.ts +0 -41
@@ -1,145 +0,0 @@
1
- import { defineBrickManifest } from "~/shared/brick-manifest";
2
- import { defineProps, optional, prop } from "../props/helpers";
3
- import { textContentRef } from "../props/text";
4
- import { RxButton } from "react-icons/rx";
5
- import { string, urlOrPageIdRef } from "../props/string";
6
- import { Type } from "@sinclair/typebox";
7
- import { StringEnum } from "~/shared/utils/schema";
8
- import type { BrickProps } from "../props/types";
9
-
10
- export const manifest = defineBrickManifest({
11
- type: "button",
12
- name: "Button",
13
- repeatable: true,
14
- description: "A button with text and optional icon",
15
- icon: RxButton,
16
- props: defineProps({
17
- /**
18
- * @see https://daisyui.com/components/button/?lang=en
19
- * @see https://raw.githubusercontent.com/saadeghi/daisyui/refs/heads/master/packages/docs/src/routes/(routes)/components/button/+page.md?plain=1
20
- */
21
- variants: Type.Array(
22
- Type.Union(
23
- [
24
- Type.Literal("btn-neutral", { title: "Neutral", "ai:variant-type": "color" }),
25
- Type.Literal("btn-primary", { title: "Primary", "ai:variant-type": "color" }),
26
- Type.Literal("btn-secondary", { title: "Secondary", "ai:variant-type": "color" }),
27
- Type.Literal("btn-accent", { title: "Accent", "ai:variant-type": "color" }),
28
- Type.Literal("btn-info", { title: "Info", "ai:variant-type": "color" }),
29
- Type.Literal("btn-success", { title: "Success", "ai:variant-type": "color" }),
30
- Type.Literal("btn-warning", { title: "Warning", "ai:variant-type": "color" }),
31
- Type.Literal("btn-error", { title: "Error", "ai:variant-type": "color" }),
32
- Type.Literal("btn-outline", { title: "Outline", "ai:variant-type": "style" }),
33
- Type.Literal("btn-dash", { title: "Dash", "ai:variant-type": "style" }),
34
- Type.Literal("btn-soft", { title: "Soft", "ai:variant-type": "style" }),
35
- Type.Literal("btn-ghost", { title: "Ghost", "ai:variant-type": "style" }),
36
- Type.Literal("btn-link", { title: "Link", "ai:variant-type": "style" }),
37
- Type.Literal("btn-active", { title: "Active", "ai:variant-type": "behavior" }),
38
- Type.Literal("btn-disabled", { title: "Disabled", "ai:variant-type": "behavior" }),
39
- Type.Literal("btn-icon-left", { title: "Icon left", "ai:variant-type": "icon" }),
40
- Type.Literal("btn-icon-right", { title: "Icon right", "ai:variant-type": "icon" }),
41
- Type.Literal("btn-xs", { title: "Extra small", "ai:variant-type": "size" }),
42
- Type.Literal("btn-sm", { title: "Small", "ai:variant-type": "size" }),
43
- Type.Literal("btn-md", { title: "Medium", "ai:variant-type": "size" }),
44
- Type.Literal("btn-lg", { title: "Large", "ai:variant-type": "size" }),
45
- Type.Literal("btn-xl", { title: "Extra large", "ai:variant-type": "size" }),
46
- Type.Literal("btn-wide", { title: "Wide", "ai:variant-type": "modifier" }),
47
- Type.Literal("btn-block", { title: "Block", "ai:variant-type": "modifier" }),
48
- Type.Literal("btn-square", { title: "Square", "ai:variant-type": "modifier" }),
49
- Type.Literal("btn-circle", { title: "Circle", "ai:variant-type": "modifier" }),
50
- ],
51
- {
52
- title: "Variant",
53
- description: "Button variants.",
54
- "ai:tip": "Those are DaisyUI button variants",
55
- },
56
- ),
57
- ),
58
- label: textContentRef({ title: "Label", default: "My button" }),
59
- type: optional(
60
- prop({
61
- title: "Type",
62
- schema: StringEnum(["button", "submit", "reset"], {
63
- enumNames: ["Button", "Submit", "Reset"],
64
- default: "button",
65
- description: "The type of the button",
66
- "ai:instructions":
67
- "Use 'button' for regular buttons, 'submit' for form submission, and 'reset' to reset form fields.",
68
- }),
69
- }),
70
- ),
71
- icon: optional(
72
- prop({
73
- title: "Icon",
74
- description: "Icon to display (iconify reference)",
75
- schema: string("Icon", undefined, {
76
- description: "Icon to display (iconify reference)",
77
- "ui:field": "iconify",
78
- }),
79
- }),
80
- ),
81
- linkToUrlOrPageId: optional(urlOrPageIdRef({ title: "Link" })),
82
- }),
83
- });
84
-
85
- export type Manifest = typeof manifest;
86
-
87
- export const examples: {
88
- description: string;
89
- type: string;
90
- props: BrickProps<Manifest>["brick"]["props"];
91
- }[] = [
92
- {
93
- description: "Primary button, large size, linking to a URL",
94
- type: "button",
95
- props: {
96
- variants: ["btn-primary", "btn-lg"],
97
- label: "Click me",
98
- linkToUrlOrPageId: "https://example.com",
99
- },
100
- },
101
- {
102
- description: "Secondary button, small size, linking to a page",
103
- type: "button",
104
- props: {
105
- variants: ["btn-secondary", "btn-sm"],
106
- label: "Go to page",
107
- linkToUrlOrPageId: "page-id-123",
108
- },
109
- },
110
- {
111
- description: "Disabled button with outline style",
112
- type: "button",
113
- props: {
114
- variants: ["btn-outline", "btn-disabled"],
115
- label: "Disabled Button",
116
- },
117
- },
118
- {
119
- description: "Ghost button",
120
- type: "button",
121
- props: {
122
- variants: ["btn-ghost"],
123
- label: "Ghost Button",
124
- linkToUrlOrPageId: "https://example.com/ghost",
125
- },
126
- },
127
- {
128
- description: "Submit button in a form",
129
- type: "button",
130
- props: {
131
- variants: ["btn-primary", "btn-md"],
132
- label: "Submit form",
133
- type: "submit",
134
- },
135
- },
136
- {
137
- description: "Button with icon on the right",
138
- type: "button",
139
- props: {
140
- variants: ["btn-primary", "btn-md", "btn-icon-right"],
141
- label: "Icon Button",
142
- icon: "mdi:check-circle",
143
- },
144
- },
145
- ];
@@ -1,269 +0,0 @@
1
- import { defineBrickManifest } from "~/shared/brick-manifest";
2
- import { padding, paddingRef } from "../props/padding";
3
- import { backgroundColor, backgroundColorRef } from "../props/background";
4
- import { defineProps, group, optional } from "../props/helpers";
5
- import { textContent, textContentRef } from "../props/text";
6
- import { BsCardText } from "react-icons/bs";
7
- import { image, imageRef } from "../props/image";
8
- import { Type } from "@sinclair/typebox";
9
- import type { BrickProps } from "../props/types";
10
-
11
- export const manifest = defineBrickManifest({
12
- type: "card",
13
- name: "Card",
14
- description: "A multi-purpose card that can have a title, subtitle, image, and content",
15
- repeatable: true,
16
- icon: BsCardText,
17
- props: defineProps({
18
- variants: Type.Array(
19
- Type.Union(
20
- [
21
- Type.Literal("image-first", { title: "Image First" }),
22
- Type.Literal("image-last", { title: "Image Last" }),
23
- Type.Literal("image-overlay", { title: "Image Overlay" }),
24
- Type.Literal("image-left-side", { title: "Image Left Side" }),
25
- Type.Literal("image-right-side", { title: "Image Right Side" }),
26
- Type.Literal("centered", { title: "Centered" }),
27
- Type.Literal("large-padding", { title: "Large padding" }),
28
- ],
29
- {
30
- title: "Variant",
31
- },
32
- ),
33
- ),
34
- cardTitle: optional(
35
- group({
36
- title: "Title",
37
- children: {
38
- content: textContentRef(),
39
- padding: optional(paddingRef),
40
- backgroundColor: optional(backgroundColorRef()),
41
- },
42
- }),
43
- ),
44
- cardImage: optional(
45
- group({
46
- title: "Image",
47
- children: {
48
- image: imageRef(),
49
- },
50
- }),
51
- ),
52
- cardBody: optional(
53
- group({
54
- title: "Body",
55
- children: {
56
- content: textContentRef(),
57
- padding: optional(paddingRef),
58
- backgroundColor: optional(backgroundColorRef()),
59
- },
60
- }),
61
- ),
62
- }),
63
- });
64
-
65
- export type Manifest = typeof manifest;
66
-
67
- export const examples: {
68
- description: string;
69
- type: string;
70
- props: BrickProps<Manifest>["brick"]["props"];
71
- }[] = [
72
- {
73
- description: "A simple card with a title and content",
74
- type: "card",
75
- props: {
76
- variants: ["image-first"],
77
- preset: "prominent-primary",
78
- cardTitle: {
79
- content: "Card Title",
80
- padding: "p-4",
81
- },
82
- cardBody: {
83
- content: "This is the body of the card.",
84
- },
85
- },
86
- },
87
- {
88
- description: "Card with image and overlay text",
89
- type: "card",
90
- props: {
91
- variants: ["image-overlay", "centered"],
92
- cardImage: {
93
- image: {
94
- src: "https://via.placeholder.com/400x300",
95
- alt: "Placeholder image",
96
- },
97
- },
98
- cardTitle: {
99
- content: "Overlay Title",
100
- padding: "p-8",
101
- backgroundColor: "rgba(0, 0, 0, 0.7)",
102
- },
103
- cardBody: {
104
- content: "Beautiful overlay content with semi-transparent background.",
105
- padding: "p-4",
106
- backgroundColor: "rgba(255, 255, 255, 0.9)",
107
- },
108
- },
109
- },
110
- {
111
- description: "Product card with image on the left",
112
- type: "card",
113
- props: {
114
- variants: ["image-left-side"],
115
- cardImage: {
116
- image: {
117
- src: "https://via.placeholder.com/200x200",
118
- alt: "Product image",
119
- },
120
- },
121
- cardTitle: {
122
- content: "Premium Headphones",
123
- padding: "p-4",
124
- },
125
- cardBody: {
126
- content: "High-quality wireless headphones with noise cancellation and 30-hour battery life.",
127
- padding: "p-4",
128
- },
129
- },
130
- },
131
- {
132
- description: "Feature card with large padding and background",
133
- type: "card",
134
- props: {
135
- variants: ["large-padding", "centered"],
136
- cardTitle: {
137
- content: "Key Feature",
138
- padding: "p-8",
139
- backgroundColor: "#f8f9fa",
140
- },
141
- cardBody: {
142
- content: "This feature provides exceptional value and enhances user experience significantly.",
143
- padding: "p-8",
144
- backgroundColor: "#ffffff",
145
- },
146
- },
147
- },
148
- {
149
- description: "Blog post card with image at the bottom",
150
- type: "card",
151
- props: {
152
- variants: ["image-last"],
153
- cardTitle: {
154
- content: "The Future of Technology",
155
- padding: "p-4",
156
- },
157
- cardBody: {
158
- content:
159
- "Exploring emerging trends and innovations that will shape our digital landscape in the coming decade.",
160
- padding: "p-4",
161
- },
162
- cardImage: {
163
- image: {
164
- src: "https://via.placeholder.com/400x200",
165
- alt: "Technology concept",
166
- },
167
- },
168
- },
169
- },
170
- {
171
- description: "Testimonial card with right-side image",
172
- type: "card",
173
- props: {
174
- variants: ["image-right-side"],
175
- cardTitle: {
176
- content: "Customer Review",
177
- padding: "p-4",
178
- backgroundColor: "#e3f2fd",
179
- },
180
- cardBody: {
181
- content:
182
- '"This product exceeded my expectations. The quality is outstanding and the customer service is top-notch!"',
183
- padding: "p-4",
184
- },
185
- cardImage: {
186
- image: {
187
- src: "https://via.placeholder.com/150x150",
188
- alt: "Customer photo",
189
- },
190
- },
191
- },
192
- },
193
- {
194
- description: "Minimal centered card without image",
195
- type: "card",
196
- props: {
197
- variants: ["centered"],
198
- cardTitle: {
199
- content: "Simple Announcement",
200
- padding: "p-4",
201
- },
202
- cardBody: {
203
- content: "Important updates will be posted here regularly.",
204
- padding: "p-4",
205
- },
206
- },
207
- },
208
- {
209
- description: "Event card with multiple variants",
210
- type: "card",
211
- props: {
212
- variants: ["image-first", "large-padding", "centered"],
213
- cardImage: {
214
- image: {
215
- src: "https://via.placeholder.com/400x250",
216
- alt: "Event venue",
217
- },
218
- },
219
- cardTitle: {
220
- content: "Annual Conference 2025",
221
- padding: "p-8",
222
- backgroundColor: "#1976d2",
223
- },
224
- cardBody: {
225
- content:
226
- "Join us for three days of inspiring talks, networking opportunities, and hands-on workshops.",
227
- padding: "p-8",
228
- },
229
- },
230
- },
231
- {
232
- description: "News article card with compact layout",
233
- type: "card",
234
- props: {
235
- variants: ["image-left-side"],
236
- cardImage: {
237
- image: {
238
- src: "https://via.placeholder.com/120x120",
239
- alt: "News thumbnail",
240
- },
241
- },
242
- cardTitle: {
243
- content: "Breaking News Update",
244
- padding: "p-2",
245
- },
246
- cardBody: {
247
- content: "Latest developments in the ongoing story with expert analysis and community reactions.",
248
- padding: "p-2",
249
- },
250
- },
251
- },
252
- {
253
- description: "Call-to-action card with prominent styling",
254
- type: "card",
255
- props: {
256
- variants: ["centered", "large-padding"],
257
- cardTitle: {
258
- content: "Get Started Today",
259
- padding: "p-8",
260
- backgroundColor: "#4caf50",
261
- },
262
- cardBody: {
263
- content: "Transform your workflow with our powerful tools. Sign up now and get 30 days free!",
264
- padding: "p-8",
265
- backgroundColor: "#f1f8e9",
266
- },
267
- },
268
- },
269
- ];
@@ -1,106 +0,0 @@
1
- import { defineBrickManifest } from "~/shared/brick-manifest";
2
- import { defineProps, optional } from "../props/helpers";
3
- import { TbCarouselHorizontal } from "react-icons/tb";
4
- import { Type } from "@sinclair/typebox";
5
- import { makeContainerProps } from "../props/container";
6
- import type { BrickProps } from "../props/types";
7
- import { background, backgroundRef } from "../props/background";
8
- import { border, borderRef } from "../props/border";
9
- import { padding, paddingRef } from "../props/padding";
10
- import type { FC } from "react";
11
- import { shadowRef } from "../props/effects";
12
-
13
- export const manifest = defineBrickManifest({
14
- type: "carousel",
15
- kind: "widget",
16
- name: "Carousel",
17
- description: "A carousel element",
18
- isContainer: true,
19
- icon: TbCarouselHorizontal,
20
- props: defineProps({
21
- variants: Type.Array(
22
- Type.Union(
23
- [
24
- Type.Literal("pager-arrows", { title: "With arrows pager" }),
25
- Type.Literal("pager-numbers", { title: "With numbered pager" }),
26
- Type.Literal("pager-dots", { title: "With dots pager" }),
27
- ],
28
- {
29
- title: "Variant",
30
- description: "Carousel variants.",
31
- },
32
- ),
33
- ),
34
- background: optional(backgroundRef()),
35
- border: optional(borderRef),
36
- padding: optional(paddingRef),
37
- shadow: optional(shadowRef()),
38
- ...makeContainerProps(),
39
- }),
40
- });
41
-
42
- export type Manifest = typeof manifest;
43
-
44
- export const examples: {
45
- description: string;
46
- type: string;
47
- props: BrickProps<Manifest>["brick"]["props"];
48
- }[] = [
49
- {
50
- description: "An image carousel with pager arrows",
51
- type: "carousel",
52
- props: {
53
- variants: ["pager-arrows"],
54
- $children: [
55
- {
56
- type: "image",
57
- props: {
58
- src: "https://via.placeholder.com/300x200.png?text=Image+1",
59
- },
60
- },
61
- {
62
- type: "image",
63
- props: {
64
- src: "https://via.placeholder.com/300x200.png?text=Image+2",
65
- },
66
- },
67
- {
68
- type: "image",
69
- props: {
70
- src: "https://via.placeholder.com/300x200.png?text=Image+3",
71
- },
72
- },
73
- ],
74
- },
75
- },
76
- {
77
- description: "A carousel of text slides with numbered pager",
78
- type: "carousel",
79
- props: {
80
- variants: ["pager-numbers"],
81
- $children: [
82
- {
83
- type: "text",
84
- props: {
85
- content: "Slide 1",
86
- preset: "prominent-primary",
87
- },
88
- },
89
- {
90
- type: "text",
91
- props: {
92
- content: "Slide 2",
93
- preset: "prominent-secondary",
94
- },
95
- },
96
- {
97
- type: "text",
98
- props: {
99
- content: "Slide 3",
100
- preset: "prominent-accent",
101
- },
102
- },
103
- ],
104
- },
105
- },
106
- ];