@registrucentras/rc-ses-react-components 2.3.0 → 2.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.
- package/dist/assets/icons/createIcon.d.ts +18 -0
- package/dist/assets/icons/phosphorIcons.d.ts +221 -0
- package/dist/components/common/Badge/index.d.ts +1 -0
- package/dist/components/overlays/Drawer/Drawer.types.d.ts +30 -0
- package/dist/components/overlays/Drawer/index.d.ts +9 -0
- package/dist/library/icons.d.ts +2 -48
- package/dist/library/index.d.ts +2 -1
- package/dist/library/types.d.ts +2 -0
- package/dist/registrucentras-rc-ses-react-components.cjs +1 -1
- package/dist/registrucentras-rc-ses-react-components.js +2579 -2762
- package/package.json +5 -5
- package/src/assets/icons/createIcon.test.tsx +49 -0
- package/src/assets/icons/createIcon.tsx +49 -0
- package/src/assets/icons/phosphorIcons.ts +162 -0
- package/src/components/common/Accordion/index.tsx +1 -1
- package/src/components/common/AdvancedList/components/AdvancedListItem/components/AdvancedListItemLeading.tsx +1 -3
- package/src/components/common/AdvancedList/components/AdvancedListItem/components/AdvancedListItemTrailing.tsx +6 -4
- package/src/components/common/AdvancedList/components/AdvancedListItem/index.test.tsx +5 -3
- package/src/components/common/AdvancedList/components/AdvancedListItemShell/index.test.tsx +23 -0
- package/src/components/common/AdvancedList/components/AdvancedListItemShell/index.tsx +6 -0
- package/src/components/common/Alert/index.tsx +1 -1
- package/src/components/common/Badge/index.test.tsx +16 -0
- package/src/components/common/Badge/index.tsx +35 -12
- package/src/components/common/Button/ButtonWithPopover.tsx +1 -2
- package/src/components/common/DataPagination/index.tsx +1 -2
- package/src/components/common/IconWithSquareBackground/index.test.tsx +1 -1
- package/src/components/common/ServiceLinks/ServiceLinkItem/index.tsx +1 -1
- package/src/components/common/Snackbar/index.tsx +1 -1
- package/src/components/common/StepCard/StepCardFooter/index.tsx +5 -3
- package/src/components/common/Tooltip/index.tsx +1 -1
- package/src/components/form/inputs/CheckboxFormControl.tsx +1 -2
- package/src/components/form/inputs/Datepicker/components/RcSesDatepickerCalendarHeader.tsx +6 -4
- package/src/components/form/inputs/Datepicker/index.tsx +1 -2
- package/src/components/form/inputs/FileDropzone.tsx +1 -2
- package/src/components/form/inputs/FileUpload.tsx +1 -1
- package/src/components/form/inputs/NumberStepper.tsx +1 -2
- package/src/components/form/inputs/PhoneInputFormControl/components/AutocompleteInput.tsx +1 -1
- package/src/components/form/inputs/PhoneInputFormControl/index.tsx +1 -1
- package/src/components/form/inputs/SearchInput/index.tsx +1 -2
- package/src/components/form/inputs/SearchableField.tsx +1 -2
- package/src/components/form/inputs/Select/components/OptionCheckbox.tsx +1 -1
- package/src/components/form/inputs/Select/index.tsx +1 -2
- package/src/components/form/inputs/SimpleCheckbox.tsx +1 -2
- package/src/components/layout/ServiceFormActions.tsx +1 -2
- package/src/components/layout/ServiceFormContainer/AccordionFormContainer/components/AccordionCollapseControls.tsx +1 -2
- package/src/components/layout/ServiceWizardStepper/components/CustomStepIcon.tsx +1 -2
- package/src/components/layout/ServiceWizardStepper/components/HorizontalStepperButton.tsx +1 -2
- package/src/components/overlays/BottomSheet/index.tsx +1 -1
- package/src/components/overlays/Drawer/Drawer.types.ts +32 -0
- package/src/components/overlays/Drawer/index.test.tsx +174 -0
- package/src/components/overlays/Drawer/index.tsx +192 -0
- package/src/components/overlays/Modal/index.tsx +6 -4
- package/src/i18n/namespaces/common/en.json +3 -0
- package/src/i18n/namespaces/common/lt.json +3 -0
- package/src/library/icons.ts +3 -100
- package/src/library/index.ts +2 -0
- package/src/library/types.ts +2 -0
- package/src/stories/atoms/Badge.stories.tsx +40 -0
- package/src/stories/atoms/Button.stories.tsx +1 -1
- package/src/stories/atoms/IconWithCircularBackground.stories.tsx +1 -1
- package/src/stories/atoms/IconWithSquareBackground.stories.tsx +1 -1
- package/src/stories/atoms/Icons.stories.tsx +134 -225
- package/src/stories/molecules/Card.stories.tsx +5 -3
- package/src/stories/molecules/CardShell.stories.tsx +1 -1
- package/src/stories/molecules/ImageCard.stories.tsx +1 -1
- package/src/stories/molecules/ListWithIcons.stories.tsx +1 -2
- package/src/stories/molecules/TitleBlock.stories.tsx +6 -3
- package/src/stories/organisms/AdvancedList.stories.tsx +6 -4
- package/src/stories/organisms/AdvancedListItem.stories.tsx +1 -3
- package/src/stories/organisms/AdvancedListItemShell.stories.tsx +93 -4
- package/src/stories/organisms/Drawer.stories.tsx +90 -0
- package/src/stories/organisms/SelectableCardList.stories.tsx +1 -3
- package/src/stories/organisms/ServiceLinks.stories.tsx +1 -1
- package/src/theme/light/MuiAccordionSummary.tsx +1 -1
- package/src/theme/light/MuiAlert.tsx +7 -5
- package/dist/assets/icons/ArrowLeftIcon.d.ts +0 -3
- package/dist/assets/icons/ArrowRightIcon.d.ts +0 -3
- package/dist/assets/icons/ArrowsClockwiseIcon.d.ts +0 -3
- package/dist/assets/icons/BarcodeIcon.d.ts +0 -3
- package/dist/assets/icons/CalendarBlankIcon.d.ts +0 -3
- package/dist/assets/icons/CaretDoubleLeftBoldIcon.d.ts +0 -3
- package/dist/assets/icons/CaretDoubleRightBoldIcon.d.ts +0 -3
- package/dist/assets/icons/CaretDownBoldIcon.d.ts +0 -3
- package/dist/assets/icons/CaretDownFill.d.ts +0 -3
- package/dist/assets/icons/CaretDownIcon.d.ts +0 -3
- package/dist/assets/icons/CaretLeftBoldIcon.d.ts +0 -3
- package/dist/assets/icons/CaretLeftIcon.d.ts +0 -3
- package/dist/assets/icons/CaretRightBoldIcon.d.ts +0 -3
- package/dist/assets/icons/CaretUpBoldIcon.d.ts +0 -3
- package/dist/assets/icons/CaretUpIcon.d.ts +0 -3
- package/dist/assets/icons/CheckBoldIcon.d.ts +0 -3
- package/dist/assets/icons/CheckCircleFillIcon.d.ts +0 -3
- package/dist/assets/icons/CheckIcon.d.ts +0 -3
- package/dist/assets/icons/CheckUncheckedBoldIcon.d.ts +0 -3
- package/dist/assets/icons/CircleFilledIcon.d.ts +0 -3
- package/dist/assets/icons/CloseIcon.d.ts +0 -3
- package/dist/assets/icons/CollapseChevronsIcon.d.ts +0 -3
- package/dist/assets/icons/CopyIcon.d.ts +0 -3
- package/dist/assets/icons/ExpandChevronsIcon.d.ts +0 -3
- package/dist/assets/icons/InfoFillIcon.d.ts +0 -3
- package/dist/assets/icons/ListIcon.d.ts +0 -3
- package/dist/assets/icons/MagnifyingGlassIcon.d.ts +0 -3
- package/dist/assets/icons/MapPinAreaIcon.d.ts +0 -3
- package/dist/assets/icons/MinusBoldIcon.d.ts +0 -3
- package/dist/assets/icons/MinusIcon.d.ts +0 -3
- package/dist/assets/icons/NotePencilIcon.d.ts +0 -3
- package/dist/assets/icons/PencilSimpleLineIcon.d.ts +0 -3
- package/dist/assets/icons/PlusBoldIcon.d.ts +0 -3
- package/dist/assets/icons/PlusIcon.d.ts +0 -3
- package/dist/assets/icons/QuestionFillIcon.d.ts +0 -3
- package/dist/assets/icons/QuestionIcon.d.ts +0 -3
- package/dist/assets/icons/ScalesIcon.d.ts +0 -3
- package/dist/assets/icons/ScrollIcon.d.ts +0 -3
- package/dist/assets/icons/ShoppingCartIcon.d.ts +0 -3
- package/dist/assets/icons/SpinnerGapBoldIcon.d.ts +0 -3
- package/dist/assets/icons/TrashIcon.d.ts +0 -3
- package/dist/assets/icons/UploadSimpleIcon.d.ts +0 -3
- package/dist/assets/icons/UserIcon.d.ts +0 -3
- package/dist/assets/icons/WarningCircleIcon.d.ts +0 -3
- package/dist/assets/icons/WarningDiamondFillIcon.d.ts +0 -3
- package/dist/assets/icons/WarningFillIcon.d.ts +0 -3
- package/dist/assets/icons/XCircleFillIcon.d.ts +0 -3
- package/src/assets/icons/ArrowLeftIcon.tsx +0 -16
- package/src/assets/icons/ArrowRightIcon.tsx +0 -17
- package/src/assets/icons/ArrowsClockwiseIcon.tsx +0 -16
- package/src/assets/icons/BarcodeIcon.tsx +0 -9
- package/src/assets/icons/CalendarBlankIcon.tsx +0 -9
- package/src/assets/icons/CaretDoubleLeftBoldIcon.tsx +0 -22
- package/src/assets/icons/CaretDoubleRightBoldIcon.tsx +0 -22
- package/src/assets/icons/CaretDownBoldIcon.tsx +0 -17
- package/src/assets/icons/CaretDownFill.tsx +0 -17
- package/src/assets/icons/CaretDownIcon.tsx +0 -9
- package/src/assets/icons/CaretLeftBoldIcon.tsx +0 -17
- package/src/assets/icons/CaretLeftIcon.tsx +0 -9
- package/src/assets/icons/CaretRightBoldIcon.tsx +0 -17
- package/src/assets/icons/CaretUpBoldIcon.tsx +0 -17
- package/src/assets/icons/CaretUpIcon.tsx +0 -9
- package/src/assets/icons/CheckBoldIcon.tsx +0 -17
- package/src/assets/icons/CheckCircleFillIcon.tsx +0 -23
- package/src/assets/icons/CheckIcon.tsx +0 -23
- package/src/assets/icons/CheckUncheckedBoldIcon.tsx +0 -9
- package/src/assets/icons/CircleFilledIcon.tsx +0 -11
- package/src/assets/icons/CloseIcon.tsx +0 -9
- package/src/assets/icons/CollapseChevronsIcon.tsx +0 -17
- package/src/assets/icons/CopyIcon.tsx +0 -23
- package/src/assets/icons/ExpandChevronsIcon.tsx +0 -17
- package/src/assets/icons/InfoFillIcon.tsx +0 -17
- package/src/assets/icons/ListIcon.tsx +0 -17
- package/src/assets/icons/MagnifyingGlassIcon.tsx +0 -9
- package/src/assets/icons/MapPinAreaIcon.tsx +0 -9
- package/src/assets/icons/MinusBoldIcon.tsx +0 -11
- package/src/assets/icons/MinusIcon.tsx +0 -9
- package/src/assets/icons/NotePencilIcon.tsx +0 -9
- package/src/assets/icons/PencilSimpleLineIcon.tsx +0 -23
- package/src/assets/icons/PlusBoldIcon.tsx +0 -11
- package/src/assets/icons/PlusIcon.tsx +0 -9
- package/src/assets/icons/QuestionFillIcon.tsx +0 -23
- package/src/assets/icons/QuestionIcon.tsx +0 -9
- package/src/assets/icons/ScalesIcon.tsx +0 -9
- package/src/assets/icons/ScrollIcon.tsx +0 -9
- package/src/assets/icons/ShoppingCartIcon.tsx +0 -16
- package/src/assets/icons/SpinnerGapBoldIcon.tsx +0 -17
- package/src/assets/icons/TrashIcon.tsx +0 -23
- package/src/assets/icons/UploadSimpleIcon.tsx +0 -9
- package/src/assets/icons/UserIcon.tsx +0 -17
- package/src/assets/icons/WarningCircleIcon.tsx +0 -22
- package/src/assets/icons/WarningDiamondFillIcon.tsx +0 -17
- package/src/assets/icons/WarningFillIcon.tsx +0 -22
- package/src/assets/icons/XCircleFillIcon.tsx +0 -17
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { Box, ButtonBase, Divider, Stack } from '@mui/material'
|
|
2
|
-
import { InfoIcon, PhoneCallIcon } from '@phosphor-icons/react'
|
|
3
2
|
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
4
3
|
|
|
5
|
-
import
|
|
6
|
-
|
|
4
|
+
import {
|
|
5
|
+
ArrowRightIcon,
|
|
6
|
+
CalendarBlankIcon,
|
|
7
|
+
InfoIcon,
|
|
8
|
+
PhoneCallIcon,
|
|
9
|
+
} from '@/assets/icons/phosphorIcons'
|
|
7
10
|
import RcSesButton from '@/components/common/Button'
|
|
8
11
|
import RcSesCardShell from '@/components/common/CardShell'
|
|
9
12
|
import RcSesCardFooter from '@/components/common/CardShell/CardFooter'
|
|
@@ -15,10 +15,12 @@ import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
|
15
15
|
import { useState } from 'react'
|
|
16
16
|
import { useForm, useWatch } from 'react-hook-form'
|
|
17
17
|
|
|
18
|
-
import
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
import {
|
|
19
|
+
InfoFillIcon,
|
|
20
|
+
NotePencilIcon,
|
|
21
|
+
TrashIcon,
|
|
22
|
+
UserIcon,
|
|
23
|
+
} from '@/assets/icons/phosphorIcons'
|
|
22
24
|
import AdvancedList, { type AdvancedListItemData } from '@/components/common/AdvancedList'
|
|
23
25
|
import RcSesSelect from '@/components/form/inputs/Select'
|
|
24
26
|
|
|
@@ -12,9 +12,7 @@ import {
|
|
|
12
12
|
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
13
13
|
import { useState } from 'react'
|
|
14
14
|
|
|
15
|
-
import NotePencilIcon from '@/assets/icons/
|
|
16
|
-
import TrashIcon from '@/assets/icons/TrashIcon'
|
|
17
|
-
import UserIcon from '@/assets/icons/UserIcon'
|
|
15
|
+
import { NotePencilIcon, TrashIcon, UserIcon } from '@/assets/icons/phosphorIcons'
|
|
18
16
|
import AdvancedListItem from '@/components/common/AdvancedList/components/AdvancedListItem'
|
|
19
17
|
import { secondary } from '@/theme/palette'
|
|
20
18
|
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { Avatar, Radio, Stack, Typography } from '@mui/material'
|
|
2
2
|
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
3
3
|
import { useState } from 'react'
|
|
4
|
+
import { useForm } from 'react-hook-form'
|
|
4
5
|
|
|
5
|
-
import NotePencilIcon from '@/assets/icons/
|
|
6
|
-
import TrashIcon from '@/assets/icons/TrashIcon'
|
|
6
|
+
import { ClockIcon, NotePencilIcon, TrashIcon } from '@/assets/icons/phosphorIcons'
|
|
7
7
|
import AdvancedListItemShell from '@/components/common/AdvancedList/components/AdvancedListItemShell'
|
|
8
8
|
import RcSesBadge from '@/components/common/Badge'
|
|
9
9
|
import RcSesButton from '@/components/common/Button'
|
|
10
10
|
import RcSesSwitch from '@/components/common/Switch'
|
|
11
|
+
import RcSesSelect from '@/components/form/inputs/Select'
|
|
12
|
+
import RcSesSimpleCheckbox from '@/components/form/inputs/SimpleCheckbox'
|
|
11
13
|
import palette from '@/theme/palette'
|
|
12
14
|
|
|
13
15
|
const ACTION_BUTTON_SX = {
|
|
@@ -737,7 +739,8 @@ export const ExpandableWithRadioAndSwitch: Story = {
|
|
|
737
739
|
label='3 darbo dienos'
|
|
738
740
|
variant='neutral'
|
|
739
741
|
size='small'
|
|
740
|
-
showIcon
|
|
742
|
+
showIcon
|
|
743
|
+
icon={<ClockIcon />}
|
|
741
744
|
/>
|
|
742
745
|
}
|
|
743
746
|
expanded={
|
|
@@ -827,7 +830,7 @@ const [sendCopy, setSendCopy] = useState(false)
|
|
|
827
830
|
</Typography>
|
|
828
831
|
</Stack>
|
|
829
832
|
}
|
|
830
|
-
trailing={<RcSesBadge label='3 darbo dienos' variant='neutral' size='small' showIcon={
|
|
833
|
+
trailing={<RcSesBadge label='3 darbo dienos' variant='neutral' size='small' showIcon icon={<ClockIcon />} />}
|
|
831
834
|
expanded={
|
|
832
835
|
<Stack direction='row' sx={{ alignItems: 'center', gap: '0.625rem' }}>
|
|
833
836
|
<RcSesSwitch
|
|
@@ -864,3 +867,89 @@ const [sendCopy, setSendCopy] = useState(false)
|
|
|
864
867
|
},
|
|
865
868
|
},
|
|
866
869
|
}
|
|
870
|
+
|
|
871
|
+
const DOCUMENT_OPTIONS = [
|
|
872
|
+
{ value: 'ak', label: 'Asmens tapatybės kortelė AK12345' },
|
|
873
|
+
{ value: 'pasas', label: 'Pasas LT9876543' },
|
|
874
|
+
]
|
|
875
|
+
|
|
876
|
+
export const ExpandableWithDropdown: Story = {
|
|
877
|
+
render: (args) => {
|
|
878
|
+
const [isExpanded, setIsExpanded] = useState(true)
|
|
879
|
+
const { control } = useForm<{ documentType: string }>({
|
|
880
|
+
defaultValues: { documentType: '' },
|
|
881
|
+
})
|
|
882
|
+
|
|
883
|
+
return (
|
|
884
|
+
<AdvancedListItemShell
|
|
885
|
+
{...args}
|
|
886
|
+
isExpanded={isExpanded}
|
|
887
|
+
onClick={() => setIsExpanded((prev) => !prev)}
|
|
888
|
+
leading={
|
|
889
|
+
<RcSesSimpleCheckbox
|
|
890
|
+
checked={isExpanded}
|
|
891
|
+
onChange={() => setIsExpanded((prev) => !prev)}
|
|
892
|
+
slotProps={{ input: { 'aria-label': 'Įtraukti įrašą' } }}
|
|
893
|
+
/>
|
|
894
|
+
}
|
|
895
|
+
expanded={
|
|
896
|
+
<RcSesSelect
|
|
897
|
+
id='expandable-with-dropdown-document'
|
|
898
|
+
control={control}
|
|
899
|
+
name='documentType'
|
|
900
|
+
label='Asmens dokumentas'
|
|
901
|
+
options={DOCUMENT_OPTIONS}
|
|
902
|
+
/>
|
|
903
|
+
}
|
|
904
|
+
/>
|
|
905
|
+
)
|
|
906
|
+
},
|
|
907
|
+
parameters: {
|
|
908
|
+
docs: {
|
|
909
|
+
description: {
|
|
910
|
+
story:
|
|
911
|
+
'A checkbox row with a dropdown inside the `expanded` slot. Its menu is portalled to `document.body`, but React still bubbles the click. Selecting an option must leave the row expanded.',
|
|
912
|
+
},
|
|
913
|
+
source: {
|
|
914
|
+
code: `const [isExpanded, setIsExpanded] = useState(true)
|
|
915
|
+
const { control } = useForm<{ documentType: string }>({
|
|
916
|
+
defaultValues: { documentType: '' },
|
|
917
|
+
})
|
|
918
|
+
|
|
919
|
+
<AdvancedListItemShell
|
|
920
|
+
content={
|
|
921
|
+
<Stack sx={{ gap: '0.5rem' }}>
|
|
922
|
+
<Typography variant='body2' sx={{ fontWeight: 600 }}>
|
|
923
|
+
Įrašo pavadinimas
|
|
924
|
+
</Typography>
|
|
925
|
+
<Typography variant='body2' sx={{ color: palette.grey[600] }}>
|
|
926
|
+
a.k. 3880819****
|
|
927
|
+
</Typography>
|
|
928
|
+
</Stack>
|
|
929
|
+
}
|
|
930
|
+
isExpanded={isExpanded}
|
|
931
|
+
onClick={() => setIsExpanded((prev) => !prev)}
|
|
932
|
+
leading={
|
|
933
|
+
<RcSesSimpleCheckbox
|
|
934
|
+
checked={isExpanded}
|
|
935
|
+
onChange={() => setIsExpanded((prev) => !prev)}
|
|
936
|
+
slotProps={{ input: { 'aria-label': 'Įtraukti įrašą' } }}
|
|
937
|
+
/>
|
|
938
|
+
}
|
|
939
|
+
expanded={
|
|
940
|
+
<RcSesSelect
|
|
941
|
+
id='expandable-with-dropdown-document'
|
|
942
|
+
control={control}
|
|
943
|
+
name='documentType'
|
|
944
|
+
label='Asmens dokumentas'
|
|
945
|
+
options={[
|
|
946
|
+
{ value: 'ak', label: 'Asmens tapatybės kortelė AK12345' },
|
|
947
|
+
{ value: 'pasas', label: 'Pasas LT9876543' },
|
|
948
|
+
]}
|
|
949
|
+
/>
|
|
950
|
+
}
|
|
951
|
+
/>`,
|
|
952
|
+
},
|
|
953
|
+
},
|
|
954
|
+
},
|
|
955
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { Stack, Typography } from '@mui/material'
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
3
|
+
import { useState } from 'react'
|
|
4
|
+
|
|
5
|
+
import RcSesButton from '@/components/common/Button'
|
|
6
|
+
import RcSesDrawer from '@/components/overlays/Drawer'
|
|
7
|
+
|
|
8
|
+
const meta = {
|
|
9
|
+
title: 'Organisms/Drawer',
|
|
10
|
+
component: RcSesDrawer,
|
|
11
|
+
tags: ['autodocs'],
|
|
12
|
+
argTypes: {
|
|
13
|
+
children: { control: false },
|
|
14
|
+
onClose: { control: false },
|
|
15
|
+
onPrimaryAction: { control: false },
|
|
16
|
+
onSecondaryAction: { control: false },
|
|
17
|
+
},
|
|
18
|
+
args: {
|
|
19
|
+
title: 'Filtrai',
|
|
20
|
+
secondaryActionLabel: 'Išvalyti',
|
|
21
|
+
primaryActionLabel: 'Rodyti paslaugas',
|
|
22
|
+
children: (
|
|
23
|
+
<Stack sx={{ gap: '1rem' }}>
|
|
24
|
+
<Typography variant='body2'>
|
|
25
|
+
Turinys (slot) - filtrai, paieška, sąrašas
|
|
26
|
+
</Typography>
|
|
27
|
+
</Stack>
|
|
28
|
+
),
|
|
29
|
+
},
|
|
30
|
+
} satisfies Meta<typeof RcSesDrawer>
|
|
31
|
+
|
|
32
|
+
export default meta
|
|
33
|
+
|
|
34
|
+
type Story = StoryObj<typeof meta>
|
|
35
|
+
|
|
36
|
+
export const Default: Story = {
|
|
37
|
+
args: {
|
|
38
|
+
isOpen: true,
|
|
39
|
+
onClose: () => {},
|
|
40
|
+
},
|
|
41
|
+
render: (args) => {
|
|
42
|
+
const [isOpen, setIsOpen] = useState(true)
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<div
|
|
46
|
+
style={{
|
|
47
|
+
display: 'flex',
|
|
48
|
+
flexDirection: 'column',
|
|
49
|
+
justifyContent: 'center',
|
|
50
|
+
alignItems: 'center',
|
|
51
|
+
}}
|
|
52
|
+
>
|
|
53
|
+
<RcSesButton variant='contained' onClick={() => setIsOpen(true)}>
|
|
54
|
+
Open Drawer
|
|
55
|
+
</RcSesButton>
|
|
56
|
+
<RcSesDrawer {...args} isOpen={isOpen} onClose={() => setIsOpen(false)} />
|
|
57
|
+
</div>
|
|
58
|
+
)
|
|
59
|
+
},
|
|
60
|
+
parameters: {
|
|
61
|
+
docs: {
|
|
62
|
+
description: {
|
|
63
|
+
story:
|
|
64
|
+
'Basic drawer that slides in from the right. Use the trigger button to open; close with the close button, Escape key, or backdrop click. Footer action buttons are optional and configurable via primaryActionLabel/onPrimaryAction and secondaryActionLabel/onSecondaryAction. Supports keyboard navigation (Tab/Shift+Tab focus trap, Esc to close).',
|
|
65
|
+
},
|
|
66
|
+
source: {
|
|
67
|
+
code: `const [isOpen, setIsOpen] = useState(true)
|
|
68
|
+
|
|
69
|
+
<div style={{ display: 'flex', flexDirection: 'column', justifyContent: 'center', alignItems: 'center' }}>
|
|
70
|
+
<RcSesButton variant='contained' onClick={() => setIsOpen(true)}>
|
|
71
|
+
Open Drawer
|
|
72
|
+
</RcSesButton>
|
|
73
|
+
<RcSesDrawer
|
|
74
|
+
isOpen={isOpen}
|
|
75
|
+
onClose={() => setIsOpen(false)}
|
|
76
|
+
title='Filtrai'
|
|
77
|
+
secondaryActionLabel='Išvalyti'
|
|
78
|
+
primaryActionLabel='Rodyti paslaugas'
|
|
79
|
+
>
|
|
80
|
+
<Stack sx={{ gap: '1rem' }}>
|
|
81
|
+
<Typography variant='body2'>
|
|
82
|
+
Turinys (slot) - filtrai, paieška, sąrašas
|
|
83
|
+
</Typography>
|
|
84
|
+
</Stack>
|
|
85
|
+
</RcSesDrawer>
|
|
86
|
+
</div>`,
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
2
2
|
import { useState } from 'react'
|
|
3
3
|
|
|
4
|
-
import InfoFillIcon from '@/assets/icons/
|
|
5
|
-
import QuestionIcon from '@/assets/icons/QuestionIcon'
|
|
6
|
-
import WarningFillIcon from '@/assets/icons/WarningFillIcon'
|
|
4
|
+
import { InfoFillIcon, QuestionIcon, WarningFillIcon } from '@/assets/icons/phosphorIcons'
|
|
7
5
|
import type { ListWithIconsItemData } from '@/components/common/ListWithIcons/ListWithIcons.types'
|
|
8
6
|
import SelectableCardList, {
|
|
9
7
|
type SelectableCardListItemData,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BriefcaseIcon } from '@phosphor-icons/react'
|
|
2
1
|
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
3
2
|
|
|
3
|
+
import { BriefcaseIcon } from '@/assets/icons/phosphorIcons'
|
|
4
4
|
import RcSesButton from '@/components/common/Button'
|
|
5
5
|
import RcSesCardShell from '@/components/common/CardShell'
|
|
6
6
|
import RcSesCardFooter from '@/components/common/CardShell/CardFooter'
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { Components, createTheme } from '@mui/material'
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
import {
|
|
4
|
+
CheckCircleFillIcon,
|
|
5
|
+
CloseIcon,
|
|
6
|
+
InfoFillIcon,
|
|
7
|
+
WarningCircleIcon,
|
|
8
|
+
WarningFillIcon,
|
|
9
|
+
} from '@/assets/icons/phosphorIcons'
|
|
8
10
|
|
|
9
11
|
import palette from '../palette'
|
|
10
12
|
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ArrowLeftIcon as PhosphorArrowLeftIcon } from '@phosphor-icons/react'
|
|
2
|
-
|
|
3
|
-
import IconProps from '../IconProps'
|
|
4
|
-
|
|
5
|
-
function ArrowLeftIcon({ className, size = 24, fillColor, ...rest }: IconProps) {
|
|
6
|
-
return (
|
|
7
|
-
<PhosphorArrowLeftIcon
|
|
8
|
-
{...rest}
|
|
9
|
-
className={className}
|
|
10
|
-
size={size}
|
|
11
|
-
color={fillColor}
|
|
12
|
-
/>
|
|
13
|
-
)
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export default ArrowLeftIcon
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { ArrowRightIcon as PhosphorArrowRightIcon } from '@phosphor-icons/react'
|
|
2
|
-
|
|
3
|
-
import IconProps from '../IconProps'
|
|
4
|
-
|
|
5
|
-
function ArrowRightIcon({ className, size = 24, fillColor, weight, ...rest }: IconProps) {
|
|
6
|
-
return (
|
|
7
|
-
<PhosphorArrowRightIcon
|
|
8
|
-
{...rest}
|
|
9
|
-
className={className}
|
|
10
|
-
size={size}
|
|
11
|
-
color={fillColor}
|
|
12
|
-
weight={weight}
|
|
13
|
-
/>
|
|
14
|
-
)
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export default ArrowRightIcon
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ArrowsClockwiseIcon as PhosphorArrowClockwiseIcon } from '@phosphor-icons/react'
|
|
2
|
-
|
|
3
|
-
import IconProps from '../IconProps'
|
|
4
|
-
|
|
5
|
-
function ArrowsClockwiseIcon({ className, size = 24, fillColor, ...rest }: IconProps) {
|
|
6
|
-
return (
|
|
7
|
-
<PhosphorArrowClockwiseIcon
|
|
8
|
-
{...rest}
|
|
9
|
-
className={className}
|
|
10
|
-
size={size}
|
|
11
|
-
color={fillColor}
|
|
12
|
-
/>
|
|
13
|
-
)
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export default ArrowsClockwiseIcon
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { BarcodeIcon as Barcode } from '@phosphor-icons/react'
|
|
2
|
-
|
|
3
|
-
import IconProps from '../IconProps'
|
|
4
|
-
|
|
5
|
-
function BarcodeIcon({ className, fillColor, size = 24, ...rest }: IconProps) {
|
|
6
|
-
return <Barcode {...rest} className={className} size={size} color={fillColor} />
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export default BarcodeIcon
|