@am92/react-design-system 2.7.8 → 2.8.1
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/DsAppBar/DsAppBar.Component.d.ts +2 -5
- package/dist/Components/DsAppBar/DsAppBar.Component.js +19 -24
- package/dist/Components/DsAvatar/DsAvatar.Component.d.ts +3 -1
- package/dist/Components/DsAvatar/DsAvatar.Component.js +5 -1
- package/dist/Components/DsBottomSheet/DsBottomSheet.Component.d.ts +2 -7
- package/dist/Components/DsBottomSheet/DsBottomSheet.Component.js +62 -65
- package/dist/Components/DsButton/DsButton.Component.d.ts +2 -4
- package/dist/Components/DsButton/DsButton.Component.js +4 -7
- package/dist/Components/DsButtonGroup/DsButtonGroup.Component.d.ts +2 -6
- package/dist/Components/DsButtonGroup/DsButtonGroup.Component.js +16 -18
- package/dist/Components/DsCarousel/DsCarousel.Component/DsCarouselNavigation.d.ts +2 -3
- package/dist/Components/DsCarousel/DsCarousel.Component/DsCarouselNavigation.js +42 -44
- package/dist/Components/DsCarousel/DsCarousel.Component/DsCarouselPagination.d.ts +2 -6
- package/dist/Components/DsCarousel/DsCarousel.Component/DsCarouselPagination.js +109 -110
- package/dist/Components/DsCarousel/DsCarousel.Component/index.d.ts +3 -19
- package/dist/Components/DsCarousel/DsCarousel.Component/index.js +55 -57
- package/dist/Components/DsChip/DsChip.Component.d.ts +2 -5
- package/dist/Components/DsChip/DsChip.Component.js +3 -8
- package/dist/Components/DsChip/DsChip.Overrides.d.ts +1 -8
- package/dist/Components/DsChip/DsChip.Overrides.js +12 -57
- package/dist/Components/DsChip/DsChip.Types.d.ts +9 -2
- package/dist/Components/DsChipGroup/DsChipGroup.Component.d.ts +2 -5
- package/dist/Components/DsChipGroup/DsChipGroup.Component.js +5 -8
- package/dist/Components/DsContentSlider/DsContentSlider.Component.d.ts +3 -8
- package/dist/Components/DsContentSlider/DsContentSlider.Component.js +13 -20
- package/dist/Components/DsDialog/DsDialog.Component.d.ts +1 -6
- package/dist/Components/DsDialog/DsDialog.Component.js +71 -75
- package/dist/Components/DsDialog/DsDialog.Overrides.d.ts +1 -0
- package/dist/Components/DsDialog/DsDialog.Overrides.js +2 -0
- package/dist/Components/DsFileUploader/DsFileUploader.Component.d.ts +3 -16
- package/dist/Components/DsFileUploader/DsFileUploader.Component.js +68 -71
- package/dist/Components/DsHeader/DsHeader.Component.d.ts +2 -5
- package/dist/Components/DsHeader/DsHeader.Component.js +29 -32
- package/dist/Components/DsHelperText/DsHelperText.Component.d.ts +2 -5
- package/dist/Components/DsHelperText/DsHelperText.Component.js +16 -21
- package/dist/Components/DsHelperText/DsHelperText.Overrides.d.ts +5 -1
- package/dist/Components/DsHelperText/DsHelperText.Overrides.js +6 -1
- package/dist/Components/DsImage/DsImage.Component.d.ts +3 -12
- package/dist/Components/DsImage/DsImage.Component.js +40 -45
- package/dist/Components/DsImage/DsImage.Types.d.ts +0 -1
- package/dist/Components/DsImage/DsImage.Types.js +0 -3
- package/dist/Components/DsInputLabel/DsInputLabel.Component.d.ts +2 -4
- package/dist/Components/DsInputLabel/DsInputLabel.Component.js +6 -9
- package/dist/Components/DsNotistack/AlertMessage.Component.js +7 -9
- package/dist/Components/DsNotistack/DsNotistack.Component.d.ts +2 -7
- package/dist/Components/DsNotistack/DsNotistack.Component.js +12 -16
- package/dist/Components/DsNotistack/DsNotistack.Types.d.ts +1 -0
- package/dist/Components/DsNotistack/DsNotistack.Types.js +3 -1
- package/dist/Components/DsOtp/DsOtp.Component.d.ts +3 -15
- package/dist/Components/DsOtp/DsOtp.Component.js +41 -51
- package/dist/Components/DsPopup/DsPopup.Types.d.ts +1 -1
- package/dist/Components/DsProgressIndicator/DsProgressIndicator.Component.d.ts +2 -6
- package/dist/Components/DsProgressIndicator/DsProgressIndicator.Component.js +18 -21
- package/dist/Components/DsProgressTracker/DsProgressStepper.Component.d.ts +3 -9
- package/dist/Components/DsProgressTracker/DsProgressStepper.Component.js +8 -11
- package/dist/Components/DsProgressTracker/DsProgressTracker.Component.d.ts +3 -21
- package/dist/Components/DsProgressTracker/DsProgressTracker.Component.js +17 -26
- package/dist/Components/DsRadio/DsRadio.Component.d.ts +2 -5
- package/dist/Components/DsRadio/DsRadio.Component.js +5 -8
- package/dist/Components/DsRadio/DsRadio.Overrides.d.ts +1 -0
- package/dist/Components/DsRadio/DsRadio.Overrides.js +2 -1
- package/dist/Components/DsRemixIcon/DsRemixIcon.Component.d.ts +2 -4
- package/dist/Components/DsRemixIcon/DsRemixIcon.Component.js +5 -7
- package/dist/Components/DsSelect/DsSelect.Component.d.ts +2 -6
- package/dist/Components/DsSelect/DsSelect.Component.js +49 -53
- package/dist/Components/DsSelect/DsSelect.Types.d.ts +8 -0
- package/dist/Components/DsSlider/DsSlider.Component.d.ts +1 -5
- package/dist/Components/DsSlider/DsSlider.Component.js +1 -10
- package/dist/Components/DsSlider/DsSlider.Overrides.d.ts +1 -1
- package/dist/Components/DsSlider/DsSlider.Overrides.js +2 -2
- package/dist/Components/DsSwitch/DsSwitch.Component.d.ts +2 -6
- package/dist/Components/DsSwitch/DsSwitch.Component.js +7 -10
- package/dist/Components/DsTag/DsTag.Component.d.ts +2 -7
- package/dist/Components/DsTag/DsTag.Component.js +50 -14
- package/dist/Components/DsTag/DsTag.Overrides.d.ts +5 -1
- package/dist/Components/DsTag/DsTag.Overrides.js +6 -2
- package/dist/Components/DsTagGroup/DsTagGroup.Component.d.ts +2 -7
- package/dist/Components/DsTagGroup/DsTagGroup.Component.js +25 -27
- package/dist/Components/DsTextArea/DsTextArea.Component.d.ts +3 -10
- package/dist/Components/DsTextArea/DsTextArea.Component.js +49 -54
- package/dist/Components/DsTextArea/DsTextArea.Types.d.ts +0 -1
- package/dist/Components/DsTextArea/DsTextArea.Types.js +1 -3
- package/dist/Components/DsTextField/DsTextField.Component.d.ts +2 -4
- package/dist/Components/DsTextField/DsTextField.Component.js +7 -8
- package/dist/Components/DsTextFieldPassword/DsTextFieldPassword.Component.d.ts +3 -10
- package/dist/Components/DsTextFieldPassword/DsTextFieldPassword.Component.js +15 -26
- package/dist/Components/DsTextFieldPassword/DsTextFieldPassword.Types.d.ts +0 -1
- package/dist/Components/DsTextFieldPassword/DsTextFieldPassword.Types.js +0 -3
- package/dist/Components/DsToast/DsToast.Component.d.ts +2 -4
- package/dist/Components/DsToast/DsToast.Component.js +9 -7
- package/dist/Components/DsToggle/DsToggle.Component.d.ts +2 -5
- package/dist/Components/DsToggle/DsToggle.Component.js +11 -9
- package/dist/Components/DsToggle/DsToggle.Types.js +1 -1
- package/dist/Components/DsTooltip/DsTooltip.Component.d.ts +2 -5
- package/dist/Components/DsTooltip/DsTooltip.Component.js +7 -9
- package/dist/Constants/TYPOGRAPGHY.d.ts +4 -1
- package/dist/Constants/TYPOGRAPGHY.js +3 -0
- package/dist/Helpers/accessibility.d.ts +3 -0
- package/dist/Helpers/accessibility.js +14 -0
- package/dist/Helpers/index.d.ts +1 -0
- package/dist/Helpers/index.js +1 -0
- package/dist/Hooks/accessibility.d.ts +9 -0
- package/dist/Hooks/accessibility.js +35 -0
- package/dist/Hooks/index.d.ts +1 -0
- package/dist/Hooks/index.js +1 -0
- package/dist/Theme/componentOverrides.d.ts +8 -12
- package/dist/Theme/getColorScheme/dark.js +1 -1
- package/dist/Types/DsAccessibility.d.ts +1 -0
- package/dist/Types/DsAccessibility.js +1 -0
- package/dist/Types/index.d.ts +1 -0
- package/dist/Types/index.js +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FC } from 'react';
|
|
2
2
|
import { DsAppBarProps } from './DsAppBar.Types';
|
|
3
|
-
export declare
|
|
4
|
-
static defaultProps: DsAppBarProps;
|
|
5
|
-
render(): import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
}
|
|
3
|
+
export declare const DsAppBar: FC<DsAppBarProps>;
|
|
@@ -1,30 +1,25 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { PureComponent } from 'react';
|
|
3
2
|
import AppBar from '@mui/material/AppBar';
|
|
4
3
|
import Toolbar from '@mui/material/Toolbar';
|
|
5
4
|
import { DsBox } from '../DsBox';
|
|
6
5
|
import { DsTypography } from '../DsTypography';
|
|
7
6
|
import { DsStack } from '../DsStack';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
ml: 'var(--ds-spacing-bitterCold)'
|
|
28
|
-
}, children: actions }))] }) }));
|
|
29
|
-
}
|
|
30
|
-
}
|
|
7
|
+
export const DsAppBar = (props) => {
|
|
8
|
+
const { navigation, appBarTitle, actions, ...appBarProps } = props;
|
|
9
|
+
const contentJSX = typeof appBarTitle === 'string' ? (_jsx(DsTypography, { variant: "headingBoldSmall", color: "inherit", children: appBarTitle })) : (appBarTitle);
|
|
10
|
+
return (_jsx(AppBar, { ...appBarProps, children: _jsxs(Toolbar, { children: [navigation && (_jsx(DsBox, { sx: {
|
|
11
|
+
display: 'flex',
|
|
12
|
+
justifyContent: 'center',
|
|
13
|
+
alignItems: 'center',
|
|
14
|
+
pr: 'var(--ds-spacing-bitterCold)'
|
|
15
|
+
}, children: navigation })), _jsx(DsBox, { sx: {
|
|
16
|
+
display: 'inline-flex',
|
|
17
|
+
justifyContent: 'start',
|
|
18
|
+
alignItems: 'center',
|
|
19
|
+
flexGrow: 1
|
|
20
|
+
}, children: contentJSX }), actions && (_jsx(DsStack, { direction: "row", spacing: "var(--ds-spacing-bitterCold)", sx: {
|
|
21
|
+
justifyContent: 'center',
|
|
22
|
+
alignItems: 'center',
|
|
23
|
+
ml: 'var(--ds-spacing-bitterCold)'
|
|
24
|
+
}, children: actions }))] }) }));
|
|
25
|
+
};
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { FC } from 'react';
|
|
2
2
|
import { DsBottomSheetProps } from './DsBottomSheet.Types';
|
|
3
|
-
export declare
|
|
4
|
-
static defaultProps: DsBottomSheetProps;
|
|
5
|
-
handleDrawerClose: (event: React.SyntheticEvent, reason: "backdropClick" | "escapeKeyDown") => void;
|
|
6
|
-
handleCloseClick: (event: React.SyntheticEvent) => void;
|
|
7
|
-
render(): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
}
|
|
3
|
+
export declare const DsBottomSheet: FC<DsBottomSheetProps>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { PureComponent } from 'react';
|
|
3
2
|
import { DsRemixIcon } from '../DsRemixIcon';
|
|
4
3
|
import { DsTypography } from '../DsTypography';
|
|
5
4
|
import { DsIconButton } from '../DsIconButton';
|
|
@@ -10,76 +9,74 @@ import { DsDialogContent } from '../DsDialogContent';
|
|
|
10
9
|
import { DsButton } from '../DsButton';
|
|
11
10
|
import { DsDialogActions } from '../DsDialogActions';
|
|
12
11
|
import { DsPaper } from '../DsPaper';
|
|
13
|
-
export
|
|
14
|
-
|
|
15
|
-
handleDrawerClose = (event, reason) => {
|
|
16
|
-
const { onClose } =
|
|
12
|
+
export const DsBottomSheet = (inProps) => {
|
|
13
|
+
const props = { ...DsBottomSheetDefaultProps, ...inProps };
|
|
14
|
+
const handleDrawerClose = (event, reason) => {
|
|
15
|
+
const { onClose } = props;
|
|
17
16
|
if (typeof onClose === 'function') {
|
|
18
17
|
onClose(event, reason);
|
|
19
18
|
}
|
|
20
19
|
};
|
|
21
|
-
handleCloseClick = (event) => {
|
|
22
|
-
const { onClose } =
|
|
20
|
+
const handleCloseClick = (event) => {
|
|
21
|
+
const { onClose } = props;
|
|
23
22
|
if (typeof onClose === 'function') {
|
|
24
23
|
onClose(event, 'backdropClick');
|
|
25
24
|
}
|
|
26
25
|
};
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
accessibilityProps['aria-describedby'] = kicker;
|
|
40
|
-
}
|
|
41
|
-
return (_jsxs(DsDrawer, { ...accessibilityProps, ...DrawerProps, anchor: "bottom", PaperProps: {
|
|
42
|
-
...PaperProps,
|
|
43
|
-
sx: {
|
|
44
|
-
background: 'transparent',
|
|
45
|
-
maxHeight: 'var(--ds-rules-bottomSheetWorkingAreaHeight)',
|
|
46
|
-
...PaperProps?.sx
|
|
47
|
-
}
|
|
48
|
-
}, onClose: this.handleDrawerClose, children: [showClose && (_jsx(DsIconButton, { onClick: this.handleCloseClick, ...CloseIconButtonProps, sx: {
|
|
49
|
-
flexGrow: 0,
|
|
50
|
-
alignSelf: 'center',
|
|
51
|
-
backgroundColor: 'var(--ds-colour-iconDefault)',
|
|
52
|
-
color: 'var(--ds-colour-iconDisabled)',
|
|
53
|
-
borderRadius: '50%',
|
|
54
|
-
p: 'var(--ds-spacing-glacial)',
|
|
55
|
-
mb: 'var(--ds-spacing-bitterCold)',
|
|
56
|
-
...CloseIconButtonProps?.sx
|
|
57
|
-
}, children: _jsx(DsRemixIcon, { className: "ri-close-line", ...CloseIconProps }) })), _jsxs(DsPaper, { ...ContainerProps, sx: {
|
|
58
|
-
minHeight: 0,
|
|
59
|
-
display: 'flex',
|
|
60
|
-
flexDirection: 'column',
|
|
61
|
-
flexGrow: 1,
|
|
62
|
-
pt: 'var(--ds-spacing-mild)',
|
|
63
|
-
borderTopLeftRadius: 'var(--ds-radius-bitterCold)',
|
|
64
|
-
borderTopRightRadius: 'var(--ds-radius-bitterCold)',
|
|
65
|
-
pb: isFlushed ? undefined : 'var(--ds-spacing-bitterCold)',
|
|
66
|
-
...ContainerProps?.sx
|
|
67
|
-
}, children: [kicker && (_jsx(DsTypography, { variant: "subheadingSemiboldDefault", color: "text.tertiary", ...KickerProps, sx: {
|
|
68
|
-
px: 'var(--ds-spacing-bitterCold)',
|
|
69
|
-
mb: 'var(--ds-spacing-quickFreeze)',
|
|
70
|
-
textTransform: 'uppercase',
|
|
71
|
-
...KickerProps?.sx
|
|
72
|
-
}, children: kicker })), title && (_jsx(DsDialogTitle, { ...TitleProps, sx: {
|
|
73
|
-
mb: 'var(--ds-spacing-zero)',
|
|
74
|
-
px: 'var(--ds-spacing-bitterCold)',
|
|
75
|
-
...TitleProps?.sx
|
|
76
|
-
}, children: title })), children && (_jsx(DsDialogContent, { ...ContentProps, sx: {
|
|
77
|
-
px: 'var(--ds-spacing-bitterCold)',
|
|
78
|
-
marginTop: 'var(--ds-spacing-mild)',
|
|
79
|
-
...ContentProps?.sx
|
|
80
|
-
}, children: children })), actionsAvailable && (_jsxs(DsDialogActions, { ...ActionsProps, sx: {
|
|
81
|
-
px: isFlushed ? undefined : 'var(--ds-spacing-bitterCold)',
|
|
82
|
-
...ActionsProps?.sx
|
|
83
|
-
}, children: [(secondaryButtonText || secondaryButtonProps?.children) && (_jsx(DsButton, { color: "secondary", size: "large", fullWidth: true, ...secondaryButtonProps, children: secondaryButtonText || secondaryButtonProps?.children })), (primaryButtonText || primaryButtonProps?.children) && (_jsx(DsButton, { size: "large", fullWidth: true, ...primaryButtonProps, children: primaryButtonText || primaryButtonProps?.children }))] }))] })] }));
|
|
26
|
+
const { kicker, title, showClose, primaryButtonText, primaryButtonProps, secondaryButtonText, secondaryButtonProps, PaperProps, ContainerProps, KickerProps, TitleProps, CloseIconButtonProps, CloseIconProps, ContentProps, ActionsProps, children, onClose, ...DrawerProps } = props;
|
|
27
|
+
const actionsAvailable = !!(primaryButtonText || secondaryButtonText);
|
|
28
|
+
const isFlushed = primaryButtonText &&
|
|
29
|
+
!secondaryButtonText &&
|
|
30
|
+
primaryButtonProps &&
|
|
31
|
+
primaryButtonProps?.variant === 'flushed';
|
|
32
|
+
const accessibilityProps = {};
|
|
33
|
+
if (title) {
|
|
34
|
+
accessibilityProps['aria-labelledby'] = title;
|
|
35
|
+
}
|
|
36
|
+
if (kicker) {
|
|
37
|
+
accessibilityProps['aria-describedby'] = kicker;
|
|
84
38
|
}
|
|
85
|
-
|
|
39
|
+
return (_jsxs(DsDrawer, { ...accessibilityProps, ...DrawerProps, anchor: "bottom", PaperProps: {
|
|
40
|
+
...PaperProps,
|
|
41
|
+
sx: {
|
|
42
|
+
background: 'transparent',
|
|
43
|
+
maxHeight: 'var(--ds-rules-bottomSheetWorkingAreaHeight)',
|
|
44
|
+
...PaperProps?.sx
|
|
45
|
+
}
|
|
46
|
+
}, onClose: handleDrawerClose, children: [showClose && (_jsx(DsIconButton, { onClick: handleCloseClick, ...CloseIconButtonProps, sx: {
|
|
47
|
+
flexGrow: 0,
|
|
48
|
+
alignSelf: 'center',
|
|
49
|
+
backgroundColor: 'var(--ds-colour-iconDefault)',
|
|
50
|
+
color: 'var(--ds-colour-iconDisabled)',
|
|
51
|
+
borderRadius: '50%',
|
|
52
|
+
p: 'var(--ds-spacing-glacial)',
|
|
53
|
+
mb: 'var(--ds-spacing-bitterCold)',
|
|
54
|
+
...CloseIconButtonProps?.sx
|
|
55
|
+
}, children: _jsx(DsRemixIcon, { className: "ri-close-line", ...CloseIconProps }) })), _jsxs(DsPaper, { ...ContainerProps, sx: {
|
|
56
|
+
minHeight: 0,
|
|
57
|
+
display: 'flex',
|
|
58
|
+
flexDirection: 'column',
|
|
59
|
+
flexGrow: 1,
|
|
60
|
+
pt: 'var(--ds-spacing-mild)',
|
|
61
|
+
borderTopLeftRadius: 'var(--ds-radius-bitterCold)',
|
|
62
|
+
borderTopRightRadius: 'var(--ds-radius-bitterCold)',
|
|
63
|
+
pb: isFlushed ? undefined : 'var(--ds-spacing-bitterCold)',
|
|
64
|
+
...ContainerProps?.sx
|
|
65
|
+
}, children: [kicker && (_jsx(DsTypography, { variant: "subheadingSemiboldDefault", color: "text.tertiary", ...KickerProps, sx: {
|
|
66
|
+
px: 'var(--ds-spacing-bitterCold)',
|
|
67
|
+
mb: 'var(--ds-spacing-quickFreeze)',
|
|
68
|
+
textTransform: 'uppercase',
|
|
69
|
+
...KickerProps?.sx
|
|
70
|
+
}, children: kicker })), title && (_jsx(DsDialogTitle, { ...TitleProps, sx: {
|
|
71
|
+
mb: 'var(--ds-spacing-zero)',
|
|
72
|
+
px: 'var(--ds-spacing-bitterCold)',
|
|
73
|
+
...TitleProps?.sx
|
|
74
|
+
}, children: title })), children && (_jsx(DsDialogContent, { ...ContentProps, sx: {
|
|
75
|
+
px: 'var(--ds-spacing-bitterCold)',
|
|
76
|
+
marginTop: 'var(--ds-spacing-mild)',
|
|
77
|
+
...ContentProps?.sx
|
|
78
|
+
}, children: children })), actionsAvailable && (_jsxs(DsDialogActions, { ...ActionsProps, sx: {
|
|
79
|
+
px: isFlushed ? undefined : 'var(--ds-spacing-bitterCold)',
|
|
80
|
+
...ActionsProps?.sx
|
|
81
|
+
}, children: [(secondaryButtonText || secondaryButtonProps?.children) && (_jsx(DsButton, { color: "secondary", size: "large", fullWidth: true, ...secondaryButtonProps, children: secondaryButtonText || secondaryButtonProps?.children })), (primaryButtonText || primaryButtonProps?.children) && (_jsx(DsButton, { size: "large", fullWidth: true, ...primaryButtonProps, children: primaryButtonText || primaryButtonProps?.children }))] }))] })] }));
|
|
82
|
+
};
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FC } from 'react';
|
|
2
2
|
import { DsButtonProps } from './DsButton.Types';
|
|
3
|
-
export declare
|
|
4
|
-
render(): import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
}
|
|
3
|
+
export declare const DsButton: FC<DsButtonProps>;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { PureComponent } from 'react';
|
|
3
2
|
import Button from '@mui/material/Button';
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
}
|
|
3
|
+
export const DsButton = (props) => {
|
|
4
|
+
const { children, ...buttonProps } = props;
|
|
5
|
+
return (_jsx(Button, { ...buttonProps, children: _jsx("span", { children: children }) }));
|
|
6
|
+
};
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FC } from 'react';
|
|
2
2
|
import { DsButtonGroupProps } from './DsButtonGroup.Types';
|
|
3
|
-
export declare
|
|
4
|
-
static defaultProps: DsButtonGroupProps;
|
|
5
|
-
getMergedProps: () => DsButtonGroupProps;
|
|
6
|
-
render(): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
}
|
|
3
|
+
export declare const DsButtonGroup: FC<DsButtonGroupProps>;
|
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import React
|
|
2
|
+
import React from 'react';
|
|
3
3
|
import { DsStack } from '../DsStack';
|
|
4
4
|
import { DsButtonGroupDefaultProps } from './DsButtonGroup.Types';
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
getMergedProps = () => {
|
|
8
|
-
return { ...DsButtonGroupDefaultProps, ...
|
|
5
|
+
export const DsButtonGroup = (inProps) => {
|
|
6
|
+
const props = { ...DsButtonGroupDefaultProps, ...inProps };
|
|
7
|
+
const getMergedProps = () => {
|
|
8
|
+
return { ...DsButtonGroupDefaultProps, ...props };
|
|
9
9
|
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
}
|
|
10
|
+
const mergedProps = getMergedProps();
|
|
11
|
+
const { fullWidth, noPadding, size, sx, children, ...restProps } = mergedProps;
|
|
12
|
+
const childrenArray = children instanceof Array ? children : [children];
|
|
13
|
+
return (_jsx(DsStack, { direction: "row", spacing: "var(--ds-spacing-frostbite)", sx: {
|
|
14
|
+
bgcolor: 'var(--ds-colour-surfacePrimary)',
|
|
15
|
+
p: noPadding
|
|
16
|
+
? 'var(--ds-spacing-zero)'
|
|
17
|
+
: 'var(--ds-spacing-bitterCold)',
|
|
18
|
+
...sx
|
|
19
|
+
}, ...restProps, children: childrenArray.map((child, key) => child && React.cloneElement(child, { key, size, fullWidth })) }));
|
|
20
|
+
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { DsCarouselNavigationProps } from '../DsCarousel.Types';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
3
|
+
declare const DsCarouselNavigation: React.FC<DsCarouselNavigationProps>;
|
|
4
|
+
export default DsCarouselNavigation;
|
|
@@ -1,48 +1,46 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import * as React from 'react';
|
|
3
2
|
import { DsIconButton } from '../../DsIconButton';
|
|
4
3
|
import { DsRemixIcon } from '../../DsRemixIcon';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
return false;
|
|
10
|
-
}
|
|
11
|
-
const { PrevButtonProps = {}, NextButtonProps = {} } = NavigationProps;
|
|
12
|
-
const { IconProps: PrevIconProps, ...PrevIconButtonProps } = PrevButtonProps;
|
|
13
|
-
const { IconProps: NextIconProps, ...NextIconButtonProps } = NextButtonProps;
|
|
14
|
-
return (_jsxs(_Fragment, { children: [_jsx(DsIconButton, { className: `swiper-button-prev-${uid}`, ...PrevIconButtonProps, sx: {
|
|
15
|
-
position: 'absolute',
|
|
16
|
-
top: '50%',
|
|
17
|
-
transform: 'translateY(-50%)',
|
|
18
|
-
left: 'var(--ds-spacing-mild)',
|
|
19
|
-
p: 'var(--ds-spacing-quickFreeze)',
|
|
20
|
-
borderRadius: 'var(--ds-radius-bitterCold)',
|
|
21
|
-
backgroundColor: 'var(--ds-colour-surfaceSecondary)',
|
|
22
|
-
zIndex: 1,
|
|
23
|
-
'&:hover': {
|
|
24
|
-
backgroundColor: 'var(--ds-colour-stateSelectedPrimaryHover)'
|
|
25
|
-
},
|
|
26
|
-
'&.Mui-disabled': {
|
|
27
|
-
pointerEvents: 'unset'
|
|
28
|
-
},
|
|
29
|
-
...PrevIconButtonProps?.sx
|
|
30
|
-
}, children: _jsx(DsRemixIcon, { className: "ri-arrow-left-s-line", ...PrevIconProps }) }), _jsx(DsIconButton, { className: `swiper-button-next-${uid}`, ...NextIconButtonProps, sx: {
|
|
31
|
-
position: 'absolute',
|
|
32
|
-
top: '50%',
|
|
33
|
-
transform: 'translateY(-50%)',
|
|
34
|
-
right: 'var(--ds-spacing-mild)',
|
|
35
|
-
p: 'var(--ds-spacing-quickFreeze)',
|
|
36
|
-
borderRadius: 'var(--ds-radius-bitterCold)',
|
|
37
|
-
backgroundColor: 'var(--ds-colour-surfaceSecondary)',
|
|
38
|
-
zIndex: 1,
|
|
39
|
-
'&:hover': {
|
|
40
|
-
backgroundColor: 'var(--ds-colour-stateSelectedPrimaryHover)'
|
|
41
|
-
},
|
|
42
|
-
'&.Mui-disabled': {
|
|
43
|
-
pointerEvents: 'unset'
|
|
44
|
-
},
|
|
45
|
-
...NextIconButtonProps?.sx
|
|
46
|
-
}, children: _jsx(DsRemixIcon, { className: "ri-arrow-right-s-line", ...NextIconProps }) })] }));
|
|
4
|
+
const DsCarouselNavigation = (props) => {
|
|
5
|
+
const { uid, isEnabled, NavigationProps = {} } = props;
|
|
6
|
+
if (!isEnabled) {
|
|
7
|
+
return false;
|
|
47
8
|
}
|
|
48
|
-
}
|
|
9
|
+
const { PrevButtonProps = {}, NextButtonProps = {} } = NavigationProps;
|
|
10
|
+
const { IconProps: PrevIconProps, ...PrevIconButtonProps } = PrevButtonProps;
|
|
11
|
+
const { IconProps: NextIconProps, ...NextIconButtonProps } = NextButtonProps;
|
|
12
|
+
return (_jsxs(_Fragment, { children: [_jsx(DsIconButton, { className: `swiper-button-prev-${uid}`, ...PrevIconButtonProps, sx: {
|
|
13
|
+
position: 'absolute',
|
|
14
|
+
top: '50%',
|
|
15
|
+
transform: 'translateY(-50%)',
|
|
16
|
+
left: 'var(--ds-spacing-mild)',
|
|
17
|
+
p: 'var(--ds-spacing-quickFreeze)',
|
|
18
|
+
borderRadius: 'var(--ds-radius-bitterCold)',
|
|
19
|
+
backgroundColor: 'var(--ds-colour-surfaceSecondary)',
|
|
20
|
+
zIndex: 1,
|
|
21
|
+
'&:hover': {
|
|
22
|
+
backgroundColor: 'var(--ds-colour-stateSelectedPrimaryHover)'
|
|
23
|
+
},
|
|
24
|
+
'&.Mui-disabled': {
|
|
25
|
+
pointerEvents: 'unset'
|
|
26
|
+
},
|
|
27
|
+
...PrevIconButtonProps?.sx
|
|
28
|
+
}, children: _jsx(DsRemixIcon, { className: "ri-arrow-left-s-line", ...PrevIconProps }) }), _jsx(DsIconButton, { className: `swiper-button-next-${uid}`, ...NextIconButtonProps, sx: {
|
|
29
|
+
position: 'absolute',
|
|
30
|
+
top: '50%',
|
|
31
|
+
transform: 'translateY(-50%)',
|
|
32
|
+
right: 'var(--ds-spacing-mild)',
|
|
33
|
+
p: 'var(--ds-spacing-quickFreeze)',
|
|
34
|
+
borderRadius: 'var(--ds-radius-bitterCold)',
|
|
35
|
+
backgroundColor: 'var(--ds-colour-surfaceSecondary)',
|
|
36
|
+
zIndex: 1,
|
|
37
|
+
'&:hover': {
|
|
38
|
+
backgroundColor: 'var(--ds-colour-stateSelectedPrimaryHover)'
|
|
39
|
+
},
|
|
40
|
+
'&.Mui-disabled': {
|
|
41
|
+
pointerEvents: 'unset'
|
|
42
|
+
},
|
|
43
|
+
...NextIconButtonProps?.sx
|
|
44
|
+
}, children: _jsx(DsRemixIcon, { className: "ri-arrow-right-s-line", ...NextIconProps }) })] }));
|
|
45
|
+
};
|
|
46
|
+
export default DsCarouselNavigation;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { DsCarouselPaginationProps } from '../DsCarousel.Types';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
componentDidMount(): void;
|
|
6
|
-
handleFirstTransition: () => void;
|
|
7
|
-
render(): false | import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
}
|
|
3
|
+
declare const DsCarouselPagination: React.FC<DsCarouselPaginationProps>;
|
|
4
|
+
export default DsCarouselPagination;
|