@monolith-forensics/monolith-ui 1.8.1-dev.4 → 1.9.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.
- package/dist/Button/Button.js +58 -9
- package/dist/Calendar/Calendar.d.ts +2 -7
- package/dist/Calendar/Calendar.js +49 -226
- package/dist/Calendar/CalendarStyles.d.ts +2 -6
- package/dist/Calendar/CalendarStyles.js +33 -153
- package/dist/Calendar/calendarHelpers.d.ts +2 -6
- package/dist/Calendar/calendarHelpers.js +5 -13
- package/dist/CheckBox/CheckBox.js +19 -36
- package/dist/DateInput/DateInput.js +143 -198
- package/dist/DropDownMenu/DropDownMenu.js +15 -25
- package/dist/DropDownMenu/components/MenuComponent.js +2 -8
- package/dist/DropDownMenu/components/MenuItem.d.ts +0 -2
- package/dist/DropDownMenu/components/MenuItem.js +21 -25
- package/dist/DropDownMenu/components/MenuItemList.d.ts +0 -3
- package/dist/DropDownMenu/components/MenuItemList.js +86 -192
- package/dist/DropDownMenu/components/StyledContent.js +2 -1
- package/dist/DropDownMenu/components/StyledFloatContainer.js +1 -1
- package/dist/DropDownMenu/types.d.ts +0 -3
- package/dist/FieldLabel/FieldLabel.js +12 -4
- package/dist/FileInputField/FileInputField.js +23 -4
- package/dist/FileViewer/viewers/ImageViewer.js +18 -75
- package/dist/FormSection/FormSection.js +25 -5
- package/dist/IconButton/IconButton.js +16 -2
- package/dist/Input/Input.js +56 -7
- package/dist/MonolithUIProvider/MonolithUIProvider.d.ts +0 -1
- package/dist/Pill/Pill.js +79 -8
- package/dist/Popover/Popover.context.d.ts +1 -2
- package/dist/Popover/Popover.js +2 -5
- package/dist/Popover/Popover.styles.d.ts +6 -1
- package/dist/Popover/Popover.styles.js +28 -11
- package/dist/Popover/Popover.transitions.d.ts +2 -4
- package/dist/Popover/Popover.transitions.js +49 -23
- package/dist/Popover/PopoverDropdown.js +8 -6
- package/dist/Popover/PopoverTarget.js +3 -6
- package/dist/QueryFilter/DefaultOperators.d.ts +76 -0
- package/dist/QueryFilter/DefaultOperators.js +21 -0
- package/dist/QueryFilter/QueryFilter.d.ts +1 -1
- package/dist/QueryFilter/QueryFilter.js +303 -3
- package/dist/QueryFilter/index.d.ts +2 -3
- package/dist/QueryFilter/index.js +2 -3
- package/dist/QueryFilter/{QueryFilter.types.d.ts → types.d.ts} +2 -11
- package/dist/QueryFilter/useQueryFilter.d.ts +1 -1
- package/dist/QueryFilter/useQueryFilter.js +19 -23
- package/dist/RichTextEditor/Extensions/getTiptapExtensions.js +15 -5
- package/dist/RichTextEditor/Plugins/UploadImagesPlugin.d.ts +0 -15
- package/dist/RichTextEditor/Plugins/UploadImagesPlugin.js +51 -115
- package/dist/RichTextEditor/Plugins/index.d.ts +0 -1
- package/dist/RichTextEditor/Plugins/index.js +0 -1
- package/dist/RichTextEditor/RichTextEditor.d.ts +2 -3
- package/dist/RichTextEditor/RichTextEditor.js +35 -309
- package/dist/RichTextEditor/Toolbar/Toolbar.js +2 -14
- package/dist/SegmentedControl/SegmentedControl.utils.d.ts +2 -2
- package/dist/SegmentedControl/SegmentedControl.utils.js +30 -3
- package/dist/SelectBox/SelectBox.js +5 -5
- package/dist/SelectBox/select-box.styled-components.d.ts +1 -4
- package/dist/SelectBox/select-box.styled-components.js +48 -11
- package/dist/SelectBox/types.d.ts +0 -1
- package/dist/Switch/Switch.d.ts +2 -2
- package/dist/Switch/Switch.js +83 -18
- package/dist/Table/ColumnResizer.d.ts +9 -6
- package/dist/Table/ColumnResizer.js +10 -30
- package/dist/Table/StateStorage.d.ts +0 -4
- package/dist/Table/StateStorage.js +0 -13
- package/dist/Table/Table.js +12 -160
- package/dist/Table/TableComponents.d.ts +0 -10
- package/dist/Table/TableComponents.js +10 -71
- package/dist/Table/TableDefaults.d.ts +0 -7
- package/dist/Table/TableDefaults.js +0 -7
- package/dist/Table/TableHeader.js +16 -31
- package/dist/Table/TableMenu/TableMenu.js +1 -1
- package/dist/Table/TableProvider.js +75 -354
- package/dist/Table/TableRow.js +16 -28
- package/dist/Table/Utils/index.d.ts +1 -0
- package/dist/Table/Utils/index.js +1 -0
- package/dist/Table/Utils/resizeHandler.d.ts +3 -0
- package/dist/Table/Utils/resizeHandler.js +84 -0
- package/dist/Table/types.d.ts +19 -70
- package/dist/Tabs/Tab.js +0 -8
- package/dist/TagBox/TagBox.d.ts +1 -1
- package/dist/TagBox/TagBox.js +208 -50
- package/dist/TagBox/types.d.ts +13 -1
- package/dist/TextArea/TextArea.js +23 -9
- package/dist/TextInput/TextInput.js +6 -12
- package/dist/Utilities/parseTimestamp.js +6 -11
- package/dist/core/ArrowButton.d.ts +0 -2
- package/dist/core/ArrowButton.js +3 -7
- package/dist/core/ClearButton.d.ts +0 -2
- package/dist/core/ClearButton.js +3 -7
- package/dist/core/controlSizes.d.ts +0 -26
- package/dist/core/controlSizes.js +0 -156
- package/dist/index.d.ts +0 -3
- package/dist/index.js +0 -2
- package/dist/theme/variants.js +0 -2
- package/package.json +18 -26
- package/dist/Charts/BarChart/BarChart.d.ts +0 -5
- package/dist/Charts/BarChart/BarChart.js +0 -549
- package/dist/Charts/BarChart/BarChart.lib.d.ts +0 -31
- package/dist/Charts/BarChart/BarChart.lib.js +0 -136
- package/dist/Charts/BarChart/BarChart.styled.d.ts +0 -51
- package/dist/Charts/BarChart/BarChart.styled.js +0 -115
- package/dist/Charts/BarChart/BarChart.types.d.ts +0 -171
- package/dist/Charts/BarChart/index.d.ts +0 -3
- package/dist/Charts/BarChart/index.js +0 -2
- package/dist/Charts/ChartPrimitives/ChartExportControl.d.ts +0 -11
- package/dist/Charts/ChartPrimitives/ChartExportControl.js +0 -29
- package/dist/Charts/ChartPrimitives/chartActions.styled.d.ts +0 -1
- package/dist/Charts/ChartPrimitives/chartActions.styled.js +0 -8
- package/dist/Charts/ChartPrimitives/chartLegend.styled.d.ts +0 -12
- package/dist/Charts/ChartPrimitives/chartLegend.styled.js +0 -52
- package/dist/Charts/ChartPrimitives/chartTooltip.styled.d.ts +0 -19
- package/dist/Charts/ChartPrimitives/chartTooltip.styled.js +0 -61
- package/dist/Charts/ChartPrimitives/index.d.ts +0 -4
- package/dist/Charts/ChartPrimitives/index.js +0 -4
- package/dist/Charts/ChartUtils/chartColors.d.ts +0 -8
- package/dist/Charts/ChartUtils/chartColors.js +0 -65
- package/dist/Charts/ChartUtils/chartExport.d.ts +0 -47
- package/dist/Charts/ChartUtils/chartExport.js +0 -311
- package/dist/Charts/ChartUtils/chartMath.d.ts +0 -3
- package/dist/Charts/ChartUtils/chartMath.js +0 -3
- package/dist/Charts/ChartUtils/index.d.ts +0 -3
- package/dist/Charts/ChartUtils/index.js +0 -3
- package/dist/Charts/HeatMap/HeatMap.d.ts +0 -5
- package/dist/Charts/HeatMap/HeatMap.js +0 -212
- package/dist/Charts/HeatMap/HeatMap.lib.d.ts +0 -30
- package/dist/Charts/HeatMap/HeatMap.lib.js +0 -115
- package/dist/Charts/HeatMap/HeatMap.styled.d.ts +0 -37
- package/dist/Charts/HeatMap/HeatMap.styled.js +0 -91
- package/dist/Charts/HeatMap/HeatMap.types.d.ts +0 -80
- package/dist/Charts/HeatMap/HeatMap.types.js +0 -1
- package/dist/Charts/HeatMap/index.d.ts +0 -3
- package/dist/Charts/HeatMap/index.js +0 -2
- package/dist/Charts/LineChart/LineChart.d.ts +0 -5
- package/dist/Charts/LineChart/LineChart.js +0 -529
- package/dist/Charts/LineChart/LineChart.lib.d.ts +0 -24
- package/dist/Charts/LineChart/LineChart.lib.js +0 -132
- package/dist/Charts/LineChart/LineChart.styled.d.ts +0 -59
- package/dist/Charts/LineChart/LineChart.styled.js +0 -147
- package/dist/Charts/LineChart/LineChart.types.d.ts +0 -193
- package/dist/Charts/LineChart/LineChart.types.js +0 -1
- package/dist/Charts/LineChart/index.d.ts +0 -3
- package/dist/Charts/LineChart/index.js +0 -2
- package/dist/Charts/PieChart/PieChart.d.ts +0 -4
- package/dist/Charts/PieChart/PieChart.js +0 -199
- package/dist/Charts/PieChart/PieChart.lib.d.ts +0 -5
- package/dist/Charts/PieChart/PieChart.lib.js +0 -19
- package/dist/Charts/PieChart/PieChart.styled.d.ts +0 -51
- package/dist/Charts/PieChart/PieChart.styled.js +0 -163
- package/dist/Charts/PieChart/PieChart.types.d.ts +0 -100
- package/dist/Charts/PieChart/PieChart.types.js +0 -1
- package/dist/Charts/PieChart/index.d.ts +0 -2
- package/dist/Charts/PieChart/index.js +0 -1
- package/dist/Charts/index.d.ts +0 -5
- package/dist/Charts/index.js +0 -4
- package/dist/QueryFilter/QueryFilter.constants.d.ts +0 -134
- package/dist/QueryFilter/QueryFilter.constants.js +0 -39
- package/dist/QueryFilter/QueryFilter.lib.d.ts +0 -14
- package/dist/QueryFilter/QueryFilter.lib.js +0 -84
- package/dist/QueryFilter/QueryFilter.styled.d.ts +0 -89
- package/dist/QueryFilter/QueryFilter.styled.js +0 -184
- package/dist/QueryFilter/QueryFilter.types.js +0 -1
- package/dist/QueryFilter/components/MultiSelectEditor.d.ts +0 -7
- package/dist/QueryFilter/components/MultiSelectEditor.js +0 -44
- package/dist/QueryFilter/components/RuleChip.d.ts +0 -8
- package/dist/QueryFilter/components/RuleChip.js +0 -37
- package/dist/QueryFilter/components/Rules.d.ts +0 -11
- package/dist/QueryFilter/components/Rules.js +0 -41
- package/dist/QueryFilter/components/UnavailableRuleChip.d.ts +0 -5
- package/dist/QueryFilter/components/UnavailableRuleChip.js +0 -7
- package/dist/QueryFilter/components/ValueEditor.d.ts +0 -7
- package/dist/QueryFilter/components/ValueEditor.js +0 -45
- package/dist/QueryFilter/components/ValueSelector.d.ts +0 -7
- package/dist/QueryFilter/components/ValueSelector.js +0 -34
- package/dist/QueryFilter/components/index.d.ts +0 -6
- package/dist/QueryFilter/components/index.js +0 -6
- package/dist/RichTextEditor/Plugins/ImageActionsPlugin.d.ts +0 -3
- package/dist/RichTextEditor/Plugins/ImageActionsPlugin.js +0 -241
- package/dist/SuperDatePicker/SuperDatePicker.constants.d.ts +0 -24
- package/dist/SuperDatePicker/SuperDatePicker.constants.js +0 -30
- package/dist/SuperDatePicker/SuperDatePicker.d.ts +0 -3
- package/dist/SuperDatePicker/SuperDatePicker.js +0 -31
- package/dist/SuperDatePicker/SuperDatePicker.lib.d.ts +0 -17
- package/dist/SuperDatePicker/SuperDatePicker.lib.js +0 -206
- package/dist/SuperDatePicker/SuperDatePicker.styled.d.ts +0 -60
- package/dist/SuperDatePicker/SuperDatePicker.styled.js +0 -256
- package/dist/SuperDatePicker/SuperDatePicker.types.d.ts +0 -48
- package/dist/SuperDatePicker/SuperDatePicker.types.js +0 -1
- package/dist/SuperDatePicker/components/CommonPresetGroups.d.ts +0 -7
- package/dist/SuperDatePicker/components/CommonPresetGroups.js +0 -6
- package/dist/SuperDatePicker/components/EndpointCalendarDropdown.d.ts +0 -10
- package/dist/SuperDatePicker/components/EndpointCalendarDropdown.js +0 -9
- package/dist/SuperDatePicker/components/EndpointDateInput.d.ts +0 -16
- package/dist/SuperDatePicker/components/EndpointDateInput.js +0 -26
- package/dist/SuperDatePicker/components/EndpointPopover.d.ts +0 -18
- package/dist/SuperDatePicker/components/EndpointPopover.js +0 -11
- package/dist/SuperDatePicker/components/QuickRangeDropdown.d.ts +0 -14
- package/dist/SuperDatePicker/components/QuickRangeDropdown.js +0 -19
- package/dist/SuperDatePicker/components/QuickRangePopover.d.ts +0 -18
- package/dist/SuperDatePicker/components/QuickRangePopover.js +0 -12
- package/dist/SuperDatePicker/components/index.d.ts +0 -6
- package/dist/SuperDatePicker/components/index.js +0 -6
- package/dist/SuperDatePicker/index.d.ts +0 -3
- package/dist/SuperDatePicker/index.js +0 -3
- package/dist/SuperDatePicker/useSuperDatePicker.d.ts +0 -32
- package/dist/SuperDatePicker/useSuperDatePicker.js +0 -125
- /package/dist/{Charts/BarChart/BarChart.types.js → QueryFilter/types.js} +0 -0
|
@@ -1,145 +1,70 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
2
|
export const MainContainer = styled.div `
|
|
3
3
|
display: flex;
|
|
4
|
-
align-items: flex-start;
|
|
5
|
-
gap: 8px;
|
|
6
4
|
`;
|
|
7
5
|
export const CalendarContainer = styled.div `
|
|
8
|
-
|
|
6
|
+
font-size: 5px;
|
|
7
|
+
width: 250px;
|
|
9
8
|
border-radius: 4px;
|
|
10
9
|
overflow: hidden;
|
|
11
|
-
box-sizing: border-box;
|
|
12
10
|
`;
|
|
13
11
|
export const CalendarHeader = styled.div `
|
|
14
12
|
display: flex;
|
|
15
13
|
align-items: center;
|
|
16
14
|
justify-content: space-between;
|
|
17
|
-
gap: 4px;
|
|
18
|
-
padding: 0 2px 6px;
|
|
19
|
-
`;
|
|
20
|
-
export const CalendarHeaderControls = styled.div `
|
|
21
|
-
display: flex;
|
|
22
|
-
align-items: center;
|
|
23
|
-
justify-content: center;
|
|
24
|
-
gap: 4px;
|
|
25
|
-
flex: 1;
|
|
26
|
-
min-width: 0;
|
|
27
|
-
`;
|
|
28
|
-
export const CalendarNavButton = styled.button `
|
|
29
|
-
display: inline-flex;
|
|
30
|
-
align-items: center;
|
|
31
|
-
justify-content: center;
|
|
32
|
-
padding: 4px;
|
|
33
|
-
border: none;
|
|
34
|
-
border-radius: 4px;
|
|
35
|
-
background: transparent;
|
|
36
|
-
color: ${(props) => props.theme.palette.text.secondary};
|
|
37
|
-
cursor: pointer;
|
|
38
|
-
transition: background 0.2s ease-out;
|
|
39
|
-
|
|
40
|
-
&:hover {
|
|
41
|
-
background: ${(props) => props.theme.palette.action.hover};
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
&:focus-visible {
|
|
45
|
-
outline: 2px solid ${(props) => props.theme.palette.primary.main};
|
|
46
|
-
outline-offset: 2px;
|
|
47
|
-
}
|
|
48
15
|
`;
|
|
49
16
|
export const CalendarGrid = styled.div `
|
|
50
17
|
display: grid;
|
|
51
|
-
grid-template: repeat(7, auto) / repeat(7,
|
|
52
|
-
gap: 3px;
|
|
53
|
-
justify-content: center;
|
|
54
|
-
justify-items: center;
|
|
18
|
+
grid-template: repeat(7, auto) / repeat(7, auto);
|
|
55
19
|
`;
|
|
56
20
|
export const CalendarMonth = styled.div `
|
|
57
21
|
font-weight: 500;
|
|
58
22
|
font-size: 12px;
|
|
59
23
|
color: ${(props) => props.theme.palette.text.primary};
|
|
60
24
|
text-align: center;
|
|
61
|
-
padding:
|
|
25
|
+
padding: 0.5em 0.25em;
|
|
62
26
|
word-spacing: 5px;
|
|
63
27
|
user-select: none;
|
|
64
|
-
flex: 1;
|
|
65
|
-
`;
|
|
66
|
-
export const CalendarHeaderSelect = styled.div `
|
|
67
|
-
.mfui-DropDownMenu {
|
|
68
|
-
min-width: 0;
|
|
69
|
-
}
|
|
70
28
|
`;
|
|
71
29
|
export const CalendarCell = styled.div `
|
|
72
|
-
display: flex;
|
|
73
|
-
align-items: center;
|
|
74
|
-
justify-content: center;
|
|
75
30
|
text-align: center;
|
|
76
31
|
align-self: center;
|
|
77
32
|
letter-spacing: 0.1rem;
|
|
78
|
-
|
|
79
|
-
width: 32px;
|
|
80
|
-
min-height: 32px;
|
|
81
|
-
height: 32px;
|
|
82
|
-
padding: 6px 4px;
|
|
33
|
+
padding: 7px;
|
|
83
34
|
user-select: none;
|
|
84
35
|
border-radius: 5px;
|
|
85
36
|
border: 1px solid transparent;
|
|
86
|
-
box-sizing: border-box;
|
|
87
37
|
grid-column: ${({ index = 0 }) => (index % 7) + 1} / span 1;
|
|
88
38
|
`;
|
|
89
39
|
export const CalendarDay = styled(CalendarCell) `
|
|
90
40
|
font-weight: bold;
|
|
91
|
-
font-size:
|
|
41
|
+
font-size: 10px;
|
|
92
42
|
border-radius: 0px;
|
|
93
43
|
color: ${(props) => props.theme.palette.text.secondary};
|
|
94
|
-
min-height: 24px;
|
|
95
44
|
`;
|
|
96
45
|
export const CalendarDate = styled(CalendarCell) `
|
|
97
46
|
font-weight: ${(props) => (props.inMonth ? 500 : 300)};
|
|
98
|
-
font-size:
|
|
99
|
-
line-height: 1.1;
|
|
47
|
+
font-size: 10px;
|
|
100
48
|
cursor: pointer;
|
|
101
49
|
|
|
102
50
|
color: ${({ inMonth, theme }) => inMonth ? theme.palette.text.primary : theme.palette.text.secondary};
|
|
103
|
-
background: transparent;
|
|
104
|
-
opacity: ${({ inMonth }) => (inMonth ? 1 : 0.65)};
|
|
105
51
|
grid-row: ${({ index }) => Math.floor((index || 0) / 7) + 2} / span 1;
|
|
106
52
|
transition: all 0.2s ease-out;
|
|
107
53
|
border-radius: 5px;
|
|
108
54
|
&:hover {
|
|
109
55
|
background: ${({ theme }) => theme.palette.action.hover};
|
|
110
|
-
opacity: 1;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
&:focus-visible {
|
|
114
|
-
outline: 2px solid ${({ theme }) => theme.palette.primary.main};
|
|
115
|
-
outline-offset: 1px;
|
|
116
56
|
}
|
|
117
57
|
|
|
118
58
|
&[data-disabled="true"] {
|
|
119
|
-
|
|
120
|
-
color: ${({ theme }) => theme.palette.text.
|
|
121
|
-
|
|
122
|
-
opacity: 0.62;
|
|
123
|
-
font-weight: 500;
|
|
124
|
-
text-decoration: line-through;
|
|
125
|
-
text-decoration-thickness: 1px;
|
|
126
|
-
|
|
127
|
-
&:hover {
|
|
128
|
-
background: transparent;
|
|
129
|
-
opacity: 0.62;
|
|
130
|
-
}
|
|
59
|
+
pointer-events: none;
|
|
60
|
+
color: ${({ theme }) => theme.palette.text.disabled};
|
|
131
61
|
}
|
|
132
62
|
`;
|
|
133
63
|
export const HighlightedCalendarDate = styled(CalendarDate) `
|
|
134
64
|
color: white !important;
|
|
135
65
|
background: ${(props) => props.theme.palette.primary.main} !important;
|
|
136
66
|
border: 1px solid ${(props) => props.theme.palette.primary.main} !important;
|
|
137
|
-
font-weight: 700;
|
|
138
|
-
opacity: 1;
|
|
139
67
|
position: relative;
|
|
140
|
-
box-shadow:
|
|
141
|
-
inset 0 0 0 1px ${(props) => props.theme.palette.primary.main},
|
|
142
|
-
0 4px 10px ${(props) => `${props.theme.palette.primary.main}33`};
|
|
143
68
|
::before {
|
|
144
69
|
content: "";
|
|
145
70
|
position: absolute;
|
|
@@ -151,112 +76,72 @@ export const HighlightedCalendarDate = styled(CalendarDate) `
|
|
|
151
76
|
`;
|
|
152
77
|
export const TodayCalendarDate = styled(HighlightedCalendarDate) `
|
|
153
78
|
color: ${(props) => props.theme.palette.text.primary} !important;
|
|
154
|
-
background:
|
|
155
|
-
border: 1px dashed ${(props) => props.theme.palette.primary.main} !important;
|
|
156
|
-
box-shadow: none;
|
|
157
|
-
font-weight: 600;
|
|
79
|
+
background: transparent !important;
|
|
158
80
|
::after {
|
|
159
81
|
content: "";
|
|
160
82
|
position: absolute;
|
|
161
|
-
|
|
162
|
-
bottom:
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
border-
|
|
166
|
-
background: ${(props) => props.theme.palette.primary.main};
|
|
167
|
-
transform: translateX(-50%);
|
|
83
|
+
right: 0;
|
|
84
|
+
bottom: 0;
|
|
85
|
+
border-bottom: 0.75em solid #06c;
|
|
86
|
+
border-left: 0.75em solid transparent;
|
|
87
|
+
border-top: 0.75em solid transparent;
|
|
168
88
|
}
|
|
169
89
|
:hover {
|
|
170
90
|
color: ${(props) => props.theme.palette.text.primary} !important;
|
|
171
|
-
background: ${(props) =>
|
|
91
|
+
background: ${(props) => props.theme.palette.action.hover} !important;
|
|
172
92
|
}
|
|
173
93
|
`;
|
|
174
94
|
export const TimeContainer = styled.div `
|
|
175
|
-
position: relative;
|
|
176
|
-
flex: 0 0 132px;
|
|
177
95
|
font-size: 12px;
|
|
178
|
-
width:
|
|
179
|
-
height:
|
|
180
|
-
box-sizing: border-box;
|
|
96
|
+
width: 150px;
|
|
97
|
+
height: 100%;
|
|
181
98
|
border: 1px solid ${(props) => props.theme.palette.divider};
|
|
99
|
+
border-left: none;
|
|
182
100
|
border-radius: 4px;
|
|
183
|
-
background: ${(props) => props.theme.palette.input.background};
|
|
184
101
|
overflow: hidden;
|
|
185
102
|
`;
|
|
186
103
|
export const TimePickerContainer = styled.div `
|
|
187
104
|
display: flex;
|
|
188
|
-
height:
|
|
105
|
+
height: 100%;
|
|
189
106
|
`;
|
|
190
107
|
export const TimeHeader = styled.div `
|
|
191
|
-
|
|
192
|
-
font-weight: 600;
|
|
108
|
+
font-weight: 500;
|
|
193
109
|
font-size: 12px;
|
|
194
110
|
color: ${(props) => props.theme.palette.text.primary};
|
|
195
111
|
border-bottom: 1px solid ${(props) => props.theme.palette.divider};
|
|
196
112
|
text-align: center;
|
|
197
|
-
padding:
|
|
198
|
-
line-height:
|
|
113
|
+
padding: 5px;
|
|
114
|
+
line-height: 2.3;
|
|
199
115
|
height: 40px;
|
|
200
116
|
user-select: none;
|
|
201
|
-
display: flex;
|
|
202
|
-
align-items: center;
|
|
203
|
-
justify-content: center;
|
|
204
|
-
gap: 6px;
|
|
205
|
-
`;
|
|
206
|
-
export const TimeHeaderValue = styled.span `
|
|
207
|
-
color: ${(props) => props.theme.palette.text.primary};
|
|
208
117
|
`;
|
|
209
|
-
export const
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
font-size: 10px;
|
|
215
|
-
font-weight: 700;
|
|
216
|
-
line-height: 1;
|
|
217
|
-
text-transform: uppercase;
|
|
118
|
+
export const TimeHourSelect = styled.div `
|
|
119
|
+
border-right: 1px solid ${(props) => props.theme.palette.divider};
|
|
120
|
+
width: 50%;
|
|
121
|
+
height: 250px;
|
|
122
|
+
overflow-y: auto;
|
|
218
123
|
`;
|
|
219
|
-
export const
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
width: 100%;
|
|
124
|
+
export const TimeMinuteSelect = styled.div `
|
|
125
|
+
width: 50%;
|
|
126
|
+
height: 250px;
|
|
223
127
|
overflow-y: auto;
|
|
224
128
|
`;
|
|
225
129
|
export const TimeItem = styled.div `
|
|
226
130
|
font-weight: 500;
|
|
227
|
-
font-size:
|
|
131
|
+
font-size: 10px;
|
|
228
132
|
color: ${(props) => props.theme.palette.text.primary};
|
|
229
133
|
text-align: center;
|
|
230
|
-
padding:
|
|
134
|
+
padding: 5px;
|
|
231
135
|
user-select: none;
|
|
232
136
|
cursor: pointer;
|
|
233
137
|
transition: all 0.2s ease-out;
|
|
234
|
-
border-radius: 4px;
|
|
235
|
-
margin: 1px 4px;
|
|
236
138
|
:hover {
|
|
237
139
|
background: ${(props) => props.theme.palette.action.hover};
|
|
238
140
|
}
|
|
239
|
-
|
|
240
|
-
&:focus-visible {
|
|
241
|
-
outline: 2px solid ${(props) => props.theme.palette.primary.main};
|
|
242
|
-
outline-offset: -2px;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
&[data-disabled="true"] {
|
|
246
|
-
cursor: not-allowed;
|
|
247
|
-
color: ${({ theme }) => theme.palette.text.secondary};
|
|
248
|
-
opacity: 0.62;
|
|
249
|
-
text-decoration: line-through;
|
|
250
|
-
|
|
251
|
-
&:hover {
|
|
252
|
-
background: transparent;
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
141
|
`;
|
|
256
142
|
export const TimeItemActive = styled(TimeItem) `
|
|
257
143
|
background: ${(props) => props.theme.palette.primary.main};
|
|
258
144
|
color: white;
|
|
259
|
-
font-weight: 700;
|
|
260
145
|
&:hover {
|
|
261
146
|
background: ${(props) => props.theme.palette.primary.main};
|
|
262
147
|
}
|
|
@@ -276,9 +161,4 @@ export const NoValueButton = styled.button `
|
|
|
276
161
|
:hover {
|
|
277
162
|
background: ${(props) => props.theme.palette.action.hover};
|
|
278
163
|
}
|
|
279
|
-
|
|
280
|
-
&:focus-visible {
|
|
281
|
-
outline: 2px solid ${(props) => props.theme.palette.primary.main};
|
|
282
|
-
outline-offset: 2px;
|
|
283
|
-
}
|
|
284
164
|
`;
|
|
@@ -8,10 +8,7 @@ export declare const HOURS12: {
|
|
|
8
8
|
value: number;
|
|
9
9
|
label: string;
|
|
10
10
|
}[];
|
|
11
|
-
export declare const MINUTES:
|
|
12
|
-
value: number;
|
|
13
|
-
label: string;
|
|
14
|
-
}[];
|
|
11
|
+
export declare const MINUTES: (string | number)[];
|
|
15
12
|
export declare const WEEK_DAYS: {
|
|
16
13
|
Sunday: string;
|
|
17
14
|
Monday: string;
|
|
@@ -38,8 +35,7 @@ export declare const CALENDAR_MONTHS: {
|
|
|
38
35
|
};
|
|
39
36
|
export declare const CALENDAR_WEEKS = 6;
|
|
40
37
|
export declare const zeroPad: (value: number, length: number) => string;
|
|
41
|
-
export declare const
|
|
42
|
-
export declare const getMonthDays: (month?: number, year?: number) => 28 | 30 | 29 | 31;
|
|
38
|
+
export declare const getMonthDays: (month?: number, year?: number) => 28 | 29 | 30 | 31;
|
|
43
39
|
export declare const getMonthFirstDay: (month?: number, year?: number) => number;
|
|
44
40
|
export declare const isDate: (date: Date) => boolean;
|
|
45
41
|
export declare const isSameMonth: (date: Date, basedate?: Date) => boolean;
|
|
@@ -12,25 +12,20 @@ export const HOURS24 = [...new Array(24)].map((n, index) => {
|
|
|
12
12
|
});
|
|
13
13
|
export const HOURS12 = [
|
|
14
14
|
...[...new Array(12)].map((n, index) => {
|
|
15
|
-
const displayHour = index === 0 ? 12 : index;
|
|
16
15
|
return {
|
|
17
16
|
value: index,
|
|
18
|
-
label:
|
|
17
|
+
label: index < 10 ? `0${index} AM` : `${index} AM`,
|
|
19
18
|
};
|
|
20
19
|
}),
|
|
21
20
|
...[...new Array(12)].map((n, index) => {
|
|
22
|
-
const displayHour = index === 0 ? 12 : index;
|
|
23
21
|
return {
|
|
24
22
|
value: index + 12,
|
|
25
|
-
label:
|
|
23
|
+
label: index < 10 ? `0${index} PM` : `${index} PM`,
|
|
26
24
|
};
|
|
27
25
|
}),
|
|
28
26
|
];
|
|
29
27
|
export const MINUTES = new Array(60).fill(0).map((n, index) => {
|
|
30
|
-
return {
|
|
31
|
-
value: index,
|
|
32
|
-
label: index < 10 ? `0${index}` : `${index}`,
|
|
33
|
-
};
|
|
28
|
+
return index < 10 ? `0${index}` : index;
|
|
34
29
|
});
|
|
35
30
|
export const WEEK_DAYS = {
|
|
36
31
|
Sunday: "Su",
|
|
@@ -63,13 +58,10 @@ export const CALENDAR_WEEKS = 6;
|
|
|
63
58
|
export const zeroPad = (value, length) => {
|
|
64
59
|
return `${value}`.padStart(length, "0");
|
|
65
60
|
};
|
|
66
|
-
export const createLocalDate = (year, month, day) => {
|
|
67
|
-
return new Date(year, month - 1, day);
|
|
68
|
-
};
|
|
69
61
|
// (int) Number days in a month for a given year from 28 - 31
|
|
70
62
|
export const getMonthDays = (month = THIS_MONTH, year = THIS_YEAR) => {
|
|
71
63
|
const months30 = [4, 6, 9, 11];
|
|
72
|
-
const leapYear = year % 4 === 0
|
|
64
|
+
const leapYear = year % 4 === 0;
|
|
73
65
|
return month === 2
|
|
74
66
|
? leapYear
|
|
75
67
|
? 29
|
|
@@ -81,7 +73,7 @@ export const getMonthDays = (month = THIS_MONTH, year = THIS_YEAR) => {
|
|
|
81
73
|
// (int) First day of the month for a given year from 1 - 7
|
|
82
74
|
// 1 => Sunday, 7 => Saturday
|
|
83
75
|
export const getMonthFirstDay = (month = THIS_MONTH, year = THIS_YEAR) => {
|
|
84
|
-
return
|
|
76
|
+
return +new Date(`${year}-${zeroPad(month, 2)}-01`).getDay() + 1;
|
|
85
77
|
};
|
|
86
78
|
// (bool) Checks if a value is a date - this is just a simple check
|
|
87
79
|
export const isDate = (date) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import styled from "styled-components";
|
|
3
3
|
import { useState, useEffect } from "react";
|
|
4
|
-
import {
|
|
4
|
+
import { FaCheckSquare, FaRegSquare, FaRegMinusSquare } from "react-icons/fa";
|
|
5
5
|
const CheckBox = styled(({ className, defaultValue = false, value, partialCheck = false, onChange = () => { }, }) => {
|
|
6
6
|
const [checkedState, setCheckedState] = useState(defaultValue);
|
|
7
7
|
const handleChange = (e) => {
|
|
@@ -14,47 +14,30 @@ const CheckBox = styled(({ className, defaultValue = false, value, partialCheck
|
|
|
14
14
|
setCheckedState(value);
|
|
15
15
|
}, [value]);
|
|
16
16
|
const _checked = value === undefined ? checkedState : value;
|
|
17
|
-
return (_jsx("div", { className: className, onClick: handleChange, children: partialCheck === true ? (_jsx(
|
|
17
|
+
return (_jsx("div", { className: className, onClick: handleChange, children: partialCheck === true ? (_jsx(FaRegMinusSquare, { className: "checkbox partial" })) : _checked === true ? (_jsx(FaCheckSquare, { className: "checkbox checked" })) : (_jsx(FaRegSquare, { className: "checkbox unchecked" })) }));
|
|
18
18
|
}) `
|
|
19
19
|
display: flex;
|
|
20
20
|
align-items: center;
|
|
21
21
|
cursor: pointer;
|
|
22
22
|
|
|
23
23
|
.checkbox {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
content: "";
|
|
42
|
-
position: absolute;
|
|
43
|
-
left: 50%;
|
|
44
|
-
top: 45%;
|
|
45
|
-
width: 32%;
|
|
46
|
-
height: 56%;
|
|
47
|
-
border: solid #fff;
|
|
48
|
-
border-width: 0 2px 2px 0;
|
|
49
|
-
transform: translate(-50%, -50%) rotate(45deg);
|
|
50
|
-
transform-origin: center;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.partial::after {
|
|
54
|
-
content: "";
|
|
55
|
-
width: 60%;
|
|
56
|
-
height: 2px;
|
|
57
|
-
background-color: #fff;
|
|
24
|
+
color: ${(props) => props.theme.palette.primary.main};
|
|
25
|
+
font-size: ${({ size }) => {
|
|
26
|
+
switch (size) {
|
|
27
|
+
case "xxs":
|
|
28
|
+
return "12px";
|
|
29
|
+
case "xs":
|
|
30
|
+
return "14px";
|
|
31
|
+
case "sm":
|
|
32
|
+
return "16px";
|
|
33
|
+
case "md":
|
|
34
|
+
return "18px";
|
|
35
|
+
case "lg":
|
|
36
|
+
return "20px";
|
|
37
|
+
default:
|
|
38
|
+
return "14px";
|
|
39
|
+
}
|
|
40
|
+
}};
|
|
58
41
|
}
|
|
59
42
|
`;
|
|
60
43
|
export default CheckBox;
|