@registrucentras/rc-ses-react-components 2.0.0-rc.5 → 2.0.0-rc.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/common/TitleBlock/types.d.ts +3 -1
- package/dist/registrucentras-rc-ses-react-components.cjs +1 -1
- package/dist/registrucentras-rc-ses-react-components.js +847 -794
- package/dist/stories/{components/display → atoms}/Badge.stories.d.ts +1 -1
- package/dist/stories/{components/inputs → atoms}/Checkbox.stories.d.ts +1 -1
- package/dist/stories/{components/icons → atoms}/IconWithCircularBackground.stories.d.ts +1 -1
- package/dist/stories/{components/icons → atoms}/IconWithSquareBackground.stories.d.ts +1 -1
- package/dist/stories/{components/icons → atoms}/Icons.stories.d.ts +1 -1
- package/dist/stories/{components/loaders → atoms}/Loader.stories.d.ts +1 -1
- package/dist/stories/{components/loaders → atoms}/LoadingSpinner.stories.d.ts +1 -1
- package/dist/stories/{components/inputs → atoms}/NumberStepper.stories.d.ts +1 -1
- package/dist/stories/{components/inputs → atoms}/PhoneInput.stories.d.ts +1 -1
- package/dist/stories/{components/inputs → atoms}/SearchInput.stories.d.ts +1 -1
- package/dist/stories/{components/inputs → atoms}/Select.stories.d.ts +1 -1
- package/dist/stories/{components/form → atoms}/SimpleCheckbox.stories.d.ts +1 -1
- package/dist/stories/{components/inputs → atoms}/Switch.stories.d.ts +1 -1
- package/dist/stories/{components/tabs → atoms}/Tab.stories.d.ts +1 -1
- package/dist/stories/{components/inputs → atoms}/TextField.stories.d.ts +1 -1
- package/dist/stories/{components/display → atoms}/Tooltip.stories.d.ts +1 -1
- package/dist/stories/{components/feedback → molecules}/Alert.stories.d.ts +1 -1
- package/dist/stories/{components/navigation → molecules}/Breadcrumbs.stories.d.ts +1 -1
- package/dist/stories/{components/actions → molecules}/ButtonWithPopover.stories.d.ts +1 -1
- package/dist/stories/{components/display → molecules}/Card.stories.d.ts +1 -1
- package/dist/stories/{components/display → molecules}/CardShell.stories.d.ts +2 -1
- package/dist/stories/{components/form → molecules}/CheckboxFormControl.stories.d.ts +1 -1
- package/dist/stories/{components/inputs → molecules}/DatePicker.stories.d.ts +1 -1
- package/dist/stories/{components/form → molecules}/FormControlWrapper.stories.d.ts +1 -1
- package/dist/stories/{components/display → molecules}/ImageCard.stories.d.ts +1 -1
- package/dist/stories/{components/display → molecules}/ListWithIcons.stories.d.ts +2 -2
- package/dist/stories/{components/inputs → molecules}/PhoneInputFormControl.stories.d.ts +1 -1
- package/dist/stories/{components/overlays → molecules}/Popover.stories.d.ts +1 -1
- package/dist/stories/{components/inputs → molecules}/RadioButtonGroup.stories.d.ts +1 -1
- package/dist/stories/{components/inputs → molecules}/SearchableField.stories.d.ts +1 -1
- package/dist/stories/{components/display → molecules}/SegmentedControl.stories.d.ts +1 -1
- package/dist/stories/{components/feedback → molecules}/Snackbar.stories.d.ts +1 -1
- package/dist/stories/{components/tabs → molecules}/TabPanel.stories.d.ts +1 -1
- package/dist/stories/{components/tabs → molecules}/Tabs.stories.d.ts +1 -1
- package/dist/stories/{components/tabs → molecules}/TabsWrapper.stories.d.ts +1 -1
- package/dist/stories/{components/display → molecules}/TitleBlock.stories.d.ts +3 -1
- package/dist/stories/{components/navigation → organisms}/Accordion.stories.d.ts +1 -1
- package/dist/stories/{components/display → organisms}/AdvancedList.stories.d.ts +1 -1
- package/dist/stories/{components/display → organisms}/AdvancedListItem.stories.d.ts +1 -1
- package/dist/stories/{components/form → organisms}/CardFormContainer.stories.d.ts +1 -1
- package/dist/stories/{components/navigation → organisms}/DataPagination.stories.d.ts +1 -1
- package/dist/stories/{components/overlays → organisms}/Dialog.stories.d.ts +1 -1
- package/dist/stories/{components/inputs → organisms}/FileDropzone.stories.d.ts +1 -1
- package/dist/stories/{components/inputs → organisms}/FileUpload.stories.d.ts +1 -1
- package/dist/stories/{components/layout → organisms}/Footer.stories.d.ts +1 -1
- package/dist/stories/{components/loaders → organisms}/FullPageLoader.stories.d.ts +1 -1
- package/dist/stories/{components/overlays → organisms}/Modal.stories.d.ts +1 -1
- package/dist/stories/{components/display → organisms}/SelectableCardList.stories.d.ts +1 -1
- package/dist/stories/{components/form → organisms}/ServiceFormActions.stories.d.ts +1 -1
- package/dist/stories/{components/form → organisms}/ServiceFormContainer.stories.d.ts +1 -1
- package/dist/stories/{components/layout → organisms}/ServiceHeader.stories.d.ts +1 -1
- package/dist/stories/{components/display → organisms}/ServiceLinks.stories.d.ts +1 -1
- package/dist/stories/{components/navigation → organisms}/ServiceWizardStepper.stories.d.ts +1 -1
- package/dist/stories/{components/navigation → organisms}/SideNav.stories.d.ts +1 -1
- package/dist/stories/{components/layout → templates}/ServicePage.stories.d.ts +1 -1
- package/dist/theme/cards.d.ts +4 -0
- package/package.json +1 -1
- package/src/components/common/CardShell/CardFooter/index.tsx +10 -1
- package/src/components/common/CardShell/index.tsx +31 -7
- package/src/components/common/TitleBlock/index.test.tsx +33 -0
- package/src/components/common/TitleBlock/index.tsx +24 -4
- package/src/components/common/TitleBlock/types.ts +3 -1
- package/src/stories/Welcome.mdx +25 -2
- package/src/stories/{components/display → atoms}/Badge.stories.tsx +1 -1
- package/src/stories/{components/actions → atoms}/Button.stories.tsx +1 -1
- package/src/stories/{components/inputs → atoms}/Checkbox.stories.tsx +1 -1
- package/src/stories/{components/icons → atoms}/IconWithCircularBackground.stories.tsx +1 -1
- package/src/stories/{components/icons → atoms}/IconWithSquareBackground.stories.tsx +1 -1
- package/src/stories/{components/icons → atoms}/Icons.stories.tsx +1 -1
- package/src/stories/{components/loaders → atoms}/Loader.stories.tsx +1 -1
- package/src/stories/{components/loaders → atoms}/LoadingSpinner.stories.tsx +1 -1
- package/src/stories/{assets → atoms}/Logo.stories.tsx +1 -1
- package/src/stories/{components/inputs → atoms}/NumberStepper.stories.tsx +1 -1
- package/src/stories/{components/inputs → atoms}/PhoneInput.stories.tsx +1 -1
- package/src/stories/{components/inputs → atoms}/SearchInput.stories.tsx +1 -1
- package/src/stories/{components/inputs → atoms}/Select.stories.tsx +1 -1
- package/src/stories/{components/form → atoms}/SimpleCheckbox.stories.tsx +1 -1
- package/src/stories/{components/inputs → atoms}/Switch.stories.tsx +1 -1
- package/src/stories/{components/tabs → atoms}/Tab.stories.tsx +1 -1
- package/src/stories/{components/inputs → atoms}/TextField.stories.tsx +1 -1
- package/src/stories/{components/display → atoms}/Tooltip.stories.tsx +2 -2
- package/src/stories/{theme → foundations}/ThemedMuiComponents.stories.tsx +1 -1
- package/src/stories/{components/feedback → molecules}/Alert.stories.tsx +1 -1
- package/src/stories/{components/navigation → molecules}/Breadcrumbs.stories.tsx +1 -1
- package/src/stories/{components/actions → molecules}/ButtonWithPopover.stories.tsx +1 -1
- package/src/stories/{components/display → molecules}/Card.stories.tsx +1 -1
- package/src/stories/{components/display → molecules}/CardShell.stories.tsx +20 -1
- package/src/stories/{components/form → molecules}/CheckboxFormControl.stories.tsx +1 -1
- package/src/stories/{components/inputs → molecules}/DatePicker.stories.tsx +1 -1
- package/src/stories/{components/form → molecules}/FormControlWrapper.stories.tsx +1 -1
- package/src/stories/{components/display → molecules}/ImageCard.stories.tsx +1 -1
- package/src/stories/{components/display → molecules}/ListWithIcons.stories.tsx +1 -1
- package/src/stories/{components/inputs → molecules}/PhoneInputFormControl.stories.tsx +1 -1
- package/src/stories/{components/overlays → molecules}/Popover.stories.tsx +1 -1
- package/src/stories/{components/inputs → molecules}/RadioButtonGroup.stories.tsx +1 -1
- package/src/stories/{components/inputs → molecules}/SearchableField.stories.tsx +1 -1
- package/src/stories/{components/display → molecules}/SegmentedControl.stories.tsx +2 -2
- package/src/stories/{components/feedback → molecules}/Snackbar.stories.tsx +1 -1
- package/src/stories/{components/tabs → molecules}/TabPanel.stories.tsx +1 -1
- package/src/stories/{components/tabs → molecules}/Tabs.stories.tsx +1 -1
- package/src/stories/{components/tabs → molecules}/TabsWrapper.stories.tsx +1 -1
- package/src/stories/{components/display → molecules}/TitleBlock.stories.tsx +90 -1
- package/src/stories/{components/navigation → organisms}/Accordion.stories.tsx +1 -1
- package/src/stories/{components/display → organisms}/AdvancedList.stories.tsx +1 -1
- package/src/stories/{components/display → organisms}/AdvancedListItem.stories.tsx +1 -1
- package/src/stories/{components/form → organisms}/CardFormContainer.stories.tsx +1 -1
- package/src/stories/{components/navigation → organisms}/DataPagination.stories.tsx +1 -1
- package/src/stories/{components/overlays → organisms}/Dialog.stories.tsx +1 -1
- package/src/stories/{components/inputs → organisms}/FileDropzone.stories.tsx +1 -1
- package/src/stories/{components/inputs → organisms}/FileUpload.stories.tsx +1 -1
- package/src/stories/{components/layout → organisms}/Footer.stories.tsx +1 -1
- package/src/stories/{components/loaders → organisms}/FullPageLoader.stories.tsx +1 -1
- package/src/stories/{components/overlays → organisms}/Modal.stories.tsx +1 -1
- package/src/stories/{components/display → organisms}/SelectableCardList.stories.tsx +1 -1
- package/src/stories/{components/form → organisms}/ServiceFormActions.stories.tsx +1 -1
- package/src/stories/{components/form → organisms}/ServiceFormContainer.stories.tsx +1 -1
- package/src/stories/{components/layout → organisms}/ServiceHeader.stories.tsx +1 -1
- package/src/stories/{components/display → organisms}/ServiceLinks.stories.tsx +1 -1
- package/src/stories/{components/navigation → organisms}/ServiceWizardStepper.stories.tsx +3 -3
- package/src/stories/{components/navigation → organisms}/SideNav.stories.tsx +1 -1
- package/src/stories/{components/layout → templates}/ServicePage.stories.tsx +1 -1
- package/src/theme/cards.ts +2 -0
- package/src/stories/components/display/Card.test.tsx +0 -19
- /package/dist/stories/{components/actions → atoms}/Button.stories.d.ts +0 -0
- /package/dist/stories/{assets → atoms}/Logo.stories.d.ts +0 -0
- /package/dist/stories/{theme → foundations}/ThemedMuiComponents.stories.d.ts +0 -0
- /package/src/stories/{components/actions → atoms}/Button.test.ts +0 -0
- /package/src/stories/{Colors.mdx → foundations/Colors.mdx} +0 -0
|
@@ -131,6 +131,39 @@ describe('RcSesTitleBlock', () => {
|
|
|
131
131
|
})
|
|
132
132
|
})
|
|
133
133
|
|
|
134
|
+
test('heading title variants keep the card-header weight', () => {
|
|
135
|
+
const variants = ['h4', 'h5', 'h6'] as const
|
|
136
|
+
|
|
137
|
+
variants.forEach((variant) => {
|
|
138
|
+
const { unmount } = renderTitleBlock(
|
|
139
|
+
<RcSesTitleBlock title={`${variant} Title`} titleVariant={variant} />,
|
|
140
|
+
)
|
|
141
|
+
|
|
142
|
+
expect(screen.getByText(`${variant} Title`)).toHaveStyle({ fontWeight: '600' })
|
|
143
|
+
unmount()
|
|
144
|
+
})
|
|
145
|
+
})
|
|
146
|
+
|
|
147
|
+
test('titleVariant="body1" drops the header weight for the body type scale', () => {
|
|
148
|
+
renderTitleBlock(<RcSesTitleBlock title='Test Title' titleVariant='body1' />)
|
|
149
|
+
|
|
150
|
+
expect(screen.getByText('Test Title')).toHaveStyle({
|
|
151
|
+
fontSize: '0.9375rem',
|
|
152
|
+
fontWeight: '400',
|
|
153
|
+
lineHeight: '1.125rem',
|
|
154
|
+
})
|
|
155
|
+
})
|
|
156
|
+
|
|
157
|
+
test('titleVariant="body1" still renders a heading at the requested level', () => {
|
|
158
|
+
renderTitleBlock(
|
|
159
|
+
<RcSesTitleBlock headingLevel={2} title='Test Title' titleVariant='body1' />,
|
|
160
|
+
)
|
|
161
|
+
|
|
162
|
+
expect(
|
|
163
|
+
screen.getByRole('heading', { level: 2, name: 'Test Title' }),
|
|
164
|
+
).toBeInTheDocument()
|
|
165
|
+
})
|
|
166
|
+
|
|
134
167
|
test('count renders a badge inside the heading accessible name', () => {
|
|
135
168
|
renderTitleBlock(<RcSesTitleBlock count={4} title='Pasirinktos teisės' />)
|
|
136
169
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Box, Stack, Typography } from '@mui/material'
|
|
2
|
-
import { type ReactNode } from 'react'
|
|
3
2
|
|
|
4
3
|
import RcSesBadge from '@/components/common/Badge'
|
|
5
4
|
import cards from '@/theme/cards'
|
|
@@ -25,15 +24,27 @@ function RcSesTitleBlock({
|
|
|
25
24
|
const hasCount = count !== undefined && count !== null
|
|
26
25
|
const hasDescription = description !== undefined && description !== null
|
|
27
26
|
const isVertical = orientation === 'vertical'
|
|
27
|
+
// The card-header weight belongs to the heading variants only.
|
|
28
|
+
const isHeadingScale = titleVariant !== 'body1'
|
|
28
29
|
|
|
29
30
|
const iconNode = icon ? (
|
|
30
|
-
<Box
|
|
31
|
+
<Box
|
|
32
|
+
aria-hidden
|
|
33
|
+
data-testid={testIds?.icon}
|
|
34
|
+
sx={{
|
|
35
|
+
display: 'flex',
|
|
36
|
+
flexShrink: 0,
|
|
37
|
+
}}
|
|
38
|
+
>
|
|
31
39
|
{icon}
|
|
32
40
|
</Box>
|
|
33
41
|
) : null
|
|
34
42
|
|
|
35
43
|
const textColumn = (
|
|
36
|
-
<Stack
|
|
44
|
+
<Stack
|
|
45
|
+
spacing={isVertical ? { xs: '0.5rem', sm: cards.header.rowGap } : cards.header.gap}
|
|
46
|
+
sx={{ flex: 1, minWidth: 0, width: '100%' }}
|
|
47
|
+
>
|
|
37
48
|
<HeadingTag id={headingId} data-testid={testIds?.heading} style={{ margin: 0 }}>
|
|
38
49
|
<Typography
|
|
39
50
|
component='span'
|
|
@@ -42,7 +53,12 @@ function RcSesTitleBlock({
|
|
|
42
53
|
color: titleTone === 'brand' ? palette.primary[700] : palette.grey[900],
|
|
43
54
|
// inline only when the badge has to sit on the heading's last line
|
|
44
55
|
display: hasCount ? 'inline' : 'block',
|
|
45
|
-
|
|
56
|
+
// Vertical orientation compresses the title on xs; desktop keeps
|
|
57
|
+
// whatever size `titleVariant` defines. Keep lineHeight paired with
|
|
58
|
+
// fontSize so wrapping titles do not clip descenders.
|
|
59
|
+
fontSize: isVertical ? { xs: '0.875rem', sm: '1.5rem' } : undefined,
|
|
60
|
+
lineHeight: isVertical ? { xs: 1.25, sm: 1.33 } : undefined,
|
|
61
|
+
fontWeight: isHeadingScale ? cards.header.titleFontWeight : undefined,
|
|
46
62
|
overflowWrap: 'anywhere',
|
|
47
63
|
}}
|
|
48
64
|
>
|
|
@@ -104,6 +120,10 @@ function RcSesTitleBlock({
|
|
|
104
120
|
data-testid={testIds?.root}
|
|
105
121
|
direction={isVertical ? 'column' : { xs: 'column', sm: 'row' }}
|
|
106
122
|
spacing={cards.header.rowGap}
|
|
123
|
+
// Flex gap skips items removed via `display: none`, so the icon's mobile
|
|
124
|
+
// hide in the vertical orientation actually collapses its slot instead of
|
|
125
|
+
// leaving a sibling-selector margin above the title.
|
|
126
|
+
useFlexGap
|
|
107
127
|
sx={{
|
|
108
128
|
alignItems:
|
|
109
129
|
isVertical || hasDescription
|
|
@@ -2,7 +2,7 @@ import { ReactNode } from 'react'
|
|
|
2
2
|
|
|
3
3
|
export type TitleBlockHeadingLevel = 2 | 3 | 4 | 5 | 6
|
|
4
4
|
|
|
5
|
-
export type TitleBlockTitleVariant = 'h4' | 'h5' | 'h6'
|
|
5
|
+
export type TitleBlockTitleVariant = 'h4' | 'h5' | 'h6' | 'body1'
|
|
6
6
|
|
|
7
7
|
export type TitleBlockOrientation = 'horizontal' | 'vertical'
|
|
8
8
|
|
|
@@ -22,6 +22,8 @@ export type RcSesTitleBlockBaseProps = {
|
|
|
22
22
|
* Visual size of the title, independent of `headingLevel`. The semantic tag
|
|
23
23
|
* (`headingLevel`) sets document structure; this sets the type scale.
|
|
24
24
|
* Defaults to `h6` (18px).
|
|
25
|
+
* `body1` (15px) draws the title as running copy: body scale, and the
|
|
26
|
+
* type scale's own weight instead of the card-header one.
|
|
25
27
|
*/
|
|
26
28
|
titleVariant?: TitleBlockTitleVariant
|
|
27
29
|
/**
|
package/src/stories/Welcome.mdx
CHANGED
|
@@ -27,10 +27,33 @@ import Logo from '@/assets/Logo'
|
|
|
27
27
|
{/* Overview */}
|
|
28
28
|
<div style={{ marginBottom: '24px', padding: '24px', backgroundColor: grey['100'], borderRadius: '12px' }}>
|
|
29
29
|
<p style={{ color: primary['600'], lineHeight: '1.7', margin: '0 0 16px 0', fontSize: '15px', fontWeight: '500' }}>
|
|
30
|
-
This is a comprehensive component library for RC SES React applications. All components are built with React 18, TypeScript, and styled with Material-UI (MUI)
|
|
30
|
+
This is a comprehensive component library for RC SES React applications. All components are built with React 18/19, TypeScript, and styled with Material-UI (MUI) v9.
|
|
31
31
|
</p>
|
|
32
32
|
</div>
|
|
33
33
|
|
|
34
|
+
{/* Atomic Design */}
|
|
35
|
+
<div style={{ marginBottom: '24px', padding: '24px', backgroundColor: 'white', borderRadius: '12px', border: `1px solid ${grey['200']}` }}>
|
|
36
|
+
<h2 style={{ marginTop: '0', color: grey['900'], marginBottom: '12px', fontSize: '18px', fontWeight: '600' }}>🧪 Built on Atomic Design</h2>
|
|
37
|
+
<p style={{ color: grey['700'], lineHeight: '1.7', margin: '0 0 16px 0', fontSize: '14px' }}>
|
|
38
|
+
The library follows Brad Frost's <a href='https://atomicdesign.bradfrost.com/chapter-2/' target='_blank' rel='noreferrer' style={{ color: primary['600'], textDecoration: 'none', fontWeight: 500 }}>Atomic Design</a> methodology. Components are organised by structural complexity, so composing UIs feels like snapping together predictable building blocks.
|
|
39
|
+
</p>
|
|
40
|
+
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(5, 1fr)', gap: '12px' }}>
|
|
41
|
+
{[
|
|
42
|
+
{ icon: '🎨', title: 'Foundations', desc: 'Colors, typography, MUI theming' },
|
|
43
|
+
{ icon: '⚛️', title: 'Atoms', desc: 'Buttons, inputs, icons, badges' },
|
|
44
|
+
{ icon: '🧬', title: 'Molecules', desc: 'Form controls, cards, title blocks' },
|
|
45
|
+
{ icon: '🦠', title: 'Organisms', desc: 'Lists, dialogs, headers, forms' },
|
|
46
|
+
{ icon: '📐', title: 'Templates', desc: 'Page skeletons and layouts' },
|
|
47
|
+
].map((tier, idx) => (
|
|
48
|
+
<div key={idx} style={{ padding: '12px', backgroundColor: grey['50'], borderRadius: '8px', textAlign: 'center' }}>
|
|
49
|
+
<div style={{ fontSize: '1.5rem', marginBottom: '6px' }}>{tier.icon}</div>
|
|
50
|
+
<div style={{ fontSize: '13px', fontWeight: 600, color: grey['900'], marginBottom: '4px' }}>{tier.title}</div>
|
|
51
|
+
<div style={{ fontSize: '11px', color: grey['600'], lineHeight: 1.4 }}>{tier.desc}</div>
|
|
52
|
+
</div>
|
|
53
|
+
))}
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
|
|
34
57
|
{/* Features */}
|
|
35
58
|
<div>
|
|
36
59
|
|
|
@@ -79,7 +102,7 @@ import Logo from '@/assets/Logo'
|
|
|
79
102
|
<div style={{ marginTop: '2rem', padding: '1.5rem', backgroundColor: '#f0f8ff', borderRadius: '12px', borderLeft: '4px solid #0969da' }}>
|
|
80
103
|
<h3 style={{ marginTop: '0', color: '#0969da', marginBottom: '0.75rem', fontSize: '1rem', fontWeight: '600' }}>🚀 Getting Started:</h3>
|
|
81
104
|
<p style={{ color: '#555', lineHeight: '1.6', margin: '0', fontSize: '0.95rem' }}>
|
|
82
|
-
Use the sidebar
|
|
105
|
+
Use the sidebar to explore components grouped by their atomic tier — from atoms up to full pages. Each entry ships with documentation, interactive controls, and copy-ready code samples you can drop straight into your project.
|
|
83
106
|
</p>
|
|
84
107
|
</div>
|
|
85
108
|
|
|
@@ -20,7 +20,7 @@ const variants: RcSesBadgeProps['variant'][] = [
|
|
|
20
20
|
const sizes: RcSesBadgeProps['size'][] = ['small', 'regular']
|
|
21
21
|
|
|
22
22
|
const meta: Meta<typeof RcSesBadge> = {
|
|
23
|
-
title: '
|
|
23
|
+
title: 'Atoms/Badge',
|
|
24
24
|
component: RcSesBadge,
|
|
25
25
|
tags: ['autodocs'],
|
|
26
26
|
}
|
|
@@ -4,7 +4,7 @@ import CheckBoldIcon from '@/assets/icons/CheckBoldIcon'
|
|
|
4
4
|
import RcSesIconWithCircularBackground from '@/components/common/IconWithCircularBackground'
|
|
5
5
|
|
|
6
6
|
const meta: Meta<typeof RcSesIconWithCircularBackground> = {
|
|
7
|
-
title: '
|
|
7
|
+
title: 'Atoms/IconWithCircularBackground',
|
|
8
8
|
component: RcSesIconWithCircularBackground,
|
|
9
9
|
tags: ['autodocs'],
|
|
10
10
|
argTypes: {
|
|
@@ -5,7 +5,7 @@ import InfoFillIcon from '@/assets/icons/InfoFillIcon'
|
|
|
5
5
|
import RcSesIconWithSquareBackground from '@/components/common/IconWithSquareBackground'
|
|
6
6
|
|
|
7
7
|
const meta: Meta<typeof RcSesIconWithSquareBackground> = {
|
|
8
|
-
title: '
|
|
8
|
+
title: 'Atoms/IconWithSquareBackground',
|
|
9
9
|
component: RcSesIconWithSquareBackground,
|
|
10
10
|
tags: ['autodocs'],
|
|
11
11
|
argTypes: {
|
|
@@ -3,7 +3,7 @@ import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
|
3
3
|
import RcSesLoader from '@/components/loaders/Loader'
|
|
4
4
|
|
|
5
5
|
const meta = {
|
|
6
|
-
title: '
|
|
6
|
+
title: 'Atoms/Loader',
|
|
7
7
|
component: RcSesLoader,
|
|
8
8
|
tags: ['autodocs'],
|
|
9
9
|
parameters: {
|
|
@@ -17,7 +17,7 @@ const colorOptions: RcSesSpinnerColor[] = [
|
|
|
17
17
|
const sizeOptions = ['small', 'medium', 'large']
|
|
18
18
|
|
|
19
19
|
const meta = {
|
|
20
|
-
title: '
|
|
20
|
+
title: 'Atoms/LoadingSpinner',
|
|
21
21
|
component: RcSesLoadingSpinner,
|
|
22
22
|
parameters: {
|
|
23
23
|
layout: 'centered',
|
|
@@ -7,7 +7,7 @@ import RcSesSearchInput from '@/components/form/inputs/SearchInput'
|
|
|
7
7
|
import SingleStepFormModel from '@/examples/SingleStepForm/types/SingleStepFormModel'
|
|
8
8
|
|
|
9
9
|
const meta: Meta<typeof RcSesSearchInput> = {
|
|
10
|
-
title: '
|
|
10
|
+
title: 'Atoms/SearchInput',
|
|
11
11
|
component: RcSesSearchInput,
|
|
12
12
|
tags: ['autodocs'],
|
|
13
13
|
argTypes: {
|
|
@@ -11,7 +11,7 @@ import PreviewTitle from '@/components/storybook/PreviewTitle'
|
|
|
11
11
|
import SingleStepFormModel from '@/examples/SingleStepForm/types/SingleStepFormModel'
|
|
12
12
|
|
|
13
13
|
const meta: Meta<typeof RcSesSelect> = {
|
|
14
|
-
title: '
|
|
14
|
+
title: 'Atoms/Select',
|
|
15
15
|
component: RcSesSelect,
|
|
16
16
|
argTypes: {
|
|
17
17
|
disabled: {
|
|
@@ -4,7 +4,7 @@ import { useState } from 'react'
|
|
|
4
4
|
import SimpleCheckbox from '@/components/form/inputs/SimpleCheckbox'
|
|
5
5
|
|
|
6
6
|
const meta = {
|
|
7
|
-
title: '
|
|
7
|
+
title: 'Atoms/SimpleCheckbox',
|
|
8
8
|
component: SimpleCheckbox,
|
|
9
9
|
parameters: {
|
|
10
10
|
layout: 'centered',
|
|
@@ -4,7 +4,7 @@ import RcSesTab from '@/components/common/Tabs/Tab'
|
|
|
4
4
|
import RcSesTabs from '@/components/common/Tabs/Tabs'
|
|
5
5
|
|
|
6
6
|
const meta: Meta<typeof RcSesTab> = {
|
|
7
|
-
title: '
|
|
7
|
+
title: 'Atoms/Tab',
|
|
8
8
|
component: RcSesTab,
|
|
9
9
|
tags: ['autodocs'],
|
|
10
10
|
// From MUI 9 a Tab must sit inside a Tabs provider: Tabs supplies the
|
|
@@ -7,7 +7,7 @@ import Fields from '@/components/storybook/Fields'
|
|
|
7
7
|
import PreviewTitle from '@/components/storybook/PreviewTitle'
|
|
8
8
|
|
|
9
9
|
const meta: Meta<typeof RcSesTextField> = {
|
|
10
|
-
title: '
|
|
10
|
+
title: 'Atoms/TextField',
|
|
11
11
|
component: RcSesTextField,
|
|
12
12
|
tags: ['autodocs'],
|
|
13
13
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Button, Typography } from '@mui/material'
|
|
2
2
|
import type { Meta } from '@storybook/react-vite'
|
|
3
3
|
|
|
4
|
-
import RcSesTooltip from '
|
|
4
|
+
import RcSesTooltip from '@/components/common/Tooltip'
|
|
5
5
|
|
|
6
6
|
const meta = {
|
|
7
|
-
title: '
|
|
7
|
+
title: 'Atoms/Tooltip',
|
|
8
8
|
component: RcSesTooltip,
|
|
9
9
|
parameters: {
|
|
10
10
|
layout: 'centered',
|
|
@@ -34,7 +34,7 @@ import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
|
34
34
|
* or silently dead override surfaces as a pixel diff.
|
|
35
35
|
*/
|
|
36
36
|
const meta: Meta = {
|
|
37
|
-
title: '
|
|
37
|
+
title: 'Foundations/Themed MUI Components',
|
|
38
38
|
parameters: {
|
|
39
39
|
docs: {
|
|
40
40
|
description: {
|
|
@@ -20,7 +20,7 @@ const severities: Array<'grey' | 'info' | 'success' | 'warning' | 'error'> = [
|
|
|
20
20
|
]
|
|
21
21
|
|
|
22
22
|
const meta: Meta<typeof RcSesAlert> = {
|
|
23
|
-
title: '
|
|
23
|
+
title: 'Molecules/Alert',
|
|
24
24
|
component: RcSesAlert,
|
|
25
25
|
tags: ['autodocs'],
|
|
26
26
|
argTypes: {
|
|
@@ -3,7 +3,7 @@ import { Meta, StoryObj } from '@storybook/react-vite'
|
|
|
3
3
|
import RcSesButtonWithPopover from '@/components/common/Button/ButtonWithPopover'
|
|
4
4
|
|
|
5
5
|
const meta: Meta<typeof RcSesButtonWithPopover> = {
|
|
6
|
-
title: '
|
|
6
|
+
title: 'Molecules/ButtonWithPopover',
|
|
7
7
|
component: RcSesButtonWithPopover,
|
|
8
8
|
tags: ['autodocs'],
|
|
9
9
|
argTypes: {
|
|
@@ -9,7 +9,7 @@ import RcSesIconWithCircularBackground from '@/components/common/IconWithCircula
|
|
|
9
9
|
import RcSesTitleBlock from '@/components/common/TitleBlock'
|
|
10
10
|
|
|
11
11
|
const meta: Meta<typeof RcSesCardShell> = {
|
|
12
|
-
title: '
|
|
12
|
+
title: 'Molecules/CardShell',
|
|
13
13
|
component: RcSesCardShell,
|
|
14
14
|
tags: ['autodocs'],
|
|
15
15
|
parameters: {
|
|
@@ -261,3 +261,22 @@ export const TabletViewport: Story = {
|
|
|
261
261
|
tags: ['viewport-768', '!autodocs'],
|
|
262
262
|
globals: { viewport: { value: 'tablet768' } },
|
|
263
263
|
}
|
|
264
|
+
|
|
265
|
+
// Pins the CardFooter align='start' + single-action + stretchOnMobile={false}
|
|
266
|
+
// path at 375, so the mobile left-align regression the FooterLink helper
|
|
267
|
+
// depends on stays covered by the visual suite.
|
|
268
|
+
export const LeftAlignedFooterMobileViewport: Story = {
|
|
269
|
+
args: {
|
|
270
|
+
variant: 'card',
|
|
271
|
+
theme: 'default',
|
|
272
|
+
header: <SampleHeader />,
|
|
273
|
+
children: <SampleContent />,
|
|
274
|
+
footer: (
|
|
275
|
+
<RcSesCardFooter align='start' stretchOnMobile={false}>
|
|
276
|
+
<RcSesButton variant='link'>Peržiūrėti DUK</RcSesButton>
|
|
277
|
+
</RcSesCardFooter>
|
|
278
|
+
),
|
|
279
|
+
},
|
|
280
|
+
tags: ['viewport-375', '!autodocs'],
|
|
281
|
+
globals: { viewport: { value: 'mobile375' } },
|
|
282
|
+
}
|
|
@@ -10,7 +10,7 @@ import Fields from '@/components/storybook/Fields'
|
|
|
10
10
|
const variants = ['outlined', 'flat']
|
|
11
11
|
|
|
12
12
|
const meta: Meta<typeof RcSesCheckboxFormControl> = {
|
|
13
|
-
title: '
|
|
13
|
+
title: 'Molecules/CheckboxFormControl',
|
|
14
14
|
component: RcSesCheckboxFormControl,
|
|
15
15
|
argTypes: {
|
|
16
16
|
variant: {
|
|
@@ -10,7 +10,7 @@ import Fields from '@/components/storybook/Fields'
|
|
|
10
10
|
import SingleStepFormModel from '@/examples/SingleStepForm/types/SingleStepFormModel'
|
|
11
11
|
|
|
12
12
|
const meta: Meta<typeof RcSesDatepicker> = {
|
|
13
|
-
title: '
|
|
13
|
+
title: 'Molecules/DatePicker',
|
|
14
14
|
component: RcSesDatepicker,
|
|
15
15
|
argTypes: {
|
|
16
16
|
clearable: {
|
|
@@ -4,7 +4,7 @@ import { Meta, StoryObj } from '@storybook/react-vite'
|
|
|
4
4
|
import RcSesFormControlWrapper from '@/components/form/components/FormControlWrapper'
|
|
5
5
|
|
|
6
6
|
const meta: Meta<typeof RcSesFormControlWrapper> = {
|
|
7
|
-
title: '
|
|
7
|
+
title: 'Molecules/FormControlWrapper',
|
|
8
8
|
component: RcSesFormControlWrapper,
|
|
9
9
|
tags: ['autodocs'],
|
|
10
10
|
argTypes: {
|
|
@@ -7,7 +7,7 @@ import RcSesImageCard from '@/components/common/ImageCard'
|
|
|
7
7
|
import palette from '@/theme/palette'
|
|
8
8
|
|
|
9
9
|
const meta: Meta<typeof RcSesImageCard> = {
|
|
10
|
-
title: '
|
|
10
|
+
title: 'Molecules/ImageCard',
|
|
11
11
|
component: RcSesImageCard,
|
|
12
12
|
tags: ['autodocs'],
|
|
13
13
|
}
|
|
@@ -5,7 +5,7 @@ import { useForm } from 'react-hook-form'
|
|
|
5
5
|
import RcSesPhoneInputFormControl from '@/components/form/inputs/PhoneInputFormControl'
|
|
6
6
|
|
|
7
7
|
const meta: Meta<typeof RcSesPhoneInputFormControl> = {
|
|
8
|
-
title: '
|
|
8
|
+
title: 'Molecules/PhoneInputFormControl',
|
|
9
9
|
component: RcSesPhoneInputFormControl,
|
|
10
10
|
tags: ['autodocs'],
|
|
11
11
|
argTypes: {
|
|
@@ -10,7 +10,7 @@ import RcSesPopover from '@/components/common/Popover'
|
|
|
10
10
|
* These stories render the popover itself, already open against a fixed anchor.
|
|
11
11
|
*/
|
|
12
12
|
const meta: Meta<typeof RcSesPopover> = {
|
|
13
|
-
title: '
|
|
13
|
+
title: 'Molecules/Popover',
|
|
14
14
|
component: RcSesPopover,
|
|
15
15
|
tags: ['autodocs'],
|
|
16
16
|
argTypes: {
|
|
@@ -14,7 +14,7 @@ type FormModel = {
|
|
|
14
14
|
const variants = ['outlined', 'filled', 'flat']
|
|
15
15
|
|
|
16
16
|
const meta: Meta<typeof RcSesRadioButtonGroup> = {
|
|
17
|
-
title: '
|
|
17
|
+
title: 'Molecules/RadioButtonGroup',
|
|
18
18
|
component: RcSesRadioButtonGroup,
|
|
19
19
|
argTypes: {
|
|
20
20
|
variant: {
|
|
@@ -6,7 +6,7 @@ import ObjectIdentifierSearchModal from '@/examples/SingleStepForm/components/Ob
|
|
|
6
6
|
import SingleStepFormModel from '@/examples/SingleStepForm/types/SingleStepFormModel'
|
|
7
7
|
|
|
8
8
|
const meta: Meta<typeof RcSesSearchableField> = {
|
|
9
|
-
title: '
|
|
9
|
+
title: 'Molecules/SearchableField',
|
|
10
10
|
component: RcSesSearchableField,
|
|
11
11
|
tags: ['autodocs'],
|
|
12
12
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { Meta } from '@storybook/react-vite'
|
|
2
2
|
import { useState } from 'react'
|
|
3
3
|
|
|
4
|
-
import RcSesSegmentedControl from '
|
|
4
|
+
import RcSesSegmentedControl from '@/components/common/SegmentedControl'
|
|
5
5
|
|
|
6
6
|
const meta = {
|
|
7
|
-
title: '
|
|
7
|
+
title: 'Molecules/SegmentedControl',
|
|
8
8
|
component: RcSesSegmentedControl,
|
|
9
9
|
parameters: {
|
|
10
10
|
layout: 'centered',
|
|
@@ -20,7 +20,7 @@ const getStateLabel = (state: SnackbarState): string =>
|
|
|
20
20
|
state.charAt(0).toUpperCase() + state.slice(1).replace('-', ' ')
|
|
21
21
|
|
|
22
22
|
const meta: Meta<typeof RcSesSnackbar> = {
|
|
23
|
-
title: '
|
|
23
|
+
title: 'Molecules/Snackbar',
|
|
24
24
|
component: RcSesSnackbar,
|
|
25
25
|
tags: ['autodocs'],
|
|
26
26
|
decorators: [
|
|
@@ -3,7 +3,7 @@ import { Meta, StoryObj } from '@storybook/react-vite'
|
|
|
3
3
|
import RcSesTabPanel from '@/components/common/Tabs/TabPanel'
|
|
4
4
|
|
|
5
5
|
const meta: Meta<typeof RcSesTabPanel> = {
|
|
6
|
-
title: '
|
|
6
|
+
title: 'Molecules/TabPanel',
|
|
7
7
|
component: RcSesTabPanel,
|
|
8
8
|
tags: ['autodocs'],
|
|
9
9
|
}
|
|
@@ -6,7 +6,7 @@ import RcSesTab from '@/components/common/Tabs/Tab'
|
|
|
6
6
|
import RcSesTabs from '@/components/common/Tabs/Tabs'
|
|
7
7
|
|
|
8
8
|
const meta: Meta<typeof RcSesTabs> = {
|
|
9
|
-
title: '
|
|
9
|
+
title: 'Molecules/Tabs',
|
|
10
10
|
component: RcSesTabs,
|
|
11
11
|
tags: ['autodocs'],
|
|
12
12
|
argTypes: {
|
|
@@ -6,7 +6,7 @@ import RcSesTabs from '@/components/common/Tabs/Tabs'
|
|
|
6
6
|
import RcSesTabsWrapper from '@/components/common/Tabs/TabsWrapper'
|
|
7
7
|
|
|
8
8
|
const meta: Meta<typeof RcSesTabsWrapper> = {
|
|
9
|
-
title: '
|
|
9
|
+
title: 'Molecules/TabsWrapper',
|
|
10
10
|
component: RcSesTabsWrapper,
|
|
11
11
|
tags: ['autodocs'],
|
|
12
12
|
argTypes: {
|