@am92/react-design-system 2.7.8 → 2.8.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/DsAppBar/DsAppBar.Component.d.ts +2 -5
- package/dist/Components/DsAppBar/DsAppBar.Component.js +19 -24
- 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 +1 -6
- package/dist/Components/DsChip/DsChip.Component.js +1 -10
- package/dist/Components/DsChip/DsChip.Types.d.ts +1 -0
- package/dist/Components/DsChip/DsChip.Types.js +2 -1
- 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/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 +10 -13
- 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/Theme/componentOverrides.d.ts +3 -4
- package/package.json +1 -1
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FC } from 'react';
|
|
2
2
|
import { DsTextFieldProps } from './DsTextField.Types';
|
|
3
|
-
export declare
|
|
4
|
-
render(): import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
}
|
|
3
|
+
export declare const DsTextField: FC<DsTextFieldProps>;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { DsTextFieldDefaultProps } from './DsTextField.Types';
|
|
3
3
|
import { DsFormControl } from '../DsFormControl';
|
|
4
4
|
import { DsInputLabel } from '../DsInputLabel';
|
|
5
5
|
import { DsInputBase } from '../DsInputBase';
|
|
6
6
|
import { DsHelperText } from '../DsHelperText';
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
7
|
+
export const DsTextField = (inProps) => {
|
|
8
|
+
const props = { ...DsTextFieldDefaultProps, ...inProps };
|
|
9
|
+
const { id, name, label, labelSupportText, color, helperText, success, error, sx, fullWidth, ref, inputRef, disabled, required, FormControlProps, InputLabelProps, HelperTextProps, ...inputBaseProps } = props;
|
|
10
|
+
const customColor = success ? 'success' : color;
|
|
11
|
+
return (_jsxs(DsFormControl, { fullWidth: fullWidth, color: customColor, error: error, sx: sx, disabled: disabled, required: required, ...FormControlProps, children: [_jsx(DsInputLabel, { label: label, labelSupportText: labelSupportText, error: error, success: success, htmlFor: id || name, disabled: disabled, required: required, ...InputLabelProps }), _jsx(DsInputBase, { fullWidth: fullWidth, color: customColor, error: error, id: id || name, name: name, inputRef: ref || inputRef, disabled: disabled, required: required, ...inputBaseProps }), _jsx(DsHelperText, { helperText: helperText, color: color, success: success, error: error, ...HelperTextProps })] }));
|
|
12
|
+
};
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { DsTextFieldPasswordProps
|
|
3
|
-
export declare
|
|
4
|
-
static defaultProps: DsTextFieldPasswordProps;
|
|
5
|
-
state: DsTextFieldPasswordState;
|
|
6
|
-
constructor(props: DsTextFieldPasswordProps);
|
|
7
|
-
getMergedProps: () => DsTextFieldPasswordProps;
|
|
8
|
-
handleTogglePassword: () => void;
|
|
9
|
-
render(): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
}
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { DsTextFieldPasswordProps } from './DsTextFieldPassword.Types';
|
|
3
|
+
export declare const DsTextFieldPassword: FC<DsTextFieldPasswordProps>;
|
|
@@ -1,30 +1,19 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import React, {
|
|
2
|
+
import React, { useState } from 'react';
|
|
3
3
|
import { DsInputAdornment } from '../DsInputAdornment';
|
|
4
4
|
import { DsTextField } from '../DsTextField';
|
|
5
|
-
import { DsTextFieldPasswordDefaultProps
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
super(props);
|
|
11
|
-
this.state = {
|
|
12
|
-
...DsTextFieldPasswordDefaultState,
|
|
13
|
-
isVisible: props.isVisible
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
getMergedProps = () => {
|
|
17
|
-
return { ...DsTextFieldPasswordDefaultProps, ...this.props };
|
|
5
|
+
import { DsTextFieldPasswordDefaultProps } from './DsTextFieldPassword.Types';
|
|
6
|
+
export const DsTextFieldPassword = (props) => {
|
|
7
|
+
const [isVisible, setIsVisible] = useState(false);
|
|
8
|
+
const getMergedProps = () => {
|
|
9
|
+
return { ...DsTextFieldPasswordDefaultProps, ...props };
|
|
18
10
|
};
|
|
19
|
-
handleTogglePassword = () =>
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
return (_jsx(DsTextField, { ...restProps, disabled: disabled, type: inputType, endAdornment: _jsx(DsInputAdornment, { position: "end", onClick: (!disabled && this.handleTogglePassword) || undefined, children: endAdornment }) }));
|
|
29
|
-
}
|
|
30
|
-
}
|
|
11
|
+
const handleTogglePassword = () => setIsVisible(!isVisible);
|
|
12
|
+
const mergedProps = getMergedProps();
|
|
13
|
+
const { type, isVisible: isVisibleProp, disabled, toggleNode, ...restProps } = mergedProps;
|
|
14
|
+
const inputType = (isVisible && type) || 'password';
|
|
15
|
+
const endAdornment = isVisible
|
|
16
|
+
? React.cloneElement(toggleNode?.toHide || _jsx(_Fragment, {}), { disabled })
|
|
17
|
+
: React.cloneElement(toggleNode?.toShow || _jsx(_Fragment, {}), { disabled });
|
|
18
|
+
return (_jsx(DsTextField, { ...restProps, disabled: disabled, type: inputType, endAdornment: _jsx(DsInputAdornment, { position: "end", onClick: (!disabled && handleTogglePassword) || undefined, children: endAdornment }) }));
|
|
19
|
+
};
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FC } from 'react';
|
|
2
2
|
import { DsToastProps } from './DsToast.Types';
|
|
3
|
-
export declare
|
|
4
|
-
render(): import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
}
|
|
3
|
+
export declare const DsToast: FC<DsToastProps>;
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { PureComponent } from 'react';
|
|
3
2
|
import Alert from '@mui/material/Alert';
|
|
4
3
|
import { DsRemixIcon } from '../DsRemixIcon';
|
|
4
|
+
import { useThemeProps } from '@mui/system';
|
|
5
5
|
const CloseIcon = (props) => {
|
|
6
6
|
const { ownerState, ...restProps } = props;
|
|
7
7
|
return (_jsx(DsRemixIcon, { fontSize: "mild", className: "ri-close-line", ...restProps }));
|
|
8
8
|
};
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
}
|
|
9
|
+
export const DsToast = (inProps) => {
|
|
10
|
+
const props = useThemeProps({
|
|
11
|
+
props: inProps,
|
|
12
|
+
name: 'MuiAlert'
|
|
13
|
+
});
|
|
14
|
+
const { forwardedRef, ...restProps } = props;
|
|
15
|
+
return (_jsx(Alert, { ref: forwardedRef, ...restProps, slots: { closeIcon: CloseIcon, ...restProps?.slots } }));
|
|
16
|
+
};
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { FC } from 'react';
|
|
2
2
|
import { DsToggleProps } from './DsToggle.Types';
|
|
3
|
-
export declare
|
|
4
|
-
handleChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
5
|
-
render(): import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
}
|
|
3
|
+
export declare const DsToggle: FC<DsToggleProps>;
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { PureComponent } from 'react';
|
|
3
2
|
import Switch from '@mui/material/Switch';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import { useThemeProps } from '@mui/system';
|
|
4
|
+
export const DsToggle = (inProps) => {
|
|
5
|
+
const props = useThemeProps({
|
|
6
|
+
props: inProps,
|
|
7
|
+
name: 'DsToggle'
|
|
8
|
+
});
|
|
9
|
+
const handleChange = (event) => {
|
|
10
|
+
const { onChange } = props;
|
|
7
11
|
const { name, checked } = event.target;
|
|
8
12
|
if (typeof onChange === 'function') {
|
|
9
13
|
onChange(name, checked);
|
|
10
14
|
}
|
|
11
15
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
}
|
|
16
|
+
const { value, onChange, ...restProps } = props;
|
|
17
|
+
return (_jsx(Switch, { ...restProps, color: "secondary", checked: value, onChange: handleChange }));
|
|
18
|
+
};
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FC } from 'react';
|
|
2
2
|
import { DsTooltipProps } from './DsTooltip.Types';
|
|
3
|
-
export declare
|
|
4
|
-
renderTitle: () => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
render(): import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
}
|
|
3
|
+
export declare const DsTooltip: FC<DsTooltipProps>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import React
|
|
2
|
+
import React from 'react';
|
|
3
3
|
import Tooltip from '@mui/material/Tooltip';
|
|
4
4
|
import { DsTypography } from '../DsTypography';
|
|
5
5
|
import { DsLink } from '../DsLink';
|
|
6
|
-
export
|
|
7
|
-
renderTitle = () => {
|
|
8
|
-
const { heading, description, buttonGroup } =
|
|
6
|
+
export const DsTooltip = (props) => {
|
|
7
|
+
const renderTitle = () => {
|
|
8
|
+
const { heading, description, buttonGroup } = props;
|
|
9
9
|
const tooltipButtonGroup = buttonGroup
|
|
10
10
|
? React.cloneElement(buttonGroup, {
|
|
11
11
|
size: 'small',
|
|
@@ -16,8 +16,6 @@ export class DsTooltip extends PureComponent {
|
|
|
16
16
|
: false;
|
|
17
17
|
return (_jsxs(_Fragment, { children: [heading && (_jsx(DsTypography, { component: "div", variant: "bodyBoldMedium", sx: { mb: 'var(--ds-spacing-glacial)' }, children: heading })), description && (_jsx(DsTypography, { component: "div", variant: "bodyRegularMedium", children: description })), tooltipButtonGroup] }));
|
|
18
18
|
};
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
}
|
|
19
|
+
const { heading, description, buttonGroup, children, ...tooltipProps } = props;
|
|
20
|
+
return (_jsx(Tooltip, { title: renderTitle(), ...tooltipProps, children: _jsx(DsLink, { component: "span", underline: "always", color: "inherit", variant: "inherit", sx: { textDecorationColor: 'inherit' }, children: children }) }));
|
|
21
|
+
};
|
|
@@ -605,7 +605,7 @@ declare const componentOverrides: {
|
|
|
605
605
|
};
|
|
606
606
|
};
|
|
607
607
|
MuiSlider: {
|
|
608
|
-
defaultProps:
|
|
608
|
+
defaultProps: import("../Components").DsSliderProps;
|
|
609
609
|
variants: {
|
|
610
610
|
props: Partial<import("../Components").DsSliderProps>;
|
|
611
611
|
style: {
|
|
@@ -979,9 +979,7 @@ declare const componentOverrides: {
|
|
|
979
979
|
};
|
|
980
980
|
};
|
|
981
981
|
MuiFormHelperText: {
|
|
982
|
-
|
|
983
|
-
root: import("@mui/system").CSSInterpolation;
|
|
984
|
-
};
|
|
982
|
+
defaultProps: import("../Components").DsHelperTextProps;
|
|
985
983
|
};
|
|
986
984
|
MuiFormControlLabel: {
|
|
987
985
|
styleOverrides: {
|
|
@@ -1074,6 +1072,7 @@ declare const componentOverrides: {
|
|
|
1074
1072
|
};
|
|
1075
1073
|
};
|
|
1076
1074
|
MuiDialog: {
|
|
1075
|
+
defaultProps: import("../Components").DsDialogProps;
|
|
1077
1076
|
styleOverrides: {
|
|
1078
1077
|
paper: {
|
|
1079
1078
|
backgroundColor: string;
|