@codezee/sixtify-brahma 0.2.103 → 0.2.105
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/package.json +1 -1
- package/packages/shared-components/dist/Actions/CalendarIconAction.d.ts +4 -2
- package/packages/shared-components/dist/Actions/CalendarIconAction.d.ts.map +1 -1
- package/packages/shared-components/dist/Actions/CalendarIconAction.js +2 -2
- package/packages/shared-components/dist/Card/CardItem/CardItemValue.d.ts +1 -1
- package/packages/shared-components/dist/Card/CardItem/CardItemValue.d.ts.map +1 -1
- package/packages/shared-components/dist/Card/CardItem/CardItemValue.js +7 -8
- package/packages/shared-components/dist/FormFields/Autocomplete/Autocomplete.d.ts +3 -2
- package/packages/shared-components/dist/FormFields/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/packages/shared-components/dist/FormFields/Autocomplete/Autocomplete.js +2 -2
- package/packages/shared-components/dist/FormFields/DatePicker/DatePicker.d.ts +3 -1
- package/packages/shared-components/dist/FormFields/DatePicker/DatePicker.d.ts.map +1 -1
- package/packages/shared-components/dist/FormFields/DatePicker/DatePicker.js +3 -3
- package/packages/shared-components/dist/FormFields/DateTimePicker/DateTimePicker.d.ts.map +1 -1
- package/packages/shared-components/dist/FormFields/DateTimePicker/DateTimePicker.js +1 -1
- package/packages/shared-components/dist/FormFields/ListItemButton/ListItemButton.d.ts +1 -1
- package/packages/shared-components/dist/FormFields/ListItemButton/ListItemButton.d.ts.map +1 -1
- package/packages/shared-components/dist/FormFields/ListItemButton/ListItemButton.js +21 -1
- package/packages/shared-components/dist/FormFields/RadioGroupField/RadioGroupField.d.ts +1 -1
- package/packages/shared-components/dist/FormFields/RadioGroupField/RadioGroupField.d.ts.map +1 -1
- package/packages/shared-components/dist/FormFields/RadioGroupField/RadioGroupField.js +6 -1
- package/packages/shared-components/dist/FormFields/TimePicker/TimePicker.d.ts +3 -1
- package/packages/shared-components/dist/FormFields/TimePicker/TimePicker.d.ts.map +1 -1
- package/packages/shared-components/dist/FormFields/TimePicker/TimePicker.js +2 -2
- package/packages/shared-components/dist/Stepper/Stepper.d.ts +3 -1
- package/packages/shared-components/dist/Stepper/Stepper.d.ts.map +1 -1
- package/packages/shared-components/dist/Stepper/Stepper.js +18 -17
- package/packages/shared-components/dist/Svgs/SvgReGenerate.d.ts +3 -0
- package/packages/shared-components/dist/Svgs/SvgReGenerate.d.ts.map +1 -0
- package/packages/shared-components/dist/Svgs/SvgReGenerate.js +6 -0
- package/packages/shared-components/dist/Svgs/index.d.ts +1 -0
- package/packages/shared-components/dist/Svgs/index.d.ts.map +1 -1
- package/packages/shared-components/dist/Svgs/index.js +1 -0
package/package.json
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { IconButtonProps } from "@mui/material";
|
|
2
|
-
export type CalendarIconActionProps = IconButtonProps
|
|
3
|
-
|
|
2
|
+
export type CalendarIconActionProps = IconButtonProps & {
|
|
3
|
+
showTooltip?: boolean;
|
|
4
|
+
};
|
|
5
|
+
export declare const CalendarIconAction: ({ showTooltip, ...props }: CalendarIconActionProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
6
|
//# sourceMappingURL=CalendarIconAction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CalendarIconAction.d.ts","sourceRoot":"","sources":["../../src/Actions/CalendarIconAction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAKrD,MAAM,MAAM,uBAAuB,GAAG,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"CalendarIconAction.d.ts","sourceRoot":"","sources":["../../src/Actions/CalendarIconAction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAKrD,MAAM,MAAM,uBAAuB,GAAG,eAAe,GAAG;IACtD,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,2BAGhC,uBAAuB,4CAQzB,CAAC"}
|
|
@@ -5,7 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const material_1 = require("@mui/material");
|
|
6
6
|
const Svgs_1 = require("../Svgs");
|
|
7
7
|
const Tooltip_1 = require("../Tooltip");
|
|
8
|
-
const CalendarIconAction = (props) => {
|
|
9
|
-
return ((0, jsx_runtime_1.jsx)(material_1.IconButton, { sx: { color: "#4C5D70" }, ...props, children: (0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { toolTipLabel: "Calendar", children: (0, jsx_runtime_1.jsx)(Svgs_1.SvgCalendar, {}) }) }));
|
|
8
|
+
const CalendarIconAction = ({ showTooltip = true, ...props }) => {
|
|
9
|
+
return ((0, jsx_runtime_1.jsx)(material_1.IconButton, { sx: { color: "#4C5D70" }, ...props, children: (0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { hidden: !showTooltip, toolTipLabel: "Calendar", children: (0, jsx_runtime_1.jsx)(Svgs_1.SvgCalendar, {}) }) }));
|
|
10
10
|
};
|
|
11
11
|
exports.CalendarIconAction = CalendarIconAction;
|
|
@@ -10,6 +10,6 @@ type CardItemValueProps = {
|
|
|
10
10
|
variant?: AvatarOwnProps["variant"];
|
|
11
11
|
containerSx?: SxProps;
|
|
12
12
|
};
|
|
13
|
-
export declare const CardItemValue: (
|
|
13
|
+
export declare const CardItemValue: import("react").ForwardRefExoticComponent<CardItemValueProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
14
14
|
export {};
|
|
15
15
|
//# sourceMappingURL=CardItemValue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardItemValue.d.ts","sourceRoot":"","sources":["../../../src/Card/CardItem/CardItemValue.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"CardItemValue.d.ts","sourceRoot":"","sources":["../../../src/Card/CardItem/CardItemValue.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAIpE,KAAK,kBAAkB,GAAG;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC;IACpC,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,aAAa,gHAiFzB,CAAC"}
|
|
@@ -3,19 +3,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.CardItemValue = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const material_1 = require("@mui/material");
|
|
6
|
-
const
|
|
6
|
+
const react_1 = require("react");
|
|
7
|
+
exports.CardItemValue = (0, react_1.forwardRef)(({ title, subTitle, avatar, loading = false, showAvatar = false, isHideTitle = false, variant = "circular", sx, containerSx, }, ref) => {
|
|
7
8
|
const theme = (0, material_1.useTheme)();
|
|
8
9
|
const { slate, iron } = theme.palette.app.color;
|
|
9
10
|
if (loading) {
|
|
10
11
|
return ((0, jsx_runtime_1.jsxs)(material_1.Stack, { gap: "10px ", flex: "1", children: [(0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", gap: "10px", alignItems: "center", children: [avatar && ((0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "circular", height: "30px", animation: "wave", width: "30px" })), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rounded", height: 20, animation: "wave", width: "150px" })] }), subTitle && ((0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rounded", height: 20, animation: "wave", width: "200px" }))] }));
|
|
11
12
|
}
|
|
12
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Stack, { width: "50%", sx: containerSx, gap: "10px", children: [(0, jsx_runtime_1.jsxs)(material_1.Stack, { gap: "10px", direction: "row", alignItems: "center", children: [showAvatar && (0, jsx_runtime_1.jsx)(material_1.Avatar, { alt: title, src: avatar, variant: variant }), !isHideTitle && ((0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body1", sx: {
|
|
13
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Stack, { width: "50%", sx: containerSx, gap: "10px", flex: 1, children: [(0, jsx_runtime_1.jsxs)(material_1.Stack, { gap: "10px", direction: "row", alignItems: "center", flex: 1, children: [showAvatar && (0, jsx_runtime_1.jsx)(material_1.Avatar, { alt: title, src: avatar, variant: variant }), !isHideTitle && ((0, jsx_runtime_1.jsx)(material_1.Typography, { ref: ref, variant: "body1", sx: {
|
|
14
|
+
width: "100%",
|
|
13
15
|
fontWeight: 400,
|
|
14
16
|
color: slate[900],
|
|
15
|
-
maxWidth: "inherit",
|
|
16
17
|
...sx,
|
|
17
|
-
}, noWrap: true, children: title ? title : "-" }))] }), subTitle && ((0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body1", sx: {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
};
|
|
21
|
-
exports.CardItemValue = CardItemValue;
|
|
18
|
+
}, noWrap: true, children: title ? title : "-" }))] }), subTitle && ((0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body1", sx: { color: iron[500] }, noWrap: true, children: subTitle }))] }));
|
|
19
|
+
});
|
|
20
|
+
exports.CardItemValue.displayName = "CardItemValue";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AutocompleteValue, AutocompleteProps as MuiAutocompleteProps } from "@mui/material";
|
|
1
|
+
import type { AutocompleteValue, AutocompleteProps as MuiAutocompleteProps, StackProps } from "@mui/material";
|
|
2
2
|
import { type ControllerRenderProps, type FieldValues, type UseControllerProps, type UseFormSetValue } from "react-hook-form";
|
|
3
3
|
export type Option = {
|
|
4
4
|
heading?: string;
|
|
@@ -31,6 +31,7 @@ export type AutocompleteProps<P extends FieldValues> = UseControllerProps<P> & O
|
|
|
31
31
|
defaultOption?: AutocompleteValue<Option, boolean, boolean, boolean>;
|
|
32
32
|
disableClearable?: boolean;
|
|
33
33
|
setValue?: UseFormSetValue<P>;
|
|
34
|
+
containerProps?: StackProps;
|
|
34
35
|
};
|
|
35
|
-
export declare function Autocomplete<P extends FieldValues>({ control, defaultValue, name, required, label, multiple, disabled, options, rules, loading, helperText, error, withLabel, placeholder, freeSolo, isShowOptionsOnType, isShowSelectAll, isShowAvatar, isShowEmployeeData, shouldCloseOnSelect, onAction, renderOption, getOptionLabel, maxLimit, autoFocus, defaultOption, disableClearable, setValue, ...restProps }: AutocompleteProps<P>): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export declare function Autocomplete<P extends FieldValues>({ control, defaultValue, name, required, label, multiple, disabled, options, rules, loading, helperText, error, withLabel, placeholder, freeSolo, isShowOptionsOnType, isShowSelectAll, isShowAvatar, isShowEmployeeData, shouldCloseOnSelect, onAction, renderOption, getOptionLabel, maxLimit, autoFocus, defaultOption, disableClearable, containerProps, setValue, ...restProps }: AutocompleteProps<P>): import("react/jsx-runtime").JSX.Element;
|
|
36
37
|
//# sourceMappingURL=Autocomplete.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Autocomplete.d.ts","sourceRoot":"","sources":["../../../src/FormFields/Autocomplete/Autocomplete.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,IAAI,oBAAoB,
|
|
1
|
+
{"version":3,"file":"Autocomplete.d.ts","sourceRoot":"","sources":["../../../src/FormFields/Autocomplete/Autocomplete.tsx"],"names":[],"mapp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AAO,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,CACb,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,aAAa,CAAC,EACrC,MAAM,EAAE,MAAM,EACd,KAAK,EAAE;QAAE,QAAQ,EAAE,OAAO,CAAA;KAAE,KACzB,GAAG,CAAC,OAAO,CAAC;IACjB,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;IAC5C,aAAa,CAAC,EAAE,iBAAiB,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IACrE,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IAC9B,cAAc,CAAC,EAAE,UAAU,CAAC;CAC7B,CAAC;AAEJ,wBAAgB,YAAY,CAAC,CAAC,SAAS,WAAW,EAAE,EAClD,OAAO,EACP,YAAY,EACZ,IAAI,EACJ,QAAgB,EAChB,KAAK,EACL,QAAgB,EAChB,QAAgB,EAChB,OAAY,EACZ,KAAK,EACL,OAAe,EACf,UAAU,EACV,KAAK,EACL,SAAiB,EACjB,WAAgB,EAChB,QAAQ,EACR,mBAA2B,EAC3B,eAAsB,EACtB,YAAoB,EACpB,kBAA0B,EAC1B,mBAA2B,EAC3B,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,QAAQ,EACR,SAAiB,EACjB,aAAa,EACb,gBAA0C,EAC1C,cAAc,EACd,QAAQ,EACR,GAAG,SAAS,EACb,EAAE,iBAAiB,CAAC,CAAC,CAAC,2CAoatB"}
|
|
@@ -15,7 +15,7 @@ const Actions_1 = require("../../Actions");
|
|
|
15
15
|
const Toast_1 = require("../../Toast");
|
|
16
16
|
const CheckBox_styled_1 = require("../CheckBox/CheckBox.styled");
|
|
17
17
|
const Skeleton_1 = require("./Skeleton");
|
|
18
|
-
function Autocomplete({ control, defaultValue, name, required = false, label, multiple = false, disabled = false, options = [], rules, loading = false, helperText, error, withLabel = false, placeholder = "", freeSolo, isShowOptionsOnType = false, isShowSelectAll = true, isShowAvatar = false, isShowEmployeeData = false, shouldCloseOnSelect = false, onAction, renderOption, getOptionLabel, maxLimit, autoFocus = false, defaultOption, disableClearable = required ? true : false, setValue, ...restProps }) {
|
|
18
|
+
function Autocomplete({ control, defaultValue, name, required = false, label, multiple = false, disabled = false, options = [], rules, loading = false, helperText, error, withLabel = false, placeholder = "", freeSolo, isShowOptionsOnType = false, isShowSelectAll = true, isShowAvatar = false, isShowEmployeeData = false, shouldCloseOnSelect = false, onAction, renderOption, getOptionLabel, maxLimit, autoFocus = false, defaultOption, disableClearable = required ? true : false, containerProps, setValue, ...restProps }) {
|
|
19
19
|
const { field: { onChange, value, ...restField }, } = (0, react_hook_form_1.useController)({
|
|
20
20
|
name,
|
|
21
21
|
control,
|
|
@@ -118,7 +118,7 @@ function Autocomplete({ control, defaultValue, name, required = false, label, mu
|
|
|
118
118
|
if (loading) {
|
|
119
119
|
return (0, jsx_runtime_1.jsx)(Skeleton_1.Skeleton, { label: label });
|
|
120
120
|
}
|
|
121
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Stack, { gap: "10px", children: [label && ((0, jsx_runtime_1.jsx)(material_1.InputLabel, { sx: { fontSize: { xs: "14px", md: "16px" } }, required: required, children: label })), (0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", justifyContent: "space-between", gap: "10px", alignItems: "start", children: [(0, jsx_runtime_1.jsx)(material_1.Autocomplete, { PopperComponent: material_1.Popper, PaperComponent: StyledPaper, sx: {
|
|
121
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Stack, { gap: "10px", ...containerProps, children: [label && ((0, jsx_runtime_1.jsx)(material_1.InputLabel, { sx: { fontSize: { xs: "14px", md: "16px" } }, required: required, children: label })), (0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", justifyContent: "space-between", gap: "10px", alignItems: "start", children: [(0, jsx_runtime_1.jsx)(material_1.Autocomplete, { PopperComponent: material_1.Popper, PaperComponent: StyledPaper, sx: {
|
|
122
122
|
"& .MuiAutocomplete-tag": {
|
|
123
123
|
backgroundColor: color.slate[700],
|
|
124
124
|
color: "black",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type StackProps } from "@mui/material";
|
|
1
2
|
import type { DatePickerProps as MuiDatePickerProps } from "@mui/x-date-pickers/DatePicker";
|
|
2
3
|
import type { DateView, PickerValidDate } from "@mui/x-date-pickers/models";
|
|
3
4
|
import React from "react";
|
|
@@ -18,6 +19,7 @@ export type DatePickerProps<P extends FieldValues> = UseControllerProps<P> & Mui
|
|
|
18
19
|
type: string;
|
|
19
20
|
message?: string;
|
|
20
21
|
}) => void;
|
|
22
|
+
containerProps?: StackProps;
|
|
21
23
|
}>;
|
|
22
24
|
export declare const dateFormats: {
|
|
23
25
|
dateWithISO8601: string;
|
|
@@ -25,5 +27,5 @@ export declare const dateFormats: {
|
|
|
25
27
|
};
|
|
26
28
|
export declare const LeftArrowIcon: React.FC;
|
|
27
29
|
export declare const RightArrowIcon: React.FC;
|
|
28
|
-
export declare function DatePicker<P extends FieldValues>({ setError, control, defaultValue, disabled, label, readOnly, name, error, helperText, loading, required, clearable, rules, disableKeyboardInput, setOnFinalChange, views, format, ...restProps }: DatePickerProps<P>): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export declare function DatePicker<P extends FieldValues>({ setError, control, defaultValue, disabled, label, readOnly, name, error, helperText, loading, required, clearable, rules, disableKeyboardInput, setOnFinalChange, views, format, containerProps, ...restProps }: DatePickerProps<P>): import("react/jsx-runtime").JSX.Element;
|
|
29
31
|
//# sourceMappingURL=DatePicker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../../src/FormFields/DatePicker/DatePicker.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":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,CAAC;AAEF,wBAAgB,UAAU,CAAC,CAAC,SAAS,WAAW,EAAE,EAChD,QAAQ,EACR,OAAO,EACP,YAAY,EACZ,QAAgB,EAChB,KAAK,EACL,QAAgB,EAChB,IAAI,EACJ,KAAa,EACb,UAAU,EACV,OAAe,EACf,QAAgB,EAChB,SAAmC,EACnC,KAAK,EACL,oBAA4B,EAC5B,gBAAwB,EACxB,KAAgC,EAChC,MAAqC,EACrC,cAAc,EACd,GAAG,SAAS,EACb,EAAE,eAAe,CAAC,CAAC,CAAC,2CAsMpB"}
|
|
@@ -40,7 +40,7 @@ const RightArrowIcon = () => {
|
|
|
40
40
|
} }));
|
|
41
41
|
};
|
|
42
42
|
exports.RightArrowIcon = RightArrowIcon;
|
|
43
|
-
function DatePicker({ setError, control, defaultValue, disabled = false, label, readOnly = false, name, error = false, helperText, loading = false, required = false, clearable = required ? false : true, rules, disableKeyboardInput = false, setOnFinalChange = false, views = ["year", "month", "day"], format = exports.dateFormats.dateWithEuropean, ...restProps }) {
|
|
43
|
+
function DatePicker({ setError, control, defaultValue, disabled = false, label, readOnly = false, name, error = false, helperText, loading = false, required = false, clearable = required ? false : true, rules, disableKeyboardInput = false, setOnFinalChange = false, views = ["year", "month", "day"], format = exports.dateFormats.dateWithEuropean, containerProps, ...restProps }) {
|
|
44
44
|
const [localError, setLocalError] = (0, react_1.useState)();
|
|
45
45
|
const { field: { value, onChange, ...restField }, } = (0, react_hook_form_1.useController)({ name, control, defaultValue, rules });
|
|
46
46
|
const [open, setOpen] = (0, react_1.useState)(false);
|
|
@@ -64,7 +64,7 @@ function DatePicker({ setError, control, defaultValue, disabled = false, label,
|
|
|
64
64
|
if (loading) {
|
|
65
65
|
return (0, jsx_runtime_1.jsx)(Skeleton_1.Skeleton, { label: label });
|
|
66
66
|
}
|
|
67
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Stack, { gap: "10px", children: [label && ((0, jsx_runtime_1.jsx)(material_1.InputLabel, { sx: { fontSize: { xs: "14px", md: "16px" } }, required: required, children: label })), (0, jsx_runtime_1.jsx)(DatePicker_1.DatePicker, { ...restField, ...restProps, disabled: disabled, views: views, format: format, value: finalValue, readOnly: readOnly, open: open && !readOnly, onOpen: () => setOpen(true), onClose: () => setOpen(false), slotProps: {
|
|
67
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Stack, { gap: "10px", ...containerProps, children: [label && ((0, jsx_runtime_1.jsx)(material_1.InputLabel, { sx: { fontSize: { xs: "14px", md: "16px" } }, required: required, children: label })), (0, jsx_runtime_1.jsx)(DatePicker_1.DatePicker, { ...restField, ...restProps, disabled: disabled, views: views, format: format, value: finalValue, readOnly: readOnly, open: open && !readOnly, onOpen: () => setOpen(true), onClose: () => setOpen(false), slotProps: {
|
|
68
68
|
field: {
|
|
69
69
|
clearable,
|
|
70
70
|
onClear: () => onChange(null),
|
|
@@ -78,7 +78,7 @@ function DatePicker({ setError, control, defaultValue, disabled = false, label,
|
|
|
78
78
|
error: !!localError || error,
|
|
79
79
|
helperText: localError ?? helperText,
|
|
80
80
|
InputProps: {
|
|
81
|
-
endAdornment: ((0, jsx_runtime_1.jsx)(Actions_1.CalendarIconAction, { disabled: disabled, onClick: () => setOpen(true) })),
|
|
81
|
+
endAdornment: ((0, jsx_runtime_1.jsx)(Actions_1.CalendarIconAction, { disabled: disabled, onClick: () => setOpen(true), showTooltip: false })),
|
|
82
82
|
sx: {
|
|
83
83
|
"& .MuiInputAdornment-root": {
|
|
84
84
|
width: "30px",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateTimePicker.d.ts","sourceRoot":"","sources":["../../../src/FormFields/DateTimePicker/DateTimePicker.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,IAAI,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAExG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAElE,OAAc,EAAE,KAAK,YAAY,EAAY,MAAM,OAAO,CAAC;AAC3D,OAAO,KAAK,EACV,UAAU,EACV,WAAW,EAGX,kBAAkB,EACnB,MAAM,iBAAiB,CAAC;AAKzB,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,WAAW,IAAI,kBAAkB,CAAC,CAAC,CAAC,GAC5E,sBAAsB,CAAC,eAAe,CAAC,GACvC,OAAO,CAAC;IACN,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,YAAY,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,EAAE,CACR,IAAI,EAAE,MAAM,CAAC,EACb,KAAK,EAAE,UAAU,GAAG;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,KACnD,IAAI,CAAC;CACX,CAAC,CAAC;AAwCL,wBAAgB,cAAc,CAAC,CAAC,SAAS,WAAW,EAAE,EACpD,OAAO,EACP,YAAY,EACZ,QAAgB,EAChB,KAAK,EACL,QAAgB,EAChB,IAAI,EACJ,KAAa,EACb,UAAU,EACV,OAAe,EACf,QAAgB,EAChB,SAAmC,EACnC,KAAK,EACL,MAA2B,EAC3B,UAAU,EACV,WAAW,EACX,gBAAoB,EACpB,GAAG,SAAS,EACb,EAAE,mBAAmB,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"DateTimePicker.d.ts","sourceRoot":"","sources":["../../../src/FormFields/DateTimePicker/DateTimePicker.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,IAAI,sBAAsB,EAAE,MAAM,oCAAoC,C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disabled = false, label, readOn
|
|
|
65
65
|
helperText,
|
|
66
66
|
error,
|
|
67
67
|
InputProps: {
|
|
68
|
-
endAdornment: ((0, jsx_runtime_1.jsx)(Actions_1.CalendarIconAction, { onClick: () => setOpen(true) })),
|
|
68
|
+
endAdornment: ((0, jsx_runtime_1.jsx)(Actions_1.CalendarIconAction, { showTooltip: false, onClick: () => setOpen(true) })),
|
|
69
69
|
sx: {
|
|
70
70
|
"& .MuiInputAdornment-root": {
|
|
71
71
|
width: "30px",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ListItemButtonProps as MuiListItemButtonProps } from "@mui/material";
|
|
2
|
-
import type
|
|
2
|
+
import { type ReactNode } from "react";
|
|
3
3
|
export type ListItemButtonProps = MuiListItemButtonProps & {
|
|
4
4
|
label: string;
|
|
5
5
|
actions?: ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItemButton.d.ts","sourceRoot":"","sources":["../../../src/FormFields/ListItemButton/ListItemButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,mBAAmB,IAAI,sBAAsB,EACnD,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"ListItemButton.d.ts","sourceRoot":"","sources":["../../../src/FormFields/ListItemButton/ListItemButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,mBAAmB,IAAI,sBAAsB,EACnD,MAAM,eAAe,CAAC;AACvB,OAAO,EAA+B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIpE,MAAM,MAAM,mBAAmB,GAAG,sBAAsB,GAAG;IACzD,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,QAAQ,EACR,OAAO,EACP,WAAW,EACX,GAAG,uBAAuB,EAC3B,EAAE,mBAAmB,2CAiErB"}
|
|
@@ -3,10 +3,30 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ListItemButton = ListItemButton;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const material_1 = require("@mui/material");
|
|
6
|
+
const react_1 = require("react");
|
|
6
7
|
const Tooltip_1 = require("../../Tooltip");
|
|
7
8
|
const ListItemButton_styled_1 = require("./ListItemButton.styled");
|
|
8
9
|
function ListItemButton({ label, selected, actions, companyName, ...restListItemButtonProps }) {
|
|
9
10
|
const theme = (0, material_1.useTheme)();
|
|
10
11
|
const { iron } = theme.palette.app.color;
|
|
11
|
-
|
|
12
|
+
const textRef = (0, react_1.useRef)(null);
|
|
13
|
+
const [isOverflowed, setIsOverflowed] = (0, react_1.useState)(false);
|
|
14
|
+
//useMemo is not allowed on side effects.
|
|
15
|
+
(0, react_1.useEffect)(() => {
|
|
16
|
+
const el = textRef.current;
|
|
17
|
+
if (!el) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
const handleResize = () => setIsOverflowed(el.scrollWidth > el.clientWidth);
|
|
21
|
+
handleResize();
|
|
22
|
+
window.addEventListener("resize", handleResize);
|
|
23
|
+
return () => window.removeEventListener("resize", handleResize);
|
|
24
|
+
}, [label, companyName]);
|
|
25
|
+
return ((0, jsx_runtime_1.jsx)(ListItemButton_styled_1.StyledListItemButton, { selected: selected, alignItems: "flex-start", ...restListItemButtonProps, children: (0, jsx_runtime_1.jsxs)(material_1.Stack, { width: "100%", flexDirection: "row", alignItems: "center", justifyContent: "space-between", children: [(0, jsx_runtime_1.jsxs)(material_1.Stack, { gap: "5px", direction: "column", flex: 1, display: "grid", children: [(0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { toolTipLabel: label, checkOverflow: !isOverflowed, children: (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", fontWeight: 500, ref: textRef, sx: {
|
|
26
|
+
width: "auto",
|
|
27
|
+
whiteSpace: "nowrap",
|
|
28
|
+
overflow: "hidden",
|
|
29
|
+
textOverflow: "ellipsis",
|
|
30
|
+
display: "block",
|
|
31
|
+
}, children: label }) }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "caption", color: iron[800], children: companyName })] }), actions] }) }));
|
|
12
32
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type StackOwnProps, type StackProps, type SxProps } from "@mui/material";
|
|
2
2
|
import { type RadioProps as MuiRadioProps } from "@mui/material/Radio";
|
|
3
3
|
import type { ReactNode } from "react";
|
|
4
4
|
import { type ControllerRenderProps, type FieldValues, type UseControllerProps } from "react-hook-form";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroupField.d.ts","sourceRoot":"","sources":["../../../src/FormFields/RadioGroupField/RadioGroupField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,
|
|
1
|
+
{"version":3,"file":"RadioGroupField.d.ts","sourceRoot":"","sources":["../../../src/FormFields/RadioGroupField/RadioGroupField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,OAAO,EACb,MAAM,eAAe,CAAC;AACvB,OAAc,EAAE,KAAK,UAAU,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAEL,KAAK,qBAAqB,EAC1B,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACxB,MAAM,iBAAiB,CAAC;AAGzB,KAAK,OAAO,GAAG;IACb,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;CACxC,CAAC;AAEF,MAAM,MAAM,oBAAoB,CAAC,CAAC,SAAS,WAAW,IACpD,kBAAkB,CAAC,CAAC,CAAC,GACnB,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,SAAS,CAAC,EAAE,MAAM,qBAAqB,CAAC,CAAC,CAAC,CAAC,GAAG;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,EAAE,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;IACvC,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,cAAc,CAAC,EAAE,UAAU,CAAC;CAC7B,CAAC;AAEN,wBAAgB,eAAe,CAAC,CAAC,SAAS,WAAW,EAAE,EACrD,IAAI,EACJ,KAAK,EACL,KAAK,EACL,OAAO,EACP,OAAO,EACP,YAAY,EACZ,IAAc,EACd,KAAmB,EACnB,OAAe,EACf,QAAgB,EAChB,SAAiB,EACjB,EAAO,EACP,cAAc,EACd,YAAoB,EACpB,GAAG,oBAAoB,EACxB,EAAE,oBAAoB,CAAC,CAAC,CAAC,2CAwEzB"}
|
|
@@ -14,7 +14,12 @@ function RadioGroupField({ name, rules, label, control, options, defaultValue, s
|
|
|
14
14
|
if (loading) {
|
|
15
15
|
return (0, jsx_runtime_1.jsx)(Skeleton_1.Skeleton, {});
|
|
16
16
|
}
|
|
17
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: isHorizontal ? "row" : "column", alignItems: isHorizontal ? "center" : undefined, gap: isHorizontal ? 1 : "5px", children: [label && ((0, jsx_runtime_1.jsx)(material_1.InputLabel, { sx: {
|
|
17
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: isHorizontal ? "row" : "column", alignItems: isHorizontal ? "center" : undefined, gap: isHorizontal ? 1 : "5px", children: [label && ((0, jsx_runtime_1.jsx)(material_1.InputLabel, { sx: {
|
|
18
|
+
whiteSpace: "normal",
|
|
19
|
+
overflow: "visible",
|
|
20
|
+
textOverflow: "unset",
|
|
21
|
+
fontSize: { xs: "14px", md: "16px" },
|
|
22
|
+
}, required: required, children: label })), (0, jsx_runtime_1.jsx)(material_1.RadioGroup, { name: name, value: value, onChange: (_, event) => {
|
|
18
23
|
if (event === "true") {
|
|
19
24
|
onChange(true);
|
|
20
25
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { StackProps } from "@mui/material";
|
|
1
2
|
import type { TimePickerProps as MuiTimePickerProps } from "@mui/x-date-pickers/TimePicker";
|
|
2
3
|
import type { PickerValidDate } from "@mui/x-date-pickers/models";
|
|
3
4
|
import { type ReactElement } from "react";
|
|
@@ -15,6 +16,7 @@ export type TimePickerProps<P extends FieldValues> = UseControllerProps<P> & Mui
|
|
|
15
16
|
helperIcon?: ReactElement;
|
|
16
17
|
toolTipText?: string;
|
|
17
18
|
timeStepsMinutes?: number;
|
|
19
|
+
containerProps?: StackProps;
|
|
18
20
|
}>;
|
|
19
|
-
export declare function TimePicker<P extends FieldValues>({ control, defaultValue, disabled, label, readOnly, name, error, helperText, loading, required, rules, format, isReturnLocalTime, isReturnDateWithTime, timeStepsMinutes, helperIcon, toolTipText, ...restProps }: TimePickerProps<P>): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare function TimePicker<P extends FieldValues>({ control, defaultValue, disabled, label, readOnly, name, error, helperText, loading, required, rules, format, isReturnLocalTime, isReturnDateWithTime, timeStepsMinutes, helperIcon, toolTipText, containerProps, ...restProps }: TimePickerProps<P>): import("react/jsx-runtime").JSX.Element;
|
|
20
22
|
//# sourceMappingURL=TimePicker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimePicker.d.ts","sourceRoot":"","sources":["../../../src/FormFields/TimePicker/TimePicker.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TimePicker.d.ts","sourceRoot":"","sources":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Ae,CAAC,CAAC,CAAC,2CAwHpB"}
|
|
@@ -8,7 +8,7 @@ const luxon_1 = require("luxon");
|
|
|
8
8
|
const react_1 = require("react");
|
|
9
9
|
const react_hook_form_1 = require("react-hook-form");
|
|
10
10
|
const Skeleton_1 = require("./Skeleton");
|
|
11
|
-
function TimePicker({ control, defaultValue, disabled = false, label, readOnly = false, name, error = false, helperText, loading = false, required = false, rules, format = "HH:mm", isReturnLocalTime = false, isReturnDateWithTime = false, timeStepsMinutes = 1, helperIcon, toolTipText, ...restProps }) {
|
|
11
|
+
function TimePicker({ control, defaultValue, disabled = false, label, readOnly = false, name, error = false, helperText, loading = false, required = false, rules, format = "HH:mm", isReturnLocalTime = false, isReturnDateWithTime = false, timeStepsMinutes = 1, helperIcon, toolTipText, containerProps, ...restProps }) {
|
|
12
12
|
const { field: { value, onChange, ...restField }, } = (0, react_hook_form_1.useController)({ name, control, defaultValue, rules });
|
|
13
13
|
const [open, setOpen] = (0, react_1.useState)(false);
|
|
14
14
|
if (error && value && typeof value === "object") {
|
|
@@ -22,7 +22,7 @@ function TimePicker({ control, defaultValue, disabled = false, label, readOnly =
|
|
|
22
22
|
if (loading) {
|
|
23
23
|
return (0, jsx_runtime_1.jsx)(Skeleton_1.Skeleton, { label: label });
|
|
24
24
|
}
|
|
25
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Stack, { gap: "10px", children: [label && ((0, jsx_runtime_1.jsxs)(material_1.Stack, { alignItems: "center", flexDirection: "row", gap: "5px", children: [(0, jsx_runtime_1.jsx)(material_1.InputLabel, { sx: { fontSize: { xs: "14px", md: "16px" } }, required: required, disabled: disabled, children: label }), helperIcon && toolTipText && ((0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: toolTipText, placement: "bottom", children: helperIcon }))] })), (0, jsx_runtime_1.jsx)(TimePicker_1.TimePicker, { ...restField, ...restProps, disabled: disabled, readOnly: readOnly, open: open, ampm: false, value: pickerValue, format: format, onOpen: () => setOpen(true), onClose: () => setOpen(false), timeSteps: { minutes: timeStepsMinutes }, slotProps: {
|
|
25
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Stack, { gap: "10px", ...containerProps, children: [label && ((0, jsx_runtime_1.jsxs)(material_1.Stack, { alignItems: "center", flexDirection: "row", gap: "5px", children: [(0, jsx_runtime_1.jsx)(material_1.InputLabel, { sx: { fontSize: { xs: "14px", md: "16px" } }, required: required, disabled: disabled, children: label }), helperIcon && toolTipText && ((0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: toolTipText, placement: "bottom", children: helperIcon }))] })), (0, jsx_runtime_1.jsx)(TimePicker_1.TimePicker, { ...restField, ...restProps, disabled: disabled, readOnly: readOnly, open: open, ampm: false, value: pickerValue, format: format, onOpen: () => setOpen(true), onClose: () => setOpen(false), timeSteps: { minutes: timeStepsMinutes }, slotProps: {
|
|
26
26
|
textField: {
|
|
27
27
|
disabled,
|
|
28
28
|
helperText,
|
|
@@ -6,7 +6,9 @@ type StepperProps = MuiStepperProps & {
|
|
|
6
6
|
showActiveStepIcon?: boolean;
|
|
7
7
|
stepLabelProps?: StepLabelProps;
|
|
8
8
|
onStepClick?: (stepIndex: number) => void;
|
|
9
|
+
showTooltips?: boolean;
|
|
10
|
+
showStepLabels?: boolean;
|
|
9
11
|
};
|
|
10
|
-
export declare const Stepper: ({ orientation, activeStep, stepLabelProps, steps, stepUrls, errorSteps, onStepClick, ...rest }: StepperProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const Stepper: ({ orientation, activeStep, stepLabelProps, steps, stepUrls, errorSteps, onStepClick, showTooltips, showStepLabels, ...rest }: StepperProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
13
|
export {};
|
|
12
14
|
//# sourceMappingURL=Stepper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stepper.d.ts","sourceRoot":"","sources":["../../src/Stepper/Stepper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,IAAI,eAAe,EAC/B,cAAc,EACf,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"Stepper.d.ts","sourceRoot":"","sources":["../../src/Stepper/Stepper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,IAAI,eAAe,EAC/B,cAAc,EACf,MAAM,eAAe,CAAC;AAYvB,KAAK,YAAY,GAAG,eAAe,GAAG;IACpC,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,WAAW,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,8HAWrB,YAAY,4CAmEd,CAAC"}
|
|
@@ -4,7 +4,7 @@ exports.Stepper = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const material_1 = require("@mui/material");
|
|
6
6
|
const navigation_1 = require("next/navigation");
|
|
7
|
-
const Stepper = ({ orientation = "horizontal", activeStep = 0, stepLabelProps = {}, steps, stepUrls = [], errorSteps = [], onStepClick, ...rest }) => {
|
|
7
|
+
const Stepper = ({ orientation = "horizontal", activeStep = 0, stepLabelProps = {}, steps, stepUrls = [], errorSteps = [], onStepClick, showTooltips = false, showStepLabels = true, ...rest }) => {
|
|
8
8
|
const theme = (0, material_1.useTheme)();
|
|
9
9
|
const router = (0, navigation_1.useRouter)();
|
|
10
10
|
const { butterflyBlue, red } = theme.palette.app.color;
|
|
@@ -18,24 +18,25 @@ const Stepper = ({ orientation = "horizontal", activeStep = 0, stepLabelProps =
|
|
|
18
18
|
};
|
|
19
19
|
return ((0, jsx_runtime_1.jsx)(material_1.Box, { children: (0, jsx_runtime_1.jsx)(material_1.Stepper, { activeStep: activeStep, orientation: orientation, ...rest, children: steps.map((label, index) => {
|
|
20
20
|
const isError = errorSteps.includes(index);
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
const stepLabelContent = ((0, jsx_runtime_1.jsx)(material_1.StepLabel, { ...stepLabelProps, error: isError, sx: {
|
|
22
|
+
cursor: (stepUrls[index] ?? onStepClick) ? "pointer" : "default",
|
|
23
|
+
".Mui-active .MuiStepIcon-root": {
|
|
24
|
+
color: `${butterflyBlue[900]} !important`,
|
|
25
|
+
},
|
|
26
|
+
".Mui-completed .MuiStepIcon-root": {
|
|
27
|
+
color: `${butterflyBlue[900]} !important`,
|
|
28
|
+
},
|
|
29
|
+
...(isError && {
|
|
30
|
+
".MuiStepIcon-root": {
|
|
31
|
+
color: `${red[900]} !important`,
|
|
25
32
|
},
|
|
26
|
-
".
|
|
27
|
-
color: `${
|
|
33
|
+
".MuiStepLabel-label": {
|
|
34
|
+
color: `${red[900]} !important`,
|
|
28
35
|
},
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
".MuiStepLabel-label": {
|
|
34
|
-
color: `${red[900]} !important`,
|
|
35
|
-
},
|
|
36
|
-
}),
|
|
37
|
-
...stepLabelProps.sx,
|
|
38
|
-
}, onClick: () => handleStepClick(index), children: (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", children: label }) }) }, label));
|
|
36
|
+
}),
|
|
37
|
+
...stepLabelProps.sx,
|
|
38
|
+
}, onClick: () => handleStepClick(index), children: showStepLabels && ((0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", children: label })) }));
|
|
39
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Step, { children: showTooltips ? ((0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: label, placement: "top", children: stepLabelContent })) : (stepLabelContent) }, label));
|
|
39
40
|
}) }) }));
|
|
40
41
|
};
|
|
41
42
|
exports.Stepper = Stepper;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SvgReGenerate.d.ts","sourceRoot":"","sources":["../../src/Svgs/SvgReGenerate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEtC,eAAO,MAAM,aAAa,GAAI,OAAO,QAAQ,CAAC,aAAa,CAAC,4CAU3D,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SvgReGenerate = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const SvgReGenerate = (props) => ((0, jsx_runtime_1.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: props.color ?? "currentColor", viewBox: "0 0 32 32", ...props, children: [(0, jsx_runtime_1.jsx)("path", { d: "m21.697 14.924-1.396-.501a4.515 4.515 0 0 1-2.724-2.725l-.502-1.396-.002-.004c-.163-.448-.594-.751-1.073-.751s-.91.303-1.076.756l-.501 1.396a4.515 4.515 0 0 1-2.725 2.724l-1.399.504c-.449.163-.752.595-.752 1.073s.303.91.756 1.076l1.396.501a4.515 4.515 0 0 1 2.724 2.725l.504 1.399c.164.449.596.752 1.074.752s.91-.303 1.076-.756l.501-1.396a4.515 4.515 0 0 1 2.725-2.724l1.399-.504c.449-.164.752-.596.752-1.074s-.304-.909-.757-1.075zM16 18.914A6.501 6.501 0 0 0 13.086 16 6.501 6.501 0 0 0 16 13.086 6.501 6.501 0 0 0 18.914 16 6.501 6.501 0 0 0 16 18.914z" }), (0, jsx_runtime_1.jsx)("path", { d: "M27.401 9.132a1 1 0 0 0-1.711 1.037 11.247 11.247 0 0 1 1.623 5.832c0 6.237-5.075 11.313-11.313 11.313a11.27 11.27 0 0 1-3.118-.445l.993-.477a1.001 1.001 0 0 0-.867-1.803l-3.125 1.503a1.002 1.002 0 0 0-.433 1.398l1.728 3.008a.997.997 0 0 0 1.365.369.999.999 0 0 0 .369-1.365l-.38-.662c1.123.304 2.282.473 3.469.473 7.341 0 13.313-5.972 13.313-13.313a13.259 13.259 0 0 0-1.913-6.868zM15.999 4.687c1.069 0 2.112.156 3.118.445l-.993.477a1.001 1.001 0 0 0 .434 1.901.985.985 0 0 0 .433-.099l3.125-1.503a1.002 1.002 0 0 0 .433-1.399l-1.728-3.008a1 1 0 1 0-1.734.996l.38.662a13.244 13.244 0 0 0-3.469-.473c-7.341 0-13.313 5.972-13.313 13.313 0 2.429.661 4.805 1.912 6.869a1 1 0 0 0 1.711-1.038 11.247 11.247 0 0 1-1.623-5.832C4.687 9.762 9.762 4.687 15.999 4.687z" })] }));
|
|
6
|
+
exports.SvgReGenerate = SvgReGenerate;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Svgs/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,0BAA0B,CAAC;AACzC,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAA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