@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,65 +1,375 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
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';
|
|
2
4
|
import { Row } from './Row';
|
|
5
|
+
// ---------------------------------------------------------------------------
|
|
6
|
+
// Content strings for the custom DocsPage
|
|
7
|
+
// ---------------------------------------------------------------------------
|
|
8
|
+
const DESCRIPTION_INTRO = [
|
|
9
|
+
'`Row` is a single-line display component used to present a labelled piece of data — optionally with a supporting note — inside summary panels, detail cards, or any section-style layout.',
|
|
10
|
+
'When an `onClick` handler is provided the row becomes fully interactive: it gains hover and focus styles, renders a pair of animated directional icons, and responds to keyboard activation via **Enter** and **Space**.',
|
|
11
|
+
].join(' ');
|
|
12
|
+
const PROPS_INTRO = 'The preview below is wired to the **Controls** panel — tweak any prop to see the story update in real time.';
|
|
13
|
+
const USAGE_GUIDANCE = [
|
|
14
|
+
'### When to use',
|
|
15
|
+
'',
|
|
16
|
+
'- Displaying a labelled piece of read-only data inside a detail panel or summary card (e.g. "Year group · Year 9").',
|
|
17
|
+
'- Rendering a list of named data points where a consistent label/value layout improves scannability.',
|
|
18
|
+
'- Providing a tappable/clickable drill-down link to a related record or page when `onClick` is supplied.',
|
|
19
|
+
'- Showing supplementary context alongside a value (e.g. a last-updated timestamp in the `note` slot).',
|
|
20
|
+
'',
|
|
21
|
+
'---',
|
|
22
|
+
'',
|
|
23
|
+
'### When NOT to use',
|
|
24
|
+
'',
|
|
25
|
+
'| Situation | Use instead |',
|
|
26
|
+
'|---|---|',
|
|
27
|
+
'| Navigation links | Native `<a>` or router `<Link>` — a `div` with `onClick` is not a true anchor |',
|
|
28
|
+
'| Tabular data with sortable columns | [`Table`](?path=/docs/components-table--docs) |',
|
|
29
|
+
'| Toggling or selecting items | Checkbox or radio group |',
|
|
30
|
+
'| Form controls | [`FormField`](?path=/docs/components-formfield--docs) with an appropriate input |',
|
|
31
|
+
].join('\n');
|
|
32
|
+
const DEVELOPER_NOTES = [
|
|
33
|
+
'### Clickable vs static rows',
|
|
34
|
+
'',
|
|
35
|
+
'The `onClick` prop is the **sole toggle** for all clickable behaviour — there is no separate `isClickable` prop or variant enum.',
|
|
36
|
+
'',
|
|
37
|
+
'| State | `tabIndex` | CSS modifier | Icons rendered |',
|
|
38
|
+
'|---|---|---|---|',
|
|
39
|
+
'| Static | `-1` (not in tab order) | — | None |',
|
|
40
|
+
'| Clickable | `0` (in tab order) | `ds-row--clickable` | `chevron-right` + `arrow-right` |',
|
|
41
|
+
'',
|
|
42
|
+
'**Dual-icon swap:** Both icons are always rendered when `onClick` is provided, but CSS controls their visibility:',
|
|
43
|
+
'',
|
|
44
|
+
'- **At rest:** `chevron-right` is visible; `arrow-right` is hidden via `display: none`.',
|
|
45
|
+
'- **On hover / focus:** `chevron-right` is hidden; `arrow-right` becomes visible.',
|
|
46
|
+
'',
|
|
47
|
+
'This swap is driven entirely by CSS — no JavaScript state is involved.',
|
|
48
|
+
'',
|
|
49
|
+
'---',
|
|
50
|
+
'',
|
|
51
|
+
'### Keyboard activation',
|
|
52
|
+
'',
|
|
53
|
+
'Clickable rows respond to **Enter** and **Space** keydown events by firing the `onClick` handler.',
|
|
54
|
+
'',
|
|
55
|
+
'---',
|
|
56
|
+
'',
|
|
57
|
+
'### Accessibility gap',
|
|
58
|
+
'',
|
|
59
|
+
'> **Known limitation:** Clickable `Row` instances render as a `<div>` with no `role="button"` attribute.',
|
|
60
|
+
'> Screen readers will not announce the element as a button, and `getByRole("button")` will not find it.',
|
|
61
|
+
'',
|
|
62
|
+
'`Row` does **not** spread arbitrary HTML attributes. The `className` prop is the only escape hatch.',
|
|
63
|
+
'Consumers **cannot** add `aria-label`, `aria-describedby`, `data-testid`, or any HTML attribute without modifying the component source.',
|
|
64
|
+
'These are documented design-debt items for a future accessibility audit.',
|
|
65
|
+
'',
|
|
66
|
+
'---',
|
|
67
|
+
'',
|
|
68
|
+
'### TypeScript types',
|
|
69
|
+
'',
|
|
70
|
+
'```ts',
|
|
71
|
+
"import { Row } from '@arbor-education/design-system.components';",
|
|
72
|
+
"import type { RowProps } from '@arbor-education/design-system.components';",
|
|
73
|
+
'',
|
|
74
|
+
'type RowProps = {',
|
|
75
|
+
' className?: string;',
|
|
76
|
+
' label?: string;',
|
|
77
|
+
' value?: string;',
|
|
78
|
+
' note?: string;',
|
|
79
|
+
' onClick?: MouseEventHandler<HTMLDivElement>;',
|
|
80
|
+
'};',
|
|
81
|
+
'```',
|
|
82
|
+
].join('\n');
|
|
83
|
+
const RELATED_COMPONENTS = [
|
|
84
|
+
'## Related components',
|
|
85
|
+
'',
|
|
86
|
+
'[Section](?path=/docs/components-section--docs) · [Card](?path=/docs/components-card--docs) · [Table](?path=/docs/components-table--docs)',
|
|
87
|
+
].join('\n');
|
|
88
|
+
// ---------------------------------------------------------------------------
|
|
89
|
+
// Custom DocsPage
|
|
90
|
+
// ---------------------------------------------------------------------------
|
|
91
|
+
function RowDocsPage() {
|
|
92
|
+
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 })] }));
|
|
93
|
+
}
|
|
94
|
+
// ---------------------------------------------------------------------------
|
|
95
|
+
// Meta
|
|
96
|
+
// ---------------------------------------------------------------------------
|
|
3
97
|
const meta = {
|
|
4
98
|
title: 'Components/Row',
|
|
5
99
|
component: Row,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
note: 'Note',
|
|
100
|
+
tags: ['autodocs'],
|
|
101
|
+
parameters: {
|
|
102
|
+
docs: {
|
|
103
|
+
page: RowDocsPage,
|
|
104
|
+
},
|
|
12
105
|
},
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
106
|
+
argTypes: {
|
|
107
|
+
label: {
|
|
108
|
+
description: [
|
|
109
|
+
'The left-hand label that identifies the data point.',
|
|
110
|
+
'Renders inside a `<span>` with a minimum width of 190 px so labels align consistently across stacked rows.',
|
|
111
|
+
].join(' '),
|
|
112
|
+
control: 'text',
|
|
113
|
+
table: {
|
|
114
|
+
type: { summary: 'string' },
|
|
115
|
+
defaultValue: { summary: 'undefined' },
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
value: {
|
|
119
|
+
description: [
|
|
120
|
+
'The right-hand value corresponding to the label.',
|
|
121
|
+
'Renders in the centre column with `flex-grow: 1`, filling available width.',
|
|
122
|
+
].join(' '),
|
|
123
|
+
control: 'text',
|
|
124
|
+
table: {
|
|
125
|
+
type: { summary: 'string' },
|
|
126
|
+
defaultValue: { summary: 'undefined' },
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
note: {
|
|
130
|
+
description: [
|
|
131
|
+
'Optional supplementary text rendered after the value — displayed in italics.',
|
|
132
|
+
'Useful for timestamps, caveats, or secondary context.',
|
|
133
|
+
].join(' '),
|
|
134
|
+
control: 'text',
|
|
135
|
+
table: {
|
|
136
|
+
type: { summary: 'string' },
|
|
137
|
+
defaultValue: { summary: 'undefined' },
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
onClick: {
|
|
141
|
+
description: [
|
|
142
|
+
'When provided, the row becomes interactive: it enters the tab order (`tabIndex={0}`),',
|
|
143
|
+
'gains the `ds-row--clickable` modifier, shows hover/focus styles, and renders dual directional icons.',
|
|
144
|
+
'Supports **Enter** and **Space** keyboard activation.',
|
|
145
|
+
].join(' '),
|
|
146
|
+
action: 'onClick',
|
|
147
|
+
control: false,
|
|
148
|
+
table: {
|
|
149
|
+
type: { summary: 'MouseEventHandler<HTMLDivElement>' },
|
|
150
|
+
defaultValue: { summary: 'undefined' },
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
className: {
|
|
154
|
+
description: [
|
|
155
|
+
'Additional CSS class names applied to the root `<div>`.',
|
|
156
|
+
'This is the only HTML-attribute escape hatch — arbitrary HTML attributes cannot be passed via props.',
|
|
157
|
+
].join(' '),
|
|
158
|
+
control: 'text',
|
|
159
|
+
table: {
|
|
160
|
+
type: { summary: 'string' },
|
|
161
|
+
defaultValue: { summary: 'undefined' },
|
|
162
|
+
},
|
|
163
|
+
},
|
|
17
164
|
},
|
|
18
165
|
};
|
|
19
|
-
export
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
166
|
+
export default meta;
|
|
167
|
+
// ---------------------------------------------------------------------------
|
|
168
|
+
// Helper
|
|
169
|
+
// ---------------------------------------------------------------------------
|
|
170
|
+
const withDescription = (story, description) => ({
|
|
171
|
+
...story,
|
|
172
|
+
parameters: {
|
|
173
|
+
...story.parameters,
|
|
174
|
+
docs: { ...story.parameters?.docs, description: { story: description } },
|
|
23
175
|
},
|
|
24
|
-
};
|
|
25
|
-
|
|
176
|
+
});
|
|
177
|
+
// ---------------------------------------------------------------------------
|
|
178
|
+
// Stories
|
|
179
|
+
// ---------------------------------------------------------------------------
|
|
180
|
+
export const Default = withDescription({
|
|
26
181
|
args: {
|
|
27
|
-
label: '
|
|
28
|
-
value: '
|
|
29
|
-
note: '
|
|
182
|
+
label: 'Year group',
|
|
183
|
+
value: 'Year 9',
|
|
184
|
+
note: 'Set 2',
|
|
185
|
+
onClick: fn(),
|
|
30
186
|
},
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
187
|
+
render: args => _jsx(Row, { ...args }),
|
|
188
|
+
}, 'The default story is wired to the Controls panel. By default it is clickable — remove `onClick` from the controls to switch to static mode and observe how the icons and hover behaviour disappear.');
|
|
189
|
+
export const LabelOnly = withDescription({
|
|
190
|
+
parameters: {
|
|
191
|
+
controls: { disable: true },
|
|
192
|
+
docs: {
|
|
193
|
+
source: {
|
|
194
|
+
language: 'tsx',
|
|
195
|
+
code: `
|
|
196
|
+
import { Row } from '@arbor-education/design-system.components';
|
|
197
|
+
|
|
198
|
+
function EnrolmentStatusRow() {
|
|
199
|
+
return <Row label="Enrolment status" />;
|
|
200
|
+
}
|
|
201
|
+
export default EnrolmentStatusRow;
|
|
202
|
+
`.trim(),
|
|
203
|
+
},
|
|
204
|
+
},
|
|
37
205
|
},
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
206
|
+
render: () => _jsx(Row, { label: "Enrolment status" }),
|
|
207
|
+
}, 'Minimum meaningful render — a label with no value or note. Both sibling `<span>` elements still render in the DOM (they are unconditionally present), but remain empty.');
|
|
208
|
+
export const LabelAndValue = withDescription({
|
|
209
|
+
parameters: {
|
|
210
|
+
controls: { disable: true },
|
|
211
|
+
docs: {
|
|
212
|
+
source: {
|
|
213
|
+
language: 'tsx',
|
|
214
|
+
code: `
|
|
215
|
+
import { Row } from '@arbor-education/design-system.components';
|
|
216
|
+
|
|
217
|
+
function DateOfBirthRow() {
|
|
218
|
+
return <Row label="Date of birth" value="14 March 2009" />;
|
|
219
|
+
}
|
|
220
|
+
export default DateOfBirthRow;
|
|
221
|
+
`.trim(),
|
|
222
|
+
},
|
|
223
|
+
},
|
|
45
224
|
},
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
225
|
+
render: () => _jsx(Row, { label: "Date of birth", value: "14 March 2009" }),
|
|
226
|
+
}, 'The canonical two-column layout. The label column enforces a minimum width of 190 px so values align consistently when multiple rows are stacked.');
|
|
227
|
+
export const WithNote = withDescription({
|
|
228
|
+
parameters: {
|
|
229
|
+
controls: { disable: true },
|
|
230
|
+
docs: {
|
|
231
|
+
source: {
|
|
232
|
+
language: 'tsx',
|
|
233
|
+
code: `
|
|
234
|
+
import { Row } from '@arbor-education/design-system.components';
|
|
235
|
+
|
|
236
|
+
function AttendanceRow() {
|
|
237
|
+
return (
|
|
238
|
+
<Row
|
|
239
|
+
label="Attendance this term"
|
|
240
|
+
value="91.4%"
|
|
241
|
+
note="Below school target of 95%"
|
|
242
|
+
/>
|
|
243
|
+
);
|
|
244
|
+
}
|
|
245
|
+
export default AttendanceRow;
|
|
246
|
+
`.trim(),
|
|
247
|
+
},
|
|
248
|
+
},
|
|
52
249
|
},
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
250
|
+
render: () => (_jsx(Row, { label: "Attendance this term", value: "91.4%", note: "Below school target of 95%" })),
|
|
251
|
+
}, 'Adding a `note` renders supplementary italic text alongside the value. Use it for thresholds, last-updated timestamps, or secondary context that helps a user interpret the value.');
|
|
252
|
+
export const Clickable = withDescription({
|
|
253
|
+
parameters: {
|
|
254
|
+
controls: { disable: true },
|
|
255
|
+
docs: {
|
|
256
|
+
source: {
|
|
257
|
+
language: 'tsx',
|
|
258
|
+
code: `
|
|
259
|
+
import { Row } from '@arbor-education/design-system.components';
|
|
260
|
+
|
|
261
|
+
function ClassRow() {
|
|
262
|
+
return (
|
|
263
|
+
<Row
|
|
264
|
+
label="Class"
|
|
265
|
+
value="9B/En1 — English"
|
|
266
|
+
onClick={() => navigateToClassDetail('9B-En1')}
|
|
267
|
+
/>
|
|
268
|
+
);
|
|
269
|
+
}
|
|
270
|
+
export default ClassRow;
|
|
271
|
+
`.trim(),
|
|
272
|
+
},
|
|
273
|
+
},
|
|
59
274
|
},
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
275
|
+
render: () => (_jsx(Row, { label: "Class", value: "9B/En1 \u2014 English", onClick: fn() })),
|
|
276
|
+
}, 'Providing an `onClick` handler activates all clickable behaviour: the row gains `ds-row--clickable`, enters the tab order, shows hover/focus styles, and renders the dual-icon pair. **Hover the row** to see the icon swap from `chevron-right` to `arrow-right`. Press **Enter** or **Space** to fire the handler.');
|
|
277
|
+
export const ClickableWithNote = withDescription({
|
|
278
|
+
parameters: {
|
|
279
|
+
controls: { disable: true },
|
|
280
|
+
docs: {
|
|
281
|
+
source: {
|
|
282
|
+
language: 'tsx',
|
|
283
|
+
code: `
|
|
284
|
+
import { Row } from '@arbor-education/design-system.components';
|
|
285
|
+
|
|
286
|
+
function GuardianRow() {
|
|
287
|
+
return (
|
|
288
|
+
<Row
|
|
289
|
+
label="Guardian"
|
|
290
|
+
value="Sarah Okafor"
|
|
291
|
+
note="Primary contact"
|
|
292
|
+
onClick={() => navigateToContact('guardian-42')}
|
|
293
|
+
/>
|
|
294
|
+
);
|
|
295
|
+
}
|
|
296
|
+
export default GuardianRow;
|
|
297
|
+
`.trim(),
|
|
298
|
+
},
|
|
299
|
+
},
|
|
300
|
+
},
|
|
301
|
+
render: () => (_jsx(Row, { label: "Guardian", value: "Sarah Okafor", note: "Primary contact", onClick: fn() })),
|
|
302
|
+
}, 'All four content props used together with a clickable row. The note remains visible while the row is fully interactive — useful when secondary context (like "Primary contact") helps the user decide whether to navigate.');
|
|
303
|
+
export const LongContent = withDescription({
|
|
304
|
+
parameters: {
|
|
305
|
+
controls: { disable: true },
|
|
306
|
+
docs: {
|
|
307
|
+
source: {
|
|
308
|
+
language: 'tsx',
|
|
309
|
+
code: `
|
|
310
|
+
import { Row } from '@arbor-education/design-system.components';
|
|
311
|
+
|
|
312
|
+
function LongContentExample() {
|
|
313
|
+
return (
|
|
314
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: 'var(--spacing-small)' }}>
|
|
315
|
+
<Row
|
|
316
|
+
label="Special educational needs and disabilities coordinator"
|
|
317
|
+
value="Mrs Jacqueline Abernathy-Thornton"
|
|
318
|
+
note="Updated 3 January 2026"
|
|
319
|
+
/>
|
|
320
|
+
<Row
|
|
321
|
+
label="Pupil premium eligibility reason"
|
|
322
|
+
value="Free school meals — ever 6"
|
|
323
|
+
note="Verified by LA"
|
|
324
|
+
onClick={() => navigateToEligibilityDetail()}
|
|
325
|
+
/>
|
|
326
|
+
</div>
|
|
327
|
+
);
|
|
328
|
+
}
|
|
329
|
+
export default LongContentExample;
|
|
330
|
+
`.trim(),
|
|
331
|
+
},
|
|
332
|
+
},
|
|
333
|
+
},
|
|
334
|
+
render: () => (_jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: 'var(--spacing-small)' }, children: [_jsx(Row, { label: "Special educational needs and disabilities coordinator", value: "Mrs Jacqueline Abernathy-Thornton", note: "Updated 3 January 2026" }), _jsx(Row, { label: "Pupil premium eligibility reason", value: "Free school meals \u2014 ever 6", note: "Verified by LA", onClick: fn() })] })),
|
|
335
|
+
}, 'Long label and value strings exercise the flex layout. The label column maintains its 190 px minimum width, which may compress the value column significantly in narrow containers.');
|
|
336
|
+
export const MultipleRows = withDescription({
|
|
337
|
+
parameters: {
|
|
338
|
+
controls: { disable: true },
|
|
339
|
+
docs: {
|
|
340
|
+
source: {
|
|
341
|
+
language: 'tsx',
|
|
342
|
+
code: `
|
|
343
|
+
import { Row } from '@arbor-education/design-system.components';
|
|
344
|
+
|
|
345
|
+
function PupilDetailPanel() {
|
|
346
|
+
return (
|
|
347
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: 'var(--spacing-small)' }}>
|
|
348
|
+
<Row label="Pupil" value="Amara Osei-Bonsu" />
|
|
349
|
+
<Row label="Year group" value="Year 10" />
|
|
350
|
+
<Row label="Form" value="10JH" />
|
|
351
|
+
<Row label="Admission number" value="001847" />
|
|
352
|
+
<Row label="UPN" value="A823456789012" />
|
|
353
|
+
<Row
|
|
354
|
+
label="SEN status"
|
|
355
|
+
value="SEN Support"
|
|
356
|
+
note="Review due May 2026"
|
|
357
|
+
onClick={() => navigateToSENRecord()}
|
|
358
|
+
/>
|
|
359
|
+
<Row
|
|
360
|
+
label="Attendance (YTD)"
|
|
361
|
+
value="88.3%"
|
|
362
|
+
note="Below 90% threshold"
|
|
363
|
+
onClick={() => navigateToAttendance()}
|
|
364
|
+
/>
|
|
365
|
+
</div>
|
|
366
|
+
);
|
|
367
|
+
}
|
|
368
|
+
export default PupilDetailPanel;
|
|
369
|
+
`.trim(),
|
|
370
|
+
},
|
|
371
|
+
},
|
|
372
|
+
},
|
|
373
|
+
render: () => (_jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: 'var(--spacing-small)' }, children: [_jsx(Row, { label: "Pupil", value: "Amara Osei-Bonsu" }), _jsx(Row, { label: "Year group", value: "Year 10" }), _jsx(Row, { label: "Form", value: "10JH" }), _jsx(Row, { label: "Admission number", value: "001847" }), _jsx(Row, { label: "UPN", value: "A823456789012" }), _jsx(Row, { label: "SEN status", value: "SEN Support", note: "Review due May 2026", onClick: fn() }), _jsx(Row, { label: "Attendance (YTD)", value: "88.3%", note: "Below 90% threshold", onClick: fn() })] })),
|
|
374
|
+
}, 'A realistic pupil detail panel — the most common real-world usage. Static and clickable rows can be freely mixed. The `gap: var(--spacing-small)` wrapper token matches the spacing the component uses internally, keeping visual rhythm consistent.');
|
|
65
375
|
//# sourceMappingURL=Row.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Row.stories.js","sourceRoot":"","sources":["../../../src/components/row/Row.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,MAAM,IAAI,GAAqB;IAC7B,KAAK,EAAE,gBAAgB;IACvB,SAAS,EAAE,GAAG;
|
|
1
|
+
{"version":3,"file":"Row.stories.js","sourceRoot":"","sources":["../../../src/components/row/Row.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EACL,QAAQ,EACR,OAAO,IAAI,UAAU,EACr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K,EAAC,kBAAkB,GAAG,EAC9C,KAAC,GAAG,IAAC,KAAK,EAAC,YAAY,EAAC,KAAK,EAAC,SAAS,GAAG,EAC1C,KAAC,GAAG,IAAC,KAAK,EAAC,MAAM,EAAC,KAAK,EAAC,MAAM,GAAG,EACjC,KAAC,GAAG,IAAC,KAAK,EAAC,kBAAkB,EAAC,KAAK,EAAC,QAAQ,GAAG,EAC/C,KAAC,GAAG,IAAC,KAAK,EAAC,KAAK,EAAC,KAAK,EAAC,eAAe,GAAG,EACzC,KAAC,GAAG,IACF,KAAK,EAAC,YAAY,EAClB,KAAK,EAAC,aAAa,EACnB,IAAI,EAAC,qBAAqB,EAC1B,OAAO,EAAE,EAAE,EAAE,GACb,EACF,KAAC,GAAG,IACF,KAAK,EAAC,kBAAkB,EACxB,KAAK,EAAC,OAAO,EACb,IAAI,EAAC,qBAAqB,EAC1B,OAAO,EAAE,EAAE,EAAE,GACb,IACE,CACP;CACF,EACD,sPAAsP,CACvP,CAAC"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { SearchBar } from './SearchBar';
|
|
3
|
+
declare function SearchBarDocsPage(): import("react/jsx-runtime").JSX.Element;
|
|
2
4
|
declare const meta: {
|
|
3
5
|
title: string;
|
|
4
6
|
component: (props: {
|
|
@@ -8,39 +10,85 @@ declare const meta: {
|
|
|
8
10
|
hoverText?: string;
|
|
9
11
|
alwaysOpen?: boolean;
|
|
10
12
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
tags: string[];
|
|
11
14
|
parameters: {
|
|
12
15
|
layout: string;
|
|
16
|
+
docs: {
|
|
17
|
+
page: typeof SearchBarDocsPage;
|
|
18
|
+
};
|
|
13
19
|
};
|
|
14
|
-
tags: string[];
|
|
15
20
|
argTypes: {
|
|
16
21
|
searchValue: {
|
|
17
22
|
control: "text";
|
|
18
23
|
description: string;
|
|
24
|
+
table: {
|
|
25
|
+
type: {
|
|
26
|
+
summary: string;
|
|
27
|
+
};
|
|
28
|
+
defaultValue: {
|
|
29
|
+
summary: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
19
32
|
};
|
|
20
33
|
setSearchValue: {
|
|
34
|
+
control: false;
|
|
21
35
|
action: string;
|
|
22
36
|
description: string;
|
|
37
|
+
table: {
|
|
38
|
+
type: {
|
|
39
|
+
summary: string;
|
|
40
|
+
};
|
|
41
|
+
defaultValue: {
|
|
42
|
+
summary: string;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
23
45
|
};
|
|
24
46
|
placeholderText: {
|
|
25
47
|
control: "text";
|
|
26
48
|
description: string;
|
|
49
|
+
table: {
|
|
50
|
+
type: {
|
|
51
|
+
summary: string;
|
|
52
|
+
};
|
|
53
|
+
defaultValue: {
|
|
54
|
+
summary: string;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
27
57
|
};
|
|
28
58
|
hoverText: {
|
|
29
59
|
control: "text";
|
|
30
60
|
description: string;
|
|
61
|
+
table: {
|
|
62
|
+
type: {
|
|
63
|
+
summary: string;
|
|
64
|
+
};
|
|
65
|
+
defaultValue: {
|
|
66
|
+
summary: string;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
31
69
|
};
|
|
32
70
|
alwaysOpen: {
|
|
33
71
|
control: "boolean";
|
|
34
72
|
description: string;
|
|
73
|
+
table: {
|
|
74
|
+
type: {
|
|
75
|
+
summary: string;
|
|
76
|
+
};
|
|
77
|
+
defaultValue: {
|
|
78
|
+
summary: string;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
35
81
|
};
|
|
36
82
|
};
|
|
37
83
|
};
|
|
38
84
|
export default meta;
|
|
39
|
-
type Story = StoryObj<typeof
|
|
85
|
+
type Story = StoryObj<typeof SearchBar>;
|
|
40
86
|
export declare const Default: Story;
|
|
41
|
-
export declare const
|
|
87
|
+
export declare const WithPlaceholderText: Story;
|
|
42
88
|
export declare const WithHoverText: Story;
|
|
43
|
-
export declare const
|
|
89
|
+
export declare const WithHoverTextOnly: Story;
|
|
44
90
|
export declare const WithSearchValue: Story;
|
|
45
91
|
export declare const AlwaysOpen: Story;
|
|
92
|
+
export declare const AlwaysOpenWithValue: Story;
|
|
93
|
+
export declare const ControlledByParent: Story;
|
|
46
94
|
//# sourceMappingURL=SearchBar.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchBar.stories.d.ts","sourceRoot":"","sources":["../../../src/components/searchBar/SearchBar.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SearchBar.stories.d.ts","sourceRoot":"","sources":["../../../src/components/searchBar/SearchBar.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAW5D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AA2FxC,iBAAS,iBAAiB,4CAmBzB;AAMD,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwEwB,CAAC;AAEnC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,SAAS,CAAC,CAAC;AA2IxC,eAAO,MAAM,OAAO,EAAE,KAiBrB,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KAiCjC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAkC3B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAiC/B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAmC7B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAoCxB,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KAmCjC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAuChC,CAAC"}
|