@registrucentras/rc-ses-react-components 1.3.1 → 1.4.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 (153) hide show
  1. package/README.md +3 -1
  2. package/dist/assets/IconProps.d.ts +4 -2
  3. package/dist/assets/icons/ArrowLeftIcon.d.ts +3 -0
  4. package/dist/assets/icons/ArrowRightIcon.d.ts +1 -1
  5. package/dist/assets/icons/BarcodeIcon.d.ts +3 -0
  6. package/dist/assets/icons/CalendarBlankIcon.d.ts +1 -1
  7. package/dist/assets/icons/CaretDoubleLeftBoldIcon.d.ts +1 -1
  8. package/dist/assets/icons/CaretDoubleRightBoldIcon.d.ts +1 -1
  9. package/dist/assets/icons/CaretDownBoldIcon.d.ts +1 -1
  10. package/dist/assets/icons/CaretDownFill.d.ts +2 -2
  11. package/dist/assets/icons/CaretDownIcon.d.ts +1 -1
  12. package/dist/assets/icons/CaretLeftBoldIcon.d.ts +1 -1
  13. package/dist/assets/icons/CaretLeftIcon.d.ts +1 -1
  14. package/dist/assets/icons/CaretRightBoldIcon.d.ts +1 -1
  15. package/dist/assets/icons/CheckBoldIcon.d.ts +1 -1
  16. package/dist/assets/icons/CheckCircleFillIcon.d.ts +2 -2
  17. package/dist/assets/icons/CheckUncheckedBoldIcon.d.ts +1 -1
  18. package/dist/assets/icons/CircleFilledIcon.d.ts +3 -0
  19. package/dist/assets/icons/CloseIcon.d.ts +1 -1
  20. package/dist/assets/icons/CollapseChevronsIcon.d.ts +1 -1
  21. package/dist/assets/icons/DotCircleFilledIcon.d.ts +3 -0
  22. package/dist/assets/icons/ExpandChevronsIcon.d.ts +1 -1
  23. package/dist/assets/icons/InfoFillIcon.d.ts +1 -1
  24. package/dist/assets/icons/MagnifyingGlassIcon.d.ts +2 -2
  25. package/dist/assets/icons/MapPinAreaIcon.d.ts +3 -0
  26. package/dist/assets/icons/MinusBoldIcon.d.ts +1 -1
  27. package/dist/assets/icons/PlusBoldIcon.d.ts +1 -1
  28. package/dist/assets/icons/QuestionFillIcon.d.ts +1 -1
  29. package/dist/assets/icons/QuestionIcon.d.ts +1 -1
  30. package/dist/assets/icons/ScalesIcon.d.ts +3 -0
  31. package/dist/assets/icons/ScrollIcon.d.ts +1 -1
  32. package/dist/assets/icons/SpinnerGapBoldIcon.d.ts +1 -1
  33. package/dist/assets/icons/UploadSimpleIcon.d.ts +1 -1
  34. package/dist/assets/icons/WarningDiamondFillIcon.d.ts +1 -1
  35. package/dist/assets/icons/WarningFillIcon.d.ts +1 -1
  36. package/dist/assets/icons/XCircleFillIcon.d.ts +2 -2
  37. package/dist/components/common/Button/index.d.ts +2 -2
  38. package/dist/components/common/Card/index.d.ts +31 -0
  39. package/dist/components/common/DataPagination/components/PaginationButton.d.ts +8 -0
  40. package/dist/components/common/DataPagination/index.d.ts +10 -0
  41. package/dist/components/layout/ServiceFormContainer/utils.d.ts +4 -0
  42. package/dist/components/layout/ServiceWizardStepper/StepConnector.d.ts +7 -0
  43. package/dist/components/layout/ServiceWizardStepper/StepperTypes.d.ts +7 -0
  44. package/dist/components/layout/ServiceWizardStepper/components/CustomStepIcon.d.ts +3 -0
  45. package/dist/components/layout/ServiceWizardStepper/components/DesktopStepper.d.ts +9 -0
  46. package/dist/components/layout/ServiceWizardStepper/components/HorizontalStepperButton.d.ts +6 -0
  47. package/dist/components/layout/ServiceWizardStepper/components/MobileStepper.d.ts +8 -0
  48. package/dist/components/layout/ServiceWizardStepper/components/StyledStepLabel.d.ts +11 -0
  49. package/dist/components/layout/ServiceWizardStepper/index.d.ts +6 -5
  50. package/dist/library/icons.d.ts +27 -3
  51. package/dist/library/index.d.ts +6 -2
  52. package/dist/registrucentras-rc-ses-react-components.cjs +12 -12
  53. package/dist/registrucentras-rc-ses-react-components.js +3882 -2672
  54. package/dist/stories/ServiceWizardStepper.stories.d.ts +7 -0
  55. package/dist/stories/components/Accordion.stories.d.ts +2 -2
  56. package/dist/stories/components/Card.stories.d.ts +24 -0
  57. package/dist/stories/components/DataPagination.stories.d.ts +47 -0
  58. package/dist/stories/components/Icons.stories.d.ts +6 -0
  59. package/dist/stories/components/buttons/Button.stories.d.ts +10 -0
  60. package/dist/stories/components/form/CheckboxFormControl.stories.d.ts +2 -2
  61. package/dist/stories/components/inputs/Checkbox.stories.d.ts +2 -2
  62. package/dist/stories/components/inputs/FileUpload.stories.d.ts +2 -2
  63. package/dist/stories/components/inputs/NumberStepper.stories.d.ts +2 -2
  64. package/dist/stories/components/inputs/SearchableField.stories.d.ts +60 -60
  65. package/dist/stories/components/inputs/Select.stories.d.ts +126 -126
  66. package/dist/stories/components/inputs/TextField.stories.d.ts +113 -113
  67. package/dist/theme/light/MuiPagination.d.ts +2 -1
  68. package/package.json +2 -1
  69. package/src/App.tsx +8 -0
  70. package/src/assets/IconProps.ts +5 -2
  71. package/src/assets/icons/ArrowLeftIcon.tsx +16 -0
  72. package/src/assets/icons/ArrowRightIcon.tsx +8 -13
  73. package/src/assets/icons/BarcodeIcon.tsx +9 -0
  74. package/src/assets/icons/CalendarBlankIcon.tsx +4 -16
  75. package/src/assets/icons/CaretDoubleLeftBoldIcon.tsx +14 -12
  76. package/src/assets/icons/CaretDoubleRightBoldIcon.tsx +14 -12
  77. package/src/assets/icons/CaretDownBoldIcon.tsx +9 -12
  78. package/src/assets/icons/CaretDownFill.tsx +11 -10
  79. package/src/assets/icons/CaretDownIcon.tsx +4 -16
  80. package/src/assets/icons/CaretLeftBoldIcon.tsx +9 -12
  81. package/src/assets/icons/CaretLeftIcon.tsx +4 -16
  82. package/src/assets/icons/CaretRightBoldIcon.tsx +9 -12
  83. package/src/assets/icons/CheckBoldIcon.tsx +9 -24
  84. package/src/assets/icons/CheckCircleFillIcon.tsx +10 -14
  85. package/src/assets/icons/CheckUncheckedBoldIcon.tsx +4 -23
  86. package/src/assets/icons/CircleFilledIcon.tsx +11 -0
  87. package/src/assets/icons/CloseIcon.tsx +4 -16
  88. package/src/assets/icons/CollapseChevronsIcon.tsx +9 -13
  89. package/src/assets/icons/DotCircleFilledIcon.tsx +23 -0
  90. package/src/assets/icons/ExpandChevronsIcon.tsx +9 -13
  91. package/src/assets/icons/InfoFillIcon.tsx +4 -14
  92. package/src/assets/icons/MagnifyingGlassIcon.tsx +5 -12
  93. package/src/assets/icons/MapPinAreaIcon.tsx +9 -0
  94. package/src/assets/icons/MinusBoldIcon.tsx +4 -14
  95. package/src/assets/icons/PlusBoldIcon.tsx +4 -14
  96. package/src/assets/icons/QuestionFillIcon.tsx +9 -13
  97. package/src/assets/icons/QuestionIcon.tsx +4 -16
  98. package/src/assets/icons/ScalesIcon.tsx +9 -0
  99. package/src/assets/icons/ScrollIcon.tsx +4 -16
  100. package/src/assets/icons/SpinnerGapBoldIcon.tsx +9 -12
  101. package/src/assets/icons/UploadSimpleIcon.tsx +4 -16
  102. package/src/assets/icons/WarningDiamondFillIcon.tsx +9 -13
  103. package/src/assets/icons/WarningFillIcon.tsx +9 -13
  104. package/src/assets/icons/XCircleFillIcon.tsx +11 -10
  105. package/src/components/common/Button/index.tsx +34 -3
  106. package/src/components/common/Card/index.test.tsx +136 -0
  107. package/src/components/common/Card/index.tsx +231 -0
  108. package/src/components/common/DataPagination/components/PaginationButton.tsx +63 -0
  109. package/src/components/common/DataPagination/index.test.tsx +122 -0
  110. package/src/components/common/DataPagination/index.tsx +70 -0
  111. package/src/components/form/inputs/CheckboxFormControl.tsx +1 -11
  112. package/src/components/form/inputs/PhoneInputFormControl/components/AutocompleteInput.tsx +1 -1
  113. package/src/components/form/inputs/PhoneInputFormControl/index.tsx +3 -4
  114. package/src/components/layout/ServiceFormContainer/index.tsx +5 -1
  115. package/src/components/layout/ServiceFormContainer/utils.ts +12 -0
  116. package/src/components/layout/ServiceWizardStepper/ServiceWizardStepper.css +69 -0
  117. package/src/components/layout/ServiceWizardStepper/StepConnector.tsx +29 -0
  118. package/src/components/layout/ServiceWizardStepper/StepperTypes.ts +7 -0
  119. package/src/components/layout/ServiceWizardStepper/components/CustomStepIcon.test.tsx +22 -0
  120. package/src/components/layout/ServiceWizardStepper/components/CustomStepIcon.tsx +41 -0
  121. package/src/components/layout/ServiceWizardStepper/components/DesktopStepper.test.tsx +40 -0
  122. package/src/components/layout/ServiceWizardStepper/components/DesktopStepper.tsx +48 -0
  123. package/src/components/layout/ServiceWizardStepper/components/HorizontalStepperButton.test.tsx +24 -0
  124. package/src/components/layout/ServiceWizardStepper/components/HorizontalStepperButton.tsx +46 -0
  125. package/src/components/layout/ServiceWizardStepper/components/MobileStepper.test.tsx +21 -0
  126. package/src/components/layout/ServiceWizardStepper/components/MobileStepper.tsx +54 -0
  127. package/src/components/layout/ServiceWizardStepper/components/StyledStepLabel.tsx +53 -0
  128. package/src/components/layout/ServiceWizardStepper/index.tsx +56 -37
  129. package/src/examples/HorizontalMultiStepForm/index.tsx +64 -0
  130. package/src/examples/ListWithPagination/index.tsx +44 -0
  131. package/src/library/icons.ts +51 -4
  132. package/src/library/index.ts +6 -2
  133. package/src/main.tsx +10 -0
  134. package/src/stories/ServiceWizardStepper.stories.tsx +39 -0
  135. package/src/stories/components/Card.stories.tsx +51 -0
  136. package/src/stories/components/Card.test.tsx +18 -0
  137. package/src/stories/components/DataPagination.stories.tsx +75 -0
  138. package/src/stories/components/Icons.stories.tsx +352 -0
  139. package/src/stories/components/buttons/Button.stories.tsx +30 -0
  140. package/src/theme/light/MuiAlert.tsx +10 -10
  141. package/src/theme/light/MuiButton.tsx +42 -15
  142. package/src/theme/light/MuiCard.tsx +2 -2
  143. package/src/theme/light/MuiPagination.ts +40 -12
  144. package/src/theme/light/index.tsx +2 -1
  145. package/src/types/buttons/ButtonProps.tsx +3 -1
  146. package/dist/assets/icons/CheckBoldDisabledIcon.d.ts +0 -3
  147. package/dist/components/layout/ServiceWizardStepper/components/ActiveStepIcon.d.ts +0 -2
  148. package/dist/components/layout/ServiceWizardStepper/components/CompletedStepIcon.d.ts +0 -2
  149. package/dist/components/layout/ServiceWizardStepper/components/PendingStepIcon.d.ts +0 -2
  150. package/src/assets/icons/CheckBoldDisabledIcon.tsx +0 -32
  151. package/src/components/layout/ServiceWizardStepper/components/ActiveStepIcon.tsx +0 -15
  152. package/src/components/layout/ServiceWizardStepper/components/CompletedStepIcon.tsx +0 -19
  153. package/src/components/layout/ServiceWizardStepper/components/PendingStepIcon.tsx +0 -15
@@ -0,0 +1,64 @@
1
+ import { Typography } from '@mui/material'
2
+
3
+ import ServiceHeader from '@/components/layout/ServiceHeader'
4
+ import ServicePage from '@/components/layout/ServicePage'
5
+ import ServiceWizardStepper from '@/components/layout/ServiceWizardStepper'
6
+ import { StepItem } from '@/components/layout/ServiceWizardStepper/StepperTypes'
7
+
8
+ const steps3: StepItem[] = [
9
+ { id: '1', state: 'completed', title: '1-2 žodžių tekstas' },
10
+ { id: '2', state: 'active', title: '1-2 žodžių tekstas' },
11
+ { id: '3', state: 'pending', title: '1-2 žodžių tekstas' },
12
+ ]
13
+
14
+ const steps4: StepItem[] = [
15
+ { id: '1', state: 'active', title: '1-2 žodžių tekstas' },
16
+ { id: '2', state: 'pending', title: '1-2 žodžių tekstas' },
17
+ { id: '3', state: 'pending', title: '1-2 žodžių tekstas' },
18
+ { id: '4', state: 'pending', title: '1-2 žodžių tekstas' },
19
+ ]
20
+
21
+ const steps5: StepItem[] = [
22
+ { id: '1', state: 'completed', title: '1-2 žodžių tekstas' },
23
+ { id: '2', state: 'completed', title: '1-2 žodžių tekstas' },
24
+ { id: '3', state: 'active', title: '1-2 žodžių tekstas' },
25
+ { id: '4', state: 'pending', title: '1-2 žodžių tekstas' },
26
+ { id: '5', state: 'pending', title: '1-2 žodžių tekstas' },
27
+ ]
28
+
29
+ function HorizontalMultipleStepForm() {
30
+ return (
31
+ <ServicePage>
32
+ <ServiceHeader
33
+ breadcrumbsProps={{
34
+ path: [
35
+ { label: 'Pagrindinis', path: '/' },
36
+ {
37
+ label: 'Horizontalios formos su vedliu pavyzdys',
38
+ path: '/horizontal-sample-form-multiple-steps',
39
+ },
40
+ ],
41
+ }}
42
+ title='Nekilnojamojo turto registro išrašas pagal nurodytą turto adresą'
43
+ >
44
+ <Typography variant='body1'>
45
+ Šiame puslapyje Jūs galite užsisakyti Nekilnojamojo turto registro išrašus,
46
+ pažymas bei kitus dokumentus. Užsakytą NTR išrašą, pažymą ar kitą dokumentą
47
+ galėsite gauti elektroniniu būdu arba atsiimti pasirinktame VĮ Registrų centro
48
+ padalinyje.
49
+ </Typography>
50
+ </ServiceHeader>
51
+
52
+ <div
53
+ style={{ padding: '2rem', display: 'flex', flexDirection: 'column', gap: '2rem' }}
54
+ >
55
+ <ServiceWizardStepper steps={steps3} />
56
+ <ServiceWizardStepper steps={steps4} />
57
+ <ServiceWizardStepper steps={steps5} />
58
+ </div>
59
+ <ServiceWizardStepper steps={steps5} />
60
+ </ServicePage>
61
+ )
62
+ }
63
+
64
+ export default HorizontalMultipleStepForm
@@ -0,0 +1,44 @@
1
+ import { Grid, Typography } from '@mui/material'
2
+ import React, { useState } from 'react'
3
+
4
+ import DataPagination from '@/components/common/DataPagination'
5
+ import ServicePage from '@/components/layout/ServicePage'
6
+
7
+ function ListWithPagination() {
8
+ const [page, setPage] = useState(1)
9
+ const ITEMS_PER_PAGE = 5
10
+
11
+ const mockData = React.useMemo(
12
+ () =>
13
+ Array.from({ length: 42 }, (_, i) => ({
14
+ id: i + 1,
15
+ name: `Item ${i + 1}`,
16
+ })),
17
+ [],
18
+ )
19
+
20
+ const paginatedData = React.useMemo(() => {
21
+ const start = (page - 1) * ITEMS_PER_PAGE
22
+ return mockData.slice(start, start + ITEMS_PER_PAGE)
23
+ }, [page, mockData])
24
+
25
+ return (
26
+ <ServicePage>
27
+ <Grid container spacing={2} sx={{ mt: 2 }}>
28
+ {paginatedData.map((item) => (
29
+ <Grid item xs={12} key={item.id}>
30
+ <Typography>{item.name}</Typography>
31
+ </Grid>
32
+ ))}
33
+ </Grid>
34
+
35
+ <DataPagination
36
+ count={Math.ceil(mockData.length / ITEMS_PER_PAGE)}
37
+ page={page}
38
+ onChange={setPage}
39
+ />
40
+ </ServicePage>
41
+ )
42
+ }
43
+
44
+ export default ListWithPagination
@@ -1,25 +1,72 @@
1
1
  import RcSesLogo from '@/assets/Logo'
2
+ import ArrowLeftIcon from '@/assets/icons/ArrowLeftIcon'
2
3
  import ArrowRightIcon from '@/assets/icons/ArrowRightIcon'
4
+ import BarcodeIcon from '@/assets/icons/BarcodeIcon'
5
+ import CalendarBlankIcon from '@/assets/icons/CalendarBlankIcon'
3
6
  import CaretDoubleLeftBoldIcon from '@/assets/icons/CaretDoubleLeftBoldIcon'
4
7
  import CaretDoubleRightBoldIcon from '@/assets/icons/CaretDoubleRightBoldIcon'
5
8
  import CaretDownBoldIcon from '@/assets/icons/CaretDownBoldIcon'
9
+ import CaretDownFill from '@/assets/icons/CaretDownFill'
6
10
  import CaretDownIcon from '@/assets/icons/CaretDownIcon'
7
11
  import CaretLeftBoldIcon from '@/assets/icons/CaretLeftBoldIcon'
8
12
  import CaretLeftIcon from '@/assets/icons/CaretLeftIcon'
9
13
  import CaretRightBoldIcon from '@/assets/icons/CaretRightBoldIcon'
10
- import CheckBoldDisabledIcon from '@/assets/icons/CheckBoldDisabledIcon'
11
14
  import CheckBoldIcon from '@/assets/icons/CheckBoldIcon'
15
+ import CheckCircleFillIcon from '@/assets/icons/CheckCircleFillIcon'
16
+ import CheckUncheckedBoldIcon from '@/assets/icons/CheckUncheckedBoldIcon'
17
+ import CircleFilledIcon from '@/assets/icons/CircleFilledIcon'
18
+ import CloseIcon from '@/assets/icons/CloseIcon'
19
+ import CollapseChevronsIcon from '@/assets/icons/CollapseChevronsIcon'
20
+ import DotCircleFilledIcon from '@/assets/icons/DotCircleFilledIcon'
21
+ import ExpandChevronsIcon from '@/assets/icons/ExpandChevronsIcon'
22
+ import InfoFillIcon from '@/assets/icons/InfoFillIcon'
23
+ import MagnifyingGlassIcon from '@/assets/icons/MagnifyingGlassIcon'
24
+ import MapPinAreaIcon from '@/assets/icons/MapPinAreaIcon'
25
+ import MinusBoldIcon from '@/assets/icons/MinusBoldIcon'
26
+ import PlusBoldIcon from '@/assets/icons/PlusBoldIcon'
27
+ import QuestionFillIcon from '@/assets/icons/QuestionFillIcon'
28
+ import QuestionIcon from '@/assets/icons/QuestionIcon'
29
+ import ScalesIcon from '@/assets/icons/ScalesIcon'
30
+ import ScrollIcon from '@/assets/icons/ScrollIcon'
31
+ import SpinnerGapBoldIcon from '@/assets/icons/SpinnerGapBoldIcon'
32
+ import UploadSimpleIcon from '@/assets/icons/UploadSimpleIcon'
33
+ import WarningDiamondFillIcon from '@/assets/icons/WarningDiamondFillIcon'
34
+ import WarningFillIcon from '@/assets/icons/WarningFillIcon'
35
+ import XCircleFillIcon from '@/assets/icons/XCircleFillIcon'
12
36
 
13
37
  export { RcSesLogo }
14
- export { ArrowRightIcon }
38
+ export { ArrowRightIcon, ArrowLeftIcon }
15
39
  export {
16
- CheckBoldDisabledIcon,
17
- CheckBoldIcon,
40
+ BarcodeIcon,
41
+ CalendarBlankIcon,
18
42
  CaretDoubleLeftBoldIcon,
19
43
  CaretDoubleRightBoldIcon,
20
44
  CaretDownBoldIcon,
45
+ CaretDownFill,
21
46
  CaretDownIcon,
22
47
  CaretLeftBoldIcon,
23
48
  CaretLeftIcon,
24
49
  CaretRightBoldIcon,
50
+ CheckBoldIcon,
51
+ CheckCircleFillIcon,
52
+ CheckUncheckedBoldIcon,
53
+ CircleFilledIcon,
54
+ CloseIcon,
55
+ CollapseChevronsIcon,
56
+ DotCircleFilledIcon,
57
+ ExpandChevronsIcon,
58
+ InfoFillIcon,
59
+ MagnifyingGlassIcon,
60
+ MapPinAreaIcon,
61
+ MinusBoldIcon,
62
+ PlusBoldIcon,
63
+ QuestionFillIcon,
64
+ QuestionIcon,
65
+ ScalesIcon,
66
+ ScrollIcon,
67
+ SpinnerGapBoldIcon,
68
+ UploadSimpleIcon,
69
+ WarningDiamondFillIcon,
70
+ WarningFillIcon,
71
+ XCircleFillIcon,
25
72
  }
@@ -4,6 +4,7 @@ import type {} from '@mui/x-date-pickers/themeAugmentation'
4
4
 
5
5
  import RcSesIconProps from '@/assets/IconProps'
6
6
  import RcSesLogo from '@/assets/Logo'
7
+ import ArrowLeftIcon from '@/assets/icons/ArrowLeftIcon'
7
8
  import ArrowRightIcon from '@/assets/icons/ArrowRightIcon'
8
9
  import CaretDoubleLeftBoldIcon from '@/assets/icons/CaretDoubleLeftBoldIcon'
9
10
  import CaretDoubleRightBoldIcon from '@/assets/icons/CaretDoubleRightBoldIcon'
@@ -18,6 +19,8 @@ import RcSesAlert from '@/components/common/Alert'
18
19
  import RcSesBreadcrumbs from '@/components/common/Breadcrumbs'
19
20
  import RcSesButton from '@/components/common/Button'
20
21
  import RcSesButtonWithPopover from '@/components/common/Button/ButtonWithPopover'
22
+ import RcSesCard from '@/components/common/Card'
23
+ import DataPagination from '@/components/common/DataPagination'
21
24
  import RcSesIconWithCircularBackground from '@/components/common/IconWithCircularBackground'
22
25
  import RcSesTab from '@/components/common/Tabs/Tab'
23
26
  import RcSesTabPanel from '@/components/common/Tabs/TabPanel'
@@ -51,7 +54,7 @@ declare module '@mui/x-date-pickers/models' {
51
54
 
52
55
  export { RcSesPalette, RcSesTheme }
53
56
  export { RcSesAccordion, useAccordionController }
54
- export { RcSesAlert, RcSesBreadcrumbs, RcSesButton, RcSesButtonWithPopover }
57
+ export { RcSesAlert, RcSesBreadcrumbs, RcSesButton, RcSesButtonWithPopover, RcSesCard }
55
58
  export { RcSesCheckbox, RcSesCheckboxFormControl }
56
59
  export { RcSesDatepicker }
57
60
  export { RcSesFileUpload }
@@ -63,6 +66,7 @@ export { RcSesSearchableField }
63
66
  export { RcSesSelect }
64
67
  export { RcSesTab, RcSesTabPanel, RcSesTabs, RcSesTabsWrapper }
65
68
  export { RcSesTextField }
69
+ export { DataPagination }
66
70
 
67
71
  export {
68
72
  RcSesServiceFormActions,
@@ -76,7 +80,7 @@ export type { RcSesIconProps }
76
80
  export { RcSesIconWithCircularBackground }
77
81
 
78
82
  export { RcSesLogo }
79
- export { ArrowRightIcon }
83
+ export { ArrowRightIcon, ArrowLeftIcon }
80
84
  export {
81
85
  CaretDoubleLeftBoldIcon,
82
86
  CaretDoubleRightBoldIcon,
package/src/main.tsx CHANGED
@@ -13,6 +13,8 @@ import { RouterProvider, createBrowserRouter } from 'react-router-dom'
13
13
  import theme from '@/theme/light'
14
14
 
15
15
  import App from './App'
16
+ import HorizontalMultipleStepForm from './examples/HorizontalMultiStepForm'
17
+ import ListWithPagination from './examples/ListWithPagination'
16
18
  import MultipleStepForm from './examples/MultipleStepForm'
17
19
  import SingleStepForm from './examples/SingleStepForm'
18
20
  import i18n from './i18n/i18n'
@@ -31,6 +33,14 @@ const router = createBrowserRouter([
31
33
  path: '/multi-step-form',
32
34
  element: <MultipleStepForm />,
33
35
  },
36
+ {
37
+ path: '/pagination',
38
+ element: <ListWithPagination />,
39
+ },
40
+ {
41
+ path: '/horizontal-multi-step-form',
42
+ element: <HorizontalMultipleStepForm />,
43
+ },
34
44
  ])
35
45
 
36
46
  const adapterLocale = i18n.language === 'lt' ? lt : enUS
@@ -0,0 +1,39 @@
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
+ }
@@ -0,0 +1,51 @@
1
+ /* eslint-disable react/function-component-definition */
2
+ import { Box, Typography } from '@mui/material'
3
+ import type { Meta, StoryFn } from '@storybook/react'
4
+
5
+ import CaretLeftIcon from '@/assets/icons/CaretLeftIcon'
6
+ import RcSesButton from '@/components/common/Button'
7
+ import RcSesCard from '@/components/common/Card'
8
+
9
+ const meta: Meta<typeof RcSesCard> = {
10
+ title: 'components/common/Card',
11
+ component: RcSesCard,
12
+ tags: ['autodocs'],
13
+ }
14
+
15
+ export default meta
16
+
17
+ const Template: StoryFn<typeof RcSesCard> = (args) => <RcSesCard {...args} />
18
+
19
+ export const Main = Template.bind({})
20
+ Main.args = {
21
+ title: 'Pavadinimas',
22
+ description: 'Papildomas aprasymo tekstas',
23
+ children: (
24
+ <Box
25
+ sx={{
26
+ alignItems: 'center',
27
+ color: 'text.primary',
28
+ display: 'flex',
29
+ justifyContent: 'center',
30
+ minHeight: { xs: '9.625rem', md: '11.5rem' },
31
+ px: 3,
32
+ width: '100%',
33
+ }}
34
+ >
35
+ <Typography align='center'>Vidinis paslaugu front-end sprendimas</Typography>
36
+ </Box>
37
+ ),
38
+ leadingActions: (
39
+ <RcSesButton startIcon={<CaretLeftIcon />} color='grey' variant='outlined'>
40
+ Button
41
+ </RcSesButton>
42
+ ),
43
+ trailingActions: (
44
+ <>
45
+ <RcSesButton color='grey' variant='outlined'>
46
+ Button
47
+ </RcSesButton>
48
+ <RcSesButton>Button</RcSesButton>
49
+ </>
50
+ ),
51
+ }
@@ -0,0 +1,18 @@
1
+ import { ThemeProvider } from '@mui/material/styles'
2
+ import { composeStories } from '@storybook/react'
3
+ import '@testing-library/jest-dom'
4
+ import { render, screen } from '@testing-library/react'
5
+
6
+ import theme from '../../theme/light'
7
+ import * as stories from './Card.stories'
8
+
9
+ const { Main } = composeStories(stories)
10
+
11
+ test('reuses args from composed card story', () => {
12
+ render(<ThemeProvider theme={theme}>{Main()}</ThemeProvider>)
13
+
14
+ expect(screen.getByText(Main.args.title as string)).toBeInTheDocument()
15
+ expect(screen.getByText(Main.args.description as string)).toBeInTheDocument()
16
+ expect(screen.getByText('Vidinis paslaugu front-end sprendimas')).toBeInTheDocument()
17
+ expect(screen.getAllByRole('button', { name: 'Button' })).toHaveLength(3)
18
+ })
@@ -0,0 +1,75 @@
1
+ import { Box, Typography } from '@mui/material'
2
+ import type { Meta, StoryObj } from '@storybook/react'
3
+ import { useState } from 'react'
4
+
5
+ import DataPagination from '@/components/common/DataPagination'
6
+
7
+ const meta = {
8
+ title: 'components/common/DataPagination',
9
+ component: DataPagination,
10
+ tags: ['autodocs'],
11
+ args: {
12
+ count: 12,
13
+ defaultPage: 1,
14
+ prevLabel: 'Atgal',
15
+ nextLabel: 'Kitas',
16
+ },
17
+ argTypes: {
18
+ count: {
19
+ control: {
20
+ type: 'number',
21
+ },
22
+ },
23
+ defaultPage: {
24
+ control: {
25
+ type: 'number',
26
+ },
27
+ },
28
+ page: {
29
+ control: {
30
+ type: 'number',
31
+ },
32
+ },
33
+ onChange: {
34
+ action: 'pageChanged',
35
+ },
36
+ prevLabel: {
37
+ control: {
38
+ type: 'text',
39
+ },
40
+ },
41
+ nextLabel: {
42
+ control: {
43
+ type: 'text',
44
+ },
45
+ },
46
+ },
47
+ } satisfies Meta<typeof DataPagination>
48
+
49
+ export default meta
50
+ type Story = StoryObj<typeof meta>
51
+
52
+ export const Uncontrolled: Story = {}
53
+
54
+ export const Controlled: Story = {
55
+ render: (args) => {
56
+ const [page, setPage] = useState(args.page ?? 1)
57
+
58
+ return (
59
+ <Box display='flex' flexDirection='column' gap={2}>
60
+ <Typography variant='body2'>Current page: {page}</Typography>
61
+ <DataPagination
62
+ {...args}
63
+ page={page}
64
+ onChange={(nextPage) => {
65
+ setPage(nextPage)
66
+ args.onChange?.(nextPage)
67
+ }}
68
+ />
69
+ </Box>
70
+ )
71
+ },
72
+ args: {
73
+ page: 1,
74
+ },
75
+ }