@sbuilder/cli 0.13.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +59 -7
- package/README.vi.md +56 -6
- package/dist/bin/sb.js +203 -33
- package/dist/bin/sb.js.map +1 -1
- package/dist/src/agentdocs.js +92 -11
- package/dist/src/agentdocs.js.map +1 -1
- package/dist/src/components.js +174 -16
- package/dist/src/components.js.map +1 -1
- package/dist/src/doctor.js +9 -0
- package/dist/src/doctor.js.map +1 -1
- package/dist/src/envtypes.gen.js +2923 -269
- package/dist/src/envtypes.gen.js.map +1 -1
- package/dist/src/host.js +12 -1
- package/dist/src/host.js.map +1 -1
- package/dist/src/login.js +1 -1
- package/dist/src/next.js +3 -0
- package/dist/src/next.js.map +1 -1
- package/dist/src/preview.js +114 -0
- package/dist/src/preview.js.map +1 -0
- package/dist/src/route.js +3 -1
- package/dist/src/route.js.map +1 -1
- package/dist/src/selfhost.js +189 -0
- package/dist/src/selfhost.js.map +1 -0
- package/dist/src/site.js +104 -16
- package/dist/src/site.js.map +1 -1
- package/dist/src/siteinit.js +214 -57
- package/dist/src/siteinit.js.map +1 -1
- package/dist/src/sitekinds.js +30 -6
- package/dist/src/sitekinds.js.map +1 -1
- package/dist/src/source/parse.js +5 -3
- package/dist/src/source/parse.js.map +1 -1
- package/dist/src/structure.js +114 -0
- package/dist/src/structure.js.map +1 -0
- package/dist/src/templates.js +93 -0
- package/dist/src/templates.js.map +1 -0
- package/dist/src/themediff.js +49 -0
- package/dist/src/themediff.js.map +1 -0
- package/dist/src/vercel.js +79 -56
- package/dist/src/vercel.js.map +1 -1
- package/package.json +1 -1
package/dist/src/envtypes.gen.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// GENERATED by scripts/gen-env-types.mjs from schema/golden/*.json — do not edit.
|
|
1
|
+
// GENERATED by scripts/gen-env-types.mjs from schema/golden/*.json and schema/src (ai.ts, theme.ts) — do not edit.
|
|
2
2
|
// The text of sbuilder-env.d.ts, one line per entry (`sb site types` writes it into a site repo).
|
|
3
3
|
// prettier-ignore
|
|
4
4
|
export const ENV_DTS = [
|
|
@@ -88,13 +88,42 @@ export const ENV_DTS = [
|
|
|
88
88
|
" props: Sb.BaseProps & { type: string; [special: string]: unknown },",
|
|
89
89
|
"): JSX.Element;",
|
|
90
90
|
"",
|
|
91
|
-
"/**
|
|
91
|
+
"/**",
|
|
92
|
+
" * Accordion (basic) — type \"accordion\"",
|
|
93
|
+
" *",
|
|
94
|
+
" * A vertically-stacked accordion that expands/collapses content panels. Children are accordion-content nodes (one per row); each child specials.label is its header text. Multiple rows can be open at once (config.openItems). Use it for collapsible question/answer pairs or grouped detail sections.",
|
|
95
|
+
" *",
|
|
96
|
+
" * Use when: FAQ-style content where questions collapse/expand to reveal answers; Product detail sections (Specifications, Shipping, Returns) that would otherwise make the page very long; Settings or filter groups that can be collapsed to save vertical space.",
|
|
97
|
+
" * Avoid when: All content must be visible at once — use stacked flex-sections instead; Switching between mutually-exclusive groups — use tab instead; A simple bulleted or numbered list — use list instead.",
|
|
98
|
+
" *",
|
|
99
|
+
" * Children: ONLY <AccordionContent> — push refuses any other child.",
|
|
100
|
+
" * Not a child: its <AccordionItem> sits in `export const detached`, linked by config.accordionItemId.",
|
|
101
|
+
" *",
|
|
102
|
+
" * @example",
|
|
103
|
+
" * <Accordion>",
|
|
104
|
+
" * <AccordionContent label=\"Accordion\">",
|
|
105
|
+
" * <Text text=\"…\" />",
|
|
106
|
+
" * </AccordionContent>",
|
|
107
|
+
" * <AccordionContent label=\"Accordion\">",
|
|
108
|
+
" * <Text text=\"…\" />",
|
|
109
|
+
" * </AccordionContent>",
|
|
110
|
+
" * </Accordion>",
|
|
111
|
+
" */",
|
|
92
112
|
"interface AccordionProps extends Sb.BaseProps {",
|
|
93
113
|
" [special: string]: unknown;",
|
|
94
114
|
"}",
|
|
95
115
|
"declare function Accordion(props: AccordionProps): JSX.Element;",
|
|
96
116
|
"",
|
|
97
|
-
"/**
|
|
117
|
+
"/**",
|
|
118
|
+
" * Accordion content (basic) — type \"accordion-content\"",
|
|
119
|
+
" *",
|
|
120
|
+
" * One accordion row's collapsible body — a section-like container that holds arbitrary child elements. Lives only inside an accordion; its specials.label is the header text shown on the row.",
|
|
121
|
+
" *",
|
|
122
|
+
" * Use when: You are adding another row to an existing accordion; A group of elements should live behind one collapsible header.",
|
|
123
|
+
" * Avoid when: Outside an accordion — it only renders as an accordion child; You need a mutually-exclusive switcher — use tab-content instead.",
|
|
124
|
+
" *",
|
|
125
|
+
" * Goes inside <Accordion>.",
|
|
126
|
+
" */",
|
|
98
127
|
"interface AccordionContentProps extends Sb.BaseProps {",
|
|
99
128
|
" /** default: \"Accordion\" */",
|
|
100
129
|
" label?: string;",
|
|
@@ -102,19 +131,37 @@ export const ENV_DTS = [
|
|
|
102
131
|
"}",
|
|
103
132
|
"declare function AccordionContent(props: AccordionContentProps): JSX.Element;",
|
|
104
133
|
"",
|
|
105
|
-
"/**
|
|
134
|
+
"/**",
|
|
135
|
+
" * Accordion header (basic) — type \"accordion-item\"",
|
|
136
|
+
" *",
|
|
137
|
+
" * The shared header skin of an Accordion element — a hidden satellite node whose style and hover state paint every accordion header row. Never placed directly; owned by an accordion via config.accordionItemId.",
|
|
138
|
+
" *",
|
|
139
|
+
" * Use when: Never place this element directly — the accordion element creates and owns it.",
|
|
140
|
+
" * Avoid when: Anywhere in a page tree — it is a style-holder, not a rendered element.",
|
|
141
|
+
" *",
|
|
142
|
+
" * Holds no children.",
|
|
143
|
+
" */",
|
|
106
144
|
"interface AccordionItemProps extends Sb.BaseProps {",
|
|
107
145
|
" [special: string]: unknown;",
|
|
108
146
|
"}",
|
|
109
147
|
"declare function AccordionItem(props: AccordionItemProps): JSX.Element;",
|
|
110
148
|
"",
|
|
111
|
-
"/**
|
|
149
|
+
"/**",
|
|
150
|
+
" * Account Info (advanced) — type \"account-info\"",
|
|
151
|
+
" *",
|
|
152
|
+
" * A signed-in shopper profile card: shows a login prompt to an anonymous visitor and the shopper's own name, email and (optionally) phone once signed in — hydrated client-side, never queried at render time.",
|
|
153
|
+
" *",
|
|
154
|
+
" * Use when: On an /account page so a signed-in shopper can see who they are signed in as; Beside order history, as the profile half of an account dashboard.",
|
|
155
|
+
" * Avoid when: To collect or edit profile data — use a form bound to customer fields instead; As a login FORM — this only shows a prompt + link to the site login page.",
|
|
156
|
+
" *",
|
|
157
|
+
" * Holds no children.",
|
|
158
|
+
" */",
|
|
112
159
|
"interface AccountInfoProps extends Sb.BaseProps {",
|
|
113
|
-
" /** default: \"\" */",
|
|
160
|
+
" /** Login link URL · default: \"\" */",
|
|
114
161
|
" loginHref?: string;",
|
|
115
|
-
" /** default: \"Đăng nhập\" */",
|
|
162
|
+
" /** Login link text · default: \"Đăng nhập\" */",
|
|
116
163
|
" loginLabel?: string;",
|
|
117
|
-
" /** default: \"Đăng nhập để xem thông tin tài khoản\" */",
|
|
164
|
+
" /** Prompt text · default: \"Đăng nhập để xem thông tin tài khoản\" */",
|
|
118
165
|
" promptText?: string;",
|
|
119
166
|
" /** default: true */",
|
|
120
167
|
" showPhone?: boolean;",
|
|
@@ -122,50 +169,86 @@ export const ENV_DTS = [
|
|
|
122
169
|
"}",
|
|
123
170
|
"declare function AccountInfo(props: AccountInfoProps): JSX.Element;",
|
|
124
171
|
"",
|
|
125
|
-
"/**
|
|
172
|
+
"/**",
|
|
173
|
+
" * Address Book (advanced) — type \"address-book\"",
|
|
174
|
+
" *",
|
|
175
|
+
" * The signed-in shopper's own address book: their saved addresses listed with a default badge, plus add, edit, delete and set-default — all saved back to their account. Hydrated client-side; a signed-out visitor sees a sign-in prompt instead.",
|
|
176
|
+
" *",
|
|
177
|
+
" * Use when: On the /account page, beside account info and order history; Anywhere a shopper should manage where their orders ship to.",
|
|
178
|
+
" * Avoid when: To COLLECT a delivery address during checkout — that is the address form field, which writes the order; this element manages the reusable book behind it; For anonymous visitors — the element only shows a prompt until they sign in.",
|
|
179
|
+
" *",
|
|
180
|
+
" * Holds no children.",
|
|
181
|
+
" */",
|
|
126
182
|
"interface AddressBookProps extends Sb.BaseProps {",
|
|
127
|
-
" /** default: \"Thêm địa chỉ\" */",
|
|
183
|
+
" /** Add-button text · default: \"Thêm địa chỉ\" */",
|
|
128
184
|
" addLabel?: string;",
|
|
129
|
-
" /** default: \"Chưa có địa chỉ nào.\" */",
|
|
185
|
+
" /** Empty message · default: \"Chưa có địa chỉ nào.\" */",
|
|
130
186
|
" emptyText?: string;",
|
|
131
|
-
" /** default: \"Đăng nhập để quản lý địa chỉ của bạn\" */",
|
|
187
|
+
" /** Signed-out prompt · default: \"Đăng nhập để quản lý địa chỉ của bạn\" */",
|
|
132
188
|
" signedOutText?: string;",
|
|
133
|
-
" /** default: \"Sổ địa chỉ\" */",
|
|
189
|
+
" /** Section title · default: \"Sổ địa chỉ\" */",
|
|
134
190
|
" title?: string;",
|
|
135
191
|
" [special: string]: unknown;",
|
|
136
192
|
"}",
|
|
137
193
|
"declare function AddressBook(props: AddressBookProps): JSX.Element;",
|
|
138
194
|
"",
|
|
139
|
-
"/**
|
|
195
|
+
"/**",
|
|
196
|
+
" * Breadcrumb (basic) — type \"breadcrumb\"",
|
|
197
|
+
" *",
|
|
198
|
+
" * Navigation breadcrumb trail showing page hierarchy (e.g. Home › Category › Product). Use for wayfinding on detail pages — not for primary navigation or standalone links.",
|
|
199
|
+
" *",
|
|
200
|
+
" * Use when: Product detail page header to show the category path; Blog post page to link back to the blog index and category; Any deep-nested page where users need to retrace their path.",
|
|
201
|
+
" * Avoid when: Top-level pages with no hierarchy — breadcrumbs add noise on home/landing pages; Single-level sites — use a nav bar or button link instead; Inside a Button or Heading element — breadcrumb is a standalone block.",
|
|
202
|
+
" *",
|
|
203
|
+
" * Holds no children.",
|
|
204
|
+
" */",
|
|
140
205
|
"interface BreadcrumbProps extends Sb.BaseProps {",
|
|
141
206
|
" crumbs?: Sb.Json[];",
|
|
142
|
-
" /** default: \"Home\" */",
|
|
207
|
+
" /** Home label · default: \"Home\" */",
|
|
143
208
|
" homeLabel?: string;",
|
|
144
|
-
" /** default: \"p\" */",
|
|
209
|
+
" /** HTML Tag · default: \"p\" */",
|
|
145
210
|
" htmlTag?: string;",
|
|
146
211
|
" /** default: \"ArrowRightSFill\" */",
|
|
147
212
|
" icon?: string;",
|
|
148
|
-
" /** default: true */",
|
|
213
|
+
" /** Last step · format: true or false · default: true */",
|
|
149
214
|
" showCurrent?: boolean;",
|
|
150
|
-
" /** default: \"auto\" */",
|
|
215
|
+
" /** Trail · default: \"auto\" */",
|
|
151
216
|
" source?: string;",
|
|
152
217
|
" [special: string]: unknown;",
|
|
153
218
|
"}",
|
|
154
219
|
"declare function Breadcrumb(props: BreadcrumbProps): JSX.Element;",
|
|
155
220
|
"",
|
|
156
|
-
"/**
|
|
221
|
+
"/**",
|
|
222
|
+
" * Combo contents (store) — type \"bundle-items\"",
|
|
223
|
+
" *",
|
|
224
|
+
" * Lists what a combo product contains — one row per component, with its quantity. Binds product.bundleItems, which only a bundle-kind product carries; on any other product it renders nothing on the published page.",
|
|
225
|
+
" *",
|
|
226
|
+
" * Use when: A product page template that has to serve combo products, where the shopper needs to know what is in the box before buying it.; Beside the price of a combo, where the strike-through already shows a saving but nothing says what the saving is on.; Inside a dataset block on a store page, so each combo card can list its own contents..",
|
|
227
|
+
" * Avoid when: The page never shows a combo — the element renders nothing there, so it is dead weight in the layout.; You want to list variants or option axes: those are product-variants, a different element with a different data source.; You want a general bulleted list of author-typed text: that is the list element, which is not bound to anything..",
|
|
228
|
+
" *",
|
|
229
|
+
" * Holds no children.",
|
|
230
|
+
" */",
|
|
157
231
|
"interface BundleItemsProps extends Sb.BaseProps {",
|
|
158
|
-
" /** default: \"Gồm có\" */",
|
|
232
|
+
" /** Text · default: \"Gồm có\" */",
|
|
159
233
|
" heading?: string;",
|
|
160
|
-
" /** default: \" × \" */",
|
|
234
|
+
" /** Separator · default: \" × \" */",
|
|
161
235
|
" quantitySeparator?: string;",
|
|
162
|
-
" /** default: true */",
|
|
236
|
+
" /** Show heading · format: true or false · default: true */",
|
|
163
237
|
" showHeading?: boolean;",
|
|
164
238
|
" [special: string]: unknown;",
|
|
165
239
|
"}",
|
|
166
240
|
"declare function BundleItems(props: BundleItemsProps): JSX.Element;",
|
|
167
241
|
"",
|
|
168
|
-
"/**
|
|
242
|
+
"/**",
|
|
243
|
+
" * Button (basic) — type \"button\"",
|
|
244
|
+
" *",
|
|
245
|
+
" * Clickable call-to-action button that drives a user to the next step.",
|
|
246
|
+
" *",
|
|
247
|
+
" * Use when: Below a heading and text as the primary action in a hero or section; At the end of a pricing card to start a purchase or sign-up flow.",
|
|
248
|
+
" * Avoid when: For plain inline navigation text — use a link element instead.",
|
|
249
|
+
" *",
|
|
250
|
+
" * Holds no children.",
|
|
251
|
+
" */",
|
|
169
252
|
"interface ButtonProps extends Sb.BaseProps {",
|
|
170
253
|
" /** default: \"button-default\" */",
|
|
171
254
|
" stylePreset?: string;",
|
|
@@ -175,41 +258,103 @@ export const ENV_DTS = [
|
|
|
175
258
|
"}",
|
|
176
259
|
"declare function Button(props: ButtonProps): JSX.Element;",
|
|
177
260
|
"",
|
|
178
|
-
"/**
|
|
261
|
+
"/**",
|
|
262
|
+
" * Carousel (media) — type \"carousel\"",
|
|
263
|
+
" *",
|
|
264
|
+
" * A slideshow / carousel container. Holds `carousel-slide` children (one per slide), each a drop-zone that can contain arbitrary content (image, heading, button…). Shows one slide at a time in a horizontal track with optional prev/next arrows (config.showArrows) and pagination dots (config.showDots). On published pages the \"Carousel\" island slides between them; config.autoplay auto-advances every config.autoplayMs (config.pauseOnHover pauses on hover), config.loop wraps around, config.transition chooses slide|fade, and config.activeIndex sets the first slide.",
|
|
265
|
+
" *",
|
|
266
|
+
" * Use when: A rotating banner or hero slider with several full-width slides; Cycling promos, testimonials, or featured content one slide at a time; Any place a visitor should move through a sequence of rich slides.",
|
|
267
|
+
" * Avoid when: A single image — use image; Tabbed content switched by labelled buttons — use tab + tab-content; A before/after slider — use image comparison.",
|
|
268
|
+
" *",
|
|
269
|
+
" * Children: ONLY <CarouselSlide> — push refuses any other child.",
|
|
270
|
+
" *",
|
|
271
|
+
" * @example",
|
|
272
|
+
" * <Carousel>",
|
|
273
|
+
" * <CarouselSlide>",
|
|
274
|
+
" * <Text text=\"…\" />",
|
|
275
|
+
" * </CarouselSlide>",
|
|
276
|
+
" * <CarouselSlide>",
|
|
277
|
+
" * <Text text=\"…\" />",
|
|
278
|
+
" * </CarouselSlide>",
|
|
279
|
+
" * </Carousel>",
|
|
280
|
+
" */",
|
|
179
281
|
"interface CarouselProps extends Sb.BaseProps {",
|
|
180
282
|
" [special: string]: unknown;",
|
|
181
283
|
"}",
|
|
182
284
|
"declare function Carousel(props: CarouselProps): JSX.Element;",
|
|
183
285
|
"",
|
|
184
|
-
"/**
|
|
286
|
+
"/**",
|
|
287
|
+
" * Slide (media) — type \"carousel-slide\"",
|
|
288
|
+
" *",
|
|
289
|
+
" * A single slide inside a Carousel element. A section-like container that holds arbitrary child elements (image, heading, button…) shown when its slide is active; the parent carousel slides between them with optional arrows and pagination dots.",
|
|
290
|
+
" *",
|
|
291
|
+
" * Use when: As a direct child of a carousel element — one per slide the visitor can move between; To build a hero/banner slide combining a background, heading, and call-to-action.",
|
|
292
|
+
" * Avoid when: As a standalone section — it is only valid inside a carousel; use flex-section for top-level layout; For a single static image — use image; for tabbed content — use tab + tab-content.",
|
|
293
|
+
" *",
|
|
294
|
+
" * Goes inside <Carousel>.",
|
|
295
|
+
" */",
|
|
185
296
|
"interface CarouselSlideProps extends Sb.BaseProps {",
|
|
186
297
|
" [special: string]: unknown;",
|
|
187
298
|
"}",
|
|
188
299
|
"declare function CarouselSlide(props: CarouselSlideProps): JSX.Element;",
|
|
189
300
|
"",
|
|
190
|
-
"/**
|
|
301
|
+
"/**",
|
|
302
|
+
" * Cart count (store) — type \"cart-count\"",
|
|
303
|
+
" *",
|
|
304
|
+
" * The number of items in the shopper's cart, as a small badge. The figure comes from the shopper's own cart in their browser, so it changes the moment they add, remove or re-count a line. Its usual home is the cart icon in the site header, where it is the only evidence on the page that the basket holds anything.",
|
|
305
|
+
" *",
|
|
306
|
+
" * Use when: a header or navigation bar carries a cart icon and a shopper needs to see the basket is not empty; building a sticky mobile bar or a mini-cart trigger anywhere outside the cart drawer.",
|
|
307
|
+
" * Avoid when: showing what the cart COSTS — that is a cart-total, which reads a money figure; showing how many of ONE product a shopper picked — that is the quantity stepper on the product; showing a past order’s item count; an order is a record, not the live cart.",
|
|
308
|
+
" *",
|
|
309
|
+
" * Holds no children.",
|
|
310
|
+
" */",
|
|
191
311
|
"interface CartCountProps extends Sb.BaseProps {",
|
|
192
|
-
" /** default: true */",
|
|
312
|
+
" /** Hide when empty · format: true or false · default: true */",
|
|
193
313
|
" hideWhenEmpty?: boolean;",
|
|
194
|
-
" /** default: \"0\" */",
|
|
314
|
+
" /** Empty count · default: \"0\" */",
|
|
195
315
|
" placeholder?: string;",
|
|
196
316
|
" [special: string]: unknown;",
|
|
197
317
|
"}",
|
|
198
318
|
"declare function CartCount(props: CartCountProps): JSX.Element;",
|
|
199
319
|
"",
|
|
200
|
-
"/**
|
|
320
|
+
"/**",
|
|
321
|
+
" * Cart drawer (basic) — type \"cart-drawer\"",
|
|
322
|
+
" *",
|
|
323
|
+
" * The site's shopping-cart panel: a droppable container that slides in from one edge of the viewport when a visitor opens the cart. There is exactly ONE per site and it appears over every page, so it is edited once and changes everywhere.",
|
|
324
|
+
" *",
|
|
325
|
+
" * Use when: building what a shopper sees after pressing a cart button anywhere on the site; the storefront needs a slide-in cart rather than a separate cart page.",
|
|
326
|
+
" * Avoid when: a second cart is wanted for one page — there is one cart per site, by design; the panel is a navigation drawer opened by a hamburger — that is menu-drawer, owned by its icon menu; the panel is anchored under a menu entry — that is menu-panel.",
|
|
327
|
+
" *",
|
|
328
|
+
" * Lives ONLY directly inside <Page>.",
|
|
329
|
+
" */",
|
|
201
330
|
"interface CartDrawerProps extends Sb.BaseProps {",
|
|
202
331
|
" [special: string]: unknown;",
|
|
203
332
|
"}",
|
|
204
333
|
"declare function CartDrawer(props: CartDrawerProps): JSX.Element;",
|
|
205
334
|
"",
|
|
206
|
-
"/**
|
|
335
|
+
"/**",
|
|
336
|
+
" * Cart item (basic) — type \"cart-item\"",
|
|
337
|
+
" *",
|
|
338
|
+
" * One line in the cart, and the template its parent repeats. Whatever is placed inside it is drawn once per item the shopper has added, with each copy resolving against that item — so a title inside shows each line's own product name rather than a single shared one.",
|
|
339
|
+
" *",
|
|
340
|
+
" * Use when: designing what one row of the cart looks like: thumbnail, name, price, quantity, remove control; a change should apply to every cart line at once — editing this row edits them all.",
|
|
341
|
+
" * Avoid when: a general-purpose row or column is wanted — that is flex-block, and it carries no cart meaning; building the list itself rather than one line — the list is cart-order, this element’s parent.",
|
|
342
|
+
" */",
|
|
207
343
|
"interface CartItemProps extends Sb.BaseProps {",
|
|
208
344
|
" [special: string]: unknown;",
|
|
209
345
|
"}",
|
|
210
346
|
"declare function CartItem(props: CartItemProps): JSX.Element;",
|
|
211
347
|
"",
|
|
212
|
-
"/**
|
|
348
|
+
"/**",
|
|
349
|
+
" * Cart order (basic) — type \"cart-order\"",
|
|
350
|
+
" *",
|
|
351
|
+
" * The list of lines in the shopper's cart. It holds ONE child row, which acts as a template: the published page repeats that row once per item the shopper has added, filling each copy with that line's own title, image, price and quantity. Everything inside a row binds to the LINE, not to the product the page is about.",
|
|
352
|
+
" *",
|
|
353
|
+
" * Use when: building the body of a cart drawer, where the items a shopper added should appear; the same row design should apply to every cart line rather than being built once per item.",
|
|
354
|
+
" * Avoid when: listing products from the catalogue — that is list-dataset, whose feed is known when the page is published; showing a single fixed product — a dataset-block bound to that product is the direct way; anywhere outside a cart: there is no cart line to bind to, so every row would render its placeholder.",
|
|
355
|
+
" *",
|
|
356
|
+
" * Not a child: its <ListEmpty> sits in `export const detached`, linked by config.emptyStateId.",
|
|
357
|
+
" */",
|
|
213
358
|
"interface CartOrderProps extends Sb.BaseProps {",
|
|
214
359
|
" /** default: \"Your cart is empty\" */",
|
|
215
360
|
" emptyText?: string;",
|
|
@@ -217,31 +362,58 @@ export const ENV_DTS = [
|
|
|
217
362
|
"}",
|
|
218
363
|
"declare function CartOrder(props: CartOrderProps): JSX.Element;",
|
|
219
364
|
"",
|
|
220
|
-
"/**
|
|
365
|
+
"/**",
|
|
366
|
+
" * Cart total (store) — type \"cart-total\"",
|
|
367
|
+
" *",
|
|
368
|
+
" * The cart's total price, with a label beside it. The number comes from the shopper's own cart in their browser, so it updates as they add, remove or re-count lines. Place it near the checkout button — it is the figure a shopper checks before paying.",
|
|
369
|
+
" *",
|
|
370
|
+
" * Use when: building a cart drawer or a cart page, beside the checkout button; a shopper needs to see what they will pay before they commit.",
|
|
371
|
+
" * Avoid when: showing one product’s price — that is a pricing-dataset bound to the product; showing an order’s total after checkout — an order is a record, not the live cart.",
|
|
372
|
+
" *",
|
|
373
|
+
" * Holds no children.",
|
|
374
|
+
" */",
|
|
221
375
|
"interface CartTotalProps extends Sb.BaseProps {",
|
|
222
|
-
" /** default: \"Tổng cộng\" */",
|
|
376
|
+
" /** Label · default: \"Tổng cộng\" */",
|
|
223
377
|
" label?: string;",
|
|
224
|
-
" /** default: \"total\" */",
|
|
378
|
+
" /** Amount · default: \"total\" */",
|
|
225
379
|
" part?: string;",
|
|
226
|
-
" /** default: \"0 ₫\" */",
|
|
380
|
+
" /** Empty amount · default: \"0 ₫\" */",
|
|
227
381
|
" placeholder?: string;",
|
|
228
382
|
" [special: string]: unknown;",
|
|
229
383
|
"}",
|
|
230
384
|
"declare function CartTotal(props: CartTotalProps): JSX.Element;",
|
|
231
385
|
"",
|
|
232
|
-
"/**
|
|
386
|
+
"/**",
|
|
387
|
+
" * Chat widget (basic) — type \"chat-widget\"",
|
|
388
|
+
" *",
|
|
389
|
+
" * A floating chat launcher and panel on the storefront, answered by the site’s own AI provider (Gemini, OpenAI, Anthropic or an OpenAI-compatible gateway). The merchant supplies the API key in the Chat app’s Manage screen; this element is the surface a shopper sees. The greeting and input placeholder come from that per-site setting, not from the node — only the panel title and the widget’s look are authored here.",
|
|
390
|
+
" *",
|
|
391
|
+
" * Use when: a shop wants to answer product questions without staffing a live inbox; a landing page needs a low-commitment way for a visitor to ask something; the merchant already pays for an AI provider and wants to spend it on support.",
|
|
392
|
+
" * Avoid when: the Chat app is not installed or no API key is configured — the widget renders nothing at all, on purpose; the answers must be authoritative (stock levels, order status, refunds): a model will guess, and a wrong answer about money costs more than no answer; a page already carries a live-chat or contact form as its primary call to action, where a second floating bubble competes with it; more than one per page — two floating launchers overlap in the same corner.",
|
|
393
|
+
" *",
|
|
394
|
+
" * Holds no children.",
|
|
395
|
+
" */",
|
|
233
396
|
"interface ChatWidgetProps extends Sb.BaseProps {",
|
|
234
397
|
" /** default: \"\" */",
|
|
235
398
|
" launcherIcon?: string;",
|
|
236
|
-
" /** default: \"\" */",
|
|
399
|
+
" /** Launcher text · default: \"\" */",
|
|
237
400
|
" launcherText?: string;",
|
|
238
|
-
" /** default: \"Trợ lý\" */",
|
|
401
|
+
" /** Panel title · default: \"Trợ lý\" */",
|
|
239
402
|
" title?: string;",
|
|
240
403
|
" [special: string]: unknown;",
|
|
241
404
|
"}",
|
|
242
405
|
"declare function ChatWidget(props: ChatWidgetProps): JSX.Element;",
|
|
243
406
|
"",
|
|
244
|
-
"/**
|
|
407
|
+
"/**",
|
|
408
|
+
" * Code component (media) — type \"code-component\"",
|
|
409
|
+
" *",
|
|
410
|
+
" * A developer-written code component (React/Preact) pinned by name and version, shown as its server-rendered HTML.",
|
|
411
|
+
" *",
|
|
412
|
+
" * Use when: The site repo already defines a component for this block (a pricing table, a custom calculator) and the page should place it.",
|
|
413
|
+
" * Avoid when: A native element covers the need — use heading, text, image, button or a section instead; For a one-off embed snippet — use custom-code; Do not invent a component name: only components the site has pushed exist.",
|
|
414
|
+
" *",
|
|
415
|
+
" * Holds no children.",
|
|
416
|
+
" */",
|
|
245
417
|
"interface CodeComponentProps extends Sb.BaseProps {",
|
|
246
418
|
" /** rendered by the platform on save — never written in a page file */",
|
|
247
419
|
" clientUrl?: never;",
|
|
@@ -258,7 +430,16 @@ export const ENV_DTS = [
|
|
|
258
430
|
"}",
|
|
259
431
|
"declare function CodeComponent(props: CodeComponentProps): JSX.Element;",
|
|
260
432
|
"",
|
|
261
|
-
"/**
|
|
433
|
+
"/**",
|
|
434
|
+
" * Collection media (dataset) — type \"collection-media\"",
|
|
435
|
+
" *",
|
|
436
|
+
" * A collection-bound media tile. Renders a single image (specials.src / specials.alt) that fills its slot and clips to an optional aspect ratio (style.aspectRatio, absent = auto). Owns no children — it is a static leaf; on a collection page it binds to that collection's live image, falling back to the seeded specials.src when unbound.",
|
|
437
|
+
" *",
|
|
438
|
+
" * Use when: Collection card or banner that needs a featured collection image; Media tile inside a collection layout that should keep a fixed aspect ratio; Anywhere a single, ratio-controlled collection image belongs.",
|
|
439
|
+
" * Avoid when: A decorative or content image not tied to a collection — use image; A product photo — use product image; A before/after slider — use image comparison.",
|
|
440
|
+
" *",
|
|
441
|
+
" * Holds no children.",
|
|
442
|
+
" */",
|
|
262
443
|
"interface CollectionMediaProps extends Sb.BaseProps {",
|
|
263
444
|
" /** default: \"\" */",
|
|
264
445
|
" alt?: string;",
|
|
@@ -268,69 +449,127 @@ export const ENV_DTS = [
|
|
|
268
449
|
"}",
|
|
269
450
|
"declare function CollectionMedia(props: CollectionMediaProps): JSX.Element;",
|
|
270
451
|
"",
|
|
271
|
-
"/**
|
|
452
|
+
"/**",
|
|
453
|
+
" * Content list (basic) — type \"content-list\"",
|
|
454
|
+
" *",
|
|
455
|
+
" * A responsive grid of repeating content blocks (content-list-item children), each typically an icon or image with a heading and a short paragraph. Ideal for trust badges, feature grids, and brand-value rows.",
|
|
456
|
+
" *",
|
|
457
|
+
" * Use when: To show 2–4 parallel content blocks in a row (features, benefits, \"why us\", trust badges); When every block shares the same structure and you want a consistent, evenly-sized grid; For icon-with-text or image-with-text cards beneath an \"Add to cart\" or hero section.",
|
|
458
|
+
" * Avoid when: For a single line of icon + text — use list instead; For a one-item-at-a-time slider — use carousel; For plain body copy with no repeating structure — use text.",
|
|
459
|
+
" *",
|
|
460
|
+
" * Children: ONLY <ContentListItem> — push refuses any other child.",
|
|
461
|
+
" *",
|
|
462
|
+
" * @example",
|
|
463
|
+
" * <ContentList>",
|
|
464
|
+
" * <ContentListItem>",
|
|
465
|
+
" * <Text text=\"…\" />",
|
|
466
|
+
" * </ContentListItem>",
|
|
467
|
+
" * <ContentListItem>",
|
|
468
|
+
" * <Text text=\"…\" />",
|
|
469
|
+
" * </ContentListItem>",
|
|
470
|
+
" * </ContentList>",
|
|
471
|
+
" */",
|
|
272
472
|
"interface ContentListProps extends Sb.BaseProps {",
|
|
273
473
|
" [special: string]: unknown;",
|
|
274
474
|
"}",
|
|
275
475
|
"declare function ContentList(props: ContentListProps): JSX.Element;",
|
|
276
476
|
"",
|
|
277
|
-
"/**
|
|
477
|
+
"/**",
|
|
478
|
+
" * Content item (basic) — type \"content-list-item\"",
|
|
479
|
+
" *",
|
|
480
|
+
" * A single block inside a content-list: a vertical container (icon/image + heading + paragraph, or any layout) that occupies one grid cell. Only valid as a direct child of content-list.",
|
|
481
|
+
" *",
|
|
482
|
+
" * Use when: As a child of content-list — one block per feature, benefit, or badge; When a block needs several stacked elements (icon, heading, description) sharing one card.",
|
|
483
|
+
" * Avoid when: Outside a content-list container — it cannot stand alone (use flex-block for a free container); For a single icon + one line of text — a list-item is lighter.",
|
|
484
|
+
" *",
|
|
485
|
+
" * Goes inside <ContentList>.",
|
|
486
|
+
" */",
|
|
278
487
|
"interface ContentListItemProps extends Sb.BaseProps {",
|
|
279
488
|
" [special: string]: unknown;",
|
|
280
489
|
"}",
|
|
281
490
|
"declare function ContentListItem(props: ContentListItemProps): JSX.Element;",
|
|
282
491
|
"",
|
|
283
|
-
"/**
|
|
492
|
+
"/**",
|
|
493
|
+
" * Countdown (store) — type \"countdown\"",
|
|
494
|
+
" *",
|
|
495
|
+
" * A countdown to an absolute instant — four boxes (days, hours, minutes, seconds) counting down to a merchant-typed end time, or to a listed public discount's own end date when a code is named. Driven by a server clock the island reads on load, never the shopper's own device clock.",
|
|
496
|
+
" *",
|
|
497
|
+
" * Use when: A flash sale or a limited-time discount needs a visible ticking deadline; A launch, a registration window, or any other announced moment needs a countdown — this element does not require a discount at all.",
|
|
498
|
+
" * Avoid when: The end time is not actually fixed — a countdown with no real deadline trains shoppers to ignore the next one; The page already shows the same deadline another way (a banner, a badge) — a second clock counting down to the same moment is noise.",
|
|
499
|
+
" *",
|
|
500
|
+
" * Holds no children.",
|
|
501
|
+
" *",
|
|
502
|
+
" * @example",
|
|
503
|
+
" * <Countdown endsAt=\"2026-12-31T20:00:00+07:00\" />",
|
|
504
|
+
" */",
|
|
284
505
|
"interface CountdownProps extends Sb.BaseProps {",
|
|
285
|
-
" /** default: \"Ngày\" */",
|
|
506
|
+
" /** Day label · default: \"Ngày\" */",
|
|
286
507
|
" dayLabel?: string;",
|
|
287
|
-
" /** default: \"\" */",
|
|
508
|
+
" /** Ends · format: an absolute instant: ISO 8601 WITH its UTC offset, e.g. \"2026-12-31T20:00:00+07:00\" (never a bare date or local time) · default: \"\" · e.g. \"2026-10-01T00:00:00+07:00\" */",
|
|
288
509
|
" endsAt?: string;",
|
|
289
|
-
" /** default: \"Chương trình đã kết thúc\" */",
|
|
510
|
+
" /** Expired · default: \"Chương trình đã kết thúc\" */",
|
|
290
511
|
" expiredText?: string;",
|
|
291
|
-
" /** default: \"Giờ\" */",
|
|
512
|
+
" /** Hour label · default: \"Giờ\" */",
|
|
292
513
|
" hourLabel?: string;",
|
|
293
|
-
" /** default: \"Phút\" */",
|
|
514
|
+
" /** Minute label · default: \"Phút\" */",
|
|
294
515
|
" minuteLabel?: string;",
|
|
295
|
-
" /** default: \"Giây\" */",
|
|
516
|
+
" /** Second label · default: \"Giây\" */",
|
|
296
517
|
" secondLabel?: string;",
|
|
297
|
-
" /** default: \"\" */",
|
|
518
|
+
" /** Linked code · default: \"\" · e.g. \"FLASH24\" */",
|
|
298
519
|
" sourceCode?: string;",
|
|
299
|
-
" /** default: false */",
|
|
520
|
+
" /** Flash sale · format: true or false · default: false */",
|
|
300
521
|
" sourceFlashSale?: boolean;",
|
|
301
522
|
" [special: string]: unknown;",
|
|
302
523
|
"}",
|
|
303
524
|
"declare function Countdown(props: CountdownProps): JSX.Element;",
|
|
304
525
|
"",
|
|
305
|
-
"/**
|
|
526
|
+
"/**",
|
|
527
|
+
" * Course Syllabus (advanced) — type \"course-outline\"",
|
|
528
|
+
" *",
|
|
529
|
+
" * The public syllabus for the Khoá học app: the sections and lessons of a course, with each lesson's type and length, and a marker on the free samples. Read by anyone — it is the list a shopper reads before buying — and it never contains lesson bodies or video URLs.",
|
|
530
|
+
" *",
|
|
531
|
+
" * Use when: Building a course SALES page — the syllabus is the strongest argument a course page has, and every course platform leads with it.; One page should serve every course in the catalogue: leave the course empty and let /courses/{slug} name it.; A shopper needs to judge length and depth before paying..",
|
|
532
|
+
" * Avoid when: On the learning page. The player draws its own curriculum with the student’s progress ticked; two lists on one page disagree the moment one of them updates.; To give access to a lesson. This lists what is in the course; opening anything still goes through the player and the entitlement gate..",
|
|
533
|
+
" *",
|
|
534
|
+
" * Holds no children.",
|
|
535
|
+
" */",
|
|
306
536
|
"interface CourseOutlineProps extends Sb.BaseProps {",
|
|
307
537
|
" /** default: \"\" */",
|
|
308
538
|
" courseId?: string;",
|
|
309
|
-
" /** default: \"Khoá học này chưa có bài nào.\" */",
|
|
539
|
+
" /** No-lessons text · default: \"Khoá học này chưa có bài nào.\" */",
|
|
310
540
|
" emptyText?: string;",
|
|
311
541
|
" [special: string]: unknown;",
|
|
312
542
|
"}",
|
|
313
543
|
"declare function CourseOutline(props: CourseOutlineProps): JSX.Element;",
|
|
314
544
|
"",
|
|
315
|
-
"/**
|
|
545
|
+
"/**",
|
|
546
|
+
" * Course Player (advanced) — type \"course-player\"",
|
|
547
|
+
" *",
|
|
548
|
+
" * The lesson player for the Khoá học app: plays a course lesson (video, text, quiz or downloadable) to a student entitled to it, tracks progress, and shows the curriculum. The body is fetched per-student after a server-side entitlement check — it never appears in the published HTML.",
|
|
549
|
+
" *",
|
|
550
|
+
" * Use when: Building the page a student watches a lesson on — the /learn or \"my course\" page.; A page gated on a course (Page settings → the Khoá học gate) needs the actual lesson on it.; One page should serve every course in the catalogue: leave the course empty and let the URL name it..",
|
|
551
|
+
" * Avoid when: On a sales page. A course landing page is built from the course dataset elements plus an enrol button pointing at the product — the player is for people who already bought.; To show a free trailer. Bind a video element to `course.preview` instead; the player is the gated surface.; To list courses a shopper owns. That is the account page, not this element..",
|
|
552
|
+
" *",
|
|
553
|
+
" * Holds no children.",
|
|
554
|
+
" */",
|
|
316
555
|
"interface CoursePlayerProps extends Sb.BaseProps {",
|
|
317
556
|
" /** default: true */",
|
|
318
557
|
" autoComplete?: boolean;",
|
|
319
|
-
" /** default: \"Bạn đã hoàn thành khoá học và đạt chứng chỉ.\" */",
|
|
558
|
+
" /** Certificate text · default: \"Bạn đã hoàn thành khoá học và đạt chứng chỉ.\" */",
|
|
320
559
|
" certificateText?: string;",
|
|
321
|
-
" /** default: \"Đánh dấu hoàn thành\" */",
|
|
560
|
+
" /** Complete button · default: \"Đánh dấu hoàn thành\" */",
|
|
322
561
|
" completeLabel?: string;",
|
|
323
|
-
" /** default: \"Đã hoàn thành\" */",
|
|
562
|
+
" /** Completed text · default: \"Đã hoàn thành\" */",
|
|
324
563
|
" completedLabel?: string;",
|
|
325
564
|
" /** default: \"\" */",
|
|
326
565
|
" courseId?: string;",
|
|
327
|
-
" /** default: \"Khoá học này chưa có bài nào.\" */",
|
|
566
|
+
" /** No-lessons text · default: \"Khoá học này chưa có bài nào.\" */",
|
|
328
567
|
" emptyText?: string;",
|
|
329
|
-
" /** default: \"\" */",
|
|
568
|
+
" /** Locked link · default: \"\" */",
|
|
330
569
|
" lockedHref?: string;",
|
|
331
|
-
" /** default: \"Xem khoá học\" */",
|
|
570
|
+
" /** Locked link text · default: \"Xem khoá học\" */",
|
|
332
571
|
" lockedLabel?: string;",
|
|
333
|
-
" /** default: \"Bạn chưa có quyền học bài này.\" */",
|
|
572
|
+
" /** Locked text · default: \"Bạn chưa có quyền học bài này.\" */",
|
|
334
573
|
" lockedText?: string;",
|
|
335
574
|
" /** default: true */",
|
|
336
575
|
" showOutline?: boolean;",
|
|
@@ -338,7 +577,16 @@ export const ENV_DTS = [
|
|
|
338
577
|
"}",
|
|
339
578
|
"declare function CoursePlayer(props: CoursePlayerProps): JSX.Element;",
|
|
340
579
|
"",
|
|
341
|
-
"/**
|
|
580
|
+
"/**",
|
|
581
|
+
" * Currency Switcher (basic) — type \"currency-switcher\"",
|
|
582
|
+
" *",
|
|
583
|
+
" * A storefront currency switcher — a dropdown the shopper uses to change the displayed currency on a published page.",
|
|
584
|
+
" *",
|
|
585
|
+
" * Use when: When a store sells to shoppers across multiple currencies and needs a visible currency selector; In a header, footer, or product page where visitors pick their preferred currency.",
|
|
586
|
+
" * Avoid when: When the store only ever displays a single currency — the switcher would be inert; For non-commerce content with no price display to convert.",
|
|
587
|
+
" *",
|
|
588
|
+
" * Holds no children.",
|
|
589
|
+
" */",
|
|
342
590
|
"interface CurrencySwitcherProps extends Sb.BaseProps {",
|
|
343
591
|
" /** default: \"\" */",
|
|
344
592
|
" payload?: string;",
|
|
@@ -346,7 +594,16 @@ export const ENV_DTS = [
|
|
|
346
594
|
"}",
|
|
347
595
|
"declare function CurrencySwitcher(props: CurrencySwitcherProps): JSX.Element;",
|
|
348
596
|
"",
|
|
349
|
-
"/**
|
|
597
|
+
"/**",
|
|
598
|
+
" * Custom Code (media) — type \"custom-code\"",
|
|
599
|
+
" *",
|
|
600
|
+
" * An escape hatch that embeds raw author-written HTML markup (widgets, iframes, third-party embeds) verbatim on the page.",
|
|
601
|
+
" *",
|
|
602
|
+
" * Use when: A third-party service supplies an embed snippet with no dedicated element (booking widget, chat, form, custom player); A one-off piece of markup is needed that no existing element can express.",
|
|
603
|
+
" * Avoid when: A dedicated element already covers the need — use image, video, youtube, vimeo, soundcloud or google-map instead, which validate their input; For site-wide analytics or tracking tags — those belong in the site custom-code settings, not on one page; For plain text or headings — use text or heading so the content stays editable and styleable.",
|
|
604
|
+
" *",
|
|
605
|
+
" * Holds no children.",
|
|
606
|
+
" */",
|
|
350
607
|
"interface CustomCodeProps extends Sb.BaseProps {",
|
|
351
608
|
" /** default: \"\" */",
|
|
352
609
|
" code?: string;",
|
|
@@ -354,27 +611,77 @@ export const ENV_DTS = [
|
|
|
354
611
|
"}",
|
|
355
612
|
"declare function CustomCode(props: CustomCodeProps): JSX.Element;",
|
|
356
613
|
"",
|
|
357
|
-
"/**
|
|
614
|
+
"/**",
|
|
615
|
+
" * Product (dataset) — type \"dataset-block\"",
|
|
616
|
+
" *",
|
|
617
|
+
" * A single-item dataset container: a styled flex card that groups store-bound child fields (title, price, media, variants, buttons) which all follow ONE product/collection binding inherited from the page. Use it as the outer card whenever several dataset fields should render together for the same record.",
|
|
618
|
+
" *",
|
|
619
|
+
" * Use when: Building a product card or product-detail buy box where image, title, price, variants and actions all describe the same product; Grouping several dataset fields that must stay in sync with one selected store record; Laying out a collection/category card whose children read from the page collection binding; Authoring the per-item template a repeater will later clone across many products.",
|
|
620
|
+
" * Avoid when: A single dataset field on its own — drop the specific dataset node (text-dataset, pricing-dataset, media-dataset) directly instead; Static marketing content with no store binding — use flex-section or flex-block; Plain visual grouping that never reads product/collection data.",
|
|
621
|
+
" *",
|
|
622
|
+
" * Goes inside <ListDataset>.",
|
|
623
|
+
" * Not a child: its <ListEmpty> sits in `export const detached`, linked by config.emptyStateId.",
|
|
624
|
+
" * Typical: dataset-block containing a media-dataset image plus a flex-block content column.",
|
|
625
|
+
" * Typical: content flex-block containing text-dataset (title), pricing-dataset, product-variants, quantity-dataset and a button for a product buy box.",
|
|
626
|
+
" * Typical: compact vertical card: media-dataset then a text-dataset title directly inside the dataset-block, no inner flex-block.",
|
|
627
|
+
" *",
|
|
628
|
+
" * @example",
|
|
629
|
+
" * <DatasetBlock config={{\"contentWidth\":\"fill_container\"}} />",
|
|
630
|
+
" */",
|
|
358
631
|
"interface DatasetBlockProps extends Sb.BaseProps {",
|
|
359
632
|
" [special: string]: unknown;",
|
|
360
633
|
"}",
|
|
361
634
|
"declare function DatasetBlock(props: DatasetBlockProps): JSX.Element;",
|
|
362
635
|
"",
|
|
363
|
-
"/**
|
|
636
|
+
"/**",
|
|
637
|
+
" * Divider (basic) — type \"divider\"",
|
|
638
|
+
" *",
|
|
639
|
+
" * A horizontal or vertical separator line, optionally carrying a short label or icon in its middle.",
|
|
640
|
+
" *",
|
|
641
|
+
" * Use when: To separate two sections of a page without adding a heading; To place a short label such as \"OR\" between two alternative actions.",
|
|
642
|
+
" * Avoid when: As a decorative bar with its own colour block — use a flex-block with a background instead.",
|
|
643
|
+
" *",
|
|
644
|
+
" * Holds no children.",
|
|
645
|
+
" */",
|
|
364
646
|
"interface DividerProps extends Sb.BaseProps {",
|
|
365
|
-
" /** default: \"none\" */",
|
|
647
|
+
" /** Type · default: \"none\" */",
|
|
366
648
|
" contentType?: string;",
|
|
367
649
|
" /** default: \"StarFill\" */",
|
|
368
650
|
" iconName?: string;",
|
|
369
|
-
" /** default: \"OR\" */",
|
|
651
|
+
" /** Text · default: \"OR\" */",
|
|
370
652
|
" label?: string;",
|
|
371
|
-
" /** default: \"✦\" */",
|
|
653
|
+
" /** Symbol · default: \"✦\" */",
|
|
372
654
|
" symbolChar?: string;",
|
|
373
655
|
" [special: string]: unknown;",
|
|
374
656
|
"}",
|
|
375
657
|
"declare function Divider(props: DividerProps): JSX.Element;",
|
|
376
658
|
"",
|
|
377
|
-
"/**
|
|
659
|
+
"/**",
|
|
660
|
+
" * Dropdown (basic) — type \"dropdown\"",
|
|
661
|
+
" *",
|
|
662
|
+
" * An anchored dropdown: a trigger zone that opens a floating panel of arbitrary content directly under it. Page-local — each instance lives in the page document.",
|
|
663
|
+
" *",
|
|
664
|
+
" * Use when: A header or toolbar needs a click-to-open menu of links or actions; Secondary content (an account box, filters, a language list) should stay hidden until asked for; The opened content must sit anchored to its trigger rather than centered over the page.",
|
|
665
|
+
" * Avoid when: The content should interrupt the whole page — use a pop-up (site overlay) instead; You are building navigation from the site menu — the menu element has its own submenus; The content must always be visible — use a plain block.",
|
|
666
|
+
" *",
|
|
667
|
+
" * Children: ONLY <DropdownTrigger>, <DropdownPanel> — push refuses any other child.",
|
|
668
|
+
" *",
|
|
669
|
+
" * @example",
|
|
670
|
+
" * <Dropdown>",
|
|
671
|
+
" * <DropdownTrigger>",
|
|
672
|
+
" * <Text text=\"…\" />",
|
|
673
|
+
" * </DropdownTrigger>",
|
|
674
|
+
" * <DropdownPanel>",
|
|
675
|
+
" * <Text text=\"…\" />",
|
|
676
|
+
" * </DropdownPanel>",
|
|
677
|
+
" * <DropdownTrigger>",
|
|
678
|
+
" * <Text text=\"…\" />",
|
|
679
|
+
" * </DropdownTrigger>",
|
|
680
|
+
" * <DropdownPanel>",
|
|
681
|
+
" * <Text text=\"…\" />",
|
|
682
|
+
" * </DropdownPanel>",
|
|
683
|
+
" * </Dropdown>",
|
|
684
|
+
" */",
|
|
378
685
|
"interface DropdownProps extends Sb.BaseProps {",
|
|
379
686
|
" /** default: false */",
|
|
380
687
|
" openOnHover?: boolean;",
|
|
@@ -382,19 +689,46 @@ export const ENV_DTS = [
|
|
|
382
689
|
"}",
|
|
383
690
|
"declare function Dropdown(props: DropdownProps): JSX.Element;",
|
|
384
691
|
"",
|
|
385
|
-
"/**
|
|
692
|
+
"/**",
|
|
693
|
+
" * Dropdown panel (basic) — type \"dropdown-panel\"",
|
|
694
|
+
" *",
|
|
695
|
+
" * The floating surface a dropdown opens under its trigger — an anchored container for arbitrary content, hidden until the trigger opens it.",
|
|
696
|
+
" *",
|
|
697
|
+
" * Use when: Designing what appears when a dropdown opens: links, actions, a compact form; Styling the floating surface (background, radius, shadow, padding).",
|
|
698
|
+
" * Avoid when: Outside a dropdown — it only exists as the second child of one; For content that must interrupt the page — use a pop-up instead.",
|
|
699
|
+
" *",
|
|
700
|
+
" * Goes inside <Dropdown> or <Popover> or <Select>.",
|
|
701
|
+
" */",
|
|
386
702
|
"interface DropdownPanelProps extends Sb.BaseProps {",
|
|
387
703
|
" [special: string]: unknown;",
|
|
388
704
|
"}",
|
|
389
705
|
"declare function DropdownPanel(props: DropdownPanelProps): JSX.Element;",
|
|
390
706
|
"",
|
|
391
|
-
"/**
|
|
707
|
+
"/**",
|
|
708
|
+
" * Dropdown trigger (basic) — type \"dropdown-trigger\"",
|
|
709
|
+
" *",
|
|
710
|
+
" * The always-visible zone of a dropdown — the shopper clicks (or hovers) it to open the panel. A free container: its seeded text+chevron can be replaced with any content.",
|
|
711
|
+
" *",
|
|
712
|
+
" * Use when: Styling the clickable face of a dropdown (colors, border, padding); Replacing the default label with an icon, avatar or image.",
|
|
713
|
+
" * Avoid when: Outside a dropdown — it only exists as the first child of one; For a navigation link — use a button; a trigger opens its panel, it never navigates.",
|
|
714
|
+
" *",
|
|
715
|
+
" * Goes inside <Dropdown> or <Popover> or <Select>.",
|
|
716
|
+
" */",
|
|
392
717
|
"interface DropdownTriggerProps extends Sb.BaseProps {",
|
|
393
718
|
" [special: string]: unknown;",
|
|
394
719
|
"}",
|
|
395
720
|
"declare function DropdownTrigger(props: DropdownTriggerProps): JSX.Element;",
|
|
396
721
|
"",
|
|
397
|
-
"/**
|
|
722
|
+
"/**",
|
|
723
|
+
" * Checkbox (input) — type \"filter-checkbox\"",
|
|
724
|
+
" *",
|
|
725
|
+
" * A storefront product filter rendered as a list of labelled checkboxes. Its values come from the live catalog — categories, brands, tags, stock state or a product attribute — and a shopper may tick several at once to widen the match within that one filter.",
|
|
726
|
+
" *",
|
|
727
|
+
" * Use when: a collection or search page needs shoppers to narrow the product list; the facet allows more than one answer at a time (several brands, several tags); the values are words rather than colours — use the Color filter for swatches.",
|
|
728
|
+
" * Avoid when: only one answer can be true at a time (a single price band, one sort order) — use the Radio filter; the page shows no product list for the filter to act on; the facet is a numeric span rather than a set — a price range belongs on a filter configured with the Price source.",
|
|
729
|
+
" *",
|
|
730
|
+
" * Holds no children.",
|
|
731
|
+
" */",
|
|
398
732
|
"interface FilterCheckboxProps extends Sb.BaseProps {",
|
|
399
733
|
" /** default: \"\" */",
|
|
400
734
|
" filterAllLabel?: string;",
|
|
@@ -431,7 +765,16 @@ export const ENV_DTS = [
|
|
|
431
765
|
"}",
|
|
432
766
|
"declare function FilterCheckbox(props: FilterCheckboxProps): JSX.Element;",
|
|
433
767
|
"",
|
|
434
|
-
"/**
|
|
768
|
+
"/**",
|
|
769
|
+
" * Color (input) — type \"filter-color\"",
|
|
770
|
+
" *",
|
|
771
|
+
" * A storefront product filter rendered as a row of colour swatches, one per value, multi-select. Each swatch paints the colour the value stands for, so a shopper picks by sight rather than by reading a word.",
|
|
772
|
+
" *",
|
|
773
|
+
" * Use when: the facet IS a colour — a Color attribute axis, or a tag set that maps onto real colours; the values are more recognisable as swatches than as words; the palette is small enough to sit in a row or two without scrolling.",
|
|
774
|
+
" * Avoid when: the values are not colours — a size or a brand in a swatch is a coloured square nobody can read; the palette is large and unfamiliar, where a labelled checkbox list is faster to scan; only one value may be chosen at a time — use the Radio filter.",
|
|
775
|
+
" *",
|
|
776
|
+
" * Holds no children.",
|
|
777
|
+
" */",
|
|
435
778
|
"interface FilterColorProps extends Sb.BaseProps {",
|
|
436
779
|
" /** default: \"\" */",
|
|
437
780
|
" filterAllLabel?: string;",
|
|
@@ -468,7 +811,16 @@ export const ENV_DTS = [
|
|
|
468
811
|
"}",
|
|
469
812
|
"declare function FilterColor(props: FilterColorProps): JSX.Element;",
|
|
470
813
|
"",
|
|
471
|
-
"/**
|
|
814
|
+
"/**",
|
|
815
|
+
" * Radio (input) — type \"filter-radio\"",
|
|
816
|
+
" *",
|
|
817
|
+
" * A storefront product filter rendered as a list of labelled radio buttons. Identical to the Checkbox filter in where its values come from, but a shopper may hold only one at a time: picking a value replaces the previous one.",
|
|
818
|
+
" *",
|
|
819
|
+
" * Use when: only one answer can be true at once — a single price band, one availability state; the choices are mutually exclusive and a shopper picking two would mean nothing; the list is short enough that the single live choice stays visible.",
|
|
820
|
+
" * Avoid when: a shopper could reasonably want two values at once (two brands, two sizes) — use the Checkbox filter; the facet is a colour palette — use the Color filter; there is no way to clear the choice and the page has no other route back to the unfiltered list.",
|
|
821
|
+
" *",
|
|
822
|
+
" * Holds no children.",
|
|
823
|
+
" */",
|
|
472
824
|
"interface FilterRadioProps extends Sb.BaseProps {",
|
|
473
825
|
" /** default: \"\" */",
|
|
474
826
|
" filterAllLabel?: string;",
|
|
@@ -505,7 +857,16 @@ export const ENV_DTS = [
|
|
|
505
857
|
"}",
|
|
506
858
|
"declare function FilterRadio(props: FilterRadioProps): JSX.Element;",
|
|
507
859
|
"",
|
|
508
|
-
"/**
|
|
860
|
+
"/**",
|
|
861
|
+
" * Slider (input) — type \"filter-slider\"",
|
|
862
|
+
" *",
|
|
863
|
+
" * A storefront PRICE filter rendered as a track with two draggable handles and the two bound labels under it. It writes a single continuous range, so a shopper can ask for anything between the ends rather than picking one of a few bands.",
|
|
864
|
+
" *",
|
|
865
|
+
" * Use when: the catalog spans a wide price range and no small set of bands describes it well; the page has room for a horizontal control — a slider needs width to be usable; shoppers filter by budget rather than by a named tier.",
|
|
866
|
+
" * Avoid when: the store sells at three or four price points — a Checkbox filter with named bands is faster and states the bands out loud; the filter must sit in a narrow column: a short track makes every drag imprecise; the filter is for anything other than price — the other four filters take values, this one takes a range.",
|
|
867
|
+
" *",
|
|
868
|
+
" * Holds no children.",
|
|
869
|
+
" */",
|
|
509
870
|
"interface FilterSliderProps extends Sb.BaseProps {",
|
|
510
871
|
" /** default: \"price\" */",
|
|
511
872
|
" filterSource?: string;",
|
|
@@ -517,7 +878,16 @@ export const ENV_DTS = [
|
|
|
517
878
|
"}",
|
|
518
879
|
"declare function FilterSlider(props: FilterSliderProps): JSX.Element;",
|
|
519
880
|
"",
|
|
520
|
-
"/**
|
|
881
|
+
"/**",
|
|
882
|
+
" * Tag (input) — type \"filter-tag\"",
|
|
883
|
+
" *",
|
|
884
|
+
" * A storefront product filter rendered as a wrapped row of tappable pills, one per value, multi-select. The chip carries its own label, so a shopper picks by reading rather than by aiming at a small box.",
|
|
885
|
+
" *",
|
|
886
|
+
" * Use when: the values are short words a shopper scans rather than reads — sizes, tags, materials; several values should fit on one line instead of stacking down the page; the filter sits in a horizontal bar above the products rather than in a sidebar.",
|
|
887
|
+
" * Avoid when: the labels are long: a chip that wraps its own text reads as a broken button; only one value may be chosen at a time — use the Radio filter; the values are colours — a Color swatch says more than the word for it.",
|
|
888
|
+
" *",
|
|
889
|
+
" * Holds no children.",
|
|
890
|
+
" */",
|
|
521
891
|
"interface FilterTagProps extends Sb.BaseProps {",
|
|
522
892
|
" /** default: \"\" */",
|
|
523
893
|
" filterAllLabel?: string;",
|
|
@@ -554,35 +924,69 @@ export const ENV_DTS = [
|
|
|
554
924
|
"}",
|
|
555
925
|
"declare function FilterTag(props: FilterTagProps): JSX.Element;",
|
|
556
926
|
"",
|
|
557
|
-
"/**
|
|
927
|
+
"/**",
|
|
928
|
+
" * Flash sale price (dataset) — type \"flash-sale-price\"",
|
|
929
|
+
" *",
|
|
930
|
+
" * A product price that follows the store's running flash sale. The page shows the product's base price (and compare-at) exactly like a price display; while a flash sale covers the product, the published page swaps in the sale price, strikes the base price and can show \"−X%\", then reverts by itself when the campaign ends.",
|
|
931
|
+
" *",
|
|
932
|
+
" * Use when: Product cards or a product page in a store that runs flash sales; The price inside a \"Flash sale\" block built from a product list.",
|
|
933
|
+
" * Avoid when: A store that never runs flash sales — use the plain product price; A static discount flag — use the sale badge.",
|
|
934
|
+
" *",
|
|
935
|
+
" * Holds no children.",
|
|
936
|
+
" */",
|
|
558
937
|
"interface FlashSalePriceProps extends Sb.BaseProps {",
|
|
559
|
-
" /** default: true */",
|
|
938
|
+
" /** Show −X% · format: true or false · default: true */",
|
|
560
939
|
" showPercent?: boolean;",
|
|
561
940
|
" [special: string]: unknown;",
|
|
562
941
|
"}",
|
|
563
942
|
"declare function FlashSalePrice(props: FlashSalePriceProps): JSX.Element;",
|
|
564
943
|
"",
|
|
565
|
-
"/**
|
|
944
|
+
"/**",
|
|
945
|
+
" * Flash sale progress (dataset) — type \"flash-sale-progress\"",
|
|
946
|
+
" *",
|
|
947
|
+
" * A product's progress toward its running flash sale, hidden until one covers it. The page ships nothing visible; while a flash sale runs the published page reveals a small bar (sold/quota, when the item has a quota) and one message — \"Đã bán {sold}\" (or \"Sắp cháy hàng\" near the quota, \"Đã hết suất\" at it) — with an optional short countdown to the sale's end, then hides again by itself when the campaign ends.",
|
|
948
|
+
" *",
|
|
949
|
+
" * Use when: A product card or product page in a store that runs flash sales, beside the flash-sale price; A \"hurry, almost gone\" urgency line under a sale price.",
|
|
950
|
+
" * Avoid when: A store that never runs flash sales — it never has anything to show; A plain always-visible stock count — use whatever element already shows inventory.",
|
|
951
|
+
" *",
|
|
952
|
+
" * Holds no children.",
|
|
953
|
+
" */",
|
|
566
954
|
"interface FlashSaleProgressProps extends Sb.BaseProps {",
|
|
567
|
-
" /** default: \"Sắp cháy hàng\" */",
|
|
955
|
+
" /** Almost gone · default: \"Sắp cháy hàng\" */",
|
|
568
956
|
" almostText?: string;",
|
|
569
|
-
" /** default: true */",
|
|
957
|
+
" /** Countdown · format: true or false · default: true */",
|
|
570
958
|
" showCountdown?: boolean;",
|
|
571
|
-
" /** default: \"Đã hết suất\" */",
|
|
959
|
+
" /** Sold out · default: \"Đã hết suất\" */",
|
|
572
960
|
" soldOutText?: string;",
|
|
573
|
-
" /** default: \"Đã bán {sold}\" */",
|
|
961
|
+
" /** Sold · default: \"Đã bán {sold}\" */",
|
|
574
962
|
" soldText?: string;",
|
|
575
963
|
" [special: string]: unknown;",
|
|
576
964
|
"}",
|
|
577
965
|
"declare function FlashSaleProgress(props: FlashSaleProgressProps): JSX.Element;",
|
|
578
966
|
"",
|
|
579
|
-
"/**
|
|
967
|
+
"/**",
|
|
968
|
+
" * Block (layout) — type \"flex-block\"",
|
|
969
|
+
" *",
|
|
970
|
+
" * A flexible container for grouping child elements in rows or columns.",
|
|
971
|
+
" *",
|
|
972
|
+
" * Use when: To arrange 2–4 elements side by side inside a section; For card layouts, icon + text pairs, or multi-column content blocks.",
|
|
973
|
+
" * Avoid when: As the outermost page wrapper — use flex-section for top-level bands.",
|
|
974
|
+
" */",
|
|
580
975
|
"interface FlexBlockProps extends Sb.BaseProps {",
|
|
581
976
|
" [special: string]: unknown;",
|
|
582
977
|
"}",
|
|
583
978
|
"declare function FlexBlock(props: FlexBlockProps): JSX.Element;",
|
|
584
979
|
"",
|
|
585
|
-
"/**
|
|
980
|
+
"/**",
|
|
981
|
+
" * Section (layout) — type \"flex-section\"",
|
|
982
|
+
" *",
|
|
983
|
+
" * A full-width horizontal section that stacks vertically on the page.",
|
|
984
|
+
" *",
|
|
985
|
+
" * Use when: To divide the page into visually distinct bands (hero, features, CTA); When you need a colored or padded container spanning the full viewport width.",
|
|
986
|
+
" * Avoid when: Inside another section — use flex-block for nested layout instead.",
|
|
987
|
+
" *",
|
|
988
|
+
" * Lives ONLY directly inside <Page>.",
|
|
989
|
+
" */",
|
|
586
990
|
"interface FlexSectionProps extends Sb.BaseProps {",
|
|
587
991
|
" /** default: \"container-section\" */",
|
|
588
992
|
" stylePreset?: string;",
|
|
@@ -590,7 +994,16 @@ export const ENV_DTS = [
|
|
|
590
994
|
"}",
|
|
591
995
|
"declare function FlexSection(props: FlexSectionProps): JSX.Element;",
|
|
592
996
|
"",
|
|
593
|
-
"/**
|
|
997
|
+
"/**",
|
|
998
|
+
" * Form (advanced) — type \"form\"",
|
|
999
|
+
" *",
|
|
1000
|
+
" * Places a form the merchant has built — contact, subscribe, order or a custom one — on the page. The element is a reference: it holds only which form to show and which of that form's segments, while the fields themselves live in the form's own document and are edited in a separate modal.",
|
|
1001
|
+
" *",
|
|
1002
|
+
" * Use when: The page needs to collect something from a visitor: a contact message, a newsletter sign-up, an enquiry about a product, a custom order.; The same form should appear on several pages — a reference means editing it once updates every placement.; A long form should be split across the page, or across steps: place one Form node per segment, all pointing at the same form..",
|
|
1003
|
+
" * Avoid when: A single button or link is all that is needed — a form asks the visitor to type, which is a much larger request than a click.; The data belongs to an existing flow that already has its own surface (adding to the cart, checking out).; A `custom` form for sign-in or registration: use the LOGIN / REGISTER / FORGOT / RESET types instead. Storefront customer accounts exist — those types submit through /_wb/account/* rather than the submissions table, and a custom form pointed at the same job stores a password in a response row..",
|
|
1004
|
+
" *",
|
|
1005
|
+
" * Holds no children.",
|
|
1006
|
+
" */",
|
|
594
1007
|
"interface FormProps extends Sb.BaseProps {",
|
|
595
1008
|
" /** default: \"\" */",
|
|
596
1009
|
" formId?: string;",
|
|
@@ -602,7 +1015,16 @@ export const ENV_DTS = [
|
|
|
602
1015
|
"}",
|
|
603
1016
|
"declare function Form(props: FormProps): JSX.Element;",
|
|
604
1017
|
"",
|
|
605
|
-
"/**
|
|
1018
|
+
"/**",
|
|
1019
|
+
" * Address (form) — type \"form-address\"",
|
|
1020
|
+
" *",
|
|
1021
|
+
" * A Vietnamese address field: two dependent selects (province/city, then ward/commune) plus a free line for house number and street. The administrative lists come from the platform, so they are always the current two-level model.",
|
|
1022
|
+
" *",
|
|
1023
|
+
" * Use when: a form needs a deliverable address — an order, a booking, a service call; the merchant wants to filter or report on orders by province; a customer should pick their ward rather than type it, so the value is normalised.",
|
|
1024
|
+
" * Avoid when: only a rough location is needed — a plain text field or a single select is lighter; the audience is outside Vietnam; the dataset loaded today is Vietnamese only; the address is displayed rather than collected — this is an input, not a text block.",
|
|
1025
|
+
" *",
|
|
1026
|
+
" * Holds no children.",
|
|
1027
|
+
" */",
|
|
606
1028
|
"interface FormAddressProps extends Sb.BaseProps {",
|
|
607
1029
|
" /** default: \"\" */",
|
|
608
1030
|
" addressGroup?: string;",
|
|
@@ -652,7 +1074,16 @@ export const ENV_DTS = [
|
|
|
652
1074
|
"}",
|
|
653
1075
|
"declare function FormAddress(props: FormAddressProps): JSX.Element;",
|
|
654
1076
|
"",
|
|
655
|
-
"/**
|
|
1077
|
+
"/**",
|
|
1078
|
+
" * Calendar (form) — type \"form-calendar\"",
|
|
1079
|
+
" *",
|
|
1080
|
+
" * A single date box that opens the device’s own calendar. One answer, already valid — the visitor cannot pick a thirty-first of February.",
|
|
1081
|
+
" *",
|
|
1082
|
+
" * Use when: The visitor is choosing a date rather than recalling one: a delivery day, a booking, an appointment.; The weekday matters, or nearby days do. A calendar shows the shape of the month; three number boxes show none of it..",
|
|
1083
|
+
" * Avoid when: The date is years away from today — a birth year means a long scroll back through months. Ask for it as three boxes instead.; You need a range. This is one date; two fields say start and end plainly..",
|
|
1084
|
+
" *",
|
|
1085
|
+
" * Holds no children.",
|
|
1086
|
+
" */",
|
|
656
1087
|
"interface FormCalendarProps extends Sb.BaseProps {",
|
|
657
1088
|
" /** default: \"all\" */",
|
|
658
1089
|
" acceptedDates?: string;",
|
|
@@ -683,7 +1114,16 @@ export const ENV_DTS = [
|
|
|
683
1114
|
"}",
|
|
684
1115
|
"declare function FormCalendar(props: FormCalendarProps): JSX.Element;",
|
|
685
1116
|
"",
|
|
686
|
-
"/**
|
|
1117
|
+
"/**",
|
|
1118
|
+
" * Checkbox (form) — type \"form-checkbox\"",
|
|
1119
|
+
" *",
|
|
1120
|
+
" * A set of choices the visitor can pick several of at once, all visible together. The answer arrives as the list of what was ticked.",
|
|
1121
|
+
" *",
|
|
1122
|
+
" * Use when: More than one answer can be true: interests, extras, which days suit them.; A single opt-in needs an explicit tick — a newsletter, a consent — where one unticked box is the honest default..",
|
|
1123
|
+
" * Avoid when: Exactly one answer is possible: radio buttons say so by their shape, and a checkbox group inviting one tick reads as a mistake.; The list is long enough to scroll; break it into groups with their own labels instead..",
|
|
1124
|
+
" *",
|
|
1125
|
+
" * Holds no children.",
|
|
1126
|
+
" */",
|
|
687
1127
|
"interface FormCheckboxProps extends Sb.BaseProps {",
|
|
688
1128
|
" /** default: \"\" */",
|
|
689
1129
|
" defaultValue?: string;",
|
|
@@ -703,7 +1143,16 @@ export const ENV_DTS = [
|
|
|
703
1143
|
"}",
|
|
704
1144
|
"declare function FormCheckbox(props: FormCheckboxProps): JSX.Element;",
|
|
705
1145
|
"",
|
|
706
|
-
"/**
|
|
1146
|
+
"/**",
|
|
1147
|
+
" * Date (form) — type \"form-date\"",
|
|
1148
|
+
" *",
|
|
1149
|
+
" * A date asked as separate boxes — day, month and year, optionally with a time box, or the time alone (the Format setting: Date & time / Only date / Only time). Nothing opens; the visitor types what they already know.",
|
|
1150
|
+
" *",
|
|
1151
|
+
" * Use when: The date is one the visitor knows by heart — a birthday, an anniversary. Typing it is faster than steering a calendar back through hundreds of months.; The date is far from today. A picker starts at the current month, which is the wrong end of the journey for a year of birth..",
|
|
1152
|
+
" * Avoid when: The visitor is choosing a date rather than recalling one — a delivery day, an appointment. A calendar shows which days exist and which weekday each one falls on.; A single free-typed value would do. If the answer is one number — an age, a year — a number field reads better than a lone date box..",
|
|
1153
|
+
" *",
|
|
1154
|
+
" * Holds no children.",
|
|
1155
|
+
" */",
|
|
707
1156
|
"interface FormDateProps extends Sb.BaseProps {",
|
|
708
1157
|
" /** default: \"Ngày\" */",
|
|
709
1158
|
" dayLabel?: string;",
|
|
@@ -738,36 +1187,57 @@ export const ENV_DTS = [
|
|
|
738
1187
|
"}",
|
|
739
1188
|
"declare function FormDate(props: FormDateProps): JSX.Element;",
|
|
740
1189
|
"",
|
|
741
|
-
"/**
|
|
1190
|
+
"/**",
|
|
1191
|
+
" * Discount code (form) — type \"form-discount-code\"",
|
|
1192
|
+
" *",
|
|
1193
|
+
" * A checkout discount-code field: a labelled text box, an \"Áp dụng\" button beside it, and a message line under it. It is a real form field mapped to order.discountCode, so the code reaches the order; it also carries the quote marker, so the bill on the page re-prices as the shopper types. The message line ships EMPTY and the runtime island fills it with one of four merchant-authored sentences — applied, unknown code, code not usable yet, or \"we could not check just now\". Must be placed INSIDE a form: outside one the page would re-price on screen and submit an order carrying no code.",
|
|
1194
|
+
" *",
|
|
1195
|
+
" * Use when: A checkout or order form needs a place for the customer to enter a discount / voucher code; The shopper should see the bill change, and see a clear refusal when the code is wrong.",
|
|
1196
|
+
" * Avoid when: The element would sit outside a form — the code would never reach the order, however correct the price on screen looked; A GIFT CARD code is wanted: that is a different order column (order.giftCardCode) and a different balance; use the gift-card row instead; The form already holds another field mapped to order.discountCode — a form with two refuses to save (ErrDuplicateMapping).",
|
|
1197
|
+
" *",
|
|
1198
|
+
" * Holds no children.",
|
|
1199
|
+
" *",
|
|
1200
|
+
" * @example",
|
|
1201
|
+
" * <FormDiscountCode />",
|
|
1202
|
+
" */",
|
|
742
1203
|
"interface FormDiscountCodeProps extends Sb.BaseProps {",
|
|
743
|
-
" /** default: \"Đã áp dụng mã giảm giá.\" */",
|
|
1204
|
+
" /** Applied · default: \"Đã áp dụng mã giảm giá.\" · e.g. \"Discount applied.\" */",
|
|
744
1205
|
" appliedText?: string;",
|
|
745
|
-
" /** default: \"Áp dụng\" */",
|
|
1206
|
+
" /** Button text · default: \"Áp dụng\" · e.g. \"Apply\" */",
|
|
746
1207
|
" buttonLabel?: string;",
|
|
747
|
-
" /** default: \"Mã này chưa dùng được cho đơn hàng của bạn.\" */",
|
|
1208
|
+
" /** Not usable · default: \"Mã này chưa dùng được cho đơn hàng của bạn.\" · e.g. \"That code can't be used on this order yet.\" */",
|
|
748
1209
|
" codeNotUsableText?: string;",
|
|
749
1210
|
" /** default: \"\" */",
|
|
750
1211
|
" description?: string;",
|
|
751
|
-
" /** default: \"Mã giảm giá\" */",
|
|
1212
|
+
" /** default: \"Mã giảm giá\" · e.g. \"Discount code\" */",
|
|
752
1213
|
" label?: string;",
|
|
753
1214
|
" /** default: \"order.discountCode\" */",
|
|
754
1215
|
" mapTo?: string;",
|
|
755
|
-
" /** default: \"Nhập mã giảm giá\" */",
|
|
1216
|
+
" /** default: \"Nhập mã giảm giá\" · e.g. \"Enter your code\" */",
|
|
756
1217
|
" placeholder?: string;",
|
|
757
|
-
" /** default: \"Chưa kiểm tra được mã. Vui lòng thử lại.\" */",
|
|
1218
|
+
" /** Check failed · default: \"Chưa kiểm tra được mã. Vui lòng thử lại.\" · e.g. \"We couldn't check that code just now. Please try again.\" */",
|
|
758
1219
|
" quoteFailedText?: string;",
|
|
759
1220
|
" /** default: false */",
|
|
760
1221
|
" required?: boolean;",
|
|
761
1222
|
" /** default: true */",
|
|
762
1223
|
" showLabel?: boolean;",
|
|
763
|
-
" /** default: \"Mã giảm giá không tồn tại.\" */",
|
|
1224
|
+
" /** Unknown code · default: \"Mã giảm giá không tồn tại.\" · e.g. \"We don't recognise that code.\" */",
|
|
764
1225
|
" unknownCodeText?: string;",
|
|
765
1226
|
" specials?: Sb.Specials<{ name?: string }>;",
|
|
766
1227
|
" [special: string]: unknown;",
|
|
767
1228
|
"}",
|
|
768
1229
|
"declare function FormDiscountCode(props: FormDiscountCodeProps): JSX.Element;",
|
|
769
1230
|
"",
|
|
770
|
-
"/**
|
|
1231
|
+
"/**",
|
|
1232
|
+
" * Estimate (form) — type \"form-estimate\"",
|
|
1233
|
+
" *",
|
|
1234
|
+
" * A live booking summary inside a form: the price of the record chosen in a data-record select, multiplied by the nights between two date fields and by a number field (\"3.330.000 ₫ × 2 đêm × 2 phòng = 13.320.000 ₫\"), plus the stay rules that go with it — check-in not in the past, check-out after check-in, a maximum number of nights, and guests within the chosen room's capacity. The server recomputes the total from the published record on submit and stores it as an estimate.",
|
|
1235
|
+
" *",
|
|
1236
|
+
" * Use when: A booking or quote request whose price is a record (a room type, a tour, a rental) times nights and/or a quantity.; The visitor should see what their choice costs before sending, and the stay dates need checking..",
|
|
1237
|
+
" * Avoid when: The form sells cart products — the order form and its bill already price those.; The price is not stored on a data record; there is nothing authoritative for the server to recompute from..",
|
|
1238
|
+
" *",
|
|
1239
|
+
" * Holds no children.",
|
|
1240
|
+
" */",
|
|
771
1241
|
"interface FormEstimateProps extends Sb.BaseProps {",
|
|
772
1242
|
" /** default: \"Giá dự kiến, chưa phải giá giữ chỗ.\" */",
|
|
773
1243
|
" description?: string;",
|
|
@@ -782,7 +1252,16 @@ export const ENV_DTS = [
|
|
|
782
1252
|
"}",
|
|
783
1253
|
"declare function FormEstimate(props: FormEstimateProps): JSX.Element;",
|
|
784
1254
|
"",
|
|
785
|
-
"/**
|
|
1255
|
+
"/**",
|
|
1256
|
+
" * Upload file (form) — type \"form-file\"",
|
|
1257
|
+
" *",
|
|
1258
|
+
" * A field that lets a visitor attach a file to their response — a photo, a video or a PDF. Accepts one kind at a time, optionally several files at once, and the attachments arrive with the response rather than separately, so a refused form never leaves a stray upload behind.",
|
|
1259
|
+
" *",
|
|
1260
|
+
" * Use when: The answer is a document or an image the visitor already has — a CV, a receipt, a photo of a damaged item.; Seeing the thing is faster than reading a description of it: a support form for a broken product, a print order.; Several pieces of one answer belong together — turn on multiple uploads and set the limit to how many you will actually look at..",
|
|
1261
|
+
" * Avoid when: The answer can be typed. A file is slower to send on a phone and slower to read afterwards.; You want more than one KIND of file in a single field — a field accepts images, videos or PDFs, not a mixture. Use one field per kind, each labelled for what it wants.; The form is meant to be answered in seconds; asking for an attachment is the step people abandon..",
|
|
1262
|
+
" *",
|
|
1263
|
+
" * Holds no children.",
|
|
1264
|
+
" */",
|
|
786
1265
|
"interface FormFileProps extends Sb.BaseProps {",
|
|
787
1266
|
" /** default: false */",
|
|
788
1267
|
" allowMultiple?: boolean;",
|
|
@@ -809,21 +1288,39 @@ export const ENV_DTS = [
|
|
|
809
1288
|
"}",
|
|
810
1289
|
"declare function FormFile(props: FormFileProps): JSX.Element;",
|
|
811
1290
|
"",
|
|
812
|
-
"/**
|
|
1291
|
+
"/**",
|
|
1292
|
+
" * Link (form) — type \"form-link\"",
|
|
1293
|
+
" *",
|
|
1294
|
+
" * A line of text inside a form that ends in a link — \"Forgot password?\", \"No account yet? Sign up\". Collects nothing. The link reaches the site's register / login / forgot page by TYPE, or a custom URL.",
|
|
1295
|
+
" *",
|
|
1296
|
+
" * Use when: A sign-in form needs its \"Forgot password?\" and \"Sign up\" lines under the button.; A sign-up or reset form needs a way back to sign in..",
|
|
1297
|
+
" * Avoid when: The link is a call to action on its own. Use a Button outside the form.; The text explains a field. Use that field's description instead..",
|
|
1298
|
+
" *",
|
|
1299
|
+
" * Holds no children.",
|
|
1300
|
+
" */",
|
|
813
1301
|
"interface FormLinkProps extends Sb.BaseProps {",
|
|
814
|
-
" /** default: \"\" */",
|
|
1302
|
+
" /** URL · default: \"\" */",
|
|
815
1303
|
" href?: string;",
|
|
816
|
-
" /** default: \"register\" */",
|
|
1304
|
+
" /** Link to · default: \"register\" */",
|
|
817
1305
|
" linkTarget?: string;",
|
|
818
|
-
" /** default: \"Đăng ký ngay\" */",
|
|
1306
|
+
" /** Link text · default: \"Đăng ký ngay\" */",
|
|
819
1307
|
" linkText?: string;",
|
|
820
|
-
" /** default: \"Chưa có tài khoản?\" */",
|
|
1308
|
+
" /** Text · default: \"Chưa có tài khoản?\" */",
|
|
821
1309
|
" text?: string;",
|
|
822
1310
|
" [special: string]: unknown;",
|
|
823
1311
|
"}",
|
|
824
1312
|
"declare function FormLink(props: FormLinkProps): JSX.Element;",
|
|
825
1313
|
"",
|
|
826
|
-
"/**
|
|
1314
|
+
"/**",
|
|
1315
|
+
" * Number input (form) — type \"form-number\"",
|
|
1316
|
+
" *",
|
|
1317
|
+
" * A field that accepts a number and nothing else: the visitor gets a numeric keyboard on a phone, and the answer arrives as a number rather than as text that happens to look like one. Can be held to a range.",
|
|
1318
|
+
" *",
|
|
1319
|
+
" * Use when: The answer is a quantity, a size, an age or a year — something that will be compared or added up later.; A range genuinely bounds the answer, so an impossible value is caught while the visitor is still on the page..",
|
|
1320
|
+
" * Avoid when: The answer is a phone number, a postcode or an order id — those are digits, not quantities, and a number field strips leading zeros and offers a spinner nobody wants.; The answer is a date; a date field validates and formats it for the visitor..",
|
|
1321
|
+
" *",
|
|
1322
|
+
" * Holds no children.",
|
|
1323
|
+
" */",
|
|
827
1324
|
"interface FormNumberProps extends Sb.BaseProps {",
|
|
828
1325
|
" /** default: \"\" */",
|
|
829
1326
|
" description?: string;",
|
|
@@ -860,7 +1357,16 @@ export const ENV_DTS = [
|
|
|
860
1357
|
"}",
|
|
861
1358
|
"declare function FormNumber(props: FormNumberProps): JSX.Element;",
|
|
862
1359
|
"",
|
|
863
|
-
"/**
|
|
1360
|
+
"/**",
|
|
1361
|
+
" * Paragraph (form) — type \"form-paragraph\"",
|
|
1362
|
+
" *",
|
|
1363
|
+
" * A block of explanatory text inside a form. Collects nothing — it is there so the visitor knows why they are being asked.",
|
|
1364
|
+
" *",
|
|
1365
|
+
" * Use when: Something needs explaining that will not fit in a field description — what happens after they send, why an unusual detail is needed.; A legal or privacy line has to sit where the visitor cannot miss it..",
|
|
1366
|
+
" * Avoid when: The text belongs to ONE field. A field has its own description line, which stays attached to it when the form is rearranged.; It is a title. Use Title, so the form has a readable outline..",
|
|
1367
|
+
" *",
|
|
1368
|
+
" * Holds no children.",
|
|
1369
|
+
" */",
|
|
864
1370
|
"interface FormParagraphProps extends Sb.BaseProps {",
|
|
865
1371
|
" /** default: \"Nội dung mô tả.\" */",
|
|
866
1372
|
" text?: string;",
|
|
@@ -868,7 +1374,16 @@ export const ENV_DTS = [
|
|
|
868
1374
|
"}",
|
|
869
1375
|
"declare function FormParagraph(props: FormParagraphProps): JSX.Element;",
|
|
870
1376
|
"",
|
|
871
|
-
"/**
|
|
1377
|
+
"/**",
|
|
1378
|
+
" * Payment method (form) — type \"form-payment\"",
|
|
1379
|
+
" *",
|
|
1380
|
+
" * The payment-method chooser of an order form, or of a booking form that takes a deposit: one card per way to pay — cash on delivery and every gateway the store has switched on — each with a name and a one-line explanation. The chosen value is the gateway id the server charges through.",
|
|
1381
|
+
" *",
|
|
1382
|
+
" * Use when: An order or checkout form needs to ask how the shopper will pay.; A booking form has a deposit product set and the customer should pay it right away through a gateway.; The store has connected a gateway and wants it offered beside cash on delivery..",
|
|
1383
|
+
" * Avoid when: The form is neither an order form nor a booking form with a deposit product set — a contact form has no order to pay for.; You want a free-text answer: a typed method name opens no payment, so the values come from the store, never from the keyboard..",
|
|
1384
|
+
" *",
|
|
1385
|
+
" * Holds no children.",
|
|
1386
|
+
" */",
|
|
872
1387
|
"interface FormPaymentProps extends Sb.BaseProps {",
|
|
873
1388
|
" /** default: \"\" */",
|
|
874
1389
|
" defaultValue?: string;",
|
|
@@ -876,7 +1391,7 @@ export const ENV_DTS = [
|
|
|
876
1391
|
" description?: string;",
|
|
877
1392
|
" /** default: \"Phương thức thanh toán\" */",
|
|
878
1393
|
" label?: string;",
|
|
879
|
-
" /** default: \"auto\" */",
|
|
1394
|
+
" /** Logo shape · default: \"auto\" */",
|
|
880
1395
|
" logoShape?: string;",
|
|
881
1396
|
" /** default: \"order.paymentMethod\" */",
|
|
882
1397
|
" mapTo?: string;",
|
|
@@ -894,7 +1409,16 @@ export const ENV_DTS = [
|
|
|
894
1409
|
"}",
|
|
895
1410
|
"declare function FormPayment(props: FormPaymentProps): JSX.Element;",
|
|
896
1411
|
"",
|
|
897
|
-
"/**
|
|
1412
|
+
"/**",
|
|
1413
|
+
" * Radio (form) — type \"form-radio\"",
|
|
1414
|
+
" *",
|
|
1415
|
+
" * A set of choices with exactly one answer, all visible at once. The visitor compares them without opening anything.",
|
|
1416
|
+
" *",
|
|
1417
|
+
" * Use when: There are a handful of choices and seeing them together helps the visitor decide.; One answer is the only sensible outcome — a size, a delivery method, a yes or no..",
|
|
1418
|
+
" * Avoid when: The list is long: it crowds out the rest of the form, and a dropdown reads better past about five rows.; Several answers can be true at once — that is a checkbox group..",
|
|
1419
|
+
" *",
|
|
1420
|
+
" * Holds no children.",
|
|
1421
|
+
" */",
|
|
898
1422
|
"interface FormRadioProps extends Sb.BaseProps {",
|
|
899
1423
|
" /** default: \"\" */",
|
|
900
1424
|
" defaultValue?: string;",
|
|
@@ -914,13 +1438,29 @@ export const ENV_DTS = [
|
|
|
914
1438
|
"}",
|
|
915
1439
|
"declare function FormRadio(props: FormRadioProps): JSX.Element;",
|
|
916
1440
|
"",
|
|
917
|
-
"/**
|
|
1441
|
+
"/**",
|
|
1442
|
+
" * Segment (form) — type \"form-segment\"",
|
|
1443
|
+
" *",
|
|
1444
|
+
" * A division of a form. Its fields can be placed somewhere else on the page, or shown as a step — either way they are part of the same single submission.",
|
|
1445
|
+
" *",
|
|
1446
|
+
" * Use when: The form is long enough that seeing all of it at once puts people off. Split it and show one part at a time.; The fields belong in different places on the page — an email box in the hero and the rest lower down, still one message..",
|
|
1447
|
+
" * Avoid when: The form is short. A single-segment form needs no segments at all; the whole document already is one.; You want two separate submissions. That is two forms — one segment cannot be sent on its own..",
|
|
1448
|
+
" */",
|
|
918
1449
|
"interface FormSegmentProps extends Sb.BaseProps {",
|
|
919
1450
|
" [special: string]: unknown;",
|
|
920
1451
|
"}",
|
|
921
1452
|
"declare function FormSegment(props: FormSegmentProps): JSX.Element;",
|
|
922
1453
|
"",
|
|
923
|
-
"/**
|
|
1454
|
+
"/**",
|
|
1455
|
+
" * Select (form) — type \"form-select\"",
|
|
1456
|
+
" *",
|
|
1457
|
+
" * A dropdown of known choices. Shows one answer at a time and takes the least room of the three choice controls, which is what makes it right for long lists.",
|
|
1458
|
+
" *",
|
|
1459
|
+
" * Use when: There are more than about five choices — a long column of radio buttons pushes everything else off the screen.; The choices are familiar enough that the visitor knows what they are looking for before opening the list..",
|
|
1460
|
+
" * Avoid when: There are two or three choices: radio buttons show them all at once and take one tap instead of two.; The visitor may need to pick several — that is what a checkbox group is for..",
|
|
1461
|
+
" *",
|
|
1462
|
+
" * Holds no children.",
|
|
1463
|
+
" */",
|
|
924
1464
|
"interface FormSelectProps extends Sb.BaseProps {",
|
|
925
1465
|
" /** default: \"\" */",
|
|
926
1466
|
" defaultValue?: string;",
|
|
@@ -944,7 +1484,17 @@ export const ENV_DTS = [
|
|
|
944
1484
|
"}",
|
|
945
1485
|
"declare function FormSelect(props: FormSelectProps): JSX.Element;",
|
|
946
1486
|
"",
|
|
947
|
-
"/**
|
|
1487
|
+
"/**",
|
|
1488
|
+
" * Step button (form) — type \"form-step-button\"",
|
|
1489
|
+
" *",
|
|
1490
|
+
" * One button of a multi-step form's navigation bar — Back or Next, decided by its `dir`. It is placed and kept in place by the Steps panel rather than dragged in, and the published page's island decides which of them a given step is allowed to show.",
|
|
1491
|
+
" *",
|
|
1492
|
+
" * Use when: Only inside a step navigation bar of a form that is divided into steps — the Steps panel puts one Back and one Next in every step.; When the author wants the step controls to match the rest of the form: their own colour, border, radius, padding, width, type size or icon..",
|
|
1493
|
+
" * Avoid when: Anywhere outside a step bar: it carries the step island call and would be a button that visibly does nothing.; As a general-purpose button — a plain Button element goes anywhere and answers to a dozen actions; this one only ever moves a form one step.; As a way to send the form. That is the Submit element, which shares the bar and takes Next’s place on the last step..",
|
|
1494
|
+
" *",
|
|
1495
|
+
" * Holds no children.",
|
|
1496
|
+
" * Goes inside <FormStepNav>.",
|
|
1497
|
+
" */",
|
|
948
1498
|
"interface FormStepButtonProps extends Sb.BaseProps {",
|
|
949
1499
|
" /** default: \"next\" */",
|
|
950
1500
|
" dir?: string;",
|
|
@@ -954,13 +1504,40 @@ export const ENV_DTS = [
|
|
|
954
1504
|
"}",
|
|
955
1505
|
"declare function FormStepButton(props: FormStepButtonProps): JSX.Element;",
|
|
956
1506
|
"",
|
|
957
|
-
"/**
|
|
1507
|
+
"/**",
|
|
1508
|
+
" * Step counter (form) — type \"form-step-count\"",
|
|
1509
|
+
" *",
|
|
1510
|
+
" * The “2/3” counter in a multi-step form's navigation bar. It renders empty in both renderers — the published page's island fills in the numbers at load, because neither renderer knows how many steps the visitor will end up seeing.",
|
|
1511
|
+
" *",
|
|
1512
|
+
" * Use when: Inside a step navigation bar, when the form has enough steps that a visitor benefits from knowing how far along they are.; On long forms above all: the count is what tells someone whether to keep going or come back later..",
|
|
1513
|
+
" * Avoid when: Outside a step bar — nothing fills it in, so it renders as an empty box forever.; On a two-step form where the bar already reads Back / Next; the counter adds a number nobody needed..",
|
|
1514
|
+
" *",
|
|
1515
|
+
" * Holds no children.",
|
|
1516
|
+
" * Goes inside <FormStepNav>.",
|
|
1517
|
+
" */",
|
|
958
1518
|
"interface FormStepCountProps extends Sb.BaseProps {",
|
|
959
1519
|
" [special: string]: unknown;",
|
|
960
1520
|
"}",
|
|
961
1521
|
"declare function FormStepCount(props: FormStepCountProps): JSX.Element;",
|
|
962
1522
|
"",
|
|
963
|
-
"/**
|
|
1523
|
+
"/**",
|
|
1524
|
+
" * Step navigation (form) — type \"form-step-nav\"",
|
|
1525
|
+
" *",
|
|
1526
|
+
" * The Back / Next bar that walks a visitor through a form one segment at a time. Add it once, beside the segments.",
|
|
1527
|
+
" *",
|
|
1528
|
+
" * Use when: The form is divided into segments and you want them shown one at a time rather than scattered across the page.; Later questions only make sense after earlier ones — asking for a delivery slot before an address..",
|
|
1529
|
+
" * Avoid when: The form has one segment. There is nothing to step through, and a Next button with nowhere to go is worse than no bar.; The segments are placed in different spots on the page. That is the other way of using segments; steps replace it, they do not combine..",
|
|
1530
|
+
" *",
|
|
1531
|
+
" * Children: ONLY <FormStepButton>, <FormStepCount>, <FormSubmit> — push refuses any other child.",
|
|
1532
|
+
" *",
|
|
1533
|
+
" * @example",
|
|
1534
|
+
" * <FormStepNav>",
|
|
1535
|
+
" * <FormStepButton dir=\"next\" text=\"Tiếp tục\" />",
|
|
1536
|
+
" * <FormStepCount />",
|
|
1537
|
+
" * <FormStepButton dir=\"next\" text=\"Tiếp tục\" />",
|
|
1538
|
+
" * <FormStepCount />",
|
|
1539
|
+
" * </FormStepNav>",
|
|
1540
|
+
" */",
|
|
964
1541
|
"interface FormStepNavProps extends Sb.BaseProps {",
|
|
965
1542
|
" /** default: \"Tiếp tục\" */",
|
|
966
1543
|
" nextText?: string;",
|
|
@@ -974,7 +1551,17 @@ export const ENV_DTS = [
|
|
|
974
1551
|
"}",
|
|
975
1552
|
"declare function FormStepNav(props: FormStepNavProps): JSX.Element;",
|
|
976
1553
|
"",
|
|
977
|
-
"/**
|
|
1554
|
+
"/**",
|
|
1555
|
+
" * Submit (form) — type \"form-submit\"",
|
|
1556
|
+
" *",
|
|
1557
|
+
" * A form's send button. Carries two labels — what it says at rest and what it says while the response is being sent — and marks the part of a form that can be submitted, which matters when a form is split across several places on a page.",
|
|
1558
|
+
" *",
|
|
1559
|
+
" * Use when: Every form needs exactly one: without it there is no way to send what was typed.; When a form is split across the page, put it on the part the visitor reaches last.; When a form runs as steps, it belongs on the final step, with Next/Back handling the ones before it..",
|
|
1560
|
+
" * Avoid when: A second one in the same form — two send buttons raise the question of which one sends, and the answer is that both do.; As a general-purpose button: a plain Button element goes anywhere and does anything, while this one only ever sends its form..",
|
|
1561
|
+
" *",
|
|
1562
|
+
" * Holds no children.",
|
|
1563
|
+
" * Goes inside <FormStepNav>.",
|
|
1564
|
+
" */",
|
|
978
1565
|
"interface FormSubmitProps extends Sb.BaseProps {",
|
|
979
1566
|
" /** default: \"Đang gửi…\" */",
|
|
980
1567
|
" submittingText?: string;",
|
|
@@ -984,7 +1571,16 @@ export const ENV_DTS = [
|
|
|
984
1571
|
"}",
|
|
985
1572
|
"declare function FormSubmit(props: FormSubmitProps): JSX.Element;",
|
|
986
1573
|
"",
|
|
987
|
-
"/**
|
|
1574
|
+
"/**",
|
|
1575
|
+
" * Text input (form) — type \"form-text\"",
|
|
1576
|
+
" *",
|
|
1577
|
+
" * A single text field inside a form: a label, the box the visitor types into, and an optional line of help underneath. Switches between a one-line input and a multi-line box, and can be pointed at a customer column so what is typed reaches the customer record rather than only the response log.",
|
|
1578
|
+
" *",
|
|
1579
|
+
" * Use when: The answer is free text a visitor writes themselves — a name, an email address, a message.; The answer belongs on the customer record: point the field at the matching column instead of collecting it twice.; A longer answer is expected — turn on multi-line so the box looks like the amount of writing being asked for..",
|
|
1580
|
+
" * Avoid when: The answer is one of a known set — a choice control is faster to answer and impossible to misspell.; The answer is a quantity or a date; those have their own fields, which validate and format for the visitor.; The same column is already collected by another field in this form — one column takes one value, and the form will be refused..",
|
|
1581
|
+
" *",
|
|
1582
|
+
" * Holds no children.",
|
|
1583
|
+
" */",
|
|
988
1584
|
"interface FormTextProps extends Sb.BaseProps {",
|
|
989
1585
|
" /** default: \"\" */",
|
|
990
1586
|
" description?: string;",
|
|
@@ -1028,7 +1624,16 @@ export const ENV_DTS = [
|
|
|
1028
1624
|
"}",
|
|
1029
1625
|
"declare function FormText(props: FormTextProps): JSX.Element;",
|
|
1030
1626
|
"",
|
|
1031
|
-
"/**
|
|
1627
|
+
"/**",
|
|
1628
|
+
" * Time slot (form) — type \"form-timeslot\"",
|
|
1629
|
+
" *",
|
|
1630
|
+
" * A grid of bookable start times generated from opening hours — open, close, slot length and one break — for a booking form. The visitor taps one; the server counts capacity per slot and the page greys out slots already full.",
|
|
1631
|
+
" *",
|
|
1632
|
+
" * Use when: A booking form needs a time of day and the shop books in regular slots (every 30, 45 or 60 minutes).; The hours change with the season and retyping a list of times each time is the thing to avoid..",
|
|
1633
|
+
" * Avoid when: The choice is a wide band rather than a start time (\"Sáng / Chiều / Tối\") — a Select or Radio with three options says that better.; The form is not a booking form — nothing counts these slots outside the Booking app..",
|
|
1634
|
+
" *",
|
|
1635
|
+
" * Holds no children.",
|
|
1636
|
+
" */",
|
|
1032
1637
|
"interface FormTimeslotProps extends Sb.BaseProps {",
|
|
1033
1638
|
" /** default: \"\" */",
|
|
1034
1639
|
" breakEnd?: string;",
|
|
@@ -1059,9 +1664,18 @@ export const ENV_DTS = [
|
|
|
1059
1664
|
"}",
|
|
1060
1665
|
"declare function FormTimeslot(props: FormTimeslotProps): JSX.Element;",
|
|
1061
1666
|
"",
|
|
1062
|
-
"/**
|
|
1667
|
+
"/**",
|
|
1668
|
+
" * Title (form) — type \"form-title\"",
|
|
1669
|
+
" *",
|
|
1670
|
+
" * A heading inside a form. Names a group of fields; collects nothing and never appears in a response.",
|
|
1671
|
+
" *",
|
|
1672
|
+
" * Use when: The form has more than one section and the visitor needs to know where they are — \"Delivery address\" above four address fields.; A step in a multi-step form needs a name, so the visitor can tell what this step is about before reading the fields..",
|
|
1673
|
+
" * Avoid when: The form is short. A title above three fields repeats what the fields already say.; You want the answer stored. This is furniture — use a field..",
|
|
1674
|
+
" *",
|
|
1675
|
+
" * Holds no children.",
|
|
1676
|
+
" */",
|
|
1063
1677
|
"interface FormTitleProps extends Sb.BaseProps {",
|
|
1064
|
-
" /** default: \"h3\" */",
|
|
1678
|
+
" /** HTML Tag · default: \"h3\" */",
|
|
1065
1679
|
" htmlTag?: string;",
|
|
1066
1680
|
" /** default: \"Tiêu đề\" */",
|
|
1067
1681
|
" text?: string;",
|
|
@@ -1069,19 +1683,40 @@ export const ENV_DTS = [
|
|
|
1069
1683
|
"}",
|
|
1070
1684
|
"declare function FormTitle(props: FormTitleProps): JSX.Element;",
|
|
1071
1685
|
"",
|
|
1072
|
-
"/**
|
|
1686
|
+
"/**",
|
|
1687
|
+
" * Free shipping bar (store) — type \"free-ship-bar\"",
|
|
1688
|
+
" *",
|
|
1689
|
+
" * A progress bar toward free shipping: a message line (\"Mua thêm 50.000₫ để được miễn phí vận chuyển\") over a track that fills as the cart approaches a merchant-typed threshold. Driven by the cart in the shopper's own browser (no server round-trip), so the message ships empty and the fill sits at 0% until the runtime island hydrates. The threshold is authored on the element itself — there is no site-wide automatic-discount setting this reads from yet.",
|
|
1690
|
+
" *",
|
|
1691
|
+
" * Use when: A cart drawer or cart page should nudge shoppers toward a free-shipping minimum; The store already has a de-facto free-shipping cutoff and wants it stated as a live progress bar rather than static text.",
|
|
1692
|
+
" * Avoid when: The site already has an automatic free-shipping discount configured — this bar cannot read it yet, so the two numbers can silently disagree; state that in the two texts; The exact remaining amount needs to show anywhere the cart total is not known client-side (a server-rendered email, for instance).",
|
|
1693
|
+
" *",
|
|
1694
|
+
" * Holds no children.",
|
|
1695
|
+
" *",
|
|
1696
|
+
" * @example",
|
|
1697
|
+
" * <FreeShipBar thresholdCents={50000000} />",
|
|
1698
|
+
" */",
|
|
1073
1699
|
"interface FreeShipBarProps extends Sb.BaseProps {",
|
|
1074
|
-
" /** default: \"Bạn đã được miễn phí vận chuyển!\" */",
|
|
1700
|
+
" /** Reached · default: \"Bạn đã được miễn phí vận chuyển!\" · e.g. \"You've unlocked free shipping!\" */",
|
|
1075
1701
|
" reachedText?: string;",
|
|
1076
|
-
" /** default: \"Mua thêm {amount} để được miễn phí vận chuyển\" */",
|
|
1702
|
+
" /** Below threshold · default: \"Mua thêm {amount} để được miễn phí vận chuyển\" · e.g. \"Add {amount} more for free shipping\" */",
|
|
1077
1703
|
" remainingText?: string;",
|
|
1078
|
-
" /** default: 50000000 */",
|
|
1704
|
+
" /** Free-shipping threshold · format: money in HUNDREDTHS of the currency unit, for every currency (VND too): 15000000 is 150,000 ₫ · default: 50000000 · e.g. 20000000 */",
|
|
1079
1705
|
" thresholdCents?: number;",
|
|
1080
1706
|
" [special: string]: unknown;",
|
|
1081
1707
|
"}",
|
|
1082
1708
|
"declare function FreeShipBar(props: FreeShipBarProps): JSX.Element;",
|
|
1083
1709
|
"",
|
|
1084
|
-
"/**
|
|
1710
|
+
"/**",
|
|
1711
|
+
" * Google Map (media) — type \"google-map\"",
|
|
1712
|
+
" *",
|
|
1713
|
+
" * A secure embedded Google Map using an allowlisted embed URL.",
|
|
1714
|
+
" *",
|
|
1715
|
+
" * Use when: To show a business location or store finder on a contact page; As a geographic reference for event or venue pages.",
|
|
1716
|
+
" * Avoid when: As a decorative background — use image instead.",
|
|
1717
|
+
" *",
|
|
1718
|
+
" * Holds no children.",
|
|
1719
|
+
" */",
|
|
1085
1720
|
"interface GoogleMapProps extends Sb.BaseProps {",
|
|
1086
1721
|
" /** default: \"\" */",
|
|
1087
1722
|
" location?: string;",
|
|
@@ -1093,15 +1728,32 @@ export const ENV_DTS = [
|
|
|
1093
1728
|
"}",
|
|
1094
1729
|
"declare function GoogleMap(props: GoogleMapProps): JSX.Element;",
|
|
1095
1730
|
"",
|
|
1096
|
-
"/**
|
|
1731
|
+
"/**",
|
|
1732
|
+
" * Icon menu (basic) — type \"hamburger-menu\"",
|
|
1733
|
+
" *",
|
|
1734
|
+
" * A hamburger icon that opens a slide-in drawer (from the left, right, top or bottom edge) holding navigation content — the compact mobile-style menu for headers where a full menu bar does not fit.",
|
|
1735
|
+
" *",
|
|
1736
|
+
" * Use when: the header is too narrow for a full menu bar (mobile, or a minimal desktop header); navigation should stay hidden until the visitor asks for it; a drawer needs to hold more than links — a header, buttons, or a section.",
|
|
1737
|
+
" * Avoid when: the links already fit in the header (use the menu element directly); only one action is needed (use a button).",
|
|
1738
|
+
" */",
|
|
1097
1739
|
"interface HamburgerMenuProps extends Sb.BaseProps {",
|
|
1098
1740
|
" [special: string]: unknown;",
|
|
1099
1741
|
"}",
|
|
1100
1742
|
"declare function HamburgerMenu(props: HamburgerMenuProps): JSX.Element;",
|
|
1101
1743
|
"",
|
|
1102
|
-
"/**
|
|
1744
|
+
"/**",
|
|
1745
|
+
" * Heading (basic) — type \"heading\"",
|
|
1746
|
+
" *",
|
|
1747
|
+
" * A semantic heading element (h1–h6) for titles and section headers.",
|
|
1748
|
+
" *",
|
|
1749
|
+
" * Use when: At the top of a section to label its purpose; As the primary hero headline with a large font size.",
|
|
1750
|
+
" * Avoid when: For body copy or captions — use the text element instead.",
|
|
1751
|
+
" *",
|
|
1752
|
+
" * Holds no children.",
|
|
1753
|
+
" * Goes inside <SearchInput>.",
|
|
1754
|
+
" */",
|
|
1103
1755
|
"interface HeadingProps extends Sb.BaseProps {",
|
|
1104
|
-
" /** default: \"h2\" */",
|
|
1756
|
+
" /** HTML Tag · default: \"h2\" */",
|
|
1105
1757
|
" htmlTag?: string;",
|
|
1106
1758
|
" /** default: \"heading-default\" */",
|
|
1107
1759
|
" stylePreset?: string;",
|
|
@@ -1111,7 +1763,17 @@ export const ENV_DTS = [
|
|
|
1111
1763
|
"}",
|
|
1112
1764
|
"declare function Heading(props: HeadingProps): JSX.Element;",
|
|
1113
1765
|
"",
|
|
1114
|
-
"/**
|
|
1766
|
+
"/**",
|
|
1767
|
+
" * Icon (basic) — type \"icon\"",
|
|
1768
|
+
" *",
|
|
1769
|
+
" * A scalable vector icon from the RemixIcon set.",
|
|
1770
|
+
" *",
|
|
1771
|
+
" * Use when: To reinforce a feature label or list item with a visual symbol; As a small accent next to a heading or button.",
|
|
1772
|
+
" * Avoid when: As the sole content of a large visual area — use image instead; As a clickable action — use a button with an icon instead.",
|
|
1773
|
+
" *",
|
|
1774
|
+
" * Holds no children.",
|
|
1775
|
+
" * Not a child: its <CartCount> sits in `export const detached`, linked by config.cartCountId.",
|
|
1776
|
+
" */",
|
|
1115
1777
|
"interface IconProps extends Sb.BaseProps {",
|
|
1116
1778
|
" /** default: \"icon-default\" */",
|
|
1117
1779
|
" stylePreset?: string;",
|
|
@@ -1120,7 +1782,17 @@ export const ENV_DTS = [
|
|
|
1120
1782
|
"}",
|
|
1121
1783
|
"declare function Icon(props: IconProps): JSX.Element;",
|
|
1122
1784
|
"",
|
|
1123
|
-
"/**
|
|
1785
|
+
"/**",
|
|
1786
|
+
" * Image (media) — type \"image\"",
|
|
1787
|
+
" *",
|
|
1788
|
+
" * A responsive image element for photos, illustrations, and graphics.",
|
|
1789
|
+
" *",
|
|
1790
|
+
" * Use when: To show a product photo, hero visual, or team portrait; Alongside text blocks to create visual interest.",
|
|
1791
|
+
" * Avoid when: For decorative icons — use the icon element instead.",
|
|
1792
|
+
" *",
|
|
1793
|
+
" * Holds no children.",
|
|
1794
|
+
" * Goes inside <ImageMarquee>.",
|
|
1795
|
+
" */",
|
|
1124
1796
|
"interface ImageProps extends Sb.BaseProps {",
|
|
1125
1797
|
" /** default: \"\" */",
|
|
1126
1798
|
" alt?: string;",
|
|
@@ -1132,7 +1804,16 @@ export const ENV_DTS = [
|
|
|
1132
1804
|
"}",
|
|
1133
1805
|
"declare function Image(props: ImageProps): JSX.Element;",
|
|
1134
1806
|
"",
|
|
1135
|
-
"/**
|
|
1807
|
+
"/**",
|
|
1808
|
+
" * Image Compare (media) — type \"image-comparison\"",
|
|
1809
|
+
" *",
|
|
1810
|
+
" * A before/after image comparison widget with a draggable divider handle.",
|
|
1811
|
+
" *",
|
|
1812
|
+
" * Use when: To show before/after results for a product or service (e.g. photo editing, renovation); For interactive product comparisons on landing pages.",
|
|
1813
|
+
" * Avoid when: When only a single image is needed — use image instead.",
|
|
1814
|
+
" *",
|
|
1815
|
+
" * Holds no children.",
|
|
1816
|
+
" */",
|
|
1136
1817
|
"interface ImageComparisonProps extends Sb.BaseProps {",
|
|
1137
1818
|
" /** default: \"\" */",
|
|
1138
1819
|
" afterAlt?: string;",
|
|
@@ -1146,36 +1827,104 @@ export const ENV_DTS = [
|
|
|
1146
1827
|
"}",
|
|
1147
1828
|
"declare function ImageComparison(props: ImageComparisonProps): JSX.Element;",
|
|
1148
1829
|
"",
|
|
1149
|
-
"/**
|
|
1830
|
+
"/**",
|
|
1831
|
+
" * Image marquee (media) — type \"image-marquee\"",
|
|
1832
|
+
" *",
|
|
1833
|
+
" * A horizontally-scrolling image/logo marquee for brand, partner, and press logos.",
|
|
1834
|
+
" *",
|
|
1835
|
+
" * Use when: For a logo wall or \"trusted by\" strip of brand/partner logos; For a press-mention or sponsor band that scrolls across the section.",
|
|
1836
|
+
" * Avoid when: For a single image — use image instead; For scrolling text or announcements — use text-marquee instead.",
|
|
1837
|
+
" *",
|
|
1838
|
+
" * Children: ONLY <Image> — push refuses any other child.",
|
|
1839
|
+
" *",
|
|
1840
|
+
" * @example",
|
|
1841
|
+
" * <ImageMarquee>",
|
|
1842
|
+
" * <Image src=\"\" alt=\"\" />",
|
|
1843
|
+
" * <Image src=\"\" alt=\"\" />",
|
|
1844
|
+
" * </ImageMarquee>",
|
|
1845
|
+
" */",
|
|
1150
1846
|
"interface ImageMarqueeProps extends Sb.BaseProps {",
|
|
1151
1847
|
" [special: string]: unknown;",
|
|
1152
1848
|
"}",
|
|
1153
1849
|
"declare function ImageMarquee(props: ImageMarqueeProps): JSX.Element;",
|
|
1154
1850
|
"",
|
|
1155
|
-
"/**
|
|
1851
|
+
"/**",
|
|
1852
|
+
" * List (basic) — type \"list\"",
|
|
1853
|
+
" *",
|
|
1854
|
+
" * A vertical list container whose rows are list-item children (each an icon marker + short text).",
|
|
1855
|
+
" *",
|
|
1856
|
+
" * Use when: To present a set of short, parallel points (features, specs, steps); For icon-marked or bullet lists inside body content.",
|
|
1857
|
+
" * Avoid when: For a single line of copy — use text instead; For navigation between pages — use breadcrumb or link.",
|
|
1858
|
+
" *",
|
|
1859
|
+
" * Children: ONLY <ListItem> — push refuses any other child.",
|
|
1860
|
+
" *",
|
|
1861
|
+
" * @example",
|
|
1862
|
+
" * <List>",
|
|
1863
|
+
" * <ListItem text=\"List item\" icon=\"StarFill\" />",
|
|
1864
|
+
" * <ListItem text=\"List item\" icon=\"StarFill\" />",
|
|
1865
|
+
" * </List>",
|
|
1866
|
+
" */",
|
|
1156
1867
|
"interface ListProps extends Sb.BaseProps {",
|
|
1157
1868
|
" [special: string]: unknown;",
|
|
1158
1869
|
"}",
|
|
1159
1870
|
"declare function List(props: ListProps): JSX.Element;",
|
|
1160
1871
|
"",
|
|
1161
|
-
"/**
|
|
1872
|
+
"/**",
|
|
1873
|
+
" * Product list (dataset) — type \"list-dataset\"",
|
|
1874
|
+
" *",
|
|
1875
|
+
" * A store-driven dataset repeater: it renders ONE dataset-block template once per record — every product of a collection, or every collection of the store — laid out as a responsive grid or a row-by-row slide carousel. Each repeated card is bound to its own record, so a single authored template drives an entire listing.",
|
|
1876
|
+
" *",
|
|
1877
|
+
" * Use when: Product listing sections — \"shop the collection\", featured products, related products — where every card reuses one layout; Collection listings: a grid or carousel of the store's collections, each card showing that collection's image and name; You want to design ONE card (image + title + price + actions) and have it repeat across many records automatically.",
|
|
1878
|
+
" * Avoid when: Displaying a SINGLE product or collection (a product-detail buy box) — use a plain dataset-block, with no repeater; Static marketing cards that do not read live store data — use content-list or flex-section; A single dataset field such as only the title, price or image — use that specific dataset node instead.",
|
|
1879
|
+
" *",
|
|
1880
|
+
" * Children: ONLY <DatasetBlock> — push refuses any other child.",
|
|
1881
|
+
" * Goes inside <SearchInput>.",
|
|
1882
|
+
" * Not a child: its <ListEmpty> sits in `export const detached`, linked by config.emptyStateId.",
|
|
1883
|
+
" * Not a child: its <ListLoading> sits in `export const detached`, linked by config.loadingStateId.",
|
|
1884
|
+
" * Not a child: its <Quickview> sits in `export const detached`, linked by config.quickviewNodeId.",
|
|
1885
|
+
" * Typical: list-dataset containing exactly one dataset-block child as the repeated card template.",
|
|
1886
|
+
" * Typical: product list containing a product dataset-block with media, title, pricing, variants, quantity and action buttons.",
|
|
1887
|
+
" * Typical: collection list containing a category dataset-block with collection media and title.",
|
|
1888
|
+
" *",
|
|
1889
|
+
" * @example",
|
|
1890
|
+
" * <ListDataset config={{\"datasetSource\":\"product\",\"collectionType\":\"all_products\",\"collectionId\":\"all_products\",\"layout\":\"grid\",\"quantity\":8,\"itemsPerRow\":4}} />",
|
|
1891
|
+
" */",
|
|
1162
1892
|
"interface ListDatasetProps extends Sb.BaseProps {",
|
|
1163
1893
|
" collectionIds?: Sb.Json[];",
|
|
1894
|
+
" /** Filters · format: true or false */",
|
|
1164
1895
|
" filterable?: boolean;",
|
|
1165
|
-
" /** default: \"Load more\" */",
|
|
1896
|
+
" /** Button text · default: \"Load more\" · e.g. \"Load more\" */",
|
|
1166
1897
|
" loadMoreLabel?: string;",
|
|
1898
|
+
" /** Search box · format: true or false */",
|
|
1167
1899
|
" searchable?: boolean;",
|
|
1168
1900
|
" [special: string]: unknown;",
|
|
1169
1901
|
"}",
|
|
1170
1902
|
"declare function ListDataset(props: ListDatasetProps): JSX.Element;",
|
|
1171
1903
|
"",
|
|
1172
|
-
"/**
|
|
1904
|
+
"/**",
|
|
1905
|
+
" * Empty state (basic) — type \"list-empty\"",
|
|
1906
|
+
" *",
|
|
1907
|
+
" * The EMPTY STATE of a store surface: the container rendered in place of the real content when there is none — a list whose feed has no records, a cart with no lines, a product card with no product. An icon, a headline, a line of guidance, and optionally a button back to something that does have content.",
|
|
1908
|
+
" *",
|
|
1909
|
+
" * Use when: a listing has to say something when the store has no products, articles or collections yet; a collection page can legitimately resolve to nothing and should not render blank; a cart, or a single product card, has to say what is missing instead of showing ghost content.",
|
|
1910
|
+
" * Avoid when: as a standalone block: this element only renders through the surface that owns it, which creates it; to hold the card design — that is the list template, repeated once per record.",
|
|
1911
|
+
" */",
|
|
1173
1912
|
"interface ListEmptyProps extends Sb.BaseProps {",
|
|
1174
1913
|
" [special: string]: unknown;",
|
|
1175
1914
|
"}",
|
|
1176
1915
|
"declare function ListEmpty(props: ListEmptyProps): JSX.Element;",
|
|
1177
1916
|
"",
|
|
1178
|
-
"/**
|
|
1917
|
+
"/**",
|
|
1918
|
+
" * List item (basic) — type \"list-item\"",
|
|
1919
|
+
" *",
|
|
1920
|
+
" * A single row inside a list: a marker icon followed by a short line of text. Only valid as a direct child of the list element.",
|
|
1921
|
+
" *",
|
|
1922
|
+
" * Use when: As a child of `list` — one row per point (feature, benefit, step); When each row needs its own marker icon (check, star, dot).",
|
|
1923
|
+
" * Avoid when: Outside a list container — it cannot stand alone; For long paragraphs — use text instead and keep rows to one line.",
|
|
1924
|
+
" *",
|
|
1925
|
+
" * Holds no children.",
|
|
1926
|
+
" * Goes inside <List>.",
|
|
1927
|
+
" */",
|
|
1179
1928
|
"interface ListItemProps extends Sb.BaseProps {",
|
|
1180
1929
|
" /** default: \"StarFill\" */",
|
|
1181
1930
|
" icon?: string;",
|
|
@@ -1185,57 +1934,112 @@ export const ENV_DTS = [
|
|
|
1185
1934
|
"}",
|
|
1186
1935
|
"declare function ListItem(props: ListItemProps): JSX.Element;",
|
|
1187
1936
|
"",
|
|
1188
|
-
"/**
|
|
1937
|
+
"/**",
|
|
1938
|
+
" * Loading state (basic) — type \"list-loading\"",
|
|
1939
|
+
" *",
|
|
1940
|
+
" * The LOADING STATE of a store listing: the container shown while the list is waiting for its records, in place of the built-in card skeleton. A mark, a short line, or a spinner — whatever the site uses to say \"working\". Optional: a list without one shows a silhouette of its own cards instead.",
|
|
1941
|
+
" *",
|
|
1942
|
+
" * Use when: a site wants its own branded waiting state instead of the default grey card skeleton; a listing that is filtered by shoppers should say something while the filtered set arrives.",
|
|
1943
|
+
" * Avoid when: as a standalone block: this element only renders through the list that owns it, which creates it; as the empty state — \"no products yet\" is a different surface (list-empty) and a different message; when the default skeleton is fine, which it is for most sites: it holds the exact space the rows will take, so nothing on the page moves when they arrive.",
|
|
1944
|
+
" */",
|
|
1189
1945
|
"interface ListLoadingProps extends Sb.BaseProps {",
|
|
1190
1946
|
" [special: string]: unknown;",
|
|
1191
1947
|
"}",
|
|
1192
1948
|
"declare function ListLoading(props: ListLoadingProps): JSX.Element;",
|
|
1193
1949
|
"",
|
|
1194
|
-
"/**
|
|
1950
|
+
"/**",
|
|
1951
|
+
" * Language Switcher (basic) — type \"locale-switcher\"",
|
|
1952
|
+
" *",
|
|
1953
|
+
" * A storefront language switcher — a row of language links the shopper uses to read the page in another of the store’s published languages.",
|
|
1954
|
+
" *",
|
|
1955
|
+
" * Use when: When a store publishes in more than one language and shoppers need a visible way to switch; In a header or footer, beside the currency switcher, on every page of a multilingual store.",
|
|
1956
|
+
" * Avoid when: When the store publishes a single language — the switcher would be inert; For switching the EDITOR’s language — this is the shopper-facing control.",
|
|
1957
|
+
" *",
|
|
1958
|
+
" * Holds no children.",
|
|
1959
|
+
" */",
|
|
1195
1960
|
"interface LocaleSwitcherProps extends Sb.BaseProps {",
|
|
1196
|
-
" /** default: \"code\" */",
|
|
1961
|
+
" /** Label · default: \"code\" */",
|
|
1197
1962
|
" labelMode?: string;",
|
|
1198
|
-
" /** default: \"Language\" */",
|
|
1963
|
+
" /** Panel title · default: \"Language\" */",
|
|
1199
1964
|
" panelTitle?: string;",
|
|
1200
1965
|
" /** default: \"\" */",
|
|
1201
1966
|
" payload?: string;",
|
|
1202
|
-
" /** default: false */",
|
|
1967
|
+
" /** Flag · format: true or false · default: false */",
|
|
1203
1968
|
" showFlag?: boolean;",
|
|
1204
|
-
" /** default: \"inline\" */",
|
|
1969
|
+
" /** Style · default: \"inline\" */",
|
|
1205
1970
|
" variant?: string;",
|
|
1206
1971
|
" [special: string]: unknown;",
|
|
1207
1972
|
"}",
|
|
1208
1973
|
"declare function LocaleSwitcher(props: LocaleSwitcherProps): JSX.Element;",
|
|
1209
1974
|
"",
|
|
1210
|
-
"/**
|
|
1975
|
+
"/**",
|
|
1976
|
+
" * Product media (media) — type \"media-dataset\"",
|
|
1977
|
+
" *",
|
|
1978
|
+
" * A product media gallery. Renders a large feature image plus a strip of thumbnails synthesized from config.images[], positioned by config.layout (\"bottom\" | \"top\" | \"left\" | \"right\" | \"single\" | \"grid\" | \"grid-2\" — \"single\" hides the thumbnail strip, \"grid\"/\"grid-2\" lay out every image as equal cells instead of a feature+strip split). Clicking a thumbnail swaps the feature image on published pages. Pin which product feeds it via config.productId; once pinned (or placed under a product page) it binds to that product's live image + gallery, falling back to the seeded config.images when unbound. Owns no children.",
|
|
1979
|
+
" *",
|
|
1980
|
+
" * Use when: Product page gallery with a main image and selectable thumbnails; Any place a product needs a multi-image viewer; A media block where shoppers switch between product photos.",
|
|
1981
|
+
" * Avoid when: A single image — use image or product image; A before/after comparison — use image comparison; A decorative collection banner — use collection media.",
|
|
1982
|
+
" *",
|
|
1983
|
+
" * Children: ONLY <ProductImageFeature>, <ProductImageList> — push refuses any other child.",
|
|
1984
|
+
" *",
|
|
1985
|
+
" * @example",
|
|
1986
|
+
" * <MediaDataset config={{\"images\":[{\"src\":\"\",\"alt\":\"\"},{\"src\":\"\",\"alt\":\"\"},{\"src\":\"\",\"alt\":\"\"}],\"layout\":\"bottom\",\"activeIndex\":0}} />",
|
|
1987
|
+
" */",
|
|
1211
1988
|
"interface MediaDatasetProps extends Sb.BaseProps {",
|
|
1212
1989
|
" [special: string]: unknown;",
|
|
1213
1990
|
"}",
|
|
1214
1991
|
"declare function MediaDataset(props: MediaDatasetProps): JSX.Element;",
|
|
1215
1992
|
"",
|
|
1216
|
-
"/**
|
|
1993
|
+
"/**",
|
|
1994
|
+
" * Member Field (advanced) — type \"member-field\"",
|
|
1995
|
+
" *",
|
|
1996
|
+
" * An inline span carrying one of the signed-in shopper's own values — name, email or phone — with author-owned wording around it and a separate line for visitors who are not signed in. Hydrated client-side from the shopper session, never queried at render time.",
|
|
1997
|
+
" *",
|
|
1998
|
+
" * Use when: A greeting in the header or on the account page: \"Xin chào, {name}\"; Showing which email an order confirmation will be sent to; Any sentence that needs the shopper's own value INSIDE the line rather than as a card.",
|
|
1999
|
+
" * Avoid when: You want the whole profile block — account-info renders name, email and phone together; You want to EDIT the value: this only displays it; The value must be hidden from guests entirely — wrap it in a member-gate set to Members, or leave the signed-out text empty.",
|
|
2000
|
+
" *",
|
|
2001
|
+
" * Holds no children.",
|
|
2002
|
+
" */",
|
|
1217
2003
|
"interface MemberFieldProps extends Sb.BaseProps {",
|
|
1218
|
-
" /** default: \"name\" */",
|
|
2004
|
+
" /** Field · default: \"name\" */",
|
|
1219
2005
|
" field?: string;",
|
|
1220
|
-
" /** default: \"Quý khách\" */",
|
|
2006
|
+
" /** Signed-out text · default: \"Quý khách\" */",
|
|
1221
2007
|
" guestText?: string;",
|
|
1222
|
-
" /** default: \"\" */",
|
|
2008
|
+
" /** Text before · default: \"\" */",
|
|
1223
2009
|
" prefix?: string;",
|
|
1224
|
-
" /** default: \"\" */",
|
|
2010
|
+
" /** Text after · default: \"\" */",
|
|
1225
2011
|
" suffix?: string;",
|
|
1226
2012
|
" [special: string]: unknown;",
|
|
1227
2013
|
"}",
|
|
1228
2014
|
"declare function MemberField(props: MemberFieldProps): JSX.Element;",
|
|
1229
2015
|
"",
|
|
1230
|
-
"/**
|
|
2016
|
+
"/**",
|
|
2017
|
+
" * Member Block (advanced) — type \"member-gate\"",
|
|
2018
|
+
" *",
|
|
2019
|
+
" * A container whose children render for ONE audience only: signed-in members, or anonymous guests. The choice is the `audience` special; visibility is resolved client-side from the shopper session, so the page HTML stays static and cacheable.",
|
|
2020
|
+
" *",
|
|
2021
|
+
" * Use when: A header needs \"Đăng nhập / Đăng ký\" for guests and \"Xin chào … / Đăng xuất\" for members; A block of the page — member pricing, a loyalty note, a members-only download — should only appear once the shopper is signed in; A promo urging registration should disappear for people who already registered.",
|
|
2022
|
+
" * Avoid when: The content must be SECRET. The children ship in the page source for anyone who opens it — this hides them, it does not withhold them. Flag the whole PAGE as members-only instead: an anonymous visitor is redirected before any HTML is written; The whole page is for members anyway — the page-level flag is one setting instead of a wrapper around everything; You only need the shopper name/email/phone as text — member-field is the inline element for that, and it carries its own signed-out wording.",
|
|
2023
|
+
" */",
|
|
1231
2024
|
"interface MemberGateProps extends Sb.BaseProps {",
|
|
1232
|
-
" /** default: \"members\" */",
|
|
2025
|
+
" /** Show to · default: \"members\" */",
|
|
1233
2026
|
" audience?: string;",
|
|
1234
2027
|
" [special: string]: unknown;",
|
|
1235
2028
|
"}",
|
|
1236
2029
|
"declare function MemberGate(props: MemberGateProps): JSX.Element;",
|
|
1237
2030
|
"",
|
|
1238
|
-
"/**
|
|
2031
|
+
"/**",
|
|
2032
|
+
" * Menu (basic) — type \"menu\"",
|
|
2033
|
+
" *",
|
|
2034
|
+
" * A site navigation menu — an ordered row (or column) of links rendered from a reusable site-level menu (\"Main menu\", \"Footer menu\"), laid out horizontally in headers and vertically in footers, sidebars and drawers.",
|
|
2035
|
+
" *",
|
|
2036
|
+
" * Use when: a header needs primary navigation links; a footer needs a link column; the same set of links must repeat across pages and stay in sync.",
|
|
2037
|
+
" * Avoid when: a single standalone link is enough (use a button); the links are one-off body content rather than site navigation (use text or list).",
|
|
2038
|
+
" *",
|
|
2039
|
+
" * Holds no children.",
|
|
2040
|
+
" * Not a child: its <MenuItem> sits in `export const detached`, linked by config.menuItemId.",
|
|
2041
|
+
" * Not a child: its <MenuDropdown> sits in `export const detached`, linked by config.menuDropdownId.",
|
|
2042
|
+
" */",
|
|
1239
2043
|
"interface MenuProps extends Sb.BaseProps {",
|
|
1240
2044
|
" /** default: \"\" */",
|
|
1241
2045
|
" menuId?: string;",
|
|
@@ -1244,169 +2048,304 @@ export const ENV_DTS = [
|
|
|
1244
2048
|
"}",
|
|
1245
2049
|
"declare function Menu(props: MenuProps): JSX.Element;",
|
|
1246
2050
|
"",
|
|
1247
|
-
"/**
|
|
2051
|
+
"/**",
|
|
2052
|
+
" * Menu drawer (basic) — type \"menu-drawer\"",
|
|
2053
|
+
" *",
|
|
2054
|
+
" * The off-canvas panel an icon menu opens: a droppable container that slides in from one edge of the viewport, holding a site's mobile navigation (a logo row, a vertical menu, a close control, any section).",
|
|
2055
|
+
" *",
|
|
2056
|
+
" * Use when: building the contents of an icon menu (hamburger) drawer; a mobile header needs navigation that slides in rather than sitting in the bar.",
|
|
2057
|
+
" * Avoid when: outside an icon menu: this element only renders as that element’s panel; a dropdown under a menu entry is wanted — that is menu-panel, anchored to its entry.",
|
|
2058
|
+
" */",
|
|
1248
2059
|
"interface MenuDrawerProps extends Sb.BaseProps {",
|
|
1249
2060
|
" [special: string]: unknown;",
|
|
1250
2061
|
"}",
|
|
1251
2062
|
"declare function MenuDrawer(props: MenuDrawerProps): JSX.Element;",
|
|
1252
2063
|
"",
|
|
1253
|
-
"/**
|
|
2064
|
+
"/**",
|
|
2065
|
+
" * Dropdown menu (basic) — type \"menu-dropdown\"",
|
|
2066
|
+
" *",
|
|
2067
|
+
" * A menu's shared submenu surface — one satellite node whose background, padding and shape paint every dropdown panel the menu opens (style it once, every submenu follows). It is not an individual panel.",
|
|
2068
|
+
" *",
|
|
2069
|
+
" * Use when: restyling how all dropdown panels of a menu look (background, padding, border, shadow); adjusting the spacing between submenu links.",
|
|
2070
|
+
" * Avoid when: adding or editing the submenu entries themselves (edit the menu in Manage menu instead); building standalone page content that merely looks like a panel (use a block).",
|
|
2071
|
+
" *",
|
|
2072
|
+
" * Holds no children.",
|
|
2073
|
+
" */",
|
|
1254
2074
|
"interface MenuDropdownProps extends Sb.BaseProps {",
|
|
1255
2075
|
" [special: string]: unknown;",
|
|
1256
2076
|
"}",
|
|
1257
2077
|
"declare function MenuDropdown(props: MenuDropdownProps): JSX.Element;",
|
|
1258
2078
|
"",
|
|
1259
|
-
"/**
|
|
2079
|
+
"/**",
|
|
2080
|
+
" * Menu item (basic) — type \"menu-item\"",
|
|
2081
|
+
" *",
|
|
2082
|
+
" * A menu's shared link skin — one satellite node whose typography, colors and states paint every link of its menu identically (style it once, every item follows). It is not an individual link.",
|
|
2083
|
+
" *",
|
|
2084
|
+
" * Use when: restyling how all links of a menu look (color, font, hover state); giving menu links a hover color or background.",
|
|
2085
|
+
" * Avoid when: adding or renaming individual menu entries (edit the menu in Manage menu instead); a standalone call-to-action link (use a button).",
|
|
2086
|
+
" *",
|
|
2087
|
+
" * Holds no children.",
|
|
2088
|
+
" */",
|
|
1260
2089
|
"interface MenuItemProps extends Sb.BaseProps {",
|
|
1261
2090
|
" [special: string]: unknown;",
|
|
1262
2091
|
"}",
|
|
1263
2092
|
"declare function MenuItem(props: MenuItemProps): JSX.Element;",
|
|
1264
2093
|
"",
|
|
1265
|
-
"/**
|
|
2094
|
+
"/**",
|
|
2095
|
+
" * Dropdown panel (basic) — type \"menu-panel\"",
|
|
2096
|
+
" *",
|
|
2097
|
+
" * A free-form mega-menu panel behind one navigation menu entry: a full-width container that replaces the plain link list of a dropdown with arbitrary content (link columns, images, product cards).",
|
|
2098
|
+
" *",
|
|
2099
|
+
" * Use when: a menu entry should open a rich mega-menu instead of a plain link list; a dropdown needs multi-column links, imagery, or promoted products.",
|
|
2100
|
+
" * Avoid when: a plain list of links is enough — menu rows render those without a panel; outside a menu: this element only renders inside its owning menu entry.",
|
|
2101
|
+
" */",
|
|
1266
2102
|
"interface MenuPanelProps extends Sb.BaseProps {",
|
|
1267
2103
|
" [special: string]: unknown;",
|
|
1268
2104
|
"}",
|
|
1269
2105
|
"declare function MenuPanel(props: MenuPanelProps): JSX.Element;",
|
|
1270
2106
|
"",
|
|
1271
|
-
"/**
|
|
2107
|
+
"/**",
|
|
2108
|
+
" * My Courses (advanced) — type \"my-courses\"",
|
|
2109
|
+
" *",
|
|
2110
|
+
" * The student's own course shelf for the Khoá học app: every course this signed-in customer holds, each with its cover, how many lessons they have finished, a progress bar, when their access runs out, and one button that opens the next lesson they have not done. Its feed is the SESSION, so it needs no course to be chosen — one shelf serves every student.",
|
|
2111
|
+
" *",
|
|
2112
|
+
" * Use when: Building the customer account area of a site that sells courses — this is the \"My Learning\" page every course platform opens onto.; A student holds more than one course and needs somewhere to choose between them; the player only ever shows one.; Somewhere to land a student after they buy, or after they log in..",
|
|
2113
|
+
" * Avoid when: On a sales page. It shows nothing to a visitor who has not bought, so a shopper meets an empty shelf where the argument for buying should be — use the course syllabus there.; To list the catalogue. This is what the reader OWNS, not what is for sale; a store list of courses is a list-dataset with the course source.; Next to the player on the learning page, where the two compete for the same decision..",
|
|
2114
|
+
" *",
|
|
2115
|
+
" * Holds no children.",
|
|
2116
|
+
" */",
|
|
1272
2117
|
"interface MyCoursesProps extends Sb.BaseProps {",
|
|
1273
|
-
" /** default: \"Tiếp tục học\" */",
|
|
2118
|
+
" /** Continue button · default: \"Tiếp tục học\" */",
|
|
1274
2119
|
" continueText?: string;",
|
|
1275
|
-
" /** default: \"Bạn chưa có khoá học nào.\" */",
|
|
2120
|
+
" /** No-lessons text · default: \"Bạn chưa có khoá học nào.\" */",
|
|
1276
2121
|
" emptyText?: string;",
|
|
1277
|
-
" /** default: \"/learn\" */",
|
|
2122
|
+
" /** Learning page · default: \"/learn\" */",
|
|
1278
2123
|
" learnHref?: string;",
|
|
1279
|
-
" /** default: \"Đăng nhập để xem khoá học của bạn.\" */",
|
|
2124
|
+
" /** Signed-out text · default: \"Đăng nhập để xem khoá học của bạn.\" */",
|
|
1280
2125
|
" signedOutText?: string;",
|
|
1281
2126
|
" [special: string]: unknown;",
|
|
1282
2127
|
"}",
|
|
1283
2128
|
"declare function MyCourses(props: MyCoursesProps): JSX.Element;",
|
|
1284
2129
|
"",
|
|
1285
|
-
"/**
|
|
2130
|
+
"/**",
|
|
2131
|
+
" * My tickets (advanced) — type \"my-tickets\"",
|
|
2132
|
+
" *",
|
|
2133
|
+
" * The signed-in shopper's own event tickets — one row per ticket with the event, session, ticket type, a used/cancelled badge and an Open ticket link to the QR ticket page. A signed-out visitor sees a sign-in prompt instead.",
|
|
2134
|
+
" *",
|
|
2135
|
+
" * Use when: An account page should let a member find the tickets they bought without digging through email; The store sells event tickets (Tickets app) and buyers sign in to shop.",
|
|
2136
|
+
" * Avoid when: The store sells no tickets — the element renders an honest empty list but has nothing to show; The page is public and anonymous — tickets are per-customer, a visitor only sees the sign-in prompt.",
|
|
2137
|
+
" *",
|
|
2138
|
+
" * Holds no children.",
|
|
2139
|
+
" *",
|
|
2140
|
+
" * @example",
|
|
2141
|
+
" * <MyTickets />",
|
|
2142
|
+
" */",
|
|
1286
2143
|
"interface MyTicketsProps extends Sb.BaseProps {",
|
|
1287
|
-
" /** default: \"Mở vé\" */",
|
|
2144
|
+
" /** Button text · default: \"Mở vé\" · e.g. \"Open ticket\" */",
|
|
1288
2145
|
" buttonLabel?: string;",
|
|
1289
|
-
" /** default: \"Bạn chưa có vé nào.\" */",
|
|
2146
|
+
" /** Empty text · default: \"Bạn chưa có vé nào.\" · e.g. \"You don't have any tickets yet.\" */",
|
|
1290
2147
|
" emptyText?: string;",
|
|
1291
|
-
" /** default: \"Không tải được vé của bạn.\" */",
|
|
2148
|
+
" /** Load failed · default: \"Không tải được vé của bạn.\" */",
|
|
1292
2149
|
" loadFailedText?: string;",
|
|
1293
|
-
" /** default: \"Đăng nhập để xem vé của bạn\" */",
|
|
2150
|
+
" /** Signed-out prompt · default: \"Đăng nhập để xem vé của bạn\" · e.g. \"Sign in to see your tickets\" */",
|
|
1294
2151
|
" signedOutText?: string;",
|
|
1295
|
-
" /** default: \"Vé của tôi\" */",
|
|
2152
|
+
" /** Section title · default: \"Vé của tôi\" · e.g. \"My tickets\" */",
|
|
1296
2153
|
" title?: string;",
|
|
1297
|
-
" /** default: \"Đã dùng\" */",
|
|
2154
|
+
" /** Used · default: \"Đã dùng\" */",
|
|
1298
2155
|
" usedText?: string;",
|
|
1299
|
-
" /** default: \"Đã hủy\" */",
|
|
2156
|
+
" /** Cancelled · default: \"Đã hủy\" */",
|
|
1300
2157
|
" voidText?: string;",
|
|
1301
2158
|
" [special: string]: unknown;",
|
|
1302
2159
|
"}",
|
|
1303
2160
|
"declare function MyTickets(props: MyTicketsProps): JSX.Element;",
|
|
1304
2161
|
"",
|
|
1305
|
-
"/**
|
|
2162
|
+
"/**",
|
|
2163
|
+
" * My vouchers (advanced) — type \"my-vouchers\"",
|
|
2164
|
+
" *",
|
|
2165
|
+
" * The signed-in shopper's own voucher wallet — every discount code that is theirs, whether a merchant assigned it directly or it was minted by redeeming loyalty points, each showing its live usable / used / expired state. A signed-out visitor sees a sign-in prompt instead; a card cannot be tapped once it is used or expired.",
|
|
2166
|
+
" *",
|
|
2167
|
+
" * Use when: An account or rewards page should list the vouchers a member has been GIVEN — never the shop's public codes (voucher-list is that element); The shop grants member-only codes (through the merchant discount panel or by redeeming loyalty points) and members need a place to find and use them.",
|
|
2168
|
+
" * Avoid when: The page should show every code the shop currently publishes — that is voucher-list, an anonymous element with no signed-in state at all; The store has no member-bound discounts or loyalty program — this element renders an honest empty wallet, but it has nothing to show.",
|
|
2169
|
+
" *",
|
|
2170
|
+
" * Holds no children.",
|
|
2171
|
+
" *",
|
|
2172
|
+
" * @example",
|
|
2173
|
+
" * <MyVouchers />",
|
|
2174
|
+
" */",
|
|
1306
2175
|
"interface MyVouchersProps extends Sb.BaseProps {",
|
|
1307
|
-
" /** default: \"Áp dụng\" */",
|
|
2176
|
+
" /** Button text · default: \"Áp dụng\" · e.g. \"Apply\" */",
|
|
1308
2177
|
" buttonLabel?: string;",
|
|
1309
|
-
" /** default: \"Đã sao chép mã!\" */",
|
|
2178
|
+
" /** Copied · default: \"Đã sao chép mã!\" · e.g. \"Code copied!\" */",
|
|
1310
2179
|
" copiedText?: string;",
|
|
1311
|
-
" /** default: \"Bạn chưa có voucher nào.\" */",
|
|
2180
|
+
" /** Empty text · default: \"Bạn chưa có voucher nào.\" · e.g. \"You don't have any vouchers yet.\" */",
|
|
1312
2181
|
" emptyText?: string;",
|
|
1313
|
-
" /** default: \"Đã hết hạn\" */",
|
|
2182
|
+
" /** Expired · default: \"Đã hết hạn\" · e.g. \"Expired\" */",
|
|
1314
2183
|
" expiredText?: string;",
|
|
1315
|
-
" /** default: \"Không thể sao chép mã, vui lòng thử lại.\" */",
|
|
2184
|
+
" /** Copy failed · default: \"Không thể sao chép mã, vui lòng thử lại.\" · e.g. \"Couldn't copy — please try again.\" */",
|
|
1316
2185
|
" failedText?: string;",
|
|
1317
|
-
" /** default: \"Không tải được voucher của bạn.\" */",
|
|
2186
|
+
" /** Load failed · default: \"Không tải được voucher của bạn.\" · e.g. \"Couldn't load your vouchers.\" */",
|
|
1318
2187
|
" loadFailedText?: string;",
|
|
1319
|
-
" /** default: \"Đăng nhập để xem voucher của bạn\" */",
|
|
2188
|
+
" /** Signed-out prompt · default: \"Đăng nhập để xem voucher của bạn\" · e.g. \"Sign in to see your vouchers\" */",
|
|
1320
2189
|
" signedOutText?: string;",
|
|
1321
|
-
" /** default: \"Voucher của tôi\" */",
|
|
2190
|
+
" /** Section title · default: \"Voucher của tôi\" · e.g. \"My vouchers\" */",
|
|
1322
2191
|
" title?: string;",
|
|
1323
|
-
" /** default: \"Đã dùng\" */",
|
|
2192
|
+
" /** Used · default: \"Đã dùng\" · e.g. \"Used\" */",
|
|
1324
2193
|
" usedText?: string;",
|
|
1325
2194
|
" [special: string]: unknown;",
|
|
1326
2195
|
"}",
|
|
1327
2196
|
"declare function MyVouchers(props: MyVouchersProps): JSX.Element;",
|
|
1328
2197
|
"",
|
|
1329
|
-
"/**
|
|
2198
|
+
"/**",
|
|
2199
|
+
" * Order History (advanced) — type \"order-history\"",
|
|
2200
|
+
" *",
|
|
2201
|
+
" * A signed-in shopper order-history list: a loading skeleton by default, a signed-out prompt for anonymous visitors, an empty state with no orders, or up to a capped count of the shopper's own past orders (number, date, status, total) — all hydrated client-side, never queried at render time.",
|
|
2202
|
+
" *",
|
|
2203
|
+
" * Use when: On an /account page so a signed-in shopper can review their past orders; Beside account-info, as the orders half of an account dashboard.",
|
|
2204
|
+
" * Avoid when: To show ANY other customer's orders, or a storefront-wide order feed — this is always the SIGNED-IN shopper's own history; As an order MANAGEMENT surface — there is no edit/cancel action here, only a read.",
|
|
2205
|
+
" *",
|
|
2206
|
+
" * Holds no children.",
|
|
2207
|
+
" */",
|
|
1330
2208
|
"interface OrderHistoryProps extends Sb.BaseProps {",
|
|
1331
|
-
" /** default: \"Chưa có đơn hàng nào.\" */",
|
|
2209
|
+
" /** Empty message · default: \"Chưa có đơn hàng nào.\" */",
|
|
1332
2210
|
" emptyText?: string;",
|
|
1333
|
-
" /** default: \"Tra cứu\" */",
|
|
2211
|
+
" /** Lookup button · default: \"Tra cứu\" */",
|
|
1334
2212
|
" lookupButtonText?: string;",
|
|
1335
|
-
" /** default: \"Số điện thoại hoặc email\" */",
|
|
2213
|
+
" /** Phone or email box · default: \"Số điện thoại hoặc email\" */",
|
|
1336
2214
|
" lookupContactPlaceholder?: string;",
|
|
1337
|
-
" /** default: true */",
|
|
2215
|
+
" /** Order lookup · format: true or false · default: true */",
|
|
1338
2216
|
" lookupEnabled?: boolean;",
|
|
1339
|
-
" /** default: \"Mã đơn hàng (VD: #1001)\" */",
|
|
2217
|
+
" /** Order number box · default: \"Mã đơn hàng (VD: #1001)\" */",
|
|
1340
2218
|
" lookupNumberPlaceholder?: string;",
|
|
1341
|
-
" /** default: \"Đăng nhập để xem đơn hàng của bạn\" */",
|
|
2219
|
+
" /** Signed-out prompt · default: \"Đăng nhập để xem đơn hàng của bạn\" */",
|
|
1342
2220
|
" signedOutText?: string;",
|
|
1343
|
-
" /** default: \"Đơn hàng của bạn\" */",
|
|
2221
|
+
" /** Section title · default: \"Đơn hàng của bạn\" */",
|
|
1344
2222
|
" title?: string;",
|
|
1345
2223
|
" [special: string]: unknown;",
|
|
1346
2224
|
"}",
|
|
1347
2225
|
"declare function OrderHistory(props: OrderHistoryProps): JSX.Element;",
|
|
1348
2226
|
"",
|
|
1349
|
-
"/**
|
|
2227
|
+
"/**",
|
|
2228
|
+
" * Order receipt (advanced) — type \"order-receipt\"",
|
|
2229
|
+
" *",
|
|
2230
|
+
" * Shows the order a shopper has just paid for on a checkout completion page: order number, date, status, the items, the total, and anything still owed. Reads one order through the signed receipt grant the payment return endpoint puts in the completion URL, so it works for a guest who has no account.",
|
|
2231
|
+
" *",
|
|
2232
|
+
" * Use when: Building the checkout completion page a shopper lands on after paying at a gateway.; The store takes card or wallet payments and wants the buyer to see what they bought without signing in.; Pairing with payment-status, which reports the MONEY; this reports the ORDER..",
|
|
2233
|
+
" * Avoid when: On any page other than the completion page — every other page is reached without the signed grant, so the block hides itself and renders nothing.; As an order history list: this shows exactly one order. Use order-history for a signed-in shopper’s past orders.; To show a home address or per-line prices — the receipt read is deliberately reduced and carries neither..",
|
|
2234
|
+
" *",
|
|
2235
|
+
" * Holds no children.",
|
|
2236
|
+
" */",
|
|
1350
2237
|
"interface OrderReceiptProps extends Sb.BaseProps {",
|
|
1351
|
-
" /** default: \"Còn phải trả\" */",
|
|
2238
|
+
" /** Outstanding · default: \"Còn phải trả\" */",
|
|
1352
2239
|
" dueLabel?: string;",
|
|
1353
|
-
" /** default: \"Sản phẩm\" */",
|
|
2240
|
+
" /** Items · default: \"Sản phẩm\" */",
|
|
1354
2241
|
" itemsLabel?: string;",
|
|
1355
|
-
" /** default: \"Mã đơn hàng\" */",
|
|
2242
|
+
" /** Order number · default: \"Mã đơn hàng\" */",
|
|
1356
2243
|
" numberLabel?: string;",
|
|
1357
|
-
" /** default: \"Ngày đặt\" */",
|
|
2244
|
+
" /** Date · default: \"Ngày đặt\" */",
|
|
1358
2245
|
" placedLabel?: string;",
|
|
1359
|
-
" /** default: \"Trạng thái\" */",
|
|
2246
|
+
" /** Status · default: \"Trạng thái\" */",
|
|
1360
2247
|
" statusLabel?: string;",
|
|
1361
|
-
" /** default: \"Chi tiết đơn hàng\" */",
|
|
2248
|
+
" /** Section title · default: \"Chi tiết đơn hàng\" */",
|
|
1362
2249
|
" title?: string;",
|
|
1363
|
-
" /** default: \"Tổng cộng\" */",
|
|
2250
|
+
" /** Total · default: \"Tổng cộng\" */",
|
|
1364
2251
|
" totalLabel?: string;",
|
|
1365
|
-
" /** default: \"Không tải được chi tiết đơn hàng. Bạn có thể tra cứu bằng mã đơn hàng trong trang tài khoản.\" */",
|
|
2252
|
+
" /** Message · default: \"Không tải được chi tiết đơn hàng. Bạn có thể tra cứu bằng mã đơn hàng trong trang tài khoản.\" */",
|
|
1366
2253
|
" unavailableText?: string;",
|
|
1367
2254
|
" [special: string]: unknown;",
|
|
1368
2255
|
"}",
|
|
1369
2256
|
"declare function OrderReceipt(props: OrderReceiptProps): JSX.Element;",
|
|
1370
2257
|
"",
|
|
1371
|
-
"/**
|
|
2258
|
+
"/**",
|
|
2259
|
+
" * Payment status (advanced) — type \"payment-status\"",
|
|
2260
|
+
" *",
|
|
2261
|
+
" * The payment result on a checkout completion page: three author-written messages — paid, pending, failed — of which the shopper sees exactly one, chosen client-side from the `status` this platform wrote into the return URL after verifying the gateway signature. Also shows the transaction reference, and a retry link when a payment did not go through.",
|
|
2262
|
+
" *",
|
|
2263
|
+
" * Use when: On the checkout completion page (/checkout/complete), where a shopper lands after paying; Anywhere a shopper returns from a payment gateway and needs to know whether the money moved.",
|
|
2264
|
+
" * Avoid when: As the order confirmation itself — the order number, items and totals belong to the order elements; this block reports the PAYMENT only; On a page a shopper reaches without paying (a product or cart page): with no status in the URL the block hides itself and occupies no space; To show a merchant-facing payment log — that is Manage ▸ Apps ▸ Payments ▸ Transactions.",
|
|
2265
|
+
" *",
|
|
2266
|
+
" * Holds no children.",
|
|
2267
|
+
" */",
|
|
1372
2268
|
"interface PaymentStatusProps extends Sb.BaseProps {",
|
|
1373
|
-
" /** default: \"Giao dịch không thành công hoặc đã bị hủy. Bạn có thể thử lại.\" */",
|
|
2269
|
+
" /** Message · default: \"Giao dịch không thành công hoặc đã bị hủy. Bạn có thể thử lại.\" */",
|
|
1374
2270
|
" failedText?: string;",
|
|
1375
|
-
" /** default: \"Thanh toán chưa hoàn tất\" */",
|
|
2271
|
+
" /** Title · default: \"Thanh toán chưa hoàn tất\" */",
|
|
1376
2272
|
" failedTitle?: string;",
|
|
1377
|
-
" /** default: \"Cảm ơn bạn! Chúng tôi đã nhận được thanh toán và đang xử lý đơn hàng.\" */",
|
|
2273
|
+
" /** Message · default: \"Cảm ơn bạn! Chúng tôi đã nhận được thanh toán và đang xử lý đơn hàng.\" */",
|
|
1378
2274
|
" paidText?: string;",
|
|
1379
|
-
" /** default: \"Thanh toán thành công\" */",
|
|
2275
|
+
" /** Title · default: \"Thanh toán thành công\" */",
|
|
1380
2276
|
" paidTitle?: string;",
|
|
1381
|
-
" /** default: \"Chúng tôi chưa nhận được xác nhận từ cổng thanh toán. Đơn hàng sẽ được cập nhật ngay khi có kết quả.\" */",
|
|
2277
|
+
" /** Message · default: \"Chúng tôi chưa nhận được xác nhận từ cổng thanh toán. Đơn hàng sẽ được cập nhật ngay khi có kết quả.\" */",
|
|
1382
2278
|
" pendingText?: string;",
|
|
1383
|
-
" /** default: \"Đang chờ xác nhận\" */",
|
|
2279
|
+
" /** Title · default: \"Đang chờ xác nhận\" */",
|
|
1384
2280
|
" pendingTitle?: string;",
|
|
1385
|
-
" /** default: \"Mã giao dịch\" */",
|
|
2281
|
+
" /** Label · default: \"Mã giao dịch\" */",
|
|
1386
2282
|
" referenceLabel?: string;",
|
|
1387
|
-
" /** default: \"Thử lại\" */",
|
|
2283
|
+
" /** Retry button · default: \"Thử lại\" */",
|
|
1388
2284
|
" retryLabel?: string;",
|
|
1389
2285
|
" [special: string]: unknown;",
|
|
1390
2286
|
"}",
|
|
1391
2287
|
"declare function PaymentStatus(props: PaymentStatusProps): JSX.Element;",
|
|
1392
2288
|
"",
|
|
1393
|
-
"/**
|
|
2289
|
+
"/**",
|
|
2290
|
+
" * Points (advanced) — type \"points-card\"",
|
|
2291
|
+
" *",
|
|
2292
|
+
" * The signed-in shopper's loyalty points: their balance, a redeem form that converts points into a single-use discount code, and the recent points history. Requires the Loyalty app installed and the points program enabled; hydrated client-side.",
|
|
2293
|
+
" *",
|
|
2294
|
+
" * Use when: On the /account page, beside account info and order history; Anywhere a shopper should see and spend the points the store grants per delivered order.",
|
|
2295
|
+
" * Avoid when: On stores without the Loyalty app — the card hides itself when the program is off, so it would render nothing; To show a PRODUCT price or discount — points are the account currency, not the cart.",
|
|
2296
|
+
" *",
|
|
2297
|
+
" * Holds no children.",
|
|
2298
|
+
" */",
|
|
1394
2299
|
"interface PointsCardProps extends Sb.BaseProps {",
|
|
1395
|
-
" /** default: \"Đăng nhập để xem điểm của bạn\" */",
|
|
2300
|
+
" /** Signed-out prompt · default: \"Đăng nhập để xem điểm của bạn\" */",
|
|
1396
2301
|
" signedOutText?: string;",
|
|
1397
|
-
" /** default: \"Điểm thưởng\" */",
|
|
2302
|
+
" /** Section title · default: \"Điểm thưởng\" */",
|
|
1398
2303
|
" title?: string;",
|
|
1399
2304
|
" [special: string]: unknown;",
|
|
1400
2305
|
"}",
|
|
1401
2306
|
"declare function PointsCard(props: PointsCardProps): JSX.Element;",
|
|
1402
2307
|
"",
|
|
1403
|
-
"/**
|
|
2308
|
+
"/**",
|
|
2309
|
+
" * Points prompt (advanced) — type \"points-prompt\"",
|
|
2310
|
+
" *",
|
|
2311
|
+
" * A one-line live prompt that tells the shopper how many loyalty points the current cart would earn — members see their estimate (tier multiplier included), visitors see the same number as a reason to sign in. Requires the Loyalty app installed and the points program enabled; hydrated client-side and hidden when the program is off.",
|
|
2312
|
+
" *",
|
|
2313
|
+
" * Use when: In the cart drawer, near the checkout button, so the points argument lands at the moment of decision; On the checkout page beside the order total.",
|
|
2314
|
+
" * Avoid when: On stores without the Loyalty app — the line hides itself when the program is off; As a general marketing banner — its words are computed from the live cart, not authored.",
|
|
2315
|
+
" *",
|
|
2316
|
+
" * Holds no children.",
|
|
2317
|
+
" */",
|
|
1404
2318
|
"interface PointsPromptProps extends Sb.BaseProps {",
|
|
1405
2319
|
" [special: string]: unknown;",
|
|
1406
2320
|
"}",
|
|
1407
2321
|
"declare function PointsPrompt(props: PointsPromptProps): JSX.Element;",
|
|
1408
2322
|
"",
|
|
1409
|
-
"/**
|
|
2323
|
+
"/**",
|
|
2324
|
+
" * Popover (basic) — type \"popover\"",
|
|
2325
|
+
" *",
|
|
2326
|
+
" * An anchored popover: a trigger zone and a small card that floats beside it — above, below, left or right — with an arrow pointing back at the trigger. Opens on click, optionally on hover. Page-local; the card is arbitrary content.",
|
|
2327
|
+
" *",
|
|
2328
|
+
" * Use when: A short explanation, a preview or a small form should appear next to the thing it is about; The card must POINT at its trigger — an info icon, a price, an avatar — rather than hang under a button; The content is a card (a title and a sentence, a small image) rather than a list of links.",
|
|
2329
|
+
" * Avoid when: You want a menu of links under a button — that is the dropdown; The content should interrupt the whole page — use a pop-up (site overlay); The text is a one-line hint that could be a native title attribute.",
|
|
2330
|
+
" *",
|
|
2331
|
+
" * Children: ONLY <DropdownTrigger>, <DropdownPanel> — push refuses any other child.",
|
|
2332
|
+
" *",
|
|
2333
|
+
" * @example",
|
|
2334
|
+
" * <Popover>",
|
|
2335
|
+
" * <DropdownTrigger>",
|
|
2336
|
+
" * <Text text=\"…\" />",
|
|
2337
|
+
" * </DropdownTrigger>",
|
|
2338
|
+
" * <DropdownPanel>",
|
|
2339
|
+
" * <Text text=\"…\" />",
|
|
2340
|
+
" * </DropdownPanel>",
|
|
2341
|
+
" * <DropdownTrigger>",
|
|
2342
|
+
" * <Text text=\"…\" />",
|
|
2343
|
+
" * </DropdownTrigger>",
|
|
2344
|
+
" * <DropdownPanel>",
|
|
2345
|
+
" * <Text text=\"…\" />",
|
|
2346
|
+
" * </DropdownPanel>",
|
|
2347
|
+
" * </Popover>",
|
|
2348
|
+
" */",
|
|
1410
2349
|
"interface PopoverProps extends Sb.BaseProps {",
|
|
1411
2350
|
" /** default: true */",
|
|
1412
2351
|
" arrow?: boolean;",
|
|
@@ -1416,7 +2355,16 @@ export const ENV_DTS = [
|
|
|
1416
2355
|
"}",
|
|
1417
2356
|
"declare function Popover(props: PopoverProps): JSX.Element;",
|
|
1418
2357
|
"",
|
|
1419
|
-
"/**
|
|
2358
|
+
"/**",
|
|
2359
|
+
" * Pop-up (basic) — type \"popup\"",
|
|
2360
|
+
" *",
|
|
2361
|
+
" * A site-owned panel that floats over the page and opens when a trigger with an open_popup action is clicked. Stored as an overlay, not inside any page document; a page shows it because an author attached it.",
|
|
2362
|
+
" *",
|
|
2363
|
+
" * Use when: A newsletter sign-up, an age gate, a promotion or a cookie notice that must interrupt the page; Content that should appear on some pages but not others — attachment is per page.",
|
|
2364
|
+
" * Avoid when: The panel belongs to one control rather than to the site — an icon menu owns its own drawer; It is the cart: the cart drawer is a singleton with its own element and needs no target; The content should be read in the page flow, where a shopper can scroll back to it.",
|
|
2365
|
+
" *",
|
|
2366
|
+
" * Lives ONLY directly inside <Page>.",
|
|
2367
|
+
" */",
|
|
1420
2368
|
"interface PopupProps extends Sb.BaseProps {",
|
|
1421
2369
|
" /** default: \"CloseLine\" */",
|
|
1422
2370
|
" closeIcon?: string;",
|
|
@@ -1426,78 +2374,195 @@ export const ENV_DTS = [
|
|
|
1426
2374
|
"}",
|
|
1427
2375
|
"declare function Popup(props: PopupProps): JSX.Element;",
|
|
1428
2376
|
"",
|
|
1429
|
-
"/**
|
|
2377
|
+
"/**",
|
|
2378
|
+
" * Product price (dataset) — type \"pricing-dataset\"",
|
|
2379
|
+
" *",
|
|
2380
|
+
" * A store-bound product price display. Two roles on one type: the picker drops a \"prices\" PARENT holding two child pricing nodes (kind \"price\" + kind \"compare_price\"), and the parent renders the visible subset filtered by config.displayPriceId (\"price\" | \"compare_price\" | \"both\"). A childless node is a LEAF that renders its own single value — kind \"price\" shows the price, kind \"compare_price\" the struck-out compare-at. The PARENT owns the product pin, the display choice, config.position and the box; each CHILD owns its own typography and html tag. When placed under a product each node binds to that product's live price, falling back to the config-seeded priceValue / compareValue when unbound.",
|
|
2381
|
+
" *",
|
|
2382
|
+
" * Use when: Product buy-box showing the current price (and a slashed original price); Product card that must surface a price + sale/compare price; Anywhere a formatted product price belongs in a product layout.",
|
|
2383
|
+
" * Avoid when: Static, non-product price text — use text instead; A currency/number the shopper edits — use an input; Product title or description — use the matching product element.",
|
|
2384
|
+
" *",
|
|
2385
|
+
" * Holds no children.",
|
|
2386
|
+
" *",
|
|
2387
|
+
" * @example",
|
|
2388
|
+
" * <PricingDataset htmlTag=\"p\" config={{\"kind\":\"prices\",\"displayPriceId\":\"both\",\"priceValue\":\"$49.00\",\"compareValue\":\"$69.00\",\"textGlobalStyle\":\"text-1\"}} />",
|
|
2389
|
+
" */",
|
|
1430
2390
|
"interface PricingDatasetProps extends Sb.BaseProps {",
|
|
1431
|
-
" /** default: \"p\" */",
|
|
2391
|
+
" /** HTML Tag · default: \"p\" · e.g. \"p\" */",
|
|
1432
2392
|
" htmlTag?: string;",
|
|
1433
2393
|
" [special: string]: unknown;",
|
|
1434
2394
|
"}",
|
|
1435
2395
|
"declare function PricingDataset(props: PricingDatasetProps): JSX.Element;",
|
|
1436
2396
|
"",
|
|
1437
|
-
"/**
|
|
2397
|
+
"/**",
|
|
2398
|
+
" * Feature image (media) — type \"product-image-feature\"",
|
|
2399
|
+
" *",
|
|
2400
|
+
" * A large product feature image carousel — stacks its images and shows the active one at full size, with optional prev/next navigation, pagination dots, hover-zoom and a hover image swap (config.hoverSwapImage) on published pages. When pinned to (or placed under) a product it carousels that product's full image gallery (config.mainImageSource picks which image leads), falling back to the seeded config.images when unbound. Owns no children.",
|
|
2401
|
+
" *",
|
|
2402
|
+
" * Use when: Showing the primary/large product photo on a product detail layout.; You want visitors to page through several product images..",
|
|
2403
|
+
" * Avoid when: You only need a single static image — use the Image element.; You want a thumbnail strip — use Image list..",
|
|
2404
|
+
" *",
|
|
2405
|
+
" * Holds no children.",
|
|
2406
|
+
" * Goes inside <MediaDataset>.",
|
|
2407
|
+
" *",
|
|
2408
|
+
" * @example",
|
|
2409
|
+
" * <ProductImageFeature alt=\"Product main image\" config={{\"featureImageRatio\":\"1 / 1\",\"listNavPosition\":\"inside\",\"listNavButtonWidth\":36,\"listNavButtonHeight\":36,\"hoverZoomType\":\"cursor\",\"hoverZoomValue\":150,\"paginationItemWidth\":8,\"paginationItemHeight\":8,\"paginationItemGap\":6}} />",
|
|
2410
|
+
" */",
|
|
1438
2411
|
"interface ProductImageFeatureProps extends Sb.BaseProps {",
|
|
1439
|
-
" /** default: \"\" */",
|
|
2412
|
+
" /** default: \"\" · e.g. \"Product main image\" */",
|
|
1440
2413
|
" alt?: string;",
|
|
1441
2414
|
" [special: string]: unknown;",
|
|
1442
2415
|
"}",
|
|
1443
2416
|
"declare function ProductImageFeature(props: ProductImageFeatureProps): JSX.Element;",
|
|
1444
2417
|
"",
|
|
1445
|
-
"/**
|
|
2418
|
+
"/**",
|
|
2419
|
+
" * Image list (media) — type \"product-image-list\"",
|
|
2420
|
+
" *",
|
|
2421
|
+
" * A horizontally-scrollable strip of product image thumbnails (config.images[]) with the active one highlighted by a border overlay — usually paired with a Feature image (product-image-feature) so clicking a thumbnail swaps the large photo. Always config-seeded; live product-gallery binding is a deferred seam (a multi-image strip needs an array source the binding mechanism cannot yet carry). Owns no children.",
|
|
2422
|
+
" *",
|
|
2423
|
+
" * Use when: Offering quick access to all of a product’s photos as thumbnails.; Complementing a Feature image on a product detail layout..",
|
|
2424
|
+
" * Avoid when: You only have one product image — a thumbnail strip adds no value.; You want the large primary photo — use Feature image..",
|
|
2425
|
+
" *",
|
|
2426
|
+
" * Holds no children.",
|
|
2427
|
+
" * Goes inside <MediaDataset>.",
|
|
2428
|
+
" *",
|
|
2429
|
+
" * @example",
|
|
2430
|
+
" * <ProductImageList config={{\"listItemImageRatio\":\"1 / 1\",\"itemSize\":60,\"gap\":12}} />",
|
|
2431
|
+
" */",
|
|
1446
2432
|
"interface ProductImageListProps extends Sb.BaseProps {",
|
|
1447
2433
|
" [special: string]: unknown;",
|
|
1448
2434
|
"}",
|
|
1449
2435
|
"declare function ProductImageList(props: ProductImageListProps): JSX.Element;",
|
|
1450
2436
|
"",
|
|
1451
|
-
"/**
|
|
2437
|
+
"/**",
|
|
2438
|
+
" * Variant label (dataset) — type \"product-variant-label\"",
|
|
2439
|
+
" *",
|
|
2440
|
+
" * The label skin of a Product variants element — a hidden satellite node whose style paints each attribute name. Never placed directly; owned by a product-variants via config.variantLabelId.",
|
|
2441
|
+
" *",
|
|
2442
|
+
" * Use when: Never place this element directly — the product-variants creates and owns it.",
|
|
2443
|
+
" * Avoid when: Anywhere in a page tree — it is a style-holder, not a rendered element.",
|
|
2444
|
+
" *",
|
|
2445
|
+
" * Holds no children.",
|
|
2446
|
+
" *",
|
|
2447
|
+
" * @example",
|
|
2448
|
+
" * <ProductVariantLabel config={{\"textGlobalStyle\":\"heading-6\"}} />",
|
|
2449
|
+
" */",
|
|
1452
2450
|
"interface ProductVariantLabelProps extends Sb.BaseProps {",
|
|
1453
2451
|
" [special: string]: unknown;",
|
|
1454
2452
|
"}",
|
|
1455
2453
|
"declare function ProductVariantLabel(props: ProductVariantLabelProps): JSX.Element;",
|
|
1456
2454
|
"",
|
|
1457
|
-
"/**
|
|
2455
|
+
"/**",
|
|
2456
|
+
" * Variant option (dataset) — type \"product-variant-option\"",
|
|
2457
|
+
" *",
|
|
2458
|
+
" * The option skin of a Product variants element — a hidden satellite node whose style and default/hover/active states paint each selectable value (dropdown surface, button, or swatch). Never placed directly; owned by a product-variants via config.variantOptionId.",
|
|
2459
|
+
" *",
|
|
2460
|
+
" * Use when: Never place this element directly — the product-variants creates and owns it.",
|
|
2461
|
+
" * Avoid when: Anywhere in a page tree — it is a style-holder, not a rendered element.",
|
|
2462
|
+
" *",
|
|
2463
|
+
" * Holds no children.",
|
|
2464
|
+
" *",
|
|
2465
|
+
" * @example",
|
|
2466
|
+
" * <ProductVariantOption config={{\"variantImage\":{\"active\":true,\"size\":32,\"gap\":8}}} />",
|
|
2467
|
+
" */",
|
|
1458
2468
|
"interface ProductVariantOptionProps extends Sb.BaseProps {",
|
|
1459
2469
|
" [special: string]: unknown;",
|
|
1460
2470
|
"}",
|
|
1461
2471
|
"declare function ProductVariantOption(props: ProductVariantOptionProps): JSX.Element;",
|
|
1462
2472
|
"",
|
|
1463
|
-
"/**
|
|
2473
|
+
"/**",
|
|
2474
|
+
" * Product variants (dataset) — type \"product-variants\"",
|
|
2475
|
+
" *",
|
|
2476
|
+
" * A store-bound product variant picker. Renders one block per product attribute (e.g. Color, Size), each showing the attribute name and its selectable values as a dropdown, image+label buttons, or image swatches (specials.displayType). Owns no children — the label and option skins are held by two satellites. config.attributes seeds the attributes; specials.defaultVariant marks the pre-selected value per attribute.",
|
|
2477
|
+
" *",
|
|
2478
|
+
" * Use when: Product buy-box where the shopper picks a variant (colour, size, material) before add-to-cart; Product page that must surface selectable product options; Any place a variant/option selector belongs in a product layout.",
|
|
2479
|
+
" * Avoid when: Generic multiple-choice inputs not tied to product variants — use a select or tab; Static option text — use text instead; Quantity selection — use the quantity element instead.",
|
|
2480
|
+
" *",
|
|
2481
|
+
" * Holds no children.",
|
|
2482
|
+
" * Not a child: its <ProductVariantLabel> sits in `export const detached`, linked by config.variantLabelId.",
|
|
2483
|
+
" * Not a child: its <ProductVariantOption> sits in `export const detached`, linked by config.variantOptionId.",
|
|
2484
|
+
" *",
|
|
2485
|
+
" * @example",
|
|
2486
|
+
" * <ProductVariants displayType=\"select\" config={{\"attributes\":[{\"name\":\"Color\",\"values\":[\"Red\",\"Green\",\"Blue\"]},{\"name\":\"Size\",\"values\":[\"S\",\"M\",\"L\"]}]}} />",
|
|
2487
|
+
" */",
|
|
1464
2488
|
"interface ProductVariantsProps extends Sb.BaseProps {",
|
|
1465
2489
|
" defaultVariant?: Sb.Obj;",
|
|
1466
|
-
" /** default: \"select\" */",
|
|
2490
|
+
" /** Variant display · default: \"select\" · e.g. \"select\" */",
|
|
1467
2491
|
" displayType?: string;",
|
|
1468
2492
|
" [special: string]: unknown;",
|
|
1469
2493
|
"}",
|
|
1470
2494
|
"declare function ProductVariants(props: ProductVariantsProps): JSX.Element;",
|
|
1471
2495
|
"",
|
|
1472
|
-
"/**
|
|
2496
|
+
"/**",
|
|
2497
|
+
" * QR code (media) — type \"qr-code\"",
|
|
2498
|
+
" *",
|
|
2499
|
+
" * A scannable QR code generated from a URL or short text value.",
|
|
2500
|
+
" *",
|
|
2501
|
+
" * Use when: On a poster, name card or packaging section where a phone camera is the fastest way in; To let a shopper carry a product page from a printed page to their phone.",
|
|
2502
|
+
" * Avoid when: For a link a visitor is already able to click — a QR on screen usually helps nobody.",
|
|
2503
|
+
" *",
|
|
2504
|
+
" * Holds no children.",
|
|
2505
|
+
" */",
|
|
1473
2506
|
"interface QrCodeProps extends Sb.BaseProps {",
|
|
1474
2507
|
" /** default: \"\" */",
|
|
1475
2508
|
" alt?: string;",
|
|
1476
2509
|
" /** default: \"\" */",
|
|
1477
2510
|
" boundValue?: string;",
|
|
1478
|
-
" /** default: \"text\" */",
|
|
2511
|
+
" /** Source · default: \"text\" */",
|
|
1479
2512
|
" source?: string;",
|
|
1480
|
-
" /** default: \"\" */",
|
|
2513
|
+
" /** Content · default: \"\" */",
|
|
1481
2514
|
" value?: string;",
|
|
1482
2515
|
" [special: string]: unknown;",
|
|
1483
2516
|
"}",
|
|
1484
2517
|
"declare function QrCode(props: QrCodeProps): JSX.Element;",
|
|
1485
2518
|
"",
|
|
1486
|
-
"/**
|
|
2519
|
+
"/**",
|
|
2520
|
+
" * Quantity button (dataset) — type \"quantity-button\"",
|
|
2521
|
+
" *",
|
|
2522
|
+
" * The shared +/− stepper skin of a Quantity element — a hidden satellite node whose style and hover state paint both quantity buttons. Never placed directly; owned by a quantity-dataset via config.quantityButtonId.",
|
|
2523
|
+
" *",
|
|
2524
|
+
" * Use when: Never place this element directly — the quantity-dataset creates and owns it.",
|
|
2525
|
+
" * Avoid when: Anywhere in a page tree — it is a style-holder, not a rendered element.",
|
|
2526
|
+
" *",
|
|
2527
|
+
" * Holds no children.",
|
|
2528
|
+
" */",
|
|
1487
2529
|
"interface QuantityButtonProps extends Sb.BaseProps {",
|
|
1488
2530
|
" [special: string]: unknown;",
|
|
1489
2531
|
"}",
|
|
1490
2532
|
"declare function QuantityButton(props: QuantityButtonProps): JSX.Element;",
|
|
1491
2533
|
"",
|
|
1492
|
-
"/**
|
|
2534
|
+
"/**",
|
|
2535
|
+
" * Quantity (dataset) — type \"quantity-dataset\"",
|
|
2536
|
+
" *",
|
|
2537
|
+
" * A store-bound product quantity selector. Renders its own compact stepper — a minus button, a number input, and a plus button — and owns the value locally (no children). specials.button toggles the +/− steppers (false → input-only). The shared +/− skin is styled through the quantity-button satellite; the input surface through the quantity-input satellite.",
|
|
2538
|
+
" *",
|
|
2539
|
+
" * Use when: Product buy-box where the shopper picks how many units to add to cart; Product card or quick-buy layout that needs a compact quantity stepper; Any place a numeric +/− quantity control belongs before an add-to-cart action.",
|
|
2540
|
+
" * Avoid when: Static quantity or inventory text — use text instead; Generic numeric inputs not tied to purchase quantity; Selecting between options/variants — use a select or tab instead.",
|
|
2541
|
+
" *",
|
|
2542
|
+
" * Holds no children.",
|
|
2543
|
+
" * Not a child: its <QuantityButton> sits in `export const detached`, linked by config.quantityButtonId.",
|
|
2544
|
+
" * Not a child: its <QuantityInput> sits in `export const detached`, linked by config.quantityInputId.",
|
|
2545
|
+
" *",
|
|
2546
|
+
" * @example",
|
|
2547
|
+
" * <QuantityDataset button={true} config={{\"defaultNum\":1}} />",
|
|
2548
|
+
" */",
|
|
1493
2549
|
"interface QuantityDatasetProps extends Sb.BaseProps {",
|
|
1494
|
-
" /** default: true */",
|
|
2550
|
+
" /** default: true · e.g. false */",
|
|
1495
2551
|
" button?: boolean;",
|
|
1496
2552
|
" [special: string]: unknown;",
|
|
1497
2553
|
"}",
|
|
1498
2554
|
"declare function QuantityDataset(props: QuantityDatasetProps): JSX.Element;",
|
|
1499
2555
|
"",
|
|
1500
|
-
"/**
|
|
2556
|
+
"/**",
|
|
2557
|
+
" * Quantity input (dataset) — type \"quantity-input\"",
|
|
2558
|
+
" *",
|
|
2559
|
+
" * The input-surface skin of a Quantity element — a hidden satellite node whose style paints the number field. Never placed directly; owned by a quantity-dataset via config.quantityInputId.",
|
|
2560
|
+
" *",
|
|
2561
|
+
" * Use when: Never place this element directly — the quantity-dataset creates and owns it.",
|
|
2562
|
+
" * Avoid when: Anywhere in a page tree — it is a style-holder, not a rendered element.",
|
|
2563
|
+
" *",
|
|
2564
|
+
" * Holds no children.",
|
|
2565
|
+
" */",
|
|
1501
2566
|
"interface QuantityInputProps extends Sb.BaseProps {",
|
|
1502
2567
|
" /** default: \"quantity-input-default\" */",
|
|
1503
2568
|
" stylePreset?: string;",
|
|
@@ -1505,41 +2570,99 @@ export const ENV_DTS = [
|
|
|
1505
2570
|
"}",
|
|
1506
2571
|
"declare function QuantityInput(props: QuantityInputProps): JSX.Element;",
|
|
1507
2572
|
"",
|
|
1508
|
-
"/**
|
|
2573
|
+
"/**",
|
|
2574
|
+
" * Quick view (basic) — type \"quickview\"",
|
|
2575
|
+
" *",
|
|
2576
|
+
" * A QUICK VIEW panel: the surface a shopper opens from a product card to see enough to decide — gallery, title, price, variants, quantity, add to cart — without leaving the list they were browsing. Belongs to the site, not to a page; a product list points at one and several lists may share the same panel.",
|
|
2577
|
+
" *",
|
|
2578
|
+
" * Use when: a catalogue page where shoppers compare several products and losing their scroll position costs a sale; a store whose products need one or two choices (size, colour) before they can be added to the cart; a site that wants a second, shorter product surface without maintaining a second product page.",
|
|
2579
|
+
" * Avoid when: as a standalone block: this panel only renders through the list that names it, hidden until a shopper opens it; as a replacement for the product page — search engines index the page, not this panel, and a long description belongs there; for products that need no decision at all: a one-click add-to-cart button on the card is faster than any panel.",
|
|
2580
|
+
" */",
|
|
1509
2581
|
"interface QuickviewProps extends Sb.BaseProps {",
|
|
1510
2582
|
" [special: string]: unknown;",
|
|
1511
2583
|
"}",
|
|
1512
2584
|
"declare function Quickview(props: QuickviewProps): JSX.Element;",
|
|
1513
2585
|
"",
|
|
1514
|
-
"/**
|
|
2586
|
+
"/**",
|
|
2587
|
+
" * Rating stars (dataset) — type \"rating-stars\"",
|
|
2588
|
+
" *",
|
|
2589
|
+
" * A five-star rating drawn as icons, filled to the bound score — a product's published-review average, a single review's own score, or a course's.",
|
|
2590
|
+
" *",
|
|
2591
|
+
" * Use when: Beside a product title or price, where a shopper scans for social proof before reading anything; As the top line of a review card, above the headline the reviewer wrote; On a product card in a collection shelf, where there is no room for words.",
|
|
2592
|
+
" * Avoid when: On a store with no published reviews — it renders nothing there by design, so the space it holds is better given to something that does; To show a score a shopper cannot verify: this element paints only what the reviews table says.",
|
|
2593
|
+
" *",
|
|
2594
|
+
" * Holds no children.",
|
|
2595
|
+
" */",
|
|
1515
2596
|
"interface RatingStarsProps extends Sb.BaseProps {",
|
|
1516
|
-
" /** default: \"\" */",
|
|
2597
|
+
" /** Fallback score · default: \"\" */",
|
|
1517
2598
|
" ratingValue?: string;",
|
|
1518
2599
|
" [special: string]: unknown;",
|
|
1519
2600
|
"}",
|
|
1520
2601
|
"declare function RatingStars(props: RatingStarsProps): JSX.Element;",
|
|
1521
2602
|
"",
|
|
1522
|
-
"/**
|
|
2603
|
+
"/**",
|
|
2604
|
+
" * Page (system) — type \"root\"",
|
|
2605
|
+
" *",
|
|
2606
|
+
" * The invisible page root that wraps all top-level sections.",
|
|
2607
|
+
" *",
|
|
2608
|
+
" * Use when: Always present as the single root of every page document.",
|
|
2609
|
+
" * Avoid when: Never add manually — one root exists per page automatically.",
|
|
2610
|
+
" *",
|
|
2611
|
+
" * Lives ONLY directly inside <Page>.",
|
|
2612
|
+
" */",
|
|
1523
2613
|
"interface PageProps extends Sb.BaseProps {",
|
|
1524
2614
|
" [special: string]: unknown;",
|
|
1525
2615
|
"}",
|
|
1526
2616
|
"declare function Page(props: PageProps): JSX.Element;",
|
|
1527
2617
|
"",
|
|
1528
|
-
"/**
|
|
2618
|
+
"/**",
|
|
2619
|
+
" * Sale badge (dataset) — type \"sale-badge\"",
|
|
2620
|
+
" *",
|
|
2621
|
+
" * A small \"−20%\" / \"Sale\" pill for a product card or product page, computed at render time from the bound product's price and compare-at cents. Purely static — no island, no runtime module. Two content modes: specials.mode \"percent\" shows a computed \"−N%\"; \"text\" shows an authored word (default \"Sale\"). Renders nothing at all when the product has no real saving (no compare-at price, or compare-at at or below price) — it never invents a discount.",
|
|
2622
|
+
" *",
|
|
2623
|
+
" * Use when: A product card or product page needs a quick visual flag that the item is on sale; Beside a pricing-dataset price display, to draw attention to the struck-through compare-at.",
|
|
2624
|
+
" * Avoid when: The exact amount saved needs to show in money (\"tiết kiệm 50.000₫\") — this element only shows a percentage or a fixed word, never a formatted amount; The badge should show on every product regardless of a real discount — that is authored text, not this element.",
|
|
2625
|
+
" *",
|
|
2626
|
+
" * Holds no children.",
|
|
2627
|
+
" *",
|
|
2628
|
+
" * @example",
|
|
2629
|
+
" * <SaleBadge mode=\"percent\" />",
|
|
2630
|
+
" */",
|
|
1529
2631
|
"interface SaleBadgeProps extends Sb.BaseProps {",
|
|
1530
2632
|
" /** default: \"\" */",
|
|
1531
2633
|
" boundCompareCents?: string;",
|
|
1532
2634
|
" /** default: \"\" */",
|
|
1533
2635
|
" boundPriceCents?: string;",
|
|
1534
|
-
" /** default: \"percent\" */",
|
|
2636
|
+
" /** Mode · default: \"percent\" · e.g. \"text\" */",
|
|
1535
2637
|
" mode?: string;",
|
|
1536
|
-
" /** default: \"Sale\" */",
|
|
2638
|
+
" /** Word · default: \"Sale\" · e.g. \"Sale\" */",
|
|
1537
2639
|
" text?: string;",
|
|
1538
2640
|
" [special: string]: unknown;",
|
|
1539
2641
|
"}",
|
|
1540
2642
|
"declare function SaleBadge(props: SaleBadgeProps): JSX.Element;",
|
|
1541
2643
|
"",
|
|
1542
|
-
"/**
|
|
2644
|
+
"/**",
|
|
2645
|
+
" * Search (input) — type \"search-input\"",
|
|
2646
|
+
" *",
|
|
2647
|
+
" * A storefront search box. The shopper types, and the query narrows a list of products, collections, articles or blog categories — either on the page it sits on or on the site’s /search page.",
|
|
2648
|
+
" *",
|
|
2649
|
+
" * Use when: A header, a collection page or a search page needs a way to find something by name.; A shopper is expected to know what they want and type it, rather than browse facets..",
|
|
2650
|
+
" * Avoid when: The author wants to narrow by a fixed set of values (a brand, a size, a price band). That is a filter element — filter-checkbox, filter-radio, filter-color or filter-tag..",
|
|
2651
|
+
" *",
|
|
2652
|
+
" * Children: ONLY <ListDataset>, <Heading>, <SearchKeywords> — push refuses any other child.",
|
|
2653
|
+
" *",
|
|
2654
|
+
" * @example",
|
|
2655
|
+
" * <SearchInput>",
|
|
2656
|
+
" * <ListDataset loadMoreLabel=\"Load more\">",
|
|
2657
|
+
" * <Text text=\"…\" />",
|
|
2658
|
+
" * </ListDataset>",
|
|
2659
|
+
" * <Heading htmlTag=\"h2\" text=\"Heading\" />",
|
|
2660
|
+
" * <ListDataset loadMoreLabel=\"Load more\">",
|
|
2661
|
+
" * <Text text=\"…\" />",
|
|
2662
|
+
" * </ListDataset>",
|
|
2663
|
+
" * <Heading htmlTag=\"h2\" text=\"Heading\" />",
|
|
2664
|
+
" * </SearchInput>",
|
|
2665
|
+
" */",
|
|
1543
2666
|
"interface SearchInputProps extends Sb.BaseProps {",
|
|
1544
2667
|
" /** default: \"navigate\" */",
|
|
1545
2668
|
" searchBehavior?: string;",
|
|
@@ -1572,22 +2695,60 @@ export const ENV_DTS = [
|
|
|
1572
2695
|
"}",
|
|
1573
2696
|
"declare function SearchInput(props: SearchInputProps): JSX.Element;",
|
|
1574
2697
|
"",
|
|
1575
|
-
"/**
|
|
2698
|
+
"/**",
|
|
2699
|
+
" * Suggested keywords (input) — type \"search-keywords\"",
|
|
2700
|
+
" *",
|
|
2701
|
+
" * A row of suggested-keyword chips wired to the search suggestion feed. At rest it shows the author’s own keywords (“popular searches”); while the shopper types in the search box it sits inside, the chips become live suggestion titles. Every chip is a real link.",
|
|
2702
|
+
" *",
|
|
2703
|
+
" * Use when: Inside a search box’s dropdown, above the result lists — quick ways into common queries.; On a search page, as the empty-state prompt before the shopper has typed anything..",
|
|
2704
|
+
" * Avoid when: The author wants a fixed set of NAVIGATION links to pages — that is a menu or buttons, not search keywords: these chips write a search query, they do not point at URLs.; The page has no search behaviour at all — a chip that filters nothing reads as broken..",
|
|
2705
|
+
" *",
|
|
2706
|
+
" * Holds no children.",
|
|
2707
|
+
" * Goes inside <SearchInput>.",
|
|
2708
|
+
" */",
|
|
1576
2709
|
"interface SearchKeywordsProps extends Sb.BaseProps {",
|
|
1577
|
-
" /** default: \"navigate\" */",
|
|
2710
|
+
" /** On click · default: \"navigate\" */",
|
|
1578
2711
|
" keywordAction?: string;",
|
|
2712
|
+
" /** Keywords */",
|
|
1579
2713
|
" keywordItems?: Sb.Json[];",
|
|
1580
2714
|
" [special: string]: unknown;",
|
|
1581
2715
|
"}",
|
|
1582
2716
|
"declare function SearchKeywords(props: SearchKeywordsProps): JSX.Element;",
|
|
1583
2717
|
"",
|
|
1584
|
-
"/**
|
|
2718
|
+
"/**",
|
|
2719
|
+
" * search-result-item (removed) — type \"search-result-item\"",
|
|
2720
|
+
" */",
|
|
1585
2721
|
"interface SearchResultItemProps extends Sb.BaseProps {",
|
|
1586
2722
|
" [special: string]: unknown;",
|
|
1587
2723
|
"}",
|
|
1588
2724
|
"declare function SearchResultItem(props: SearchResultItemProps): JSX.Element;",
|
|
1589
2725
|
"",
|
|
1590
|
-
"/**
|
|
2726
|
+
"/**",
|
|
2727
|
+
" * Select (input) — type \"select\"",
|
|
2728
|
+
" *",
|
|
2729
|
+
" * A select: a compact trigger showing the chosen value, opening a panel of options generated from the storefront data it is pointed at. Re-orders a product list (sort) or narrows it (a filter facet) by writing the URL the server renders against.",
|
|
2730
|
+
" *",
|
|
2731
|
+
" * Use when: A product shelf needs a \"Sort by\" control; A facet with many values would be a long column as checkboxes and reads better collapsed; The page has room for one compact control rather than a filter sidebar.",
|
|
2732
|
+
" * Avoid when: The panel should hold the author’s OWN content rather than generated options — use a dropdown; A shopper should see every option at once, or pick several — use a filter element; Nothing on the page is a product or article list for it to drive.",
|
|
2733
|
+
" *",
|
|
2734
|
+
" * Children: ONLY <DropdownTrigger>, <DropdownPanel> — push refuses any other child.",
|
|
2735
|
+
" *",
|
|
2736
|
+
" * @example",
|
|
2737
|
+
" * <Select>",
|
|
2738
|
+
" * <DropdownTrigger>",
|
|
2739
|
+
" * <Text text=\"…\" />",
|
|
2740
|
+
" * </DropdownTrigger>",
|
|
2741
|
+
" * <DropdownPanel>",
|
|
2742
|
+
" * <Text text=\"…\" />",
|
|
2743
|
+
" * </DropdownPanel>",
|
|
2744
|
+
" * <DropdownTrigger>",
|
|
2745
|
+
" * <Text text=\"…\" />",
|
|
2746
|
+
" * </DropdownTrigger>",
|
|
2747
|
+
" * <DropdownPanel>",
|
|
2748
|
+
" * <Text text=\"…\" />",
|
|
2749
|
+
" * </DropdownPanel>",
|
|
2750
|
+
" * </Select>",
|
|
2751
|
+
" */",
|
|
1591
2752
|
"interface SelectProps extends Sb.BaseProps {",
|
|
1592
2753
|
" /** default: \"filter\" */",
|
|
1593
2754
|
" filterBehavior?: string;",
|
|
@@ -1599,13 +2760,22 @@ export const ENV_DTS = [
|
|
|
1599
2760
|
" filterValues?: Sb.Json[];",
|
|
1600
2761
|
" /** default: false */",
|
|
1601
2762
|
" openOnHover?: boolean;",
|
|
1602
|
-
" /** default: \"\" */",
|
|
2763
|
+
" /** Placeholder · default: \"\" */",
|
|
1603
2764
|
" placeholder?: string;",
|
|
1604
2765
|
" [special: string]: unknown;",
|
|
1605
2766
|
"}",
|
|
1606
2767
|
"declare function Select(props: SelectProps): JSX.Element;",
|
|
1607
2768
|
"",
|
|
1608
|
-
"/**
|
|
2769
|
+
"/**",
|
|
2770
|
+
" * SoundCloud (media) — type \"soundcloud\"",
|
|
2771
|
+
" *",
|
|
2772
|
+
" * An embedded SoundCloud audio player for a track or playlist.",
|
|
2773
|
+
" *",
|
|
2774
|
+
" * Use when: To embed a SoundCloud track, podcast episode, or playlist on a page; For an audio-first block (music, interview, audio testimonial).",
|
|
2775
|
+
" * Avoid when: For video — use video, youtube, or vimeo instead.",
|
|
2776
|
+
" *",
|
|
2777
|
+
" * Holds no children.",
|
|
2778
|
+
" */",
|
|
1609
2779
|
"interface SoundcloudProps extends Sb.BaseProps {",
|
|
1610
2780
|
" /** default: \"\" */",
|
|
1611
2781
|
" trackUrl?: string;",
|
|
@@ -1613,7 +2783,16 @@ export const ENV_DTS = [
|
|
|
1613
2783
|
"}",
|
|
1614
2784
|
"declare function Soundcloud(props: SoundcloudProps): JSX.Element;",
|
|
1615
2785
|
"",
|
|
1616
|
-
"/**
|
|
2786
|
+
"/**",
|
|
2787
|
+
" * 3D scene (media) — type \"spline-scene\"",
|
|
2788
|
+
" *",
|
|
2789
|
+
" * A 3D block whose source the merchant picks: a generated WebGL effect that needs no file and no account (~15 KB), or a Spline scene embedded from its viewer link (~600 KB).",
|
|
2790
|
+
" *",
|
|
2791
|
+
" * Use when: For a moving background behind a hero or a section — pick the effect source, which costs ~15 KB and needs nothing but the element; For a hero or product moment that should move in 3D as the visitor scrolls or hovers; When the merchant already designs in Spline and has a .splinecode link — pick the Spline source.",
|
|
2792
|
+
" * Avoid when: For a plain product photo — use image; For a video — use video / youtube / vimeo; For a still gradient or a flat colour behind text — a background style on the section is free; this element runs a shader; More than one Spline scene on a page (each costs ~600 KB of JS once it scrolls into view). Several effects are cheap by comparison, but they each run their own animation loop.",
|
|
2793
|
+
" *",
|
|
2794
|
+
" * Holds no children.",
|
|
2795
|
+
" */",
|
|
1617
2796
|
"interface SplineSceneProps extends Sb.BaseProps {",
|
|
1618
2797
|
" /** default: \"\" */",
|
|
1619
2798
|
" modelUrl?: string;",
|
|
@@ -1632,13 +2811,42 @@ export const ENV_DTS = [
|
|
|
1632
2811
|
"}",
|
|
1633
2812
|
"declare function SplineScene(props: SplineSceneProps): JSX.Element;",
|
|
1634
2813
|
"",
|
|
1635
|
-
"/**
|
|
2814
|
+
"/**",
|
|
2815
|
+
" * Tab (basic) — type \"tab\"",
|
|
2816
|
+
" *",
|
|
2817
|
+
" * A tabbed container that switches between several content panels. Children are tab-content nodes (one per tab); only the active tab is visible. Each child specials.label is its tab button text.",
|
|
2818
|
+
" *",
|
|
2819
|
+
" * Use when: Several related content groups should share one space and be toggled (product Details / Reviews / Shipping); A section would otherwise be a long vertical stack the user must scroll; FAQ-style or spec-table layouts where only one panel needs to show at a time.",
|
|
2820
|
+
" * Avoid when: There is only one content group — use a plain flex-section instead; All content must be visible/printable at once — use stacked sections; For a simple bulleted/numbered list — use list.",
|
|
2821
|
+
" *",
|
|
2822
|
+
" * Children: ONLY <TabContent> — push refuses any other child.",
|
|
2823
|
+
" * Not a child: its <TabItem> sits in `export const detached`, linked by config.tabItemId.",
|
|
2824
|
+
" *",
|
|
2825
|
+
" * @example",
|
|
2826
|
+
" * <Tab>",
|
|
2827
|
+
" * <TabContent label=\"Tab\">",
|
|
2828
|
+
" * <Text text=\"…\" />",
|
|
2829
|
+
" * </TabContent>",
|
|
2830
|
+
" * <TabContent label=\"Tab\">",
|
|
2831
|
+
" * <Text text=\"…\" />",
|
|
2832
|
+
" * </TabContent>",
|
|
2833
|
+
" * </Tab>",
|
|
2834
|
+
" */",
|
|
1636
2835
|
"interface TabProps extends Sb.BaseProps {",
|
|
1637
2836
|
" [special: string]: unknown;",
|
|
1638
2837
|
"}",
|
|
1639
2838
|
"declare function Tab(props: TabProps): JSX.Element;",
|
|
1640
2839
|
"",
|
|
1641
|
-
"/**
|
|
2840
|
+
"/**",
|
|
2841
|
+
" * Tab content (basic) — type \"tab-content\"",
|
|
2842
|
+
" *",
|
|
2843
|
+
" * A single tab panel inside a Tab element. Holds arbitrary child elements that show when its tab button is active; specials.label is the button text.",
|
|
2844
|
+
" *",
|
|
2845
|
+
" * Use when: As a direct child of a tab element — one per tab the user can switch between; To group a chunk of page content behind a labelled tab (specs, description, reviews…).",
|
|
2846
|
+
" * Avoid when: As a standalone section — it is only valid inside a tab; use flex-section for top-level layout; For list rows — use list + list-item instead.",
|
|
2847
|
+
" *",
|
|
2848
|
+
" * Goes inside <Tab>.",
|
|
2849
|
+
" */",
|
|
1642
2850
|
"interface TabContentProps extends Sb.BaseProps {",
|
|
1643
2851
|
" /** default: \"Tab\" */",
|
|
1644
2852
|
" label?: string;",
|
|
@@ -1646,15 +2854,33 @@ export const ENV_DTS = [
|
|
|
1646
2854
|
"}",
|
|
1647
2855
|
"declare function TabContent(props: TabContentProps): JSX.Element;",
|
|
1648
2856
|
"",
|
|
1649
|
-
"/**
|
|
2857
|
+
"/**",
|
|
2858
|
+
" * Tab item (basic) — type \"tab-item\"",
|
|
2859
|
+
" *",
|
|
2860
|
+
" * The shared button skin of a Tab element — a hidden satellite node whose style and hover/active states paint every tab button. Never placed directly; owned by a tab via config.tabItemId.",
|
|
2861
|
+
" *",
|
|
2862
|
+
" * Use when: Never place this element directly — the tab element creates and owns it.",
|
|
2863
|
+
" * Avoid when: Anywhere in a page tree — it is a style-holder, not a rendered element.",
|
|
2864
|
+
" *",
|
|
2865
|
+
" * Holds no children.",
|
|
2866
|
+
" */",
|
|
1650
2867
|
"interface TabItemProps extends Sb.BaseProps {",
|
|
1651
2868
|
" [special: string]: unknown;",
|
|
1652
2869
|
"}",
|
|
1653
2870
|
"declare function TabItem(props: TabItemProps): JSX.Element;",
|
|
1654
2871
|
"",
|
|
1655
|
-
"/**
|
|
2872
|
+
"/**",
|
|
2873
|
+
" * Text (basic) — type \"text\"",
|
|
2874
|
+
" *",
|
|
2875
|
+
" * A paragraph or inline text block for body copy and descriptions.",
|
|
2876
|
+
" *",
|
|
2877
|
+
" * Use when: Below a heading to expand on the section topic; For feature descriptions, testimonials, and supporting copy.",
|
|
2878
|
+
" * Avoid when: For primary section titles — use heading instead.",
|
|
2879
|
+
" *",
|
|
2880
|
+
" * Holds no children.",
|
|
2881
|
+
" */",
|
|
1656
2882
|
"interface TextProps extends Sb.BaseProps {",
|
|
1657
|
-
" /** default: \"p\" */",
|
|
2883
|
+
" /** HTML Tag · default: \"p\" */",
|
|
1658
2884
|
" htmlTag?: string;",
|
|
1659
2885
|
" /** default: \"text-default\" */",
|
|
1660
2886
|
" stylePreset?: string;",
|
|
@@ -1664,11 +2890,23 @@ export const ENV_DTS = [
|
|
|
1664
2890
|
"}",
|
|
1665
2891
|
"declare function Text(props: TextProps): JSX.Element;",
|
|
1666
2892
|
"",
|
|
1667
|
-
"/**
|
|
2893
|
+
"/**",
|
|
2894
|
+
" * Product text (dataset) — type \"text-dataset\"",
|
|
2895
|
+
" *",
|
|
2896
|
+
" * A store-bound text display for a product title, vendor, summary (the short description), or description (config.kind). Renders escaped plain text for title/vendor/summary, or the product's sanitized rich-text HTML for the description kind. For the description kind, a Compact display type clamps the text to config.descriptionLines with an optional \"show more / show less\" toggle. Owns no children; when placed under a product it binds to that product's live field, falling back to the seeded config text when unbound. Supports default / hover / active interaction states.",
|
|
2897
|
+
" *",
|
|
2898
|
+
" * Use when: Product title, vendor, short summary, or description text in a product layout; A long product description that should collapse to a few lines with a \"show more\" toggle; Product text that needs hover/active styling.",
|
|
2899
|
+
" * Avoid when: Generic static copy not tied to a product — use text or heading; A price — use the product price element; Free-form author HTML/markup — the description kind renders only the product's own sanitized rich text, not arbitrary content.",
|
|
2900
|
+
" *",
|
|
2901
|
+
" * Holds no children.",
|
|
2902
|
+
" *",
|
|
2903
|
+
" * @example",
|
|
2904
|
+
" * <TextDataset htmlTag=\"h3\" config={{\"datasetSource\":\"product\",\"kind\":\"title\",\"textValue\":\"\",\"textGlobalStyle\":\"heading-3\"}} />",
|
|
2905
|
+
" */",
|
|
1668
2906
|
"interface TextDatasetProps extends Sb.BaseProps {",
|
|
1669
|
-
" /** default: \"p\" */",
|
|
2907
|
+
" /** HTML Tag · default: \"p\" · e.g. \"p\" */",
|
|
1670
2908
|
" htmlTag?: string;",
|
|
1671
|
-
" /** default: false */",
|
|
2909
|
+
" /** default: false · e.g. true */",
|
|
1672
2910
|
" moreButtonEnabled?: boolean;",
|
|
1673
2911
|
" /** default: \"text-dataset-default\" */",
|
|
1674
2912
|
" stylePreset?: string;",
|
|
@@ -1676,7 +2914,22 @@ export const ENV_DTS = [
|
|
|
1676
2914
|
"}",
|
|
1677
2915
|
"declare function TextDataset(props: TextDatasetProps): JSX.Element;",
|
|
1678
2916
|
"",
|
|
1679
|
-
"/**
|
|
2917
|
+
"/**",
|
|
2918
|
+
" * Marquee (basic) — type \"text-marquee\"",
|
|
2919
|
+
" *",
|
|
2920
|
+
" * A horizontally-scrolling text marquee for announcements and promotions.",
|
|
2921
|
+
" *",
|
|
2922
|
+
" * Use when: To display a scrolling promotional banner or announcement strip; For sale or shipping notices that span the full width of a section.",
|
|
2923
|
+
" * Avoid when: For long body copy — use text instead.",
|
|
2924
|
+
" *",
|
|
2925
|
+
" * Children: ONLY <TextMarqueeItem> — push refuses any other child.",
|
|
2926
|
+
" *",
|
|
2927
|
+
" * @example",
|
|
2928
|
+
" * <TextMarquee>",
|
|
2929
|
+
" * <TextMarqueeItem text=\"Marquee item\" htmlTag=\"span\" />",
|
|
2930
|
+
" * <TextMarqueeItem text=\"Marquee item\" htmlTag=\"span\" />",
|
|
2931
|
+
" * </TextMarquee>",
|
|
2932
|
+
" */",
|
|
1680
2933
|
"interface TextMarqueeProps extends Sb.BaseProps {",
|
|
1681
2934
|
" /** default: \"Announce something…\" */",
|
|
1682
2935
|
" text?: string;",
|
|
@@ -1684,9 +2937,19 @@ export const ENV_DTS = [
|
|
|
1684
2937
|
"}",
|
|
1685
2938
|
"declare function TextMarquee(props: TextMarqueeProps): JSX.Element;",
|
|
1686
2939
|
"",
|
|
1687
|
-
"/**
|
|
2940
|
+
"/**",
|
|
2941
|
+
" * Marquee item (basic) — type \"text-marquee-item\"",
|
|
2942
|
+
" *",
|
|
2943
|
+
" * A single entry inside a Text marquee — a short scrolling message with optional leading icon and its own typography/background styling.",
|
|
2944
|
+
" *",
|
|
2945
|
+
" * Use when: Adding one message to a scrolling marquee strip (promo, announcement, USP).; Each marquee entry needs its own icon, colour, or emphasis..",
|
|
2946
|
+
" * Avoid when: You want a static (non-scrolling) list — use a List instead.; The content is a full paragraph — a marquee entry is a short phrase..",
|
|
2947
|
+
" *",
|
|
2948
|
+
" * Holds no children.",
|
|
2949
|
+
" * Goes inside <TextMarquee>.",
|
|
2950
|
+
" */",
|
|
1688
2951
|
"interface TextMarqueeItemProps extends Sb.BaseProps {",
|
|
1689
|
-
" /** default: \"span\" */",
|
|
2952
|
+
" /** HTML Tag · default: \"span\" */",
|
|
1690
2953
|
" htmlTag?: string;",
|
|
1691
2954
|
" /** default: \"StarFill\" */",
|
|
1692
2955
|
" icon?: string;",
|
|
@@ -1698,19 +2961,37 @@ export const ENV_DTS = [
|
|
|
1698
2961
|
"}",
|
|
1699
2962
|
"declare function TextMarqueeItem(props: TextMarqueeItemProps): JSX.Element;",
|
|
1700
2963
|
"",
|
|
1701
|
-
"/**
|
|
2964
|
+
"/**",
|
|
2965
|
+
" * Theme Switcher (basic) — type \"theme-switcher\"",
|
|
2966
|
+
" *",
|
|
2967
|
+
" * A light/dark mode switcher — the control a shopper uses to flip a published page between the site's light and dark colour schemes.",
|
|
2968
|
+
" *",
|
|
2969
|
+
" * Use when: When the site defines both a light and a dark colour scheme and visitors should be able to choose; In a header, footer, or navigation bar, where a site-wide control is expected to live.",
|
|
2970
|
+
" * Avoid when: When no scheme is assigned to dark mode — the control would render but change nothing on screen; More than once on a page: two switchers for one site-wide setting invite the shopper to wonder which one wins.",
|
|
2971
|
+
" *",
|
|
2972
|
+
" * Holds no children.",
|
|
2973
|
+
" */",
|
|
1702
2974
|
"interface ThemeSwitcherProps extends Sb.BaseProps {",
|
|
1703
|
-
" /** default: \"Dark\" */",
|
|
2975
|
+
" /** Dark label · default: \"Dark\" */",
|
|
1704
2976
|
" darkLabel?: string;",
|
|
1705
|
-
" /** default: \"Light\" */",
|
|
2977
|
+
" /** Light label · default: \"Light\" */",
|
|
1706
2978
|
" lightLabel?: string;",
|
|
1707
|
-
" /** default: \"icon\" */",
|
|
2979
|
+
" /** Style · default: \"icon\" */",
|
|
1708
2980
|
" variant?: string;",
|
|
1709
2981
|
" [special: string]: unknown;",
|
|
1710
2982
|
"}",
|
|
1711
2983
|
"declare function ThemeSwitcher(props: ThemeSwitcherProps): JSX.Element;",
|
|
1712
2984
|
"",
|
|
1713
|
-
"/**
|
|
2985
|
+
"/**",
|
|
2986
|
+
" * Video (media) — type \"video\"",
|
|
2987
|
+
" *",
|
|
2988
|
+
" * A self-hosted video player for an uploaded/hosted video file, with an optional poster.",
|
|
2989
|
+
" *",
|
|
2990
|
+
" * Use when: To play a self-hosted product demo, tutorial, or brand video from a file URL; When you control the video file and want a native player with a poster frame.",
|
|
2991
|
+
" * Avoid when: For a YouTube video — use youtube instead; For a Vimeo video — use vimeo instead; For an audio track — use soundcloud instead.",
|
|
2992
|
+
" *",
|
|
2993
|
+
" * Holds no children.",
|
|
2994
|
+
" */",
|
|
1714
2995
|
"interface VideoProps extends Sb.BaseProps {",
|
|
1715
2996
|
" /** default: \"\" */",
|
|
1716
2997
|
" poster?: string;",
|
|
@@ -1720,7 +3001,16 @@ export const ENV_DTS = [
|
|
|
1720
3001
|
"}",
|
|
1721
3002
|
"declare function Video(props: VideoProps): JSX.Element;",
|
|
1722
3003
|
"",
|
|
1723
|
-
"/**
|
|
3004
|
+
"/**",
|
|
3005
|
+
" * Vimeo (media) — type \"vimeo\"",
|
|
3006
|
+
" *",
|
|
3007
|
+
" * An embedded Vimeo video player.",
|
|
3008
|
+
" *",
|
|
3009
|
+
" * Use when: To embed a Vimeo video (portfolio, film, showcase) on a page; As a hero media element backed by a Vimeo link.",
|
|
3010
|
+
" * Avoid when: For a YouTube video — use youtube instead; For a self-hosted file — use video instead.",
|
|
3011
|
+
" *",
|
|
3012
|
+
" * Holds no children.",
|
|
3013
|
+
" */",
|
|
1724
3014
|
"interface VimeoProps extends Sb.BaseProps {",
|
|
1725
3015
|
" /** default: \"\" */",
|
|
1726
3016
|
" videoId?: string;",
|
|
@@ -1728,33 +3018,63 @@ export const ENV_DTS = [
|
|
|
1728
3018
|
"}",
|
|
1729
3019
|
"declare function Vimeo(props: VimeoProps): JSX.Element;",
|
|
1730
3020
|
"",
|
|
1731
|
-
"/**
|
|
3021
|
+
"/**",
|
|
3022
|
+
" * Voucher list (store) — type \"voucher-list\"",
|
|
3023
|
+
" *",
|
|
3024
|
+
" * A public list of the discount codes a merchant has explicitly opted into publishing — a card per voucher (code, a short title, what it saves, and any minimum-order condition), tap one to apply it to the cart or copy it to the clipboard. Fetched from the storefront on load; nothing here is authored per-product or per-collection.",
|
|
3025
|
+
" *",
|
|
3026
|
+
" * Use when: A promotions or collections page should show shoppers which codes are currently valid, without them having to be told the code elsewhere; The cart or checkout page should let a shopper pick from the shop's public codes instead of typing one blind.",
|
|
3027
|
+
" * Avoid when: The code is meant to be private or targeted (an email-only or influencer code) — only codes the merchant has explicitly marked public ever appear here; A single-use, one-time bearer code needs to be shown — those can never appear on this list by construction.",
|
|
3028
|
+
" *",
|
|
3029
|
+
" * Holds no children.",
|
|
3030
|
+
" *",
|
|
3031
|
+
" * @example",
|
|
3032
|
+
" * <VoucherList />",
|
|
3033
|
+
" */",
|
|
1732
3034
|
"interface VoucherListProps extends Sb.BaseProps {",
|
|
1733
|
-
" /** default: \"Áp dụng\" */",
|
|
3035
|
+
" /** Button text · default: \"Áp dụng\" · e.g. \"Apply\" */",
|
|
1734
3036
|
" buttonLabel?: string;",
|
|
1735
|
-
" /** default: \"Đã sao chép mã!\" */",
|
|
3037
|
+
" /** Copied · default: \"Đã sao chép mã!\" · e.g. \"Code copied!\" */",
|
|
1736
3038
|
" copiedText?: string;",
|
|
1737
|
-
" /** default: \"Hiện chưa có mã giảm giá nào.\" */",
|
|
3039
|
+
" /** Empty text · default: \"Hiện chưa có mã giảm giá nào.\" · e.g. \"No public codes right now.\" */",
|
|
1738
3040
|
" emptyText?: string;",
|
|
1739
|
-
" /** default: \"Không thể sao chép mã, vui lòng thử lại.\" */",
|
|
3041
|
+
" /** Copy failed · default: \"Không thể sao chép mã, vui lòng thử lại.\" · e.g. \"Couldn't copy — please try again.\" */",
|
|
1740
3042
|
" failedText?: string;",
|
|
1741
|
-
" /** default: \"Mã giảm giá đang có\" */",
|
|
3043
|
+
" /** Title · default: \"Mã giảm giá đang có\" · e.g. \"Available codes\" */",
|
|
1742
3044
|
" title?: string;",
|
|
1743
3045
|
" [special: string]: unknown;",
|
|
1744
3046
|
"}",
|
|
1745
3047
|
"declare function VoucherList(props: VoucherListProps): JSX.Element;",
|
|
1746
3048
|
"",
|
|
1747
|
-
"/**
|
|
3049
|
+
"/**",
|
|
3050
|
+
" * Wishlist (advanced) — type \"wishlist-list\"",
|
|
3051
|
+
" *",
|
|
3052
|
+
" * The products a shopper saved for later: a loading skeleton by default, an empty state when nothing is saved, or a grid of the saved products (image, title, price, and a remove control) — hydrated client-side from the shopper’s own list, never queried at render time. Works for an anonymous visitor too, whose saves live in the browser.",
|
|
3053
|
+
" *",
|
|
3054
|
+
" * Use when: On a /wishlist or /saved page, as the whole point of that page; On an /account page beside account-info and order-history, as the saved-items half of a dashboard.",
|
|
3055
|
+
" * Avoid when: To show a curated shelf a merchant chose — that is a product list with a collection source, not this; To show what OTHER shoppers saved (a \"most wanted\" shelf) — this is always the current visitor’s own list; As a cart — a saved item has no quantity and checking out is not an action here.",
|
|
3056
|
+
" *",
|
|
3057
|
+
" * Holds no children.",
|
|
3058
|
+
" */",
|
|
1748
3059
|
"interface WishlistListProps extends Sb.BaseProps {",
|
|
1749
|
-
" /** default: \"Bạn chưa lưu sản phẩm nào.\" */",
|
|
3060
|
+
" /** Empty message · default: \"Bạn chưa lưu sản phẩm nào.\" */",
|
|
1750
3061
|
" emptyText?: string;",
|
|
1751
|
-
" /** default: \"Đã lưu\" */",
|
|
3062
|
+
" /** Section title · default: \"Đã lưu\" */",
|
|
1752
3063
|
" title?: string;",
|
|
1753
3064
|
" [special: string]: unknown;",
|
|
1754
3065
|
"}",
|
|
1755
3066
|
"declare function WishlistList(props: WishlistListProps): JSX.Element;",
|
|
1756
3067
|
"",
|
|
1757
|
-
"/**
|
|
3068
|
+
"/**",
|
|
3069
|
+
" * YouTube (media) — type \"youtube\"",
|
|
3070
|
+
" *",
|
|
3071
|
+
" * An embedded YouTube video player.",
|
|
3072
|
+
" *",
|
|
3073
|
+
" * Use when: To embed a YouTube video (product demo, tutorial, brand film) on a page; As a hero media element backed by a YouTube link.",
|
|
3074
|
+
" * Avoid when: For a Vimeo video — use vimeo instead; For a self-hosted file — use video instead.",
|
|
3075
|
+
" *",
|
|
3076
|
+
" * Holds no children.",
|
|
3077
|
+
" */",
|
|
1758
3078
|
"interface YoutubeProps extends Sb.BaseProps {",
|
|
1759
3079
|
" /** default: \"\" */",
|
|
1760
3080
|
" videoId?: string;",
|
|
@@ -1762,4 +3082,1338 @@ export const ENV_DTS = [
|
|
|
1762
3082
|
"}",
|
|
1763
3083
|
"declare function Youtube(props: YoutubeProps): JSX.Element;",
|
|
1764
3084
|
].join('\n') + '\n';
|
|
3085
|
+
/** Containment, per type: what push and doctor check (rules.nodeChildAllows, rules.isRootOnly). */
|
|
3086
|
+
// prettier-ignore
|
|
3087
|
+
export const ELEMENT_RULES = {
|
|
3088
|
+
"accordion": {
|
|
3089
|
+
"allows": [
|
|
3090
|
+
"accordion-content"
|
|
3091
|
+
],
|
|
3092
|
+
"rootOnly": false,
|
|
3093
|
+
"satellites": [
|
|
3094
|
+
{
|
|
3095
|
+
"type": "accordion-item",
|
|
3096
|
+
"configKey": "accordionItemId"
|
|
3097
|
+
}
|
|
3098
|
+
],
|
|
3099
|
+
"container": true
|
|
3100
|
+
},
|
|
3101
|
+
"carousel": {
|
|
3102
|
+
"allows": [
|
|
3103
|
+
"carousel-slide"
|
|
3104
|
+
],
|
|
3105
|
+
"rootOnly": false,
|
|
3106
|
+
"satellites": [],
|
|
3107
|
+
"container": true
|
|
3108
|
+
},
|
|
3109
|
+
"cart-drawer": {
|
|
3110
|
+
"allows": [],
|
|
3111
|
+
"rootOnly": true,
|
|
3112
|
+
"satellites": [],
|
|
3113
|
+
"container": true
|
|
3114
|
+
},
|
|
3115
|
+
"cart-order": {
|
|
3116
|
+
"allows": [],
|
|
3117
|
+
"rootOnly": false,
|
|
3118
|
+
"satellites": [
|
|
3119
|
+
{
|
|
3120
|
+
"type": "list-empty",
|
|
3121
|
+
"configKey": "emptyStateId"
|
|
3122
|
+
}
|
|
3123
|
+
],
|
|
3124
|
+
"container": true
|
|
3125
|
+
},
|
|
3126
|
+
"content-list": {
|
|
3127
|
+
"allows": [
|
|
3128
|
+
"content-list-item"
|
|
3129
|
+
],
|
|
3130
|
+
"rootOnly": false,
|
|
3131
|
+
"satellites": [],
|
|
3132
|
+
"container": true
|
|
3133
|
+
},
|
|
3134
|
+
"dataset-block": {
|
|
3135
|
+
"allows": [],
|
|
3136
|
+
"rootOnly": false,
|
|
3137
|
+
"satellites": [
|
|
3138
|
+
{
|
|
3139
|
+
"type": "list-empty",
|
|
3140
|
+
"configKey": "emptyStateId"
|
|
3141
|
+
}
|
|
3142
|
+
],
|
|
3143
|
+
"container": true
|
|
3144
|
+
},
|
|
3145
|
+
"dropdown": {
|
|
3146
|
+
"allows": [
|
|
3147
|
+
"dropdown-trigger",
|
|
3148
|
+
"dropdown-panel"
|
|
3149
|
+
],
|
|
3150
|
+
"rootOnly": false,
|
|
3151
|
+
"satellites": [],
|
|
3152
|
+
"container": true
|
|
3153
|
+
},
|
|
3154
|
+
"flex-section": {
|
|
3155
|
+
"allows": [],
|
|
3156
|
+
"rootOnly": true,
|
|
3157
|
+
"satellites": [],
|
|
3158
|
+
"container": true
|
|
3159
|
+
},
|
|
3160
|
+
"form-step-nav": {
|
|
3161
|
+
"allows": [
|
|
3162
|
+
"form-step-button",
|
|
3163
|
+
"form-step-count",
|
|
3164
|
+
"form-submit"
|
|
3165
|
+
],
|
|
3166
|
+
"rootOnly": false,
|
|
3167
|
+
"satellites": [],
|
|
3168
|
+
"container": true
|
|
3169
|
+
},
|
|
3170
|
+
"icon": {
|
|
3171
|
+
"allows": [],
|
|
3172
|
+
"rootOnly": false,
|
|
3173
|
+
"satellites": [
|
|
3174
|
+
{
|
|
3175
|
+
"type": "cart-count",
|
|
3176
|
+
"configKey": "cartCountId"
|
|
3177
|
+
}
|
|
3178
|
+
],
|
|
3179
|
+
"container": false
|
|
3180
|
+
},
|
|
3181
|
+
"image-marquee": {
|
|
3182
|
+
"allows": [
|
|
3183
|
+
"image"
|
|
3184
|
+
],
|
|
3185
|
+
"rootOnly": false,
|
|
3186
|
+
"satellites": [],
|
|
3187
|
+
"container": true
|
|
3188
|
+
},
|
|
3189
|
+
"list": {
|
|
3190
|
+
"allows": [
|
|
3191
|
+
"list-item"
|
|
3192
|
+
],
|
|
3193
|
+
"rootOnly": false,
|
|
3194
|
+
"satellites": [],
|
|
3195
|
+
"container": true
|
|
3196
|
+
},
|
|
3197
|
+
"list-dataset": {
|
|
3198
|
+
"allows": [
|
|
3199
|
+
"dataset-block"
|
|
3200
|
+
],
|
|
3201
|
+
"rootOnly": false,
|
|
3202
|
+
"satellites": [
|
|
3203
|
+
{
|
|
3204
|
+
"type": "list-empty",
|
|
3205
|
+
"configKey": "emptyStateId"
|
|
3206
|
+
},
|
|
3207
|
+
{
|
|
3208
|
+
"type": "list-loading",
|
|
3209
|
+
"configKey": "loadingStateId"
|
|
3210
|
+
},
|
|
3211
|
+
{
|
|
3212
|
+
"type": "quickview",
|
|
3213
|
+
"configKey": "quickviewNodeId"
|
|
3214
|
+
}
|
|
3215
|
+
],
|
|
3216
|
+
"container": true
|
|
3217
|
+
},
|
|
3218
|
+
"media-dataset": {
|
|
3219
|
+
"allows": [
|
|
3220
|
+
"product-image-feature",
|
|
3221
|
+
"product-image-list"
|
|
3222
|
+
],
|
|
3223
|
+
"rootOnly": false,
|
|
3224
|
+
"satellites": [],
|
|
3225
|
+
"container": true
|
|
3226
|
+
},
|
|
3227
|
+
"menu": {
|
|
3228
|
+
"allows": [],
|
|
3229
|
+
"rootOnly": false,
|
|
3230
|
+
"satellites": [
|
|
3231
|
+
{
|
|
3232
|
+
"type": "menu-item",
|
|
3233
|
+
"configKey": "menuItemId"
|
|
3234
|
+
},
|
|
3235
|
+
{
|
|
3236
|
+
"type": "menu-dropdown",
|
|
3237
|
+
"configKey": "menuDropdownId"
|
|
3238
|
+
}
|
|
3239
|
+
],
|
|
3240
|
+
"container": false
|
|
3241
|
+
},
|
|
3242
|
+
"popover": {
|
|
3243
|
+
"allows": [
|
|
3244
|
+
"dropdown-trigger",
|
|
3245
|
+
"dropdown-panel"
|
|
3246
|
+
],
|
|
3247
|
+
"rootOnly": false,
|
|
3248
|
+
"satellites": [],
|
|
3249
|
+
"container": true
|
|
3250
|
+
},
|
|
3251
|
+
"popup": {
|
|
3252
|
+
"allows": [],
|
|
3253
|
+
"rootOnly": true,
|
|
3254
|
+
"satellites": [],
|
|
3255
|
+
"container": true
|
|
3256
|
+
},
|
|
3257
|
+
"product-variants": {
|
|
3258
|
+
"allows": [],
|
|
3259
|
+
"rootOnly": false,
|
|
3260
|
+
"satellites": [
|
|
3261
|
+
{
|
|
3262
|
+
"type": "product-variant-label",
|
|
3263
|
+
"configKey": "variantLabelId"
|
|
3264
|
+
},
|
|
3265
|
+
{
|
|
3266
|
+
"type": "product-variant-option",
|
|
3267
|
+
"configKey": "variantOptionId"
|
|
3268
|
+
}
|
|
3269
|
+
],
|
|
3270
|
+
"container": false
|
|
3271
|
+
},
|
|
3272
|
+
"quantity-dataset": {
|
|
3273
|
+
"allows": [],
|
|
3274
|
+
"rootOnly": false,
|
|
3275
|
+
"satellites": [
|
|
3276
|
+
{
|
|
3277
|
+
"type": "quantity-button",
|
|
3278
|
+
"configKey": "quantityButtonId"
|
|
3279
|
+
},
|
|
3280
|
+
{
|
|
3281
|
+
"type": "quantity-input",
|
|
3282
|
+
"configKey": "quantityInputId"
|
|
3283
|
+
}
|
|
3284
|
+
],
|
|
3285
|
+
"container": false
|
|
3286
|
+
},
|
|
3287
|
+
"root": {
|
|
3288
|
+
"allows": [],
|
|
3289
|
+
"rootOnly": true,
|
|
3290
|
+
"satellites": [],
|
|
3291
|
+
"container": true
|
|
3292
|
+
},
|
|
3293
|
+
"search-input": {
|
|
3294
|
+
"allows": [
|
|
3295
|
+
"list-dataset",
|
|
3296
|
+
"heading",
|
|
3297
|
+
"search-keywords"
|
|
3298
|
+
],
|
|
3299
|
+
"rootOnly": false,
|
|
3300
|
+
"satellites": [],
|
|
3301
|
+
"container": true
|
|
3302
|
+
},
|
|
3303
|
+
"select": {
|
|
3304
|
+
"allows": [
|
|
3305
|
+
"dropdown-trigger",
|
|
3306
|
+
"dropdown-panel"
|
|
3307
|
+
],
|
|
3308
|
+
"rootOnly": false,
|
|
3309
|
+
"satellites": [],
|
|
3310
|
+
"container": true
|
|
3311
|
+
},
|
|
3312
|
+
"tab": {
|
|
3313
|
+
"allows": [
|
|
3314
|
+
"tab-content"
|
|
3315
|
+
],
|
|
3316
|
+
"rootOnly": false,
|
|
3317
|
+
"satellites": [
|
|
3318
|
+
{
|
|
3319
|
+
"type": "tab-item",
|
|
3320
|
+
"configKey": "tabItemId"
|
|
3321
|
+
}
|
|
3322
|
+
],
|
|
3323
|
+
"container": true
|
|
3324
|
+
},
|
|
3325
|
+
"text-marquee": {
|
|
3326
|
+
"allows": [
|
|
3327
|
+
"text-marquee-item"
|
|
3328
|
+
],
|
|
3329
|
+
"rootOnly": false,
|
|
3330
|
+
"satellites": [],
|
|
3331
|
+
"container": true
|
|
3332
|
+
}
|
|
3333
|
+
};
|
|
3334
|
+
/** Types the registry no longer has but stored documents may still hold: delete them. */
|
|
3335
|
+
export const REMOVED_TYPES = ["search-result-item"];
|
|
3336
|
+
/** The native interactive elements (ai.ts semantics), for the components skill. */
|
|
3337
|
+
// prettier-ignore
|
|
3338
|
+
export const INTERACTIVE = [
|
|
3339
|
+
{
|
|
3340
|
+
"type": "accordion",
|
|
3341
|
+
"tag": "Accordion",
|
|
3342
|
+
"label": "Accordion",
|
|
3343
|
+
"what": "A vertically-stacked accordion that expands/collapses content panels."
|
|
3344
|
+
},
|
|
3345
|
+
{
|
|
3346
|
+
"type": "carousel",
|
|
3347
|
+
"tag": "Carousel",
|
|
3348
|
+
"label": "Carousel",
|
|
3349
|
+
"what": "A slideshow / carousel container."
|
|
3350
|
+
},
|
|
3351
|
+
{
|
|
3352
|
+
"type": "countdown",
|
|
3353
|
+
"tag": "Countdown",
|
|
3354
|
+
"label": "Countdown",
|
|
3355
|
+
"what": "A countdown to an absolute instant — four boxes (days, hours, minutes, seconds) counting down to a merchant-typed end time, or to a listed public discount's own end date when a code is named."
|
|
3356
|
+
},
|
|
3357
|
+
{
|
|
3358
|
+
"type": "dropdown",
|
|
3359
|
+
"tag": "Dropdown",
|
|
3360
|
+
"label": "Dropdown",
|
|
3361
|
+
"what": "An anchored dropdown: a trigger zone that opens a floating panel of arbitrary content directly under it."
|
|
3362
|
+
},
|
|
3363
|
+
{
|
|
3364
|
+
"type": "filter-slider",
|
|
3365
|
+
"tag": "FilterSlider",
|
|
3366
|
+
"label": "Slider",
|
|
3367
|
+
"what": "A storefront PRICE filter rendered as a track with two draggable handles and the two bound labels under it."
|
|
3368
|
+
},
|
|
3369
|
+
{
|
|
3370
|
+
"type": "image-comparison",
|
|
3371
|
+
"tag": "ImageComparison",
|
|
3372
|
+
"label": "Image Compare",
|
|
3373
|
+
"what": "A before/after image comparison widget with a draggable divider handle."
|
|
3374
|
+
},
|
|
3375
|
+
{
|
|
3376
|
+
"type": "image-marquee",
|
|
3377
|
+
"tag": "ImageMarquee",
|
|
3378
|
+
"label": "Image marquee",
|
|
3379
|
+
"what": "A horizontally-scrolling image/logo marquee for brand, partner, and press logos."
|
|
3380
|
+
},
|
|
3381
|
+
{
|
|
3382
|
+
"type": "popover",
|
|
3383
|
+
"tag": "Popover",
|
|
3384
|
+
"label": "Popover",
|
|
3385
|
+
"what": "An anchored popover: a trigger zone and a small card that floats beside it — above, below, left or right — with an arrow pointing back at the trigger."
|
|
3386
|
+
},
|
|
3387
|
+
{
|
|
3388
|
+
"type": "popup",
|
|
3389
|
+
"tag": "Popup",
|
|
3390
|
+
"label": "Pop-up",
|
|
3391
|
+
"what": "A site-owned panel that floats over the page and opens when a trigger with an open_popup action is clicked."
|
|
3392
|
+
},
|
|
3393
|
+
{
|
|
3394
|
+
"type": "tab",
|
|
3395
|
+
"tag": "Tab",
|
|
3396
|
+
"label": "Tab",
|
|
3397
|
+
"what": "A tabbed container that switches between several content panels."
|
|
3398
|
+
},
|
|
3399
|
+
{
|
|
3400
|
+
"type": "text-marquee",
|
|
3401
|
+
"tag": "TextMarquee",
|
|
3402
|
+
"label": "Marquee",
|
|
3403
|
+
"what": "A horizontally-scrolling text marquee for announcements and promotions."
|
|
3404
|
+
},
|
|
3405
|
+
{
|
|
3406
|
+
"type": "theme-switcher",
|
|
3407
|
+
"tag": "ThemeSwitcher",
|
|
3408
|
+
"label": "Theme Switcher",
|
|
3409
|
+
"what": "A light/dark mode switcher — the control a shopper uses to flip a published page between the site's light and dark colour schemes."
|
|
3410
|
+
}
|
|
3411
|
+
];
|
|
3412
|
+
/** The token ids a design/theme.json holds (schema/src/theme.ts). */
|
|
3413
|
+
// prettier-ignore
|
|
3414
|
+
export const THEME_TOKENS = {
|
|
3415
|
+
"version": 6,
|
|
3416
|
+
"colors": [
|
|
3417
|
+
"heading",
|
|
3418
|
+
"text",
|
|
3419
|
+
"primary",
|
|
3420
|
+
"muted",
|
|
3421
|
+
"background"
|
|
3422
|
+
],
|
|
3423
|
+
"textStyles": [
|
|
3424
|
+
"heading-1",
|
|
3425
|
+
"heading-2",
|
|
3426
|
+
"heading-3",
|
|
3427
|
+
"heading-4",
|
|
3428
|
+
"heading-5",
|
|
3429
|
+
"heading-6",
|
|
3430
|
+
"text-1",
|
|
3431
|
+
"text-2",
|
|
3432
|
+
"text-3"
|
|
3433
|
+
],
|
|
3434
|
+
"schemeRoles": [
|
|
3435
|
+
"background",
|
|
3436
|
+
"backgroundGradient",
|
|
3437
|
+
"text",
|
|
3438
|
+
"heading",
|
|
3439
|
+
"link",
|
|
3440
|
+
"buttonBg",
|
|
3441
|
+
"buttonBgGradient",
|
|
3442
|
+
"buttonText",
|
|
3443
|
+
"border",
|
|
3444
|
+
"shadow",
|
|
3445
|
+
"accent1",
|
|
3446
|
+
"accent2",
|
|
3447
|
+
"accent3"
|
|
3448
|
+
],
|
|
3449
|
+
"presetKinds": [
|
|
3450
|
+
"section",
|
|
3451
|
+
"container",
|
|
3452
|
+
"heading",
|
|
3453
|
+
"bodyText",
|
|
3454
|
+
"button",
|
|
3455
|
+
"icon",
|
|
3456
|
+
"media",
|
|
3457
|
+
"divider",
|
|
3458
|
+
"field"
|
|
3459
|
+
],
|
|
3460
|
+
"vars": {
|
|
3461
|
+
"color": "--wb-color-<id>",
|
|
3462
|
+
"textStyle": "--wb-ts-<slug>-<prop>",
|
|
3463
|
+
"schemeRole": "--wb-sc-<role>"
|
|
3464
|
+
}
|
|
3465
|
+
};
|
|
3466
|
+
/** The theme a site renders with until it saves one (DEFAULT_THEME): what pull writes then. */
|
|
3467
|
+
// prettier-ignore
|
|
3468
|
+
export const DEFAULT_THEME = {
|
|
3469
|
+
"version": 6,
|
|
3470
|
+
"fontsInherit": true,
|
|
3471
|
+
"colors": [
|
|
3472
|
+
{
|
|
3473
|
+
"id": "heading",
|
|
3474
|
+
"name": "Heading",
|
|
3475
|
+
"value": "#111827"
|
|
3476
|
+
},
|
|
3477
|
+
{
|
|
3478
|
+
"id": "text",
|
|
3479
|
+
"name": "Text",
|
|
3480
|
+
"value": "#374151"
|
|
3481
|
+
},
|
|
3482
|
+
{
|
|
3483
|
+
"id": "primary",
|
|
3484
|
+
"name": "Primary",
|
|
3485
|
+
"value": "#171717"
|
|
3486
|
+
},
|
|
3487
|
+
{
|
|
3488
|
+
"id": "muted",
|
|
3489
|
+
"name": "Muted",
|
|
3490
|
+
"value": "#6b7280"
|
|
3491
|
+
},
|
|
3492
|
+
{
|
|
3493
|
+
"id": "background",
|
|
3494
|
+
"name": "Background",
|
|
3495
|
+
"value": "#ffffff"
|
|
3496
|
+
}
|
|
3497
|
+
],
|
|
3498
|
+
"textStyles": [
|
|
3499
|
+
{
|
|
3500
|
+
"slug": "heading-1",
|
|
3501
|
+
"name": "Heading 1",
|
|
3502
|
+
"base": {
|
|
3503
|
+
"fontSize": "48px",
|
|
3504
|
+
"fontWeight": "700",
|
|
3505
|
+
"fontStyle": "normal",
|
|
3506
|
+
"lineHeight": "130%",
|
|
3507
|
+
"letterSpacing": "normal",
|
|
3508
|
+
"textTransform": "none",
|
|
3509
|
+
"colorRole": "heading",
|
|
3510
|
+
"colorRef": "heading"
|
|
3511
|
+
},
|
|
3512
|
+
"responsive": {
|
|
3513
|
+
"mobile": {
|
|
3514
|
+
"fontSize": "32px"
|
|
3515
|
+
}
|
|
3516
|
+
}
|
|
3517
|
+
},
|
|
3518
|
+
{
|
|
3519
|
+
"slug": "heading-2",
|
|
3520
|
+
"name": "Heading 2",
|
|
3521
|
+
"base": {
|
|
3522
|
+
"fontSize": "36px",
|
|
3523
|
+
"fontWeight": "700",
|
|
3524
|
+
"fontStyle": "normal",
|
|
3525
|
+
"lineHeight": "130%",
|
|
3526
|
+
"letterSpacing": "normal",
|
|
3527
|
+
"textTransform": "none",
|
|
3528
|
+
"colorRole": "heading",
|
|
3529
|
+
"colorRef": "heading"
|
|
3530
|
+
},
|
|
3531
|
+
"responsive": {
|
|
3532
|
+
"mobile": {
|
|
3533
|
+
"fontSize": "28px"
|
|
3534
|
+
}
|
|
3535
|
+
}
|
|
3536
|
+
},
|
|
3537
|
+
{
|
|
3538
|
+
"slug": "heading-3",
|
|
3539
|
+
"name": "Heading 3",
|
|
3540
|
+
"base": {
|
|
3541
|
+
"fontSize": "28px",
|
|
3542
|
+
"fontWeight": "600",
|
|
3543
|
+
"fontStyle": "normal",
|
|
3544
|
+
"lineHeight": "130%",
|
|
3545
|
+
"letterSpacing": "normal",
|
|
3546
|
+
"textTransform": "none",
|
|
3547
|
+
"colorRole": "heading",
|
|
3548
|
+
"colorRef": "heading"
|
|
3549
|
+
},
|
|
3550
|
+
"responsive": {
|
|
3551
|
+
"mobile": {
|
|
3552
|
+
"fontSize": "24px"
|
|
3553
|
+
}
|
|
3554
|
+
}
|
|
3555
|
+
},
|
|
3556
|
+
{
|
|
3557
|
+
"slug": "heading-4",
|
|
3558
|
+
"name": "Heading 4",
|
|
3559
|
+
"base": {
|
|
3560
|
+
"fontSize": "22px",
|
|
3561
|
+
"fontWeight": "600",
|
|
3562
|
+
"fontStyle": "normal",
|
|
3563
|
+
"lineHeight": "130%",
|
|
3564
|
+
"letterSpacing": "normal",
|
|
3565
|
+
"textTransform": "none",
|
|
3566
|
+
"colorRole": "heading",
|
|
3567
|
+
"colorRef": "heading"
|
|
3568
|
+
}
|
|
3569
|
+
},
|
|
3570
|
+
{
|
|
3571
|
+
"slug": "heading-5",
|
|
3572
|
+
"name": "Heading 5",
|
|
3573
|
+
"base": {
|
|
3574
|
+
"fontSize": "18px",
|
|
3575
|
+
"fontWeight": "600",
|
|
3576
|
+
"fontStyle": "normal",
|
|
3577
|
+
"lineHeight": "130%",
|
|
3578
|
+
"letterSpacing": "normal",
|
|
3579
|
+
"textTransform": "none",
|
|
3580
|
+
"colorRole": "heading",
|
|
3581
|
+
"colorRef": "heading"
|
|
3582
|
+
}
|
|
3583
|
+
},
|
|
3584
|
+
{
|
|
3585
|
+
"slug": "heading-6",
|
|
3586
|
+
"name": "Heading 6",
|
|
3587
|
+
"base": {
|
|
3588
|
+
"fontSize": "16px",
|
|
3589
|
+
"fontWeight": "600",
|
|
3590
|
+
"fontStyle": "normal",
|
|
3591
|
+
"lineHeight": "130%",
|
|
3592
|
+
"letterSpacing": "normal",
|
|
3593
|
+
"textTransform": "none",
|
|
3594
|
+
"colorRole": "heading",
|
|
3595
|
+
"colorRef": "heading"
|
|
3596
|
+
}
|
|
3597
|
+
},
|
|
3598
|
+
{
|
|
3599
|
+
"slug": "text-1",
|
|
3600
|
+
"name": "Text 1",
|
|
3601
|
+
"base": {
|
|
3602
|
+
"fontSize": "16px",
|
|
3603
|
+
"fontWeight": "400",
|
|
3604
|
+
"fontStyle": "normal",
|
|
3605
|
+
"lineHeight": "140%",
|
|
3606
|
+
"letterSpacing": "normal",
|
|
3607
|
+
"textTransform": "none",
|
|
3608
|
+
"colorRole": "text",
|
|
3609
|
+
"colorRef": "text"
|
|
3610
|
+
}
|
|
3611
|
+
},
|
|
3612
|
+
{
|
|
3613
|
+
"slug": "text-2",
|
|
3614
|
+
"name": "Text 2",
|
|
3615
|
+
"base": {
|
|
3616
|
+
"fontSize": "14px",
|
|
3617
|
+
"fontWeight": "400",
|
|
3618
|
+
"fontStyle": "normal",
|
|
3619
|
+
"lineHeight": "140%",
|
|
3620
|
+
"letterSpacing": "normal",
|
|
3621
|
+
"textTransform": "none",
|
|
3622
|
+
"colorRole": "text",
|
|
3623
|
+
"colorRef": "text"
|
|
3624
|
+
}
|
|
3625
|
+
},
|
|
3626
|
+
{
|
|
3627
|
+
"slug": "text-3",
|
|
3628
|
+
"name": "Text 3",
|
|
3629
|
+
"base": {
|
|
3630
|
+
"fontSize": "12px",
|
|
3631
|
+
"fontWeight": "400",
|
|
3632
|
+
"fontStyle": "normal",
|
|
3633
|
+
"lineHeight": "140%",
|
|
3634
|
+
"letterSpacing": "normal",
|
|
3635
|
+
"textTransform": "none",
|
|
3636
|
+
"colorRole": "text",
|
|
3637
|
+
"colorRef": "text"
|
|
3638
|
+
}
|
|
3639
|
+
}
|
|
3640
|
+
],
|
|
3641
|
+
"schemes": [
|
|
3642
|
+
{
|
|
3643
|
+
"id": "light",
|
|
3644
|
+
"name": "Light",
|
|
3645
|
+
"roles": {
|
|
3646
|
+
"background": "var(--wb-color-background)",
|
|
3647
|
+
"text": "var(--wb-color-text)",
|
|
3648
|
+
"heading": "var(--wb-color-heading)",
|
|
3649
|
+
"link": "var(--wb-color-primary)",
|
|
3650
|
+
"buttonBg": "var(--wb-color-primary)",
|
|
3651
|
+
"buttonText": "#ffffff",
|
|
3652
|
+
"border": "#e5e7eb",
|
|
3653
|
+
"shadow": "rgba(17,24,39,0.08)"
|
|
3654
|
+
}
|
|
3655
|
+
},
|
|
3656
|
+
{
|
|
3657
|
+
"id": "dark",
|
|
3658
|
+
"name": "Dark",
|
|
3659
|
+
"roles": {
|
|
3660
|
+
"background": "#111827",
|
|
3661
|
+
"text": "#d1d5db",
|
|
3662
|
+
"heading": "#ffffff",
|
|
3663
|
+
"link": "#ffffff",
|
|
3664
|
+
"buttonBg": "#ffffff",
|
|
3665
|
+
"buttonText": "#111827",
|
|
3666
|
+
"border": "rgba(255,255,255,0.16)",
|
|
3667
|
+
"shadow": "rgba(0,0,0,0.4)"
|
|
3668
|
+
}
|
|
3669
|
+
}
|
|
3670
|
+
],
|
|
3671
|
+
"lightSchemeId": "light",
|
|
3672
|
+
"presets": [
|
|
3673
|
+
{
|
|
3674
|
+
"id": "button-default",
|
|
3675
|
+
"name": "Default",
|
|
3676
|
+
"kind": "button",
|
|
3677
|
+
"base": {
|
|
3678
|
+
"backgroundColor": "var(--wb-sc-buttonBg, var(--wb-color-primary))",
|
|
3679
|
+
"color": "var(--wb-sc-buttonText, var(--wb-color-background))",
|
|
3680
|
+
"padding": "10px 24px",
|
|
3681
|
+
"textAlign": "center",
|
|
3682
|
+
"fontSize": "14px",
|
|
3683
|
+
"fontFamily": "var(--wb-ts-text-2-family, Inter)",
|
|
3684
|
+
"lineHeight": "20px"
|
|
3685
|
+
},
|
|
3686
|
+
"responsive": {
|
|
3687
|
+
"mobile": {
|
|
3688
|
+
"padding": "10px 18px"
|
|
3689
|
+
}
|
|
3690
|
+
}
|
|
3691
|
+
},
|
|
3692
|
+
{
|
|
3693
|
+
"id": "button-primary",
|
|
3694
|
+
"name": "Primary",
|
|
3695
|
+
"kind": "button",
|
|
3696
|
+
"base": {
|
|
3697
|
+
"backgroundColor": "var(--wb-sc-buttonBg, var(--wb-color-primary))",
|
|
3698
|
+
"color": "var(--wb-sc-buttonText, var(--wb-color-background))",
|
|
3699
|
+
"borderRadius": "8px",
|
|
3700
|
+
"padding": "12px 24px",
|
|
3701
|
+
"fontWeight": "600"
|
|
3702
|
+
},
|
|
3703
|
+
"responsive": {
|
|
3704
|
+
"mobile": {
|
|
3705
|
+
"padding": "10px 18px"
|
|
3706
|
+
}
|
|
3707
|
+
}
|
|
3708
|
+
},
|
|
3709
|
+
{
|
|
3710
|
+
"id": "button-outline",
|
|
3711
|
+
"name": "Outline",
|
|
3712
|
+
"kind": "button",
|
|
3713
|
+
"base": {
|
|
3714
|
+
"backgroundColor": "transparent",
|
|
3715
|
+
"color": "var(--wb-sc-buttonBg, var(--wb-color-primary))",
|
|
3716
|
+
"border": "1px solid var(--wb-sc-buttonBg, var(--wb-color-primary))",
|
|
3717
|
+
"borderRadius": "8px",
|
|
3718
|
+
"padding": "11px 23px",
|
|
3719
|
+
"fontWeight": "600"
|
|
3720
|
+
},
|
|
3721
|
+
"responsive": {
|
|
3722
|
+
"mobile": {
|
|
3723
|
+
"padding": "9px 17px"
|
|
3724
|
+
}
|
|
3725
|
+
}
|
|
3726
|
+
},
|
|
3727
|
+
{
|
|
3728
|
+
"id": "button-pill",
|
|
3729
|
+
"name": "Pill",
|
|
3730
|
+
"kind": "button",
|
|
3731
|
+
"base": {
|
|
3732
|
+
"backgroundColor": "var(--wb-sc-buttonBg, var(--wb-color-primary))",
|
|
3733
|
+
"color": "var(--wb-sc-buttonText, var(--wb-color-background))",
|
|
3734
|
+
"borderRadius": "999px",
|
|
3735
|
+
"padding": "12px 28px",
|
|
3736
|
+
"fontWeight": "600"
|
|
3737
|
+
},
|
|
3738
|
+
"responsive": {
|
|
3739
|
+
"mobile": {
|
|
3740
|
+
"padding": "10px 20px"
|
|
3741
|
+
}
|
|
3742
|
+
}
|
|
3743
|
+
},
|
|
3744
|
+
{
|
|
3745
|
+
"id": "button-soft",
|
|
3746
|
+
"name": "Soft",
|
|
3747
|
+
"kind": "button",
|
|
3748
|
+
"base": {
|
|
3749
|
+
"backgroundColor": "var(--wb-sc-border, var(--wb-color-muted))",
|
|
3750
|
+
"color": "var(--wb-sc-heading, var(--wb-color-heading))",
|
|
3751
|
+
"borderRadius": "8px",
|
|
3752
|
+
"padding": "12px 24px",
|
|
3753
|
+
"fontWeight": "600"
|
|
3754
|
+
},
|
|
3755
|
+
"responsive": {
|
|
3756
|
+
"mobile": {
|
|
3757
|
+
"padding": "10px 18px"
|
|
3758
|
+
}
|
|
3759
|
+
}
|
|
3760
|
+
},
|
|
3761
|
+
{
|
|
3762
|
+
"id": "button-text",
|
|
3763
|
+
"name": "Text link",
|
|
3764
|
+
"kind": "button",
|
|
3765
|
+
"base": {
|
|
3766
|
+
"backgroundColor": "transparent",
|
|
3767
|
+
"color": "var(--wb-sc-link, var(--wb-color-primary))",
|
|
3768
|
+
"padding": "8px 4px",
|
|
3769
|
+
"fontWeight": "600",
|
|
3770
|
+
"textDecoration": "underline"
|
|
3771
|
+
}
|
|
3772
|
+
},
|
|
3773
|
+
{
|
|
3774
|
+
"id": "button-cta",
|
|
3775
|
+
"name": "Large CTA",
|
|
3776
|
+
"kind": "button",
|
|
3777
|
+
"base": {
|
|
3778
|
+
"backgroundColor": "var(--wb-sc-buttonBg, var(--wb-color-primary))",
|
|
3779
|
+
"color": "var(--wb-sc-buttonText, var(--wb-color-background))",
|
|
3780
|
+
"borderRadius": "10px",
|
|
3781
|
+
"padding": "18px 40px",
|
|
3782
|
+
"fontWeight": "700"
|
|
3783
|
+
},
|
|
3784
|
+
"responsive": {
|
|
3785
|
+
"mobile": {
|
|
3786
|
+
"padding": "16px 24px",
|
|
3787
|
+
"width": "100%"
|
|
3788
|
+
}
|
|
3789
|
+
}
|
|
3790
|
+
},
|
|
3791
|
+
{
|
|
3792
|
+
"id": "container-section",
|
|
3793
|
+
"name": "Section",
|
|
3794
|
+
"kind": "section",
|
|
3795
|
+
"base": {
|
|
3796
|
+
"backgroundColor": "var(--wb-sc-background, var(--wb-color-background))",
|
|
3797
|
+
"padding": "64px 24px",
|
|
3798
|
+
"--wb-content-max": "1440px"
|
|
3799
|
+
},
|
|
3800
|
+
"responsive": {
|
|
3801
|
+
"tablet": {
|
|
3802
|
+
"padding": "48px 20px"
|
|
3803
|
+
},
|
|
3804
|
+
"mobile": {
|
|
3805
|
+
"padding": "32px 16px"
|
|
3806
|
+
}
|
|
3807
|
+
}
|
|
3808
|
+
},
|
|
3809
|
+
{
|
|
3810
|
+
"id": "section-narrow",
|
|
3811
|
+
"name": "Narrow",
|
|
3812
|
+
"kind": "section",
|
|
3813
|
+
"base": {
|
|
3814
|
+
"backgroundColor": "var(--wb-sc-background, var(--wb-color-background))",
|
|
3815
|
+
"padding": "64px 24px",
|
|
3816
|
+
"--wb-content-max": "760px"
|
|
3817
|
+
},
|
|
3818
|
+
"responsive": {
|
|
3819
|
+
"tablet": {
|
|
3820
|
+
"padding": "48px 20px"
|
|
3821
|
+
},
|
|
3822
|
+
"mobile": {
|
|
3823
|
+
"padding": "32px 16px"
|
|
3824
|
+
}
|
|
3825
|
+
}
|
|
3826
|
+
},
|
|
3827
|
+
{
|
|
3828
|
+
"id": "section-wide",
|
|
3829
|
+
"name": "Full width",
|
|
3830
|
+
"kind": "section",
|
|
3831
|
+
"base": {
|
|
3832
|
+
"backgroundColor": "var(--wb-sc-background, var(--wb-color-background))",
|
|
3833
|
+
"padding": "0px",
|
|
3834
|
+
"--wb-content-max": "none"
|
|
3835
|
+
}
|
|
3836
|
+
},
|
|
3837
|
+
{
|
|
3838
|
+
"id": "section-muted",
|
|
3839
|
+
"name": "Muted",
|
|
3840
|
+
"kind": "section",
|
|
3841
|
+
"base": {
|
|
3842
|
+
"backgroundColor": "var(--wb-sc-border, var(--wb-color-muted))",
|
|
3843
|
+
"padding": "64px 24px",
|
|
3844
|
+
"--wb-content-max": "1440px"
|
|
3845
|
+
},
|
|
3846
|
+
"responsive": {
|
|
3847
|
+
"tablet": {
|
|
3848
|
+
"padding": "48px 20px"
|
|
3849
|
+
},
|
|
3850
|
+
"mobile": {
|
|
3851
|
+
"padding": "32px 16px"
|
|
3852
|
+
}
|
|
3853
|
+
}
|
|
3854
|
+
},
|
|
3855
|
+
{
|
|
3856
|
+
"id": "section-compact",
|
|
3857
|
+
"name": "Compact",
|
|
3858
|
+
"kind": "section",
|
|
3859
|
+
"base": {
|
|
3860
|
+
"backgroundColor": "var(--wb-sc-background, var(--wb-color-background))",
|
|
3861
|
+
"padding": "24px",
|
|
3862
|
+
"--wb-content-max": "1440px"
|
|
3863
|
+
},
|
|
3864
|
+
"responsive": {
|
|
3865
|
+
"mobile": {
|
|
3866
|
+
"padding": "16px"
|
|
3867
|
+
}
|
|
3868
|
+
}
|
|
3869
|
+
},
|
|
3870
|
+
{
|
|
3871
|
+
"id": "container-card",
|
|
3872
|
+
"name": "Card",
|
|
3873
|
+
"kind": "container",
|
|
3874
|
+
"base": {
|
|
3875
|
+
"backgroundColor": "var(--wb-sc-background, var(--wb-color-background))",
|
|
3876
|
+
"border": "1px solid var(--wb-sc-border, var(--wb-color-muted))",
|
|
3877
|
+
"borderRadius": "12px",
|
|
3878
|
+
"padding": "24px"
|
|
3879
|
+
},
|
|
3880
|
+
"responsive": {
|
|
3881
|
+
"mobile": {
|
|
3882
|
+
"padding": "16px",
|
|
3883
|
+
"borderRadius": "10px"
|
|
3884
|
+
}
|
|
3885
|
+
}
|
|
3886
|
+
},
|
|
3887
|
+
{
|
|
3888
|
+
"id": "container-panel",
|
|
3889
|
+
"name": "Panel",
|
|
3890
|
+
"kind": "container",
|
|
3891
|
+
"base": {
|
|
3892
|
+
"backgroundColor": "var(--wb-sc-border, var(--wb-color-muted))",
|
|
3893
|
+
"borderRadius": "12px",
|
|
3894
|
+
"padding": "24px"
|
|
3895
|
+
},
|
|
3896
|
+
"responsive": {
|
|
3897
|
+
"mobile": {
|
|
3898
|
+
"padding": "16px"
|
|
3899
|
+
}
|
|
3900
|
+
}
|
|
3901
|
+
},
|
|
3902
|
+
{
|
|
3903
|
+
"id": "container-elevated",
|
|
3904
|
+
"name": "Elevated",
|
|
3905
|
+
"kind": "container",
|
|
3906
|
+
"base": {
|
|
3907
|
+
"backgroundColor": "var(--wb-sc-background, var(--wb-color-background))",
|
|
3908
|
+
"borderRadius": "14px",
|
|
3909
|
+
"padding": "28px",
|
|
3910
|
+
"boxShadow": "0 6px 24px var(--wb-sc-shadow, var(--wb-color-muted))"
|
|
3911
|
+
},
|
|
3912
|
+
"responsive": {
|
|
3913
|
+
"mobile": {
|
|
3914
|
+
"padding": "18px",
|
|
3915
|
+
"borderRadius": "12px"
|
|
3916
|
+
}
|
|
3917
|
+
}
|
|
3918
|
+
},
|
|
3919
|
+
{
|
|
3920
|
+
"id": "container-hero",
|
|
3921
|
+
"name": "Hero",
|
|
3922
|
+
"kind": "section",
|
|
3923
|
+
"base": {
|
|
3924
|
+
"backgroundColor": "var(--wb-sc-background, var(--wb-color-background))",
|
|
3925
|
+
"padding": "112px 24px",
|
|
3926
|
+
"textAlign": "center"
|
|
3927
|
+
},
|
|
3928
|
+
"responsive": {
|
|
3929
|
+
"tablet": {
|
|
3930
|
+
"padding": "80px 20px"
|
|
3931
|
+
},
|
|
3932
|
+
"mobile": {
|
|
3933
|
+
"padding": "56px 16px"
|
|
3934
|
+
}
|
|
3935
|
+
}
|
|
3936
|
+
},
|
|
3937
|
+
{
|
|
3938
|
+
"id": "container-narrow",
|
|
3939
|
+
"name": "Narrow",
|
|
3940
|
+
"kind": "container",
|
|
3941
|
+
"base": {
|
|
3942
|
+
"maxWidth": "760px",
|
|
3943
|
+
"marginLeft": "auto",
|
|
3944
|
+
"marginRight": "auto",
|
|
3945
|
+
"padding": "0 24px"
|
|
3946
|
+
},
|
|
3947
|
+
"responsive": {
|
|
3948
|
+
"mobile": {
|
|
3949
|
+
"padding": "0 16px"
|
|
3950
|
+
}
|
|
3951
|
+
}
|
|
3952
|
+
},
|
|
3953
|
+
{
|
|
3954
|
+
"id": "container-outline",
|
|
3955
|
+
"name": "Outline",
|
|
3956
|
+
"kind": "container",
|
|
3957
|
+
"base": {
|
|
3958
|
+
"border": "1px solid var(--wb-sc-border, var(--wb-color-muted))",
|
|
3959
|
+
"borderRadius": "12px",
|
|
3960
|
+
"padding": "24px"
|
|
3961
|
+
},
|
|
3962
|
+
"responsive": {
|
|
3963
|
+
"mobile": {
|
|
3964
|
+
"padding": "16px",
|
|
3965
|
+
"borderRadius": "10px"
|
|
3966
|
+
}
|
|
3967
|
+
}
|
|
3968
|
+
},
|
|
3969
|
+
{
|
|
3970
|
+
"id": "heading-default",
|
|
3971
|
+
"name": "Default",
|
|
3972
|
+
"kind": "heading",
|
|
3973
|
+
"base": {
|
|
3974
|
+
"textAlign": "left",
|
|
3975
|
+
"lineHeight": "130%",
|
|
3976
|
+
"fontFamily": "var(--wb-ts-heading-1-family, Inter)",
|
|
3977
|
+
"fontSize": "48px",
|
|
3978
|
+
"color": "var(--wb-sc-heading, var(--wb-color-heading))"
|
|
3979
|
+
},
|
|
3980
|
+
"responsive": {
|
|
3981
|
+
"tablet": {
|
|
3982
|
+
"fontSize": "40px"
|
|
3983
|
+
},
|
|
3984
|
+
"mobile": {
|
|
3985
|
+
"fontSize": "30px"
|
|
3986
|
+
}
|
|
3987
|
+
}
|
|
3988
|
+
},
|
|
3989
|
+
{
|
|
3990
|
+
"id": "heading-section",
|
|
3991
|
+
"name": "Section title",
|
|
3992
|
+
"kind": "heading",
|
|
3993
|
+
"base": {
|
|
3994
|
+
"color": "var(--wb-sc-heading, var(--wb-color-heading))",
|
|
3995
|
+
"textAlign": "center",
|
|
3996
|
+
"marginBottom": "16px"
|
|
3997
|
+
}
|
|
3998
|
+
},
|
|
3999
|
+
{
|
|
4000
|
+
"id": "heading-page",
|
|
4001
|
+
"name": "Page title",
|
|
4002
|
+
"kind": "heading",
|
|
4003
|
+
"base": {
|
|
4004
|
+
"color": "var(--wb-sc-heading, var(--wb-color-heading))",
|
|
4005
|
+
"textAlign": "left",
|
|
4006
|
+
"marginBottom": "24px"
|
|
4007
|
+
},
|
|
4008
|
+
"responsive": {
|
|
4009
|
+
"mobile": {
|
|
4010
|
+
"marginBottom": "16px"
|
|
4011
|
+
}
|
|
4012
|
+
}
|
|
4013
|
+
},
|
|
4014
|
+
{
|
|
4015
|
+
"id": "heading-eyebrow",
|
|
4016
|
+
"name": "Eyebrow",
|
|
4017
|
+
"kind": "heading",
|
|
4018
|
+
"base": {
|
|
4019
|
+
"color": "var(--wb-sc-link, var(--wb-color-primary))",
|
|
4020
|
+
"textTransform": "uppercase",
|
|
4021
|
+
"letterSpacing": "0.08em",
|
|
4022
|
+
"marginBottom": "8px"
|
|
4023
|
+
}
|
|
4024
|
+
},
|
|
4025
|
+
{
|
|
4026
|
+
"id": "heading-subtle",
|
|
4027
|
+
"name": "Subtle",
|
|
4028
|
+
"kind": "heading",
|
|
4029
|
+
"base": {
|
|
4030
|
+
"color": "var(--wb-sc-text, var(--wb-color-text))",
|
|
4031
|
+
"marginBottom": "12px"
|
|
4032
|
+
}
|
|
4033
|
+
},
|
|
4034
|
+
{
|
|
4035
|
+
"id": "heading-accent",
|
|
4036
|
+
"name": "Accent",
|
|
4037
|
+
"kind": "heading",
|
|
4038
|
+
"base": {
|
|
4039
|
+
"color": "var(--wb-sc-accent1, var(--wb-color-primary))",
|
|
4040
|
+
"textAlign": "center",
|
|
4041
|
+
"marginBottom": "16px"
|
|
4042
|
+
}
|
|
4043
|
+
},
|
|
4044
|
+
{
|
|
4045
|
+
"id": "heading-underlined",
|
|
4046
|
+
"name": "Underlined",
|
|
4047
|
+
"kind": "heading",
|
|
4048
|
+
"base": {
|
|
4049
|
+
"color": "var(--wb-sc-heading, var(--wb-color-heading))",
|
|
4050
|
+
"borderBottom": "2px solid var(--wb-sc-border, var(--wb-color-muted))",
|
|
4051
|
+
"paddingBottom": "12px",
|
|
4052
|
+
"marginBottom": "20px"
|
|
4053
|
+
}
|
|
4054
|
+
},
|
|
4055
|
+
{
|
|
4056
|
+
"id": "text-default",
|
|
4057
|
+
"name": "Default",
|
|
4058
|
+
"kind": "bodyText",
|
|
4059
|
+
"base": {
|
|
4060
|
+
"textAlign": "left",
|
|
4061
|
+
"lineHeight": "140%",
|
|
4062
|
+
"fontFamily": "var(--wb-ts-text-1-family, Inter)",
|
|
4063
|
+
"fontSize": "16px",
|
|
4064
|
+
"color": "var(--wb-sc-text, var(--wb-color-text))"
|
|
4065
|
+
}
|
|
4066
|
+
},
|
|
4067
|
+
{
|
|
4068
|
+
"id": "text-dataset-default",
|
|
4069
|
+
"name": "Default (dynamic)",
|
|
4070
|
+
"kind": "bodyText",
|
|
4071
|
+
"base": {
|
|
4072
|
+
"textAlign": "left",
|
|
4073
|
+
"lineHeight": "140%",
|
|
4074
|
+
"fontFamily": "var(--wb-ts-text-1-family, Inter)",
|
|
4075
|
+
"fontSize": "16px",
|
|
4076
|
+
"color": "var(--wb-sc-text, var(--wb-color-text))"
|
|
4077
|
+
}
|
|
4078
|
+
},
|
|
4079
|
+
{
|
|
4080
|
+
"id": "body-lead",
|
|
4081
|
+
"name": "Lead",
|
|
4082
|
+
"kind": "bodyText",
|
|
4083
|
+
"base": {
|
|
4084
|
+
"color": "var(--wb-sc-text, var(--wb-color-text))",
|
|
4085
|
+
"textAlign": "center",
|
|
4086
|
+
"maxWidth": "640px"
|
|
4087
|
+
}
|
|
4088
|
+
},
|
|
4089
|
+
{
|
|
4090
|
+
"id": "body-default",
|
|
4091
|
+
"name": "Body",
|
|
4092
|
+
"kind": "bodyText",
|
|
4093
|
+
"base": {
|
|
4094
|
+
"color": "var(--wb-sc-text, var(--wb-color-text))",
|
|
4095
|
+
"maxWidth": "680px"
|
|
4096
|
+
}
|
|
4097
|
+
},
|
|
4098
|
+
{
|
|
4099
|
+
"id": "body-muted",
|
|
4100
|
+
"name": "Muted",
|
|
4101
|
+
"kind": "bodyText",
|
|
4102
|
+
"base": {
|
|
4103
|
+
"color": "color-mix(in srgb, var(--wb-sc-text, var(--wb-color-text)) 65%, transparent)",
|
|
4104
|
+
"maxWidth": "680px"
|
|
4105
|
+
}
|
|
4106
|
+
},
|
|
4107
|
+
{
|
|
4108
|
+
"id": "body-centered",
|
|
4109
|
+
"name": "Centered",
|
|
4110
|
+
"kind": "bodyText",
|
|
4111
|
+
"base": {
|
|
4112
|
+
"color": "var(--wb-sc-text, var(--wb-color-text))",
|
|
4113
|
+
"textAlign": "center",
|
|
4114
|
+
"maxWidth": "560px",
|
|
4115
|
+
"marginLeft": "auto",
|
|
4116
|
+
"marginRight": "auto"
|
|
4117
|
+
}
|
|
4118
|
+
},
|
|
4119
|
+
{
|
|
4120
|
+
"id": "body-note",
|
|
4121
|
+
"name": "Note",
|
|
4122
|
+
"kind": "bodyText",
|
|
4123
|
+
"base": {
|
|
4124
|
+
"color": "color-mix(in srgb, var(--wb-sc-text, var(--wb-color-text)) 65%, transparent)",
|
|
4125
|
+
"marginTop": "8px"
|
|
4126
|
+
}
|
|
4127
|
+
},
|
|
4128
|
+
{
|
|
4129
|
+
"id": "body-quote",
|
|
4130
|
+
"name": "Quote",
|
|
4131
|
+
"kind": "bodyText",
|
|
4132
|
+
"base": {
|
|
4133
|
+
"color": "var(--wb-sc-heading, var(--wb-color-heading))",
|
|
4134
|
+
"borderLeft": "3px solid var(--wb-sc-accent1, var(--wb-color-primary))",
|
|
4135
|
+
"paddingLeft": "16px",
|
|
4136
|
+
"fontStyle": "italic"
|
|
4137
|
+
}
|
|
4138
|
+
},
|
|
4139
|
+
{
|
|
4140
|
+
"id": "icon-default",
|
|
4141
|
+
"name": "Default",
|
|
4142
|
+
"kind": "icon",
|
|
4143
|
+
"base": {
|
|
4144
|
+
"color": "var(--wb-sc-heading, var(--wb-color-heading))"
|
|
4145
|
+
}
|
|
4146
|
+
},
|
|
4147
|
+
{
|
|
4148
|
+
"id": "icon-badge",
|
|
4149
|
+
"name": "Badge",
|
|
4150
|
+
"kind": "icon",
|
|
4151
|
+
"base": {
|
|
4152
|
+
"color": "var(--wb-sc-buttonText, var(--wb-color-background))",
|
|
4153
|
+
"backgroundColor": "var(--wb-sc-buttonBg, var(--wb-color-primary))",
|
|
4154
|
+
"borderRadius": "999px",
|
|
4155
|
+
"padding": "8px"
|
|
4156
|
+
}
|
|
4157
|
+
},
|
|
4158
|
+
{
|
|
4159
|
+
"id": "icon-outline",
|
|
4160
|
+
"name": "Outline",
|
|
4161
|
+
"kind": "icon",
|
|
4162
|
+
"base": {
|
|
4163
|
+
"color": "var(--wb-sc-buttonBg, var(--wb-color-primary))",
|
|
4164
|
+
"borderWidth": "1px",
|
|
4165
|
+
"borderStyle": "solid",
|
|
4166
|
+
"borderColor": "var(--wb-sc-buttonBg, var(--wb-color-primary))",
|
|
4167
|
+
"borderRadius": "999px",
|
|
4168
|
+
"padding": "8px"
|
|
4169
|
+
}
|
|
4170
|
+
},
|
|
4171
|
+
{
|
|
4172
|
+
"id": "icon-soft",
|
|
4173
|
+
"name": "Soft",
|
|
4174
|
+
"kind": "icon",
|
|
4175
|
+
"base": {
|
|
4176
|
+
"color": "var(--wb-sc-heading, var(--wb-color-heading))",
|
|
4177
|
+
"backgroundColor": "var(--wb-sc-border, var(--wb-color-muted))",
|
|
4178
|
+
"borderRadius": "999px",
|
|
4179
|
+
"padding": "8px"
|
|
4180
|
+
}
|
|
4181
|
+
},
|
|
4182
|
+
{
|
|
4183
|
+
"id": "icon-square",
|
|
4184
|
+
"name": "Square",
|
|
4185
|
+
"kind": "icon",
|
|
4186
|
+
"base": {
|
|
4187
|
+
"color": "var(--wb-sc-buttonText, var(--wb-color-background))",
|
|
4188
|
+
"backgroundColor": "var(--wb-sc-buttonBg, var(--wb-color-primary))",
|
|
4189
|
+
"borderRadius": "8px",
|
|
4190
|
+
"padding": "8px"
|
|
4191
|
+
}
|
|
4192
|
+
},
|
|
4193
|
+
{
|
|
4194
|
+
"id": "icon-plain",
|
|
4195
|
+
"name": "Plain",
|
|
4196
|
+
"kind": "icon",
|
|
4197
|
+
"base": {
|
|
4198
|
+
"color": "var(--wb-sc-heading, var(--wb-color-heading))"
|
|
4199
|
+
}
|
|
4200
|
+
},
|
|
4201
|
+
{
|
|
4202
|
+
"id": "icon-accent",
|
|
4203
|
+
"name": "Accent",
|
|
4204
|
+
"kind": "icon",
|
|
4205
|
+
"base": {
|
|
4206
|
+
"color": "var(--wb-sc-accent1, var(--wb-color-primary))"
|
|
4207
|
+
}
|
|
4208
|
+
},
|
|
4209
|
+
{
|
|
4210
|
+
"id": "image-default",
|
|
4211
|
+
"name": "Default",
|
|
4212
|
+
"kind": "media",
|
|
4213
|
+
"base": {
|
|
4214
|
+
"objectFit": "cover",
|
|
4215
|
+
"objectPosition": "top left"
|
|
4216
|
+
}
|
|
4217
|
+
},
|
|
4218
|
+
{
|
|
4219
|
+
"id": "media-rounded",
|
|
4220
|
+
"name": "Rounded",
|
|
4221
|
+
"kind": "media",
|
|
4222
|
+
"base": {
|
|
4223
|
+
"borderRadius": "12px",
|
|
4224
|
+
"overflow": "hidden"
|
|
4225
|
+
},
|
|
4226
|
+
"responsive": {
|
|
4227
|
+
"mobile": {
|
|
4228
|
+
"borderRadius": "8px"
|
|
4229
|
+
}
|
|
4230
|
+
}
|
|
4231
|
+
},
|
|
4232
|
+
{
|
|
4233
|
+
"id": "media-circle",
|
|
4234
|
+
"name": "Circle",
|
|
4235
|
+
"kind": "media",
|
|
4236
|
+
"base": {
|
|
4237
|
+
"borderRadius": "999px",
|
|
4238
|
+
"overflow": "hidden"
|
|
4239
|
+
}
|
|
4240
|
+
},
|
|
4241
|
+
{
|
|
4242
|
+
"id": "media-square",
|
|
4243
|
+
"name": "Square",
|
|
4244
|
+
"kind": "media",
|
|
4245
|
+
"base": {
|
|
4246
|
+
"borderRadius": "0px",
|
|
4247
|
+
"overflow": "hidden"
|
|
4248
|
+
}
|
|
4249
|
+
},
|
|
4250
|
+
{
|
|
4251
|
+
"id": "media-card",
|
|
4252
|
+
"name": "Card",
|
|
4253
|
+
"kind": "media",
|
|
4254
|
+
"base": {
|
|
4255
|
+
"borderRadius": "12px",
|
|
4256
|
+
"overflow": "hidden",
|
|
4257
|
+
"boxShadow": "0 6px 24px var(--wb-sc-shadow, var(--wb-color-muted))"
|
|
4258
|
+
},
|
|
4259
|
+
"responsive": {
|
|
4260
|
+
"mobile": {
|
|
4261
|
+
"borderRadius": "10px"
|
|
4262
|
+
}
|
|
4263
|
+
}
|
|
4264
|
+
},
|
|
4265
|
+
{
|
|
4266
|
+
"id": "media-bordered",
|
|
4267
|
+
"name": "Bordered",
|
|
4268
|
+
"kind": "media",
|
|
4269
|
+
"base": {
|
|
4270
|
+
"borderRadius": "12px",
|
|
4271
|
+
"overflow": "hidden",
|
|
4272
|
+
"border": "1px solid var(--wb-sc-border, var(--wb-color-muted))"
|
|
4273
|
+
}
|
|
4274
|
+
},
|
|
4275
|
+
{
|
|
4276
|
+
"id": "media-framed",
|
|
4277
|
+
"name": "Framed",
|
|
4278
|
+
"kind": "media",
|
|
4279
|
+
"base": {
|
|
4280
|
+
"borderRadius": "12px",
|
|
4281
|
+
"overflow": "hidden",
|
|
4282
|
+
"border": "8px solid var(--wb-sc-background, var(--wb-color-background))",
|
|
4283
|
+
"boxShadow": "0 2px 10px var(--wb-sc-shadow, var(--wb-color-muted))"
|
|
4284
|
+
},
|
|
4285
|
+
"responsive": {
|
|
4286
|
+
"mobile": {
|
|
4287
|
+
"border": "4px solid var(--wb-sc-background, var(--wb-color-background))"
|
|
4288
|
+
}
|
|
4289
|
+
}
|
|
4290
|
+
},
|
|
4291
|
+
{
|
|
4292
|
+
"id": "divider-hairline",
|
|
4293
|
+
"name": "Hairline",
|
|
4294
|
+
"kind": "divider",
|
|
4295
|
+
"base": {
|
|
4296
|
+
"--wb-divider-thickness": "1px",
|
|
4297
|
+
"--wb-divider-style": "solid",
|
|
4298
|
+
"--wb-divider-color": "var(--wb-sc-border, var(--wb-color-muted))"
|
|
4299
|
+
}
|
|
4300
|
+
},
|
|
4301
|
+
{
|
|
4302
|
+
"id": "divider-thick",
|
|
4303
|
+
"name": "Thick",
|
|
4304
|
+
"kind": "divider",
|
|
4305
|
+
"base": {
|
|
4306
|
+
"--wb-divider-thickness": "3px",
|
|
4307
|
+
"--wb-divider-style": "solid",
|
|
4308
|
+
"--wb-divider-color": "var(--wb-sc-border, var(--wb-color-muted))"
|
|
4309
|
+
}
|
|
4310
|
+
},
|
|
4311
|
+
{
|
|
4312
|
+
"id": "divider-dashed",
|
|
4313
|
+
"name": "Dashed",
|
|
4314
|
+
"kind": "divider",
|
|
4315
|
+
"base": {
|
|
4316
|
+
"--wb-divider-thickness": "1px",
|
|
4317
|
+
"--wb-divider-style": "dashed",
|
|
4318
|
+
"--wb-divider-color": "var(--wb-sc-border, var(--wb-color-muted))"
|
|
4319
|
+
}
|
|
4320
|
+
},
|
|
4321
|
+
{
|
|
4322
|
+
"id": "quantity-input-default",
|
|
4323
|
+
"name": "Default (quantity)",
|
|
4324
|
+
"kind": "field",
|
|
4325
|
+
"base": {
|
|
4326
|
+
"backgroundColor": "var(--wb-sc-background, var(--wb-color-background))"
|
|
4327
|
+
}
|
|
4328
|
+
},
|
|
4329
|
+
{
|
|
4330
|
+
"id": "search-input-default",
|
|
4331
|
+
"name": "Default (search)",
|
|
4332
|
+
"kind": "field",
|
|
4333
|
+
"base": {
|
|
4334
|
+
"gap": "8px",
|
|
4335
|
+
"padding": "10px 14px",
|
|
4336
|
+
"backgroundColor": "var(--wb-sc-background, var(--wb-color-background))",
|
|
4337
|
+
"borderRadius": "8px",
|
|
4338
|
+
"borderWidth": "1px",
|
|
4339
|
+
"borderStyle": "solid",
|
|
4340
|
+
"borderColor": "var(--wb-sc-border, var(--wb-color-muted))"
|
|
4341
|
+
}
|
|
4342
|
+
},
|
|
4343
|
+
{
|
|
4344
|
+
"id": "field-boxed",
|
|
4345
|
+
"name": "Boxed",
|
|
4346
|
+
"kind": "field",
|
|
4347
|
+
"base": {
|
|
4348
|
+
"backgroundColor": "var(--wb-sc-background, var(--wb-color-background))",
|
|
4349
|
+
"color": "var(--wb-sc-text, var(--wb-color-text))",
|
|
4350
|
+
"border": "1px solid var(--wb-sc-border, var(--wb-color-muted))",
|
|
4351
|
+
"borderRadius": "8px",
|
|
4352
|
+
"padding": "10px 12px"
|
|
4353
|
+
}
|
|
4354
|
+
},
|
|
4355
|
+
{
|
|
4356
|
+
"id": "field-rounded",
|
|
4357
|
+
"name": "Rounded",
|
|
4358
|
+
"kind": "field",
|
|
4359
|
+
"base": {
|
|
4360
|
+
"backgroundColor": "var(--wb-sc-background, var(--wb-color-background))",
|
|
4361
|
+
"color": "var(--wb-sc-text, var(--wb-color-text))",
|
|
4362
|
+
"border": "1px solid var(--wb-sc-border, var(--wb-color-muted))",
|
|
4363
|
+
"borderRadius": "999px",
|
|
4364
|
+
"padding": "10px 18px"
|
|
4365
|
+
}
|
|
4366
|
+
},
|
|
4367
|
+
{
|
|
4368
|
+
"id": "field-underline",
|
|
4369
|
+
"name": "Underline",
|
|
4370
|
+
"kind": "field",
|
|
4371
|
+
"base": {
|
|
4372
|
+
"backgroundColor": "transparent",
|
|
4373
|
+
"color": "var(--wb-sc-text, var(--wb-color-text))",
|
|
4374
|
+
"borderBottom": "1px solid var(--wb-sc-border, var(--wb-color-muted))",
|
|
4375
|
+
"borderRadius": "0px",
|
|
4376
|
+
"padding": "10px 2px"
|
|
4377
|
+
}
|
|
4378
|
+
},
|
|
4379
|
+
{
|
|
4380
|
+
"id": "field-soft",
|
|
4381
|
+
"name": "Soft",
|
|
4382
|
+
"kind": "field",
|
|
4383
|
+
"base": {
|
|
4384
|
+
"backgroundColor": "var(--wb-sc-border, var(--wb-color-muted))",
|
|
4385
|
+
"color": "var(--wb-sc-heading, var(--wb-color-heading))",
|
|
4386
|
+
"borderRadius": "8px",
|
|
4387
|
+
"padding": "10px 12px"
|
|
4388
|
+
}
|
|
4389
|
+
},
|
|
4390
|
+
{
|
|
4391
|
+
"id": "field-large",
|
|
4392
|
+
"name": "Large",
|
|
4393
|
+
"kind": "field",
|
|
4394
|
+
"base": {
|
|
4395
|
+
"backgroundColor": "var(--wb-sc-background, var(--wb-color-background))",
|
|
4396
|
+
"color": "var(--wb-sc-text, var(--wb-color-text))",
|
|
4397
|
+
"border": "1px solid var(--wb-sc-border, var(--wb-color-muted))",
|
|
4398
|
+
"borderRadius": "10px",
|
|
4399
|
+
"padding": "16px 18px"
|
|
4400
|
+
},
|
|
4401
|
+
"responsive": {
|
|
4402
|
+
"mobile": {
|
|
4403
|
+
"padding": "13px 14px"
|
|
4404
|
+
}
|
|
4405
|
+
}
|
|
4406
|
+
},
|
|
4407
|
+
{
|
|
4408
|
+
"id": "field-minimal",
|
|
4409
|
+
"name": "Minimal",
|
|
4410
|
+
"kind": "field",
|
|
4411
|
+
"base": {
|
|
4412
|
+
"backgroundColor": "transparent",
|
|
4413
|
+
"color": "var(--wb-sc-text, var(--wb-color-text))",
|
|
4414
|
+
"padding": "10px 2px"
|
|
4415
|
+
}
|
|
4416
|
+
}
|
|
4417
|
+
]
|
|
4418
|
+
};
|
|
1765
4419
|
//# sourceMappingURL=envtypes.gen.js.map
|