@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
|
@@ -0,0 +1,272 @@
|
|
|
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';
|
|
4
|
+
import { PaginationPanel } from './PaginationPanel';
|
|
5
|
+
// ---------------------------------------------------------------------------
|
|
6
|
+
// Docs page content
|
|
7
|
+
// ---------------------------------------------------------------------------
|
|
8
|
+
const DESCRIPTION_INTRO = [
|
|
9
|
+
'`PaginationPanel` is the pre-composed footer slot for the Arbor data table.',
|
|
10
|
+
'It renders a three-part `<nav>`: a **row count** (how many rows are visible),',
|
|
11
|
+
'**page controls** (first / prev / page-number input / next / last), and a **page-size selector** dropdown.',
|
|
12
|
+
'',
|
|
13
|
+
'Every part is opt-in — only pass the props for the sections you need.',
|
|
14
|
+
'Pass the entire `<PaginationPanel />` element as the `footerContent` prop of `<Table />`.',
|
|
15
|
+
].join('\n');
|
|
16
|
+
const USAGE_GUIDANCE = [
|
|
17
|
+
'### When to use',
|
|
18
|
+
'',
|
|
19
|
+
'- As the `footerContent` of a `<Table />` to give it standard pagination controls',
|
|
20
|
+
'- When you need a page-size selector alongside page navigation in a single composable component',
|
|
21
|
+
'- When implementing server-side pagination (pass `totalPages` + `onPageChange` + `onPageSizeChange`)',
|
|
22
|
+
'',
|
|
23
|
+
'---',
|
|
24
|
+
'',
|
|
25
|
+
'### When NOT to use',
|
|
26
|
+
'',
|
|
27
|
+
'| Situation | Alternative |',
|
|
28
|
+
'|---|---|',
|
|
29
|
+
'| You only need page navigation | Use `PaginationControls` directly |',
|
|
30
|
+
'| You only need a page-size selector | Use `PageSizeSelector` directly |',
|
|
31
|
+
'| The table has no pagination | Omit `footerContent` entirely |',
|
|
32
|
+
'',
|
|
33
|
+
'---',
|
|
34
|
+
'',
|
|
35
|
+
'### Sub-component summary',
|
|
36
|
+
'',
|
|
37
|
+
'| Sub-component | Key props | Notes |',
|
|
38
|
+
'|---|---|---|',
|
|
39
|
+
'| `RowCountInfo` | `totalRows` | Returns `null` when used outside a `<Table />` — it reads row count from `GridApiContext` |',
|
|
40
|
+
'| `PaginationControls` | `totalPages`, `onPageChange` | Works standalone; falls back to `GridApiContext` when no props are passed |',
|
|
41
|
+
'| `PageSizeSelector` | `availableSizes`, `initialPageSize`, `onPageSizeChange` | Works standalone; falls back to `GridApiContext` when no props are passed |',
|
|
42
|
+
].join('\n');
|
|
43
|
+
const DEVELOPER_NOTES = [
|
|
44
|
+
'### Wiring into `<Table />`',
|
|
45
|
+
'',
|
|
46
|
+
'```tsx',
|
|
47
|
+
"import { Table, PaginationPanel } from '@arbor-education/design-system.components';",
|
|
48
|
+
'',
|
|
49
|
+
'function MyTable() {',
|
|
50
|
+
' return (',
|
|
51
|
+
' <Table',
|
|
52
|
+
' rowData={rows}',
|
|
53
|
+
' columnDefs={colDefs}',
|
|
54
|
+
' footerContent={(',
|
|
55
|
+
' <PaginationPanel',
|
|
56
|
+
' availableSizes={[10, 25, 50, 100]}',
|
|
57
|
+
' initialPageSize={25}',
|
|
58
|
+
' onPageSizeChange={setPageSize}',
|
|
59
|
+
' />',
|
|
60
|
+
' )}',
|
|
61
|
+
' />',
|
|
62
|
+
' );',
|
|
63
|
+
'}',
|
|
64
|
+
'```',
|
|
65
|
+
'',
|
|
66
|
+
'---',
|
|
67
|
+
'',
|
|
68
|
+
'### Server-side pagination',
|
|
69
|
+
'',
|
|
70
|
+
'When your data is fetched page-by-page from an API, pass `totalPages` and `onPageChange`:',
|
|
71
|
+
'',
|
|
72
|
+
'```tsx',
|
|
73
|
+
'function ServerTable() {',
|
|
74
|
+
' const [page, setPage] = useState(0);',
|
|
75
|
+
' const [pageSize, setPageSize] = useState(25);',
|
|
76
|
+
' const { data, totalPages } = useMyApiQuery({ page, pageSize });',
|
|
77
|
+
'',
|
|
78
|
+
' return (',
|
|
79
|
+
' <Table',
|
|
80
|
+
' rowData={data}',
|
|
81
|
+
' columnDefs={colDefs}',
|
|
82
|
+
' footerContent={(',
|
|
83
|
+
' <PaginationPanel',
|
|
84
|
+
' totalPages={totalPages}',
|
|
85
|
+
' onPageChange={setPage}',
|
|
86
|
+
' availableSizes={[10, 25, 50]}',
|
|
87
|
+
' initialPageSize={pageSize}',
|
|
88
|
+
' onPageSizeChange={setPageSize}',
|
|
89
|
+
' />',
|
|
90
|
+
' )}',
|
|
91
|
+
' />',
|
|
92
|
+
' );',
|
|
93
|
+
'}',
|
|
94
|
+
'```',
|
|
95
|
+
'',
|
|
96
|
+
'---',
|
|
97
|
+
'',
|
|
98
|
+
'### `RowCountInfo` and `GridApiContext`',
|
|
99
|
+
'',
|
|
100
|
+
'`RowCountInfo` reads the displayed row count from `GridApiContext` — this context is provided',
|
|
101
|
+
'automatically by `<Table />`. When `PaginationPanel` is rendered outside a `<Table />`',
|
|
102
|
+
'(as in these Storybook stories), `RowCountInfo` returns `null` and the row-count text is not shown.',
|
|
103
|
+
'Pass `totalRows` to supply a value manually in server-side scenarios.',
|
|
104
|
+
'',
|
|
105
|
+
'---',
|
|
106
|
+
'',
|
|
107
|
+
'### TypeScript types',
|
|
108
|
+
'',
|
|
109
|
+
'```ts',
|
|
110
|
+
"import { PaginationPanel } from '@arbor-education/design-system.components';",
|
|
111
|
+
"import type { PaginationControlsProps, PageSizeSelectorProps, RowCountInfoProps } from '@arbor-education/design-system.components';",
|
|
112
|
+
'```',
|
|
113
|
+
].join('\n');
|
|
114
|
+
const RELATED_COMPONENTS = [
|
|
115
|
+
'## Related components',
|
|
116
|
+
'',
|
|
117
|
+
'[Table](?path=/docs/components-table--docs) · [TableControls](?path=/docs/components-table-tablecontrols--docs) · [Button](?path=/docs/components-button--docs)',
|
|
118
|
+
].join('\n');
|
|
119
|
+
const PROPS_INTRO = 'The preview below is wired to the **Controls** panel — toggle props to see the panel update in real time. Note that `RowCountInfo` (the row-count text on the left) only displays inside a `<Table />`; it returns `null` in this standalone preview.';
|
|
120
|
+
// ---------------------------------------------------------------------------
|
|
121
|
+
// Custom DocsPage
|
|
122
|
+
// ---------------------------------------------------------------------------
|
|
123
|
+
function PaginationPanelDocsPage() {
|
|
124
|
+
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 })] }));
|
|
125
|
+
}
|
|
126
|
+
// ---------------------------------------------------------------------------
|
|
127
|
+
// Meta
|
|
128
|
+
// ---------------------------------------------------------------------------
|
|
129
|
+
const meta = {
|
|
130
|
+
title: 'Components/Table/PaginationPanel',
|
|
131
|
+
component: PaginationPanel,
|
|
132
|
+
tags: ['autodocs'],
|
|
133
|
+
parameters: {
|
|
134
|
+
layout: 'padded',
|
|
135
|
+
docs: { page: PaginationPanelDocsPage },
|
|
136
|
+
},
|
|
137
|
+
argTypes: {
|
|
138
|
+
totalRows: {
|
|
139
|
+
description: 'Total number of rows in the dataset. Passed to `RowCountInfo` for the "Showing X of Y results" label. Only relevant when used outside a `<Table />` (which provides this automatically via `GridApiContext`).',
|
|
140
|
+
control: 'number',
|
|
141
|
+
table: { type: { summary: 'number' }, defaultValue: { summary: 'undefined' } },
|
|
142
|
+
},
|
|
143
|
+
totalPages: {
|
|
144
|
+
description: 'Total number of pages. Passed to `PaginationControls`. Required for server-side pagination; when omitted the control reads from `GridApiContext`.',
|
|
145
|
+
control: 'number',
|
|
146
|
+
table: { type: { summary: 'number' }, defaultValue: { summary: 'undefined' } },
|
|
147
|
+
},
|
|
148
|
+
onPageChange: {
|
|
149
|
+
description: 'Called with the zero-indexed new page number when the user navigates. Required for server-side pagination; when omitted the control drives the AG Grid API directly.',
|
|
150
|
+
control: false,
|
|
151
|
+
table: { type: { summary: '(newPage: number) => void' }, defaultValue: { summary: 'undefined' } },
|
|
152
|
+
},
|
|
153
|
+
availableSizes: {
|
|
154
|
+
description: 'Array of page sizes shown in the `PageSizeSelector` dropdown. Defaults to `[10, 20, 30, 50, 100, 200, 300, 500, 1000, "All"]`.',
|
|
155
|
+
control: false,
|
|
156
|
+
table: { type: { summary: '(number | "All")[]' }, defaultValue: { summary: 'undefined' } },
|
|
157
|
+
},
|
|
158
|
+
initialPageSize: {
|
|
159
|
+
description: 'The initially selected page size in the `PageSizeSelector`.',
|
|
160
|
+
control: 'number',
|
|
161
|
+
table: { type: { summary: 'number | "All"' }, defaultValue: { summary: 'undefined' } },
|
|
162
|
+
},
|
|
163
|
+
onPageSizeChange: {
|
|
164
|
+
description: 'Called with the newly selected page size when the user changes it. Required for server-side pagination; when omitted the control drives the AG Grid API directly.',
|
|
165
|
+
control: false,
|
|
166
|
+
table: { type: { summary: '(newPageSize: number | "All") => void' }, defaultValue: { summary: 'undefined' } },
|
|
167
|
+
},
|
|
168
|
+
className: {
|
|
169
|
+
description: 'Additional CSS class name(s) to apply to the root `<nav>` element.',
|
|
170
|
+
control: 'text',
|
|
171
|
+
table: { type: { summary: 'string' }, defaultValue: { summary: 'undefined' } },
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
args: {
|
|
175
|
+
onPageChange: fn(),
|
|
176
|
+
onPageSizeChange: fn(),
|
|
177
|
+
},
|
|
178
|
+
};
|
|
179
|
+
export default meta;
|
|
180
|
+
// ---------------------------------------------------------------------------
|
|
181
|
+
// Helper
|
|
182
|
+
// ---------------------------------------------------------------------------
|
|
183
|
+
const withDescription = (story, description) => ({
|
|
184
|
+
...story,
|
|
185
|
+
parameters: {
|
|
186
|
+
...story.parameters,
|
|
187
|
+
docs: { ...story.parameters?.docs, description: { story: description } },
|
|
188
|
+
},
|
|
189
|
+
});
|
|
190
|
+
// ---------------------------------------------------------------------------
|
|
191
|
+
// Stories
|
|
192
|
+
// ---------------------------------------------------------------------------
|
|
193
|
+
export const Default = withDescription({
|
|
194
|
+
args: {
|
|
195
|
+
totalPages: 10,
|
|
196
|
+
onPageChange: fn(),
|
|
197
|
+
availableSizes: [10, 25, 50, 100],
|
|
198
|
+
initialPageSize: 25,
|
|
199
|
+
onPageSizeChange: fn(),
|
|
200
|
+
},
|
|
201
|
+
}, 'The interactive canvas — all three sections visible: row count (hidden outside a `<Table />`), '
|
|
202
|
+
+ 'page navigation controls, and a page-size selector. '
|
|
203
|
+
+ 'Use the Controls panel to adjust `totalPages` and `initialPageSize`.');
|
|
204
|
+
export const PageNavigationOnly = withDescription({
|
|
205
|
+
parameters: { controls: { disable: true } },
|
|
206
|
+
args: {
|
|
207
|
+
totalPages: 5,
|
|
208
|
+
onPageChange: fn(),
|
|
209
|
+
},
|
|
210
|
+
}, 'Only `PaginationControls` — first, previous, page input, next, and last buttons. '
|
|
211
|
+
+ '`totalPages` drives the upper bound; `onPageChange` receives the zero-indexed new page number. '
|
|
212
|
+
+ 'No `PageSizeSelector` props are passed so that section is omitted.');
|
|
213
|
+
export const PageSizeSelectorOnly = withDescription({
|
|
214
|
+
parameters: { controls: { disable: true } },
|
|
215
|
+
args: {
|
|
216
|
+
availableSizes: [10, 25, 50, 100, 'All'],
|
|
217
|
+
initialPageSize: 25,
|
|
218
|
+
onPageSizeChange: fn(),
|
|
219
|
+
},
|
|
220
|
+
}, 'Only `PageSizeSelector` — a dropdown listing the available page sizes. '
|
|
221
|
+
+ 'No `totalPages` / `onPageChange` props are passed so the page-navigation section is omitted. '
|
|
222
|
+
+ 'When used inside a `<Table />` without `onPageSizeChange`, selecting a size updates the AG Grid pagination automatically.');
|
|
223
|
+
export const ServerSidePagination = withDescription({
|
|
224
|
+
parameters: {
|
|
225
|
+
controls: { disable: true },
|
|
226
|
+
docs: {
|
|
227
|
+
source: {
|
|
228
|
+
language: 'tsx',
|
|
229
|
+
code: `
|
|
230
|
+
import { useState } from 'react';
|
|
231
|
+
import { Table, PaginationPanel } from '@arbor-education/design-system.components';
|
|
232
|
+
|
|
233
|
+
function ServerTable() {
|
|
234
|
+
const [page, setPage] = useState(0);
|
|
235
|
+
const [pageSize, setPageSize] = useState(25);
|
|
236
|
+
const { data, totalPages, totalRows } = useMyApiQuery({ page, pageSize });
|
|
237
|
+
|
|
238
|
+
return (
|
|
239
|
+
<Table
|
|
240
|
+
rowData={data}
|
|
241
|
+
columnDefs={colDefs}
|
|
242
|
+
footerContent={(
|
|
243
|
+
<PaginationPanel
|
|
244
|
+
totalRows={totalRows}
|
|
245
|
+
totalPages={totalPages}
|
|
246
|
+
onPageChange={setPage}
|
|
247
|
+
availableSizes={[10, 25, 50, 100]}
|
|
248
|
+
initialPageSize={pageSize}
|
|
249
|
+
onPageSizeChange={setPageSize}
|
|
250
|
+
/>
|
|
251
|
+
)}
|
|
252
|
+
/>
|
|
253
|
+
);
|
|
254
|
+
}
|
|
255
|
+
export default ServerTable;
|
|
256
|
+
`.trim(),
|
|
257
|
+
},
|
|
258
|
+
},
|
|
259
|
+
},
|
|
260
|
+
args: {
|
|
261
|
+
totalRows: 347,
|
|
262
|
+
totalPages: 14,
|
|
263
|
+
onPageChange: fn(),
|
|
264
|
+
availableSizes: [10, 25, 50, 100],
|
|
265
|
+
initialPageSize: 25,
|
|
266
|
+
onPageSizeChange: fn(),
|
|
267
|
+
},
|
|
268
|
+
}, 'Server-side pagination pattern — `totalPages` and `onPageChange` are controlled externally by your data-fetching layer. '
|
|
269
|
+
+ '`totalRows` is provided manually (not derived from the grid). '
|
|
270
|
+
+ 'In this standalone preview `RowCountInfo` still returns `null` (no `GridApiContext`), '
|
|
271
|
+
+ 'but the code example shows the full wiring pattern.');
|
|
272
|
+
//# sourceMappingURL=PaginationPanel.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PaginationPanel.stories.js","sourceRoot":"","sources":["../../../../src/components/table/pagination/Pa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}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { TableControls } from './TableControls';
|
|
3
|
+
declare function TableControlsDocsPage(): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: (props: import("./TableControls").TableControlsProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
+
tags: string[];
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: string;
|
|
10
|
+
docs: {
|
|
11
|
+
page: typeof TableControlsDocsPage;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
argTypes: {
|
|
15
|
+
bulkActions: {
|
|
16
|
+
description: string;
|
|
17
|
+
control: false;
|
|
18
|
+
table: {
|
|
19
|
+
type: {
|
|
20
|
+
summary: string;
|
|
21
|
+
};
|
|
22
|
+
defaultValue: {
|
|
23
|
+
summary: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
onUndo: {
|
|
28
|
+
description: string;
|
|
29
|
+
control: false;
|
|
30
|
+
table: {
|
|
31
|
+
type: {
|
|
32
|
+
summary: string;
|
|
33
|
+
};
|
|
34
|
+
defaultValue: {
|
|
35
|
+
summary: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
onRedo: {
|
|
40
|
+
description: string;
|
|
41
|
+
control: false;
|
|
42
|
+
table: {
|
|
43
|
+
type: {
|
|
44
|
+
summary: string;
|
|
45
|
+
};
|
|
46
|
+
defaultValue: {
|
|
47
|
+
summary: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
showHideColumns: {
|
|
52
|
+
description: string;
|
|
53
|
+
control: "boolean";
|
|
54
|
+
table: {
|
|
55
|
+
type: {
|
|
56
|
+
summary: string;
|
|
57
|
+
};
|
|
58
|
+
defaultValue: {
|
|
59
|
+
summary: string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
hasSearch: {
|
|
64
|
+
description: string;
|
|
65
|
+
control: "boolean";
|
|
66
|
+
table: {
|
|
67
|
+
type: {
|
|
68
|
+
summary: string;
|
|
69
|
+
};
|
|
70
|
+
defaultValue: {
|
|
71
|
+
summary: string;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
onDownload: {
|
|
76
|
+
description: string;
|
|
77
|
+
control: false;
|
|
78
|
+
table: {
|
|
79
|
+
type: {
|
|
80
|
+
summary: string;
|
|
81
|
+
};
|
|
82
|
+
defaultValue: {
|
|
83
|
+
summary: string;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
showSettings: {
|
|
88
|
+
description: string;
|
|
89
|
+
control: "boolean";
|
|
90
|
+
table: {
|
|
91
|
+
type: {
|
|
92
|
+
summary: string;
|
|
93
|
+
};
|
|
94
|
+
defaultValue: {
|
|
95
|
+
summary: string;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
onHelp: {
|
|
100
|
+
description: string;
|
|
101
|
+
control: false;
|
|
102
|
+
table: {
|
|
103
|
+
type: {
|
|
104
|
+
summary: string;
|
|
105
|
+
};
|
|
106
|
+
defaultValue: {
|
|
107
|
+
summary: string;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
isExpanded: {
|
|
112
|
+
description: string;
|
|
113
|
+
control: "boolean";
|
|
114
|
+
table: {
|
|
115
|
+
type: {
|
|
116
|
+
summary: string;
|
|
117
|
+
};
|
|
118
|
+
defaultValue: {
|
|
119
|
+
summary: string;
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
onExpandToggle: {
|
|
124
|
+
description: string;
|
|
125
|
+
control: false;
|
|
126
|
+
table: {
|
|
127
|
+
type: {
|
|
128
|
+
summary: string;
|
|
129
|
+
};
|
|
130
|
+
defaultValue: {
|
|
131
|
+
summary: string;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
args: {
|
|
137
|
+
onUndo: import("@vitest/spy").Mock<(...args: any[]) => any>;
|
|
138
|
+
onRedo: import("@vitest/spy").Mock<(...args: any[]) => any>;
|
|
139
|
+
onDownload: import("@vitest/spy").Mock<(...args: any[]) => any>;
|
|
140
|
+
onHelp: import("@vitest/spy").Mock<(...args: any[]) => any>;
|
|
141
|
+
onExpandToggle: import("@vitest/spy").Mock<(...args: any[]) => any>;
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
export default meta;
|
|
145
|
+
type Story = StoryObj<typeof TableControls>;
|
|
146
|
+
export declare const Default: Story;
|
|
147
|
+
export declare const StartGroupOnly: Story;
|
|
148
|
+
export declare const EndGroupOnly: Story;
|
|
149
|
+
export declare const BulkActionsOnly: Story;
|
|
150
|
+
export declare const FullToolbar: Story;
|
|
151
|
+
//# sourceMappingURL=TableControls.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableControls.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/table/tableControls/TableControls.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAW5D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAyIhD,iBAAS,qBAAqB,4CAmB7B;AAMD,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmE4B,CAAC;AAEvC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,aAAa,CAAC,CAAC;AAkB5C,eAAO,MAAM,OAAO,EAAE,KAcrB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAiB5B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAa1B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KA4C7B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAyDzB,CAAC"}
|