@homefile/components-v2 2.8.16 → 2.8.18
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/components/forms/dynamicForm/fields/DateField.js +1 -1
- package/dist/components/inputs/DatePicker.d.ts +1 -0
- package/dist/components/inputs/DatePicker.js +30 -11
- package/dist/components/inputs/DateRangePicker.d.ts +2 -0
- package/dist/components/inputs/DateRangePicker.js +22 -6
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/styles/calendar.css +7 -672
- package/package.json +3 -2
- package/src/components/forms/dynamicForm/fields/DateField.tsx +2 -2
- package/src/components/inputs/DatePicker.tsx +40 -19
- package/src/components/inputs/DateRangePicker.tsx +39 -17
- package/src/index.ts +2 -1
- package/src/styles/calendar.css +7 -672
package/dist/styles/calendar.css
CHANGED
|
@@ -1,679 +1,14 @@
|
|
|
1
|
-
.
|
|
2
|
-
position: relative;
|
|
3
|
-
display: inline-block;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.DatePicker__input {
|
|
7
|
-
background: #fff;
|
|
8
|
-
border: 1px solid #ddd;
|
|
9
|
-
padding: 0.4em 0.8em;
|
|
10
|
-
font-family: inherit;
|
|
11
|
-
text-align: center;
|
|
12
|
-
font-size: 12px;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.DatePicker__input.-rtl {
|
|
16
|
-
direction: rtl;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.DatePicker__input::placeholder {
|
|
20
|
-
color: #979797;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.DatePicker__calendarContainer.-top+.DatePicker__calendarArrow {
|
|
24
|
-
top: auto;
|
|
25
|
-
bottom: calc(100% + 10px);
|
|
26
|
-
transform: translateY(-2.5rem) rotate(180deg);
|
|
27
|
-
animation: fadeArrowFlipped 0.3s forwards;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.DatePicker__calendarContainer {
|
|
31
|
-
position: absolute;
|
|
32
|
-
top: calc(100% + 20px);
|
|
33
|
-
left: 50%;
|
|
34
|
-
transform: translateX(-50%);
|
|
35
|
-
z-index: 10;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.DatePicker__calendarContainer.-top {
|
|
39
|
-
top: auto;
|
|
40
|
-
bottom: calc(100% + 20px);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.Calendar,
|
|
44
|
-
.Calendar * {
|
|
45
|
-
margin: 0;
|
|
46
|
-
padding: 0;
|
|
47
|
-
box-sizing: border-box;
|
|
48
|
-
direction: ltr;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.Calendar,
|
|
52
|
-
.Calendar.-rtl * {
|
|
53
|
-
direction: rtl;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.DatePicker__calendarArrow {
|
|
57
|
-
position: absolute;
|
|
58
|
-
width: 0;
|
|
59
|
-
height: 0;
|
|
60
|
-
top: calc(100% + 10px);
|
|
61
|
-
left: 0;
|
|
62
|
-
right: 0;
|
|
63
|
-
margin: 0 auto;
|
|
64
|
-
border-style: solid;
|
|
65
|
-
z-index: 10;
|
|
66
|
-
border-width: 0 10px 10px 10px;
|
|
67
|
-
border-color: transparent transparent #fff transparent;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.Calendar {
|
|
71
|
-
--cl-color-black: #444444;
|
|
72
|
-
--cl-color-disabled: #d4d4d4;
|
|
73
|
-
--cl-color-error: #ff2929;
|
|
74
|
-
font-size: 8px;
|
|
75
|
-
background: #fff;
|
|
76
|
-
box-shadow: 0 1em 4em rgba(0, 0, 0, 0.07);
|
|
77
|
-
border-radius: 1em;
|
|
78
|
-
position: relative;
|
|
79
|
-
user-select: none;
|
|
80
|
-
padding-top: 1.2em;
|
|
81
|
-
display: flex;
|
|
82
|
-
flex-direction: column;
|
|
83
|
-
width: 33em;
|
|
84
|
-
z-index: 10;
|
|
85
|
-
max-width: 90vw;
|
|
86
|
-
min-height: 36.7em;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.DatePicker .Calendar,
|
|
90
|
-
.DatePicker__calendarArrow {
|
|
91
|
-
transform: translateY(2.5em);
|
|
92
|
-
opacity: 0;
|
|
93
|
-
animation: fadeCalendar 0.3s forwards;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.DatePicker__calendarContainer.-top .Calendar {
|
|
97
|
-
transform: translateY(-2.5em);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.Calendar.-noFocusOutline *:focus {
|
|
101
|
-
outline: none !important;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.Calendar> :not(.Calendar__footer) button {
|
|
105
|
-
font-family: inherit;
|
|
106
|
-
background: transparent;
|
|
107
|
-
cursor: pointer;
|
|
108
|
-
-webkit-tap-highlight-color: transparent;
|
|
109
|
-
outline: none;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.Calendar__header {
|
|
113
|
-
display: flex;
|
|
114
|
-
color: var(--cl-color-black);
|
|
115
|
-
padding: 2em 2.9em;
|
|
116
|
-
align-items: center;
|
|
117
|
-
overflow: hidden;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
.Calendar__monthArrowWrapper {
|
|
121
|
-
line-height: 0;
|
|
122
|
-
font-size: 1em;
|
|
123
|
-
padding: 3px;
|
|
124
|
-
position: relative;
|
|
1
|
+
.custom-calendar {
|
|
125
2
|
border: none;
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
.Calendar__monthArrowWrapper:focus {
|
|
132
|
-
outline: 1px dashed rgba(0, 0, 0, 0.4);
|
|
133
|
-
outline-offset: 2px;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
.Calendar__monthArrowWrapper:disabled,
|
|
137
|
-
.Calendar__monthArrowWrapper.-hidden {
|
|
138
|
-
opacity: 0;
|
|
139
|
-
pointer-events: none;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
.Calendar__monthArrowWrapper.-left {
|
|
143
|
-
transform: rotate(90deg);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.Calendar.-rtl .Calendar__monthArrowWrapper.-left {
|
|
147
|
-
transform: rotate(-90deg);
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.Calendar__monthArrowWrapper.-right {
|
|
151
|
-
transform: rotate(-90deg);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.Calendar.-rtl .Calendar__monthArrowWrapper.-right {
|
|
155
|
-
transform: rotate(90deg);
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
.Calendar__monthArrowWrapper:active .Calendar__monthArrow {
|
|
159
|
-
transform: scale(0.7);
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
.Calendar__monthArrow {
|
|
163
|
-
border-radius: 50%;
|
|
164
|
-
transition: var(--animation-duration) transform;
|
|
165
|
-
pointer-events: none;
|
|
166
|
-
background-repeat: no-repeat;
|
|
167
|
-
display: block;
|
|
168
|
-
width: 1.7em;
|
|
169
|
-
height: 1.7em;
|
|
170
|
-
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cg class='nc-icon-wrapper' fill='%23000000'%3E%3Cdefs stroke='none'%3E%3C/defs%3E%3Cpath class='cls-1' d='M12 23.25V.75' fill='none' stroke='%23000000' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5px'%3E%3C/path%3E%3Cpath class='cls-2' d='M22.5 11.25L12 .75 1.5 11.25' fill='none' stroke='%23000000' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5px' fill-rule='evenodd'%3E%3C/path%3E%3C/g%3E%3C/svg%3E");
|
|
171
|
-
background-size: 100% 100%;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
.Calendar__monthYearContainer {
|
|
175
|
-
flex: 1;
|
|
176
|
-
position: relative;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
.Calendar__monthYear {
|
|
180
|
-
font-size: 1.6em;
|
|
181
|
-
font-weight: 500;
|
|
182
|
-
display: flex;
|
|
183
|
-
align-items: center;
|
|
184
|
-
position: absolute;
|
|
185
|
-
top: 0;
|
|
186
|
-
bottom: 0;
|
|
187
|
-
left: 50%;
|
|
188
|
-
will-change: transform, opacity;
|
|
189
|
-
backface-visibility: hidden;
|
|
190
|
-
transform: translateZ(0);
|
|
191
|
-
transition: var(--animation-duration);
|
|
192
|
-
line-height: 1;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
.Calendar__monthYear.-hiddenNext {
|
|
196
|
-
opacity: 0;
|
|
197
|
-
transform: translateX(50%);
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
.Calendar.-rtl .Calendar__monthYear.-hiddenNext {
|
|
201
|
-
transform: translateX(-150%);
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
.Calendar__monthYear.-hiddenPrevious {
|
|
205
|
-
opacity: 0;
|
|
206
|
-
transform: translateX(-150%);
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
.Calendar.-rtl .Calendar__monthYear.-hiddenPrevious {
|
|
210
|
-
transform: translateX(50%);
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
.Calendar__monthYear.-shown {
|
|
214
|
-
opacity: 1;
|
|
215
|
-
margin-top: auto;
|
|
216
|
-
margin-bottom: auto;
|
|
217
|
-
transform: translateX(-50%);
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
.Calendar__monthYear.-shownAnimated {
|
|
221
|
-
animation: var(--animation-duration) fadeTextToCenter forwards;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
.Calendar__monthYear>* {
|
|
225
|
-
padding: 0.2em 0.5em;
|
|
226
|
-
border: 1px solid transparent;
|
|
227
|
-
transition: var(--animation-duration);
|
|
228
|
-
font-size: 1.05em;
|
|
229
|
-
display: flex;
|
|
230
|
-
justify-content: center;
|
|
231
|
-
align-items: center;
|
|
232
|
-
transform: translateX(0) scale(0.95);
|
|
233
|
-
will-change: transform;
|
|
234
|
-
border-radius: 5px;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
.Calendar__monthYear:not(.-shown)>*,
|
|
238
|
-
.Calendar__monthYear>*.-hidden {
|
|
239
|
-
cursor: default;
|
|
240
|
-
pointer-events: none;
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
.Calendar__monthText {
|
|
244
|
-
margin-left: -0.3em;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
.Calendar__yearText:last-child {
|
|
248
|
-
margin-right: -0.3em;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
.Calendar__monthYear.-shown>*:hover,
|
|
252
|
-
.Calendar:not(.-noFocusOutline) .Calendar__monthYear.-shown>*:focus,
|
|
253
|
-
.Calendar__monthYear>*.-activeBackground {
|
|
254
|
-
background: #f5f5f5;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
.Calendar__monthText:hover {
|
|
258
|
-
transform: translateX(-0.2em) scale(0.95);
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
.Calendar.-rtl .Calendar__monthText:hover {
|
|
262
|
-
transform: translateX(0.2em) scale(0.95);
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
.Calendar__yearText:hover {
|
|
266
|
-
transform: translateX(0.2em) scale(0.95);
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
.Calendar.-rtl .Calendar__yearText:hover {
|
|
270
|
-
transform: translateX(-0.2em) scale(0.95);
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
.Calendar__monthYear .Calendar__yearText.-hidden {
|
|
274
|
-
transform: translateX(50%);
|
|
275
|
-
opacity: 0;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
.Calendar.-rtl .Calendar__monthYear .Calendar__yearText.-hidden {
|
|
279
|
-
transform: translateX(-50%);
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
.Calendar__monthYear .Calendar__monthText.-hidden {
|
|
283
|
-
transform: translateX(-50%);
|
|
284
|
-
opacity: 0;
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
.Calendar.-rtl .Calendar__monthYear .Calendar__monthText.-hidden {
|
|
288
|
-
transform: translateX(50%);
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
.Calendar__monthYear:not(.-shown)>* {
|
|
292
|
-
pointer-events: none;
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
.Calendar__monthSelectorAnimationWrapper,
|
|
296
|
-
.Calendar__yearSelectorAnimationWrapper {
|
|
297
|
-
position: absolute;
|
|
298
|
-
width: 100%;
|
|
299
|
-
height: 80%;
|
|
300
|
-
bottom: 0;
|
|
301
|
-
display: flex;
|
|
302
|
-
justify-content: center;
|
|
303
|
-
align-items: center;
|
|
304
|
-
overflow: hidden;
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
.Calendar__monthSelectorWrapper {
|
|
308
|
-
width: 100%;
|
|
309
|
-
height: 100%;
|
|
310
|
-
display: flex;
|
|
311
|
-
justify-content: center;
|
|
312
|
-
align-items: center;
|
|
313
|
-
}
|
|
3
|
+
box-shadow: 0 0 40px rgba(0, 0, 0, 0.2);
|
|
4
|
+
border-radius: 1em;
|
|
5
|
+
background: #fff;
|
|
6
|
+
padding: 1em;
|
|
7
|
+
font-family: 'Assistant', sans-serif;
|
|
314
8
|
|
|
315
|
-
.Calendar__monthSelector {
|
|
316
|
-
padding: 0 2.5em;
|
|
317
|
-
align-content: center;
|
|
318
|
-
padding-bottom: 2em;
|
|
319
9
|
}
|
|
320
10
|
|
|
321
|
-
.
|
|
322
|
-
.Calendar__yearSelector {
|
|
323
|
-
display: flex;
|
|
324
|
-
flex-wrap: wrap;
|
|
325
|
-
position: relative;
|
|
326
|
-
z-index: 2;
|
|
11
|
+
.custom-calendar .react-datepicker__header {
|
|
327
12
|
background-color: #fff;
|
|
328
|
-
transform: translateY(-150%);
|
|
329
|
-
will-change: transform;
|
|
330
|
-
transition: 0.6s;
|
|
331
|
-
height: 100%;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
.Calendar__yearSelectorWrapper {
|
|
335
|
-
width: 100%;
|
|
336
|
-
height: 100%;
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
.Calendar__yearSelectorWrapper::after,
|
|
340
|
-
.Calendar__yearSelectorWrapper::before {
|
|
341
|
-
content: '';
|
|
342
|
-
width: 100%;
|
|
343
|
-
height: 5em;
|
|
344
|
-
position: absolute;
|
|
345
|
-
left: 0;
|
|
346
|
-
opacity: 0;
|
|
347
|
-
transition: 0.4s;
|
|
348
|
-
transition-delay: 0.2s;
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
.Calendar__yearSelectorWrapper::after {
|
|
352
|
-
background-image: linear-gradient(to bottom, #fff, #fff 10%, rgba(245, 245, 245, 0));
|
|
353
|
-
top: -0.1em;
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
.Calendar__yearSelectorWrapper::before {
|
|
357
|
-
background-image: linear-gradient(to top, #fff, #fff 10%, rgba(245, 245, 245, 0));
|
|
358
|
-
bottom: 0;
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
.Calendar__yearSelectorWrapper.-faded::after,
|
|
362
|
-
.Calendar__yearSelectorWrapper.-faded::before {
|
|
363
|
-
opacity: 1;
|
|
364
|
-
z-index: 3;
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
.Calendar__yearSelector {
|
|
368
|
-
align-content: flex-start;
|
|
369
|
-
scrollbar-width: 0;
|
|
370
|
-
overflow: scroll;
|
|
371
|
-
position: relative;
|
|
372
|
-
width: 100%;
|
|
373
|
-
padding: 5em 2em;
|
|
374
|
-
-ms-overflow-style: none;
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
.Calendar__yearSelector::-webkit-scrollbar {
|
|
378
|
-
display: none;
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
.Calendar__yearSelectorItem {
|
|
382
|
-
width: 25%;
|
|
383
|
-
display: flex;
|
|
384
|
-
justify-content: center;
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
.Calendar__yearSelectorItem:not(:nth-child(-n + 4)) {
|
|
388
|
-
margin-top: 1.5em;
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
.Calendar__yearSelectorText {
|
|
392
|
-
border: none;
|
|
393
|
-
font-size: 1.4em;
|
|
394
|
-
min-width: 85%;
|
|
395
|
-
padding: 0.2em 0.5em;
|
|
396
|
-
border-radius: 8.5px;
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
.Calendar__monthSelector.-open,
|
|
400
|
-
.Calendar__yearSelector.-open {
|
|
401
|
-
transform: translateY(0);
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
.Calendar__yearSelectorText:focus,
|
|
405
|
-
.Calendar__monthSelectorItemText:focus {
|
|
406
|
-
outline: 1px dashed rgba(0, 0, 0, 0.4);
|
|
407
|
-
outline-offset: 2px;
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
.Calendar__monthSelectorItem {
|
|
411
|
-
width: calc(100% / 3);
|
|
412
|
-
display: flex;
|
|
413
|
-
justify-content: center;
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
.Calendar__monthSelectorItem:not(:nth-child(-n + 3)) {
|
|
417
|
-
margin-top: 2em;
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
.Calendar__monthSelectorItemText {
|
|
421
13
|
border: none;
|
|
422
|
-
padding: 0.4em 0.4em;
|
|
423
|
-
border-radius: 8.5px;
|
|
424
|
-
font-size: 1.3em;
|
|
425
|
-
min-width: 70%;
|
|
426
|
-
transition: 0.3s;
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
.Calendar__monthSelectorItem:not(.-active) .Calendar__monthSelectorItemText:not(:disabled):hover,
|
|
430
|
-
.Calendar__yearSelectorItem:not(.-active) .Calendar__yearSelectorText:not(:disabled):hover {
|
|
431
|
-
background: #f5f5f5;
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
.Calendar__monthSelectorItemText:disabled,
|
|
435
|
-
.Calendar__yearSelectorText:disabled {
|
|
436
|
-
opacity: 0.5;
|
|
437
|
-
cursor: default;
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
.Calendar__monthSelectorItem.-active .Calendar__monthSelectorItemText,
|
|
441
|
-
.Calendar__yearSelectorItem.-active .Calendar__yearSelectorText {
|
|
442
|
-
background-color: var(--cl-color-primary);
|
|
443
|
-
color: #fff;
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
.Calendar__weekDays {
|
|
447
|
-
display: flex;
|
|
448
|
-
justify-content: space-between;
|
|
449
|
-
color: var(--cl-color-disabled);
|
|
450
|
-
font-size: 1.2em;
|
|
451
|
-
margin-bottom: 0.7em;
|
|
452
|
-
padding: 0 2.6em;
|
|
453
|
-
position: relative;
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
.Calendar__weekDay {
|
|
457
|
-
display: block;
|
|
458
|
-
width: calc(100% / 7);
|
|
459
|
-
text-align: center;
|
|
460
|
-
text-decoration: none;
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
.Calendar__sectionWrapper {
|
|
464
|
-
position: relative;
|
|
465
|
-
min-height: 25.8em;
|
|
466
|
-
overflow: hidden;
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
.Calendar__section {
|
|
470
|
-
display: flex;
|
|
471
|
-
flex-direction: column;
|
|
472
|
-
padding: 0 3.2em;
|
|
473
|
-
position: absolute;
|
|
474
|
-
color: var(--cl-color-black);
|
|
475
|
-
top: 0;
|
|
476
|
-
padding-top: 0.5em;
|
|
477
|
-
left: 0;
|
|
478
|
-
width: 100%;
|
|
479
|
-
will-change: transform, opacity;
|
|
480
|
-
transform: translateZ(0);
|
|
481
|
-
backface-visibility: hidden;
|
|
482
|
-
transition: var(--animation-duration);
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
.Calendar__section.-hiddenPrevious {
|
|
486
|
-
opacity: 0.5;
|
|
487
|
-
transform: translateX(-90%);
|
|
488
|
-
}
|
|
489
|
-
|
|
490
|
-
.Calendar.-rtl .Calendar__section.-hiddenPrevious {
|
|
491
|
-
transform: translateX(90%);
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
.Calendar__section.-hiddenNext {
|
|
495
|
-
opacity: 0.5;
|
|
496
|
-
transform: translateX(90%);
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
.Calendar.-rtl .Calendar__section.-hiddenNext {
|
|
500
|
-
transform: translateX(-90%);
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
.Calendar__section.-shown {
|
|
504
|
-
opacity: 1;
|
|
505
|
-
transform: translateX(0);
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
.Calendar__section.-shownAnimated {
|
|
509
|
-
animation: var(--animation-duration) FadeContentToCenter forwards;
|
|
510
|
-
}
|
|
511
|
-
|
|
512
|
-
.Calendar__weekRow {
|
|
513
|
-
display: flex;
|
|
514
|
-
width: 100%;
|
|
515
|
-
}
|
|
516
|
-
|
|
517
|
-
.Calendar__day {
|
|
518
|
-
display: block;
|
|
519
|
-
width: calc(100% / 7);
|
|
520
|
-
text-align: center;
|
|
521
|
-
padding: calc(0.25em - 1px) 0;
|
|
522
|
-
font-size: 1.6em;
|
|
523
|
-
border-radius: 50%;
|
|
524
|
-
transition: 0.2s;
|
|
525
|
-
border: 1px solid transparent;
|
|
526
|
-
margin-bottom: 0.3em;
|
|
527
|
-
color: rgba(0, 0, 0, 0.8);
|
|
528
|
-
display: flex;
|
|
529
|
-
justify-content: center;
|
|
530
|
-
align-items: center;
|
|
531
|
-
cursor: pointer;
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
.Calendar__day:focus {
|
|
535
|
-
outline: 1px dashed rgba(0, 0, 0, 0.4);
|
|
536
|
-
outline-offset: 2px;
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
.Calendar__day.-ltr {
|
|
540
|
-
min-height: 2.6em;
|
|
541
|
-
font-size: 1.45em;
|
|
542
|
-
}
|
|
543
|
-
|
|
544
|
-
.Calendar__day.-rtl {
|
|
545
|
-
font-size: 1.55em;
|
|
546
|
-
height: 2.45em;
|
|
547
|
-
}
|
|
548
|
-
|
|
549
|
-
.Calendar__day:not(.-blank):not(.-selectedStart):not(.-selectedEnd):not(.-selectedBetween):not(.-selected):hover {
|
|
550
|
-
background: #eaeaea;
|
|
551
|
-
border-radius: 50%;
|
|
552
|
-
color: var(--cl-color-black);
|
|
553
|
-
border-color: transparent;
|
|
554
|
-
}
|
|
555
|
-
|
|
556
|
-
.Calendar__day.-selected,
|
|
557
|
-
.Calendar__day.-selectedStart,
|
|
558
|
-
.Calendar__day.-selectedEnd {
|
|
559
|
-
background: var(--cl-color-primary);
|
|
560
|
-
color: #fff;
|
|
561
|
-
}
|
|
562
|
-
|
|
563
|
-
.Calendar__day.-ltr.-selectedStart {
|
|
564
|
-
border-radius: 0;
|
|
565
|
-
border-top-left-radius: 100em;
|
|
566
|
-
border-bottom-left-radius: 100em;
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
.Calendar__day.-rtl.-selectedStart {
|
|
570
|
-
border-radius: 0;
|
|
571
|
-
border-top-right-radius: 100em;
|
|
572
|
-
border-bottom-right-radius: 100em;
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
.Calendar__day.-selectedBetween {
|
|
576
|
-
background: var(--cl-color-primary-light);
|
|
577
|
-
color: var(--cl-color-primary);
|
|
578
|
-
border-radius: 0;
|
|
579
|
-
}
|
|
580
|
-
|
|
581
|
-
.Calendar__day.-ltr.-selectedEnd {
|
|
582
|
-
border-top-right-radius: 100em;
|
|
583
|
-
border-bottom-right-radius: 100em;
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
.Calendar__day.-rtl.-selectedEnd {
|
|
587
|
-
border-top-left-radius: 100em;
|
|
588
|
-
border-bottom-left-radius: 100em;
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
.Calendar__day.-weekend:not(.-selected):not(.-blank):not(.-selectedStart):not(.-selectedEnd):not(.-selectedBetween) {
|
|
592
|
-
color: var(--cl-color-error);
|
|
593
|
-
}
|
|
594
|
-
|
|
595
|
-
.Calendar__day.-weekend.-today:not(.-selectedStart):not(.-selectedEnd):not(.-selectedBetween)::after {
|
|
596
|
-
background: var(--cl-color-error);
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
.Calendar__day.-disabled {
|
|
600
|
-
color: var(--cl-color-disabled) !important;
|
|
601
|
-
background: transparent !important;
|
|
602
|
-
cursor: default !important;
|
|
603
|
-
}
|
|
604
|
-
|
|
605
|
-
.Calendar__day.-selected {
|
|
606
|
-
border-radius: 50%;
|
|
607
|
-
}
|
|
608
|
-
|
|
609
|
-
.Calendar__day.-today:not(.-selectedStart):not(.-selectedEnd):not(.-selectedBetween) {
|
|
610
|
-
font-weight: 600;
|
|
611
|
-
color: var(--cl-color-black);
|
|
612
|
-
color: #000;
|
|
613
|
-
position: relative;
|
|
614
|
-
}
|
|
615
|
-
|
|
616
|
-
.Calendar__day.-today:not(.-selectedStart):not(.-selectedEnd):not(.-selectedBetween)::after {
|
|
617
|
-
content: '';
|
|
618
|
-
position: absolute;
|
|
619
|
-
bottom: 0.2em;
|
|
620
|
-
display: block;
|
|
621
|
-
width: 0.6em;
|
|
622
|
-
height: 1px;
|
|
623
|
-
background: #000;
|
|
624
|
-
left: 50%;
|
|
625
|
-
opacity: 0.5;
|
|
626
|
-
transform: translateX(-50%);
|
|
627
|
-
transition: 0.2s;
|
|
628
|
-
}
|
|
629
|
-
|
|
630
|
-
.Calendar__day.-today:hover:not(.-selectedStart):not(.-selectedEnd):not(.-selectedBetween)::after {
|
|
631
|
-
opacity: 0;
|
|
632
|
-
}
|
|
633
|
-
|
|
634
|
-
.Calendar__day.-blank {
|
|
635
|
-
color: transparent;
|
|
636
|
-
cursor: default;
|
|
637
|
-
pointer-events: none;
|
|
638
|
-
}
|
|
639
|
-
|
|
640
|
-
.Calendar__footer {
|
|
641
|
-
position: relative;
|
|
642
|
-
z-index: 1;
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
@keyframes fadeCalendar {
|
|
646
|
-
from {
|
|
647
|
-
opacity: 0;
|
|
648
|
-
}
|
|
649
|
-
|
|
650
|
-
to {
|
|
651
|
-
opacity: 1;
|
|
652
|
-
transform: translateY(0);
|
|
653
|
-
}
|
|
654
|
-
}
|
|
655
|
-
|
|
656
|
-
@keyframes fadeArrowFlipped {
|
|
657
|
-
from {
|
|
658
|
-
opacity: 0;
|
|
659
|
-
}
|
|
660
|
-
|
|
661
|
-
to {
|
|
662
|
-
opacity: 1;
|
|
663
|
-
transform: translateY(0) rotate(180deg);
|
|
664
|
-
}
|
|
665
|
-
}
|
|
666
|
-
|
|
667
|
-
@keyframes fadeTextToCenter {
|
|
668
|
-
to {
|
|
669
|
-
opacity: 1;
|
|
670
|
-
transform: translateX(-50%);
|
|
671
|
-
}
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
@keyframes FadeContentToCenter {
|
|
675
|
-
to {
|
|
676
|
-
opacity: 1;
|
|
677
|
-
transform: translateX(0);
|
|
678
|
-
}
|
|
679
14
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@homefile/components-v2",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.18",
|
|
4
4
|
"author": "Homefile",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
"@storybook/test": "^8.5.2",
|
|
36
36
|
"@types/node": "^22.10.7",
|
|
37
37
|
"@types/react": "^19.0.7",
|
|
38
|
+
"@types/react-datepicker": "^7.0.0",
|
|
38
39
|
"@types/react-dom": "^19.0.3",
|
|
39
40
|
"@vitejs/plugin-react": "^4.3.4",
|
|
40
41
|
"axe-playwright": "^2.0.3",
|
|
@@ -58,7 +59,6 @@
|
|
|
58
59
|
"@emotion/styled": "^11.13.0",
|
|
59
60
|
"@fontsource/assistant": "^5.1.1",
|
|
60
61
|
"@fontsource/poppins": "^5.1.1",
|
|
61
|
-
"@hassanmojab/react-modern-calendar-datepicker": "^3.1.7",
|
|
62
62
|
"@hookform/resolvers": "^3.10.0",
|
|
63
63
|
"@rive-app/react-canvas": "^4.17.9",
|
|
64
64
|
"@storybook/addon-themes": "^8.5.2",
|
|
@@ -69,6 +69,7 @@
|
|
|
69
69
|
"i18next-browser-languagedetector": "^8.0.2",
|
|
70
70
|
"i18next-http-backend": "^3.0.2",
|
|
71
71
|
"react": "^19.0.0",
|
|
72
|
+
"react-datepicker": "^8.1.0",
|
|
72
73
|
"react-dom": "^19.0.0",
|
|
73
74
|
"react-dropzone": "^14.3.5",
|
|
74
75
|
"react-hook-form": "^7.54.2",
|
|
@@ -15,9 +15,9 @@ export const DateField = ({
|
|
|
15
15
|
const { control } = useFormContext()
|
|
16
16
|
|
|
17
17
|
return (
|
|
18
|
-
<Flex align="center" gap="base"
|
|
18
|
+
<Flex align="center" gap="base" w="full">
|
|
19
19
|
{name && (
|
|
20
|
-
<Flex align="center" gap="base">
|
|
20
|
+
<Flex align="center" gap="base" flexShrink={0}>
|
|
21
21
|
<FormIcon icon={icon} />
|
|
22
22
|
<Text fontFamily="secondary" noOfLines={1} overflow="hidden">
|
|
23
23
|
{name}
|