@registrucentras/rc-ses-react-components 1.4.1 → 1.5.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.
Files changed (74) hide show
  1. package/dist/components/common/Accordion/hooks/useAccordionController.d.ts +1 -0
  2. package/dist/components/common/Card/index.d.ts +7 -2
  3. package/dist/components/common/ImageCard/index.d.ts +13 -0
  4. package/dist/components/common/ListWithIcons/components/ListWithIconsItem.d.ts +9 -0
  5. package/dist/components/common/ListWithIcons/index.d.ts +14 -0
  6. package/dist/components/layout/Footer/index.d.ts +5 -0
  7. package/dist/components/layout/ServiceFormContainer/CardFormContainer/index.d.ts +3 -2
  8. package/dist/components/layout/ServiceWizardStepper/StepperTypes.d.ts +0 -3
  9. package/dist/components/layout/ServiceWizardStepper/components/DesktopStepper.d.ts +2 -1
  10. package/dist/components/layout/ServiceWizardStepper/components/MobileStepper.d.ts +2 -1
  11. package/dist/components/layout/ServiceWizardStepper/components/StyledStepLabel.d.ts +2 -2
  12. package/dist/components/layout/ServiceWizardStepper/index.d.ts +3 -2
  13. package/dist/library/icons.d.ts +1 -3
  14. package/dist/library/index.d.ts +6 -14
  15. package/dist/library/types.d.ts +2 -0
  16. package/dist/registrucentras-rc-ses-react-components.cjs +11 -11
  17. package/dist/registrucentras-rc-ses-react-components.js +2530 -2251
  18. package/dist/stories/ServiceWizardStepper.stories.d.ts +5 -5
  19. package/dist/stories/components/Card.stories.d.ts +26 -1
  20. package/dist/stories/components/ImageCard.stories.d.ts +8 -0
  21. package/dist/stories/components/ListWithIcons.stories.d.ts +33 -0
  22. package/dist/stories/components/inputs/FileDropzone.stories.d.ts +32 -0
  23. package/dist/stories/components/inputs/PhoneInput.stories.d.ts +24 -0
  24. package/dist/stories/components/inputs/SearchableField.stories.d.ts +2 -2
  25. package/dist/stories/components/inputs/Select.stories.d.ts +3 -3
  26. package/dist/stories/components/inputs/TextField.stories.d.ts +5 -5
  27. package/dist/stories/components/layout/Footer.stories.d.ts +8 -0
  28. package/package.json +1 -1
  29. package/src/components/common/Accordion/hooks/useAccordionController.tsx +43 -11
  30. package/src/components/common/Card/index.test.tsx +36 -0
  31. package/src/components/common/Card/index.tsx +62 -22
  32. package/src/components/common/DataPagination/components/PaginationButton.tsx +1 -1
  33. package/src/components/common/DataPagination/index.tsx +1 -1
  34. package/src/components/common/ImageCard/index.test.tsx +78 -0
  35. package/src/components/common/ImageCard/index.tsx +43 -0
  36. package/src/components/common/ListWithIcons/components/ListWithIconsItem.tsx +94 -0
  37. package/src/components/common/ListWithIcons/index.test.tsx +75 -0
  38. package/src/components/common/ListWithIcons/index.tsx +47 -0
  39. package/src/components/form/inputs/CheckboxFormControl.tsx +1 -1
  40. package/src/components/form/inputs/FileDropzone.tsx +1 -1
  41. package/src/components/form/inputs/FileUpload.tsx +9 -3
  42. package/src/components/form/inputs/NumberStepper.tsx +2 -2
  43. package/src/components/form/inputs/PhoneInputFormControl/components/RowComponent.tsx +1 -0
  44. package/src/components/form/inputs/RadioButtonGroup.tsx +1 -1
  45. package/src/components/layout/Footer/index.test.tsx +20 -0
  46. package/src/components/layout/Footer/index.tsx +33 -0
  47. package/src/components/layout/ServiceFormContainer/AccordionFormContainer/index.tsx +21 -4
  48. package/src/components/layout/ServiceFormContainer/AccordionFormContainer/utils.ts +0 -1
  49. package/src/components/layout/ServiceFormContainer/CardFormContainer/index.test.tsx +14 -12
  50. package/src/components/layout/ServiceFormContainer/CardFormContainer/index.tsx +4 -1
  51. package/src/components/layout/ServiceWizardStepper/StepperTypes.ts +0 -3
  52. package/src/components/layout/ServiceWizardStepper/components/DesktopStepper.test.tsx +33 -4
  53. package/src/components/layout/ServiceWizardStepper/components/DesktopStepper.tsx +6 -2
  54. package/src/components/layout/ServiceWizardStepper/components/MobileStepper.test.tsx +34 -7
  55. package/src/components/layout/ServiceWizardStepper/components/MobileStepper.tsx +4 -2
  56. package/src/components/layout/ServiceWizardStepper/components/StyledStepLabel.tsx +4 -2
  57. package/src/components/layout/ServiceWizardStepper/index.tsx +13 -21
  58. package/src/examples/CardMultipleStepForm/index.tsx +18 -31
  59. package/src/examples/HorizontalMultiStepForm/index.tsx +22 -17
  60. package/src/examples/ListWithPagination/index.tsx +41 -11
  61. package/src/library/icons.ts +3 -2
  62. package/src/library/index.ts +14 -22
  63. package/src/library/types.ts +6 -0
  64. package/src/stories/ServiceWizardStepper.stories.tsx +28 -14
  65. package/src/stories/components/Card.stories.tsx +18 -0
  66. package/src/stories/components/ImageCard.stories.tsx +54 -0
  67. package/src/stories/components/ListWithIcons.stories.tsx +74 -0
  68. package/src/stories/components/form/CardFormContainer.stories.tsx +22 -32
  69. package/src/stories/components/inputs/FileDropzone.stories.tsx +117 -0
  70. package/src/stories/components/inputs/PhoneInput.stories.tsx +110 -0
  71. package/src/stories/components/layout/Footer.stories.tsx +19 -0
  72. package/src/theme/light/MuiAutocomplete.ts +4 -0
  73. package/src/theme/light/MuiCard.tsx +16 -2
  74. package/src/theme/light/MuiInputBase.ts +3 -1
@@ -1,12 +1,13 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react'
2
+ import { useState } from 'react'
2
3
 
3
4
  import ServiceWizardStepper from '../components/layout/ServiceWizardStepper'
4
5
  import { StepItem } from '../components/layout/ServiceWizardStepper/StepperTypes'
5
6
 
6
7
  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' },
8
+ { id: '1', title: 'Step 1' },
9
+ { id: '2', title: 'Step 2' },
10
+ { id: '3', title: 'Step 3' },
10
11
  ]
11
12
 
12
13
  const meta: Meta<typeof ServiceWizardStepper> = {
@@ -18,22 +19,35 @@ const meta: Meta<typeof ServiceWizardStepper> = {
18
19
  control: 'radio',
19
20
  options: ['horizontal', 'vertical'],
20
21
  },
22
+ activeStep: { table: { disable: true } },
23
+ onStepClick: { table: { disable: true } },
21
24
  },
22
25
  }
23
26
  export default meta
24
27
 
25
28
  type Story = StoryObj<typeof ServiceWizardStepper>
26
29
 
27
- export const Horizontal: Story = {
28
- args: {
29
- steps,
30
- orientation: 'horizontal',
31
- },
32
- }
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
+ }
33
38
 
34
- export const Vertical: Story = {
35
- args: {
36
- steps,
37
- orientation: 'vertical',
39
+ return (
40
+ <ServiceWizardStepper
41
+ {...args}
42
+ steps={steps}
43
+ activeStep={activeStep}
44
+ onStepClick={handleStepClick}
45
+ orientation={orientation}
46
+ />
47
+ )
38
48
  },
39
- }
49
+ })
50
+
51
+ export const Horizontal = createStory('horizontal')
52
+
53
+ export const Vertical = createStory('vertical')
@@ -3,8 +3,10 @@ import { Box, Typography } from '@mui/material'
3
3
  import type { Meta, StoryFn } from '@storybook/react'
4
4
 
5
5
  import CaretLeftIcon from '@/assets/icons/CaretLeftIcon'
6
+ import MagnifyingGlassIcon from '@/assets/icons/MagnifyingGlassIcon'
6
7
  import RcSesButton from '@/components/common/Button'
7
8
  import RcSesCard from '@/components/common/Card'
9
+ import palette from '@/theme/palette'
8
10
 
9
11
  const meta: Meta<typeof RcSesCard> = {
10
12
  title: 'components/common/Card',
@@ -49,3 +51,19 @@ Main.args = {
49
51
  </>
50
52
  ),
51
53
  }
54
+
55
+ export const WithImage = Template.bind({})
56
+ WithImage.args = {
57
+ variant: 'elevation',
58
+ centered: true,
59
+ title: 'Place heading text here',
60
+ description:
61
+ 'Additional description text elaborating on situation and what to do next.',
62
+ image: (
63
+ <Box sx={{ color: palette.grey[400], position: 'relative', display: 'inline-flex' }}>
64
+ <MagnifyingGlassIcon size={64} fillColor={palette.grey[400]} />
65
+ </Box>
66
+ ),
67
+ children: <RcSesButton>Button</RcSesButton>,
68
+ contentBackground: false,
69
+ }
@@ -0,0 +1,54 @@
1
+ /* eslint-disable react/function-component-definition */
2
+ import { Box } from '@mui/material'
3
+ import type { Meta, StoryFn } from '@storybook/react'
4
+
5
+ import MagnifyingGlassIcon from '@/assets/icons/MagnifyingGlassIcon'
6
+ import RcSesButton from '@/components/common/Button'
7
+ import RcSesImageCard from '@/components/common/ImageCard'
8
+ import palette from '@/theme/palette'
9
+
10
+ const meta: Meta<typeof RcSesImageCard> = {
11
+ title: 'components/common/ImageCard',
12
+ component: RcSesImageCard,
13
+ tags: ['autodocs'],
14
+ }
15
+
16
+ export default meta
17
+
18
+ const Template: StoryFn<typeof RcSesImageCard> = (args) => <RcSesImageCard {...args} />
19
+
20
+ const defaultImage = (
21
+ <Box sx={{ position: 'relative', display: 'inline-flex' }}>
22
+ <MagnifyingGlassIcon size={64} fillColor={palette.grey[400]} />
23
+ </Box>
24
+ )
25
+
26
+ export const Main = Template.bind({})
27
+ Main.args = {
28
+ image: defaultImage,
29
+ title: 'Place heading text here',
30
+ description:
31
+ 'Additional description text elaborating on situation and what to do next.',
32
+ button: <RcSesButton>Button</RcSesButton>,
33
+ }
34
+
35
+ export const WithoutButton = Template.bind({})
36
+ WithoutButton.args = {
37
+ image: defaultImage,
38
+ title: 'Place heading text here',
39
+ description:
40
+ 'Additional description text elaborating on situation and what to do next.',
41
+ }
42
+
43
+ export const OutlinedButton = Template.bind({})
44
+ OutlinedButton.args = {
45
+ image: defaultImage,
46
+ title: 'Place heading text here',
47
+ description:
48
+ 'Additional description text elaborating on situation and what to do next.',
49
+ button: (
50
+ <RcSesButton color='grey' variant='outlined'>
51
+ Button
52
+ </RcSesButton>
53
+ ),
54
+ }
@@ -0,0 +1,74 @@
1
+ import type { Meta, StoryObj } from '@storybook/react'
2
+
3
+ import CheckCircleFillIcon from '@/assets/icons/CheckCircleFillIcon'
4
+ import WarningFillIcon from '@/assets/icons/WarningFillIcon'
5
+ import ListWithIcons, {
6
+ type ListWithIconsItemData,
7
+ } from '@/components/common/ListWithIcons'
8
+
9
+ const baseItems: ListWithIconsItemData[] = [
10
+ {
11
+ id: 'status-ok',
12
+ icon: <CheckCircleFillIcon size={20} />,
13
+ text: 'Application received',
14
+ tooltip: 'The submission was successfully received.',
15
+ },
16
+ {
17
+ id: 'status-review',
18
+ icon: <WarningFillIcon size={20} />,
19
+ text: 'Requires review',
20
+ tooltip: 'A specialist will review the provided details.',
21
+ },
22
+ {
23
+ id: 'status-disabled',
24
+ icon: <WarningFillIcon size={20} />,
25
+ text: 'Unavailable item',
26
+ tooltip: 'This item is currently disabled.',
27
+ disabled: true,
28
+ },
29
+ ]
30
+
31
+ const meta = {
32
+ title: 'components/common/ListWithIcons',
33
+ component: ListWithIcons,
34
+ tags: ['autodocs'],
35
+ args: {
36
+ items: baseItems,
37
+ layout: 'vertical',
38
+ isLoading: false,
39
+ },
40
+ argTypes: {
41
+ layout: {
42
+ control: {
43
+ type: 'radio',
44
+ },
45
+ options: ['vertical', 'horizontal'],
46
+ },
47
+ isLoading: {
48
+ control: {
49
+ type: 'boolean',
50
+ },
51
+ },
52
+ items: {
53
+ control: false,
54
+ },
55
+ },
56
+ } satisfies Meta<typeof ListWithIcons>
57
+
58
+ export default meta
59
+
60
+ type Story = StoryObj<typeof meta>
61
+
62
+ export const Main: Story = {}
63
+
64
+ export const Horizontal: Story = {
65
+ args: {
66
+ layout: 'horizontal',
67
+ },
68
+ }
69
+
70
+ export const Loading: Story = {
71
+ args: {
72
+ isLoading: true,
73
+ },
74
+ }
@@ -8,17 +8,17 @@ import FieldView from '@/components/storybook/FieldView'
8
8
  import Fields from '@/components/storybook/Fields'
9
9
 
10
10
  const shortSteps: StepItem[] = [
11
- { id: '1', state: 'completed', title: 'Paslauga' },
12
- { id: '2', state: 'active', title: 'Duomenys' },
13
- { id: '3', state: 'pending', title: 'Patvirtinimas' },
11
+ { id: '1', title: 'Paslauga' },
12
+ { id: '2', title: 'Duomenys' },
13
+ { id: '3', title: 'Patvirtinimas' },
14
14
  ]
15
15
 
16
16
  const longSteps: StepItem[] = [
17
- { id: '1', state: 'completed', title: 'Paslauga' },
18
- { id: '2', state: 'completed', title: 'Duomenys' },
19
- { id: '3', state: 'active', title: 'Dokumentai' },
20
- { id: '4', state: 'pending', title: 'Mokėjimas' },
21
- { id: '5', state: 'pending', title: 'Patvirtinimas' },
17
+ { id: '1', title: 'Paslauga' },
18
+ { id: '2', title: 'Duomenys' },
19
+ { id: '3', title: 'Dokumentai' },
20
+ { id: '4', title: 'Mokėjimas' },
21
+ { id: '5', title: 'Patvirtinimas' },
22
22
  ]
23
23
 
24
24
  const meta: Meta<typeof RcSesCardFormContainer> = {
@@ -28,6 +28,7 @@ const meta: Meta<typeof RcSesCardFormContainer> = {
28
28
  argTypes: {
29
29
  steps: { table: { disable: true } },
30
30
  onStepClick: { table: { disable: true } },
31
+ activeStep: { table: { disable: true } },
31
32
  },
32
33
  }
33
34
 
@@ -58,35 +59,23 @@ const DemoContent = () => (
58
59
 
59
60
  const createTemplate =
60
61
  (
61
- initialSteps: StepItem[],
62
+ steps: StepItem[],
62
63
  forcedLayout?: 'row' | 'column',
63
64
  ): StoryFn<typeof RcSesCardFormContainer> =>
64
65
  (args) => {
65
- const [currentSteps, setCurrentSteps] = useState(initialSteps)
66
- const activeStep = currentSteps.findIndex((s) => s.state === 'active')
66
+ const [activeStep, setActiveStep] = useState(0)
67
67
 
68
68
  const handleBack = () => {
69
- if (activeStep <= 0) return
70
-
71
- const updated = currentSteps.map((step, index) => {
72
- if (index < activeStep - 1) return { ...step, state: 'completed' as const }
73
- if (index === activeStep - 1) return { ...step, state: 'active' as const }
74
- return { ...step, state: 'pending' as const }
75
- })
76
-
77
- setCurrentSteps(updated)
69
+ setActiveStep((prev) => Math.max(prev - 1, 0))
78
70
  }
79
71
 
80
72
  const handleNext = () => {
81
- if (activeStep === -1 || activeStep === currentSteps.length - 1) return
82
-
83
- const updated = currentSteps.map((step, index) => {
84
- if (index < activeStep + 1) return { ...step, state: 'completed' as const }
85
- if (index === activeStep + 1) return { ...step, state: 'active' as const }
86
- return { ...step, state: 'pending' as const }
87
- })
73
+ setActiveStep((prev) => Math.min(prev + 1, steps.length - 1))
74
+ }
88
75
 
89
- setCurrentSteps(updated)
76
+ const handleStepClick = (index: number) => {
77
+ if (index > activeStep) return
78
+ setActiveStep(index)
90
79
  }
91
80
 
92
81
  return (
@@ -95,10 +84,11 @@ const createTemplate =
95
84
  <RcSesCardFormContainer
96
85
  {...args}
97
86
  layout={forcedLayout}
98
- steps={currentSteps}
99
- onStepClick={setCurrentSteps}
87
+ steps={steps}
88
+ activeStep={activeStep}
89
+ onStepClick={handleStepClick}
100
90
  leadingActions={
101
- <Button onClick={handleBack} disabled={activeStep <= 0}>
91
+ <Button onClick={handleBack} disabled={activeStep === 0}>
102
92
  Back
103
93
  </Button>
104
94
  }
@@ -108,7 +98,7 @@ const createTemplate =
108
98
  <Button
109
99
  variant='contained'
110
100
  onClick={handleNext}
111
- disabled={activeStep === currentSteps.length - 1}
101
+ disabled={activeStep === steps.length - 1}
112
102
  >
113
103
  Next
114
104
  </Button>
@@ -0,0 +1,117 @@
1
+ /* eslint-disable react/function-component-definition */
2
+ import { Meta, StoryFn } from '@storybook/react'
3
+ import { FieldError, useForm } from 'react-hook-form'
4
+
5
+ import RcSesFileDropzone from '@/components/form/inputs/FileDropzone'
6
+ import FieldPreviewRow from '@/components/storybook/FieldPreviewRow'
7
+ import FieldView from '@/components/storybook/FieldView'
8
+ import Fields from '@/components/storybook/Fields'
9
+ import PreviewTitle from '@/components/storybook/PreviewTitle'
10
+
11
+ type FormModel = {
12
+ documents: File[]
13
+ documentsDisabled: File[]
14
+ documentsError: File[]
15
+ }
16
+
17
+ const meta: Meta<typeof RcSesFileDropzone> = {
18
+ title: 'components/common/inputs/FileDropzone',
19
+ component: RcSesFileDropzone,
20
+ argTypes: {
21
+ control: {
22
+ table: {
23
+ disable: true,
24
+ },
25
+ },
26
+ errors: {
27
+ table: {
28
+ disable: true,
29
+ },
30
+ },
31
+ rules: {
32
+ table: {
33
+ disable: true,
34
+ },
35
+ },
36
+ name: {
37
+ table: {
38
+ disable: true,
39
+ },
40
+ },
41
+ id: {
42
+ table: {
43
+ disable: true,
44
+ },
45
+ },
46
+ },
47
+ tags: ['autodocs'],
48
+ }
49
+
50
+ export default meta
51
+
52
+ const Template: StoryFn<typeof RcSesFileDropzone> = (args) => {
53
+ const {
54
+ control,
55
+ formState: { errors },
56
+ } = useForm<FormModel>({
57
+ mode: 'all',
58
+ defaultValues: {
59
+ documents: [],
60
+ documentsDisabled: [],
61
+ documentsError: [],
62
+ },
63
+ })
64
+
65
+ const { label, slotProps } = args
66
+
67
+ return (
68
+ <Fields>
69
+ <FieldView>
70
+ <RcSesFileDropzone
71
+ id='documents'
72
+ name='documents'
73
+ control={control}
74
+ rules={{ required: true }}
75
+ label={label}
76
+ errors={errors?.documents as FieldError | undefined}
77
+ slotProps={slotProps}
78
+ />
79
+ </FieldView>
80
+
81
+ <FieldPreviewRow>
82
+ <PreviewTitle>State previews</PreviewTitle>
83
+
84
+ <RcSesFileDropzone
85
+ id='documentsDisabled'
86
+ name='documentsDisabled'
87
+ control={control}
88
+ rules={{ required: true }}
89
+ label='Disabled'
90
+ disabled
91
+ errors={errors?.documentsDisabled as FieldError | undefined}
92
+ slotProps={slotProps}
93
+ />
94
+
95
+ <RcSesFileDropzone
96
+ id='documentsError'
97
+ name='documentsError'
98
+ control={control}
99
+ rules={{ required: true }}
100
+ label='Error'
101
+ errors={{ message: 'Error Message', type: 'required' }}
102
+ slotProps={slotProps}
103
+ />
104
+ </FieldPreviewRow>
105
+ </Fields>
106
+ )
107
+ }
108
+
109
+ export const Main = Template.bind({})
110
+ Main.args = {
111
+ label: 'Upload files',
112
+ slotProps: {
113
+ wrapper: {
114
+ labelSubtitle: 'Tinkami formatai: .doc, .docx, .pdf',
115
+ },
116
+ },
117
+ }
@@ -0,0 +1,110 @@
1
+ /* eslint-disable react/function-component-definition */
2
+ import { Meta, StoryFn } from '@storybook/react'
3
+ import { useForm } from 'react-hook-form'
4
+
5
+ import RcSesPhoneInput from '@/components/form/inputs/PhoneInput'
6
+ import FieldPreviewRow from '@/components/storybook/FieldPreviewRow'
7
+ import FieldView from '@/components/storybook/FieldView'
8
+ import Fields from '@/components/storybook/Fields'
9
+ import PreviewTitle from '@/components/storybook/PreviewTitle'
10
+
11
+ type FormModel = {
12
+ phone: string
13
+ phoneDisabled: string
14
+ phoneError: string
15
+ }
16
+
17
+ const meta: Meta<typeof RcSesPhoneInput> = {
18
+ title: 'components/common/inputs/PhoneInput',
19
+ component: RcSesPhoneInput,
20
+ argTypes: {
21
+ control: {
22
+ table: {
23
+ disable: true,
24
+ },
25
+ },
26
+ errors: {
27
+ table: {
28
+ disable: true,
29
+ },
30
+ },
31
+ rules: {
32
+ table: {
33
+ disable: true,
34
+ },
35
+ },
36
+ name: {
37
+ table: {
38
+ disable: true,
39
+ },
40
+ },
41
+ id: {
42
+ table: {
43
+ disable: true,
44
+ },
45
+ },
46
+ },
47
+ tags: ['autodocs'],
48
+ }
49
+
50
+ export default meta
51
+
52
+ const Template: StoryFn<typeof RcSesPhoneInput> = (args) => {
53
+ const {
54
+ control,
55
+ formState: { errors },
56
+ } = useForm<FormModel>({
57
+ mode: 'all',
58
+ defaultValues: {
59
+ phone: '',
60
+ phoneDisabled: '',
61
+ phoneError: '',
62
+ },
63
+ })
64
+
65
+ const { label, slotProps } = args
66
+
67
+ return (
68
+ <Fields>
69
+ <FieldView>
70
+ <RcSesPhoneInput
71
+ id='phone'
72
+ name='phone'
73
+ control={control}
74
+ rules={{ required: true }}
75
+ label={label}
76
+ errors={errors?.phone}
77
+ slotProps={slotProps}
78
+ />
79
+ </FieldView>
80
+
81
+ <FieldPreviewRow>
82
+ <PreviewTitle>State previews</PreviewTitle>
83
+ <RcSesPhoneInput
84
+ id='phoneDisabled'
85
+ name='phoneDisabled'
86
+ control={control}
87
+ rules={{ required: true }}
88
+ label='Disabled'
89
+ disabled
90
+ errors={errors?.phoneDisabled}
91
+ slotProps={slotProps}
92
+ />
93
+ <RcSesPhoneInput
94
+ id='phoneError'
95
+ name='phoneError'
96
+ control={control}
97
+ rules={{ required: true }}
98
+ label='Error'
99
+ errors={{ message: 'Error Message', type: 'required' }}
100
+ slotProps={slotProps}
101
+ />
102
+ </FieldPreviewRow>
103
+ </Fields>
104
+ )
105
+ }
106
+
107
+ export const Main = Template.bind({})
108
+ Main.args = {
109
+ label: 'Phone number',
110
+ }
@@ -0,0 +1,19 @@
1
+ /* eslint-disable react/function-component-definition */
2
+ import type { Meta, StoryFn } from '@storybook/react'
3
+
4
+ import RcSesFooter from '@/components/layout/Footer'
5
+
6
+ const meta: Meta<typeof RcSesFooter> = {
7
+ title: 'components/layout/Footer',
8
+ component: RcSesFooter,
9
+ tags: ['autodocs'],
10
+ }
11
+
12
+ export default meta
13
+
14
+ const Template: StoryFn<typeof RcSesFooter> = (args) => <RcSesFooter {...args} />
15
+
16
+ export const Main = Template.bind({})
17
+ Main.args = {
18
+ text: '© Valstybės įmonė Registrų centras. Duomenys apie įmonę kaupiami ir saugomi Juridinių asmenų registre.\nStudentų g. 39, LT-08106 Vilnius | tel. +370 5 268 8262 | el. p. info@registrucentras.lt | įmonės kodas 124110246 | PVM mokėtojo kodas LT241102419',
19
+ }
@@ -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: '.1875rem',
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
  },