@arbor-education/design-system.components 0.15.0 → 0.16.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/.gather/skills/write-stories/SKILL.md +207 -271
- package/.storybook/preview.ts +5 -0
- package/CHANGELOG.md +17 -0
- package/README.md +8 -0
- package/component-library.md +144 -13
- package/dist/components/articleCard/ArticleCard.stories.d.ts +137 -11
- package/dist/components/articleCard/ArticleCard.stories.d.ts.map +1 -1
- package/dist/components/articleCard/ArticleCard.stories.js +358 -91
- package/dist/components/articleCard/ArticleCard.stories.js.map +1 -1
- package/dist/components/avatar/Avatar.stories.d.ts +6 -6
- package/dist/components/avatar/Avatar.stories.d.ts.map +1 -1
- package/dist/components/avatar/Avatar.stories.js +393 -49
- package/dist/components/avatar/Avatar.stories.js.map +1 -1
- package/dist/components/avatarGroup/AvatarGroup.stories.d.ts +9 -7
- package/dist/components/avatarGroup/AvatarGroup.stories.d.ts.map +1 -1
- package/dist/components/avatarGroup/AvatarGroup.stories.js +688 -65
- package/dist/components/avatarGroup/AvatarGroup.stories.js.map +1 -1
- package/dist/components/banner/Banner.stories.d.ts.map +1 -1
- package/dist/components/banner/Banner.stories.js +7 -3
- package/dist/components/banner/Banner.stories.js.map +1 -1
- package/dist/components/card/Card.stories.d.ts +105 -4
- package/dist/components/card/Card.stories.d.ts.map +1 -1
- package/dist/components/card/Card.stories.js +336 -18
- package/dist/components/card/Card.stories.js.map +1 -1
- package/dist/components/combobox/Combobox.stories.d.ts +134 -21
- package/dist/components/combobox/Combobox.stories.d.ts.map +1 -1
- package/dist/components/combobox/Combobox.stories.js +676 -175
- package/dist/components/combobox/Combobox.stories.js.map +1 -1
- package/dist/components/datePicker/DatePicker.stories.d.ts +119 -27
- package/dist/components/datePicker/DatePicker.stories.d.ts.map +1 -1
- package/dist/components/datePicker/DatePicker.stories.js +575 -47
- package/dist/components/datePicker/DatePicker.stories.js.map +1 -1
- package/dist/components/dateTimePicker/DateTimePicker.stories.d.ts +155 -39
- package/dist/components/dateTimePicker/DateTimePicker.stories.d.ts.map +1 -1
- package/dist/components/dateTimePicker/DateTimePicker.stories.js +674 -103
- package/dist/components/dateTimePicker/DateTimePicker.stories.js.map +1 -1
- package/dist/components/editableText/EditableText.stories.d.ts +53 -12
- package/dist/components/editableText/EditableText.stories.d.ts.map +1 -1
- package/dist/components/editableText/EditableText.stories.js +401 -64
- package/dist/components/editableText/EditableText.stories.js.map +1 -1
- package/dist/components/formField/FormField.d.ts +4 -0
- package/dist/components/formField/FormField.d.ts.map +1 -1
- package/dist/components/formField/FormField.js +2 -1
- package/dist/components/formField/FormField.js.map +1 -1
- package/dist/components/formField/FormField.test.js +5 -0
- package/dist/components/formField/FormField.test.js.map +1 -1
- package/dist/components/formField/fieldset/Fieldset.stories.d.ts +56 -4
- package/dist/components/formField/fieldset/Fieldset.stories.d.ts.map +1 -1
- package/dist/components/formField/fieldset/Fieldset.stories.js +534 -28
- package/dist/components/formField/fieldset/Fieldset.stories.js.map +1 -1
- package/dist/components/formField/inputs/checkbox/CheckboxGroup.d.ts +3 -1
- package/dist/components/formField/inputs/checkbox/CheckboxGroup.d.ts.map +1 -1
- package/dist/components/formField/inputs/checkbox/CheckboxInput.js +1 -1
- package/dist/components/formField/inputs/checkbox/CheckboxInput.js.map +1 -1
- package/dist/components/formField/inputs/colourPickerDropdown/ColourPickerDropdown.stories.d.ts +95 -1
- package/dist/components/formField/inputs/colourPickerDropdown/ColourPickerDropdown.stories.d.ts.map +1 -1
- package/dist/components/formField/inputs/colourPickerDropdown/ColourPickerDropdown.stories.js +386 -9
- package/dist/components/formField/inputs/colourPickerDropdown/ColourPickerDropdown.stories.js.map +1 -1
- package/dist/components/formField/inputs/radio/RadioButtonGroup.d.ts +6 -2
- package/dist/components/formField/inputs/radio/RadioButtonGroup.d.ts.map +1 -1
- package/dist/components/formField/inputs/radio/RadioButtonGroup.js.map +1 -1
- package/dist/components/formField/inputs/radio/RadioButtonInput.stories.d.ts.map +1 -1
- package/dist/components/formField/inputs/radio/RadioButtonInput.stories.js +61 -49
- package/dist/components/formField/inputs/radio/RadioButtonInput.stories.js.map +1 -1
- package/dist/components/formField/inputs/selectDropdown/SelectDropdown.stories.d.ts +188 -166
- package/dist/components/formField/inputs/selectDropdown/SelectDropdown.stories.d.ts.map +1 -1
- package/dist/components/formField/inputs/selectDropdown/SelectDropdown.stories.js +821 -160
- package/dist/components/formField/inputs/selectDropdown/SelectDropdown.stories.js.map +1 -1
- package/dist/components/formField/inputs/time/TimeInput.stories.d.ts +176 -22
- package/dist/components/formField/inputs/time/TimeInput.stories.d.ts.map +1 -1
- package/dist/components/formField/inputs/time/TimeInput.stories.js +851 -92
- package/dist/components/formField/inputs/time/TimeInput.stories.js.map +1 -1
- package/dist/components/formField/label/Label.stories.d.ts +54 -5
- package/dist/components/formField/label/Label.stories.d.ts.map +1 -1
- package/dist/components/formField/label/Label.stories.js +238 -4
- package/dist/components/formField/label/Label.stories.js.map +1 -1
- package/dist/components/icoText/IcoText.stories.d.ts +32 -6
- package/dist/components/icoText/IcoText.stories.d.ts.map +1 -1
- package/dist/components/icoText/IcoText.stories.js +309 -14
- package/dist/components/icoText/IcoText.stories.js.map +1 -1
- package/dist/components/kpiCard/KPICard.stories.d.ts +100 -2
- package/dist/components/kpiCard/KPICard.stories.d.ts.map +1 -1
- package/dist/components/kpiCard/KPICard.stories.js +354 -10
- package/dist/components/kpiCard/KPICard.stories.js.map +1 -1
- package/dist/components/kvpList/KVPList.stories.d.ts +57 -4
- package/dist/components/kvpList/KVPList.stories.d.ts.map +1 -1
- package/dist/components/kvpList/KVPList.stories.js +403 -10
- package/dist/components/kvpList/KVPList.stories.js.map +1 -1
- package/dist/components/modal/Modal.stories.d.ts +113 -9
- package/dist/components/modal/Modal.stories.d.ts.map +1 -1
- package/dist/components/modal/Modal.stories.js +633 -13
- package/dist/components/modal/Modal.stories.js.map +1 -1
- package/dist/components/modal/modalManager/ModalManager.stories.d.ts +34 -10
- package/dist/components/modal/modalManager/ModalManager.stories.d.ts.map +1 -1
- package/dist/components/modal/modalManager/ModalManager.stories.js +463 -85
- package/dist/components/modal/modalManager/ModalManager.stories.js.map +1 -1
- package/dist/components/pill/Pill.d.ts.map +1 -1
- package/dist/components/pill/Pill.js +1 -1
- package/dist/components/pill/Pill.js.map +1 -1
- package/dist/components/pill/Pill.stories.d.ts.map +1 -1
- package/dist/components/pill/Pill.stories.js +11 -13
- package/dist/components/pill/Pill.stories.js.map +1 -1
- package/dist/components/row/Row.stories.d.ts +1 -2
- package/dist/components/row/Row.stories.d.ts.map +1 -1
- package/dist/components/row/Row.stories.js +360 -50
- package/dist/components/row/Row.stories.js.map +1 -1
- package/dist/components/searchBar/SearchBar.stories.d.ts +52 -4
- package/dist/components/searchBar/SearchBar.stories.d.ts.map +1 -1
- package/dist/components/searchBar/SearchBar.stories.js +428 -36
- package/dist/components/searchBar/SearchBar.stories.js.map +1 -1
- package/dist/components/section/Section.stories.d.ts +11 -41
- package/dist/components/section/Section.stories.d.ts.map +1 -1
- package/dist/components/section/Section.stories.js +494 -56
- package/dist/components/section/Section.stories.js.map +1 -1
- package/dist/components/singleUser/SingleUser.stories.d.ts +5 -4
- package/dist/components/singleUser/SingleUser.stories.d.ts.map +1 -1
- package/dist/components/singleUser/SingleUser.stories.js +303 -31
- package/dist/components/singleUser/SingleUser.stories.js.map +1 -1
- package/dist/components/slideoverManager/SlideoverManager.stories.d.ts +32 -11
- package/dist/components/slideoverManager/SlideoverManager.stories.d.ts.map +1 -1
- package/dist/components/slideoverManager/SlideoverManager.stories.js +380 -84
- package/dist/components/slideoverManager/SlideoverManager.stories.js.map +1 -1
- package/dist/components/table/DSDefaultColDef.d.ts.map +1 -1
- package/dist/components/table/DSDefaultColDef.js +4 -3
- package/dist/components/table/DSDefaultColDef.js.map +1 -1
- package/dist/components/table/Table.d.ts +6 -1
- package/dist/components/table/Table.d.ts.map +1 -1
- package/dist/components/table/Table.js +8 -3
- package/dist/components/table/Table.js.map +1 -1
- package/dist/components/table/Table.stories.d.ts +2 -0
- package/dist/components/table/Table.stories.d.ts.map +1 -1
- package/dist/components/table/Table.stories.js +357 -3
- package/dist/components/table/Table.stories.js.map +1 -1
- package/dist/components/table/TableFooter.stories.d.ts +49 -0
- package/dist/components/table/TableFooter.stories.d.ts.map +1 -0
- package/dist/components/table/TableFooter.stories.js +137 -0
- package/dist/components/table/TableFooter.stories.js.map +1 -0
- package/dist/components/table/TableHeader.stories.d.ts +93 -0
- package/dist/components/table/TableHeader.stories.d.ts.map +1 -0
- package/dist/components/table/TableHeader.stories.js +176 -0
- package/dist/components/table/TableHeader.stories.js.map +1 -0
- package/dist/components/table/cellEditors/DateCellEditor.stories.d.ts +44 -0
- package/dist/components/table/cellEditors/DateCellEditor.stories.d.ts.map +1 -0
- package/dist/components/table/cellEditors/DateCellEditor.stories.js +186 -0
- package/dist/components/table/cellEditors/DateCellEditor.stories.js.map +1 -0
- package/dist/components/table/cellRenderers/BooleanCellRenderer.stories.d.ts +40 -0
- package/dist/components/table/cellRenderers/BooleanCellRenderer.stories.d.ts.map +1 -0
- package/dist/components/table/cellRenderers/BooleanCellRenderer.stories.js +209 -0
- package/dist/components/table/cellRenderers/BooleanCellRenderer.stories.js.map +1 -0
- package/dist/components/table/cellRenderers/ButtonCellRenderer.stories.d.ts +48 -0
- package/dist/components/table/cellRenderers/ButtonCellRenderer.stories.d.ts.map +1 -0
- package/dist/components/table/cellRenderers/ButtonCellRenderer.stories.js +244 -0
- package/dist/components/table/cellRenderers/ButtonCellRenderer.stories.js.map +1 -0
- package/dist/components/table/cellRenderers/CheckboxCellRenderer.d.ts.map +1 -1
- package/dist/components/table/cellRenderers/CheckboxCellRenderer.js +3 -1
- package/dist/components/table/cellRenderers/CheckboxCellRenderer.js.map +1 -1
- package/dist/components/table/cellRenderers/CheckboxCellRenderer.stories.d.ts +64 -0
- package/dist/components/table/cellRenderers/CheckboxCellRenderer.stories.d.ts.map +1 -0
- package/dist/components/table/cellRenderers/CheckboxCellRenderer.stories.js +241 -0
- package/dist/components/table/cellRenderers/CheckboxCellRenderer.stories.js.map +1 -0
- package/dist/components/table/cellRenderers/DefaultCellRenderer.stories.d.ts +55 -0
- package/dist/components/table/cellRenderers/DefaultCellRenderer.stories.d.ts.map +1 -0
- package/dist/components/table/cellRenderers/DefaultCellRenderer.stories.js +245 -0
- package/dist/components/table/cellRenderers/DefaultCellRenderer.stories.js.map +1 -0
- package/dist/components/table/cellRenderers/InlineTextCellRenderer.stories.d.ts +67 -0
- package/dist/components/table/cellRenderers/InlineTextCellRenderer.stories.d.ts.map +1 -0
- package/dist/components/table/cellRenderers/InlineTextCellRenderer.stories.js +221 -0
- package/dist/components/table/cellRenderers/InlineTextCellRenderer.stories.js.map +1 -0
- package/dist/components/table/cellRenderers/SelectDropdownCellRenderer.stories.d.ts +75 -0
- package/dist/components/table/cellRenderers/SelectDropdownCellRenderer.stories.d.ts.map +1 -0
- package/dist/components/table/cellRenderers/SelectDropdownCellRenderer.stories.js +270 -0
- package/dist/components/table/cellRenderers/SelectDropdownCellRenderer.stories.js.map +1 -0
- package/dist/components/table/columnFilters/BooleanFilter.stories.d.ts +57 -0
- package/dist/components/table/columnFilters/BooleanFilter.stories.d.ts.map +1 -0
- package/dist/components/table/columnFilters/BooleanFilter.stories.js +198 -0
- package/dist/components/table/columnFilters/BooleanFilter.stories.js.map +1 -0
- package/dist/components/table/columnFilters/TimeFilter.stories.d.ts +58 -0
- package/dist/components/table/columnFilters/TimeFilter.stories.d.ts.map +1 -0
- package/dist/components/table/columnFilters/TimeFilter.stories.js +207 -0
- package/dist/components/table/columnFilters/TimeFilter.stories.js.map +1 -0
- package/dist/components/table/pagination/PaginationPanel.stories.d.ts +113 -0
- package/dist/components/table/pagination/PaginationPanel.stories.d.ts.map +1 -0
- package/dist/components/table/pagination/PaginationPanel.stories.js +272 -0
- package/dist/components/table/pagination/PaginationPanel.stories.js.map +1 -0
- package/dist/components/table/tableControls/TableControls.stories.d.ts +151 -0
- package/dist/components/table/tableControls/TableControls.stories.d.ts.map +1 -0
- package/dist/components/table/tableControls/TableControls.stories.js +356 -0
- package/dist/components/table/tableControls/TableControls.stories.js.map +1 -0
- package/dist/components/table/tableControls/TableSettingsDropdown.d.ts +27 -1
- package/dist/components/table/tableControls/TableSettingsDropdown.d.ts.map +1 -1
- package/dist/components/table/tableControls/TableSettingsDropdown.js +53 -26
- package/dist/components/table/tableControls/TableSettingsDropdown.js.map +1 -1
- package/dist/components/table/tableControls/TableSettingsDropdown.test.d.ts +2 -0
- package/dist/components/table/tableControls/TableSettingsDropdown.test.d.ts.map +1 -0
- package/dist/components/table/tableControls/TableSettingsDropdown.test.js +178 -0
- package/dist/components/table/tableControls/TableSettingsDropdown.test.js.map +1 -0
- package/dist/components/tabs/Tabs.stories.d.ts +22 -4
- package/dist/components/tabs/Tabs.stories.d.ts.map +1 -1
- package/dist/components/tabs/Tabs.stories.js +398 -22
- package/dist/components/tabs/Tabs.stories.js.map +1 -1
- package/dist/components/tabs/TabsItem.stories.d.ts +54 -1
- package/dist/components/tabs/TabsItem.stories.d.ts.map +1 -1
- package/dist/components/tabs/TabsItem.stories.js +61 -9
- package/dist/components/tabs/TabsItem.stories.js.map +1 -1
- package/dist/components/toast/Toast.stories.d.ts +103 -10
- package/dist/components/toast/Toast.stories.d.ts.map +1 -1
- package/dist/components/toast/Toast.stories.js +409 -47
- package/dist/components/toast/Toast.stories.js.map +1 -1
- package/dist/components/toggle/Toggle.stories.d.ts +61 -46
- package/dist/components/toggle/Toggle.stories.d.ts.map +1 -1
- package/dist/components/toggle/Toggle.stories.js +311 -122
- package/dist/components/toggle/Toggle.stories.js.map +1 -1
- package/dist/components/tooltip/Tooltip.stories.d.ts +78 -6
- package/dist/components/tooltip/Tooltip.stories.d.ts.map +1 -1
- package/dist/components/tooltip/Tooltip.stories.js +413 -7
- package/dist/components/tooltip/Tooltip.stories.js.map +1 -1
- package/dist/components/tooltip/TooltipWrapper.stories.d.ts +71 -7
- package/dist/components/tooltip/TooltipWrapper.stories.d.ts.map +1 -1
- package/dist/components/tooltip/TooltipWrapper.stories.js +238 -10
- package/dist/components/tooltip/TooltipWrapper.stories.js.map +1 -1
- package/dist/index.css +8 -0
- package/dist/index.css.map +1 -1
- package/dist/utils/PopupParentContext.stories.d.ts +17 -0
- package/dist/utils/PopupParentContext.stories.d.ts.map +1 -0
- package/dist/utils/PopupParentContext.stories.js +266 -0
- package/dist/utils/PopupParentContext.stories.js.map +1 -0
- package/dist/utils/getDefaultPopupParent.d.ts.map +1 -1
- package/dist/utils/getDefaultPopupParent.js +6 -0
- package/dist/utils/getDefaultPopupParent.js.map +1 -1
- package/package.json +1 -1
- package/src/components/articleCard/ArticleCard.stories.tsx +524 -111
- package/src/components/avatar/Avatar.stories.tsx +504 -59
- package/src/components/avatarGroup/AvatarGroup.stories.tsx +977 -175
- package/src/components/banner/Banner.stories.tsx +7 -3
- package/src/components/card/Card.stories.tsx +466 -36
- package/src/components/combobox/Combobox.stories.tsx +867 -260
- package/src/components/datePicker/DatePicker.stories.tsx +777 -60
- package/src/components/dateTimePicker/DateTimePicker.stories.tsx +910 -132
- package/src/components/editableText/EditableText.stories.tsx +567 -91
- package/src/components/formField/FormField.test.tsx +6 -0
- package/src/components/formField/FormField.tsx +5 -0
- package/src/components/formField/fieldset/Fieldset.stories.tsx +761 -51
- package/src/components/formField/inputs/checkbox/CheckboxGroup.tsx +1 -1
- package/src/components/formField/inputs/checkbox/CheckboxInput.tsx +1 -1
- package/src/components/formField/inputs/colourPickerDropdown/ColourPickerDropdown.stories.tsx +504 -11
- package/src/components/formField/inputs/radio/RadioButtonGroup.tsx +17 -4
- package/src/components/formField/inputs/radio/RadioButtonInput.stories.tsx +71 -59
- package/src/components/formField/inputs/selectDropdown/SelectDropdown.stories.tsx +1079 -168
- package/src/components/formField/inputs/time/TimeInput.stories.tsx +1140 -104
- package/src/components/formField/label/Label.stories.tsx +317 -8
- package/src/components/icoText/IcoText.stories.tsx +442 -31
- package/src/components/kpiCard/KPICard.stories.tsx +475 -30
- package/src/components/kvpList/KVPList.stories.tsx +593 -26
- package/src/components/modal/Modal.stories.tsx +963 -26
- package/src/components/modal/modalManager/ModalManager.stories.tsx +612 -454
- package/src/components/pill/Pill.stories.tsx +11 -13
- package/src/components/pill/Pill.tsx +1 -0
- package/src/components/row/Row.stories.tsx +474 -58
- package/src/components/searchBar/SearchBar.stories.tsx +570 -38
- package/src/components/section/Section.stories.tsx +723 -70
- package/src/components/singleUser/SingleUser.stories.tsx +393 -34
- package/src/components/slideoverManager/SlideoverManager.stories.tsx +572 -342
- package/src/components/table/DSDefaultColDef.ts +25 -5
- package/src/components/table/Table.stories.tsx +411 -3
- package/src/components/table/Table.tsx +9 -2
- package/src/components/table/TableFooter.stories.tsx +196 -0
- package/src/components/table/TableHeader.stories.tsx +251 -0
- package/src/components/table/cellEditors/DateCellEditor.stories.tsx +245 -0
- package/src/components/table/cellRenderers/BooleanCellRenderer.stories.tsx +278 -0
- package/src/components/table/cellRenderers/ButtonCellRenderer.stories.tsx +333 -0
- package/src/components/table/cellRenderers/CheckboxCellRenderer.stories.tsx +337 -0
- package/src/components/table/cellRenderers/CheckboxCellRenderer.tsx +5 -1
- package/src/components/table/cellRenderers/DefaultCellRenderer.stories.tsx +342 -0
- package/src/components/table/cellRenderers/InlineTextCellRenderer.stories.tsx +292 -0
- package/src/components/table/cellRenderers/SelectDropdownCellRenderer.stories.tsx +369 -0
- package/src/components/table/columnFilters/BooleanFilter.stories.tsx +268 -0
- package/src/components/table/columnFilters/TimeFilter.stories.tsx +281 -0
- package/src/components/table/pagination/PaginationPanel.stories.tsx +327 -0
- package/src/components/table/tableControls/TableControls.stories.tsx +415 -0
- package/src/components/table/tableControls/TableSettingsDropdown.test.tsx +207 -0
- package/src/components/table/tableControls/TableSettingsDropdown.tsx +103 -39
- package/src/components/tabs/Tabs.stories.tsx +540 -60
- package/src/components/tabs/TabsItem.stories.tsx +82 -8
- package/src/components/toast/Toast.stories.tsx +539 -77
- package/src/components/toggle/Toggle.stories.tsx +371 -135
- package/src/components/tooltip/Tooltip.stories.tsx +606 -15
- package/src/components/tooltip/TooltipWrapper.stories.tsx +348 -12
- package/src/docs/Contributing.mdx +241 -0
- package/src/docs/UsingComponents.mdx +93 -0
- package/src/docs/Welcome.mdx +68 -0
- package/src/global.scss +7 -0
- package/src/utils/PopupParentContext.stories.tsx +367 -0
- package/src/utils/getDefaultPopupParent.ts +6 -0
- package/.ralph/storybook-upgrade/knowledge.md +0 -308
- package/.ralph/storybook-upgrade/prd.json +0 -777
- package/.ralph/storybook-upgrade/progress.md +0 -342
- package/src/components/table/TableWIP.mdx +0 -3
|
@@ -1,71 +1,509 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Controls, Heading as DocHeading, Markdown, Primary as DocPrimary, Stories, Subtitle, Title, } from '@storybook/addon-docs/blocks';
|
|
3
|
+
import { fn } from 'storybook/test';
|
|
3
4
|
import { Row } from '../row/Row';
|
|
5
|
+
import { Section } from './Section';
|
|
6
|
+
// ---------------------------------------------------------------------------
|
|
7
|
+
// Content strings for the custom DocsPage
|
|
8
|
+
// ---------------------------------------------------------------------------
|
|
9
|
+
const DESCRIPTION_INTRO = [
|
|
10
|
+
'`Section` is a structural layout component that wraps a labelled content region.',
|
|
11
|
+
'It renders a semantic `<section>` element with an optional title heading, an optional action button,',
|
|
12
|
+
'and optional collapse/expand behaviour.',
|
|
13
|
+
'Sections can be nested to create hierarchical content structures — nested sections automatically',
|
|
14
|
+
'lose their horizontal padding to maintain visual rhythm.',
|
|
15
|
+
].join(' ');
|
|
16
|
+
const PROPS_INTRO = 'The preview below is wired to the **Controls** panel — tweak any prop to see the story update in real time.';
|
|
17
|
+
const USAGE_GUIDANCE = [
|
|
18
|
+
'### When to use',
|
|
19
|
+
'',
|
|
20
|
+
'- Grouping related content within a page or panel under a descriptive heading (e.g. "Personal Details", "Contact Information").',
|
|
21
|
+
'- Providing a collapsible region where space is at a premium and the content can reasonably be hidden by default.',
|
|
22
|
+
'- Pairing with an action button in the heading to give quick access to a related action (e.g. "Edit", "Add").',
|
|
23
|
+
'- Nesting sections to model a parent/child hierarchy — e.g. a "Student Profile" section containing "Personal Details" and "Academic" sub-sections.',
|
|
24
|
+
'',
|
|
25
|
+
'---',
|
|
26
|
+
'',
|
|
27
|
+
'### When NOT to use',
|
|
28
|
+
'',
|
|
29
|
+
'| Situation | Use instead |',
|
|
30
|
+
'|---|---|',
|
|
31
|
+
'| Full-page layout regions | Native `<main>`, `<aside>`, or `<article>` elements |',
|
|
32
|
+
'| Overlay or modal content | [`Modal`](?path=/docs/components-modals-modal--docs) or [`Slideover`](?path=/docs/components-slideover--docs) |',
|
|
33
|
+
'| Tabbed content panels | A tab component with panel regions |',
|
|
34
|
+
'| Purely decorative grouping with no heading | A plain `<div>` — `Section` always renders a heading element |',
|
|
35
|
+
].join('\n');
|
|
36
|
+
const DEVELOPER_NOTES = [
|
|
37
|
+
'### `collapsed` is initial state only',
|
|
38
|
+
'',
|
|
39
|
+
'The `collapsed` prop sets the **initial** collapsed state — the component becomes self-managed (uncontrolled) after mount.',
|
|
40
|
+
'`Section` owns the expanded/collapsed state internally via `useState(initialCollapsed)`.',
|
|
41
|
+
'You cannot control the expanded state from outside after the component has mounted.',
|
|
42
|
+
'If you need fully controlled behaviour, you will need a custom implementation.',
|
|
43
|
+
'',
|
|
44
|
+
'---',
|
|
45
|
+
'',
|
|
46
|
+
'### `headingLevel` defaults to `1` — use with care',
|
|
47
|
+
'',
|
|
48
|
+
'`headingLevel` defaults to `1`, which renders an `<h1>`. Most pages should have only one `<h1>`.',
|
|
49
|
+
'Always set an explicit `headingLevel` appropriate to the heading hierarchy of the page.',
|
|
50
|
+
'Use `2` for top-level sections on a page that already has an `<h1>`, and `3` or `4` for nested sub-sections.',
|
|
51
|
+
'',
|
|
52
|
+
'---',
|
|
53
|
+
'',
|
|
54
|
+
'### Button props must all be provided together',
|
|
55
|
+
'',
|
|
56
|
+
'The action button only renders when `buttonText` is provided.',
|
|
57
|
+
'When adding a button, always supply all four props together: `buttonText`, `buttonOnClick`, `buttonVariant`, and `buttonSize`.',
|
|
58
|
+
'If any are omitted, the `Button` component falls back to its own defaults, which may produce unexpected visual results.',
|
|
59
|
+
'',
|
|
60
|
+
'---',
|
|
61
|
+
'',
|
|
62
|
+
'### Accessibility',
|
|
63
|
+
'',
|
|
64
|
+
'- The `<section>` renders with a hardcoded `aria-label="section"` to give it an implicit `role="region"`. This label is not configurable.',
|
|
65
|
+
'- When `collapsible` is `true`, a `<button>` with `aria-expanded` is rendered in the heading — this is the accessible toggle.',
|
|
66
|
+
'- The heading element gains `tabIndex={0}` and responds to **Enter** and **Space** when collapsible.',
|
|
67
|
+
'- Title icons should always include `titleIconScreenReaderText` unless they are purely decorative and the title fully describes the section.',
|
|
68
|
+
'',
|
|
69
|
+
'---',
|
|
70
|
+
'',
|
|
71
|
+
'### TypeScript types',
|
|
72
|
+
'',
|
|
73
|
+
'```ts',
|
|
74
|
+
"import { Section } from '@arbor-education/design-system.components';",
|
|
75
|
+
'',
|
|
76
|
+
'type SectionProps = Section.Props;',
|
|
77
|
+
'```',
|
|
78
|
+
].join('\n');
|
|
79
|
+
const RELATED_COMPONENTS = [
|
|
80
|
+
'## Related components',
|
|
81
|
+
'',
|
|
82
|
+
'[Row](?path=/docs/components-row--docs) · [Card](?path=/docs/components-card--docs) · [Heading](?path=/docs/components-heading--docs)',
|
|
83
|
+
].join('\n');
|
|
84
|
+
// ---------------------------------------------------------------------------
|
|
85
|
+
// Custom DocsPage
|
|
86
|
+
// ---------------------------------------------------------------------------
|
|
87
|
+
function SectionDocsPage() {
|
|
88
|
+
return (_jsxs(_Fragment, { children: [_jsx(Title, {}), _jsx(Subtitle, {}), _jsx(Markdown, { children: DESCRIPTION_INTRO }), _jsx(DocHeading, { children: "Interactive example" }), _jsx(Markdown, { children: PROPS_INTRO }), _jsx(DocPrimary, {}), _jsx(Controls, {}), _jsx(DocHeading, { children: "Usage guidance" }), _jsx(Markdown, { children: USAGE_GUIDANCE }), _jsx(DocHeading, { children: "Developer notes" }), _jsx(Markdown, { children: DEVELOPER_NOTES }), _jsx(DocHeading, { children: "Examples" }), _jsx(Stories, { title: "" }), _jsx(Markdown, { children: RELATED_COMPONENTS })] }));
|
|
89
|
+
}
|
|
90
|
+
// ---------------------------------------------------------------------------
|
|
91
|
+
// Meta
|
|
92
|
+
// ---------------------------------------------------------------------------
|
|
4
93
|
const meta = {
|
|
5
94
|
title: 'Components/Section',
|
|
6
95
|
component: Section,
|
|
7
|
-
|
|
8
|
-
|
|
96
|
+
tags: ['autodocs'],
|
|
97
|
+
parameters: {
|
|
98
|
+
layout: 'padded',
|
|
99
|
+
docs: {
|
|
100
|
+
page: SectionDocsPage,
|
|
101
|
+
},
|
|
9
102
|
},
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
103
|
+
argTypes: {
|
|
104
|
+
title: {
|
|
105
|
+
description: 'Heading text rendered at the top of the section.',
|
|
106
|
+
control: 'text',
|
|
107
|
+
table: {
|
|
108
|
+
type: { summary: 'string' },
|
|
109
|
+
defaultValue: { summary: 'undefined' },
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
headingLevel: {
|
|
113
|
+
description: [
|
|
114
|
+
'The HTML heading level rendered for the section title.',
|
|
115
|
+
'Defaults to `1` (an `<h1>`) — always set this explicitly to match the page heading hierarchy.',
|
|
116
|
+
'Use `2` for top-level sections, `3` or `4` for nested sub-sections.',
|
|
117
|
+
].join(' '),
|
|
118
|
+
control: 'select',
|
|
119
|
+
options: [1, 2, 3, 4],
|
|
120
|
+
table: {
|
|
121
|
+
type: { summary: '1 | 2 | 3 | 4' },
|
|
122
|
+
defaultValue: { summary: '1' },
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
titleIconName: {
|
|
126
|
+
description: [
|
|
127
|
+
'Icon rendered immediately after the title text.',
|
|
128
|
+
'Pass `titleIconScreenReaderText` if the icon carries semantic meaning.',
|
|
129
|
+
].join(' '),
|
|
130
|
+
control: 'text',
|
|
131
|
+
table: {
|
|
132
|
+
type: { summary: 'IconName' },
|
|
133
|
+
defaultValue: { summary: 'undefined' },
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
titleIconColor: {
|
|
137
|
+
description: 'CSS colour value applied to the title icon (e.g. `var(--color-brand-600)` or a hex string).',
|
|
138
|
+
control: 'color',
|
|
139
|
+
table: {
|
|
140
|
+
type: { summary: 'string' },
|
|
141
|
+
defaultValue: { summary: 'undefined' },
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
titleIconScreenReaderText: {
|
|
145
|
+
description: [
|
|
146
|
+
'Accessible label for the title icon.',
|
|
147
|
+
'Omit only when the icon is purely decorative and the title already conveys full meaning.',
|
|
148
|
+
].join(' '),
|
|
149
|
+
control: 'text',
|
|
150
|
+
table: {
|
|
151
|
+
type: { summary: 'string' },
|
|
152
|
+
defaultValue: { summary: 'undefined' },
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
collapsible: {
|
|
156
|
+
description: [
|
|
157
|
+
'When `true`, the section heading becomes a toggle.',
|
|
158
|
+
'A chevron button with `aria-expanded` is rendered and the section contents can be shown or hidden.',
|
|
159
|
+
'Keyboard users can toggle with **Enter** or **Space**.',
|
|
160
|
+
].join(' '),
|
|
161
|
+
control: 'boolean',
|
|
162
|
+
table: {
|
|
163
|
+
type: { summary: 'boolean' },
|
|
164
|
+
defaultValue: { summary: 'false' },
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
collapsed: {
|
|
168
|
+
description: [
|
|
169
|
+
'**Initial** collapsed state when `collapsible` is `true`.',
|
|
170
|
+
'This prop sets the state at mount — the component is uncontrolled after that.',
|
|
171
|
+
'Changing this prop after mount has no effect.',
|
|
172
|
+
].join(' '),
|
|
173
|
+
control: 'boolean',
|
|
174
|
+
table: {
|
|
175
|
+
type: { summary: 'boolean' },
|
|
176
|
+
defaultValue: { summary: 'false' },
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
buttonText: {
|
|
180
|
+
description: [
|
|
181
|
+
'Label for the action button rendered in the section heading.',
|
|
182
|
+
'Must be paired with `buttonOnClick`, `buttonVariant`, and `buttonSize`.',
|
|
183
|
+
].join(' '),
|
|
184
|
+
control: 'text',
|
|
185
|
+
table: {
|
|
186
|
+
type: { summary: 'string' },
|
|
187
|
+
defaultValue: { summary: 'undefined' },
|
|
188
|
+
},
|
|
189
|
+
},
|
|
190
|
+
buttonOnClick: {
|
|
191
|
+
description: 'Click handler for the heading action button.',
|
|
192
|
+
action: 'buttonOnClick',
|
|
193
|
+
control: false,
|
|
194
|
+
table: {
|
|
195
|
+
type: { summary: 'MouseEventHandler<HTMLButtonElement>' },
|
|
196
|
+
defaultValue: { summary: 'undefined' },
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
buttonVariant: {
|
|
200
|
+
description: 'Visual variant for the heading action button. Always supply when `buttonText` is set.',
|
|
201
|
+
control: 'select',
|
|
202
|
+
options: ['primary', 'secondary', 'tertiary', 'primary-destructive', 'secondary-destructive', 'tertiary-destructive', 'ghost'],
|
|
203
|
+
table: {
|
|
204
|
+
type: { summary: "'primary' | 'secondary' | 'tertiary' | 'primary-destructive' | 'secondary-destructive' | 'tertiary-destructive' | 'ghost'" },
|
|
205
|
+
defaultValue: { summary: 'undefined' },
|
|
206
|
+
},
|
|
207
|
+
},
|
|
208
|
+
buttonSize: {
|
|
209
|
+
description: "Size of the heading action button. Always supply when `buttonText` is set. Use `'S'` to keep it visually lightweight alongside the title.",
|
|
210
|
+
control: 'select',
|
|
211
|
+
options: ['S', 'M', 'L'],
|
|
212
|
+
table: {
|
|
213
|
+
type: { summary: "'S' | 'M' | 'L'" },
|
|
214
|
+
defaultValue: { summary: 'undefined' },
|
|
215
|
+
},
|
|
216
|
+
},
|
|
217
|
+
className: {
|
|
218
|
+
description: 'Additional CSS class names applied to the root `<section>` element.',
|
|
219
|
+
control: 'text',
|
|
220
|
+
table: {
|
|
221
|
+
type: { summary: 'string' },
|
|
222
|
+
defaultValue: { summary: 'undefined' },
|
|
223
|
+
},
|
|
224
|
+
},
|
|
225
|
+
children: {
|
|
226
|
+
description: [
|
|
227
|
+
'Content rendered inside the section body.',
|
|
228
|
+
'Typically `Row` components, nested `Section` components, or any React node.',
|
|
229
|
+
].join(' '),
|
|
230
|
+
control: false,
|
|
231
|
+
table: {
|
|
232
|
+
type: { summary: 'ReactNode' },
|
|
233
|
+
defaultValue: { summary: 'undefined' },
|
|
234
|
+
},
|
|
235
|
+
},
|
|
15
236
|
},
|
|
16
237
|
};
|
|
17
|
-
export
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
238
|
+
export default meta;
|
|
239
|
+
// ---------------------------------------------------------------------------
|
|
240
|
+
// Helper
|
|
241
|
+
// ---------------------------------------------------------------------------
|
|
242
|
+
const withDescription = (story, description) => ({
|
|
243
|
+
...story,
|
|
244
|
+
parameters: {
|
|
245
|
+
...story.parameters,
|
|
246
|
+
docs: { ...story.parameters?.docs, description: { story: description } },
|
|
25
247
|
},
|
|
26
|
-
};
|
|
27
|
-
|
|
248
|
+
});
|
|
249
|
+
// ---------------------------------------------------------------------------
|
|
250
|
+
// Stories
|
|
251
|
+
// ---------------------------------------------------------------------------
|
|
252
|
+
export const Default = withDescription({
|
|
28
253
|
args: {
|
|
29
254
|
title: 'Student Details',
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
_jsx(Row, { label: "Last Name", value: "Black" }, 2),
|
|
33
|
-
_jsx(Row, { label: "Year Group", value: "Year 10", note: "2024/2025" }, 3),
|
|
34
|
-
_jsx(Row, { label: "Form Group", value: "10A" }, 4),
|
|
35
|
-
],
|
|
255
|
+
headingLevel: 2,
|
|
256
|
+
children: (_jsxs("p", { children: ["Section content goes here. Add", _jsx("code", { children: "Row" }), ' ', "components, nested", _jsx("code", { children: "Section" }), ' ', "components, or any content relevant to the section topic."] })),
|
|
36
257
|
},
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
258
|
+
render: args => _jsx(Section, { ...args }),
|
|
259
|
+
}, 'The default story is wired to the Controls panel. Toggle `collapsible` to add expand/collapse behaviour, or add `buttonText` (with the three companion props) to surface an action in the heading.');
|
|
260
|
+
export const WithHeadingLevel = withDescription({
|
|
261
|
+
parameters: {
|
|
262
|
+
controls: { disable: true },
|
|
263
|
+
docs: {
|
|
264
|
+
source: {
|
|
265
|
+
language: 'tsx',
|
|
266
|
+
code: `
|
|
267
|
+
import { Section } from '@arbor-education/design-system.components';
|
|
268
|
+
|
|
269
|
+
function SectionHierarchyExample() {
|
|
270
|
+
return (
|
|
271
|
+
<Section title="Student Profile" headingLevel={2}>
|
|
272
|
+
<p>Top-level section — headingLevel 2.</p>
|
|
273
|
+
<Section title="Personal Details" headingLevel={3}>
|
|
274
|
+
<p>Sub-section — headingLevel 3.</p>
|
|
275
|
+
<Section title="Emergency Contacts" headingLevel={4}>
|
|
276
|
+
<p>Deeper sub-section — headingLevel 4.</p>
|
|
277
|
+
</Section>
|
|
278
|
+
</Section>
|
|
279
|
+
</Section>
|
|
280
|
+
);
|
|
281
|
+
}
|
|
282
|
+
export default SectionHierarchyExample;
|
|
283
|
+
`.trim(),
|
|
284
|
+
},
|
|
285
|
+
},
|
|
47
286
|
},
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
287
|
+
render: () => (_jsxs(Section, { title: "Student Profile", headingLevel: 2, children: [_jsxs("p", { children: ["Top-level section \u2014", _jsxs("code", { children: ["headingLevel=", 2] }), "."] }), _jsxs(Section, { title: "Personal Details", headingLevel: 3, children: [_jsxs("p", { children: ["Sub-section \u2014", _jsxs("code", { children: ["headingLevel=", 3] }), "."] }), _jsx(Section, { title: "Emergency Contacts", headingLevel: 4, children: _jsxs("p", { children: ["Deeper sub-section \u2014", _jsxs("code", { children: ["headingLevel=", 4] }), "."] }) })] })] })),
|
|
288
|
+
}, 'Set `headingLevel` to match the correct position in the page heading hierarchy. The default is `1` — always override it to avoid multiple `<h1>` elements on the page.');
|
|
289
|
+
export const WithTitleIcon = withDescription({
|
|
290
|
+
parameters: {
|
|
291
|
+
controls: { disable: true },
|
|
292
|
+
docs: {
|
|
293
|
+
source: {
|
|
294
|
+
language: 'tsx',
|
|
295
|
+
code: `
|
|
296
|
+
import { Section } from '@arbor-education/design-system.components';
|
|
297
|
+
|
|
298
|
+
function SENSectionWithIcon() {
|
|
299
|
+
return (
|
|
300
|
+
<Section
|
|
301
|
+
title="SEN Information"
|
|
302
|
+
headingLevel={2}
|
|
303
|
+
titleIconName="circle-alert"
|
|
304
|
+
titleIconColor="var(--color-semantic-warning-600)"
|
|
305
|
+
titleIconScreenReaderText="Special educational needs flag"
|
|
306
|
+
>
|
|
307
|
+
<p>Section content here.</p>
|
|
308
|
+
</Section>
|
|
309
|
+
);
|
|
310
|
+
}
|
|
311
|
+
export default SENSectionWithIcon;
|
|
312
|
+
`.trim(),
|
|
313
|
+
},
|
|
314
|
+
},
|
|
58
315
|
},
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
316
|
+
render: () => (_jsx(Section, { title: "SEN Information", headingLevel: 2, titleIconName: "circle-alert", titleIconColor: "var(--color-semantic-warning-600)", titleIconScreenReaderText: "Special educational needs flag", children: _jsxs("p", { children: ["An icon after the title provides an at-a-glance visual cue. Pass", _jsx("code", { children: "titleIconScreenReaderText" }), ' ', "so the icon is announced to screen readers."] }) })),
|
|
317
|
+
}, 'Add `titleIconName` to render an icon after the section title. Pair it with `titleIconColor` for semantic colour and `titleIconScreenReaderText` for accessibility.');
|
|
318
|
+
export const WithActionButton = withDescription({
|
|
319
|
+
parameters: {
|
|
320
|
+
controls: { disable: true },
|
|
321
|
+
docs: {
|
|
322
|
+
source: {
|
|
323
|
+
language: 'tsx',
|
|
324
|
+
code: `
|
|
325
|
+
import { Section } from '@arbor-education/design-system.components';
|
|
326
|
+
|
|
327
|
+
function PersonalDetailsSection() {
|
|
328
|
+
return (
|
|
329
|
+
<Section
|
|
330
|
+
title="Personal Details"
|
|
331
|
+
headingLevel={2}
|
|
332
|
+
buttonText="Edit"
|
|
333
|
+
buttonOnClick={() => openEditModal()}
|
|
334
|
+
buttonVariant="secondary"
|
|
335
|
+
buttonSize="S"
|
|
336
|
+
>
|
|
337
|
+
<p>Section content here.</p>
|
|
338
|
+
</Section>
|
|
339
|
+
);
|
|
340
|
+
}
|
|
341
|
+
export default PersonalDetailsSection;
|
|
342
|
+
`.trim(),
|
|
343
|
+
},
|
|
344
|
+
},
|
|
68
345
|
},
|
|
69
|
-
}
|
|
70
|
-
|
|
346
|
+
render: () => (_jsx(Section, { title: "Personal Details", headingLevel: 2, buttonText: "Edit", buttonOnClick: fn(), buttonVariant: "secondary", buttonSize: "S", children: _jsxs("p", { children: ["The action button appears in the heading row. Always provide all four button props together:", _jsx("code", { children: "buttonText" }), ",", _jsx("code", { children: "buttonOnClick" }), ",", _jsx("code", { children: "buttonVariant" }), ", and", _jsx("code", { children: "buttonSize" }), "."] }) })),
|
|
347
|
+
}, 'Provide all four button props together to render an action button in the section heading. Use `buttonSize="S"` to keep it visually lightweight alongside the title.');
|
|
348
|
+
export const Collapsible = withDescription({
|
|
349
|
+
parameters: {
|
|
350
|
+
controls: { disable: true },
|
|
351
|
+
docs: {
|
|
352
|
+
source: {
|
|
353
|
+
language: 'tsx',
|
|
354
|
+
code: `
|
|
355
|
+
import { Section } from '@arbor-education/design-system.components';
|
|
356
|
+
|
|
357
|
+
function CollapsibleSection() {
|
|
358
|
+
return (
|
|
359
|
+
<Section
|
|
360
|
+
title="Additional Notes"
|
|
361
|
+
headingLevel={2}
|
|
362
|
+
collapsible
|
|
363
|
+
>
|
|
364
|
+
<p>This section starts expanded. Click the heading or the chevron to collapse it.</p>
|
|
365
|
+
</Section>
|
|
366
|
+
);
|
|
367
|
+
}
|
|
368
|
+
export default CollapsibleSection;
|
|
369
|
+
`.trim(),
|
|
370
|
+
},
|
|
371
|
+
},
|
|
372
|
+
},
|
|
373
|
+
render: () => (_jsx(Section, { title: "Additional Notes", headingLevel: 2, collapsible: true, children: _jsxs("p", { children: ["This section starts", _jsx("strong", { children: "expanded" }), ". Click the heading or the chevron to collapse it. The state is managed internally \u2014 no external state management is required."] }) })),
|
|
374
|
+
}, 'Set `collapsible` to add expand/collapse behaviour. The section starts expanded by default. Click the heading or the chevron icon to toggle — keyboard users can press **Enter** or **Space**.');
|
|
375
|
+
export const CollapsibleInitiallyCollapsed = withDescription({
|
|
376
|
+
parameters: {
|
|
377
|
+
controls: { disable: true },
|
|
378
|
+
docs: {
|
|
379
|
+
source: {
|
|
380
|
+
language: 'tsx',
|
|
381
|
+
code: `
|
|
382
|
+
import { Section } from '@arbor-education/design-system.components';
|
|
383
|
+
|
|
384
|
+
function CollapsedByDefaultSection() {
|
|
385
|
+
return (
|
|
386
|
+
<Section
|
|
387
|
+
title="Medical Information"
|
|
388
|
+
headingLevel={2}
|
|
389
|
+
collapsible
|
|
390
|
+
collapsed
|
|
391
|
+
>
|
|
392
|
+
<p>Sensitive content that is hidden by default.</p>
|
|
393
|
+
</Section>
|
|
394
|
+
);
|
|
395
|
+
}
|
|
396
|
+
export default CollapsedByDefaultSection;
|
|
397
|
+
`.trim(),
|
|
398
|
+
},
|
|
399
|
+
},
|
|
400
|
+
},
|
|
401
|
+
render: () => (_jsx(Section, { title: "Medical Information", headingLevel: 2, collapsible: true, collapsed: true, children: _jsxs("p", { children: ["This content was hidden when the section mounted. The", _jsx("code", { children: "collapsed" }), ' ', "prop only sets the initial state \u2014 the section is self-managed after that."] }) })),
|
|
402
|
+
}, 'Pass `collapsed` alongside `collapsible` to start in the collapsed state. The `collapsed` prop is **initial state only** — the component owns the toggle state after mount and changing the prop later has no effect.');
|
|
403
|
+
export const CollapsibleWithActionButton = withDescription({
|
|
404
|
+
parameters: {
|
|
405
|
+
controls: { disable: true },
|
|
406
|
+
docs: {
|
|
407
|
+
source: {
|
|
408
|
+
language: 'tsx',
|
|
409
|
+
code: `
|
|
410
|
+
import { Section } from '@arbor-education/design-system.components';
|
|
411
|
+
|
|
412
|
+
function ContactSection() {
|
|
413
|
+
return (
|
|
414
|
+
<Section
|
|
415
|
+
title="Contact Information"
|
|
416
|
+
headingLevel={2}
|
|
417
|
+
collapsible
|
|
418
|
+
buttonText="Add contact"
|
|
419
|
+
buttonOnClick={() => openAddContactModal()}
|
|
420
|
+
buttonVariant="secondary"
|
|
421
|
+
buttonSize="S"
|
|
422
|
+
>
|
|
423
|
+
<p>Contact details here.</p>
|
|
424
|
+
</Section>
|
|
425
|
+
);
|
|
426
|
+
}
|
|
427
|
+
export default ContactSection;
|
|
428
|
+
`.trim(),
|
|
429
|
+
},
|
|
430
|
+
},
|
|
431
|
+
},
|
|
432
|
+
render: () => (_jsx(Section, { title: "Contact Information", headingLevel: 2, collapsible: true, buttonText: "Add contact", buttonOnClick: fn(), buttonVariant: "secondary", buttonSize: "S", children: _jsxs("p", { children: ["A section can be both collapsible", _jsx("em", { children: "and" }), ' ', "have an action button. The chevron and the button both appear in the heading row."] }) })),
|
|
433
|
+
}, 'A section can combine `collapsible` with an action button. Both the chevron toggle and the action button appear in the heading row — useful when the content can be hidden but the action remains permanently accessible.');
|
|
434
|
+
export const WithRows = withDescription({
|
|
435
|
+
parameters: {
|
|
436
|
+
controls: { disable: true },
|
|
437
|
+
docs: {
|
|
438
|
+
source: {
|
|
439
|
+
language: 'tsx',
|
|
440
|
+
code: `
|
|
441
|
+
import { Section, Row } from '@arbor-education/design-system.components';
|
|
442
|
+
|
|
443
|
+
function PupilDetailSection() {
|
|
444
|
+
return (
|
|
445
|
+
<Section
|
|
446
|
+
title="Personal Details"
|
|
447
|
+
headingLevel={2}
|
|
448
|
+
buttonText="Edit"
|
|
449
|
+
buttonOnClick={() => openEditModal()}
|
|
450
|
+
buttonVariant="secondary"
|
|
451
|
+
buttonSize="S"
|
|
452
|
+
>
|
|
453
|
+
<Row label="Full name" value="Amara Osei-Bonsu" />
|
|
454
|
+
<Row label="Date of birth" value="14 March 2009" note="Age 16" />
|
|
455
|
+
<Row label="Year group" value="Year 10" />
|
|
456
|
+
<Row label="Form" value="10JH" />
|
|
457
|
+
<Row label="UPN" value="A823456789012" />
|
|
458
|
+
</Section>
|
|
459
|
+
);
|
|
460
|
+
}
|
|
461
|
+
export default PupilDetailSection;
|
|
462
|
+
`.trim(),
|
|
463
|
+
},
|
|
464
|
+
},
|
|
465
|
+
},
|
|
466
|
+
render: () => (_jsxs(Section, { title: "Personal Details", headingLevel: 2, buttonText: "Edit", buttonOnClick: fn(), buttonVariant: "secondary", buttonSize: "S", children: [_jsx(Row, { label: "Full name", value: "Amara Osei-Bonsu" }), _jsx(Row, { label: "Date of birth", value: "14 March 2009", note: "Age 16" }), _jsx(Row, { label: "Year group", value: "Year 10" }), _jsx(Row, { label: "Form", value: "10JH" }), _jsx(Row, { label: "UPN", value: "A823456789012" })] })),
|
|
467
|
+
}, 'The most common real-world usage — `Row` components inside a `Section`. Static and clickable rows can be freely mixed. The section heading can carry an action button for record-level operations like "Edit".');
|
|
468
|
+
export const NestedCollapsibleSections = withDescription({
|
|
469
|
+
parameters: {
|
|
470
|
+
controls: { disable: true },
|
|
471
|
+
docs: {
|
|
472
|
+
source: {
|
|
473
|
+
language: 'tsx',
|
|
474
|
+
code: `
|
|
475
|
+
import { Section, Row } from '@arbor-education/design-system.components';
|
|
476
|
+
|
|
477
|
+
function PupilProfilePanel() {
|
|
478
|
+
return (
|
|
479
|
+
<Section title="Student Profile" headingLevel={2} collapsible>
|
|
480
|
+
<Section title="Personal Details" headingLevel={3} collapsible>
|
|
481
|
+
<Row label="Full name" value="Amara Osei-Bonsu" />
|
|
482
|
+
<Row label="Date of birth" value="14 March 2009" note="Age 16" />
|
|
483
|
+
<Row label="Admission number" value="001847" />
|
|
484
|
+
</Section>
|
|
485
|
+
<Section title="Academic" headingLevel={3} collapsible>
|
|
486
|
+
<Row label="Year group" value="Year 10" />
|
|
487
|
+
<Row label="Form" value="10JH" />
|
|
488
|
+
<Row
|
|
489
|
+
label="Attendance (YTD)"
|
|
490
|
+
value="88.3%"
|
|
491
|
+
note="Below 90% threshold"
|
|
492
|
+
onClick={() => navigateToAttendance()}
|
|
493
|
+
/>
|
|
494
|
+
</Section>
|
|
495
|
+
<Section title="Contact Information" headingLevel={3} collapsible collapsed>
|
|
496
|
+
<Row label="Email" value="guardian@example.com" note="Primary contact" />
|
|
497
|
+
<Row label="Phone" value="07700 900123" />
|
|
498
|
+
</Section>
|
|
499
|
+
</Section>
|
|
500
|
+
);
|
|
501
|
+
}
|
|
502
|
+
export default PupilProfilePanel;
|
|
503
|
+
`.trim(),
|
|
504
|
+
},
|
|
505
|
+
},
|
|
506
|
+
},
|
|
507
|
+
render: () => (_jsxs(Section, { title: "Student Profile", headingLevel: 2, collapsible: true, children: [_jsxs(Section, { title: "Personal Details", headingLevel: 3, collapsible: true, children: [_jsx(Row, { label: "Full name", value: "Amara Osei-Bonsu" }), _jsx(Row, { label: "Date of birth", value: "14 March 2009", note: "Age 16" }), _jsx(Row, { label: "Admission number", value: "001847" })] }), _jsxs(Section, { title: "Academic", headingLevel: 3, collapsible: true, children: [_jsx(Row, { label: "Year group", value: "Year 10" }), _jsx(Row, { label: "Form", value: "10JH" }), _jsx(Row, { label: "Attendance (YTD)", value: "88.3%", note: "Below 90% threshold", onClick: fn() })] }), _jsxs(Section, { title: "Contact Information", headingLevel: 3, collapsible: true, collapsed: true, children: [_jsx(Row, { label: "Email", value: "guardian@example.com", note: "Primary contact" }), _jsx(Row, { label: "Phone", value: "07700 900123" })] })] })),
|
|
508
|
+
}, 'Nested sections are a common pattern for hierarchical detail panels. Nested sections automatically lose their horizontal padding to maintain visual rhythm. Each section manages its own collapsed state independently.');
|
|
71
509
|
//# sourceMappingURL=Section.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Section.stories.js","sourceRoot":"","sources":["../../../src/components/section/Section.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AAEzC,MAAM,IAAI,GAAyB;IACjC,KAAK,EAAE,oBAAoB;IAC3B,SAAS,EAAE,OAAO;IAClB,OAAO,EAAE;QACP,WAAW,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE;KAC/B;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,IAAI,EAAE;QACJ,KAAK,EAAE,YAAY;QACnB,QAAQ,EAAE,CAAC,mbAAQ,CAAC,CAA6Z,CAAC;KACnb;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,IAAI,EAAE;QACJ,KAAK,EAAE,gBAAgB;QACvB,WAAW,EAAE,IAAI;QACjB,QAAQ,EAAE;YACR,KAAC,OAAO,IAAS,KAAK,EAAC,eAAe,EAAC,WAAW,kBAChD,kbAA8Z,IADlZ,CAAC,CAEL;YACV,KAAC,OAAO,IAAS,KAAK,EAAC,eAAe,EAAC,WAAW,kBAChD,kbAA8Z,IADlZ,CAAC,CAEL;SACX;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,IAAI,EAAE;QACJ,KAAK,EAAE,iBAAiB;QACxB,QAAQ,EAAE;YACR,KAAC,GAAG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AAI,CAAC"}
|
|
1
|
+
{"version":3,"file":"Section.stories.js","sourceRoot":"","sources":["../../../src/components/section/Section.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EACL,QAAQ,EACR,OAAO,IAAI,UAAU,EACrB,QAAQ,EACR,OAAO,IAAI,UAAU,EACrB,OAAO,EACP,QAAQ,EACR,KAAK,GACN,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAEpC,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,8EAA8E;AAC9E,0CAA0C;AAC1C,8EAA8E;AAE9E,MAAM,iBAAiB,GAAG;IACxB,kFAAkF;IAClF,sGAAsG;IACtG,yCAAyC;IACzC,kGAAkG;IAClG,0DAA0D;CAC3D,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEZ,MAAM,WAAW,GACb,6GAA6G,CAAC;AAElH,MAAM,cAAc,GAAG;IACrB,iBAAiB;IACjB,EAAE;IACF,iIAAiI;IACjI,mHAAmH;IACnH,+GAA+G;IAC/G,oJAAoJ;IACpJ,EAAE;IACF,KAAK;IACL,EAAE;IACF,qBAAqB;IACrB,EAAE;IACF,6BAA6B;IAC7B,WAAW;IACX,oFAAoF;IACpF,8IAA8I;IAC9I,gEAAgE;IAChE,+GAA+G;CAChH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb,MAAM,eAAe,GAAG;IACtB,uCAAuC;IACvC,EAAE;IACF,4HAA4H;IAC5H,0FAA0F;IAC1F,qFAAqF;IACrF,gFAAgF;IAChF,EAAE;IACF,KAAK;IACL,EAAE;IACF,oDAAoD;IACpD,EAAE;IACF,kGAAkG;IAClG,yFAAyF;IACzF,8GAA8G;IAC9G,EAAE;IACF,KAAK;IACL,EAAE;IACF,gDAAgD;IAChD,EAAE;IACF,+DAA+D;IAC/D,gIAAgI;IAChI,yHAAyH;I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eAAe,EAAC,KAAK,EAAC,eAAe,EAAC,IAAI,EAAC,QAAQ,GAAG,EACjE,KAAC,GAAG,IAAC,KAAK,EAAC,kBAAkB,EAAC,KAAK,EAAC,QAAQ,GAAG,IACvC,EACV,MAAC,OAAO,IAAC,KAAK,EAAC,UAAU,EAAC,YAAY,EAAE,CAAC,EAAE,WAAW,mBACpD,KAAC,GAAG,IAAC,KAAK,EAAC,YAAY,EAAC,KAAK,EAAC,SAAS,GAAG,EAC1C,KAAC,GAAG,IAAC,KAAK,EAAC,MAAM,EAAC,KAAK,EAAC,MAAM,GAAG,EACjC,KAAC,GAAG,IACF,KAAK,EAAC,kBAAkB,EACxB,KAAK,EAAC,OAAO,EACb,IAAI,EAAC,qBAAqB,EAC1B,OAAO,EAAE,EAAE,EAAE,GACb,IACM,EACV,MAAC,OAAO,IAAC,KAAK,EAAC,qBAAqB,EAAC,YAAY,EAAE,CAAC,EAAE,WAAW,QAAC,SAAS,mBACzE,KAAC,GAAG,IAAC,KAAK,EAAC,OAAO,EAAC,KAAK,EAAC,sBAAsB,EAAC,IAAI,EAAC,iBAAiB,GAAG,EACzE,KAAC,GAAG,IAAC,KAAK,EAAC,OAAO,EAAC,KAAK,EAAC,cAAc,GAAG,IAClC,IACF,CACX;CACF,EACD,yNAAyN,CAC1N,CAAC"}
|
|
@@ -3,9 +3,10 @@ import { SingleUser } from './SingleUser';
|
|
|
3
3
|
declare const meta: Meta<typeof SingleUser>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof SingleUser>;
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithPhoto: Story;
|
|
8
|
+
export declare const AllSizes: Story;
|
|
9
|
+
export declare const InitialsFallback: Story;
|
|
10
|
+
export declare const TwoClassNameProps: Story;
|
|
10
11
|
export declare const LongLabel: Story;
|
|
11
12
|
//# sourceMappingURL=SingleUser.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SingleUser.stories.d.ts","sourceRoot":"","sources":["../../../src/components/singleUser/SingleUser.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"SingleUser.stories.d.ts","sourceRoot":"","sources":["../../../src/components/singleUser/SingleUser.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAW5D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AA0H1C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,UAAU,CA8EjC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,UAAU,CAAC,CAAC;AAkBzC,eAAO,MAAM,OAAO,EAAE,KAUrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAiCvB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAmCtB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAmC9B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAmC/B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KA+BvB,CAAC"}
|