@monolith-forensics/monolith-ui 1.1.28 → 1.1.29

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.
Files changed (135) hide show
  1. package/package.json +3 -2
  2. package/dist/Button/Button.d.ts +0 -19
  3. package/dist/Button/Button.js +0 -332
  4. package/dist/Button/index.d.ts +0 -2
  5. package/dist/Button/index.js +0 -8
  6. package/dist/Calendar/Calendar.d.ts +0 -15
  7. package/dist/Calendar/Calendar.js +0 -232
  8. package/dist/Calendar/CalendarStyles.d.ts +0 -36
  9. package/dist/Calendar/CalendarStyles.js +0 -170
  10. package/dist/Calendar/calendarHelpers.d.ts +0 -53
  11. package/dist/Calendar/calendarHelpers.js +0 -181
  12. package/dist/Calendar/index.d.ts +0 -1
  13. package/dist/Calendar/index.js +0 -8
  14. package/dist/CheckBox/CheckBox.d.ts +0 -13
  15. package/dist/CheckBox/CheckBox.js +0 -46
  16. package/dist/CheckBox/index.d.ts +0 -1
  17. package/dist/CheckBox/index.js +0 -8
  18. package/dist/DateInput/DateInput.d.ts +0 -24
  19. package/dist/DateInput/DateInput.js +0 -509
  20. package/dist/DateInput/index.d.ts +0 -1
  21. package/dist/DateInput/index.js +0 -8
  22. package/dist/DropDownMenu/DropDownMenu.d.ts +0 -36
  23. package/dist/DropDownMenu/DropDownMenu.js +0 -213
  24. package/dist/DropDownMenu/index.d.ts +0 -1
  25. package/dist/DropDownMenu/index.js +0 -8
  26. package/dist/Error/Error.d.ts +0 -4
  27. package/dist/Error/Error.js +0 -38
  28. package/dist/Error/index.d.ts +0 -1
  29. package/dist/Error/index.js +0 -8
  30. package/dist/FieldLabel/FieldLabel.d.ts +0 -19
  31. package/dist/FieldLabel/FieldLabel.js +0 -119
  32. package/dist/FieldLabel/index.d.ts +0 -1
  33. package/dist/FieldLabel/index.js +0 -8
  34. package/dist/FileInputField/FileInputField.d.ts +0 -19
  35. package/dist/FileInputField/FileInputField.js +0 -117
  36. package/dist/FileInputField/index.d.ts +0 -1
  37. package/dist/FileInputField/index.js +0 -8
  38. package/dist/Flyout/Flyout.d.ts +0 -11
  39. package/dist/Flyout/Flyout.js +0 -111
  40. package/dist/Flyout/FlyoutHeader.d.ts +0 -5
  41. package/dist/Flyout/FlyoutHeader.js +0 -12
  42. package/dist/Flyout/FlyoutTitle.d.ts +0 -2
  43. package/dist/Flyout/FlyoutTitle.js +0 -13
  44. package/dist/Flyout/index.d.ts +0 -3
  45. package/dist/Flyout/index.js +0 -12
  46. package/dist/FormSection/FormSection.d.ts +0 -9
  47. package/dist/FormSection/FormSection.js +0 -51
  48. package/dist/FormSection/index.d.ts +0 -1
  49. package/dist/FormSection/index.js +0 -8
  50. package/dist/Grid/Grid.d.ts +0 -8
  51. package/dist/Grid/Grid.js +0 -18
  52. package/dist/Grid/index.d.ts +0 -1
  53. package/dist/Grid/index.js +0 -8
  54. package/dist/IconButton/IconButton.d.ts +0 -5
  55. package/dist/IconButton/IconButton.js +0 -30
  56. package/dist/IconButton/index.d.ts +0 -1
  57. package/dist/IconButton/index.js +0 -8
  58. package/dist/Input/Input.d.ts +0 -21
  59. package/dist/Input/Input.js +0 -149
  60. package/dist/Input/index.d.ts +0 -1
  61. package/dist/Input/index.js +0 -8
  62. package/dist/Modal/Modal.d.ts +0 -14
  63. package/dist/Modal/Modal.js +0 -110
  64. package/dist/Modal/index.d.ts +0 -1
  65. package/dist/Modal/index.js +0 -8
  66. package/dist/MonolithUIProvider/GlobalStyle.d.ts +0 -4
  67. package/dist/MonolithUIProvider/GlobalStyle.js +0 -53
  68. package/dist/MonolithUIProvider/MonolithUIProvider.d.ts +0 -9
  69. package/dist/MonolithUIProvider/MonolithUIProvider.js +0 -29
  70. package/dist/MonolithUIProvider/index.d.ts +0 -2
  71. package/dist/MonolithUIProvider/index.js +0 -10
  72. package/dist/MonolithUIProvider/useMonolithUITheme.d.ts +0 -2
  73. package/dist/MonolithUIProvider/useMonolithUITheme.js +0 -12
  74. package/dist/Pill/Pill.d.ts +0 -11
  75. package/dist/Pill/Pill.js +0 -152
  76. package/dist/Pill/index.d.ts +0 -1
  77. package/dist/Pill/index.js +0 -8
  78. package/dist/SelectBox/SelectBox.d.ts +0 -45
  79. package/dist/SelectBox/SelectBox.js +0 -477
  80. package/dist/SelectBox/index.d.ts +0 -1
  81. package/dist/SelectBox/index.js +0 -8
  82. package/dist/Switch/Switch.d.ts +0 -18
  83. package/dist/Switch/Switch.js +0 -157
  84. package/dist/Switch/index.d.ts +0 -1
  85. package/dist/Switch/index.js +0 -8
  86. package/dist/Table/Table.d.ts +0 -91
  87. package/dist/Table/Table.js +0 -715
  88. package/dist/Table/index.d.ts +0 -2
  89. package/dist/Table/index.js +0 -10
  90. package/dist/TagBox/TagBox.d.ts +0 -39
  91. package/dist/TagBox/TagBox.js +0 -590
  92. package/dist/TagBox/TagBoxStyles.d.ts +0 -11
  93. package/dist/TagBox/TagBoxStyles.js +0 -113
  94. package/dist/TagBox/index.d.ts +0 -1
  95. package/dist/TagBox/index.js +0 -8
  96. package/dist/TextArea/TextArea.d.ts +0 -16
  97. package/dist/TextArea/TextArea.js +0 -81
  98. package/dist/TextArea/index.d.ts +0 -1
  99. package/dist/TextArea/index.js +0 -8
  100. package/dist/TextAreaInput/TextAreaInput.d.ts +0 -19
  101. package/dist/TextAreaInput/TextAreaInput.js +0 -11
  102. package/dist/TextAreaInput/index.d.ts +0 -1
  103. package/dist/TextAreaInput/index.js +0 -8
  104. package/dist/TextInput/TextInput.d.ts +0 -13
  105. package/dist/TextInput/TextInput.js +0 -31
  106. package/dist/TextInput/index.d.ts +0 -1
  107. package/dist/TextInput/index.js +0 -8
  108. package/dist/Tooltip/Tooltip.d.ts +0 -12
  109. package/dist/Tooltip/Tooltip.js +0 -53
  110. package/dist/Tooltip/index.d.ts +0 -1
  111. package/dist/Tooltip/index.js +0 -8
  112. package/dist/core/ArrowButton.d.ts +0 -6
  113. package/dist/core/ArrowButton.js +0 -48
  114. package/dist/core/ClearButton.d.ts +0 -6
  115. package/dist/core/ClearButton.js +0 -48
  116. package/dist/core/MonolithThemeProvider.d.ts +0 -4
  117. package/dist/core/MonolithThemeProvider.js +0 -20
  118. package/dist/core/StyledContent.d.ts +0 -7
  119. package/dist/core/StyledContent.js +0 -47
  120. package/dist/core/StyledFloatContainer.d.ts +0 -2
  121. package/dist/core/StyledFloatContainer.js +0 -10
  122. package/dist/core/Types/Size.d.ts +0 -2
  123. package/dist/core/Types/Size.js +0 -2
  124. package/dist/core/Types/Variant.d.ts +0 -2
  125. package/dist/core/Types/Variant.js +0 -2
  126. package/dist/core/index.d.ts +0 -6
  127. package/dist/core/index.js +0 -14
  128. package/dist/index.d.ts +0 -26
  129. package/dist/index.js +0 -59
  130. package/dist/theme/index.d.ts +0 -168
  131. package/dist/theme/index.js +0 -14
  132. package/dist/theme/typography.d.ts +0 -45
  133. package/dist/theme/typography.js +0 -59
  134. package/dist/theme/variants.d.ts +0 -172
  135. package/dist/theme/variants.js +0 -276
@@ -1,111 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const jsx_runtime_1 = require("react/jsx-runtime");
7
- const react_1 = require("@floating-ui/react");
8
- const lucide_react_1 = require("lucide-react");
9
- const styled_components_1 = __importDefault(require("styled-components"));
10
- const ANIMATION_TIME = 300;
11
- const StyledOverlay = (0, styled_components_1.default)(react_1.FloatingOverlay) `
12
- background-color: rgba(0, 0, 0, 0.3);
13
- position: fixed;
14
- inset: 0;
15
- z-index: 1400;
16
-
17
- @keyframes overlayShow {
18
- from {
19
- opacity: 0;
20
- }
21
- to {
22
- opacity: 1;
23
- }
24
- }
25
- `;
26
- const StyledClose = styled_components_1.default.div `
27
- position: absolute;
28
- top: 20px;
29
- right: 20px;
30
-
31
- color: ${(props) => props.theme.palette.text.secondary};
32
- `;
33
- const StyledButton = styled_components_1.default.button `
34
- background-color: transparent;
35
- border: none;
36
- outline: none;
37
- cursor: pointer;
38
- padding: 0;
39
-
40
- color: ${(props) => props.theme.palette.text.primary};
41
-
42
- &:hover {
43
- background-color: ${(props) => props.theme.palette.action.hover};
44
- }
45
- `;
46
- const StyledContent = styled_components_1.default.div `
47
- background-color: ${({ theme }) => theme.name === "DARK"
48
- ? theme.palette.background.alt
49
- : theme.palette.background.default};
50
- border-radius: 6px;
51
- border: 1px solid ${(props) => props.theme.palette.divider};
52
- position: fixed;
53
- margin: 10px;
54
-
55
- top: 0px;
56
- right: 0px;
57
- width: 50vw;
58
- height: calc(100vh - 20px);
59
-
60
- box-shadow: rgba(0, 0, 0, 0.5) 0px 16px 70px;
61
-
62
- display: flex;
63
- flex-direction: column;
64
- flex: 1 1 auto;
65
-
66
- overflow-y: hidden;
67
-
68
- &:focus {
69
- outline: none;
70
- }
71
-
72
- animation: contentShow ${ANIMATION_TIME}ms cubic-bezier(0.16, 1, 0.3, 1);
73
-
74
- // slide in from right to left
75
- @keyframes contentShow {
76
- from {
77
- transform: translate(100%, 0);
78
- }
79
- to {
80
- transform: translate(0, 0);
81
- }
82
- }
83
- `;
84
- const StyledInnerContent = styled_components_1.default.div `
85
- display: flex;
86
- flex-direction: column;
87
- flex: 1 1 auto;
88
-
89
- overflow-y: auto;
90
- padding: 25px;
91
- `;
92
- const Flyout = ({ children, open = false, onClose = () => { }, style = {}, closeOnOutsideClick = true, showCloseButton = true, }) => {
93
- const { refs, floatingStyles, context } = (0, react_1.useFloating)({
94
- open,
95
- onOpenChange: (isOpen) => {
96
- if (!isOpen) {
97
- onClose === null || onClose === void 0 ? void 0 : onClose();
98
- }
99
- },
100
- });
101
- const handleMouseDown = (event) => {
102
- var _a, _b;
103
- const target = event.target;
104
- if (((_b = (_a = target === null || target === void 0 ? void 0 : target.className) === null || _a === void 0 ? void 0 : _a.includes) === null || _b === void 0 ? void 0 : _b.call(_a, "mf-ModalOverlay")) &&
105
- closeOnOutsideClick) {
106
- onClose === null || onClose === void 0 ? void 0 : onClose();
107
- }
108
- };
109
- return ((0, jsx_runtime_1.jsx)(react_1.FloatingPortal, { preserveTabOrder: true, children: open && ((0, jsx_runtime_1.jsx)(StyledOverlay, { className: "mf-ModalOverlay", lockScroll: true, onMouseDown: handleMouseDown, children: (0, jsx_runtime_1.jsx)(react_1.FloatingFocusManager, { context: context, modal: true, children: (0, jsx_runtime_1.jsxs)(StyledContent, Object.assign({ style: style, className: `mf-Modal mf-Flyout`, ref: refs.setFloating }, floatingStyles, { translate: undefined, children: [showCloseButton && ((0, jsx_runtime_1.jsx)(StyledClose, { children: (0, jsx_runtime_1.jsx)(StyledButton, { onMouseDown: () => onClose === null || onClose === void 0 ? void 0 : onClose(), children: (0, jsx_runtime_1.jsx)(lucide_react_1.XIcon, { size: 18 }) }) })), (0, jsx_runtime_1.jsx)(StyledInnerContent, { className: "mf-Flyout inner-content", children: children })] })) }) })) }));
110
- };
111
- exports.default = Flyout;
@@ -1,5 +0,0 @@
1
- interface FlyoutHeaderProps {
2
- hasBorder?: boolean;
3
- }
4
- declare const FlyoutHeader: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, FlyoutHeaderProps>> & string;
5
- export default FlyoutHeader;
@@ -1,12 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const styled_components_1 = __importDefault(require("styled-components"));
7
- const FlyoutHeader = styled_components_1.default.div `
8
- border-bottom: ${({ theme, hasBorder }) => hasBorder ? `1px solid ${theme.palette.divider}` : "none"};
9
-
10
- min-height: 50px;
11
- `;
12
- exports.default = FlyoutHeader;
@@ -1,2 +0,0 @@
1
- declare const FlyoutTitle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, never>> & string;
2
- export default FlyoutTitle;
@@ -1,13 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const styled_components_1 = __importDefault(require("styled-components"));
7
- const FlyoutTitle = styled_components_1.default.h1 `
8
- font-size: 24px;
9
- font-weight: 600;
10
- margin: 0px;
11
- color: ${(props) => props.theme.palette.text.primary};
12
- `;
13
- exports.default = FlyoutTitle;
@@ -1,3 +0,0 @@
1
- export { default } from "./Flyout";
2
- export { default as FlyoutHeader } from "./FlyoutHeader";
3
- export { default as FlyoutTitle } from "./FlyoutTitle";
@@ -1,12 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.FlyoutTitle = exports.FlyoutHeader = exports.default = void 0;
7
- var Flyout_1 = require("./Flyout");
8
- Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(Flyout_1).default; } });
9
- var FlyoutHeader_1 = require("./FlyoutHeader");
10
- Object.defineProperty(exports, "FlyoutHeader", { enumerable: true, get: function () { return __importDefault(FlyoutHeader_1).default; } });
11
- var FlyoutTitle_1 = require("./FlyoutTitle");
12
- Object.defineProperty(exports, "FlyoutTitle", { enumerable: true, get: function () { return __importDefault(FlyoutTitle_1).default; } });
@@ -1,9 +0,0 @@
1
- import { ReactNode } from "react";
2
- interface FormSectionProps {
3
- children?: ReactNode;
4
- className?: string;
5
- title?: string;
6
- defaultOpen?: boolean;
7
- }
8
- declare const FormSection: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<FormSectionProps, never>> & string & Omit<({ className, title, children, defaultOpen }: FormSectionProps) => import("react/jsx-runtime").JSX.Element, keyof import("react").Component<any, {}, any>>;
9
- export default FormSection;
@@ -1,51 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const jsx_runtime_1 = require("react/jsx-runtime");
7
- const lucide_react_1 = require("lucide-react");
8
- const react_1 = require("react");
9
- const styled_components_1 = __importDefault(require("styled-components"));
10
- const FormSection = (0, styled_components_1.default)(({ className, title, children, defaultOpen = true }) => {
11
- const [open, setOpen] = (0, react_1.useState)(defaultOpen);
12
- return ((0, jsx_runtime_1.jsxs)("div", { className: className, children: [(0, jsx_runtime_1.jsxs)("div", { className: "section-header", onClick: (e) => setOpen((prev) => !prev), children: [(0, jsx_runtime_1.jsx)("h3", { children: title }), (0, jsx_runtime_1.jsx)("div", { className: "section-line" }), (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDownIcon, { size: 18, className: open ? "open" : "" })] }), (0, jsx_runtime_1.jsx)("div", { className: "section-content", "data-open": open, children: children })] }));
13
- }) `
14
- h3 {
15
- margin: 0;
16
- }
17
-
18
- .section-header {
19
- user-select: none;
20
- cursor: pointer;
21
- margin-bottom: 10px;
22
-
23
- display: flex;
24
- flex-direction: row;
25
- gap: 10px;
26
- align-items: center;
27
-
28
- .section-line {
29
- flex: 1;
30
- height: 1px;
31
- background-color: ${({ theme }) => theme.palette.divider};
32
- }
33
-
34
- svg {
35
- transition: transform 0.2s;
36
- color: ${({ theme }) => theme.palette.text.secondary};
37
-
38
- &.open {
39
- transform: rotate(180deg);
40
- }
41
- }
42
- }
43
-
44
- .section-content {
45
- padding: 10px 0px;
46
- &[data-open="false"] {
47
- display: none;
48
- }
49
- }
50
- `;
51
- exports.default = FormSection;
@@ -1 +0,0 @@
1
- export { default } from "./FormSection";
@@ -1,8 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.default = void 0;
7
- var FormSection_1 = require("./FormSection");
8
- Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(FormSection_1).default; } });
@@ -1,8 +0,0 @@
1
- interface GridProps {
2
- className?: string;
3
- children: React.ReactNode;
4
- col?: number;
5
- width?: string | number;
6
- }
7
- declare const Grid: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<GridProps, never>> & string & Omit<({ className, children }: GridProps) => import("react/jsx-runtime").JSX.Element, keyof import("react").Component<any, {}, any>>;
8
- export default Grid;
package/dist/Grid/Grid.js DELETED
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const jsx_runtime_1 = require("react/jsx-runtime");
7
- const styled_components_1 = __importDefault(require("styled-components"));
8
- const Grid = (0, styled_components_1.default)(({ className, children }) => {
9
- return (0, jsx_runtime_1.jsx)("div", { className: className, children: children });
10
- }) `
11
- display: grid;
12
- grid-template-columns: repeat(${({ col }) => col || 1}, minmax(0, 1fr));
13
- gap: 20px;
14
-
15
- width: ${({ width }) => Number.isInteger(width) ? `${width}px` : width || "100%"};
16
- height: auto;
17
- `;
18
- exports.default = Grid;
@@ -1 +0,0 @@
1
- export { default } from "./Grid";
@@ -1,8 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.default = void 0;
7
- var Grid_1 = require("./Grid");
8
- Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(Grid_1).default; } });
@@ -1,5 +0,0 @@
1
- import { ButtonProps } from "../Button/Button.js";
2
- declare const IconButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<ButtonProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & {
3
- ref?: ((instance: HTMLButtonElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLButtonElement> | null | undefined;
4
- }, ButtonProps>> & string & Omit<import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>, keyof import("react").Component<any, {}, any>>;
5
- export default IconButton;
@@ -1,30 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const styled_components_1 = __importDefault(require("styled-components"));
7
- const __1 = require("..");
8
- const IconButton = (0, styled_components_1.default)(__1.Button) `
9
- padding: ${({ size, variant }) => {
10
- if (variant === "text")
11
- return `0px 0px`;
12
- switch (size) {
13
- case "xxs":
14
- return `0px 4px`;
15
- case "xs":
16
- return `0px 4px`;
17
- case "sm":
18
- return `0px 6px`;
19
- case "md":
20
- return `0px 8px`;
21
- case "lg":
22
- return `0px 10px`;
23
- case "xl":
24
- return `0px 12px`;
25
- default:
26
- return `0px 6px`;
27
- }
28
- }};
29
- `;
30
- exports.default = IconButton;
@@ -1 +0,0 @@
1
- export { default } from "./IconButton";
@@ -1,8 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.default = void 0;
7
- var IconButton_1 = require("./IconButton");
8
- Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(IconButton_1).default; } });
@@ -1,21 +0,0 @@
1
- import { Size, Variant } from "../core";
2
- export interface InputProps {
3
- ref?: React.Ref<HTMLInputElement>;
4
- className?: string;
5
- size?: Size;
6
- variant?: Variant;
7
- width?: string | number | null | undefined;
8
- style?: React.CSSProperties;
9
- placeholder?: string;
10
- onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
11
- onKeyUp?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
12
- onKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
13
- onFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;
14
- onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;
15
- autoFocus?: boolean;
16
- readOnly?: boolean;
17
- }
18
- declare const Input: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<Omit<InputProps, "ref"> & import("react").RefAttributes<HTMLInputElement>, "ref"> & {
19
- ref?: ((instance: HTMLInputElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLInputElement> | null | undefined;
20
- }, never>> & string & Omit<import("react").ForwardRefExoticComponent<Omit<InputProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>, keyof import("react").Component<any, {}, any>>;
21
- export default Input;
@@ -1,149 +0,0 @@
1
- "use strict";
2
- var __rest = (this && this.__rest) || function (s, e) {
3
- var t = {};
4
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
- t[p] = s[p];
6
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
- t[p[i]] = s[p[i]];
10
- }
11
- return t;
12
- };
13
- var __importDefault = (this && this.__importDefault) || function (mod) {
14
- return (mod && mod.__esModule) ? mod : { "default": mod };
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- const jsx_runtime_1 = require("react/jsx-runtime");
18
- const styled_components_1 = __importDefault(require("styled-components"));
19
- const react_1 = require("react");
20
- const Input = (0, styled_components_1.default)((0, react_1.forwardRef)((_a, ref) => {
21
- var { className, size = "sm", variant = "outlined", width } = _a, rest = __rest(_a, ["className", "size", "variant", "width"]);
22
- return (0, jsx_runtime_1.jsx)("input", Object.assign({ ref: ref, className: className }, rest));
23
- })) `
24
- font-family: ${({ theme }) => theme.typography.fontFamily};
25
- pointer-events: "all";
26
- user-select: "all";
27
- outline: none;
28
- box-sizing: border-box;
29
-
30
- color: ${({ theme }) => theme.palette.text.primary};
31
- font-size: ${({ size }) => size === "xs"
32
- ? "11px"
33
- : size === "sm"
34
- ? "13px"
35
- : size === "md"
36
- ? "15px"
37
- : size === "lg"
38
- ? "17px"
39
- : size === "xl"
40
- ? "19px"
41
- : "13px"};
42
-
43
- height: ${({ size }) => size === "xs"
44
- ? "26px"
45
- : size === "sm"
46
- ? "30px"
47
- : size === "md"
48
- ? "36px"
49
- : size === "lg"
50
- ? "42px"
51
- : size === "xl"
52
- ? "50px"
53
- : "30px"};
54
-
55
- min-height: ${({ size }) => size === "xs"
56
- ? "26px"
57
- : size === "sm"
58
- ? "30px"
59
- : size === "md"
60
- ? "36px"
61
- : size === "lg"
62
- ? "42px"
63
- : size === "xl"
64
- ? "50px"
65
- : "30px"};
66
-
67
- transition: border 0.1s ease-in-out;
68
- border-radius: 4px;
69
- border: 1px solid
70
- ${({ theme, variant }) => {
71
- switch (variant) {
72
- case "contained":
73
- return "transparent";
74
- case "filled":
75
- return "transparent";
76
- case "outlined":
77
- return theme.palette.input.border;
78
- case "text":
79
- return "transparent";
80
- default:
81
- return theme.palette.input.border;
82
- }
83
- }};
84
-
85
- padding: ${({ size }) => size === "xs"
86
- ? "0px 8px"
87
- : size === "sm"
88
- ? "0px 10px"
89
- : size === "md"
90
- ? "0px 12px"
91
- : size === "lg"
92
- ? "0px 14px"
93
- : size === "xl"
94
- ? "0px 16px"
95
- : "0px 10px"};
96
-
97
- width: ${({ width }) => {
98
- if (typeof width === "undefined")
99
- return "100%";
100
- if (width === null)
101
- return "100%";
102
- if (typeof width === "string")
103
- return width;
104
- if (typeof width === "number")
105
- return `${width}px`;
106
- }};
107
-
108
- background-color: ${({ theme, variant }) => {
109
- switch (variant) {
110
- case "contained":
111
- return theme.palette.input.background;
112
- case "filled":
113
- return theme.palette.input.background;
114
- case "outlined":
115
- return theme.palette.input.background;
116
- case "text":
117
- return "transparent";
118
- default:
119
- return theme.palette.input.background;
120
- }
121
- }};
122
-
123
- ::placeholder {
124
- font-size: ${({ size }) => size === "xs"
125
- ? "10px"
126
- : size === "sm"
127
- ? "12px"
128
- : size === "md"
129
- ? "14px"
130
- : size === "lg"
131
- ? "16px"
132
- : size === "xl"
133
- ? "18px"
134
- : "12px"};
135
- }
136
-
137
- &:focus {
138
- border: 1px solid ${({ theme }) => theme.palette.primary.main};
139
- }
140
-
141
- &[data-button-right="true"] {
142
- padding-right: 36px;
143
- }
144
-
145
- &[readOnly] {
146
- cursor: pointer;
147
- }
148
- `;
149
- exports.default = Input;
@@ -1 +0,0 @@
1
- export { default } from "./Input";
@@ -1,8 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.default = void 0;
7
- var Input_1 = require("./Input");
8
- Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(Input_1).default; } });
@@ -1,14 +0,0 @@
1
- interface ModalProps {
2
- children: React.ReactNode;
3
- open?: boolean;
4
- onClose?: () => void;
5
- style?: React.CSSProperties;
6
- showCloseButton?: boolean;
7
- FocusProps?: any;
8
- }
9
- declare const Modal: {
10
- ({ children, open, onClose, style, showCloseButton, FocusProps, }: ModalProps): import("react/jsx-runtime").JSX.Element;
11
- Title: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, never>> & string;
12
- SubTitle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, never>> & string;
13
- };
14
- export default Modal;
@@ -1,110 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const jsx_runtime_1 = require("react/jsx-runtime");
7
- const styled_components_1 = __importDefault(require("styled-components"));
8
- const lucide_react_1 = require("lucide-react");
9
- const react_1 = require("@floating-ui/react");
10
- const StyledOverlay = (0, styled_components_1.default)(react_1.FloatingOverlay) `
11
- background-color: rgba(0, 0, 0, 0.3);
12
- position: fixed;
13
- inset: 0;
14
- z-index: 1400;
15
-
16
- @keyframes overlayShow {
17
- from {
18
- opacity: 0;
19
- }
20
- to {
21
- opacity: 1;
22
- }
23
- }
24
- `;
25
- const StyledContent = styled_components_1.default.div `
26
- background-color: ${({ theme }) => theme.name === "DARK"
27
- ? theme.palette.background.default
28
- : theme.palette.background.default};
29
- border-radius: 6px;
30
- border: 1px solid ${(props) => props.theme.palette.divider};
31
- position: fixed;
32
- top: 25px;
33
- left: 50%;
34
- transform: translate(-50%, 0px);
35
- box-shadow: rgba(0, 0, 0, 0.5) 0px 16px 70px;
36
-
37
- z-index: 2;
38
-
39
- max-height: calc(100vh - 50px);
40
- max-width: calc(100vw - 50px);
41
-
42
- display: flex;
43
- flex-direction: column;
44
-
45
- overflow-y: hidden;
46
-
47
- &:focus {
48
- outline: none;
49
- }
50
-
51
- @keyframes contentShow {
52
- from {
53
- opacity: 0;
54
- transform: translate(-50%, -48%) scale(0.96);
55
- }
56
- to {
57
- opacity: 1;
58
- transform: translate(-50%, -50%) scale(1);
59
- }
60
- }
61
- `;
62
- const StyledInnerContent = styled_components_1.default.div `
63
- display: flex;
64
- flex-direction: column;
65
-
66
- overflow-y: auto;
67
- padding: 25px;
68
- `;
69
- const StyledClose = styled_components_1.default.div `
70
- position: absolute;
71
- top: 15px;
72
- right: 15px;
73
-
74
- color: ${(props) => props.theme.palette.text.secondary};
75
- `;
76
- const StyledButton = styled_components_1.default.button `
77
- background-color: transparent;
78
- border: none;
79
- outline: none;
80
- cursor: pointer;
81
- padding: 0;
82
- `;
83
- const Title = styled_components_1.default.h1 `
84
- font-size: 20px;
85
- font-weight: 600;
86
- margin: 0px;
87
- `;
88
- const SubTitle = styled_components_1.default.h2 `
89
- font-size: 14px;
90
- font-weight: 500;
91
- margin: 0px;
92
- color: ${(props) => props.theme.palette.text.secondary};
93
- `;
94
- const Modal = ({ children, open = false, onClose, style = {}, showCloseButton = false, FocusProps = {}, }) => {
95
- const { refs, floatingStyles, context } = (0, react_1.useFloating)({
96
- open,
97
- onOpenChange: (isOpen) => {
98
- if (!isOpen) {
99
- onClose === null || onClose === void 0 ? void 0 : onClose();
100
- }
101
- },
102
- });
103
- const handleMouseDown = () => {
104
- onClose === null || onClose === void 0 ? void 0 : onClose();
105
- };
106
- return ((0, jsx_runtime_1.jsx)(react_1.FloatingPortal, { preserveTabOrder: true, children: open && ((0, jsx_runtime_1.jsx)(StyledOverlay, { className: "mf-ModalOverlay", lockScroll: true, children: (0, jsx_runtime_1.jsx)(react_1.FloatingFocusManager, Object.assign({ context: context, modal: true }, FocusProps, { children: (0, jsx_runtime_1.jsxs)(StyledContent, Object.assign({ style: style, className: "mf-Modal", ref: refs.setFloating }, floatingStyles, { children: [showCloseButton && ((0, jsx_runtime_1.jsx)(StyledClose, { children: (0, jsx_runtime_1.jsx)(StyledButton, { onMouseDown: handleMouseDown, children: (0, jsx_runtime_1.jsx)(lucide_react_1.X, { size: 18 }) }) })), (0, jsx_runtime_1.jsx)(StyledInnerContent, { children: children })] })) })) })) }));
107
- };
108
- Modal.Title = Title;
109
- Modal.SubTitle = SubTitle;
110
- exports.default = Modal;
@@ -1 +0,0 @@
1
- export { default } from "./Modal";
@@ -1,8 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.default = void 0;
7
- var Modal_1 = require("./Modal");
8
- Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(Modal_1).default; } });