@umkmall/proto 0.1.0-h03e952a96ac5

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.
@@ -0,0 +1,847 @@
1
+ # UMKMall prototyping starter — the whole file
2
+
3
+ The starter in a code block, so it can be read without fetching HTML. Save it as `.html` and
4
+ open it; there is no build step and no install.
5
+
6
+ It is the same file as [the raw starter](https://cdn.jsdelivr.net/npm/@umkmall/proto@0.1.0-h03e952a96ac5/umkmall-prototype-starter.html) with one deliberate difference: the
7
+ `.html` carries the whole component list inside a comment in its `<head>`, and here that is
8
+ replaced by a link to [the same list](https://cdn.jsdelivr.net/npm/@umkmall/proto@0.1.0-h03e952a96ac5/umkmall-components.md). Nothing else differs, and nothing the
9
+ page needs to run is in the part that was swapped.
10
+
11
+ **Take the `<head>` exactly as it is.** Its tags load in one order that works: the config
12
+ assigns `tailwind.config` and the Tailwind Play CDN reads it when it compiles, so before the
13
+ CDN the global does not exist and after it the theme arrives too late — every design-system
14
+ class then resolves to nothing, with no error. Edit only the `<script type="text/babel">`
15
+ block at the bottom.
16
+
17
+ The component list is not inline here; it is [its own file](https://cdn.jsdelivr.net/npm/@umkmall/proto@0.1.0-h03e952a96ac5/umkmall-components.md).
18
+
19
+ ````html
20
+ <!doctype html>
21
+ <html lang="id">
22
+ <head>
23
+ <meta charset="utf-8">
24
+ <meta name="viewport" content="width=device-width, initial-scale=1">
25
+ <title>Prototipe UMKMall</title>
26
+ <!--
27
+ UMKMall prototyping starter — generated, do not hand-edit the parts above the demo.
28
+
29
+ Built from commit the @umkmall/proto version named in the asset URLs below
30
+ Regenerate with: npm run proto:assets
31
+
32
+ HOW TO USE THIS FILE
33
+ 1. Open it by double-click. It runs with no build step and no npm install.
34
+ 2. Edit the <script type="text/babel"> block at the bottom. Start with <Konten />.
35
+ 3. Reload the browser. That is the whole loop.
36
+
37
+ WHAT THIS FILE NEEDS FROM THE NETWORK
38
+ Four hosts, every time it is opened — not just the first time:
39
+
40
+ https://cdn.jsdelivr.net/npm/@umkmall/proto@0.1.0-h03e952a96ac5/umkmall-tailwind.js
41
+ https://cdn.jsdelivr.net/npm/@umkmall/proto@0.1.0-h03e952a96ac5/umkmall-ui.js
42
+ https://cdn.jsdelivr.net/npm/@babel/standalone@7.26.4/babel.min.js
43
+ — all on jsDelivr: the design system's assets (pinned) and the JSX compiler.
44
+ The token CSS is NOT fetched: it is inlined in the <style> below, because a claude.ai
45
+ artifact loads stylesheets only from Google Fonts. Keep that <style> as it is.
46
+ the Tailwind Play CDN, for the styling engine
47
+ Google Fonts (fonts.googleapis.com and fonts.gstatic.com), for the typeface
48
+
49
+ If any of them is unreachable the page renders BLANK or unstyled with no error. That is
50
+ the first thing to check when it looks broken. They are public CDNs on purpose: Claude's and
51
+ Gemini's previews only load scripts from hosts on their allowlists, and these are on both.
52
+
53
+ YOU DO NOT HAVE TO START FROM THIS FILE
54
+ Four tags add UMKMall styling to a page you already have: the token CSS as a <link> to
55
+ https://cdn.jsdelivr.net/npm/@umkmall/proto@0.1.0-h03e952a96ac5/umkmall-tokens.css
56
+ then the Play CDN, the config and the bundle below. Keep the order — the config must come after
57
+ the Play CDN script, or the theme arrives too late and every class resolves to nothing.
58
+
59
+ THE COMPONENT LIST IS NOT IN THIS FILE.
60
+ It is published separately, and it is always current:
61
+
62
+ https://cdn.jsdelivr.net/npm/@umkmall/proto@0.1.0-h03e952a96ac5/umkmall-components.md
63
+
64
+ It carries every component, its axes, and the props it will not render without.
65
+ -->
66
+ <link rel="preconnect" href="https://fonts.googleapis.com">
67
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
68
+ <link href="https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@300;400;500;600;700&display=swap" rel="stylesheet">
69
+ <style>
70
+ /* Generated from Ensyra — DS by `npm run tokens:build`. Do not edit by hand. */
71
+ :root {
72
+ --brand-b600: 0 61 121;
73
+ --brand-b500: 0 81 162;
74
+ --brand-b400: 0 116 231;
75
+ --brand-b300: 43 140 235;
76
+ --brand-b200: 107 174 241;
77
+ --brand-b100: 150 198 245;
78
+ --brand-b10: 240 247 255;
79
+ --brand-b10-pct: 0 116 231;
80
+ --neutral-n999: 0 0 0;
81
+ --neutral-n600: 2 22 41;
82
+ --neutral-n500: 3 32 61;
83
+ --neutral-n400: 4 38 72;
84
+ --neutral-n300: 49 77 105;
85
+ --neutral-n200: 97 118 140;
86
+ --neutral-n100: 147 162 176;
87
+ --neutral-n40: 195 203 211;
88
+ --neutral-n30: 240 240 240;
89
+ --neutral-n20: 246 246 246;
90
+ --neutral-n10: 251 251 251;
91
+ --neutral-n0: 255 255 255;
92
+ --red-r600: 124 0 0;
93
+ --red-r500: 162 0 0;
94
+ --red-r400: 231 0 0;
95
+ --red-r450: 219 0 0;
96
+ --red-r300: 235 43 43;
97
+ --red-r200: 241 107 107;
98
+ --red-r100: 245 150 150;
99
+ --red-r10: 255 243 243;
100
+ --red-r10-pct: 231 0 0;
101
+ --green-g600: 0 88 71;
102
+ --green-g500: 8 118 96;
103
+ --green-g400: 14 160 110;
104
+ --green-g300: 28 198 142;
105
+ --green-g200: 110 233 192;
106
+ --green-g100: 153 239 211;
107
+ --green-g10: 236 253 247;
108
+ --green-g10-pct: 14 160 110;
109
+ --yellow-y600: 149 96 7;
110
+ --yellow-y500: 172 111 8;
111
+ --yellow-y400: 245 158 11;
112
+ --yellow-y300: 251 188 4;
113
+ --yellow-y200: 253 216 109;
114
+ --yellow-y100: 253 228 152;
115
+ --yellow-y10: 255 248 230;
116
+ --yellow-y10-pct: 245 158 11;
117
+ --font-size-3xs: 8;
118
+ --font-size-2xs: 10;
119
+ --font-size-xs: 12;
120
+ --font-size-sm: 14;
121
+ --font-size-md: 16;
122
+ --font-size-lg: 18;
123
+ --font-size-xl: 20;
124
+ --font-size-2xl: 22;
125
+ --font-size-3xl: 24;
126
+ --font-size-4xl: 28;
127
+ --font-size-5xl: 32;
128
+ --font-size-6xl: 36;
129
+ --font-size-7xl: 40;
130
+ --font-size-8xl: 56;
131
+ --font-letter-spacing-none: 0;
132
+ --font-letter-spacing-sm: -0.10000000149011612;
133
+ --font-letter-spacing-md: -0.30000001192092896;
134
+ --font-letter-spacing-lg: -1;
135
+ --font-line-height-4xs: 14;
136
+ --font-line-height-3xs: 16;
137
+ --font-line-height-2xs: 18;
138
+ --font-line-height-xs: 20;
139
+ --font-line-height-sm: 22;
140
+ --font-line-height-md: 24;
141
+ --font-line-height-lg: 26;
142
+ --font-line-height-xl: 28;
143
+ --font-line-height-2xl: 32;
144
+ --font-line-height-3xl: 36;
145
+ --font-line-height-4xl: 40;
146
+ --font-line-height-5xl: 48;
147
+ --font-line-height-6xl: 64;
148
+ --font-familiy-brand: Be Vietnam Pro;
149
+ --font-weight-regular: Regular;
150
+ --font-weight-medium: Medium;
151
+ --font-weight-semibold: SemiBold;
152
+ --font-weight-bold: Bold;
153
+ --percentage-0-pct: 0;
154
+ --percentage-10-pct: 10;
155
+ --percentage-60-pct: 60;
156
+ --percentage-100-pct: 100;
157
+ --measurement-0: 0;
158
+ --measurement-1: 16;
159
+ --measurement-2: 32;
160
+ --measurement-3: 48;
161
+ --measurement-4: 64;
162
+ --measurement-5: 80;
163
+ --measurement-0-0625: 1;
164
+ --measurement-0-125: 2;
165
+ --measurement-0-25: 4;
166
+ --measurement-0-375: 6;
167
+ --measurement-0-5: 8;
168
+ --measurement-0-625: 10;
169
+ --measurement-0-75: 12;
170
+ --measurement-1-25: 20;
171
+ --measurement-1-375: 22;
172
+ --measurement-1-5: 24;
173
+ --measurement-1-625: 26;
174
+ --measurement-1-75: 28;
175
+ --measurement-2-25: 36;
176
+ --measurement-2-5: 40;
177
+ --measurement-2-75: 44;
178
+ --measurement-3-5: 56;
179
+ --measurement-4-5: 72;
180
+ --measurement-5-25: 84;
181
+ --measurement-7-5: 120;
182
+ --measurement-full: 360;
183
+ --text-default-primary: 4 38 72;
184
+ --text-default-secondary: 147 162 176;
185
+ --text-default-invert: 255 255 255;
186
+ --text-default-brand: 0 116 231;
187
+ --text-default-success: 14 160 110;
188
+ --text-default-error: 219 0 0;
189
+ --text-default-warning: 245 158 11;
190
+ --text-hover-primary: 3 32 61;
191
+ --text-hover-secondary: 97 118 140;
192
+ --text-hover-invert: 246 246 246;
193
+ --text-hover-brand: 0 81 162;
194
+ --text-hover-success: 8 118 96;
195
+ --text-hover-error: 162 0 0;
196
+ --text-hover-warning: 172 111 8;
197
+ --text-active-primary: 2 22 41;
198
+ --text-active-secondary: 49 77 105;
199
+ --text-active-invert: 240 240 240;
200
+ --text-active-brand: 0 61 121;
201
+ --text-active-success: 0 88 71;
202
+ --text-active-error: 124 0 0;
203
+ --text-active-warning: 149 96 7;
204
+ --text-focus-primary: 4 38 72;
205
+ --text-focus-invert: 255 255 255;
206
+ --text-focus-brand: 0 116 231;
207
+ --text-focus-success: 14 160 110;
208
+ --text-focus-error: 231 0 0;
209
+ --text-focus-warning: 245 158 11;
210
+ --text-disable-primary: 195 203 211;
211
+ --text-disable-brand: 150 198 245;
212
+ --text-disable-success: 153 239 211;
213
+ --text-disable-error: 245 150 150;
214
+ --text-disable-warning: 253 228 152;
215
+ --text-disable-invert: 49 77 105;
216
+ --icon-default-primary: 4 38 72;
217
+ --icon-default-secondary: 147 162 176;
218
+ --icon-default-invert: 255 255 255;
219
+ --icon-default-brand: 0 116 231;
220
+ --icon-default-success: 14 160 110;
221
+ --icon-default-error: 219 0 0;
222
+ --icon-default-warning: 245 158 11;
223
+ --icon-hover-primary: 3 32 61;
224
+ --icon-hover-secondary: 97 118 140;
225
+ --icon-hover-invert: 246 246 246;
226
+ --icon-hover-brand: 0 81 162;
227
+ --icon-hover-success: 8 118 96;
228
+ --icon-hover-error: 162 0 0;
229
+ --icon-hover-warning: 172 111 8;
230
+ --icon-active-primary: 2 22 41;
231
+ --icon-active-secondary: 49 77 105;
232
+ --icon-active-invert: 240 240 240;
233
+ --icon-active-brand: 0 61 121;
234
+ --icon-active-success: 0 88 71;
235
+ --icon-active-error: 124 0 0;
236
+ --icon-active-warning: 149 96 7;
237
+ --icon-focus-primary: 4 38 72;
238
+ --icon-focus-invert: 255 255 255;
239
+ --icon-focus-brand: 0 116 231;
240
+ --icon-focus-success: 14 160 110;
241
+ --icon-focus-error: 231 0 0;
242
+ --icon-focus-warning: 245 158 11;
243
+ --icon-disable-primary: 195 203 211;
244
+ --icon-disable-brand: 150 198 245;
245
+ --icon-disable-success: 153 239 211;
246
+ --icon-disable-error: 245 150 150;
247
+ --icon-disable-warning: 253 228 152;
248
+ --icon-disable-invert: 49 77 105;
249
+ --surface-default-primary: 255 255 255;
250
+ --surface-default-secondary: 246 246 246;
251
+ --surface-default-invert: 0 0 0;
252
+ --surface-default-brand: 0 116 231;
253
+ --surface-default-success: 14 160 110;
254
+ --surface-default-error: 231 0 0;
255
+ --surface-default-warning: 245 158 11;
256
+ --surface-default-overlay: 4 38 72;
257
+ --surface-hover-primary: 240 247 255;
258
+ --surface-hover-secondary: 240 240 240;
259
+ --surface-hover-invert: 2 22 41;
260
+ --surface-hover-brand: 0 81 162;
261
+ --surface-hover-success: 8 118 96;
262
+ --surface-hover-error: 162 0 0;
263
+ --surface-hover-warning: 172 111 8;
264
+ --surface-active-primary: 240 240 240;
265
+ --surface-active-brand: 0 61 121;
266
+ --surface-active-success: 0 88 71;
267
+ --surface-active-error: 124 0 0;
268
+ --surface-active-warning: 149 96 7;
269
+ --surface-focus-brand: 0 116 231;
270
+ --surface-focus-success: 14 160 110;
271
+ --surface-focus-error: 231 0 0;
272
+ --surface-focus-warning: 245 158 11;
273
+ --surface-disable-primary: 240 240 240;
274
+ --surface-disable-brand: 150 198 245;
275
+ --surface-disable-success: 153 239 211;
276
+ --surface-disable-error: 245 150 150;
277
+ --surface-disable-warning: 253 228 152;
278
+ --surface-disable-invert: 3 32 61;
279
+ --surface-weak-brand: 240 247 255;
280
+ --surface-weak-error: 255 243 243;
281
+ --surface-weak-success: 236 253 247;
282
+ --surface-weak-warning: 255 248 230;
283
+ --surface-weak-neutral: 246 246 246;
284
+ --surface-gradient-brand-start: 0 116 231;
285
+ --surface-gradient-brand-end: 0 81 162;
286
+ --surface-gradient-green-start: 14 160 110;
287
+ --surface-gradient-green-end: 8 118 96;
288
+ --surface-gradient-red-start: 231 0 0;
289
+ --surface-gradient-red-end: 162 0 0;
290
+ --surface-gradient-yellow-start: 245 158 11;
291
+ --surface-gradient-yellow-end: 172 111 8;
292
+ --surface-gradient-callout-start: 0 81 162;
293
+ --surface-gradient-callout-end: 8 118 96;
294
+ --surface-hover-neutral: 247 248 250;
295
+ --surface-selected-hover: 227 239 252;
296
+ --border-default-primary: 240 240 240;
297
+ --border-default-invert: 195 203 211;
298
+ --border-default-brand: 0 116 231;
299
+ --border-default-success: 14 160 110;
300
+ --border-default-error: 231 0 0;
301
+ --border-default-warning: 245 158 11;
302
+ --border-default-black: 4 38 72;
303
+ --border-default-light: 255 255 255;
304
+ --border-hover-primary: 195 203 211;
305
+ --border-hover-brand: 0 81 162;
306
+ --border-hover-success: 8 118 96;
307
+ --border-hover-error: 162 0 0;
308
+ --border-hover-warning: 172 111 8;
309
+ --border-hover-invert: 3 32 61;
310
+ --border-hover-light: 246 246 246;
311
+ --border-active-primary: 147 162 176;
312
+ --border-active-brand: 0 61 121;
313
+ --border-active-success: 0 88 71;
314
+ --border-active-error: 124 0 0;
315
+ --border-active-warning: 149 96 7;
316
+ --border-active-invert: 2 22 41;
317
+ --border-active-light: 240 240 240;
318
+ --border-focus-brand: 0 116 231;
319
+ --border-focus-success: 14 160 110;
320
+ --border-focus-error: 231 0 0;
321
+ --border-focus-warning: 245 158 11;
322
+ --border-disable-primary: 195 203 211;
323
+ --border-disable-brand: 150 198 245;
324
+ --border-disable-success: 153 239 211;
325
+ --border-disable-error: 245 150 150;
326
+ --border-disable-warning: 253 228 152;
327
+ --border-disable-invert: 49 77 105;
328
+ --radius-null: 0;
329
+ --radius-xs: 4;
330
+ --radius-sm: 6;
331
+ --radius-md: 8;
332
+ --radius-lg: 12;
333
+ --radius-xl: 16;
334
+ --radius-2xl: 24;
335
+ --radius-3xl: 32;
336
+ --radius-full: 360;
337
+ --spacing-null: 0;
338
+ --spacing-5xs: 2;
339
+ --spacing-4xs: 4;
340
+ --spacing-3xs: 6;
341
+ --spacing-2xs: 8;
342
+ --spacing-xs: 10;
343
+ --spacing-sm: 12;
344
+ --spacing-md: 16;
345
+ --spacing-lg: 20;
346
+ --spacing-xl: 24;
347
+ --spacing-2xl: 32;
348
+ --spacing-3xl-mobile: 48;
349
+ --spacing-4xl: 84;
350
+ --spacing-5xl-desktop: 120;
351
+ --margin-mobile: 16;
352
+ --margin-desktop: 84;
353
+ --shadow-blur-none: 0;
354
+ --shadow-blur-sm: 4;
355
+ --shadow-blur-md: 12;
356
+ --shadow-blur-lg: 16;
357
+ --shadow-blur-xl: 20;
358
+ --shadow-position-none: 0;
359
+ --shadow-position-sm: 2;
360
+ --shadow-position-md: 4;
361
+ --shadow-position-lg: 8;
362
+ --shadow-position-xl: 12;
363
+ --shadow-5-pct: 0 4px 12px 0 #0000000d;
364
+ --shadow-card: 0 2px 8px 0 #0000001a;
365
+ --shadow-10-pct: 0 4px 16px 0 #0000001a;
366
+ --opacity-10: 10;
367
+ --opacity-60: 60;
368
+ --opacity-null: 0;
369
+ --opacity-full: 100;
370
+ --border-width-none: 0;
371
+ --border-width-sm: 1;
372
+ --border-width-md: 2;
373
+ --border-width-l: 4;
374
+ --callout-default-surface: 240 247 255;
375
+ --callout-default-border: 0 116 231;
376
+ --callout-default-text: 0 81 162;
377
+ --callout-coach-surface: 236 253 247;
378
+ --callout-coach-border: 8 118 96;
379
+ --callout-coach-text: 8 118 96;
380
+ --callout-good-surface: 236 253 247;
381
+ --callout-good-border: 8 118 96;
382
+ --callout-good-text: 4 38 72;
383
+ --callout-warn-surface: 255 248 230;
384
+ --callout-warn-border: 172 111 8;
385
+ --callout-warn-text: 4 38 72;
386
+ --callout-neg-surface: 255 243 243;
387
+ --callout-neg-border: 231 0 0;
388
+ --callout-neg-text: 4 38 72;
389
+ --focus-halo: 150 198 245;
390
+ --typography-mobile-display-bold: 700 calc(2.25rem * var(--ds-text-scale, 1))/calc(2.5rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
391
+ --typography-mobile-display-semibold: 600 calc(2.25rem * var(--ds-text-scale, 1))/calc(2.5rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
392
+ --typography-mobile-h1-bold: 700 calc(1.75rem * var(--ds-text-scale, 1))/calc(2rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
393
+ --typography-mobile-h1-semibold: 600 calc(1.75rem * var(--ds-text-scale, 1))/calc(2rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
394
+ --typography-mobile-h2-bold: 700 calc(1.5rem * var(--ds-text-scale, 1))/calc(1.75rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
395
+ --typography-mobile-h2-semibold: 600 calc(1.5rem * var(--ds-text-scale, 1))/calc(1.75rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
396
+ --typography-mobile-h2-medium: 500 calc(1.5rem * var(--ds-text-scale, 1))/calc(1.75rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
397
+ --typography-mobile-h2-regular: 400 calc(1.5rem * var(--ds-text-scale, 1))/calc(1.75rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
398
+ --typography-mobile-h3-bold: 700 calc(1.25rem * var(--ds-text-scale, 1))/calc(1.625rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
399
+ --typography-mobile-h3-semibold: 600 calc(1.25rem * var(--ds-text-scale, 1))/calc(1.625rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
400
+ --typography-mobile-h3-medium: 500 calc(1.25rem * var(--ds-text-scale, 1))/calc(1.625rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
401
+ --typography-mobile-h3-regular: 400 calc(1.25rem * var(--ds-text-scale, 1))/calc(1.625rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
402
+ --typography-mobile-h4-bold: 700 calc(1.25rem * var(--ds-text-scale, 1))/calc(1.625rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
403
+ --typography-mobile-h4-semibold: 600 calc(1.25rem * var(--ds-text-scale, 1))/calc(1.625rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
404
+ --typography-mobile-h4-medium: 500 calc(1.25rem * var(--ds-text-scale, 1))/calc(1.625rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
405
+ --typography-mobile-h4-regular: 400 calc(1.25rem * var(--ds-text-scale, 1))/calc(1.625rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
406
+ --typography-mobile-h5-bold: 700 calc(1.125rem * var(--ds-text-scale, 1))/calc(1.5rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
407
+ --typography-mobile-h5-semibold: 600 calc(1.125rem * var(--ds-text-scale, 1))/calc(1.5rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
408
+ --typography-mobile-h5-medium: 500 calc(1.125rem * var(--ds-text-scale, 1))/calc(1.5rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
409
+ --typography-mobile-h5-regular: 400 calc(1.125rem * var(--ds-text-scale, 1))/calc(1.5rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
410
+ --typography-mobile-h6-bold: 700 calc(1rem * var(--ds-text-scale, 1))/calc(1.5rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
411
+ --typography-mobile-h6-semibold: 600 calc(1rem * var(--ds-text-scale, 1))/calc(1.5rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
412
+ --typography-mobile-h6-medium: 500 calc(1rem * var(--ds-text-scale, 1))/calc(1.5rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
413
+ --typography-mobile-h6-regular: 400 calc(1rem * var(--ds-text-scale, 1))/calc(1.5rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
414
+ --typography-mobile-paragraph-bold: 700 calc(0.875rem * var(--ds-text-scale, 1))/calc(1.25rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
415
+ --typography-mobile-paragraph-semibold: 600 calc(0.875rem * var(--ds-text-scale, 1))/calc(1.25rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
416
+ --typography-mobile-paragraph-medium: 500 calc(0.875rem * var(--ds-text-scale, 1))/calc(1.25rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
417
+ --typography-mobile-paragraph-regular: 400 calc(0.875rem * var(--ds-text-scale, 1))/calc(1.25rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
418
+ --typography-mobile-body-lg-bold: 700 calc(0.75rem * var(--ds-text-scale, 1))/calc(1.125rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
419
+ --typography-mobile-body-lg-semibold: 600 calc(0.75rem * var(--ds-text-scale, 1))/calc(1.125rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
420
+ --typography-mobile-body-lg-medium: 500 calc(0.75rem * var(--ds-text-scale, 1))/calc(1.125rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
421
+ --typography-mobile-body-lg-regular: 400 calc(0.75rem * var(--ds-text-scale, 1))/calc(1.125rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
422
+ --typography-mobile-body-md-bold: 700 calc(0.625rem * var(--ds-text-scale, 1))/calc(1rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
423
+ --typography-mobile-body-md-semibold: 600 calc(0.625rem * var(--ds-text-scale, 1))/calc(1rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
424
+ --typography-mobile-body-md-medium: 500 calc(0.625rem * var(--ds-text-scale, 1))/calc(1rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
425
+ --typography-mobile-body-md-regular: 400 calc(0.625rem * var(--ds-text-scale, 1))/calc(1rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
426
+ --typography-mobile-body-sm-bold: 700 calc(0.5rem * var(--ds-text-scale, 1))/calc(0.875rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
427
+ --typography-mobile-body-sm-semibold: 600 calc(0.5rem * var(--ds-text-scale, 1))/calc(0.875rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
428
+ --typography-mobile-body-sm-medium: 500 calc(0.5rem * var(--ds-text-scale, 1))/calc(0.875rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
429
+ --typography-mobile-body-sm-regular: 400 calc(0.5rem * var(--ds-text-scale, 1))/calc(0.875rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
430
+ --typography-desktop-display-bold: 700 calc(3.5rem * var(--ds-text-scale, 1))/calc(4rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
431
+ --typography-desktop-display-semibold: 600 calc(3.5rem * var(--ds-text-scale, 1))/calc(4rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
432
+ --typography-desktop-h1-bold: 700 calc(2.5rem * var(--ds-text-scale, 1))/calc(3rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
433
+ --typography-desktop-h1-semibold: 600 calc(2.5rem * var(--ds-text-scale, 1))/calc(3rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
434
+ --typography-desktop-h2-bold: 700 calc(2rem * var(--ds-text-scale, 1))/calc(2.5rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
435
+ --typography-desktop-h2-semibold: 600 calc(2rem * var(--ds-text-scale, 1))/calc(2.5rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
436
+ --typography-desktop-h2-medium: 500 calc(2rem * var(--ds-text-scale, 1))/calc(2.5rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
437
+ --typography-desktop-h2-regular: 400 calc(2rem * var(--ds-text-scale, 1))/calc(2.5rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
438
+ --typography-desktop-h3-bold: 700 calc(1.75rem * var(--ds-text-scale, 1))/calc(2.25rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
439
+ --typography-desktop-h3-semibold: 600 calc(1.75rem * var(--ds-text-scale, 1))/calc(2.25rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
440
+ --typography-desktop-h3-medium: 500 calc(1.75rem * var(--ds-text-scale, 1))/calc(2.25rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
441
+ --typography-desktop-h3-regular: 400 calc(1.75rem * var(--ds-text-scale, 1))/calc(2.25rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
442
+ --typography-desktop-h4-bold: 700 calc(1.5rem * var(--ds-text-scale, 1))/calc(2rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
443
+ --typography-desktop-h4-semibold: 600 calc(1.5rem * var(--ds-text-scale, 1))/calc(2rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
444
+ --typography-desktop-h4-medium: 500 calc(1.5rem * var(--ds-text-scale, 1))/calc(2rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
445
+ --typography-desktop-h4-regular: 400 calc(1.5rem * var(--ds-text-scale, 1))/calc(2rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
446
+ --typography-desktop-h5-bold: 700 calc(1.25rem * var(--ds-text-scale, 1))/calc(1.75rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
447
+ --typography-desktop-h5-semibold: 600 calc(1.25rem * var(--ds-text-scale, 1))/calc(1.75rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
448
+ --typography-desktop-h5-medium: 500 calc(1.25rem * var(--ds-text-scale, 1))/calc(1.75rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
449
+ --typography-desktop-h5-regular: 400 calc(1.25rem * var(--ds-text-scale, 1))/calc(1.75rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
450
+ --typography-desktop-h6-bold: 700 calc(1.125rem * var(--ds-text-scale, 1))/calc(1.75rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
451
+ --typography-desktop-h6-semibold: 600 calc(1.125rem * var(--ds-text-scale, 1))/calc(1.75rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
452
+ --typography-desktop-h6-medium: 500 calc(1.125rem * var(--ds-text-scale, 1))/calc(1.75rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
453
+ --typography-desktop-h6-regular: 400 calc(1.125rem * var(--ds-text-scale, 1))/calc(1.75rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
454
+ --typography-desktop-paragraph-bold: 700 calc(1rem * var(--ds-text-scale, 1))/calc(1.5rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
455
+ --typography-desktop-paragraph-semibold: 600 calc(1rem * var(--ds-text-scale, 1))/calc(1.5rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
456
+ --typography-desktop-paragraph-medium: 500 calc(1rem * var(--ds-text-scale, 1))/calc(1.5rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
457
+ --typography-desktop-paragraph-regular: 400 calc(1rem * var(--ds-text-scale, 1))/calc(1.5rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
458
+ --typography-desktop-body-lg-bold: 700 calc(0.875rem * var(--ds-text-scale, 1))/calc(1.25rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
459
+ --typography-desktop-body-lg-semibold: 600 calc(0.875rem * var(--ds-text-scale, 1))/calc(1.25rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
460
+ --typography-desktop-body-lg-medium: 500 calc(0.875rem * var(--ds-text-scale, 1))/calc(1.25rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
461
+ --typography-desktop-body-lg-regular: 400 calc(0.875rem * var(--ds-text-scale, 1))/calc(1.25rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
462
+ --typography-desktop-body-md-bold: 700 calc(0.75rem * var(--ds-text-scale, 1))/calc(1.125rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
463
+ --typography-desktop-body-md-semibold: 600 calc(0.75rem * var(--ds-text-scale, 1))/calc(1.125rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
464
+ --typography-desktop-body-md-medium: 500 calc(0.75rem * var(--ds-text-scale, 1))/calc(1.125rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
465
+ --typography-desktop-body-md-regular: 400 calc(0.75rem * var(--ds-text-scale, 1))/calc(1.125rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
466
+ --typography-desktop-body-sm-bold: 700 calc(0.625rem * var(--ds-text-scale, 1))/calc(1rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
467
+ --typography-desktop-body-sm-semibold: 600 calc(0.625rem * var(--ds-text-scale, 1))/calc(1rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
468
+ --typography-desktop-body-sm-medium: 500 calc(0.625rem * var(--ds-text-scale, 1))/calc(1rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
469
+ --typography-desktop-body-sm-regular: 400 calc(0.625rem * var(--ds-text-scale, 1))/calc(1rem * var(--ds-text-scale, 1)) 'Be Vietnam Pro';
470
+ --elevation-overlay: 99999;
471
+ }
472
+
473
+ /*
474
+ * Required by the preset's font stack — see the note in scripts/proto/build-assets.mjs.
475
+ * An undefined var() invalidates the declaration rather than falling through, so without
476
+ * this the page renders in the browser's default serif with no error anywhere.
477
+ */
478
+ :root { --font-be-vietnam-pro: 'Be Vietnam Pro'; }
479
+
480
+ :root { color-scheme: light; }
481
+ body { color: rgb(var(--text-default-primary)); }
482
+ </style>
483
+ <script src="https://cdn.tailwindcss.com"></script>
484
+ <script src="https://cdn.jsdelivr.net/npm/@umkmall/proto@0.1.0-h03e952a96ac5/umkmall-tailwind.js"></script>
485
+ <script src="https://cdn.jsdelivr.net/npm/@umkmall/proto@0.1.0-h03e952a96ac5/umkmall-ui.js"></script>
486
+ <script src="https://cdn.jsdelivr.net/npm/@babel/standalone@7.26.4/babel.min.js"></script>
487
+ </head>
488
+ <body class="bg-default-primary text-default-primary">
489
+ <div id="root"></div>
490
+ <script type="text/babel" data-presets="react">
491
+ /*
492
+ * The starter's demo: an MLJ journey as a CHAT ROOM. AUTHORED — this file is the content of the
493
+ * `text/babel` block in the generated starter, copied in verbatim.
494
+ *
495
+ * IT IS A CHAT APP, AND THAT IS THE WHOLE CORRECTION. The first version drew the journey as a
496
+ * document — a column of cards you scrolled. Every real MLJ prototype is a chat: a fixed header,
497
+ * the journey's chrome under it, a scrolling transcript filling the rest, a composer pinned at
498
+ * the bottom. Starting from a document layout means rebuilding the room before you can begin,
499
+ * which is exactly the hand-building this kit exists to remove.
500
+ *
501
+ * THE LIBRARY PUBLISHES FOURTEEN CHAT COMPONENTS and the document version used none of them.
502
+ * `ChatThread` owns the scroller and the "jump to latest" pill; `ChatMessageList` owns the
503
+ * measure and the bottom alignment; `ChatComposer` owns the editor, its tray and its button
504
+ * rows. Hand-rolling any of that is the drift this kit exists to stop.
505
+ *
506
+ * Mission 2 (Insight) runs end to end; the other three are named in the rail on the same shape.
507
+ * Building all four would make this file long enough that people edit it without reading it.
508
+ * The AI calls are STUBS — wiring a model is the author's job, and a key in a file that gets
509
+ * sent to other people is the thing to avoid.
510
+ *
511
+ * It is a `.jsx` file so an editor highlights it. It is never imported or bundled — it is read
512
+ * as text by `build-assets.mjs`, which is why it uses the globals below rather than imports.
513
+ */
514
+
515
+ const {
516
+ React,
517
+ ReactDOMClient,
518
+ AppShell,
519
+ Button,
520
+ ChatAttachmentButton,
521
+ ChatComposer,
522
+ ChatMessage,
523
+ ChatMessageBubble,
524
+ ChatMessageList,
525
+ ChatMessageMetadata,
526
+ ChatSendButton,
527
+ ChatThread,
528
+ ChatToolsButton,
529
+ ChatVoiceButton,
530
+ Chip,
531
+ Dialog,
532
+ Header,
533
+ Icon,
534
+ ProgressBar,
535
+ SelectionCard,
536
+ Stepper,
537
+ Text,
538
+ TextField,
539
+ } = window.UmkmallUI;
540
+
541
+ /* THE READING COLUMN, AND NO COMPONENT OWNS IT. `AppShell`'s content slot deliberately imposes
542
+ no measure — that would be wrong for every non-prose surface — so the width lives here, once,
543
+ shared by the three regions that have to line up: chrome, transcript and composer. */
544
+ const COLUMN = 'mx-auto w-full max-w-3xl px-ds-md';
545
+
546
+ /* ---------------------------------------------------------------- the journey's shape */
547
+
548
+ /** The four-mission arc. Mission 1 is the swappable tool that differs per journey. */
549
+ const MISSIONS = [
550
+ { id: 'foto', label: 'Foto Produk' },
551
+ { id: 'insight', label: 'Insight' },
552
+ { id: 'strategi', label: 'Strategi' },
553
+ { id: 'aksi', label: 'Rencana Aksi' },
554
+ ];
555
+
556
+ /* ---------------------------------------------------------------- chrome */
557
+
558
+ /**
559
+ * The journey chrome: progress rail + quota meters, in one `shrink-0` band under the header.
560
+ *
561
+ * IT SITS OUTSIDE THE SCROLLER ON PURPOSE. The rail says where you are and the meters say what
562
+ * you have left to spend — both are answers you want *while* reading the transcript, so
563
+ * scrolling them away would be wrong. Same reason the composer is pinned.
564
+ */
565
+ const JourneyChrome = ({ current }) => (
566
+ <div className="shrink-0 border-b border-default-primary py-ds-xs">
567
+ <div className={`${COLUMN} flex flex-col gap-ds-2xs`}>
568
+ <Stepper
569
+ orientation="horizontal"
570
+ steps={MISSIONS.map((mission, index) => ({
571
+ label: mission.label,
572
+ state: index < current ? 'done' : index === current ? 'current' : 'default',
573
+ position: index === 0 ? 'first' : index === MISSIONS.length - 1 ? 'last' : 'middle',
574
+ }))}
575
+ />
576
+ {/* `flex-1` ON EACH BAR, not just a gap on the row. `ProgressBar` justifies its label and
577
+ its percentage to opposite ends, so a bar sized to its content jams the two together —
578
+ "Kuota AI hari ini60%" — which reads as a rendering bug rather than a meter. */}
579
+ <div className="flex gap-ds-md">
580
+ <ProgressBar className="flex-1" label="Kuota AI hari ini" value={3} max={5} size="small" variant="default" />
581
+ <ProgressBar
582
+ className="flex-1"
583
+ label="Misi selesai"
584
+ value={current}
585
+ max={MISSIONS.length}
586
+ size="small"
587
+ variant="success"
588
+ />
589
+ </div>
590
+ </div>
591
+ </div>
592
+ );
593
+
594
+ /* ---------------------------------------------------------------- the turn parts */
595
+
596
+ /** The assistant's face. */
597
+ const Face = () => (
598
+ <span
599
+ aria-hidden
600
+ className="flex h-7 w-7 items-center justify-center rounded-full bg-default-secondary text-[10px] text-default-secondary"
601
+ >
602
+ AI
603
+ </span>
604
+ );
605
+
606
+ /* Named buttons — an icon-only control with no accessible name announces nothing at all. */
607
+ const ACTIONS = [
608
+ ['thumbs-up', 'Jawaban ini membantu'],
609
+ ['thumbs-down', 'Jawaban ini tidak membantu'],
610
+ ['rotate-cw', 'Buat ulang jawaban'],
611
+ ];
612
+
613
+ const Actions = () => (
614
+ <div className="flex items-center gap-ds-4xs">
615
+ {ACTIONS.map(([icon, label]) => (
616
+ <Button key={icon} type="text" color="light" size="micro" iconOnly aria-label={label}>
617
+ <Icon name={icon} aria-hidden className="h-4 w-4" />
618
+ </Button>
619
+ ))}
620
+ </div>
621
+ );
622
+
623
+ /** The follow-up chips offered under a settled reply. */
624
+ const Suggestions = ({ items, onPick }) => (
625
+ <div className="flex flex-wrap gap-ds-4xs">
626
+ {items.map((item) => (
627
+ <Chip key={item} size="small" onClick={() => onPick(item)}>
628
+ {item}
629
+ </Chip>
630
+ ))}
631
+ </div>
632
+ );
633
+
634
+ /* ---------------------------------------------------------------- the transcript */
635
+
636
+ /** The opening turns of Mission 2, as a conversation rather than a card list. */
637
+ const OPENING = [
638
+ { from: 'assistant', text: 'Halo! Saya sudah lihat data toko Anda minggu ini. Siap mulai Misi 2?' },
639
+ { from: 'user', text: 'Siap. Apa temuan terbesarnya?' },
640
+ {
641
+ from: 'assistant',
642
+ text: 'Empat temuan. Yang paling besar: harga Anda 18% di bawah rata-rata pasar, jadi margin tipis padahal permintaan sedang naik.',
643
+ suggestions: ['Jelaskan temuan lainnya', 'Kenapa itu penting?', 'Lanjut ke refleksi'],
644
+ },
645
+ ];
646
+
647
+ /** One reply, stubbed. Wiring a real model is the prototype author's job — see the header. */
648
+ const stubReply = (question) =>
649
+ `(Contoh jawaban) Anda bertanya "${question}". Ganti fungsi stubReply dengan panggilan model Anda.`;
650
+
651
+ /* =====================================================================
652
+ * REPLACE THIS. Everything above is the journey shell; this is your prototype.
653
+ *
654
+ * EVERY ASSISTANT BUBBLE IS A GHOST. The live surface fills and rounds the USER side only, so a
655
+ * reply draws as prose in the message column with no container around it. `ghost` is exactly
656
+ * that: the fill goes, the inline padding stays, so text still lines up with anything beneath it.
657
+ * ===================================================================== */
658
+ function Konten({ messages, onSuggestion }) {
659
+ return (
660
+ <ChatMessageList label="Percakapan Mini Learning Journey" align="bottom" className={COLUMN}>
661
+ {messages.map((message, index) =>
662
+ message.from === 'user' ? (
663
+ <ChatMessage key={index} sender="user">
664
+ <ChatMessageBubble metadata={<ChatMessageMetadata timestamp="09:41" status="read" />}>
665
+ {message.text}
666
+ </ChatMessageBubble>
667
+ </ChatMessage>
668
+ ) : (
669
+ <ChatMessage key={index} sender="assistant" avatar={<Face />} name="Teman AI">
670
+ <ChatMessageBubble
671
+ ghost
672
+ metadata={
673
+ <ChatMessageMetadata
674
+ footer={
675
+ <div className="flex flex-col gap-ds-4xs">
676
+ <Actions />
677
+ {message.suggestions ? (
678
+ <Suggestions items={message.suggestions} onPick={onSuggestion} />
679
+ ) : null}
680
+ </div>
681
+ }
682
+ />
683
+ }
684
+ >
685
+ {message.text}
686
+ </ChatMessageBubble>
687
+ </ChatMessage>
688
+ ),
689
+ )}
690
+ </ChatMessageList>
691
+ );
692
+ }
693
+ /* ===================== end of the part you replace ==================== */
694
+
695
+ /* ---------------------------------------------------------------- the composer */
696
+
697
+ /* STATEFUL, BECAUSE THE COMPOSER IS CONTROLLED. A fixed value and a no-op handler render an
698
+ editor nobody can type into — a defect this family's own stories shipped once. */
699
+ function Composer({ onSend }) {
700
+ const [value, setValue] = React.useState('');
701
+ const submit = () => {
702
+ const trimmed = value.trim();
703
+ if (!trimmed) return;
704
+ onSend(trimmed);
705
+ setValue('');
706
+ };
707
+ return (
708
+ <ChatComposer
709
+ value={value}
710
+ onValueChange={setValue}
711
+ editorLabel="Tulis pesan"
712
+ placeholder="Tanya apa saja tentang misi ini..."
713
+ toolActions={
714
+ <>
715
+ <ChatToolsButton label="Alat" />
716
+ <ChatAttachmentButton label="Lampirkan foto produk" />
717
+ </>
718
+ }
719
+ sendActions={
720
+ <>
721
+ <ChatVoiceButton label="Input suara" />
722
+ <ChatSendButton label="Kirim pesan" onClick={submit} />
723
+ </>
724
+ }
725
+ />
726
+ );
727
+ }
728
+
729
+ /* ---------------------------------------------------------------- the reflection overlay */
730
+
731
+ /* One open question and one feasibility choice, after each mission. A `Dialog` rather than a
732
+ route, because the journey is one continuous surface. */
733
+ function Reflection({ open, onOpenChange, mission }) {
734
+ const [answer, setAnswer] = React.useState('');
735
+ const [feasible, setFeasible] = React.useState('bisa');
736
+ return (
737
+ <Dialog
738
+ open={open}
739
+ onOpenChange={onOpenChange}
740
+ showCloseButton
741
+ title={`Refleksi — ${mission.label}`}
742
+ /* `description` is VISUALLY HIDDEN — it wires `aria-describedby`, it does not draw
743
+ subtext. Passing prose here and expecting to see it is how this dialog first shipped
744
+ with an invisible subtitle. Visible subtext is a `Text` in the body, below. */
745
+ description="Dua pertanyaan singkat sebelum melanjutkan ke misi berikutnya."
746
+ >
747
+ {/* THE PANEL PADS ITS TITLE AND NOT ITS CHILDREN. `Dialog` gives the heading `px-6 pt-4`
748
+ and renders the body with none, so the caller owns it — without this the field, the
749
+ cards and the button all run edge to edge against the panel border. */}
750
+ <div className="flex flex-col gap-ds-md px-6 pb-6 pt-ds-sm">
751
+ <Text variant="bodySm" color="secondary">
752
+ Dua pertanyaan singkat sebelum lanjut.
753
+ </Text>
754
+ <TextField
755
+ label="Apa satu hal yang akan Anda ubah minggu ini?"
756
+ value={answer}
757
+ onChange={(event) => setAnswer(event.target.value)}
758
+ placeholder="Tulis jawaban Anda..."
759
+ />
760
+ <div className="flex flex-col gap-ds-2xs">
761
+ <Text variant="bodySm" weight="semibold">
762
+ Seberapa mungkin Anda melakukannya?
763
+ </Text>
764
+ {/* ONE GROUP, NOT ONE CARD PER OPTION. `SelectionCard` takes the whole `options` array
765
+ and owns selection itself; a per-option `selected` prop does not exist, and an
766
+ invented prop renders with no styling and no error. */}
767
+ <SelectionCard
768
+ options={[
769
+ { value: 'bisa', label: 'Bisa saya lakukan minggu ini' },
770
+ { value: 'usaha', label: 'Perlu usaha ekstra' },
771
+ { value: 'belum', label: 'Belum bisa sekarang' },
772
+ ]}
773
+ value={[feasible]}
774
+ onValueChange={(picked) => setFeasible(picked[0] ?? 'bisa')}
775
+ />
776
+ </div>
777
+ <div className="flex">
778
+ <Button type="primary" color="primary" size="medium" width="auto" onClick={() => onOpenChange(false)}>
779
+ Simpan &amp; lanjut
780
+ </Button>
781
+ </div>
782
+ </div>
783
+ </Dialog>
784
+ );
785
+ }
786
+
787
+ /* ---------------------------------------------------------------- the room */
788
+
789
+ function App() {
790
+ const [reflecting, setReflecting] = React.useState(false);
791
+ const [current, setCurrent] = React.useState(1);
792
+ const [messages, setMessages] = React.useState(OPENING);
793
+
794
+ /* One turn: the user's message, then a stubbed reply. Replace `stubReply` with your model. */
795
+ const send = (text) => {
796
+ if (text === 'Lanjut ke refleksi') {
797
+ setMessages((previous) => [...previous, { from: 'user', text }]);
798
+ setReflecting(true);
799
+ setCurrent((step) => Math.min(step + 1, MISSIONS.length));
800
+ return;
801
+ }
802
+ setMessages((previous) => [
803
+ ...previous,
804
+ { from: 'user', text },
805
+ { from: 'assistant', text: stubReply(text) },
806
+ ]);
807
+ };
808
+
809
+ return (
810
+ <React.Fragment>
811
+ <AppShell
812
+ header={({ scrolled }) => (
813
+ <Header
814
+ type="temanAiChat"
815
+ title="Mini Learning Journey"
816
+ showTextLeft
817
+ scrolled={scrolled}
818
+ />
819
+ )}
820
+ /* NO SIDEBAR. A prototype is one journey on one screen — an app-navigation rail is
821
+ chrome it does not have, and a drawer needs a trigger and state before it can open. */
822
+ >
823
+ <JourneyChrome current={current} />
824
+ <ChatThread scrollToBottomLabel="Ke pesan terbaru">
825
+ <Konten messages={messages} onSuggestion={send} />
826
+ </ChatThread>
827
+ <div className="shrink-0 py-ds-md">
828
+ <div className={COLUMN}>
829
+ <Composer onSend={send} />
830
+ </div>
831
+ </div>
832
+ </AppShell>
833
+ <Reflection
834
+ open={reflecting}
835
+ onOpenChange={setReflecting}
836
+ mission={MISSIONS[Math.min(current, MISSIONS.length - 1)]}
837
+ />
838
+ </React.Fragment>
839
+ );
840
+ }
841
+
842
+ ReactDOMClient.createRoot(document.getElementById('root')).render(<App />);
843
+
844
+ </script>
845
+ </body>
846
+ </html>
847
+ ````