@gostudent/shared-ui-library-mcp 2.2.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/library-manifest.json +43 -8
- package/package.json +1 -1
package/library-manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"libraryVersion": "
|
|
2
|
+
"libraryVersion": "3.1.0",
|
|
3
3
|
"components": [
|
|
4
4
|
{
|
|
5
5
|
"name": "Avatar",
|
|
@@ -924,6 +924,14 @@
|
|
|
924
924
|
"name": "children",
|
|
925
925
|
"description": "Text content displayed next to the icon.",
|
|
926
926
|
"options": []
|
|
927
|
+
},
|
|
928
|
+
{
|
|
929
|
+
"name": "size",
|
|
930
|
+
"description": "Text size. Accepts a single size or a `[mobile, desktop]` tuple for responsive behaviour, e.g. `size={[\"md\", \"sm\"]}`. Defaults to `[\"md\", \"sm\"]` (md on mobile, sm on desktop). The controls panel only supports a single value — see the **Responsive** story for the tuple API.",
|
|
931
|
+
"options": [
|
|
932
|
+
"sm",
|
|
933
|
+
"md"
|
|
934
|
+
]
|
|
927
935
|
}
|
|
928
936
|
],
|
|
929
937
|
"examples": [
|
|
@@ -931,6 +939,11 @@
|
|
|
931
939
|
"name": "Default",
|
|
932
940
|
"jsx": "<MetadataItem icon={<EventNoteIcon />} children=\"Mon, 14 Apr 2025\" />",
|
|
933
941
|
"storyUrl": "https://62835ff8873d45004a627ad4-snugmmtvrg.chromatic.com/?path=/story/components-data-display-metadataitem--default"
|
|
942
|
+
},
|
|
943
|
+
{
|
|
944
|
+
"name": "Responsive",
|
|
945
|
+
"jsx": "<MetadataItem mobileSize=\"md\" desktopSize=\"sm\" children=\"Mon, 14 Apr 2025\" />",
|
|
946
|
+
"storyUrl": "https://62835ff8873d45004a627ad4-snugmmtvrg.chromatic.com/?path=/story/components-data-display-metadataitem--responsive"
|
|
934
947
|
}
|
|
935
948
|
]
|
|
936
949
|
},
|
|
@@ -1010,7 +1023,7 @@
|
|
|
1010
1023
|
},
|
|
1011
1024
|
{
|
|
1012
1025
|
"name": "InlineNotification",
|
|
1013
|
-
"description": "Embedded within the page layout, directly associated with a specific area of content.\nStays visible until the user dismisses it or the condition resolves.\n\nSupports five intent types: `info-neutral`, `info-branded`, `success`, `warning`, `error`.\n\nThe layout is responsive: stacked (mobile) → horizontal single-row (desktop ≥ 1024px).\nUse `stacked` to force the column layout regardless of viewport — useful inside narrow sidebar columns.\n\n### Usage\n\n```tsx\nimport { InlineNotification } from '@gostudent/shared-ui-library';\n\n<InlineNotification\n type=\"success\"\n title=\"Changes saved\"\n message=\"Your profile has been updated successfully.\"\n onDismiss={() => {}}\n/>\n```",
|
|
1026
|
+
"description": "Embedded within the page layout, directly associated with a specific area of content.\nStays visible until the user dismisses it or the condition resolves.\n\nSupports five intent types: `info-neutral`, `info-branded`, `success`, `warning`, `error`.\nSupports two sizes: `default` (16px padding) and `small` (8px padding).\n\nThe layout is responsive: stacked (mobile) → horizontal single-row (desktop ≥ 1024px).\nUse `stacked` to force the column layout regardless of viewport — useful inside narrow sidebar columns.\n\n### Usage\n\n```tsx\nimport { InlineNotification } from '@gostudent/shared-ui-library';\n\n<InlineNotification\n type=\"success\"\n title=\"Changes saved\"\n message=\"Your profile has been updated successfully.\"\n onDismiss={() => {}}\n/>\n```",
|
|
1014
1027
|
"storybookUrl": "https://62835ff8873d45004a627ad4-snugmmtvrg.chromatic.com/?path=/docs/components-notification-inlinenotification",
|
|
1015
1028
|
"props": [
|
|
1016
1029
|
{
|
|
@@ -1023,12 +1036,20 @@
|
|
|
1023
1036
|
"warning",
|
|
1024
1037
|
"error"
|
|
1025
1038
|
]
|
|
1039
|
+
},
|
|
1040
|
+
{
|
|
1041
|
+
"name": "size",
|
|
1042
|
+
"description": "",
|
|
1043
|
+
"options": [
|
|
1044
|
+
"default",
|
|
1045
|
+
"small"
|
|
1046
|
+
]
|
|
1026
1047
|
}
|
|
1027
1048
|
],
|
|
1028
1049
|
"examples": [
|
|
1029
1050
|
{
|
|
1030
1051
|
"name": "Default",
|
|
1031
|
-
"jsx": "<InlineNotification type=\"info-neutral\" title=\"Notification title\" message=\"This is an informational message.\" />",
|
|
1052
|
+
"jsx": "<InlineNotification type=\"info-neutral\" size=\"default\" title=\"Notification title\" message=\"This is an informational message.\" />",
|
|
1032
1053
|
"storyUrl": "https://62835ff8873d45004a627ad4-snugmmtvrg.chromatic.com/?path=/story/components-notification-inlinenotification--default"
|
|
1033
1054
|
},
|
|
1034
1055
|
{
|
|
@@ -1045,7 +1066,7 @@
|
|
|
1045
1066
|
},
|
|
1046
1067
|
{
|
|
1047
1068
|
"name": "ToastNotification",
|
|
1048
|
-
"description": "Transient overlay notifications that appear over the page content and auto-dismiss after a set duration (default 5s).\n\nWrap your app (or story) in `<ToastProvider>` and trigger toasts via the `useToast` hook.\n\n### Interaction rules\n- Hovering a toast pauses the auto-dismiss timer\n- Clicking ✕ dismisses immediately\n- New toasts push existing ones down (max 3 visible at once)\n- On mobile: full-width bottom-sheet style\n\n### Usage\n\n```tsx\nimport { ToastProvider, useToast } from '@gostudent/shared-ui-library';\n\nfunction App() {\n return (\n <ToastProvider>\n <MyPage />\n </ToastProvider>\n );\n}\n\nfunction MyPage() {\n const { addToast } = useToast();\n return (\n <button onClick={() => addToast({ type: 'success', title: 'Saved', message: 'Your changes have been saved.' })}>\n Save\n </button>\n );\n}\n```",
|
|
1069
|
+
"description": "Transient overlay notifications that appear over the page content and auto-dismiss after a set duration (default 5s).\nSupports two sizes: `default` (16px padding) and `small` (8px padding).\n\nWrap your app (or story) in `<ToastProvider>` and trigger toasts via the `useToast` hook.\n\n### Interaction rules\n- Hovering a toast pauses the auto-dismiss timer\n- Clicking ✕ dismisses immediately\n- New toasts push existing ones down (max 3 visible at once)\n- On mobile: full-width bottom-sheet style\n\n### Usage\n\n```tsx\nimport { ToastProvider, useToast } from '@gostudent/shared-ui-library';\n\nfunction App() {\n return (\n <ToastProvider>\n <MyPage />\n </ToastProvider>\n );\n}\n\nfunction MyPage() {\n const { addToast } = useToast();\n return (\n <button onClick={() => addToast({ type: 'success', title: 'Saved', message: 'Your changes have been saved.' })}>\n Save\n </button>\n );\n}\n```",
|
|
1049
1070
|
"storybookUrl": "https://62835ff8873d45004a627ad4-snugmmtvrg.chromatic.com/?path=/docs/components-notification-toastnotification",
|
|
1050
1071
|
"props": [
|
|
1051
1072
|
{
|
|
@@ -1060,6 +1081,11 @@
|
|
|
1060
1081
|
"jsx": "// See \"Interactive\" story — uses interactive render wrapper",
|
|
1061
1082
|
"storyUrl": "https://62835ff8873d45004a627ad4-snugmmtvrg.chromatic.com/?path=/story/components-notification-toastnotification--interactive"
|
|
1062
1083
|
},
|
|
1084
|
+
{
|
|
1085
|
+
"name": "AllSizes",
|
|
1086
|
+
"jsx": "// See \"AllSizes\" story — uses interactive render wrapper",
|
|
1087
|
+
"storyUrl": "https://62835ff8873d45004a627ad4-snugmmtvrg.chromatic.com/?path=/story/components-notification-toastnotification--all-sizes"
|
|
1088
|
+
},
|
|
1063
1089
|
{
|
|
1064
1090
|
"name": "InteractionRules",
|
|
1065
1091
|
"jsx": "// See \"InteractionRules\" story — uses interactive render wrapper",
|
|
@@ -1069,7 +1095,7 @@
|
|
|
1069
1095
|
},
|
|
1070
1096
|
{
|
|
1071
1097
|
"name": "TopBanner",
|
|
1072
|
-
"description": "Full-width persistent notification placed above or below the main navigation bar.\nUsed for high-priority, global announcements (maintenance windows, subscription warnings, system-wide alerts).\n\n- Inline single-line layout, 56px height\n- 5 intent types: `info-neutral`, `info-branded`, `success`, `warning`, `error`\n- `info-branded` uses the Stars icon and branded colours\n- Max 1 banner at a time (usage rule — not enforced by the component)\n- Does not auto-dismiss\n\n### Usage\n\n```tsx\nimport { TopBanner } from '@gostudent/shared-ui-library';\n\n<TopBanner\n type=\"warning\"\n title=\"Scheduled maintenance\"\n message=\"Maintenance on Apr 26, 02:00–04:00 UTC.\"\n actionLink\n linkText=\"Learn more\"\n onDismiss={() => {}}\n/>\n```",
|
|
1098
|
+
"description": "Full-width persistent notification placed above or below the main navigation bar.\nUsed for high-priority, global announcements (maintenance windows, subscription warnings, system-wide alerts).\n\n- Inline single-line layout, 56px height\n- 5 intent types: `info-neutral`, `info-branded`, `success`, `warning`, `error`\n- 2 sizes: `default` (16px/24px text) and `small` (14px/20px text)\n- ⚠️ Breaking visual change: prior to the `size` prop, text always rendered at 14px/20px\n (now `small`). Consumers not passing `size` will see larger default text after upgrading.\n- `info-branded` uses the Stars icon and branded colours\n- Max 1 banner at a time (usage rule — not enforced by the component)\n- Does not auto-dismiss\n\n### Usage\n\n```tsx\nimport { TopBanner } from '@gostudent/shared-ui-library';\n\n<TopBanner\n type=\"warning\"\n title=\"Scheduled maintenance\"\n message=\"Maintenance on Apr 26, 02:00–04:00 UTC.\"\n actionLink\n linkText=\"Learn more\"\n onDismiss={() => {}}\n/>\n```",
|
|
1073
1099
|
"storybookUrl": "https://62835ff8873d45004a627ad4-snugmmtvrg.chromatic.com/?path=/docs/components-notification-topbanner",
|
|
1074
1100
|
"props": [
|
|
1075
1101
|
{
|
|
@@ -1082,12 +1108,20 @@
|
|
|
1082
1108
|
"warning",
|
|
1083
1109
|
"error"
|
|
1084
1110
|
]
|
|
1111
|
+
},
|
|
1112
|
+
{
|
|
1113
|
+
"name": "size",
|
|
1114
|
+
"description": "",
|
|
1115
|
+
"options": [
|
|
1116
|
+
"default",
|
|
1117
|
+
"small"
|
|
1118
|
+
]
|
|
1085
1119
|
}
|
|
1086
1120
|
],
|
|
1087
1121
|
"examples": [
|
|
1088
1122
|
{
|
|
1089
1123
|
"name": "Default",
|
|
1090
|
-
"jsx": "<TopBanner type=\"info-neutral\" title=\"Information title\" message=\"This is an informational message.\" actionLink={true} linkText=\"Action link\" />",
|
|
1124
|
+
"jsx": "<TopBanner type=\"info-neutral\" size=\"default\" title=\"Information title\" message=\"This is an informational message.\" actionLink={true} linkText=\"Action link\" />",
|
|
1091
1125
|
"storyUrl": "https://62835ff8873d45004a627ad4-snugmmtvrg.chromatic.com/?path=/story/components-notification-topbanner--default"
|
|
1092
1126
|
},
|
|
1093
1127
|
{
|
|
@@ -1345,7 +1379,7 @@
|
|
|
1345
1379
|
},
|
|
1346
1380
|
{
|
|
1347
1381
|
"name": "size",
|
|
1348
|
-
"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.",
|
|
1382
|
+
"description": "`xs` is only meaningful with `shape=\"pill\"` (8/16 SemiBold — a compact pill for dense contexts). `shape=\"pill\"` defaults to `sm` (not `md`) when `size` is omitted — pill only intends to support `sm`/`xs`. Accepts a single size or a `[mobile, desktop]` tuple for responsive behaviour, e.g. `size={[\"md\", \"sm\"]}`. See the **Responsive** story.",
|
|
1349
1383
|
"options": [
|
|
1350
1384
|
"xs",
|
|
1351
1385
|
"sm",
|
|
@@ -1723,7 +1757,7 @@
|
|
|
1723
1757
|
},
|
|
1724
1758
|
{
|
|
1725
1759
|
"name": "HistoryLessonCard",
|
|
1726
|
-
"description": "A single row in a student's lesson history list. Behaviour is driven by `attendanceStatus` and\n`isDocumented`:\n\n| `attendanceStatus` | `isDocumented` | Renders |\n|-------------------------------------|------------------|---------|\n| `present` | `false` | \"Document lesson\" button |\n| `present` | `true` | Expandable tag row (chevron) revealing behaviour + learning content |\n| `absent` / `absent-with-reason` | — | Header, metadata and tags only — no button or chevron |\n| omitted | `false`/`true` | No attendance badge; otherwise behaves as `present` |\n\n`attendanceStatus` and `location` are both optional. Omit `attendanceStatus` when attendance\nwas never marked — the badge is hidden rather than claiming a state the data does not support.\nOmit `location` when the lesson had no place, e.g. an online lesson.\n\n### Usage\n\n```tsx\nimport { HistoryLessonCard } from '@gostudent/shared-ui-library';\n\n<HistoryLessonCard\n subject=\"Math\"\n date=\"10 Jul 2026\"\n time=\"14:00 - 15:00\"\n modality=\"offline\"\n location=\"Centrostudi Navigli\"\n attendanceStatus=\"present\"\n isDocumented={false}\n onDocumentLesson={() => {}}\n/>\n```",
|
|
1760
|
+
"description": "A single row in a student's lesson history list. Behaviour is driven by `attendanceStatus` and\n`isDocumented`:\n\n| `attendanceStatus` | `isDocumented` | Renders |\n|-------------------------------------|------------------|---------|\n| `present` | `false` | \"Pending feedback\" pill + \"Document lesson\" button |\n| `present` | `true` | Expandable tag row (chevron) revealing behaviour + learning content |\n| `absent` / `absent-with-reason` | — | Header, metadata and tags only — no button, pill or chevron |\n| omitted | `false`/`true` | No attendance badge; otherwise behaves as `present` |\n\n`attendanceStatus` and `location` are both optional. Omit `attendanceStatus` when attendance\nwas never marked — the badge is hidden rather than claiming a state the data does not support.\nOmit `location` when the lesson had no place, e.g. an online lesson.\n\n### Usage\n\n```tsx\nimport { HistoryLessonCard } from '@gostudent/shared-ui-library';\n\n<HistoryLessonCard\n subject=\"Math\"\n date=\"10 Jul 2026\"\n time=\"14:00 - 15:00\"\n modality=\"offline\"\n location=\"Centrostudi Navigli\"\n attendanceStatus=\"present\"\n isDocumented={false}\n onDocumentLesson={() => {}}\n/>\n```",
|
|
1727
1761
|
"storybookUrl": "https://62835ff8873d45004a627ad4-snugmmtvrg.chromatic.com/?path=/docs/compositions-historylessoncard",
|
|
1728
1762
|
"props": [
|
|
1729
1763
|
{
|
|
@@ -2348,6 +2382,7 @@
|
|
|
2348
2382
|
],
|
|
2349
2383
|
"icons": {
|
|
2350
2384
|
"names": [
|
|
2385
|
+
"AgainIcon",
|
|
2351
2386
|
"ArrowLeftIcon",
|
|
2352
2387
|
"ArrowRightIcon",
|
|
2353
2388
|
"BookIcon",
|