@monolith-forensics/monolith-ui 1.1.0 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -1
- package/Button/Button.tsx +0 -382
- package/Button/index.ts +0 -2
- package/Calendar/Calendar.tsx +0 -376
- package/Calendar/CalendarStyles.tsx +0 -180
- package/Calendar/calendarHelpers.ts +0 -196
- package/Calendar/index.ts +0 -1
- package/CheckBox/CheckBox.tsx +0 -61
- package/CheckBox/index.ts +0 -1
- package/DateInput/DateInput.tsx +0 -717
- package/DateInput/index.ts +0 -1
- package/DropDownMenu/DropDownMenu.tsx +0 -402
- package/DropDownMenu/index.ts +0 -1
- package/Error/Error.tsx +0 -51
- package/Error/index.ts +0 -1
- package/FieldLabel/FieldLabel.tsx +0 -155
- package/FieldLabel/index.ts +0 -1
- package/FileInputField/FileInputField.tsx +0 -179
- package/FileInputField/index.ts +0 -1
- package/Flyout/Flyout.tsx +0 -172
- package/Flyout/FlyoutHeader.tsx +0 -14
- package/Flyout/FlyoutTitle.tsx +0 -10
- package/Flyout/index.ts +0 -3
- package/FormSection/FormSection.tsx +0 -71
- package/FormSection/index.ts +0 -1
- package/Grid/Grid.tsx +0 -18
- package/Grid/index.ts +0 -1
- package/IconButton/IconButton.tsx +0 -27
- package/IconButton/index.ts +0 -1
- package/Input/Input.tsx +0 -164
- package/Input/index.ts +0 -1
- package/Modal/Modal.tsx +0 -172
- package/Modal/index.ts +0 -1
- package/Pill/Pill.tsx +0 -174
- package/Pill/index.ts +0 -1
- package/SelectBox/SelectBox.tsx +0 -745
- package/SelectBox/index.ts +0 -1
- package/Switch/Switch.tsx +0 -204
- package/Switch/index.ts +0 -1
- package/TagBox/TagBox.tsx +0 -694
- package/TagBox/TagBoxStyles.tsx +0 -116
- package/TagBox/index.ts +0 -1
- package/TextArea/TextArea.tsx +0 -92
- package/TextArea/index.ts +0 -1
- package/TextAreaInput/TextAreaInput.tsx +0 -46
- package/TextAreaInput/index.ts +0 -1
- package/TextInput/TextInput.tsx +0 -48
- package/TextInput/index.ts +0 -1
- package/Tooltip/Tooltip.tsx +0 -68
- package/Tooltip/index.ts +0 -1
- package/core/ArrowButton.tsx +0 -51
- package/core/ClearButton.tsx +0 -51
- package/core/MonolithThemeProvider.js +0 -16
- package/core/StyledContent.tsx +0 -50
- package/core/StyledFloatContainer.tsx +0 -7
- package/core/Types/Size.ts +0 -3
- package/core/Types/Variant.ts +0 -10
- package/core/index.ts +0 -6
- package/index.ts +0 -22
- package/theme/breakpoints.js +0 -11
- package/theme/components.js +0 -138
- package/theme/index.js +0 -76
- package/theme/shadows.js +0 -33
- package/theme/typography.js +0 -58
- package/theme/variants.js +0 -234
- package/tsconfig.json +0 -109
package/TagBox/TagBoxStyles.tsx
DELETED
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import styled from "styled-components";
|
|
2
|
-
import { XIcon } from "lucide-react";
|
|
3
|
-
|
|
4
|
-
export const TagBoxContainer = styled.div`
|
|
5
|
-
width: 100%;
|
|
6
|
-
`;
|
|
7
|
-
|
|
8
|
-
export const TagBoxInner = styled.div`
|
|
9
|
-
height: 33px;
|
|
10
|
-
display: flex;
|
|
11
|
-
border: 1px solid ${(props) => props.theme.palette.input.border};
|
|
12
|
-
color: ${(props) => props.theme.palette.text.primary};
|
|
13
|
-
outline: none;
|
|
14
|
-
padding: 8px 8px;
|
|
15
|
-
width: 100%;
|
|
16
|
-
background-color: ${(props) => props.theme.palette.input.background};
|
|
17
|
-
border-radius: 5px;
|
|
18
|
-
transition: border 0.1s ease-in-out;
|
|
19
|
-
overflow-x: hidden;
|
|
20
|
-
&:focus {
|
|
21
|
-
border: 1px solid ${(props) => props.theme.palette.primary.main};
|
|
22
|
-
}
|
|
23
|
-
`;
|
|
24
|
-
|
|
25
|
-
export const TagsContainer = styled.div`
|
|
26
|
-
display: flex;
|
|
27
|
-
-webkit-box-align: center;
|
|
28
|
-
align-items: center;
|
|
29
|
-
flex-wrap: nowrap;
|
|
30
|
-
margin-left: calc(-5px);
|
|
31
|
-
box-sizing: border-box;
|
|
32
|
-
`;
|
|
33
|
-
|
|
34
|
-
export const TagBoxInput = styled.input`
|
|
35
|
-
border: none;
|
|
36
|
-
outline: none;
|
|
37
|
-
width: 100%;
|
|
38
|
-
min-width: 50px;
|
|
39
|
-
background-color: transparent;
|
|
40
|
-
color: ${(props) => props.theme.palette.text.primary};
|
|
41
|
-
&:focus {
|
|
42
|
-
border: none;
|
|
43
|
-
outline: none;
|
|
44
|
-
}
|
|
45
|
-
`;
|
|
46
|
-
|
|
47
|
-
export const Tag = styled.div`
|
|
48
|
-
display: flex;
|
|
49
|
-
-webkit-box-align: center;
|
|
50
|
-
align-items: center;
|
|
51
|
-
background-color: rgb(26, 27, 30);
|
|
52
|
-
color: rgb(193, 194, 197);
|
|
53
|
-
height: 22px;
|
|
54
|
-
padding-left: 10px;
|
|
55
|
-
padding-right: 0px;
|
|
56
|
-
font-weight: 500;
|
|
57
|
-
font-size: 12px;
|
|
58
|
-
border-radius: 4px;
|
|
59
|
-
cursor: default;
|
|
60
|
-
user-select: none;
|
|
61
|
-
max-width: 120px;
|
|
62
|
-
margin: calc(3px) calc(5px);
|
|
63
|
-
`;
|
|
64
|
-
|
|
65
|
-
export const TagText = styled.div`
|
|
66
|
-
display: flex;
|
|
67
|
-
-webkit-box-align: center;
|
|
68
|
-
align-items: center;
|
|
69
|
-
background-color: rgb(26, 27, 30);
|
|
70
|
-
color: rgb(193, 194, 197);
|
|
71
|
-
height: 22px;
|
|
72
|
-
padding-right: 0px;
|
|
73
|
-
font-weight: 500;
|
|
74
|
-
font-size: 12px;
|
|
75
|
-
border-radius: 4px;
|
|
76
|
-
cursor: default;
|
|
77
|
-
user-select: none;
|
|
78
|
-
max-width: 75px;
|
|
79
|
-
white-space: nowrap;
|
|
80
|
-
overflow: hidden;
|
|
81
|
-
text-overflow: ellipsis;
|
|
82
|
-
`;
|
|
83
|
-
|
|
84
|
-
export const TagKillButton = styled(XIcon)`
|
|
85
|
-
-webkit-tap-highlight-color: transparent;
|
|
86
|
-
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
|
|
87
|
-
Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
|
|
88
|
-
cursor: pointer;
|
|
89
|
-
appearance: none;
|
|
90
|
-
text-align: left;
|
|
91
|
-
text-decoration: none;
|
|
92
|
-
box-sizing: border-box;
|
|
93
|
-
border: 1px solid transparent;
|
|
94
|
-
background-color: transparent;
|
|
95
|
-
position: relative;
|
|
96
|
-
height: 19px;
|
|
97
|
-
min-height: 19px;
|
|
98
|
-
width: 22px;
|
|
99
|
-
min-width: 19px;
|
|
100
|
-
border-radius: 2px;
|
|
101
|
-
line-height: 1;
|
|
102
|
-
display: flex;
|
|
103
|
-
-webkit-box-align: center;
|
|
104
|
-
align-items: center;
|
|
105
|
-
-webkit-box-pack: center;
|
|
106
|
-
justify-content: center;
|
|
107
|
-
color: rgb(193, 194, 197);
|
|
108
|
-
padding: 0px 3px;
|
|
109
|
-
&:hover {
|
|
110
|
-
color: rgb(255, 255, 255);
|
|
111
|
-
}
|
|
112
|
-
`;
|
|
113
|
-
|
|
114
|
-
export const TagBoxOptions = styled.div``;
|
|
115
|
-
|
|
116
|
-
export const TagBoxOption = styled.div``;
|
package/TagBox/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "./TagBox";
|
package/TextArea/TextArea.tsx
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import styled from "styled-components";
|
|
2
|
-
import TextareaAutosize from "react-textarea-autosize";
|
|
3
|
-
import { Size, Variant } from "../core";
|
|
4
|
-
|
|
5
|
-
interface TextAreaProps {
|
|
6
|
-
ref?: React.Ref<HTMLTextAreaElement>;
|
|
7
|
-
className?: string;
|
|
8
|
-
size?: Size;
|
|
9
|
-
variant?: Variant;
|
|
10
|
-
width?: string | number | null | undefined;
|
|
11
|
-
style?: React.CSSProperties;
|
|
12
|
-
placeholder?: string;
|
|
13
|
-
onChange?: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
14
|
-
onKeyUp?: (e: React.KeyboardEvent<HTMLTextAreaElement>) => void;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const TextArea = styled(TextareaAutosize)<TextAreaProps>`
|
|
18
|
-
outline: none;
|
|
19
|
-
resize: none;
|
|
20
|
-
padding: 10px;
|
|
21
|
-
width: 100%;
|
|
22
|
-
height: 100%;
|
|
23
|
-
|
|
24
|
-
font-family: ${({ theme }) => theme.typography.fontFamily};
|
|
25
|
-
color: ${(props) => props.theme.palette.text.primary};
|
|
26
|
-
font-size: ${({ size }) =>
|
|
27
|
-
size === "xs"
|
|
28
|
-
? "11px"
|
|
29
|
-
: size === "sm"
|
|
30
|
-
? "13px"
|
|
31
|
-
: size === "md"
|
|
32
|
-
? "15px"
|
|
33
|
-
: size === "lg"
|
|
34
|
-
? "17px"
|
|
35
|
-
: size === "xl"
|
|
36
|
-
? "19px"
|
|
37
|
-
: "11px"};
|
|
38
|
-
|
|
39
|
-
background-color: ${({ theme, variant }) => {
|
|
40
|
-
switch (variant) {
|
|
41
|
-
case "contained":
|
|
42
|
-
return theme.palette.input.background;
|
|
43
|
-
case "filled":
|
|
44
|
-
return theme.palette.input.background;
|
|
45
|
-
case "outlined":
|
|
46
|
-
return theme.palette.input.background;
|
|
47
|
-
case "text":
|
|
48
|
-
return "transparent";
|
|
49
|
-
default:
|
|
50
|
-
return theme.palette.input.background;
|
|
51
|
-
}
|
|
52
|
-
}};
|
|
53
|
-
|
|
54
|
-
border-radius: 4px;
|
|
55
|
-
transition: border 0.1s ease-in-out;
|
|
56
|
-
border: 1px solid
|
|
57
|
-
${({ theme, variant }) => {
|
|
58
|
-
switch (variant) {
|
|
59
|
-
case "contained":
|
|
60
|
-
return "transparent";
|
|
61
|
-
case "filled":
|
|
62
|
-
return "transparent";
|
|
63
|
-
case "outlined":
|
|
64
|
-
return theme.palette.input.border;
|
|
65
|
-
case "text":
|
|
66
|
-
return "transparent";
|
|
67
|
-
default:
|
|
68
|
-
return theme.palette.input.border;
|
|
69
|
-
}
|
|
70
|
-
}};
|
|
71
|
-
|
|
72
|
-
&:focus {
|
|
73
|
-
border: 1px solid ${(props) => props.theme.palette.primary.main};
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
::placeholder {
|
|
77
|
-
font-size: ${({ size }) =>
|
|
78
|
-
size === "xs"
|
|
79
|
-
? "10px"
|
|
80
|
-
: size === "sm"
|
|
81
|
-
? "12px"
|
|
82
|
-
: size === "md"
|
|
83
|
-
? "14px"
|
|
84
|
-
: size === "lg"
|
|
85
|
-
? "16px"
|
|
86
|
-
: size === "xl"
|
|
87
|
-
? "18px"
|
|
88
|
-
: "10px"};
|
|
89
|
-
}
|
|
90
|
-
`;
|
|
91
|
-
|
|
92
|
-
export default TextArea;
|
package/TextArea/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "./TextArea";
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { Size } from "../core";
|
|
2
|
-
import { TextArea, FieldLabel } from "..";
|
|
3
|
-
|
|
4
|
-
interface TextAreaInputProps {
|
|
5
|
-
label?: string;
|
|
6
|
-
error?: string;
|
|
7
|
-
required?: boolean;
|
|
8
|
-
colSpan?: number;
|
|
9
|
-
size?: Size;
|
|
10
|
-
description?: string;
|
|
11
|
-
inputRef?: React.RefObject<HTMLTextAreaElement> | null;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const TextAreaInput = ({
|
|
15
|
-
label,
|
|
16
|
-
error,
|
|
17
|
-
required,
|
|
18
|
-
colSpan = 1,
|
|
19
|
-
size = "sm",
|
|
20
|
-
description,
|
|
21
|
-
inputRef = null,
|
|
22
|
-
...other
|
|
23
|
-
}: TextAreaInputProps) => {
|
|
24
|
-
return (
|
|
25
|
-
<div
|
|
26
|
-
style={{
|
|
27
|
-
gridColumn: `span ${colSpan}`,
|
|
28
|
-
height: "fit-content",
|
|
29
|
-
}}
|
|
30
|
-
>
|
|
31
|
-
{label && (
|
|
32
|
-
<FieldLabel
|
|
33
|
-
error={error}
|
|
34
|
-
asterisk={required}
|
|
35
|
-
size={size}
|
|
36
|
-
description={description}
|
|
37
|
-
>
|
|
38
|
-
{label}
|
|
39
|
-
</FieldLabel>
|
|
40
|
-
)}
|
|
41
|
-
<TextArea ref={inputRef} size={size} {...other} />
|
|
42
|
-
</div>
|
|
43
|
-
);
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
export default TextAreaInput;
|
package/TextAreaInput/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "./TextAreaInput";
|
package/TextInput/TextInput.tsx
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { FieldLabel } from "..";
|
|
2
|
-
import Input, { InputProps } from "../Input/Input";
|
|
3
|
-
import { Size } from "../core";
|
|
4
|
-
|
|
5
|
-
interface TextInputProps extends InputProps {
|
|
6
|
-
label?: string;
|
|
7
|
-
error?: string;
|
|
8
|
-
required?: boolean;
|
|
9
|
-
size?: Size;
|
|
10
|
-
colSpan?: number;
|
|
11
|
-
description?: string;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const TextInput: React.FC<TextInputProps> = ({
|
|
15
|
-
label,
|
|
16
|
-
error,
|
|
17
|
-
required,
|
|
18
|
-
colSpan = 1,
|
|
19
|
-
description,
|
|
20
|
-
size,
|
|
21
|
-
...rest
|
|
22
|
-
}) => {
|
|
23
|
-
return (
|
|
24
|
-
<div
|
|
25
|
-
style={{
|
|
26
|
-
gridColumn: `span ${colSpan}`,
|
|
27
|
-
display: "flex",
|
|
28
|
-
flexDirection: "column",
|
|
29
|
-
justifyContent: "space-between",
|
|
30
|
-
width: "100%",
|
|
31
|
-
}}
|
|
32
|
-
>
|
|
33
|
-
{label && (
|
|
34
|
-
<FieldLabel
|
|
35
|
-
error={error}
|
|
36
|
-
asterisk={required}
|
|
37
|
-
size={size}
|
|
38
|
-
description={description}
|
|
39
|
-
>
|
|
40
|
-
{label}
|
|
41
|
-
</FieldLabel>
|
|
42
|
-
)}
|
|
43
|
-
<Input size={size} {...rest} />
|
|
44
|
-
</div>
|
|
45
|
-
);
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
export default TextInput;
|
package/TextInput/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "./TextInput";
|
package/Tooltip/Tooltip.tsx
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import styled from "styled-components";
|
|
2
|
-
import * as RadixTooltip from "@radix-ui/react-tooltip";
|
|
3
|
-
import { ReactNode } from "react";
|
|
4
|
-
|
|
5
|
-
interface TooltipProps {
|
|
6
|
-
className?: string;
|
|
7
|
-
children?: ReactNode;
|
|
8
|
-
content?: ReactNode;
|
|
9
|
-
side?: "top" | "right" | "bottom" | "left";
|
|
10
|
-
sideOffset?: number;
|
|
11
|
-
align?: "start" | "center" | "end";
|
|
12
|
-
delayDuration?: number;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const Tooltip = styled(
|
|
16
|
-
({
|
|
17
|
-
className,
|
|
18
|
-
children,
|
|
19
|
-
content,
|
|
20
|
-
side = "right",
|
|
21
|
-
sideOffset = 15,
|
|
22
|
-
align = "start",
|
|
23
|
-
delayDuration = 800,
|
|
24
|
-
}: TooltipProps) => {
|
|
25
|
-
if (!content) return children;
|
|
26
|
-
|
|
27
|
-
return (
|
|
28
|
-
<RadixTooltip.Provider
|
|
29
|
-
delayDuration={delayDuration || 800}
|
|
30
|
-
skipDelayDuration={0}
|
|
31
|
-
disableHoverableContent
|
|
32
|
-
>
|
|
33
|
-
<RadixTooltip.Root>
|
|
34
|
-
<RadixTooltip.Trigger asChild>{children}</RadixTooltip.Trigger>
|
|
35
|
-
<RadixTooltip.Portal>
|
|
36
|
-
<RadixTooltip.Content
|
|
37
|
-
className={className}
|
|
38
|
-
side={side || "right"}
|
|
39
|
-
sideOffset={sideOffset || 15}
|
|
40
|
-
align={align || "start"}
|
|
41
|
-
onClick={(e) => e.stopPropagation()}
|
|
42
|
-
>
|
|
43
|
-
{content}
|
|
44
|
-
</RadixTooltip.Content>
|
|
45
|
-
</RadixTooltip.Portal>
|
|
46
|
-
</RadixTooltip.Root>
|
|
47
|
-
</RadixTooltip.Provider>
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
)`
|
|
51
|
-
pointer-events: none;
|
|
52
|
-
z-index: 999999;
|
|
53
|
-
background-color: ${({ theme }) => theme.palette.background.default};
|
|
54
|
-
padding: 15px;
|
|
55
|
-
border-radius: 5px;
|
|
56
|
-
border: 1px solid ${({ theme }) => theme.palette.divider};
|
|
57
|
-
font-size: 0.75rem;
|
|
58
|
-
|
|
59
|
-
white-space: pre-wrap;
|
|
60
|
-
|
|
61
|
-
.title {
|
|
62
|
-
font-size: 0.85rem;
|
|
63
|
-
font-weight: 600;
|
|
64
|
-
margin-bottom: 5px;
|
|
65
|
-
}
|
|
66
|
-
`;
|
|
67
|
-
|
|
68
|
-
export default Tooltip;
|
package/Tooltip/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "./Tooltip";
|
package/core/ArrowButton.tsx
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { ChevronDownIcon } from "lucide-react";
|
|
2
|
-
import styled from "styled-components";
|
|
3
|
-
|
|
4
|
-
interface ArrowIconProps {
|
|
5
|
-
className?: string;
|
|
6
|
-
[key: string]: React.SVGAttributes<SVGSVGElement> | any;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
const ArrowIcon = styled(({ className, ...props }: ArrowIconProps) => (
|
|
10
|
-
<div className={className} {...props}>
|
|
11
|
-
<ChevronDownIcon size={16} />
|
|
12
|
-
</div>
|
|
13
|
-
))`
|
|
14
|
-
color: ${(props) => props.theme.palette.text.secondary};
|
|
15
|
-
transition: transform 0.2s ease-in-out;
|
|
16
|
-
transform: rotate(0deg);
|
|
17
|
-
will-change: transform;
|
|
18
|
-
|
|
19
|
-
display: flex;
|
|
20
|
-
flex-direction: column;
|
|
21
|
-
align-items: center;
|
|
22
|
-
justify-content: center;
|
|
23
|
-
`;
|
|
24
|
-
|
|
25
|
-
interface ArrowButtonProps {
|
|
26
|
-
className?: string;
|
|
27
|
-
[key: string]: React.ButtonHTMLAttributes<HTMLButtonElement> | any;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
const ArrowButton = styled(({ className, ...props }: ArrowButtonProps) => (
|
|
31
|
-
<button
|
|
32
|
-
className={className}
|
|
33
|
-
{...props}
|
|
34
|
-
tabIndex={-1}
|
|
35
|
-
data-default-btn={true}
|
|
36
|
-
>
|
|
37
|
-
<ArrowIcon />
|
|
38
|
-
</button>
|
|
39
|
-
))`
|
|
40
|
-
position: absolute;
|
|
41
|
-
right: 0;
|
|
42
|
-
height: 100%;
|
|
43
|
-
padding-inline: 10px;
|
|
44
|
-
background: none;
|
|
45
|
-
border: none;
|
|
46
|
-
cursor: pointer;
|
|
47
|
-
margin: 0;
|
|
48
|
-
outline: none;
|
|
49
|
-
`;
|
|
50
|
-
|
|
51
|
-
export default ArrowButton;
|
package/core/ClearButton.tsx
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { X } from "lucide-react";
|
|
2
|
-
import styled from "styled-components";
|
|
3
|
-
|
|
4
|
-
interface ClearIconProps {
|
|
5
|
-
className?: string;
|
|
6
|
-
[key: string]: React.SVGAttributes<SVGSVGElement> | any;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
const ClearIcon = styled(({ className, ...props }: ClearIconProps) => (
|
|
10
|
-
<div className={className} {...props}>
|
|
11
|
-
<X size={16} />
|
|
12
|
-
</div>
|
|
13
|
-
))`
|
|
14
|
-
color: ${(props) => props.theme.palette.text.secondary};
|
|
15
|
-
transition: transform 0.2s ease-in-out;
|
|
16
|
-
transform: rotate(0deg);
|
|
17
|
-
will-change: transform;
|
|
18
|
-
|
|
19
|
-
display: flex;
|
|
20
|
-
flex-direction: column;
|
|
21
|
-
align-items: center;
|
|
22
|
-
justify-content: center;
|
|
23
|
-
`;
|
|
24
|
-
|
|
25
|
-
interface ClearButtonProps {
|
|
26
|
-
className?: string;
|
|
27
|
-
[key: string]: React.ButtonHTMLAttributes<HTMLButtonElement> | any;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
const ClearButton = styled(({ className, ...props }: ClearButtonProps) => (
|
|
31
|
-
<button
|
|
32
|
-
className={className}
|
|
33
|
-
{...props}
|
|
34
|
-
tabIndex={-1}
|
|
35
|
-
data-default-btn={true}
|
|
36
|
-
>
|
|
37
|
-
<ClearIcon />
|
|
38
|
-
</button>
|
|
39
|
-
))`
|
|
40
|
-
position: absolute;
|
|
41
|
-
right: 0;
|
|
42
|
-
height: 100%;
|
|
43
|
-
padding-inline: 10px;
|
|
44
|
-
background: none;
|
|
45
|
-
border: none;
|
|
46
|
-
cursor: pointer;
|
|
47
|
-
margin: 0;
|
|
48
|
-
outline: none;
|
|
49
|
-
`;
|
|
50
|
-
|
|
51
|
-
export default ClearButton;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ThemeProvider } from "styled-components";
|
|
2
|
-
|
|
3
|
-
import variants from "@monolith-ui/theme/variants";
|
|
4
|
-
|
|
5
|
-
export const MonolithThemeProvider = ({ children, theme }) => {
|
|
6
|
-
let selectedTheme = theme
|
|
7
|
-
? variants.find((variant) => variant.name === theme)
|
|
8
|
-
: variants[1]; // Default to dark theme
|
|
9
|
-
|
|
10
|
-
if (!selectedTheme) {
|
|
11
|
-
console.warn(new Error(`The theme ${theme} is not valid`));
|
|
12
|
-
selectedTheme = variants[1]; // Default to dark theme
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
return <ThemeProvider theme={selectedTheme}>{children}</ThemeProvider>;
|
|
16
|
-
};
|
package/core/StyledContent.tsx
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import styled from "styled-components";
|
|
2
|
-
import Variant from "./Types/Variant";
|
|
3
|
-
|
|
4
|
-
interface StyledContentProps {
|
|
5
|
-
maxDropdownHeight?: number | string;
|
|
6
|
-
variant?: Variant;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
const StyledContent = styled.div<StyledContentProps>`
|
|
10
|
-
position: relative;
|
|
11
|
-
display: flex;
|
|
12
|
-
flex-direction: column;
|
|
13
|
-
overflow-y: hidden;
|
|
14
|
-
overflow-x: hidden;
|
|
15
|
-
|
|
16
|
-
max-height: ${({ maxDropdownHeight }) =>
|
|
17
|
-
Number.isInteger(maxDropdownHeight)
|
|
18
|
-
? `${maxDropdownHeight}px`
|
|
19
|
-
: maxDropdownHeight || "250px"};
|
|
20
|
-
|
|
21
|
-
background-color: ${({ theme, variant }) => {
|
|
22
|
-
switch (variant) {
|
|
23
|
-
case "filled":
|
|
24
|
-
return theme.palette.input.background;
|
|
25
|
-
case "outlined":
|
|
26
|
-
return theme.palette.input.background;
|
|
27
|
-
case "text":
|
|
28
|
-
return "transparent";
|
|
29
|
-
default:
|
|
30
|
-
return theme.palette.input.background;
|
|
31
|
-
}
|
|
32
|
-
}};
|
|
33
|
-
|
|
34
|
-
border-radius: 5px;
|
|
35
|
-
border: 1px solid ${(props) => props.theme.palette.divider};
|
|
36
|
-
padding: 5px;
|
|
37
|
-
animation-duration: 400ms;
|
|
38
|
-
animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
|
|
39
|
-
will-change: transform, opacity;
|
|
40
|
-
|
|
41
|
-
&[data-empty="true"] {
|
|
42
|
-
display: none;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
&[data-scroll-active="true"] {
|
|
46
|
-
padding-right: 5px;
|
|
47
|
-
}
|
|
48
|
-
`;
|
|
49
|
-
|
|
50
|
-
export default StyledContent;
|
package/core/Types/Size.ts
DELETED
package/core/Types/Variant.ts
DELETED
package/core/index.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { default as StyledContent } from "./StyledContent";
|
|
2
|
-
export { default as StyledFloatContainer } from "./StyledFloatContainer";
|
|
3
|
-
export { default as ArrowButton } from "./ArrowButton";
|
|
4
|
-
export { default as ClearButton } from "./ClearButton";
|
|
5
|
-
export type { default as Size } from "./Types/Size";
|
|
6
|
-
export type { default as Variant } from "./Types/Variant";
|
package/index.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export { default as FormSection } from "./FormSection";
|
|
2
|
-
export { default as Grid } from "./Grid";
|
|
3
|
-
export { default as TextInput } from "./TextInput";
|
|
4
|
-
export { default as SelectBox } from "./SelectBox";
|
|
5
|
-
export { default as Button } from "./Button";
|
|
6
|
-
export { default as IconButton } from "./IconButton";
|
|
7
|
-
export { default as DropDownMenu } from "./DropDownMenu";
|
|
8
|
-
export { default as DateInput } from "./DateInput";
|
|
9
|
-
export { default as TextArea } from "./TextArea";
|
|
10
|
-
export { default as TextAreaInput } from "./TextAreaInput";
|
|
11
|
-
export { default as TagBox } from "./TagBox";
|
|
12
|
-
export { default as FieldLabel } from "./FieldLabel";
|
|
13
|
-
export { default as Modal } from "./Modal";
|
|
14
|
-
export { default as Flyout } from "./Flyout";
|
|
15
|
-
export { FlyoutHeader, FlyoutTitle } from "./Flyout";
|
|
16
|
-
export { default as FileInputField } from "./FileInputField";
|
|
17
|
-
export { default as Switch } from "./Switch";
|
|
18
|
-
export { default as CheckBox } from "./CheckBox";
|
|
19
|
-
export { default as Input } from "./Input";
|
|
20
|
-
export { default as Tooltip } from "./Tooltip";
|
|
21
|
-
export { default as Pill } from "./Pill";
|
|
22
|
-
export { default as Calendar } from "./Calendar";
|