react-modular-datepicker 0.0.4 → 0.0.5-canary.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +137 -230
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +19 -12
- package/dist/index.mjs.map +1 -1
- package/dist/useDates-CCrn42eQ.js +2 -0
- package/dist/useDates-CCrn42eQ.js.map +1 -0
- package/dist/{useDates-DQabq6Ux.mjs → useDates-CpcW1GpF.mjs} +1 -4
- package/dist/useDates-CpcW1GpF.mjs.map +1 -0
- package/dist/useDates.d.ts +0 -3
- package/dist/useDates.js +1 -1
- package/dist/useDates.mjs +1 -1
- package/package.json +28 -62
- package/dist/useDates-D9EvVlhK.js +0 -2
- package/dist/useDates-D9EvVlhK.js.map +0 -1
- package/dist/useDates-DQabq6Ux.mjs.map +0 -1
package/dist/index.css
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
/*! tailwindcss v4.3.
|
|
1
|
+
/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
|
|
2
2
|
@layer properties;
|
|
3
3
|
@layer theme, base, components, utilities;
|
|
4
4
|
@layer theme {
|
|
5
5
|
:root, :host {
|
|
6
|
-
--font-sans:
|
|
7
|
-
"
|
|
6
|
+
--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
|
|
7
|
+
"Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
|
|
8
|
+
"Segoe UI Symbol", "Noto Color Emoji";
|
|
8
9
|
--font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
|
|
9
10
|
--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
|
|
10
11
|
"Courier New", monospace;
|
|
@@ -122,7 +123,7 @@
|
|
|
122
123
|
line-height: 1.5;
|
|
123
124
|
-webkit-text-size-adjust: 100%;
|
|
124
125
|
tab-size: 4;
|
|
125
|
-
font-family: var(--default-font-family,
|
|
126
|
+
font-family: var(--default-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");
|
|
126
127
|
font-feature-settings: var(--default-font-feature-settings, normal);
|
|
127
128
|
font-variation-settings: var(--default-font-variation-settings, normal);
|
|
128
129
|
-webkit-tap-highlight-color: transparent;
|
|
@@ -174,7 +175,7 @@
|
|
|
174
175
|
border-color: inherit;
|
|
175
176
|
border-collapse: collapse;
|
|
176
177
|
}
|
|
177
|
-
:-moz-focusring {
|
|
178
|
+
:-moz-focusring:where(:not(iframe)) {
|
|
178
179
|
outline: auto;
|
|
179
180
|
}
|
|
180
181
|
progress {
|
|
@@ -272,11 +273,14 @@
|
|
|
272
273
|
.absolute {
|
|
273
274
|
position: absolute;
|
|
274
275
|
}
|
|
276
|
+
.fixed {
|
|
277
|
+
position: fixed;
|
|
278
|
+
}
|
|
275
279
|
.relative {
|
|
276
280
|
position: relative;
|
|
277
281
|
}
|
|
278
282
|
.inset-0 {
|
|
279
|
-
inset:
|
|
283
|
+
inset: 0px;
|
|
280
284
|
}
|
|
281
285
|
.top-1\/2 {
|
|
282
286
|
top: calc(1 / 2 * 100%);
|
|
@@ -291,14 +295,11 @@
|
|
|
291
295
|
bottom: 100%;
|
|
292
296
|
}
|
|
293
297
|
.left-0 {
|
|
294
|
-
left:
|
|
298
|
+
left: 0px;
|
|
295
299
|
}
|
|
296
300
|
.left-1\/2 {
|
|
297
301
|
left: calc(1 / 2 * 100%);
|
|
298
302
|
}
|
|
299
|
-
.isolate {
|
|
300
|
-
isolation: isolate;
|
|
301
|
-
}
|
|
302
303
|
.z-10 {
|
|
303
304
|
z-index: 10;
|
|
304
305
|
}
|
|
@@ -318,7 +319,7 @@
|
|
|
318
319
|
margin-top: calc(var(--spacing) * 6);
|
|
319
320
|
}
|
|
320
321
|
.mb-1 {
|
|
321
|
-
margin-bottom:
|
|
322
|
+
margin-bottom: var(--spacing);
|
|
322
323
|
}
|
|
323
324
|
.mb-2 {
|
|
324
325
|
margin-bottom: calc(var(--spacing) * 2);
|
|
@@ -353,6 +354,9 @@
|
|
|
353
354
|
.inline-block {
|
|
354
355
|
display: inline-block;
|
|
355
356
|
}
|
|
357
|
+
.table {
|
|
358
|
+
display: table;
|
|
359
|
+
}
|
|
356
360
|
.aspect-square {
|
|
357
361
|
aspect-ratio: 1 / 1;
|
|
358
362
|
}
|
|
@@ -375,7 +379,7 @@
|
|
|
375
379
|
max-height: 300px;
|
|
376
380
|
}
|
|
377
381
|
.min-h-0 {
|
|
378
|
-
min-height:
|
|
382
|
+
min-height: 0px;
|
|
379
383
|
}
|
|
380
384
|
.min-h-\[120px\] {
|
|
381
385
|
min-height: 120px;
|
|
@@ -491,7 +495,7 @@
|
|
|
491
495
|
justify-content: center;
|
|
492
496
|
}
|
|
493
497
|
.gap-1 {
|
|
494
|
-
gap:
|
|
498
|
+
gap: var(--spacing);
|
|
495
499
|
}
|
|
496
500
|
.gap-2 {
|
|
497
501
|
gap: calc(var(--spacing) * 2);
|
|
@@ -505,22 +509,21 @@
|
|
|
505
509
|
.gap-8 {
|
|
506
510
|
gap: calc(var(--spacing) * 8);
|
|
507
511
|
}
|
|
512
|
+
.gap-12 {
|
|
513
|
+
gap: calc(var(--spacing) * 12);
|
|
514
|
+
}
|
|
508
515
|
.gap-px {
|
|
509
516
|
gap: 1px;
|
|
510
517
|
}
|
|
511
|
-
.space-y-1 {
|
|
512
|
-
:
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
margin-block-end: calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse)));
|
|
516
|
-
}
|
|
518
|
+
:where(.space-y-1 > :not(:last-child)) {
|
|
519
|
+
--tw-space-y-reverse: 0;
|
|
520
|
+
margin-block-start: calc(var(--spacing) * var(--tw-space-y-reverse));
|
|
521
|
+
margin-block-end: calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)));
|
|
517
522
|
}
|
|
518
|
-
.space-y-6 {
|
|
519
|
-
:
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
margin-block-end: calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)));
|
|
523
|
-
}
|
|
523
|
+
:where(.space-y-6 > :not(:last-child)) {
|
|
524
|
+
--tw-space-y-reverse: 0;
|
|
525
|
+
margin-block-start: calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));
|
|
526
|
+
margin-block-end: calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)));
|
|
524
527
|
}
|
|
525
528
|
.truncate {
|
|
526
529
|
overflow: hidden;
|
|
@@ -860,7 +863,7 @@
|
|
|
860
863
|
background-clip: text;
|
|
861
864
|
}
|
|
862
865
|
.p-1 {
|
|
863
|
-
padding:
|
|
866
|
+
padding: var(--spacing);
|
|
864
867
|
}
|
|
865
868
|
.p-1\.5 {
|
|
866
869
|
padding: calc(var(--spacing) * 1.5);
|
|
@@ -887,7 +890,7 @@
|
|
|
887
890
|
padding: 1px;
|
|
888
891
|
}
|
|
889
892
|
.px-1 {
|
|
890
|
-
padding-inline:
|
|
893
|
+
padding-inline: var(--spacing);
|
|
891
894
|
}
|
|
892
895
|
.px-1\.5 {
|
|
893
896
|
padding-inline: calc(var(--spacing) * 1.5);
|
|
@@ -905,7 +908,7 @@
|
|
|
905
908
|
padding-block: calc(var(--spacing) * 0.5);
|
|
906
909
|
}
|
|
907
910
|
.py-1 {
|
|
908
|
-
padding-block:
|
|
911
|
+
padding-block: var(--spacing);
|
|
909
912
|
}
|
|
910
913
|
.py-1\.5 {
|
|
911
914
|
padding-block: calc(var(--spacing) * 1.5);
|
|
@@ -926,7 +929,7 @@
|
|
|
926
929
|
padding-right: calc(var(--spacing) * 2);
|
|
927
930
|
}
|
|
928
931
|
.pb-1 {
|
|
929
|
-
padding-bottom:
|
|
932
|
+
padding-bottom: var(--spacing);
|
|
930
933
|
}
|
|
931
934
|
.pb-2 {
|
|
932
935
|
padding-bottom: calc(var(--spacing) * 2);
|
|
@@ -1237,259 +1240,163 @@
|
|
|
1237
1240
|
--tw-outline-style: none;
|
|
1238
1241
|
outline-style: none;
|
|
1239
1242
|
}
|
|
1240
|
-
.group-focus-within\:visible {
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
+
.group-focus-within\:visible:is(:where(.group):focus-within *) {
|
|
1244
|
+
visibility: visible;
|
|
1245
|
+
}
|
|
1246
|
+
.group-focus-within\:scale-100:is(:where(.group):focus-within *) {
|
|
1247
|
+
--tw-scale-x: 100%;
|
|
1248
|
+
--tw-scale-y: 100%;
|
|
1249
|
+
--tw-scale-z: 100%;
|
|
1250
|
+
scale: var(--tw-scale-x) var(--tw-scale-y);
|
|
1251
|
+
}
|
|
1252
|
+
.group-focus-within\:opacity-100:is(:where(.group):focus-within *) {
|
|
1253
|
+
opacity: 100%;
|
|
1254
|
+
}
|
|
1255
|
+
@media (hover: hover) {
|
|
1256
|
+
.group-hover\:block:is(:where(.group):hover *) {
|
|
1257
|
+
display: block;
|
|
1243
1258
|
}
|
|
1244
1259
|
}
|
|
1245
|
-
.
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1260
|
+
.last\:border-r-0:last-child {
|
|
1261
|
+
border-right-style: var(--tw-border-style);
|
|
1262
|
+
border-right-width: 0px;
|
|
1263
|
+
}
|
|
1264
|
+
@media (hover: hover) {
|
|
1265
|
+
.hover\:scale-110:hover {
|
|
1266
|
+
--tw-scale-x: 110%;
|
|
1267
|
+
--tw-scale-y: 110%;
|
|
1268
|
+
--tw-scale-z: 110%;
|
|
1250
1269
|
scale: var(--tw-scale-x) var(--tw-scale-y);
|
|
1251
1270
|
}
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
&:is(:where(.group):focus-within *) {
|
|
1255
|
-
opacity: 100%;
|
|
1271
|
+
.hover\:border-amber-400:hover {
|
|
1272
|
+
border-color: var(--color-amber-400);
|
|
1256
1273
|
}
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
&:is(:where(.group):hover *) {
|
|
1260
|
-
@media (hover: hover) {
|
|
1261
|
-
display: block;
|
|
1262
|
-
}
|
|
1274
|
+
.hover\:border-cyan-400:hover {
|
|
1275
|
+
border-color: var(--color-cyan-400);
|
|
1263
1276
|
}
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
&:last-child {
|
|
1267
|
-
border-right-style: var(--tw-border-style);
|
|
1268
|
-
border-right-width: 0px;
|
|
1277
|
+
.hover\:bg-amber-100\/50:hover {
|
|
1278
|
+
background-color: color-mix(in srgb, oklch(96.2% 0.059 95.617) 50%, transparent);
|
|
1269
1279
|
}
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
@media (hover: hover) {
|
|
1274
|
-
--tw-scale-x: 110%;
|
|
1275
|
-
--tw-scale-y: 110%;
|
|
1276
|
-
--tw-scale-z: 110%;
|
|
1277
|
-
scale: var(--tw-scale-x) var(--tw-scale-y);
|
|
1280
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1281
|
+
.hover\:bg-amber-100\/50:hover {
|
|
1282
|
+
background-color: color-mix(in oklab, var(--color-amber-100) 50%, transparent);
|
|
1278
1283
|
}
|
|
1279
1284
|
}
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
&:hover {
|
|
1283
|
-
@media (hover: hover) {
|
|
1284
|
-
border-color: var(--color-amber-400);
|
|
1285
|
-
}
|
|
1285
|
+
.hover\:bg-brand-gray-light:hover {
|
|
1286
|
+
background-color: var(--color-brand-gray-light);
|
|
1286
1287
|
}
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
&:hover {
|
|
1290
|
-
@media (hover: hover) {
|
|
1291
|
-
border-color: var(--color-cyan-400);
|
|
1292
|
-
}
|
|
1288
|
+
.hover\:bg-cyan-400:hover {
|
|
1289
|
+
background-color: var(--color-cyan-400);
|
|
1293
1290
|
}
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
&:hover {
|
|
1297
|
-
@media (hover: hover) {
|
|
1298
|
-
background-color: color-mix(in srgb, oklch(96.2% 0.059 95.617) 50%, transparent);
|
|
1299
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
1300
|
-
background-color: color-mix(in oklab, var(--color-amber-100) 50%, transparent);
|
|
1301
|
-
}
|
|
1302
|
-
}
|
|
1291
|
+
.hover\:bg-cyan-950:hover {
|
|
1292
|
+
background-color: var(--color-cyan-950);
|
|
1303
1293
|
}
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
&:hover {
|
|
1307
|
-
@media (hover: hover) {
|
|
1308
|
-
background-color: var(--color-brand-gray-light);
|
|
1309
|
-
}
|
|
1294
|
+
.hover\:bg-gray-50:hover {
|
|
1295
|
+
background-color: var(--color-gray-50);
|
|
1310
1296
|
}
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
&:hover {
|
|
1314
|
-
@media (hover: hover) {
|
|
1315
|
-
background-color: var(--color-cyan-400);
|
|
1316
|
-
}
|
|
1297
|
+
.hover\:bg-gray-50\/50:hover {
|
|
1298
|
+
background-color: color-mix(in srgb, oklch(98.5% 0.002 247.839) 50%, transparent);
|
|
1317
1299
|
}
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
@media (hover: hover) {
|
|
1322
|
-
background-color: var(--color-cyan-950);
|
|
1300
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1301
|
+
.hover\:bg-gray-50\/50:hover {
|
|
1302
|
+
background-color: color-mix(in oklab, var(--color-gray-50) 50%, transparent);
|
|
1323
1303
|
}
|
|
1324
1304
|
}
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
&:hover {
|
|
1328
|
-
@media (hover: hover) {
|
|
1329
|
-
background-color: var(--color-gray-50);
|
|
1330
|
-
}
|
|
1305
|
+
.hover\:bg-gray-100:hover {
|
|
1306
|
+
background-color: var(--color-gray-100);
|
|
1331
1307
|
}
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
&:hover {
|
|
1335
|
-
@media (hover: hover) {
|
|
1336
|
-
background-color: color-mix(in srgb, oklch(98.5% 0.002 247.839) 50%, transparent);
|
|
1337
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
1338
|
-
background-color: color-mix(in oklab, var(--color-gray-50) 50%, transparent);
|
|
1339
|
-
}
|
|
1340
|
-
}
|
|
1308
|
+
.hover\:bg-gray-200:hover {
|
|
1309
|
+
background-color: var(--color-gray-200);
|
|
1341
1310
|
}
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
&:hover {
|
|
1345
|
-
@media (hover: hover) {
|
|
1346
|
-
background-color: var(--color-gray-100);
|
|
1347
|
-
}
|
|
1311
|
+
.hover\:bg-green-200:hover {
|
|
1312
|
+
background-color: var(--color-green-200);
|
|
1348
1313
|
}
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
&:hover {
|
|
1352
|
-
@media (hover: hover) {
|
|
1353
|
-
background-color: var(--color-gray-200);
|
|
1354
|
-
}
|
|
1314
|
+
.hover\:bg-purple-500\/30:hover {
|
|
1315
|
+
background-color: color-mix(in srgb, oklch(62.7% 0.265 303.9) 30%, transparent);
|
|
1355
1316
|
}
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
@media (hover: hover) {
|
|
1360
|
-
background-color: var(--color-green-200);
|
|
1317
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1318
|
+
.hover\:bg-purple-500\/30:hover {
|
|
1319
|
+
background-color: color-mix(in oklab, var(--color-purple-500) 30%, transparent);
|
|
1361
1320
|
}
|
|
1362
1321
|
}
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
&:hover {
|
|
1366
|
-
@media (hover: hover) {
|
|
1367
|
-
background-color: color-mix(in srgb, oklch(62.7% 0.265 303.9) 30%, transparent);
|
|
1368
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
1369
|
-
background-color: color-mix(in oklab, var(--color-purple-500) 30%, transparent);
|
|
1370
|
-
}
|
|
1371
|
-
}
|
|
1322
|
+
.hover\:bg-purple-800\/40:hover {
|
|
1323
|
+
background-color: color-mix(in srgb, oklch(43.8% 0.218 303.724) 40%, transparent);
|
|
1372
1324
|
}
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
@media (hover: hover) {
|
|
1377
|
-
background-color: color-mix(in srgb, oklch(43.8% 0.218 303.724) 40%, transparent);
|
|
1378
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
1379
|
-
background-color: color-mix(in oklab, var(--color-purple-800) 40%, transparent);
|
|
1380
|
-
}
|
|
1325
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1326
|
+
.hover\:bg-purple-800\/40:hover {
|
|
1327
|
+
background-color: color-mix(in oklab, var(--color-purple-800) 40%, transparent);
|
|
1381
1328
|
}
|
|
1382
1329
|
}
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
&:hover {
|
|
1386
|
-
@media (hover: hover) {
|
|
1387
|
-
background-color: color-mix(in srgb, oklch(92.3% 0.003 48.717) 60%, transparent);
|
|
1388
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
1389
|
-
background-color: color-mix(in oklab, var(--color-stone-200) 60%, transparent);
|
|
1390
|
-
}
|
|
1391
|
-
}
|
|
1330
|
+
.hover\:bg-stone-200\/60:hover {
|
|
1331
|
+
background-color: color-mix(in srgb, oklch(92.3% 0.003 48.717) 60%, transparent);
|
|
1392
1332
|
}
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
@media (hover: hover) {
|
|
1397
|
-
background-color: color-mix(in srgb, oklch(92.3% 0.003 48.717) 80%, transparent);
|
|
1398
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
1399
|
-
background-color: color-mix(in oklab, var(--color-stone-200) 80%, transparent);
|
|
1400
|
-
}
|
|
1333
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1334
|
+
.hover\:bg-stone-200\/60:hover {
|
|
1335
|
+
background-color: color-mix(in oklab, var(--color-stone-200) 60%, transparent);
|
|
1401
1336
|
}
|
|
1402
1337
|
}
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
&:hover {
|
|
1406
|
-
@media (hover: hover) {
|
|
1407
|
-
color: var(--color-black);
|
|
1408
|
-
}
|
|
1338
|
+
.hover\:bg-stone-200\/80:hover {
|
|
1339
|
+
background-color: color-mix(in srgb, oklch(92.3% 0.003 48.717) 80%, transparent);
|
|
1409
1340
|
}
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
@media (hover: hover) {
|
|
1414
|
-
color: var(--color-stone-950);
|
|
1341
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1342
|
+
.hover\:bg-stone-200\/80:hover {
|
|
1343
|
+
background-color: color-mix(in oklab, var(--color-stone-200) 80%, transparent);
|
|
1415
1344
|
}
|
|
1416
1345
|
}
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
&:hover {
|
|
1420
|
-
@media (hover: hover) {
|
|
1421
|
-
color: var(--color-white);
|
|
1422
|
-
}
|
|
1346
|
+
.hover\:text-black:hover {
|
|
1347
|
+
color: var(--color-black);
|
|
1423
1348
|
}
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
&:hover {
|
|
1427
|
-
@media (hover: hover) {
|
|
1428
|
-
text-decoration-line: underline;
|
|
1429
|
-
}
|
|
1349
|
+
.hover\:text-stone-950:hover {
|
|
1350
|
+
color: var(--color-stone-950);
|
|
1430
1351
|
}
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
&:hover {
|
|
1434
|
-
@media (hover: hover) {
|
|
1435
|
-
--tw-brightness: brightness(95%);
|
|
1436
|
-
filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);
|
|
1437
|
-
}
|
|
1352
|
+
.hover\:text-white:hover {
|
|
1353
|
+
color: var(--color-white);
|
|
1438
1354
|
}
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
&:focus {
|
|
1442
|
-
border-color: var(--color-brand-gold);
|
|
1355
|
+
.hover\:underline:hover {
|
|
1356
|
+
text-decoration-line: underline;
|
|
1443
1357
|
}
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
|
|
1448
|
-
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
1358
|
+
.hover\:brightness-95:hover {
|
|
1359
|
+
--tw-brightness: brightness(95%);
|
|
1360
|
+
filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);
|
|
1449
1361
|
}
|
|
1450
1362
|
}
|
|
1451
|
-
.focus\:
|
|
1452
|
-
|
|
1453
|
-
--tw-ring-color: var(--color-brand-gold);
|
|
1454
|
-
}
|
|
1363
|
+
.focus\:border-brand-gold:focus {
|
|
1364
|
+
border-color: var(--color-brand-gold);
|
|
1455
1365
|
}
|
|
1456
|
-
.
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
}
|
|
1366
|
+
.focus\:ring-2:focus {
|
|
1367
|
+
--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
|
|
1368
|
+
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
1460
1369
|
}
|
|
1461
|
-
.
|
|
1462
|
-
|
|
1463
|
-
opacity: 30%;
|
|
1464
|
-
}
|
|
1370
|
+
.focus\:ring-brand-gold:focus {
|
|
1371
|
+
--tw-ring-color: var(--color-brand-gold);
|
|
1465
1372
|
}
|
|
1466
|
-
.
|
|
1467
|
-
|
|
1373
|
+
.disabled\:pointer-events-none:disabled {
|
|
1374
|
+
pointer-events: none;
|
|
1375
|
+
}
|
|
1376
|
+
.disabled\:opacity-30:disabled {
|
|
1377
|
+
opacity: 30%;
|
|
1378
|
+
}
|
|
1379
|
+
@media (width >= 40rem) {
|
|
1380
|
+
.sm\:block {
|
|
1468
1381
|
display: block;
|
|
1469
1382
|
}
|
|
1470
|
-
|
|
1471
|
-
.sm\:grid-cols-2 {
|
|
1472
|
-
@media (width >= 40rem) {
|
|
1383
|
+
.sm\:grid-cols-2 {
|
|
1473
1384
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
1474
1385
|
}
|
|
1475
1386
|
}
|
|
1476
|
-
|
|
1477
|
-
|
|
1387
|
+
@media (width >= 48rem) {
|
|
1388
|
+
.md\:grid-cols-2 {
|
|
1478
1389
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
1479
1390
|
}
|
|
1480
|
-
|
|
1481
|
-
.md\:flex-row {
|
|
1482
|
-
@media (width >= 48rem) {
|
|
1391
|
+
.md\:flex-row {
|
|
1483
1392
|
flex-direction: row;
|
|
1484
1393
|
}
|
|
1485
1394
|
}
|
|
1486
|
-
|
|
1487
|
-
|
|
1395
|
+
@media (width >= 64rem) {
|
|
1396
|
+
.lg\:grid-cols-3 {
|
|
1488
1397
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
1489
1398
|
}
|
|
1490
|
-
|
|
1491
|
-
.lg\:grid-cols-4 {
|
|
1492
|
-
@media (width >= 64rem) {
|
|
1399
|
+
.lg\:grid-cols-4 {
|
|
1493
1400
|
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
1494
1401
|
}
|
|
1495
1402
|
}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./useDates-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./useDates-CCrn42eQ.js"),t=require("./utils.js");let n=require("react");n=e.i(n);let r=require("react/jsx-runtime");var i=({dateObj:e,getDateProps:t,classNames:i,tooltip:a})=>{let[o,s]=(0,n.useState)(!1);if(!e)return(0,r.jsx)(`div`,{className:`aspect-square bg-white`});let{date:c,selected:l,selectable:u,isRangeStart:d,isRangeEnd:f,isRangeBetween:p,isRangeHovering:m,isRangeActive:h}=e,g=i.day,_=`rounded-full`;_=d&&f?`${g.selected} rounded-full`:d?`${g.rangeStart} ${h?`rounded-l-full rounded-r-none`:`rounded-full`}`:f?`${g.rangeEnd} ${h?`rounded-r-full rounded-l-none`:`rounded-full`}`:p?g.rangeBetween||``:m?g.rangeHovering||``:l?g.selected||``:u?g.unselected||``:g.disabled||``;let v=[g.day,_,...(e.modifiers||[]).map(e=>g[e]||e)].filter(Boolean).join(` `);return(0,r.jsxs)(`button`,{...t({dateObj:e,onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1)}),className:v,children:[c.getDate(),a&&o&&(0,r.jsx)(`div`,{className:`absolute bottom-full left-1/2 -translate-x-1/2 mb-2 hidden group-hover:block z-10`,children:(0,r.jsxs)(`div`,{className:`bg-gray-800 text-white text-xs py-1 px-2 rounded whitespace-nowrap shadow-lg`,children:[a,(0,r.jsx)(`div`,{className:`absolute top-full left-1/2 -translate-x-1/2 border-8 border-transparent border-t-gray-800`})]})})]})};function a(t=e.r,n){return{months:t.getMonths(n),weekdays:t.getWeekdays(n),back:`Previous month`,forward:`Next month`}}function o(t=e.r,n,r){return{...a(t,n),...r}}var s=()=>(0,r.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,r.jsx)(`polyline`,{points:`15 18 9 12 15 6`})}),c=()=>(0,r.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,r.jsx)(`polyline`,{points:`9 18 15 12 9 6`})}),l=({calendars:e,getBackProps:t,getForwardProps:n,setView:i,monthNames:a,t:o,classNames:l,slideDirection:u,currentView:d})=>(0,r.jsxs)(`div`,{className:l.header,children:[(0,r.jsx)(`button`,{...t({calendars:e}),onMouseDown:e=>e.preventDefault(),className:`${l.navButton} ${d&&d!==`days`?`invisible pointer-events-none`:``}`,"aria-label":o.back,children:(0,r.jsx)(s,{})}),(0,r.jsx)(`div`,{className:l.monthYearContainer,children:e.length===1?(0,r.jsxs)(`div`,{className:`${l.monthYearLabel} ${u===`left`?`animate-slide-in-left`:u===`right`?`animate-slide-in-right`:``}`,children:[(0,r.jsx)(`button`,{onMouseDown:e=>e.preventDefault(),onClick:()=>i(d===`months`?`days`:`months`),className:l.monthYearButton,children:a[e[0].month]}),(0,r.jsx)(`button`,{onMouseDown:e=>e.preventDefault(),onClick:()=>i(d===`years`?`days`:`years`),className:l.monthYearButton,children:e[0].year})]},`${e[0].month}-${e[0].year}`):(0,r.jsx)(`div`,{className:`${l.monthYearLabel} ${u===`left`?`animate-slide-in-left`:u===`right`?`animate-slide-in-right`:``}`,children:(()=>{let t=e[0],n=e[e.length-1];return e.length===12&&t.month===0&&n.month===11&&t.year===n.year?(0,r.jsx)(`span`,{children:t.year}):t.year===n.year?(0,r.jsxs)(`span`,{children:[a[t.month],` - `,a[n.month],` `,t.year]}):(0,r.jsxs)(`span`,{children:[a[t.month],` `,t.year,` - `,a[n.month],` `,n.year]})})()})}),(0,r.jsx)(`button`,{...n({calendars:e}),onMouseDown:e=>e.preventDefault(),className:`${l.navButton} ${d&&d!==`days`?`invisible pointer-events-none`:``}`,"aria-label":o.forward,children:(0,r.jsx)(c,{})})]}),u={root:`w-fit flex flex-col p-4 bg-white rounded-lg shadow-lg`,header:`flex items-center justify-between border-b-2 border-brand-gray-light/40 pb-2 mb-3`,calendarsContainer:`flex flex-col md:flex-row gap-4`,calendarContainer:`flex-1 min-w-[280px] min-h-[260px]`,weekdayGrid:`grid grid-cols-7 gap-1 mb-1 border-b border-brand-gray-light/40`,weekday:`text-center text-xs text-gray-400 py-2`,daysGrid:`grid grid-cols-7 gap-px bg-brand-gray-light/20`,footer:`mt-4`,navButton:`p-2 hover:bg-gray-100 rounded-full transition-colors cursor-pointer disabled:opacity-30 disabled:pointer-events-none`,monthYearContainer:`flex gap-8`,monthYearLabel:`flex gap-1 items-center font-semibold text-brand-text`,monthYearButton:`hover:bg-gray-100 px-2 py-1 rounded cursor-pointer`,day:{day:`aspect-square flex items-center justify-center text-sm font-medium transition-all relative group cursor-pointer p-px`,selected:`bg-brand-gold text-white rounded-full`,unselected:`bg-white hover:bg-brand-gray-light text-brand-text`,disabled:`bg-white text-gray-300 cursor-not-allowed`,rangeStart:`bg-brand-gold text-white`,rangeEnd:`bg-brand-gold text-white`,rangeBetween:`bg-brand-gold/25 text-brand-text`,rangeHovering:`bg-brand-gold/25 text-brand-text`},monthsGrid:`grid grid-cols-3 gap-2 animate-slide-in-top`,monthButton:`py-4 rounded-lg hover:bg-brand-gray-light transition-colors cursor-pointer disabled:opacity-30 disabled:pointer-events-none`,monthButtonSelected:`bg-brand-gold text-white`,monthButtonUnselected:`text-brand-text`,yearsGrid:`grid grid-cols-3 gap-2 max-h-[300px] overflow-y-auto pr-2 animate-slide-in-top`,yearButton:`py-3 rounded-lg hover:bg-brand-gray-light transition-colors cursor-pointer disabled:opacity-30 disabled:pointer-events-none`,yearButtonSelected:`bg-brand-gold text-white`,yearButtonUnselected:`text-brand-text`},d=e=>{let t={...u};if(!e)return t;for(let n in e){let r=n;r===`day`&&e.day?t.day={...u.day,...e.day}:e[r]&&(t[r]=e[r])}return t},f=({year:e,month:t,monthNames:n,minDate:i,maxDate:a,onMonthSelect:o,classNames:s})=>{let c=t=>!!(i&&e===i.getFullYear()&&t<i.getMonth()||a&&e===a.getFullYear()&&t>a.getMonth());return(0,r.jsx)(`div`,{className:s.monthsGrid,children:n.map((e,n)=>{let i=c(n);return(0,r.jsx)(`button`,{onMouseDown:e=>e.preventDefault(),onClick:()=>!i&&o(n),className:`${s.monthButton} ${n===t?s.monthButtonSelected:s.monthButtonUnselected}`,disabled:i,children:e},e)})})},p=({year:e,minDate:t,maxDate:i,adapter:a,onYearSelect:o,classNames:s})=>{let c=(0,n.useRef)(null);(0,n.useEffect)(()=>{if(c.current){let e=c.current.querySelector(`[data-selected="true"]`);e&&e.scrollIntoView({block:`center`})}},[]);let l=t?a.get(a.date(t),`year`):e-50,u=i?a.get(a.date(i),`year`):e+50,d=[];for(let e=l;e<=u;e++)d.push(e);return(0,r.jsx)(`div`,{ref:c,className:s.yearsGrid,children:d.map(t=>(0,r.jsx)(`button`,{"data-selected":t===e,onMouseDown:e=>e.preventDefault(),onClick:()=>o(t),className:`${s.yearButton} ${t===e?s.yearButtonSelected:s.yearButtonUnselected}`,children:t},t))})},m=t=>{let{classNames:a,locale:s,translations:c,adapter:u=e.r,firstDayOfWeek:m=0,header:h,footer:g,renderDayTooltip:_,...v}=t,y=d(a),[b,x]=(0,n.useState)(`days`),[S,C]=(0,n.useState)(null),w=o(u,s,c),T=w.weekdays,E=w.months,{calendars:D,getBackProps:O,getForwardProps:k,getDateProps:A,setOffset:j}=e.t({...v,adapter:u,firstDayOfWeek:m}),M=[...T.slice(m),...T.slice(0,m)],{month:N,year:P}=D[0],F=e=>{let n=u.set(u.set(u.date(t.date||new Date),`year`,P),`month`,N),r=u.set(n,`month`,e),i=u.startOf(u.date(t.date||new Date),`month`),a=u.diff(r,i,`month`);C(null),j(a),x(`days`)},I=e=>{let n=u.set(u.set(u.date(t.date||new Date),`year`,P),`month`,N),r=u.set(n,`year`,e),i=u.startOf(u.date(t.date||new Date),`month`),a=u.diff(r,i,`month`);C(null),j(a),x(`days`)},L=e=>{let t=O(e);return{...t,onClick:e=>{C(`left`),t.onClick?.(e)}}},R=e=>{let t=k(e);return{...t,onClick:e=>{C(`right`),t.onClick?.(e)}}};return(0,r.jsxs)(`div`,{className:y.root,children:[typeof h==`function`?h({calendars:D,getBackProps:L,getForwardProps:R,setView:x,monthNames:E,t:w,slideDirection:S,currentView:b}):h||(0,r.jsx)(l,{calendars:D,getBackProps:L,getForwardProps:R,setView:x,monthNames:E,t:w,classNames:y,slideDirection:S,currentView:b}),(0,r.jsxs)(`div`,{className:y.calendarsContainer,children:[b===`months`&&D.map(e=>(0,r.jsx)(`div`,{className:y.calendarContainer,children:(0,r.jsx)(f,{year:e.year,month:e.month,monthNames:E,minDate:t.minDate,maxDate:t.maxDate,onMonthSelect:F,classNames:y})},`months-${e.year}`)),b===`years`&&D.map(e=>(0,r.jsx)(`div`,{className:y.calendarContainer,children:(0,r.jsx)(p,{year:e.year,minDate:t.minDate,maxDate:t.maxDate,adapter:u,onYearSelect:I,classNames:y})},`years-${e.year}`)),b===`days`&&D.map(e=>(0,r.jsxs)(`div`,{className:y.calendarContainer,children:[D.length>1&&(0,r.jsxs)(`button`,{type:`button`,"aria-label":E[e.month],className:`block w-full text-center font-semibold mb-2 text-brand-text`,children:[E[e.month],` `,D[0].year===D[D.length-1].year?``:e.year]}),(0,r.jsx)(`div`,{className:y.weekdayGrid,children:M.map(e=>(0,r.jsx)(`div`,{className:y.weekday,children:e},e))}),(0,r.jsx)(`div`,{className:`${y.daysGrid} ${S===`left`?`animate-slide-in-left`:S===`right`?`animate-slide-in-right`:``}`,children:e.weeks.map((e,t)=>e.map((e,n)=>(0,r.jsx)(i,{dateObj:e,getDateProps:A,classNames:y,tooltip:e&&_?.(e)},`${t}-${n}`)))})]},`${e.month}-${e.year}`))]}),g&&(0,r.jsx)(`div`,{className:y.footer,children:g})]})};exports.Calendar=m,exports.CalendarHeader=l,exports.ChevronLeftIcon=s,exports.ChevronRightIcon=c,exports.Day=i,exports.DayjsAdapter=e.n,exports.MonthSelection=f,exports.YearSelection=p,exports.addMonth=t.addMonth,exports.composeEventHandlers=t.composeEventHandlers,exports.defaultAdapter=e.r,exports.defaultClassNames=u,exports.getCalendars=t.getCalendars,exports.getDefaults=a,exports.getTranslations=o,exports.isBackDisabled=t.isBackDisabled,exports.isForwardDisabled=t.isForwardDisabled,exports.mergeClassNames=d,exports.subtractMonth=t.subtractMonth,exports.useDates=e.t;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|