@registrucentras/rc-ses-react-components 1.4.0 → 1.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/components/common/Accordion/hooks/useAccordionController.d.ts +1 -0
- package/dist/components/common/Card/index.d.ts +7 -2
- package/dist/components/common/ImageCard/index.d.ts +13 -0
- package/dist/components/common/ListWithIcons/components/ListWithIconsItem.d.ts +9 -0
- package/dist/components/common/ListWithIcons/index.d.ts +14 -0
- package/dist/components/layout/Footer/index.d.ts +5 -0
- package/dist/components/layout/ServiceFormContainer/{components → AccordionFormContainer/components}/AccordionCollapseControls.d.ts +1 -1
- package/dist/components/layout/ServiceFormContainer/{index.d.ts → AccordionFormContainer/index.d.ts} +1 -1
- package/dist/components/layout/ServiceFormContainer/AccordionFormContainer/utils.d.ts +4 -0
- package/dist/components/layout/ServiceFormContainer/CardFormContainer/index.d.ts +12 -0
- package/dist/components/layout/ServiceWizardStepper/StepperTypes.d.ts +0 -3
- package/dist/components/layout/ServiceWizardStepper/components/DesktopStepper.d.ts +3 -1
- package/dist/components/layout/ServiceWizardStepper/components/MobileStepper.d.ts +2 -1
- package/dist/components/layout/ServiceWizardStepper/components/StyledStepLabel.d.ts +2 -2
- package/dist/components/layout/ServiceWizardStepper/index.d.ts +5 -2
- package/dist/library/icons.d.ts +1 -3
- package/dist/library/index.d.ts +12 -16
- package/dist/library/types.d.ts +6 -0
- package/dist/registrucentras-rc-ses-react-components.cjs +12 -12
- package/dist/registrucentras-rc-ses-react-components.js +2472 -2130
- package/dist/stories/ServiceWizardStepper.stories.d.ts +5 -5
- package/dist/stories/components/Card.stories.d.ts +26 -1
- package/dist/stories/components/ImageCard.stories.d.ts +8 -0
- package/dist/stories/components/ListWithIcons.stories.d.ts +33 -0
- package/dist/stories/components/form/CardFormContainer.stories.d.ts +7 -0
- package/dist/stories/components/form/ServiceFormContainer.stories.d.ts +1 -1
- package/dist/stories/components/inputs/FileDropzone.stories.d.ts +32 -0
- package/dist/stories/components/inputs/PhoneInput.stories.d.ts +24 -0
- package/dist/stories/components/inputs/SearchableField.stories.d.ts +2 -2
- package/dist/stories/components/inputs/Select.stories.d.ts +3 -3
- package/dist/stories/components/inputs/TextField.stories.d.ts +5 -5
- package/dist/stories/components/layout/Footer.stories.d.ts +8 -0
- package/package.json +1 -1
- package/src/App.tsx +4 -0
- package/src/components/common/Accordion/hooks/useAccordionController.tsx +43 -11
- package/src/components/common/Card/index.test.tsx +36 -0
- package/src/components/common/Card/index.tsx +62 -22
- package/src/components/common/DataPagination/components/PaginationButton.tsx +1 -1
- package/src/components/common/DataPagination/index.tsx +1 -1
- package/src/components/common/ImageCard/index.test.tsx +78 -0
- package/src/components/common/ImageCard/index.tsx +43 -0
- package/src/components/common/ListWithIcons/components/ListWithIconsItem.tsx +94 -0
- package/src/components/common/ListWithIcons/index.test.tsx +75 -0
- package/src/components/common/ListWithIcons/index.tsx +47 -0
- package/src/components/form/inputs/CheckboxFormControl.tsx +1 -1
- package/src/components/form/inputs/FileDropzone.tsx +1 -1
- package/src/components/form/inputs/FileUpload.tsx +9 -3
- package/src/components/form/inputs/NumberStepper.tsx +2 -2
- package/src/components/form/inputs/PhoneInputFormControl/components/RowComponent.tsx +1 -0
- package/src/components/form/inputs/RadioButtonGroup.tsx +1 -1
- package/src/components/layout/Footer/index.test.tsx +20 -0
- package/src/components/layout/Footer/index.tsx +33 -0
- package/src/components/layout/ServiceFormContainer/{index.tsx → AccordionFormContainer/index.tsx} +22 -5
- package/src/components/layout/ServiceFormContainer/{utils.ts → AccordionFormContainer/utils.ts} +2 -3
- package/src/components/layout/ServiceFormContainer/CardFormContainer/index.test.tsx +80 -0
- package/src/components/layout/ServiceFormContainer/CardFormContainer/index.tsx +71 -0
- package/src/components/layout/ServiceWizardStepper/ServiceWizardStepper.css +19 -3
- package/src/components/layout/ServiceWizardStepper/StepConnector.tsx +1 -1
- package/src/components/layout/ServiceWizardStepper/StepperTypes.ts +0 -3
- package/src/components/layout/ServiceWizardStepper/components/DesktopStepper.test.tsx +33 -4
- package/src/components/layout/ServiceWizardStepper/components/DesktopStepper.tsx +23 -4
- package/src/components/layout/ServiceWizardStepper/components/MobileStepper.test.tsx +34 -7
- package/src/components/layout/ServiceWizardStepper/components/MobileStepper.tsx +4 -2
- package/src/components/layout/ServiceWizardStepper/components/StyledStepLabel.tsx +8 -2
- package/src/components/layout/ServiceWizardStepper/index.tsx +19 -20
- package/src/examples/CardMultipleStepForm/index.tsx +80 -0
- package/src/examples/HorizontalMultiStepForm/index.tsx +22 -17
- package/src/examples/ListWithPagination/index.tsx +41 -11
- package/src/examples/MultipleStepForm/index.tsx +1 -1
- package/src/examples/SingleStepForm/index.tsx +1 -1
- package/src/library/icons.ts +3 -2
- package/src/library/index.ts +20 -23
- package/src/library/types.ts +11 -0
- package/src/main.tsx +5 -0
- package/src/stories/ServiceWizardStepper.stories.tsx +28 -14
- package/src/stories/components/Accordion.stories.tsx +1 -1
- package/src/stories/components/Card.stories.tsx +18 -0
- package/src/stories/components/ImageCard.stories.tsx +54 -0
- package/src/stories/components/ListWithIcons.stories.tsx +74 -0
- package/src/stories/components/form/CardFormContainer.stories.tsx +125 -0
- package/src/stories/components/form/ServiceFormContainer.stories.tsx +1 -1
- package/src/stories/components/inputs/FileDropzone.stories.tsx +117 -0
- package/src/stories/components/inputs/PhoneInput.stories.tsx +110 -0
- package/src/stories/components/layout/Footer.stories.tsx +19 -0
- package/src/theme/light/MuiAutocomplete.ts +4 -0
- package/src/theme/light/MuiCard.tsx +16 -2
- package/src/theme/light/MuiInputBase.ts +3 -1
- package/dist/components/layout/ServiceFormContainer/utils.d.ts +0 -4
- /package/src/components/layout/ServiceFormContainer/{components → AccordionFormContainer/components}/AccordionCollapseControls.tsx +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Meta,
|
|
2
|
-
import { default as ServiceWizardStepper } from '../components/layout/ServiceWizardStepper';
|
|
1
|
+
import { Meta, ReactRenderer } from '@storybook/react';
|
|
2
|
+
import { default as ServiceWizardStepper, ServiceWizardStepperProps } from '../components/layout/ServiceWizardStepper';
|
|
3
|
+
import { StoryAnnotations } from '@storybook/core/csf';
|
|
3
4
|
declare const meta: Meta<typeof ServiceWizardStepper>;
|
|
4
5
|
export default meta;
|
|
5
|
-
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const Vertical: Story;
|
|
6
|
+
export declare const Horizontal: StoryAnnotations<ReactRenderer, ServiceWizardStepperProps>;
|
|
7
|
+
export declare const Vertical: StoryAnnotations<ReactRenderer, ServiceWizardStepperProps>;
|
|
@@ -8,7 +8,10 @@ export default meta;
|
|
|
8
8
|
export declare const Main: AnnotatedStoryFn<ReactRenderer, Omit< CardProps, "children" | "title"> & {
|
|
9
9
|
title: ReactNode;
|
|
10
10
|
description?: ReactNode;
|
|
11
|
-
|
|
11
|
+
image?: ReactNode;
|
|
12
|
+
centered?: boolean;
|
|
13
|
+
contentBackground?: boolean;
|
|
14
|
+
children?: ReactNode;
|
|
12
15
|
leadingActions?: ReactNode;
|
|
13
16
|
trailingActions?: ReactNode;
|
|
14
17
|
testIds?: RcSesCardTestIds;
|
|
@@ -17,6 +20,28 @@ export declare const Main: AnnotatedStoryFn<ReactRenderer, Omit< CardProps, "chi
|
|
|
17
20
|
content?: BoxProps;
|
|
18
21
|
description?: TypographyProps;
|
|
19
22
|
header?: StackProps;
|
|
23
|
+
image?: BoxProps;
|
|
24
|
+
leadingActions?: StackProps;
|
|
25
|
+
title?: TypographyProps;
|
|
26
|
+
trailingActions?: StackProps;
|
|
27
|
+
};
|
|
28
|
+
}>;
|
|
29
|
+
export declare const WithImage: AnnotatedStoryFn<ReactRenderer, Omit< CardProps, "children" | "title"> & {
|
|
30
|
+
title: ReactNode;
|
|
31
|
+
description?: ReactNode;
|
|
32
|
+
image?: ReactNode;
|
|
33
|
+
centered?: boolean;
|
|
34
|
+
contentBackground?: boolean;
|
|
35
|
+
children?: ReactNode;
|
|
36
|
+
leadingActions?: ReactNode;
|
|
37
|
+
trailingActions?: ReactNode;
|
|
38
|
+
testIds?: RcSesCardTestIds;
|
|
39
|
+
slotProps?: {
|
|
40
|
+
actions?: StackProps;
|
|
41
|
+
content?: BoxProps;
|
|
42
|
+
description?: TypographyProps;
|
|
43
|
+
header?: StackProps;
|
|
44
|
+
image?: BoxProps;
|
|
20
45
|
leadingActions?: StackProps;
|
|
21
46
|
title?: TypographyProps;
|
|
22
47
|
trailingActions?: StackProps;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta, ReactRenderer } from '@storybook/react';
|
|
2
|
+
import { default as RcSesImageCard, RcSesImageCardProps } from '../../components/common/ImageCard';
|
|
3
|
+
import { AnnotatedStoryFn } from '@storybook/core/csf';
|
|
4
|
+
declare const meta: Meta<typeof RcSesImageCard>;
|
|
5
|
+
export default meta;
|
|
6
|
+
export declare const Main: AnnotatedStoryFn<ReactRenderer, RcSesImageCardProps>;
|
|
7
|
+
export declare const WithoutButton: AnnotatedStoryFn<ReactRenderer, RcSesImageCardProps>;
|
|
8
|
+
export declare const OutlinedButton: AnnotatedStoryFn<ReactRenderer, RcSesImageCardProps>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
import { ListWithIconsItemData, ListWithIconsProps } from '../../components/common/ListWithIcons';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: ({ items, layout, isLoading }: ListWithIconsProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
tags: string[];
|
|
7
|
+
args: {
|
|
8
|
+
items: ListWithIconsItemData[];
|
|
9
|
+
layout: "vertical";
|
|
10
|
+
isLoading: false;
|
|
11
|
+
};
|
|
12
|
+
argTypes: {
|
|
13
|
+
layout: {
|
|
14
|
+
control: {
|
|
15
|
+
type: "radio";
|
|
16
|
+
};
|
|
17
|
+
options: string[];
|
|
18
|
+
};
|
|
19
|
+
isLoading: {
|
|
20
|
+
control: {
|
|
21
|
+
type: "boolean";
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
items: {
|
|
25
|
+
control: false;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export default meta;
|
|
30
|
+
type Story = StoryObj<typeof meta>;
|
|
31
|
+
export declare const Main: Story;
|
|
32
|
+
export declare const Horizontal: Story;
|
|
33
|
+
export declare const Loading: Story;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Meta, ReactRenderer } from '@storybook/react';
|
|
2
|
+
import { default as RcSesCardFormContainer, RcSesCardFormContainerProps } from '../../../components/layout/ServiceFormContainer/CardFormContainer';
|
|
3
|
+
import { AnnotatedStoryFn } from '@storybook/core/csf';
|
|
4
|
+
declare const meta: Meta<typeof RcSesCardFormContainer>;
|
|
5
|
+
export default meta;
|
|
6
|
+
export declare const HorizontalDemo: AnnotatedStoryFn<ReactRenderer, RcSesCardFormContainerProps>;
|
|
7
|
+
export declare const VerticalDemo: AnnotatedStoryFn<ReactRenderer, RcSesCardFormContainerProps>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Meta, ReactRenderer } from '@storybook/react';
|
|
2
2
|
import { default as useAccordionController } from '../../../components/common/Accordion/hooks/useAccordionController';
|
|
3
|
-
import { default as RcSesServiceFormContainer } from '../../../components/layout/ServiceFormContainer';
|
|
3
|
+
import { default as RcSesServiceFormContainer } from '../../../components/layout/ServiceFormContainer/AccordionFormContainer';
|
|
4
4
|
import { AnnotatedStoryFn } from '@storybook/core/csf';
|
|
5
5
|
import { ContainerProps } from '@mui/system';
|
|
6
6
|
declare const meta: Meta<typeof RcSesServiceFormContainer>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Meta, ReactRenderer } from '@storybook/react';
|
|
2
|
+
import { default as RcSesFileDropzone } from '../../../components/form/inputs/FileDropzone';
|
|
3
|
+
import { AnnotatedStoryFn } from '@storybook/core/csf';
|
|
4
|
+
import { RegisterOptions, Control } from 'react-hook-form';
|
|
5
|
+
import { InputHTMLAttributes } from 'react';
|
|
6
|
+
import { RcSesFormControlWrapperProps } from '../../../components/form/components/FormControlWrapper';
|
|
7
|
+
import { DropzoneOptions } from 'react-dropzone/.';
|
|
8
|
+
declare const meta: Meta<typeof RcSesFileDropzone>;
|
|
9
|
+
export default meta;
|
|
10
|
+
export declare const Main: AnnotatedStoryFn<ReactRenderer, Pick<{
|
|
11
|
+
name: any;
|
|
12
|
+
rules?: Omit< RegisterOptions<any, any>, "disabled" | "setValueAs" | "valueAsNumber" | "valueAsDate"> | undefined;
|
|
13
|
+
shouldUnregister?: boolean;
|
|
14
|
+
defaultValue?: any;
|
|
15
|
+
control?: Control<any> | undefined;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
}, "rules" | "control"> & Pick< InputHTMLAttributes<HTMLInputElement>, "name" | "onBlur" | "onChange" | "disabled"> & Pick< RcSesFormControlWrapperProps, "label" | "errors"> & {
|
|
18
|
+
id?: string;
|
|
19
|
+
slotProps?: {
|
|
20
|
+
controller?: Partial<Omit<{
|
|
21
|
+
name: any;
|
|
22
|
+
rules?: Omit< RegisterOptions<any, any>, "disabled" | "setValueAs" | "valueAsNumber" | "valueAsDate"> | undefined;
|
|
23
|
+
shouldUnregister?: boolean;
|
|
24
|
+
defaultValue?: any;
|
|
25
|
+
control?: Control<any> | undefined;
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
}, "rules" | "control">>;
|
|
28
|
+
dropzone?: Partial< DropzoneOptions>;
|
|
29
|
+
field?: Partial<Omit< InputHTMLAttributes<HTMLInputElement>, "name" | "onBlur" | "onChange" | "disabled">>;
|
|
30
|
+
wrapper?: Partial<Omit< RcSesFormControlWrapperProps, "label" | "errors">>;
|
|
31
|
+
};
|
|
32
|
+
}>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Meta, ReactRenderer } from '@storybook/react';
|
|
2
|
+
import { default as RcSesPhoneInput } from '../../../components/form/inputs/PhoneInput';
|
|
3
|
+
import { AnnotatedStoryFn } from '@storybook/core/csf';
|
|
4
|
+
import { RegisterOptions, Control } from 'react-hook-form';
|
|
5
|
+
import { AutocompleteProps, FormControlLabelProps } from '@mui/material';
|
|
6
|
+
import { default as __DTS_DEFAULT_0__ } from '../../../components/form/inputs/PhoneInputFormControl/types/Country';
|
|
7
|
+
import { RcSesFormControlWrapperProps } from '../../../components/form/components/FormControlWrapper';
|
|
8
|
+
declare const meta: Meta<typeof RcSesPhoneInput>;
|
|
9
|
+
export default meta;
|
|
10
|
+
export declare const Main: AnnotatedStoryFn<ReactRenderer, Pick<{
|
|
11
|
+
name: any;
|
|
12
|
+
rules?: Omit< RegisterOptions<any, any>, "disabled" | "setValueAs" | "valueAsNumber" | "valueAsDate"> | undefined;
|
|
13
|
+
shouldUnregister?: boolean;
|
|
14
|
+
defaultValue?: any;
|
|
15
|
+
control?: Control<any> | undefined;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
}, "name" | "disabled" | "rules" | "control"> & Pick< AutocompleteProps<__DTS_DEFAULT_0__, false, true, false, any>, never> & Pick< RcSesFormControlWrapperProps, "label" | "errors"> & {
|
|
18
|
+
id?: string;
|
|
19
|
+
slotProps?: {
|
|
20
|
+
autocomplete?: Partial<Omit< AutocompleteProps<__DTS_DEFAULT_0__, false, true, false, any>, never>>;
|
|
21
|
+
label?: Partial< FormControlLabelProps>;
|
|
22
|
+
wrapper?: Partial<Omit< RcSesFormControlWrapperProps, "label" | "errors">>;
|
|
23
|
+
};
|
|
24
|
+
}>;
|
|
@@ -3,9 +3,9 @@ import { default as RcSesSearchableField } from '../../../components/form/inputs
|
|
|
3
3
|
import { AnnotatedStoryFn } from '@storybook/core/csf';
|
|
4
4
|
import { RegisterOptions, Control } from 'react-hook-form';
|
|
5
5
|
import { RcSesFormControlWrapperProps } from '../../../components/form/components/FormControlWrapper';
|
|
6
|
-
import { DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES, RefObject, HTMLInputTypeAttribute, AriaRole, ReactNode, ClipboardEventHandler, CompositionEventHandler, FocusEventHandler, ChangeEventHandler, FormEventHandler, ReactEventHandler, KeyboardEventHandler, MouseEventHandler, DragEventHandler, TouchEventHandler, PointerEventHandler, UIEventHandler, WheelEventHandler, AnimationEventHandler, TransitionEventHandler, Key, RefAttributes } from 'react';
|
|
7
6
|
import { OverridableStringUnion } from '@mui/types';
|
|
8
7
|
import { TextFieldPropsSizeOverrides, TextFieldPropsColorOverrides, TextFieldClasses, Theme, InputBaseComponentProps, OutlinedInputProps, FormHelperTextProps, InputLabelProps, SelectProps } from '@mui/material';
|
|
8
|
+
import { HTMLInputTypeAttribute, AriaRole, ReactNode, ClipboardEventHandler, CompositionEventHandler, FocusEventHandler, ChangeEventHandler, FormEventHandler, ReactEventHandler, KeyboardEventHandler, MouseEventHandler, DragEventHandler, TouchEventHandler, PointerEventHandler, UIEventHandler, WheelEventHandler, AnimationEventHandler, TransitionEventHandler, DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES, RefObject, Key, RefAttributes } from 'react';
|
|
9
9
|
import { SxProps } from '@mui/system';
|
|
10
10
|
declare const meta: Meta<typeof RcSesSearchableField>;
|
|
11
11
|
export default meta;
|
|
@@ -32,7 +32,6 @@ export declare const Main: AnnotatedStoryFn<ReactRenderer, Pick<{
|
|
|
32
32
|
disabled?: boolean;
|
|
33
33
|
}, "name" | "disabled" | "rules" | "control">>;
|
|
34
34
|
field?: Partial<{
|
|
35
|
-
ref?: ((instance: HTMLDivElement | null) => void | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | RefObject<HTMLDivElement> | null | undefined;
|
|
36
35
|
className?: string | undefined;
|
|
37
36
|
size?: OverridableStringUnion<"small" | "medium", TextFieldPropsSizeOverrides> | undefined;
|
|
38
37
|
suppressHydrationWarning?: boolean | undefined | undefined;
|
|
@@ -261,6 +260,7 @@ export declare const Main: AnnotatedStoryFn<ReactRenderer, Pick<{
|
|
|
261
260
|
onAnimationIterationCapture?: AnimationEventHandler<HTMLDivElement> | undefined;
|
|
262
261
|
onTransitionEnd?: TransitionEventHandler<HTMLDivElement> | undefined;
|
|
263
262
|
onTransitionEndCapture?: TransitionEventHandler<HTMLDivElement> | undefined;
|
|
263
|
+
ref?: ((instance: HTMLDivElement | null) => void | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | RefObject<HTMLDivElement> | null | undefined;
|
|
264
264
|
key?: Key | null | undefined;
|
|
265
265
|
label?: ReactNode;
|
|
266
266
|
slot?: string | undefined | undefined;
|
|
@@ -2,9 +2,9 @@ import { Meta, ReactRenderer } from '@storybook/react';
|
|
|
2
2
|
import { default as RcSesSelect } from '../../../components/form/inputs/Select';
|
|
3
3
|
import { AnnotatedStoryFn } from '@storybook/core/csf';
|
|
4
4
|
import { RegisterOptions, Control } from 'react-hook-form';
|
|
5
|
-
import { Ref, CSSProperties, AriaRole, ClipboardEventHandler, CompositionEventHandler, FocusEventHandler, FormEventHandler, ReactEventHandler, KeyboardEventHandler, MouseEventHandler, DragEventHandler, TouchEventHandler, PointerEventHandler, UIEventHandler, WheelEventHandler, AnimationEventHandler, TransitionEventHandler, ReactNode } from 'react';
|
|
6
5
|
import { OverridableStringUnion } from '@mui/types';
|
|
7
6
|
import { AutocompletePropsSizeOverrides, AutocompleteChangeReason, AutocompleteChangeDetails, AutocompleteClasses, Theme, IconButtonProps, PaperProps, PopperProps, AutocompleteCloseReason, ChipProps, useAutocomplete, AutocompleteRenderGroupParams, AutocompleteRenderInputParams, AutocompleteRenderOptionState, AutocompleteOwnerState, AutocompleteRenderGetTagProps, FilterOptionsState, AutocompleteHighlightChangeReason, AutocompleteInputChangeReason } from '@mui/material';
|
|
7
|
+
import { CSSProperties, AriaRole, ClipboardEventHandler, CompositionEventHandler, FocusEventHandler, FormEventHandler, ReactEventHandler, KeyboardEventHandler, MouseEventHandler, DragEventHandler, TouchEventHandler, PointerEventHandler, UIEventHandler, WheelEventHandler, AnimationEventHandler, TransitionEventHandler, Ref, ReactNode } from 'react';
|
|
8
8
|
import { SxProps } from '@mui/system';
|
|
9
9
|
import { RcSesFormControlWrapperProps } from '../../../components/form/components/FormControlWrapper';
|
|
10
10
|
declare const meta: Meta<typeof RcSesSelect>;
|
|
@@ -17,7 +17,6 @@ export declare const Main: AnnotatedStoryFn<ReactRenderer, Pick<{
|
|
|
17
17
|
control?: Control<any> | undefined;
|
|
18
18
|
disabled?: boolean;
|
|
19
19
|
}, "name" | "disabled" | "rules" | "control"> & Pick<{
|
|
20
|
-
ref?: Ref<unknown> | undefined;
|
|
21
20
|
className?: string | undefined | undefined;
|
|
22
21
|
size?: OverridableStringUnion<"small" | "medium", AutocompletePropsSizeOverrides> | undefined;
|
|
23
22
|
suppressHydrationWarning?: boolean | undefined | undefined;
|
|
@@ -253,6 +252,7 @@ export declare const Main: AnnotatedStoryFn<ReactRenderer, Pick<{
|
|
|
253
252
|
onAnimationIterationCapture?: AnimationEventHandler<HTMLDivElement> | undefined;
|
|
254
253
|
onTransitionEnd?: TransitionEventHandler<HTMLDivElement> | undefined;
|
|
255
254
|
onTransitionEndCapture?: TransitionEventHandler<HTMLDivElement> | undefined;
|
|
255
|
+
ref?: Ref<unknown> | undefined;
|
|
256
256
|
slot?: string | undefined | undefined;
|
|
257
257
|
title?: string | undefined | undefined;
|
|
258
258
|
classes?: Partial< AutocompleteClasses> | undefined;
|
|
@@ -452,7 +452,6 @@ export declare const Main: AnnotatedStoryFn<ReactRenderer, Pick<{
|
|
|
452
452
|
disabled?: boolean;
|
|
453
453
|
}, "name" | "disabled" | "rules" | "control">>;
|
|
454
454
|
field?: Partial<Omit<{
|
|
455
|
-
ref?: Ref<unknown> | undefined;
|
|
456
455
|
className?: string | undefined | undefined;
|
|
457
456
|
size?: OverridableStringUnion<"small" | "medium", AutocompletePropsSizeOverrides> | undefined;
|
|
458
457
|
suppressHydrationWarning?: boolean | undefined | undefined;
|
|
@@ -688,6 +687,7 @@ export declare const Main: AnnotatedStoryFn<ReactRenderer, Pick<{
|
|
|
688
687
|
onAnimationIterationCapture?: AnimationEventHandler<HTMLDivElement> | undefined;
|
|
689
688
|
onTransitionEnd?: TransitionEventHandler<HTMLDivElement> | undefined;
|
|
690
689
|
onTransitionEndCapture?: TransitionEventHandler<HTMLDivElement> | undefined;
|
|
690
|
+
ref?: Ref<unknown> | undefined;
|
|
691
691
|
slot?: string | undefined | undefined;
|
|
692
692
|
title?: string | undefined | undefined;
|
|
693
693
|
classes?: Partial< AutocompleteClasses> | undefined;
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { Meta, ReactRenderer } from '@storybook/react';
|
|
2
2
|
import { default as RcSesTextField } from '../../../components/form/inputs/TextField';
|
|
3
3
|
import { AnnotatedStoryFn } from '@storybook/core/csf';
|
|
4
|
-
import { DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES, RefObject, HTMLInputTypeAttribute, AriaRole, ReactNode, ClipboardEventHandler, CompositionEventHandler, FocusEventHandler, ChangeEventHandler, FormEventHandler, ReactEventHandler, KeyboardEventHandler, MouseEventHandler, DragEventHandler, TouchEventHandler, PointerEventHandler, UIEventHandler, WheelEventHandler, AnimationEventHandler, TransitionEventHandler, Key, RefAttributes } from 'react';
|
|
5
4
|
import { OverridableStringUnion } from '@mui/types';
|
|
6
5
|
import { TextFieldPropsSizeOverrides, TextFieldPropsColorOverrides, TextFieldClasses, Theme, InputBaseComponentProps, OutlinedInputProps, FormHelperTextProps, InputLabelProps, SelectProps } from '@mui/material';
|
|
6
|
+
import { HTMLInputTypeAttribute, AriaRole, ReactNode, ClipboardEventHandler, CompositionEventHandler, FocusEventHandler, ChangeEventHandler, FormEventHandler, ReactEventHandler, KeyboardEventHandler, MouseEventHandler, DragEventHandler, TouchEventHandler, PointerEventHandler, UIEventHandler, WheelEventHandler, AnimationEventHandler, TransitionEventHandler, DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES, RefObject, Key, RefAttributes } from 'react';
|
|
7
7
|
import { SxProps } from '@mui/system';
|
|
8
8
|
import { RcSesFormControlWrapperProps } from '../../../components/form/components/FormControlWrapper';
|
|
9
9
|
declare const meta: Meta<typeof RcSesTextField>;
|
|
10
10
|
export default meta;
|
|
11
11
|
export declare const Main: AnnotatedStoryFn<ReactRenderer, Omit<Pick<{
|
|
12
|
-
ref?: ((instance: HTMLDivElement | null) => void | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | RefObject<HTMLDivElement> | null | undefined;
|
|
13
12
|
className?: string | undefined;
|
|
14
13
|
size?: OverridableStringUnion<"small" | "medium", TextFieldPropsSizeOverrides> | undefined;
|
|
15
14
|
suppressHydrationWarning?: boolean | undefined | undefined;
|
|
@@ -238,6 +237,7 @@ export declare const Main: AnnotatedStoryFn<ReactRenderer, Omit<Pick<{
|
|
|
238
237
|
onAnimationIterationCapture?: AnimationEventHandler<HTMLDivElement> | undefined;
|
|
239
238
|
onTransitionEnd?: TransitionEventHandler<HTMLDivElement> | undefined;
|
|
240
239
|
onTransitionEndCapture?: TransitionEventHandler<HTMLDivElement> | undefined;
|
|
240
|
+
ref?: ((instance: HTMLDivElement | null) => void | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | RefObject<HTMLDivElement> | null | undefined;
|
|
241
241
|
key?: Key | null | undefined;
|
|
242
242
|
label?: ReactNode;
|
|
243
243
|
slot?: string | undefined | undefined;
|
|
@@ -306,11 +306,10 @@ export declare const Main: AnnotatedStoryFn<ReactRenderer, Omit<Pick<{
|
|
|
306
306
|
helperText?: ReactNode;
|
|
307
307
|
InputLabelProps?: Partial< InputLabelProps> | undefined;
|
|
308
308
|
SelectProps?: Partial< SelectProps> | undefined;
|
|
309
|
-
}, "
|
|
309
|
+
}, "name" | "onBlur" | "onChange" | "ref" | "disabled" | "required" | "multiline"> & Pick< RcSesFormControlWrapperProps, "label" | "errors"> & {
|
|
310
310
|
id?: string;
|
|
311
311
|
slotProps?: {
|
|
312
312
|
field?: Partial<Omit<{
|
|
313
|
-
ref?: ((instance: HTMLDivElement | null) => void | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | RefObject<HTMLDivElement> | null | undefined;
|
|
314
313
|
className?: string | undefined;
|
|
315
314
|
size?: OverridableStringUnion<"small" | "medium", TextFieldPropsSizeOverrides> | undefined;
|
|
316
315
|
suppressHydrationWarning?: boolean | undefined | undefined;
|
|
@@ -539,6 +538,7 @@ export declare const Main: AnnotatedStoryFn<ReactRenderer, Omit<Pick<{
|
|
|
539
538
|
onAnimationIterationCapture?: AnimationEventHandler<HTMLDivElement> | undefined;
|
|
540
539
|
onTransitionEnd?: TransitionEventHandler<HTMLDivElement> | undefined;
|
|
541
540
|
onTransitionEndCapture?: TransitionEventHandler<HTMLDivElement> | undefined;
|
|
541
|
+
ref?: ((instance: HTMLDivElement | null) => void | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | RefObject<HTMLDivElement> | null | undefined;
|
|
542
542
|
key?: Key | null | undefined;
|
|
543
543
|
label?: ReactNode;
|
|
544
544
|
slot?: string | undefined | undefined;
|
|
@@ -607,7 +607,7 @@ export declare const Main: AnnotatedStoryFn<ReactRenderer, Omit<Pick<{
|
|
|
607
607
|
helperText?: ReactNode;
|
|
608
608
|
InputLabelProps?: Partial< InputLabelProps> | undefined;
|
|
609
609
|
SelectProps?: Partial< SelectProps> | undefined;
|
|
610
|
-
}, "
|
|
610
|
+
}, "name" | "onBlur" | "onChange" | "ref" | "disabled" | "required" | "multiline">>;
|
|
611
611
|
wrapper?: Partial<Omit< RcSesFormControlWrapperProps, "label" | "errors">>;
|
|
612
612
|
};
|
|
613
613
|
}, "ref"> & RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta, ReactRenderer } from '@storybook/react';
|
|
2
|
+
import { default as RcSesFooter } from '../../../components/layout/Footer';
|
|
3
|
+
import { AnnotatedStoryFn } from '@storybook/core/csf';
|
|
4
|
+
declare const meta: Meta<typeof RcSesFooter>;
|
|
5
|
+
export default meta;
|
|
6
|
+
export declare const Main: AnnotatedStoryFn<ReactRenderer, {
|
|
7
|
+
text: string;
|
|
8
|
+
}>;
|
package/package.json
CHANGED
package/src/App.tsx
CHANGED
|
@@ -10,30 +10,62 @@ function useAccordionController({ initialState }: Props) {
|
|
|
10
10
|
const [state, setState] = React.useState<AccordionControllerState>(initialState)
|
|
11
11
|
|
|
12
12
|
const toggleAccordion = (id: string, isExpanded: boolean) => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
setState((prev) => {
|
|
14
|
+
if (!(id in prev)) return prev
|
|
15
|
+
|
|
16
|
+
return {
|
|
17
|
+
...prev,
|
|
18
|
+
[id]: {
|
|
19
|
+
...prev[id],
|
|
20
|
+
expanded: isExpanded,
|
|
21
|
+
},
|
|
22
|
+
}
|
|
23
|
+
})
|
|
16
24
|
}
|
|
17
25
|
|
|
18
26
|
const collapseAll = () => {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
27
|
+
setState((prev) => {
|
|
28
|
+
const next = { ...prev }
|
|
29
|
+
Object.keys(next).forEach((k) => {
|
|
30
|
+
next[k] = {
|
|
31
|
+
...next[k],
|
|
32
|
+
expanded: false,
|
|
33
|
+
}
|
|
34
|
+
})
|
|
35
|
+
return next
|
|
22
36
|
})
|
|
23
|
-
setState(nextState)
|
|
24
37
|
}
|
|
25
38
|
|
|
26
39
|
const expandAll = () => {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
40
|
+
setState((prev) => {
|
|
41
|
+
const next = { ...prev }
|
|
42
|
+
Object.keys(next).forEach((k) => {
|
|
43
|
+
next[k] = {
|
|
44
|
+
...next[k],
|
|
45
|
+
expanded: true,
|
|
46
|
+
}
|
|
47
|
+
})
|
|
48
|
+
return next
|
|
49
|
+
})
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const open = (id: string) => {
|
|
53
|
+
setState((prev) => {
|
|
54
|
+
const next = { ...prev }
|
|
55
|
+
Object.keys(next).forEach((k) => {
|
|
56
|
+
next[k] = {
|
|
57
|
+
...next[k],
|
|
58
|
+
expanded: k === id,
|
|
59
|
+
}
|
|
60
|
+
})
|
|
61
|
+
return next
|
|
30
62
|
})
|
|
31
|
-
setState(nextState)
|
|
32
63
|
}
|
|
33
64
|
|
|
34
65
|
return {
|
|
35
66
|
collapseAll,
|
|
36
67
|
expandAll,
|
|
68
|
+
open,
|
|
37
69
|
state,
|
|
38
70
|
toggleAccordion,
|
|
39
71
|
}
|
|
@@ -133,4 +133,40 @@ describe('RcSesCard', () => {
|
|
|
133
133
|
expect(container.querySelector('.array-sx-title')).toBeInTheDocument()
|
|
134
134
|
expect(screen.getByText('Array sx')).toBeInTheDocument()
|
|
135
135
|
})
|
|
136
|
+
|
|
137
|
+
test('renders image slot when provided', () => {
|
|
138
|
+
renderCard(
|
|
139
|
+
<RcSesCard title='Card with image' image={<img src='test.png' alt='test' />}>
|
|
140
|
+
<div>Content</div>
|
|
141
|
+
</RcSesCard>,
|
|
142
|
+
)
|
|
143
|
+
|
|
144
|
+
expect(screen.getByRole('img', { name: 'test' })).toBeInTheDocument()
|
|
145
|
+
})
|
|
146
|
+
|
|
147
|
+
test('omits image slot when not provided', () => {
|
|
148
|
+
const { container } = renderCard(
|
|
149
|
+
<RcSesCard title='No image' testIds={{ image: 'card-image' }}>
|
|
150
|
+
<div>Content</div>
|
|
151
|
+
</RcSesCard>,
|
|
152
|
+
)
|
|
153
|
+
|
|
154
|
+
expect(container.querySelector('[data-testid="card-image"]')).not.toBeInTheDocument()
|
|
155
|
+
})
|
|
156
|
+
|
|
157
|
+
test('forwards image slot props and testId', () => {
|
|
158
|
+
renderCard(
|
|
159
|
+
<RcSesCard
|
|
160
|
+
title='Image slot props'
|
|
161
|
+
image={<img src='test.png' alt='test' />}
|
|
162
|
+
testIds={{ image: 'card-image' }}
|
|
163
|
+
slotProps={{ image: { className: 'image-slot' } }}
|
|
164
|
+
>
|
|
165
|
+
<div>Content</div>
|
|
166
|
+
</RcSesCard>,
|
|
167
|
+
)
|
|
168
|
+
|
|
169
|
+
expect(screen.getByTestId('card-image')).toBeInTheDocument()
|
|
170
|
+
expect(screen.getByTestId('card-image')).toHaveClass('image-slot')
|
|
171
|
+
})
|
|
136
172
|
})
|
|
@@ -16,6 +16,7 @@ import palette from '@/theme/palette'
|
|
|
16
16
|
|
|
17
17
|
export type RcSesCardTestIds = {
|
|
18
18
|
root?: string
|
|
19
|
+
image?: string
|
|
19
20
|
header?: string
|
|
20
21
|
title?: string
|
|
21
22
|
description?: string
|
|
@@ -28,7 +29,10 @@ export type RcSesCardTestIds = {
|
|
|
28
29
|
export type RcSesCardProps = Omit<CardProps, 'children' | 'title'> & {
|
|
29
30
|
title: ReactNode
|
|
30
31
|
description?: ReactNode
|
|
31
|
-
|
|
32
|
+
image?: ReactNode
|
|
33
|
+
centered?: boolean
|
|
34
|
+
contentBackground?: boolean
|
|
35
|
+
children?: ReactNode
|
|
32
36
|
leadingActions?: ReactNode
|
|
33
37
|
trailingActions?: ReactNode
|
|
34
38
|
testIds?: RcSesCardTestIds
|
|
@@ -37,6 +41,7 @@ export type RcSesCardProps = Omit<CardProps, 'children' | 'title'> & {
|
|
|
37
41
|
content?: BoxProps
|
|
38
42
|
description?: TypographyProps
|
|
39
43
|
header?: StackProps
|
|
44
|
+
image?: BoxProps
|
|
40
45
|
leadingActions?: StackProps
|
|
41
46
|
title?: TypographyProps
|
|
42
47
|
trailingActions?: StackProps
|
|
@@ -67,6 +72,9 @@ function normalizeSx(sx: SxProps<Theme> | undefined): SxEntry[] {
|
|
|
67
72
|
function RcSesCard({
|
|
68
73
|
title,
|
|
69
74
|
description,
|
|
75
|
+
image,
|
|
76
|
+
centered = false,
|
|
77
|
+
contentBackground = true,
|
|
70
78
|
children,
|
|
71
79
|
leadingActions,
|
|
72
80
|
trailingActions,
|
|
@@ -79,6 +87,7 @@ function RcSesCard({
|
|
|
79
87
|
const contentProps = slotProps?.content
|
|
80
88
|
const descriptionProps = slotProps?.description
|
|
81
89
|
const headerProps = slotProps?.header
|
|
90
|
+
const imageProps = slotProps?.image
|
|
82
91
|
const leadingActionsProps = slotProps?.leadingActions
|
|
83
92
|
const titleProps = slotProps?.title
|
|
84
93
|
const trailingActionsProps = slotProps?.trailingActions
|
|
@@ -88,6 +97,7 @@ function RcSesCard({
|
|
|
88
97
|
const normalizedDescriptionSx = normalizeSx(descriptionProps?.sx)
|
|
89
98
|
const normalizedContentSx = normalizeSx(contentProps?.sx)
|
|
90
99
|
const normalizedActionsSx = normalizeSx(actionsProps?.sx)
|
|
100
|
+
const normalizedImageSx = normalizeSx(imageProps?.sx)
|
|
91
101
|
const normalizedLeadingActionsSx = normalizeSx(leadingActionsProps?.sx)
|
|
92
102
|
const normalizedTrailingActionsSx = normalizeSx(trailingActionsProps?.sx)
|
|
93
103
|
|
|
@@ -107,7 +117,29 @@ function RcSesCard({
|
|
|
107
117
|
...normalizedSx,
|
|
108
118
|
]}
|
|
109
119
|
>
|
|
110
|
-
|
|
120
|
+
{image ? (
|
|
121
|
+
<Box
|
|
122
|
+
{...imageProps}
|
|
123
|
+
data-testid={testIds?.image}
|
|
124
|
+
sx={[
|
|
125
|
+
{
|
|
126
|
+
alignItems: 'center',
|
|
127
|
+
display: 'flex',
|
|
128
|
+
justifyContent: 'center',
|
|
129
|
+
},
|
|
130
|
+
...normalizedImageSx,
|
|
131
|
+
]}
|
|
132
|
+
>
|
|
133
|
+
{image}
|
|
134
|
+
</Box>
|
|
135
|
+
) : null}
|
|
136
|
+
|
|
137
|
+
<Stack
|
|
138
|
+
{...headerProps}
|
|
139
|
+
data-testid={testIds?.header}
|
|
140
|
+
spacing={0.5}
|
|
141
|
+
sx={[centered ? { alignItems: 'center' } : {}, ...normalizeSx(headerProps?.sx)]}
|
|
142
|
+
>
|
|
111
143
|
<Typography
|
|
112
144
|
color={palette.grey[900]}
|
|
113
145
|
data-testid={testIds?.title}
|
|
@@ -116,6 +148,7 @@ function RcSesCard({
|
|
|
116
148
|
sx={[
|
|
117
149
|
{
|
|
118
150
|
lineHeight: '1.75rem',
|
|
151
|
+
...(centered ? { textAlign: 'center' } : {}),
|
|
119
152
|
},
|
|
120
153
|
...normalizedTitleSx,
|
|
121
154
|
]}
|
|
@@ -133,6 +166,7 @@ function RcSesCard({
|
|
|
133
166
|
{
|
|
134
167
|
fontWeight: 300,
|
|
135
168
|
lineHeight: '1.25rem',
|
|
169
|
+
...(centered ? { textAlign: 'center' } : {}),
|
|
136
170
|
},
|
|
137
171
|
...normalizedDescriptionSx,
|
|
138
172
|
]}
|
|
@@ -142,25 +176,27 @@ function RcSesCard({
|
|
|
142
176
|
)}
|
|
143
177
|
</Stack>
|
|
144
178
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
{
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
179
|
+
{children ? (
|
|
180
|
+
<Box
|
|
181
|
+
{...contentProps}
|
|
182
|
+
data-testid={testIds?.content}
|
|
183
|
+
sx={[
|
|
184
|
+
{
|
|
185
|
+
alignItems: 'center',
|
|
186
|
+
alignSelf: 'stretch',
|
|
187
|
+
...(contentBackground ? { backgroundColor: palette.grey[100] } : {}),
|
|
188
|
+
borderRadius: '0.5rem',
|
|
189
|
+
display: 'flex',
|
|
190
|
+
flexDirection: 'column',
|
|
191
|
+
gap: '1.5rem',
|
|
192
|
+
justifyContent: 'center',
|
|
193
|
+
},
|
|
194
|
+
...normalizedContentSx,
|
|
195
|
+
]}
|
|
196
|
+
>
|
|
197
|
+
{children}
|
|
198
|
+
</Box>
|
|
199
|
+
) : null}
|
|
164
200
|
|
|
165
201
|
{hasActions && (
|
|
166
202
|
<Stack
|
|
@@ -170,7 +206,10 @@ function RcSesCard({
|
|
|
170
206
|
sx={[
|
|
171
207
|
{
|
|
172
208
|
alignItems: { xs: 'stretch', md: 'center' },
|
|
173
|
-
justifyContent: {
|
|
209
|
+
justifyContent: {
|
|
210
|
+
xs: 'stretch',
|
|
211
|
+
md: leadingActions ? 'space-between' : 'flex-end',
|
|
212
|
+
},
|
|
174
213
|
pt: '0.5rem',
|
|
175
214
|
width: '100%',
|
|
176
215
|
},
|
|
@@ -185,6 +224,7 @@ function RcSesCard({
|
|
|
185
224
|
direction={{ xs: 'column', md: 'row' }}
|
|
186
225
|
sx={[
|
|
187
226
|
{
|
|
227
|
+
display: { xs: 'none', md: 'flex' },
|
|
188
228
|
alignItems: { xs: 'stretch', md: 'center' },
|
|
189
229
|
minHeight: { md: '2.75rem' },
|
|
190
230
|
width: { xs: '100%', md: 'auto' },
|
|
@@ -54,7 +54,7 @@ const PaginationButton = ({
|
|
|
54
54
|
<Button variant='text' color='inherit' disableRipple {...props} sx={baseButtonSx}>
|
|
55
55
|
{iconPosition === 'start' && icon}
|
|
56
56
|
|
|
57
|
-
<Box sx={{ display: { xs: 'none',
|
|
57
|
+
<Box sx={{ display: { xs: 'none', md: 'block' } }}>{label}</Box>
|
|
58
58
|
|
|
59
59
|
{iconPosition === 'end' && icon}
|
|
60
60
|
</Button>
|
|
@@ -25,7 +25,7 @@ const DataPagination = ({
|
|
|
25
25
|
nextLabel = 'Kitas',
|
|
26
26
|
}: DataPaginationProps) => {
|
|
27
27
|
const theme = useTheme()
|
|
28
|
-
const isMobile = useMediaQuery(theme.breakpoints.down('
|
|
28
|
+
const isMobile = useMediaQuery(theme.breakpoints.down('md'))
|
|
29
29
|
const isControlled = page !== undefined
|
|
30
30
|
const [internalPage, setInternalPage] = useState(defaultPage)
|
|
31
31
|
|