@registrucentras/rc-ses-react-components 2.0.0-rc.6 → 2.0.0-rc.8
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/Accordion/hooks/useAccordionController.d.ts +2 -2
- package/dist/components/common/Accordion/types/AccordionControllerState.d.ts +2 -2
- package/dist/components/common/AdvancedList/components/AdvancedListItem/AdvancedListItem.types.d.ts +2 -2
- package/dist/components/common/AdvancedList/components/AdvancedListItem/components/AdvancedListItemLeading.d.ts +2 -2
- package/dist/components/common/AdvancedList/components/AdvancedListItem/components/AdvancedListItemTrailing.d.ts +2 -2
- package/dist/components/common/Badge/index.d.ts +2 -2
- package/dist/components/common/Breadcrumbs/index.d.ts +4 -4
- package/dist/components/common/Card/index.d.ts +2 -2
- package/dist/components/common/CardShell/CardFooter/index.d.ts +1 -1
- package/dist/components/common/CardShell/CardFooter/types.d.ts +4 -9
- package/dist/components/common/CardShell/types.d.ts +4 -4
- package/dist/components/common/IconWithCircularBackground.d.ts +2 -2
- package/dist/components/common/IconWithSquareBackground/index.d.ts +2 -2
- package/dist/components/common/ImageCard/index.d.ts +2 -2
- package/dist/components/common/SelectableCardList/components/SelectableCardListItem.d.ts +2 -2
- package/dist/components/common/SelectableCardList/index.d.ts +2 -2
- package/dist/components/common/ServiceLinks/types.d.ts +6 -6
- package/dist/components/common/SideNav/SideNav.types.d.ts +7 -5
- package/dist/components/common/SideNav/SideNavLayout.d.ts +1 -1
- package/dist/components/common/SideNav/components/SideNavPill.d.ts +2 -2
- package/dist/components/common/SideNav/components/SideNavPillList.d.ts +2 -2
- package/dist/components/common/SideNav/components/SideNavRow.d.ts +4 -3
- package/dist/components/common/SideNav/hooks/useKeepActiveItemInView.d.ts +19 -0
- package/dist/components/common/SideNav/hooks/useSideNavScrollSpy.d.ts +2 -2
- package/dist/components/common/SideNav/index.d.ts +2 -2
- package/dist/components/common/Tabs/TabPanel.d.ts +2 -2
- package/dist/components/common/Tabs/TabsWrapper.d.ts +2 -2
- package/dist/components/common/TitleBlock/types.d.ts +4 -4
- package/dist/components/form/components/FormControlWrapper/components/FieldSuffix.d.ts +2 -2
- package/dist/components/form/components/FormControlWrapper/index.d.ts +2 -2
- package/dist/components/form/inputs/RadioButtonGroup.d.ts +3 -3
- package/dist/components/form/inputs/SearchableField.d.ts +2 -2
- package/dist/components/form/inputs/Select/Select.types.d.ts +2 -2
- package/dist/components/layout/Footer/index.d.ts +2 -2
- package/dist/components/layout/ServiceFormActions.d.ts +2 -2
- package/dist/components/layout/ServiceFormContainer/AccordionFormContainer/components/AccordionCollapseControls.d.ts +2 -2
- package/dist/components/layout/ServiceFormContainer/AccordionFormContainer/index.d.ts +2 -2
- package/dist/components/layout/ServiceHeader.d.ts +2 -2
- package/dist/components/layout/ServicePage.d.ts +2 -2
- package/dist/components/utils/normalizeSx.d.ts +1 -1
- package/dist/library/types.d.ts +2 -2
- package/dist/registrucentras-rc-ses-react-components.cjs +1 -1
- package/dist/registrucentras-rc-ses-react-components.js +1767 -1672
- package/dist/theme/cards.d.ts +4 -0
- package/dist/types/assets/IconProps.d.ts +2 -2
- package/dist/types/cards/CardServiceProps.d.ts +2 -2
- package/dist/types/common/QuickLinkType.d.ts +2 -2
- package/dist/types/inputs/InputIconProps.d.ts +2 -2
- package/dist/types/lists/ListNewsItemType.d.ts +2 -2
- package/dist/types/lists/ListServicesItemType.d.ts +3 -3
- package/package.json +2 -1
- package/src/components/common/Accordion/hooks/useAccordionController.tsx +1 -1
- package/src/components/common/Accordion/index.tsx +1 -4
- package/src/components/common/Accordion/types/AccordionControllerState.ts +1 -1
- package/src/components/common/AdvancedList/components/AdvancedListItem/AdvancedListItem.types.ts +1 -1
- package/src/components/common/AdvancedList/components/AdvancedListItem/components/AdvancedListItemLeading.tsx +1 -1
- package/src/components/common/AdvancedList/components/AdvancedListItem/components/AdvancedListItemTrailing.tsx +1 -1
- package/src/components/common/AdvancedList/components/AdvancedListItem/index.test.tsx +2 -2
- package/src/components/common/Badge/index.tsx +3 -3
- package/src/components/common/Breadcrumbs/index.tsx +5 -2
- package/src/components/common/Card/index.tsx +1 -1
- package/src/components/common/CardShell/CardFooter/index.tsx +5 -3
- package/src/components/common/CardShell/CardFooter/types.ts +2 -7
- package/src/components/common/CardShell/index.tsx +31 -7
- package/src/components/common/CardShell/types.ts +2 -2
- package/src/components/common/IconWithCircularBackground.tsx +7 -8
- package/src/components/common/IconWithSquareBackground/index.tsx +7 -8
- package/src/components/common/ImageCard/index.tsx +1 -1
- package/src/components/common/SegmentedControl/components/SegmentButton/index.tsx +18 -19
- package/src/components/common/SelectableCardList/components/SelectableCardListItem.tsx +1 -1
- package/src/components/common/SelectableCardList/index.tsx +1 -1
- package/src/components/common/ServiceLinks/types.ts +3 -3
- package/src/components/common/SideNav/SideNav.types.ts +11 -3
- package/src/components/common/SideNav/SideNavLayout.tsx +3 -0
- package/src/components/common/SideNav/components/SideNavPill.tsx +1 -1
- package/src/components/common/SideNav/components/SideNavPillList.tsx +8 -23
- package/src/components/common/SideNav/components/SideNavRow.tsx +6 -2
- package/src/components/common/SideNav/hooks/useKeepActiveItemInView.test.ts +258 -0
- package/src/components/common/SideNav/hooks/useKeepActiveItemInView.ts +80 -0
- package/src/components/common/SideNav/hooks/useSideNavScrollSpy.test.ts +9 -2
- package/src/components/common/SideNav/hooks/useSideNavScrollSpy.ts +4 -3
- package/src/components/common/SideNav/index.test.tsx +51 -0
- package/src/components/common/SideNav/index.tsx +47 -12
- package/src/components/common/Snackbar/index.test.tsx +40 -0
- package/src/components/common/Snackbar/index.tsx +9 -3
- package/src/components/common/Tabs/TabPanel.tsx +1 -1
- package/src/components/common/Tabs/TabsWrapper.tsx +1 -1
- package/src/components/common/TitleBlock/index.test.tsx +9 -7
- package/src/components/common/TitleBlock/index.tsx +34 -11
- package/src/components/common/TitleBlock/types.ts +2 -2
- package/src/components/form/components/FormControlWrapper/components/FieldSuffix.tsx +1 -1
- package/src/components/form/components/FormControlWrapper/index.tsx +1 -1
- package/src/components/form/inputs/Datepicker/index.test.tsx +1 -1
- package/src/components/form/inputs/FileDropzone.tsx +1 -4
- package/src/components/form/inputs/NumberStepper.test.tsx +83 -0
- package/src/components/form/inputs/NumberStepper.tsx +7 -8
- package/src/components/form/inputs/RadioButtonGroup.test.tsx +1 -1
- package/src/components/form/inputs/RadioButtonGroup.tsx +2 -2
- package/src/components/form/inputs/SearchInput/index.tsx +1 -1
- package/src/components/form/inputs/SearchableField.test.tsx +2 -2
- package/src/components/form/inputs/SearchableField.tsx +1 -1
- package/src/components/form/inputs/Select/Select.types.ts +1 -1
- package/src/components/form/inputs/Select/index.test.tsx +3 -3
- package/src/components/layout/Footer/index.tsx +1 -1
- package/src/components/layout/ServiceFormActions.tsx +1 -1
- package/src/components/layout/ServiceFormContainer/AccordionFormContainer/components/AccordionCollapseControls.tsx +1 -1
- package/src/components/layout/ServiceFormContainer/AccordionFormContainer/index.tsx +1 -1
- package/src/components/layout/ServiceHeader.tsx +1 -1
- package/src/components/layout/ServicePage.tsx +1 -1
- package/src/components/utils/normalizeSx.ts +2 -4
- package/src/examples/ListWithPagination/index.tsx +0 -2
- package/src/examples/MultipleStepForm/components/AdditionalServicesForm.tsx +1 -1
- package/src/examples/MultipleStepForm/components/ServiceIssuanceForm.tsx +1 -1
- package/src/examples/MultipleStepForm/components/TermsAndConditionsForm.tsx +1 -1
- package/src/examples/MultipleStepForm/types/MultiStepFormModel.ts +1 -1
- package/src/examples/SingleStepForm/components/ObjectIdentifierSearchModal.tsx +2 -2
- package/src/examples/SingleStepForm/types/SingleStepFormModel.ts +1 -1
- package/src/library/types.ts +2 -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 +10 -15
- package/src/stories/{components/inputs → atoms}/Checkbox.stories.tsx +2 -2
- 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 +2 -2
- 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 +2 -2
- package/src/stories/{components/inputs → atoms}/PhoneInput.stories.tsx +2 -2
- package/src/stories/{components/inputs → atoms}/SearchInput.stories.tsx +1 -1
- package/src/stories/{components/inputs → atoms}/Select.stories.tsx +8 -10
- package/src/stories/{components/form → atoms}/SimpleCheckbox.stories.tsx +1 -1
- package/src/stories/{components/inputs → atoms}/Switch.stories.tsx +2 -2
- 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 +3 -3
- 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 +14 -22
- 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 +2 -2
- 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 +3 -3
- 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 +65 -3
- package/src/stories/{components/navigation → organisms}/Accordion.stories.tsx +1 -1
- package/src/stories/{components/display → organisms}/AdvancedList.stories.tsx +5 -5
- 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 +2 -2
- package/src/stories/{components/inputs → organisms}/FileUpload.stories.tsx +2 -2
- 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 +37 -4
- package/src/stories/{components/layout → templates}/ServicePage.stories.tsx +1 -1
- package/src/stubs/Component.tsx +4 -4
- package/src/theme/cards.ts +2 -0
- package/src/types/assets/IconProps.tsx +1 -1
- package/src/types/cards/CardServiceProps.tsx +1 -1
- package/src/types/common/QuickLinkType.tsx +1 -1
- package/src/types/inputs/InputIconProps.tsx +1 -1
- package/src/types/lists/ListNewsItemType.tsx +1 -1
- package/src/types/lists/ListServicesItemType.tsx +2 -2
- package/src/vite-env.d.ts +2 -2
- package/dist/stories/assets/Logo.stories.d.ts +0 -12
- package/dist/stories/components/actions/Button.stories.d.ts +0 -107
- package/dist/stories/components/actions/ButtonWithPopover.stories.d.ts +0 -7
- package/dist/stories/components/display/AdvancedList.stories.d.ts +0 -33
- package/dist/stories/components/display/AdvancedListItem.stories.d.ts +0 -33
- package/dist/stories/components/display/Badge.stories.d.ts +0 -9
- package/dist/stories/components/display/Card.stories.d.ts +0 -8
- package/dist/stories/components/display/CardShell.stories.d.ts +0 -17
- package/dist/stories/components/display/ImageCard.stories.d.ts +0 -8
- package/dist/stories/components/display/ListWithIcons.stories.d.ts +0 -34
- package/dist/stories/components/display/SegmentedControl.stories.d.ts +0 -202
- package/dist/stories/components/display/SelectableCardList.stories.d.ts +0 -37
- package/dist/stories/components/display/ServiceLinks.stories.d.ts +0 -28
- package/dist/stories/components/display/TitleBlock.stories.d.ts +0 -21
- package/dist/stories/components/display/Tooltip.stories.d.ts +0 -48
- package/dist/stories/components/feedback/Alert.stories.d.ts +0 -14
- package/dist/stories/components/feedback/Snackbar.stories.d.ts +0 -143
- package/dist/stories/components/form/CardFormContainer.stories.d.ts +0 -7
- package/dist/stories/components/form/CheckboxFormControl.stories.d.ts +0 -9
- package/dist/stories/components/form/FormControlWrapper.stories.d.ts +0 -7
- package/dist/stories/components/form/ServiceFormActions.stories.d.ts +0 -6
- package/dist/stories/components/form/ServiceFormContainer.stories.d.ts +0 -15
- package/dist/stories/components/form/SimpleCheckbox.stories.d.ts +0 -19
- package/dist/stories/components/icons/IconWithCircularBackground.stories.d.ts +0 -6
- package/dist/stories/components/icons/IconWithSquareBackground.stories.d.ts +0 -7
- package/dist/stories/components/icons/Icons.stories.d.ts +0 -7
- package/dist/stories/components/inputs/Checkbox.stories.d.ts +0 -21
- package/dist/stories/components/inputs/DatePicker.stories.d.ts +0 -152
- package/dist/stories/components/inputs/FileDropzone.stories.d.ts +0 -6
- package/dist/stories/components/inputs/FileUpload.stories.d.ts +0 -18
- package/dist/stories/components/inputs/NumberStepper.stories.d.ts +0 -6
- package/dist/stories/components/inputs/PhoneInput.stories.d.ts +0 -10
- package/dist/stories/components/inputs/PhoneInputFormControl.stories.d.ts +0 -6
- package/dist/stories/components/inputs/RadioButtonGroup.stories.d.ts +0 -6
- package/dist/stories/components/inputs/SearchInput.stories.d.ts +0 -11
- package/dist/stories/components/inputs/SearchableField.stories.d.ts +0 -6
- package/dist/stories/components/inputs/Select.stories.d.ts +0 -7
- package/dist/stories/components/inputs/Switch.stories.d.ts +0 -17
- package/dist/stories/components/inputs/TextField.stories.d.ts +0 -6
- package/dist/stories/components/layout/Footer.stories.d.ts +0 -6
- package/dist/stories/components/layout/ServiceHeader.stories.d.ts +0 -7
- package/dist/stories/components/layout/ServicePage.stories.d.ts +0 -6
- package/dist/stories/components/loaders/FullPageLoader.stories.d.ts +0 -37
- package/dist/stories/components/loaders/Loader.stories.d.ts +0 -36
- package/dist/stories/components/loaders/LoadingSpinner.stories.d.ts +0 -62
- package/dist/stories/components/navigation/Accordion.stories.d.ts +0 -18
- package/dist/stories/components/navigation/Breadcrumbs.stories.d.ts +0 -6
- package/dist/stories/components/navigation/DataPagination.stories.d.ts +0 -47
- package/dist/stories/components/navigation/ServiceWizardStepper.stories.d.ts +0 -7
- package/dist/stories/components/navigation/SideNav.stories.d.ts +0 -7
- package/dist/stories/components/overlays/Dialog.stories.d.ts +0 -15
- package/dist/stories/components/overlays/Modal.stories.d.ts +0 -10
- package/dist/stories/components/overlays/Popover.stories.d.ts +0 -12
- package/dist/stories/components/tabs/Tab.stories.d.ts +0 -8
- package/dist/stories/components/tabs/TabPanel.stories.d.ts +0 -7
- package/dist/stories/components/tabs/Tabs.stories.d.ts +0 -7
- package/dist/stories/components/tabs/TabsWrapper.stories.d.ts +0 -6
- package/dist/stories/theme/ThemedMuiComponents.stories.d.ts +0 -25
- package/src/stories/components/display/Card.test.tsx +0 -19
- /package/src/stories/{components/actions → atoms}/Button.test.ts +0 -0
- /package/src/stories/{Colors.mdx → foundations/Colors.mdx} +0 -0
package/dist/theme/cards.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ declare const card: {
|
|
|
12
12
|
xs: string;
|
|
13
13
|
md: string;
|
|
14
14
|
};
|
|
15
|
+
footerGap: string;
|
|
15
16
|
padding: {
|
|
16
17
|
xs: string;
|
|
17
18
|
md: string;
|
|
@@ -23,6 +24,7 @@ declare const subcard: {
|
|
|
23
24
|
xs: string;
|
|
24
25
|
md: string;
|
|
25
26
|
};
|
|
27
|
+
footerGap: string;
|
|
26
28
|
padding: {
|
|
27
29
|
xs: string;
|
|
28
30
|
md: string;
|
|
@@ -69,6 +71,7 @@ declare const _default: {
|
|
|
69
71
|
xs: string;
|
|
70
72
|
md: string;
|
|
71
73
|
};
|
|
74
|
+
footerGap: string;
|
|
72
75
|
padding: {
|
|
73
76
|
xs: string;
|
|
74
77
|
md: string;
|
|
@@ -91,6 +94,7 @@ declare const _default: {
|
|
|
91
94
|
xs: string;
|
|
92
95
|
md: string;
|
|
93
96
|
};
|
|
97
|
+
footerGap: string;
|
|
94
98
|
padding: {
|
|
95
99
|
xs: string;
|
|
96
100
|
md: string;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ColorType } from '../common/ColorType';
|
|
2
|
-
|
|
2
|
+
interface IconProps {
|
|
3
3
|
className?: string;
|
|
4
4
|
width?: number;
|
|
5
5
|
height?: number;
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
color?: ColorType | string;
|
|
8
|
-
}
|
|
8
|
+
}
|
|
9
9
|
export declare const IconDefaultProps: {
|
|
10
10
|
className: undefined;
|
|
11
11
|
disabled: boolean;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@registrucentras/rc-ses-react-components",
|
|
3
3
|
"author": "VĮ REGISTRŲ CENTRAS",
|
|
4
|
-
"version": "2.0.0-rc.
|
|
4
|
+
"version": "2.0.0-rc.8",
|
|
5
5
|
"description": "RC SES React komponentų biblioteka",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"private": false,
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"preview": "vite preview",
|
|
31
31
|
"lint": "eslint .",
|
|
32
32
|
"lint:fix": "eslint --fix .",
|
|
33
|
+
"typecheck": "tsc -p ./tsconfig.json --noEmit",
|
|
33
34
|
"storybook": "storybook dev -p 6006",
|
|
34
35
|
"storybook-test": "test-storybook",
|
|
35
36
|
"storybook-build": "storybook build",
|
|
@@ -19,10 +19,7 @@ function RcSesAccordion(props: Props) {
|
|
|
19
19
|
? state[id]
|
|
20
20
|
: { canToggle: true, disabled: false, expanded: false, title: '' }
|
|
21
21
|
|
|
22
|
-
const handleOnChange = (
|
|
23
|
-
event: React.SyntheticEvent<Element, Event>,
|
|
24
|
-
isExpanded: boolean,
|
|
25
|
-
) => {
|
|
22
|
+
const handleOnChange = (event: React.SyntheticEvent, isExpanded: boolean) => {
|
|
26
23
|
if (canToggle === false) return
|
|
27
24
|
|
|
28
25
|
toggleAccordion(id, isExpanded)
|
package/src/components/common/AdvancedList/components/AdvancedListItem/AdvancedListItem.types.ts
CHANGED
|
@@ -6,7 +6,7 @@ export type AdvancedListItemState = 'rest' | 'selected' | 'disabled' | 'error'
|
|
|
6
6
|
|
|
7
7
|
export type AdvancedListItemStatusColor = 'grey' | 'warning' | 'success' | 'error'
|
|
8
8
|
|
|
9
|
-
export
|
|
9
|
+
export interface AdvancedListItemAction {
|
|
10
10
|
label: string
|
|
11
11
|
icon?: ComponentType<{ fillColor?: string; size?: number }>
|
|
12
12
|
onClick: () => void
|
|
@@ -10,7 +10,7 @@ import palette from '@/theme/palette'
|
|
|
10
10
|
|
|
11
11
|
import { AdvancedListItemLeading as AdvancedListItemLeadingData } from '../AdvancedListItem.types'
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
interface Props {
|
|
14
14
|
leading: AdvancedListItemLeadingData
|
|
15
15
|
disabled?: boolean
|
|
16
16
|
inputRef?: RefObject<HTMLInputElement>
|
|
@@ -496,7 +496,7 @@ describe('AdvancedListItem', () => {
|
|
|
496
496
|
|
|
497
497
|
renderItem(<Wrapper />)
|
|
498
498
|
|
|
499
|
-
const input = screen.getByLabelText('Company name')
|
|
499
|
+
const input = screen.getByLabelText('Company name')
|
|
500
500
|
fireEvent.change(input, { target: { value: 'UAB Įmonė' } })
|
|
501
501
|
expect(input).toHaveValue('UAB Įmonė')
|
|
502
502
|
|
|
@@ -571,7 +571,7 @@ describe('AdvancedListItem', () => {
|
|
|
571
571
|
/>,
|
|
572
572
|
)
|
|
573
573
|
|
|
574
|
-
const field = screen.getByLabelText('Field')
|
|
574
|
+
const field = screen.getByLabelText('Field')
|
|
575
575
|
const contentContainer = field.closest('[id]') as HTMLElement
|
|
576
576
|
|
|
577
577
|
// jsdom doesn't implement the `.inert` IDL property (it's always undefined there even
|
|
@@ -5,7 +5,7 @@ import CircleFilledIcon from '@/assets/icons/CircleFilledIcon'
|
|
|
5
5
|
import CloseIcon from '@/assets/icons/CloseIcon'
|
|
6
6
|
import { common, error, grey, primary, secondary, warning } from '@/theme/palette'
|
|
7
7
|
|
|
8
|
-
export
|
|
8
|
+
export interface RcSesBadgeProps {
|
|
9
9
|
label: string
|
|
10
10
|
variant: 'neutral' | 'success' | 'warning' | 'error' | 'info' | 'brand'
|
|
11
11
|
size: 'small' | 'regular'
|
|
@@ -14,7 +14,7 @@ export type RcSesBadgeProps = {
|
|
|
14
14
|
onClose?: () => void
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
interface VariantStyle {
|
|
18
18
|
border: string
|
|
19
19
|
background: string
|
|
20
20
|
iconColor: string
|
|
@@ -60,7 +60,7 @@ const variantStyles: Record<RcSesBadgeProps['variant'], VariantStyle> = {
|
|
|
60
60
|
},
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
interface SizeStyle {
|
|
64
64
|
height: string
|
|
65
65
|
padding: string
|
|
66
66
|
fontSize: string
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { Link, Breadcrumbs as MuiBreadcrumbs, SxProps, Theme } from '@mui/material'
|
|
2
2
|
|
|
3
|
-
export
|
|
3
|
+
export interface BreadcrumbItem {
|
|
4
|
+
label: string
|
|
5
|
+
path: string
|
|
6
|
+
}
|
|
4
7
|
|
|
5
|
-
|
|
8
|
+
interface Props {
|
|
6
9
|
path: BreadcrumbItem[]
|
|
7
10
|
sx?: SxProps<Theme>
|
|
8
11
|
}
|
|
@@ -13,7 +13,7 @@ import { ReactNode } from 'react'
|
|
|
13
13
|
import normalizeSx from '@/components/utils/normalizeSx'
|
|
14
14
|
import palette from '@/theme/palette'
|
|
15
15
|
|
|
16
|
-
export
|
|
16
|
+
export interface RcSesCardTestIds {
|
|
17
17
|
root?: string
|
|
18
18
|
image?: string
|
|
19
19
|
header?: string
|
|
@@ -13,7 +13,6 @@ const justifyContent: Record<CardFooterAlign, string> = {
|
|
|
13
13
|
function RcSesCardFooter({
|
|
14
14
|
children,
|
|
15
15
|
align = 'between',
|
|
16
|
-
stretchOnMobile = true,
|
|
17
16
|
className,
|
|
18
17
|
testIds,
|
|
19
18
|
}: RcSesCardFooterProps) {
|
|
@@ -21,13 +20,16 @@ function RcSesCardFooter({
|
|
|
21
20
|
<Stack
|
|
22
21
|
className={className}
|
|
23
22
|
data-testid={testIds?.root}
|
|
24
|
-
direction=
|
|
23
|
+
direction='row'
|
|
25
24
|
spacing={cards.footer.gap}
|
|
25
|
+
// Flex gap instead of sibling margin, so wrapped lines pick up the
|
|
26
|
+
// vertical gap and the first child of each row has no stray left margin.
|
|
27
|
+
useFlexGap
|
|
26
28
|
sx={{
|
|
27
29
|
alignItems: 'center',
|
|
28
30
|
justifyContent: justifyContent[align],
|
|
29
31
|
width: '100%',
|
|
30
|
-
|
|
32
|
+
flexWrap: 'wrap',
|
|
31
33
|
}}
|
|
32
34
|
>
|
|
33
35
|
{children}
|
|
@@ -2,11 +2,11 @@ import { ReactNode } from 'react'
|
|
|
2
2
|
|
|
3
3
|
export type CardFooterAlign = 'start' | 'between' | 'end'
|
|
4
4
|
|
|
5
|
-
export
|
|
5
|
+
export interface RcSesCardFooterTestIds {
|
|
6
6
|
root?: string
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
export
|
|
9
|
+
export interface RcSesCardFooterProps {
|
|
10
10
|
children?: ReactNode
|
|
11
11
|
/**
|
|
12
12
|
* Horizontal distribution of the row. `between` pushes the first and last
|
|
@@ -14,11 +14,6 @@ export type RcSesCardFooterProps = {
|
|
|
14
14
|
* primary action; `start` is a lone link such as "Žiūrėti visas".
|
|
15
15
|
*/
|
|
16
16
|
align?: CardFooterAlign
|
|
17
|
-
/**
|
|
18
|
-
* Whether direct children stretch to the full width once the row stacks.
|
|
19
|
-
* Right for buttons, wrong for a text link, which is why it is a prop.
|
|
20
|
-
*/
|
|
21
|
-
stretchOnMobile?: boolean
|
|
22
17
|
className?: string
|
|
23
18
|
testIds?: RcSesCardFooterTestIds
|
|
24
19
|
}
|
|
@@ -24,6 +24,12 @@ function RcSesCardShell({
|
|
|
24
24
|
sx,
|
|
25
25
|
...boxProps
|
|
26
26
|
}: ShellProps) {
|
|
27
|
+
const hasHeader = hasSlot(header)
|
|
28
|
+
const hasContent = hasSlot(children)
|
|
29
|
+
const hasFooter = hasSlot(footer)
|
|
30
|
+
|
|
31
|
+
const footerMt = hasHeader || hasContent ? cards[variant].footerGap : 0
|
|
32
|
+
|
|
27
33
|
return (
|
|
28
34
|
<Box
|
|
29
35
|
{...boxProps}
|
|
@@ -42,31 +48,49 @@ function RcSesCardShell({
|
|
|
42
48
|
? 'none'
|
|
43
49
|
: `${cards.borderWidth} solid ${cards.themes[theme].borderColor}`,
|
|
44
50
|
borderRadius: cards[variant].borderRadius,
|
|
45
|
-
gap: cards[variant].gap,
|
|
46
51
|
p: cards[variant].padding,
|
|
47
52
|
},
|
|
48
53
|
...(Array.isArray(sx) ? sx : [sx]),
|
|
49
54
|
]}
|
|
50
55
|
>
|
|
51
|
-
{
|
|
52
|
-
<Box
|
|
56
|
+
{hasHeader ? (
|
|
57
|
+
<Box
|
|
58
|
+
data-testid={testIds?.header}
|
|
59
|
+
sx={{
|
|
60
|
+
// When fullHeight has no content slot to grow, let the header take
|
|
61
|
+
// the free space so the footer's `mt: 'auto'` has room to expand
|
|
62
|
+
// above the footerGap minimum.
|
|
63
|
+
flexGrow: fullHeight && !hasContent ? 1 : 0,
|
|
64
|
+
minWidth: 0,
|
|
65
|
+
width: '100%',
|
|
66
|
+
}}
|
|
67
|
+
>
|
|
53
68
|
{header}
|
|
54
69
|
</Box>
|
|
55
70
|
) : null}
|
|
56
71
|
|
|
57
|
-
{
|
|
72
|
+
{hasContent ? (
|
|
58
73
|
<Box
|
|
59
74
|
data-testid={testIds?.content}
|
|
60
|
-
sx={{
|
|
75
|
+
sx={{
|
|
76
|
+
flexGrow: fullHeight ? 1 : 0,
|
|
77
|
+
minWidth: 0,
|
|
78
|
+
mt: hasHeader ? cards[variant].gap : 0,
|
|
79
|
+
width: '100%',
|
|
80
|
+
}}
|
|
61
81
|
>
|
|
62
82
|
{children}
|
|
63
83
|
</Box>
|
|
64
84
|
) : null}
|
|
65
85
|
|
|
66
|
-
{
|
|
86
|
+
{hasFooter ? (
|
|
67
87
|
<Box
|
|
68
88
|
data-testid={testIds?.footer}
|
|
69
|
-
sx={{
|
|
89
|
+
sx={{
|
|
90
|
+
minWidth: 0,
|
|
91
|
+
mt: footerMt,
|
|
92
|
+
width: '100%',
|
|
93
|
+
}}
|
|
70
94
|
>
|
|
71
95
|
{footer}
|
|
72
96
|
</Box>
|
|
@@ -4,14 +4,14 @@ export type CardShellVariant = 'card' | 'subcard'
|
|
|
4
4
|
|
|
5
5
|
export type CardShellTheme = 'default' | 'brand' | 'sunken'
|
|
6
6
|
|
|
7
|
-
export
|
|
7
|
+
export interface RcSesCardShellTestIds {
|
|
8
8
|
root?: string
|
|
9
9
|
header?: string
|
|
10
10
|
content?: string
|
|
11
11
|
footer?: string
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
export
|
|
14
|
+
export interface RcSesCardShellProps {
|
|
15
15
|
variant?: CardShellVariant
|
|
16
16
|
theme?: CardShellTheme
|
|
17
17
|
fullHeight?: boolean
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Box
|
|
1
|
+
import { Box } from '@mui/material'
|
|
2
2
|
import React, { memo, useMemo } from 'react'
|
|
3
3
|
|
|
4
4
|
import IconProps from '@/assets/IconProps'
|
|
@@ -7,7 +7,7 @@ import palette from '@/theme/palette'
|
|
|
7
7
|
|
|
8
8
|
type Shade = keyof (typeof palette)[keyof typeof palette]
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
interface Props {
|
|
11
11
|
bgShade?: Shade | 'white'
|
|
12
12
|
color?: keyof typeof palette
|
|
13
13
|
Icon: React.JSXElementConstructor<IconProps>
|
|
@@ -40,11 +40,6 @@ function IconWithCircularBackground(props: Props) {
|
|
|
40
40
|
}
|
|
41
41
|
}, [size])
|
|
42
42
|
|
|
43
|
-
const StyledIcon = styled(Icon)({
|
|
44
|
-
height: sizes[1],
|
|
45
|
-
width: sizes[1],
|
|
46
|
-
})
|
|
47
|
-
|
|
48
43
|
return (
|
|
49
44
|
<Box
|
|
50
45
|
className='IconWithCircularBackground-root'
|
|
@@ -58,6 +53,10 @@ function IconWithCircularBackground(props: Props) {
|
|
|
58
53
|
width: sizes[0],
|
|
59
54
|
aspectRatio: '1 / 1',
|
|
60
55
|
|
|
56
|
+
svg: {
|
|
57
|
+
height: sizes[1],
|
|
58
|
+
width: sizes[1],
|
|
59
|
+
},
|
|
61
60
|
'svg path': {
|
|
62
61
|
fill: resolvePaletteColorPath(
|
|
63
62
|
iconShade === 'white' ? 'white' : `${color}.${iconShade}`,
|
|
@@ -65,7 +64,7 @@ function IconWithCircularBackground(props: Props) {
|
|
|
65
64
|
},
|
|
66
65
|
}}
|
|
67
66
|
>
|
|
68
|
-
<
|
|
67
|
+
<Icon />
|
|
69
68
|
</Box>
|
|
70
69
|
)
|
|
71
70
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Box
|
|
1
|
+
import { Box } from '@mui/material'
|
|
2
2
|
import React, { memo, useMemo } from 'react'
|
|
3
3
|
|
|
4
4
|
import IconProps from '@/assets/IconProps'
|
|
@@ -9,7 +9,7 @@ import palette from '@/theme/palette'
|
|
|
9
9
|
type SquareTileSize = 40 | 44
|
|
10
10
|
type SquareTileVariant = 'solid' | 'soft' | 'muted'
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
interface Props {
|
|
13
13
|
Icon: React.JSXElementConstructor<IconProps>
|
|
14
14
|
size?: SquareTileSize
|
|
15
15
|
variant?: SquareTileVariant
|
|
@@ -52,11 +52,6 @@ function IconWithSquareBackground(props: Props) {
|
|
|
52
52
|
}
|
|
53
53
|
}, [variant])
|
|
54
54
|
|
|
55
|
-
const StyledIcon = styled(Icon)({
|
|
56
|
-
height: iconSize,
|
|
57
|
-
width: iconSize,
|
|
58
|
-
})
|
|
59
|
-
|
|
60
55
|
return (
|
|
61
56
|
<Box
|
|
62
57
|
className='IconWithSquareBackground-root'
|
|
@@ -70,12 +65,16 @@ function IconWithSquareBackground(props: Props) {
|
|
|
70
65
|
width: boxSize,
|
|
71
66
|
aspectRatio: '1 / 1',
|
|
72
67
|
|
|
68
|
+
svg: {
|
|
69
|
+
height: iconSize,
|
|
70
|
+
width: iconSize,
|
|
71
|
+
},
|
|
73
72
|
'svg path': {
|
|
74
73
|
fill: resolvePaletteColorPath(iconColorPath),
|
|
75
74
|
},
|
|
76
75
|
}}
|
|
77
76
|
>
|
|
78
|
-
<
|
|
77
|
+
<Icon />
|
|
79
78
|
</Box>
|
|
80
79
|
)
|
|
81
80
|
}
|
|
@@ -55,27 +55,26 @@ const RcSesSegmentButton = React.forwardRef<HTMLButtonElement, RcSesSegmentButto
|
|
|
55
55
|
}, [isDisabled, isSelected])
|
|
56
56
|
|
|
57
57
|
const buttonStyles = useMemo(
|
|
58
|
-
() =>
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
border: `2px solid ${isFocused && !isDisabled ? primary['500'] : 'transparent'}`,
|
|
58
|
+
() => ({
|
|
59
|
+
flex: '0 1 auto',
|
|
60
|
+
minWidth: '0',
|
|
61
|
+
height: 'auto',
|
|
62
|
+
wordBreak: 'break-word',
|
|
63
|
+
fontFamily: '"Public Sans", sans-serif !important',
|
|
64
|
+
border: `2px solid ${isFocused && !isDisabled ? primary['500'] : 'transparent'}`,
|
|
66
65
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
66
|
+
backgroundColor: isSelected
|
|
67
|
+
? `${primary['50']} !important`
|
|
68
|
+
: 'transparent !important',
|
|
70
69
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
70
|
+
color: textColor,
|
|
71
|
+
cursor: isDisabled ? 'not-allowed' : 'pointer',
|
|
72
|
+
fontWeight: 500,
|
|
73
|
+
borderRadius: '8px',
|
|
74
|
+
transition: 'all 150ms ease-in-out',
|
|
75
|
+
whiteSpace: 'normal',
|
|
76
|
+
...sizeStyles,
|
|
77
|
+
}),
|
|
79
78
|
[sizeStyles, isDisabled, isSelected, isFocused, textColor],
|
|
80
79
|
)
|
|
81
80
|
|
|
@@ -5,7 +5,7 @@ import DataPagination from '../DataPagination'
|
|
|
5
5
|
import { ListWithIconsItemData } from '../ListWithIcons/ListWithIcons.types'
|
|
6
6
|
import SelectableCardListItem from './components/SelectableCardListItem'
|
|
7
7
|
|
|
8
|
-
export
|
|
8
|
+
export interface SelectableCardListItemData {
|
|
9
9
|
id: string
|
|
10
10
|
title: string
|
|
11
11
|
subtitle?: string
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ElementType, ReactNode } from 'react'
|
|
2
2
|
|
|
3
|
-
export
|
|
3
|
+
export interface RcSesServiceLinksTestIds {
|
|
4
4
|
root?: string
|
|
5
5
|
item?: string
|
|
6
6
|
itemLabel?: string
|
|
7
7
|
itemIcon?: string
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
export
|
|
10
|
+
export interface RcSesServiceLinkItem {
|
|
11
11
|
label: ReactNode
|
|
12
12
|
href?: string
|
|
13
13
|
target?: string
|
|
@@ -20,7 +20,7 @@ export type RcSesServiceLinkItem = {
|
|
|
20
20
|
key?: string
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
export
|
|
23
|
+
export interface RcSesServiceLinksProps {
|
|
24
24
|
items: RcSesServiceLinkItem[]
|
|
25
25
|
dividers?: boolean
|
|
26
26
|
isLoading?: boolean
|
|
@@ -1,24 +1,32 @@
|
|
|
1
1
|
import { SxProps, Theme } from '@mui/material'
|
|
2
2
|
import { ReactNode } from 'react'
|
|
3
3
|
|
|
4
|
-
export
|
|
4
|
+
export interface RcSesSideNavItem {
|
|
5
5
|
id: string
|
|
6
6
|
label: string
|
|
7
7
|
count?: number
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
// 'fit' - the nav hugs its items, however tall the list gets.
|
|
11
|
+
// 'scroll' - the desktop list is capped to the viewport and scrolls inside itself,
|
|
12
|
+
// keeping the active item reachable when there are more topics than fit.
|
|
13
|
+
export type RcSesSideNavOverflow = 'fit' | 'scroll'
|
|
14
|
+
|
|
15
|
+
export interface RcSesSideNavProps {
|
|
11
16
|
// In document order - scroll-spy compares section positions in list order.
|
|
12
17
|
items: RcSesSideNavItem[]
|
|
13
18
|
activeItemId?: string
|
|
14
19
|
onItemClick?: (id: string) => void
|
|
15
20
|
title?: string
|
|
21
|
+
overflow?: RcSesSideNavOverflow
|
|
22
|
+
// Height of the sticky page header the nav sits below. Decides both where the
|
|
23
|
+
// nav sticks and, with overflow='scroll', how tall it may grow.
|
|
24
|
+
offset?: number
|
|
16
25
|
sx?: SxProps<Theme>
|
|
17
26
|
}
|
|
18
27
|
|
|
19
28
|
export type RcSesSideNavLayoutProps = Omit<RcSesSideNavProps, 'sx'> & {
|
|
20
29
|
children: ReactNode
|
|
21
30
|
sidebarWidth?: string
|
|
22
|
-
offset?: number
|
|
23
31
|
sx?: SxProps<Theme>
|
|
24
32
|
}
|
|
@@ -13,6 +13,7 @@ function RcSesSideNavLayout({
|
|
|
13
13
|
activeItemId: controlledActiveItemId,
|
|
14
14
|
onItemClick,
|
|
15
15
|
title,
|
|
16
|
+
overflow,
|
|
16
17
|
offset,
|
|
17
18
|
sidebarWidth = '17rem',
|
|
18
19
|
sx,
|
|
@@ -48,6 +49,8 @@ function RcSesSideNavLayout({
|
|
|
48
49
|
activeItemId={activeItemId}
|
|
49
50
|
onItemClick={handleItemClick}
|
|
50
51
|
title={title}
|
|
52
|
+
overflow={overflow}
|
|
53
|
+
offset={offset}
|
|
51
54
|
sx={{
|
|
52
55
|
position: 'sticky',
|
|
53
56
|
top: `${offset ?? 0}px`,
|