@getmicdrop/venue-calendar 2.0.0 → 3.2.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 CHANGED
@@ -4,13 +4,16 @@ A beautiful, customizable calendar component built with Svelte for displaying co
4
4
 
5
5
  ## Features
6
6
 
7
- ✨ **Three View Modes**: List, Gallery, and Calendar views
8
- 🎨 **Beautiful UI**: Modern, responsive design built with Tailwind CSS
9
- 📱 **Mobile-Friendly**: Fully responsive across all devices
10
- 🔌 **Easy Integration**: Works with React, Vue, vanilla JS, and more
11
- 🌐 **CDN Ready**: Use directly in HTML via JSDelivr
12
- ⚡ **Auto-Mount**: Automatically finds and mounts to designated containers
7
+ ✨ **Three View Modes**: List, Gallery, and Calendar views
8
+ 🎨 **Beautiful UI**: Modern, responsive design built with Tailwind CSS
9
+ 📱 **Mobile-Friendly**: Swipe gestures, touch-optimized, responsive design
10
+ 🔌 **Easy Integration**: Works with React, Vue, vanilla JS, and more
11
+ 🌐 **CDN Ready**: Use directly in HTML via JSDelivr
12
+ ⚡ **Auto-Mount**: Automatically finds and mounts to designated containers
13
13
  🎯 **Customizable**: Configure views, navigation, and more
14
+ 🌙 **Dark Mode**: Built-in light, dark, and high-contrast themes
15
+ ♿ **Accessible**: ARIA labels, keyboard navigation, screen reader support
16
+ 🎫 **Event Status**: Visual badges for "On Sale", "Selling Fast", "Sold Out"
14
17
 
15
18
  ## Installation
16
19
 
@@ -419,6 +422,116 @@ The calendar comes with built-in styles using Tailwind CSS. If you need to custo
419
422
  }
420
423
  ```
421
424
 
425
+ ## Theming
426
+
427
+ The calendar supports comprehensive theming via CSS custom properties and JavaScript utilities.
428
+
429
+ ### Using CSS Custom Properties
430
+
431
+ Override the default theme by setting CSS custom properties:
432
+
433
+ ```css
434
+ /* Custom brand colors */
435
+ .micdrop-calendar-container {
436
+ --Brand-Primary: 270 76% 60%; /* Purple */
437
+ --Text-Primary: 0 0% 10%;
438
+ --BG-Primary: 0 0% 100%;
439
+ }
440
+
441
+ /* Dark mode */
442
+ .dark .micdrop-calendar-container,
443
+ [data-theme="dark"] .micdrop-calendar-container {
444
+ --Brand-Primary: 270 76% 70%;
445
+ --Text-Primary: 0 0% 95%;
446
+ --BG-Primary: 0 0% 10%;
447
+ }
448
+ ```
449
+
450
+ ### Available CSS Variables
451
+
452
+ | Variable | Description | Default (Light) |
453
+ |----------|-------------|-----------------|
454
+ | `--Brand-Primary` | Primary brand color | `217 91% 60%` (Blue) |
455
+ | `--Text-Primary` | Main text color | `0 0% 0%` |
456
+ | `--Text-Secondary` | Secondary text | `0 0% 40%` |
457
+ | `--BG-Primary` | Main background | `0 0% 100%` |
458
+ | `--BG-Secondary` | Secondary background | `0 0% 98%` |
459
+ | `--Stroke-Primary` | Border colors | `0 0% 80%` |
460
+ | `--Status-OnSale` | "On Sale" badge | `217 91% 60%` |
461
+ | `--Status-SellingFast` | "Selling Fast" badge | `38 92% 50%` |
462
+ | `--Status-SoldOut` | "Sold Out" badge | `0 84% 60%` |
463
+ | `--Today-BG` | Today's date background | `217 91% 97%` |
464
+ | `--Focus-Ring` | Keyboard focus ring | `217 91% 60%` |
465
+
466
+ ### Using JavaScript Theme Utilities
467
+
468
+ ```javascript
469
+ import { applyTheme, themes, generateThemeCSS } from '@getmicdrop/venue-calendar';
470
+
471
+ // Apply a preset theme
472
+ applyTheme(themes.dark);
473
+
474
+ // Apply to a specific container
475
+ const container = document.querySelector('.micdrop-calendar-container');
476
+ applyTheme(themes.dark, container);
477
+
478
+ // Create a custom theme
479
+ const myTheme = {
480
+ brandPrimary: '270 76% 60%', // Purple
481
+ textPrimary: '0 0% 10%',
482
+ bgPrimary: '0 0% 100%',
483
+ statusOnSale: '142 71% 45%', // Green for on sale
484
+ };
485
+ applyTheme(myTheme);
486
+
487
+ // Generate CSS string for embedding
488
+ const cssString = generateThemeCSS(myTheme);
489
+ console.log(cssString);
490
+ // Output: :root { --Brand-Primary: 270 76% 60%; ... }
491
+ ```
492
+
493
+ ### Preset Themes
494
+
495
+ Three themes are included out of the box:
496
+
497
+ ```javascript
498
+ import { themes } from '@getmicdrop/venue-calendar';
499
+
500
+ // Light theme (default)
501
+ applyTheme(themes.light);
502
+
503
+ // Dark theme
504
+ applyTheme(themes.dark);
505
+
506
+ // High contrast (accessibility)
507
+ applyTheme(themes.highContrast);
508
+ ```
509
+
510
+ ### Automatic Dark Mode
511
+
512
+ The calendar automatically respects the user's system preference:
513
+
514
+ ```css
515
+ /* Automatically applied when user prefers dark mode */
516
+ @media (prefers-color-scheme: dark) {
517
+ /* Dark theme variables are applied */
518
+ }
519
+ ```
520
+
521
+ You can also manually toggle dark mode:
522
+
523
+ ```html
524
+ <!-- Add 'dark' class to enable dark theme -->
525
+ <div class="dark">
526
+ <div class="micdrop-calendar-container" data-venue-id="123"></div>
527
+ </div>
528
+
529
+ <!-- Or use data-theme attribute -->
530
+ <div data-theme="dark">
531
+ <div class="micdrop-calendar-container" data-venue-id="123"></div>
532
+ </div>
533
+ ```
534
+
422
535
  ## Browser Support
423
536
 
424
537
  - Chrome (latest)