@monolith-forensics/monolith-ui 1.1.30 → 1.1.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Button/Button.js +11 -16
- package/dist/Button/index.js +1 -8
- package/dist/Calendar/Calendar.js +38 -66
- package/dist/Calendar/CalendarStyles.js +19 -25
- package/dist/Calendar/calendarHelpers.js +34 -46
- package/dist/Calendar/index.js +1 -8
- package/dist/CheckBox/CheckBox.js +9 -14
- package/dist/CheckBox/index.js +1 -8
- package/dist/DateInput/DateInput.js +46 -51
- package/dist/DateInput/index.js +1 -8
- package/dist/DropDownMenu/DropDownMenu.js +27 -32
- package/dist/DropDownMenu/index.js +1 -8
- package/dist/Error/Error.js +10 -15
- package/dist/Error/index.js +1 -8
- package/dist/FieldLabel/FieldLabel.js +8 -37
- package/dist/FieldLabel/index.js +1 -8
- package/dist/FileInputField/FileInputField.js +11 -16
- package/dist/FileInputField/index.js +1 -8
- package/dist/Flyout/Flyout.js +12 -17
- package/dist/Flyout/FlyoutHeader.js +3 -8
- package/dist/Flyout/FlyoutTitle.js +3 -8
- package/dist/Flyout/index.js +3 -12
- package/dist/FormSection/FormSection.js +8 -13
- package/dist/FormSection/index.js +1 -8
- package/dist/Grid/Grid.js +5 -10
- package/dist/Grid/index.js +1 -8
- package/dist/IconButton/IconButton.js +4 -9
- package/dist/IconButton/index.js +1 -8
- package/dist/Input/Input.js +6 -11
- package/dist/Input/index.js +1 -8
- package/dist/Modal/Modal.js +14 -19
- package/dist/Modal/index.js +1 -8
- package/dist/MonolithUIProvider/GlobalStyle.js +3 -5
- package/dist/MonolithUIProvider/MonolithUIProvider.js +13 -19
- package/dist/MonolithUIProvider/index.js +3 -12
- package/dist/MonolithUIProvider/useMonolithUITheme.js +4 -6
- package/dist/Pill/Pill.js +9 -14
- package/dist/Pill/index.js +1 -8
- package/dist/SelectBox/SelectBox.js +44 -50
- package/dist/SelectBox/index.js +1 -8
- package/dist/Switch/Switch.js +9 -37
- package/dist/Switch/index.js +1 -8
- package/dist/Table/Table.js +68 -76
- package/dist/Table/index.js +2 -10
- package/dist/TagBox/TagBox.js +40 -45
- package/dist/TagBox/TagBoxStyles.js +11 -17
- package/dist/TagBox/index.js +1 -8
- package/dist/TextArea/TextArea.js +4 -9
- package/dist/TextArea/index.js +1 -8
- package/dist/TextAreaInput/TextAreaInput.js +5 -7
- package/dist/TextAreaInput/index.js +1 -8
- package/dist/TextInput/TextInput.js +7 -12
- package/dist/TextInput/index.js +1 -8
- package/dist/Tooltip/Tooltip.js +6 -34
- package/dist/Tooltip/index.js +1 -8
- package/dist/core/ArrowButton.js +8 -13
- package/dist/core/ClearButton.js +8 -13
- package/dist/core/StyledContent.js +3 -8
- package/dist/core/StyledFloatContainer.js +3 -8
- package/dist/core/Types/Size.js +1 -2
- package/dist/core/Types/Variant.js +1 -2
- package/dist/core/index.js +4 -14
- package/dist/index.js +26 -59
- package/dist/theme/index.js +4 -9
- package/dist/theme/typography.js +1 -3
- package/dist/theme/variants.js +8 -14
- package/package.json +1 -1
- package/dist/Button/Button.d.ts +0 -19
- package/dist/Button/index.d.ts +0 -2
- package/dist/Calendar/Calendar.d.ts +0 -15
- package/dist/Calendar/CalendarStyles.d.ts +0 -36
- package/dist/Calendar/calendarHelpers.d.ts +0 -53
- package/dist/Calendar/index.d.ts +0 -1
- package/dist/CheckBox/CheckBox.d.ts +0 -13
- package/dist/CheckBox/index.d.ts +0 -1
- package/dist/DateInput/DateInput.d.ts +0 -24
- package/dist/DateInput/index.d.ts +0 -1
- package/dist/DropDownMenu/DropDownMenu.d.ts +0 -36
- package/dist/DropDownMenu/index.d.ts +0 -1
- package/dist/Error/Error.d.ts +0 -4
- package/dist/Error/index.d.ts +0 -1
- package/dist/FieldLabel/FieldLabel.d.ts +0 -19
- package/dist/FieldLabel/index.d.ts +0 -1
- package/dist/FileInputField/FileInputField.d.ts +0 -19
- package/dist/FileInputField/index.d.ts +0 -1
- package/dist/Flyout/Flyout.d.ts +0 -11
- package/dist/Flyout/FlyoutHeader.d.ts +0 -5
- package/dist/Flyout/FlyoutTitle.d.ts +0 -2
- package/dist/Flyout/index.d.ts +0 -3
- package/dist/FormSection/FormSection.d.ts +0 -9
- package/dist/FormSection/index.d.ts +0 -1
- package/dist/Grid/Grid.d.ts +0 -8
- package/dist/Grid/index.d.ts +0 -1
- package/dist/IconButton/IconButton.d.ts +0 -5
- package/dist/IconButton/index.d.ts +0 -1
- package/dist/Input/Input.d.ts +0 -21
- package/dist/Input/index.d.ts +0 -1
- package/dist/Modal/Modal.d.ts +0 -14
- package/dist/Modal/index.d.ts +0 -1
- package/dist/MonolithUIProvider/GlobalStyle.d.ts +0 -4
- package/dist/MonolithUIProvider/MonolithUIProvider.d.ts +0 -10
- package/dist/MonolithUIProvider/index.d.ts +0 -3
- package/dist/MonolithUIProvider/useMonolithUITheme.d.ts +0 -2
- package/dist/Pill/Pill.d.ts +0 -11
- package/dist/Pill/index.d.ts +0 -1
- package/dist/SelectBox/SelectBox.d.ts +0 -45
- package/dist/SelectBox/index.d.ts +0 -1
- package/dist/Switch/Switch.d.ts +0 -18
- package/dist/Switch/index.d.ts +0 -1
- package/dist/Table/Table.d.ts +0 -91
- package/dist/Table/index.d.ts +0 -2
- package/dist/TagBox/TagBox.d.ts +0 -39
- package/dist/TagBox/TagBoxStyles.d.ts +0 -11
- package/dist/TagBox/index.d.ts +0 -1
- package/dist/TextArea/TextArea.d.ts +0 -16
- package/dist/TextArea/index.d.ts +0 -1
- package/dist/TextAreaInput/TextAreaInput.d.ts +0 -19
- package/dist/TextAreaInput/index.d.ts +0 -1
- package/dist/TextInput/TextInput.d.ts +0 -13
- package/dist/TextInput/index.d.ts +0 -1
- package/dist/Tooltip/Tooltip.d.ts +0 -12
- package/dist/Tooltip/index.d.ts +0 -1
- package/dist/core/ArrowButton.d.ts +0 -6
- package/dist/core/ClearButton.d.ts +0 -6
- package/dist/core/MonolithThemeProvider.d.ts +0 -4
- package/dist/core/MonolithThemeProvider.js +0 -20
- package/dist/core/StyledContent.d.ts +0 -7
- package/dist/core/StyledFloatContainer.d.ts +0 -2
- package/dist/core/Types/Size.d.ts +0 -2
- package/dist/core/Types/Variant.d.ts +0 -2
- package/dist/core/index.d.ts +0 -6
- package/dist/index.d.ts +0 -26
- package/dist/theme/index.d.ts +0 -168
- package/dist/theme/typography.d.ts +0 -45
- package/dist/theme/variants.d.ts +0 -172
package/dist/Flyout/Flyout.js
CHANGED
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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"));
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { FloatingFocusManager, FloatingOverlay, FloatingPortal, useFloating, } from "@floating-ui/react";
|
|
3
|
+
import { XIcon } from "lucide-react";
|
|
4
|
+
import styled from "styled-components";
|
|
10
5
|
const ANIMATION_TIME = 300;
|
|
11
|
-
const StyledOverlay = (
|
|
6
|
+
const StyledOverlay = styled(FloatingOverlay) `
|
|
12
7
|
background-color: rgba(0, 0, 0, 0.3);
|
|
13
8
|
position: fixed;
|
|
14
9
|
inset: 0;
|
|
@@ -23,14 +18,14 @@ const StyledOverlay = (0, styled_components_1.default)(react_1.FloatingOverlay)
|
|
|
23
18
|
}
|
|
24
19
|
}
|
|
25
20
|
`;
|
|
26
|
-
const StyledClose =
|
|
21
|
+
const StyledClose = styled.div `
|
|
27
22
|
position: absolute;
|
|
28
23
|
top: 20px;
|
|
29
24
|
right: 20px;
|
|
30
25
|
|
|
31
26
|
color: ${(props) => props.theme.palette.text.secondary};
|
|
32
27
|
`;
|
|
33
|
-
const StyledButton =
|
|
28
|
+
const StyledButton = styled.button `
|
|
34
29
|
background-color: transparent;
|
|
35
30
|
border: none;
|
|
36
31
|
outline: none;
|
|
@@ -43,7 +38,7 @@ const StyledButton = styled_components_1.default.button `
|
|
|
43
38
|
background-color: ${(props) => props.theme.palette.action.hover};
|
|
44
39
|
}
|
|
45
40
|
`;
|
|
46
|
-
const StyledContent =
|
|
41
|
+
const StyledContent = styled.div `
|
|
47
42
|
background-color: ${({ theme }) => theme.name === "DARK"
|
|
48
43
|
? theme.palette.background.alt
|
|
49
44
|
: theme.palette.background.default};
|
|
@@ -81,7 +76,7 @@ const StyledContent = styled_components_1.default.div `
|
|
|
81
76
|
}
|
|
82
77
|
}
|
|
83
78
|
`;
|
|
84
|
-
const StyledInnerContent =
|
|
79
|
+
const StyledInnerContent = styled.div `
|
|
85
80
|
display: flex;
|
|
86
81
|
flex-direction: column;
|
|
87
82
|
flex: 1 1 auto;
|
|
@@ -90,7 +85,7 @@ const StyledInnerContent = styled_components_1.default.div `
|
|
|
90
85
|
padding: 25px;
|
|
91
86
|
`;
|
|
92
87
|
const Flyout = ({ children, open = false, onClose = () => { }, style = {}, closeOnOutsideClick = true, showCloseButton = true, }) => {
|
|
93
|
-
const { refs, floatingStyles, context } =
|
|
88
|
+
const { refs, floatingStyles, context } = useFloating({
|
|
94
89
|
open,
|
|
95
90
|
onOpenChange: (isOpen) => {
|
|
96
91
|
if (!isOpen) {
|
|
@@ -106,6 +101,6 @@ const Flyout = ({ children, open = false, onClose = () => { }, style = {}, close
|
|
|
106
101
|
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
107
102
|
}
|
|
108
103
|
};
|
|
109
|
-
return ((
|
|
104
|
+
return (_jsx(FloatingPortal, { preserveTabOrder: true, children: open && (_jsx(StyledOverlay, { className: "mf-ModalOverlay", lockScroll: true, onMouseDown: handleMouseDown, children: _jsx(FloatingFocusManager, { context: context, modal: true, children: _jsxs(StyledContent, Object.assign({ style: style, className: `mf-Modal mf-Flyout`, ref: refs.setFloating }, floatingStyles, { translate: undefined, children: [showCloseButton && (_jsx(StyledClose, { children: _jsx(StyledButton, { onMouseDown: () => onClose === null || onClose === void 0 ? void 0 : onClose(), children: _jsx(XIcon, { size: 18 }) }) })), _jsx(StyledInnerContent, { className: "mf-Flyout inner-content", children: children })] })) }) })) }));
|
|
110
105
|
};
|
|
111
|
-
|
|
106
|
+
export default Flyout;
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 `
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
const FlyoutHeader = styled.div `
|
|
8
3
|
border-bottom: ${({ theme, hasBorder }) => hasBorder ? `1px solid ${theme.palette.divider}` : "none"};
|
|
9
4
|
|
|
10
5
|
min-height: 50px;
|
|
11
6
|
`;
|
|
12
|
-
|
|
7
|
+
export default FlyoutHeader;
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 `
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
const FlyoutTitle = styled.h1 `
|
|
8
3
|
font-size: 24px;
|
|
9
4
|
font-weight: 600;
|
|
10
5
|
margin: 0px;
|
|
11
6
|
color: ${(props) => props.theme.palette.text.primary};
|
|
12
7
|
`;
|
|
13
|
-
|
|
8
|
+
export default FlyoutTitle;
|
package/dist/Flyout/index.js
CHANGED
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
+
export { default } from "./Flyout";
|
|
2
|
+
export { default as FlyoutHeader } from "./FlyoutHeader";
|
|
3
|
+
export { default as FlyoutTitle } from "./FlyoutTitle";
|
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
|
|
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 })] }));
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronDownIcon } from "lucide-react";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import styled from "styled-components";
|
|
5
|
+
const FormSection = styled(({ className, title, children, defaultOpen = true }) => {
|
|
6
|
+
const [open, setOpen] = useState(defaultOpen);
|
|
7
|
+
return (_jsxs("div", { className: className, children: [_jsxs("div", { className: "section-header", onClick: (e) => setOpen((prev) => !prev), children: [_jsx("h3", { children: title }), _jsx("div", { className: "section-line" }), _jsx(ChevronDownIcon, { size: 18, className: open ? "open" : "" })] }), _jsx("div", { className: "section-content", "data-open": open, children: children })] }));
|
|
13
8
|
}) `
|
|
14
9
|
h3 {
|
|
15
10
|
margin: 0;
|
|
@@ -48,4 +43,4 @@ const FormSection = (0, styled_components_1.default)(({ className, title, childr
|
|
|
48
43
|
}
|
|
49
44
|
}
|
|
50
45
|
`;
|
|
51
|
-
|
|
46
|
+
export default FormSection;
|
|
@@ -1,8 +1 @@
|
|
|
1
|
-
|
|
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
|
+
export { default } from "./FormSection";
|
package/dist/Grid/Grid.js
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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 });
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
const Grid = styled(({ className, children }) => {
|
|
4
|
+
return _jsx("div", { className: className, children: children });
|
|
10
5
|
}) `
|
|
11
6
|
display: grid;
|
|
12
7
|
grid-template-columns: repeat(${({ col }) => col || 1}, minmax(0, 1fr));
|
|
@@ -15,4 +10,4 @@ const Grid = (0, styled_components_1.default)(({ className, children }) => {
|
|
|
15
10
|
width: ${({ width }) => Number.isInteger(width) ? `${width}px` : width || "100%"};
|
|
16
11
|
height: auto;
|
|
17
12
|
`;
|
|
18
|
-
|
|
13
|
+
export default Grid;
|
package/dist/Grid/index.js
CHANGED
|
@@ -1,8 +1 @@
|
|
|
1
|
-
|
|
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
|
+
export { default } from "./Grid";
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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) `
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { Button } from "..";
|
|
3
|
+
const IconButton = styled(Button) `
|
|
9
4
|
padding: ${({ size, variant }) => {
|
|
10
5
|
if (variant === "text")
|
|
11
6
|
return `0px 0px`;
|
|
@@ -27,4 +22,4 @@ const IconButton = (0, styled_components_1.default)(__1.Button) `
|
|
|
27
22
|
}
|
|
28
23
|
}};
|
|
29
24
|
`;
|
|
30
|
-
|
|
25
|
+
export default IconButton;
|
package/dist/IconButton/index.js
CHANGED
|
@@ -1,8 +1 @@
|
|
|
1
|
-
|
|
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
|
+
export { default } from "./IconButton";
|
package/dist/Input/Input.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
2
|
var t = {};
|
|
4
3
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -10,16 +9,12 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
10
9
|
}
|
|
11
10
|
return t;
|
|
12
11
|
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
};
|
|
16
|
-
|
|
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) => {
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import styled from "styled-components";
|
|
14
|
+
import { forwardRef } from "react";
|
|
15
|
+
const Input = styled(forwardRef((_a, ref) => {
|
|
21
16
|
var { className, size = "sm", variant = "outlined", width } = _a, rest = __rest(_a, ["className", "size", "variant", "width"]);
|
|
22
|
-
return (
|
|
17
|
+
return _jsx("input", Object.assign({ ref: ref, className: className }, rest));
|
|
23
18
|
})) `
|
|
24
19
|
font-family: ${({ theme }) => theme.typography.fontFamily};
|
|
25
20
|
pointer-events: "all";
|
|
@@ -146,4 +141,4 @@ const Input = (0, styled_components_1.default)((0, react_1.forwardRef)((_a, ref)
|
|
|
146
141
|
cursor: pointer;
|
|
147
142
|
}
|
|
148
143
|
`;
|
|
149
|
-
|
|
144
|
+
export default Input;
|
package/dist/Input/index.js
CHANGED
|
@@ -1,8 +1 @@
|
|
|
1
|
-
|
|
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
|
+
export { default } from "./Input";
|
package/dist/Modal/Modal.js
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
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) `
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
import { X } from "lucide-react";
|
|
4
|
+
import { FloatingFocusManager, FloatingOverlay, FloatingPortal, useFloating, } from "@floating-ui/react";
|
|
5
|
+
const StyledOverlay = styled(FloatingOverlay) `
|
|
11
6
|
background-color: rgba(0, 0, 0, 0.3);
|
|
12
7
|
position: fixed;
|
|
13
8
|
inset: 0;
|
|
@@ -22,7 +17,7 @@ const StyledOverlay = (0, styled_components_1.default)(react_1.FloatingOverlay)
|
|
|
22
17
|
}
|
|
23
18
|
}
|
|
24
19
|
`;
|
|
25
|
-
const StyledContent =
|
|
20
|
+
const StyledContent = styled.div `
|
|
26
21
|
background-color: ${({ theme }) => theme.name === "DARK"
|
|
27
22
|
? theme.palette.background.default
|
|
28
23
|
: theme.palette.background.default};
|
|
@@ -59,40 +54,40 @@ const StyledContent = styled_components_1.default.div `
|
|
|
59
54
|
}
|
|
60
55
|
}
|
|
61
56
|
`;
|
|
62
|
-
const StyledInnerContent =
|
|
57
|
+
const StyledInnerContent = styled.div `
|
|
63
58
|
display: flex;
|
|
64
59
|
flex-direction: column;
|
|
65
60
|
|
|
66
61
|
overflow-y: auto;
|
|
67
62
|
padding: 25px;
|
|
68
63
|
`;
|
|
69
|
-
const StyledClose =
|
|
64
|
+
const StyledClose = styled.div `
|
|
70
65
|
position: absolute;
|
|
71
66
|
top: 15px;
|
|
72
67
|
right: 15px;
|
|
73
68
|
|
|
74
69
|
color: ${(props) => props.theme.palette.text.secondary};
|
|
75
70
|
`;
|
|
76
|
-
const StyledButton =
|
|
71
|
+
const StyledButton = styled.button `
|
|
77
72
|
background-color: transparent;
|
|
78
73
|
border: none;
|
|
79
74
|
outline: none;
|
|
80
75
|
cursor: pointer;
|
|
81
76
|
padding: 0;
|
|
82
77
|
`;
|
|
83
|
-
const Title =
|
|
78
|
+
const Title = styled.h1 `
|
|
84
79
|
font-size: 20px;
|
|
85
80
|
font-weight: 600;
|
|
86
81
|
margin: 0px;
|
|
87
82
|
`;
|
|
88
|
-
const SubTitle =
|
|
83
|
+
const SubTitle = styled.h2 `
|
|
89
84
|
font-size: 14px;
|
|
90
85
|
font-weight: 500;
|
|
91
86
|
margin: 0px;
|
|
92
87
|
color: ${(props) => props.theme.palette.text.secondary};
|
|
93
88
|
`;
|
|
94
89
|
const Modal = ({ children, open = false, onClose, style = {}, showCloseButton = false, FocusProps = {}, }) => {
|
|
95
|
-
const { refs, floatingStyles, context } =
|
|
90
|
+
const { refs, floatingStyles, context } = useFloating({
|
|
96
91
|
open,
|
|
97
92
|
onOpenChange: (isOpen) => {
|
|
98
93
|
if (!isOpen) {
|
|
@@ -103,8 +98,8 @@ const Modal = ({ children, open = false, onClose, style = {}, showCloseButton =
|
|
|
103
98
|
const handleMouseDown = () => {
|
|
104
99
|
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
105
100
|
};
|
|
106
|
-
return ((
|
|
101
|
+
return (_jsx(FloatingPortal, { preserveTabOrder: true, children: open && (_jsx(StyledOverlay, { className: "mf-ModalOverlay", lockScroll: true, children: _jsx(FloatingFocusManager, Object.assign({ context: context, modal: true }, FocusProps, { children: _jsxs(StyledContent, Object.assign({ style: style, className: "mf-Modal", ref: refs.setFloating }, floatingStyles, { children: [showCloseButton && (_jsx(StyledClose, { children: _jsx(StyledButton, { onMouseDown: handleMouseDown, children: _jsx(X, { size: 18 }) }) })), _jsx(StyledInnerContent, { children: children })] })) })) })) }));
|
|
107
102
|
};
|
|
108
103
|
Modal.Title = Title;
|
|
109
104
|
Modal.SubTitle = SubTitle;
|
|
110
|
-
|
|
105
|
+
export default Modal;
|
package/dist/Modal/index.js
CHANGED
|
@@ -1,8 +1 @@
|
|
|
1
|
-
|
|
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; } });
|
|
1
|
+
export { default } from "./Modal";
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const styled_components_1 = require("styled-components");
|
|
4
|
-
const GlobalStyle = (0, styled_components_1.createGlobalStyle) `
|
|
1
|
+
import { createGlobalStyle } from "styled-components";
|
|
2
|
+
const GlobalStyle = createGlobalStyle `
|
|
5
3
|
* {
|
|
6
4
|
box-sizing: border-box;
|
|
7
5
|
}
|
|
@@ -50,4 +48,4 @@ const GlobalStyle = (0, styled_components_1.createGlobalStyle) `
|
|
|
50
48
|
color: unset;
|
|
51
49
|
}
|
|
52
50
|
`;
|
|
53
|
-
|
|
51
|
+
export default GlobalStyle;
|
|
@@ -1,29 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
const deepmerge_1 = __importDefault(require("deepmerge"));
|
|
9
|
-
const styled_components_1 = require("styled-components");
|
|
10
|
-
const theme_1 = __importDefault(require("../theme"));
|
|
11
|
-
const react_1 = require("react");
|
|
12
|
-
const GlobalStyle_1 = __importDefault(require("./GlobalStyle"));
|
|
13
|
-
exports.MonolithUIContext = (0, react_1.createContext)(undefined);
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import merge from "deepmerge";
|
|
3
|
+
import { ThemeProvider } from "styled-components";
|
|
4
|
+
import getTheme from "../theme";
|
|
5
|
+
import { createContext, useState } from "react";
|
|
6
|
+
import GlobalStyle from "./GlobalStyle";
|
|
7
|
+
export const MonolithUIContext = createContext(undefined);
|
|
14
8
|
const MonolithUIProvider = ({ children, theme = {}, defaultColorScheme = "dark", }) => {
|
|
15
|
-
const [colorScheme, setColorScheme] =
|
|
9
|
+
const [colorScheme, setColorScheme] = useState(defaultColorScheme);
|
|
16
10
|
const toggleColorScheme = () => {
|
|
17
11
|
setColorScheme(colorScheme === "light" ? "dark" : "light");
|
|
18
12
|
};
|
|
19
|
-
const defaultTheme = (
|
|
13
|
+
const defaultTheme = getTheme(colorScheme);
|
|
20
14
|
// override default theme with the provided theme
|
|
21
|
-
const _theme = (
|
|
22
|
-
return ((
|
|
15
|
+
const _theme = merge(defaultTheme, theme);
|
|
16
|
+
return (_jsx(MonolithUIContext.Provider, { value: {
|
|
23
17
|
theme: _theme,
|
|
24
18
|
colorScheme,
|
|
25
19
|
toggleColorScheme,
|
|
26
20
|
setColorScheme,
|
|
27
|
-
}, children: (
|
|
21
|
+
}, children: _jsxs(ThemeProvider, { theme: _theme, children: [_jsx(GlobalStyle, { theme: _theme }), children] }) }));
|
|
28
22
|
};
|
|
29
|
-
|
|
23
|
+
export default MonolithUIProvider;
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getTheme = exports.useMonolithUITheme = exports.default = void 0;
|
|
7
|
-
var MonolithUIProvider_1 = require("./MonolithUIProvider");
|
|
8
|
-
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(MonolithUIProvider_1).default; } });
|
|
9
|
-
var useMonolithUITheme_1 = require("./useMonolithUITheme");
|
|
10
|
-
Object.defineProperty(exports, "useMonolithUITheme", { enumerable: true, get: function () { return __importDefault(useMonolithUITheme_1).default; } });
|
|
11
|
-
var theme_1 = require("../theme");
|
|
12
|
-
Object.defineProperty(exports, "getTheme", { enumerable: true, get: function () { return __importDefault(theme_1).default; } });
|
|
1
|
+
export { default } from "./MonolithUIProvider";
|
|
2
|
+
export { default as useMonolithUITheme } from "./useMonolithUITheme";
|
|
3
|
+
export { default as getTheme } from "../theme";
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const react_1 = require("react");
|
|
4
|
-
const MonolithUIProvider_1 = require("./MonolithUIProvider");
|
|
1
|
+
import { useContext } from "react";
|
|
2
|
+
import { MonolithUIContext } from "./MonolithUIProvider";
|
|
5
3
|
const useMonolithUITheme = () => {
|
|
6
|
-
const context =
|
|
4
|
+
const context = useContext(MonolithUIContext);
|
|
7
5
|
if (context === undefined) {
|
|
8
6
|
throw new Error("hook must be used within a MonolithUIProvider");
|
|
9
7
|
}
|
|
10
8
|
return context;
|
|
11
9
|
};
|
|
12
|
-
|
|
10
|
+
export default useMonolithUITheme;
|
package/dist/Pill/Pill.js
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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 StyledButton = styled_components_1.default.button `
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
import { X } from "lucide-react";
|
|
4
|
+
const StyledButton = styled.button `
|
|
10
5
|
background-color: transparent;
|
|
11
6
|
border: none;
|
|
12
7
|
cursor: pointer;
|
|
@@ -19,19 +14,19 @@ const StyledButton = styled_components_1.default.button `
|
|
|
19
14
|
transition: color 0.2s;
|
|
20
15
|
padding-inline-end: 5px;
|
|
21
16
|
`;
|
|
22
|
-
const Pill = (
|
|
17
|
+
const Pill = styled(({ className, children, size = "md", showRemoveIcon = true, onRemove, }) => {
|
|
23
18
|
const handleRemove = (e) => {
|
|
24
19
|
e.preventDefault();
|
|
25
20
|
e.stopPropagation();
|
|
26
21
|
onRemove === null || onRemove === void 0 ? void 0 : onRemove();
|
|
27
22
|
};
|
|
28
|
-
return ((
|
|
23
|
+
return (_jsxs("div", { className: className, onClick: (e) => {
|
|
29
24
|
e.preventDefault();
|
|
30
25
|
e.stopPropagation();
|
|
31
|
-
}, children: [(
|
|
26
|
+
}, children: [_jsx("span", { className: "pill-content", children: children }), showRemoveIcon && (_jsx(StyledButton, { onClick: handleRemove, onMouseDown: (e) => {
|
|
32
27
|
e.preventDefault();
|
|
33
28
|
e.stopPropagation();
|
|
34
|
-
}, children: (
|
|
29
|
+
}, children: _jsx(X, {}) }))] }));
|
|
35
30
|
}) `
|
|
36
31
|
user-select: none;
|
|
37
32
|
display: flex;
|
|
@@ -149,4 +144,4 @@ const Pill = (0, styled_components_1.default)(({ className, children, size = "md
|
|
|
149
144
|
}};
|
|
150
145
|
}
|
|
151
146
|
`;
|
|
152
|
-
|
|
147
|
+
export default Pill;
|
package/dist/Pill/index.js
CHANGED
|
@@ -1,8 +1 @@
|
|
|
1
|
-
|
|
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 Pill_1 = require("./Pill");
|
|
8
|
-
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(Pill_1).default; } });
|
|
1
|
+
export { default } from "./Pill";
|