@tap-payments/os-micro-frontend-shared 0.1.105 → 0.1.106

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/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 Tap Payments
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Tap Payments
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,12 +1,12 @@
1
- # os-micro-frontend-shared
2
-
3
- ## Publishing Workflow
4
-
5
- 1. Update version in package.json
6
- 2. Commit changes
7
- 3. Create and push a tag:
8
-
9
- ```bash
10
- npm version patch # or minor, major
11
- git push origin main --tags
12
- ```
1
+ # os-micro-frontend-shared
2
+
3
+ ## Publishing Workflow
4
+
5
+ 1. Update version in package.json
6
+ 2. Commit changes
7
+ 3. Create and push a tag:
8
+
9
+ ```bash
10
+ npm version patch # or minor, major
11
+ git push origin main --tags
12
+ ```
@@ -1,50 +1,26 @@
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
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
2
  import { useCallback, useRef, useState } from 'react';
14
- import { RgbaColorPicker } from 'react-colorful';
15
- import { useTranslation } from 'react-i18next';
16
3
  import Box from '@mui/material/Box';
17
4
  import ClickAwayListener from '@mui/material/ClickAwayListener';
18
- import Divider from '@mui/material/Divider';
19
- import Popper from '@mui/material/Popper';
20
5
  import Stack from '@mui/material/Stack';
21
6
  import Typography from '@mui/material/Typography';
22
- import { CancelButton, ConfirmButton, Footer, StyledCloseButtonWrapper, StyledColorWidgetWrapper } from './style';
7
+ import { StyledCloseButtonWrapper } from './style';
23
8
  import { closeXIcon } from '../../constants/index.js';
24
- import { hexa2Rgba, rgba2Hexa } from '../../utils/index.js';
9
+ import ColorPickerPanel from './ColorPickerPanel';
10
+ import { Popper } from '@mui/material';
25
11
  const ColorPicker = ({ id, value = '#ffffff', onChange, onReset, sx, options }) => {
26
- const { t } = useTranslation();
27
12
  const [anchorEl, setAnchorEl] = useState(null);
28
13
  const rootRef = useRef(null);
29
- const [color, setColor] = useState(() => {
30
- const _a = hexa2Rgba(value).value, { alpha: a } = _a, rest = __rest(_a, ["alpha"]);
31
- return Object.assign(Object.assign({}, rest), { a });
32
- });
33
14
  const handleOpen = useCallback(() => {
34
15
  setAnchorEl(rootRef.current);
35
- const _a = hexa2Rgba(value).value, { alpha: a } = _a, rest = __rest(_a, ["alpha"]);
36
- setColor(Object.assign(Object.assign({}, rest), { a }));
37
- }, [value]);
16
+ }, []);
38
17
  const handleCancel = useCallback(() => {
39
- const _a = hexa2Rgba(value).value, { alpha: a } = _a, rest = __rest(_a, ["alpha"]);
40
- setColor(Object.assign(Object.assign({}, rest), { a }));
41
18
  setAnchorEl(null);
42
- }, [value]);
43
- const handleConfirm = useCallback(() => {
44
- const { a: alpha } = color, rest = __rest(color, ["a"]);
45
- onChange(rgba2Hexa(Object.assign(Object.assign({}, rest), { alpha })));
19
+ }, []);
20
+ const handleConfirm = useCallback((newValue) => {
21
+ onChange(newValue);
46
22
  setAnchorEl(null);
47
- }, [onChange, color]);
48
- return (_jsx(ClickAwayListener, Object.assign({ onClickAway: () => setAnchorEl(null) }, { children: _jsxs(Stack, Object.assign({ ref: rootRef, bgcolor: "grey.400", borderRadius: "4px", p: "4px", pr: "12px", direction: "row", justifyContent: "space-between", spacing: 1, alignItems: "center", className: "color-picker", sx: sx }, { children: [_jsxs(Stack, Object.assign({ direction: "row", spacing: 1, alignItems: "center", className: "color-picker__controls-wrapper" }, { children: [_jsx(Box, { borderRadius: "5px", width: 32, height: 32, sx: { backgroundColor: value }, className: "color-picker__viewer" }), _jsxs(Box, Object.assign({ className: "color-picker__actions-wrapper" }, { children: [_jsx(Typography, Object.assign({ className: "color-picker__label", fontWeight: 500, fontSize: 9, color: "text.primary", textTransform: "uppercase" }, { children: value })), _jsx(Typography, Object.assign({ className: "color-picker__edit-btn", role: "button", onClick: handleOpen, htmlFor: id, fontWeight: 500, fontSize: 9, color: "info.dark", component: "label", sx: { textDecoration: 'underline', cursor: 'pointer' } }, { children: "Edit" }))] }))] })), !(options === null || options === void 0 ? void 0 : options.hideReset) ? (_jsx(StyledCloseButtonWrapper, Object.assign({ className: "color-picker__close-btn", type: "button", onClick: onReset }, { children: _jsx(Box, { component: "img", src: closeXIcon, width: 10, height: 10 }) }))) : (_jsx("div", {})), _jsx(Popper, Object.assign({ anchorEl: anchorEl, open: !!anchorEl, placement: "top" }, { children: _jsxs(StyledColorWidgetWrapper, Object.assign({ className: "color-picker__widget" }, { children: [_jsx(RgbaColorPicker, { color: color, onChange: setColor }), _jsx(Divider, { sx: { my: '12px' } }), _jsxs(Footer, Object.assign({ className: "color-picker__widget-actions" }, { children: [_jsx(CancelButton, Object.assign({ className: "color-picker__widget-actions__cancel", onClick: handleCancel }, { children: t('cancel') })), _jsx(ConfirmButton, Object.assign({ className: "color-picker__widget-actions__confirm", onClick: handleConfirm }, { children: t('okay') }))] }))] })) }))] })) })));
23
+ }, [onChange]);
24
+ return (_jsx(ClickAwayListener, Object.assign({ onClickAway: () => setAnchorEl(null) }, { children: _jsxs(Stack, Object.assign({ ref: rootRef, bgcolor: "grey.400", borderRadius: "4px", p: "4px", pr: "12px", direction: "row", justifyContent: "space-between", spacing: 1, alignItems: "center", className: "color-picker", sx: sx }, { children: [_jsxs(Stack, Object.assign({ direction: "row", spacing: 1, alignItems: "center", className: "color-picker__controls-wrapper" }, { children: [_jsx(Box, { borderRadius: "5px", width: 32, height: 32, sx: { backgroundColor: value }, className: "color-picker__viewer" }), _jsxs(Box, Object.assign({ className: "color-picker__actions-wrapper" }, { children: [_jsx(Typography, Object.assign({ className: "color-picker__label", fontWeight: 500, fontSize: 9, color: "text.primary", textTransform: "uppercase" }, { children: value })), _jsx(Typography, Object.assign({ className: "color-picker__edit-btn", role: "button", onClick: handleOpen, htmlFor: id, fontWeight: 500, fontSize: 9, color: "info.dark", component: "label", sx: { textDecoration: 'underline', cursor: 'pointer' } }, { children: "Edit" }))] }))] })), !(options === null || options === void 0 ? void 0 : options.hideReset) ? (_jsx(StyledCloseButtonWrapper, Object.assign({ className: "color-picker__close-btn", type: "button", onClick: onReset }, { children: _jsx(Box, { component: "img", src: closeXIcon, width: 10, height: 10 }) }))) : (_jsx("div", {})), _jsx(Popper, Object.assign({ anchorEl: anchorEl, open: !!anchorEl, placement: "top" }, { children: _jsx(ColorPickerPanel, { initialValue: value, onCancel: handleCancel, onConfirm: handleConfirm }) }))] })) })));
49
25
  };
50
26
  export default ColorPicker;
@@ -0,0 +1,7 @@
1
+ export type ColorPickerPanelProps = {
2
+ initialValue?: string;
3
+ onCancel: () => void;
4
+ onConfirm: (newValue: string) => void;
5
+ };
6
+ declare const ColorPickerPanel: ({ initialValue, onCancel, onConfirm }: ColorPickerPanelProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default ColorPickerPanel;
@@ -0,0 +1,41 @@
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 { useCallback, useState } from 'react';
14
+ import { useTranslation } from 'react-i18next';
15
+ import { RgbaColorPicker } from 'react-colorful';
16
+ import Stack from '@mui/material/Stack';
17
+ import Divider from '@mui/material/Divider';
18
+ import { hexa2Rgba, rgba2Hexa } from '../../utils/index.js';
19
+ import { CancelButton, ConfirmButton, Footer, StyledColorWidgetWrapper } from './style';
20
+ import ColorSchemeSelect from './ColorSchemeSelect';
21
+ import RGBAFields from './RGBAFields';
22
+ import HexaFields from './HexaFields';
23
+ const ColorPickerPanel = ({ initialValue = '#ffffff', onCancel, onConfirm }) => {
24
+ const [colorScheme, setColorScheme] = useState('RGB');
25
+ const [color, setColor] = useState(() => {
26
+ const _a = hexa2Rgba(initialValue).value, { alpha: a } = _a, rest = __rest(_a, ["alpha"]);
27
+ return Object.assign(Object.assign({}, rest), { a });
28
+ });
29
+ const { t } = useTranslation();
30
+ const handleCancel = useCallback(() => {
31
+ const _a = hexa2Rgba(initialValue).value, { alpha: a } = _a, rest = __rest(_a, ["alpha"]);
32
+ setColor(Object.assign(Object.assign({}, rest), { a }));
33
+ onCancel();
34
+ }, [initialValue, onCancel]);
35
+ const handleConfirm = useCallback(() => {
36
+ const { a: alpha } = color, rest = __rest(color, ["a"]);
37
+ onConfirm(rgba2Hexa(Object.assign(Object.assign({}, rest), { alpha })));
38
+ }, [color, onConfirm]);
39
+ return (_jsxs(StyledColorWidgetWrapper, Object.assign({ className: "color-picker__widget" }, { children: [_jsx(RgbaColorPicker, { color: color, onChange: setColor }), _jsxs(Stack, Object.assign({ mt: 2, spacing: 1, direction: "row" }, { children: [_jsx(ColorSchemeSelect, { scheme: colorScheme, setScheme: setColorScheme }), colorScheme === 'RGB' ? (_jsx(RGBAFields, { value: Object.assign(Object.assign({}, color), { a: Math.round(color.a * 100) }), onChange: (newColor) => setColor(Object.assign(Object.assign({}, newColor), { a: newColor.a / 100 })) })) : (_jsx(HexaFields, { value: Object.assign(Object.assign({}, color), { a: color.a }), onChange: (newColor) => setColor(Object.assign(Object.assign({}, newColor), { a: newColor.a })) }))] })), _jsx(Divider, { sx: { my: '12px' } }), _jsxs(Footer, Object.assign({ className: "color-picker__widget-actions" }, { children: [_jsx(CancelButton, Object.assign({ className: "color-picker__widget-actions__cancel", onClick: handleCancel }, { children: t('cancel') })), _jsx(ConfirmButton, Object.assign({ className: "color-picker__widget-actions__confirm", onClick: handleConfirm }, { children: t('okay') }))] }))] })));
40
+ };
41
+ export default ColorPickerPanel;
@@ -0,0 +1,7 @@
1
+ export type ColorScheme = 'RGB' | 'HEX';
2
+ type ColorSchemeSelectProps = {
3
+ scheme: ColorScheme;
4
+ setScheme: (scheme: ColorScheme) => void;
5
+ };
6
+ declare const ColorSchemeSelect: ({ scheme, setScheme }: ColorSchemeSelectProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default ColorSchemeSelect;
@@ -0,0 +1,35 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import React, { useCallback } from 'react';
3
+ import ClickAwayListener from '@mui/material/ClickAwayListener';
4
+ import Popper from '@mui/material/Popper';
5
+ import Box from '@mui/material/Box';
6
+ import { blackHeadingDownArrow } from '../../constants/index.js';
7
+ import { ColorSchemeButton, ColorSchemeList } from './style';
8
+ import MenuItem from '@mui/material/MenuItem';
9
+ const ColorSchemeSelect = ({ scheme, setScheme }) => {
10
+ const [anchorEl, setAnchorEl] = React.useState(null);
11
+ const open = !!anchorEl;
12
+ const handleToggle = useCallback((event) => {
13
+ setAnchorEl(anchorEl ? null : event.currentTarget);
14
+ }, [anchorEl]);
15
+ const handleClose = useCallback(() => {
16
+ setAnchorEl(null);
17
+ }, []);
18
+ const handleSelect = useCallback((selectedScheme) => {
19
+ handleClose();
20
+ setScheme(selectedScheme);
21
+ }, [handleClose, setScheme]);
22
+ return (_jsxs(_Fragment, { children: [_jsxs(ColorSchemeButton, Object.assign({ component: "button", active: open, onClick: handleToggle }, { children: [scheme, _jsx(Box, { component: "img", sx: { transform: open ? 'rotateZ(180deg)' : 'rotateZ(0)', transition: '200ms transform ease-out' }, src: blackHeadingDownArrow })] })), _jsx(Popper, Object.assign({ anchorEl: anchorEl, open: !!anchorEl, placement: "bottom", disablePortal: true, keepMounted: true, modifiers: [
23
+ {
24
+ name: 'offset',
25
+ options: {
26
+ offset: [0, 4],
27
+ },
28
+ },
29
+ ] }, { children: _jsx(ClickAwayListener, Object.assign({ onClickAway: (event) => {
30
+ if (anchorEl === null || anchorEl === void 0 ? void 0 : anchorEl.contains(event.target))
31
+ return;
32
+ handleClose();
33
+ } }, { children: _jsxs(ColorSchemeList, { children: [_jsx(MenuItem, Object.assign({ onClick: () => handleSelect('RGB') }, { children: "RGB" })), _jsx(MenuItem, Object.assign({ onClick: () => handleSelect('HEX') }, { children: "HEX" }))] }) })) }))] }));
34
+ };
35
+ export default ColorSchemeSelect;
@@ -0,0 +1,7 @@
1
+ import { RgbaColor } from 'react-colorful';
2
+ type HexaFieldsProps = {
3
+ value: RgbaColor;
4
+ onChange: (newValue: RgbaColor) => void;
5
+ };
6
+ declare const HexaFields: ({ value, onChange }: HexaFieldsProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default HexaFields;
@@ -0,0 +1,79 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useMemo, useState } from 'react';
3
+ import Color from 'color';
4
+ import { alpha } from '@mui/material/styles';
5
+ import Stack from '@mui/material/Stack';
6
+ import Typography from '@mui/material/Typography';
7
+ import InputAdornment from '@mui/material/InputAdornment';
8
+ import { StyledInput } from './style';
9
+ const HexaFields = ({ value, onChange }) => {
10
+ const colorAsHex = useMemo(() => {
11
+ const color = Color.rgb(value.r, value.g, value.b, value.a);
12
+ return color.hex().replace('#', '');
13
+ }, [value]);
14
+ const [hexInput, setHexInput] = useState(colorAsHex);
15
+ const alphaPercent = Math.round(value.a * 100);
16
+ useEffect(() => {
17
+ const newHex = Color.rgb(value.r, value.g, value.b).hex().replace('#', '');
18
+ setHexInput(newHex);
19
+ }, [value.r, value.g, value.b]);
20
+ const handleHexChange = (event) => {
21
+ let newHex = event.target.value.replace(/[^0-9a-fA-F]/g, '').toUpperCase();
22
+ if (newHex.length > 6)
23
+ newHex = newHex.slice(0, 6);
24
+ setHexInput(newHex);
25
+ };
26
+ const handleHexBlur = () => {
27
+ let formattedValue = hexInput;
28
+ if (formattedValue.length === 3) {
29
+ formattedValue = formattedValue
30
+ .split('')
31
+ .map((ch) => ch + ch)
32
+ .join('');
33
+ setHexInput(formattedValue);
34
+ }
35
+ if (formattedValue.length === 6) {
36
+ try {
37
+ const newColor = Color(`#${formattedValue}`).alpha(value.a);
38
+ onChange({
39
+ r: newColor.red(),
40
+ g: newColor.green(),
41
+ b: newColor.blue(),
42
+ a: newColor.alpha(),
43
+ });
44
+ }
45
+ catch (_a) {
46
+ setHexInput(colorAsHex);
47
+ }
48
+ }
49
+ else {
50
+ setHexInput(colorAsHex);
51
+ }
52
+ };
53
+ const handleAlphaChange = (event) => {
54
+ let num = parseInt(event.target.value, 10);
55
+ if (isNaN(num))
56
+ num = 0;
57
+ if (num < 0)
58
+ num = 0;
59
+ if (num > 100)
60
+ num = 100;
61
+ onChange(Object.assign(Object.assign({}, value), { a: num / 100 }));
62
+ };
63
+ return (_jsxs(Stack, Object.assign({ direction: "row", spacing: 1, alignItems: "flex-start" }, { children: [_jsx(StyledInput, { value: hexInput, onChange: handleHexChange, onBlur: handleHexBlur, placeholder: "FFFFFF", sx: {
64
+ flex: 1.4,
65
+ '& .MuiOutlinedInput-root': {
66
+ pl: 1,
67
+ },
68
+ }, InputProps: {
69
+ startAdornment: (_jsx(InputAdornment, Object.assign({ position: "start", sx: { m: 0 } }, { children: _jsx(Typography, Object.assign({ component: "span", color: (theme) => alpha(theme.palette.text.primary, 0.5), display: "inline-block", fontSize: 12, fontWeight: 500 }, { children: "#" })) }))),
70
+ } }), _jsx(StyledInput, { type: "number", value: alphaPercent, onChange: handleAlphaChange, inputProps: { min: 0, max: 100 }, sx: {
71
+ flex: 0.8,
72
+ '& .MuiOutlinedInput-root': {
73
+ pr: 1,
74
+ },
75
+ }, InputProps: {
76
+ endAdornment: (_jsx(InputAdornment, Object.assign({ position: "end", sx: { m: 0 } }, { children: _jsx(Typography, Object.assign({ component: "span", color: "text.primary", display: "inline-block", fontSize: 12, fontWeight: 500 }, { children: "%" })) }))),
77
+ } })] })));
78
+ };
79
+ export default HexaFields;
@@ -0,0 +1,7 @@
1
+ import { RgbaColor } from 'react-colorful';
2
+ type RGBAFieldsProps = {
3
+ value: RgbaColor;
4
+ onChange: (newValue: RgbaColor) => void;
5
+ };
6
+ declare const RGBAFields: ({ value, onChange }: RGBAFieldsProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default RGBAFields;
@@ -0,0 +1,25 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import Stack from '@mui/material/Stack';
3
+ import Typography from '@mui/material/Typography';
4
+ import InputAdornment from '@mui/material/InputAdornment';
5
+ import { StyledInput } from './style';
6
+ const RGBAFields = ({ value, onChange }) => {
7
+ const handleChange = (key, max) => (event) => {
8
+ let num = parseInt(event.target.value, 10);
9
+ if (isNaN(num))
10
+ num = 0;
11
+ if (num < 0)
12
+ num = 0;
13
+ if (num > max)
14
+ num = max;
15
+ onChange(Object.assign(Object.assign({}, value), { [key]: num }));
16
+ };
17
+ return (_jsxs(Stack, Object.assign({ direction: "row", spacing: 1 }, { children: [_jsx(StyledInput, { type: "number", value: value.r, onChange: handleChange('r', 255), inputProps: { min: 0, max: 255, style: { textAlign: 'center' } }, variant: "outlined", size: "small" }), _jsx(StyledInput, { type: "number", value: value.g, onChange: handleChange('g', 255), inputProps: { min: 0, max: 255, style: { textAlign: 'center' } }, variant: "outlined", size: "small" }), _jsx(StyledInput, { type: "number", value: value.b, onChange: handleChange('b', 255), inputProps: { min: 0, max: 255, style: { textAlign: 'center' } }, variant: "outlined", size: "small" }), _jsx(StyledInput, { type: "number", value: value.a, onChange: handleChange('a', 100), inputProps: { min: 0, max: 100, style: { textAlign: 'center' } }, variant: "outlined", sx: {
18
+ '& .MuiOutlinedInput-root': {
19
+ pr: 1,
20
+ },
21
+ }, InputProps: {
22
+ endAdornment: (_jsx(InputAdornment, Object.assign({ position: "end", sx: { m: 0 } }, { children: _jsx(Typography, Object.assign({ component: "span", display: "inline-block", fontSize: 12, fontWeight: 500 }, { children: "%" })) }))),
23
+ }, size: "small" })] })));
24
+ };
25
+ export default RGBAFields;
@@ -1,14 +1,25 @@
1
1
  /// <reference types="react" />
2
- export declare const StyledCloseButtonWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
3
- export declare const StyledColorWidgetWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
2
+ export declare const StyledCloseButtonWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
3
+ export declare const StyledColorWidgetWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
4
4
  ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
5
- }, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
6
- export declare const Footer: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
5
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
6
+ export declare const Footer: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
7
7
  ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
8
- }, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
9
- export declare const ConfirmButton: 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"> & {
8
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
9
+ export declare const ConfirmButton: import("@emotion/styled").StyledComponent<import("@mui/material/Button").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
10
10
  ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
11
- }, "disabled" | "color" | "style" | "className" | "classes" | "tabIndex" | "children" | "sx" | "variant" | "size" | "fullWidth" | "href" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableElevation" | "disableFocusRipple" | "endIcon" | "startIcon"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
12
- 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"> & {
11
+ }, "disabled" | "color" | "style" | "className" | "classes" | "tabIndex" | "children" | "sx" | "variant" | "size" | "fullWidth" | "href" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableElevation" | "disableFocusRipple" | "endIcon" | "startIcon"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
12
+ export declare const CancelButton: import("@emotion/styled").StyledComponent<import("@mui/material/Button").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
13
13
  ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
14
- }, "disabled" | "color" | "style" | "className" | "classes" | "tabIndex" | "children" | "sx" | "variant" | "size" | "fullWidth" | "href" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableElevation" | "disableFocusRipple" | "endIcon" | "startIcon"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
14
+ }, "disabled" | "color" | "style" | "className" | "classes" | "tabIndex" | "children" | "sx" | "variant" | "size" | "fullWidth" | "href" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableElevation" | "disableFocusRipple" | "endIcon" | "startIcon"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
15
+ export declare const ColorSchemeButton: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
16
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
17
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
18
+ active?: boolean | undefined;
19
+ }, {}, {}>;
20
+ export declare const ColorSchemeList: import("@emotion/styled").StyledComponent<import("@mui/material/MenuList").MenuListOwnProps & import("@mui/material").ListOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref"> & {
21
+ ref?: ((instance: HTMLUListElement | null) => void) | import("react").RefObject<HTMLUListElement> | null | undefined;
22
+ }, keyof import("@mui/material/OverridableComponent").CommonProps | "autoFocus" | "children" | "sx" | "variant" | "dense" | "subheader" | "disablePadding" | "autoFocusItem" | "disabledItemsFocusable" | "disableListWrap"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
23
+ export declare const StyledInput: import("@emotion/styled").StyledComponent<{
24
+ variant?: import("@mui/material/TextField").TextFieldVariants | undefined;
25
+ } & Omit<import("@mui/material/TextField").FilledTextFieldProps | import("@mui/material/TextField").OutlinedTextFieldProps | import("@mui/material/TextField").StandardTextFieldProps, "variant"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
@@ -1,5 +1,8 @@
1
- import { Box, Button } from '@mui/material';
2
1
  import { styled } from '@mui/material/styles';
2
+ import Box from '@mui/material/Box';
3
+ import Button from '@mui/material/Button';
4
+ import TextField from '@mui/material/TextField';
5
+ import MenuList from '@mui/material/MenuList';
3
6
  export const StyledCloseButtonWrapper = styled('button')({
4
7
  background: 'transparent',
5
8
  border: 'none',
@@ -14,7 +17,7 @@ export const StyledCloseButtonWrapper = styled('button')({
14
17
  });
15
18
  export const StyledColorWidgetWrapper = styled(Box)(({ theme }) => ({
16
19
  boxShadow: '0px 8px 30px rgba(0, 0, 0, 0.16)',
17
- minWidth: 264,
20
+ width: 264,
18
21
  backgroundColor: '#ffffff',
19
22
  padding: '12px',
20
23
  borderRadius: theme.spacing(1),
@@ -83,3 +86,47 @@ export const CancelButton = styled(Button)(({ theme }) => ({
83
86
  background: 'transparent',
84
87
  },
85
88
  }));
89
+ export const ColorSchemeButton = styled(Box, {
90
+ shouldForwardProp: (prop) => prop !== 'active',
91
+ })(({ theme, active }) => (Object.assign({ display: 'flex', justifyContent: 'space-between', alignItems: 'center', color: theme.palette.text.primary, border: '1px solid #F2F2F2', fontSize: 12, fontWeight: 500, backgroundColor: 'transparent', padding: '4px 8px', borderRadius: '4px', minWidth: 70, cursor: 'pointer' }, (active && {
92
+ border: '1px solid #1F88D0',
93
+ boxShadow: '0px 0px 4px 0px #1F88D080',
94
+ }))));
95
+ export const ColorSchemeList = styled(MenuList)({
96
+ backgroundColor: '#ffffff',
97
+ borderRadius: '4px',
98
+ boxShadow: '0px 8px 30px 0px #00000029',
99
+ minWidth: 70,
100
+ '& .MuiMenuItem-root': {
101
+ fontSize: 12,
102
+ fontWeight: 500,
103
+ padding: '4px 8px',
104
+ },
105
+ });
106
+ export const StyledInput = styled(TextField)(({ theme }) => ({
107
+ '& .MuiOutlinedInput-root': {
108
+ fontSize: '12px',
109
+ fontWeight: 500,
110
+ borderRadius: '4px',
111
+ '& input': {
112
+ padding: '4px',
113
+ '&::-webkit-outer-spin-button, &::-webkit-inner-spin-button': {
114
+ WebkitAppearance: 'none',
115
+ margin: 0,
116
+ },
117
+ '&[type=number]': {
118
+ MozAppearance: 'textfield',
119
+ },
120
+ },
121
+ '& .MuiOutlinedInput-notchedOutline': {
122
+ borderColor: theme.palette.divider,
123
+ borderWidth: '1px',
124
+ },
125
+ '&:hover, &.Mui-focused': {
126
+ '& .MuiOutlinedInput-notchedOutline': {
127
+ borderColor: theme.palette.divider,
128
+ borderWidth: '1px',
129
+ },
130
+ },
131
+ },
132
+ }));
@@ -37,12 +37,29 @@ export function getRandomGradientColor() {
37
37
  ];
38
38
  return colors[Math.trunc(Math.random() * colors.length)];
39
39
  }
40
+ const BLACK_RGBA_COLOR = {
41
+ r: 0,
42
+ g: 0,
43
+ b: 0,
44
+ alpha: 1,
45
+ };
40
46
  export const hexa2Rgba = (value) => {
41
- const colorInstance = Color(value).rgb();
42
- const { r, g, b, alpha = 1 } = colorInstance.object();
43
- return {
44
- value: { r, g, b, alpha },
45
- stringified: `rgba(${r},${g},${b},${alpha})`,
46
- };
47
+ try {
48
+ const colorInstance = Color(value).rgb();
49
+ const { r, g, b, alpha = 1 } = colorInstance.object();
50
+ return {
51
+ value: { r, g, b, alpha },
52
+ stringified: `rgba(${r},${g},${b},${alpha})`,
53
+ };
54
+ }
55
+ catch (error) {
56
+ console.error(error);
57
+ console.warn(`Invalid hex color: "${value}". Falling back to black.`);
58
+ const { r, g, b, alpha } = BLACK_RGBA_COLOR;
59
+ return {
60
+ value: BLACK_RGBA_COLOR,
61
+ stringified: `rgba(${r},${g},${b},${alpha})`,
62
+ };
63
+ }
47
64
  };
48
65
  export const rgba2Hexa = (value) => Color(value).hexa();
package/package.json CHANGED
@@ -1,139 +1,139 @@
1
- {
2
- "name": "@tap-payments/os-micro-frontend-shared",
3
- "description": "Shared components and utilities for Tap Payments micro frontends",
4
- "version": "0.1.105",
5
- "testVersion": 8,
6
- "type": "module",
7
- "main": "build/index.js",
8
- "module": "build/index.js",
9
- "types": "build/index.d.ts",
10
- "exports": {
11
- ".": {
12
- "types": "./build/index.d.ts",
13
- "import": "./build/index.js",
14
- "require": "./build/index.js"
15
- },
16
- "./constants": {
17
- "types": "./build/constants/index.d.ts",
18
- "import": "./build/constants/index.js",
19
- "require": "./build/constants/index.js"
20
- },
21
- "./components": {
22
- "types": "./build/components/index.d.ts",
23
- "import": "./build/components/index.js",
24
- "require": "./build/components/index.js"
25
- },
26
- "./components/*": {
27
- "types": "./build/components/*/index.d.ts",
28
- "import": "./build/components/*/index.js",
29
- "require": "./build/components/*/index.js"
30
- },
31
- "./hooks": {
32
- "types": "./build/hooks/index.d.ts",
33
- "import": "./build/hooks/index.js",
34
- "require": "./build/hooks/index.js"
35
- },
36
- "./utils": {
37
- "types": "./build/utils/index.d.ts",
38
- "import": "./build/utils/index.js",
39
- "require": "./build/utils/index.js"
40
- },
41
- "./theme": {
42
- "types": "./build/theme/index.d.ts",
43
- "import": "./build/theme/index.js",
44
- "require": "./build/theme/index.js"
45
- },
46
- "./types": {
47
- "types": "./build/types/index.d.ts",
48
- "import": "./build/types/index.js",
49
- "require": "./build/types/index.js"
50
- }
51
- },
52
- "license": "MIT",
53
- "author": {
54
- "name": "Ahmed Sharkawy",
55
- "email": "a.elsharkawy@tap.company"
56
- },
57
- "files": [
58
- "build",
59
- "readme.md"
60
- ],
61
- "scripts": {
62
- "ts:build": "rm -rf build && tsc -p tsconfig.npm.json && tsc-alias -p tsconfig.npm.json",
63
- "push:local": "yarn ts:build && yalc publish --push",
64
- "push": "npm run ts:build && npm publish --access public",
65
- "push:test": "node scripts/increment-test-version.cjs && npm run ts:build && npm publish --access public --tag test && node scripts/restore-version.cjs",
66
- "dev": "vite",
67
- "build": "tsc -b && vite build ",
68
- "prettier": "prettier --list-different \"src/**/*.{md,mdx,ts,js,tsx,jsx,json}\"",
69
- "prettier:fix": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md,css,json}\"",
70
- "lint": "eslint . --color",
71
- "lint:fix": "eslint src --fix --color",
72
- "preview": "vite preview",
73
- "prepare": "husky"
74
- },
75
- "dependencies": {
76
- "@emotion/react": "^11.11.0",
77
- "@emotion/styled": "^11.11.0",
78
- "@hookform/resolvers": "^3.3.1",
79
- "@mui/material": "^5.12.3",
80
- "@uiw/react-json-view": "^2.0.0-alpha.16",
81
- "axios": "^1.4.0",
82
- "color": "^5.0.0",
83
- "dayjs": "^1.11.8",
84
- "framer-motion": "10.11.0",
85
- "i18next": "^22.4.15",
86
- "memoize-one": "^6.0.0",
87
- "re-resizable": "^6.9.9",
88
- "react": "^18.2.0",
89
- "react-colorful": "^5.6.1",
90
- "react-currency-input-field": "^3.6.11",
91
- "react-dom": "^18.2.0",
92
- "react-draggable": "^4.4.6",
93
- "react-dropzone": "^14.2.3",
94
- "react-hook-form": "^7.45.4",
95
- "react-hot-toast": "^2.4.1",
96
- "react-i18next": "^12.2.2",
97
- "react-lazy-load-image-component": "^1.6.3",
98
- "react-multi-date-picker": "^4.1.2",
99
- "react-router-dom": "^7.7.0",
100
- "react-virtualized-auto-sizer": "^1.0.20",
101
- "react-window": "^1.8.9",
102
- "react-window-infinite-loader": "^1.0.9",
103
- "react18-input-otp": "^1.1.4",
104
- "recharts": "^2.15.1"
105
- },
106
- "devDependencies": {
107
- "@eslint/js": "^9.17.0",
108
- "@testing-library/jest-dom": "^5.16.5",
109
- "@types/lodash": "^4.17.15",
110
- "@types/react": "^18.2.6",
111
- "@types/react-dom": "^18.3.5",
112
- "@types/react-lazy-load-image-component": "^1.6.4",
113
- "@types/react-virtualized-auto-sizer": "^1.0.8",
114
- "@types/react-window": "^1.8.5",
115
- "@types/react-window-infinite-loader": "^1.0.6",
116
- "@vitejs/plugin-react": "^4.3.4",
117
- "eslint": "^9.17.0",
118
- "eslint-plugin-react-hooks": "^5.0.0",
119
- "eslint-plugin-react-refresh": "^0.4.16",
120
- "globals": "^15.14.0",
121
- "husky": "^8.0.3",
122
- "lint-staged": "^13.2.2",
123
- "prettier": "^2.8.8",
124
- "tsc-alias": "^1.8.16",
125
- "typescript": "5.0.2",
126
- "typescript-eslint": "^8.18.2",
127
- "vite": "6.0.5",
128
- "vite-tsconfig-paths": "^4.2.0"
129
- },
130
- "lint-staged": {
131
- "src/**/*.{ts,tsx,json,js,jsx}": [
132
- "yarn run prettier:fix",
133
- "yarn run lint"
134
- ]
135
- },
136
- "publishConfig": {
137
- "registry": "https://registry.npmjs.org/"
138
- }
139
- }
1
+ {
2
+ "name": "@tap-payments/os-micro-frontend-shared",
3
+ "description": "Shared components and utilities for Tap Payments micro frontends",
4
+ "version": "0.1.106",
5
+ "testVersion": 0,
6
+ "type": "module",
7
+ "main": "build/index.js",
8
+ "module": "build/index.js",
9
+ "types": "build/index.d.ts",
10
+ "exports": {
11
+ ".": {
12
+ "types": "./build/index.d.ts",
13
+ "import": "./build/index.js",
14
+ "require": "./build/index.js"
15
+ },
16
+ "./constants": {
17
+ "types": "./build/constants/index.d.ts",
18
+ "import": "./build/constants/index.js",
19
+ "require": "./build/constants/index.js"
20
+ },
21
+ "./components": {
22
+ "types": "./build/components/index.d.ts",
23
+ "import": "./build/components/index.js",
24
+ "require": "./build/components/index.js"
25
+ },
26
+ "./components/*": {
27
+ "types": "./build/components/*/index.d.ts",
28
+ "import": "./build/components/*/index.js",
29
+ "require": "./build/components/*/index.js"
30
+ },
31
+ "./hooks": {
32
+ "types": "./build/hooks/index.d.ts",
33
+ "import": "./build/hooks/index.js",
34
+ "require": "./build/hooks/index.js"
35
+ },
36
+ "./utils": {
37
+ "types": "./build/utils/index.d.ts",
38
+ "import": "./build/utils/index.js",
39
+ "require": "./build/utils/index.js"
40
+ },
41
+ "./theme": {
42
+ "types": "./build/theme/index.d.ts",
43
+ "import": "./build/theme/index.js",
44
+ "require": "./build/theme/index.js"
45
+ },
46
+ "./types": {
47
+ "types": "./build/types/index.d.ts",
48
+ "import": "./build/types/index.js",
49
+ "require": "./build/types/index.js"
50
+ }
51
+ },
52
+ "license": "MIT",
53
+ "author": {
54
+ "name": "Ahmed Sharkawy",
55
+ "email": "a.elsharkawy@tap.company"
56
+ },
57
+ "files": [
58
+ "build",
59
+ "readme.md"
60
+ ],
61
+ "scripts": {
62
+ "ts:build": "rm -rf build && tsc -p tsconfig.npm.json && tsc-alias -p tsconfig.npm.json",
63
+ "push:local": "yarn ts:build && yalc publish --push",
64
+ "push": "npm run ts:build && npm publish --access public",
65
+ "push:test": "node scripts/increment-test-version.cjs && npm run ts:build && npm publish --access public --tag test && node scripts/restore-version.cjs",
66
+ "dev": "vite",
67
+ "build": "tsc -b && vite build ",
68
+ "prettier": "prettier --list-different \"src/**/*.{md,mdx,ts,js,tsx,jsx,json}\"",
69
+ "prettier:fix": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md,css,json}\"",
70
+ "lint": "eslint . --color",
71
+ "lint:fix": "eslint src --fix --color",
72
+ "preview": "vite preview",
73
+ "prepare": "husky"
74
+ },
75
+ "dependencies": {
76
+ "@emotion/react": "^11.11.0",
77
+ "@emotion/styled": "^11.11.0",
78
+ "@hookform/resolvers": "^3.3.1",
79
+ "@mui/material": "^5.12.3",
80
+ "@uiw/react-json-view": "^2.0.0-alpha.16",
81
+ "axios": "^1.4.0",
82
+ "color": "^5.0.0",
83
+ "dayjs": "^1.11.8",
84
+ "framer-motion": "10.11.0",
85
+ "i18next": "^22.4.15",
86
+ "memoize-one": "^6.0.0",
87
+ "re-resizable": "^6.9.9",
88
+ "react": "^18.2.0",
89
+ "react-colorful": "^5.6.1",
90
+ "react-currency-input-field": "^3.6.11",
91
+ "react-dom": "^18.2.0",
92
+ "react-draggable": "^4.4.6",
93
+ "react-dropzone": "^14.2.3",
94
+ "react-hook-form": "^7.45.4",
95
+ "react-hot-toast": "^2.4.1",
96
+ "react-i18next": "^12.2.2",
97
+ "react-lazy-load-image-component": "^1.6.3",
98
+ "react-multi-date-picker": "^4.1.2",
99
+ "react-router-dom": "^7.7.0",
100
+ "react-virtualized-auto-sizer": "^1.0.20",
101
+ "react-window": "^1.8.9",
102
+ "react-window-infinite-loader": "^1.0.9",
103
+ "react18-input-otp": "^1.1.4",
104
+ "recharts": "^2.15.1"
105
+ },
106
+ "devDependencies": {
107
+ "@eslint/js": "^9.17.0",
108
+ "@testing-library/jest-dom": "^5.16.5",
109
+ "@types/lodash": "^4.17.15",
110
+ "@types/react": "^18.2.6",
111
+ "@types/react-dom": "^18.3.5",
112
+ "@types/react-lazy-load-image-component": "^1.6.4",
113
+ "@types/react-virtualized-auto-sizer": "^1.0.8",
114
+ "@types/react-window": "^1.8.5",
115
+ "@types/react-window-infinite-loader": "^1.0.6",
116
+ "@vitejs/plugin-react": "^4.3.4",
117
+ "eslint": "^9.17.0",
118
+ "eslint-plugin-react-hooks": "^5.0.0",
119
+ "eslint-plugin-react-refresh": "^0.4.16",
120
+ "globals": "^15.14.0",
121
+ "husky": "^8.0.3",
122
+ "lint-staged": "^13.2.2",
123
+ "prettier": "^2.8.8",
124
+ "tsc-alias": "^1.8.16",
125
+ "typescript": "5.0.2",
126
+ "typescript-eslint": "^8.18.2",
127
+ "vite": "6.0.5",
128
+ "vite-tsconfig-paths": "^4.2.0"
129
+ },
130
+ "lint-staged": {
131
+ "src/**/*.{ts,tsx,json,js,jsx}": [
132
+ "yarn run prettier:fix",
133
+ "yarn run lint"
134
+ ]
135
+ },
136
+ "publishConfig": {
137
+ "registry": "https://registry.npmjs.org/"
138
+ }
139
+ }