@compsych/mobile-ui 1.0.28 → 1.0.30
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
CHANGED
|
@@ -119,14 +119,6 @@ export function DateTimePicker({
|
|
|
119
119
|
[viewYear, viewMonth, today, maxDate],
|
|
120
120
|
);
|
|
121
121
|
|
|
122
|
-
const isToday = useCallback(
|
|
123
|
-
(day: number) => {
|
|
124
|
-
const d = new Date(viewYear, viewMonth, day);
|
|
125
|
-
return toLocalDateString(d) === toLocalDateString(today);
|
|
126
|
-
},
|
|
127
|
-
[viewYear, viewMonth, today],
|
|
128
|
-
);
|
|
129
|
-
|
|
130
122
|
const isSelected = useCallback(
|
|
131
123
|
(day: number) => {
|
|
132
124
|
const d = new Date(viewYear, viewMonth, day);
|
|
@@ -148,7 +140,8 @@ export function DateTimePicker({
|
|
|
148
140
|
const sysOutline = cr.outline.sysOutline;
|
|
149
141
|
const sysOnSurface = cr.surface.surface.sysOnSurface;
|
|
150
142
|
const sysOnSurfaceVariant = cr.surface.surface.sysOnSurfaceVariant;
|
|
151
|
-
const
|
|
143
|
+
const sysSurfaceContainerHighest =
|
|
144
|
+
cr.surface.surfaceContainer.sysSurfaceContainerHighest;
|
|
152
145
|
|
|
153
146
|
const prevChevron = I18nManager.isRTL ? '>' : '<';
|
|
154
147
|
const nextChevron = I18nManager.isRTL ? '<' : '>';
|
|
@@ -163,7 +156,7 @@ export function DateTimePicker({
|
|
|
163
156
|
testID="calendar-picker"
|
|
164
157
|
style={[
|
|
165
158
|
styles.card,
|
|
166
|
-
{ borderColor: sysOutline, backgroundColor:
|
|
159
|
+
{ borderColor: sysOutline, backgroundColor: '#FFFFFF' },
|
|
167
160
|
]}
|
|
168
161
|
>
|
|
169
162
|
{/* Calendar section */}
|
|
@@ -237,24 +230,16 @@ export function DateTimePicker({
|
|
|
237
230
|
}
|
|
238
231
|
const disabled = isDisabled(day);
|
|
239
232
|
const selected = isSelected(day);
|
|
240
|
-
const todayDay = isToday(day);
|
|
241
233
|
|
|
242
234
|
const cellStyle = [
|
|
243
235
|
styles.dayCellInner,
|
|
236
|
+
!disabled &&
|
|
237
|
+
!selected && { backgroundColor: sysSurfaceContainerHighest },
|
|
244
238
|
selected && {
|
|
239
|
+
backgroundColor: '#FFFFFF',
|
|
245
240
|
borderColor: sysPrimary,
|
|
246
241
|
borderWidth: 2,
|
|
247
|
-
shadowColor: sysPrimary,
|
|
248
|
-
shadowOffset: { width: 1, height: 2 },
|
|
249
|
-
shadowOpacity: 1,
|
|
250
|
-
shadowRadius: 0,
|
|
251
|
-
elevation: 2,
|
|
252
242
|
},
|
|
253
|
-
!selected &&
|
|
254
|
-
todayDay && {
|
|
255
|
-
borderColor: sysPrimary,
|
|
256
|
-
borderWidth: 1.5,
|
|
257
|
-
},
|
|
258
243
|
disabled && styles.dayCellDisabled,
|
|
259
244
|
];
|
|
260
245
|
|
|
@@ -316,7 +301,7 @@ export function DateTimePicker({
|
|
|
316
301
|
{
|
|
317
302
|
borderColor: slotSelected ? sysPrimary : sysOutline,
|
|
318
303
|
borderWidth: slotSelected ? 2 : 1.5,
|
|
319
|
-
backgroundColor:
|
|
304
|
+
backgroundColor: '#FFFFFF',
|
|
320
305
|
},
|
|
321
306
|
slotSelected && {
|
|
322
307
|
shadowColor: sysPrimary,
|