@registrucentras/rc-ses-react-components 2.0.0 → 2.2.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/README.md +4 -0
- package/dist/assets/icons/ShoppingCartIcon.d.ts +3 -0
- package/dist/components/common/CardShell/index.d.ts +1 -1
- package/dist/components/common/CardShell/types.d.ts +10 -0
- package/dist/components/common/ListWithIcons/ListWithIcons.types.d.ts +4 -1
- package/dist/components/common/StepCard/StepCardFooter/index.d.ts +34 -0
- package/dist/components/common/StepCard/index.d.ts +3 -0
- package/dist/components/common/StepCard/types.d.ts +39 -0
- package/dist/components/common/TitleBlock/types.d.ts +1 -1
- package/dist/components/form/inputs/Select/Select.utils.d.ts +9 -0
- package/dist/components/form/inputs/Select/components/OptionCheckbox.d.ts +5 -0
- package/dist/components/form/inputs/Select/index.d.ts +18 -8
- package/dist/components/layout/ServiceFormContainer/CardFormContainer/index.d.ts +3 -0
- package/dist/components/loaders/LoadingSpinner/index.d.ts +1 -4
- package/dist/components/overlays/BottomSheet/index.d.ts +17 -0
- package/dist/components/overlays/BottomSheet/useSwipeToDismiss.d.ts +17 -0
- package/dist/library/icons.d.ts +2 -1
- package/dist/library/index.d.ts +3 -1
- package/dist/library/types.d.ts +6 -3
- package/dist/registrucentras-rc-ses-react-components.cjs +1 -1
- package/dist/registrucentras-rc-ses-react-components.js +3903 -3289
- package/dist/theme/cards.d.ts +12 -12
- package/dist/theme/light/MuiTypography.d.ts +14 -0
- package/dist/theme/palette.d.ts +124 -124
- package/dist/theme/spacing.d.ts +4 -0
- package/package.json +2 -1
- package/src/assets/icons/ShoppingCartIcon.tsx +16 -0
- package/src/components/common/Button/index.test.tsx +20 -11
- package/src/components/common/Button/index.tsx +8 -44
- package/src/components/common/CardShell/index.tsx +6 -2
- package/src/components/common/CardShell/types.ts +10 -0
- package/src/components/common/ListWithIcons/ListWithIcons.types.ts +22 -1
- package/src/components/common/ListWithIcons/components/ListWithIconsItem.tsx +13 -4
- package/src/components/common/ListWithIcons/index.test.tsx +42 -0
- package/src/components/common/StepCard/StepCardFooter/index.test.tsx +162 -0
- package/src/components/common/StepCard/StepCardFooter/index.tsx +120 -0
- package/src/components/common/StepCard/index.test.tsx +120 -0
- package/src/components/common/StepCard/index.tsx +74 -0
- package/src/components/common/StepCard/types.ts +45 -0
- package/src/components/common/TitleBlock/types.ts +1 -1
- package/src/components/form/inputs/SearchableField.test.tsx +1 -1
- package/src/components/form/inputs/Select/Select.utils.ts +24 -0
- package/src/components/form/inputs/Select/components/OptionCheckbox.tsx +46 -0
- package/src/components/form/inputs/Select/index.test.tsx +127 -0
- package/src/components/form/inputs/Select/index.tsx +426 -181
- package/src/components/layout/ServiceFormContainer/CardFormContainer/index.tsx +3 -0
- package/src/components/loaders/LoadingSpinner/index.tsx +3 -26
- package/src/components/overlays/BottomSheet/index.test.tsx +256 -0
- package/src/components/overlays/BottomSheet/index.tsx +242 -0
- package/src/components/overlays/BottomSheet/useSwipeToDismiss.test.ts +295 -0
- package/src/components/overlays/BottomSheet/useSwipeToDismiss.ts +138 -0
- package/src/examples/ListWithPagination/index.tsx +2 -1
- package/src/i18n/namespaces/common/en.json +7 -0
- package/src/i18n/namespaces/common/lt.json +7 -0
- package/src/i18n/namespaces/input/en.json +11 -0
- package/src/i18n/namespaces/input/lt.json +11 -0
- package/src/library/icons.ts +2 -0
- package/src/library/index.ts +4 -0
- package/src/library/types.ts +19 -2
- package/src/stories/atoms/Button.stories.tsx +202 -497
- package/src/stories/atoms/Select.stories.tsx +33 -5
- package/src/stories/foundations/ThemedMuiComponents.stories.tsx +2 -2
- package/src/stories/molecules/CardShell.stories.tsx +36 -2
- package/src/stories/molecules/DatePicker.stories.tsx +1 -2
- package/src/stories/molecules/ListWithIcons.stories.tsx +26 -0
- package/src/stories/molecules/Popover.stories.tsx +1 -1
- package/src/stories/molecules/StepCard.stories.tsx +181 -0
- package/src/stories/molecules/TitleBlock.stories.tsx +2 -2
- package/src/stories/organisms/AdvancedListItem.stories.tsx +80 -0
- package/src/stories/organisms/BottomSheet.stories.tsx +291 -0
- package/src/stories/organisms/CardFormContainer.stories.tsx +1 -1
- package/src/stories/organisms/Dialog.stories.tsx +1 -2
- package/src/theme/light/MuiAutocomplete.ts +43 -19
- package/src/theme/light/MuiButton.tsx +54 -0
- package/src/theme/light/MuiCard.tsx +9 -7
- package/src/theme/light/MuiTypography.tsx +17 -0
- package/src/theme/palette.tsx +7 -7
- package/src/theme/spacing.ts +5 -0
|
@@ -240,6 +240,7 @@ export const Main: Story = {
|
|
|
240
240
|
interface VariantsFormModel {
|
|
241
241
|
singleSelect: string | null
|
|
242
242
|
groupedSelect: string | null
|
|
243
|
+
groupedMultiSelect: string[]
|
|
243
244
|
singleSearchSelect: string | null
|
|
244
245
|
descriptionSelect: string | null
|
|
245
246
|
multiSelect: string[]
|
|
@@ -272,11 +273,11 @@ const groupedVariantOptions: ({
|
|
|
272
273
|
value: string
|
|
273
274
|
label: string
|
|
274
275
|
})[] = [
|
|
275
|
-
{ value: 'group-1-option-1', label: '1st option', group: '
|
|
276
|
-
{ value: 'group-1-option-2', label: '2st option', group: '
|
|
277
|
-
{ value: 'group-1-option-3', label: '3rd option', group: '
|
|
278
|
-
{ value: 'group-2-option-4', label: '4th option', group: '
|
|
279
|
-
{ value: 'group-2-option-5', label: '5th option', group: '
|
|
276
|
+
{ value: 'group-1-option-1', label: '1st option', group: 'Group 1' },
|
|
277
|
+
{ value: 'group-1-option-2', label: '2st option', group: 'Group 1' },
|
|
278
|
+
{ value: 'group-1-option-3', label: '3rd option', group: 'Group 1' },
|
|
279
|
+
{ value: 'group-2-option-4', label: '4th option', group: 'Group 2' },
|
|
280
|
+
{ value: 'group-2-option-5', label: '5th option', group: 'Group 2' },
|
|
280
281
|
]
|
|
281
282
|
|
|
282
283
|
const optionsWithDescriptions = [
|
|
@@ -333,6 +334,7 @@ export const AllVariants: Story = {
|
|
|
333
334
|
defaultValues: {
|
|
334
335
|
singleSelect: null,
|
|
335
336
|
groupedSelect: null,
|
|
337
|
+
groupedMultiSelect: ['group-2-option-4', 'group-2-option-5'],
|
|
336
338
|
singleSearchSelect: null,
|
|
337
339
|
descriptionSelect: 'option-3',
|
|
338
340
|
multiSelect: ['option-1', 'option-3'],
|
|
@@ -405,6 +407,32 @@ export const AllVariants: Story = {
|
|
|
405
407
|
/>
|
|
406
408
|
</VariantCard>
|
|
407
409
|
|
|
410
|
+
<VariantCard
|
|
411
|
+
title='Grouped multi select + search'
|
|
412
|
+
description='Grupė yra pati savarankiškai pažymima reikšmė - pažymėjus grupę pažymimi visi jos nariai, nužymėjus bet kurį narį grupė automatiškai nužymima.'
|
|
413
|
+
>
|
|
414
|
+
<RcSesSelect
|
|
415
|
+
id='grouped-multi-select'
|
|
416
|
+
name='groupedMultiSelect'
|
|
417
|
+
control={control}
|
|
418
|
+
label='Pasirinkti'
|
|
419
|
+
slotProps={{
|
|
420
|
+
wrapper: { labelOnTop: true },
|
|
421
|
+
field: {
|
|
422
|
+
groupBy: (option) =>
|
|
423
|
+
groupedVariantOptions.find(
|
|
424
|
+
(groupedOption) => groupedOption.value === option.value,
|
|
425
|
+
)?.group ?? '',
|
|
426
|
+
},
|
|
427
|
+
}}
|
|
428
|
+
multiple
|
|
429
|
+
dropdownSearch
|
|
430
|
+
selectAll
|
|
431
|
+
dropdownSearchPlaceholder='Ieškoti'
|
|
432
|
+
options={groupedVariantOptions}
|
|
433
|
+
/>
|
|
434
|
+
</VariantCard>
|
|
435
|
+
|
|
408
436
|
<VariantCard title='Basic + search' description='Bazinis variantas su paieska.'>
|
|
409
437
|
<RcSesSelect
|
|
410
438
|
id='single-search-select'
|
|
@@ -17,8 +17,8 @@ import {
|
|
|
17
17
|
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
* Coverage stories for theme slots no other story puts on the page
|
|
21
|
-
*
|
|
20
|
+
* Coverage stories for theme slots no other story puts on the page.
|
|
21
|
+
* `visual/theme-slots.spec.ts` fails if one is missing.
|
|
22
22
|
*
|
|
23
23
|
* Two reasons a slot ends up here:
|
|
24
24
|
*
|
|
@@ -31,6 +31,8 @@ const meta: Meta<typeof RcSesCardShell> = {
|
|
|
31
31
|
'theme',
|
|
32
32
|
'fullHeight',
|
|
33
33
|
'borderless',
|
|
34
|
+
'contentGap',
|
|
35
|
+
'footerGap',
|
|
34
36
|
'header',
|
|
35
37
|
'children',
|
|
36
38
|
'footer',
|
|
@@ -57,6 +59,14 @@ const meta: Meta<typeof RcSesCardShell> = {
|
|
|
57
59
|
control: 'boolean',
|
|
58
60
|
description: 'Renders the shell without any border',
|
|
59
61
|
},
|
|
62
|
+
contentGap: {
|
|
63
|
+
control: 'text',
|
|
64
|
+
description: "Overrides the variant preset's header-to-content gap (e.g. '1.5rem')",
|
|
65
|
+
},
|
|
66
|
+
footerGap: {
|
|
67
|
+
control: 'text',
|
|
68
|
+
description: "Overrides the variant preset's content-to-footer gap (e.g. '1.5rem')",
|
|
69
|
+
},
|
|
60
70
|
header: {
|
|
61
71
|
control: false,
|
|
62
72
|
description: 'Header content (ReactNode)',
|
|
@@ -91,6 +101,10 @@ const SampleContent = () => (
|
|
|
91
101
|
<Box
|
|
92
102
|
sx={{
|
|
93
103
|
alignItems: 'center',
|
|
104
|
+
backgroundColor: 'grey.100',
|
|
105
|
+
borderRadius: 1,
|
|
106
|
+
border: '1px dashed',
|
|
107
|
+
borderColor: 'grey.300',
|
|
94
108
|
color: 'text.primary',
|
|
95
109
|
display: 'flex',
|
|
96
110
|
justifyContent: 'center',
|
|
@@ -218,8 +232,28 @@ export const FullHeight: Story = {
|
|
|
218
232
|
fullHeight: true,
|
|
219
233
|
header: <SampleHeader />,
|
|
220
234
|
children: (
|
|
221
|
-
<Box
|
|
222
|
-
|
|
235
|
+
<Box
|
|
236
|
+
sx={{
|
|
237
|
+
alignItems: 'center',
|
|
238
|
+
backgroundColor: 'grey.100',
|
|
239
|
+
border: '1px dashed',
|
|
240
|
+
borderColor: 'grey.300',
|
|
241
|
+
borderRadius: 1,
|
|
242
|
+
display: 'flex',
|
|
243
|
+
flexDirection: 'column',
|
|
244
|
+
gap: 1,
|
|
245
|
+
height: '100%',
|
|
246
|
+
justifyContent: 'center',
|
|
247
|
+
px: 3,
|
|
248
|
+
}}
|
|
249
|
+
>
|
|
250
|
+
<Typography align='center' variant='h6'>
|
|
251
|
+
Pilno aukščio turinys
|
|
252
|
+
</Typography>
|
|
253
|
+
<Typography align='center' variant='body2' sx={{ color: 'text.secondary' }}>
|
|
254
|
+
Šis blokas užpildo visą turimą aukštį tarp antraštės ir poraštės, nepriklausomai
|
|
255
|
+
nuo turinio kiekio.
|
|
256
|
+
</Typography>
|
|
223
257
|
</Box>
|
|
224
258
|
),
|
|
225
259
|
footer: <SampleFooter />,
|
|
@@ -115,8 +115,7 @@ export const Main = {
|
|
|
115
115
|
|
|
116
116
|
/**
|
|
117
117
|
* The calendar popup carries the `MuiPickersLayout` theme overrides, and it only
|
|
118
|
-
* mounts once the picker is opened - so nothing covered them until this story
|
|
119
|
-
* (SAV-5648 / LIB-02).
|
|
118
|
+
* mounts once the picker is opened - so nothing covered them until this story.
|
|
120
119
|
*/
|
|
121
120
|
export const CalendarOpen = {
|
|
122
121
|
render: (args: any) => <DatePickerDemo {...args} />,
|
|
@@ -4,6 +4,7 @@ import CheckCircleFillIcon from '@/assets/icons/CheckCircleFillIcon'
|
|
|
4
4
|
import WarningFillIcon from '@/assets/icons/WarningFillIcon'
|
|
5
5
|
import ListWithIcons from '@/components/common/ListWithIcons'
|
|
6
6
|
import { type ListWithIconsItemData } from '@/components/common/ListWithIcons/ListWithIcons.types'
|
|
7
|
+
import { secondary } from '@/theme/palette'
|
|
7
8
|
|
|
8
9
|
const baseItems: ListWithIconsItemData[] = [
|
|
9
10
|
{
|
|
@@ -68,3 +69,28 @@ export const Loading: Story = {
|
|
|
68
69
|
isLoading: true,
|
|
69
70
|
},
|
|
70
71
|
}
|
|
72
|
+
|
|
73
|
+
const toneItems: ListWithIconsItemData[] = [
|
|
74
|
+
{ text: 'Default', textColor: 'default' },
|
|
75
|
+
{ text: 'Secondary', textColor: 'secondary' },
|
|
76
|
+
{ text: 'Muted', textColor: 'muted' },
|
|
77
|
+
{ text: 'Link', textColor: 'link' },
|
|
78
|
+
]
|
|
79
|
+
|
|
80
|
+
export const TextTones: Story = {
|
|
81
|
+
name: 'Text tones (DS "Text" tokens)',
|
|
82
|
+
args: {
|
|
83
|
+
items: toneItems,
|
|
84
|
+
},
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const customColorItems: ListWithIconsItemData[] = [
|
|
88
|
+
{ text: 'Custom palette color', textColor: secondary['700'] },
|
|
89
|
+
]
|
|
90
|
+
|
|
91
|
+
export const CustomColor: Story = {
|
|
92
|
+
name: 'Custom color (palette variant instead of a named tone)',
|
|
93
|
+
args: {
|
|
94
|
+
items: customColorItems,
|
|
95
|
+
},
|
|
96
|
+
}
|
|
@@ -6,7 +6,7 @@ import RcSesPopover from '@/components/common/Popover'
|
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* `RcSesButtonWithPopover` owns the popover's open state internally and starts
|
|
9
|
-
* closed, so `MuiPopover` never reached a visual baseline
|
|
9
|
+
* closed, so `MuiPopover` never reached a visual baseline.
|
|
10
10
|
* These stories render the popover itself, already open against a fixed anchor.
|
|
11
11
|
*/
|
|
12
12
|
const meta: Meta<typeof RcSesPopover> = {
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { Box, Button, Typography } from '@mui/material'
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
3
|
+
import { ComponentProps, useState } from 'react'
|
|
4
|
+
|
|
5
|
+
import RcSesCardFooter from '@/components/common/CardShell/CardFooter'
|
|
6
|
+
import RcSesStepCard from '@/components/common/StepCard'
|
|
7
|
+
import FieldView from '@/components/storybook/FieldView'
|
|
8
|
+
import Fields from '@/components/storybook/Fields'
|
|
9
|
+
|
|
10
|
+
const STEP_COUNT = 3
|
|
11
|
+
|
|
12
|
+
const meta: Meta<typeof RcSesStepCard> = {
|
|
13
|
+
title: 'Molecules/StepCard',
|
|
14
|
+
component: RcSesStepCard,
|
|
15
|
+
tags: ['autodocs'],
|
|
16
|
+
parameters: {
|
|
17
|
+
viewport: {
|
|
18
|
+
options: {
|
|
19
|
+
mobile375: { name: 'Mobile 375', styles: { height: '900px', width: '375px' } },
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
args: {
|
|
24
|
+
title: 'Antraštės tekstas',
|
|
25
|
+
description: 'Papildomas aprašymo tekstas',
|
|
26
|
+
},
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export default meta
|
|
30
|
+
|
|
31
|
+
const DemoContent = () => (
|
|
32
|
+
<Box
|
|
33
|
+
sx={{
|
|
34
|
+
alignItems: 'center',
|
|
35
|
+
backgroundColor: 'grey.100',
|
|
36
|
+
border: '1px dashed',
|
|
37
|
+
borderColor: 'grey.300',
|
|
38
|
+
borderRadius: 1,
|
|
39
|
+
display: 'flex',
|
|
40
|
+
height: 140,
|
|
41
|
+
justifyContent: 'center',
|
|
42
|
+
width: '100%',
|
|
43
|
+
}}
|
|
44
|
+
>
|
|
45
|
+
<Typography variant='body2'>Turinys (Body slot)</Typography>
|
|
46
|
+
</Box>
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
type Story = StoryObj<typeof RcSesStepCard>
|
|
50
|
+
|
|
51
|
+
type StepCardDemoProps = Omit<
|
|
52
|
+
ComponentProps<typeof RcSesStepCard>,
|
|
53
|
+
'activeStep' | 'stepCount' | 'onNext' | 'onBack' | 'onCancel'
|
|
54
|
+
>
|
|
55
|
+
|
|
56
|
+
function StepCardDemo(args: StepCardDemoProps) {
|
|
57
|
+
const [activeStep, setActiveStep] = useState(0)
|
|
58
|
+
|
|
59
|
+
return (
|
|
60
|
+
<Fields>
|
|
61
|
+
<FieldView>
|
|
62
|
+
<RcSesStepCard
|
|
63
|
+
{...args}
|
|
64
|
+
activeStep={activeStep}
|
|
65
|
+
stepCount={STEP_COUNT}
|
|
66
|
+
onNext={() => setActiveStep((prev) => Math.min(prev + 1, STEP_COUNT - 1))}
|
|
67
|
+
onBack={() => setActiveStep((prev) => Math.max(prev - 1, 0))}
|
|
68
|
+
onCancel={() => setActiveStep(0)}
|
|
69
|
+
>
|
|
70
|
+
<DemoContent />
|
|
71
|
+
</RcSesStepCard>
|
|
72
|
+
</FieldView>
|
|
73
|
+
</Fields>
|
|
74
|
+
)
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/** Interactive wizard: walks through Atšaukti/Tęsti → Atgal/Tęsti → Atgal/Į krepšelį. */
|
|
78
|
+
export const Default: Story = {
|
|
79
|
+
render: (args) => <StepCardDemo {...args} />,
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/** First step → footer shows `Atšaukti` + `Tęsti`. */
|
|
83
|
+
export const FirstStep: Story = {
|
|
84
|
+
render: (args) => (
|
|
85
|
+
<Fields>
|
|
86
|
+
<FieldView>
|
|
87
|
+
<RcSesStepCard {...args} activeStep={0} stepCount={STEP_COUNT}>
|
|
88
|
+
<DemoContent />
|
|
89
|
+
</RcSesStepCard>
|
|
90
|
+
</FieldView>
|
|
91
|
+
</Fields>
|
|
92
|
+
),
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/** Middle step → footer shows `Atgal` + `Tęsti`. */
|
|
96
|
+
export const MiddleStep: Story = {
|
|
97
|
+
render: (args) => (
|
|
98
|
+
<Fields>
|
|
99
|
+
<FieldView>
|
|
100
|
+
<RcSesStepCard {...args} activeStep={1} stepCount={STEP_COUNT}>
|
|
101
|
+
<DemoContent />
|
|
102
|
+
</RcSesStepCard>
|
|
103
|
+
</FieldView>
|
|
104
|
+
</Fields>
|
|
105
|
+
),
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/** Last step → footer shows `Atgal` + `Suma be PVM` total + `Pridėti į krepšelį`. */
|
|
109
|
+
export const LastStep: Story = {
|
|
110
|
+
render: (args) => (
|
|
111
|
+
<Fields>
|
|
112
|
+
<FieldView>
|
|
113
|
+
<RcSesStepCard
|
|
114
|
+
{...args}
|
|
115
|
+
activeStep={STEP_COUNT - 1}
|
|
116
|
+
stepCount={STEP_COUNT}
|
|
117
|
+
totalPrice='4,01 €'
|
|
118
|
+
>
|
|
119
|
+
<DemoContent />
|
|
120
|
+
</RcSesStepCard>
|
|
121
|
+
</FieldView>
|
|
122
|
+
</Fields>
|
|
123
|
+
),
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Custom footer → the `footer` prop replaces the default step-position row
|
|
128
|
+
* entirely. Use when a step needs bespoke actions.
|
|
129
|
+
*/
|
|
130
|
+
export const CustomFooter: Story = {
|
|
131
|
+
render: (args) => (
|
|
132
|
+
<Fields>
|
|
133
|
+
<FieldView>
|
|
134
|
+
<RcSesStepCard
|
|
135
|
+
{...args}
|
|
136
|
+
activeStep={1}
|
|
137
|
+
stepCount={STEP_COUNT}
|
|
138
|
+
footer={
|
|
139
|
+
<RcSesCardFooter align='between'>
|
|
140
|
+
<Button variant='contained' color='grey'>
|
|
141
|
+
Išsaugoti juodraštį
|
|
142
|
+
</Button>
|
|
143
|
+
<Button variant='contained'>Pateikti peržiūrai</Button>
|
|
144
|
+
</RcSesCardFooter>
|
|
145
|
+
}
|
|
146
|
+
>
|
|
147
|
+
<DemoContent />
|
|
148
|
+
</RcSesStepCard>
|
|
149
|
+
</FieldView>
|
|
150
|
+
</Fields>
|
|
151
|
+
),
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Last-step footer pinned at a 375px viewport - the trailing CTA + price
|
|
156
|
+
* summary stack above the leading button and the price row goes inline, per
|
|
157
|
+
* the mobile Figma spec.
|
|
158
|
+
*/
|
|
159
|
+
export const MobileViewport: Story = {
|
|
160
|
+
render: (args) => (
|
|
161
|
+
<Fields>
|
|
162
|
+
<FieldView>
|
|
163
|
+
<RcSesStepCard
|
|
164
|
+
{...args}
|
|
165
|
+
activeStep={STEP_COUNT - 1}
|
|
166
|
+
stepCount={STEP_COUNT}
|
|
167
|
+
totalPrice='4,01 €'
|
|
168
|
+
>
|
|
169
|
+
<DemoContent />
|
|
170
|
+
</RcSesStepCard>
|
|
171
|
+
</FieldView>
|
|
172
|
+
</Fields>
|
|
173
|
+
),
|
|
174
|
+
// Two separate mechanisms, deliberately: the tag sets Playwright's browser
|
|
175
|
+
// width for the visual baseline, the global sets the canvas iframe width for
|
|
176
|
+
// anyone reviewing in Storybook. Docs pages render stories inline at the
|
|
177
|
+
// container's width, where neither applies, so this one is kept out of the
|
|
178
|
+
// docs page rather than showing a desktop card under a mobile heading.
|
|
179
|
+
tags: ['viewport-375', '!autodocs'],
|
|
180
|
+
globals: { viewport: { value: 'mobile375' } },
|
|
181
|
+
}
|
|
@@ -533,8 +533,8 @@ export const BodyScaleTitleInCard: Story = {
|
|
|
533
533
|
},
|
|
534
534
|
}
|
|
535
535
|
|
|
536
|
-
// Responsive baselines for
|
|
537
|
-
//
|
|
536
|
+
// Responsive baselines for the 375 / 768 / 1440 responsive check. Exercises
|
|
537
|
+
// the mobile stacking of the actions slot
|
|
538
538
|
// (direction={{ xs: 'column', sm: 'row' }}) so both the two-action and
|
|
539
539
|
// vertical-grid layouts get pinned baselines at 375 and 768.
|
|
540
540
|
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
RadioGroup,
|
|
8
8
|
Stack,
|
|
9
9
|
TextField,
|
|
10
|
+
Typography,
|
|
10
11
|
} from '@mui/material'
|
|
11
12
|
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
12
13
|
import { useState } from 'react'
|
|
@@ -15,6 +16,7 @@ import NotePencilIcon from '@/assets/icons/NotePencilIcon'
|
|
|
15
16
|
import TrashIcon from '@/assets/icons/TrashIcon'
|
|
16
17
|
import UserIcon from '@/assets/icons/UserIcon'
|
|
17
18
|
import AdvancedListItem from '@/components/common/AdvancedList/components/AdvancedListItem'
|
|
19
|
+
import { secondary } from '@/theme/palette'
|
|
18
20
|
|
|
19
21
|
const meta = {
|
|
20
22
|
title: 'Organisms/AdvancedListItem',
|
|
@@ -651,3 +653,81 @@ export const KrepselisWithDeletePreset: Story = {
|
|
|
651
653
|
name: 'Preset: Krepšelis (su trynimu)',
|
|
652
654
|
render: () => <KrepselisWithDeleteStory />,
|
|
653
655
|
}
|
|
656
|
+
|
|
657
|
+
export const MetaInfoTones: Story = {
|
|
658
|
+
name: 'Meta info: textColor tokens (default/secondary/muted/disabled/link/linkHover)',
|
|
659
|
+
render: () => (
|
|
660
|
+
<Stack
|
|
661
|
+
sx={{
|
|
662
|
+
gap: 2,
|
|
663
|
+
width: '100%',
|
|
664
|
+
maxWidth: '32rem',
|
|
665
|
+
}}
|
|
666
|
+
>
|
|
667
|
+
<Stack sx={{ gap: 0.5 }}>
|
|
668
|
+
<Typography variant='caption' sx={{ color: 'text.secondary' }}>
|
|
669
|
+
textColor: default
|
|
670
|
+
</Typography>
|
|
671
|
+
<AdvancedListItem
|
|
672
|
+
title='Prašymas pateiktas'
|
|
673
|
+
subtitle='Reg. Nr. 4400-1234-5678'
|
|
674
|
+
metaItems={[{ text: 'Sukurta 2026-01-05', textColor: 'default' }]}
|
|
675
|
+
/>
|
|
676
|
+
</Stack>
|
|
677
|
+
<Stack sx={{ gap: 0.5 }}>
|
|
678
|
+
<Typography variant='caption' sx={{ color: 'text.secondary' }}>
|
|
679
|
+
textColor: secondary
|
|
680
|
+
</Typography>
|
|
681
|
+
<AdvancedListItem
|
|
682
|
+
title='Papildoma informacija'
|
|
683
|
+
subtitle='Reg. Nr. 4400-1234-5678'
|
|
684
|
+
metaItems={[{ text: 'Antrinis tekstas', textColor: 'secondary' }]}
|
|
685
|
+
/>
|
|
686
|
+
</Stack>
|
|
687
|
+
<Stack sx={{ gap: 0.5 }}>
|
|
688
|
+
<Typography variant='caption' sx={{ color: 'text.secondary' }}>
|
|
689
|
+
textColor: muted
|
|
690
|
+
</Typography>
|
|
691
|
+
<AdvancedListItem
|
|
692
|
+
title='Archyvuotas įrašas'
|
|
693
|
+
subtitle='Reg. Nr. 4400-1234-5678'
|
|
694
|
+
metaItems={[{ text: 'Nebeaktualu', textColor: 'muted' }]}
|
|
695
|
+
/>
|
|
696
|
+
</Stack>
|
|
697
|
+
<Stack sx={{ gap: 0.5 }}>
|
|
698
|
+
<Typography variant='caption' sx={{ color: 'text.secondary' }}>
|
|
699
|
+
textColor: link
|
|
700
|
+
</Typography>
|
|
701
|
+
<AdvancedListItem
|
|
702
|
+
title='Nuoroda'
|
|
703
|
+
subtitle='Reg. Nr. 4400-1234-5678'
|
|
704
|
+
metaItems={[{ text: 'Peržiūrėti dokumentą', textColor: 'link' }]}
|
|
705
|
+
/>
|
|
706
|
+
</Stack>
|
|
707
|
+
<Stack sx={{ gap: 0.5 }}>
|
|
708
|
+
<Typography variant='caption' sx={{ color: 'text.secondary' }}>
|
|
709
|
+
textColor: default + secondary + link (multiple meta items in one row)
|
|
710
|
+
</Typography>
|
|
711
|
+
<AdvancedListItem
|
|
712
|
+
title='Keli meta elementai vienoje eilutėje'
|
|
713
|
+
subtitle='Reg. Nr. 4400-1234-5678'
|
|
714
|
+
metaItems={[
|
|
715
|
+
{ text: 'Sukurta 2026-01-05', textColor: 'default' },
|
|
716
|
+
{ text: 'Antrinis tekstas', textColor: 'secondary' },
|
|
717
|
+
{ text: 'Peržiūrėti dokumentą', textColor: 'link' },
|
|
718
|
+
]}
|
|
719
|
+
/>
|
|
720
|
+
</Stack>
|
|
721
|
+
<Stack sx={{ gap: 0.5 }}>
|
|
722
|
+
<Typography variant='caption' sx={{ color: 'text.secondary' }}>
|
|
723
|
+
textColor: custom color from the palette
|
|
724
|
+
</Typography>
|
|
725
|
+
<AdvancedListItem
|
|
726
|
+
title='JADIS pažymėjimas'
|
|
727
|
+
subtitle='Reg. Nr. 4400-1234-5678'
|
|
728
|
+
metaItems={[{ text: 'Peržiūrėti dokumentą', textColor: secondary['700'] }]}
|
|
729
|
+
/>
|
|
730
|
+
</Stack>
|
|
731
|
+
</Stack>
|
|
732
|
+
),
|
|
733
|
+
}
|