nuxt-hs-ui 2.12.7 → 4.0.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/README.md +202 -14
- package/dist/module.d.mts +3 -4
- package/dist/module.json +9 -6
- package/dist/module.mjs +109 -99
- package/dist/runtime/assets/flatpickr-dark.css +1 -1
- package/dist/runtime/assets/main.css +1 -0
- package/dist/runtime/assets/tabulator-custom.css +1 -1
- package/dist/runtime/components/form/_select/hidden-item-toggle.vue +28 -0
- package/dist/runtime/components/form/_select/hidden-item-toggle.vue.d.ts +10 -0
- package/dist/runtime/components/form/_select/item-container.vue +63 -0
- package/dist/runtime/components/form/_select/item-container.vue.d.ts +19 -0
- package/dist/runtime/components/form/_select/item-label.vue +31 -0
- package/dist/runtime/components/form/_select/item-label.vue.d.ts +13 -0
- package/dist/runtime/components/form/_select/item-row.vue +62 -0
- package/dist/runtime/components/form/_select/item-row.vue.d.ts +34 -0
- package/dist/runtime/components/form/btn-line-loading.vue +62 -81
- package/dist/runtime/components/form/btn-line-loading.vue.d.ts +14 -0
- package/dist/runtime/components/form/btn.vue +411 -494
- package/dist/runtime/components/form/btn.vue.d.ts +0 -0
- package/dist/runtime/components/form/check-box.vue +200 -315
- package/dist/runtime/components/form/check-box.vue.d.ts +71 -0
- package/dist/runtime/components/form/check-list.vue +234 -364
- package/dist/runtime/components/form/check-list.vue.d.ts +99 -0
- package/dist/runtime/components/form/combo-box.vue +340 -0
- package/dist/runtime/components/form/combo-box.vue.d.ts +69 -0
- package/dist/runtime/components/form/datepicker.vue +717 -883
- package/dist/runtime/components/form/datepicker.vue.d.ts +122 -0
- package/dist/runtime/components/form/input-frame.vue +174 -258
- package/dist/runtime/components/form/input-frame.vue.d.ts +88 -0
- package/dist/runtime/components/form/radio.vue +451 -614
- package/dist/runtime/components/form/radio.vue.d.ts +62 -0
- package/dist/runtime/components/form/select-img-icon.vue +38 -53
- package/dist/runtime/components/form/select-img-icon.vue.d.ts +15 -0
- package/dist/runtime/components/form/select.vue +733 -579
- package/dist/runtime/components/form/select.vue.d.ts +63 -0
- package/dist/runtime/components/form/text-box.vue +266 -365
- package/dist/runtime/components/form/text-box.vue.d.ts +105 -0
- package/dist/runtime/components/form/textarea.vue +338 -421
- package/dist/runtime/components/form/textarea.vue.d.ts +98 -0
- package/dist/runtime/components/form/value-box.vue +512 -641
- package/dist/runtime/components/form/value-box.vue.d.ts +128 -0
- package/dist/runtime/components/interactive/alert.vue +49 -113
- package/dist/runtime/components/interactive/alert.vue.d.ts +30 -0
- package/dist/runtime/components/interactive/block-loading.vue +91 -119
- package/dist/runtime/components/interactive/block-loading.vue.d.ts +22 -0
- package/dist/runtime/components/interactive/dialog.vue +252 -407
- package/dist/runtime/components/interactive/dialog.vue.d.ts +3 -0
- package/dist/runtime/components/interactive/modal-bg.vue +72 -82
- package/dist/runtime/components/interactive/modal-bg.vue.d.ts +11 -0
- package/dist/runtime/components/interactive/modal.vue +121 -169
- package/dist/runtime/components/interactive/modal.vue.d.ts +38 -0
- package/dist/runtime/components/interactive/toast.vue +164 -206
- package/dist/runtime/components/interactive/toast.vue.d.ts +3 -0
- package/dist/runtime/components/interactive/window-loader.vue +61 -84
- package/dist/runtime/components/interactive/window-loader.vue.d.ts +3 -0
- package/dist/runtime/components/layout/accordion-down.vue +72 -0
- package/dist/runtime/components/layout/accordion-down.vue.d.ts +26 -0
- package/dist/runtime/components/layout/accordion.vue +47 -78
- package/dist/runtime/components/layout/accordion.vue.d.ts +22 -0
- package/dist/runtime/components/layout/aspect-box.vue +29 -58
- package/dist/runtime/components/layout/aspect-box.vue.d.ts +29 -0
- package/dist/runtime/components/layout/card-item.vue +148 -193
- package/dist/runtime/components/layout/card-item.vue.d.ts +0 -0
- package/dist/runtime/components/layout/card.vue +27 -42
- package/dist/runtime/components/layout/card.vue.d.ts +23 -0
- package/dist/runtime/components/layout/container.vue +25 -40
- package/dist/runtime/components/layout/container.vue.d.ts +35 -0
- package/dist/runtime/components/layout/divider-h.vue +30 -50
- package/dist/runtime/components/layout/divider-h.vue.d.ts +18 -0
- package/dist/runtime/components/misc/breadcrumb.vue +47 -95
- package/dist/runtime/components/misc/breadcrumb.vue.d.ts +22 -0
- package/dist/runtime/components/misc/tabulator.vue +122 -190
- package/dist/runtime/components/misc/tabulator.vue.d.ts +28 -0
- package/dist/runtime/components/misc/view-name-display.vue +53 -68
- package/dist/runtime/components/misc/view-name-display.vue.d.ts +14 -0
- package/dist/runtime/components/test.vue +13 -0
- package/dist/runtime/components/test.vue.d.ts +3 -0
- package/dist/runtime/composables/test.d.ts +8 -0
- package/dist/runtime/composables/test.js +12 -0
- package/dist/runtime/composables/use-hs-dialog.d.ts +3 -20
- package/dist/runtime/composables/use-hs-dialog.js +3 -9
- package/dist/runtime/composables/use-hs-is-mobile.d.ts +8 -2
- package/dist/runtime/composables/use-hs-is-mobile.js +43 -25
- package/dist/runtime/composables/use-hs-misc.d.ts +8 -38
- package/dist/runtime/composables/use-hs-misc.js +9 -61
- package/dist/runtime/composables/use-hs-modal.js +1 -3
- package/dist/runtime/composables/use-hs-multi-lang.d.ts +23 -40
- package/dist/runtime/composables/use-hs-multi-lang.js +30 -74
- package/dist/runtime/composables/use-hs-scroll-lock.d.ts +1 -1
- package/dist/runtime/composables/use-hs-scroll-lock.js +2 -1
- package/dist/runtime/composables/use-hs-toast.d.ts +2 -2
- package/dist/runtime/composables/use-hs-toast.js +12 -4
- package/dist/runtime/composables/use-pinia.d.ts +1 -0
- package/dist/runtime/composables/use-pinia.js +2 -0
- package/dist/runtime/plugin.d.ts +2 -0
- package/dist/runtime/plugin.js +4 -0
- package/dist/runtime/server/tsconfig.json +3 -3
- package/dist/runtime/types/dialog.d.ts +11 -20
- package/dist/runtime/types/dialog.js +2 -1
- package/dist/runtime/types/flatpickr/default.js +2 -23
- package/dist/runtime/types/flatpickr/ja.js +3 -37
- package/dist/runtime/types/toast.d.ts +1 -1
- package/dist/runtime/utils/dayjs.d.ts +8 -6
- package/dist/runtime/utils/dayjs.js +12 -5
- package/dist/runtime/utils/modal.d.ts +9 -28
- package/dist/runtime/utils/modal.js +7 -36
- package/dist/runtime/utils/multi-lang-object.d.ts +2 -2
- package/dist/runtime/utils/multi-lang-object.js +1 -5
- package/dist/runtime/utils/multi-lang.js +12 -22
- package/dist/runtime/utils/object.js +1 -1
- package/dist/runtime/utils/select-item.d.ts +3 -1
- package/dist/runtime/utils/stop-watch.js +6 -4
- package/dist/runtime/utils/string.js +4 -4
- package/dist/runtime/utils/tabulator.d.ts +1 -42
- package/dist/runtime/utils/tabulator.js +2 -99
- package/dist/runtime/utils/theme.d.ts +20 -20
- package/dist/runtime/utils/theme.js +180 -30
- package/dist/runtime/utils/tv.d.ts +1 -101
- package/dist/runtime/utils/tv.js +0 -22
- package/dist/types.d.mts +3 -1
- package/package.json +61 -119
- package/dist/module.cjs +0 -5
- package/dist/module.d.ts +0 -16
- package/dist/runtime/assets/vue-select.css +0 -1
- package/dist/runtime/components/misc/view-name-display-target.vue +0 -39
- package/dist/runtime/plugin/v-select.d.ts +0 -2
- package/dist/runtime/plugin/v-select.js +0 -5
- package/dist/runtime/style.css +0 -22
- package/dist/runtime/tailwind.css +0 -78
- package/dist/runtime/types/app.config.d.ts +0 -5
- package/dist/types.d.ts +0 -1
|
@@ -1,880 +1,684 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
import
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
});
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
return
|
|
250
|
-
};
|
|
251
|
-
|
|
252
|
-
const
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
if (
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
if (
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
if (
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
const
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
}
|
|
462
|
-
};
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
}
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
manualData.value = displayText.value;
|
|
683
|
-
focusState.openBtn = false;
|
|
684
|
-
setTimeout(() => {
|
|
685
|
-
manualElm.value?.select();
|
|
686
|
-
hsFocus.state.id = uid;
|
|
687
|
-
focusState.manualInput = true;
|
|
688
|
-
}, 1);
|
|
689
|
-
};
|
|
690
|
-
const manualInputBlur = () => {
|
|
691
|
-
if (props.readonly) return;
|
|
692
|
-
if (props.disabled) return;
|
|
693
|
-
try {
|
|
694
|
-
const data = manualData.value
|
|
695
|
-
.replace(/\//g, "-")
|
|
696
|
-
.replace(/-(\d)-/g, "-0$1-")
|
|
697
|
-
.replace(/-(\d)$/g, "-0$1");
|
|
698
|
-
const dataFormat = props.showFormat.replace(/\//g, "-");
|
|
699
|
-
const dt = dayjs(data, dataFormat);
|
|
700
|
-
// console.log('manualInputBlur', { data, dataFormat, dt });
|
|
701
|
-
if (dt.isValid() === false) {
|
|
702
|
-
updateValue(null);
|
|
703
|
-
return;
|
|
704
|
-
}
|
|
705
|
-
updateValue(dt.format(props.dataFormat));
|
|
706
|
-
// console.log('manualInputBlur', data);
|
|
707
|
-
} catch (err) {
|
|
708
|
-
console.error("manualInputBlur", err);
|
|
709
|
-
} finally {
|
|
710
|
-
manualData.value = "";
|
|
711
|
-
manualInput.value = false;
|
|
712
|
-
focusState.manualInput = false;
|
|
713
|
-
}
|
|
714
|
-
};
|
|
715
|
-
|
|
716
|
-
const openBtnClick = () => {
|
|
717
|
-
if (props.readonly) return;
|
|
718
|
-
if (props.disabled) return;
|
|
719
|
-
if (!hsMisc.state.isMobile) {
|
|
720
|
-
inputElement.value?.focus();
|
|
721
|
-
return;
|
|
722
|
-
}
|
|
723
|
-
hsFocus.state.id = uid;
|
|
724
|
-
datePickerToggle();
|
|
725
|
-
};
|
|
726
|
-
|
|
727
|
-
const openBtnFocus = () => {
|
|
728
|
-
if (props.readonly) return;
|
|
729
|
-
if (props.disabled) return;
|
|
730
|
-
hsFocus.state.id = uid;
|
|
731
|
-
focusState.openBtn = true;
|
|
732
|
-
};
|
|
733
|
-
const computedIsFocusOpenBtn = computed(() => {
|
|
734
|
-
if (props.disabled === true) return false;
|
|
735
|
-
if (props.readonly === true) return false;
|
|
736
|
-
if (hsFocus.state.id !== uid) return false;
|
|
737
|
-
if (focusState.isOpenFlatpickr) return true;
|
|
738
|
-
if (focusState.openBtn) return true;
|
|
739
|
-
return false;
|
|
740
|
-
});
|
|
741
|
-
|
|
742
|
-
// ---------------------------------------------------------------------------------
|
|
743
|
-
</script>
|
|
744
|
-
|
|
745
|
-
<template>
|
|
746
|
-
<InputFrame
|
|
747
|
-
:class="props.class"
|
|
748
|
-
:class-header="props.classHeader"
|
|
749
|
-
:class-input="[props.classInput]"
|
|
750
|
-
:focus="computedActivate"
|
|
751
|
-
:focus-color="props.focusColor"
|
|
752
|
-
:change="isChangeData"
|
|
753
|
-
:change-color="props.changeColor"
|
|
754
|
-
:error="props.error"
|
|
755
|
-
:error-color="props.errorColor"
|
|
756
|
-
:disabled="props.disabled"
|
|
757
|
-
:disabled-color="props.disabledColor"
|
|
758
|
-
:readonly="props.readonly"
|
|
759
|
-
:label="props.label"
|
|
760
|
-
:require="props.require"
|
|
761
|
-
:require-text="tx(props.requireText).value"
|
|
762
|
-
:warn="props.warn"
|
|
763
|
-
:warn-time-out="props.warnTimeOut"
|
|
764
|
-
:size="props.size"
|
|
765
|
-
:headerless="props.headerless"
|
|
766
|
-
>
|
|
767
|
-
<template v-if="slots.overlay" #overlay>
|
|
768
|
-
<slot name="overlay"></slot>
|
|
769
|
-
</template>
|
|
770
|
-
<template v-if="!props.readonly" #left-icons>
|
|
771
|
-
<slot name="left-icons" :disabled="disabled" />
|
|
772
|
-
<button
|
|
773
|
-
ref="openBtn"
|
|
774
|
-
data-sep="right"
|
|
775
|
-
data-icon="calendar"
|
|
776
|
-
:tabindex="tabindex"
|
|
777
|
-
:disabled="disabled"
|
|
778
|
-
:class="
|
|
779
|
-
!disabled
|
|
780
|
-
? 'cursor-pointer hover:bg-accent1/[0.1] active:bg-accent1/[0.2]'
|
|
781
|
-
: ''
|
|
782
|
-
"
|
|
783
|
-
@click.stop.prevent="openBtnClick()"
|
|
784
|
-
@focus="openBtnFocus"
|
|
785
|
-
@blur="focusState.openBtn = false"
|
|
786
|
-
>
|
|
787
|
-
<div
|
|
788
|
-
class="tw-absolute tw-inset-[2px] tw-border-main2 tw-border tw-pointer-events-none tw-transition-all tw-rounded-sm"
|
|
789
|
-
:class="computedIsFocusOpenBtn ? 'tw-opacity-100' : 'tw-opacity-0'"
|
|
790
|
-
></div>
|
|
791
|
-
<i
|
|
792
|
-
:class="
|
|
793
|
-
props.mode === 'time'
|
|
794
|
-
? 'fa-regular fa-clock'
|
|
795
|
-
: 'fa-solid fa-calendar-days'
|
|
796
|
-
"
|
|
797
|
-
></i>
|
|
798
|
-
<!-- <div
|
|
799
|
-
class="absolute inset-[2px] border-main2 border pointer-events-none transition-all rounded-sm"
|
|
800
|
-
:class="computedIsFocusOpenBtn ? 'opacity-100' : 'opacity-0'"
|
|
801
|
-
></div> -->
|
|
802
|
-
</button>
|
|
803
|
-
</template>
|
|
804
|
-
<div
|
|
805
|
-
class="nac-c-input-p"
|
|
806
|
-
:class="[
|
|
807
|
-
{ disabled: props.disabled, readonly: props.readonly },
|
|
808
|
-
inputBoxClass,
|
|
809
|
-
]"
|
|
810
|
-
@click="manualInputClick"
|
|
811
|
-
@dblclick="datePickerToggle()"
|
|
812
|
-
>
|
|
813
|
-
<!---->
|
|
814
|
-
<!-- -->
|
|
815
|
-
<input
|
|
816
|
-
:ref="(e) => setRef(e)"
|
|
817
|
-
type="text"
|
|
818
|
-
class="flatpickr-body"
|
|
819
|
-
:disabled="props.disabled"
|
|
820
|
-
tabindex="-1"
|
|
821
|
-
@keydown="keyDown"
|
|
822
|
-
/>
|
|
823
|
-
<input
|
|
824
|
-
ref="manualElm"
|
|
825
|
-
v-model="manualData"
|
|
826
|
-
type="text"
|
|
827
|
-
class="absolute inset-0"
|
|
828
|
-
:class="[
|
|
829
|
-
manualInput
|
|
830
|
-
? 'pointer-events-auto opacity-100'
|
|
831
|
-
: 'pointer-events-none opacity-0',
|
|
832
|
-
inputBoxClass,
|
|
833
|
-
]"
|
|
834
|
-
:tabindex="-1"
|
|
835
|
-
@blur="manualInputBlur()"
|
|
836
|
-
@focus="manualInputfocus()"
|
|
837
|
-
/>
|
|
838
|
-
<span
|
|
839
|
-
:class="
|
|
840
|
-
!manualInput
|
|
841
|
-
? 'pointer-events-auto opacity-100'
|
|
842
|
-
: 'pointer-events-none opacity-0'
|
|
843
|
-
"
|
|
844
|
-
>{{ displayText }}</span
|
|
845
|
-
>
|
|
846
|
-
<span
|
|
847
|
-
v-if="props.data === null && !props.hideTodayBtn && !props.readonly"
|
|
848
|
-
class="today"
|
|
849
|
-
:class="
|
|
850
|
-
!manualInput
|
|
851
|
-
? 'pointer-events-auto opacity-100'
|
|
852
|
-
: 'pointer-events-none opacity-0'
|
|
853
|
-
"
|
|
854
|
-
@click.stop="datePickerToday()"
|
|
855
|
-
>
|
|
856
|
-
<!-- {{ props.mode === "month" ? "Now" : "Today" }} -->
|
|
857
|
-
Today
|
|
858
|
-
</span>
|
|
859
|
-
</div>
|
|
860
|
-
<template #right-icons>
|
|
861
|
-
<template v-if="!props.hideDeleteBtn && !props.readonly">
|
|
862
|
-
<div
|
|
863
|
-
:class="
|
|
864
|
-
!disabled
|
|
865
|
-
? 'text-error cursor-pointer hover:bg-error/[0.1] active:bg-error/[0.2]'
|
|
866
|
-
: ''
|
|
867
|
-
"
|
|
868
|
-
@click="iconEventDelete()"
|
|
869
|
-
>
|
|
870
|
-
<i class="fa-solid fa-delete-left"></i>
|
|
871
|
-
</div>
|
|
872
|
-
</template>
|
|
873
|
-
<slot name="right-icons" :disabled="disabled" />
|
|
874
|
-
</template>
|
|
875
|
-
</InputFrame>
|
|
876
|
-
</template>
|
|
877
|
-
|
|
1
|
+
<script setup>
|
|
2
|
+
import { fromDate, toCalendarDate, getLocalTimeZone } from "@internationalized/date";
|
|
3
|
+
import { reactive, ref, watch, computed, useId, onMounted, nextTick, shallowRef } from "#imports";
|
|
4
|
+
import { GetTimeShiftValue, Dayjs, DayjsInit, dayjs } from "../../utils/dayjs";
|
|
5
|
+
import { Theme, GetColorCode } from "../../utils/theme";
|
|
6
|
+
import { IntNullable } from "../../utils/number";
|
|
7
|
+
import { useHsFocus } from "../../composables/use-hs-focus";
|
|
8
|
+
import { useHsToast } from "../../composables/use-hs-toast";
|
|
9
|
+
import { useHsMultiLang } from "../../composables/use-hs-multi-lang";
|
|
10
|
+
import { useHsPinia } from "../../composables/use-pinia";
|
|
11
|
+
import { useHsIsMobile } from "../../composables/use-hs-is-mobile";
|
|
12
|
+
import { useHsMisc } from "../../composables/use-hs-misc";
|
|
13
|
+
import InputFrame from "./input-frame.vue";
|
|
14
|
+
DayjsInit();
|
|
15
|
+
const hsFocus = useHsFocus(useHsPinia());
|
|
16
|
+
const Toast = useHsToast(useHsPinia());
|
|
17
|
+
const multiLang = useHsMultiLang(useHsPinia());
|
|
18
|
+
const tx = multiLang.tx;
|
|
19
|
+
const hsIsMobile = useHsIsMobile(useHsPinia());
|
|
20
|
+
const hsMisc = useHsMisc(useHsPinia());
|
|
21
|
+
onMounted(() => {
|
|
22
|
+
hsIsMobile.init();
|
|
23
|
+
});
|
|
24
|
+
const timeOutputDateFormat = "HH:mm:ss.SSS";
|
|
25
|
+
const timeShowDateFormat = "HH:mm";
|
|
26
|
+
const timeDateFormat = "YYYY-MM-DD HH:mm:ss.SSS";
|
|
27
|
+
const props = defineProps({
|
|
28
|
+
theme: { type: null, required: false, default: Theme.accent1 },
|
|
29
|
+
textAlign: { type: String, required: false, default: "left" },
|
|
30
|
+
mode: { type: String, required: false, default: "date" },
|
|
31
|
+
dataFormat: { type: String, required: false, default: "" },
|
|
32
|
+
showFormat: { type: String, required: false, default: "" },
|
|
33
|
+
minDate: { type: [String, null], required: false, default: null },
|
|
34
|
+
maxDate: { type: [String, null], required: false, default: null },
|
|
35
|
+
hideDeleteBtn: { type: Boolean, required: false, default: false },
|
|
36
|
+
hideTodayBtn: { type: Boolean, required: false },
|
|
37
|
+
disableMobile: { type: Boolean, required: false, default: false },
|
|
38
|
+
hasShift: { type: Boolean, required: false, default: true },
|
|
39
|
+
locale: { type: null, required: false, default: void 0 },
|
|
40
|
+
portal: { type: [String, Boolean], required: false, skipCheck: true, default: true },
|
|
41
|
+
data: { type: [String, null], required: true },
|
|
42
|
+
diff: { type: null, required: false, default: void 0 },
|
|
43
|
+
tabindex: { type: null, required: false, default: void 0 },
|
|
44
|
+
class: { type: [String, Object, Array], required: false, default: "" },
|
|
45
|
+
classHeader: { type: [String, Object, Array], required: false, default: "" },
|
|
46
|
+
classInput: { type: [String, Object, Array], required: false, default: "" },
|
|
47
|
+
focusColor: { type: String, required: false, default: "shadow-[inset_0px_0px_1px_2px_#0d8ee4]" },
|
|
48
|
+
changeColor: { type: String, required: false, default: "shadow-[inset_0px_0px_1px_2px_#fd9831be]" },
|
|
49
|
+
error: { type: Boolean, required: false, default: false },
|
|
50
|
+
errorColor: { type: String, required: false, default: "shadow-[inset_0px_0px_1px_2px_#d80000dc]" },
|
|
51
|
+
disabled: { type: Boolean, required: false, default: false },
|
|
52
|
+
disabledColor: { type: String, required: false, default: "" },
|
|
53
|
+
readonly: { type: Boolean, required: false, default: false },
|
|
54
|
+
headerless: { type: Boolean, required: false, default: false },
|
|
55
|
+
label: { type: [String, Object], required: false, default: "" },
|
|
56
|
+
require: { type: Boolean, required: false, default: false },
|
|
57
|
+
requireText: { type: [String, Object], required: false, default: () => ({ ja: "\u5FC5\u9808", en: "Required" }) },
|
|
58
|
+
warn: { type: String, required: false, default: "" },
|
|
59
|
+
warnTimeOut: { type: Number, required: false, default: 3e3 },
|
|
60
|
+
size: { type: String, required: false, default: "m" },
|
|
61
|
+
uiText: { type: Object, required: false, default: () => {
|
|
62
|
+
return {
|
|
63
|
+
error: {
|
|
64
|
+
inputRangeTitle: { ja: "\u5165\u529B\u5024\u306E\u8B66\u544A", en: "Input Value Warning" },
|
|
65
|
+
inputRangeMessage: {
|
|
66
|
+
ja: "\u5165\u529B\u7BC4\u56F2\u5916\u3067\u3059",
|
|
67
|
+
en: "Input is out of range"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
} }
|
|
72
|
+
});
|
|
73
|
+
const emit = defineEmits(["ref", "focus", "blur", "update:data", "value-change", "reset-piceker-func"]);
|
|
74
|
+
const themeColor = computed(() => {
|
|
75
|
+
return GetColorCode(props.theme);
|
|
76
|
+
});
|
|
77
|
+
const themeWeekColor = computed(() => {
|
|
78
|
+
return GetColorCode(Theme.main1);
|
|
79
|
+
});
|
|
80
|
+
const themeErrorColor = computed(() => {
|
|
81
|
+
return GetColorCode(Theme.error);
|
|
82
|
+
});
|
|
83
|
+
const slots = defineSlots();
|
|
84
|
+
const uid = useId();
|
|
85
|
+
const shiftM = GetTimeShiftValue(Dayjs());
|
|
86
|
+
const getShiftDayjs = (date) => {
|
|
87
|
+
if (props.hasShift && shiftM !== 0) {
|
|
88
|
+
return dayjs().subtract(shiftM, "minute");
|
|
89
|
+
}
|
|
90
|
+
return dayjs(date);
|
|
91
|
+
};
|
|
92
|
+
const dataDasyjs = computed(() => {
|
|
93
|
+
const lang = multiLang.lang;
|
|
94
|
+
dayjs.locale(lang);
|
|
95
|
+
if (props.data === null) {
|
|
96
|
+
return null;
|
|
97
|
+
} else if (props.mode === "time") {
|
|
98
|
+
return getShiftDayjs(dayjs().format("YYYY-MM-DD ") + props.data);
|
|
99
|
+
} else {
|
|
100
|
+
return getShiftDayjs(props.data);
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
const minDayjs = computed(() => {
|
|
104
|
+
if (props.minDate === null) {
|
|
105
|
+
return null;
|
|
106
|
+
} else if (props.mode === "time") {
|
|
107
|
+
return getShiftDayjs(dayjs().format("YYYY-MM-DD ") + props.minDate);
|
|
108
|
+
} else {
|
|
109
|
+
return getShiftDayjs(props.minDate);
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
const maxDayjs = computed(() => {
|
|
113
|
+
if (props.maxDate === null) {
|
|
114
|
+
return null;
|
|
115
|
+
} else if (props.mode === "time") {
|
|
116
|
+
return getShiftDayjs(dayjs().format("YYYY-MM-DD ") + props.maxDate);
|
|
117
|
+
} else {
|
|
118
|
+
return getShiftDayjs(props.maxDate);
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
const diffDasyjs = computed(() => {
|
|
122
|
+
const lang = multiLang.lang;
|
|
123
|
+
dayjs.locale(lang);
|
|
124
|
+
if (!props.diff) {
|
|
125
|
+
return null;
|
|
126
|
+
} else if (props.mode === "time") {
|
|
127
|
+
return getShiftDayjs(dayjs().format("YYYY-MM-DD ") + props.diff);
|
|
128
|
+
} else {
|
|
129
|
+
return getShiftDayjs(props.diff);
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
const displayText = computed(() => {
|
|
133
|
+
if (dataDasyjs.value === null) {
|
|
134
|
+
return "";
|
|
135
|
+
} else if (props.mode === "time") {
|
|
136
|
+
return dataDasyjs.value.format(timeShowDateFormat);
|
|
137
|
+
} else {
|
|
138
|
+
return dataDasyjs.value.format(props.showFormat);
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
const displayDiffText = computed(() => {
|
|
142
|
+
if (diffDasyjs.value === null) {
|
|
143
|
+
return "";
|
|
144
|
+
} else if (props.mode === "time") {
|
|
145
|
+
return diffDasyjs.value.format(timeShowDateFormat);
|
|
146
|
+
} else {
|
|
147
|
+
return diffDasyjs.value.format(props.showFormat);
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
const checkDate = (date) => {
|
|
151
|
+
const d = getShiftDayjs(date);
|
|
152
|
+
if (props.minDate !== "" && d.isBefore(props.minDate)) {
|
|
153
|
+
return false;
|
|
154
|
+
} else if (props.maxDate !== "" && d.isAfter(props.maxDate)) {
|
|
155
|
+
return false;
|
|
156
|
+
}
|
|
157
|
+
return true;
|
|
158
|
+
};
|
|
159
|
+
const updateValue = async (text) => {
|
|
160
|
+
const before = props.data;
|
|
161
|
+
if (text === null || text.length === 0) {
|
|
162
|
+
emit("update:data", null);
|
|
163
|
+
await nextTick();
|
|
164
|
+
emit("value-change", null, before);
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
if (props.mode === "all" || props.mode === "date") {
|
|
168
|
+
const d = getShiftDayjs(dayjs(text));
|
|
169
|
+
if (checkDate(d.format("YYYY-MM-DD")) === false) {
|
|
170
|
+
Toast.Warning(props.uiText.error.inputRangeMessage, props.uiText.error.inputRangeTitle, props.warnTimeOut);
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
if (props.mode === "all") {
|
|
175
|
+
emit("update:data", dayjs(text).format(props.dataFormat));
|
|
176
|
+
nextTick(() => {
|
|
177
|
+
emit("value-change", dayjs(text).format(props.dataFormat), before);
|
|
178
|
+
});
|
|
179
|
+
} else if (props.mode === "time") {
|
|
180
|
+
emit("update:data", dayjs(text).format(timeOutputDateFormat));
|
|
181
|
+
nextTick(() => {
|
|
182
|
+
emit("value-change", dayjs(text).format(timeOutputDateFormat), before);
|
|
183
|
+
});
|
|
184
|
+
} else {
|
|
185
|
+
emit("update:data", dayjs(dayjs(text).format("YYYY-MM-DD")).format(props.dataFormat));
|
|
186
|
+
nextTick(() => {
|
|
187
|
+
emit("value-change", dayjs(dayjs(text).format("YYYY-MM-DD")).format(props.dataFormat), before);
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
const datePickerToday = () => {
|
|
192
|
+
if (props.readonly === true) return;
|
|
193
|
+
if (props.disabled === true) return;
|
|
194
|
+
const inputValue = dayjs();
|
|
195
|
+
const d = getShiftDayjs(inputValue);
|
|
196
|
+
if (checkDate(d.format("YYYY-MM-DD")) === false) {
|
|
197
|
+
Toast.Warning(props.uiText.error.inputRangeMessage, props.uiText.error.inputRangeTitle, props.warnTimeOut);
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
updateValue(inputValue.format(""));
|
|
201
|
+
};
|
|
202
|
+
const inputBoxClass = computed(() => {
|
|
203
|
+
if (props.textAlign === "left") {
|
|
204
|
+
return "display-left";
|
|
205
|
+
} else if (props.textAlign === "center") {
|
|
206
|
+
return "display-center";
|
|
207
|
+
} else {
|
|
208
|
+
return "display-right";
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
const iconEventDelete = () => {
|
|
212
|
+
const before = props.data;
|
|
213
|
+
if (props.readonly === true) return;
|
|
214
|
+
if (props.disabled === true) return;
|
|
215
|
+
emit("update:data", null);
|
|
216
|
+
nextTick(() => {
|
|
217
|
+
emit("value-change", null, before);
|
|
218
|
+
});
|
|
219
|
+
};
|
|
220
|
+
const inputElement = ref();
|
|
221
|
+
defineExpose({ el: inputElement });
|
|
222
|
+
onMounted(() => {
|
|
223
|
+
emit("ref", inputElement.value);
|
|
224
|
+
});
|
|
225
|
+
const tabindex = computed(() => {
|
|
226
|
+
if (props.disabled === true) return -1;
|
|
227
|
+
return props.tabindex;
|
|
228
|
+
});
|
|
229
|
+
const isChangeData = computed(() => {
|
|
230
|
+
if (props.diff === void 0) return false;
|
|
231
|
+
if (props.diff === null && props.data === "") return false;
|
|
232
|
+
if (props.diff === "" && props.data === null) return false;
|
|
233
|
+
if (props.diff !== props.data) return true;
|
|
234
|
+
return false;
|
|
235
|
+
});
|
|
236
|
+
const open = ref(false);
|
|
237
|
+
const openBtn = shallowRef(null);
|
|
238
|
+
const calendarValue = shallowRef(null);
|
|
239
|
+
const displayLocale = computed(() => {
|
|
240
|
+
if (props.locale) return props.locale;
|
|
241
|
+
return multiLang.lang === "ja" ? "ja-JP" : "en-US";
|
|
242
|
+
});
|
|
243
|
+
const calendarMinValue = computed(() => {
|
|
244
|
+
if (!minDayjs.value) return null;
|
|
245
|
+
return toCalendarDate(fromDate(minDayjs.value.toDate(), getLocalTimeZone()));
|
|
246
|
+
});
|
|
247
|
+
const calendarMaxValue = computed(() => {
|
|
248
|
+
if (!maxDayjs.value) return null;
|
|
249
|
+
return toCalendarDate(fromDate(maxDayjs.value.toDate(), getLocalTimeZone()));
|
|
250
|
+
});
|
|
251
|
+
const HH = shallowRef(null);
|
|
252
|
+
const MM = shallowRef(null);
|
|
253
|
+
const pad2 = (n) => String(n).padStart(2, "0");
|
|
254
|
+
const listHH = Array.from({ length: 24 }).fill(null).map((_, index) => {
|
|
255
|
+
return { id: index, label: pad2(index) };
|
|
256
|
+
});
|
|
257
|
+
const listMM = Array.from({ length: 60 }).fill(null).map((_, index) => {
|
|
258
|
+
return { id: index, label: pad2(index) };
|
|
259
|
+
});
|
|
260
|
+
const toggleModal = () => {
|
|
261
|
+
if (props.readonly) return;
|
|
262
|
+
if (props.disabled) return;
|
|
263
|
+
const openState = !open.value;
|
|
264
|
+
if (!openState) {
|
|
265
|
+
open.value = false;
|
|
266
|
+
return;
|
|
267
|
+
}
|
|
268
|
+
if (hsFocus.state.id !== uid) {
|
|
269
|
+
hsFocus.state.id = uid;
|
|
270
|
+
}
|
|
271
|
+
if (dataDasyjs.value === null) {
|
|
272
|
+
calendarValue.value = null;
|
|
273
|
+
HH.value = null;
|
|
274
|
+
MM.value = null;
|
|
275
|
+
open.value = true;
|
|
276
|
+
return;
|
|
277
|
+
}
|
|
278
|
+
if (props.mode !== "time") {
|
|
279
|
+
const calDate = toCalendarDate(fromDate(dataDasyjs.value.toDate(), getLocalTimeZone()));
|
|
280
|
+
calendarValue.value = calDate;
|
|
281
|
+
} else {
|
|
282
|
+
calendarValue.value = null;
|
|
283
|
+
}
|
|
284
|
+
if (props.mode === "all" || props.mode === "time") {
|
|
285
|
+
HH.value = dataDasyjs.value.hour();
|
|
286
|
+
MM.value = dataDasyjs.value.minute();
|
|
287
|
+
} else {
|
|
288
|
+
HH.value = null;
|
|
289
|
+
MM.value = null;
|
|
290
|
+
}
|
|
291
|
+
open.value = true;
|
|
292
|
+
};
|
|
293
|
+
function toJSDate(v, tz) {
|
|
294
|
+
return "timeZone" in v || "offset" in v ? v.toDate() : v.toDate(tz);
|
|
295
|
+
}
|
|
296
|
+
const changeCalender = (date) => {
|
|
297
|
+
const TZ = getLocalTimeZone();
|
|
298
|
+
const t = date ? Dayjs(toJSDate(date, TZ)).tz(TZ) : null;
|
|
299
|
+
if (!t) {
|
|
300
|
+
calendarValue.value = null;
|
|
301
|
+
HH.value = null;
|
|
302
|
+
MM.value = null;
|
|
303
|
+
updateValue(null);
|
|
304
|
+
return;
|
|
305
|
+
}
|
|
306
|
+
if (!HH.value) HH.value = 0;
|
|
307
|
+
if (!MM.value) MM.value = 0;
|
|
308
|
+
if (props.mode === "all" || props.mode === "time") {
|
|
309
|
+
updateValue(t.format("YYYY-MM-DD") + ` ${pad2(HH.value || 0)}:${pad2(MM.value || 0)}`);
|
|
310
|
+
} else {
|
|
311
|
+
updateValue(t.format(""));
|
|
312
|
+
}
|
|
313
|
+
calendarValue.value = date;
|
|
314
|
+
};
|
|
315
|
+
const hhValueChange = (_value) => {
|
|
316
|
+
const value = IntNullable(_value);
|
|
317
|
+
if (value && value >= 0 && value <= 23) {
|
|
318
|
+
HH.value = value;
|
|
319
|
+
if (!MM.value) MM.value = 0;
|
|
320
|
+
if (!calendarValue.value) {
|
|
321
|
+
calendarValue.value = toCalendarDate(fromDate(/* @__PURE__ */ new Date(), getLocalTimeZone()));
|
|
322
|
+
}
|
|
323
|
+
} else {
|
|
324
|
+
HH.value = null;
|
|
325
|
+
MM.value = null;
|
|
326
|
+
calendarValue.value = null;
|
|
327
|
+
}
|
|
328
|
+
changeCalender(calendarValue.value);
|
|
329
|
+
};
|
|
330
|
+
const mmValueChange = (_value) => {
|
|
331
|
+
const value = IntNullable(_value);
|
|
332
|
+
if (value && value >= 0 && value <= 59) {
|
|
333
|
+
HH.value = value;
|
|
334
|
+
if (!HH.value) HH.value = 0;
|
|
335
|
+
if (!calendarValue.value) {
|
|
336
|
+
calendarValue.value = toCalendarDate(fromDate(/* @__PURE__ */ new Date(), getLocalTimeZone()));
|
|
337
|
+
}
|
|
338
|
+
} else {
|
|
339
|
+
HH.value = null;
|
|
340
|
+
MM.value = null;
|
|
341
|
+
calendarValue.value = null;
|
|
342
|
+
}
|
|
343
|
+
changeCalender(calendarValue.value);
|
|
344
|
+
};
|
|
345
|
+
const focusState = reactive({
|
|
346
|
+
isOpenFlatpickr: false,
|
|
347
|
+
isClosingFlatpickr: false,
|
|
348
|
+
manualInput: false,
|
|
349
|
+
openBtn: false
|
|
350
|
+
});
|
|
351
|
+
const computedActivate = computed(() => {
|
|
352
|
+
if (props.disabled === true) return false;
|
|
353
|
+
if (props.readonly === true) return false;
|
|
354
|
+
if (hsFocus.state.id !== uid) return false;
|
|
355
|
+
if (open.value === true) return true;
|
|
356
|
+
if (focusState.isOpenFlatpickr) return true;
|
|
357
|
+
if (focusState.manualInput) return true;
|
|
358
|
+
if (focusState.openBtn) return true;
|
|
359
|
+
return false;
|
|
360
|
+
});
|
|
361
|
+
watch(
|
|
362
|
+
() => hsFocus.state.id,
|
|
363
|
+
() => {
|
|
364
|
+
open.value = false;
|
|
365
|
+
}
|
|
366
|
+
);
|
|
367
|
+
watch(computedActivate, (value) => {
|
|
368
|
+
if (value === true) {
|
|
369
|
+
setTimeout(() => {
|
|
370
|
+
emit("focus", inputElement.value);
|
|
371
|
+
}, 10);
|
|
372
|
+
} else {
|
|
373
|
+
emit("blur", inputElement.value);
|
|
374
|
+
}
|
|
375
|
+
});
|
|
376
|
+
const openBtnFocus = () => {
|
|
377
|
+
if (props.readonly) return;
|
|
378
|
+
if (props.disabled) return;
|
|
379
|
+
if (hsFocus.state.id !== uid) {
|
|
380
|
+
hsFocus.state.id = uid;
|
|
381
|
+
}
|
|
382
|
+
focusState.openBtn = true;
|
|
383
|
+
};
|
|
384
|
+
const manualElm = ref(null);
|
|
385
|
+
const manualData = ref("");
|
|
386
|
+
const manualInput = ref(false);
|
|
387
|
+
const manualInputClick = () => {
|
|
388
|
+
if (props.readonly) return;
|
|
389
|
+
if (props.disabled) return;
|
|
390
|
+
if (hsIsMobile.isMobile) {
|
|
391
|
+
toggleModal();
|
|
392
|
+
return;
|
|
393
|
+
}
|
|
394
|
+
manualInput.value = true;
|
|
395
|
+
manualElm.value?.focus();
|
|
396
|
+
};
|
|
397
|
+
const manualInputfocus = () => {
|
|
398
|
+
if (props.readonly) return;
|
|
399
|
+
if (props.disabled) return;
|
|
400
|
+
manualData.value = displayText.value;
|
|
401
|
+
focusState.openBtn = false;
|
|
402
|
+
setTimeout(() => {
|
|
403
|
+
manualElm.value?.select();
|
|
404
|
+
if (hsFocus.state.id !== uid) {
|
|
405
|
+
hsFocus.state.id = uid;
|
|
406
|
+
}
|
|
407
|
+
focusState.manualInput = true;
|
|
408
|
+
}, 1);
|
|
409
|
+
};
|
|
410
|
+
const manualInputBlur = () => {
|
|
411
|
+
if (props.readonly) return;
|
|
412
|
+
if (props.disabled) return;
|
|
413
|
+
const TZ = getLocalTimeZone();
|
|
414
|
+
try {
|
|
415
|
+
if (props.mode === "all" || props.mode === "date") {
|
|
416
|
+
const d = dayjs(manualData.value, props.showFormat, true);
|
|
417
|
+
if (!d.isValid()) {
|
|
418
|
+
updateValue(null);
|
|
419
|
+
return;
|
|
420
|
+
}
|
|
421
|
+
updateValue(d.tz(TZ).format(props.dataFormat));
|
|
422
|
+
} else if (props.mode === "time") {
|
|
423
|
+
const inputValue = manualData.value.replace(/[-:]/g, "").replace(/(\d{2})(\d{2})/, "$1:$2");
|
|
424
|
+
const nowDt = dayjs().format("YYYY-MM-DD");
|
|
425
|
+
const d = dayjs(nowDt + " " + inputValue, timeDateFormat, true);
|
|
426
|
+
if (!d.isValid()) {
|
|
427
|
+
updateValue(null);
|
|
428
|
+
return;
|
|
429
|
+
}
|
|
430
|
+
updateValue(d.tz(TZ).format(timeDateFormat));
|
|
431
|
+
}
|
|
432
|
+
} catch (err) {
|
|
433
|
+
console.error("manualInputBlur", err);
|
|
434
|
+
} finally {
|
|
435
|
+
manualData.value = "";
|
|
436
|
+
manualInput.value = false;
|
|
437
|
+
focusState.manualInput = false;
|
|
438
|
+
}
|
|
439
|
+
};
|
|
440
|
+
const computedIsFocusOpenBtn = computed(() => {
|
|
441
|
+
if (props.disabled === true) return false;
|
|
442
|
+
if (props.readonly === true) return false;
|
|
443
|
+
if (hsFocus.state.id !== uid) return false;
|
|
444
|
+
if (focusState.isOpenFlatpickr) return true;
|
|
445
|
+
if (focusState.openBtn) return true;
|
|
446
|
+
return false;
|
|
447
|
+
});
|
|
448
|
+
const KEEP_OPEN_SELECTOR = "[data-keep-popover-open]";
|
|
449
|
+
const content = {
|
|
450
|
+
align: "start",
|
|
451
|
+
sideOffset: 8,
|
|
452
|
+
onPointerDownOutside: (e) => {
|
|
453
|
+
const t = e.target;
|
|
454
|
+
if (t.closest(KEEP_OPEN_SELECTOR)) {
|
|
455
|
+
e.preventDefault();
|
|
456
|
+
}
|
|
457
|
+
},
|
|
458
|
+
onFocusOutside: (e) => {
|
|
459
|
+
const t = e.target;
|
|
460
|
+
if (t.closest(KEEP_OPEN_SELECTOR)) e.preventDefault();
|
|
461
|
+
}
|
|
462
|
+
};
|
|
463
|
+
const posTarget = shallowRef(null);
|
|
464
|
+
</script>
|
|
465
|
+
|
|
466
|
+
<template>
|
|
467
|
+
<InputFrame
|
|
468
|
+
v-bind="$attrs"
|
|
469
|
+
:class="['HsDatePicker', props.class]"
|
|
470
|
+
:class-header="props.classHeader"
|
|
471
|
+
:class-input="[props.classInput]"
|
|
472
|
+
:focus="computedActivate"
|
|
473
|
+
:focus-color="props.focusColor"
|
|
474
|
+
:change="isChangeData"
|
|
475
|
+
:change-color="props.changeColor"
|
|
476
|
+
:error="props.error"
|
|
477
|
+
:error-color="props.errorColor"
|
|
478
|
+
:disabled="props.disabled"
|
|
479
|
+
:disabled-color="props.disabledColor"
|
|
480
|
+
:readonly="props.readonly"
|
|
481
|
+
:label="props.label"
|
|
482
|
+
:require="props.require"
|
|
483
|
+
:require-text="tx(props.requireText).value"
|
|
484
|
+
:warn="props.warn"
|
|
485
|
+
:warn-time-out="props.warnTimeOut"
|
|
486
|
+
:size="props.size"
|
|
487
|
+
:headerless="props.headerless"
|
|
488
|
+
@ref="(e) => posTarget = e"
|
|
489
|
+
>
|
|
490
|
+
<template #overlay="{ focus, change }">
|
|
491
|
+
<div
|
|
492
|
+
v-if="props.diff !== void 0 && change"
|
|
493
|
+
class="absolute inset-0 bg-red/30 transition-opacity flex items-center p-1 bg-dark/20"
|
|
494
|
+
:class="!focus && hsMisc.capsLockState ? 'opacity-100' : 'opacity-0 pointer-events-none select-none'"
|
|
495
|
+
>
|
|
496
|
+
<div class="flex">
|
|
497
|
+
<Btn
|
|
498
|
+
variant="outlined"
|
|
499
|
+
theme="error"
|
|
500
|
+
tabindex="-1"
|
|
501
|
+
size="xs"
|
|
502
|
+
class="bg-white flex-none"
|
|
503
|
+
@click="updateValue(props.diff)"
|
|
504
|
+
>
|
|
505
|
+
<i class="fa-solid fa-rotate-right"></i>
|
|
506
|
+
</Btn>
|
|
507
|
+
<div v-if="props.diff" class="px-1 truncate bg-white mx-1 flex items-center">{{ displayDiffText }}</div>
|
|
508
|
+
</div>
|
|
509
|
+
</div>
|
|
510
|
+
<template v-if="slots.overlay">
|
|
511
|
+
<slot name="overlay" :focus="focus" :change="change"></slot>
|
|
512
|
+
</template>
|
|
513
|
+
</template>
|
|
514
|
+
<template v-if="!props.readonly || slots['left-icons']" #left-icons>
|
|
515
|
+
<slot name="left-icons" :disabled="disabled" />
|
|
516
|
+
<!-- <UButton label="" color="neutral" variant="subtle" /> -->
|
|
517
|
+
|
|
518
|
+
<button
|
|
519
|
+
v-if="!props.readonly"
|
|
520
|
+
ref="openBtn"
|
|
521
|
+
data-sep="right"
|
|
522
|
+
data-icon="calendar"
|
|
523
|
+
:tabindex="tabindex"
|
|
524
|
+
:disabled="disabled"
|
|
525
|
+
class="open-btn"
|
|
526
|
+
:class="!disabled ? 'cursor-pointer hover:bg-accent1/10 active:bg-accent1/20' : ''"
|
|
527
|
+
data-keep-popover-open
|
|
528
|
+
@focus="openBtnFocus"
|
|
529
|
+
@blur="focusState.openBtn = false"
|
|
530
|
+
@click.stop="toggleModal"
|
|
531
|
+
>
|
|
532
|
+
<div
|
|
533
|
+
class="absolute inset-1 border-main2 border pointer-events-none transition-all rounded-sm"
|
|
534
|
+
:class="computedIsFocusOpenBtn ? 'opacity-100' : 'opacity-0'"
|
|
535
|
+
></div>
|
|
536
|
+
<i :class="props.mode === 'time' ? 'fa-regular fa-clock' : 'fa-solid fa-calendar-days'"></i>
|
|
537
|
+
</button>
|
|
538
|
+
</template>
|
|
539
|
+
<template #right-icons>
|
|
540
|
+
<template v-if="!props.hideDeleteBtn && !props.readonly">
|
|
541
|
+
<button
|
|
542
|
+
:class="!disabled ? 'text-error cursor-pointer hover:bg-error/10 active:bg-error/20' : ''"
|
|
543
|
+
tabindex="-1"
|
|
544
|
+
@click.stop="iconEventDelete()"
|
|
545
|
+
>
|
|
546
|
+
<i class="fa-solid fa-delete-left"></i>
|
|
547
|
+
</button>
|
|
548
|
+
</template>
|
|
549
|
+
<slot name="right-icons" :disabled="disabled" />
|
|
550
|
+
</template>
|
|
551
|
+
<template v-if="slots['label-prepend']" #label-prepend>
|
|
552
|
+
<slot name="label-prepend" />
|
|
553
|
+
</template>
|
|
554
|
+
<template v-if="slots['label-append']" #label-append>
|
|
555
|
+
<slot name="label-append" />
|
|
556
|
+
</template>
|
|
557
|
+
<template v-if="slots['header-right']" #header-right>
|
|
558
|
+
<slot name="header-right" />
|
|
559
|
+
</template>
|
|
560
|
+
|
|
561
|
+
<div
|
|
562
|
+
class="nac-c-input-p relative min-h-5"
|
|
563
|
+
:class="[{ disabled: props.disabled, readonly: props.readonly }, inputBoxClass]"
|
|
564
|
+
@click.stop="manualInputClick"
|
|
565
|
+
>
|
|
566
|
+
<input
|
|
567
|
+
ref="manualElm"
|
|
568
|
+
v-model="manualData"
|
|
569
|
+
type="text"
|
|
570
|
+
class="absolute inset-0"
|
|
571
|
+
:class="[manualInput ? 'pointer-events-auto opacity-100' : 'pointer-events-none opacity-0', inputBoxClass]"
|
|
572
|
+
:tabindex="-1"
|
|
573
|
+
:name="'HsDatePicker-manual-input-' + uid"
|
|
574
|
+
@blur="manualInputBlur()"
|
|
575
|
+
@focus="manualInputfocus()"
|
|
576
|
+
/>
|
|
577
|
+
<span :class="!manualInput ? 'pointer-events-auto opacity-100' : 'pointer-events-none opacity-0'">
|
|
578
|
+
{{ displayText }}
|
|
579
|
+
</span>
|
|
580
|
+
<span
|
|
581
|
+
v-if="props.data === null && !props.hideTodayBtn && !props.readonly"
|
|
582
|
+
class="today"
|
|
583
|
+
:class="!manualInput ? 'pointer-events-auto opacity-100' : 'pointer-events-none opacity-0'"
|
|
584
|
+
@click.stop="datePickerToday()"
|
|
585
|
+
>
|
|
586
|
+
{{ props.mode === "time" ? "Now" : "Today" }}
|
|
587
|
+
</span>
|
|
588
|
+
</div>
|
|
589
|
+
</InputFrame>
|
|
590
|
+
<ClientOnly>
|
|
591
|
+
<UPopover
|
|
592
|
+
v-model:open="open"
|
|
593
|
+
arrow
|
|
594
|
+
:reference="openBtn || void 0"
|
|
595
|
+
:portal="props.portal"
|
|
596
|
+
:open-delay="10"
|
|
597
|
+
:same-width="false"
|
|
598
|
+
strategy="absolute"
|
|
599
|
+
:content="content"
|
|
600
|
+
>
|
|
601
|
+
<template #content>
|
|
602
|
+
<div
|
|
603
|
+
class="calender-modal min-w-50"
|
|
604
|
+
:style="{
|
|
605
|
+
'--selected-color': themeColor,
|
|
606
|
+
'--error-color': themeErrorColor,
|
|
607
|
+
'--ui-primary': themeColor,
|
|
608
|
+
'--ui-secondary': themeWeekColor
|
|
609
|
+
}"
|
|
610
|
+
>
|
|
611
|
+
<UCalendar
|
|
612
|
+
v-if="props.mode !== 'time'"
|
|
613
|
+
:model-value="calendarValue"
|
|
614
|
+
class="p-2"
|
|
615
|
+
:locale="displayLocale"
|
|
616
|
+
:min-value="calendarMinValue || void 0"
|
|
617
|
+
:max-value="calendarMaxValue || void 0"
|
|
618
|
+
color="secondary"
|
|
619
|
+
:ui="{}"
|
|
620
|
+
@update:model-value="(v) => changeCalender(v)"
|
|
621
|
+
/>
|
|
622
|
+
<div v-if="props.mode === 'all' || props.mode === 'time'" class="grid grid-cols-2 gap-1 p-1">
|
|
623
|
+
<template v-if="hsIsMobile.isMobile">
|
|
624
|
+
<USelect
|
|
625
|
+
:model-value="HH || void 0"
|
|
626
|
+
:items="listHH"
|
|
627
|
+
class=""
|
|
628
|
+
value-key="id"
|
|
629
|
+
placeholder="HH"
|
|
630
|
+
:search-input="{
|
|
631
|
+
placeholder: 'HH',
|
|
632
|
+
type: 'number'
|
|
633
|
+
}"
|
|
634
|
+
@update:model-value="(v) => hhValueChange(v)"
|
|
635
|
+
/>
|
|
636
|
+
<USelect
|
|
637
|
+
:model-value="MM || void 0"
|
|
638
|
+
:items="listMM"
|
|
639
|
+
class=""
|
|
640
|
+
value-key="id"
|
|
641
|
+
placeholder="mm"
|
|
642
|
+
:search-input="{
|
|
643
|
+
placeholder: 'mm',
|
|
644
|
+
type: 'number'
|
|
645
|
+
}"
|
|
646
|
+
@update:model-value="(v) => mmValueChange(v)"
|
|
647
|
+
/>
|
|
648
|
+
</template>
|
|
649
|
+
<template v-else>
|
|
650
|
+
<USelectMenu
|
|
651
|
+
:model-value="HH || void 0"
|
|
652
|
+
:items="listHH"
|
|
653
|
+
class=""
|
|
654
|
+
value-key="id"
|
|
655
|
+
placeholder="HH"
|
|
656
|
+
:search-input="{
|
|
657
|
+
placeholder: 'HH',
|
|
658
|
+
type: 'number'
|
|
659
|
+
}"
|
|
660
|
+
@update:model-value="(v) => hhValueChange(v)"
|
|
661
|
+
/>
|
|
662
|
+
<USelectMenu
|
|
663
|
+
:model-value="MM || void 0"
|
|
664
|
+
:items="listMM"
|
|
665
|
+
class=""
|
|
666
|
+
value-key="id"
|
|
667
|
+
placeholder="mm"
|
|
668
|
+
:search-input="{
|
|
669
|
+
placeholder: 'mm',
|
|
670
|
+
type: 'number'
|
|
671
|
+
}"
|
|
672
|
+
@update:model-value="(v) => mmValueChange(v)"
|
|
673
|
+
/>
|
|
674
|
+
</template>
|
|
675
|
+
</div>
|
|
676
|
+
</div>
|
|
677
|
+
</template>
|
|
678
|
+
</UPopover>
|
|
679
|
+
</ClientOnly>
|
|
680
|
+
</template>
|
|
681
|
+
|
|
878
682
|
<style scoped>
|
|
879
683
|
.nac-c-input-p {
|
|
880
684
|
width: 100%;
|
|
@@ -905,11 +709,6 @@ const computedIsFocusOpenBtn = computed(() => {
|
|
|
905
709
|
pointer-events: none;
|
|
906
710
|
}
|
|
907
711
|
|
|
908
|
-
:deep(.flatpickr-mobile) {
|
|
909
|
-
position: absolute;
|
|
910
|
-
opacity: 0;
|
|
911
|
-
}
|
|
912
|
-
|
|
913
712
|
.nac-c-input-p {
|
|
914
713
|
display: flex;
|
|
915
714
|
align-items: center;
|
|
@@ -930,4 +729,39 @@ const computedIsFocusOpenBtn = computed(() => {
|
|
|
930
729
|
.disabled .nac-c-input-p .today {
|
|
931
730
|
display: none;
|
|
932
731
|
}
|
|
933
|
-
|
|
732
|
+
|
|
733
|
+
.calender-modal:deep(*) [data-reka-calendar-cell-trigger] {
|
|
734
|
+
cursor: pointer;
|
|
735
|
+
}
|
|
736
|
+
.calender-modal:deep(*) [data-reka-calendar-cell-trigger][data-today]:not([data-selected]) {
|
|
737
|
+
color: var(--selected-color) !important;
|
|
738
|
+
}
|
|
739
|
+
.calender-modal:deep(*) [data-reka-calendar-cell-trigger][data-disabled] {
|
|
740
|
+
background-color: #afafaf !important;
|
|
741
|
+
color: white !important;
|
|
742
|
+
}
|
|
743
|
+
.calender-modal:deep(*) [data-selected] {
|
|
744
|
+
background: var(--selected-color) !important;
|
|
745
|
+
color: white !important;
|
|
746
|
+
}
|
|
747
|
+
@media (hover: hover) {
|
|
748
|
+
.calender-modal:deep(*) [data-reka-calendar-cell-trigger]:hover:not([data-selected]):not([data-disabled]) {
|
|
749
|
+
background-color: color-mix(in oklab, var(--selected-color) 20%, transparent);
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
@media (hover: hover) {
|
|
753
|
+
.calender-modal:deep(*) [data-reka-calendar-cell-trigger]:hover:not([data-selected])[data-disabled] {
|
|
754
|
+
background-color: color-mix(in oklab, var(--error-color) 50%, transparent);
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
</style>
|
|
758
|
+
|
|
759
|
+
<style>
|
|
760
|
+
[data-reka-popper-content-wrapper] > [data-dismissable-layer] {
|
|
761
|
+
filter: drop-shadow(0px 0px 3px rgba(0, 0, 0, 0.58));
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
[data-reka-popper-content-wrapper] > [data-dismissable-layer] > span > svg {
|
|
765
|
+
fill: white;
|
|
766
|
+
}
|
|
767
|
+
</style>
|