@registrucentras/rc-ses-react-components 2.0.0-rc.6 → 2.0.0-rc.8
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/dist/components/common/Accordion/hooks/useAccordionController.d.ts +2 -2
- package/dist/components/common/Accordion/types/AccordionControllerState.d.ts +2 -2
- package/dist/components/common/AdvancedList/components/AdvancedListItem/AdvancedListItem.types.d.ts +2 -2
- package/dist/components/common/AdvancedList/components/AdvancedListItem/components/AdvancedListItemLeading.d.ts +2 -2
- package/dist/components/common/AdvancedList/components/AdvancedListItem/components/AdvancedListItemTrailing.d.ts +2 -2
- package/dist/components/common/Badge/index.d.ts +2 -2
- package/dist/components/common/Breadcrumbs/index.d.ts +4 -4
- package/dist/components/common/Card/index.d.ts +2 -2
- package/dist/components/common/CardShell/CardFooter/index.d.ts +1 -1
- package/dist/components/common/CardShell/CardFooter/types.d.ts +4 -9
- package/dist/components/common/CardShell/types.d.ts +4 -4
- package/dist/components/common/IconWithCircularBackground.d.ts +2 -2
- package/dist/components/common/IconWithSquareBackground/index.d.ts +2 -2
- package/dist/components/common/ImageCard/index.d.ts +2 -2
- package/dist/components/common/SelectableCardList/components/SelectableCardListItem.d.ts +2 -2
- package/dist/components/common/SelectableCardList/index.d.ts +2 -2
- package/dist/components/common/ServiceLinks/types.d.ts +6 -6
- package/dist/components/common/SideNav/SideNav.types.d.ts +7 -5
- package/dist/components/common/SideNav/SideNavLayout.d.ts +1 -1
- package/dist/components/common/SideNav/components/SideNavPill.d.ts +2 -2
- package/dist/components/common/SideNav/components/SideNavPillList.d.ts +2 -2
- package/dist/components/common/SideNav/components/SideNavRow.d.ts +4 -3
- package/dist/components/common/SideNav/hooks/useKeepActiveItemInView.d.ts +19 -0
- package/dist/components/common/SideNav/hooks/useSideNavScrollSpy.d.ts +2 -2
- package/dist/components/common/SideNav/index.d.ts +2 -2
- package/dist/components/common/Tabs/TabPanel.d.ts +2 -2
- package/dist/components/common/Tabs/TabsWrapper.d.ts +2 -2
- package/dist/components/common/TitleBlock/types.d.ts +4 -4
- package/dist/components/form/components/FormControlWrapper/components/FieldSuffix.d.ts +2 -2
- package/dist/components/form/components/FormControlWrapper/index.d.ts +2 -2
- package/dist/components/form/inputs/RadioButtonGroup.d.ts +3 -3
- package/dist/components/form/inputs/SearchableField.d.ts +2 -2
- package/dist/components/form/inputs/Select/Select.types.d.ts +2 -2
- package/dist/components/layout/Footer/index.d.ts +2 -2
- package/dist/components/layout/ServiceFormActions.d.ts +2 -2
- package/dist/components/layout/ServiceFormContainer/AccordionFormContainer/components/AccordionCollapseControls.d.ts +2 -2
- package/dist/components/layout/ServiceFormContainer/AccordionFormContainer/index.d.ts +2 -2
- package/dist/components/layout/ServiceHeader.d.ts +2 -2
- package/dist/components/layout/ServicePage.d.ts +2 -2
- package/dist/components/utils/normalizeSx.d.ts +1 -1
- package/dist/library/types.d.ts +2 -2
- package/dist/registrucentras-rc-ses-react-components.cjs +1 -1
- package/dist/registrucentras-rc-ses-react-components.js +1767 -1672
- package/dist/theme/cards.d.ts +4 -0
- package/dist/types/assets/IconProps.d.ts +2 -2
- package/dist/types/cards/CardServiceProps.d.ts +2 -2
- package/dist/types/common/QuickLinkType.d.ts +2 -2
- package/dist/types/inputs/InputIconProps.d.ts +2 -2
- package/dist/types/lists/ListNewsItemType.d.ts +2 -2
- package/dist/types/lists/ListServicesItemType.d.ts +3 -3
- package/package.json +2 -1
- package/src/components/common/Accordion/hooks/useAccordionController.tsx +1 -1
- package/src/components/common/Accordion/index.tsx +1 -4
- package/src/components/common/Accordion/types/AccordionControllerState.ts +1 -1
- package/src/components/common/AdvancedList/components/AdvancedListItem/AdvancedListItem.types.ts +1 -1
- package/src/components/common/AdvancedList/components/AdvancedListItem/components/AdvancedListItemLeading.tsx +1 -1
- package/src/components/common/AdvancedList/components/AdvancedListItem/components/AdvancedListItemTrailing.tsx +1 -1
- package/src/components/common/AdvancedList/components/AdvancedListItem/index.test.tsx +2 -2
- package/src/components/common/Badge/index.tsx +3 -3
- package/src/components/common/Breadcrumbs/index.tsx +5 -2
- package/src/components/common/Card/index.tsx +1 -1
- package/src/components/common/CardShell/CardFooter/index.tsx +5 -3
- package/src/components/common/CardShell/CardFooter/types.ts +2 -7
- package/src/components/common/CardShell/index.tsx +31 -7
- package/src/components/common/CardShell/types.ts +2 -2
- package/src/components/common/IconWithCircularBackground.tsx +7 -8
- package/src/components/common/IconWithSquareBackground/index.tsx +7 -8
- package/src/components/common/ImageCard/index.tsx +1 -1
- package/src/components/common/SegmentedControl/components/SegmentButton/index.tsx +18 -19
- package/src/components/common/SelectableCardList/components/SelectableCardListItem.tsx +1 -1
- package/src/components/common/SelectableCardList/index.tsx +1 -1
- package/src/components/common/ServiceLinks/types.ts +3 -3
- package/src/components/common/SideNav/SideNav.types.ts +11 -3
- package/src/components/common/SideNav/SideNavLayout.tsx +3 -0
- package/src/components/common/SideNav/components/SideNavPill.tsx +1 -1
- package/src/components/common/SideNav/components/SideNavPillList.tsx +8 -23
- package/src/components/common/SideNav/components/SideNavRow.tsx +6 -2
- package/src/components/common/SideNav/hooks/useKeepActiveItemInView.test.ts +258 -0
- package/src/components/common/SideNav/hooks/useKeepActiveItemInView.ts +80 -0
- package/src/components/common/SideNav/hooks/useSideNavScrollSpy.test.ts +9 -2
- package/src/components/common/SideNav/hooks/useSideNavScrollSpy.ts +4 -3
- package/src/components/common/SideNav/index.test.tsx +51 -0
- package/src/components/common/SideNav/index.tsx +47 -12
- package/src/components/common/Snackbar/index.test.tsx +40 -0
- package/src/components/common/Snackbar/index.tsx +9 -3
- package/src/components/common/Tabs/TabPanel.tsx +1 -1
- package/src/components/common/Tabs/TabsWrapper.tsx +1 -1
- package/src/components/common/TitleBlock/index.test.tsx +9 -7
- package/src/components/common/TitleBlock/index.tsx +34 -11
- package/src/components/common/TitleBlock/types.ts +2 -2
- package/src/components/form/components/FormControlWrapper/components/FieldSuffix.tsx +1 -1
- package/src/components/form/components/FormControlWrapper/index.tsx +1 -1
- package/src/components/form/inputs/Datepicker/index.test.tsx +1 -1
- package/src/components/form/inputs/FileDropzone.tsx +1 -4
- package/src/components/form/inputs/NumberStepper.test.tsx +83 -0
- package/src/components/form/inputs/NumberStepper.tsx +7 -8
- package/src/components/form/inputs/RadioButtonGroup.test.tsx +1 -1
- package/src/components/form/inputs/RadioButtonGroup.tsx +2 -2
- package/src/components/form/inputs/SearchInput/index.tsx +1 -1
- package/src/components/form/inputs/SearchableField.test.tsx +2 -2
- package/src/components/form/inputs/SearchableField.tsx +1 -1
- package/src/components/form/inputs/Select/Select.types.ts +1 -1
- package/src/components/form/inputs/Select/index.test.tsx +3 -3
- package/src/components/layout/Footer/index.tsx +1 -1
- package/src/components/layout/ServiceFormActions.tsx +1 -1
- package/src/components/layout/ServiceFormContainer/AccordionFormContainer/components/AccordionCollapseControls.tsx +1 -1
- package/src/components/layout/ServiceFormContainer/AccordionFormContainer/index.tsx +1 -1
- package/src/components/layout/ServiceHeader.tsx +1 -1
- package/src/components/layout/ServicePage.tsx +1 -1
- package/src/components/utils/normalizeSx.ts +2 -4
- package/src/examples/ListWithPagination/index.tsx +0 -2
- package/src/examples/MultipleStepForm/components/AdditionalServicesForm.tsx +1 -1
- package/src/examples/MultipleStepForm/components/ServiceIssuanceForm.tsx +1 -1
- package/src/examples/MultipleStepForm/components/TermsAndConditionsForm.tsx +1 -1
- package/src/examples/MultipleStepForm/types/MultiStepFormModel.ts +1 -1
- package/src/examples/SingleStepForm/components/ObjectIdentifierSearchModal.tsx +2 -2
- package/src/examples/SingleStepForm/types/SingleStepFormModel.ts +1 -1
- package/src/library/types.ts +2 -1
- package/src/stories/Welcome.mdx +25 -2
- package/src/stories/{components/display → atoms}/Badge.stories.tsx +1 -1
- package/src/stories/{components/actions → atoms}/Button.stories.tsx +10 -15
- package/src/stories/{components/inputs → atoms}/Checkbox.stories.tsx +2 -2
- package/src/stories/{components/icons → atoms}/IconWithCircularBackground.stories.tsx +1 -1
- package/src/stories/{components/icons → atoms}/IconWithSquareBackground.stories.tsx +1 -1
- package/src/stories/{components/icons → atoms}/Icons.stories.tsx +2 -2
- package/src/stories/{components/loaders → atoms}/Loader.stories.tsx +1 -1
- package/src/stories/{components/loaders → atoms}/LoadingSpinner.stories.tsx +1 -1
- package/src/stories/{assets → atoms}/Logo.stories.tsx +1 -1
- package/src/stories/{components/inputs → atoms}/NumberStepper.stories.tsx +2 -2
- package/src/stories/{components/inputs → atoms}/PhoneInput.stories.tsx +2 -2
- package/src/stories/{components/inputs → atoms}/SearchInput.stories.tsx +1 -1
- package/src/stories/{components/inputs → atoms}/Select.stories.tsx +8 -10
- package/src/stories/{components/form → atoms}/SimpleCheckbox.stories.tsx +1 -1
- package/src/stories/{components/inputs → atoms}/Switch.stories.tsx +2 -2
- package/src/stories/{components/tabs → atoms}/Tab.stories.tsx +1 -1
- package/src/stories/{components/inputs → atoms}/TextField.stories.tsx +1 -1
- package/src/stories/{components/display → atoms}/Tooltip.stories.tsx +2 -2
- package/src/stories/{theme → foundations}/ThemedMuiComponents.stories.tsx +1 -1
- package/src/stories/{components/feedback → molecules}/Alert.stories.tsx +3 -3
- package/src/stories/{components/navigation → molecules}/Breadcrumbs.stories.tsx +1 -1
- package/src/stories/{components/actions → molecules}/ButtonWithPopover.stories.tsx +1 -1
- package/src/stories/{components/display → molecules}/Card.stories.tsx +1 -1
- package/src/stories/{components/display → molecules}/CardShell.stories.tsx +20 -1
- package/src/stories/{components/form → molecules}/CheckboxFormControl.stories.tsx +14 -22
- package/src/stories/{components/inputs → molecules}/DatePicker.stories.tsx +1 -1
- package/src/stories/{components/form → molecules}/FormControlWrapper.stories.tsx +1 -1
- package/src/stories/{components/display → molecules}/ImageCard.stories.tsx +1 -1
- package/src/stories/{components/display → molecules}/ListWithIcons.stories.tsx +1 -1
- package/src/stories/{components/inputs → molecules}/PhoneInputFormControl.stories.tsx +1 -1
- package/src/stories/{components/overlays → molecules}/Popover.stories.tsx +1 -1
- package/src/stories/{components/inputs → molecules}/RadioButtonGroup.stories.tsx +2 -2
- package/src/stories/{components/inputs → molecules}/SearchableField.stories.tsx +1 -1
- package/src/stories/{components/display → molecules}/SegmentedControl.stories.tsx +2 -2
- package/src/stories/{components/feedback → molecules}/Snackbar.stories.tsx +3 -3
- package/src/stories/{components/tabs → molecules}/TabPanel.stories.tsx +1 -1
- package/src/stories/{components/tabs → molecules}/Tabs.stories.tsx +1 -1
- package/src/stories/{components/tabs → molecules}/TabsWrapper.stories.tsx +1 -1
- package/src/stories/{components/display → molecules}/TitleBlock.stories.tsx +65 -3
- package/src/stories/{components/navigation → organisms}/Accordion.stories.tsx +1 -1
- package/src/stories/{components/display → organisms}/AdvancedList.stories.tsx +5 -5
- package/src/stories/{components/display → organisms}/AdvancedListItem.stories.tsx +1 -1
- package/src/stories/{components/form → organisms}/CardFormContainer.stories.tsx +1 -1
- package/src/stories/{components/navigation → organisms}/DataPagination.stories.tsx +1 -1
- package/src/stories/{components/overlays → organisms}/Dialog.stories.tsx +1 -1
- package/src/stories/{components/inputs → organisms}/FileDropzone.stories.tsx +2 -2
- package/src/stories/{components/inputs → organisms}/FileUpload.stories.tsx +2 -2
- package/src/stories/{components/layout → organisms}/Footer.stories.tsx +1 -1
- package/src/stories/{components/loaders → organisms}/FullPageLoader.stories.tsx +1 -1
- package/src/stories/{components/overlays → organisms}/Modal.stories.tsx +1 -1
- package/src/stories/{components/display → organisms}/SelectableCardList.stories.tsx +1 -1
- package/src/stories/{components/form → organisms}/ServiceFormActions.stories.tsx +1 -1
- package/src/stories/{components/form → organisms}/ServiceFormContainer.stories.tsx +1 -1
- package/src/stories/{components/layout → organisms}/ServiceHeader.stories.tsx +1 -1
- package/src/stories/{components/display → organisms}/ServiceLinks.stories.tsx +1 -1
- package/src/stories/{components/navigation → organisms}/ServiceWizardStepper.stories.tsx +3 -3
- package/src/stories/{components/navigation → organisms}/SideNav.stories.tsx +37 -4
- package/src/stories/{components/layout → templates}/ServicePage.stories.tsx +1 -1
- package/src/stubs/Component.tsx +4 -4
- package/src/theme/cards.ts +2 -0
- package/src/types/assets/IconProps.tsx +1 -1
- package/src/types/cards/CardServiceProps.tsx +1 -1
- package/src/types/common/QuickLinkType.tsx +1 -1
- package/src/types/inputs/InputIconProps.tsx +1 -1
- package/src/types/lists/ListNewsItemType.tsx +1 -1
- package/src/types/lists/ListServicesItemType.tsx +2 -2
- package/src/vite-env.d.ts +2 -2
- package/dist/stories/assets/Logo.stories.d.ts +0 -12
- package/dist/stories/components/actions/Button.stories.d.ts +0 -107
- package/dist/stories/components/actions/ButtonWithPopover.stories.d.ts +0 -7
- package/dist/stories/components/display/AdvancedList.stories.d.ts +0 -33
- package/dist/stories/components/display/AdvancedListItem.stories.d.ts +0 -33
- package/dist/stories/components/display/Badge.stories.d.ts +0 -9
- package/dist/stories/components/display/Card.stories.d.ts +0 -8
- package/dist/stories/components/display/CardShell.stories.d.ts +0 -17
- package/dist/stories/components/display/ImageCard.stories.d.ts +0 -8
- package/dist/stories/components/display/ListWithIcons.stories.d.ts +0 -34
- package/dist/stories/components/display/SegmentedControl.stories.d.ts +0 -202
- package/dist/stories/components/display/SelectableCardList.stories.d.ts +0 -37
- package/dist/stories/components/display/ServiceLinks.stories.d.ts +0 -28
- package/dist/stories/components/display/TitleBlock.stories.d.ts +0 -21
- package/dist/stories/components/display/Tooltip.stories.d.ts +0 -48
- package/dist/stories/components/feedback/Alert.stories.d.ts +0 -14
- package/dist/stories/components/feedback/Snackbar.stories.d.ts +0 -143
- package/dist/stories/components/form/CardFormContainer.stories.d.ts +0 -7
- package/dist/stories/components/form/CheckboxFormControl.stories.d.ts +0 -9
- package/dist/stories/components/form/FormControlWrapper.stories.d.ts +0 -7
- package/dist/stories/components/form/ServiceFormActions.stories.d.ts +0 -6
- package/dist/stories/components/form/ServiceFormContainer.stories.d.ts +0 -15
- package/dist/stories/components/form/SimpleCheckbox.stories.d.ts +0 -19
- package/dist/stories/components/icons/IconWithCircularBackground.stories.d.ts +0 -6
- package/dist/stories/components/icons/IconWithSquareBackground.stories.d.ts +0 -7
- package/dist/stories/components/icons/Icons.stories.d.ts +0 -7
- package/dist/stories/components/inputs/Checkbox.stories.d.ts +0 -21
- package/dist/stories/components/inputs/DatePicker.stories.d.ts +0 -152
- package/dist/stories/components/inputs/FileDropzone.stories.d.ts +0 -6
- package/dist/stories/components/inputs/FileUpload.stories.d.ts +0 -18
- package/dist/stories/components/inputs/NumberStepper.stories.d.ts +0 -6
- package/dist/stories/components/inputs/PhoneInput.stories.d.ts +0 -10
- package/dist/stories/components/inputs/PhoneInputFormControl.stories.d.ts +0 -6
- package/dist/stories/components/inputs/RadioButtonGroup.stories.d.ts +0 -6
- package/dist/stories/components/inputs/SearchInput.stories.d.ts +0 -11
- package/dist/stories/components/inputs/SearchableField.stories.d.ts +0 -6
- package/dist/stories/components/inputs/Select.stories.d.ts +0 -7
- package/dist/stories/components/inputs/Switch.stories.d.ts +0 -17
- package/dist/stories/components/inputs/TextField.stories.d.ts +0 -6
- package/dist/stories/components/layout/Footer.stories.d.ts +0 -6
- package/dist/stories/components/layout/ServiceHeader.stories.d.ts +0 -7
- package/dist/stories/components/layout/ServicePage.stories.d.ts +0 -6
- package/dist/stories/components/loaders/FullPageLoader.stories.d.ts +0 -37
- package/dist/stories/components/loaders/Loader.stories.d.ts +0 -36
- package/dist/stories/components/loaders/LoadingSpinner.stories.d.ts +0 -62
- package/dist/stories/components/navigation/Accordion.stories.d.ts +0 -18
- package/dist/stories/components/navigation/Breadcrumbs.stories.d.ts +0 -6
- package/dist/stories/components/navigation/DataPagination.stories.d.ts +0 -47
- package/dist/stories/components/navigation/ServiceWizardStepper.stories.d.ts +0 -7
- package/dist/stories/components/navigation/SideNav.stories.d.ts +0 -7
- package/dist/stories/components/overlays/Dialog.stories.d.ts +0 -15
- package/dist/stories/components/overlays/Modal.stories.d.ts +0 -10
- package/dist/stories/components/overlays/Popover.stories.d.ts +0 -12
- package/dist/stories/components/tabs/Tab.stories.d.ts +0 -8
- package/dist/stories/components/tabs/TabPanel.stories.d.ts +0 -7
- package/dist/stories/components/tabs/Tabs.stories.d.ts +0 -7
- package/dist/stories/components/tabs/TabsWrapper.stories.d.ts +0 -6
- package/dist/stories/theme/ThemedMuiComponents.stories.d.ts +0 -25
- package/src/stories/components/display/Card.test.tsx +0 -19
- /package/src/stories/{components/actions → atoms}/Button.test.ts +0 -0
- /package/src/stories/{Colors.mdx → foundations/Colors.mdx} +0 -0
package/src/stories/Welcome.mdx
CHANGED
|
@@ -27,10 +27,33 @@ import Logo from '@/assets/Logo'
|
|
|
27
27
|
{/* Overview */}
|
|
28
28
|
<div style={{ marginBottom: '24px', padding: '24px', backgroundColor: grey['100'], borderRadius: '12px' }}>
|
|
29
29
|
<p style={{ color: primary['600'], lineHeight: '1.7', margin: '0 0 16px 0', fontSize: '15px', fontWeight: '500' }}>
|
|
30
|
-
This is a comprehensive component library for RC SES React applications. All components are built with React 18, TypeScript, and styled with Material-UI (MUI)
|
|
30
|
+
This is a comprehensive component library for RC SES React applications. All components are built with React 18/19, TypeScript, and styled with Material-UI (MUI) v9.
|
|
31
31
|
</p>
|
|
32
32
|
</div>
|
|
33
33
|
|
|
34
|
+
{/* Atomic Design */}
|
|
35
|
+
<div style={{ marginBottom: '24px', padding: '24px', backgroundColor: 'white', borderRadius: '12px', border: `1px solid ${grey['200']}` }}>
|
|
36
|
+
<h2 style={{ marginTop: '0', color: grey['900'], marginBottom: '12px', fontSize: '18px', fontWeight: '600' }}>🧪 Built on Atomic Design</h2>
|
|
37
|
+
<p style={{ color: grey['700'], lineHeight: '1.7', margin: '0 0 16px 0', fontSize: '14px' }}>
|
|
38
|
+
The library follows Brad Frost's <a href='https://atomicdesign.bradfrost.com/chapter-2/' target='_blank' rel='noreferrer' style={{ color: primary['600'], textDecoration: 'none', fontWeight: 500 }}>Atomic Design</a> methodology. Components are organised by structural complexity, so composing UIs feels like snapping together predictable building blocks.
|
|
39
|
+
</p>
|
|
40
|
+
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(5, 1fr)', gap: '12px' }}>
|
|
41
|
+
{[
|
|
42
|
+
{ icon: '🎨', title: 'Foundations', desc: 'Colors, typography, MUI theming' },
|
|
43
|
+
{ icon: '⚛️', title: 'Atoms', desc: 'Buttons, inputs, icons, badges' },
|
|
44
|
+
{ icon: '🧬', title: 'Molecules', desc: 'Form controls, cards, title blocks' },
|
|
45
|
+
{ icon: '🦠', title: 'Organisms', desc: 'Lists, dialogs, headers, forms' },
|
|
46
|
+
{ icon: '📐', title: 'Templates', desc: 'Page skeletons and layouts' },
|
|
47
|
+
].map((tier, idx) => (
|
|
48
|
+
<div key={idx} style={{ padding: '12px', backgroundColor: grey['50'], borderRadius: '8px', textAlign: 'center' }}>
|
|
49
|
+
<div style={{ fontSize: '1.5rem', marginBottom: '6px' }}>{tier.icon}</div>
|
|
50
|
+
<div style={{ fontSize: '13px', fontWeight: 600, color: grey['900'], marginBottom: '4px' }}>{tier.title}</div>
|
|
51
|
+
<div style={{ fontSize: '11px', color: grey['600'], lineHeight: 1.4 }}>{tier.desc}</div>
|
|
52
|
+
</div>
|
|
53
|
+
))}
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
|
|
34
57
|
{/* Features */}
|
|
35
58
|
<div>
|
|
36
59
|
|
|
@@ -79,7 +102,7 @@ import Logo from '@/assets/Logo'
|
|
|
79
102
|
<div style={{ marginTop: '2rem', padding: '1.5rem', backgroundColor: '#f0f8ff', borderRadius: '12px', borderLeft: '4px solid #0969da' }}>
|
|
80
103
|
<h3 style={{ marginTop: '0', color: '#0969da', marginBottom: '0.75rem', fontSize: '1rem', fontWeight: '600' }}>🚀 Getting Started:</h3>
|
|
81
104
|
<p style={{ color: '#555', lineHeight: '1.6', margin: '0', fontSize: '0.95rem' }}>
|
|
82
|
-
Use the sidebar
|
|
105
|
+
Use the sidebar to explore components grouped by their atomic tier — from atoms up to full pages. Each entry ships with documentation, interactive controls, and copy-ready code samples you can drop straight into your project.
|
|
83
106
|
</p>
|
|
84
107
|
</div>
|
|
85
108
|
|
|
@@ -20,7 +20,7 @@ const variants: RcSesBadgeProps['variant'][] = [
|
|
|
20
20
|
const sizes: RcSesBadgeProps['size'][] = ['small', 'regular']
|
|
21
21
|
|
|
22
22
|
const meta: Meta<typeof RcSesBadge> = {
|
|
23
|
-
title: '
|
|
23
|
+
title: 'Atoms/Badge',
|
|
24
24
|
component: RcSesBadge,
|
|
25
25
|
tags: ['autodocs'],
|
|
26
26
|
}
|
|
@@ -6,12 +6,7 @@ import Button from '@/components/common/Button'
|
|
|
6
6
|
import { grey } from '@/theme/palette'
|
|
7
7
|
import { ButtonProps } from '@/types/buttons/ButtonProps'
|
|
8
8
|
|
|
9
|
-
const variantOptions:
|
|
10
|
-
'contained',
|
|
11
|
-
'outlined',
|
|
12
|
-
'link',
|
|
13
|
-
'text',
|
|
14
|
-
]
|
|
9
|
+
const variantOptions: ButtonProps['variant'][] = ['contained', 'outlined', 'link', 'text']
|
|
15
10
|
const colorOptions = [
|
|
16
11
|
'primary',
|
|
17
12
|
'secondary',
|
|
@@ -27,7 +22,7 @@ const colorOptions = [
|
|
|
27
22
|
]
|
|
28
23
|
|
|
29
24
|
const meta = {
|
|
30
|
-
title: '
|
|
25
|
+
title: 'Atoms/Button',
|
|
31
26
|
component: Button,
|
|
32
27
|
parameters: {
|
|
33
28
|
layout: 'centered',
|
|
@@ -249,7 +244,7 @@ export const ErrorOutlined: Story = {
|
|
|
249
244
|
export const LightOutlined: Story = {
|
|
250
245
|
args: {
|
|
251
246
|
variant: 'outlined',
|
|
252
|
-
color: 'light'
|
|
247
|
+
color: 'light',
|
|
253
248
|
children: 'Light Button',
|
|
254
249
|
},
|
|
255
250
|
decorators: [
|
|
@@ -273,7 +268,7 @@ export const LightOutlined: Story = {
|
|
|
273
268
|
export const LightOutlinedWithIcon: Story = {
|
|
274
269
|
args: {
|
|
275
270
|
variant: 'outlined',
|
|
276
|
-
color: 'light'
|
|
271
|
+
color: 'light',
|
|
277
272
|
startIcon: <PlusBoldIcon />,
|
|
278
273
|
children: 'Light Button with Icon',
|
|
279
274
|
},
|
|
@@ -298,7 +293,7 @@ export const LightOutlinedWithIcon: Story = {
|
|
|
298
293
|
export const LightOutlinedDisabled: Story = {
|
|
299
294
|
args: {
|
|
300
295
|
variant: 'outlined',
|
|
301
|
-
color: 'light'
|
|
296
|
+
color: 'light',
|
|
302
297
|
children: 'Light Button Disabled',
|
|
303
298
|
disabled: true,
|
|
304
299
|
},
|
|
@@ -324,7 +319,7 @@ export const GhostOutlinedIconOnly: Story = {
|
|
|
324
319
|
args: {
|
|
325
320
|
'aria-label': 'Close',
|
|
326
321
|
children: <PlusBoldIcon />,
|
|
327
|
-
color: 'ghost'
|
|
322
|
+
color: 'ghost',
|
|
328
323
|
iconOnly: true,
|
|
329
324
|
variant: 'outlined',
|
|
330
325
|
},
|
|
@@ -350,7 +345,7 @@ export const GhostOutlinedIconOnlyDisabled: Story = {
|
|
|
350
345
|
args: {
|
|
351
346
|
'aria-label': 'Close',
|
|
352
347
|
children: <PlusBoldIcon />,
|
|
353
|
-
color: 'ghost'
|
|
348
|
+
color: 'ghost',
|
|
354
349
|
disabled: true,
|
|
355
350
|
iconOnly: true,
|
|
356
351
|
variant: 'outlined',
|
|
@@ -491,7 +486,7 @@ export const ErrorOutlinedLoading: Story = {
|
|
|
491
486
|
export const LightOutlinedLoading: Story = {
|
|
492
487
|
args: {
|
|
493
488
|
variant: 'outlined',
|
|
494
|
-
color: 'light'
|
|
489
|
+
color: 'light',
|
|
495
490
|
children: 'Light Button',
|
|
496
491
|
loading: true,
|
|
497
492
|
},
|
|
@@ -516,7 +511,7 @@ export const LightOutlinedLoading: Story = {
|
|
|
516
511
|
export const LightOutlinedWithIconLoading: Story = {
|
|
517
512
|
args: {
|
|
518
513
|
variant: 'outlined',
|
|
519
|
-
color: 'light'
|
|
514
|
+
color: 'light',
|
|
520
515
|
startIcon: <PlusBoldIcon />,
|
|
521
516
|
children: 'Light Button with Icon',
|
|
522
517
|
loading: true,
|
|
@@ -543,7 +538,7 @@ export const GhostOutlinedIconOnlyLoading: Story = {
|
|
|
543
538
|
args: {
|
|
544
539
|
'aria-label': 'Close',
|
|
545
540
|
children: <PlusBoldIcon />,
|
|
546
|
-
color: 'ghost'
|
|
541
|
+
color: 'ghost',
|
|
547
542
|
iconOnly: true,
|
|
548
543
|
variant: 'outlined',
|
|
549
544
|
loading: true,
|
|
@@ -11,12 +11,12 @@ const variants = ['outlined', 'flat']
|
|
|
11
11
|
|
|
12
12
|
const lorem = 'Lorem Ipsum has been the standard.'
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
interface FormModel {
|
|
15
15
|
agreement: string
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
const meta: Meta<typeof RcSesCheckbox> = {
|
|
19
|
-
title: '
|
|
19
|
+
title: 'Atoms/Checkbox',
|
|
20
20
|
component: RcSesCheckbox,
|
|
21
21
|
argTypes: {
|
|
22
22
|
variant: {
|
|
@@ -4,7 +4,7 @@ import CheckBoldIcon from '@/assets/icons/CheckBoldIcon'
|
|
|
4
4
|
import RcSesIconWithCircularBackground from '@/components/common/IconWithCircularBackground'
|
|
5
5
|
|
|
6
6
|
const meta: Meta<typeof RcSesIconWithCircularBackground> = {
|
|
7
|
-
title: '
|
|
7
|
+
title: 'Atoms/IconWithCircularBackground',
|
|
8
8
|
component: RcSesIconWithCircularBackground,
|
|
9
9
|
tags: ['autodocs'],
|
|
10
10
|
argTypes: {
|
|
@@ -5,7 +5,7 @@ import InfoFillIcon from '@/assets/icons/InfoFillIcon'
|
|
|
5
5
|
import RcSesIconWithSquareBackground from '@/components/common/IconWithSquareBackground'
|
|
6
6
|
|
|
7
7
|
const meta: Meta<typeof RcSesIconWithSquareBackground> = {
|
|
8
|
-
title: '
|
|
8
|
+
title: 'Atoms/IconWithSquareBackground',
|
|
9
9
|
component: RcSesIconWithSquareBackground,
|
|
10
10
|
tags: ['autodocs'],
|
|
11
11
|
argTypes: {
|
|
@@ -51,7 +51,7 @@ import palette from '@/theme/palette'
|
|
|
51
51
|
|
|
52
52
|
type StoryArgs = IconProps
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
interface IconStoryItem {
|
|
55
55
|
name: string
|
|
56
56
|
render: (args: StoryArgs) => ReactElement
|
|
57
57
|
}
|
|
@@ -269,7 +269,7 @@ const iconItems: IconStoryItem[] = [
|
|
|
269
269
|
]
|
|
270
270
|
|
|
271
271
|
const meta: Meta<StoryArgs> = {
|
|
272
|
-
title: '
|
|
272
|
+
title: 'Atoms/Icons',
|
|
273
273
|
tags: ['autodocs'],
|
|
274
274
|
args: {
|
|
275
275
|
className: '',
|
|
@@ -3,7 +3,7 @@ import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
|
3
3
|
import RcSesLoader from '@/components/loaders/Loader'
|
|
4
4
|
|
|
5
5
|
const meta = {
|
|
6
|
-
title: '
|
|
6
|
+
title: 'Atoms/Loader',
|
|
7
7
|
component: RcSesLoader,
|
|
8
8
|
tags: ['autodocs'],
|
|
9
9
|
parameters: {
|
|
@@ -17,7 +17,7 @@ const colorOptions: RcSesSpinnerColor[] = [
|
|
|
17
17
|
const sizeOptions = ['small', 'medium', 'large']
|
|
18
18
|
|
|
19
19
|
const meta = {
|
|
20
|
-
title: '
|
|
20
|
+
title: 'Atoms/LoadingSpinner',
|
|
21
21
|
component: RcSesLoadingSpinner,
|
|
22
22
|
parameters: {
|
|
23
23
|
layout: 'centered',
|
|
@@ -7,14 +7,14 @@ import FieldView from '@/components/storybook/FieldView'
|
|
|
7
7
|
import Fields from '@/components/storybook/Fields'
|
|
8
8
|
import PreviewTitle from '@/components/storybook/PreviewTitle'
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
interface FormModel {
|
|
11
11
|
countable: number
|
|
12
12
|
countable2: number
|
|
13
13
|
countable3: number
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
const meta: Meta<typeof RcSesNumberStepper> = {
|
|
17
|
-
title: '
|
|
17
|
+
title: 'Atoms/NumberStepper',
|
|
18
18
|
component: RcSesNumberStepper,
|
|
19
19
|
argTypes: {
|
|
20
20
|
id: { table: { disable: true } },
|
|
@@ -7,14 +7,14 @@ import FieldView from '@/components/storybook/FieldView'
|
|
|
7
7
|
import Fields from '@/components/storybook/Fields'
|
|
8
8
|
import PreviewTitle from '@/components/storybook/PreviewTitle'
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
interface FormModel {
|
|
11
11
|
phone: string
|
|
12
12
|
phoneDisabled: string
|
|
13
13
|
phoneError: string
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
const meta: Meta<typeof RcSesPhoneInput> = {
|
|
17
|
-
title: '
|
|
17
|
+
title: 'Atoms/PhoneInput',
|
|
18
18
|
component: RcSesPhoneInput,
|
|
19
19
|
argTypes: {
|
|
20
20
|
control: {
|
|
@@ -7,7 +7,7 @@ import RcSesSearchInput from '@/components/form/inputs/SearchInput'
|
|
|
7
7
|
import SingleStepFormModel from '@/examples/SingleStepForm/types/SingleStepFormModel'
|
|
8
8
|
|
|
9
9
|
const meta: Meta<typeof RcSesSearchInput> = {
|
|
10
|
-
title: '
|
|
10
|
+
title: 'Atoms/SearchInput',
|
|
11
11
|
component: RcSesSearchInput,
|
|
12
12
|
tags: ['autodocs'],
|
|
13
13
|
argTypes: {
|
|
@@ -11,7 +11,7 @@ import PreviewTitle from '@/components/storybook/PreviewTitle'
|
|
|
11
11
|
import SingleStepFormModel from '@/examples/SingleStepForm/types/SingleStepFormModel'
|
|
12
12
|
|
|
13
13
|
const meta: Meta<typeof RcSesSelect> = {
|
|
14
|
-
title: '
|
|
14
|
+
title: 'Atoms/Select',
|
|
15
15
|
component: RcSesSelect,
|
|
16
16
|
argTypes: {
|
|
17
17
|
disabled: {
|
|
@@ -237,7 +237,7 @@ export const Main: Story = {
|
|
|
237
237
|
},
|
|
238
238
|
}
|
|
239
239
|
|
|
240
|
-
|
|
240
|
+
interface VariantsFormModel {
|
|
241
241
|
singleSelect: string | null
|
|
242
242
|
groupedSelect: string | null
|
|
243
243
|
singleSearchSelect: string | null
|
|
@@ -266,14 +266,12 @@ const variantOptions = [
|
|
|
266
266
|
},
|
|
267
267
|
]
|
|
268
268
|
|
|
269
|
-
const groupedVariantOptions:
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
}
|
|
276
|
-
> = [
|
|
269
|
+
const groupedVariantOptions: ({
|
|
270
|
+
group: string
|
|
271
|
+
} & {
|
|
272
|
+
value: string
|
|
273
|
+
label: string
|
|
274
|
+
})[] = [
|
|
277
275
|
{ value: 'group-1-option-1', label: '1st option', group: 'GROUP 1' },
|
|
278
276
|
{ value: 'group-1-option-2', label: '2st option', group: 'GROUP 1' },
|
|
279
277
|
{ value: 'group-1-option-3', label: '3rd option', group: 'GROUP 1' },
|
|
@@ -4,7 +4,7 @@ import { useState } from 'react'
|
|
|
4
4
|
import SimpleCheckbox from '@/components/form/inputs/SimpleCheckbox'
|
|
5
5
|
|
|
6
6
|
const meta = {
|
|
7
|
-
title: '
|
|
7
|
+
title: 'Atoms/SimpleCheckbox',
|
|
8
8
|
component: SimpleCheckbox,
|
|
9
9
|
parameters: {
|
|
10
10
|
layout: 'centered',
|
|
@@ -4,7 +4,7 @@ import { useState } from 'react'
|
|
|
4
4
|
import RcSesSwitch from '@/components/common/Switch'
|
|
5
5
|
|
|
6
6
|
const meta = {
|
|
7
|
-
title: '
|
|
7
|
+
title: 'Atoms/Switch',
|
|
8
8
|
component: RcSesSwitch,
|
|
9
9
|
parameters: {
|
|
10
10
|
layout: 'centered',
|
|
@@ -15,7 +15,7 @@ const meta = {
|
|
|
15
15
|
export default meta
|
|
16
16
|
type Story = StoryObj<typeof meta>
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
interface ControlledDemoProps {
|
|
19
19
|
initialChecked?: boolean
|
|
20
20
|
disabled?: boolean
|
|
21
21
|
label?: string
|
|
@@ -4,7 +4,7 @@ import RcSesTab from '@/components/common/Tabs/Tab'
|
|
|
4
4
|
import RcSesTabs from '@/components/common/Tabs/Tabs'
|
|
5
5
|
|
|
6
6
|
const meta: Meta<typeof RcSesTab> = {
|
|
7
|
-
title: '
|
|
7
|
+
title: 'Atoms/Tab',
|
|
8
8
|
component: RcSesTab,
|
|
9
9
|
tags: ['autodocs'],
|
|
10
10
|
// From MUI 9 a Tab must sit inside a Tabs provider: Tabs supplies the
|
|
@@ -7,7 +7,7 @@ import Fields from '@/components/storybook/Fields'
|
|
|
7
7
|
import PreviewTitle from '@/components/storybook/PreviewTitle'
|
|
8
8
|
|
|
9
9
|
const meta: Meta<typeof RcSesTextField> = {
|
|
10
|
-
title: '
|
|
10
|
+
title: 'Atoms/TextField',
|
|
11
11
|
component: RcSesTextField,
|
|
12
12
|
tags: ['autodocs'],
|
|
13
13
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Button, Typography } from '@mui/material'
|
|
2
2
|
import type { Meta } from '@storybook/react-vite'
|
|
3
3
|
|
|
4
|
-
import RcSesTooltip from '
|
|
4
|
+
import RcSesTooltip from '@/components/common/Tooltip'
|
|
5
5
|
|
|
6
6
|
const meta = {
|
|
7
|
-
title: '
|
|
7
|
+
title: 'Atoms/Tooltip',
|
|
8
8
|
component: RcSesTooltip,
|
|
9
9
|
parameters: {
|
|
10
10
|
layout: 'centered',
|
|
@@ -34,7 +34,7 @@ import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
|
34
34
|
* or silently dead override surfaces as a pixel diff.
|
|
35
35
|
*/
|
|
36
36
|
const meta: Meta = {
|
|
37
|
-
title: '
|
|
37
|
+
title: 'Foundations/Themed MUI Components',
|
|
38
38
|
parameters: {
|
|
39
39
|
docs: {
|
|
40
40
|
description: {
|
|
@@ -11,7 +11,7 @@ import PreviewTitle from '@/components/storybook/PreviewTitle'
|
|
|
11
11
|
const lorem =
|
|
12
12
|
"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard."
|
|
13
13
|
|
|
14
|
-
const severities:
|
|
14
|
+
const severities: ('grey' | 'info' | 'success' | 'warning' | 'error')[] = [
|
|
15
15
|
'grey',
|
|
16
16
|
'info',
|
|
17
17
|
'success',
|
|
@@ -20,7 +20,7 @@ const severities: Array<'grey' | 'info' | 'success' | 'warning' | 'error'> = [
|
|
|
20
20
|
]
|
|
21
21
|
|
|
22
22
|
const meta: Meta<typeof RcSesAlert> = {
|
|
23
|
-
title: '
|
|
23
|
+
title: 'Molecules/Alert',
|
|
24
24
|
component: RcSesAlert,
|
|
25
25
|
tags: ['autodocs'],
|
|
26
26
|
argTypes: {
|
|
@@ -180,7 +180,7 @@ export const Toggles: Story = {
|
|
|
180
180
|
|
|
181
181
|
function DismissibleTemplate() {
|
|
182
182
|
const [visibleSeverities, setVisibleSeverities] = useState<
|
|
183
|
-
|
|
183
|
+
(typeof severities)[number][]
|
|
184
184
|
>([...severities])
|
|
185
185
|
|
|
186
186
|
return (
|
|
@@ -3,7 +3,7 @@ import { Meta, StoryObj } from '@storybook/react-vite'
|
|
|
3
3
|
import RcSesButtonWithPopover from '@/components/common/Button/ButtonWithPopover'
|
|
4
4
|
|
|
5
5
|
const meta: Meta<typeof RcSesButtonWithPopover> = {
|
|
6
|
-
title: '
|
|
6
|
+
title: 'Molecules/ButtonWithPopover',
|
|
7
7
|
component: RcSesButtonWithPopover,
|
|
8
8
|
tags: ['autodocs'],
|
|
9
9
|
argTypes: {
|
|
@@ -9,7 +9,7 @@ import RcSesIconWithCircularBackground from '@/components/common/IconWithCircula
|
|
|
9
9
|
import RcSesTitleBlock from '@/components/common/TitleBlock'
|
|
10
10
|
|
|
11
11
|
const meta: Meta<typeof RcSesCardShell> = {
|
|
12
|
-
title: '
|
|
12
|
+
title: 'Molecules/CardShell',
|
|
13
13
|
component: RcSesCardShell,
|
|
14
14
|
tags: ['autodocs'],
|
|
15
15
|
parameters: {
|
|
@@ -261,3 +261,22 @@ export const TabletViewport: Story = {
|
|
|
261
261
|
tags: ['viewport-768', '!autodocs'],
|
|
262
262
|
globals: { viewport: { value: 'tablet768' } },
|
|
263
263
|
}
|
|
264
|
+
|
|
265
|
+
// Pins the CardFooter align='start' + single-action path at 375, so the
|
|
266
|
+
// mobile left-align regression the FooterLink helper depends on stays
|
|
267
|
+
// covered by the visual suite.
|
|
268
|
+
export const LeftAlignedFooterMobileViewport: Story = {
|
|
269
|
+
args: {
|
|
270
|
+
variant: 'card',
|
|
271
|
+
theme: 'default',
|
|
272
|
+
header: <SampleHeader />,
|
|
273
|
+
children: <SampleContent />,
|
|
274
|
+
footer: (
|
|
275
|
+
<RcSesCardFooter align='start'>
|
|
276
|
+
<RcSesButton variant='link'>Peržiūrėti DUK</RcSesButton>
|
|
277
|
+
</RcSesCardFooter>
|
|
278
|
+
),
|
|
279
|
+
},
|
|
280
|
+
tags: ['viewport-375', '!autodocs'],
|
|
281
|
+
globals: { viewport: { value: 'mobile375' } },
|
|
282
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Meta, StoryContext, StoryObj } from '@storybook/react-vite'
|
|
2
|
-
import { useForm } from 'react-hook-form'
|
|
2
|
+
import { useForm, useWatch } from 'react-hook-form'
|
|
3
3
|
|
|
4
4
|
import RcSesCheckboxFormControl from '@/components/form/inputs/CheckboxFormControl'
|
|
5
5
|
import RcSesFormControlLabel from '@/components/form/inputs/FormControlLabel'
|
|
@@ -10,7 +10,7 @@ import Fields from '@/components/storybook/Fields'
|
|
|
10
10
|
const variants = ['outlined', 'flat']
|
|
11
11
|
|
|
12
12
|
const meta: Meta<typeof RcSesCheckboxFormControl> = {
|
|
13
|
-
title: '
|
|
13
|
+
title: 'Molecules/CheckboxFormControl',
|
|
14
14
|
component: RcSesCheckboxFormControl,
|
|
15
15
|
argTypes: {
|
|
16
16
|
variant: {
|
|
@@ -46,7 +46,7 @@ const meta: Meta<typeof RcSesCheckboxFormControl> = {
|
|
|
46
46
|
tags: ['autodocs'],
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
interface FormModel {
|
|
50
50
|
agreement: string
|
|
51
51
|
}
|
|
52
52
|
|
|
@@ -178,7 +178,7 @@ export const Loading: Story = {
|
|
|
178
178
|
},
|
|
179
179
|
}
|
|
180
180
|
|
|
181
|
-
|
|
181
|
+
interface IndeterminateFormModel {
|
|
182
182
|
parent: boolean
|
|
183
183
|
child1: boolean
|
|
184
184
|
child2: boolean
|
|
@@ -186,7 +186,7 @@ type IndeterminateFormModel = {
|
|
|
186
186
|
}
|
|
187
187
|
|
|
188
188
|
function CheckboxIndeterminateDemo() {
|
|
189
|
-
const { control,
|
|
189
|
+
const { control, setValue } = useForm<IndeterminateFormModel>({
|
|
190
190
|
mode: 'all',
|
|
191
191
|
defaultValues: {
|
|
192
192
|
parent: false,
|
|
@@ -196,11 +196,7 @@ function CheckboxIndeterminateDemo() {
|
|
|
196
196
|
},
|
|
197
197
|
})
|
|
198
198
|
|
|
199
|
-
const
|
|
200
|
-
const child2Value = watch('child2')
|
|
201
|
-
const child3Value = watch('child3')
|
|
202
|
-
|
|
203
|
-
const childValues = [child1Value, child2Value, child3Value]
|
|
199
|
+
const childValues = useWatch({ control, name: ['child1', 'child2', 'child3'] })
|
|
204
200
|
|
|
205
201
|
const handleParentChange = (newChildValues: boolean[]) => {
|
|
206
202
|
setValue('child1', newChildValues[0])
|
|
@@ -232,7 +228,7 @@ function CheckboxIndeterminateDemo() {
|
|
|
232
228
|
<RcSesFormControlLabel
|
|
233
229
|
control={
|
|
234
230
|
<RcSesSimpleCheckbox
|
|
235
|
-
checked={
|
|
231
|
+
checked={childValues[0]}
|
|
236
232
|
onChange={(e) => setValue('child1', e.target.checked)}
|
|
237
233
|
/>
|
|
238
234
|
}
|
|
@@ -241,7 +237,7 @@ function CheckboxIndeterminateDemo() {
|
|
|
241
237
|
<RcSesFormControlLabel
|
|
242
238
|
control={
|
|
243
239
|
<RcSesSimpleCheckbox
|
|
244
|
-
checked={
|
|
240
|
+
checked={childValues[1]}
|
|
245
241
|
onChange={(e) => setValue('child2', e.target.checked)}
|
|
246
242
|
/>
|
|
247
243
|
}
|
|
@@ -250,7 +246,7 @@ function CheckboxIndeterminateDemo() {
|
|
|
250
246
|
<RcSesFormControlLabel
|
|
251
247
|
control={
|
|
252
248
|
<RcSesSimpleCheckbox
|
|
253
|
-
checked={
|
|
249
|
+
checked={childValues[2]}
|
|
254
250
|
onChange={(e) => setValue('child3', e.target.checked)}
|
|
255
251
|
/>
|
|
256
252
|
}
|
|
@@ -302,7 +298,7 @@ export const Indeterminate: Story = {
|
|
|
302
298
|
}
|
|
303
299
|
|
|
304
300
|
function CheckboxIndeterminateLoadingDemo() {
|
|
305
|
-
const { control,
|
|
301
|
+
const { control, setValue } = useForm<IndeterminateFormModel>({
|
|
306
302
|
mode: 'all',
|
|
307
303
|
defaultValues: {
|
|
308
304
|
parent: false,
|
|
@@ -312,11 +308,7 @@ function CheckboxIndeterminateLoadingDemo() {
|
|
|
312
308
|
},
|
|
313
309
|
})
|
|
314
310
|
|
|
315
|
-
const
|
|
316
|
-
const child2Value = watch('child2')
|
|
317
|
-
const child3Value = watch('child3')
|
|
318
|
-
|
|
319
|
-
const childValues = [child1Value, child2Value, child3Value]
|
|
311
|
+
const childValues = useWatch({ control, name: ['child1', 'child2', 'child3'] })
|
|
320
312
|
|
|
321
313
|
const handleParentChange = (newChildValues: boolean[]) => {
|
|
322
314
|
setValue('child1', newChildValues[0])
|
|
@@ -349,7 +341,7 @@ function CheckboxIndeterminateLoadingDemo() {
|
|
|
349
341
|
<RcSesFormControlLabel
|
|
350
342
|
control={
|
|
351
343
|
<RcSesSimpleCheckbox
|
|
352
|
-
checked={
|
|
344
|
+
checked={childValues[0]}
|
|
353
345
|
onChange={(e) => setValue('child1', e.target.checked)}
|
|
354
346
|
loading
|
|
355
347
|
/>
|
|
@@ -360,7 +352,7 @@ function CheckboxIndeterminateLoadingDemo() {
|
|
|
360
352
|
<RcSesFormControlLabel
|
|
361
353
|
control={
|
|
362
354
|
<RcSesSimpleCheckbox
|
|
363
|
-
checked={
|
|
355
|
+
checked={childValues[1]}
|
|
364
356
|
onChange={(e) => setValue('child2', e.target.checked)}
|
|
365
357
|
loading
|
|
366
358
|
/>
|
|
@@ -371,7 +363,7 @@ function CheckboxIndeterminateLoadingDemo() {
|
|
|
371
363
|
<RcSesFormControlLabel
|
|
372
364
|
control={
|
|
373
365
|
<RcSesSimpleCheckbox
|
|
374
|
-
checked={
|
|
366
|
+
checked={childValues[2]}
|
|
375
367
|
onChange={(e) => setValue('child3', e.target.checked)}
|
|
376
368
|
loading
|
|
377
369
|
/>
|
|
@@ -10,7 +10,7 @@ import Fields from '@/components/storybook/Fields'
|
|
|
10
10
|
import SingleStepFormModel from '@/examples/SingleStepForm/types/SingleStepFormModel'
|
|
11
11
|
|
|
12
12
|
const meta: Meta<typeof RcSesDatepicker> = {
|
|
13
|
-
title: '
|
|
13
|
+
title: 'Molecules/DatePicker',
|
|
14
14
|
component: RcSesDatepicker,
|
|
15
15
|
argTypes: {
|
|
16
16
|
clearable: {
|
|
@@ -4,7 +4,7 @@ import { Meta, StoryObj } from '@storybook/react-vite'
|
|
|
4
4
|
import RcSesFormControlWrapper from '@/components/form/components/FormControlWrapper'
|
|
5
5
|
|
|
6
6
|
const meta: Meta<typeof RcSesFormControlWrapper> = {
|
|
7
|
-
title: '
|
|
7
|
+
title: 'Molecules/FormControlWrapper',
|
|
8
8
|
component: RcSesFormControlWrapper,
|
|
9
9
|
tags: ['autodocs'],
|
|
10
10
|
argTypes: {
|
|
@@ -7,7 +7,7 @@ import RcSesImageCard from '@/components/common/ImageCard'
|
|
|
7
7
|
import palette from '@/theme/palette'
|
|
8
8
|
|
|
9
9
|
const meta: Meta<typeof RcSesImageCard> = {
|
|
10
|
-
title: '
|
|
10
|
+
title: 'Molecules/ImageCard',
|
|
11
11
|
component: RcSesImageCard,
|
|
12
12
|
tags: ['autodocs'],
|
|
13
13
|
}
|