@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.
Files changed (205) hide show
  1. package/dist/Button/Button.js +58 -9
  2. package/dist/Calendar/Calendar.d.ts +2 -7
  3. package/dist/Calendar/Calendar.js +49 -226
  4. package/dist/Calendar/CalendarStyles.d.ts +2 -6
  5. package/dist/Calendar/CalendarStyles.js +33 -153
  6. package/dist/Calendar/calendarHelpers.d.ts +2 -6
  7. package/dist/Calendar/calendarHelpers.js +5 -13
  8. package/dist/CheckBox/CheckBox.js +19 -36
  9. package/dist/DateInput/DateInput.js +143 -198
  10. package/dist/DropDownMenu/DropDownMenu.js +15 -25
  11. package/dist/DropDownMenu/components/MenuComponent.js +2 -8
  12. package/dist/DropDownMenu/components/MenuItem.d.ts +0 -2
  13. package/dist/DropDownMenu/components/MenuItem.js +21 -25
  14. package/dist/DropDownMenu/components/MenuItemList.d.ts +0 -3
  15. package/dist/DropDownMenu/components/MenuItemList.js +86 -192
  16. package/dist/DropDownMenu/components/StyledContent.js +2 -1
  17. package/dist/DropDownMenu/components/StyledFloatContainer.js +1 -1
  18. package/dist/DropDownMenu/types.d.ts +0 -3
  19. package/dist/FieldLabel/FieldLabel.js +12 -4
  20. package/dist/FileInputField/FileInputField.js +23 -4
  21. package/dist/FileViewer/viewers/ImageViewer.js +18 -75
  22. package/dist/FormSection/FormSection.js +25 -5
  23. package/dist/IconButton/IconButton.js +16 -2
  24. package/dist/Input/Input.js +56 -7
  25. package/dist/MonolithUIProvider/MonolithUIProvider.d.ts +0 -1
  26. package/dist/Pill/Pill.js +79 -8
  27. package/dist/Popover/Popover.context.d.ts +1 -2
  28. package/dist/Popover/Popover.js +2 -5
  29. package/dist/Popover/Popover.styles.d.ts +6 -1
  30. package/dist/Popover/Popover.styles.js +28 -11
  31. package/dist/Popover/Popover.transitions.d.ts +2 -4
  32. package/dist/Popover/Popover.transitions.js +49 -23
  33. package/dist/Popover/PopoverDropdown.js +8 -6
  34. package/dist/Popover/PopoverTarget.js +3 -6
  35. package/dist/QueryFilter/DefaultOperators.d.ts +76 -0
  36. package/dist/QueryFilter/DefaultOperators.js +21 -0
  37. package/dist/QueryFilter/QueryFilter.d.ts +1 -1
  38. package/dist/QueryFilter/QueryFilter.js +303 -3
  39. package/dist/QueryFilter/index.d.ts +2 -3
  40. package/dist/QueryFilter/index.js +2 -3
  41. package/dist/QueryFilter/{QueryFilter.types.d.ts → types.d.ts} +2 -11
  42. package/dist/QueryFilter/useQueryFilter.d.ts +1 -1
  43. package/dist/QueryFilter/useQueryFilter.js +19 -23
  44. package/dist/RichTextEditor/Extensions/getTiptapExtensions.js +15 -5
  45. package/dist/RichTextEditor/Plugins/UploadImagesPlugin.d.ts +0 -15
  46. package/dist/RichTextEditor/Plugins/UploadImagesPlugin.js +51 -115
  47. package/dist/RichTextEditor/Plugins/index.d.ts +0 -1
  48. package/dist/RichTextEditor/Plugins/index.js +0 -1
  49. package/dist/RichTextEditor/RichTextEditor.d.ts +2 -3
  50. package/dist/RichTextEditor/RichTextEditor.js +35 -309
  51. package/dist/RichTextEditor/Toolbar/Toolbar.js +2 -14
  52. package/dist/SegmentedControl/SegmentedControl.utils.d.ts +2 -2
  53. package/dist/SegmentedControl/SegmentedControl.utils.js +30 -3
  54. package/dist/SelectBox/SelectBox.js +5 -5
  55. package/dist/SelectBox/select-box.styled-components.d.ts +1 -4
  56. package/dist/SelectBox/select-box.styled-components.js +48 -11
  57. package/dist/SelectBox/types.d.ts +0 -1
  58. package/dist/Switch/Switch.d.ts +2 -2
  59. package/dist/Switch/Switch.js +83 -18
  60. package/dist/Table/ColumnResizer.d.ts +9 -6
  61. package/dist/Table/ColumnResizer.js +10 -30
  62. package/dist/Table/StateStorage.d.ts +0 -4
  63. package/dist/Table/StateStorage.js +0 -13
  64. package/dist/Table/Table.js +12 -160
  65. package/dist/Table/TableComponents.d.ts +0 -10
  66. package/dist/Table/TableComponents.js +10 -71
  67. package/dist/Table/TableDefaults.d.ts +0 -7
  68. package/dist/Table/TableDefaults.js +0 -7
  69. package/dist/Table/TableHeader.js +16 -31
  70. package/dist/Table/TableMenu/TableMenu.js +1 -1
  71. package/dist/Table/TableProvider.js +75 -354
  72. package/dist/Table/TableRow.js +16 -28
  73. package/dist/Table/Utils/index.d.ts +1 -0
  74. package/dist/Table/Utils/index.js +1 -0
  75. package/dist/Table/Utils/resizeHandler.d.ts +3 -0
  76. package/dist/Table/Utils/resizeHandler.js +84 -0
  77. package/dist/Table/types.d.ts +19 -70
  78. package/dist/Tabs/Tab.js +0 -8
  79. package/dist/TagBox/TagBox.d.ts +1 -1
  80. package/dist/TagBox/TagBox.js +208 -50
  81. package/dist/TagBox/types.d.ts +13 -1
  82. package/dist/TextArea/TextArea.js +23 -9
  83. package/dist/TextInput/TextInput.js +6 -12
  84. package/dist/Utilities/parseTimestamp.js +6 -11
  85. package/dist/core/ArrowButton.d.ts +0 -2
  86. package/dist/core/ArrowButton.js +3 -7
  87. package/dist/core/ClearButton.d.ts +0 -2
  88. package/dist/core/ClearButton.js +3 -7
  89. package/dist/core/controlSizes.d.ts +0 -26
  90. package/dist/core/controlSizes.js +0 -156
  91. package/dist/index.d.ts +0 -3
  92. package/dist/index.js +0 -2
  93. package/dist/theme/variants.js +0 -2
  94. package/package.json +18 -26
  95. package/dist/Charts/BarChart/BarChart.d.ts +0 -5
  96. package/dist/Charts/BarChart/BarChart.js +0 -549
  97. package/dist/Charts/BarChart/BarChart.lib.d.ts +0 -31
  98. package/dist/Charts/BarChart/BarChart.lib.js +0 -136
  99. package/dist/Charts/BarChart/BarChart.styled.d.ts +0 -51
  100. package/dist/Charts/BarChart/BarChart.styled.js +0 -115
  101. package/dist/Charts/BarChart/BarChart.types.d.ts +0 -171
  102. package/dist/Charts/BarChart/index.d.ts +0 -3
  103. package/dist/Charts/BarChart/index.js +0 -2
  104. package/dist/Charts/ChartPrimitives/ChartExportControl.d.ts +0 -11
  105. package/dist/Charts/ChartPrimitives/ChartExportControl.js +0 -29
  106. package/dist/Charts/ChartPrimitives/chartActions.styled.d.ts +0 -1
  107. package/dist/Charts/ChartPrimitives/chartActions.styled.js +0 -8
  108. package/dist/Charts/ChartPrimitives/chartLegend.styled.d.ts +0 -12
  109. package/dist/Charts/ChartPrimitives/chartLegend.styled.js +0 -52
  110. package/dist/Charts/ChartPrimitives/chartTooltip.styled.d.ts +0 -19
  111. package/dist/Charts/ChartPrimitives/chartTooltip.styled.js +0 -61
  112. package/dist/Charts/ChartPrimitives/index.d.ts +0 -4
  113. package/dist/Charts/ChartPrimitives/index.js +0 -4
  114. package/dist/Charts/ChartUtils/chartColors.d.ts +0 -8
  115. package/dist/Charts/ChartUtils/chartColors.js +0 -65
  116. package/dist/Charts/ChartUtils/chartExport.d.ts +0 -47
  117. package/dist/Charts/ChartUtils/chartExport.js +0 -311
  118. package/dist/Charts/ChartUtils/chartMath.d.ts +0 -3
  119. package/dist/Charts/ChartUtils/chartMath.js +0 -3
  120. package/dist/Charts/ChartUtils/index.d.ts +0 -3
  121. package/dist/Charts/ChartUtils/index.js +0 -3
  122. package/dist/Charts/HeatMap/HeatMap.d.ts +0 -5
  123. package/dist/Charts/HeatMap/HeatMap.js +0 -212
  124. package/dist/Charts/HeatMap/HeatMap.lib.d.ts +0 -30
  125. package/dist/Charts/HeatMap/HeatMap.lib.js +0 -115
  126. package/dist/Charts/HeatMap/HeatMap.styled.d.ts +0 -37
  127. package/dist/Charts/HeatMap/HeatMap.styled.js +0 -91
  128. package/dist/Charts/HeatMap/HeatMap.types.d.ts +0 -80
  129. package/dist/Charts/HeatMap/HeatMap.types.js +0 -1
  130. package/dist/Charts/HeatMap/index.d.ts +0 -3
  131. package/dist/Charts/HeatMap/index.js +0 -2
  132. package/dist/Charts/LineChart/LineChart.d.ts +0 -5
  133. package/dist/Charts/LineChart/LineChart.js +0 -529
  134. package/dist/Charts/LineChart/LineChart.lib.d.ts +0 -24
  135. package/dist/Charts/LineChart/LineChart.lib.js +0 -132
  136. package/dist/Charts/LineChart/LineChart.styled.d.ts +0 -59
  137. package/dist/Charts/LineChart/LineChart.styled.js +0 -147
  138. package/dist/Charts/LineChart/LineChart.types.d.ts +0 -193
  139. package/dist/Charts/LineChart/LineChart.types.js +0 -1
  140. package/dist/Charts/LineChart/index.d.ts +0 -3
  141. package/dist/Charts/LineChart/index.js +0 -2
  142. package/dist/Charts/PieChart/PieChart.d.ts +0 -4
  143. package/dist/Charts/PieChart/PieChart.js +0 -199
  144. package/dist/Charts/PieChart/PieChart.lib.d.ts +0 -5
  145. package/dist/Charts/PieChart/PieChart.lib.js +0 -19
  146. package/dist/Charts/PieChart/PieChart.styled.d.ts +0 -51
  147. package/dist/Charts/PieChart/PieChart.styled.js +0 -163
  148. package/dist/Charts/PieChart/PieChart.types.d.ts +0 -100
  149. package/dist/Charts/PieChart/PieChart.types.js +0 -1
  150. package/dist/Charts/PieChart/index.d.ts +0 -2
  151. package/dist/Charts/PieChart/index.js +0 -1
  152. package/dist/Charts/index.d.ts +0 -5
  153. package/dist/Charts/index.js +0 -4
  154. package/dist/QueryFilter/QueryFilter.constants.d.ts +0 -134
  155. package/dist/QueryFilter/QueryFilter.constants.js +0 -39
  156. package/dist/QueryFilter/QueryFilter.lib.d.ts +0 -14
  157. package/dist/QueryFilter/QueryFilter.lib.js +0 -84
  158. package/dist/QueryFilter/QueryFilter.styled.d.ts +0 -89
  159. package/dist/QueryFilter/QueryFilter.styled.js +0 -184
  160. package/dist/QueryFilter/QueryFilter.types.js +0 -1
  161. package/dist/QueryFilter/components/MultiSelectEditor.d.ts +0 -7
  162. package/dist/QueryFilter/components/MultiSelectEditor.js +0 -44
  163. package/dist/QueryFilter/components/RuleChip.d.ts +0 -8
  164. package/dist/QueryFilter/components/RuleChip.js +0 -37
  165. package/dist/QueryFilter/components/Rules.d.ts +0 -11
  166. package/dist/QueryFilter/components/Rules.js +0 -41
  167. package/dist/QueryFilter/components/UnavailableRuleChip.d.ts +0 -5
  168. package/dist/QueryFilter/components/UnavailableRuleChip.js +0 -7
  169. package/dist/QueryFilter/components/ValueEditor.d.ts +0 -7
  170. package/dist/QueryFilter/components/ValueEditor.js +0 -45
  171. package/dist/QueryFilter/components/ValueSelector.d.ts +0 -7
  172. package/dist/QueryFilter/components/ValueSelector.js +0 -34
  173. package/dist/QueryFilter/components/index.d.ts +0 -6
  174. package/dist/QueryFilter/components/index.js +0 -6
  175. package/dist/RichTextEditor/Plugins/ImageActionsPlugin.d.ts +0 -3
  176. package/dist/RichTextEditor/Plugins/ImageActionsPlugin.js +0 -241
  177. package/dist/SuperDatePicker/SuperDatePicker.constants.d.ts +0 -24
  178. package/dist/SuperDatePicker/SuperDatePicker.constants.js +0 -30
  179. package/dist/SuperDatePicker/SuperDatePicker.d.ts +0 -3
  180. package/dist/SuperDatePicker/SuperDatePicker.js +0 -31
  181. package/dist/SuperDatePicker/SuperDatePicker.lib.d.ts +0 -17
  182. package/dist/SuperDatePicker/SuperDatePicker.lib.js +0 -206
  183. package/dist/SuperDatePicker/SuperDatePicker.styled.d.ts +0 -60
  184. package/dist/SuperDatePicker/SuperDatePicker.styled.js +0 -256
  185. package/dist/SuperDatePicker/SuperDatePicker.types.d.ts +0 -48
  186. package/dist/SuperDatePicker/SuperDatePicker.types.js +0 -1
  187. package/dist/SuperDatePicker/components/CommonPresetGroups.d.ts +0 -7
  188. package/dist/SuperDatePicker/components/CommonPresetGroups.js +0 -6
  189. package/dist/SuperDatePicker/components/EndpointCalendarDropdown.d.ts +0 -10
  190. package/dist/SuperDatePicker/components/EndpointCalendarDropdown.js +0 -9
  191. package/dist/SuperDatePicker/components/EndpointDateInput.d.ts +0 -16
  192. package/dist/SuperDatePicker/components/EndpointDateInput.js +0 -26
  193. package/dist/SuperDatePicker/components/EndpointPopover.d.ts +0 -18
  194. package/dist/SuperDatePicker/components/EndpointPopover.js +0 -11
  195. package/dist/SuperDatePicker/components/QuickRangeDropdown.d.ts +0 -14
  196. package/dist/SuperDatePicker/components/QuickRangeDropdown.js +0 -19
  197. package/dist/SuperDatePicker/components/QuickRangePopover.d.ts +0 -18
  198. package/dist/SuperDatePicker/components/QuickRangePopover.js +0 -12
  199. package/dist/SuperDatePicker/components/index.d.ts +0 -6
  200. package/dist/SuperDatePicker/components/index.js +0 -6
  201. package/dist/SuperDatePicker/index.d.ts +0 -3
  202. package/dist/SuperDatePicker/index.js +0 -3
  203. package/dist/SuperDatePicker/useSuperDatePicker.d.ts +0 -32
  204. package/dist/SuperDatePicker/useSuperDatePicker.js +0 -125
  205. /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
- width: 268px;
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, 32px);
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: 8px 4px;
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
- min-width: 32px;
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: 11px;
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: 11px;
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
- cursor: not-allowed;
120
- color: ${({ theme }) => theme.palette.text.secondary};
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: ${(props) => `${props.theme.palette.primary.main}14`} !important;
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
- left: 50%;
162
- bottom: 3px;
163
- width: 4px;
164
- height: 4px;
165
- border-radius: 999px;
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) => `${props.theme.palette.primary.main}20`} !important;
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: 132px;
179
- height: auto;
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: 238px;
105
+ height: 100%;
189
106
  `;
190
107
  export const TimeHeader = styled.div `
191
- box-sizing: border-box;
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: 6px 5px;
198
- line-height: 1.25;
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 TimeZoneBadge = styled.span `
210
- padding: 2px 5px;
211
- border-radius: 4px;
212
- background: ${(props) => props.theme.palette.action.hover};
213
- color: ${(props) => props.theme.palette.text.secondary};
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 TimeSelectList = styled.div `
220
- flex: 1 1 auto;
221
- min-height: 0;
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: 11px;
131
+ font-size: 10px;
228
132
  color: ${(props) => props.theme.palette.text.primary};
229
133
  text-align: center;
230
- padding: 6px 5px;
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 createLocalDate: (year: number, month: number, day: number) => Date;
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: displayHour < 10 ? `0${displayHour} AM` : `${displayHour} AM`,
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: displayHour < 10 ? `0${displayHour} PM` : `${displayHour} PM`,
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 && (year % 100 !== 0 || year % 400 === 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 createLocalDate(year, month, 1).getDay() + 1;
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 { getControlSizeTokens } from "../core";
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("span", { className: "checkbox partial" })) : _checked === true ? (_jsx("span", { className: "checkbox checked" })) : (_jsx("span", { className: "checkbox unchecked" })) }));
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
- position: relative;
25
- display: inline-flex;
26
- align-items: center;
27
- justify-content: center;
28
- box-sizing: border-box;
29
- width: ${({ size }) => `${getControlSizeTokens(size).checkboxIconSize}px`};
30
- height: ${({ size }) => `${getControlSizeTokens(size).checkboxIconSize}px`};
31
- border: 1px solid ${(props) => props.theme.palette.primary.main};
32
- border-radius: 2px;
33
- }
34
-
35
- .checked,
36
- .partial {
37
- background-color: ${(props) => props.theme.palette.primary.main};
38
- }
39
-
40
- .checked::after {
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;