@registrucentras/rc-ses-react-components 1.4.1 → 1.6.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/dist/components/common/Accordion/hooks/useAccordionController.d.ts +1 -0
- package/dist/components/common/Card/index.d.ts +7 -2
- package/dist/components/common/ImageCard/index.d.ts +13 -0
- package/dist/components/common/ListWithIcons/components/ListWithIconsItem.d.ts +9 -0
- package/dist/components/common/ListWithIcons/index.d.ts +14 -0
- package/dist/components/layout/Footer/index.d.ts +5 -0
- package/dist/components/layout/ServiceFormContainer/CardFormContainer/index.d.ts +3 -2
- package/dist/components/layout/ServiceWizardStepper/StepperTypes.d.ts +0 -3
- package/dist/components/layout/ServiceWizardStepper/components/DesktopStepper.d.ts +2 -1
- package/dist/components/layout/ServiceWizardStepper/components/MobileStepper.d.ts +2 -1
- package/dist/components/layout/ServiceWizardStepper/components/StyledStepLabel.d.ts +2 -2
- package/dist/components/layout/ServiceWizardStepper/index.d.ts +3 -2
- package/dist/library/icons.d.ts +1 -3
- package/dist/library/index.d.ts +6 -14
- package/dist/library/types.d.ts +2 -0
- package/dist/registrucentras-rc-ses-react-components.cjs +11 -11
- package/dist/registrucentras-rc-ses-react-components.js +2530 -2251
- package/dist/stories/components/display/Card.stories.d.ts +49 -0
- package/dist/stories/components/display/ImageCard.stories.d.ts +8 -0
- package/dist/stories/components/display/ListWithIcons.stories.d.ts +33 -0
- package/dist/stories/components/{Alert.stories.d.ts → feedback/Alert.stories.d.ts} +1 -1
- package/dist/stories/components/{Icons.stories.d.ts → icons/Icons.stories.d.ts} +1 -1
- package/dist/stories/components/inputs/FileDropzone.stories.d.ts +32 -0
- package/dist/stories/components/inputs/PhoneInput.stories.d.ts +24 -0
- package/dist/stories/components/inputs/SearchableField.stories.d.ts +2 -2
- package/dist/stories/components/inputs/Select.stories.d.ts +3 -3
- package/dist/stories/components/inputs/TextField.stories.d.ts +5 -5
- package/dist/stories/components/layout/Footer.stories.d.ts +8 -0
- package/dist/stories/components/{Accordion.stories.d.ts → navigation/Accordion.stories.d.ts} +2 -2
- package/dist/stories/components/{Breadcrumbs.stories.d.ts → navigation/Breadcrumbs.stories.d.ts} +1 -1
- package/dist/stories/components/{DataPagination.stories.d.ts → navigation/DataPagination.stories.d.ts} +1 -1
- package/dist/stories/components/navigation/ServiceWizardStepper.stories.d.ts +7 -0
- package/package.json +1 -1
- package/src/components/common/Accordion/hooks/useAccordionController.tsx +43 -11
- package/src/components/common/Card/index.test.tsx +36 -0
- package/src/components/common/Card/index.tsx +62 -22
- package/src/components/common/DataPagination/components/PaginationButton.tsx +1 -1
- package/src/components/common/DataPagination/index.tsx +1 -1
- package/src/components/common/ImageCard/index.test.tsx +78 -0
- package/src/components/common/ImageCard/index.tsx +43 -0
- package/src/components/common/ListWithIcons/components/ListWithIconsItem.tsx +94 -0
- package/src/components/common/ListWithIcons/index.test.tsx +75 -0
- package/src/components/common/ListWithIcons/index.tsx +47 -0
- package/src/components/form/inputs/CheckboxFormControl.tsx +1 -1
- package/src/components/form/inputs/FileDropzone.tsx +1 -1
- package/src/components/form/inputs/FileUpload.tsx +9 -3
- package/src/components/form/inputs/NumberStepper.tsx +2 -2
- package/src/components/form/inputs/PhoneInputFormControl/components/RowComponent.tsx +1 -0
- package/src/components/form/inputs/RadioButtonGroup.tsx +1 -1
- package/src/components/layout/Footer/index.test.tsx +20 -0
- package/src/components/layout/Footer/index.tsx +33 -0
- package/src/components/layout/ServiceFormContainer/AccordionFormContainer/index.tsx +21 -4
- package/src/components/layout/ServiceFormContainer/AccordionFormContainer/utils.ts +0 -1
- package/src/components/layout/ServiceFormContainer/CardFormContainer/index.test.tsx +14 -12
- package/src/components/layout/ServiceFormContainer/CardFormContainer/index.tsx +4 -1
- package/src/components/layout/ServiceWizardStepper/StepperTypes.ts +0 -3
- package/src/components/layout/ServiceWizardStepper/components/DesktopStepper.test.tsx +33 -4
- package/src/components/layout/ServiceWizardStepper/components/DesktopStepper.tsx +6 -2
- package/src/components/layout/ServiceWizardStepper/components/MobileStepper.test.tsx +34 -7
- package/src/components/layout/ServiceWizardStepper/components/MobileStepper.tsx +4 -2
- package/src/components/layout/ServiceWizardStepper/components/StyledStepLabel.tsx +4 -2
- package/src/components/layout/ServiceWizardStepper/index.tsx +13 -21
- package/src/examples/CardMultipleStepForm/index.tsx +18 -31
- package/src/examples/HorizontalMultiStepForm/index.tsx +22 -17
- package/src/examples/ListWithPagination/index.tsx +41 -11
- package/src/library/icons.ts +3 -2
- package/src/library/index.ts +14 -22
- package/src/library/types.ts +6 -0
- package/src/stories/components/{buttons → actions}/Button.stories.tsx +1 -1
- package/src/stories/components/{Card.stories.tsx → display/Card.stories.tsx} +19 -1
- package/src/stories/components/{Card.test.tsx → display/Card.test.tsx} +2 -1
- package/src/stories/components/display/ImageCard.stories.tsx +54 -0
- package/src/stories/components/display/ListWithIcons.stories.tsx +74 -0
- package/src/stories/components/{Alert.stories.tsx → feedback/Alert.stories.tsx} +1 -1
- package/src/stories/components/form/CardFormContainer.stories.tsx +23 -33
- package/src/stories/components/form/CheckboxFormControl.stories.tsx +1 -1
- package/src/stories/components/form/ServiceFormActions.stories.tsx +1 -1
- package/src/stories/components/form/ServiceFormContainer.stories.tsx +1 -1
- package/src/stories/components/{Icons.stories.tsx → icons/Icons.stories.tsx} +1 -1
- package/src/stories/components/inputs/Checkbox.stories.tsx +1 -1
- package/src/stories/components/inputs/DatePicker.stories.tsx +1 -1
- package/src/stories/components/inputs/FileDropzone.stories.tsx +117 -0
- package/src/stories/components/inputs/FileUpload.stories.tsx +1 -1
- package/src/stories/components/inputs/NumberStepper.stories.tsx +1 -1
- package/src/stories/components/inputs/PhoneInput.stories.tsx +110 -0
- package/src/stories/components/inputs/RadioButtonGroup.stories.tsx +1 -1
- package/src/stories/components/inputs/SearchableField.stories.tsx +1 -1
- package/src/stories/components/inputs/Select.stories.tsx +1 -1
- package/src/stories/components/inputs/TextField.stories.tsx +1 -1
- package/src/stories/components/layout/Footer.stories.tsx +19 -0
- package/src/stories/components/{Accordion.stories.tsx → navigation/Accordion.stories.tsx} +1 -1
- package/src/stories/components/{Breadcrumbs.stories.tsx → navigation/Breadcrumbs.stories.tsx} +1 -1
- package/src/stories/components/{DataPagination.stories.tsx → navigation/DataPagination.stories.tsx} +1 -1
- package/src/stories/components/navigation/ServiceWizardStepper.stories.tsx +53 -0
- package/src/theme/light/MuiAutocomplete.ts +4 -0
- package/src/theme/light/MuiCard.tsx +16 -2
- package/src/theme/light/MuiInputBase.ts +3 -1
- package/dist/stories/ServiceWizardStepper.stories.d.ts +0 -7
- package/dist/stories/components/Card.stories.d.ts +0 -24
- package/src/stories/ServiceWizardStepper.stories.tsx +0 -39
- /package/dist/stories/components/{buttons → actions}/Button.stories.d.ts +0 -0
- /package/src/stories/components/{buttons → actions}/Button.test.ts +0 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
import { useState } from 'react'
|
|
3
|
+
|
|
4
|
+
import ServiceWizardStepper from '../../../components/layout/ServiceWizardStepper'
|
|
5
|
+
import { StepItem } from '../../../components/layout/ServiceWizardStepper/StepperTypes'
|
|
6
|
+
|
|
7
|
+
const steps: StepItem[] = [
|
|
8
|
+
{ id: '1', title: 'Step 1' },
|
|
9
|
+
{ id: '2', title: 'Step 2' },
|
|
10
|
+
{ id: '3', title: 'Step 3' },
|
|
11
|
+
]
|
|
12
|
+
|
|
13
|
+
const meta: Meta<typeof ServiceWizardStepper> = {
|
|
14
|
+
title: 'components/navigation/ServiceWizardStepper',
|
|
15
|
+
component: ServiceWizardStepper,
|
|
16
|
+
tags: ['autodocs'],
|
|
17
|
+
argTypes: {
|
|
18
|
+
orientation: {
|
|
19
|
+
control: 'radio',
|
|
20
|
+
options: ['horizontal', 'vertical'],
|
|
21
|
+
},
|
|
22
|
+
activeStep: { table: { disable: true } },
|
|
23
|
+
onStepClick: { table: { disable: true } },
|
|
24
|
+
},
|
|
25
|
+
}
|
|
26
|
+
export default meta
|
|
27
|
+
|
|
28
|
+
type Story = StoryObj<typeof ServiceWizardStepper>
|
|
29
|
+
|
|
30
|
+
const createStory = (orientation: 'horizontal' | 'vertical'): Story => ({
|
|
31
|
+
render: (args) => {
|
|
32
|
+
const [activeStep, setActiveStep] = useState(0)
|
|
33
|
+
|
|
34
|
+
const handleStepClick = (index: number) => {
|
|
35
|
+
if (index > activeStep) return
|
|
36
|
+
setActiveStep(index)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<ServiceWizardStepper
|
|
41
|
+
{...args}
|
|
42
|
+
steps={steps}
|
|
43
|
+
activeStep={activeStep}
|
|
44
|
+
onStepClick={handleStepClick}
|
|
45
|
+
orientation={orientation}
|
|
46
|
+
/>
|
|
47
|
+
)
|
|
48
|
+
},
|
|
49
|
+
})
|
|
50
|
+
|
|
51
|
+
export const Horizontal = createStory('horizontal')
|
|
52
|
+
|
|
53
|
+
export const Vertical = createStory('vertical')
|
|
@@ -7,6 +7,8 @@ const MuiAutocomplete: Components['MuiAutocomplete'] = {
|
|
|
7
7
|
styleOverrides: {
|
|
8
8
|
root: {
|
|
9
9
|
'.MuiOutlinedInput-root': {
|
|
10
|
+
borderRadius: '.5rem',
|
|
11
|
+
|
|
10
12
|
'.MuiAutocomplete-input': {
|
|
11
13
|
marginRight: '2rem',
|
|
12
14
|
padding: '.25rem .1875rem',
|
|
@@ -14,12 +16,14 @@ const MuiAutocomplete: Components['MuiAutocomplete'] = {
|
|
|
14
16
|
},
|
|
15
17
|
},
|
|
16
18
|
paper: {
|
|
19
|
+
borderRadius: '.5rem',
|
|
17
20
|
fontSize: '.9375rem',
|
|
18
21
|
lineHeight: '1.125rem',
|
|
19
22
|
|
|
20
23
|
'.MuiAutocomplete-listbox': {
|
|
21
24
|
'.MuiAutocomplete-option': {
|
|
22
25
|
alignItems: 'flex-start',
|
|
26
|
+
borderRadius: '.375rem',
|
|
23
27
|
flexDirection: 'column',
|
|
24
28
|
margin: '0 .375rem',
|
|
25
29
|
padding: '.8125rem .75rem',
|
|
@@ -5,14 +5,28 @@ import Colors from '@/theme/palette'
|
|
|
5
5
|
const MuiCard: Components['MuiCard'] = {
|
|
6
6
|
defaultProps: {
|
|
7
7
|
elevation: 0,
|
|
8
|
+
variant: 'outlined',
|
|
8
9
|
},
|
|
9
10
|
styleOverrides: {
|
|
10
11
|
root: {
|
|
11
|
-
border: '1px solid',
|
|
12
|
-
borderColor: Colors.grey['300'],
|
|
13
12
|
borderRadius: '1rem',
|
|
14
13
|
},
|
|
15
14
|
},
|
|
15
|
+
variants: [
|
|
16
|
+
{
|
|
17
|
+
props: { variant: 'outlined' },
|
|
18
|
+
style: {
|
|
19
|
+
border: '1px solid',
|
|
20
|
+
borderColor: Colors.grey['300'],
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
props: { variant: 'elevation' },
|
|
25
|
+
style: {
|
|
26
|
+
border: 'none',
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
],
|
|
16
30
|
}
|
|
17
31
|
|
|
18
32
|
export default MuiCard
|
|
@@ -7,7 +7,7 @@ const MuiInputBase: Components['MuiInputBase'] = {
|
|
|
7
7
|
styleOverrides: {
|
|
8
8
|
root: {
|
|
9
9
|
backgroundColor: 'white',
|
|
10
|
-
borderRadius: '.
|
|
10
|
+
borderRadius: '.5rem',
|
|
11
11
|
|
|
12
12
|
'.MuiInputBase-input': {
|
|
13
13
|
color: palette.grey['900'],
|
|
@@ -34,6 +34,7 @@ const MuiInputBase: Components['MuiInputBase'] = {
|
|
|
34
34
|
'&.Mui-focused': {
|
|
35
35
|
'.MuiOutlinedInput-notchedOutline': {
|
|
36
36
|
borderColor: `${palette.grey['900']} !important`,
|
|
37
|
+
borderRadius: '.5rem',
|
|
37
38
|
boxShadow: `0px 0px 0px 3px rgba(${decomposeColor(palette.grey['900']).values}, .2)`,
|
|
38
39
|
},
|
|
39
40
|
|
|
@@ -41,6 +42,7 @@ const MuiInputBase: Components['MuiInputBase'] = {
|
|
|
41
42
|
'.MuiOutlinedInput-notchedOutline': {
|
|
42
43
|
borderColor: `${palette.error['600']} !important`,
|
|
43
44
|
borderWidth: '.125rem',
|
|
45
|
+
borderRadius: '.5rem',
|
|
44
46
|
boxShadow: `0px 0px 0px 3px rgba(${decomposeColor(palette.error['600']).values}, .2)`,
|
|
45
47
|
},
|
|
46
48
|
},
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { default as ServiceWizardStepper } from '../components/layout/ServiceWizardStepper';
|
|
3
|
-
declare const meta: Meta<typeof ServiceWizardStepper>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof ServiceWizardStepper>;
|
|
6
|
-
export declare const Horizontal: Story;
|
|
7
|
-
export declare const Vertical: Story;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { Meta, ReactRenderer } from '@storybook/react';
|
|
2
|
-
import { default as RcSesCard, RcSesCardTestIds } from '../../components/common/Card';
|
|
3
|
-
import { AnnotatedStoryFn } from '@storybook/core/csf';
|
|
4
|
-
import { CardProps, StackProps, BoxProps, TypographyProps } from '@mui/material';
|
|
5
|
-
import { ReactNode } from 'react';
|
|
6
|
-
declare const meta: Meta<typeof RcSesCard>;
|
|
7
|
-
export default meta;
|
|
8
|
-
export declare const Main: AnnotatedStoryFn<ReactRenderer, Omit< CardProps, "children" | "title"> & {
|
|
9
|
-
title: ReactNode;
|
|
10
|
-
description?: ReactNode;
|
|
11
|
-
children: ReactNode;
|
|
12
|
-
leadingActions?: ReactNode;
|
|
13
|
-
trailingActions?: ReactNode;
|
|
14
|
-
testIds?: RcSesCardTestIds;
|
|
15
|
-
slotProps?: {
|
|
16
|
-
actions?: StackProps;
|
|
17
|
-
content?: BoxProps;
|
|
18
|
-
description?: TypographyProps;
|
|
19
|
-
header?: StackProps;
|
|
20
|
-
leadingActions?: StackProps;
|
|
21
|
-
title?: TypographyProps;
|
|
22
|
-
trailingActions?: StackProps;
|
|
23
|
-
};
|
|
24
|
-
}>;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
|
|
3
|
-
import ServiceWizardStepper from '../components/layout/ServiceWizardStepper'
|
|
4
|
-
import { StepItem } from '../components/layout/ServiceWizardStepper/StepperTypes'
|
|
5
|
-
|
|
6
|
-
const steps: StepItem[] = [
|
|
7
|
-
{ id: '1', title: 'Step 1', state: 'completed' },
|
|
8
|
-
{ id: '2', title: 'Step 2', state: 'active' },
|
|
9
|
-
{ id: '3', title: 'Step 3', state: 'pending' },
|
|
10
|
-
]
|
|
11
|
-
|
|
12
|
-
const meta: Meta<typeof ServiceWizardStepper> = {
|
|
13
|
-
title: 'Components/ServiceWizardStepper',
|
|
14
|
-
component: ServiceWizardStepper,
|
|
15
|
-
tags: ['autodocs'],
|
|
16
|
-
argTypes: {
|
|
17
|
-
orientation: {
|
|
18
|
-
control: 'radio',
|
|
19
|
-
options: ['horizontal', 'vertical'],
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
}
|
|
23
|
-
export default meta
|
|
24
|
-
|
|
25
|
-
type Story = StoryObj<typeof ServiceWizardStepper>
|
|
26
|
-
|
|
27
|
-
export const Horizontal: Story = {
|
|
28
|
-
args: {
|
|
29
|
-
steps,
|
|
30
|
-
orientation: 'horizontal',
|
|
31
|
-
},
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export const Vertical: Story = {
|
|
35
|
-
args: {
|
|
36
|
-
steps,
|
|
37
|
-
orientation: 'vertical',
|
|
38
|
-
},
|
|
39
|
-
}
|
|
File without changes
|
|
File without changes
|