@am92/react-design-system 3.0.1-beta.2 → 3.0.1-beta.3
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/DsAddItem/DsAddItem.Component.js +54 -43
- package/dist/Components/DsAddItem/DsAddItem.Types.d.ts +25 -13
- package/dist/Components/DsAddItem/DsAddItem.Types.js +11 -12
- package/dist/Components/DsAddItem/DsAddItem.helpers.d.ts +3 -0
- package/dist/Components/DsAddItem/DsAddItem.helpers.js +8 -0
- package/dist/Components/DsAddItem/Slots/DsAddItemActionIcon.Slot.js +1 -0
- package/dist/Components/DsAddItem/Slots/DsAddItemCounterText.Slot.js +2 -2
- package/dist/Components/DsBottomSheet/DsBottomSheet.Component.js +7 -3
- package/dist/Components/DsBottomSheet/DsBottomSheet.Types.d.ts +20 -0
- package/dist/Components/DsButton/DsButton.Overrides.d.ts +2 -0
- package/dist/Components/DsButton/DsButton.Overrides.js +20 -3
- package/dist/Components/DsButton/DsButton.Types.js +4 -1
- package/dist/Components/DsDialog/DsDialog.Component.js +9 -2
- package/dist/Components/DsDialog/DsDialog.Types.d.ts +2 -0
- package/dist/Components/DsFileUploader/DsFileUploader.Component.js +4 -5
- package/dist/Components/DsFileUploader/DsFileUploader.Types.d.ts +1 -1
- package/dist/Components/DsFileUploader/Slots/DsFileUploaderSelectedFilesSegment.js +1 -1
- package/dist/Components/DsPopup/DsPopup.Types.d.ts +1 -0
- package/dist/Components/DsTab/DsTab.Overrides.js +0 -3
- package/dist/Components/DsTabs/DsTabs.Overrides.d.ts +2 -2
- package/dist/Components/DsTabs/DsTabs.Overrides.js +62 -15
- package/dist/Components/DsTabs/DsTabs.Types.d.ts +2 -0
- package/dist/Components/DsTabs/DsTabs.Types.js +2 -0
- package/dist/Theme/componentOverrides.d.ts +2 -0
- package/dist/Theme/rules.js +4 -1
- package/dist/Types/DsRules.d.ts +1 -1
- package/package.json +7 -6
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useMemo, useState } from "react";
|
|
3
|
-
import { DsAddItemDefaultProps
|
|
3
|
+
import { DsAddItemDefaultProps } from "./DsAddItem.Types";
|
|
4
|
+
import { calculateNewValue, isBelowMinValue } from "./DsAddItem.helpers";
|
|
4
5
|
import STATE_STYLES from "../../Theme/STATE_STYLES";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
6
|
+
import { DsStack } from "../DsStack";
|
|
7
|
+
import { DsFab } from "../DsFab";
|
|
7
8
|
export const DsAddItem = (inProps) => {
|
|
8
9
|
const mergedSlots = {
|
|
9
10
|
...DsAddItemDefaultProps.slots,
|
|
@@ -12,6 +13,22 @@ export const DsAddItem = (inProps) => {
|
|
|
12
13
|
const mergedSlotProps = {
|
|
13
14
|
...DsAddItemDefaultProps.slotProps,
|
|
14
15
|
...(inProps.slotProps || {}),
|
|
16
|
+
LeftIconButton: {
|
|
17
|
+
...DsAddItemDefaultProps.slotProps?.LeftIconButton,
|
|
18
|
+
...inProps.slotProps?.LeftIconButton,
|
|
19
|
+
IconProps: {
|
|
20
|
+
...DsAddItemDefaultProps.slotProps?.LeftIconButton?.IconProps,
|
|
21
|
+
...inProps.slotProps?.LeftIconButton?.IconProps,
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
RightIconButton: {
|
|
25
|
+
...DsAddItemDefaultProps.slotProps?.RightIconButton,
|
|
26
|
+
...inProps.slotProps?.RightIconButton,
|
|
27
|
+
IconProps: {
|
|
28
|
+
...DsAddItemDefaultProps.slotProps?.RightIconButton?.IconProps,
|
|
29
|
+
...inProps.slotProps?.RightIconButton?.IconProps,
|
|
30
|
+
},
|
|
31
|
+
},
|
|
15
32
|
};
|
|
16
33
|
const props = {
|
|
17
34
|
...DsAddItemDefaultProps,
|
|
@@ -19,7 +36,7 @@ export const DsAddItem = (inProps) => {
|
|
|
19
36
|
slots: mergedSlots,
|
|
20
37
|
slotProps: mergedSlotProps,
|
|
21
38
|
};
|
|
22
|
-
const { value, label, maxValue, minValue, step, slots, slotProps, disabled, onChange, name,
|
|
39
|
+
const { value, label, maxValue, minValue, step, slots, slotProps, disabled, onChange, name, color, wrapperProps, ...restProps } = props;
|
|
23
40
|
const isControlled = typeof value === "number";
|
|
24
41
|
const { LeftIconButton, RightIconButton, CounterText } = slots;
|
|
25
42
|
// Internal state for count value, initialized based on control mode
|
|
@@ -31,25 +48,14 @@ export const DsAddItem = (inProps) => {
|
|
|
31
48
|
setCountValue(value);
|
|
32
49
|
}
|
|
33
50
|
}, [value]);
|
|
34
|
-
const isAddDisabled = disabled ||
|
|
35
|
-
const isSubtractDisabled = disabled
|
|
36
|
-
// Helper function to check if value is below minValue threshold
|
|
37
|
-
const isBelowMinValue = (value) => {
|
|
38
|
-
return minValue !== undefined && value < minValue;
|
|
39
|
-
};
|
|
40
|
-
// Helper function to calculate new value based on operation
|
|
41
|
-
const calculateNewValue = (operation) => {
|
|
42
|
-
const stepValue = step ?? DEFAULT_STEP_VALUE;
|
|
43
|
-
return operation === "add"
|
|
44
|
-
? countValue + stepValue
|
|
45
|
-
: countValue - stepValue;
|
|
46
|
-
};
|
|
51
|
+
const isAddDisabled = disabled || (maxValue !== undefined && countValue >= maxValue);
|
|
52
|
+
const isSubtractDisabled = disabled;
|
|
47
53
|
const handleAdd = (e) => {
|
|
48
54
|
e.stopPropagation();
|
|
49
55
|
if (!isAddDisabled) {
|
|
50
|
-
let newValue = calculateNewValue("add");
|
|
56
|
+
let newValue = calculateNewValue(countValue, step, "add");
|
|
51
57
|
// Jump to minValue if increment would result in a value below minimum threshold
|
|
52
|
-
if (isBelowMinValue(newValue)) {
|
|
58
|
+
if (isBelowMinValue(newValue, minValue)) {
|
|
53
59
|
newValue = minValue;
|
|
54
60
|
}
|
|
55
61
|
if (!isControlled) {
|
|
@@ -62,9 +68,9 @@ export const DsAddItem = (inProps) => {
|
|
|
62
68
|
const handleSubtract = (e) => {
|
|
63
69
|
e.stopPropagation();
|
|
64
70
|
if (!isSubtractDisabled) {
|
|
65
|
-
let newValue = calculateNewValue("subtract");
|
|
71
|
+
let newValue = calculateNewValue(countValue, step, "subtract");
|
|
66
72
|
// Reset to 0 if would go negative or below minValue (back to "add" state)
|
|
67
|
-
if (newValue < 0 || isBelowMinValue(newValue)) {
|
|
73
|
+
if (newValue < 0 || isBelowMinValue(newValue, minValue)) {
|
|
68
74
|
newValue = 0;
|
|
69
75
|
}
|
|
70
76
|
if (!isControlled) {
|
|
@@ -74,32 +80,37 @@ export const DsAddItem = (inProps) => {
|
|
|
74
80
|
onChange(name, newValue, "decrement");
|
|
75
81
|
}
|
|
76
82
|
};
|
|
77
|
-
const
|
|
78
|
-
px: "var(--ds-spacing-glacial)",
|
|
79
|
-
pt: isEmptyCount ? "var(--ds-spacing-quickFreeze)" : 0,
|
|
80
|
-
pb: isEmptyCount ? "var(--ds-spacing-quickFreeze)" : 0,
|
|
83
|
+
const stackSx = useMemo(() => ({
|
|
81
84
|
minWidth: "90px",
|
|
82
|
-
minHeight: "
|
|
85
|
+
minHeight: "36px",
|
|
86
|
+
padding: "var(--ds-spacing-glacial)",
|
|
83
87
|
borderRadius: "var(--ds-radius-cool)",
|
|
84
88
|
boxShadow: "var(--ds-elevation-8)",
|
|
85
89
|
background: "var(--ds-colour-surfacePrimary)",
|
|
86
|
-
"
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
"&.Mui-disabled": {
|
|
92
|
-
background: "var(--ds-colour-stateDisabledSurface) !important",
|
|
93
|
-
},
|
|
94
|
-
...restProps.sx,
|
|
95
|
-
}), [isEmptyCount, disabled, restProps.sx]);
|
|
96
|
-
const boxSx = useMemo(() => ({
|
|
97
|
-
...fabSx,
|
|
98
|
-
display: "flex",
|
|
90
|
+
pointerEvents: disabled ? "none" : "auto",
|
|
91
|
+
...(disabled && {
|
|
92
|
+
background: "var(--ds-colour-stateDisabledSurface)",
|
|
93
|
+
}),
|
|
94
|
+
display: "inline-flex",
|
|
99
95
|
justifyContent: "center",
|
|
100
96
|
alignItems: "center",
|
|
101
|
-
|
|
102
|
-
}), [
|
|
103
|
-
const counterTextElement = CounterText && (_jsx(CounterText, { value: countValue, label: label ?? "", disabled: disabled ?? false, ...slotProps?.CounterText }));
|
|
104
|
-
return
|
|
97
|
+
verticalAlign: "middle",
|
|
98
|
+
}), [disabled]);
|
|
99
|
+
const counterTextElement = CounterText && (_jsx(CounterText, { value: countValue, label: label ?? "", disabled: disabled ?? false, color: color, ...slotProps?.CounterText }));
|
|
100
|
+
return (_jsx(DsStack, { ...wrapperProps, sx: { display: "inline-flex", verticalAlign: "middle", ...wrapperProps?.sx }, children: isEmptyCount ? (_jsx(DsFab, { disabled: disabled, color: "default", size: "small", onClick: handleAdd, disableRipple: disabled, ...restProps, sx: {
|
|
101
|
+
...STATE_STYLES.SURFACE_PRIMARY_STATE_PRIMARY,
|
|
102
|
+
border: "none",
|
|
103
|
+
padding: "var(--ds-spacing-frostbite) var(--ds-spacing-glacial)",
|
|
104
|
+
minWidth: "90px",
|
|
105
|
+
minHeight: "36px",
|
|
106
|
+
"&.Mui-disabled": {
|
|
107
|
+
background: "var(--ds-colour-stateDisabledSurface)",
|
|
108
|
+
boxShadow: "var(--ds-elevation-8)",
|
|
109
|
+
},
|
|
110
|
+
"& .MuiTypography-root": {
|
|
111
|
+
fontSize: "var(--ds-typo-supportBoldTextButton-fontSize)",
|
|
112
|
+
lineHeight: "var(--ds-typo-supportBoldTextButton-lineHeight)",
|
|
113
|
+
},
|
|
114
|
+
...restProps.sx,
|
|
115
|
+
}, children: counterTextElement })) : (_jsxs(DsStack, { direction: "row", sx: { ...stackSx, ...restProps.sx }, children: [LeftIconButton && (_jsx(LeftIconButton, { disabled: isSubtractDisabled, onClick: handleSubtract, "aria-label": "Decrease value", color: color, ...slotProps?.LeftIconButton })), counterTextElement, RightIconButton && (_jsx(RightIconButton, { onClick: handleAdd, disabled: isAddDisabled, "aria-label": "Increase value", color: color, ...slotProps?.RightIconButton }))] })) }));
|
|
105
116
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { ComponentType } from
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import type { ComponentType } from 'react';
|
|
2
|
+
import { DsTypographyProps } from '../DsTypography';
|
|
3
|
+
import { DsIconButtonProps } from '../DsIconButton';
|
|
4
|
+
import { DsRemixIconProps } from '../DsRemixIcon';
|
|
5
|
+
import { DsStackProps } from '../DsStack';
|
|
6
6
|
/**
|
|
7
7
|
* Default step value for increment/decrement operations
|
|
8
8
|
*/
|
|
@@ -13,15 +13,15 @@ export declare const DEFAULT_STEP_VALUE = 1;
|
|
|
13
13
|
*/
|
|
14
14
|
export interface DsAddItemActionButtonProps extends DsIconButtonProps {
|
|
15
15
|
/** Props for the icon within the action button */
|
|
16
|
-
IconProps?: Omit<DsRemixIconProps,
|
|
16
|
+
IconProps?: Omit<DsRemixIconProps, 'ref'>;
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
19
|
* Props for the counter text display showing current count
|
|
20
20
|
*/
|
|
21
21
|
export interface DsAddItemCounterTextProps extends DsTypographyProps {
|
|
22
|
-
label
|
|
23
|
-
value
|
|
24
|
-
disabled
|
|
22
|
+
label?: string;
|
|
23
|
+
value?: number;
|
|
24
|
+
disabled?: boolean;
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
27
|
* Slots configuration for customizing components
|
|
@@ -49,7 +49,7 @@ export interface DsAddItemSlotProps {
|
|
|
49
49
|
* Main props interface for the DsAddItem component
|
|
50
50
|
* Extends DsFabProps while omitting the onChange prop to define custom signature
|
|
51
51
|
*/
|
|
52
|
-
export interface DsAddItemProps
|
|
52
|
+
export interface DsAddItemProps {
|
|
53
53
|
/** The current count value */
|
|
54
54
|
value?: number;
|
|
55
55
|
/** The maximum allowed value */
|
|
@@ -61,15 +61,27 @@ export interface DsAddItemProps extends Omit<DsButtonBaseProps, "onChange" | "va
|
|
|
61
61
|
/** The label to show when count is 0 */
|
|
62
62
|
label?: string;
|
|
63
63
|
/** Handler called when count changes */
|
|
64
|
-
onChange: (name: string, value: number, reason:
|
|
64
|
+
onChange: (name: string, value: number, reason: 'increment' | 'decrement') => void;
|
|
65
65
|
/** Custom components to use for slots */
|
|
66
66
|
slots?: DsAddItemSlots;
|
|
67
67
|
/** Props to pass to slot components */
|
|
68
68
|
slotProps?: DsAddItemSlotProps;
|
|
69
69
|
/** Name of the counter field */
|
|
70
70
|
name: string;
|
|
71
|
-
/** Whether the counter is in
|
|
72
|
-
|
|
71
|
+
/** Whether the counter is in disabled state */
|
|
72
|
+
disabled?: boolean;
|
|
73
|
+
/** Custom styles to apply to the component */
|
|
74
|
+
sx?: DsStackProps['sx'];
|
|
75
|
+
/**
|
|
76
|
+
* Props to pass to the root Stack wrapper component.
|
|
77
|
+
* Allows full control over the Stack component properties.
|
|
78
|
+
*/
|
|
79
|
+
wrapperProps?: DsStackProps;
|
|
80
|
+
/**
|
|
81
|
+
* Color variant for the icon buttons and empty state text.
|
|
82
|
+
* @default 'secondary'
|
|
83
|
+
*/
|
|
84
|
+
color?: DsIconButtonProps['color'];
|
|
73
85
|
}
|
|
74
86
|
/**
|
|
75
87
|
* Default props configuration for DsAddItem component
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DsAddItemIconButton } from
|
|
2
|
-
import { DsAddItemCounterText } from
|
|
1
|
+
import { DsAddItemIconButton } from './Slots/DsAddItemActionIcon.Slot';
|
|
2
|
+
import { DsAddItemCounterText } from './Slots/DsAddItemCounterText.Slot';
|
|
3
3
|
/**
|
|
4
4
|
* Default step value for increment/decrement operations
|
|
5
5
|
*/
|
|
@@ -9,27 +9,26 @@ export const DEFAULT_STEP_VALUE = 1;
|
|
|
9
9
|
* Provides sensible defaults for count, label, and slot styling
|
|
10
10
|
*/
|
|
11
11
|
export const DsAddItemDefaultProps = {
|
|
12
|
-
label:
|
|
12
|
+
label: 'Add',
|
|
13
13
|
step: DEFAULT_STEP_VALUE,
|
|
14
14
|
minValue: 0,
|
|
15
|
+
color: 'secondary',
|
|
15
16
|
onChange: () => { },
|
|
16
17
|
slots: {
|
|
17
18
|
LeftIconButton: DsAddItemIconButton,
|
|
18
19
|
RightIconButton: DsAddItemIconButton,
|
|
19
|
-
CounterText: DsAddItemCounterText
|
|
20
|
+
CounterText: DsAddItemCounterText
|
|
20
21
|
},
|
|
21
22
|
slotProps: {
|
|
22
23
|
LeftIconButton: {
|
|
23
|
-
color: "secondary",
|
|
24
24
|
IconProps: {
|
|
25
|
-
className:
|
|
26
|
-
}
|
|
25
|
+
className: 'ri-subtract-line'
|
|
26
|
+
}
|
|
27
27
|
},
|
|
28
28
|
RightIconButton: {
|
|
29
|
-
color: "secondary",
|
|
30
29
|
IconProps: {
|
|
31
|
-
className:
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
30
|
+
className: 'ri-add-line'
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
35
34
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DEFAULT_STEP_VALUE } from './DsAddItem.Types';
|
|
2
|
+
export const isBelowMinValue = (value, minValue) => {
|
|
3
|
+
return minValue !== undefined && value < minValue;
|
|
4
|
+
};
|
|
5
|
+
export const calculateNewValue = (countValue, step, operation) => {
|
|
6
|
+
const stepValue = step ?? DEFAULT_STEP_VALUE;
|
|
7
|
+
return operation === 'add' ? countValue + stepValue : countValue - stepValue;
|
|
8
|
+
};
|
|
@@ -4,6 +4,7 @@ import { DsRemixIcon } from "../../DsRemixIcon";
|
|
|
4
4
|
export const DsAddItemIconButton = ({ onClick, disabled, IconProps, ...iconButtonProps }) => {
|
|
5
5
|
return (_jsx(DsIconButton, { disabled: disabled, onClick: onClick, ...iconButtonProps, children: _jsx(DsRemixIcon, { sx: {
|
|
6
6
|
fontSize: "20px",
|
|
7
|
+
color: disabled ? 'var(--ds-colour-iconDisabled)' : 'inherit',
|
|
7
8
|
...IconProps?.sx,
|
|
8
9
|
}, ...IconProps }) }));
|
|
9
10
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { DsTypography } from "../../DsTypography";
|
|
3
|
-
export const DsAddItemCounterText = ({ label, value, disabled, ...textProps }) => {
|
|
3
|
+
export const DsAddItemCounterText = ({ label, value, disabled, color, ...textProps }) => {
|
|
4
4
|
const isEmptyCount = value === 0;
|
|
5
5
|
return (_jsx(DsTypography, { variant: isEmptyCount ? "supportBoldTextButton" : "bodyBoldMedium", color: disabled
|
|
6
6
|
? "var(--ds-colour-typoDisabled)"
|
|
7
7
|
: isEmptyCount
|
|
8
|
-
?
|
|
8
|
+
? color
|
|
9
9
|
: "var(--ds-colour-typoPrimary)", sx: {
|
|
10
10
|
mx: isEmptyCount
|
|
11
11
|
? "var(--ds-spacing-cool)"
|
|
@@ -24,7 +24,7 @@ export const DsBottomSheet = (inProps) => {
|
|
|
24
24
|
onClose(event, 'backdropClick');
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
|
-
const { kicker, title, description, showClose, primaryButtonText, primaryButtonProps, secondaryButtonText, secondaryButtonProps, PaperProps, ContainerProps, KickerProps, DescriptionProps, TitleProps, CloseIconButtonProps, CloseIconProps, ContentProps, ActionsProps, children, onClose, slotProps, ...DrawerProps } = props;
|
|
27
|
+
const { kicker, title, description, showClose, primaryButtonText, primaryButtonProps, secondaryButtonText, secondaryButtonProps, PaperProps, ContainerProps, KickerProps, DescriptionProps, TitleProps, CloseIconButtonProps, CloseIconProps, ContentProps, ActionsProps, children, onClose, slotProps, illustration, IllustrationProps, ...DrawerProps } = props;
|
|
28
28
|
const actionsAvailable = !!(primaryButtonText || secondaryButtonText);
|
|
29
29
|
const isFlushed = primaryButtonText &&
|
|
30
30
|
!secondaryButtonText &&
|
|
@@ -53,7 +53,7 @@ export const DsBottomSheet = (inProps) => {
|
|
|
53
53
|
flexGrow: 0,
|
|
54
54
|
alignSelf: 'center',
|
|
55
55
|
backgroundColor: 'var(--ds-colour-iconDefault)',
|
|
56
|
-
color: 'var(--ds-colour-
|
|
56
|
+
color: 'var(--ds-colour-iconOnSurfaceDynamic)',
|
|
57
57
|
borderRadius: '50%',
|
|
58
58
|
p: 'var(--ds-spacing-glacial)',
|
|
59
59
|
mb: 'var(--ds-spacing-bitterCold)',
|
|
@@ -68,7 +68,11 @@ export const DsBottomSheet = (inProps) => {
|
|
|
68
68
|
borderTopLeftRadius: 'var(--ds-radius-bitterCold)',
|
|
69
69
|
borderTopRightRadius: 'var(--ds-radius-bitterCold)',
|
|
70
70
|
...ContainerProps?.sx
|
|
71
|
-
}, children: [
|
|
71
|
+
}, children: [illustration && (_jsx(DsDialogContent, { ...IllustrationProps, sx: {
|
|
72
|
+
px: 'var(--ds-spacing-bitterCold)',
|
|
73
|
+
marginBottom: 'var(--ds-spacing-mild)',
|
|
74
|
+
...IllustrationProps?.sx
|
|
75
|
+
}, children: illustration })), kicker && (_jsx(DsTypography, { variant: 'subheadingSemiboldDefault', ...KickerProps, sx: {
|
|
72
76
|
color: 'text.tertiary',
|
|
73
77
|
px: 'var(--ds-spacing-bitterCold)',
|
|
74
78
|
mb: 'var(--ds-spacing-quickFreeze)',
|
|
@@ -8,21 +8,41 @@ import { DsPaperProps } from '../DsPaper';
|
|
|
8
8
|
import { DsRemixIconProps } from '../DsRemixIcon';
|
|
9
9
|
import { DsTypographyProps } from '../DsTypography';
|
|
10
10
|
export interface DsBottomSheetProps extends Omit<DsDrawerProps, 'title'> {
|
|
11
|
+
/** Small contextual text displayed above the title (e.g., "Confirm Action", "Settings") */
|
|
11
12
|
kicker?: string;
|
|
13
|
+
/** Main heading text for the bottom sheet content */
|
|
12
14
|
title?: string;
|
|
15
|
+
/** Supporting text content displayed below the title for additional context */
|
|
13
16
|
description?: string;
|
|
17
|
+
/** Whether to display the close (×) button in the header. @default true */
|
|
14
18
|
showClose?: boolean;
|
|
19
|
+
/** Content for the primary action button (typically the main action) */
|
|
15
20
|
primaryButtonText?: DsButtonProps['children'];
|
|
21
|
+
/** Content for the secondary action button (typically cancel or dismiss) */
|
|
16
22
|
secondaryButtonText?: DsButtonProps['children'];
|
|
23
|
+
/** Custom React element to display as an illustration (icons, images, etc.) */
|
|
24
|
+
illustration?: React.ReactNode;
|
|
25
|
+
/** Root container Paper customization */
|
|
17
26
|
ContainerProps?: DsPaperProps;
|
|
27
|
+
/** Kicker text Typography customization */
|
|
18
28
|
KickerProps?: DsTypographyProps;
|
|
29
|
+
/** Description text Typography customization */
|
|
19
30
|
DescriptionProps?: DsTypographyProps;
|
|
31
|
+
/** Header title DialogTitle customization */
|
|
20
32
|
TitleProps?: DsDialogTitleProps;
|
|
33
|
+
/** Close button IconButton customization */
|
|
21
34
|
CloseIconButtonProps?: DsIconButtonProps;
|
|
35
|
+
/** Close icon RemixIcon customization (ref omitted) */
|
|
22
36
|
CloseIconProps?: Omit<DsRemixIconProps, 'ref'>;
|
|
37
|
+
/** Illustration container DialogContent customization */
|
|
38
|
+
IllustrationProps?: DsDialogContentProps;
|
|
39
|
+
/** Main content area DialogContent customization */
|
|
23
40
|
ContentProps?: DsDialogContentProps;
|
|
41
|
+
/** Action buttons container DialogActions customization */
|
|
24
42
|
ActionsProps?: DsDialogActionsProps;
|
|
43
|
+
/** Primary action Button customization (ref omitted) */
|
|
25
44
|
primaryButtonProps?: Omit<DsButtonProps, 'ref'>;
|
|
45
|
+
/** Secondary action Button customization (ref omitted) */
|
|
26
46
|
secondaryButtonProps?: Omit<DsButtonProps, 'ref'>;
|
|
27
47
|
}
|
|
28
48
|
export declare const DsBottomSheetDefaultProps: DsBottomSheetProps;
|
|
@@ -38,6 +38,14 @@ export const DsButtonOverrides = {
|
|
|
38
38
|
}
|
|
39
39
|
],
|
|
40
40
|
},
|
|
41
|
+
loading: {
|
|
42
|
+
'& > span:not(.MuiButton-loadingWrapper)': {
|
|
43
|
+
visibility: 'hidden'
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
loadingIndicator: {
|
|
47
|
+
color: 'inherit'
|
|
48
|
+
},
|
|
41
49
|
contained: {
|
|
42
50
|
"&.MuiButton-contained.MuiButton-colorPrimary": {
|
|
43
51
|
color: 'var(--ds-colour-typoOnSurface)',
|
|
@@ -66,21 +74,30 @@ export const DsButtonOverrides = {
|
|
|
66
74
|
fontWeight: 'var(--ds-typo-bodyBoldLarge-fontWeight)',
|
|
67
75
|
fontSize: 'var(--ds-typo-bodyBoldLarge-fontSize)',
|
|
68
76
|
lineHeight: 'var(--ds-typo-bodyBoldLarge-lineHeight)',
|
|
69
|
-
letterSpacing: 'var(--ds-typo-bodyBoldLarge-letterSpacing)'
|
|
77
|
+
letterSpacing: 'var(--ds-typo-bodyBoldLarge-letterSpacing)',
|
|
78
|
+
'.MuiButton-loadingIndicator': {
|
|
79
|
+
width: 'var(--ds-rules-buttonLargeLoaderWidth)'
|
|
80
|
+
},
|
|
70
81
|
},
|
|
71
82
|
sizeMedium: {
|
|
72
83
|
padding: 'var(--ds-spacing-frostbite) var(--ds-spacing-bitterCold)',
|
|
73
84
|
fontWeight: 'var(--ds-typo-bodyBoldMedium-fontWeight)',
|
|
74
85
|
fontSize: 'var(--ds-typo-bodyBoldMedium-fontSize)',
|
|
75
86
|
lineHeight: 'var(--ds-typo-bodyBoldMedium-lineHeight)',
|
|
76
|
-
letterSpacing: 'var(--ds-typo-bodyBoldMedium-letterSpacing)'
|
|
87
|
+
letterSpacing: 'var(--ds-typo-bodyBoldMedium-letterSpacing)',
|
|
88
|
+
'.MuiButton-loadingIndicator': {
|
|
89
|
+
width: 'var(--ds-rules-buttonMediumLoaderWidth)'
|
|
90
|
+
},
|
|
77
91
|
},
|
|
78
92
|
sizeSmall: {
|
|
79
93
|
padding: 'var(--ds-spacing-glacial) var(--ds-spacing-bitterCold)',
|
|
80
94
|
fontWeight: 'var(--ds-typo-bodyBoldSmall-fontWeight)',
|
|
81
95
|
fontSize: 'var(--ds-typo-bodyBoldSmall-fontSize)',
|
|
82
96
|
lineHeight: 'var(--ds-typo-bodyBoldSmall-lineHeight)',
|
|
83
|
-
letterSpacing: 'var(--ds-typo-bodyBoldSmall-letterSpacing)'
|
|
97
|
+
letterSpacing: 'var(--ds-typo-bodyBoldSmall-letterSpacing)',
|
|
98
|
+
'.MuiButton-loadingIndicator': {
|
|
99
|
+
width: 'var(--ds-rules-buttonSmallLoaderWidth)',
|
|
100
|
+
},
|
|
84
101
|
},
|
|
85
102
|
icon: {
|
|
86
103
|
'&.MuiButton-sizeLarge': {
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { ThreeDotLoader } from '../DsLoader/ThreeDotLoader';
|
|
1
3
|
export const DsButtonDefaultProps = {
|
|
2
4
|
variant: 'contained',
|
|
3
5
|
size: 'small',
|
|
4
6
|
color: 'primary',
|
|
5
|
-
disableElevation: true
|
|
7
|
+
disableElevation: true,
|
|
8
|
+
loadingIndicator: _jsx(ThreeDotLoader, {})
|
|
6
9
|
};
|
|
@@ -17,7 +17,7 @@ export const DsDialog = inProps => {
|
|
|
17
17
|
onClose(event, reason ? reason : 'backdropClick');
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
|
-
const { title, description, kicker, showClose, primaryButtonText, primaryButtonProps, secondaryButtonText, secondaryButtonProps, PaperProps, TitleProps, DescriptionProps, CloseIconButtonProps, CloseIconProps, KickerProps, ContentProps, ActionsProps, children, slotProps, ...DialogProps } = props;
|
|
20
|
+
const { title, description, kicker, illustration, showClose, primaryButtonText, primaryButtonProps, secondaryButtonText, secondaryButtonProps, PaperProps, TitleProps, DescriptionProps, CloseIconButtonProps, CloseIconProps, KickerProps, ContentProps, ActionsProps, IllustrationProps, children, slotProps, ...DialogProps } = props;
|
|
21
21
|
const actionsAvailable = !!(primaryButtonText || secondaryButtonText);
|
|
22
22
|
const accessibilityProps = {};
|
|
23
23
|
const isFlushed = primaryButtonText &&
|
|
@@ -50,7 +50,14 @@ export const DsDialog = inProps => {
|
|
|
50
50
|
},
|
|
51
51
|
},
|
|
52
52
|
}),
|
|
53
|
-
}, children: [
|
|
53
|
+
}, children: [illustration && (_jsx(DsDialogContent, { ...IllustrationProps, sx: {
|
|
54
|
+
px: {
|
|
55
|
+
xs: "var(--ds-spacing-bitterCold)",
|
|
56
|
+
md: "var(--ds-spacing-warm)",
|
|
57
|
+
},
|
|
58
|
+
mb: "var(--ds-spacing-mild)",
|
|
59
|
+
...IllustrationProps?.sx,
|
|
60
|
+
}, children: illustration })), kicker && (_jsx(DsTypography, { variant: 'subheadingSemiboldDefault', color: 'var(--ds-colour-typoTertiary)', ...KickerProps, sx: {
|
|
54
61
|
px: {
|
|
55
62
|
xs: 'var(--ds-spacing-bitterCold)',
|
|
56
63
|
md: 'var(--ds-spacing-warm)'
|
|
@@ -11,6 +11,7 @@ export interface DsDialogProps extends Omit<DialogProps, 'onClose'> {
|
|
|
11
11
|
title?: string;
|
|
12
12
|
description?: string;
|
|
13
13
|
kicker?: string;
|
|
14
|
+
illustration?: React.ReactNode;
|
|
14
15
|
showClose?: boolean;
|
|
15
16
|
primaryButtonText?: DsButtonProps['children'];
|
|
16
17
|
primaryButtonProps?: Omit<DsButtonProps, 'ref'>;
|
|
@@ -23,6 +24,7 @@ export interface DsDialogProps extends Omit<DialogProps, 'onClose'> {
|
|
|
23
24
|
CloseIconProps?: Omit<DsRemixIconProps, 'ref'>;
|
|
24
25
|
ContentProps?: DsDialogContentProps;
|
|
25
26
|
ActionsProps?: DsDialogActionsProps;
|
|
27
|
+
IllustrationProps?: DsDialogContentProps;
|
|
26
28
|
onClose?: (event: React.SyntheticEvent, reason: DsDialogCloseReason) => void;
|
|
27
29
|
}
|
|
28
30
|
export declare const DsDialogDefaultProps: DsDialogProps;
|
|
@@ -3,7 +3,6 @@ import { useEffect, useState } from 'react';
|
|
|
3
3
|
import { DsFileUploaderDefaultProps } from './DsFileUploader.Types';
|
|
4
4
|
import FileUploaderFiles from './FileUploaderFiles';
|
|
5
5
|
import { getDefaultValue, getValidProcessedFile, mergeProps } from './helpers';
|
|
6
|
-
import { DsFileUploaderDropZone } from './Slots/DsFileUploaderDropZone';
|
|
7
6
|
import { DsStack } from '../DsStack';
|
|
8
7
|
import { DsInputLabel } from '../DsInputLabel';
|
|
9
8
|
export const DsFileUploader = (inProps) => {
|
|
@@ -117,17 +116,17 @@ export const DsFileUploader = (inProps) => {
|
|
|
117
116
|
const isUploadedSegmentVisible = multiple
|
|
118
117
|
? Array.isArray(uploadedValue) && uploadedValue.length > 0
|
|
119
118
|
: uploadedValue;
|
|
120
|
-
const { SelectedItemSegment, UploadedItemSegment } = slots;
|
|
119
|
+
const { SelectedItemSegment, UploadedItemSegment, DropZone } = slots;
|
|
121
120
|
return (_jsxs(DsStack, { direction: "column", sx: {
|
|
122
121
|
gap: 'var(--ds-spacing-bitterCold)',
|
|
123
122
|
width: '100%',
|
|
124
123
|
p: 'var(--ds-spacing-bitterCold)'
|
|
125
|
-
}, children: [_jsx(DsInputLabel, { sx: { mb: 'var(--ds-spacing-zero)', ...InputLabelProps?.sx }, ...InputLabelProps }), _jsx(
|
|
124
|
+
}, children: [_jsx(DsInputLabel, { sx: { mb: 'var(--ds-spacing-zero)', ...InputLabelProps?.sx }, ...InputLabelProps }), DropZone && (_jsx(DropZone, { variant: variant, ...slotProps?.DropZone, InputProps: {
|
|
126
125
|
accept: allowedFiles || accept,
|
|
127
126
|
multiple: multiple,
|
|
127
|
+
...slotProps?.DropZone?.InputProps,
|
|
128
128
|
onChange: handleFileSelect,
|
|
129
129
|
onDrop: handleDropFile,
|
|
130
130
|
onDragOver: handleDragOverHandler,
|
|
131
|
-
|
|
132
|
-
} }), isSelectedSegmentVisible && SelectedItemSegment && (_jsx(SelectedItemSegment, { onPreview: handlePreviewFileAction, onDownload: handleDownloadFileAction, onDelete: handleRemoveFile, ...slotProps?.SelectedItemSegment, children: _jsx(FileUploaderFiles, { slots: slots, slotProps: slotProps, files: files || undefined }) })), isUploadedSegmentVisible && UploadedItemSegment && (_jsx(UploadedItemSegment, { onPreview: handlePreviewFileAction, onDownload: handleDownloadFileAction, onDelete: handleRemoveFile, ...slotProps?.UploadedItemSegment, children: _jsx(FileUploaderFiles, { slots: slots, slotProps: slotProps, files: uploadedValue || undefined }) }))] }));
|
|
131
|
+
} })), isSelectedSegmentVisible && SelectedItemSegment && (_jsx(SelectedItemSegment, { onPreview: handlePreviewFileAction, onDownload: handleDownloadFileAction, onDelete: handleRemoveFile, ...slotProps?.SelectedItemSegment, children: _jsx(FileUploaderFiles, { slots: slots, slotProps: slotProps, files: files || undefined }) })), isUploadedSegmentVisible && UploadedItemSegment && (_jsx(UploadedItemSegment, { onPreview: handlePreviewFileAction, onDownload: handleDownloadFileAction, onDelete: handleRemoveFile, ...slotProps?.UploadedItemSegment, children: _jsx(FileUploaderFiles, { slots: slots, slotProps: slotProps, files: uploadedValue || undefined }) }))] }));
|
|
133
132
|
};
|
|
@@ -193,7 +193,7 @@ export interface IDsFileUploaderDropZoneProps extends DsStackProps {
|
|
|
193
193
|
/**
|
|
194
194
|
* To override props passed to input element
|
|
195
195
|
*/
|
|
196
|
-
InputProps?: DsInputProps['inputProps']
|
|
196
|
+
InputProps?: Omit<NonNullable<DsInputProps['inputProps']>, 'onChange' | 'onDrop' | 'onDragOver'>;
|
|
197
197
|
/**
|
|
198
198
|
* This prop can be used to toggle the disabled state of the file uploaded.
|
|
199
199
|
*/
|
|
@@ -17,5 +17,5 @@ export const DsFileUploaderSelectedFilesSegment = (inProps) => {
|
|
|
17
17
|
...inProps
|
|
18
18
|
};
|
|
19
19
|
const { label, children } = props;
|
|
20
|
-
return (_jsxs(DsStack, { spacing:
|
|
20
|
+
return (_jsxs(DsStack, { spacing: "var(--ds-spacing-frostbite)", children: [label && (_jsx(DsTypography, { py: 'var(--ds-spacing-glacial)', variant: 'subheadingSemiboldDefault', color: 'var(--ds-colour-typoSecondary)', children: label })), _jsx(DsStack, { spacing: 'var(--ds-spacing-frostbite)', sx: { maxHeight: '440px', overflowY: 'auto' }, children: isValidElement(children) && cloneElement(children, { ...props }) })] }));
|
|
21
21
|
};
|
|
@@ -18,6 +18,7 @@ export interface DsPopupProps extends Pick<DsDialogProps, 'onClose'> {
|
|
|
18
18
|
title?: string;
|
|
19
19
|
description?: string;
|
|
20
20
|
showClose?: boolean;
|
|
21
|
+
illustration?: DsDialogProps['illustration'];
|
|
21
22
|
primaryButtonText?: DsButtonProps['children'];
|
|
22
23
|
primaryButtonProps?: Omit<DsButtonProps, 'ref'>;
|
|
23
24
|
secondaryButtonText?: DsButtonProps['children'];
|
|
@@ -12,9 +12,6 @@ export const DsTabOverrides = {
|
|
|
12
12
|
gap: 'var(--ds-spacing-glacial)',
|
|
13
13
|
minHeight: '36px',
|
|
14
14
|
textTransform: 'none',
|
|
15
|
-
borderBottomWidth: '1px',
|
|
16
|
-
borderBottomStyle: 'solid',
|
|
17
|
-
borderBottomColor: 'var(--ds-colour-stateDisabledSurface)',
|
|
18
15
|
'> .MuiTab-iconWrapper': {
|
|
19
16
|
fontSize: 'var(--ds-typo-fontSizeFrostbite)',
|
|
20
17
|
margin: 'var(--ds-spacing-zero)'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { CSSObject } from "@mui/system";
|
|
2
|
+
import { DsTabsProps } from "./DsTabs.Types";
|
|
3
3
|
export declare const DsTabsOverrides: {
|
|
4
4
|
MuiTabs: {
|
|
5
5
|
defaultProps: DsTabsProps;
|
|
@@ -5,36 +5,36 @@ export const DsTabsOverrides = {
|
|
|
5
5
|
styleOverrides: {
|
|
6
6
|
root: {
|
|
7
7
|
minHeight: "36px",
|
|
8
|
+
borderBottom: "1px solid var(--ds-colour-strokeDefault)",
|
|
8
9
|
variants: [
|
|
9
10
|
{
|
|
10
11
|
props: { "ds-variant": "container" },
|
|
11
12
|
style: {
|
|
13
|
+
borderBottom: "none",
|
|
12
14
|
"> .MuiTabs-scroller > .MuiTabs-indicator": {
|
|
13
15
|
height: "0px",
|
|
14
16
|
},
|
|
15
17
|
"> .MuiTabs-scroller > .MuiTabs-flexContainer": {
|
|
16
|
-
gap: "var(--ds-spacing-
|
|
18
|
+
gap: "var(--ds-spacing-frostbite)",
|
|
17
19
|
"> .MuiTab-root": {
|
|
18
|
-
fontWeight: "var(--ds-typo-
|
|
19
|
-
fontSize: "var(--ds-typo-
|
|
20
|
-
lineHeight: "var(--ds-typo-
|
|
21
|
-
letterSpacing: "var(--ds-typo-
|
|
22
|
-
borderRadius: "var(--ds-radius-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
borderWidth: "1px",
|
|
26
|
-
borderStyle: "solid",
|
|
20
|
+
fontWeight: "var(--ds-typo-bodyRegularMedium-fontWeight)",
|
|
21
|
+
fontSize: "var(--ds-typo-bodyRegularMedium-fontSize)",
|
|
22
|
+
lineHeight: "var(--ds-typo-bodyRegularMedium-lineHeight)",
|
|
23
|
+
letterSpacing: "var(--ds-typo-bodyRegularMedium-letterSpacing)",
|
|
24
|
+
borderRadius: "var(--ds-radius-glacial)",
|
|
25
|
+
padding: "var(--ds-spacing-glacial) var(--ds-spacing-frostbite)",
|
|
26
|
+
border: "1px solid var(--ds-colour-strokeDefault)",
|
|
27
27
|
backgroundColor: "var(--ds-colour-surfaceSecondary)",
|
|
28
|
-
borderColor: "var(--ds-colour-strokeDefault)",
|
|
29
28
|
color: "var(--ds-colour-typoSecondary)",
|
|
30
29
|
"&.Mui-selected": {
|
|
31
|
-
backgroundColor: "var(--ds-colour-
|
|
32
|
-
borderColor: "var(--ds-colour-
|
|
30
|
+
backgroundColor: "var(--ds-colour-neutral2)",
|
|
31
|
+
borderColor: "var(--ds-colour-iconTypical)",
|
|
33
32
|
color: "var(--ds-colour-typoActionTertiary)",
|
|
33
|
+
fontWeight: "var(--ds-typo-bodyBoldMedium-fontWeight)",
|
|
34
34
|
},
|
|
35
35
|
"&.Mui-disabled": {
|
|
36
|
-
backgroundColor: "
|
|
37
|
-
borderColor: "
|
|
36
|
+
backgroundColor: "var(--ds-colour-stateDisabledSurface)",
|
|
37
|
+
borderColor: "var(--ds-colour-strokeDisabled)",
|
|
38
38
|
color: "var(--ds-colour-typoDisabled)",
|
|
39
39
|
},
|
|
40
40
|
},
|
|
@@ -44,6 +44,7 @@ export const DsTabsOverrides = {
|
|
|
44
44
|
{
|
|
45
45
|
props: { "ds-variant": "segmented" },
|
|
46
46
|
style: {
|
|
47
|
+
borderBottom: "none",
|
|
47
48
|
"& .MuiTabs-scroller": {
|
|
48
49
|
backgroundColor: "var(--ds-colour-neutral1)",
|
|
49
50
|
borderRadius: "var(--ds-radius-glacial)",
|
|
@@ -81,6 +82,52 @@ export const DsTabsOverrides = {
|
|
|
81
82
|
},
|
|
82
83
|
},
|
|
83
84
|
},
|
|
85
|
+
{
|
|
86
|
+
props: { orientation: "vertical" },
|
|
87
|
+
style: {
|
|
88
|
+
borderBottom: "none",
|
|
89
|
+
"> .MuiTabs-scroller > .MuiTabs-flexContainer": {
|
|
90
|
+
"> .MuiTab-root": {
|
|
91
|
+
borderBottom: "1px solid var(--ds-colour-strokeDefault)",
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
props: { "ds-size": "small" },
|
|
98
|
+
style: {
|
|
99
|
+
minHeight: "auto",
|
|
100
|
+
"> .MuiTabs-scroller > .MuiTabs-flexContainer": {
|
|
101
|
+
"> .MuiTab-root": {
|
|
102
|
+
minHeight: "unset",
|
|
103
|
+
fontWeight: "var(--ds-typo-bodyRegularSmall-fontWeight)",
|
|
104
|
+
fontSize: "var(--ds-typo-bodyRegularSmall-fontSize)",
|
|
105
|
+
lineHeight: "var(--ds-typo-bodyRegularSmall-lineHeight)",
|
|
106
|
+
padding: "var(--ds-spacing-gelid) var(--ds-spacing-glacial)",
|
|
107
|
+
letterSpacing: "var(--ds-typo-bodyRegularSmall-letterSpacing)",
|
|
108
|
+
"&.Mui-selected": {
|
|
109
|
+
fontWeight: "var(--ds-typo-bodyBoldSmall-fontWeight)",
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
props: (props) => props["ds-textfit"] === "fixed" &&
|
|
117
|
+
!props["ds-variant"] &&
|
|
118
|
+
props.orientation === "horizontal",
|
|
119
|
+
style: {
|
|
120
|
+
"> .MuiTabs-scroller > .MuiTabs-flexContainer": {
|
|
121
|
+
"> .MuiTab-root": {
|
|
122
|
+
minWidth: "unset",
|
|
123
|
+
paddingRight: "0",
|
|
124
|
+
paddingLeft: "0",
|
|
125
|
+
marginRight: "var(--ds-spacing-bitterCold)",
|
|
126
|
+
marginLeft: "var(--ds-spacing-bitterCold)",
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
},
|
|
84
131
|
],
|
|
85
132
|
},
|
|
86
133
|
indicator: {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { TabsProps } from "@mui/material";
|
|
2
2
|
export interface DsTabsProps extends TabsProps {
|
|
3
3
|
"ds-variant"?: "container" | "segmented";
|
|
4
|
+
"ds-size"?: "small" | "medium";
|
|
5
|
+
"ds-textfit"?: "fixed" | "filled";
|
|
4
6
|
}
|
|
5
7
|
export declare const DsTabsDefaultProps: DsTabsProps;
|
|
@@ -1201,6 +1201,8 @@ declare const componentOverrides: {
|
|
|
1201
1201
|
defaultProps: import("../Components").DsButtonProps;
|
|
1202
1202
|
styleOverrides: {
|
|
1203
1203
|
root: import("@mui/system").CSSObject;
|
|
1204
|
+
loading: import("@mui/system").CSSObject;
|
|
1205
|
+
loadingIndicator: import("@mui/system").CSSObject;
|
|
1204
1206
|
contained: import("@mui/system").CSSObject;
|
|
1205
1207
|
sizeLarge: import("@mui/system").CSSObject;
|
|
1206
1208
|
sizeMedium: import("@mui/system").CSSObject;
|
package/dist/Theme/rules.js
CHANGED
|
@@ -15,6 +15,9 @@ const dsRules = {
|
|
|
15
15
|
avatarXLSize: '48px',
|
|
16
16
|
avatarXXLSize: '64px',
|
|
17
17
|
avatar3XLSize: '80px',
|
|
18
|
-
formHelperTextMinHeight: '28px'
|
|
18
|
+
formHelperTextMinHeight: '28px',
|
|
19
|
+
buttonSmallLoaderWidth: '32px',
|
|
20
|
+
buttonMediumLoaderWidth: '34px',
|
|
21
|
+
buttonLargeLoaderWidth: '42px'
|
|
19
22
|
};
|
|
20
23
|
export default dsRules;
|
package/dist/Types/DsRules.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type DsRulesKeys = 'headerMobileHeight' | 'headerDesktopHeight' | 'appBarMobileMinHeight' | 'stepperConnectorMinHeight' | 'searchbarMinWidth' | 'searchbarHeight' | 'drawerWidth' | 'drawerMiniWidth' | 'dialogMdMaxWidth' | 'bottomSheetWorkingAreaHeight' | 'avatarSSize' | 'avatarMSize' | 'avatarLSize' | 'avatarXLSize' | 'avatarXXLSize' | 'avatar3XLSize' | 'formHelperTextMinHeight';
|
|
1
|
+
export type DsRulesKeys = 'headerMobileHeight' | 'headerDesktopHeight' | 'appBarMobileMinHeight' | 'stepperConnectorMinHeight' | 'searchbarMinWidth' | 'searchbarHeight' | 'drawerWidth' | 'drawerMiniWidth' | 'dialogMdMaxWidth' | 'bottomSheetWorkingAreaHeight' | 'avatarSSize' | 'avatarMSize' | 'avatarLSize' | 'avatarXLSize' | 'avatarXXLSize' | 'avatar3XLSize' | 'formHelperTextMinHeight' | 'buttonLargeLoaderWidth' | 'buttonMediumLoaderWidth' | 'buttonSmallLoaderWidth';
|
|
2
2
|
export type DsRules = {
|
|
3
3
|
[key in DsRulesKeys]: string;
|
|
4
4
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@am92/react-design-system",
|
|
3
|
-
"version": "3.0.1-beta.
|
|
3
|
+
"version": "3.0.1-beta.3",
|
|
4
4
|
"description": "ReactJS Design System using Material UI",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"date-fns": "~4.1.0",
|
|
23
23
|
"notistack": "~3.0.1",
|
|
24
24
|
"prop-types": "~15.8.1",
|
|
25
|
-
"swiper": "~
|
|
25
|
+
"swiper": "~12.1.3"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@babel/cli": "^7.21.0",
|
|
@@ -47,10 +47,11 @@
|
|
|
47
47
|
"test": "echo 'Error: no test specified'",
|
|
48
48
|
"preversion": "npm-run-all build test",
|
|
49
49
|
"version": "echo 'Versioning'",
|
|
50
|
-
"postversion": "
|
|
51
|
-
"release:
|
|
52
|
-
"release:
|
|
53
|
-
"
|
|
50
|
+
"postversion": "git push && git push --tags",
|
|
51
|
+
"release:prerelease": "npm version prerelease --preid=beta && npm publish --tag beta",
|
|
52
|
+
"release:patch": "npm version patch && npm publish",
|
|
53
|
+
"release:minor": "npm version minor && npm publish",
|
|
54
|
+
"release:major": "npm version major && npm publish"
|
|
54
55
|
},
|
|
55
56
|
"repository": "git@github.com:heliumtank92/am92-react-design-system.git",
|
|
56
57
|
"homepage": "https://github.com/heliumtank92/am92-react-design-system#readme",
|