@arbor-education/design-system.components 0.14.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 +27 -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/number/NumberInput.d.ts.map +1 -1
- package/dist/components/formField/inputs/number/NumberInput.js +14 -2
- package/dist/components/formField/inputs/number/NumberInput.js.map +1 -1
- package/dist/components/formField/inputs/number/NumberInput.test.js +21 -0
- package/dist/components/formField/inputs/number/NumberInput.test.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 +7 -1
- package/dist/components/table/Table.d.ts.map +1 -1
- package/dist/components/table/Table.js +12 -5
- package/dist/components/table/Table.js.map +1 -1
- package/dist/components/table/Table.stories.d.ts +3 -0
- package/dist/components/table/Table.stories.d.ts.map +1 -1
- package/dist/components/table/Table.stories.js +445 -3
- package/dist/components/table/Table.stories.js.map +1 -1
- package/dist/components/table/Table.test.js +184 -0
- package/dist/components/table/Table.test.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/cellEditors/NumberCellEditor.d.ts +13 -0
- package/dist/components/table/cellEditors/NumberCellEditor.d.ts.map +1 -0
- package/dist/components/table/cellEditors/NumberCellEditor.js +35 -0
- package/dist/components/table/cellEditors/NumberCellEditor.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 +27 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.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/number/NumberInput.test.tsx +28 -0
- package/src/components/formField/inputs/number/NumberInput.tsx +15 -0
- 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 +504 -3
- package/src/components/table/Table.test.tsx +255 -0
- package/src/components/table/Table.tsx +15 -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/cellEditors/NumberCellEditor.tsx +83 -0
- package/src/components/table/cellEditors/numberCellEditor.scss +11 -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/table.scss +11 -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/index.scss +1 -0
- package/src/index.ts +3 -2
- 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,91 +1,714 @@
|
|
|
1
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 { useState } from 'react';
|
|
2
4
|
import { Avatar } from '../avatar/Avatar';
|
|
5
|
+
import { Button } from '../button/Button';
|
|
3
6
|
import { AvatarGroup } from './AvatarGroup';
|
|
7
|
+
// ---------------------------------------------------------------------------
|
|
8
|
+
// Content strings for the custom DocsPage
|
|
9
|
+
// ---------------------------------------------------------------------------
|
|
10
|
+
const DESCRIPTION_INTRO = [
|
|
11
|
+
'`AvatarGroup` renders a horizontal stack of overlapping Avatar thumbnails with an optional overflow badge,',
|
|
12
|
+
'supporting both a data-driven `items` API and a composable `children` API for maximum flexibility.',
|
|
13
|
+
].join(' ');
|
|
14
|
+
const PROPS_INTRO = 'The preview below is wired to the **Controls** panel — tweak any prop to see the story update in real time.';
|
|
15
|
+
const USAGE_GUIDANCE = [
|
|
16
|
+
'### When to use',
|
|
17
|
+
'',
|
|
18
|
+
'- Showing a compact summary of participants, collaborators, or assignees on a record (e.g. teachers on a timetable slot, guardians linked to a student).',
|
|
19
|
+
'- Representing "who has access" or "who is watching" in a list view where space is limited.',
|
|
20
|
+
'- Surfacing a count of hidden members when there are more people than screen real estate allows.',
|
|
21
|
+
'',
|
|
22
|
+
'---',
|
|
23
|
+
'',
|
|
24
|
+
'### When NOT to use',
|
|
25
|
+
'',
|
|
26
|
+
'| Scenario | Better alternative |',
|
|
27
|
+
'|---|---|',
|
|
28
|
+
'| You need to show full names alongside each avatar | A list of `<Avatar>` components with adjacent labels |',
|
|
29
|
+
'| You need click / interactive behaviour on each avatar | Wrap individual `<Avatar>` components in buttons |',
|
|
30
|
+
'| You only have one person to show | A single `<Avatar>` is cleaner and more semantic |',
|
|
31
|
+
'| The avatars represent non-people entities (subjects, clubs) | An icon list or tag list |',
|
|
32
|
+
].join('\n');
|
|
33
|
+
const DEVELOPER_NOTES = [
|
|
34
|
+
'### Critical usage patterns',
|
|
35
|
+
'',
|
|
36
|
+
'**Always supply `label`**',
|
|
37
|
+
'',
|
|
38
|
+
'Every `AvatarGroup` in production must have an `aria-label` so screen-reader users know what the group represents:',
|
|
39
|
+
'',
|
|
40
|
+
'```tsx',
|
|
41
|
+
'<AvatarGroup label="Form tutors for Year 11" items={tutors} />',
|
|
42
|
+
'```',
|
|
43
|
+
'',
|
|
44
|
+
'**Two mutually exclusive APIs**',
|
|
45
|
+
'',
|
|
46
|
+
'Choose one and stick to it — mixing both on the same component causes a TypeScript error:',
|
|
47
|
+
'',
|
|
48
|
+
'```tsx',
|
|
49
|
+
'// ✅ Items API — pass an array of AvatarGroupItem objects',
|
|
50
|
+
'<AvatarGroup items={staff} label="Staff" />',
|
|
51
|
+
'',
|
|
52
|
+
'// ✅ Children API — compose Avatar elements directly',
|
|
53
|
+
'<AvatarGroup label="Staff">',
|
|
54
|
+
' <Avatar initials="DZ" alt="Dorothy Zbornak" />',
|
|
55
|
+
' <Avatar initials="SP" alt="Sophia Petrillo" />',
|
|
56
|
+
'</AvatarGroup>',
|
|
57
|
+
'```',
|
|
58
|
+
'',
|
|
59
|
+
'**Group `size` wins over individual sizes**',
|
|
60
|
+
'',
|
|
61
|
+
'If you pass `size` to the group, it overrides any `size` set on individual items. This is intentional:',
|
|
62
|
+
'',
|
|
63
|
+
'```tsx',
|
|
64
|
+
'// All avatars will render at large, regardless of individual size props',
|
|
65
|
+
'<AvatarGroup size="large" items={staff} label="Staff" />',
|
|
66
|
+
'```',
|
|
67
|
+
'',
|
|
68
|
+
'**`listOrder="descending"` shows the LAST N items**',
|
|
69
|
+
'',
|
|
70
|
+
'When combined with `showMaxItems`, `ascending` shows the first N items and `descending` shows the last N.',
|
|
71
|
+
'Use `descending` for "most recent contributors" patterns where the latest entries are at the end of the array:',
|
|
72
|
+
'',
|
|
73
|
+
'```tsx',
|
|
74
|
+
'// Shows the 3 most recently active teachers (last 3 in the array)',
|
|
75
|
+
'<AvatarGroup',
|
|
76
|
+
' items={recentTeachers}',
|
|
77
|
+
' showMaxItems={3}',
|
|
78
|
+
' listOrder="descending"',
|
|
79
|
+
' label="Most recently active teachers"',
|
|
80
|
+
'/>',
|
|
81
|
+
'```',
|
|
82
|
+
'',
|
|
83
|
+
'**Custom overflow label**',
|
|
84
|
+
'',
|
|
85
|
+
'Pass a function to `overflowCountLabel` to build a fully descriptive accessible label:',
|
|
86
|
+
'',
|
|
87
|
+
'```tsx',
|
|
88
|
+
'<AvatarGroup',
|
|
89
|
+
' items={students}',
|
|
90
|
+
' showMaxItems={5}',
|
|
91
|
+
' overflowCountLabel={(n) => `${n} more students not shown`}',
|
|
92
|
+
' label="Students in tutor group 7B"',
|
|
93
|
+
'/>',
|
|
94
|
+
'```',
|
|
95
|
+
'',
|
|
96
|
+
'---',
|
|
97
|
+
'',
|
|
98
|
+
'### Accessibility',
|
|
99
|
+
'',
|
|
100
|
+
'- The root element is a `<ul>` — each avatar is a `<li>`. Screen readers receive correct list semantics and item count.',
|
|
101
|
+
'- Supply `label` (maps to `aria-label` on the `<ul>`) so the list has a meaningful name.',
|
|
102
|
+
'- The overflow badge uses `role="status"` and an `aria-label` derived from `overflowCountLabel` (default: `"plus N more"`).',
|
|
103
|
+
'- Set `presentAllUpdatesToScreenReader` when the group updates dynamically — this adds `aria-live="polite"` and `aria-atomic="true"` to the overflow badge so changes are announced.',
|
|
104
|
+
'',
|
|
105
|
+
'---',
|
|
106
|
+
'',
|
|
107
|
+
'### TypeScript types',
|
|
108
|
+
'',
|
|
109
|
+
'```ts',
|
|
110
|
+
"import { AvatarGroup } from '@arbor-education/design-system.components';",
|
|
111
|
+
"import type { AvatarGroupItem, AvatarGroupListOrder } from '@arbor-education/design-system.components';",
|
|
112
|
+
'',
|
|
113
|
+
'type AvatarGroupProps = AvatarGroup.Props;',
|
|
114
|
+
'```',
|
|
115
|
+
].join('\n');
|
|
116
|
+
const AVATAR_GROUP_ITEM_REFERENCE = [
|
|
117
|
+
'`AvatarGroupItem` is the union type accepted by the `items` array. It supports two shapes so you can',
|
|
118
|
+
'pass either raw data objects or pre-rendered `<Avatar>` elements:',
|
|
119
|
+
'',
|
|
120
|
+
'```ts',
|
|
121
|
+
"import type { AvatarGroupItem } from '@arbor-education/design-system.components';",
|
|
122
|
+
'',
|
|
123
|
+
'// Shape 1 — plain AvatarProps object (most common, data-driven):',
|
|
124
|
+
'const item: AvatarGroupItem = { initials: "DZ", alt: "Dorothy Zbornak", size: "medium" };',
|
|
125
|
+
'',
|
|
126
|
+
'// Shape 2 — pre-rendered <Avatar> element:',
|
|
127
|
+
'const item: AvatarGroupItem = <Avatar initials="DZ" alt="Dorothy Zbornak" />;',
|
|
128
|
+
'```',
|
|
129
|
+
'',
|
|
130
|
+
'When using the `items` API, the group normalises both shapes internally so you can freely mix them:',
|
|
131
|
+
'',
|
|
132
|
+
'```tsx',
|
|
133
|
+
'const mixed: AvatarGroupItem[] = [',
|
|
134
|
+
' { initials: "DZ", alt: "Dorothy Zbornak" }, // plain object',
|
|
135
|
+
' <Avatar initials="RN" alt="Rose Nylund" size="large" />, // element',
|
|
136
|
+
'];',
|
|
137
|
+
'',
|
|
138
|
+
'<AvatarGroup items={mixed} label="Mixed item types" />',
|
|
139
|
+
'```',
|
|
140
|
+
'',
|
|
141
|
+
'Use the **items API** when avatar data comes from an API response (plain objects). Use the **children API**',
|
|
142
|
+
'(`<AvatarGroup><Avatar .../></AvatarGroup>`) when you already have `<Avatar>` instances in your render tree.',
|
|
143
|
+
].join('\n');
|
|
144
|
+
const RELATED_COMPONENTS = [
|
|
145
|
+
'## Related components',
|
|
146
|
+
'',
|
|
147
|
+
'[Avatar](?path=/docs/components-avatar--docs) · [Section](?path=/docs/components-section--docs)',
|
|
148
|
+
].join('\n');
|
|
149
|
+
// ---------------------------------------------------------------------------
|
|
150
|
+
// Custom DocsPage
|
|
151
|
+
// ---------------------------------------------------------------------------
|
|
152
|
+
function AvatarGroupDocsPage() {
|
|
153
|
+
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: "AvatarGroupItem reference" }), _jsx(Markdown, { children: AVATAR_GROUP_ITEM_REFERENCE }), _jsx(DocHeading, { children: "Examples" }), _jsx(Stories, { title: "" }), _jsx(Markdown, { children: RELATED_COMPONENTS })] }));
|
|
154
|
+
}
|
|
155
|
+
// ---------------------------------------------------------------------------
|
|
156
|
+
// Meta
|
|
157
|
+
// ---------------------------------------------------------------------------
|
|
4
158
|
const meta = {
|
|
5
159
|
title: 'Components/AvatarGroup',
|
|
6
160
|
component: AvatarGroup,
|
|
7
161
|
tags: ['autodocs'],
|
|
162
|
+
parameters: {
|
|
163
|
+
layout: 'padded',
|
|
164
|
+
docs: { page: AvatarGroupDocsPage },
|
|
165
|
+
},
|
|
166
|
+
argTypes: {
|
|
167
|
+
items: {
|
|
168
|
+
description: [
|
|
169
|
+
'Data-driven API. An array of `AvatarGroupItem` values — each item is either an `AvatarProps`',
|
|
170
|
+
'plain object (`{ initials, alt, src, size, ... }`) or a pre-rendered `<Avatar>` element.',
|
|
171
|
+
'Mutually exclusive with `children`.',
|
|
172
|
+
].join(' '),
|
|
173
|
+
control: false,
|
|
174
|
+
table: {
|
|
175
|
+
type: { summary: 'readonly AvatarGroupItem[]' },
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
children: {
|
|
179
|
+
description: [
|
|
180
|
+
'Composable API. Render `<Avatar>` elements as children.',
|
|
181
|
+
'Fragments are supported — nested Avatars inside `<>...</>` are collected automatically.',
|
|
182
|
+
'Mutually exclusive with `items`.',
|
|
183
|
+
].join(' '),
|
|
184
|
+
control: false,
|
|
185
|
+
table: {
|
|
186
|
+
type: { summary: 'React.ReactNode' },
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
showMaxItems: {
|
|
190
|
+
description: [
|
|
191
|
+
'Maximum number of avatars to render.',
|
|
192
|
+
'Any additional avatars are replaced by the `+N` overflow count badge.',
|
|
193
|
+
'When omitted, all avatars are shown with no badge.',
|
|
194
|
+
].join(' '),
|
|
195
|
+
control: { type: 'number', min: 1, max: 20, step: 1 },
|
|
196
|
+
table: {
|
|
197
|
+
type: { summary: 'number' },
|
|
198
|
+
defaultValue: { summary: 'undefined (show all)' },
|
|
199
|
+
},
|
|
200
|
+
},
|
|
201
|
+
listOrder: {
|
|
202
|
+
description: [
|
|
203
|
+
'`ascending` (default) shows the **first** N items; `descending` shows the **last** N items.',
|
|
204
|
+
'Use `descending` for "most recent contributors" patterns where the latest entries are at the end of the array.',
|
|
205
|
+
].join(' '),
|
|
206
|
+
control: { type: 'radio' },
|
|
207
|
+
options: ['ascending', 'descending'],
|
|
208
|
+
table: {
|
|
209
|
+
type: { summary: "'ascending' | 'descending'" },
|
|
210
|
+
defaultValue: { summary: "'ascending'" },
|
|
211
|
+
},
|
|
212
|
+
},
|
|
213
|
+
label: {
|
|
214
|
+
description: [
|
|
215
|
+
'Sets `aria-label` on the root `<ul>`.',
|
|
216
|
+
'**Required in production** — without it, screen readers announce a generic unnamed list.',
|
|
217
|
+
].join(' '),
|
|
218
|
+
control: 'text',
|
|
219
|
+
table: {
|
|
220
|
+
type: { summary: 'string' },
|
|
221
|
+
defaultValue: { summary: 'undefined' },
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
overflowCountLabel: {
|
|
225
|
+
description: [
|
|
226
|
+
'Accessible label for the `+N` overflow badge.',
|
|
227
|
+
'Pass a static string or a function receiving the overflow count.',
|
|
228
|
+
'Defaults to `"plus N more"` if omitted.',
|
|
229
|
+
].join(' '),
|
|
230
|
+
control: false,
|
|
231
|
+
table: {
|
|
232
|
+
type: { summary: 'string | ((count: number) => string)' },
|
|
233
|
+
defaultValue: { summary: '"plus N more"' },
|
|
234
|
+
},
|
|
235
|
+
},
|
|
236
|
+
presentAllUpdatesToScreenReader: {
|
|
237
|
+
description: [
|
|
238
|
+
'When `true`, adds `aria-live="polite"` and `aria-atomic="true"` to the overflow badge,',
|
|
239
|
+
'so dynamic additions/removals are announced to screen-reader users.',
|
|
240
|
+
'Only enable on lists that update at runtime.',
|
|
241
|
+
].join(' '),
|
|
242
|
+
control: 'boolean',
|
|
243
|
+
table: {
|
|
244
|
+
type: { summary: 'boolean' },
|
|
245
|
+
defaultValue: { summary: 'false' },
|
|
246
|
+
},
|
|
247
|
+
},
|
|
248
|
+
size: {
|
|
249
|
+
description: [
|
|
250
|
+
'Group-level size override.',
|
|
251
|
+
'**This wins over any `size` set on individual Avatar items inside the group**,',
|
|
252
|
+
'ensuring visual consistency across the whole group.',
|
|
253
|
+
].join(' '),
|
|
254
|
+
control: { type: 'select' },
|
|
255
|
+
options: ['small', 'medium', 'large', 'extra-large'],
|
|
256
|
+
table: {
|
|
257
|
+
type: { summary: "'small' | 'medium' | 'large' | 'extra-large'" },
|
|
258
|
+
defaultValue: { summary: 'undefined (each avatar uses its own size)' },
|
|
259
|
+
},
|
|
260
|
+
},
|
|
261
|
+
className: {
|
|
262
|
+
description: 'Additional CSS class names applied to the root `<ul>` element.',
|
|
263
|
+
control: 'text',
|
|
264
|
+
table: {
|
|
265
|
+
type: { summary: 'string' },
|
|
266
|
+
defaultValue: { summary: 'undefined' },
|
|
267
|
+
},
|
|
268
|
+
},
|
|
269
|
+
},
|
|
8
270
|
};
|
|
9
271
|
export default meta;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
272
|
+
// ---------------------------------------------------------------------------
|
|
273
|
+
// Shared fixture data
|
|
274
|
+
// ---------------------------------------------------------------------------
|
|
275
|
+
const STAFF_ITEMS = [
|
|
276
|
+
{ initials: 'DZ', alt: 'Dorothy Zbornak' },
|
|
277
|
+
{ initials: 'RN', alt: 'Rose Nylund' },
|
|
278
|
+
{ initials: 'BD', alt: 'Blanche Devereaux' },
|
|
279
|
+
{ initials: 'SP', alt: 'Sophia Petrillo' },
|
|
280
|
+
{ initials: 'MW', alt: 'Miles Webber' },
|
|
281
|
+
{ initials: 'SZ', alt: 'Stan Zbornak' },
|
|
282
|
+
{ initials: 'CN', alt: 'Charlie Nylund' },
|
|
283
|
+
];
|
|
284
|
+
const STUDENT_ITEMS = [
|
|
285
|
+
{ initials: 'AT', alt: 'Aisha Thompson' },
|
|
286
|
+
{ initials: 'CF', alt: 'Callum Fraser' },
|
|
287
|
+
{ initials: 'FA', alt: 'Fatima Al-Rashid' },
|
|
288
|
+
{ initials: 'OB', alt: 'Oliver Bennett' },
|
|
289
|
+
{ initials: 'PS', alt: 'Priya Sharma' },
|
|
290
|
+
{ initials: 'DM', alt: 'Declan Murphy' },
|
|
291
|
+
{ initials: 'YT', alt: 'Yuki Tanaka' },
|
|
292
|
+
{ initials: 'AO', alt: 'Amara Osei' },
|
|
293
|
+
];
|
|
294
|
+
// ---------------------------------------------------------------------------
|
|
295
|
+
// Helper: attach a per-story description to docs
|
|
296
|
+
// ---------------------------------------------------------------------------
|
|
297
|
+
const withDescription = (story, description) => ({
|
|
298
|
+
...story,
|
|
299
|
+
parameters: {
|
|
300
|
+
...story.parameters,
|
|
301
|
+
docs: { ...story.parameters?.docs, description: { story: description } },
|
|
302
|
+
},
|
|
303
|
+
});
|
|
304
|
+
// ---------------------------------------------------------------------------
|
|
305
|
+
// Template components for stateful stories
|
|
306
|
+
// ---------------------------------------------------------------------------
|
|
307
|
+
const LiveOverflowCounterTemplate = () => {
|
|
308
|
+
const initialItems = [
|
|
309
|
+
{ initials: 'AT', alt: 'Aisha Thompson' },
|
|
310
|
+
{ initials: 'CF', alt: 'Callum Fraser' },
|
|
311
|
+
{ initials: 'FA', alt: 'Fatima Al-Rashid' },
|
|
312
|
+
];
|
|
313
|
+
const extraItems = [
|
|
314
|
+
{ initials: 'OB', alt: 'Oliver Bennett' },
|
|
315
|
+
{ initials: 'PS', alt: 'Priya Sharma' },
|
|
316
|
+
{ initials: 'DM', alt: 'Declan Murphy' },
|
|
317
|
+
{ initials: 'YT', alt: 'Yuki Tanaka' },
|
|
318
|
+
];
|
|
319
|
+
const [items, setItems] = useState(initialItems);
|
|
320
|
+
const addItem = () => {
|
|
321
|
+
const next = extraItems[items.length - initialItems.length];
|
|
322
|
+
if (next)
|
|
323
|
+
setItems(prev => [...prev, next]);
|
|
324
|
+
};
|
|
325
|
+
const removeItem = () => {
|
|
326
|
+
if (items.length > 1)
|
|
327
|
+
setItems(prev => prev.slice(0, -1));
|
|
328
|
+
};
|
|
329
|
+
return (_jsxs("div", { style: {
|
|
330
|
+
display: 'flex',
|
|
331
|
+
flexDirection: 'column',
|
|
332
|
+
gap: 'var(--spacing-large)',
|
|
333
|
+
}, children: [_jsx(AvatarGroup, { items: items, showMaxItems: 3, size: "medium", label: "Active session participants", overflowCountLabel: n => `${n} more participants`, presentAllUpdatesToScreenReader: true }), _jsxs("div", { style: { display: 'flex', gap: 'var(--spacing-medium)' }, children: [_jsx(Button, { variant: "secondary", size: "S", onClick: addItem, disabled: items.length >= initialItems.length + extraItems.length, children: "Add participant" }), _jsx(Button, { variant: "secondary", size: "S", onClick: removeItem, disabled: items.length <= 1, children: "Remove participant" })] }), _jsxs("p", { className: "ds-text", style: { margin: 0, color: 'var(--color-grey-600)' }, children: [items.length, ' ', "participant", items.length !== 1 ? 's' : '', ' ', "total \u2014 overflow badge shows", ' ', Math.max(0, items.length - 3), ' ', "hidden"] })] }));
|
|
27
334
|
};
|
|
28
|
-
|
|
29
|
-
|
|
335
|
+
// ---------------------------------------------------------------------------
|
|
336
|
+
// Stories
|
|
337
|
+
// ---------------------------------------------------------------------------
|
|
338
|
+
export const Default = withDescription({
|
|
339
|
+
args: {
|
|
340
|
+
showMaxItems: 4,
|
|
341
|
+
listOrder: 'ascending',
|
|
342
|
+
label: 'Teaching staff',
|
|
343
|
+
size: 'medium',
|
|
344
|
+
presentAllUpdatesToScreenReader: false,
|
|
345
|
+
},
|
|
346
|
+
render: ({ showMaxItems, listOrder, label, size, presentAllUpdatesToScreenReader, className }) => (_jsx(AvatarGroup, { items: STAFF_ITEMS, showMaxItems: showMaxItems, listOrder: listOrder, label: label, size: size, presentAllUpdatesToScreenReader: presentAllUpdatesToScreenReader, className: className })),
|
|
347
|
+
}, 'A fully interactive example — the `items` array is fixed at 7 staff members so the overflow badge is visible by default. '
|
|
348
|
+
+ 'Use the **Controls** panel below to change `showMaxItems`, `size`, `listOrder`, and other props.');
|
|
349
|
+
export const ItemsApi = withDescription({
|
|
30
350
|
parameters: {
|
|
351
|
+
controls: { disable: true },
|
|
31
352
|
docs: {
|
|
32
|
-
|
|
33
|
-
|
|
353
|
+
source: {
|
|
354
|
+
language: 'tsx',
|
|
355
|
+
code: `
|
|
356
|
+
import { AvatarGroup } from '@arbor-education/design-system.components';
|
|
357
|
+
|
|
358
|
+
const students = [
|
|
359
|
+
{ initials: 'AT', alt: 'Aisha Thompson' },
|
|
360
|
+
{ initials: 'CF', alt: 'Callum Fraser' },
|
|
361
|
+
{ initials: 'FA', alt: 'Fatima Al-Rashid' },
|
|
362
|
+
{ initials: 'OB', alt: 'Oliver Bennett' },
|
|
363
|
+
{ initials: 'PS', alt: 'Priya Sharma' },
|
|
364
|
+
];
|
|
365
|
+
|
|
366
|
+
function TutorGroupAvatars() {
|
|
367
|
+
return (
|
|
368
|
+
<AvatarGroup
|
|
369
|
+
items={students}
|
|
370
|
+
label="Tutor group 9C"
|
|
371
|
+
size="medium"
|
|
372
|
+
/>
|
|
373
|
+
);
|
|
374
|
+
}
|
|
375
|
+
export default TutorGroupAvatars;
|
|
376
|
+
`.trim(),
|
|
34
377
|
},
|
|
35
378
|
},
|
|
36
379
|
},
|
|
37
|
-
render: () => (
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
};
|
|
43
|
-
export const AscendingWithOverflow = {
|
|
44
|
-
render: () => (_jsx(AvatarGroup, { label: "Ascending overflow", listOrder: "ascending", showMaxItems: 3, items: [
|
|
45
|
-
{ initials: 'A', alt: 'User A' },
|
|
46
|
-
{ initials: 'B', alt: 'User B' },
|
|
47
|
-
{ initials: 'C', alt: 'User C' },
|
|
48
|
-
{ initials: 'D', alt: 'User D' },
|
|
49
|
-
{ initials: 'E', alt: 'User E' },
|
|
50
|
-
] })),
|
|
51
|
-
};
|
|
52
|
-
export const DescendingWithOverflow = {
|
|
53
|
-
render: () => (_jsx(AvatarGroup, { label: "Descending overflow", listOrder: "descending", showMaxItems: 3, items: [
|
|
54
|
-
{ initials: 'A', alt: 'User A' },
|
|
55
|
-
{ initials: 'B', alt: 'User B' },
|
|
56
|
-
{ initials: 'C', alt: 'User C' },
|
|
57
|
-
{ initials: 'D', alt: 'User D' },
|
|
58
|
-
{ initials: 'E', alt: 'User E' },
|
|
59
|
-
] })),
|
|
60
|
-
};
|
|
61
|
-
export const CustomOverflowLabel = {
|
|
380
|
+
render: () => (_jsx(AvatarGroup, { items: STUDENT_ITEMS.slice(0, 5), label: "Tutor group 9C", size: "medium" })),
|
|
381
|
+
}, 'The **items API** is the recommended approach when avatar data arrives as a plain array (e.g. from an API response). '
|
|
382
|
+
+ 'Pass an array of `AvatarGroupItem` values — each can be a plain `AvatarProps` object (`{ initials, alt, src, size, ... }`) '
|
|
383
|
+
+ 'or a pre-rendered `<Avatar>` element.');
|
|
384
|
+
export const ChildrenApi = withDescription({
|
|
62
385
|
parameters: {
|
|
386
|
+
controls: { disable: true },
|
|
63
387
|
docs: {
|
|
64
|
-
|
|
65
|
-
|
|
388
|
+
source: {
|
|
389
|
+
language: 'tsx',
|
|
390
|
+
code: `
|
|
391
|
+
import { Avatar, AvatarGroup } from '@arbor-education/design-system.components';
|
|
392
|
+
|
|
393
|
+
function SLTAvatars() {
|
|
394
|
+
return (
|
|
395
|
+
<AvatarGroup label="Senior leadership team" size="medium">
|
|
396
|
+
<Avatar initials="MP" alt="Margaret Pemberton" />
|
|
397
|
+
<Avatar initials="DO" alt="David Okafor" />
|
|
398
|
+
<Avatar initials="SR" alt="Siobhan Reilly" />
|
|
399
|
+
<Avatar initials="RK" alt="Raj Krishnamurthy" />
|
|
400
|
+
</AvatarGroup>
|
|
401
|
+
);
|
|
402
|
+
}
|
|
403
|
+
export default SLTAvatars;
|
|
404
|
+
`.trim(),
|
|
66
405
|
},
|
|
67
406
|
},
|
|
68
407
|
},
|
|
69
|
-
render: () => (
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
export const AnnouncedOverflowUpdates = {
|
|
76
|
-
name: 'Announced Overflow Updates',
|
|
408
|
+
render: () => (_jsxs(AvatarGroup, { label: "Senior leadership team", size: "medium", children: [_jsx(Avatar, { initials: "MP", alt: "Margaret Pemberton" }), _jsx(Avatar, { initials: "DO", alt: "David Okafor" }), _jsx(Avatar, { initials: "SR", alt: "Siobhan Reilly" }), _jsx(Avatar, { initials: "RK", alt: "Raj Krishnamurthy" })] })),
|
|
409
|
+
}, 'The **children API** lets you compose `<Avatar>` elements directly — useful when you already have Avatar '
|
|
410
|
+
+ 'components in your render tree and just want to group them. '
|
|
411
|
+
+ 'Fragments are supported: Avatars inside `<>...</>` wrappers are collected automatically. '
|
|
412
|
+
+ 'The `items` and `children` APIs are mutually exclusive; pick one per component instance.');
|
|
413
|
+
export const AllSizes = withDescription({
|
|
77
414
|
parameters: {
|
|
415
|
+
controls: { disable: true },
|
|
78
416
|
docs: {
|
|
79
|
-
|
|
80
|
-
|
|
417
|
+
source: {
|
|
418
|
+
language: 'tsx',
|
|
419
|
+
code: `
|
|
420
|
+
import { AvatarGroup } from '@arbor-education/design-system.components';
|
|
421
|
+
|
|
422
|
+
const staff = [
|
|
423
|
+
{ initials: 'DZ', alt: 'Dorothy Zbornak' },
|
|
424
|
+
{ initials: 'RN', alt: 'Rose Nylund' },
|
|
425
|
+
{ initials: 'BD', alt: 'Blanche Devereaux' },
|
|
426
|
+
{ initials: 'SP', alt: 'Sophia Petrillo' },
|
|
427
|
+
];
|
|
428
|
+
|
|
429
|
+
function AllSizesExample() {
|
|
430
|
+
return (
|
|
431
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: 'var(--spacing-large)' }}>
|
|
432
|
+
<AvatarGroup items={staff} size="small" label="Staff — small" showMaxItems={3} />
|
|
433
|
+
<AvatarGroup items={staff} size="medium" label="Staff — medium" showMaxItems={3} />
|
|
434
|
+
<AvatarGroup items={staff} size="large" label="Staff — large" showMaxItems={3} />
|
|
435
|
+
<AvatarGroup items={staff} size="extra-large" label="Staff — extra-large" showMaxItems={3} />
|
|
436
|
+
</div>
|
|
437
|
+
);
|
|
438
|
+
}
|
|
439
|
+
export default AllSizesExample;
|
|
440
|
+
`.trim(),
|
|
81
441
|
},
|
|
82
442
|
},
|
|
83
443
|
},
|
|
84
|
-
render: () => (_jsx(
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
444
|
+
render: () => (_jsx("div", { style: {
|
|
445
|
+
display: 'flex',
|
|
446
|
+
flexDirection: 'column',
|
|
447
|
+
gap: 'var(--spacing-large)',
|
|
448
|
+
}, children: ['small', 'medium', 'large', 'extra-large'].map(size => (_jsxs("div", { style: {
|
|
449
|
+
display: 'flex',
|
|
450
|
+
alignItems: 'center',
|
|
451
|
+
gap: 'var(--spacing-medium)',
|
|
452
|
+
}, children: [_jsx("span", { className: "ds-text", style: { width: '6rem', color: 'var(--color-grey-600)', flexShrink: 0 }, children: size }), _jsx(AvatarGroup, { items: STAFF_ITEMS.slice(0, 4), size: size, label: `Staff group — ${size}`, showMaxItems: 3 })] }, size))) })),
|
|
453
|
+
}, 'All four avatar sizes — `small`, `medium`, `large`, and `extra-large` — shown side by side. '
|
|
454
|
+
+ 'Use `size` on the group (not on individual items) to keep the stack visually consistent.');
|
|
455
|
+
export const GroupSizeOverride = withDescription({
|
|
456
|
+
parameters: {
|
|
457
|
+
controls: { disable: true },
|
|
458
|
+
docs: {
|
|
459
|
+
source: {
|
|
460
|
+
language: 'tsx',
|
|
461
|
+
code: `
|
|
462
|
+
import { AvatarGroup } from '@arbor-education/design-system.components';
|
|
463
|
+
|
|
464
|
+
// Each item declares a different individual size
|
|
465
|
+
const mixedItems = [
|
|
466
|
+
{ initials: 'DZ', alt: 'Dorothy Zbornak', size: 'small' as const },
|
|
467
|
+
{ initials: 'RN', alt: 'Rose Nylund', size: 'extra-large' as const },
|
|
468
|
+
{ initials: 'BD', alt: 'Blanche Devereaux', size: 'large' as const },
|
|
469
|
+
{ initials: 'SP', alt: 'Sophia Petrillo', size: 'small' as const },
|
|
470
|
+
];
|
|
471
|
+
|
|
472
|
+
function GroupSizeOverrideExample() {
|
|
473
|
+
return (
|
|
474
|
+
<>
|
|
475
|
+
{/* Without group size — renders mixed, inconsistent heights */}
|
|
476
|
+
<AvatarGroup items={mixedItems} label="Mixed sizes — no override" />
|
|
477
|
+
|
|
478
|
+
{/* With group size="medium" — ALL avatars flatten to medium */}
|
|
479
|
+
<AvatarGroup items={mixedItems} size="medium" label="Group size override to medium" />
|
|
480
|
+
</>
|
|
481
|
+
);
|
|
482
|
+
}
|
|
483
|
+
export default GroupSizeOverrideExample;
|
|
484
|
+
`.trim(),
|
|
485
|
+
},
|
|
486
|
+
},
|
|
487
|
+
},
|
|
488
|
+
render: () => {
|
|
489
|
+
const mixedItems = [
|
|
490
|
+
{ initials: 'DZ', alt: 'Dorothy Zbornak', size: 'small' },
|
|
491
|
+
{ initials: 'RN', alt: 'Rose Nylund', size: 'extra-large' },
|
|
492
|
+
{ initials: 'BD', alt: 'Blanche Devereaux', size: 'large' },
|
|
493
|
+
{ initials: 'SP', alt: 'Sophia Petrillo', size: 'small' },
|
|
494
|
+
];
|
|
495
|
+
return (_jsxs("div", { style: {
|
|
496
|
+
display: 'flex',
|
|
497
|
+
flexDirection: 'column',
|
|
498
|
+
gap: 'var(--spacing-large)',
|
|
499
|
+
}, children: [_jsxs("div", { children: [_jsx("p", { className: "ds-text", style: { marginBottom: 'var(--spacing-small)', color: 'var(--color-grey-600)' }, children: "Without group size \u2014 mixed individual sizes (small / extra-large / large / small):" }), _jsx(AvatarGroup, { items: mixedItems, label: "Mixed sizes \u2014 no group override" })] }), _jsxs("div", { children: [_jsxs("p", { className: "ds-text", style: { marginBottom: 'var(--spacing-small)', color: 'var(--color-grey-600)' }, children: ["With", ' ', _jsx("code", { children: "size=\"medium\"" }), ' ', "on the group \u2014 individual sizes are overridden:"] }), _jsx(AvatarGroup, { items: mixedItems, size: "medium", label: "Mixed sizes \u2014 group override to medium" })] })] }));
|
|
500
|
+
},
|
|
501
|
+
}, 'When you pass `size` to the group, it **overrides** any `size` set on individual items. '
|
|
502
|
+
+ 'The top row has four items each declaring a different size — the result is visually inconsistent. '
|
|
503
|
+
+ 'The bottom row adds `size="medium"` to the group and all avatars snap to the same height.');
|
|
504
|
+
export const WithOverflow = withDescription({
|
|
505
|
+
parameters: {
|
|
506
|
+
controls: { disable: true },
|
|
507
|
+
docs: {
|
|
508
|
+
source: {
|
|
509
|
+
language: 'tsx',
|
|
510
|
+
code: `
|
|
511
|
+
import { AvatarGroup } from '@arbor-education/design-system.components';
|
|
512
|
+
|
|
513
|
+
const students = [
|
|
514
|
+
{ initials: 'AT', alt: 'Aisha Thompson' },
|
|
515
|
+
{ initials: 'CF', alt: 'Callum Fraser' },
|
|
516
|
+
{ initials: 'FA', alt: 'Fatima Al-Rashid' },
|
|
517
|
+
{ initials: 'OB', alt: 'Oliver Bennett' },
|
|
518
|
+
{ initials: 'PS', alt: 'Priya Sharma' },
|
|
519
|
+
{ initials: 'DM', alt: 'Declan Murphy' },
|
|
520
|
+
{ initials: 'YT', alt: 'Yuki Tanaka' },
|
|
521
|
+
{ initials: 'AO', alt: 'Amara Osei' },
|
|
522
|
+
];
|
|
523
|
+
|
|
524
|
+
function OverflowExample() {
|
|
525
|
+
return (
|
|
526
|
+
<AvatarGroup
|
|
527
|
+
items={students}
|
|
528
|
+
showMaxItems={4}
|
|
529
|
+
label="Year 8 English students"
|
|
530
|
+
size="medium"
|
|
531
|
+
/>
|
|
532
|
+
);
|
|
533
|
+
}
|
|
534
|
+
export default OverflowExample;
|
|
535
|
+
`.trim(),
|
|
536
|
+
},
|
|
537
|
+
},
|
|
538
|
+
},
|
|
539
|
+
render: () => (_jsx(AvatarGroup, { items: STUDENT_ITEMS, showMaxItems: 4, label: "Year 8 English students", size: "medium" })),
|
|
540
|
+
}, '`showMaxItems` caps the rendered avatars and replaces the remainder with a `+N` overflow badge. '
|
|
541
|
+
+ 'Here 8 students are in the list but only 4 are shown — the badge reads **+4**. '
|
|
542
|
+
+ 'The badge carries `role="status"` and an accessible label (`"plus 4 more"` by default).');
|
|
543
|
+
export const DescendingOverflow = withDescription({
|
|
544
|
+
parameters: {
|
|
545
|
+
controls: { disable: true },
|
|
546
|
+
docs: {
|
|
547
|
+
source: {
|
|
548
|
+
language: 'tsx',
|
|
549
|
+
code: `
|
|
550
|
+
import { AvatarGroup } from '@arbor-education/design-system.components';
|
|
551
|
+
|
|
552
|
+
// Items ordered chronologically — most recent is last in the array
|
|
553
|
+
const recentContributors = [
|
|
554
|
+
{ initials: 'HN', alt: 'Harriet Nwosu' }, // oldest
|
|
555
|
+
{ initials: 'LM', alt: 'Leo Marchetti' },
|
|
556
|
+
{ initials: 'SuP', alt: 'Sunita Patel' },
|
|
557
|
+
{ initials: 'TH', alt: 'Tomás Herrera' },
|
|
558
|
+
{ initials: 'IC', alt: 'Imogen Clarke' },
|
|
559
|
+
{ initials: 'KA', alt: 'Kwame Asante' }, // most recent
|
|
560
|
+
];
|
|
561
|
+
|
|
562
|
+
function DescendingExample() {
|
|
563
|
+
return (
|
|
564
|
+
<>
|
|
565
|
+
{/* ascending — shows FIRST 3 (Harriet, Leo, Sunita) */}
|
|
566
|
+
<AvatarGroup
|
|
567
|
+
items={recentContributors}
|
|
568
|
+
showMaxItems={3}
|
|
569
|
+
listOrder="ascending"
|
|
570
|
+
label="Recent contributors — ascending"
|
|
571
|
+
/>
|
|
572
|
+
|
|
573
|
+
{/* descending — shows LAST 3 (Tomás, Imogen, Kwame) */}
|
|
574
|
+
<AvatarGroup
|
|
575
|
+
items={recentContributors}
|
|
576
|
+
showMaxItems={3}
|
|
577
|
+
listOrder="descending"
|
|
578
|
+
label="Recent contributors — descending"
|
|
579
|
+
/>
|
|
580
|
+
</>
|
|
581
|
+
);
|
|
582
|
+
}
|
|
583
|
+
export default DescendingExample;
|
|
584
|
+
`.trim(),
|
|
585
|
+
},
|
|
586
|
+
},
|
|
587
|
+
},
|
|
588
|
+
render: () => {
|
|
589
|
+
const contributors = [
|
|
590
|
+
{ initials: 'HN', alt: 'Harriet Nwosu' },
|
|
591
|
+
{ initials: 'LM', alt: 'Leo Marchetti' },
|
|
592
|
+
{ initials: 'SuP', alt: 'Sunita Patel' },
|
|
593
|
+
{ initials: 'TH', alt: 'Tomás Herrera' },
|
|
594
|
+
{ initials: 'IC', alt: 'Imogen Clarke' },
|
|
595
|
+
{ initials: 'KA', alt: 'Kwame Asante' },
|
|
596
|
+
];
|
|
597
|
+
return (_jsxs("div", { style: {
|
|
598
|
+
display: 'flex',
|
|
599
|
+
flexDirection: 'column',
|
|
600
|
+
gap: 'var(--spacing-large)',
|
|
601
|
+
}, children: [_jsxs("div", { children: [_jsxs("p", { className: "ds-text", style: { marginBottom: 'var(--spacing-small)', color: 'var(--color-grey-600)' }, children: [_jsx("code", { children: "listOrder=\"ascending\"" }), ' ', "\u2014 shows the", ' ', _jsx("strong", { children: "first" }), ' ', "3 (Harriet, Leo, Sunita):"] }), _jsx(AvatarGroup, { items: contributors, showMaxItems: 3, listOrder: "ascending", label: "Recent contributors \u2014 ascending", size: "medium" })] }), _jsxs("div", { children: [_jsxs("p", { className: "ds-text", style: { marginBottom: 'var(--spacing-small)', color: 'var(--color-grey-600)' }, children: [_jsx("code", { children: "listOrder=\"descending\"" }), ' ', "\u2014 shows the", ' ', _jsx("strong", { children: "last" }), ' ', "3 (Tom\u00E1s, Imogen, Kwame):"] }), _jsx(AvatarGroup, { items: contributors, showMaxItems: 3, listOrder: "descending", label: "Recent contributors \u2014 descending", size: "medium" })] })] }));
|
|
602
|
+
},
|
|
603
|
+
}, '`listOrder` controls **which** items are shown when `showMaxItems` trims the list. '
|
|
604
|
+
+ '`ascending` (default) keeps the **first** N items; `descending` keeps the **last** N items. '
|
|
605
|
+
+ 'This is ideal for "most recent contributors" patterns where new entries are appended to the end of the array.');
|
|
606
|
+
export const CustomOverflowLabel = withDescription({
|
|
607
|
+
parameters: {
|
|
608
|
+
controls: { disable: true },
|
|
609
|
+
docs: {
|
|
610
|
+
source: {
|
|
611
|
+
language: 'tsx',
|
|
612
|
+
code: `
|
|
613
|
+
import { AvatarGroup } from '@arbor-education/design-system.components';
|
|
614
|
+
|
|
615
|
+
function CustomOverflowLabelExample() {
|
|
616
|
+
return (
|
|
617
|
+
<AvatarGroup
|
|
618
|
+
items={students}
|
|
619
|
+
showMaxItems={3}
|
|
620
|
+
label="Students in tutor group 7B"
|
|
621
|
+
size="medium"
|
|
622
|
+
overflowCountLabel={(n) => \`\${n} more students not shown\`}
|
|
623
|
+
/>
|
|
624
|
+
);
|
|
625
|
+
}
|
|
626
|
+
export default CustomOverflowLabelExample;
|
|
627
|
+
`.trim(),
|
|
628
|
+
},
|
|
629
|
+
},
|
|
630
|
+
},
|
|
631
|
+
render: () => (_jsx(AvatarGroup, { items: STUDENT_ITEMS, showMaxItems: 3, label: "Students in tutor group 7B", size: "medium", overflowCountLabel: n => `${n} more students not shown` })),
|
|
632
|
+
}, '`overflowCountLabel` accepts a **function** receiving the overflow count and returning an accessible label string. '
|
|
633
|
+
+ 'This example produces `aria-label="5 more students not shown"` on the badge — far more descriptive than the default `"plus 5 more"`. '
|
|
634
|
+
+ 'A plain `string` also works if the label does not need to reflect the count dynamically.');
|
|
635
|
+
export const WithAriaLabel = withDescription({
|
|
636
|
+
parameters: {
|
|
637
|
+
controls: { disable: true },
|
|
638
|
+
docs: {
|
|
639
|
+
source: {
|
|
640
|
+
language: 'tsx',
|
|
641
|
+
code: `
|
|
642
|
+
import { AvatarGroup } from '@arbor-education/design-system.components';
|
|
643
|
+
|
|
644
|
+
function WithAriaLabelExample() {
|
|
645
|
+
return (
|
|
646
|
+
// Always supply label — without it, screen readers announce a nameless list
|
|
647
|
+
<AvatarGroup
|
|
648
|
+
items={formTutors}
|
|
649
|
+
label="Form tutors for Year 11"
|
|
650
|
+
size="medium"
|
|
651
|
+
/>
|
|
652
|
+
);
|
|
653
|
+
}
|
|
654
|
+
export default WithAriaLabelExample;
|
|
655
|
+
`.trim(),
|
|
656
|
+
},
|
|
657
|
+
},
|
|
658
|
+
},
|
|
659
|
+
render: () => (_jsxs("div", { style: {
|
|
660
|
+
display: 'flex',
|
|
661
|
+
flexDirection: 'column',
|
|
662
|
+
gap: 'var(--spacing-large)',
|
|
663
|
+
}, children: [_jsxs("div", { children: [_jsxs("p", { className: "ds-text", style: { marginBottom: 'var(--spacing-small)', color: 'var(--color-grey-600)' }, children: ["With", ' ', _jsx("code", { children: "label" }), ' ', "\u2014 screen reader announces \u201CForm tutors for Year 11, list, 4 items\u201D:"] }), _jsx(AvatarGroup, { items: STAFF_ITEMS.slice(0, 4), label: "Form tutors for Year 11", size: "medium" })] }), _jsxs("div", { children: [_jsxs("p", { className: "ds-text", style: { marginBottom: 'var(--spacing-small)', color: 'var(--color-semantic-destructive-600)' }, children: ["Without", ' ', _jsx("code", { children: "label" }), ' ', "\u2014 screen reader announces \u201Clist, 4 items\u201D (avoid in production):"] }), _jsx(AvatarGroup, { items: STAFF_ITEMS.slice(0, 4), size: "medium" })] })] })),
|
|
664
|
+
}, 'The `label` prop sets `aria-label` on the root `<ul>`. '
|
|
665
|
+
+ 'Without it, screen-reader users hear "list of N items" with no context about what the group represents. '
|
|
666
|
+
+ '**Always provide a meaningful label in production.**');
|
|
667
|
+
export const LiveOverflowCounter = withDescription({
|
|
668
|
+
render: () => _jsx(LiveOverflowCounterTemplate, {}),
|
|
669
|
+
parameters: {
|
|
670
|
+
controls: { disable: true },
|
|
671
|
+
docs: {
|
|
672
|
+
source: {
|
|
673
|
+
language: 'tsx',
|
|
674
|
+
code: `
|
|
675
|
+
import { useState } from 'react';
|
|
676
|
+
import { Button, AvatarGroup } from '@arbor-education/design-system.components';
|
|
677
|
+
|
|
678
|
+
function LiveOverflowCounterExample() {
|
|
679
|
+
const [items, setItems] = useState([
|
|
680
|
+
{ initials: 'AT', alt: 'Aisha Thompson' },
|
|
681
|
+
{ initials: 'CF', alt: 'Callum Fraser' },
|
|
682
|
+
{ initials: 'FA', alt: 'Fatima Al-Rashid' },
|
|
683
|
+
]);
|
|
684
|
+
|
|
685
|
+
return (
|
|
686
|
+
<>
|
|
687
|
+
<AvatarGroup
|
|
688
|
+
items={items}
|
|
689
|
+
showMaxItems={3}
|
|
690
|
+
size="medium"
|
|
691
|
+
label="Active session participants"
|
|
692
|
+
overflowCountLabel={(n) => \`\${n} more participants\`}
|
|
693
|
+
presentAllUpdatesToScreenReader
|
|
694
|
+
/>
|
|
695
|
+
<Button
|
|
696
|
+
variant="secondary"
|
|
697
|
+
size="S"
|
|
698
|
+
onClick={() => setItems(prev => [...prev, { initials: 'NP', alt: 'New Participant' }])}
|
|
699
|
+
>
|
|
700
|
+
Add participant
|
|
701
|
+
</Button>
|
|
702
|
+
</>
|
|
703
|
+
);
|
|
704
|
+
}
|
|
705
|
+
export default LiveOverflowCounterExample;
|
|
706
|
+
`.trim(),
|
|
707
|
+
},
|
|
708
|
+
},
|
|
709
|
+
},
|
|
710
|
+
}, 'A live demo of `presentAllUpdatesToScreenReader`. '
|
|
711
|
+
+ 'Use the buttons to add or remove participants — the overflow badge updates and each count change is announced '
|
|
712
|
+
+ 'to screen readers via `aria-live="polite"`. '
|
|
713
|
+
+ 'Only enable this on groups whose membership changes at runtime — on static groups it creates unnecessary noise.');
|
|
91
714
|
//# sourceMappingURL=AvatarGroup.stories.js.map
|