@upstart.gg/sdk 0.0.137 → 0.0.138
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/shared/ai/schemas.js +2 -2
- package/dist/shared/ai/schemas.js.map +1 -1
- package/dist/shared/ai/types.d.ts +2 -2
- package/dist/shared/ai/types.d.ts.map +1 -1
- package/dist/shared/ajv.js +26 -25
- package/dist/shared/ajv.js.map +1 -1
- package/dist/shared/attributes.d.ts +8 -0
- package/dist/shared/attributes.d.ts.map +1 -1
- package/dist/shared/attributes.js +15 -14
- package/dist/shared/brick-manifest.js +2 -2
- package/dist/shared/bricks/manifests/accordion.manifest.js +8 -7
- package/dist/shared/bricks/manifests/all-manifests.js +38 -37
- package/dist/shared/bricks/manifests/all-props.d.ts +32 -22
- package/dist/shared/bricks/manifests/all-props.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/all-props.js +40 -39
- package/dist/shared/bricks/manifests/all-props.js.map +1 -1
- package/dist/shared/bricks/manifests/box.manifest.js +11 -10
- package/dist/shared/bricks/manifests/button.manifest.js +10 -9
- package/dist/shared/bricks/manifests/card.manifest.d.ts +2 -0
- package/dist/shared/bricks/manifests/card.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/card.manifest.js +13 -12
- package/dist/shared/bricks/manifests/carousel.manifest.d.ts +1 -0
- package/dist/shared/bricks/manifests/carousel.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/carousel.manifest.js +11 -10
- package/dist/shared/bricks/manifests/footer.manifest.d.ts +2 -0
- package/dist/shared/bricks/manifests/footer.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/footer.manifest.js +9 -8
- package/dist/shared/bricks/manifests/form.manifest.js +9 -8
- package/dist/shared/bricks/manifests/hero.manifest.d.ts +2 -4
- package/dist/shared/bricks/manifests/hero.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/hero.manifest.js +10 -9
- package/dist/shared/bricks/manifests/html.manifest.d.ts +1 -0
- package/dist/shared/bricks/manifests/html.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/html.manifest.js +6 -5
- package/dist/shared/bricks/manifests/icon.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/icon.manifest.js +9 -8
- package/dist/shared/bricks/manifests/image.manifest.d.ts +1 -0
- package/dist/shared/bricks/manifests/image.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/image.manifest.js +12 -11
- package/dist/shared/bricks/manifests/images-gallery.manifest.d.ts +2 -0
- package/dist/shared/bricks/manifests/images-gallery.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/images-gallery.manifest.js +11 -10
- package/dist/shared/bricks/manifests/map.manifest.d.ts +1 -0
- package/dist/shared/bricks/manifests/map.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/map.manifest.js +9 -8
- package/dist/shared/bricks/manifests/navbar.manifest.d.ts +2 -0
- package/dist/shared/bricks/manifests/navbar.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/navbar.manifest.js +11 -10
- package/dist/shared/bricks/manifests/sidebar.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/sidebar.manifest.js +11 -10
- package/dist/shared/bricks/manifests/social-links.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/social-links.manifest.js +10 -9
- package/dist/shared/bricks/manifests/spacer.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/spacer.manifest.js +6 -5
- package/dist/shared/bricks/manifests/table.manifest.d.ts +1 -0
- package/dist/shared/bricks/manifests/table.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/table.manifest.js +10 -9
- package/dist/shared/bricks/manifests/tabs.manifest.d.ts +1 -1
- package/dist/shared/bricks/manifests/tabs.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/tabs.manifest.js +11 -10
- package/dist/shared/bricks/manifests/testimonials.manifest.d.ts +3 -1
- package/dist/shared/bricks/manifests/testimonials.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/testimonials.manifest.js +13 -12
- package/dist/shared/bricks/manifests/text.manifest.d.ts +2 -5
- package/dist/shared/bricks/manifests/text.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/text.manifest.js +10 -9
- package/dist/shared/bricks/manifests/timeline.manifest.js +11 -10
- package/dist/shared/bricks/manifests/video.manifest.js +9 -8
- package/dist/shared/bricks/props/background.d.ts.map +1 -1
- package/dist/shared/bricks/props/background.js +1 -1
- package/dist/shared/bricks/props/border.js +2 -2
- package/dist/shared/bricks/props/color.d.ts.map +1 -1
- package/dist/shared/bricks/props/color.js +1 -1
- package/dist/shared/bricks/props/common.d.ts.map +1 -1
- package/dist/shared/bricks/props/common.js +2 -1
- package/dist/shared/bricks/props/grow.d.ts +3 -0
- package/dist/shared/bricks/props/grow.d.ts.map +1 -0
- package/dist/shared/bricks/props/grow.js +10 -0
- package/dist/shared/bricks/props/grow.js.map +1 -0
- package/dist/shared/bricks/props/helpers.js +3 -2
- package/dist/shared/bricks/props/image.d.ts +1 -0
- package/dist/shared/bricks/props/image.d.ts.map +1 -1
- package/dist/shared/bricks/props/image.js +1 -1
- package/dist/shared/bricks/props/string.d.ts.map +1 -1
- package/dist/shared/bricks/props/string.js +1 -1
- package/dist/shared/bricks.d.ts +18 -17
- package/dist/shared/bricks.d.ts.map +1 -1
- package/dist/shared/bricks.js +39 -38
- package/dist/shared/chunk-2EOCK66Z.js +19 -0
- package/dist/shared/chunk-2EOCK66Z.js.map +1 -0
- package/dist/shared/{chunk-XXPSM6UA.js → chunk-2UEPTT5J.js} +5 -9
- package/dist/shared/chunk-2UEPTT5J.js.map +1 -0
- package/dist/shared/{chunk-DRQKKPTX.js → chunk-2Z5WOCFS.js} +41 -1
- package/dist/shared/chunk-2Z5WOCFS.js.map +1 -0
- package/dist/shared/{chunk-7U5WPHXB.js → chunk-34IUWNRX.js} +7 -7
- package/dist/shared/chunk-57NRTXRA.js +309 -0
- package/dist/shared/chunk-57NRTXRA.js.map +1 -0
- package/dist/shared/{chunk-T6C3NG2L.js → chunk-5HJT5NJ3.js} +8 -8
- package/dist/shared/{chunk-BZTWZC77.js → chunk-5J4Y43RM.js} +37 -179
- package/dist/shared/chunk-5J4Y43RM.js.map +1 -0
- package/dist/shared/{chunk-KKWT3OXF.js → chunk-5OVOXUFX.js} +3 -2
- package/dist/shared/{chunk-KKWT3OXF.js.map → chunk-5OVOXUFX.js.map} +1 -1
- package/dist/shared/{chunk-XK2CERPB.js → chunk-5SNSUC6Q.js} +7 -7
- package/dist/shared/{chunk-JLDAS3VE.js → chunk-B5T2LFV2.js} +10 -14
- package/dist/shared/chunk-B5T2LFV2.js.map +1 -0
- package/dist/shared/{chunk-PF75LW33.js → chunk-E3ZW57HF.js} +18 -9
- package/dist/shared/chunk-E3ZW57HF.js.map +1 -0
- package/dist/shared/{chunk-JSDKK5QN.js → chunk-EUFVTHAG.js} +5 -3
- package/dist/shared/chunk-EUFVTHAG.js.map +1 -0
- package/dist/shared/{chunk-U4KZUX37.js → chunk-FC52EHCC.js} +8 -8
- package/dist/shared/chunk-FC52EHCC.js.map +1 -0
- package/dist/shared/{chunk-JW7MQAU4.js → chunk-FVV27R73.js} +9 -94
- package/dist/shared/chunk-FVV27R73.js.map +1 -0
- package/dist/shared/{chunk-SQXZNGQF.js → chunk-FYGFB5U5.js} +3 -1
- package/dist/shared/chunk-FYGFB5U5.js.map +1 -0
- package/dist/shared/{chunk-J45LSQT6.js → chunk-GNTJT7MR.js} +2 -2
- package/dist/shared/chunk-HHUFGV7J.js +259 -0
- package/dist/shared/chunk-HHUFGV7J.js.map +1 -0
- package/dist/shared/{chunk-W2RFDII5.js → chunk-IMDOF55E.js} +12 -4
- package/dist/shared/chunk-IMDOF55E.js.map +1 -0
- package/dist/shared/{chunk-KQH6V22E.js → chunk-IPWYNE6Y.js} +25 -25
- package/dist/shared/{chunk-H6TMBELF.js → chunk-J6R3GSKS.js} +46 -34
- package/dist/shared/chunk-J6R3GSKS.js.map +1 -0
- package/dist/shared/{chunk-TBT2PTGB.js → chunk-KRODRZNS.js} +9 -9
- package/dist/shared/chunk-KTA7XES3.js +168 -0
- package/dist/shared/chunk-KTA7XES3.js.map +1 -0
- package/dist/shared/{chunk-SK2O7GFC.js → chunk-L4W4B2RQ.js} +15 -70
- package/dist/shared/chunk-L4W4B2RQ.js.map +1 -0
- package/dist/shared/{chunk-MYOLWTB2.js → chunk-NTP6BKRU.js} +9 -9
- package/dist/shared/chunk-NTP6BKRU.js.map +1 -0
- package/dist/shared/{chunk-JF52BBFD.js → chunk-O53V22BK.js} +18 -10
- package/dist/shared/chunk-O53V22BK.js.map +1 -0
- package/dist/shared/{chunk-ZVJNRKT4.js → chunk-ORIUCOED.js} +7 -7
- package/dist/shared/{chunk-LGDDJJHK.js → chunk-PFZMRSHJ.js} +11 -11
- package/dist/shared/{chunk-6AE7UD73.js → chunk-QHKOAIOK.js} +31 -60
- package/dist/shared/chunk-QHKOAIOK.js.map +1 -0
- package/dist/shared/{chunk-LPAQ47C6.js → chunk-RDOCVLCF.js} +11 -11
- package/dist/shared/{chunk-VSLRTXLF.js → chunk-RFH7PEVS.js} +5 -4
- package/dist/shared/chunk-RFH7PEVS.js.map +1 -0
- package/dist/shared/{chunk-XNRSL6FL.js → chunk-T3UPW5OW.js} +5 -4
- package/dist/shared/{chunk-XNRSL6FL.js.map → chunk-T3UPW5OW.js.map} +1 -1
- package/dist/shared/{chunk-FUUSAMN3.js → chunk-TGKNA2JS.js} +8 -8
- package/dist/shared/{chunk-HY7JOP3J.js → chunk-TZ6X7ZM5.js} +19 -11
- package/dist/shared/chunk-TZ6X7ZM5.js.map +1 -0
- package/dist/shared/{chunk-VTCHJT4O.js → chunk-UC75KRLX.js} +2 -2
- package/dist/shared/{chunk-4KY7OZWD.js → chunk-VMIJ6MG5.js} +13 -13
- package/dist/shared/{chunk-SRYBJ6NQ.js → chunk-VYA2FCTY.js} +2 -2
- package/dist/shared/{chunk-LGGPCCCY.js → chunk-XYWSIMZ6.js} +3 -3
- package/dist/shared/chunk-XYWSIMZ6.js.map +1 -0
- package/dist/shared/{chunk-FHA4DFIM.js → chunk-ZYQZUWF7.js} +10 -10
- package/dist/shared/{chunk-2O5HVPID.js → chunk-ZZVYD4BG.js} +3 -3
- package/dist/shared/context.d.ts +4 -0
- package/dist/shared/context.d.ts.map +1 -1
- package/dist/shared/context.js +43 -42
- package/dist/shared/context.js.map +1 -1
- package/dist/shared/page.d.ts +2 -0
- package/dist/shared/page.d.ts.map +1 -1
- package/dist/shared/page.js +41 -40
- package/dist/shared/site.d.ts +7 -0
- package/dist/shared/site.d.ts.map +1 -1
- package/dist/shared/site.js +43 -42
- package/dist/shared/sitemap.js +42 -41
- package/dist/shared/utils/schema.d.ts +0 -5
- package/dist/shared/utils/schema.d.ts.map +1 -1
- package/dist/shared/utils/schema.js +1 -3
- package/package.json +2 -2
- package/src/shared/ai/schemas.ts +1 -1
- package/src/shared/ai/types.ts +2 -2
- package/src/shared/bricks/manifests/card.manifest.ts +25 -168
- package/src/shared/bricks/manifests/hero.manifest.ts +44 -249
- package/src/shared/bricks/manifests/html.manifest.ts +6 -0
- package/src/shared/bricks/manifests/icon.manifest.ts +1 -89
- package/src/shared/bricks/manifests/image.manifest.ts +0 -4
- package/src/shared/bricks/manifests/images-gallery.manifest.ts +8 -0
- package/src/shared/bricks/manifests/map.manifest.ts +9 -65
- package/src/shared/bricks/manifests/sidebar.manifest.ts +0 -1
- package/src/shared/bricks/manifests/social-links.manifest.ts +0 -1
- package/src/shared/bricks/manifests/spacer.manifest.ts +0 -1
- package/src/shared/bricks/manifests/table.manifest.ts +6 -0
- package/src/shared/bricks/manifests/tabs.manifest.ts +12 -429
- package/src/shared/bricks/manifests/testimonials.manifest.ts +28 -226
- package/src/shared/bricks/manifests/text.manifest.ts +16 -44
- package/src/shared/bricks/props/background.ts +2 -1
- package/src/shared/bricks/props/color.ts +5 -2
- package/src/shared/bricks/props/common.ts +2 -8
- package/src/shared/bricks/props/grow.ts +11 -0
- package/src/shared/bricks/props/image.ts +40 -0
- package/src/shared/bricks/props/string.ts +2 -0
- package/src/shared/bricks.ts +33 -23
- package/src/shared/page.ts +1 -0
- package/src/shared/site.ts +1 -0
- package/src/shared/utils/schema.ts +28 -18
- package/src/shared/utils/tests/schema.test.ts +211 -4
- package/dist/shared/chunk-6AE7UD73.js.map +0 -1
- package/dist/shared/chunk-BZTWZC77.js.map +0 -1
- package/dist/shared/chunk-DRQKKPTX.js.map +0 -1
- package/dist/shared/chunk-H6TMBELF.js.map +0 -1
- package/dist/shared/chunk-HUWMIXNN.js +0 -570
- package/dist/shared/chunk-HUWMIXNN.js.map +0 -1
- package/dist/shared/chunk-HY7JOP3J.js.map +0 -1
- package/dist/shared/chunk-JF52BBFD.js.map +0 -1
- package/dist/shared/chunk-JLDAS3VE.js.map +0 -1
- package/dist/shared/chunk-JSDKK5QN.js.map +0 -1
- package/dist/shared/chunk-JW7MQAU4.js.map +0 -1
- package/dist/shared/chunk-LGGPCCCY.js.map +0 -1
- package/dist/shared/chunk-MYOLWTB2.js.map +0 -1
- package/dist/shared/chunk-O24RDXZS.js +0 -505
- package/dist/shared/chunk-O24RDXZS.js.map +0 -1
- package/dist/shared/chunk-PF75LW33.js.map +0 -1
- package/dist/shared/chunk-QEJGPYTB.js +0 -462
- package/dist/shared/chunk-QEJGPYTB.js.map +0 -1
- package/dist/shared/chunk-SK2O7GFC.js.map +0 -1
- package/dist/shared/chunk-SQXZNGQF.js.map +0 -1
- package/dist/shared/chunk-U4KZUX37.js.map +0 -1
- package/dist/shared/chunk-VSLRTXLF.js.map +0 -1
- package/dist/shared/chunk-W2RFDII5.js.map +0 -1
- package/dist/shared/chunk-XXPSM6UA.js.map +0 -1
- /package/dist/shared/{chunk-7U5WPHXB.js.map → chunk-34IUWNRX.js.map} +0 -0
- /package/dist/shared/{chunk-T6C3NG2L.js.map → chunk-5HJT5NJ3.js.map} +0 -0
- /package/dist/shared/{chunk-XK2CERPB.js.map → chunk-5SNSUC6Q.js.map} +0 -0
- /package/dist/shared/{chunk-J45LSQT6.js.map → chunk-GNTJT7MR.js.map} +0 -0
- /package/dist/shared/{chunk-KQH6V22E.js.map → chunk-IPWYNE6Y.js.map} +0 -0
- /package/dist/shared/{chunk-TBT2PTGB.js.map → chunk-KRODRZNS.js.map} +0 -0
- /package/dist/shared/{chunk-ZVJNRKT4.js.map → chunk-ORIUCOED.js.map} +0 -0
- /package/dist/shared/{chunk-LGDDJJHK.js.map → chunk-PFZMRSHJ.js.map} +0 -0
- /package/dist/shared/{chunk-LPAQ47C6.js.map → chunk-RDOCVLCF.js.map} +0 -0
- /package/dist/shared/{chunk-FUUSAMN3.js.map → chunk-TGKNA2JS.js.map} +0 -0
- /package/dist/shared/{chunk-VTCHJT4O.js.map → chunk-UC75KRLX.js.map} +0 -0
- /package/dist/shared/{chunk-4KY7OZWD.js.map → chunk-VMIJ6MG5.js.map} +0 -0
- /package/dist/shared/{chunk-SRYBJ6NQ.js.map → chunk-VYA2FCTY.js.map} +0 -0
- /package/dist/shared/{chunk-FHA4DFIM.js.map → chunk-ZYQZUWF7.js.map} +0 -0
- /package/dist/shared/{chunk-2O5HVPID.js.map → chunk-ZZVYD4BG.js.map} +0 -0
|
@@ -6,6 +6,7 @@ import { shadow } from "../props/effects";
|
|
|
6
6
|
import { Type } from "@sinclair/typebox";
|
|
7
7
|
import { number } from "../props/number";
|
|
8
8
|
import type { BrickExample } from "./_types";
|
|
9
|
+
import { grow } from "../props/grow";
|
|
9
10
|
|
|
10
11
|
export const DEFAULTS = {
|
|
11
12
|
lat: 48.8566, // Default latitude (Paris)
|
|
@@ -74,6 +75,11 @@ export const manifest = defineBrickManifest({
|
|
|
74
75
|
}),
|
|
75
76
|
),
|
|
76
77
|
shadow: Type.Optional(shadow()),
|
|
78
|
+
grow: Type.Optional(
|
|
79
|
+
grow({
|
|
80
|
+
default: true,
|
|
81
|
+
}),
|
|
82
|
+
),
|
|
77
83
|
}),
|
|
78
84
|
});
|
|
79
85
|
|
|
@@ -107,7 +113,8 @@ export const examples: BrickExample<Manifest>[] = [
|
|
|
107
113
|
},
|
|
108
114
|
},
|
|
109
115
|
{
|
|
110
|
-
description:
|
|
116
|
+
description:
|
|
117
|
+
"Business location map with high zoom level and rounded corners, take the full width of its container",
|
|
111
118
|
type: "map",
|
|
112
119
|
props: {
|
|
113
120
|
lat: "34.0522",
|
|
@@ -115,6 +122,7 @@ export const examples: BrickExample<Manifest>[] = [
|
|
|
115
122
|
address: "Los Angeles, CA",
|
|
116
123
|
tooltip: "Our Los Angeles Office",
|
|
117
124
|
zoom: 18,
|
|
125
|
+
grow: true,
|
|
118
126
|
rounding: "rounded-2xl",
|
|
119
127
|
shadow: "shadow-xl",
|
|
120
128
|
},
|
|
@@ -145,68 +153,4 @@ export const examples: BrickExample<Manifest>[] = [
|
|
|
145
153
|
shadow: "shadow-md",
|
|
146
154
|
},
|
|
147
155
|
},
|
|
148
|
-
{
|
|
149
|
-
description: "Hotel location with low zoom for area overview",
|
|
150
|
-
type: "map",
|
|
151
|
-
props: {
|
|
152
|
-
lat: "36.1699",
|
|
153
|
-
lng: "-115.1398",
|
|
154
|
-
address: "Las Vegas, NV",
|
|
155
|
-
tooltip: "Downtown Las Vegas Hotel",
|
|
156
|
-
zoom: 13,
|
|
157
|
-
rounding: "rounded-xl",
|
|
158
|
-
shadow: "shadow-lg",
|
|
159
|
-
},
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
description: "Store location with maximum zoom for street view detail",
|
|
163
|
-
type: "map",
|
|
164
|
-
props: {
|
|
165
|
-
lat: "47.6062",
|
|
166
|
-
lng: "-122.3321",
|
|
167
|
-
address: "Seattle, WA",
|
|
168
|
-
tooltip: "Seattle Flagship Store",
|
|
169
|
-
zoom: 18,
|
|
170
|
-
rounding: "rounded-md",
|
|
171
|
-
shadow: "shadow-sm",
|
|
172
|
-
},
|
|
173
|
-
},
|
|
174
|
-
{
|
|
175
|
-
description: "Park location with moderate zoom and minimal styling",
|
|
176
|
-
type: "map",
|
|
177
|
-
props: {
|
|
178
|
-
lat: "39.7392",
|
|
179
|
-
lng: "-104.9903",
|
|
180
|
-
address: "Denver, CO",
|
|
181
|
-
tooltip: "City Park Recreation Area",
|
|
182
|
-
zoom: 14,
|
|
183
|
-
rounding: "rounded-sm",
|
|
184
|
-
},
|
|
185
|
-
},
|
|
186
|
-
{
|
|
187
|
-
description: "Dynamic business location using company query",
|
|
188
|
-
type: "map",
|
|
189
|
-
props: {
|
|
190
|
-
lat: "{{company.latitude}}",
|
|
191
|
-
lng: "{{company.longitude}}",
|
|
192
|
-
address: "{{company.address}}",
|
|
193
|
-
tooltip: "{{company.name}} - {{company.address}}",
|
|
194
|
-
zoom: 16,
|
|
195
|
-
rounding: "rounded-lg",
|
|
196
|
-
shadow: "shadow-md",
|
|
197
|
-
},
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
description: "Dynamic event venue using event query",
|
|
201
|
-
type: "map",
|
|
202
|
-
props: {
|
|
203
|
-
lat: "{{event.venueLatitude}}",
|
|
204
|
-
lng: "{{event.venueLongitude}}",
|
|
205
|
-
address: "{{event.venueAddress}}",
|
|
206
|
-
tooltip: "{{event.title}} - {{event.venueName}}",
|
|
207
|
-
zoom: 17,
|
|
208
|
-
rounding: "rounded-xl",
|
|
209
|
-
shadow: "shadow-lg",
|
|
210
|
-
},
|
|
211
|
-
},
|
|
212
156
|
];
|
|
@@ -6,7 +6,6 @@ import { urlOrPageId } from "../props/string";
|
|
|
6
6
|
import { backgroundColor } from "../props/background";
|
|
7
7
|
import { border } from "../props/border";
|
|
8
8
|
import { fixedPositioned } from "../props/position";
|
|
9
|
-
import type { BrickProps } from "../props/types";
|
|
10
9
|
import { shadow } from "../props/effects";
|
|
11
10
|
import type { BrickExample } from "./_types";
|
|
12
11
|
|
|
@@ -3,7 +3,6 @@ import { TiSocialFlickr } from "react-icons/ti";
|
|
|
3
3
|
import { defineBrickManifest } from "~/shared/brick-manifest";
|
|
4
4
|
import { defineProps } from "../props/helpers";
|
|
5
5
|
import { icon } from "../props/string";
|
|
6
|
-
import type { BrickProps } from "../props/types";
|
|
7
6
|
import { fontSize } from "../props/text";
|
|
8
7
|
import { direction } from "../props/direction";
|
|
9
8
|
import { colorPreset } from "../props/color-preset";
|
|
@@ -9,6 +9,7 @@ import { cssLength } from "../props/css-length";
|
|
|
9
9
|
import { fontSize } from "../props/text";
|
|
10
10
|
import { StringEnum } from "~/shared/utils/string-enum";
|
|
11
11
|
import type { BrickExample } from "./_types";
|
|
12
|
+
import { grow } from "../props/grow";
|
|
12
13
|
|
|
13
14
|
export const manifest = defineBrickManifest({
|
|
14
15
|
type: "table",
|
|
@@ -151,6 +152,11 @@ export const manifest = defineBrickManifest({
|
|
|
151
152
|
default: { width: "border", color: "border-gray-200" },
|
|
152
153
|
}),
|
|
153
154
|
),
|
|
155
|
+
grow: Type.Optional(
|
|
156
|
+
grow({
|
|
157
|
+
default: true,
|
|
158
|
+
}),
|
|
159
|
+
),
|
|
154
160
|
}),
|
|
155
161
|
});
|
|
156
162
|
|
|
@@ -3,13 +3,13 @@ import { defineProps } from "../props/helpers";
|
|
|
3
3
|
import { Type } from "@sinclair/typebox";
|
|
4
4
|
import { border, rounding } from "../props/border";
|
|
5
5
|
import { shadow } from "../props/effects";
|
|
6
|
-
import type { BrickProps } from "../props/types";
|
|
7
6
|
import { cssLength } from "../props/css-length";
|
|
8
7
|
import { HiOutlineViewColumns } from "react-icons/hi2";
|
|
9
8
|
import { colorPreset } from "../props/color-preset";
|
|
10
9
|
import { loop } from "../props/dynamic";
|
|
11
10
|
import { StringEnum } from "~/shared/utils/string-enum";
|
|
12
11
|
import type { BrickExample } from "./_types";
|
|
12
|
+
import { TfiLayoutTabWindow } from "react-icons/tfi";
|
|
13
13
|
|
|
14
14
|
// Tab configuration schema
|
|
15
15
|
const tabRef = Type.Object({
|
|
@@ -34,6 +34,7 @@ export const manifest = defineBrickManifest({
|
|
|
34
34
|
aiInstructions:
|
|
35
35
|
"Tabs are containers for organizing content into multiple panels. Each tab has a label and contains child bricks. Users can click tab buttons to switch between different content panels. Ideal for organizing related content, settings panels, or product information.",
|
|
36
36
|
isContainer: true,
|
|
37
|
+
consumesMultipleQueryRows: true,
|
|
37
38
|
defaultWidth: {
|
|
38
39
|
desktop: "100%",
|
|
39
40
|
mobile: "100%",
|
|
@@ -41,7 +42,7 @@ export const manifest = defineBrickManifest({
|
|
|
41
42
|
defaultHeight: {
|
|
42
43
|
desktop: "auto",
|
|
43
44
|
},
|
|
44
|
-
icon:
|
|
45
|
+
icon: TfiLayoutTabWindow,
|
|
45
46
|
props: defineProps({
|
|
46
47
|
colorPreset: Type.Optional(
|
|
47
48
|
colorPreset({
|
|
@@ -120,21 +121,19 @@ export const manifest = defineBrickManifest({
|
|
|
120
121
|
border: Type.Optional(border()),
|
|
121
122
|
shadow: Type.Optional(shadow()),
|
|
122
123
|
loop: Type.Optional(loop()),
|
|
123
|
-
$children: Type.Array(Type.
|
|
124
|
+
$children: Type.Array(Type.Any(), {
|
|
124
125
|
"ui:field": "hidden",
|
|
125
|
-
description:
|
|
126
|
-
|
|
126
|
+
description:
|
|
127
|
+
"Array of child bricks - each item represents the content for one tab. If you want multiple bricks in one tab, use a 'box' brick as the single child for that tab.",
|
|
127
128
|
examples: [
|
|
128
129
|
[
|
|
129
130
|
// Tab 1 content
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
content: "<h3>Overview</h3><p>This is the overview tab content.</p>",
|
|
135
|
-
},
|
|
131
|
+
{
|
|
132
|
+
type: "text",
|
|
133
|
+
props: {
|
|
134
|
+
content: "<h3>Overview</h3><p>This is the overview tab content.</p>",
|
|
136
135
|
},
|
|
137
|
-
|
|
136
|
+
},
|
|
138
137
|
// Tab 2 content
|
|
139
138
|
[
|
|
140
139
|
{
|
|
@@ -143,13 +142,6 @@ export const manifest = defineBrickManifest({
|
|
|
143
142
|
content: "<h3>Features</h3><p>Here are our key features.</p>",
|
|
144
143
|
},
|
|
145
144
|
},
|
|
146
|
-
{
|
|
147
|
-
type: "button",
|
|
148
|
-
props: {
|
|
149
|
-
text: "Learn More",
|
|
150
|
-
link: "/features",
|
|
151
|
-
},
|
|
152
|
-
},
|
|
153
145
|
],
|
|
154
146
|
],
|
|
155
147
|
],
|
|
@@ -159,413 +151,4 @@ export const manifest = defineBrickManifest({
|
|
|
159
151
|
|
|
160
152
|
export type Manifest = typeof manifest;
|
|
161
153
|
|
|
162
|
-
export const examples: BrickExample<Manifest>[] = [
|
|
163
|
-
{
|
|
164
|
-
description: "Simple tabs with basic content in each panel",
|
|
165
|
-
type: "tabs",
|
|
166
|
-
props: {
|
|
167
|
-
tabs: [{ label: "About" }, { label: "Services" }, { label: "Contact" }],
|
|
168
|
-
defaultTab: 0,
|
|
169
|
-
tabStyle: "underline",
|
|
170
|
-
$children: [
|
|
171
|
-
[
|
|
172
|
-
{
|
|
173
|
-
type: "text",
|
|
174
|
-
props: {
|
|
175
|
-
content: "<h3>About Us</h3><p>We are a company focused on delivering exceptional results.</p>",
|
|
176
|
-
},
|
|
177
|
-
},
|
|
178
|
-
],
|
|
179
|
-
[
|
|
180
|
-
{
|
|
181
|
-
type: "text",
|
|
182
|
-
props: {
|
|
183
|
-
content: "<h3>Our Services</h3><p>We offer a wide range of professional services.</p>",
|
|
184
|
-
},
|
|
185
|
-
},
|
|
186
|
-
{
|
|
187
|
-
type: "button",
|
|
188
|
-
props: {
|
|
189
|
-
text: "View All Services",
|
|
190
|
-
link: "/services",
|
|
191
|
-
},
|
|
192
|
-
},
|
|
193
|
-
],
|
|
194
|
-
[
|
|
195
|
-
{
|
|
196
|
-
type: "text",
|
|
197
|
-
props: {
|
|
198
|
-
content:
|
|
199
|
-
"<h3>Contact Information</h3><p>Email: hello@company.com</p><p>Phone: (555) 123-4567</p>",
|
|
200
|
-
},
|
|
201
|
-
},
|
|
202
|
-
],
|
|
203
|
-
],
|
|
204
|
-
},
|
|
205
|
-
},
|
|
206
|
-
{
|
|
207
|
-
description: "Product information tabs with pills style and custom styling",
|
|
208
|
-
type: "tabs",
|
|
209
|
-
props: {
|
|
210
|
-
tabs: [{ label: "Overview" }, { label: "Specifications" }, { label: "Reviews" }, { label: "Support" }],
|
|
211
|
-
defaultTab: 0,
|
|
212
|
-
tabStyle: "pills",
|
|
213
|
-
fullWidth: true,
|
|
214
|
-
colorPreset: {
|
|
215
|
-
color: "primary-50",
|
|
216
|
-
},
|
|
217
|
-
border: {
|
|
218
|
-
width: "border",
|
|
219
|
-
color: "border-primary-200",
|
|
220
|
-
},
|
|
221
|
-
rounding: "rounded-lg",
|
|
222
|
-
padding: "2rem",
|
|
223
|
-
$children: [
|
|
224
|
-
[
|
|
225
|
-
{
|
|
226
|
-
type: "text",
|
|
227
|
-
props: {
|
|
228
|
-
content: "<h3>Product Overview</h3><p>This product revolutionizes the way you work.</p>",
|
|
229
|
-
},
|
|
230
|
-
},
|
|
231
|
-
{
|
|
232
|
-
type: "image",
|
|
233
|
-
props: {
|
|
234
|
-
src: "https://via.placeholder.com/400x200",
|
|
235
|
-
alt: "Product image",
|
|
236
|
-
},
|
|
237
|
-
},
|
|
238
|
-
],
|
|
239
|
-
[
|
|
240
|
-
{
|
|
241
|
-
type: "text",
|
|
242
|
-
props: {
|
|
243
|
-
content:
|
|
244
|
-
'<h3>Technical Specifications</h3><ul><li>Weight: 2.5 lbs</li><li>Dimensions: 12" x 8" x 2"</li><li>Battery: 8 hours</li></ul>',
|
|
245
|
-
},
|
|
246
|
-
},
|
|
247
|
-
],
|
|
248
|
-
[
|
|
249
|
-
{
|
|
250
|
-
type: "text",
|
|
251
|
-
props: {
|
|
252
|
-
content:
|
|
253
|
-
'<h3>Customer Reviews</h3><p>★★★★★ "Amazing product, highly recommend!"</p><p>★★★★☆ "Great value for money."</p>',
|
|
254
|
-
},
|
|
255
|
-
},
|
|
256
|
-
],
|
|
257
|
-
[
|
|
258
|
-
{
|
|
259
|
-
type: "text",
|
|
260
|
-
props: {
|
|
261
|
-
content: "<h3>Support</h3><p>Need help? Contact our support team.</p>",
|
|
262
|
-
},
|
|
263
|
-
},
|
|
264
|
-
{
|
|
265
|
-
type: "button",
|
|
266
|
-
props: {
|
|
267
|
-
text: "Contact Support",
|
|
268
|
-
link: "/support",
|
|
269
|
-
},
|
|
270
|
-
},
|
|
271
|
-
],
|
|
272
|
-
],
|
|
273
|
-
},
|
|
274
|
-
},
|
|
275
|
-
{
|
|
276
|
-
description: "Portfolio sections with bordered tabs",
|
|
277
|
-
type: "tabs",
|
|
278
|
-
props: {
|
|
279
|
-
tabs: [{ label: "Web Design" }, { label: "Mobile Apps" }, { label: "Branding" }],
|
|
280
|
-
defaultTab: 0,
|
|
281
|
-
tabStyle: "bordered",
|
|
282
|
-
shadow: "shadow-md",
|
|
283
|
-
rounding: "rounded-xl",
|
|
284
|
-
$children: [
|
|
285
|
-
[
|
|
286
|
-
{
|
|
287
|
-
type: "text",
|
|
288
|
-
props: {
|
|
289
|
-
content: "<h3>Web Design Projects</h3><p>Beautiful, responsive websites that convert.</p>",
|
|
290
|
-
},
|
|
291
|
-
},
|
|
292
|
-
{
|
|
293
|
-
type: "image",
|
|
294
|
-
props: {
|
|
295
|
-
src: "https://via.placeholder.com/600x300",
|
|
296
|
-
alt: "Web design portfolio",
|
|
297
|
-
},
|
|
298
|
-
},
|
|
299
|
-
],
|
|
300
|
-
[
|
|
301
|
-
{
|
|
302
|
-
type: "text",
|
|
303
|
-
props: {
|
|
304
|
-
content: "<h3>Mobile Applications</h3><p>Native and cross-platform mobile solutions.</p>",
|
|
305
|
-
},
|
|
306
|
-
},
|
|
307
|
-
{
|
|
308
|
-
type: "image",
|
|
309
|
-
props: {
|
|
310
|
-
src: "https://via.placeholder.com/300x500",
|
|
311
|
-
alt: "Mobile app portfolio",
|
|
312
|
-
},
|
|
313
|
-
},
|
|
314
|
-
],
|
|
315
|
-
[
|
|
316
|
-
{
|
|
317
|
-
type: "text",
|
|
318
|
-
props: {
|
|
319
|
-
content:
|
|
320
|
-
"<h3>Brand Identity</h3><p>Comprehensive branding solutions for modern businesses.</p>",
|
|
321
|
-
},
|
|
322
|
-
},
|
|
323
|
-
{
|
|
324
|
-
type: "image",
|
|
325
|
-
props: {
|
|
326
|
-
src: "https://via.placeholder.com/500x400",
|
|
327
|
-
alt: "Branding portfolio",
|
|
328
|
-
},
|
|
329
|
-
},
|
|
330
|
-
],
|
|
331
|
-
],
|
|
332
|
-
},
|
|
333
|
-
},
|
|
334
|
-
{
|
|
335
|
-
description: "FAQ sections with bottom-positioned tabs",
|
|
336
|
-
type: "tabs",
|
|
337
|
-
props: {
|
|
338
|
-
tabs: [{ label: "General" }, { label: "Billing" }, { label: "Technical" }],
|
|
339
|
-
defaultTab: 0,
|
|
340
|
-
tabPosition: "bottom",
|
|
341
|
-
tabStyle: "underline",
|
|
342
|
-
padding: "1.5rem",
|
|
343
|
-
$children: [
|
|
344
|
-
[
|
|
345
|
-
{
|
|
346
|
-
type: "text",
|
|
347
|
-
props: {
|
|
348
|
-
content:
|
|
349
|
-
"<h3>General Questions</h3><p><strong>What is your company about?</strong></p><p>We provide excellent services to our customers.</p><p><strong>Where are you located?</strong></p><p>We have offices worldwide.</p>",
|
|
350
|
-
},
|
|
351
|
-
},
|
|
352
|
-
],
|
|
353
|
-
[
|
|
354
|
-
{
|
|
355
|
-
type: "text",
|
|
356
|
-
props: {
|
|
357
|
-
content:
|
|
358
|
-
"<h3>Billing Questions</h3><p><strong>How does billing work?</strong></p><p>We bill monthly based on usage.</p><p><strong>Can I change my plan?</strong></p><p>Yes, you can upgrade or downgrade anytime.</p>",
|
|
359
|
-
},
|
|
360
|
-
},
|
|
361
|
-
],
|
|
362
|
-
[
|
|
363
|
-
{
|
|
364
|
-
type: "text",
|
|
365
|
-
props: {
|
|
366
|
-
content:
|
|
367
|
-
"<h3>Technical Support</h3><p><strong>How do I reset my password?</strong></p><p>Use the forgot password link on the login page.</p><p><strong>Is there an API?</strong></p><p>Yes, we have a comprehensive REST API.</p>",
|
|
368
|
-
},
|
|
369
|
-
},
|
|
370
|
-
],
|
|
371
|
-
],
|
|
372
|
-
},
|
|
373
|
-
},
|
|
374
|
-
{
|
|
375
|
-
description: "Team member profiles using teamMembers query with dynamic tabs",
|
|
376
|
-
type: "tabs",
|
|
377
|
-
props: {
|
|
378
|
-
loop: {
|
|
379
|
-
over: "teamMembers",
|
|
380
|
-
},
|
|
381
|
-
tabs: [{ label: "{{teamMembers.name}}" }],
|
|
382
|
-
tabStyle: "pills",
|
|
383
|
-
fullWidth: false,
|
|
384
|
-
colorPreset: {
|
|
385
|
-
color: "secondary-100",
|
|
386
|
-
},
|
|
387
|
-
padding: "2rem",
|
|
388
|
-
$children: [
|
|
389
|
-
[
|
|
390
|
-
{
|
|
391
|
-
type: "image",
|
|
392
|
-
props: {
|
|
393
|
-
src: "{{teamMembers.photo}}",
|
|
394
|
-
alt: "{{teamMembers.name}}",
|
|
395
|
-
},
|
|
396
|
-
},
|
|
397
|
-
{
|
|
398
|
-
type: "text",
|
|
399
|
-
props: {
|
|
400
|
-
content:
|
|
401
|
-
"<h3>{{teamMembers.name}}</h3><p><strong>{{teamMembers.position}}</strong></p><p>{{teamMembers.bio}}</p><p>Email: {{teamMembers.email}}</p>",
|
|
402
|
-
},
|
|
403
|
-
},
|
|
404
|
-
],
|
|
405
|
-
],
|
|
406
|
-
},
|
|
407
|
-
},
|
|
408
|
-
{
|
|
409
|
-
description: "Product categories using productCategories query",
|
|
410
|
-
type: "tabs",
|
|
411
|
-
props: {
|
|
412
|
-
loop: {
|
|
413
|
-
over: "productCategories",
|
|
414
|
-
},
|
|
415
|
-
tabs: [{ label: "{{productCategories.categoryName}}" }],
|
|
416
|
-
tabStyle: "bordered",
|
|
417
|
-
fullWidth: true,
|
|
418
|
-
border: {
|
|
419
|
-
width: "border-2",
|
|
420
|
-
color: "border-primary-300",
|
|
421
|
-
},
|
|
422
|
-
rounding: "rounded-lg",
|
|
423
|
-
shadow: "shadow-lg",
|
|
424
|
-
$children: [
|
|
425
|
-
[
|
|
426
|
-
{
|
|
427
|
-
type: "text",
|
|
428
|
-
props: {
|
|
429
|
-
content:
|
|
430
|
-
"<h3>{{productCategories.categoryName}}</h3><p>{{productCategories.description}}</p><p>{{productCategories.productCount}} products available</p>",
|
|
431
|
-
},
|
|
432
|
-
},
|
|
433
|
-
{
|
|
434
|
-
type: "button",
|
|
435
|
-
props: {
|
|
436
|
-
text: "Browse {{productCategories.categoryName}}",
|
|
437
|
-
link: "/products/{{productCategories.slug}}",
|
|
438
|
-
},
|
|
439
|
-
},
|
|
440
|
-
],
|
|
441
|
-
],
|
|
442
|
-
},
|
|
443
|
-
},
|
|
444
|
-
{
|
|
445
|
-
description: "Service packages with pricing information",
|
|
446
|
-
type: "tabs",
|
|
447
|
-
props: {
|
|
448
|
-
tabs: [{ label: "Basic" }, { label: "Professional" }, { label: "Enterprise" }],
|
|
449
|
-
defaultTab: 1,
|
|
450
|
-
tabStyle: "pills",
|
|
451
|
-
fullWidth: true,
|
|
452
|
-
colorPreset: {
|
|
453
|
-
color: "accent-50",
|
|
454
|
-
},
|
|
455
|
-
border: {
|
|
456
|
-
width: "border",
|
|
457
|
-
color: "border-accent-200",
|
|
458
|
-
},
|
|
459
|
-
rounding: "rounded-xl",
|
|
460
|
-
shadow: "shadow-md",
|
|
461
|
-
padding: "2.5rem",
|
|
462
|
-
$children: [
|
|
463
|
-
[
|
|
464
|
-
{
|
|
465
|
-
type: "text",
|
|
466
|
-
props: {
|
|
467
|
-
content:
|
|
468
|
-
"<h3>Basic Package</h3><p><strong>$99/month</strong></p><ul><li>5 Projects</li><li>10GB Storage</li><li>Email Support</li></ul>",
|
|
469
|
-
},
|
|
470
|
-
},
|
|
471
|
-
{
|
|
472
|
-
type: "button",
|
|
473
|
-
props: {
|
|
474
|
-
text: "Choose Basic",
|
|
475
|
-
link: "/pricing/basic",
|
|
476
|
-
},
|
|
477
|
-
},
|
|
478
|
-
],
|
|
479
|
-
[
|
|
480
|
-
{
|
|
481
|
-
type: "text",
|
|
482
|
-
props: {
|
|
483
|
-
content:
|
|
484
|
-
"<h3>Professional Package</h3><p><strong>$199/month</strong></p><ul><li>25 Projects</li><li>100GB Storage</li><li>Priority Support</li><li>Advanced Analytics</li></ul>",
|
|
485
|
-
},
|
|
486
|
-
},
|
|
487
|
-
{
|
|
488
|
-
type: "button",
|
|
489
|
-
props: {
|
|
490
|
-
text: "Choose Professional",
|
|
491
|
-
link: "/pricing/professional",
|
|
492
|
-
},
|
|
493
|
-
},
|
|
494
|
-
],
|
|
495
|
-
[
|
|
496
|
-
{
|
|
497
|
-
type: "text",
|
|
498
|
-
props: {
|
|
499
|
-
content:
|
|
500
|
-
"<h3>Enterprise Package</h3><p><strong>$499/month</strong></p><ul><li>Unlimited Projects</li><li>1TB Storage</li><li>24/7 Phone Support</li><li>Custom Integrations</li><li>Dedicated Account Manager</li></ul>",
|
|
501
|
-
},
|
|
502
|
-
},
|
|
503
|
-
{
|
|
504
|
-
type: "button",
|
|
505
|
-
props: {
|
|
506
|
-
text: "Contact Sales",
|
|
507
|
-
link: "/contact/enterprise",
|
|
508
|
-
},
|
|
509
|
-
},
|
|
510
|
-
],
|
|
511
|
-
],
|
|
512
|
-
},
|
|
513
|
-
},
|
|
514
|
-
{
|
|
515
|
-
description: "Documentation sections with technical content",
|
|
516
|
-
type: "tabs",
|
|
517
|
-
props: {
|
|
518
|
-
tabs: [
|
|
519
|
-
{ label: "Getting Started" },
|
|
520
|
-
{ label: "API Reference" },
|
|
521
|
-
{ label: "Examples" },
|
|
522
|
-
{ label: "Troubleshooting" },
|
|
523
|
-
],
|
|
524
|
-
defaultTab: 0,
|
|
525
|
-
tabStyle: "underline",
|
|
526
|
-
tabPosition: "top",
|
|
527
|
-
padding: "1.5rem",
|
|
528
|
-
colorPreset: {
|
|
529
|
-
color: "neutral-50",
|
|
530
|
-
},
|
|
531
|
-
$children: [
|
|
532
|
-
[
|
|
533
|
-
{
|
|
534
|
-
type: "text",
|
|
535
|
-
props: {
|
|
536
|
-
content:
|
|
537
|
-
"<h3>Getting Started</h3><p>Welcome to our platform! Here's how to get started:</p><ol><li>Create an account</li><li>Set up your first project</li><li>Invite team members</li></ol>",
|
|
538
|
-
},
|
|
539
|
-
},
|
|
540
|
-
],
|
|
541
|
-
[
|
|
542
|
-
{
|
|
543
|
-
type: "text",
|
|
544
|
-
props: {
|
|
545
|
-
content:
|
|
546
|
-
"<h3>API Reference</h3><p>Our REST API provides programmatic access to all features:</p><pre>GET /api/v1/projects</pre><pre>POST /api/v1/projects</pre>",
|
|
547
|
-
},
|
|
548
|
-
},
|
|
549
|
-
],
|
|
550
|
-
[
|
|
551
|
-
{
|
|
552
|
-
type: "text",
|
|
553
|
-
props: {
|
|
554
|
-
content:
|
|
555
|
-
"<h3>Code Examples</h3><p>Here are some common use cases:</p><pre>curl -X GET https://api.example.com/projects</pre>",
|
|
556
|
-
},
|
|
557
|
-
},
|
|
558
|
-
],
|
|
559
|
-
[
|
|
560
|
-
{
|
|
561
|
-
type: "text",
|
|
562
|
-
props: {
|
|
563
|
-
content:
|
|
564
|
-
"<h3>Troubleshooting</h3><p><strong>Issue:</strong> Cannot connect to API</p><p><strong>Solution:</strong> Check your API key and network connection.</p>",
|
|
565
|
-
},
|
|
566
|
-
},
|
|
567
|
-
],
|
|
568
|
-
],
|
|
569
|
-
},
|
|
570
|
-
},
|
|
571
|
-
];
|
|
154
|
+
export const examples: BrickExample<Manifest>[] = [];
|