@monolith-forensics/monolith-ui 1.7.1 → 1.8.1-dev.0

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 (176) hide show
  1. package/dist/BarChart/BarChart.d.ts +3 -0
  2. package/dist/BarChart/BarChart.js +511 -0
  3. package/dist/BarChart/BarChart.lib.d.ts +31 -0
  4. package/dist/BarChart/BarChart.lib.js +136 -0
  5. package/dist/BarChart/BarChart.styled.d.ts +49 -0
  6. package/dist/BarChart/BarChart.styled.js +111 -0
  7. package/dist/BarChart/BarChart.types.d.ts +170 -0
  8. package/dist/BarChart/BarChart.types.js +1 -0
  9. package/dist/BarChart/index.d.ts +3 -0
  10. package/dist/BarChart/index.js +2 -0
  11. package/dist/Button/Button.js +9 -58
  12. package/dist/Calendar/Calendar.d.ts +3 -1
  13. package/dist/Calendar/Calendar.js +134 -33
  14. package/dist/Calendar/CalendarStyles.d.ts +3 -0
  15. package/dist/Calendar/CalendarStyles.js +92 -14
  16. package/dist/Calendar/calendarHelpers.d.ts +5 -1
  17. package/dist/Calendar/calendarHelpers.js +13 -5
  18. package/dist/ChartPrimitives/chartLegend.styled.d.ts +12 -0
  19. package/dist/ChartPrimitives/chartLegend.styled.js +52 -0
  20. package/dist/ChartPrimitives/chartTooltip.styled.d.ts +19 -0
  21. package/dist/ChartPrimitives/chartTooltip.styled.js +61 -0
  22. package/dist/ChartPrimitives/index.d.ts +2 -0
  23. package/dist/ChartPrimitives/index.js +2 -0
  24. package/dist/ChartUtils/chartColors.d.ts +8 -0
  25. package/dist/ChartUtils/chartColors.js +65 -0
  26. package/dist/ChartUtils/chartMath.d.ts +3 -0
  27. package/dist/ChartUtils/chartMath.js +3 -0
  28. package/dist/ChartUtils/index.d.ts +2 -0
  29. package/dist/ChartUtils/index.js +2 -0
  30. package/dist/Charts/BarChart/BarChart.d.ts +5 -0
  31. package/dist/Charts/BarChart/BarChart.js +549 -0
  32. package/dist/Charts/BarChart/BarChart.lib.d.ts +31 -0
  33. package/dist/Charts/BarChart/BarChart.lib.js +136 -0
  34. package/dist/Charts/BarChart/BarChart.styled.d.ts +51 -0
  35. package/dist/Charts/BarChart/BarChart.styled.js +115 -0
  36. package/dist/Charts/BarChart/BarChart.types.d.ts +171 -0
  37. package/dist/Charts/BarChart/BarChart.types.js +1 -0
  38. package/dist/Charts/BarChart/index.d.ts +3 -0
  39. package/dist/Charts/BarChart/index.js +2 -0
  40. package/dist/Charts/ChartPrimitives/ChartExportControl.d.ts +11 -0
  41. package/dist/Charts/ChartPrimitives/ChartExportControl.js +29 -0
  42. package/dist/Charts/ChartPrimitives/chartActions.styled.d.ts +1 -0
  43. package/dist/Charts/ChartPrimitives/chartActions.styled.js +8 -0
  44. package/dist/Charts/ChartPrimitives/chartLegend.styled.d.ts +12 -0
  45. package/dist/Charts/ChartPrimitives/chartLegend.styled.js +52 -0
  46. package/dist/Charts/ChartPrimitives/chartTooltip.styled.d.ts +19 -0
  47. package/dist/Charts/ChartPrimitives/chartTooltip.styled.js +61 -0
  48. package/dist/Charts/ChartPrimitives/index.d.ts +4 -0
  49. package/dist/Charts/ChartPrimitives/index.js +4 -0
  50. package/dist/Charts/ChartUtils/chartColors.d.ts +8 -0
  51. package/dist/Charts/ChartUtils/chartColors.js +65 -0
  52. package/dist/Charts/ChartUtils/chartExport.d.ts +47 -0
  53. package/dist/Charts/ChartUtils/chartExport.js +311 -0
  54. package/dist/Charts/ChartUtils/chartMath.d.ts +3 -0
  55. package/dist/Charts/ChartUtils/chartMath.js +3 -0
  56. package/dist/Charts/ChartUtils/index.d.ts +3 -0
  57. package/dist/Charts/ChartUtils/index.js +3 -0
  58. package/dist/Charts/HeatMap/HeatMap.d.ts +5 -0
  59. package/dist/Charts/HeatMap/HeatMap.js +212 -0
  60. package/dist/Charts/HeatMap/HeatMap.lib.d.ts +30 -0
  61. package/dist/Charts/HeatMap/HeatMap.lib.js +115 -0
  62. package/dist/Charts/HeatMap/HeatMap.styled.d.ts +37 -0
  63. package/dist/Charts/HeatMap/HeatMap.styled.js +91 -0
  64. package/dist/Charts/HeatMap/HeatMap.types.d.ts +80 -0
  65. package/dist/Charts/HeatMap/HeatMap.types.js +1 -0
  66. package/dist/Charts/HeatMap/index.d.ts +3 -0
  67. package/dist/Charts/HeatMap/index.js +2 -0
  68. package/dist/Charts/LineChart/LineChart.d.ts +5 -0
  69. package/dist/Charts/LineChart/LineChart.js +529 -0
  70. package/dist/Charts/LineChart/LineChart.lib.d.ts +24 -0
  71. package/dist/Charts/LineChart/LineChart.lib.js +132 -0
  72. package/dist/Charts/LineChart/LineChart.styled.d.ts +59 -0
  73. package/dist/Charts/LineChart/LineChart.styled.js +147 -0
  74. package/dist/Charts/LineChart/LineChart.types.d.ts +193 -0
  75. package/dist/Charts/LineChart/LineChart.types.js +1 -0
  76. package/dist/Charts/LineChart/index.d.ts +3 -0
  77. package/dist/Charts/LineChart/index.js +2 -0
  78. package/dist/Charts/PieChart/PieChart.d.ts +4 -0
  79. package/dist/Charts/PieChart/PieChart.js +199 -0
  80. package/dist/Charts/PieChart/PieChart.lib.d.ts +5 -0
  81. package/dist/Charts/PieChart/PieChart.lib.js +19 -0
  82. package/dist/Charts/PieChart/PieChart.styled.d.ts +51 -0
  83. package/dist/Charts/PieChart/PieChart.styled.js +163 -0
  84. package/dist/Charts/PieChart/PieChart.types.d.ts +100 -0
  85. package/dist/Charts/PieChart/PieChart.types.js +1 -0
  86. package/dist/Charts/PieChart/index.d.ts +2 -0
  87. package/dist/Charts/PieChart/index.js +1 -0
  88. package/dist/Charts/index.d.ts +5 -0
  89. package/dist/Charts/index.js +4 -0
  90. package/dist/CheckBox/CheckBox.js +2 -16
  91. package/dist/DateInput/DateInput.js +198 -143
  92. package/dist/DropDownMenu/components/MenuComponent.js +2 -1
  93. package/dist/DropDownMenu/components/MenuItem.js +5 -14
  94. package/dist/DropDownMenu/components/MenuItemList.js +7 -24
  95. package/dist/DropDownMenu/components/StyledFloatContainer.js +1 -1
  96. package/dist/FieldLabel/FieldLabel.js +4 -12
  97. package/dist/FileInputField/FileInputField.js +4 -23
  98. package/dist/FormSection/FormSection.js +5 -25
  99. package/dist/HeatMap/HeatMap.d.ts +3 -0
  100. package/dist/HeatMap/HeatMap.js +174 -0
  101. package/dist/HeatMap/HeatMap.lib.d.ts +30 -0
  102. package/dist/HeatMap/HeatMap.lib.js +115 -0
  103. package/dist/HeatMap/HeatMap.styled.d.ts +34 -0
  104. package/dist/HeatMap/HeatMap.styled.js +83 -0
  105. package/dist/HeatMap/HeatMap.types.d.ts +79 -0
  106. package/dist/HeatMap/HeatMap.types.js +1 -0
  107. package/dist/HeatMap/index.d.ts +3 -0
  108. package/dist/HeatMap/index.js +2 -0
  109. package/dist/IconButton/IconButton.js +2 -16
  110. package/dist/Input/Input.js +7 -56
  111. package/dist/LineChart/LineChart.d.ts +3 -0
  112. package/dist/LineChart/LineChart.js +491 -0
  113. package/dist/LineChart/LineChart.lib.d.ts +24 -0
  114. package/dist/LineChart/LineChart.lib.js +132 -0
  115. package/dist/LineChart/LineChart.styled.d.ts +57 -0
  116. package/dist/LineChart/LineChart.styled.js +150 -0
  117. package/dist/LineChart/LineChart.types.d.ts +192 -0
  118. package/dist/LineChart/LineChart.types.js +1 -0
  119. package/dist/LineChart/index.d.ts +3 -0
  120. package/dist/LineChart/index.js +2 -0
  121. package/dist/PieChart/PieChart.d.ts +2 -0
  122. package/dist/PieChart/PieChart.js +161 -0
  123. package/dist/PieChart/PieChart.lib.d.ts +5 -0
  124. package/dist/PieChart/PieChart.lib.js +19 -0
  125. package/dist/PieChart/PieChart.styled.d.ts +49 -0
  126. package/dist/PieChart/PieChart.styled.js +161 -0
  127. package/dist/PieChart/PieChart.types.d.ts +99 -0
  128. package/dist/PieChart/PieChart.types.js +1 -0
  129. package/dist/PieChart/index.d.ts +2 -0
  130. package/dist/PieChart/index.js +1 -0
  131. package/dist/Pill/Pill.js +8 -79
  132. package/dist/Popover/Popover.context.d.ts +2 -1
  133. package/dist/Popover/Popover.js +5 -2
  134. package/dist/Popover/Popover.styles.d.ts +1 -6
  135. package/dist/Popover/Popover.styles.js +11 -28
  136. package/dist/Popover/Popover.transitions.d.ts +4 -2
  137. package/dist/Popover/Popover.transitions.js +23 -49
  138. package/dist/Popover/PopoverDropdown.js +6 -8
  139. package/dist/Popover/PopoverTarget.js +6 -3
  140. package/dist/SegmentedControl/SegmentedControl.utils.d.ts +2 -2
  141. package/dist/SegmentedControl/SegmentedControl.utils.js +3 -30
  142. package/dist/SelectBox/SelectBox.js +3 -3
  143. package/dist/SelectBox/select-box.styled-components.d.ts +3 -1
  144. package/dist/SelectBox/select-box.styled-components.js +10 -48
  145. package/dist/SuperDatePicker/SuperDatePicker.d.ts +74 -0
  146. package/dist/SuperDatePicker/SuperDatePicker.js +557 -0
  147. package/dist/SuperDatePicker/index.d.ts +2 -0
  148. package/dist/SuperDatePicker/index.js +2 -0
  149. package/dist/Switch/Switch.d.ts +2 -2
  150. package/dist/Switch/Switch.js +18 -83
  151. package/dist/Table/StateStorage.d.ts +4 -0
  152. package/dist/Table/StateStorage.js +13 -0
  153. package/dist/Table/Table.js +160 -12
  154. package/dist/Table/TableComponents.d.ts +10 -0
  155. package/dist/Table/TableComponents.js +57 -0
  156. package/dist/Table/TableDefaults.d.ts +7 -0
  157. package/dist/Table/TableDefaults.js +7 -0
  158. package/dist/Table/TableProvider.js +263 -71
  159. package/dist/Table/TableRow.js +15 -10
  160. package/dist/Table/types.d.ts +64 -0
  161. package/dist/Tabs/Tab.js +8 -0
  162. package/dist/TagBox/TagBox.js +18 -76
  163. package/dist/TextArea/TextArea.js +4 -23
  164. package/dist/TextInput/TextInput.js +12 -6
  165. package/dist/Utilities/parseTimestamp.js +11 -6
  166. package/dist/core/ArrowButton.d.ts +2 -0
  167. package/dist/core/ArrowButton.js +7 -3
  168. package/dist/core/ClearButton.d.ts +2 -0
  169. package/dist/core/ClearButton.js +7 -3
  170. package/dist/core/controlSizes.d.ts +34 -0
  171. package/dist/core/controlSizes.js +190 -0
  172. package/dist/core/index.d.ts +1 -0
  173. package/dist/core/index.js +1 -0
  174. package/dist/index.d.ts +1 -0
  175. package/dist/index.js +1 -0
  176. package/package.json +5 -1
@@ -0,0 +1,61 @@
1
+ import styled from "styled-components";
2
+ export const StyledChartTooltip = styled.div `
3
+ position: absolute;
4
+ z-index: 1;
5
+ min-width: ${({ $minWidth = 120 }) => $minWidth}px;
6
+ max-width: ${({ $maxWidth = 220 }) => $maxWidth}px;
7
+ padding: 7px 9px;
8
+ border: 1px solid ${({ theme }) => theme.palette.divider};
9
+ border-radius: 4px;
10
+ background: ${({ theme }) => theme.palette.background.paper};
11
+ color: ${({ theme }) => theme.palette.text.primary};
12
+ box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
13
+ font-size: 12px;
14
+ line-height: 1.35;
15
+ pointer-events: none;
16
+ transform: ${({ $transform = "translate(10px, -50%)" }) => $transform};
17
+ `;
18
+ export const StyledChartTooltipHeader = styled.div `
19
+ display: flex;
20
+ align-items: center;
21
+ gap: 7px;
22
+ min-width: 0;
23
+ font-weight: 600;
24
+ `;
25
+ export const StyledChartTooltipSwatch = styled.span `
26
+ width: 8px;
27
+ height: 8px;
28
+ flex: 0 0 auto;
29
+ border-radius: ${({ $radius = "2px" }) => $radius};
30
+ background: ${({ $color }) => $color};
31
+ `;
32
+ export const StyledChartTooltipLabel = styled.span `
33
+ overflow: hidden;
34
+ text-overflow: ellipsis;
35
+ white-space: nowrap;
36
+ `;
37
+ export const StyledChartTooltipMeta = styled.div `
38
+ display: flex;
39
+ flex-direction: ${({ $direction = "row" }) => $direction};
40
+ gap: ${({ $gap = 8 }) => $gap}px;
41
+ margin-top: ${({ $marginTop = 3 }) => $marginTop}px;
42
+ color: ${({ theme }) => theme.palette.text.secondary};
43
+ font-variant-numeric: tabular-nums;
44
+ `;
45
+ export const StyledChartTooltipList = styled.div `
46
+ display: flex;
47
+ flex-direction: column;
48
+ gap: 5px;
49
+ margin-top: 8px;
50
+ `;
51
+ export const StyledChartTooltipRow = styled.div `
52
+ display: grid;
53
+ grid-template-columns: 8px minmax(0, 1fr) auto;
54
+ align-items: center;
55
+ gap: 7px;
56
+ `;
57
+ export const StyledChartTooltipValue = styled.span `
58
+ color: ${({ theme }) => theme.palette.text.primary};
59
+ font-variant-numeric: tabular-nums;
60
+ white-space: nowrap;
61
+ `;
@@ -0,0 +1,2 @@
1
+ export * from "./chartLegend.styled";
2
+ export * from "./chartTooltip.styled";
@@ -0,0 +1,2 @@
1
+ export * from "./chartLegend.styled";
2
+ export * from "./chartTooltip.styled";
@@ -0,0 +1,8 @@
1
+ export type ChartColorGradientInput = string[] | {
2
+ from: string;
3
+ to: string;
4
+ } | null | undefined;
5
+ export declare const mixColors: (from: string, to: string, amount: number) => string;
6
+ export declare const getGradientStops: (colorGradient?: ChartColorGradientInput) => string[] | null;
7
+ export declare const getGradientColorFromStops: (stops: string[] | null | undefined, index: number, total: number) => string | undefined;
8
+ export declare const getGradientColor: (colorGradient: ChartColorGradientInput, index: number, total: number) => string | undefined;
@@ -0,0 +1,65 @@
1
+ import { clamp } from "./chartMath";
2
+ const parseColor = (color) => {
3
+ const trimmedColor = color.trim();
4
+ const hexMatch = trimmedColor.match(/^#([0-9a-f]{3}|[0-9a-f]{6})$/i);
5
+ if (hexMatch) {
6
+ const normalizedHex = hexMatch[1].length === 3
7
+ ? hexMatch[1]
8
+ .split("")
9
+ .map((character) => character + character)
10
+ .join("")
11
+ : hexMatch[1];
12
+ return {
13
+ r: parseInt(normalizedHex.slice(0, 2), 16),
14
+ g: parseInt(normalizedHex.slice(2, 4), 16),
15
+ b: parseInt(normalizedHex.slice(4, 6), 16),
16
+ a: 1,
17
+ };
18
+ }
19
+ const rgbMatch = trimmedColor.match(/^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})(?:\s*,\s*(0|1|0?\.\d+))?\s*\)$/i);
20
+ if (!rgbMatch) {
21
+ return null;
22
+ }
23
+ return {
24
+ r: clamp(Number(rgbMatch[1]), 0, 255),
25
+ g: clamp(Number(rgbMatch[2]), 0, 255),
26
+ b: clamp(Number(rgbMatch[3]), 0, 255),
27
+ a: rgbMatch[4] ? clamp(Number(rgbMatch[4]), 0, 1) : 1,
28
+ };
29
+ };
30
+ export const mixColors = (from, to, amount) => {
31
+ const normalizedAmount = clamp(amount, 0, 1);
32
+ if (normalizedAmount === 0)
33
+ return from;
34
+ if (normalizedAmount === 1)
35
+ return to;
36
+ const fromColor = parseColor(from);
37
+ const toColor = parseColor(to);
38
+ if (!fromColor || !toColor) {
39
+ return `color-mix(in srgb, ${from} ${(1 - normalizedAmount) * 100}%, ${to})`;
40
+ }
41
+ const r = Math.round(fromColor.r + (toColor.r - fromColor.r) * normalizedAmount);
42
+ const g = Math.round(fromColor.g + (toColor.g - fromColor.g) * normalizedAmount);
43
+ const b = Math.round(fromColor.b + (toColor.b - fromColor.b) * normalizedAmount);
44
+ const a = fromColor.a + (toColor.a - fromColor.a) * normalizedAmount;
45
+ return a === 1 ? `rgb(${r}, ${g}, ${b})` : `rgba(${r}, ${g}, ${b}, ${a})`;
46
+ };
47
+ export const getGradientStops = (colorGradient) => {
48
+ if (!colorGradient)
49
+ return null;
50
+ return Array.isArray(colorGradient)
51
+ ? colorGradient.filter(Boolean)
52
+ : [colorGradient.from, colorGradient.to].filter(Boolean);
53
+ };
54
+ export const getGradientColorFromStops = (stops, index, total) => {
55
+ if (!(stops === null || stops === void 0 ? void 0 : stops.length))
56
+ return undefined;
57
+ if (stops.length === 1 || total <= 1)
58
+ return stops[0];
59
+ const progress = index / (total - 1);
60
+ const scaledProgress = progress * (stops.length - 1);
61
+ const stopIndex = Math.min(Math.floor(scaledProgress), stops.length - 2);
62
+ const stopProgress = scaledProgress - stopIndex;
63
+ return mixColors(stops[stopIndex], stops[stopIndex + 1], stopProgress);
64
+ };
65
+ export const getGradientColor = (colorGradient, index, total) => getGradientColorFromStops(getGradientStops(colorGradient), index, total);
@@ -0,0 +1,3 @@
1
+ export declare const formatDefaultValue: (value: number) => string;
2
+ export declare const clamp: (value: number, min: number, max: number) => number;
3
+ export declare const easeOutCubic: (value: number) => number;
@@ -0,0 +1,3 @@
1
+ export const formatDefaultValue = (value) => new Intl.NumberFormat().format(value);
2
+ export const clamp = (value, min, max) => Math.min(Math.max(value, min), max);
3
+ export const easeOutCubic = (value) => 1 - Math.pow(1 - value, 3);
@@ -0,0 +1,2 @@
1
+ export * from "./chartColors";
2
+ export * from "./chartMath";
@@ -0,0 +1,2 @@
1
+ export * from "./chartColors";
2
+ export * from "./chartMath";
@@ -0,0 +1,5 @@
1
+ import { ReactElement, RefAttributes } from "react";
2
+ import { ChartHandle } from "../ChartUtils";
3
+ import { BarChartProps } from "./BarChart.types";
4
+ export declare const BarChart: <TData>(props: BarChartProps<TData> & RefAttributes<ChartHandle>) => ReactElement | null;
5
+ export default BarChart;