@classic-homes/maps-core 0.1.5 → 0.2.2

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.
@@ -0,0 +1,703 @@
1
+ /**
2
+ * Tailwind Utility Class Replacements for Maps Components
3
+ *
4
+ * This file provides standalone CSS implementations of Tailwind utility classes
5
+ * used by @classic-homes/maps-react and @classic-homes/maps-svelte components.
6
+ *
7
+ * For use in non-Tailwind projects (e.g., MUI-based codebases).
8
+ *
9
+ * All color utilities include fallback values so components render gracefully
10
+ * even if @classic-homes/theme-tokens/css is not imported. However, for proper
11
+ * theming and dark mode support, you should import the tokens.
12
+ */
13
+
14
+ @layer classic-theme.maps-utilities {
15
+ /* ==========================================================================
16
+ Position & Display
17
+ ========================================================================== */
18
+
19
+ .absolute {
20
+ position: absolute;
21
+ }
22
+ .relative {
23
+ position: relative;
24
+ }
25
+ .inset-0 {
26
+ inset: 0;
27
+ }
28
+ .inset-4 {
29
+ inset: 1rem;
30
+ }
31
+ .z-10 {
32
+ z-index: 10;
33
+ }
34
+
35
+ /* ==========================================================================
36
+ Flexbox
37
+ ========================================================================== */
38
+
39
+ .flex {
40
+ display: flex;
41
+ }
42
+ .inline-flex {
43
+ display: inline-flex;
44
+ }
45
+ .flex-col {
46
+ flex-direction: column;
47
+ }
48
+ .flex-1 {
49
+ flex: 1 1 0%;
50
+ }
51
+ .flex-shrink-0 {
52
+ flex-shrink: 0;
53
+ }
54
+ .items-center {
55
+ align-items: center;
56
+ }
57
+ .items-start {
58
+ align-items: flex-start;
59
+ }
60
+ .justify-center {
61
+ justify-content: center;
62
+ }
63
+ .justify-between {
64
+ justify-content: space-between;
65
+ }
66
+ .justify-end {
67
+ justify-content: flex-end;
68
+ }
69
+
70
+ /* ==========================================================================
71
+ Grid
72
+ ========================================================================== */
73
+
74
+ .grid {
75
+ display: grid;
76
+ }
77
+ .grid-cols-4 {
78
+ grid-template-columns: repeat(4, minmax(0, 1fr));
79
+ }
80
+ .grid-rows-4 {
81
+ grid-template-rows: repeat(4, minmax(0, 1fr));
82
+ }
83
+
84
+ /* ==========================================================================
85
+ Gap & Spacing
86
+ ========================================================================== */
87
+
88
+ .gap-1 {
89
+ gap: 0.25rem;
90
+ }
91
+ .gap-1\.5 {
92
+ gap: 0.375rem;
93
+ }
94
+ .gap-2 {
95
+ gap: 0.5rem;
96
+ }
97
+ .gap-3 {
98
+ gap: 0.75rem;
99
+ }
100
+
101
+ /* Space between children (vertical) */
102
+ .space-y-1 > :not([hidden]) ~ :not([hidden]) {
103
+ margin-top: 0.25rem;
104
+ }
105
+ .space-y-1\.5 > :not([hidden]) ~ :not([hidden]) {
106
+ margin-top: 0.375rem;
107
+ }
108
+ .space-y-2 > :not([hidden]) ~ :not([hidden]) {
109
+ margin-top: 0.5rem;
110
+ }
111
+
112
+ /* ==========================================================================
113
+ Width
114
+ ========================================================================== */
115
+
116
+ .w-full {
117
+ width: 100%;
118
+ }
119
+ .w-3 {
120
+ width: 0.75rem;
121
+ }
122
+ .w-4 {
123
+ width: 1rem;
124
+ }
125
+ .w-8 {
126
+ width: 2rem;
127
+ }
128
+ .w-10 {
129
+ width: 2.5rem;
130
+ }
131
+ .w-12 {
132
+ width: 3rem;
133
+ }
134
+ .w-64 {
135
+ width: 16rem;
136
+ }
137
+ .w-\[40px\] {
138
+ width: 40px;
139
+ }
140
+
141
+ /* ==========================================================================
142
+ Height
143
+ ========================================================================== */
144
+
145
+ .h-full {
146
+ height: 100%;
147
+ }
148
+ .h-3 {
149
+ height: 0.75rem;
150
+ }
151
+ .h-4 {
152
+ height: 1rem;
153
+ }
154
+ .h-8 {
155
+ height: 2rem;
156
+ }
157
+ .h-10 {
158
+ height: 2.5rem;
159
+ }
160
+ .h-\[40px\] {
161
+ height: 40px;
162
+ }
163
+
164
+ /* ==========================================================================
165
+ Min/Max Width & Height
166
+ ========================================================================== */
167
+
168
+ .min-w-0 {
169
+ min-width: 0;
170
+ }
171
+ .min-w-\[140px\] {
172
+ min-width: 140px;
173
+ }
174
+ .min-w-\[160px\] {
175
+ min-width: 160px;
176
+ }
177
+ .max-w-\[280px\] {
178
+ max-width: 280px;
179
+ }
180
+ .max-h-0 {
181
+ max-height: 0;
182
+ }
183
+ .max-h-64 {
184
+ max-height: 16rem;
185
+ }
186
+ .max-h-96 {
187
+ max-height: 24rem;
188
+ }
189
+
190
+ /* ==========================================================================
191
+ Padding
192
+ ========================================================================== */
193
+
194
+ .p-1 {
195
+ padding: 0.25rem;
196
+ }
197
+ .p-2 {
198
+ padding: 0.5rem;
199
+ }
200
+ .p-3 {
201
+ padding: 0.75rem;
202
+ }
203
+ .p-4 {
204
+ padding: 1rem;
205
+ }
206
+
207
+ .px-1 {
208
+ padding-left: 0.25rem;
209
+ padding-right: 0.25rem;
210
+ }
211
+ .px-1\.5 {
212
+ padding-left: 0.375rem;
213
+ padding-right: 0.375rem;
214
+ }
215
+ .px-2 {
216
+ padding-left: 0.5rem;
217
+ padding-right: 0.5rem;
218
+ }
219
+ .px-3 {
220
+ padding-left: 0.75rem;
221
+ padding-right: 0.75rem;
222
+ }
223
+ .px-4 {
224
+ padding-left: 1rem;
225
+ padding-right: 1rem;
226
+ }
227
+
228
+ .py-0\.5 {
229
+ padding-top: 0.125rem;
230
+ padding-bottom: 0.125rem;
231
+ }
232
+ .py-1 {
233
+ padding-top: 0.25rem;
234
+ padding-bottom: 0.25rem;
235
+ }
236
+ .py-2 {
237
+ padding-top: 0.5rem;
238
+ padding-bottom: 0.5rem;
239
+ }
240
+ .py-3 {
241
+ padding-top: 0.75rem;
242
+ padding-bottom: 0.75rem;
243
+ }
244
+
245
+ .pt-1 {
246
+ padding-top: 0.25rem;
247
+ }
248
+ .pb-2 {
249
+ padding-bottom: 0.5rem;
250
+ }
251
+ .pb-3 {
252
+ padding-bottom: 0.75rem;
253
+ }
254
+ .pr-12 {
255
+ padding-right: 3rem;
256
+ }
257
+
258
+ /* ==========================================================================
259
+ Margin
260
+ ========================================================================== */
261
+
262
+ .mt-1 {
263
+ margin-top: 0.25rem;
264
+ }
265
+ .mt-2 {
266
+ margin-top: 0.5rem;
267
+ }
268
+ .mb-1 {
269
+ margin-bottom: 0.25rem;
270
+ }
271
+ .ml-2 {
272
+ margin-left: 0.5rem;
273
+ }
274
+ .-mx-1 {
275
+ margin-left: -0.25rem;
276
+ margin-right: -0.25rem;
277
+ }
278
+
279
+ /* ==========================================================================
280
+ Borders
281
+ ========================================================================== */
282
+
283
+ .border {
284
+ border-width: 1px;
285
+ border-style: solid;
286
+ }
287
+ .border-t {
288
+ border-top-width: 1px;
289
+ border-top-style: solid;
290
+ }
291
+ .border-b {
292
+ border-bottom-width: 1px;
293
+ border-bottom-style: solid;
294
+ }
295
+
296
+ /* Border colors with fallbacks */
297
+ .border-border {
298
+ border-color: hsl(var(--border, 0 0% 0%));
299
+ }
300
+ .border-input {
301
+ border-color: hsl(var(--input, 0 0% 0%));
302
+ }
303
+ .border-black {
304
+ border-color: black;
305
+ }
306
+ .border-destructive\/50 {
307
+ border-color: hsl(var(--destructive, 0 75% 51%) / 0.5);
308
+ }
309
+
310
+ /* ==========================================================================
311
+ Border Radius
312
+ ========================================================================== */
313
+
314
+ .rounded {
315
+ border-radius: 0.25rem;
316
+ }
317
+ .rounded-sm {
318
+ border-radius: 0.125rem;
319
+ }
320
+ .rounded-md {
321
+ border-radius: 0.375rem;
322
+ }
323
+ .rounded-lg {
324
+ border-radius: 0.5rem;
325
+ }
326
+ .rounded-t-lg {
327
+ border-top-left-radius: 0.5rem;
328
+ border-top-right-radius: 0.5rem;
329
+ }
330
+ .rounded-b-lg {
331
+ border-bottom-left-radius: 0.5rem;
332
+ border-bottom-right-radius: 0.5rem;
333
+ }
334
+
335
+ /* ==========================================================================
336
+ Background Colors (with fallbacks)
337
+ Fallbacks use light mode values from Classic Theme tokens
338
+ ========================================================================== */
339
+
340
+ .bg-background {
341
+ background-color: hsl(var(--background, 0 0% 100%));
342
+ }
343
+ .bg-foreground {
344
+ background-color: hsl(var(--foreground, 0 0% 31%));
345
+ }
346
+ .bg-card {
347
+ background-color: hsl(var(--card, 0 0% 100%));
348
+ }
349
+ .bg-popover {
350
+ background-color: hsl(var(--popover, 0 0% 100%));
351
+ }
352
+ .bg-muted {
353
+ background-color: hsl(var(--muted, 72 11% 91%));
354
+ }
355
+ .bg-muted\/30 {
356
+ background-color: hsl(var(--muted, 72 11% 91%) / 0.3);
357
+ }
358
+ .bg-muted\/50 {
359
+ background-color: hsl(var(--muted, 72 11% 91%) / 0.5);
360
+ }
361
+ .bg-accent {
362
+ background-color: hsl(var(--accent, 182 48% 44%));
363
+ }
364
+ .bg-destructive\/5 {
365
+ background-color: hsl(var(--destructive, 0 75% 51%) / 0.05);
366
+ }
367
+ .bg-muted-foreground\/20 {
368
+ background-color: hsl(var(--muted-foreground, 0 0% 48%) / 0.2);
369
+ }
370
+
371
+ /* Status background colors */
372
+ .bg-primary {
373
+ background-color: hsl(var(--primary, 357 72% 39%));
374
+ }
375
+ .bg-secondary {
376
+ background-color: hsl(var(--secondary, 72 11% 91%));
377
+ }
378
+ .bg-success {
379
+ background-color: hsl(var(--success, 160 84% 39%));
380
+ }
381
+ .bg-warning {
382
+ background-color: hsl(var(--warning, 38 92% 50%));
383
+ }
384
+ .bg-info {
385
+ background-color: hsl(var(--info, 217 91% 60%));
386
+ }
387
+
388
+ /* ==========================================================================
389
+ Text Colors (with fallbacks)
390
+ ========================================================================== */
391
+
392
+ .text-foreground {
393
+ color: hsl(var(--foreground, 0 0% 31%));
394
+ }
395
+ .text-card-foreground {
396
+ color: hsl(var(--card-foreground, 0 0% 31%));
397
+ }
398
+ .text-popover-foreground {
399
+ color: hsl(var(--popover-foreground, 0 0% 31%));
400
+ }
401
+ .text-muted-foreground {
402
+ color: hsl(var(--muted-foreground, 0 0% 48%));
403
+ }
404
+ .text-muted-foreground\/60 {
405
+ color: hsl(var(--muted-foreground, 0 0% 48%) / 0.6);
406
+ }
407
+ .text-destructive {
408
+ color: hsl(var(--destructive, 0 75% 51%));
409
+ }
410
+ .text-accent-foreground {
411
+ color: hsl(var(--accent-foreground, 0 0% 100%));
412
+ }
413
+ .text-border {
414
+ color: hsl(var(--border, 0 0% 0%));
415
+ }
416
+
417
+ /* Status text colors */
418
+ .text-primary-foreground {
419
+ color: hsl(var(--primary-foreground, 0 0% 100%));
420
+ }
421
+ .text-secondary-foreground {
422
+ color: hsl(var(--secondary-foreground, 0 0% 31%));
423
+ }
424
+ .text-success-foreground {
425
+ color: hsl(var(--success-foreground, 0 0% 100%));
426
+ }
427
+ .text-warning-foreground {
428
+ color: hsl(var(--warning-foreground, 0 0% 100%));
429
+ }
430
+ .text-info-foreground {
431
+ color: hsl(var(--info-foreground, 0 0% 100%));
432
+ }
433
+
434
+ /* ==========================================================================
435
+ Typography
436
+ ========================================================================== */
437
+
438
+ .text-xs {
439
+ font-size: 0.75rem;
440
+ line-height: 1rem;
441
+ }
442
+ .text-sm {
443
+ font-size: 0.875rem;
444
+ line-height: 1.25rem;
445
+ }
446
+ .text-\[10px\] {
447
+ font-size: 10px;
448
+ line-height: 1.2;
449
+ }
450
+
451
+ .text-center {
452
+ text-align: center;
453
+ }
454
+ .text-left {
455
+ text-align: left;
456
+ }
457
+ .text-right {
458
+ text-align: right;
459
+ }
460
+
461
+ .font-medium {
462
+ font-weight: 500;
463
+ }
464
+ .font-semibold {
465
+ font-weight: 600;
466
+ }
467
+ .font-mono {
468
+ font-family:
469
+ ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
470
+ monospace;
471
+ }
472
+
473
+ .leading-tight {
474
+ line-height: 1.25;
475
+ }
476
+
477
+ .truncate {
478
+ overflow: hidden;
479
+ text-overflow: ellipsis;
480
+ white-space: nowrap;
481
+ }
482
+ .uppercase {
483
+ text-transform: uppercase;
484
+ }
485
+ .tracking-wider {
486
+ letter-spacing: 0.05em;
487
+ }
488
+
489
+ /* ==========================================================================
490
+ Shadows
491
+ ========================================================================== */
492
+
493
+ .shadow-sm {
494
+ box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
495
+ }
496
+ .shadow {
497
+ box-shadow:
498
+ 0 1px 3px 0 rgb(0 0 0 / 0.1),
499
+ 0 1px 2px -1px rgb(0 0 0 / 0.1);
500
+ }
501
+ .shadow-md {
502
+ box-shadow:
503
+ 0 4px 6px -1px rgb(0 0 0 / 0.1),
504
+ 0 2px 4px -2px rgb(0 0 0 / 0.1);
505
+ }
506
+ .shadow-lg {
507
+ box-shadow:
508
+ 0 10px 15px -3px rgb(0 0 0 / 0.1),
509
+ 0 4px 6px -4px rgb(0 0 0 / 0.1);
510
+ }
511
+
512
+ /* ==========================================================================
513
+ Ring (Focus Outlines) - with fallbacks
514
+ ========================================================================== */
515
+
516
+ .ring-2 {
517
+ box-shadow: 0 0 0 2px var(--tw-ring-color, hsl(var(--ring, 357 72% 39%)));
518
+ }
519
+ .ring-primary {
520
+ --tw-ring-color: hsl(var(--primary, 357 72% 39%));
521
+ }
522
+ .ring-ring {
523
+ --tw-ring-color: hsl(var(--ring, 357 72% 39%));
524
+ }
525
+ .ring-offset-2 {
526
+ box-shadow:
527
+ 0 0 0 2px hsl(var(--background, 0 0% 100%)),
528
+ 0 0 0 calc(2px + 2px) var(--tw-ring-color, hsl(var(--ring, 357 72% 39%)));
529
+ }
530
+
531
+ /* ==========================================================================
532
+ Opacity
533
+ ========================================================================== */
534
+
535
+ .opacity-0 {
536
+ opacity: 0;
537
+ }
538
+ .opacity-20 {
539
+ opacity: 0.2;
540
+ }
541
+ .opacity-25 {
542
+ opacity: 0.25;
543
+ }
544
+ .opacity-50 {
545
+ opacity: 0.5;
546
+ }
547
+ .opacity-75 {
548
+ opacity: 0.75;
549
+ }
550
+ .opacity-100 {
551
+ opacity: 1;
552
+ }
553
+
554
+ /* ==========================================================================
555
+ Animations
556
+ ========================================================================== */
557
+
558
+ @keyframes pulse {
559
+ 50% {
560
+ opacity: 0.5;
561
+ }
562
+ }
563
+ .animate-pulse {
564
+ animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
565
+ }
566
+
567
+ @keyframes spin {
568
+ to {
569
+ transform: rotate(360deg);
570
+ }
571
+ }
572
+ .animate-spin {
573
+ animation: spin 1s linear infinite;
574
+ }
575
+
576
+ /* ==========================================================================
577
+ Transitions
578
+ ========================================================================== */
579
+
580
+ .transition-all {
581
+ transition-property: all;
582
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
583
+ transition-duration: 150ms;
584
+ }
585
+ .transition-colors {
586
+ transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
587
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
588
+ transition-duration: 150ms;
589
+ }
590
+ .transition-transform {
591
+ transition-property: transform;
592
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
593
+ transition-duration: 150ms;
594
+ }
595
+ .duration-200 {
596
+ transition-duration: 200ms;
597
+ }
598
+
599
+ /* ==========================================================================
600
+ Transforms
601
+ ========================================================================== */
602
+
603
+ .-rotate-90 {
604
+ transform: rotate(-90deg);
605
+ }
606
+
607
+ /* ==========================================================================
608
+ Cursor
609
+ ========================================================================== */
610
+
611
+ .cursor-pointer {
612
+ cursor: pointer;
613
+ }
614
+ .cursor-default {
615
+ cursor: default;
616
+ }
617
+ .cursor-grab {
618
+ cursor: grab;
619
+ }
620
+ .cursor-grabbing {
621
+ cursor: grabbing;
622
+ }
623
+
624
+ /* ==========================================================================
625
+ Pointer Events
626
+ ========================================================================== */
627
+
628
+ .pointer-events-none {
629
+ pointer-events: none;
630
+ }
631
+
632
+ /* ==========================================================================
633
+ Overflow
634
+ ========================================================================== */
635
+
636
+ .overflow-hidden {
637
+ overflow: hidden;
638
+ }
639
+ .overflow-y-auto {
640
+ overflow-y: auto;
641
+ }
642
+
643
+ /* ==========================================================================
644
+ Accessibility
645
+ ========================================================================== */
646
+
647
+ .sr-only {
648
+ position: absolute;
649
+ width: 1px;
650
+ height: 1px;
651
+ padding: 0;
652
+ margin: -1px;
653
+ overflow: hidden;
654
+ clip: rect(0, 0, 0, 0);
655
+ white-space: nowrap;
656
+ border-width: 0;
657
+ }
658
+
659
+ /* ==========================================================================
660
+ Hover States (with fallbacks)
661
+ ========================================================================== */
662
+
663
+ .hover\:bg-muted:hover {
664
+ background-color: hsl(var(--muted, 72 11% 91%));
665
+ }
666
+ .hover\:bg-accent:hover {
667
+ background-color: hsl(var(--accent, 182 48% 44%));
668
+ }
669
+ .hover\:text-foreground:hover {
670
+ color: hsl(var(--foreground, 0 0% 31%));
671
+ }
672
+ .hover\:text-accent-foreground:hover {
673
+ color: hsl(var(--accent-foreground, 0 0% 100%));
674
+ }
675
+
676
+ /* ==========================================================================
677
+ Focus States (with fallbacks)
678
+ ========================================================================== */
679
+
680
+ .focus-visible\:outline-none:focus-visible {
681
+ outline: 2px solid transparent;
682
+ outline-offset: 2px;
683
+ }
684
+ .focus-visible\:ring-2:focus-visible {
685
+ box-shadow: 0 0 0 2px var(--tw-ring-color, hsl(var(--ring, 357 72% 39%)));
686
+ }
687
+ .focus-visible\:ring-ring:focus-visible {
688
+ --tw-ring-color: hsl(var(--ring, 357 72% 39%));
689
+ }
690
+ .focus-visible\:ring-offset-2:focus-visible {
691
+ box-shadow:
692
+ 0 0 0 2px hsl(var(--background, 0 0% 100%)),
693
+ 0 0 0 calc(2px + 2px) var(--tw-ring-color, hsl(var(--ring, 357 72% 39%)));
694
+ }
695
+
696
+ /* ==========================================================================
697
+ Dark Mode
698
+ ========================================================================== */
699
+
700
+ .dark .dark\:border-gray-400 {
701
+ border-color: rgb(156 163 175);
702
+ }
703
+ }