@arbor-education/design-system.components 0.15.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gather/skills/write-stories/SKILL.md +207 -271
- package/.storybook/preview.ts +5 -0
- package/CHANGELOG.md +17 -0
- package/README.md +8 -0
- package/component-library.md +144 -13
- package/dist/components/articleCard/ArticleCard.stories.d.ts +137 -11
- package/dist/components/articleCard/ArticleCard.stories.d.ts.map +1 -1
- package/dist/components/articleCard/ArticleCard.stories.js +358 -91
- package/dist/components/articleCard/ArticleCard.stories.js.map +1 -1
- package/dist/components/avatar/Avatar.stories.d.ts +6 -6
- package/dist/components/avatar/Avatar.stories.d.ts.map +1 -1
- package/dist/components/avatar/Avatar.stories.js +393 -49
- package/dist/components/avatar/Avatar.stories.js.map +1 -1
- package/dist/components/avatarGroup/AvatarGroup.stories.d.ts +9 -7
- package/dist/components/avatarGroup/AvatarGroup.stories.d.ts.map +1 -1
- package/dist/components/avatarGroup/AvatarGroup.stories.js +688 -65
- package/dist/components/avatarGroup/AvatarGroup.stories.js.map +1 -1
- package/dist/components/banner/Banner.stories.d.ts.map +1 -1
- package/dist/components/banner/Banner.stories.js +7 -3
- package/dist/components/banner/Banner.stories.js.map +1 -1
- package/dist/components/card/Card.stories.d.ts +105 -4
- package/dist/components/card/Card.stories.d.ts.map +1 -1
- package/dist/components/card/Card.stories.js +336 -18
- package/dist/components/card/Card.stories.js.map +1 -1
- package/dist/components/combobox/Combobox.stories.d.ts +134 -21
- package/dist/components/combobox/Combobox.stories.d.ts.map +1 -1
- package/dist/components/combobox/Combobox.stories.js +676 -175
- package/dist/components/combobox/Combobox.stories.js.map +1 -1
- package/dist/components/datePicker/DatePicker.stories.d.ts +119 -27
- package/dist/components/datePicker/DatePicker.stories.d.ts.map +1 -1
- package/dist/components/datePicker/DatePicker.stories.js +575 -47
- package/dist/components/datePicker/DatePicker.stories.js.map +1 -1
- package/dist/components/dateTimePicker/DateTimePicker.stories.d.ts +155 -39
- package/dist/components/dateTimePicker/DateTimePicker.stories.d.ts.map +1 -1
- package/dist/components/dateTimePicker/DateTimePicker.stories.js +674 -103
- package/dist/components/dateTimePicker/DateTimePicker.stories.js.map +1 -1
- package/dist/components/editableText/EditableText.stories.d.ts +53 -12
- package/dist/components/editableText/EditableText.stories.d.ts.map +1 -1
- package/dist/components/editableText/EditableText.stories.js +401 -64
- package/dist/components/editableText/EditableText.stories.js.map +1 -1
- package/dist/components/formField/FormField.d.ts +4 -0
- package/dist/components/formField/FormField.d.ts.map +1 -1
- package/dist/components/formField/FormField.js +2 -1
- package/dist/components/formField/FormField.js.map +1 -1
- package/dist/components/formField/FormField.test.js +5 -0
- package/dist/components/formField/FormField.test.js.map +1 -1
- package/dist/components/formField/fieldset/Fieldset.stories.d.ts +56 -4
- package/dist/components/formField/fieldset/Fieldset.stories.d.ts.map +1 -1
- package/dist/components/formField/fieldset/Fieldset.stories.js +534 -28
- package/dist/components/formField/fieldset/Fieldset.stories.js.map +1 -1
- package/dist/components/formField/inputs/checkbox/CheckboxGroup.d.ts +3 -1
- package/dist/components/formField/inputs/checkbox/CheckboxGroup.d.ts.map +1 -1
- package/dist/components/formField/inputs/checkbox/CheckboxInput.js +1 -1
- package/dist/components/formField/inputs/checkbox/CheckboxInput.js.map +1 -1
- package/dist/components/formField/inputs/colourPickerDropdown/ColourPickerDropdown.stories.d.ts +95 -1
- package/dist/components/formField/inputs/colourPickerDropdown/ColourPickerDropdown.stories.d.ts.map +1 -1
- package/dist/components/formField/inputs/colourPickerDropdown/ColourPickerDropdown.stories.js +386 -9
- package/dist/components/formField/inputs/colourPickerDropdown/ColourPickerDropdown.stories.js.map +1 -1
- package/dist/components/formField/inputs/radio/RadioButtonGroup.d.ts +6 -2
- package/dist/components/formField/inputs/radio/RadioButtonGroup.d.ts.map +1 -1
- package/dist/components/formField/inputs/radio/RadioButtonGroup.js.map +1 -1
- package/dist/components/formField/inputs/radio/RadioButtonInput.stories.d.ts.map +1 -1
- package/dist/components/formField/inputs/radio/RadioButtonInput.stories.js +61 -49
- package/dist/components/formField/inputs/radio/RadioButtonInput.stories.js.map +1 -1
- package/dist/components/formField/inputs/selectDropdown/SelectDropdown.stories.d.ts +188 -166
- package/dist/components/formField/inputs/selectDropdown/SelectDropdown.stories.d.ts.map +1 -1
- package/dist/components/formField/inputs/selectDropdown/SelectDropdown.stories.js +821 -160
- package/dist/components/formField/inputs/selectDropdown/SelectDropdown.stories.js.map +1 -1
- package/dist/components/formField/inputs/time/TimeInput.stories.d.ts +176 -22
- package/dist/components/formField/inputs/time/TimeInput.stories.d.ts.map +1 -1
- package/dist/components/formField/inputs/time/TimeInput.stories.js +851 -92
- package/dist/components/formField/inputs/time/TimeInput.stories.js.map +1 -1
- package/dist/components/formField/label/Label.stories.d.ts +54 -5
- package/dist/components/formField/label/Label.stories.d.ts.map +1 -1
- package/dist/components/formField/label/Label.stories.js +238 -4
- package/dist/components/formField/label/Label.stories.js.map +1 -1
- package/dist/components/icoText/IcoText.stories.d.ts +32 -6
- package/dist/components/icoText/IcoText.stories.d.ts.map +1 -1
- package/dist/components/icoText/IcoText.stories.js +309 -14
- package/dist/components/icoText/IcoText.stories.js.map +1 -1
- package/dist/components/kpiCard/KPICard.stories.d.ts +100 -2
- package/dist/components/kpiCard/KPICard.stories.d.ts.map +1 -1
- package/dist/components/kpiCard/KPICard.stories.js +354 -10
- package/dist/components/kpiCard/KPICard.stories.js.map +1 -1
- package/dist/components/kvpList/KVPList.stories.d.ts +57 -4
- package/dist/components/kvpList/KVPList.stories.d.ts.map +1 -1
- package/dist/components/kvpList/KVPList.stories.js +403 -10
- package/dist/components/kvpList/KVPList.stories.js.map +1 -1
- package/dist/components/modal/Modal.stories.d.ts +113 -9
- package/dist/components/modal/Modal.stories.d.ts.map +1 -1
- package/dist/components/modal/Modal.stories.js +633 -13
- package/dist/components/modal/Modal.stories.js.map +1 -1
- package/dist/components/modal/modalManager/ModalManager.stories.d.ts +34 -10
- package/dist/components/modal/modalManager/ModalManager.stories.d.ts.map +1 -1
- package/dist/components/modal/modalManager/ModalManager.stories.js +463 -85
- package/dist/components/modal/modalManager/ModalManager.stories.js.map +1 -1
- package/dist/components/pill/Pill.d.ts.map +1 -1
- package/dist/components/pill/Pill.js +1 -1
- package/dist/components/pill/Pill.js.map +1 -1
- package/dist/components/pill/Pill.stories.d.ts.map +1 -1
- package/dist/components/pill/Pill.stories.js +11 -13
- package/dist/components/pill/Pill.stories.js.map +1 -1
- package/dist/components/row/Row.stories.d.ts +1 -2
- package/dist/components/row/Row.stories.d.ts.map +1 -1
- package/dist/components/row/Row.stories.js +360 -50
- package/dist/components/row/Row.stories.js.map +1 -1
- package/dist/components/searchBar/SearchBar.stories.d.ts +52 -4
- package/dist/components/searchBar/SearchBar.stories.d.ts.map +1 -1
- package/dist/components/searchBar/SearchBar.stories.js +428 -36
- package/dist/components/searchBar/SearchBar.stories.js.map +1 -1
- package/dist/components/section/Section.stories.d.ts +11 -41
- package/dist/components/section/Section.stories.d.ts.map +1 -1
- package/dist/components/section/Section.stories.js +494 -56
- package/dist/components/section/Section.stories.js.map +1 -1
- package/dist/components/singleUser/SingleUser.stories.d.ts +5 -4
- package/dist/components/singleUser/SingleUser.stories.d.ts.map +1 -1
- package/dist/components/singleUser/SingleUser.stories.js +303 -31
- package/dist/components/singleUser/SingleUser.stories.js.map +1 -1
- package/dist/components/slideoverManager/SlideoverManager.stories.d.ts +32 -11
- package/dist/components/slideoverManager/SlideoverManager.stories.d.ts.map +1 -1
- package/dist/components/slideoverManager/SlideoverManager.stories.js +380 -84
- package/dist/components/slideoverManager/SlideoverManager.stories.js.map +1 -1
- package/dist/components/table/DSDefaultColDef.d.ts.map +1 -1
- package/dist/components/table/DSDefaultColDef.js +4 -3
- package/dist/components/table/DSDefaultColDef.js.map +1 -1
- package/dist/components/table/Table.d.ts +6 -1
- package/dist/components/table/Table.d.ts.map +1 -1
- package/dist/components/table/Table.js +8 -3
- package/dist/components/table/Table.js.map +1 -1
- package/dist/components/table/Table.stories.d.ts +2 -0
- package/dist/components/table/Table.stories.d.ts.map +1 -1
- package/dist/components/table/Table.stories.js +357 -3
- package/dist/components/table/Table.stories.js.map +1 -1
- package/dist/components/table/TableFooter.stories.d.ts +49 -0
- package/dist/components/table/TableFooter.stories.d.ts.map +1 -0
- package/dist/components/table/TableFooter.stories.js +137 -0
- package/dist/components/table/TableFooter.stories.js.map +1 -0
- package/dist/components/table/TableHeader.stories.d.ts +93 -0
- package/dist/components/table/TableHeader.stories.d.ts.map +1 -0
- package/dist/components/table/TableHeader.stories.js +176 -0
- package/dist/components/table/TableHeader.stories.js.map +1 -0
- package/dist/components/table/cellEditors/DateCellEditor.stories.d.ts +44 -0
- package/dist/components/table/cellEditors/DateCellEditor.stories.d.ts.map +1 -0
- package/dist/components/table/cellEditors/DateCellEditor.stories.js +186 -0
- package/dist/components/table/cellEditors/DateCellEditor.stories.js.map +1 -0
- package/dist/components/table/cellRenderers/BooleanCellRenderer.stories.d.ts +40 -0
- package/dist/components/table/cellRenderers/BooleanCellRenderer.stories.d.ts.map +1 -0
- package/dist/components/table/cellRenderers/BooleanCellRenderer.stories.js +209 -0
- package/dist/components/table/cellRenderers/BooleanCellRenderer.stories.js.map +1 -0
- package/dist/components/table/cellRenderers/ButtonCellRenderer.stories.d.ts +48 -0
- package/dist/components/table/cellRenderers/ButtonCellRenderer.stories.d.ts.map +1 -0
- package/dist/components/table/cellRenderers/ButtonCellRenderer.stories.js +244 -0
- package/dist/components/table/cellRenderers/ButtonCellRenderer.stories.js.map +1 -0
- package/dist/components/table/cellRenderers/CheckboxCellRenderer.d.ts.map +1 -1
- package/dist/components/table/cellRenderers/CheckboxCellRenderer.js +3 -1
- package/dist/components/table/cellRenderers/CheckboxCellRenderer.js.map +1 -1
- package/dist/components/table/cellRenderers/CheckboxCellRenderer.stories.d.ts +64 -0
- package/dist/components/table/cellRenderers/CheckboxCellRenderer.stories.d.ts.map +1 -0
- package/dist/components/table/cellRenderers/CheckboxCellRenderer.stories.js +241 -0
- package/dist/components/table/cellRenderers/CheckboxCellRenderer.stories.js.map +1 -0
- package/dist/components/table/cellRenderers/DefaultCellRenderer.stories.d.ts +55 -0
- package/dist/components/table/cellRenderers/DefaultCellRenderer.stories.d.ts.map +1 -0
- package/dist/components/table/cellRenderers/DefaultCellRenderer.stories.js +245 -0
- package/dist/components/table/cellRenderers/DefaultCellRenderer.stories.js.map +1 -0
- package/dist/components/table/cellRenderers/InlineTextCellRenderer.stories.d.ts +67 -0
- package/dist/components/table/cellRenderers/InlineTextCellRenderer.stories.d.ts.map +1 -0
- package/dist/components/table/cellRenderers/InlineTextCellRenderer.stories.js +221 -0
- package/dist/components/table/cellRenderers/InlineTextCellRenderer.stories.js.map +1 -0
- package/dist/components/table/cellRenderers/SelectDropdownCellRenderer.stories.d.ts +75 -0
- package/dist/components/table/cellRenderers/SelectDropdownCellRenderer.stories.d.ts.map +1 -0
- package/dist/components/table/cellRenderers/SelectDropdownCellRenderer.stories.js +270 -0
- package/dist/components/table/cellRenderers/SelectDropdownCellRenderer.stories.js.map +1 -0
- package/dist/components/table/columnFilters/BooleanFilter.stories.d.ts +57 -0
- package/dist/components/table/columnFilters/BooleanFilter.stories.d.ts.map +1 -0
- package/dist/components/table/columnFilters/BooleanFilter.stories.js +198 -0
- package/dist/components/table/columnFilters/BooleanFilter.stories.js.map +1 -0
- package/dist/components/table/columnFilters/TimeFilter.stories.d.ts +58 -0
- package/dist/components/table/columnFilters/TimeFilter.stories.d.ts.map +1 -0
- package/dist/components/table/columnFilters/TimeFilter.stories.js +207 -0
- package/dist/components/table/columnFilters/TimeFilter.stories.js.map +1 -0
- package/dist/components/table/pagination/PaginationPanel.stories.d.ts +113 -0
- package/dist/components/table/pagination/PaginationPanel.stories.d.ts.map +1 -0
- package/dist/components/table/pagination/PaginationPanel.stories.js +272 -0
- package/dist/components/table/pagination/PaginationPanel.stories.js.map +1 -0
- package/dist/components/table/tableControls/TableControls.stories.d.ts +151 -0
- package/dist/components/table/tableControls/TableControls.stories.d.ts.map +1 -0
- package/dist/components/table/tableControls/TableControls.stories.js +356 -0
- package/dist/components/table/tableControls/TableControls.stories.js.map +1 -0
- package/dist/components/table/tableControls/TableSettingsDropdown.d.ts +27 -1
- package/dist/components/table/tableControls/TableSettingsDropdown.d.ts.map +1 -1
- package/dist/components/table/tableControls/TableSettingsDropdown.js +53 -26
- package/dist/components/table/tableControls/TableSettingsDropdown.js.map +1 -1
- package/dist/components/table/tableControls/TableSettingsDropdown.test.d.ts +2 -0
- package/dist/components/table/tableControls/TableSettingsDropdown.test.d.ts.map +1 -0
- package/dist/components/table/tableControls/TableSettingsDropdown.test.js +178 -0
- package/dist/components/table/tableControls/TableSettingsDropdown.test.js.map +1 -0
- package/dist/components/tabs/Tabs.stories.d.ts +22 -4
- package/dist/components/tabs/Tabs.stories.d.ts.map +1 -1
- package/dist/components/tabs/Tabs.stories.js +398 -22
- package/dist/components/tabs/Tabs.stories.js.map +1 -1
- package/dist/components/tabs/TabsItem.stories.d.ts +54 -1
- package/dist/components/tabs/TabsItem.stories.d.ts.map +1 -1
- package/dist/components/tabs/TabsItem.stories.js +61 -9
- package/dist/components/tabs/TabsItem.stories.js.map +1 -1
- package/dist/components/toast/Toast.stories.d.ts +103 -10
- package/dist/components/toast/Toast.stories.d.ts.map +1 -1
- package/dist/components/toast/Toast.stories.js +409 -47
- package/dist/components/toast/Toast.stories.js.map +1 -1
- package/dist/components/toggle/Toggle.stories.d.ts +61 -46
- package/dist/components/toggle/Toggle.stories.d.ts.map +1 -1
- package/dist/components/toggle/Toggle.stories.js +311 -122
- package/dist/components/toggle/Toggle.stories.js.map +1 -1
- package/dist/components/tooltip/Tooltip.stories.d.ts +78 -6
- package/dist/components/tooltip/Tooltip.stories.d.ts.map +1 -1
- package/dist/components/tooltip/Tooltip.stories.js +413 -7
- package/dist/components/tooltip/Tooltip.stories.js.map +1 -1
- package/dist/components/tooltip/TooltipWrapper.stories.d.ts +71 -7
- package/dist/components/tooltip/TooltipWrapper.stories.d.ts.map +1 -1
- package/dist/components/tooltip/TooltipWrapper.stories.js +238 -10
- package/dist/components/tooltip/TooltipWrapper.stories.js.map +1 -1
- package/dist/index.css +8 -0
- package/dist/index.css.map +1 -1
- package/dist/utils/PopupParentContext.stories.d.ts +17 -0
- package/dist/utils/PopupParentContext.stories.d.ts.map +1 -0
- package/dist/utils/PopupParentContext.stories.js +266 -0
- package/dist/utils/PopupParentContext.stories.js.map +1 -0
- package/dist/utils/getDefaultPopupParent.d.ts.map +1 -1
- package/dist/utils/getDefaultPopupParent.js +6 -0
- package/dist/utils/getDefaultPopupParent.js.map +1 -1
- package/package.json +1 -1
- package/src/components/articleCard/ArticleCard.stories.tsx +524 -111
- package/src/components/avatar/Avatar.stories.tsx +504 -59
- package/src/components/avatarGroup/AvatarGroup.stories.tsx +977 -175
- package/src/components/banner/Banner.stories.tsx +7 -3
- package/src/components/card/Card.stories.tsx +466 -36
- package/src/components/combobox/Combobox.stories.tsx +867 -260
- package/src/components/datePicker/DatePicker.stories.tsx +777 -60
- package/src/components/dateTimePicker/DateTimePicker.stories.tsx +910 -132
- package/src/components/editableText/EditableText.stories.tsx +567 -91
- package/src/components/formField/FormField.test.tsx +6 -0
- package/src/components/formField/FormField.tsx +5 -0
- package/src/components/formField/fieldset/Fieldset.stories.tsx +761 -51
- package/src/components/formField/inputs/checkbox/CheckboxGroup.tsx +1 -1
- package/src/components/formField/inputs/checkbox/CheckboxInput.tsx +1 -1
- package/src/components/formField/inputs/colourPickerDropdown/ColourPickerDropdown.stories.tsx +504 -11
- package/src/components/formField/inputs/radio/RadioButtonGroup.tsx +17 -4
- package/src/components/formField/inputs/radio/RadioButtonInput.stories.tsx +71 -59
- package/src/components/formField/inputs/selectDropdown/SelectDropdown.stories.tsx +1079 -168
- package/src/components/formField/inputs/time/TimeInput.stories.tsx +1140 -104
- package/src/components/formField/label/Label.stories.tsx +317 -8
- package/src/components/icoText/IcoText.stories.tsx +442 -31
- package/src/components/kpiCard/KPICard.stories.tsx +475 -30
- package/src/components/kvpList/KVPList.stories.tsx +593 -26
- package/src/components/modal/Modal.stories.tsx +963 -26
- package/src/components/modal/modalManager/ModalManager.stories.tsx +612 -454
- package/src/components/pill/Pill.stories.tsx +11 -13
- package/src/components/pill/Pill.tsx +1 -0
- package/src/components/row/Row.stories.tsx +474 -58
- package/src/components/searchBar/SearchBar.stories.tsx +570 -38
- package/src/components/section/Section.stories.tsx +723 -70
- package/src/components/singleUser/SingleUser.stories.tsx +393 -34
- package/src/components/slideoverManager/SlideoverManager.stories.tsx +572 -342
- package/src/components/table/DSDefaultColDef.ts +25 -5
- package/src/components/table/Table.stories.tsx +411 -3
- package/src/components/table/Table.tsx +9 -2
- package/src/components/table/TableFooter.stories.tsx +196 -0
- package/src/components/table/TableHeader.stories.tsx +251 -0
- package/src/components/table/cellEditors/DateCellEditor.stories.tsx +245 -0
- package/src/components/table/cellRenderers/BooleanCellRenderer.stories.tsx +278 -0
- package/src/components/table/cellRenderers/ButtonCellRenderer.stories.tsx +333 -0
- package/src/components/table/cellRenderers/CheckboxCellRenderer.stories.tsx +337 -0
- package/src/components/table/cellRenderers/CheckboxCellRenderer.tsx +5 -1
- package/src/components/table/cellRenderers/DefaultCellRenderer.stories.tsx +342 -0
- package/src/components/table/cellRenderers/InlineTextCellRenderer.stories.tsx +292 -0
- package/src/components/table/cellRenderers/SelectDropdownCellRenderer.stories.tsx +369 -0
- package/src/components/table/columnFilters/BooleanFilter.stories.tsx +268 -0
- package/src/components/table/columnFilters/TimeFilter.stories.tsx +281 -0
- package/src/components/table/pagination/PaginationPanel.stories.tsx +327 -0
- package/src/components/table/tableControls/TableControls.stories.tsx +415 -0
- package/src/components/table/tableControls/TableSettingsDropdown.test.tsx +207 -0
- package/src/components/table/tableControls/TableSettingsDropdown.tsx +103 -39
- package/src/components/tabs/Tabs.stories.tsx +540 -60
- package/src/components/tabs/TabsItem.stories.tsx +82 -8
- package/src/components/toast/Toast.stories.tsx +539 -77
- package/src/components/toggle/Toggle.stories.tsx +371 -135
- package/src/components/tooltip/Tooltip.stories.tsx +606 -15
- package/src/components/tooltip/TooltipWrapper.stories.tsx +348 -12
- package/src/docs/Contributing.mdx +241 -0
- package/src/docs/UsingComponents.mdx +93 -0
- package/src/docs/Welcome.mdx +68 -0
- package/src/global.scss +7 -0
- package/src/utils/PopupParentContext.stories.tsx +367 -0
- package/src/utils/getDefaultPopupParent.ts +6 -0
- package/.ralph/storybook-upgrade/knowledge.md +0 -308
- package/.ralph/storybook-upgrade/prd.json +0 -777
- package/.ralph/storybook-upgrade/progress.md +0 -342
- package/src/components/table/TableWIP.mdx +0 -3
|
@@ -1,18 +1,362 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Controls, Heading as DocHeading, Markdown, Primary as DocPrimary, Stories, Subtitle, Title, } from '@storybook/addon-docs/blocks';
|
|
3
|
+
import { fn } from 'storybook/test';
|
|
4
4
|
import { KPICard } from './KPICard';
|
|
5
|
+
import { Progress } from '../progress/Progress';
|
|
6
|
+
import { KVPList } from '../kvpList/KVPList';
|
|
7
|
+
// ---------------------------------------------------------------------------
|
|
8
|
+
// Docs page content
|
|
9
|
+
// ---------------------------------------------------------------------------
|
|
10
|
+
const DESCRIPTION_INTRO = [
|
|
11
|
+
'`KPICard` is a compact metric tile that surfaces a single key-performance indicator — a labelled value,',
|
|
12
|
+
'optionally expressed as a percentage, optionally followed by supplementary content.',
|
|
13
|
+
'It is built on `Card` with `spacing="dense"` and supports the same static/interactive modes.',
|
|
14
|
+
].join(' ');
|
|
15
|
+
const USAGE_GUIDANCE = [
|
|
16
|
+
'### When to use',
|
|
17
|
+
'',
|
|
18
|
+
'- Displaying a single headline figure — total pupils, attendance rate, behaviour incidents',
|
|
19
|
+
'- Dashboard or summary views where multiple KPIs sit side-by-side in a grid',
|
|
20
|
+
'- When the metric is navigational (click to drill down) — use the interactive variant with `onClick`',
|
|
21
|
+
'',
|
|
22
|
+
'---',
|
|
23
|
+
'',
|
|
24
|
+
'### When NOT to use',
|
|
25
|
+
'',
|
|
26
|
+
'| Situation | Use instead |',
|
|
27
|
+
'|---|---|',
|
|
28
|
+
'| Multiple related key–value pairs | [`KVPList`](?path=/docs/components-kvplist--docs) |',
|
|
29
|
+
'| Rich content card with text + image | [`ArticleCard`](?path=/docs/components-card-articlecard--docs) |',
|
|
30
|
+
'| Non-metric summary block | [`Card`](?path=/docs/components-card--docs) |',
|
|
31
|
+
'| A long label or multi-line value | `Card` with custom content |',
|
|
32
|
+
].join('\n');
|
|
33
|
+
const DEVELOPER_NOTES = [
|
|
34
|
+
'### Critical usage patterns',
|
|
35
|
+
'',
|
|
36
|
+
'**`label` and `value` are required** — omitting either will produce a broken layout.',
|
|
37
|
+
'Both accept `ReactNode`, so you can render formatted numbers, icons, or short JSX.',
|
|
38
|
+
'',
|
|
39
|
+
'```tsx',
|
|
40
|
+
'<KPICard label="Total pupils" value={247} />',
|
|
41
|
+
'```',
|
|
42
|
+
'',
|
|
43
|
+
'**Interactive KPICards require an accessible name.**',
|
|
44
|
+
'When `onClick` is provided, the underlying `Card` requires either `aria-label` or `aria-labelledby`.',
|
|
45
|
+
'The component throws in development and logs a console error in production if neither is supplied.',
|
|
46
|
+
'',
|
|
47
|
+
'```tsx',
|
|
48
|
+
'// ✅ Correct',
|
|
49
|
+
'<KPICard',
|
|
50
|
+
' label="Attendance"',
|
|
51
|
+
' value={94.2}',
|
|
52
|
+
' isPercentage',
|
|
53
|
+
' onClick={handleClick}',
|
|
54
|
+
' aria-label="View attendance details"',
|
|
55
|
+
'/>',
|
|
56
|
+
'',
|
|
57
|
+
'// ❌ Missing accessible name — throws in dev',
|
|
58
|
+
'<KPICard label="Attendance" value={94.2} onClick={handleClick} />',
|
|
59
|
+
'```',
|
|
60
|
+
'',
|
|
61
|
+
'**`isPercentage` appends `%` to the DOM via a `<span>`.** Do not include `%` in the `value` prop — it will be doubled.',
|
|
62
|
+
'',
|
|
63
|
+
'**`children` renders below the value row**, spanning the full card width.',
|
|
64
|
+
'Use it for trend indicators, progress bars, or supplementary `KVPList` data.',
|
|
65
|
+
'',
|
|
66
|
+
'**`disabled` only has effect when `onClick` is provided.**',
|
|
67
|
+
'Passing `disabled` to a static `KPICard` (no `onClick`) is a no-op.',
|
|
68
|
+
'',
|
|
69
|
+
'---',
|
|
70
|
+
'',
|
|
71
|
+
'### Accessibility',
|
|
72
|
+
'',
|
|
73
|
+
'- Interactive cards receive `role="button"` and `tabIndex={0}` via the underlying `Card`',
|
|
74
|
+
'- Enter and Space trigger the `onClick` handler',
|
|
75
|
+
'- `aria-label` or `aria-labelledby` is **required** on interactive cards',
|
|
76
|
+
'- `aria-disabled={true}` is set on disabled interactive cards',
|
|
77
|
+
'',
|
|
78
|
+
'---',
|
|
79
|
+
'',
|
|
80
|
+
'### TypeScript types',
|
|
81
|
+
'',
|
|
82
|
+
'```ts',
|
|
83
|
+
"import { KPICard } from '@arbor-education/design-system.components';",
|
|
84
|
+
"import type { KPICardProps } from '@arbor-education/design-system.components';",
|
|
85
|
+
'```',
|
|
86
|
+
].join('\n');
|
|
87
|
+
const RELATED_COMPONENTS = [
|
|
88
|
+
'## Related components',
|
|
89
|
+
'',
|
|
90
|
+
'[Card](?path=/docs/components-card--docs) · [ArticleCard](?path=/docs/components-card-articlecard--docs) · [KVPList](?path=/docs/components-kvplist--docs) · [Progress](?path=/docs/components-progress--docs)',
|
|
91
|
+
].join('\n');
|
|
92
|
+
const PROPS_INTRO = 'The preview below is wired to the **Controls** panel — tweak `label`, `value`, `isPercentage`, or `disabled` to see the card update in real time.';
|
|
93
|
+
// ---------------------------------------------------------------------------
|
|
94
|
+
// Custom DocsPage
|
|
95
|
+
// ---------------------------------------------------------------------------
|
|
96
|
+
function KPICardDocsPage() {
|
|
97
|
+
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 })] }));
|
|
98
|
+
}
|
|
99
|
+
// ---------------------------------------------------------------------------
|
|
100
|
+
// Meta
|
|
101
|
+
// ---------------------------------------------------------------------------
|
|
5
102
|
const meta = {
|
|
6
103
|
title: 'Components/Card/KPICard',
|
|
7
104
|
component: KPICard,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
105
|
+
tags: ['autodocs'],
|
|
106
|
+
parameters: {
|
|
107
|
+
layout: 'padded',
|
|
108
|
+
docs: { page: KPICardDocsPage },
|
|
109
|
+
},
|
|
110
|
+
argTypes: {
|
|
111
|
+
'label': {
|
|
112
|
+
control: 'text',
|
|
113
|
+
description: '**Required.** The metric label rendered above the value.',
|
|
114
|
+
table: {
|
|
115
|
+
type: { summary: 'ReactNode' },
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
'value': {
|
|
119
|
+
control: 'text',
|
|
120
|
+
description: '**Required.** The headline metric value. Do not include `%` — use `isPercentage` instead.',
|
|
121
|
+
table: {
|
|
122
|
+
type: { summary: 'ReactNode' },
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
'isPercentage': {
|
|
126
|
+
control: 'boolean',
|
|
127
|
+
description: 'Appends a `%` suffix (`<span class="ds-kpi-card__suffix">`) after the value. Do NOT include `%` in the `value` prop.',
|
|
128
|
+
table: {
|
|
129
|
+
type: { summary: 'boolean' },
|
|
130
|
+
defaultValue: { summary: 'false' },
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
'disabled': {
|
|
134
|
+
control: 'boolean',
|
|
135
|
+
description: 'Disables an interactive card — sets `aria-disabled={true}` and suppresses click/keyboard handling. Has no effect on static cards (no `onClick`).',
|
|
136
|
+
table: {
|
|
137
|
+
type: { summary: 'boolean' },
|
|
138
|
+
defaultValue: { summary: 'false' },
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
'onClick': {
|
|
142
|
+
control: false,
|
|
143
|
+
description: [
|
|
144
|
+
'Click handler. Providing this switches the card to **interactive mode** — it gains `role="button"`,',
|
|
145
|
+
'`tabIndex={0}`, and a chevron/arrow icon. Requires `aria-label` or `aria-labelledby`.',
|
|
146
|
+
].join(' '),
|
|
147
|
+
table: {
|
|
148
|
+
type: { summary: '(e: MouseEvent<HTMLElement>) => void' },
|
|
149
|
+
defaultValue: { summary: 'undefined' },
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
'aria-label': {
|
|
153
|
+
control: 'text',
|
|
154
|
+
description: '**Required on interactive cards** (unless `aria-labelledby` is provided). Accessible name announced by screen readers.',
|
|
155
|
+
table: {
|
|
156
|
+
type: { summary: 'string' },
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
'children': {
|
|
160
|
+
control: false,
|
|
161
|
+
description: 'Optional content rendered below the value row — use for progress bars, trend indicators, or supplementary `KVPList` data.',
|
|
162
|
+
table: {
|
|
163
|
+
type: { summary: 'ReactNode' },
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
'className': {
|
|
167
|
+
control: false,
|
|
168
|
+
description: 'Additional CSS class names on the root element.',
|
|
169
|
+
table: {
|
|
170
|
+
type: { summary: 'string' },
|
|
171
|
+
},
|
|
172
|
+
},
|
|
14
173
|
},
|
|
15
|
-
render: args => (_jsxs(KPICard, { ...args, children: [_jsx(KVPList, { "aria-label": "Summary values", children: _jsxs(KVPList.Row, { orientation: "horizontal", children: [_jsx(KVPList.Term, { children: "Bar label text" }), _jsx(KVPList.Definition, { prominence: "strong", children: "XX.X" })] }) }), _jsxs(KVPList, { "aria-label": "Progress values", children: [_jsxs(KVPList.Row, { orientation: "horizontal", children: [_jsx(KVPList.Term, { children: "Bar label text" }), _jsx(KVPList.Definition, { prominence: "neutral", children: "X" }), _jsx(KVPList.Definition, { "aria-hidden": "true", isRow: true, children: _jsx(Progress, { "aria-label": "Progress bar first", max: 100, value: 95 }) })] }), _jsxs(KVPList.Row, { orientation: "horizontal", children: [_jsx(KVPList.Term, { children: "Bar label text" }), _jsx(KVPList.Definition, { prominence: "neutral", children: "X" }), _jsx(KVPList.Definition, { "aria-hidden": "true", isRow: true, children: _jsx(Progress, { "aria-label": "Progress bar second", max: 100, value: 95 }) })] })] })] })),
|
|
16
174
|
};
|
|
17
175
|
export default meta;
|
|
176
|
+
// ---------------------------------------------------------------------------
|
|
177
|
+
// Helper: attach a per-story description to docs
|
|
178
|
+
// ---------------------------------------------------------------------------
|
|
179
|
+
const withDescription = (story, description) => ({
|
|
180
|
+
...story,
|
|
181
|
+
parameters: {
|
|
182
|
+
...story.parameters,
|
|
183
|
+
docs: { ...story.parameters?.docs, description: { story: description } },
|
|
184
|
+
},
|
|
185
|
+
});
|
|
186
|
+
// ---------------------------------------------------------------------------
|
|
187
|
+
// Template components
|
|
188
|
+
// ---------------------------------------------------------------------------
|
|
189
|
+
const WithChildrenTemplate = () => (_jsx("div", { style: { maxWidth: '320px' }, children: _jsx(KPICard, { label: "Attendance rate", value: 94.2, isPercentage: true, children: _jsxs(KVPList, { children: [_jsxs(KVPList.Row, { children: [_jsx(KVPList.Term, { children: "This week" }), _jsx(KVPList.Definition, { children: "96.1%" })] }), _jsxs(KVPList.Row, { children: [_jsx(KVPList.Term, { children: "Last week" }), _jsx(KVPList.Definition, { children: "92.3%" })] })] }) }) }));
|
|
190
|
+
const WithProgressTemplate = () => (_jsx("div", { style: { maxWidth: '320px' }, children: _jsx(KPICard, { label: "Attendance rate", value: 94.2, isPercentage: true, children: _jsx("div", { style: { marginTop: 'var(--spacing-small)' }, children: _jsx(Progress, { value: 94.2, max: 100 }) }) }) }));
|
|
191
|
+
const MultipleCardsTemplate = () => (_jsxs("div", { style: { display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: 'var(--spacing-medium)' }, children: [_jsx(KPICard, { label: "Total pupils", value: 247 }), _jsx(KPICard, { label: "Attendance rate", value: 94.2, isPercentage: true }), _jsx(KPICard, { label: "Behaviour incidents", value: 3 }), _jsx(KPICard, { label: "Staff present", value: 38 }), _jsx(KPICard, { label: "Pupils on report", value: 12 }), _jsx(KPICard, { label: "Average mark", value: 78, isPercentage: true })] }));
|
|
192
|
+
// ---------------------------------------------------------------------------
|
|
193
|
+
// Stories
|
|
194
|
+
// ---------------------------------------------------------------------------
|
|
195
|
+
export const Default = withDescription({
|
|
196
|
+
args: {
|
|
197
|
+
label: 'Total pupils',
|
|
198
|
+
value: 247,
|
|
199
|
+
isPercentage: false,
|
|
200
|
+
disabled: false,
|
|
201
|
+
},
|
|
202
|
+
render: args => (_jsx("div", { style: { maxWidth: '320px' }, children: _jsx(KPICard, { ...args }) })),
|
|
203
|
+
}, 'The base KPICard — `label` and `value` are the only required props. Toggle `isPercentage` or `disabled` in **Controls**, or change the `label` and `value` text.');
|
|
204
|
+
export const AsPercentage = withDescription({
|
|
205
|
+
parameters: {
|
|
206
|
+
controls: { disable: true },
|
|
207
|
+
docs: {
|
|
208
|
+
source: {
|
|
209
|
+
language: 'tsx',
|
|
210
|
+
code: `
|
|
211
|
+
import { KPICard } from '@arbor-education/design-system.components';
|
|
212
|
+
|
|
213
|
+
function AsPercentageExample() {
|
|
214
|
+
return (
|
|
215
|
+
<KPICard
|
|
216
|
+
label="Attendance rate"
|
|
217
|
+
value={94.2}
|
|
218
|
+
isPercentage
|
|
219
|
+
/>
|
|
220
|
+
);
|
|
221
|
+
}
|
|
222
|
+
export default AsPercentageExample;
|
|
223
|
+
`.trim(),
|
|
224
|
+
},
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
render: () => (_jsx("div", { style: { maxWidth: '320px' }, children: _jsx(KPICard, { label: "Attendance rate", value: 94.2, isPercentage: true }) })),
|
|
228
|
+
}, '`isPercentage` appends a `%` suffix to the value. The `%` is rendered in a separate `<span>` — do NOT include it in the `value` prop or it will appear twice.');
|
|
229
|
+
export const WithChildren = withDescription({
|
|
230
|
+
parameters: {
|
|
231
|
+
controls: { disable: true },
|
|
232
|
+
docs: {
|
|
233
|
+
source: {
|
|
234
|
+
language: 'tsx',
|
|
235
|
+
code: `
|
|
236
|
+
import { KPICard, KVPList } from '@arbor-education/design-system.components';
|
|
237
|
+
|
|
238
|
+
function WithChildrenExample() {
|
|
239
|
+
return (
|
|
240
|
+
<KPICard label="Attendance rate" value={94.2} isPercentage>
|
|
241
|
+
<KVPList>
|
|
242
|
+
<KVPList.Row>
|
|
243
|
+
<KVPList.Term>This week</KVPList.Term>
|
|
244
|
+
<KVPList.Definition>96.1%</KVPList.Definition>
|
|
245
|
+
</KVPList.Row>
|
|
246
|
+
<KVPList.Row>
|
|
247
|
+
<KVPList.Term>Last week</KVPList.Term>
|
|
248
|
+
<KVPList.Definition>92.3%</KVPList.Definition>
|
|
249
|
+
</KVPList.Row>
|
|
250
|
+
</KVPList>
|
|
251
|
+
</KPICard>
|
|
252
|
+
);
|
|
253
|
+
}
|
|
254
|
+
export default WithChildrenExample;
|
|
255
|
+
`.trim(),
|
|
256
|
+
},
|
|
257
|
+
},
|
|
258
|
+
},
|
|
259
|
+
render: WithChildrenTemplate,
|
|
260
|
+
}, '`children` renders below the value row, spanning the full card width. Use it for trend breakdowns (`KVPList`), progress bars, or any supplementary metric context.');
|
|
261
|
+
export const WithProgressBar = withDescription({
|
|
262
|
+
parameters: {
|
|
263
|
+
controls: { disable: true },
|
|
264
|
+
docs: {
|
|
265
|
+
source: {
|
|
266
|
+
language: 'tsx',
|
|
267
|
+
code: `
|
|
268
|
+
import { KPICard, Progress } from '@arbor-education/design-system.components';
|
|
269
|
+
|
|
270
|
+
function WithProgressBarExample() {
|
|
271
|
+
return (
|
|
272
|
+
<KPICard label="Attendance rate" value={94.2} isPercentage>
|
|
273
|
+
<Progress value={94.2} max={100} />
|
|
274
|
+
</KPICard>
|
|
275
|
+
);
|
|
276
|
+
}
|
|
277
|
+
export default WithProgressBarExample;
|
|
278
|
+
`.trim(),
|
|
279
|
+
},
|
|
280
|
+
},
|
|
281
|
+
},
|
|
282
|
+
render: WithProgressTemplate,
|
|
283
|
+
}, 'A `Progress` bar in `children` provides an at-a-glance visual indicator alongside the percentage value.');
|
|
284
|
+
export const Interactive = withDescription({
|
|
285
|
+
parameters: {
|
|
286
|
+
controls: { disable: true },
|
|
287
|
+
docs: {
|
|
288
|
+
source: {
|
|
289
|
+
language: 'tsx',
|
|
290
|
+
code: `
|
|
291
|
+
import { KPICard } from '@arbor-education/design-system.components';
|
|
292
|
+
|
|
293
|
+
function InteractiveExample() {
|
|
294
|
+
return (
|
|
295
|
+
<KPICard
|
|
296
|
+
label="Total pupils"
|
|
297
|
+
value={247}
|
|
298
|
+
onClick={() => console.log('navigate to pupils list')}
|
|
299
|
+
aria-label="View all pupils"
|
|
300
|
+
/>
|
|
301
|
+
);
|
|
302
|
+
}
|
|
303
|
+
export default InteractiveExample;
|
|
304
|
+
`.trim(),
|
|
305
|
+
},
|
|
306
|
+
},
|
|
307
|
+
},
|
|
308
|
+
render: () => (_jsx("div", { style: { maxWidth: '320px' }, children: _jsx(KPICard, { label: "Total pupils", value: 247, onClick: fn(), "aria-label": "View all pupils" }) })),
|
|
309
|
+
}, 'With `onClick`, the card becomes interactive — `role="button"`, `tabIndex={0}`, and a chevron/arrow icon appear. `aria-label` is required and must describe the navigation destination.');
|
|
310
|
+
export const Disabled = withDescription({
|
|
311
|
+
parameters: {
|
|
312
|
+
controls: { disable: true },
|
|
313
|
+
docs: {
|
|
314
|
+
source: {
|
|
315
|
+
language: 'tsx',
|
|
316
|
+
code: `
|
|
317
|
+
import { KPICard } from '@arbor-education/design-system.components';
|
|
318
|
+
|
|
319
|
+
function DisabledExample() {
|
|
320
|
+
return (
|
|
321
|
+
<KPICard
|
|
322
|
+
label="Behaviour incidents"
|
|
323
|
+
value={3}
|
|
324
|
+
onClick={() => console.log('never fires')}
|
|
325
|
+
aria-label="View behaviour incidents"
|
|
326
|
+
disabled
|
|
327
|
+
/>
|
|
328
|
+
);
|
|
329
|
+
}
|
|
330
|
+
export default DisabledExample;
|
|
331
|
+
`.trim(),
|
|
332
|
+
},
|
|
333
|
+
},
|
|
334
|
+
},
|
|
335
|
+
render: () => (_jsx("div", { style: { maxWidth: '320px' }, children: _jsx(KPICard, { label: "Behaviour incidents", value: 3, onClick: fn(), "aria-label": "View behaviour incidents", disabled: true }) })),
|
|
336
|
+
}, '`disabled` on an interactive card — `aria-disabled={true}` is set and click/keyboard handling is suppressed. `onClick` must still be provided to activate the disabled visual state.');
|
|
337
|
+
export const MultipleCards = withDescription({
|
|
338
|
+
parameters: {
|
|
339
|
+
controls: { disable: true },
|
|
340
|
+
docs: {
|
|
341
|
+
source: {
|
|
342
|
+
language: 'tsx',
|
|
343
|
+
code: `
|
|
344
|
+
import { KPICard } from '@arbor-education/design-system.components';
|
|
345
|
+
|
|
346
|
+
function MultipleCardsExample() {
|
|
347
|
+
return (
|
|
348
|
+
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: 'var(--spacing-medium)' }}>
|
|
349
|
+
<KPICard label="Total pupils" value={247} />
|
|
350
|
+
<KPICard label="Attendance rate" value={94.2} isPercentage />
|
|
351
|
+
<KPICard label="Behaviour incidents" value={3} />
|
|
352
|
+
</div>
|
|
353
|
+
);
|
|
354
|
+
}
|
|
355
|
+
export default MultipleCardsExample;
|
|
356
|
+
`.trim(),
|
|
357
|
+
},
|
|
358
|
+
},
|
|
359
|
+
},
|
|
360
|
+
render: MultipleCardsTemplate,
|
|
361
|
+
}, 'Multiple `KPICard` tiles in a CSS grid — the typical dashboard layout. Each card is self-contained and can independently be static or interactive.');
|
|
18
362
|
//# sourceMappingURL=KPICard.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KPICard.stories.js","sourceRoot":"","sources":["../../../src/components/kpiCard/KPICard.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"KPICard.stories.js","sourceRoot":"","sources":["../../../src/components/kpiCard/KPICard.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EACL,QAAQ,EACR,OAAO,IAAI,UAAU,EACrB,QAAQ,EACR,OAAO,IAAI,UAAU,EACrB,OAAO,EACP,QAAQ,EACR,KAAK,GACN,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAErD,8EAA8E;AAC9E,oBAAoB;AACpB,8EAA8E;AAE9E,MAAM,iBAAiB,GAAG;IACxB,yGAAyG;IACzG,qFAAqF;IACrF,8FAA8F;CAC/F,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEZ,MAAM,cAAc,GAAG;IACrB,iBAAiB;IACjB,EAAE;IACF,4FAA4F;IAC5F,6EAA6E;IAC7E,sGAAsG;IACtG,EAAE;IACF,KAAK;IACL,EAAE;IACF,qBAAqB;IACrB,EAAE;IACF,6BAA6B;IAC7B,WAAW;IACX,0FAA0F;IAC1F,0GAA0G;IAC1G,4EAA4E;IAC5E,mEAAmE;CACpE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb,MAAM,eAAe,GAAG;IACtB,6BAA6B;IAC7B,EAAE;IACF,sFAAsF;IACtF,oFAAoF;IACpF,EAA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E,IAAI,EAAE;QAC3B,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE;;;;;;;;;;;;;CAaf,CAAC,IAAI,EAAE;aACC;SACF;KACF;IACD,MAAM,EAAE,qBAAqB;CAC9B,EACD,oJAAoJ,CACrJ,CAAC"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { KVPList } from './KVPList';
|
|
3
|
+
declare function KVPListDocsPage(): import("react/jsx-runtime").JSX.Element;
|
|
2
4
|
declare const meta: {
|
|
3
5
|
title: string;
|
|
4
6
|
component: {
|
|
@@ -18,10 +20,61 @@ declare const meta: {
|
|
|
18
20
|
displayName: string;
|
|
19
21
|
};
|
|
20
22
|
};
|
|
23
|
+
tags: string[];
|
|
24
|
+
parameters: {
|
|
25
|
+
layout: string;
|
|
26
|
+
docs: {
|
|
27
|
+
page: typeof KVPListDocsPage;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
argTypes: {
|
|
31
|
+
'aria-label': {
|
|
32
|
+
control: "text";
|
|
33
|
+
description: string;
|
|
34
|
+
table: {
|
|
35
|
+
type: {
|
|
36
|
+
summary: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
'aria-labelledby': {
|
|
41
|
+
control: false;
|
|
42
|
+
description: string;
|
|
43
|
+
table: {
|
|
44
|
+
type: {
|
|
45
|
+
summary: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
className: {
|
|
50
|
+
control: false;
|
|
51
|
+
description: string;
|
|
52
|
+
table: {
|
|
53
|
+
type: {
|
|
54
|
+
summary: string;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
children: {
|
|
59
|
+
control: false;
|
|
60
|
+
description: string;
|
|
61
|
+
table: {
|
|
62
|
+
type: {
|
|
63
|
+
summary: string;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
};
|
|
21
68
|
};
|
|
22
|
-
type Story = StoryObj<typeof meta>;
|
|
23
|
-
export declare const Summary: Story;
|
|
24
|
-
export declare const WithProgressAndPercentage: Story;
|
|
25
|
-
export declare const WithProgressNoPercentage: Story;
|
|
26
69
|
export default meta;
|
|
70
|
+
type Story = StoryObj<typeof KVPList>;
|
|
71
|
+
export declare const Default: Story;
|
|
72
|
+
export declare const HorizontalOrientation: Story;
|
|
73
|
+
export declare const StrongProminence: Story;
|
|
74
|
+
export declare const IsRow: Story;
|
|
75
|
+
export declare const AsPercentage: Story;
|
|
76
|
+
export declare const MultipleRows: Story;
|
|
77
|
+
export declare const MixedOrientations: Story;
|
|
78
|
+
export declare const WithAriaLabel: Story;
|
|
79
|
+
export declare const WithProgressBars: Story;
|
|
27
80
|
//# sourceMappingURL=KVPList.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KVPList.stories.d.ts","sourceRoot":"","sources":["../../../src/components/kvpList/KVPList.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"KVPList.stories.d.ts","sourceRoot":"","sources":["../../../src/components/kvpList/KVPList.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAW5D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAsHpC,iBAAS,eAAe,4CAyBvB;AAMD,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BsB,CAAC;AAEjC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,OAAO,CAAC,CAAC;AAoFtC,eAAO,MAAM,OAAO,EAAE,KAarB,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,KAuCnC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAuC9B,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KA0CnB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KA4C1B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAoC1B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAgC/B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAgD3B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KA+B9B,CAAC"}
|