@muibook/components 8.0.2 → 9.1.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 +8 -1
- package/dist/esm/agent/keywords/index.js +2 -2
- package/dist/esm/agent/prompts/index.js +856 -4
- package/dist/esm/components/mui-alert/index.js +48 -40
- package/dist/esm/components/mui-body/index.js +8 -0
- package/dist/esm/components/mui-button/index.js +47 -42
- package/dist/esm/components/mui-card/body/index.js +42 -29
- package/dist/esm/components/mui-checkbox/index.js +38 -39
- package/dist/esm/components/mui-dialog/index.js +4 -0
- package/dist/esm/components/mui-file-upload/index.js +12 -3
- package/dist/esm/components/mui-grid/index.js +19 -12
- package/dist/esm/components/mui-heading/index.js +11 -5
- package/dist/esm/components/mui-input/index.js +45 -38
- package/dist/esm/components/mui-select/index.js +42 -30
- package/dist/esm/components/mui-smart-card/index.js +1 -0
- package/dist/esm/components/mui-stack/hstack/index.js +13 -13
- package/dist/esm/components/mui-stack/vstack/index.js +13 -13
- package/dist/esm/components/mui-switch/index.js +38 -30
- package/dist/esm/components/mui-tabs/item/index.js +18 -12
- package/dist/esm/css/mui-brand.css +179 -0
- package/dist/esm/css/mui-tokens.css +31 -221
- package/dist/esm/css/readme.md +129 -0
- package/dist/esm/custom-elements.json +308 -133
- package/dist/esm/tokens/js/index.js +140 -0
- package/dist/types/agent/prompts/index.d.ts +9 -0
- package/dist/types/tokens/js/index.d.ts +140 -0
- package/dist/types/tokens/js/mui-brand.d.ts +140 -0
- package/package.json +14 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const e = [
|
|
2
2
|
{
|
|
3
3
|
role: "system",
|
|
4
4
|
content: `
|
|
@@ -28,7 +28,7 @@ Rules:
|
|
|
28
28
|
placeholder: '<mui-field label="Email"><mui-input type="email" placeholder="you@example.com" value="..."></mui-input></mui-field>',
|
|
29
29
|
message: `<mui-field label="Name" message="This field doesn't accept special characters"><mui-input></mui-input></mui-field>`,
|
|
30
30
|
select: `<mui-field label="Brand"><mui-select options='[{ "value": "jpy", "label": "JPY" },{ "value": "usd", "label": "USD" }]'></mui-select></mui-field>`,
|
|
31
|
-
inputAndSelect: `<mui-field label="Amount to transfer"
|
|
31
|
+
inputAndSelect: `<mui-field label="Amount to transfer"><mui-input type="number"><mui-select slot="after" label="Currency" hide-label style="width: 100px;" options='[{ "value": "jpy", "label": "JPY" },{ "value": "usd", "label": "USD" }]'></mui-select></mui-input></mui-field>`
|
|
32
32
|
},
|
|
33
33
|
addon: {
|
|
34
34
|
text: [
|
|
@@ -71,7 +71,13 @@ Rules:
|
|
|
71
71
|
caption: '<mui-image><img slot="image" src="https://muibook.com/images/buttercup.png" alt="..."/><figcaption slot="caption">This is a caption</figcaption></mui-image>'
|
|
72
72
|
},
|
|
73
73
|
heading: "<mui-heading>...</mui-heading>",
|
|
74
|
-
body:
|
|
74
|
+
body: {
|
|
75
|
+
default: "<mui-body>...</mui-body>",
|
|
76
|
+
optional: '<mui-body variant="optional">...</mui-body>',
|
|
77
|
+
success: '<mui-body variant="success">...</mui-body>',
|
|
78
|
+
warning: '<mui-body variant="warning">...</mui-body>',
|
|
79
|
+
error: '<mui-body variant="error">...</mui-body>'
|
|
80
|
+
},
|
|
75
81
|
code: "<mui-code>...</mui-code>",
|
|
76
82
|
dialog: "<mui-dialog>...</mui-dialog>",
|
|
77
83
|
drawer: "<mui-drawer>...</mui-drawer>",
|
|
@@ -131,7 +137,853 @@ Rules:
|
|
|
131
137
|
tabItem: "<mui-tab-item>...</mui-tab-item>"
|
|
132
138
|
})
|
|
133
139
|
}
|
|
140
|
+
], i = [
|
|
141
|
+
{
|
|
142
|
+
role: "system",
|
|
143
|
+
content: `
|
|
144
|
+
You are a UI generator that creates component trees in JSON format for a MUIBOOK design system.
|
|
145
|
+
|
|
146
|
+
Your output must be valid JSON representing a tree structure where each node has:
|
|
147
|
+
- type: The component type (VStack, HStack, Button, Input, etc.)
|
|
148
|
+
- id: A unique identifier (use descriptive names like "header", "submit-btn", "email-input")
|
|
149
|
+
- props: An object containing component-specific properties
|
|
150
|
+
- children: An array of child nodes (empty array [] if no children)
|
|
151
|
+
|
|
152
|
+
CRITICAL RULES:
|
|
153
|
+
1. Always return ONLY valid JSON - no markdown, no code blocks, no explanations
|
|
154
|
+
2. Every node MUST have: type, id, props, and children
|
|
155
|
+
3. IDs must be unique across the entire tree
|
|
156
|
+
4. Use descriptive IDs that reflect the component's purpose
|
|
157
|
+
5. Every Card MUST contain a CardBody as its direct child. All card content goes inside CardBody.
|
|
158
|
+
6. Container components (VStack, HStack, Grid, Card, etc.) can have children
|
|
159
|
+
7. Leaf components (Input, Button, Heading, Body, etc.) have children: []
|
|
160
|
+
8. Props must match the component's API (see examples below)
|
|
161
|
+
9. If you are adding an item to the root (canvas), use the Container with center and medium
|
|
162
|
+
|
|
163
|
+
Available Components:
|
|
164
|
+
|
|
165
|
+
LAYOUT CONTAINERS (allow children):
|
|
166
|
+
- VStack: Vertical stack with spacing
|
|
167
|
+
Props: space ("000" to "600"), alignX ("start"|"center"|"end"|"stretch"), alignY ("start"|"center"|"end"|"stretch")
|
|
168
|
+
- HStack: Horizontal stack with spacing
|
|
169
|
+
Props: space ("000" to "600"), alignX ("start"|"center"|"end"|"stretch"), alignY ("start"|"center"|"end"|"stretch")
|
|
170
|
+
- Grid: CSS Grid layout
|
|
171
|
+
Props: col (string like "1fr"|"1fr 1fr"|"1fr 1fr 1fr" or custom grid template), space ("var(--space-000)" to "var(--space-600)"), alignX ("normal"|"start"|"center"|"end"), alignY ("normal"|"start"|"center"|"end")
|
|
172
|
+
- Card: Container with border/shadow
|
|
173
|
+
Props: footer (boolean) - to indicate if footer is present
|
|
174
|
+
- CardHeader: Card header section
|
|
175
|
+
Props: none
|
|
176
|
+
- CardBody: Card body section
|
|
177
|
+
Props: condensed (boolean)
|
|
178
|
+
- CardFooter: Card footer section
|
|
179
|
+
Props: none
|
|
180
|
+
- Container: Full-width container
|
|
181
|
+
Props: size ("small"|"medium"|"large"|"fluid"), center (boolean)
|
|
182
|
+
- Responsive: Responsive wrapper
|
|
183
|
+
Props: breakpoint (string), breakpoint-low (string), breakpoint-high (string)
|
|
184
|
+
|
|
185
|
+
CONTENT (no children unless specified):
|
|
186
|
+
- Heading: Heading text
|
|
187
|
+
Props: size ("1" to "6"), level ("1" to "6")
|
|
188
|
+
Slots: default (text)
|
|
189
|
+
- Body: Body text
|
|
190
|
+
Props: size ("x-small"|"small"|"medium"|"large"), weight ("regular"|"bold"), variant ("default"|"success"|"warning"|"error")
|
|
191
|
+
Slots: default (text)
|
|
192
|
+
- Rule: Horizontal divider
|
|
193
|
+
Props: length (string), weight (string), direction ("horizontal"|"vertical")
|
|
194
|
+
- Accordion: Collapsible content (allows children)
|
|
195
|
+
Props: open (boolean)
|
|
196
|
+
Slots: summary (accordion header), detail (accordion content)
|
|
197
|
+
- AccordionBlock: Block-style accordion (allows children)
|
|
198
|
+
Props: none
|
|
199
|
+
Slots: summary (header), detail (content)
|
|
200
|
+
- AccordionInline: Inline-style accordion (allows children)
|
|
201
|
+
Props: none
|
|
202
|
+
Slots: summary (header), detail (content)
|
|
203
|
+
- AccordionGroup: Groups accordions (allows children)
|
|
204
|
+
Props: none
|
|
205
|
+
Slots: default (accordion-block elements)
|
|
206
|
+
- Code: Code display
|
|
207
|
+
Props: size (string), scrollable (boolean)
|
|
208
|
+
Slots: default (code text)
|
|
209
|
+
- Quote: Quotation block
|
|
210
|
+
Props: none
|
|
211
|
+
Slots: default (quote text)
|
|
212
|
+
- Image: Image with caption
|
|
213
|
+
Props: src (string), alt (string)
|
|
214
|
+
Slots: caption (optional caption text)
|
|
215
|
+
- Avatar: User avatar
|
|
216
|
+
Props: label (string), image (string), size (string), background (string), backgroundColor (string)
|
|
217
|
+
Slots: default (optional custom content)
|
|
218
|
+
- List: Ordered/unordered list (allows children)
|
|
219
|
+
Props: none
|
|
220
|
+
Slots: default (list-item elements)
|
|
221
|
+
- ListItem: List item
|
|
222
|
+
Props: variant (string), size (string), weight (string)
|
|
223
|
+
Slots: default (item text)
|
|
224
|
+
- Icons: Icon components
|
|
225
|
+
Props: size ("x-small"|"small"|"medium"|"large"), color (string)
|
|
226
|
+
- Dialog: Modal dialog (allows children)
|
|
227
|
+
Props: open (boolean), width (string)
|
|
228
|
+
Slots: default (dialog content), actions (footer actions)
|
|
229
|
+
- Drawer: Side drawer (allows children)
|
|
230
|
+
Props: open (boolean), width (string), side ("left"|"right"), variant ("overlay"|"push"|"persistent"), zIndex (string), drawerSpace (string), breakpoint (string)
|
|
231
|
+
Slots: header (optional header), default (drawer content), actions (footer actions)
|
|
232
|
+
- Slat: Data row display (allows children)
|
|
233
|
+
Props: variant (string), col (string), space (string)
|
|
234
|
+
Slots: header-start, header-end, row-start, row-end, accessory, action
|
|
235
|
+
- SlatGroup: Groups slats (allows children)
|
|
236
|
+
Props: usage (string)
|
|
237
|
+
Slots: default (slat elements)
|
|
238
|
+
- SmartCard: Visual card component
|
|
239
|
+
Props: state (string), number (string), variant (string), partner (string), type (string), logo (string), logoWidth (string), logoHeight (string), bgColor (string), bgImage (string), inverted (boolean)
|
|
240
|
+
- Table: Data table (allows children)
|
|
241
|
+
Props: none
|
|
242
|
+
Slots: default (row-group elements)
|
|
243
|
+
- RowGroup: Table section (allows children)
|
|
244
|
+
Props: none
|
|
245
|
+
Slots: default (row elements)
|
|
246
|
+
- Row: Table row (allows children)
|
|
247
|
+
Props: columns (string)
|
|
248
|
+
Slots: default (cell elements)
|
|
249
|
+
- Cell: Table cell
|
|
250
|
+
Props: alignY (string)
|
|
251
|
+
Slots: default (cell content)
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
INPUTS (no children):
|
|
255
|
+
- Input: Text input field
|
|
256
|
+
Props: label (string - required), type ("text"|"email"|"password"|"number"|"tel"|"search"|"url"|"date"|"time"), placeholder (string), value (string), id (string), name (string), disabled (boolean), hideLabel (boolean), variant ("default"|"success"|"warning"|"error")
|
|
257
|
+
Slots: before (mui-addon, mui-select, mui-button), after (mui-addon, mui-select, mui-button)
|
|
258
|
+
- Select: Dropdown select
|
|
259
|
+
Props: label (string - required), options (JSON array of {value, label} - required), value (string), id (string), name (string), disabled (boolean), hideLabel (boolean), variant ("default"|"success"|"warning"|"error")
|
|
260
|
+
- Checkbox: Checkbox input
|
|
261
|
+
Props: checked (boolean), id (string), disabled (boolean), indeterminate (boolean), aria-label (string)
|
|
262
|
+
Slots: default (text, mui-link, mui-icon-[name])
|
|
263
|
+
- Switch: Toggle switch
|
|
264
|
+
Props: label (string - required), checked (boolean), disabled (boolean)
|
|
265
|
+
Slots: on-icon (mui-icon-[name]), off-icon (mui-icon-[name])
|
|
266
|
+
- Field: Form field wrapper (allows children)
|
|
267
|
+
Props: label (string - required), variant ("default"|"success"|"warning"|"error"), message (string), hideLabel (boolean)
|
|
268
|
+
Slots: default (mui-input, mui-select)
|
|
269
|
+
- FileUpload: File upload input
|
|
270
|
+
Props: acceptedFileTypes (string - comma-separated), currentFileName (string)
|
|
271
|
+
- Progress: Progress bar
|
|
272
|
+
Props: progress (number 0-100), state ("pending"|"syncing")
|
|
273
|
+
|
|
274
|
+
ACTIONS:
|
|
275
|
+
- Button: Clickable button
|
|
276
|
+
Props: variant ("primary"|"secondary"|"tertiary"|"attention"), size ("x-small"|"small"|"medium"|"large"), disabled (boolean), aria-label (string)
|
|
277
|
+
Slots: default (text or mui-icon-[name]), before (mui-icon-[name]), after (mui-icon-[name])
|
|
278
|
+
- Link: Hyperlink
|
|
279
|
+
Props: href (string), variant ("primary"|"secondary"|"tertiary"|"attention"), size ("x-small"|"small"|"medium"|"large"), target (string), download (boolean), weight (string), disabled (boolean)
|
|
280
|
+
Slots: default (text or mui-icon-[name]), before (mui-icon-[name]), after (mui-icon-[name])
|
|
281
|
+
- Dropdown: Dropdown menu
|
|
282
|
+
Props: zindex (string), position ("left"|"right"), persistent (boolean)
|
|
283
|
+
Slots: action (mui-button - required), default (mui-button, mui-rule, elements - required)
|
|
284
|
+
- Chip: Interactive chip/tag
|
|
285
|
+
Props: active (boolean), dismiss (boolean), usage (string like "input")
|
|
286
|
+
Slots: default (text), before (mui-icon-[name], mui-badge, avatars), after (mui-icon-[name], mui-badge, avatars)
|
|
287
|
+
|
|
288
|
+
NAVIGATION (allow children):
|
|
289
|
+
- TabBar: Tab navigation
|
|
290
|
+
Props: speed (string like "200ms"), controlsPosition ("top"|"right"|"bottom"|"left"|"top-right"|"top-left"|"bottom-right"|"bottom-left" - when used inside carousel-controller)
|
|
291
|
+
Slots: default (tab-item - required), controls (named slot when inside carousel-controller)
|
|
292
|
+
- TabItem: Individual tab
|
|
293
|
+
Props: text (slot default), icon (string like "mui-icon-[name]"), active (boolean), id (string - unique identifier)
|
|
294
|
+
Slots: default (text - required)
|
|
295
|
+
- TabController: Tab controller container
|
|
296
|
+
Props: none
|
|
297
|
+
Slots: default (mui-tab-bar, mui-tab-panel - required)
|
|
298
|
+
- TabPanel: Tab panel content
|
|
299
|
+
Props: item (string - maps to tab-item id)
|
|
300
|
+
- CarouselController: Carousel container
|
|
301
|
+
Props: none
|
|
302
|
+
Slots: default (mui-tab-bar, mui-carousel-panel - required)
|
|
303
|
+
- CarouselPanel: Carousel panel content
|
|
304
|
+
Props: item (string - maps to tab-item id)
|
|
305
|
+
Slots: item (named slot - required to place panel in carousel)
|
|
306
|
+
- Stepper: Step indicator
|
|
307
|
+
Props: direction ("horizontal"|"vertical"), activeStep (number)
|
|
308
|
+
Slots: default (mui-step elements)
|
|
309
|
+
- Step: Individual step (no children)
|
|
310
|
+
Props: title (string - required)
|
|
311
|
+
|
|
312
|
+
FEEDBACK:
|
|
313
|
+
- Message: Persistent message block
|
|
314
|
+
Props: variant ("plain"|"neutral"|"positive"|"info"|"warning"|"attention")
|
|
315
|
+
Slots: default (content including heading and text)
|
|
316
|
+
- Alert: Dismissible alert notification
|
|
317
|
+
Props: variant ("success"|"error"|"warning"|"info")
|
|
318
|
+
Slots: default (text or content), action (optional action slot)
|
|
319
|
+
- Loader: Loading state wrapper
|
|
320
|
+
Props: loading (boolean), animation ("pulsate"|"fade-in"|"translate"), direction ("up"|"down"|"left"|"right"), duration (string)
|
|
321
|
+
Slots: default (content to show when loaded)
|
|
322
|
+
- Badge: Status indicator badge
|
|
323
|
+
Props: variant ("default"|"positive"|"warning"|"error")
|
|
324
|
+
Slots: default (text)
|
|
325
|
+
- Progress: Progress indicator
|
|
326
|
+
Props: progress (number 0-100), state ("pending"|"syncing")
|
|
327
|
+
|
|
328
|
+
SPACING VALUES:
|
|
329
|
+
000, 025, 050, 100, 200, 300, 400, 500, 600, 700, 800
|
|
330
|
+
|
|
331
|
+
Pattern: Micro
|
|
332
|
+
Description: Use for very small UI elements, tight gaps, or subtle alignment adjustments
|
|
333
|
+
Values: [000, 025, 050, 100]
|
|
334
|
+
Example Usage:
|
|
335
|
+
• Component: Icon Button, Spacing: 025
|
|
336
|
+
• Component: Badge, Spacing: 050
|
|
337
|
+
• Component: Text Label, Spacing: 100
|
|
338
|
+
|
|
339
|
+
Pattern: Form Items
|
|
340
|
+
Description: Use for standard form elements, inputs, and button groups
|
|
341
|
+
Values: [300, 400, 500]
|
|
342
|
+
Example Usage:
|
|
343
|
+
• Component: VStack as Form Group, Spacing: 300
|
|
344
|
+
• Component: HStack as Form Group, Spacing: 400
|
|
345
|
+
|
|
346
|
+
Pattern: Layout & Spacing Patterns
|
|
347
|
+
Description: Use for headings, grouping of elements, or possible actions
|
|
348
|
+
Values: [300, 400, 500]
|
|
349
|
+
Example Usage:
|
|
350
|
+
• Component: VStack as Wrapper, Spacing: 500–800
|
|
351
|
+
|
|
352
|
+
Pattern: Layout
|
|
353
|
+
Description: Use for larger sections, cards, grids, or generous gaps around content
|
|
354
|
+
Values: [600, 700, 800]
|
|
355
|
+
Example Usage:
|
|
356
|
+
• Component: Card, Spacing: 600
|
|
357
|
+
• Component: Grid, Spacing: 700
|
|
358
|
+
• Component: Section, Spacing: 800
|
|
359
|
+
|
|
360
|
+
|
|
361
|
+
When generating UIs:
|
|
362
|
+
- Use VStack as the root for vertical layouts
|
|
363
|
+
- Use HStack for horizontal button groups or side-by-side content
|
|
364
|
+
- Group related inputs with proper spacing
|
|
365
|
+
- Use descriptive IDs like "email-input", "submit-btn", "main-title"
|
|
366
|
+
- Add proper labels to all inputs
|
|
367
|
+
- Use appropriate heading sizes (1=largest, 6=smallest)
|
|
368
|
+
|
|
369
|
+
ASSETS:
|
|
370
|
+
When using assets, consider these direct links, not made up URL's:
|
|
371
|
+
|
|
372
|
+
Smart Card Logos
|
|
373
|
+
- 'https://muibook.com/images/logo.png'
|
|
374
|
+
- 'https://muibook.com/images/guides.svg'
|
|
375
|
+
- 'https://muibook.com/images/mui.svg'
|
|
376
|
+
|
|
377
|
+
Smart Card Background Image
|
|
378
|
+
- 'https://muibook.com/images/placeholder.png'
|
|
379
|
+
- 'https://muibook.com/images/snowy-mint.png'
|
|
380
|
+
- 'https://muibook.com/images/buttercup.png'
|
|
381
|
+
- 'https://muibook.com/images/sapphire.png'
|
|
382
|
+
- 'https://muibook.com/images/crystal.png'
|
|
383
|
+
- 'https://muibook.com/images/premier.png'
|
|
384
|
+
- 'https://muibook.com/images/diamond.png'
|
|
385
|
+
|
|
386
|
+
Smart Card Partners / Alliances
|
|
387
|
+
- 'https://muibook.com/images/mastercard.svg'
|
|
388
|
+
- 'https://muibook.com/images/visa-black.svg'
|
|
389
|
+
- 'https://muibook.com/images/visa-white.svg'
|
|
390
|
+
- 'https://muibook.com/images/amex.svg'
|
|
391
|
+
- 'https://muibook.com/images/emerald.svg'
|
|
392
|
+
- 'https://muibook.com/images/ruby.svg'
|
|
393
|
+
- 'https://muibook.com/images/sapphire.svg'
|
|
394
|
+
|
|
395
|
+
FORMATTING:
|
|
396
|
+
- When adding Card Number to Smart Card, do not include “**** **** ****” — only use the last four digits (e.g., 1234).
|
|
397
|
+
|
|
398
|
+
`
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
role: "assistant",
|
|
402
|
+
name: "examples",
|
|
403
|
+
content: JSON.stringify({
|
|
404
|
+
// Simple vertical layout
|
|
405
|
+
simpleForm: {
|
|
406
|
+
type: "VStack",
|
|
407
|
+
id: "root",
|
|
408
|
+
props: { space: "var(--space-200)" },
|
|
409
|
+
children: [
|
|
410
|
+
{
|
|
411
|
+
type: "Heading",
|
|
412
|
+
id: "title",
|
|
413
|
+
props: { text: "Sign In", size: "2", level: "2" },
|
|
414
|
+
children: []
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
type: "Input",
|
|
418
|
+
id: "email",
|
|
419
|
+
props: { label: "Email", type: "email", placeholder: "you@example.com" },
|
|
420
|
+
children: []
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
type: "Input",
|
|
424
|
+
id: "password",
|
|
425
|
+
props: { label: "Password", type: "password" },
|
|
426
|
+
children: []
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
type: "Button",
|
|
430
|
+
id: "submit",
|
|
431
|
+
props: { text: "Sign In", variant: "primary" },
|
|
432
|
+
children: []
|
|
433
|
+
}
|
|
434
|
+
]
|
|
435
|
+
},
|
|
436
|
+
// Rewards card with smart-card component
|
|
437
|
+
rewardsCard: {
|
|
438
|
+
type: "Container",
|
|
439
|
+
id: "root",
|
|
440
|
+
props: { size: "medium", center: !0 },
|
|
441
|
+
children: [
|
|
442
|
+
{
|
|
443
|
+
type: "Card",
|
|
444
|
+
id: "rewards-card",
|
|
445
|
+
props: {},
|
|
446
|
+
children: [
|
|
447
|
+
{
|
|
448
|
+
type: "CardHeader",
|
|
449
|
+
id: "rewards-header",
|
|
450
|
+
props: {},
|
|
451
|
+
children: [
|
|
452
|
+
{
|
|
453
|
+
type: "Heading",
|
|
454
|
+
id: "rewards-title",
|
|
455
|
+
props: { text: "Rewards", size: "4", level: "4" },
|
|
456
|
+
children: []
|
|
457
|
+
}
|
|
458
|
+
]
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
type: "CardBody",
|
|
462
|
+
id: "rewards-body",
|
|
463
|
+
props: {},
|
|
464
|
+
children: [
|
|
465
|
+
{
|
|
466
|
+
type: "VStack",
|
|
467
|
+
id: "rewards-content",
|
|
468
|
+
props: { space: "var(--space-200)", alignX: "center" },
|
|
469
|
+
children: [
|
|
470
|
+
{
|
|
471
|
+
type: "SmartCard",
|
|
472
|
+
id: "rewards-smart-card",
|
|
473
|
+
props: {
|
|
474
|
+
inverted: !0,
|
|
475
|
+
bgColor: void 0,
|
|
476
|
+
bgImage: "https://muibook.com/images/diamond.png",
|
|
477
|
+
logo: void 0,
|
|
478
|
+
logoHeight: void 0,
|
|
479
|
+
partner: "https://muibook.com/images/emerald.svg",
|
|
480
|
+
number: "1234",
|
|
481
|
+
type: "Rewards",
|
|
482
|
+
variant: "plain",
|
|
483
|
+
state: "default"
|
|
484
|
+
},
|
|
485
|
+
children: []
|
|
486
|
+
}
|
|
487
|
+
]
|
|
488
|
+
}
|
|
489
|
+
]
|
|
490
|
+
}
|
|
491
|
+
]
|
|
492
|
+
}
|
|
493
|
+
]
|
|
494
|
+
},
|
|
495
|
+
// Horizontal button group
|
|
496
|
+
confirmDialog: {
|
|
497
|
+
type: "VStack",
|
|
498
|
+
id: "root",
|
|
499
|
+
props: { space: "var(--space-200)" },
|
|
500
|
+
children: [
|
|
501
|
+
{
|
|
502
|
+
type: "Heading",
|
|
503
|
+
id: "title",
|
|
504
|
+
props: { text: "Confirm Action", size: "3", level: "3" },
|
|
505
|
+
children: []
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
type: "Body",
|
|
509
|
+
id: "message",
|
|
510
|
+
props: { text: "Are you sure you want to proceed?", size: "medium" },
|
|
511
|
+
children: []
|
|
512
|
+
},
|
|
513
|
+
{
|
|
514
|
+
type: "HStack",
|
|
515
|
+
id: "buttons",
|
|
516
|
+
props: { space: "var(--space-100)", alignX: "end" },
|
|
517
|
+
children: [
|
|
518
|
+
{
|
|
519
|
+
type: "Button",
|
|
520
|
+
id: "cancel",
|
|
521
|
+
props: { text: "Cancel", variant: "secondary" },
|
|
522
|
+
children: []
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
type: "Button",
|
|
526
|
+
id: "confirm",
|
|
527
|
+
props: { text: "Confirm", variant: "primary" },
|
|
528
|
+
children: []
|
|
529
|
+
}
|
|
530
|
+
]
|
|
531
|
+
}
|
|
532
|
+
]
|
|
533
|
+
},
|
|
534
|
+
// Booking form with multiple input types
|
|
535
|
+
bookingForm: {
|
|
536
|
+
type: "VStack",
|
|
537
|
+
id: "root",
|
|
538
|
+
props: { space: "var(--space-300)" },
|
|
539
|
+
children: [
|
|
540
|
+
{
|
|
541
|
+
type: "Heading",
|
|
542
|
+
id: "title",
|
|
543
|
+
props: { text: "Book Your Table", size: "1", level: "1" },
|
|
544
|
+
children: []
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
type: "Body",
|
|
548
|
+
id: "subtitle",
|
|
549
|
+
props: { text: "Reserve your spot at our restaurant", size: "medium" },
|
|
550
|
+
children: []
|
|
551
|
+
},
|
|
552
|
+
{
|
|
553
|
+
type: "VStack",
|
|
554
|
+
id: "form-fields",
|
|
555
|
+
props: { space: "var(--space-200)" },
|
|
556
|
+
children: [
|
|
557
|
+
{
|
|
558
|
+
type: "Input",
|
|
559
|
+
id: "name",
|
|
560
|
+
props: { label: "Your Name", type: "text", placeholder: "John Doe" },
|
|
561
|
+
children: []
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
type: "Input",
|
|
565
|
+
id: "email",
|
|
566
|
+
props: { label: "Email", type: "email", placeholder: "john@example.com" },
|
|
567
|
+
children: []
|
|
568
|
+
},
|
|
569
|
+
{
|
|
570
|
+
type: "Input",
|
|
571
|
+
id: "phone",
|
|
572
|
+
props: { label: "Phone", type: "tel", placeholder: "+1 (555) 000-0000" },
|
|
573
|
+
children: []
|
|
574
|
+
},
|
|
575
|
+
{
|
|
576
|
+
type: "HStack",
|
|
577
|
+
id: "datetime",
|
|
578
|
+
props: { space: "var(--space-200)" },
|
|
579
|
+
children: [
|
|
580
|
+
{
|
|
581
|
+
type: "Input",
|
|
582
|
+
id: "date",
|
|
583
|
+
props: { label: "Date", type: "date" },
|
|
584
|
+
children: []
|
|
585
|
+
},
|
|
586
|
+
{
|
|
587
|
+
type: "Input",
|
|
588
|
+
id: "time",
|
|
589
|
+
props: { label: "Time", type: "time" },
|
|
590
|
+
children: []
|
|
591
|
+
}
|
|
592
|
+
]
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
type: "Select",
|
|
596
|
+
id: "guests",
|
|
597
|
+
props: {
|
|
598
|
+
label: "Number of Guests",
|
|
599
|
+
options: [
|
|
600
|
+
{ value: "1", label: "1 Guest" },
|
|
601
|
+
{ value: "2", label: "2 Guests" },
|
|
602
|
+
{ value: "3", label: "3 Guests" },
|
|
603
|
+
{ value: "4", label: "4 Guests" },
|
|
604
|
+
{ value: "5", label: "5+ Guests" }
|
|
605
|
+
]
|
|
606
|
+
},
|
|
607
|
+
children: []
|
|
608
|
+
}
|
|
609
|
+
]
|
|
610
|
+
},
|
|
611
|
+
{
|
|
612
|
+
type: "HStack",
|
|
613
|
+
id: "actions",
|
|
614
|
+
props: { space: "var(--space-100)", alignX: "end" },
|
|
615
|
+
children: [
|
|
616
|
+
{
|
|
617
|
+
type: "Button",
|
|
618
|
+
id: "cancel",
|
|
619
|
+
props: { text: "Cancel", variant: "secondary" },
|
|
620
|
+
children: []
|
|
621
|
+
},
|
|
622
|
+
{
|
|
623
|
+
type: "Button",
|
|
624
|
+
id: "submit",
|
|
625
|
+
props: { text: "Confirm Booking", variant: "primary" },
|
|
626
|
+
children: []
|
|
627
|
+
}
|
|
628
|
+
]
|
|
629
|
+
}
|
|
630
|
+
]
|
|
631
|
+
},
|
|
632
|
+
// Card layout with grid
|
|
633
|
+
dashboard: {
|
|
634
|
+
type: "VStack",
|
|
635
|
+
id: "root",
|
|
636
|
+
props: { space: "var(--space-400)" },
|
|
637
|
+
children: [
|
|
638
|
+
{
|
|
639
|
+
type: "Heading",
|
|
640
|
+
id: "title",
|
|
641
|
+
props: { text: "Dashboard", size: "1", level: "1" },
|
|
642
|
+
children: []
|
|
643
|
+
},
|
|
644
|
+
{
|
|
645
|
+
type: "Grid",
|
|
646
|
+
id: "stats-grid",
|
|
647
|
+
props: { col: "1fr 1fr 1fr", space: "var(--space-200)" },
|
|
648
|
+
children: [
|
|
649
|
+
{
|
|
650
|
+
type: "Card",
|
|
651
|
+
id: "card-1",
|
|
652
|
+
props: {},
|
|
653
|
+
children: [
|
|
654
|
+
{
|
|
655
|
+
type: "CardBody",
|
|
656
|
+
id: "card-1-body",
|
|
657
|
+
props: {},
|
|
658
|
+
children: [
|
|
659
|
+
{
|
|
660
|
+
type: "VStack",
|
|
661
|
+
id: "card-1-content",
|
|
662
|
+
props: { space: "var(--space-100)" },
|
|
663
|
+
children: [
|
|
664
|
+
{
|
|
665
|
+
type: "Body",
|
|
666
|
+
id: "label-1",
|
|
667
|
+
props: { text: "Total Users", size: "small", weight: "bold" },
|
|
668
|
+
children: []
|
|
669
|
+
},
|
|
670
|
+
{
|
|
671
|
+
type: "Heading",
|
|
672
|
+
id: "value-1",
|
|
673
|
+
props: { text: "1,2,3,4", size: "2", level: "2" },
|
|
674
|
+
children: []
|
|
675
|
+
}
|
|
676
|
+
]
|
|
677
|
+
}
|
|
678
|
+
]
|
|
679
|
+
}
|
|
680
|
+
]
|
|
681
|
+
},
|
|
682
|
+
{
|
|
683
|
+
type: "Card",
|
|
684
|
+
id: "card-2",
|
|
685
|
+
props: {},
|
|
686
|
+
children: [
|
|
687
|
+
{
|
|
688
|
+
type: "CardBody",
|
|
689
|
+
id: "card-2-body",
|
|
690
|
+
props: {},
|
|
691
|
+
children: [
|
|
692
|
+
{
|
|
693
|
+
type: "VStack",
|
|
694
|
+
id: "card-2-content",
|
|
695
|
+
props: { space: "var(--space-100)" },
|
|
696
|
+
children: [
|
|
697
|
+
{
|
|
698
|
+
type: "Body",
|
|
699
|
+
id: "label-2",
|
|
700
|
+
props: { text: "Revenue", size: "small", weight: "bold" },
|
|
701
|
+
children: []
|
|
702
|
+
},
|
|
703
|
+
{
|
|
704
|
+
type: "Heading",
|
|
705
|
+
id: "value-2",
|
|
706
|
+
props: { text: "$45,678", size: "2", level: "2" },
|
|
707
|
+
children: []
|
|
708
|
+
}
|
|
709
|
+
]
|
|
710
|
+
}
|
|
711
|
+
]
|
|
712
|
+
}
|
|
713
|
+
]
|
|
714
|
+
},
|
|
715
|
+
{
|
|
716
|
+
type: "Card",
|
|
717
|
+
id: "card-3",
|
|
718
|
+
props: {},
|
|
719
|
+
children: [
|
|
720
|
+
{
|
|
721
|
+
type: "CardBody",
|
|
722
|
+
id: "card-3-body",
|
|
723
|
+
props: {},
|
|
724
|
+
children: [
|
|
725
|
+
{
|
|
726
|
+
type: "VStack",
|
|
727
|
+
id: "card-3-content",
|
|
728
|
+
props: { space: "var(--space-100)" },
|
|
729
|
+
children: [
|
|
730
|
+
{
|
|
731
|
+
type: "Body",
|
|
732
|
+
id: "label-3",
|
|
733
|
+
props: { text: "Active Sessions", size: "small", weight: "bold" },
|
|
734
|
+
children: []
|
|
735
|
+
},
|
|
736
|
+
{
|
|
737
|
+
type: "Heading",
|
|
738
|
+
id: "value-3",
|
|
739
|
+
props: { text: "89", size: "2", level: "2" },
|
|
740
|
+
children: []
|
|
741
|
+
}
|
|
742
|
+
]
|
|
743
|
+
}
|
|
744
|
+
]
|
|
745
|
+
}
|
|
746
|
+
]
|
|
747
|
+
}
|
|
748
|
+
]
|
|
749
|
+
}
|
|
750
|
+
]
|
|
751
|
+
},
|
|
752
|
+
// Contact form with alerts
|
|
753
|
+
contactForm: {
|
|
754
|
+
type: "VStack",
|
|
755
|
+
id: "root",
|
|
756
|
+
props: { space: "var(--space-300)" },
|
|
757
|
+
children: [
|
|
758
|
+
{
|
|
759
|
+
type: "Heading",
|
|
760
|
+
id: "title",
|
|
761
|
+
props: { text: "Contact Us", size: "1", level: "1" },
|
|
762
|
+
children: []
|
|
763
|
+
},
|
|
764
|
+
{
|
|
765
|
+
type: "Alert",
|
|
766
|
+
id: "info",
|
|
767
|
+
props: { text: "We typically respond within 24 hours", variant: "info" },
|
|
768
|
+
children: []
|
|
769
|
+
},
|
|
770
|
+
{
|
|
771
|
+
type: "VStack",
|
|
772
|
+
id: "form",
|
|
773
|
+
props: { space: "var(--space-200)" },
|
|
774
|
+
children: [
|
|
775
|
+
{
|
|
776
|
+
type: "Input",
|
|
777
|
+
id: "name",
|
|
778
|
+
props: { label: "Your Name", type: "text" },
|
|
779
|
+
children: []
|
|
780
|
+
},
|
|
781
|
+
{
|
|
782
|
+
type: "Input",
|
|
783
|
+
id: "email",
|
|
784
|
+
props: { label: "Email Address", type: "email" },
|
|
785
|
+
children: []
|
|
786
|
+
},
|
|
787
|
+
{
|
|
788
|
+
type: "Select",
|
|
789
|
+
id: "subject",
|
|
790
|
+
props: {
|
|
791
|
+
label: "Subject",
|
|
792
|
+
options: [
|
|
793
|
+
{ value: "general", label: "General Inquiry" },
|
|
794
|
+
{ value: "support", label: "Technical Support" },
|
|
795
|
+
{ value: "billing", label: "Billing Question" }
|
|
796
|
+
]
|
|
797
|
+
},
|
|
798
|
+
children: []
|
|
799
|
+
},
|
|
800
|
+
{
|
|
801
|
+
type: "Input",
|
|
802
|
+
id: "message",
|
|
803
|
+
props: { label: "Message", type: "text", placeholder: "Tell us how we can help..." },
|
|
804
|
+
children: []
|
|
805
|
+
}
|
|
806
|
+
]
|
|
807
|
+
},
|
|
808
|
+
{
|
|
809
|
+
type: "Button",
|
|
810
|
+
id: "submit",
|
|
811
|
+
props: { text: "Send Message", variant: "primary" },
|
|
812
|
+
children: []
|
|
813
|
+
}
|
|
814
|
+
]
|
|
815
|
+
},
|
|
816
|
+
// Settings page with switches
|
|
817
|
+
settingsPage: {
|
|
818
|
+
type: "VStack",
|
|
819
|
+
id: "root",
|
|
820
|
+
props: { space: "var(--space-400)" },
|
|
821
|
+
children: [
|
|
822
|
+
{
|
|
823
|
+
type: "Heading",
|
|
824
|
+
id: "title",
|
|
825
|
+
props: { text: "Settings", size: "1", level: "1" },
|
|
826
|
+
children: []
|
|
827
|
+
},
|
|
828
|
+
{
|
|
829
|
+
type: "VStack",
|
|
830
|
+
id: "notifications-section",
|
|
831
|
+
props: { space: "var(--space-200)" },
|
|
832
|
+
children: [
|
|
833
|
+
{
|
|
834
|
+
type: "Heading",
|
|
835
|
+
id: "notifications-title",
|
|
836
|
+
props: { text: "Notifications", size: "3", level: "3" },
|
|
837
|
+
children: []
|
|
838
|
+
},
|
|
839
|
+
{
|
|
840
|
+
type: "Switch",
|
|
841
|
+
id: "email-notifications",
|
|
842
|
+
props: { label: "Email Notifications", checked: !0 },
|
|
843
|
+
children: []
|
|
844
|
+
},
|
|
845
|
+
{
|
|
846
|
+
type: "Switch",
|
|
847
|
+
id: "push-notifications",
|
|
848
|
+
props: { label: "Push Notifications", checked: !1 },
|
|
849
|
+
children: []
|
|
850
|
+
},
|
|
851
|
+
{
|
|
852
|
+
type: "Switch",
|
|
853
|
+
id: "sms-notifications",
|
|
854
|
+
props: { label: "SMS Notifications", checked: !0 },
|
|
855
|
+
children: []
|
|
856
|
+
}
|
|
857
|
+
]
|
|
858
|
+
},
|
|
859
|
+
{
|
|
860
|
+
type: "Rule",
|
|
861
|
+
id: "divider",
|
|
862
|
+
props: {},
|
|
863
|
+
children: []
|
|
864
|
+
},
|
|
865
|
+
{
|
|
866
|
+
type: "VStack",
|
|
867
|
+
id: "privacy-section",
|
|
868
|
+
props: { space: "var(--space-200)" },
|
|
869
|
+
children: [
|
|
870
|
+
{
|
|
871
|
+
type: "Heading",
|
|
872
|
+
id: "privacy-title",
|
|
873
|
+
props: { text: "Privacy", size: "3", level: "3" },
|
|
874
|
+
children: []
|
|
875
|
+
},
|
|
876
|
+
{
|
|
877
|
+
type: "Checkbox",
|
|
878
|
+
id: "public-profile",
|
|
879
|
+
props: { label: "Make profile public", checked: !1 },
|
|
880
|
+
children: []
|
|
881
|
+
},
|
|
882
|
+
{
|
|
883
|
+
type: "Checkbox",
|
|
884
|
+
id: "show-email",
|
|
885
|
+
props: { label: "Show email to other users", checked: !1 },
|
|
886
|
+
children: []
|
|
887
|
+
}
|
|
888
|
+
]
|
|
889
|
+
},
|
|
890
|
+
{
|
|
891
|
+
type: "HStack",
|
|
892
|
+
id: "actions",
|
|
893
|
+
props: { space: "var(--space-100)", alignX: "end" },
|
|
894
|
+
children: [
|
|
895
|
+
{
|
|
896
|
+
type: "Button",
|
|
897
|
+
id: "cancel",
|
|
898
|
+
props: { text: "Cancel", variant: "secondary" },
|
|
899
|
+
children: []
|
|
900
|
+
},
|
|
901
|
+
{
|
|
902
|
+
type: "Button",
|
|
903
|
+
id: "save",
|
|
904
|
+
props: { text: "Save Changes", variant: "primary" },
|
|
905
|
+
children: []
|
|
906
|
+
}
|
|
907
|
+
]
|
|
908
|
+
}
|
|
909
|
+
]
|
|
910
|
+
},
|
|
911
|
+
// Tabs navigation
|
|
912
|
+
tabsExample: {
|
|
913
|
+
type: "VStack",
|
|
914
|
+
id: "root",
|
|
915
|
+
props: { space: "var(--space-300)" },
|
|
916
|
+
children: [
|
|
917
|
+
{
|
|
918
|
+
type: "Heading",
|
|
919
|
+
id: "title",
|
|
920
|
+
props: { text: "Product Details", size: "1", level: "1" },
|
|
921
|
+
children: []
|
|
922
|
+
},
|
|
923
|
+
{
|
|
924
|
+
type: "TabBar",
|
|
925
|
+
id: "tabs",
|
|
926
|
+
props: {},
|
|
927
|
+
children: [
|
|
928
|
+
{
|
|
929
|
+
type: "TabItem",
|
|
930
|
+
id: "overview-tab",
|
|
931
|
+
props: { text: "Overview", active: !0 },
|
|
932
|
+
children: []
|
|
933
|
+
},
|
|
934
|
+
{
|
|
935
|
+
type: "TabItem",
|
|
936
|
+
id: "specs-tab",
|
|
937
|
+
props: { text: "Specifications", active: !1 },
|
|
938
|
+
children: []
|
|
939
|
+
},
|
|
940
|
+
{
|
|
941
|
+
type: "TabItem",
|
|
942
|
+
id: "reviews-tab",
|
|
943
|
+
props: { text: "Reviews", active: !1 },
|
|
944
|
+
children: []
|
|
945
|
+
}
|
|
946
|
+
]
|
|
947
|
+
},
|
|
948
|
+
{
|
|
949
|
+
type: "Card",
|
|
950
|
+
id: "content",
|
|
951
|
+
props: {},
|
|
952
|
+
children: [
|
|
953
|
+
{
|
|
954
|
+
type: "CardBody",
|
|
955
|
+
id: "product-details-card-body",
|
|
956
|
+
props: {},
|
|
957
|
+
children: [
|
|
958
|
+
{
|
|
959
|
+
type: "VStack",
|
|
960
|
+
id: "tab-content",
|
|
961
|
+
props: { space: "var(--space-200)" },
|
|
962
|
+
children: [
|
|
963
|
+
{
|
|
964
|
+
type: "Heading",
|
|
965
|
+
id: "content-title",
|
|
966
|
+
props: { text: "Product Overview", size: "3", level: "3" },
|
|
967
|
+
children: []
|
|
968
|
+
},
|
|
969
|
+
{
|
|
970
|
+
type: "Body",
|
|
971
|
+
id: "content-text",
|
|
972
|
+
props: { text: "This is a high-quality product designed for professionals.", size: "medium" },
|
|
973
|
+
children: []
|
|
974
|
+
}
|
|
975
|
+
]
|
|
976
|
+
}
|
|
977
|
+
]
|
|
978
|
+
}
|
|
979
|
+
]
|
|
980
|
+
}
|
|
981
|
+
]
|
|
982
|
+
}
|
|
983
|
+
})
|
|
984
|
+
}
|
|
134
985
|
];
|
|
135
986
|
export {
|
|
136
|
-
i as
|
|
987
|
+
i as muiA2UIPrompts,
|
|
988
|
+
e as muiPrompts
|
|
137
989
|
};
|