@muibook/components 2.0.0 → 3.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/dist/esm/agent/keywords/index.js +104 -4
- package/dist/esm/agent/prompts/index.js +518 -162
- package/dist/esm/components/mui-accordion/block/index.js +2 -6
- package/dist/esm/components/mui-accordion/group/index.js +1 -1
- package/dist/esm/components/mui-accordion/inline/index.js +2 -6
- package/dist/esm/components/mui-addon/index.js +1 -1
- package/dist/esm/components/mui-alert/index.js +10 -5
- package/dist/esm/components/mui-badge/index.js +4 -4
- package/dist/esm/components/mui-body/index.js +4 -4
- package/dist/esm/components/mui-button/index.js +5 -7
- package/dist/esm/components/mui-button-group/index.js +1 -1
- package/dist/esm/components/mui-card/body/index.js +22 -18
- package/dist/esm/components/mui-card/card/index.js +1 -1
- package/dist/esm/components/mui-card/footer/index.js +1 -1
- package/dist/esm/components/mui-card/header/index.js +1 -1
- package/dist/esm/components/mui-carousel/controller/index.js +1 -1
- package/dist/esm/components/mui-carousel/panel/index.js +2 -2
- package/dist/esm/components/mui-checkbox/index.js +186 -0
- package/dist/esm/components/mui-code/index.js +9 -6
- package/dist/esm/components/mui-container/index.js +1 -1
- package/dist/esm/components/mui-field/index.js +14 -7
- package/dist/esm/components/mui-file-upload/index.js +5 -4
- package/dist/esm/components/mui-grid/index.js +1 -1
- package/dist/esm/components/mui-heading/index.js +1 -1
- package/dist/esm/components/mui-icons/accessibility/index.js +4 -4
- package/dist/esm/components/mui-icons/add/index.js +5 -5
- package/dist/esm/components/mui-icons/attention/index.js +5 -5
- package/dist/esm/components/mui-icons/check/index.js +6 -6
- package/dist/esm/components/mui-icons/close/index.js +2 -2
- package/dist/esm/components/mui-icons/down-arrow-circle/index.js +55 -0
- package/dist/esm/components/mui-icons/down-chevron/index.js +2 -2
- package/dist/esm/components/mui-icons/ellipsis/index.js +55 -0
- package/dist/esm/components/mui-icons/globe/index.js +5 -5
- package/dist/esm/components/mui-icons/grid/index.js +1 -1
- package/dist/esm/components/mui-icons/index.js +2 -0
- package/dist/esm/components/mui-icons/info/index.js +2 -2
- package/dist/esm/components/mui-icons/left-arrow/index.js +1 -1
- package/dist/esm/components/mui-icons/left-chevron/index.js +1 -1
- package/dist/esm/components/mui-icons/left-sidebar/index.js +6 -6
- package/dist/esm/components/mui-icons/menu/index.js +6 -6
- package/dist/esm/components/mui-icons/message/index.js +6 -6
- package/dist/esm/components/mui-icons/moon/index.js +2 -2
- package/dist/esm/components/mui-icons/notification/index.js +2 -2
- package/dist/esm/components/mui-icons/right-chevron/index.js +5 -5
- package/dist/esm/components/mui-icons/stop/index.js +2 -2
- package/dist/esm/components/mui-icons/subtract/index.js +7 -7
- package/dist/esm/components/mui-icons/sun/index.js +6 -6
- package/dist/esm/components/mui-icons/toggle/index.js +1 -1
- package/dist/esm/components/mui-icons/up-arrow/index.js +4 -4
- package/dist/esm/components/mui-icons/up-chevron/index.js +1 -1
- package/dist/esm/components/mui-icons/warning/index.js +2 -2
- package/dist/esm/components/mui-image/index.js +1 -1
- package/dist/esm/components/mui-input/index.js +21 -27
- package/dist/esm/components/mui-link/index.js +13 -17
- package/dist/esm/components/mui-list/item/index.js +1 -1
- package/dist/esm/components/mui-list/list/index.js +1 -1
- package/dist/esm/components/mui-message/index.js +14 -9
- package/dist/esm/components/mui-quote/index.js +1 -1
- package/dist/esm/components/mui-responsive/index.js +1 -1
- package/dist/esm/components/mui-rule/index.js +5 -5
- package/dist/esm/components/mui-select/index.js +28 -27
- package/dist/esm/components/mui-slat/accessory/index.js +29 -0
- package/dist/esm/components/mui-slat/index.js +2 -21
- package/dist/esm/components/mui-slat/slat/index.js +139 -0
- package/dist/esm/components/mui-smart-card/index.js +14 -15
- package/dist/esm/components/mui-stack/hstack/index.js +1 -1
- package/dist/esm/components/mui-stack/vstack/index.js +1 -1
- package/dist/esm/components/mui-switch/index.js +3 -9
- package/dist/esm/components/mui-table/cell/index.js +1 -1
- package/dist/esm/components/mui-table/row/index.js +1 -1
- package/dist/esm/components/mui-table/row-group/index.js +1 -1
- package/dist/esm/components/mui-table/table/index.js +1 -1
- package/dist/esm/components/mui-tabs/controller/index.js +1 -1
- package/dist/esm/components/mui-tabs/item/index.js +2 -2
- package/dist/esm/components/mui-tabs/panel/index.js +1 -1
- package/dist/esm/components/mui-tabs/tab-bar/index.js +1 -1
- package/dist/esm/css/mui-base.css +27 -27
- package/dist/esm/css/mui-tokens.css +38 -1
- package/dist/esm/index.js +9 -5
- package/dist/types/components/mui-accordion/block/index.d.ts +1 -1
- package/dist/types/components/mui-accordion/inline/index.d.ts +1 -1
- package/dist/types/components/mui-alert/index.d.ts +5 -1
- package/dist/types/components/mui-checkbox/index.d.ts +1 -0
- package/dist/types/components/mui-field/index.d.ts +3 -1
- package/dist/types/components/mui-file-upload/index.d.ts +1 -1
- package/dist/types/components/mui-icons/down-arrow-circle.d.ts +1 -0
- package/dist/types/components/mui-icons/ellipsis.d.ts +1 -0
- package/dist/types/components/mui-icons/index.d.ts +2 -0
- package/dist/types/components/mui-message/index.d.ts +6 -1
- package/dist/types/components/mui-select/index.d.ts +1 -1
- package/dist/types/components/mui-slat/accessory/index.d.ts +1 -0
- package/dist/types/components/mui-slat/index.d.ts +2 -1
- package/dist/types/components/mui-slat/slat/index.d.ts +3 -0
- package/dist/types/components/mui-smart-card/index.d.ts +2 -1
- package/dist/types/index.d.ts +5 -1
- package/package.json +21 -1
- package/readme.md +19 -0
|
@@ -1,30 +1,40 @@
|
|
|
1
|
-
const
|
|
1
|
+
const i = [
|
|
2
2
|
{
|
|
3
3
|
role: "system",
|
|
4
|
-
content:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
4
|
+
content: `
|
|
5
|
+
You are an assistant that converts UI prompts into MUI-style web components using custom tags.
|
|
6
|
+
|
|
7
|
+
Each user message may include tags like [button], [card], etc. Use these to help determine intent.
|
|
8
|
+
|
|
9
|
+
Here is the full list of supported components:
|
|
10
|
+
<mui-field>, <mui-file-upload>, <mui-addon>, <mui-input>, <mui-select>, <mui-switch>,
|
|
11
|
+
<mui-table>, <mui-table-cell>, <mui-table-row>, <mui-table-row-group>,
|
|
12
|
+
<mui-slat>, <mui-slat-accessory>,
|
|
13
|
+
<mui-accordion-group>, <mui-accordion-inline>, <mui-accordion-block>,
|
|
14
|
+
<mui-heading>, <mui-body>, <mui-quote>, <mui-code>, <mui-image>,
|
|
15
|
+
<mui-smart-card>,
|
|
16
|
+
<mui-list>, <mui-list-item>,
|
|
17
|
+
<mui-icon-accessibility>, <mui-icon-add>, <mui-icon-attention>, <mui-icon-check>,
|
|
18
|
+
<mui-icon-close>, <mui-icon-down-chevron>, <mui-icon-globe>, <mui-icon-grid>,
|
|
19
|
+
<mui-icon-info>, <mui-icon-left-arrow>, <mui-icon-left-sidebar>, <mui-icon-left-chevron>,
|
|
20
|
+
<mui-icon-menu>, <mui-icon-message>, <mui-icon-moon>, <mui-icon-notification>,
|
|
21
|
+
<mui-icon-right-chevron>, <mui-icon-stop>, <mui-icon-subtract>, <mui-icon-sun>,
|
|
22
|
+
<mui-icon-toggle>, <mui-icon-up-arrow>, <mui-icon-up-chevron>, <mui-icon-warning>,
|
|
23
|
+
<mui-icon-down-arrow-circle>, <mui-icon-ellipsis>,
|
|
24
|
+
<mui-h-stack>, <mui-v-stack>, <mui-grid>, <mui-responsive>, <mui-container>, <mui-rule>,
|
|
25
|
+
<mui-card>, <mui-card-header>, <mui-card-body>, <mui-card-footer>,
|
|
26
|
+
<mui-alert>, <mui-message>, <mui-badge>,
|
|
27
|
+
<mui-button>, <mui-button-group>, <mui-link>,
|
|
28
|
+
<mui-tabs-controller>, <mui-tabs-item>, <mui-tabs-panel>, <mui-tabs-tab-bar>,
|
|
29
|
+
<mui-carousel-controller>, <mui-carousel-panel>
|
|
30
|
+
|
|
31
|
+
Use only these components when constructing UIs. When helpful, you may suggest new components, but clearly mark them with a comment like:
|
|
32
|
+
<!-- 🚧 Not yet in system, consider adding -->
|
|
33
|
+
|
|
34
|
+
Structure layouts using primitives like <mui-v-stack>, <mui-h-stack>, <mui-grid> or <mui-card-body> when composing forms or groups of fields.
|
|
35
|
+
`
|
|
36
|
+
},
|
|
37
|
+
// FIELD
|
|
28
38
|
{
|
|
29
39
|
role: "user",
|
|
30
40
|
content: "[input] Add a field to enter an email address"
|
|
@@ -35,68 +45,166 @@ const t = [
|
|
|
35
45
|
<mui-input type="email" placeholder="you@example.com"></mui-input>
|
|
36
46
|
</mui-field>`
|
|
37
47
|
},
|
|
48
|
+
// SLAT
|
|
38
49
|
{
|
|
39
50
|
role: "user",
|
|
40
|
-
content: "[
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
role: "assistant",
|
|
44
|
-
content:
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
<mui-row-group>
|
|
53
|
-
<mui-row columns="1fr 1fr 1fr">
|
|
54
|
-
<mui-cell>Row 1</mui-cell>
|
|
55
|
-
<mui-cell>Row 1</mui-cell>
|
|
56
|
-
<mui-cell>Row 1</mui-cell>
|
|
57
|
-
</mui-row>
|
|
58
|
-
<mui-row columns="1fr 1fr 1fr">
|
|
59
|
-
<mui-cell>Row 2</mui-cell>
|
|
60
|
-
<mui-cell>Row 2</mui-cell>
|
|
61
|
-
<mui-cell>Row 2</mui-cell>
|
|
62
|
-
</mui-row>
|
|
63
|
-
</mui-row-group>
|
|
64
|
-
</mui-table>`
|
|
51
|
+
content: "[slat] Create a default slat with heading and body"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
role: "assistant",
|
|
55
|
+
content: `
|
|
56
|
+
<mui-slat>
|
|
57
|
+
<mui-heading slot="start" size="5">...</mui-heading>
|
|
58
|
+
<mui-h-stack slot="end">
|
|
59
|
+
<mui-body>...</mui-body>
|
|
60
|
+
</mui-h-stack>
|
|
61
|
+
</mui-slat>
|
|
62
|
+
`
|
|
65
63
|
},
|
|
66
64
|
{
|
|
67
65
|
role: "user",
|
|
68
|
-
content: "[
|
|
66
|
+
content: "[slat] Create a header slat"
|
|
69
67
|
},
|
|
70
68
|
{
|
|
71
69
|
role: "assistant",
|
|
72
|
-
content:
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
</mui-accordion-group>`
|
|
70
|
+
content: `
|
|
71
|
+
<mui-slat variant="header">
|
|
72
|
+
<mui-heading slot="start" size="6">Heading</mui-heading>
|
|
73
|
+
<mui-h-stack slot="end" alignX="end">
|
|
74
|
+
<mui-body size="small">End slot</mui-body>
|
|
75
|
+
</mui-h-stack>
|
|
76
|
+
</mui-slat>`
|
|
80
77
|
},
|
|
81
78
|
{
|
|
82
79
|
role: "user",
|
|
83
|
-
content: "[
|
|
80
|
+
content: "[slat] Create a row slat with vertical stacks"
|
|
84
81
|
},
|
|
85
82
|
{
|
|
86
83
|
role: "assistant",
|
|
87
|
-
content:
|
|
84
|
+
content: `
|
|
85
|
+
<mui-slat variant="row">
|
|
86
|
+
<mui-v-stack slot="start">
|
|
87
|
+
<mui-body size="medium" weight="bold">...</mui-body>
|
|
88
|
+
<mui-body size="small">...</mui-body>
|
|
89
|
+
</mui-v-stack>
|
|
90
|
+
<mui-v-stack slot="end" alignX="end">
|
|
91
|
+
<mui-body size="small">...</mui-body>
|
|
92
|
+
<mui-body size="small">...</mui-body>
|
|
93
|
+
</mui-v-stack>
|
|
94
|
+
</mui-slat>`
|
|
88
95
|
},
|
|
96
|
+
{
|
|
97
|
+
role: "user",
|
|
98
|
+
content: "[slat] Create a row slat with an icon accessory"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
role: "assistant",
|
|
102
|
+
content: `
|
|
103
|
+
<mui-slat variant="row">
|
|
104
|
+
<mui-slat-accessory slot="accessory">
|
|
105
|
+
<mui-icon-left-sidebar size="small"></mui-icon-left-sidebar>
|
|
106
|
+
</mui-slat-accessory>
|
|
107
|
+
<mui-v-stack slot="start" space="0">
|
|
108
|
+
<mui-body size="medium" weight="bold">Espresso & Muffin Bar</mui-body>
|
|
109
|
+
<mui-body size="small">Food & Drink • Richmond, VIC</mui-body>
|
|
110
|
+
</mui-v-stack>
|
|
111
|
+
<mui-v-stack slot="end" space="0" alignX="end">
|
|
112
|
+
<mui-body size="x-small">Pending</mui-body>
|
|
113
|
+
<mui-body size="small" weight="bold">-$8.12</mui-body>
|
|
114
|
+
</mui-v-stack>
|
|
115
|
+
</mui-slat>`
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
role: "user",
|
|
119
|
+
content: "[card] Create a card with a slat header and action rows"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
role: "assistant",
|
|
123
|
+
content: `
|
|
124
|
+
<mui-card>
|
|
125
|
+
<mui-card-body>
|
|
126
|
+
<mui-slat variant="header">
|
|
127
|
+
<mui-heading slot="start" size="6">Today</mui-heading>
|
|
128
|
+
<mui-h-stack slot="end" alignX="end">
|
|
129
|
+
<mui-body size="small">22 July 2025</mui-body>
|
|
130
|
+
</mui-h-stack>
|
|
131
|
+
</mui-slat>
|
|
132
|
+
<mui-rule></mui-rule>
|
|
133
|
+
<mui-v-stack space="var(--space-000)" style="margin-top: var(--space-200)">
|
|
134
|
+
<mui-slat variant="action">
|
|
135
|
+
<mui-slat-accessory slot="accessory">
|
|
136
|
+
<mui-icon-left-sidebar size="small"></mui-icon-left-sidebar>
|
|
137
|
+
</mui-slat-accessory>
|
|
138
|
+
<mui-v-stack slot="start" space="0">
|
|
139
|
+
<mui-body size="medium" weight="bold">Espresso & Muffin Bar</mui-body>
|
|
140
|
+
<mui-body size="small">Food & Drink • Richmond, VIC</mui-body>
|
|
141
|
+
</mui-v-stack>
|
|
142
|
+
<mui-v-stack slot="end" space="0">
|
|
143
|
+
<mui-body size="x-small">Pending</mui-body>
|
|
144
|
+
<mui-body size="small" weight="bold">-$8.12</mui-body>
|
|
145
|
+
</mui-v-stack>
|
|
146
|
+
</mui-slat>
|
|
147
|
+
</mui-v-stack>
|
|
148
|
+
</mui-card-body>
|
|
149
|
+
</mui-card>`
|
|
150
|
+
},
|
|
151
|
+
// TABLE
|
|
152
|
+
{
|
|
153
|
+
role: "user",
|
|
154
|
+
content: "[table] Add a table"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
role: "assistant",
|
|
158
|
+
content: `
|
|
159
|
+
<mui-table>
|
|
160
|
+
<mui-row-group heading>
|
|
161
|
+
<mui-row columns="1fr 1fr">
|
|
162
|
+
<mui-cell>Heading 1</mui-cell>
|
|
163
|
+
<mui-cell>Heading 2</mui-cell>
|
|
164
|
+
</mui-row>
|
|
165
|
+
</mui-row-group>
|
|
166
|
+
<mui-row-group>
|
|
167
|
+
<mui-row columns="1fr 1fr">
|
|
168
|
+
<mui-cell>Row 1</mui-cell>
|
|
169
|
+
<mui-cell>Row 1</mui-cell>
|
|
170
|
+
</mui-row>
|
|
171
|
+
</mui-row-group>
|
|
172
|
+
</mui-table>`
|
|
173
|
+
},
|
|
174
|
+
// ACCORDION
|
|
175
|
+
{
|
|
176
|
+
role: "user",
|
|
177
|
+
content: "[accordion] Add a block accordion with two sections"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
role: "assistant",
|
|
181
|
+
content: `
|
|
182
|
+
<mui-accordion-group>
|
|
183
|
+
<mui-accordion-block heading="Section A">
|
|
184
|
+
<div slot="detail">Details A</div>
|
|
185
|
+
</mui-accordion-block>
|
|
186
|
+
<mui-accordion-block heading="Section B">
|
|
187
|
+
<div slot="detail">Details B</div>
|
|
188
|
+
</mui-accordion-block>
|
|
189
|
+
</mui-accordion-group>`
|
|
190
|
+
},
|
|
191
|
+
// ICONS
|
|
192
|
+
{ role: "user", content: "[icon] Add an icon" },
|
|
193
|
+
{ role: "assistant", content: "<mui-icon-{name}></mui-icon-{name}]>" },
|
|
194
|
+
// IMAGE
|
|
89
195
|
{
|
|
90
196
|
role: "user",
|
|
91
197
|
content: "[image] Show an image with a caption"
|
|
92
198
|
},
|
|
93
199
|
{
|
|
94
200
|
role: "assistant",
|
|
95
|
-
content:
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
</
|
|
201
|
+
content: `
|
|
202
|
+
<mui-image>
|
|
203
|
+
<img slot="image" src="..." alt="Descriptive alt text" />
|
|
204
|
+
<figcaption slot="caption">This is a caption</figcaption>
|
|
205
|
+
</mui-image>`
|
|
99
206
|
},
|
|
207
|
+
// STACK
|
|
100
208
|
{
|
|
101
209
|
role: "user",
|
|
102
210
|
content: "[stack] Create a horizontal stack with two cards and spacing"
|
|
@@ -119,6 +227,7 @@ const t = [
|
|
|
119
227
|
<mui-card>...</mui-card>
|
|
120
228
|
</mui-v-stack>`
|
|
121
229
|
},
|
|
230
|
+
// GRID
|
|
122
231
|
{
|
|
123
232
|
role: "user",
|
|
124
233
|
content: "[layout] Create a grid with 2 columns and card content"
|
|
@@ -130,6 +239,7 @@ const t = [
|
|
|
130
239
|
<mui-card>...</mui-card>
|
|
131
240
|
</mui-grid>`
|
|
132
241
|
},
|
|
242
|
+
// RESPONSIVE
|
|
133
243
|
{
|
|
134
244
|
role: "user",
|
|
135
245
|
content: "[responsive] Show a div above 600px and a different one below"
|
|
@@ -141,6 +251,20 @@ const t = [
|
|
|
141
251
|
<div slot="showBelow">...</div>
|
|
142
252
|
</mui-responsive>`
|
|
143
253
|
},
|
|
254
|
+
// CONTAINER
|
|
255
|
+
{ role: "user", content: "[layout] Create a small container" },
|
|
256
|
+
{ role: "assistant", content: "<mui-container small>...</mui-container>" },
|
|
257
|
+
{ role: "user", content: "[layout] Create a medium container" },
|
|
258
|
+
{ role: "assistant", content: "<mui-container medium>...</mui-container>" },
|
|
259
|
+
{ role: "user", content: "[layout] Create a large container" },
|
|
260
|
+
{ role: "assistant", content: "<mui-container large>...</mui-container>" },
|
|
261
|
+
{ role: "user", content: "[layout] Create a fluid container" },
|
|
262
|
+
{ role: "assistant", content: "<mui-container fluid>...</mui-container>" },
|
|
263
|
+
{ role: "user", content: "[layout] Create a small container and centered" },
|
|
264
|
+
{ role: "assistant", content: "<mui-container small center>...</mui-container>" },
|
|
265
|
+
{ role: "user", content: "[button] Create a primary button" },
|
|
266
|
+
{ role: "assistant", content: "<mui-button variant='primary'>...</mui-button>" },
|
|
267
|
+
// RULE
|
|
144
268
|
{
|
|
145
269
|
role: "user",
|
|
146
270
|
content: "[rule] Insert a horizontal divider"
|
|
@@ -157,24 +281,34 @@ const t = [
|
|
|
157
281
|
role: "assistant",
|
|
158
282
|
content: '<mui-rule direction="vertical" length="100px"></mui-rule>'
|
|
159
283
|
},
|
|
284
|
+
// CARD
|
|
285
|
+
{ role: "user", content: "[card] Create a vertical stack with two cards" },
|
|
286
|
+
{
|
|
287
|
+
role: "assistant",
|
|
288
|
+
content: `<mui-v-stack space="var(--space-400)">
|
|
289
|
+
<mui-card>...</mui-card>
|
|
290
|
+
<mui-card>...</mui-card>
|
|
291
|
+
</mui-v-stack>`
|
|
292
|
+
},
|
|
160
293
|
{
|
|
161
294
|
role: "user",
|
|
162
295
|
content: "[card] Create a card with heading and footer actions"
|
|
163
296
|
},
|
|
164
297
|
{
|
|
165
298
|
role: "assistant",
|
|
166
|
-
content:
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
</mui-card
|
|
299
|
+
content: `
|
|
300
|
+
<mui-card>
|
|
301
|
+
<mui-card-header>
|
|
302
|
+
<mui-heading size="3">...</mui-heading>
|
|
303
|
+
</mui-card-header>
|
|
304
|
+
<mui-card-body>...</mui-card-body>
|
|
305
|
+
<mui-card-footer>
|
|
306
|
+
<mui-button-group right>
|
|
307
|
+
<mui-button variant="secondary">Cancel</mui-button>
|
|
308
|
+
<mui-button variant="primary">Submit</mui-button>
|
|
309
|
+
</mui-button-group>
|
|
310
|
+
</mui-card-footer>
|
|
311
|
+
</mui-card>`
|
|
178
312
|
},
|
|
179
313
|
{
|
|
180
314
|
role: "user",
|
|
@@ -182,134 +316,356 @@ const t = [
|
|
|
182
316
|
},
|
|
183
317
|
{
|
|
184
318
|
role: "assistant",
|
|
185
|
-
content:
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
</mui-card
|
|
319
|
+
content: `
|
|
320
|
+
<mui-card>
|
|
321
|
+
<mui-card-header>
|
|
322
|
+
<mui-heading size="3">Title</mui-heading>
|
|
323
|
+
</mui-card-header>
|
|
324
|
+
<mui-rule></mui-rule>
|
|
325
|
+
<mui-card-body>
|
|
326
|
+
<mui-table>
|
|
327
|
+
<mui-row-group heading>
|
|
328
|
+
<mui-row columns="1fr 1fr 1fr auto">
|
|
329
|
+
<mui-cell heading>Office</mui-cell>
|
|
330
|
+
<mui-cell heading>Revenue</mui-cell>
|
|
331
|
+
<mui-cell heading>Cost</mui-cell>
|
|
332
|
+
<mui-cell heading action></mui-cell>
|
|
333
|
+
</mui-row>
|
|
334
|
+
</mui-row-group>
|
|
335
|
+
<mui-row-group>
|
|
336
|
+
<mui-row columns="1fr 1fr 1fr auto">
|
|
337
|
+
<mui-cell>Whalen</mui-cell>
|
|
338
|
+
<mui-cell>$4,400.00</mui-cell>
|
|
339
|
+
<mui-cell>$1,100.00</mui-cell>
|
|
340
|
+
<mui-cell action>
|
|
341
|
+
<mui-button variant="tertiary">
|
|
342
|
+
<mui-icon-add size="small"></mui-icon-add>
|
|
343
|
+
</mui-button>
|
|
344
|
+
</mui-cell>
|
|
345
|
+
</mui-row>
|
|
346
|
+
</mui-row-group>
|
|
347
|
+
</mui-table>
|
|
348
|
+
</mui-card-body>
|
|
349
|
+
</mui-card>`
|
|
215
350
|
},
|
|
216
351
|
{
|
|
217
352
|
role: "system",
|
|
218
353
|
content: "You are an assistant that converts UI prompts into MUI-style web components using custom tags like <mui-button>, <mui-alert>, <mui-message>, <mui-badge>, <mui-tab-controller>, and <mui-carousel-controller>. Each user message may include tags like [button], [alert], [tab], etc. Use these to help determine intent."
|
|
219
354
|
},
|
|
220
|
-
//
|
|
355
|
+
// ALERTS
|
|
221
356
|
{ role: "user", content: "[alert] Show a success alert" },
|
|
222
357
|
{ role: "assistant", content: '<mui-alert variant="success">...</mui-alert>' },
|
|
223
358
|
{ role: "user", content: "[alert] Show an error alert" },
|
|
224
359
|
{ role: "assistant", content: '<mui-alert variant="error">...</mui-alert>' },
|
|
225
|
-
//
|
|
360
|
+
// MESSAGES
|
|
226
361
|
{ role: "user", content: "[message] Create an info message with heading and body" },
|
|
227
362
|
{
|
|
228
363
|
role: "assistant",
|
|
229
|
-
content:
|
|
230
|
-
|
|
231
|
-
|
|
364
|
+
content: `
|
|
365
|
+
<mui-message heading="Message heading" variant="info">
|
|
366
|
+
<mui-body>...</mui-body>
|
|
367
|
+
</mui-message>`
|
|
232
368
|
},
|
|
233
369
|
{ role: "user", content: "[message] Create a positive message with link" },
|
|
234
370
|
{
|
|
235
371
|
role: "assistant",
|
|
236
|
-
content:
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
</mui-
|
|
372
|
+
content: `
|
|
373
|
+
<mui-message heading="Message heading" variant="positive">
|
|
374
|
+
<mui-body>The report has been...</mui-body>
|
|
375
|
+
<mui-link>Download Your Report</mui-link>
|
|
376
|
+
</mui-message>`
|
|
240
377
|
},
|
|
241
378
|
{ role: "user", content: "[message] Create a message with a list" },
|
|
242
379
|
{
|
|
243
380
|
role: "assistant",
|
|
244
|
-
content:
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
</mui-
|
|
250
|
-
|
|
251
|
-
|
|
381
|
+
content: `
|
|
382
|
+
<mui-message heading="Message heading">
|
|
383
|
+
<mui-list as="ul">
|
|
384
|
+
<mui-list-item size="small">Item 1</mui-list-item>
|
|
385
|
+
<mui-list-item size="small">Item 2</mui-list-item>
|
|
386
|
+
</mui-list>
|
|
387
|
+
</mui-message>`
|
|
388
|
+
},
|
|
389
|
+
// BADGES
|
|
252
390
|
{ role: "user", content: "[badge] Show a warning badge" },
|
|
253
391
|
{ role: "assistant", content: '<mui-badge variant="warning">...</mui-badge>' },
|
|
254
|
-
//
|
|
392
|
+
// BUTTON
|
|
255
393
|
{ role: "user", content: "[button] Create a primary button" },
|
|
256
394
|
{ role: "assistant", content: '<mui-button variant="primary">...</mui-button>' },
|
|
257
395
|
{ role: "user", content: "[button-group] Create a right-aligned button group with cancel and submit" },
|
|
258
396
|
{
|
|
259
397
|
role: "assistant",
|
|
260
|
-
content:
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
</mui-button
|
|
398
|
+
content: `
|
|
399
|
+
<mui-button-group right>
|
|
400
|
+
<mui-button variant="secondary">Cancel</mui-button>
|
|
401
|
+
<mui-button variant="primary">Submit</mui-button>
|
|
402
|
+
</mui-button-group>`
|
|
264
403
|
},
|
|
265
404
|
{ role: "user", content: "[button] Create a tertiary button with add icon" },
|
|
266
405
|
{
|
|
267
406
|
role: "assistant",
|
|
268
|
-
content:
|
|
269
|
-
|
|
270
|
-
|
|
407
|
+
content: `
|
|
408
|
+
<mui-button variant="tertiary">
|
|
409
|
+
<mui-icon-add></mui-icon-add>
|
|
410
|
+
</mui-button>`
|
|
271
411
|
},
|
|
272
|
-
//
|
|
412
|
+
// LINK
|
|
273
413
|
{ role: "user", content: "[link] Create a primary link" },
|
|
274
414
|
{ role: "assistant", content: '<mui-link variant="primary" href="links.html">...</mui-link>' },
|
|
275
415
|
{ role: "user", content: "[link] Create a small sized link" },
|
|
276
416
|
{ role: "assistant", content: '<mui-link size="small">Link text</mui-link>' },
|
|
277
|
-
//
|
|
417
|
+
// TABS
|
|
278
418
|
{ role: "user", content: "[tab] Create a tab controller with three tabs" },
|
|
279
419
|
{
|
|
280
420
|
role: "assistant",
|
|
281
|
-
content:
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
</mui-tab-
|
|
291
|
-
|
|
292
|
-
|
|
421
|
+
content: `
|
|
422
|
+
<mui-tab-controller>
|
|
423
|
+
<mui-tab-bar>
|
|
424
|
+
<mui-tab-item active id="item1">Item 1</mui-tab-item>
|
|
425
|
+
<mui-tab-item id="item2">Item 2</mui-tab-item>
|
|
426
|
+
<mui-tab-item id="item3">Item 3</mui-tab-item>
|
|
427
|
+
</mui-tab-bar>
|
|
428
|
+
<mui-tab-panel item="item1">Content 1</mui-tab-panel>
|
|
429
|
+
<mui-tab-panel item="item2">Content 2</mui-tab-panel>
|
|
430
|
+
<mui-tab-panel item="item3">Content 3</mui-tab-panel>
|
|
431
|
+
</mui-tab-controller>`
|
|
432
|
+
},
|
|
433
|
+
// CAROUSEL
|
|
293
434
|
{ role: "user", content: "[carousel] Create a carousel controller with tabs and panels" },
|
|
294
435
|
{
|
|
295
436
|
role: "assistant",
|
|
296
|
-
content:
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
437
|
+
content: `
|
|
438
|
+
<mui-carousel-controller>
|
|
439
|
+
<mui-tab-bar slot="controls">
|
|
440
|
+
<mui-tab-item active id="one">1</mui-tab-item>
|
|
441
|
+
<!-- Add other tabs -->
|
|
442
|
+
</mui-tab-bar>
|
|
443
|
+
<mui-carousel-panel slot="item" item="one">
|
|
444
|
+
<mui-grid col="1fr" style="padding-bottom: var(--carousel-tab-offset);">
|
|
445
|
+
<mui-v-stack style="padding: var(--space-500) var(--space-600);">
|
|
446
|
+
<mui-heading level="3" size="2">Item 1</mui-heading>
|
|
447
|
+
<mui-body>Content...</mui-body>
|
|
448
|
+
</mui-v-stack>
|
|
449
|
+
</mui-grid>
|
|
450
|
+
</mui-carousel-panel>
|
|
451
|
+
<!-- Add other panels -->
|
|
452
|
+
</mui-carousel-controller>`
|
|
453
|
+
},
|
|
454
|
+
// SMART CARD
|
|
455
|
+
{ role: "user", content: "[smart-card] Basic plain card with number and logo" },
|
|
456
|
+
{
|
|
457
|
+
role: "assistant",
|
|
458
|
+
content: `
|
|
459
|
+
<mui-smart-card
|
|
460
|
+
number="1234"
|
|
461
|
+
type="Debit"
|
|
462
|
+
logo="https://muibook.com/images/image-220.png"
|
|
463
|
+
partner="https://muibook.com/images/visa-black.svg"
|
|
464
|
+
variant="plain"
|
|
465
|
+
/>`
|
|
466
|
+
},
|
|
467
|
+
{ role: "user", content: "[smart-card] Plain card with inverted style" },
|
|
468
|
+
{
|
|
469
|
+
role: "assistant",
|
|
470
|
+
content: `
|
|
471
|
+
<mui-smart-card
|
|
472
|
+
inverted
|
|
473
|
+
number="1234"
|
|
474
|
+
type="Debit"
|
|
475
|
+
logo="https://muibook.com/images/image-220.png"
|
|
476
|
+
partner="https://muibook.com/images/visa-white.svg"
|
|
477
|
+
variant="plain"
|
|
478
|
+
/>`
|
|
479
|
+
},
|
|
480
|
+
{ role: "user", content: "[smart-card] Animated card with background image" },
|
|
481
|
+
{
|
|
482
|
+
role: "assistant",
|
|
483
|
+
content: `
|
|
484
|
+
<mui-smart-card
|
|
485
|
+
number="1234"
|
|
486
|
+
type="Debit"
|
|
487
|
+
bg-image="https://muibook.com/images/buttercup.png"
|
|
488
|
+
logo="https://muibook.com/images/image-220.png"
|
|
489
|
+
partner="https://muibook.com/images/visa-black.svg"
|
|
490
|
+
variant="animated"
|
|
491
|
+
/>`
|
|
492
|
+
},
|
|
493
|
+
{ role: "user", content: "[smart-card] Card with custom logo size" },
|
|
494
|
+
{
|
|
495
|
+
role: "assistant",
|
|
496
|
+
content: `
|
|
497
|
+
<mui-smart-card
|
|
498
|
+
logo="https://muibook.com/images/guides.svg"
|
|
499
|
+
logo-height="80"
|
|
500
|
+
/>`
|
|
501
|
+
},
|
|
502
|
+
{ role: "user", content: "[smart-card] Frozen card state" },
|
|
503
|
+
{
|
|
504
|
+
role: "assistant",
|
|
505
|
+
content: `
|
|
506
|
+
<mui-smart-card
|
|
507
|
+
state="frozen"
|
|
508
|
+
number="1234"
|
|
509
|
+
type="Debit"
|
|
510
|
+
logo="https://muibook.com/images/image-220.png"
|
|
511
|
+
partner="https://muibook.com/images/visa-black.svg"
|
|
512
|
+
variant="plain"
|
|
513
|
+
/>`
|
|
514
|
+
},
|
|
515
|
+
{ role: "user", content: "[smart-card] Card with background color" },
|
|
516
|
+
{
|
|
517
|
+
role: "assistant",
|
|
518
|
+
content: `
|
|
519
|
+
<mui-smart-card
|
|
520
|
+
variant="plain"
|
|
521
|
+
bg-color="#a4fc67"
|
|
522
|
+
number="1234"
|
|
523
|
+
type="Debit"
|
|
524
|
+
logo="https://muibook.com/images/image-220.png"
|
|
525
|
+
partner="https://muibook.com/images/visa-black.svg"
|
|
526
|
+
/>`
|
|
527
|
+
},
|
|
528
|
+
{ role: "user", content: "[smart-card] Card with background image (non-animated)" },
|
|
529
|
+
{
|
|
530
|
+
role: "assistant",
|
|
531
|
+
content: `
|
|
532
|
+
<mui-smart-card
|
|
533
|
+
variant="plain"
|
|
534
|
+
bg-image="https://muibook.com/images/image-395.png"
|
|
535
|
+
number="1234"
|
|
536
|
+
type="Debit"
|
|
537
|
+
logo="https://muibook.com/images/image-220.png"
|
|
538
|
+
partner="https://muibook.com/images/visa-black.svg"
|
|
539
|
+
/>`
|
|
540
|
+
},
|
|
541
|
+
{ role: "user", content: "[smart-card] Premier reward card" },
|
|
542
|
+
{
|
|
543
|
+
role: "assistant",
|
|
544
|
+
content: `
|
|
545
|
+
<mui-smart-card
|
|
546
|
+
type="Premier"
|
|
547
|
+
partner="https://muibook.com/images/emerald.svg"
|
|
548
|
+
bg-image="https://muibook.com/images/premier.png"
|
|
549
|
+
/>`
|
|
550
|
+
},
|
|
551
|
+
{ role: "user", content: "[smart-card] Diamond reward card (inverted)" },
|
|
552
|
+
{
|
|
553
|
+
role: "assistant",
|
|
554
|
+
content: `
|
|
555
|
+
<mui-smart-card
|
|
556
|
+
inverted
|
|
557
|
+
type="Diamond"
|
|
558
|
+
partner="https://muibook.com/images/emerald.svg"
|
|
559
|
+
bg-image="https://muibook.com/images/diamond.png"
|
|
560
|
+
/>`
|
|
561
|
+
},
|
|
562
|
+
// COMPOSITION: WALLET
|
|
563
|
+
{
|
|
564
|
+
role: "user",
|
|
565
|
+
content: "[wallet] Create a wallet layout with a smart card and tabbed transactions"
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
role: "assistant",
|
|
569
|
+
content: `
|
|
570
|
+
<mui-v-stack alignX="stretch" slot="body" style="max-width: 365px; margin: 0 auto; padding-top: var(--space-700); padding-bottom: var(--space-700)">
|
|
571
|
+
<mui-smart-card
|
|
572
|
+
variant="animated"
|
|
573
|
+
partner="https://muibook.com/images/visa-black.svg"
|
|
574
|
+
type="Debit"
|
|
575
|
+
number="1234"
|
|
576
|
+
logo="https://muibook.com/images/guides.svg"
|
|
577
|
+
logo-height="80"
|
|
578
|
+
bg-image="https://muibook.com/images/buttercup.png"
|
|
579
|
+
></mui-smart-card>
|
|
580
|
+
|
|
581
|
+
<mui-tab-controller>
|
|
582
|
+
<mui-v-stack alignX="stretch" style="max-width: 100%;" space="var(--space-300)">
|
|
583
|
+
<mui-tab-bar>
|
|
584
|
+
<mui-tab-item active id="item1">Transactions</mui-tab-item>
|
|
585
|
+
<mui-tab-item id="item2">Statements</mui-tab-item>
|
|
586
|
+
</mui-tab-bar>
|
|
587
|
+
|
|
588
|
+
<mui-tab-panel item="item1">
|
|
589
|
+
<mui-v-stack alignX="stretch" space="var(--space-000)">
|
|
590
|
+
<mui-slat variant="header">
|
|
591
|
+
<mui-heading slot="start" size="6">Today</mui-heading>
|
|
592
|
+
<mui-h-stack slot="end" alignX="end">
|
|
593
|
+
<mui-body size="small">22 July 2025</mui-body>
|
|
594
|
+
</mui-h-stack>
|
|
595
|
+
</mui-slat>
|
|
596
|
+
|
|
597
|
+
<mui-v-stack space="var(--space-025)">
|
|
598
|
+
<mui-slat variant="row">
|
|
599
|
+
<mui-v-stack slot="start" space="0">
|
|
600
|
+
<mui-body size="medium" weight="bold">Espresso Bar</mui-body>
|
|
601
|
+
<mui-body size="small">Food & Drink</mui-body>
|
|
602
|
+
</mui-v-stack>
|
|
603
|
+
<mui-v-stack space="0" slot="end" alignX="end">
|
|
604
|
+
<mui-body size="small">Pending</mui-body>
|
|
605
|
+
<mui-body size="small">-$8.12</mui-body>
|
|
606
|
+
</mui-v-stack>
|
|
607
|
+
</mui-slat>
|
|
608
|
+
</mui-v-stack>
|
|
609
|
+
|
|
610
|
+
</mui-v-stack>
|
|
611
|
+
</mui-tab-panel>
|
|
612
|
+
|
|
613
|
+
<mui-tab-panel item="item2">
|
|
614
|
+
<mui-v-stack alignX="stretch" space="var(--space-000)">
|
|
615
|
+
<mui-slat variant="header">
|
|
616
|
+
<mui-heading size="6" slot="start">Recents</mui-heading>
|
|
617
|
+
</mui-slat>
|
|
618
|
+
<mui-v-stack space="var(--space-025)">
|
|
619
|
+
<mui-slat variant="action">
|
|
620
|
+
<mui-v-stack space="0" slot="start">
|
|
621
|
+
<mui-body size="medium" weight="bold">Get a Transactions Report</mui-body>
|
|
622
|
+
<mui-body size="small">Generate a PDF of your recent transactions</mui-body>
|
|
623
|
+
</mui-v-stack>
|
|
624
|
+
</mui-slat>
|
|
625
|
+
</mui-v-stack>
|
|
626
|
+
</mui-tab-panel>
|
|
627
|
+
</mui-v-stack>
|
|
628
|
+
</mui-tab-controller>
|
|
629
|
+
</mui-v-stack>`
|
|
630
|
+
},
|
|
631
|
+
// COMPOSITION: SIGN UP
|
|
632
|
+
{
|
|
633
|
+
role: "user",
|
|
634
|
+
content: "[composition] Create a sign-up form with fields for first name, last name, email, password, confirm password, a checkbox to agree to terms, and a submit button."
|
|
635
|
+
},
|
|
636
|
+
{
|
|
637
|
+
role: "assistant",
|
|
638
|
+
content: `
|
|
639
|
+
<mui-container small center>
|
|
640
|
+
<mui-card>
|
|
641
|
+
<mui-card-header>
|
|
642
|
+
<mui-heading size="3">Sign up for our product!</mui-heading>
|
|
643
|
+
</mui-card-header>
|
|
644
|
+
<mui-card-body>
|
|
645
|
+
<form>
|
|
646
|
+
<mui-v-stack space="var(--space-400)">
|
|
647
|
+
<mui-field id="emailField" label="Email">
|
|
648
|
+
<mui-input type="email" placeholder="john@example.com" />
|
|
649
|
+
</mui-field>
|
|
650
|
+
<mui-field id="passwordField" label="Password">
|
|
651
|
+
<mui-input type="password" />
|
|
652
|
+
</mui-field>
|
|
653
|
+
<mui-field id="confirmPasswordField" label="Confirm Password">
|
|
654
|
+
<mui-input type="password" />
|
|
655
|
+
</mui-field>
|
|
656
|
+
<mui-field id="termsField">
|
|
657
|
+
<mui-checkbox id="agreeTerms">I agree to the <mui-link href="/terms">terms and conditions</mui-link></mui-checkbox>
|
|
658
|
+
</mui-field>
|
|
659
|
+
<mui-button-group right>
|
|
660
|
+
<mui-button variant="primary">Sign up</mui-button>
|
|
661
|
+
</mui-button-group>
|
|
662
|
+
</mui-v-stack>
|
|
663
|
+
</form>
|
|
664
|
+
</mui-card-body>
|
|
665
|
+
</mui-card>
|
|
666
|
+
</mui-container>`
|
|
311
667
|
}
|
|
312
668
|
];
|
|
313
669
|
export {
|
|
314
|
-
|
|
670
|
+
i as muiPrompts
|
|
315
671
|
};
|