@monolith-forensics/monolith-ui 1.1.0 → 1.1.1

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 (66) hide show
  1. package/package.json +4 -1
  2. package/Button/Button.tsx +0 -382
  3. package/Button/index.ts +0 -2
  4. package/Calendar/Calendar.tsx +0 -376
  5. package/Calendar/CalendarStyles.tsx +0 -180
  6. package/Calendar/calendarHelpers.ts +0 -196
  7. package/Calendar/index.ts +0 -1
  8. package/CheckBox/CheckBox.tsx +0 -61
  9. package/CheckBox/index.ts +0 -1
  10. package/DateInput/DateInput.tsx +0 -717
  11. package/DateInput/index.ts +0 -1
  12. package/DropDownMenu/DropDownMenu.tsx +0 -402
  13. package/DropDownMenu/index.ts +0 -1
  14. package/Error/Error.tsx +0 -51
  15. package/Error/index.ts +0 -1
  16. package/FieldLabel/FieldLabel.tsx +0 -155
  17. package/FieldLabel/index.ts +0 -1
  18. package/FileInputField/FileInputField.tsx +0 -179
  19. package/FileInputField/index.ts +0 -1
  20. package/Flyout/Flyout.tsx +0 -172
  21. package/Flyout/FlyoutHeader.tsx +0 -14
  22. package/Flyout/FlyoutTitle.tsx +0 -10
  23. package/Flyout/index.ts +0 -3
  24. package/FormSection/FormSection.tsx +0 -71
  25. package/FormSection/index.ts +0 -1
  26. package/Grid/Grid.tsx +0 -18
  27. package/Grid/index.ts +0 -1
  28. package/IconButton/IconButton.tsx +0 -27
  29. package/IconButton/index.ts +0 -1
  30. package/Input/Input.tsx +0 -164
  31. package/Input/index.ts +0 -1
  32. package/Modal/Modal.tsx +0 -172
  33. package/Modal/index.ts +0 -1
  34. package/Pill/Pill.tsx +0 -174
  35. package/Pill/index.ts +0 -1
  36. package/SelectBox/SelectBox.tsx +0 -745
  37. package/SelectBox/index.ts +0 -1
  38. package/Switch/Switch.tsx +0 -204
  39. package/Switch/index.ts +0 -1
  40. package/TagBox/TagBox.tsx +0 -694
  41. package/TagBox/TagBoxStyles.tsx +0 -116
  42. package/TagBox/index.ts +0 -1
  43. package/TextArea/TextArea.tsx +0 -92
  44. package/TextArea/index.ts +0 -1
  45. package/TextAreaInput/TextAreaInput.tsx +0 -46
  46. package/TextAreaInput/index.ts +0 -1
  47. package/TextInput/TextInput.tsx +0 -48
  48. package/TextInput/index.ts +0 -1
  49. package/Tooltip/Tooltip.tsx +0 -68
  50. package/Tooltip/index.ts +0 -1
  51. package/core/ArrowButton.tsx +0 -51
  52. package/core/ClearButton.tsx +0 -51
  53. package/core/MonolithThemeProvider.js +0 -16
  54. package/core/StyledContent.tsx +0 -50
  55. package/core/StyledFloatContainer.tsx +0 -7
  56. package/core/Types/Size.ts +0 -3
  57. package/core/Types/Variant.ts +0 -10
  58. package/core/index.ts +0 -6
  59. package/index.ts +0 -22
  60. package/theme/breakpoints.js +0 -11
  61. package/theme/components.js +0 -138
  62. package/theme/index.js +0 -76
  63. package/theme/shadows.js +0 -33
  64. package/theme/typography.js +0 -58
  65. package/theme/variants.js +0 -234
  66. package/tsconfig.json +0 -109
@@ -1 +0,0 @@
1
- export { default } from "./SelectBox";
package/Switch/Switch.tsx DELETED
@@ -1,204 +0,0 @@
1
- import styled from "styled-components";
2
- import * as RadixSwitch from "@radix-ui/react-switch";
3
- import { FieldLabel } from "..";
4
- import { CSSProperties } from "react";
5
- import { Size } from "../core";
6
-
7
- interface StyledRootProps {
8
- size?: Size;
9
- }
10
-
11
- const StyledRoot = styled(RadixSwitch.Root)<StyledRootProps>`
12
- all: unset;
13
- cursor: pointer;
14
-
15
- height: ${({ size }) =>
16
- size === "xs"
17
- ? "10px"
18
- : size === "sm"
19
- ? "16px"
20
- : size === "md"
21
- ? "22px"
22
- : size === "lg"
23
- ? "28px"
24
- : size === "xl"
25
- ? "32px"
26
- : "16px"};
27
-
28
- width: ${({ size }) =>
29
- size === "xs"
30
- ? "26px"
31
- : size === "sm"
32
- ? "35px"
33
- : size === "md"
34
- ? "28px"
35
- : size === "lg"
36
- ? "34px"
37
- : size === "xl"
38
- ? "70px"
39
- : "26px"};
40
-
41
- background-color: ${({ theme }) =>
42
- theme.name === "DARK" ? "#383838" : "#e3e3e3"};
43
- transition: background-color 100ms;
44
- border-radius: 9999px;
45
- border: 1px solid
46
- ${({ theme }) =>
47
- theme.name === "DARK" ? theme.palette.input.border : "#e3e3e3"};
48
- position: relative;
49
- padding: ${({ size }) =>
50
- size === "xs"
51
- ? "2px"
52
- : size === "sm"
53
- ? "2px"
54
- : size === "md"
55
- ? "28px"
56
- : size === "lg"
57
- ? "34px"
58
- : size === "xl"
59
- ? "2px 4px"
60
- : "2px"};
61
- -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
62
-
63
- &[data-state="checked"] {
64
- background-color: ${({ theme }) => theme.palette.primary.main};
65
- }
66
-
67
- // disabled styleing
68
- :disabled {
69
- pointer-events: none;
70
- opacity: 0.5;
71
- }
72
- `;
73
-
74
- interface ThumbProps {
75
- size?: Size;
76
- }
77
-
78
- const StyledThumb = styled(RadixSwitch.Thumb)<ThumbProps>`
79
- display: block;
80
- width: ${({ size }) =>
81
- size === "xs"
82
- ? "9px"
83
- : size === "sm"
84
- ? "14px"
85
- : size === "md"
86
- ? "22px"
87
- : size === "lg"
88
- ? "28px"
89
- : size === "xl"
90
- ? "28px"
91
- : "14px"};
92
-
93
- height: ${({ size }) =>
94
- size === "xs"
95
- ? "9px"
96
- : size === "sm"
97
- ? "14px"
98
- : size === "md"
99
- ? "22px"
100
- : size === "lg"
101
- ? "28px"
102
- : size === "xl"
103
- ? "28px"
104
- : "14px"};
105
-
106
- background-color: white;
107
- border: none;
108
- border-radius: 9999px;
109
- box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
110
- transition: transform 100ms;
111
- will-change: transform;
112
-
113
- &[data-state="checked"] {
114
- transform: ${({ size }) =>
115
- size === "xs"
116
- ? "translateX(17px)"
117
- : size === "sm"
118
- ? "translateX(20px)"
119
- : size === "md"
120
- ? "translateX(26px)"
121
- : size === "lg"
122
- ? "translateX(32px)"
123
- : size === "xl"
124
- ? "translateX(42px)"
125
- : "translateX(17px)"};
126
- }
127
- `;
128
-
129
- interface SwitchProps {
130
- className?: string;
131
- onChange: (e: any) => void;
132
- size?: Size;
133
- label?: string;
134
- labelPosition?: "left" | "right";
135
- description?: string;
136
- error?: string;
137
- required?: boolean;
138
- disabled?: boolean;
139
- defaultValue?: boolean;
140
- value?: boolean;
141
- style?: CSSProperties;
142
- }
143
-
144
- const Switch = styled(
145
- ({
146
- className,
147
- onChange,
148
- size = "xs",
149
- label,
150
- labelPosition = "right",
151
- description,
152
- error,
153
- required,
154
- disabled = false,
155
- defaultValue,
156
- value,
157
- style = {},
158
- ...other
159
- }: SwitchProps) => {
160
- return (
161
- <div className={className}>
162
- {label && labelPosition === "left" && (
163
- <FieldLabel
164
- error={error}
165
- asterisk={required}
166
- size={size}
167
- description={description}
168
- >
169
- {label}
170
- </FieldLabel>
171
- )}
172
- <StyledRoot
173
- size={size}
174
- className="SwitchRoot"
175
- onCheckedChange={onChange}
176
- defaultChecked={defaultValue}
177
- checked={value}
178
- disabled={disabled}
179
- style={style}
180
- {...other}
181
- >
182
- <StyledThumb size={size} className="SwitchThumb" />
183
- </StyledRoot>
184
- {label && labelPosition === "right" && (
185
- <FieldLabel
186
- error={error}
187
- asterisk={required}
188
- size={size}
189
- description={description}
190
- >
191
- {label}
192
- </FieldLabel>
193
- )}
194
- </div>
195
- );
196
- }
197
- )`
198
- display: flex;
199
- flex-direction: row;
200
- align-items: center;
201
- gap: 10px;
202
- `;
203
-
204
- export default Switch;
package/Switch/index.ts DELETED
@@ -1 +0,0 @@
1
- export { default } from "./Switch";