@gostudent/shared-ui-library-mcp 1.25.1 → 1.26.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/library-manifest.json +181 -126
- package/package.json +1 -1
package/library-manifest.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
"libraryVersion": "1.
|
|
2
|
+
"libraryVersion": "1.26.0",
|
|
3
3
|
"components": [
|
|
4
4
|
{
|
|
5
5
|
"name": "Avatar",
|
|
6
|
-
"description": "The **Avatar** component displays a user's photo or, when no image is available, their\ninitials on a colour background. The background colour is derived deterministically from\nthe user's name so the same person always gets the same colour.\n\
|
|
6
|
+
"description": "The **Avatar** component displays a user's photo or, when no image is available, their\ninitials on a colour background. The background colour is derived deterministically from\nthe user's name so the same person always gets the same colour.\n\nFour sizes are available — `xs` (24px), `sm` (32px), `md` (40px), `lg` (48px) — and\nfour colour variants: `pink`, `purple`, `green`, `orange`.\n\n### Usage\n\n```tsx\nimport { Avatar } from '@gostudent/shared-ui-library';\n\n<Avatar name=\"Jane Doe\" />\n<Avatar name=\"Jane Doe\" src=\"/path/to/photo.jpg\" />\n<Avatar name=\"Jane Doe\" status=\"done\" />\n<Avatar name=\"Jane Doe\" status=\"pending\" />\n```\n\n### Accessibility\n\n- Renders a `role=\"img\"` span with `aria-label` set to the user's name.\n- The initials text is `aria-hidden` to avoid redundant screen reader output.\n- The status badge is `aria-hidden` as it is decorative.",
|
|
7
7
|
"storybookUrl": "https://62835ff8873d45004a627ad4-snugmmtvrg.chromatic.com/?path=/docs/components-data-display-avatar",
|
|
8
8
|
"props": [
|
|
9
9
|
{
|
|
@@ -18,8 +18,9 @@
|
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
20
|
"name": "size",
|
|
21
|
-
"description": "Avatar diameter: sm=32px, md=40px, lg=48px.",
|
|
21
|
+
"description": "Avatar diameter: xs=24px, sm=32px, md=40px, lg=48px.",
|
|
22
22
|
"options": [
|
|
23
|
+
"xs",
|
|
23
24
|
"sm",
|
|
24
25
|
"md",
|
|
25
26
|
"lg"
|
|
@@ -37,10 +38,11 @@
|
|
|
37
38
|
},
|
|
38
39
|
{
|
|
39
40
|
"name": "status",
|
|
40
|
-
"description": "When \"done",
|
|
41
|
+
"description": "When \"done\", renders a green tick badge; when \"pending\", renders a yellow pending badge — both top-right.",
|
|
41
42
|
"options": [
|
|
42
43
|
"default",
|
|
43
|
-
"done"
|
|
44
|
+
"done",
|
|
45
|
+
"pending"
|
|
44
46
|
]
|
|
45
47
|
},
|
|
46
48
|
{
|
|
@@ -97,7 +99,7 @@
|
|
|
97
99
|
},
|
|
98
100
|
{
|
|
99
101
|
"name": "size",
|
|
100
|
-
"description": "Height and font-size scale. Accepts a single size or a `[mobile, desktop]",
|
|
102
|
+
"description": "Height and font-size scale. Accepts a single size or a `[mobile, desktop]` tuple for responsive behaviour, e.g. `size={[\"md\", \"sm\"]}`. The controls panel only supports a single value — see the **Responsive** story for the tuple API.",
|
|
101
103
|
"options": [
|
|
102
104
|
"xxs",
|
|
103
105
|
"xs",
|
|
@@ -163,12 +165,12 @@
|
|
|
163
165
|
"props": [
|
|
164
166
|
{
|
|
165
167
|
"name": "value",
|
|
166
|
-
"description": "Currently selected date. Pass `null",
|
|
168
|
+
"description": "Currently selected date. Pass `null` or `undefined` for no selection.",
|
|
167
169
|
"options": []
|
|
168
170
|
},
|
|
169
171
|
{
|
|
170
172
|
"name": "onChange",
|
|
171
|
-
"description": "Called with a noon-normalised `Date",
|
|
173
|
+
"description": "Called with a noon-normalised `Date` when the user selects a day or clicks Today.",
|
|
172
174
|
"options": []
|
|
173
175
|
},
|
|
174
176
|
{
|
|
@@ -183,7 +185,7 @@
|
|
|
183
185
|
},
|
|
184
186
|
{
|
|
185
187
|
"name": "locale",
|
|
186
|
-
"description": "A `date-fns",
|
|
188
|
+
"description": "A `date-fns` `Locale` object. Defaults to `enGB` when omitted.",
|
|
187
189
|
"options": []
|
|
188
190
|
},
|
|
189
191
|
{
|
|
@@ -193,7 +195,7 @@
|
|
|
193
195
|
},
|
|
194
196
|
{
|
|
195
197
|
"name": "renderDayContent",
|
|
196
|
-
"description": "Render prop called with the selected date. Return content shown below the calendar grid. Nothing is rendered when `value",
|
|
198
|
+
"description": "Render prop called with the selected date. Return content shown below the calendar grid. Nothing is rendered when `value` is null or the function returns null/undefined.",
|
|
197
199
|
"options": []
|
|
198
200
|
},
|
|
199
201
|
{
|
|
@@ -322,7 +324,7 @@
|
|
|
322
324
|
},
|
|
323
325
|
{
|
|
324
326
|
"name": "Checked",
|
|
325
|
-
"jsx": "<Checkbox label=\"Option label\" checked={true} onChange={() => {} />",
|
|
327
|
+
"jsx": "<Checkbox label=\"Option label\" checked={true} onChange={() => {}} />",
|
|
326
328
|
"storyUrl": "https://62835ff8873d45004a627ad4-snugmmtvrg.chromatic.com/?path=/story/components-inputs-checkbox--checked"
|
|
327
329
|
},
|
|
328
330
|
{
|
|
@@ -344,7 +346,7 @@
|
|
|
344
346
|
},
|
|
345
347
|
{
|
|
346
348
|
"name": "items",
|
|
347
|
-
"description": "Array of data rows. Each item requires `id",
|
|
349
|
+
"description": "Array of data rows. Each item requires `id`, `date`, `eventType`, `subject`, `grade`, and an optional `actions` React node.",
|
|
348
350
|
"options": []
|
|
349
351
|
},
|
|
350
352
|
{
|
|
@@ -359,7 +361,7 @@
|
|
|
359
361
|
},
|
|
360
362
|
{
|
|
361
363
|
"name": "emptyStateText",
|
|
362
|
-
"description": "Placeholder text shown inside the empty state container when `items",
|
|
364
|
+
"description": "Placeholder text shown inside the empty state container when `items` is empty.",
|
|
363
365
|
"options": []
|
|
364
366
|
},
|
|
365
367
|
{
|
|
@@ -371,12 +373,12 @@
|
|
|
371
373
|
"examples": [
|
|
372
374
|
{
|
|
373
375
|
"name": "Default",
|
|
374
|
-
"jsx": "<DataList title=\"Grades (optional)\" items={sampleItems} onAdd={() => {} />",
|
|
376
|
+
"jsx": "<DataList title=\"Grades (optional)\" items={sampleItems} onAdd={() => {}} />",
|
|
375
377
|
"storyUrl": "https://62835ff8873d45004a627ad4-snugmmtvrg.chromatic.com/?path=/story/components-data-display-datalist--default"
|
|
376
378
|
},
|
|
377
379
|
{
|
|
378
380
|
"name": "EmptyState",
|
|
379
|
-
"jsx": "<DataList title=\"Grades (optional)\" items={[]} onAdd={() => {} />",
|
|
381
|
+
"jsx": "<DataList title=\"Grades (optional)\" items={[]} onAdd={() => {}} />",
|
|
380
382
|
"storyUrl": "https://62835ff8873d45004a627ad4-snugmmtvrg.chromatic.com/?path=/story/components-data-display-datalist--empty-state"
|
|
381
383
|
},
|
|
382
384
|
{
|
|
@@ -403,7 +405,7 @@
|
|
|
403
405
|
},
|
|
404
406
|
{
|
|
405
407
|
"name": "defaultOpen",
|
|
406
|
-
"description": "Initial open state in uncontrolled mode. Ignored when `open",
|
|
408
|
+
"description": "Initial open state in uncontrolled mode. Ignored when `open` is provided.",
|
|
407
409
|
"options": []
|
|
408
410
|
},
|
|
409
411
|
{
|
|
@@ -425,17 +427,17 @@
|
|
|
425
427
|
"examples": [
|
|
426
428
|
{
|
|
427
429
|
"name": "Default",
|
|
428
|
-
"jsx": "<Disclosure trigger={(
|
|
430
|
+
"jsx": "<Disclosure trigger={( <> <InfoIcon size=\"sm\" /> <span>5 pending feedback</span> </> )} children={( <ul style={{ margin: '8px 0 0', padding: '0 0 0 1.25rem', listStyle: 'disc' }}> <li>Alice — awaiting review</li> <li>Bob — submitted</li> <li>Charlie — in progress</li> <li>Diana — not started</li> <li>Eve — awaiting review</li> </ul> )} defaultOpen={false} />",
|
|
429
431
|
"storyUrl": "https://62835ff8873d45004a627ad4-snugmmtvrg.chromatic.com/?path=/story/components-layout-disclosure--default"
|
|
430
432
|
},
|
|
431
433
|
{
|
|
432
434
|
"name": "DefaultOpen",
|
|
433
|
-
"jsx": "<Disclosure trigger={(
|
|
435
|
+
"jsx": "<Disclosure trigger={( <> <InfoIcon size=\"sm\" /> <span>5 pending feedback</span> </> )} children={( <ul style={{ margin: '8px 0 0', padding: '0 0 0 1.25rem', listStyle: 'disc' }}> <li>Alice — awaiting review</li> <li>Bob — submitted</li> <li>Charlie — in progress</li> <li>Diana — not started</li> <li>Eve — awaiting review</li> </ul> )} defaultOpen={true} />",
|
|
434
436
|
"storyUrl": "https://62835ff8873d45004a627ad4-snugmmtvrg.chromatic.com/?path=/story/components-layout-disclosure--default-open"
|
|
435
437
|
},
|
|
436
438
|
{
|
|
437
439
|
"name": "TextOnlyTrigger",
|
|
438
|
-
"jsx": "<Disclosure trigger={<span>Show details</span>} children={(
|
|
440
|
+
"jsx": "<Disclosure trigger={<span>Show details</span>} children={( <p style={{ margin: '8px 0 0', fontSize: '14px' }}> Any React content can go here — lists, tables, forms, or custom components. </p> )} />",
|
|
439
441
|
"storyUrl": "https://62835ff8873d45004a627ad4-snugmmtvrg.chromatic.com/?path=/story/components-layout-disclosure--text-only-trigger"
|
|
440
442
|
}
|
|
441
443
|
]
|
|
@@ -589,12 +591,12 @@
|
|
|
589
591
|
"props": [
|
|
590
592
|
{
|
|
591
593
|
"name": "columns",
|
|
592
|
-
"description": "Number of equal-width columns. Accepts a single value, a `[mobile, desktop]",
|
|
594
|
+
"description": "Number of equal-width columns. Accepts a single value, a `[mobile, desktop]` 2-tuple, or a `[mobile, tablet, desktop]` 3-tuple.",
|
|
593
595
|
"options": []
|
|
594
596
|
},
|
|
595
597
|
{
|
|
596
598
|
"name": "gap",
|
|
597
|
-
"description": "Gap between cells, mapped to `--spacing
|
|
599
|
+
"description": "Gap between cells, mapped to `--spacing-*` tokens. Accepts a single value, a `[mobile, desktop]` 2-tuple, or a `[mobile, tablet, desktop]` 3-tuple.",
|
|
598
600
|
"options": [
|
|
599
601
|
"none",
|
|
600
602
|
"3xs",
|
|
@@ -610,7 +612,7 @@
|
|
|
610
612
|
},
|
|
611
613
|
{
|
|
612
614
|
"name": "rowGap",
|
|
613
|
-
"description": "Separate row gap override. Falls back to `gap",
|
|
615
|
+
"description": "Separate row gap override. Falls back to `gap` when omitted. Accepts a single value, a `[mobile, desktop]` 2-tuple, or a `[mobile, tablet, desktop]` 3-tuple.",
|
|
614
616
|
"options": [
|
|
615
617
|
"none",
|
|
616
618
|
"3xs",
|
|
@@ -797,7 +799,7 @@
|
|
|
797
799
|
},
|
|
798
800
|
{
|
|
799
801
|
"name": "size",
|
|
800
|
-
"description": "Text size of the input. `md",
|
|
802
|
+
"description": "Text size of the input. `md` = 16px, `lg` = 14px. Pass a `[mobile, desktop]` tuple for responsive sizing.",
|
|
801
803
|
"options": [
|
|
802
804
|
"md",
|
|
803
805
|
"lg"
|
|
@@ -805,7 +807,7 @@
|
|
|
805
807
|
},
|
|
806
808
|
{
|
|
807
809
|
"name": "multiline",
|
|
808
|
-
"description": "When true, renders a `<textarea
|
|
810
|
+
"description": "When true, renders a `<textarea>` instead of `<input>`. Accepts `rows` and all other textarea attributes.",
|
|
809
811
|
"options": []
|
|
810
812
|
}
|
|
811
813
|
],
|
|
@@ -841,7 +843,7 @@
|
|
|
841
843
|
"examples": [
|
|
842
844
|
{
|
|
843
845
|
"name": "Default",
|
|
844
|
-
"jsx": "<MetadataItem icon={<EventNoteIcon />} children=\"Mon />",
|
|
846
|
+
"jsx": "<MetadataItem icon={<EventNoteIcon />} children=\"Mon, 14 Apr 2025\" />",
|
|
845
847
|
"storyUrl": "https://62835ff8873d45004a627ad4-snugmmtvrg.chromatic.com/?path=/story/components-data-display-metadataitem--default"
|
|
846
848
|
}
|
|
847
849
|
]
|
|
@@ -1109,7 +1111,7 @@
|
|
|
1109
1111
|
},
|
|
1110
1112
|
{
|
|
1111
1113
|
"name": "stepLabel",
|
|
1112
|
-
"description": "Translated step label shown on the left (e.g. t(\\'stepper.label\\",
|
|
1114
|
+
"description": "Translated step label shown on the left (e.g. t(\\'stepper.label\\', { currentStep, totalSteps })). Lokalise key example: \"Step {{currentStep}} of {{totalSteps}}\". Omit to hide.",
|
|
1113
1115
|
"options": []
|
|
1114
1116
|
},
|
|
1115
1117
|
{
|
|
@@ -1198,7 +1200,7 @@
|
|
|
1198
1200
|
},
|
|
1199
1201
|
{
|
|
1200
1202
|
"name": "shape",
|
|
1201
|
-
"description": "`pill",
|
|
1203
|
+
"description": "`pill` uses fully-round radius and switches to label typography (12/16 SemiBold) regardless of `size`.",
|
|
1202
1204
|
"options": [
|
|
1203
1205
|
"rounded",
|
|
1204
1206
|
"pill"
|
|
@@ -1206,8 +1208,9 @@
|
|
|
1206
1208
|
},
|
|
1207
1209
|
{
|
|
1208
1210
|
"name": "size",
|
|
1209
|
-
"description": "
|
|
1211
|
+
"description": "`xs` is only meaningful with `shape=\"pill\"` (8/16 SemiBold — a compact pill for dense contexts). Accepts a single size or a `[mobile, desktop]` tuple for responsive behaviour, e.g. `size={[\"md\", \"sm\"]}`. See the **Responsive** story.",
|
|
1210
1212
|
"options": [
|
|
1213
|
+
"xs",
|
|
1211
1214
|
"sm",
|
|
1212
1215
|
"md"
|
|
1213
1216
|
]
|
|
@@ -1224,7 +1227,7 @@
|
|
|
1224
1227
|
},
|
|
1225
1228
|
{
|
|
1226
1229
|
"name": "actionLabel",
|
|
1227
|
-
"description": "Required when `onAction",
|
|
1230
|
+
"description": "Required when `onAction` is set — used as `aria-label` on the action button.",
|
|
1228
1231
|
"options": []
|
|
1229
1232
|
},
|
|
1230
1233
|
{
|
|
@@ -1305,7 +1308,7 @@
|
|
|
1305
1308
|
},
|
|
1306
1309
|
{
|
|
1307
1310
|
"name": "as",
|
|
1308
|
-
"description": "Override the rendered HTML element (e.g. `span",
|
|
1311
|
+
"description": "Override the rendered HTML element (e.g. `span`, `div`, `h2`).",
|
|
1309
1312
|
"options": []
|
|
1310
1313
|
},
|
|
1311
1314
|
{
|
|
@@ -1420,7 +1423,7 @@
|
|
|
1420
1423
|
"props": [
|
|
1421
1424
|
{
|
|
1422
1425
|
"name": "label",
|
|
1423
|
-
"description": "Localized label supplied by the app, e.g. \"November 2026",
|
|
1426
|
+
"description": "Localized label supplied by the app, e.g. \"November 2026\" or \"Thursday, 18/11/2026\".",
|
|
1424
1427
|
"options": []
|
|
1425
1428
|
},
|
|
1426
1429
|
{
|
|
@@ -1457,98 +1460,6 @@
|
|
|
1457
1460
|
}
|
|
1458
1461
|
]
|
|
1459
1462
|
},
|
|
1460
|
-
{
|
|
1461
|
-
"name": "LessonCard",
|
|
1462
|
-
"description": "A domain-level card that displays a lesson session with all associated metadata.\n\nSupports states driven by the `lessonState`, `type`, `modality`, and `feedbackState` props:\n\n| `lessonState` | `type` | `modality` | `feedbackState` | Description |\n|----------------|-----------------|--------------|-----------------|-------------|\n| `upcoming` | `individual` | `online` | — | Single student avatar, \"Start lesson\" button |\n| `upcoming` | `group` | `online` | — | Avatar group, optional kebab menu with dropdown |\n| `upcoming` | `individual` | `offline` | — | Offline modality tag |\n| `upcoming` | `group` | `offline` | — | Offline modality tag, avatar group |\n| `completed` | `individual` | `online` | `pending` | Disclosure toggle revealing student feedback status, \"Leave feedback\" button |\n| `completed` | `group` | `online` | `pending` | Same as above with multiple students |\n| `completed` | `group` | `online` | `submitted` | \"Review feedback\" button, student names summary below divider |\n\n### Usage\n\n```tsx\nimport { LessonCard } from '@gostudent/shared-ui-library';\n\n<LessonCard\n title=\"English lesson\"\n modality=\"online\"\n type=\"individual\"\n subjects={['English']}\n date=\"Tuesday, 16 May\"\n time=\"17:00 - 18:00\"\n lessonState=\"upcoming\"\n students={[{ name: 'Alice Smith' }]}\n isStartLessonDisabled\n/>\n```",
|
|
1463
|
-
"storybookUrl": "https://62835ff8873d45004a627ad4-snugmmtvrg.chromatic.com/?path=/docs/compositions-lessoncard",
|
|
1464
|
-
"props": [
|
|
1465
|
-
{
|
|
1466
|
-
"name": "title",
|
|
1467
|
-
"description": "Lesson title shown as the card heading.",
|
|
1468
|
-
"options": [
|
|
1469
|
-
"online",
|
|
1470
|
-
"offline"
|
|
1471
|
-
]
|
|
1472
|
-
},
|
|
1473
|
-
{
|
|
1474
|
-
"name": "type",
|
|
1475
|
-
"description": "Lesson type — affects avatar area and metadata count item.",
|
|
1476
|
-
"options": [
|
|
1477
|
-
"individual",
|
|
1478
|
-
"group"
|
|
1479
|
-
]
|
|
1480
|
-
},
|
|
1481
|
-
{
|
|
1482
|
-
"name": "subjects",
|
|
1483
|
-
"description": "Array of subject labels rendered as Tag pills.",
|
|
1484
|
-
"options": []
|
|
1485
|
-
},
|
|
1486
|
-
{
|
|
1487
|
-
"name": "date",
|
|
1488
|
-
"description": "Formatted date string.",
|
|
1489
|
-
"options": [
|
|
1490
|
-
"upcoming",
|
|
1491
|
-
"in-progress",
|
|
1492
|
-
"completed"
|
|
1493
|
-
]
|
|
1494
|
-
},
|
|
1495
|
-
{
|
|
1496
|
-
"name": "feedbackState",
|
|
1497
|
-
"description": "Feedback phase for completed lessons.",
|
|
1498
|
-
"options": [
|
|
1499
|
-
"pending",
|
|
1500
|
-
"submitted"
|
|
1501
|
-
]
|
|
1502
|
-
},
|
|
1503
|
-
{
|
|
1504
|
-
"name": "pendingFeedbackCount",
|
|
1505
|
-
"description": "Number shown in the Disclosure trigger for pending feedback.",
|
|
1506
|
-
"options": []
|
|
1507
|
-
},
|
|
1508
|
-
{
|
|
1509
|
-
"name": "isStartLessonDisabled",
|
|
1510
|
-
"description": "Disables the \"Start lesson",
|
|
1511
|
-
"options": []
|
|
1512
|
-
},
|
|
1513
|
-
{
|
|
1514
|
-
"name": "hasKebab",
|
|
1515
|
-
"description": "Show or hide the kebab menu. When enabled, passes menu items to the card.",
|
|
1516
|
-
"options": []
|
|
1517
|
-
},
|
|
1518
|
-
{
|
|
1519
|
-
"name": "students",
|
|
1520
|
-
"description": "Array of student objects (name, optional avatarSrc, optional feedbackStatus).",
|
|
1521
|
-
"options": []
|
|
1522
|
-
},
|
|
1523
|
-
{
|
|
1524
|
-
"name": "menuItems",
|
|
1525
|
-
"description": "Kebab menu items. When provided, the kebab button is shown regardless of lesson state.",
|
|
1526
|
-
"options": []
|
|
1527
|
-
},
|
|
1528
|
-
{
|
|
1529
|
-
"name": "onStartLesson",
|
|
1530
|
-
"description": "Called when \"Start lesson",
|
|
1531
|
-
"options": []
|
|
1532
|
-
}
|
|
1533
|
-
],
|
|
1534
|
-
"examples": [
|
|
1535
|
-
{
|
|
1536
|
-
"name": "UpcomingIndividual",
|
|
1537
|
-
"jsx": "<LessonCard title=\"Title goes here\" modality=\"online\" type=\"individual\" subjects={['English']} date=\"Tuesday time=\"17:00 - 18:00\" lessonState=\"upcoming\" isStartLessonDisabled={true} students={[{ name: 'Marcus Johnson' }]} hasKebab={true} />",
|
|
1538
|
-
"storyUrl": "https://62835ff8873d45004a627ad4-snugmmtvrg.chromatic.com/?path=/story/compositions-lessoncard--upcoming-individual"
|
|
1539
|
-
},
|
|
1540
|
-
{
|
|
1541
|
-
"name": "UpcomingGroup",
|
|
1542
|
-
"jsx": "<LessonCard title=\"Title goes here\" modality=\"online\" type=\"group\" subjects={['English'} date=\"Tuesday time=\"17:00 - 18:00\" lessonState=\"upcoming\" isStartLessonDisabled={true} students={STUDENTS_GROUP} hasKebab={true} />",
|
|
1543
|
-
"storyUrl": "https://62835ff8873d45004a627ad4-snugmmtvrg.chromatic.com/?path=/story/compositions-lessoncard--upcoming-group"
|
|
1544
|
-
},
|
|
1545
|
-
{
|
|
1546
|
-
"name": "UpcomingIndividualOffline",
|
|
1547
|
-
"jsx": "<LessonCard title=\"Title goes here\" modality=\"offline\" type=\"individual\" subjects={['English']} date=\"Tuesday time=\"17:00 - 18:00\" room=\"Room 1\" lessonCenter=\"Centrostudi Navigli\" lessonState=\"upcoming\" isStartLessonDisabled={true} students={[{ name: 'Marcus Johnson' }]} hasKebab={true} />",
|
|
1548
|
-
"storyUrl": "https://62835ff8873d45004a627ad4-snugmmtvrg.chromatic.com/?path=/story/compositions-lessoncard--upcoming-individual-offline"
|
|
1549
|
-
}
|
|
1550
|
-
]
|
|
1551
|
-
},
|
|
1552
1463
|
{
|
|
1553
1464
|
"name": "LessonStatusTag",
|
|
1554
1465
|
"description": "",
|
|
@@ -1605,6 +1516,43 @@
|
|
|
1605
1516
|
],
|
|
1606
1517
|
"examples": []
|
|
1607
1518
|
},
|
|
1519
|
+
{
|
|
1520
|
+
"name": "StudentDetails",
|
|
1521
|
+
"description": "Renders a list of students, each shown as an **Avatar** plus name and grade · subject.\n\nOn mobile, students stack vertically. From the `tablet` breakpoint up, they render in a\nsingle row separated by a vertical divider.\n\nTwo sizes are available — `md` (32px avatar, default) and `sm` (24px avatar).\n\nOptional `BuT` / `Trial` pills can be shown next to a student's name via the `but` / `trial`\nflags on each student.\n\nSetting `disabled` on a student dims them to 50% opacity and shows an \"Absent\" tooltip on\nhover/focus (override via `disabledLabel`) — used when a student is removed from an upcoming\nlesson or absent from a previous one.\n\nIntended for use inside `LessonCard` to summarise the students on a group lesson.\n\n### Usage\n\n```tsx\nimport { StudentDetails } from '@gostudent/shared-ui-library';\n\n<StudentDetails\n students={[\n { name: 'Angela Swan', grade: '8', subject: 'Mathematics' },\n { name: 'Victor Ismat', grade: '8', subject: 'Mathematics' },\n ]}\n/>\n```",
|
|
1522
|
+
"storybookUrl": "https://62835ff8873d45004a627ad4-snugmmtvrg.chromatic.com/?path=/docs/compositions-studentdetails",
|
|
1523
|
+
"props": [
|
|
1524
|
+
{
|
|
1525
|
+
"name": "students",
|
|
1526
|
+
"description": "Avatar size: sm=24px, md=32px (default).",
|
|
1527
|
+
"options": [
|
|
1528
|
+
"sm",
|
|
1529
|
+
"md"
|
|
1530
|
+
]
|
|
1531
|
+
},
|
|
1532
|
+
{
|
|
1533
|
+
"name": "className",
|
|
1534
|
+
"description": "Tooltip text shown on hover/focus of a disabled student. Defaults to \"Absent\".",
|
|
1535
|
+
"options": []
|
|
1536
|
+
}
|
|
1537
|
+
],
|
|
1538
|
+
"examples": [
|
|
1539
|
+
{
|
|
1540
|
+
"name": "OneStudent",
|
|
1541
|
+
"jsx": "<StudentDetails students={STUDENT_POOL.slice(0, 1)} />",
|
|
1542
|
+
"storyUrl": "https://62835ff8873d45004a627ad4-snugmmtvrg.chromatic.com/?path=/story/compositions-studentdetails--one-student"
|
|
1543
|
+
},
|
|
1544
|
+
{
|
|
1545
|
+
"name": "TwoStudents",
|
|
1546
|
+
"jsx": "<StudentDetails students={STUDENT_POOL.slice(0, 2)} />",
|
|
1547
|
+
"storyUrl": "https://62835ff8873d45004a627ad4-snugmmtvrg.chromatic.com/?path=/story/compositions-studentdetails--two-students"
|
|
1548
|
+
},
|
|
1549
|
+
{
|
|
1550
|
+
"name": "ThreeStudents",
|
|
1551
|
+
"jsx": "<StudentDetails students={STUDENT_POOL.slice(0, 3)} />",
|
|
1552
|
+
"storyUrl": "https://62835ff8873d45004a627ad4-snugmmtvrg.chromatic.com/?path=/story/compositions-studentdetails--three-students"
|
|
1553
|
+
}
|
|
1554
|
+
]
|
|
1555
|
+
},
|
|
1608
1556
|
{
|
|
1609
1557
|
"name": "TopNavigation",
|
|
1610
1558
|
"description": "Responsive top navigation bar. On **mobile/tablet** (< 1024 px) it shows the logo and a hamburger button that opens a slide-in drawer.\nOn **desktop** (≥ 1024 px) it shows the logo, a tab list, and the user section (Avatar + name + role Tag + chevron) with a dropdown.\n\nThe drawer open/close state is managed internally — no external state needed.\n\n### Usage\n\n```tsx\nimport { TopNavigation } from '@gostudent/shared-ui-library';\n\n<TopNavigation\n tabs={[\n { label: 'Lessons', isSelected: true, onClick: () => {} },\n { label: 'My availability', isSelected: false, onClick: () => {} },\n ]}\n userName=\"Anna James\"\n userRole=\"tutor\"\n navItems={[\n { icon: DashboardIcon, label: 'Lessons', isSelected: true, onClick: () => {} },\n ]}\n languages={[{ value: 'en', label: 'English' }]}\n onLanguageClick={() => {}}\n onLogout={() => {}}\n/>\n```",
|
|
@@ -1699,15 +1647,107 @@
|
|
|
1699
1647
|
},
|
|
1700
1648
|
{
|
|
1701
1649
|
"name": "Desktop",
|
|
1702
|
-
"jsx": "<TopNavigation logo={<GoStudentLogo />} tabs={defaultTabs} userName=\"Anna James\" userRole=\"tutor\" languages={LANGUAGES} selectedLanguage=\"en\" onLogout={() => {} />",
|
|
1650
|
+
"jsx": "<TopNavigation logo={<GoStudentLogo />} tabs={defaultTabs} userName=\"Anna James\" userRole=\"tutor\" languages={LANGUAGES} selectedLanguage=\"en\" onLogout={() => {}} />",
|
|
1703
1651
|
"storyUrl": "https://62835ff8873d45004a627ad4-snugmmtvrg.chromatic.com/?path=/story/compositions-topnavigation--desktop"
|
|
1704
1652
|
},
|
|
1705
1653
|
{
|
|
1706
1654
|
"name": "DesktopSK",
|
|
1707
|
-
"jsx": "<TopNavigation logo={<SKLogo />} mobileLogo={<SKLogoMobile />} logoOverflowsBar={true} tabs={defaultTabs} userName=\"Anna James\" userRole=\"tutor\" languages={LANGUAGES} selectedLanguage=\"en\" onLogout={() => {} />",
|
|
1655
|
+
"jsx": "<TopNavigation logo={<SKLogo />} mobileLogo={<SKLogoMobile />} logoOverflowsBar={true} tabs={defaultTabs} userName=\"Anna James\" userRole=\"tutor\" languages={LANGUAGES} selectedLanguage=\"en\" onLogout={() => {}} />",
|
|
1708
1656
|
"storyUrl": "https://62835ff8873d45004a627ad4-snugmmtvrg.chromatic.com/?path=/story/compositions-topnavigation--desktop-s-k"
|
|
1709
1657
|
}
|
|
1710
1658
|
]
|
|
1659
|
+
},
|
|
1660
|
+
{
|
|
1661
|
+
"name": "TutorLessonCard",
|
|
1662
|
+
"description": "A domain-level card that displays a lesson session with all associated metadata.\n\nSupports states driven by the `lessonState`, `type`, `modality`, and `feedbackState` props:\n\n| `lessonState` | `type` | `modality` | `feedbackState` | Description |\n|----------------|-----------------|--------------|-----------------|-------------|\n| `upcoming` | `individual` | `online` | — | Metadata row (time) + actions in a wrapping flex row, \"Workspace\" link + \"Start GoClass\" button, `StudentDetails` always visible below |\n| `upcoming` | `group` | `online` | — | Metadata row (time, student count) + actions in a wrapping flex row, optional kebab menu, always-visible `StudentDetails` (desktop) / \"N students\" disclosure (mobile) below |\n| `upcoming` | `individual` | `offline` | — | Offline modality tag, metadata row includes room/lesson center, single \"Document lesson\" button |\n| `upcoming` | `group` | `offline` | — | Offline modality tag, metadata row includes room/lesson center, \"N students\" disclosure below |\n| `completed` | `individual` | `online` | `pending` | `StudentDetails` (24px, pending badge) inline, no dropdown, \"Document lesson\" button |\n| `completed` | `group` | `online` | `pending` | Disclosure toggle revealing `StudentDetails` (24px, done/pending badges), \"Document lesson\" button |\n| `completed` | `group` | `online` | `submitted` | \"Review feedback\" button, always-visible `StudentDetails` (desktop) / \"N students\" disclosure (mobile) |\n| `completed` | `individual` | `online` | `submitted` | \"Review feedback\" button, `StudentDetails` inline at both breakpoints |\n\nOnline lessons also show a \"Workspace\" link (secondary/link-styled) alongside \"Start GoClass\" /\n\"Document lesson\", for every lesson state.\n\n### Usage\n\n```tsx\nimport { TutorLessonCard } from '@gostudent/shared-ui-library';\n\n<TutorLessonCard\n title=\"English lesson\"\n modality=\"online\"\n type=\"individual\"\n subjects={['English']}\n time=\"17:00 - 18:00\"\n lessonState=\"upcoming\"\n students={[{ name: 'Alice Smith', grade: '8', subject: 'English' }]}\n isStartLessonDisabled\n/>\n```",
|
|
1663
|
+
"storybookUrl": "https://62835ff8873d45004a627ad4-snugmmtvrg.chromatic.com/?path=/docs/compositions-tutorlessoncard",
|
|
1664
|
+
"props": [
|
|
1665
|
+
{
|
|
1666
|
+
"name": "title",
|
|
1667
|
+
"description": "Lesson title shown as the card heading.",
|
|
1668
|
+
"options": [
|
|
1669
|
+
"online",
|
|
1670
|
+
"offline"
|
|
1671
|
+
]
|
|
1672
|
+
},
|
|
1673
|
+
{
|
|
1674
|
+
"name": "type",
|
|
1675
|
+
"description": "Lesson type — affects student list layout and metadata count item.",
|
|
1676
|
+
"options": [
|
|
1677
|
+
"individual",
|
|
1678
|
+
"group"
|
|
1679
|
+
]
|
|
1680
|
+
},
|
|
1681
|
+
{
|
|
1682
|
+
"name": "subjects",
|
|
1683
|
+
"description": "Array of subject labels rendered as Tag pills.",
|
|
1684
|
+
"options": []
|
|
1685
|
+
},
|
|
1686
|
+
{
|
|
1687
|
+
"name": "time",
|
|
1688
|
+
"description": "Formatted time range, e.g. \"17:00 - 18:00\".",
|
|
1689
|
+
"options": [
|
|
1690
|
+
"upcoming",
|
|
1691
|
+
"in-progress",
|
|
1692
|
+
"completed"
|
|
1693
|
+
]
|
|
1694
|
+
},
|
|
1695
|
+
{
|
|
1696
|
+
"name": "feedbackState",
|
|
1697
|
+
"description": "Feedback phase for completed lessons.",
|
|
1698
|
+
"options": [
|
|
1699
|
+
"pending",
|
|
1700
|
+
"submitted"
|
|
1701
|
+
]
|
|
1702
|
+
},
|
|
1703
|
+
{
|
|
1704
|
+
"name": "pendingFeedbackCount",
|
|
1705
|
+
"description": "Number shown in the Disclosure trigger for pending feedback.",
|
|
1706
|
+
"options": []
|
|
1707
|
+
},
|
|
1708
|
+
{
|
|
1709
|
+
"name": "isStartLessonDisabled",
|
|
1710
|
+
"description": "Disables the \"Start lesson\" button in upcoming state.",
|
|
1711
|
+
"options": []
|
|
1712
|
+
},
|
|
1713
|
+
{
|
|
1714
|
+
"name": "hasKebab",
|
|
1715
|
+
"description": "Show or hide the kebab menu. When enabled, passes menu items to the card.",
|
|
1716
|
+
"options": []
|
|
1717
|
+
},
|
|
1718
|
+
{
|
|
1719
|
+
"name": "students",
|
|
1720
|
+
"description": "Array of student objects (name, optional avatarSrc, optional feedbackStatus).",
|
|
1721
|
+
"options": []
|
|
1722
|
+
},
|
|
1723
|
+
{
|
|
1724
|
+
"name": "menuItems",
|
|
1725
|
+
"description": "Kebab menu items. When provided, the kebab button is shown regardless of lesson state.",
|
|
1726
|
+
"options": []
|
|
1727
|
+
},
|
|
1728
|
+
{
|
|
1729
|
+
"name": "onStartLesson",
|
|
1730
|
+
"description": "Called when \"Start GoClass\" is clicked.",
|
|
1731
|
+
"options": []
|
|
1732
|
+
}
|
|
1733
|
+
],
|
|
1734
|
+
"examples": [
|
|
1735
|
+
{
|
|
1736
|
+
"name": "UpcomingIndividual",
|
|
1737
|
+
"jsx": "<TutorLessonCard title=\"Individual lesson\" modality=\"online\" type=\"individual\" subjects={['English']} time=\"17:00 - 18:00\" lessonState=\"upcoming\" isStartLessonDisabled={true} students={[{ name: 'Marcus Johnson', grade: '8', subject: 'Mathematics' }]} hasKebab={true} />",
|
|
1738
|
+
"storyUrl": "https://62835ff8873d45004a627ad4-snugmmtvrg.chromatic.com/?path=/story/compositions-tutorlessoncard--upcoming-individual"
|
|
1739
|
+
},
|
|
1740
|
+
{
|
|
1741
|
+
"name": "UpcomingGroup",
|
|
1742
|
+
"jsx": "<TutorLessonCard title=\"Group lesson\" modality=\"online\" type=\"group\" subjects={['English', 'Biology', 'Math']} time=\"17:00 - 18:00\" lessonState=\"upcoming\" isStartLessonDisabled={true} students={STUDENTS_GROUP} hasKebab={true} />",
|
|
1743
|
+
"storyUrl": "https://62835ff8873d45004a627ad4-snugmmtvrg.chromatic.com/?path=/story/compositions-tutorlessoncard--upcoming-group"
|
|
1744
|
+
},
|
|
1745
|
+
{
|
|
1746
|
+
"name": "UpcomingGroupWithDisabledStudent",
|
|
1747
|
+
"jsx": "<TutorLessonCard title=\"Group lesson\" modality=\"online\" type=\"group\" subjects={['English', 'Biology', 'Math']} time=\"17:00 - 18:00\" lessonState=\"upcoming\" isStartLessonDisabled={true} students={[ ...STUDENTS_GROUP.slice(0, -1), { ...STUDENTS_GROUP[STUDENTS_GROUP.length - 1], disabled: true }, ]} hasKebab={true} />",
|
|
1748
|
+
"storyUrl": "https://62835ff8873d45004a627ad4-snugmmtvrg.chromatic.com/?path=/story/compositions-tutorlessoncard--upcoming-group-with-disabled-student"
|
|
1749
|
+
}
|
|
1750
|
+
]
|
|
1711
1751
|
}
|
|
1712
1752
|
],
|
|
1713
1753
|
"icons": {
|
|
@@ -1723,9 +1763,11 @@
|
|
|
1723
1763
|
"DashboardIcon",
|
|
1724
1764
|
"DeleteIcon",
|
|
1725
1765
|
"EditSquareIcon",
|
|
1766
|
+
"EnvelopeIcon",
|
|
1726
1767
|
"ErrorFilledIcon",
|
|
1727
1768
|
"EventNoteIcon",
|
|
1728
1769
|
"GlobeIcon",
|
|
1770
|
+
"GraduationCapIcon",
|
|
1729
1771
|
"GroupIcon",
|
|
1730
1772
|
"HistoryIcon",
|
|
1731
1773
|
"HourglassIcon",
|
|
@@ -1736,6 +1778,7 @@
|
|
|
1736
1778
|
"LogoutIcon",
|
|
1737
1779
|
"MenuIcon",
|
|
1738
1780
|
"OfflineIcon",
|
|
1781
|
+
"PendingFilledIcon",
|
|
1739
1782
|
"PlanetIcon",
|
|
1740
1783
|
"PlusIcon",
|
|
1741
1784
|
"StarsIcon",
|
|
@@ -1781,7 +1824,7 @@
|
|
|
1781
1824
|
"warning": {
|
|
1782
1825
|
"warning50": "var(--warning-50)",
|
|
1783
1826
|
"warning500": "var(--warning-500)",
|
|
1784
|
-
"
|
|
1827
|
+
"warning900": "var(--warning-900)"
|
|
1785
1828
|
},
|
|
1786
1829
|
"color": {
|
|
1787
1830
|
"colorBlack": "var(--color-black)",
|
|
@@ -2119,6 +2162,8 @@
|
|
|
2119
2162
|
"colorFeedbackWarningBorder": "var(--color-feedback-warning-border)",
|
|
2120
2163
|
"colorFeedbackWarningHelperText": "var(--color-feedback-warning-helper-text)",
|
|
2121
2164
|
"colorFeedbackWarningText": "var(--color-feedback-warning-text)",
|
|
2165
|
+
"colorFeedbackErrorIcon": "var(--color-feedback-error-icon)",
|
|
2166
|
+
"colorFeedbackErrorText": "var(--color-feedback-error-text)",
|
|
2122
2167
|
"colorSurfaceDefault": "var(--color-surface-default)",
|
|
2123
2168
|
"colorSurfaceSubtleSteel": "var(--color-surface-subtle-steel)",
|
|
2124
2169
|
"colorSurfaceHover": "var(--color-surface-hover)",
|
|
@@ -2129,6 +2174,7 @@
|
|
|
2129
2174
|
"colorSurfaceIconsTooltip": "var(--color-surface-icons-tooltip)",
|
|
2130
2175
|
"colorSurfaceIconsWhite": "var(--color-surface-icons-white)",
|
|
2131
2176
|
"colorSurfaceIconsSecondary": "var(--color-surface-icons-secondary)",
|
|
2177
|
+
"colorSurfaceIconsPending": "var(--color-surface-icons-pending)",
|
|
2132
2178
|
"colorSurfaceSelected": "var(--color-surface-selected)",
|
|
2133
2179
|
"colorSurfaceDisabled": "var(--color-surface-disabled)",
|
|
2134
2180
|
"colorSurfaceSubtleBlue": "var(--color-surface-subtle-blue)",
|
|
@@ -2137,6 +2183,7 @@
|
|
|
2137
2183
|
"colorSurfaceStepper": "var(--color-surface-stepper)",
|
|
2138
2184
|
"colorSurfaceTooltip": "var(--color-surface-tooltip)",
|
|
2139
2185
|
"colorSurfaceCalendarDate": "var(--color-surface-calendar-date)",
|
|
2186
|
+
"colorSurfaceCalendarTriangle": "var(--color-surface-calendar-triangle)",
|
|
2140
2187
|
"colorSurfaceCalendarDot": "var(--color-surface-calendar-dot)",
|
|
2141
2188
|
"colorBorderDefault": "var(--color-border-default)",
|
|
2142
2189
|
"colorBorderWhite": "var(--color-border-white)",
|
|
@@ -2160,6 +2207,8 @@
|
|
|
2160
2207
|
"colorTagTextStudent": "var(--color-tag-text-student)",
|
|
2161
2208
|
"colorTagTextTutor": "var(--color-tag-text-tutor)",
|
|
2162
2209
|
"colorTagTextParent": "var(--color-tag-text-parent)",
|
|
2210
|
+
"colorTagBuTBackground": "var(--color-tag-bu-t-background)",
|
|
2211
|
+
"colorTagBuTBorder": "var(--color-tag-bu-t-border)",
|
|
2163
2212
|
"colorInProgressBorder": "var(--color-in-progress-border)",
|
|
2164
2213
|
"colorInProgressDot": "var(--color-in-progress-dot)",
|
|
2165
2214
|
"colorInProgressDotFlash": "var(--color-in-progress-dot-flash)"
|
|
@@ -2396,6 +2445,8 @@
|
|
|
2396
2445
|
"colorFeedbackWarningBorder": "var(--color-feedback-warning-border)",
|
|
2397
2446
|
"colorFeedbackWarningHelperText": "var(--color-feedback-warning-helper-text)",
|
|
2398
2447
|
"colorFeedbackWarningText": "var(--color-feedback-warning-text)",
|
|
2448
|
+
"colorFeedbackErrorIcon": "var(--color-feedback-error-icon)",
|
|
2449
|
+
"colorFeedbackErrorText": "var(--color-feedback-error-text)",
|
|
2399
2450
|
"colorSurfaceDefault": "var(--color-surface-default)",
|
|
2400
2451
|
"colorSurfaceSubtleSteel": "var(--color-surface-subtle-steel)",
|
|
2401
2452
|
"colorSurfaceHover": "var(--color-surface-hover)",
|
|
@@ -2406,6 +2457,7 @@
|
|
|
2406
2457
|
"colorSurfaceIconsTooltip": "var(--color-surface-icons-tooltip)",
|
|
2407
2458
|
"colorSurfaceIconsWhite": "var(--color-surface-icons-white)",
|
|
2408
2459
|
"colorSurfaceIconsSecondary": "var(--color-surface-icons-secondary)",
|
|
2460
|
+
"colorSurfaceIconsPending": "var(--color-surface-icons-pending)",
|
|
2409
2461
|
"colorSurfaceSelected": "var(--color-surface-selected)",
|
|
2410
2462
|
"colorSurfaceDisabled": "var(--color-surface-disabled)",
|
|
2411
2463
|
"colorSurfaceSubtleBlue": "var(--color-surface-subtle-blue)",
|
|
@@ -2414,6 +2466,7 @@
|
|
|
2414
2466
|
"colorSurfaceStepper": "var(--color-surface-stepper)",
|
|
2415
2467
|
"colorSurfaceTooltip": "var(--color-surface-tooltip)",
|
|
2416
2468
|
"colorSurfaceCalendarDate": "var(--color-surface-calendar-date)",
|
|
2469
|
+
"colorSurfaceCalendarTriangle": "var(--color-surface-calendar-triangle)",
|
|
2417
2470
|
"colorSurfaceCalendarDot": "var(--color-surface-calendar-dot)",
|
|
2418
2471
|
"colorBorderDefault": "var(--color-border-default)",
|
|
2419
2472
|
"colorBorderWhite": "var(--color-border-white)",
|
|
@@ -2437,6 +2490,8 @@
|
|
|
2437
2490
|
"colorTagTextStudent": "var(--color-tag-text-student)",
|
|
2438
2491
|
"colorTagTextTutor": "var(--color-tag-text-tutor)",
|
|
2439
2492
|
"colorTagTextParent": "var(--color-tag-text-parent)",
|
|
2493
|
+
"colorTagBuTBackground": "var(--color-tag-bu-t-background)",
|
|
2494
|
+
"colorTagBuTBorder": "var(--color-tag-bu-t-border)",
|
|
2440
2495
|
"colorInProgressBorder": "var(--color-in-progress-border)",
|
|
2441
2496
|
"colorInProgressDot": "var(--color-in-progress-dot)",
|
|
2442
2497
|
"colorInProgressDotFlash": "var(--color-in-progress-dot-flash)"
|