@tap-payments/os-micro-frontend-shared 0.0.115 → 0.0.119
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/build/components/JSONViewer/context/Provider.js +2 -0
- package/build/components/SearchButton/styles.d.ts +1 -1
- package/build/components/TableCells/CustomCells/ActionCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/SourceMergedCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/StatusCell/style.d.ts +1 -1
- package/build/components/VirtualTable/style.d.ts +1 -1
- package/build/components/index.d.ts +0 -1
- package/build/components/index.js +0 -1
- package/package.json +1 -1
- package/build/components/Calender/Calender.d.ts +0 -14
- package/build/components/Calender/Calender.js +0 -54
- package/build/components/Calender/index.d.ts +0 -2
- package/build/components/Calender/index.js +0 -2
- package/build/components/Calender/style.d.ts +0 -32
- package/build/components/Calender/style.js +0 -273
|
@@ -7,6 +7,7 @@ export const JsonViewerDialogContextProvider = ({ children }) => {
|
|
|
7
7
|
const [isWindowMinimized, setIsWindowMinimized] = useState(false);
|
|
8
8
|
const [windowOrder, setWindowOrder] = useState(1);
|
|
9
9
|
const handleJsonViewerDialogOpen = useCallback((jsonViewer) => {
|
|
10
|
+
var _a;
|
|
10
11
|
if (jsonViewerList.length === 7) {
|
|
11
12
|
alert('Maximum allowed active Json Viewer is 7 per table.');
|
|
12
13
|
return;
|
|
@@ -14,6 +15,7 @@ export const JsonViewerDialogContextProvider = ({ children }) => {
|
|
|
14
15
|
if (jsonViewerList.some((item) => item.json.id === jsonViewer.json.id)) {
|
|
15
16
|
return;
|
|
16
17
|
}
|
|
18
|
+
(_a = jsonViewer === null || jsonViewer === void 0 ? void 0 : jsonViewer.json) === null || _a === void 0 ? true : delete _a.request_body;
|
|
17
19
|
setJsonViewerList((prev) => [...prev, jsonViewer]);
|
|
18
20
|
}, [jsonViewerList]);
|
|
19
21
|
const handleJsonViewerDialogClose = (index) => {
|
|
@@ -554,9 +554,9 @@ export declare const Icon: import("@emotion/styled").StyledComponent<{
|
|
|
554
554
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLImageElement> | undefined;
|
|
555
555
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLImageElement> | undefined;
|
|
556
556
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLImageElement> | undefined;
|
|
557
|
+
referrerPolicy?: import("react").HTMLAttributeReferrerPolicy | undefined;
|
|
557
558
|
src?: string | undefined;
|
|
558
559
|
alt?: string | undefined;
|
|
559
|
-
referrerPolicy?: import("react").HTMLAttributeReferrerPolicy | undefined;
|
|
560
560
|
crossOrigin?: "" | "anonymous" | "use-credentials" | undefined;
|
|
561
561
|
useMap?: string | undefined;
|
|
562
562
|
loading?: "eager" | "lazy" | undefined;
|
|
@@ -269,9 +269,9 @@ export declare const ActionIcon: import("@emotion/styled").StyledComponent<{
|
|
|
269
269
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLImageElement> | undefined;
|
|
270
270
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLImageElement> | undefined;
|
|
271
271
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLImageElement> | undefined;
|
|
272
|
+
referrerPolicy?: import("react").HTMLAttributeReferrerPolicy | undefined;
|
|
272
273
|
src?: string | undefined;
|
|
273
274
|
alt?: string | undefined;
|
|
274
|
-
referrerPolicy?: import("react").HTMLAttributeReferrerPolicy | undefined;
|
|
275
275
|
crossOrigin?: "" | "anonymous" | "use-credentials" | undefined;
|
|
276
276
|
useMap?: string | undefined;
|
|
277
277
|
loading?: "eager" | "lazy" | undefined;
|
|
@@ -273,9 +273,9 @@ export declare const MultiRefundIcon: import("@emotion/styled").StyledComponent<
|
|
|
273
273
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLImageElement> | undefined;
|
|
274
274
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLImageElement> | undefined;
|
|
275
275
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLImageElement> | undefined;
|
|
276
|
+
referrerPolicy?: import("react").HTMLAttributeReferrerPolicy | undefined;
|
|
276
277
|
src?: string | undefined;
|
|
277
278
|
alt?: string | undefined;
|
|
278
|
-
referrerPolicy?: import("react").HTMLAttributeReferrerPolicy | undefined;
|
|
279
279
|
crossOrigin?: "" | "anonymous" | "use-credentials" | undefined;
|
|
280
280
|
useMap?: string | undefined;
|
|
281
281
|
loading?: "eager" | "lazy" | undefined;
|
|
@@ -262,9 +262,9 @@ export declare const MultiRefundIcon: import("@emotion/styled").StyledComponent<
|
|
|
262
262
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLImageElement> | undefined;
|
|
263
263
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLImageElement> | undefined;
|
|
264
264
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLImageElement> | undefined;
|
|
265
|
+
referrerPolicy?: import("react").HTMLAttributeReferrerPolicy | undefined;
|
|
265
266
|
src?: string | undefined;
|
|
266
267
|
alt?: string | undefined;
|
|
267
|
-
referrerPolicy?: import("react").HTMLAttributeReferrerPolicy | undefined;
|
|
268
268
|
crossOrigin?: "" | "anonymous" | "use-credentials" | undefined;
|
|
269
269
|
useMap?: string | undefined;
|
|
270
270
|
loading?: "eager" | "lazy" | undefined;
|
|
@@ -306,9 +306,9 @@ export declare const ActionIcon: import("@emotion/styled").StyledComponent<{
|
|
|
306
306
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLImageElement> | undefined;
|
|
307
307
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLImageElement> | undefined;
|
|
308
308
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLImageElement> | undefined;
|
|
309
|
+
referrerPolicy?: import("react").HTMLAttributeReferrerPolicy | undefined;
|
|
309
310
|
src?: string | undefined;
|
|
310
311
|
alt?: string | undefined;
|
|
311
|
-
referrerPolicy?: import("react").HTMLAttributeReferrerPolicy | undefined;
|
|
312
312
|
crossOrigin?: "" | "anonymous" | "use-credentials" | undefined;
|
|
313
313
|
useMap?: string | undefined;
|
|
314
314
|
loading?: "eager" | "lazy" | undefined;
|
|
@@ -4,7 +4,6 @@ export { default as ActivityAreaChart, type ActivityAreaChartProps, type ChartDa
|
|
|
4
4
|
export { default as AppWindowWrapper, type AccountHeaderProps, AccountHeaderTitle, AppWindow, type AccountHeaderTitleProps, type AppWindowProps, type WindowProps, AppWindowContext, AppWindowContextProvider, LEFT_SIDEBAR, RIGHT_SIDEBAR, VIEWER_HEIGHT, VIEWER_WIDTH, animationDuration, StyledFooter, StyledHideButton, StyledMenuLink, StyledSubmitButton, SubmitButtonWrapper, } from './AppWindowWrapper';
|
|
5
5
|
export { default as BackgroundAnimation, type BlobGradient, type Blob } from './BackgroundAnimation';
|
|
6
6
|
export { default as Button, PlusButton } from './Button';
|
|
7
|
-
export { default as Calender } from './Calender';
|
|
8
7
|
export { default as CardEmptyState, type CardEmptyStateProps } from './CardEmptyState';
|
|
9
8
|
export { default as CardHeadline } from './CardHeadline';
|
|
10
9
|
export { default as Checkbox } from './Checkbox';
|
|
@@ -4,7 +4,6 @@ export { default as ActivityAreaChart, ChartTooltip, LoadingChart, } from './Act
|
|
|
4
4
|
export { default as AppWindowWrapper, AccountHeaderTitle, AppWindow, AppWindowContext, AppWindowContextProvider, LEFT_SIDEBAR, RIGHT_SIDEBAR, VIEWER_HEIGHT, VIEWER_WIDTH, animationDuration, StyledFooter, StyledHideButton, StyledMenuLink, StyledSubmitButton, SubmitButtonWrapper, } from './AppWindowWrapper';
|
|
5
5
|
export { default as BackgroundAnimation } from './BackgroundAnimation';
|
|
6
6
|
export { default as Button, PlusButton } from './Button';
|
|
7
|
-
export { default as Calender } from './Calender';
|
|
8
7
|
export { default as CardEmptyState } from './CardEmptyState';
|
|
9
8
|
export { default as CardHeadline } from './CardHeadline';
|
|
10
9
|
export { default as Checkbox } from './Checkbox';
|
package/package.json
CHANGED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { BoxProps } from '@mui/material/Box';
|
|
3
|
-
import { PopperPlacementType } from '@mui/material/Popper';
|
|
4
|
-
import { CalendarProps, DateObject } from 'react-multi-date-picker';
|
|
5
|
-
interface CalenderI extends CalendarProps {
|
|
6
|
-
isAr?: boolean;
|
|
7
|
-
value?: DateObject;
|
|
8
|
-
setValue?: (v: DateObject) => void;
|
|
9
|
-
enableTimePicker?: boolean;
|
|
10
|
-
placement?: PopperPlacementType;
|
|
11
|
-
}
|
|
12
|
-
declare function Calender({ isAr, value, setValue, enableTimePicker, placement, ...props }: CalenderI & BoxProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
declare const _default: import("react").MemoExoticComponent<typeof Calender>;
|
|
14
|
-
export default _default;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import { memo, useState } from 'react';
|
|
14
|
-
import ClickAwayListener from '@mui/material/ClickAwayListener';
|
|
15
|
-
import Popper from '@mui/material/Popper';
|
|
16
|
-
import { useTranslation } from 'react-i18next';
|
|
17
|
-
import DatePicker, { Calendar, DateObject } from 'react-multi-date-picker';
|
|
18
|
-
import TimePicker from 'react-multi-date-picker/plugins/time_picker';
|
|
19
|
-
import { darkLeftArrowIcon, darkRightArrowIcon } from '../../constants/index.js';
|
|
20
|
-
import { ArrowButton, CalenderWrapper, SelectedDate, Wrapper, ButtonsWrapper, CancelButton, OkayButton, TimePickerWrapper, FooterButtonsWrapper, } from './style';
|
|
21
|
-
const weekDays = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'];
|
|
22
|
-
function Calender(_a) {
|
|
23
|
-
var { isAr = false, value, setValue, enableTimePicker, placement } = _a, props = __rest(_a, ["isAr", "value", "setValue", "enableTimePicker", "placement"]);
|
|
24
|
-
const [anchorEl, setAnchorEl] = useState(null);
|
|
25
|
-
const [date, setDate] = useState(value ? new DateObject(new Date(value.toLocaleString())) : new DateObject(new Date()));
|
|
26
|
-
const [tempDate, setTempDate] = useState(value ? new DateObject(new Date(value.toLocaleString())) : new DateObject(new Date()));
|
|
27
|
-
const [time, setTime] = useState(new DateObject(new Date().getTime()));
|
|
28
|
-
const { t } = useTranslation();
|
|
29
|
-
const open = Boolean(anchorEl);
|
|
30
|
-
const getArrow = (direction) => {
|
|
31
|
-
if (direction === 'right') {
|
|
32
|
-
return isAr ? darkLeftArrowIcon : darkRightArrowIcon;
|
|
33
|
-
}
|
|
34
|
-
return isAr ? darkRightArrowIcon : darkLeftArrowIcon;
|
|
35
|
-
};
|
|
36
|
-
const onOpen = (e) => {
|
|
37
|
-
setAnchorEl(e.currentTarget);
|
|
38
|
-
};
|
|
39
|
-
const handleClose = () => {
|
|
40
|
-
setAnchorEl(null);
|
|
41
|
-
};
|
|
42
|
-
const handleSubmit = () => {
|
|
43
|
-
setDate(tempDate);
|
|
44
|
-
if (setValue)
|
|
45
|
-
setValue(tempDate);
|
|
46
|
-
handleClose();
|
|
47
|
-
};
|
|
48
|
-
return (_jsx(ClickAwayListener, Object.assign({ onClickAway: handleClose }, { children: _jsxs(Wrapper, Object.assign({ sx: Object.assign({}, props.sx) }, { children: [_jsx(SelectedDate, Object.assign({ onClick: onOpen, open: open, className: "date-button" }, { children: date.format('MMM D, YYYY') })), _jsx(Popper, Object.assign({ open: open, anchorEl: anchorEl, placement: placement }, { children: _jsxs(CalenderWrapper, Object.assign({ className: "calender-content", open: open }, { children: [_jsx(Calendar, Object.assign({ numberOfMonths: 1, format: "MMM DD", monthYearSeparator: ' ', renderButton: (direction, handleClick) => (_jsx(ArrowButton, Object.assign({ onClick: handleClick }, { children: _jsx("img", { src: getArrow(direction), alt: "arrow" }) }))), onChange: (v) => {
|
|
49
|
-
setTempDate(v);
|
|
50
|
-
}, weekDays: !isAr ? weekDays : undefined, minDate: new Date(), value: date }, props)), _jsxs(ButtonsWrapper, { children: [enableTimePicker && (_jsx(TimePickerWrapper, { children: _jsx(DatePicker, { arrow: false, disableDayPicker: true, hideOnScroll: true, format: "hh:mma", value: time, onChange: (timeValue) => {
|
|
51
|
-
setTime(timeValue);
|
|
52
|
-
}, type: "button", plugins: [_jsx(TimePicker, { position: "top", hideSeconds: true })] }) })), _jsxs(FooterButtonsWrapper, { children: [_jsx(CancelButton, Object.assign({ variant: "contained", onClick: handleClose }, { children: t('cancel') })), _jsx(OkayButton, Object.assign({ variant: "contained", onClick: handleSubmit }, { children: t('okay') }))] })] })] })) }))] })) })));
|
|
53
|
-
}
|
|
54
|
-
export default memo(Calender);
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare const ArrowButton: import("@emotion/styled").StyledComponent<import("@mui/material").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
3
|
-
ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
4
|
-
}, "disabled" | "className" | "style" | "classes" | "color" | "children" | "sx" | "tabIndex" | "size" | "variant" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "href" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "startIcon"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
5
|
-
export declare const Wrapper: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
6
|
-
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
7
|
-
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
8
|
-
export declare const CalenderWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
9
|
-
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
10
|
-
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
11
|
-
open: boolean;
|
|
12
|
-
}, {}, {}>;
|
|
13
|
-
export declare const SelectedDate: import("@emotion/styled").StyledComponent<import("@mui/material").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
14
|
-
ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
15
|
-
}, "disabled" | "className" | "style" | "classes" | "color" | "children" | "sx" | "tabIndex" | "size" | "variant" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "href" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "startIcon"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
16
|
-
open: boolean;
|
|
17
|
-
}, {}, {}>;
|
|
18
|
-
export declare const ButtonsWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
19
|
-
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
20
|
-
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
21
|
-
export declare const CancelButton: import("@emotion/styled").StyledComponent<import("@mui/material").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
22
|
-
ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
23
|
-
}, "disabled" | "className" | "style" | "classes" | "color" | "children" | "sx" | "tabIndex" | "size" | "variant" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "href" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "startIcon"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
24
|
-
export declare const OkayButton: import("@emotion/styled").StyledComponent<import("@mui/material").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
25
|
-
ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
26
|
-
}, "disabled" | "className" | "style" | "classes" | "color" | "children" | "sx" | "tabIndex" | "size" | "variant" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "href" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "startIcon"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
27
|
-
export declare const TimePickerWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
28
|
-
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
29
|
-
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
30
|
-
export declare const FooterButtonsWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
31
|
-
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
32
|
-
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -1,273 +0,0 @@
|
|
|
1
|
-
import { styled, Button, Box } from '@mui/material';
|
|
2
|
-
import { grayUpArrowIcon } from '../../constants/index.js';
|
|
3
|
-
export const ArrowButton = styled(Button)(() => ({
|
|
4
|
-
minWidth: 'auto',
|
|
5
|
-
padding: 0,
|
|
6
|
-
'& > img': {
|
|
7
|
-
cursor: 'pointer',
|
|
8
|
-
},
|
|
9
|
-
}));
|
|
10
|
-
export const Wrapper = styled(Box)(() => ({
|
|
11
|
-
position: 'relative',
|
|
12
|
-
}));
|
|
13
|
-
export const CalenderWrapper = styled(Box, { shouldForwardProp: (props) => props !== 'open' })(({ open, theme }) => ({
|
|
14
|
-
display: open ? 'flex' : 'none',
|
|
15
|
-
flexDirection: 'column',
|
|
16
|
-
background: theme.palette.common.white,
|
|
17
|
-
boxShadow: theme.shadows[9],
|
|
18
|
-
borderRadius: theme.spacing(1),
|
|
19
|
-
top: 37,
|
|
20
|
-
color: theme.palette.text.primary,
|
|
21
|
-
fontSize: '11px',
|
|
22
|
-
margin: '8px 0',
|
|
23
|
-
'.rmdp-calendar': {
|
|
24
|
-
padding: '8px 16px 16px',
|
|
25
|
-
},
|
|
26
|
-
'.rmdp-rtl *': {
|
|
27
|
-
fontFamily: 'Tajawal',
|
|
28
|
-
},
|
|
29
|
-
'.rmdp-rtl .sd': {
|
|
30
|
-
paddingTop: '4px',
|
|
31
|
-
},
|
|
32
|
-
'.rmdp-wrapper': {
|
|
33
|
-
position: 'relative',
|
|
34
|
-
borderRadius: '8px',
|
|
35
|
-
boxShadow: 'none',
|
|
36
|
-
},
|
|
37
|
-
'.rmdp-day span': {
|
|
38
|
-
fontSize: '11px',
|
|
39
|
-
fontWeight: 500,
|
|
40
|
-
},
|
|
41
|
-
'.rmdp-day, .rmdp-week-day': {
|
|
42
|
-
width: 40,
|
|
43
|
-
height: 40,
|
|
44
|
-
marginBottom: '2px',
|
|
45
|
-
padding: '4px',
|
|
46
|
-
fontSize: '11px',
|
|
47
|
-
color: theme.palette.grey[900],
|
|
48
|
-
},
|
|
49
|
-
'.rmdp-day-picker': {
|
|
50
|
-
padding: 0,
|
|
51
|
-
},
|
|
52
|
-
'.rmdp-day.rmdp-today span': {
|
|
53
|
-
backgroundColor: 'transparent',
|
|
54
|
-
color: theme.palette.info.dark,
|
|
55
|
-
},
|
|
56
|
-
'.rmdp-day.rmdp-today.end span, .rmdp-day.rmdp-today.end span': {
|
|
57
|
-
color: theme.palette.common.white,
|
|
58
|
-
},
|
|
59
|
-
'.rmdp-range, .rmdp-day:not(.rmdp-disabled):not(.rmdp-day-hidden) span:hover': {
|
|
60
|
-
background: theme.palette.info.light,
|
|
61
|
-
boxShadow: 'none',
|
|
62
|
-
color: theme.palette.grey[900],
|
|
63
|
-
},
|
|
64
|
-
'.rmdp-range-hover.start, .rmdp-range.start, .rmdp-range-hover.end, .rmdp-range.end, .rmdp-rtl .rmdp-range-hover.start, .rmdp-rtl .rmdp-range.start, .rmdp-rtl .rmdp-range-hover.end, .rmdp-rtl .rmdp-range.end': {
|
|
65
|
-
borderRadius: '50%',
|
|
66
|
-
background: theme.palette.background.gradient.darkShadedBlue,
|
|
67
|
-
color: theme.palette.common.white,
|
|
68
|
-
},
|
|
69
|
-
'.rmdp-range.start:after': {
|
|
70
|
-
content: '""',
|
|
71
|
-
position: 'absolute',
|
|
72
|
-
background: theme.palette.info.light,
|
|
73
|
-
height: '100%',
|
|
74
|
-
width: '50%',
|
|
75
|
-
right: 0,
|
|
76
|
-
top: 0,
|
|
77
|
-
zIndex: -1,
|
|
78
|
-
},
|
|
79
|
-
'.rmdp-rtl .rmdp-range.start:after': {
|
|
80
|
-
right: 'unset',
|
|
81
|
-
left: 0,
|
|
82
|
-
},
|
|
83
|
-
'.rmdp-range.end:after': {
|
|
84
|
-
content: '""',
|
|
85
|
-
position: 'absolute',
|
|
86
|
-
background: theme.palette.info.light,
|
|
87
|
-
height: '100%',
|
|
88
|
-
width: '50%',
|
|
89
|
-
left: 0,
|
|
90
|
-
top: 0,
|
|
91
|
-
zIndex: -1,
|
|
92
|
-
},
|
|
93
|
-
'.rmdp-rtl .rmdp-range.end:after': {
|
|
94
|
-
left: 'unset',
|
|
95
|
-
right: 0,
|
|
96
|
-
},
|
|
97
|
-
'.rmdp-week-day': {
|
|
98
|
-
color: theme.palette.grey[700],
|
|
99
|
-
marginBottom: '4px',
|
|
100
|
-
fontSize: '11px',
|
|
101
|
-
padding: '4px',
|
|
102
|
-
},
|
|
103
|
-
'.rmdp-header-values': {
|
|
104
|
-
color: theme.palette.grey[900],
|
|
105
|
-
fontSize: '12px',
|
|
106
|
-
fontWeight: 500,
|
|
107
|
-
lineHeight: '20px',
|
|
108
|
-
letterSpacing: '0.1px',
|
|
109
|
-
},
|
|
110
|
-
'.rmdp-header-values span:nth-of-type(2)': {
|
|
111
|
-
display: 'none',
|
|
112
|
-
},
|
|
113
|
-
'.rmdp-header': {
|
|
114
|
-
padding: '4px 0',
|
|
115
|
-
margin: 0,
|
|
116
|
-
fontSize: '12px',
|
|
117
|
-
},
|
|
118
|
-
'.rmdp-top-class': {
|
|
119
|
-
display: 'block !important',
|
|
120
|
-
},
|
|
121
|
-
'.rmdp-day.rmdp-selected span:not(.highlight)': {
|
|
122
|
-
background: theme.palette.info.dark,
|
|
123
|
-
},
|
|
124
|
-
'.rmdp-day.start.end': {
|
|
125
|
-
overflow: 'hidden',
|
|
126
|
-
},
|
|
127
|
-
}));
|
|
128
|
-
export const SelectedDate = styled(Button, { shouldForwardProp: (props) => props !== 'open' })(({ open, theme }) => (Object.assign({ color: theme.palette.text.primary, fontSize: '11px', fontWeight: 500, padding: theme.spacing(1), borderRadius: '4px', border: '1px solid', borderColor: theme.palette.divider, background: theme.palette.common.white, textTransform: 'none', height: 32 }, (open && { border: '1px solid', borderColor: theme.palette.info.dark, boxShadow: theme.shadows[7] }))));
|
|
129
|
-
export const ButtonsWrapper = styled(Box)(({ theme }) => ({
|
|
130
|
-
display: 'flex',
|
|
131
|
-
justifyContent: 'space-between',
|
|
132
|
-
alignItems: 'center',
|
|
133
|
-
gap: 8,
|
|
134
|
-
padding: '16px',
|
|
135
|
-
borderTop: `1px solid ${theme.palette.divider}`,
|
|
136
|
-
marginLeft: 'auto',
|
|
137
|
-
}));
|
|
138
|
-
export const CancelButton = styled(Button)(({ theme }) => ({
|
|
139
|
-
textTransform: 'capitalize',
|
|
140
|
-
padding: '8px 24px',
|
|
141
|
-
width: 75,
|
|
142
|
-
height: 32,
|
|
143
|
-
fontSize: '11px',
|
|
144
|
-
background: 'transparent',
|
|
145
|
-
color: theme.palette.text.primary,
|
|
146
|
-
border: '1px solid',
|
|
147
|
-
borderColor: theme.palette.divider,
|
|
148
|
-
fontWeight: 500,
|
|
149
|
-
borderRadius: '4px',
|
|
150
|
-
'&:hover': {
|
|
151
|
-
background: 'transparent',
|
|
152
|
-
color: theme.palette.text.primary,
|
|
153
|
-
},
|
|
154
|
-
}));
|
|
155
|
-
export const OkayButton = styled(Button)(({ theme }) => ({
|
|
156
|
-
textTransform: 'capitalize',
|
|
157
|
-
padding: '8px 24px',
|
|
158
|
-
width: 75,
|
|
159
|
-
height: 32,
|
|
160
|
-
fontSize: '11px',
|
|
161
|
-
borderRadius: '4px',
|
|
162
|
-
fontWeight: 700,
|
|
163
|
-
background: theme.palette.info.dark,
|
|
164
|
-
'&:hover': {
|
|
165
|
-
background: theme.palette.info.dark,
|
|
166
|
-
},
|
|
167
|
-
}));
|
|
168
|
-
export const TimePickerWrapper = styled(Box)(({ theme }) => ({
|
|
169
|
-
display: 'flex',
|
|
170
|
-
gap: '4px',
|
|
171
|
-
'.rmdp-input': {
|
|
172
|
-
width: '64px',
|
|
173
|
-
borderRadius: '19px',
|
|
174
|
-
border: '1px solid',
|
|
175
|
-
borderColor: theme.palette.divider,
|
|
176
|
-
color: theme.palette.text.primary,
|
|
177
|
-
fontSize: '11px',
|
|
178
|
-
fontWeight: 500,
|
|
179
|
-
background: 'transparent',
|
|
180
|
-
cursor: 'pointer',
|
|
181
|
-
},
|
|
182
|
-
'.rmdp-input:focus': {
|
|
183
|
-
boxShadow: theme.shadows[7],
|
|
184
|
-
border: `1px solid ${theme.palette.info.dark}`,
|
|
185
|
-
borderRadius: '19px',
|
|
186
|
-
},
|
|
187
|
-
'.rmdp-time-picker': {
|
|
188
|
-
boxShadow: theme.shadows[5],
|
|
189
|
-
borderRadius: theme.spacing(1),
|
|
190
|
-
padding: theme.spacing(2),
|
|
191
|
-
minWidth: 'auto !important',
|
|
192
|
-
div: {
|
|
193
|
-
marginTop: 0,
|
|
194
|
-
display: 'block',
|
|
195
|
-
},
|
|
196
|
-
'> div': {
|
|
197
|
-
width: 32,
|
|
198
|
-
height: 64,
|
|
199
|
-
},
|
|
200
|
-
'.rmdp-arrow': {
|
|
201
|
-
borderColor: `${theme.palette.background.transparent[1]} !important`,
|
|
202
|
-
},
|
|
203
|
-
'.rmdp-arrow-container': {
|
|
204
|
-
justifyContent: 'center',
|
|
205
|
-
'&:hover': {
|
|
206
|
-
backgroundColor: 'transparent',
|
|
207
|
-
boxShadow: 'unset',
|
|
208
|
-
},
|
|
209
|
-
},
|
|
210
|
-
input: {
|
|
211
|
-
borderRadius: '4px',
|
|
212
|
-
border: `1px solid ${theme.palette.divider}`,
|
|
213
|
-
padding: 0,
|
|
214
|
-
width: 32,
|
|
215
|
-
height: 32,
|
|
216
|
-
fontSize: '11px',
|
|
217
|
-
color: theme.palette.text.primary,
|
|
218
|
-
fontWeight: 500,
|
|
219
|
-
'&:focus, &:focus-visible': {
|
|
220
|
-
border: `1px solid ${theme.palette.info.dark}`,
|
|
221
|
-
outline: 'unset',
|
|
222
|
-
},
|
|
223
|
-
},
|
|
224
|
-
'.dvdr': {
|
|
225
|
-
margin: '7px 4px 0',
|
|
226
|
-
},
|
|
227
|
-
'.rmdp-am, .rmdp-pm': {
|
|
228
|
-
margin: 0,
|
|
229
|
-
width: 32,
|
|
230
|
-
height: 32,
|
|
231
|
-
flex: 'auto',
|
|
232
|
-
justifyContent: 'center',
|
|
233
|
-
fontSize: '11px',
|
|
234
|
-
color: theme.palette.text.primary,
|
|
235
|
-
fontWeight: 500,
|
|
236
|
-
display: 'flex',
|
|
237
|
-
cursor: 'default',
|
|
238
|
-
},
|
|
239
|
-
'> div:last-child': {
|
|
240
|
-
marginInlineStart: '4px',
|
|
241
|
-
display: 'block !important',
|
|
242
|
-
},
|
|
243
|
-
'.rmdp-down, .rmdp-up': {
|
|
244
|
-
position: 'relative',
|
|
245
|
-
i: {
|
|
246
|
-
display: 'none',
|
|
247
|
-
},
|
|
248
|
-
'&:before': {
|
|
249
|
-
content: '""',
|
|
250
|
-
position: 'absolute',
|
|
251
|
-
top: '5px',
|
|
252
|
-
width: '10px',
|
|
253
|
-
height: '10px',
|
|
254
|
-
backgroundImage: `url(${grayUpArrowIcon})`,
|
|
255
|
-
},
|
|
256
|
-
},
|
|
257
|
-
'.rmdp-down:before': {
|
|
258
|
-
transform: 'rotate(180deg)',
|
|
259
|
-
},
|
|
260
|
-
},
|
|
261
|
-
'.rmdp-container': {
|
|
262
|
-
position: 'relative',
|
|
263
|
-
'> div': {
|
|
264
|
-
top: 'unset !important',
|
|
265
|
-
bottom: '28px',
|
|
266
|
-
transform: 'unset !important',
|
|
267
|
-
},
|
|
268
|
-
},
|
|
269
|
-
}));
|
|
270
|
-
export const FooterButtonsWrapper = styled(Box)(() => ({
|
|
271
|
-
display: 'flex',
|
|
272
|
-
gap: '8px',
|
|
273
|
-
}));
|