@getmicdrop/venue-calendar 4.3.57 → 4.3.59

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.
Files changed (118) hide show
  1. package/README.md +818 -818
  2. package/dist/AddOnCard-TEUXB3Sd.js +340 -0
  3. package/dist/{ArrowLeftIcon-DjqiKzR8.js → ArrowLeftIcon-C0jreEw8.js} +1 -1
  4. package/dist/{BlockPlaceholder-CgZr2Euq.js → BlockPlaceholder-DdoOD0gZ.js} +1 -1
  5. package/dist/{Calendar-CS_RqyU_.js → Calendar-BWLg7fOl.js} +3 -3
  6. package/dist/{CalendarFoundryView-DKZpskoX.js → CalendarFoundryView-C2le5l-k.js} +2654 -2588
  7. package/dist/{CalendarIcon-D9Z9YFz6.js → CalendarIcon-BOEpooZq.js} +1 -1
  8. package/dist/CartView-CTL1DQem.js +2293 -0
  9. package/dist/Checkout-B9OHWxzh.js +1933 -0
  10. package/dist/Checkout-D7Cgj12j.js +1076 -0
  11. package/dist/{CheckoutTimer-Ch4McYLj.js → CheckoutTimer-DPNmc1BX.js} +5 -5
  12. package/dist/{ChevronDownIcon-D9I-5bmz.js → ChevronDownIcon-Czxsi1W2.js} +1 -1
  13. package/dist/{CloseIcon-DPdjPdoi.js → CloseIcon-hLh5XXvh.js} +1 -1
  14. package/dist/{CollectionView-BBRXKR7L.js → CollectionView-LFCwHiPj.js} +13 -13
  15. package/dist/{Event-lTxMeEFL.js → Event-C63PLQhq.js} +431 -616
  16. package/dist/EventPage-CyDAwaQF.js +1200 -0
  17. package/dist/{Input-CDw-j5fQ.js → Input-dF1ZPavc.js} +1 -1
  18. package/dist/{MailIcon-C__hyCKr.js → MailIcon-T9SmOpQr.js} +1 -1
  19. package/dist/{PasswordInput-D3Pwparw.js → PasswordInput-B64o-TXR.js} +1 -1
  20. package/dist/{PhoneInput-oGG1WJii.js → PhoneInput-CsV2iC8B.js} +202 -202
  21. package/dist/{RecommendationsRail-BAdqxvuS.js → RecommendationsRail-Cb_c4ohM.js} +47 -47
  22. package/dist/ScarcityBadge-14VWzOL2.js +145 -0
  23. package/dist/{SeriesPage-iAbX0ZTM.js → SeriesPage-DeALgf5s.js} +3 -3
  24. package/dist/{Spinner-6QTo7mi8.js → Spinner-CW1KZMkc.js} +1 -1
  25. package/dist/{Success-B2T0Pbuw.js → Success-Dcd9bWCn.js} +85 -86
  26. package/dist/{TagIcon-DwWcRiXS.js → TagIcon-C8DU69Jv.js} +1 -1
  27. package/dist/{ViewTicketsEmbed-D8SEO2Zw.js → ViewTicketsEmbed-CWLSFG06.js} +14 -15
  28. package/dist/{WarningCircleIcon-C2fJjhKf.js → WarningCircleIcon-Cj8SHVfz.js} +26 -5
  29. package/dist/{WarningTriIcon-OqM9Rfwq.js → WarningTriIcon-CfCwvwsQ.js} +1 -1
  30. package/dist/__SKIP_NAVIGATION__-AOx8SI54.js +6 -0
  31. package/dist/api/api.cjs +1 -1
  32. package/dist/api/api.mjs +64 -32
  33. package/dist/api/cart-addons.d.ts +61 -0
  34. package/dist/api/index.d.ts +2 -0
  35. package/dist/{api-DMjowaFJ.js → api-Br260RVo.js} +190 -127
  36. package/dist/{constants-DC0xZ-Ja.js → constants-DWS8C09a.js} +3 -0
  37. package/dist/{copyToClipboard-CL9BmJA4.js → copyToClipboard-C_fcBdn4.js} +1 -1
  38. package/dist/{createErrorGate.svelte-DwTTmYou.js → createErrorGate.svelte-jZMaO7KA.js} +1 -1
  39. package/dist/{de-DWVo-yVF.js → de-BEfuIgIj.js} +3 -0
  40. package/dist/{defaultLabels-BaVkGLw4.js → defaultLabels-CqkC-rOG.js} +530 -427
  41. package/dist/{defaults-C6to4-1V.js → defaults-BLhQWNFt.js} +2 -2
  42. package/dist/{es-D2JTgwLx.js → es-Bd4g_HxR.js} +3 -0
  43. package/dist/{event-xgg-eiTq.js → event-DaWMe2IV.js} +1 -1
  44. package/dist/{event-transform-BF1WYBSP.js → event-transform-WnvEyzV-.js} +19 -19
  45. package/dist/{eventStatusStream-8vyVag0u.js → eventStatusStream-DgWemzCE.js} +1 -1
  46. package/dist/{fr-kMyKMhNC.js → fr-Blc79wvV.js} +3 -0
  47. package/dist/{href-DO3HKeJp.js → href-x-W1j8EY.js} +2 -2
  48. package/dist/{i18n-jISDKw5F.js → i18n-DFWp9lQ_.js} +2 -2
  49. package/dist/{i18n-toTFR5-t.js → i18n-DgjCm8g6.js} +93 -93
  50. package/dist/{id-ePSZ9pc6.js → id-DzzsiF4d.js} +3 -0
  51. package/dist/{it-CBG5vN1f.js → it-B4zXRsxu.js} +3 -0
  52. package/dist/{ja-BEOrhLFG.js → ja-eT4_QPKd.js} +3 -0
  53. package/dist/{ko-D8x_4jV4.js → ko-B8Fmrldj.js} +3 -0
  54. package/dist/locales/4.3.59/flow/de.js +1 -0
  55. package/dist/locales/4.3.59/flow/es.js +1 -0
  56. package/dist/locales/4.3.59/flow/fr.js +1 -0
  57. package/dist/locales/4.3.59/flow/id.js +1 -0
  58. package/dist/locales/4.3.59/flow/it.js +1 -0
  59. package/dist/locales/4.3.59/flow/ja.js +1 -0
  60. package/dist/locales/4.3.59/flow/ko.js +1 -0
  61. package/dist/locales/4.3.59/flow/nl.js +1 -0
  62. package/dist/locales/4.3.59/flow/pl.js +1 -0
  63. package/dist/locales/4.3.59/flow/pt-br.js +1 -0
  64. package/dist/locales/4.3.59/flow/tr.js +1 -0
  65. package/dist/locales/4.3.59/flow/zh.js +1 -0
  66. package/dist/{nl-Vc5Wd3re.js → nl-Dnug8LYt.js} +3 -0
  67. package/dist/{orders-FcXWw6b-.js → orders-DlyjunUM.js} +4 -4
  68. package/dist/{pixels-B85kohqd.js → pixels-n1zu1IhF.js} +1 -1
  69. package/dist/{pl-Dnjh6Wpy.js → pl-C3XxoYWF.js} +3 -0
  70. package/dist/{pt-br-BJa34BZo.js → pt-br-Y40SBe4b.js} +3 -0
  71. package/dist/{scarcity-CR1Pa81F.js → scarcity-KJNxIMxj.js} +100 -100
  72. package/dist/{serverTotals-DeOPPRj6.js → serverTotals-Cb7pt5Z-.js} +8 -8
  73. package/dist/{showcase-state-options-BGmvUaQ_.js → showcase-state-options-Ce1_tYvH.js} +1 -1
  74. package/dist/{to-event-card-props-DLOxO2oP.js → to-event-card-props-KoNvp_D9.js} +15 -16
  75. package/dist/{tr-Do7HmDL7.js → tr-2zIJ-vq2.js} +3 -0
  76. package/dist/types/index.d.ts +597 -597
  77. package/dist/{utils-DpC4fy4Z.js → utils-VHFV7pBb.js} +2 -2
  78. package/dist/venue-calendar.css +1 -1
  79. package/dist/venue-calendar.es.js +191 -192
  80. package/dist/venue-calendar.iife.js +22 -22
  81. package/dist/venue-calendar.umd.js +53 -53
  82. package/dist/{zh-Dn20V0BT.js → zh-vNYvCXO7.js} +3 -0
  83. package/package.json +220 -220
  84. package/src/lib/theme.js +222 -222
  85. package/dist/Badge-BsWJrQII.js +0 -108
  86. package/dist/CartView-Dz3Pet0D.js +0 -2294
  87. package/dist/Checkout-Bqe1P7Jr.js +0 -1849
  88. package/dist/Checkout-CFv2AX68.js +0 -1040
  89. package/dist/ClockIcon-C7nkbmvv.js +0 -25
  90. package/dist/EventPage-Cqkelq-1.js +0 -1201
  91. package/dist/ScarcityBadge-BXn6HM_K.js +0 -116
  92. package/dist/liveAnnouncer-D3xVL7qA.js +0 -32
  93. package/dist/locales/4.3.57/flow/de.js +0 -1
  94. package/dist/locales/4.3.57/flow/es.js +0 -1
  95. package/dist/locales/4.3.57/flow/fr.js +0 -1
  96. package/dist/locales/4.3.57/flow/id.js +0 -1
  97. package/dist/locales/4.3.57/flow/it.js +0 -1
  98. package/dist/locales/4.3.57/flow/ja.js +0 -1
  99. package/dist/locales/4.3.57/flow/ko.js +0 -1
  100. package/dist/locales/4.3.57/flow/nl.js +0 -1
  101. package/dist/locales/4.3.57/flow/pl.js +0 -1
  102. package/dist/locales/4.3.57/flow/pt-br.js +0 -1
  103. package/dist/locales/4.3.57/flow/tr.js +0 -1
  104. package/dist/locales/4.3.57/flow/zh.js +0 -1
  105. package/dist/order-totals-5X0jD77w.js +0 -151
  106. package/dist/promo-BNwWtZjP.js +0 -37
  107. /package/dist/locales/{4.3.57 → 4.3.59}/main/de.js +0 -0
  108. /package/dist/locales/{4.3.57 → 4.3.59}/main/es.js +0 -0
  109. /package/dist/locales/{4.3.57 → 4.3.59}/main/fr.js +0 -0
  110. /package/dist/locales/{4.3.57 → 4.3.59}/main/id.js +0 -0
  111. /package/dist/locales/{4.3.57 → 4.3.59}/main/it.js +0 -0
  112. /package/dist/locales/{4.3.57 → 4.3.59}/main/ja.js +0 -0
  113. /package/dist/locales/{4.3.57 → 4.3.59}/main/ko.js +0 -0
  114. /package/dist/locales/{4.3.57 → 4.3.59}/main/nl.js +0 -0
  115. /package/dist/locales/{4.3.57 → 4.3.59}/main/pl.js +0 -0
  116. /package/dist/locales/{4.3.57 → 4.3.59}/main/pt-br.js +0 -0
  117. /package/dist/locales/{4.3.57 → 4.3.59}/main/tr.js +0 -0
  118. /package/dist/locales/{4.3.57 → 4.3.59}/main/zh.js +0 -0
package/src/lib/theme.js CHANGED
@@ -1,222 +1,222 @@
1
- /**
2
- * Theme Configuration for Embeddable Calendar Widget
3
- *
4
- * This module provides comprehensive theming options for the calendar widget.
5
- * All colors use HSL format for easy manipulation.
6
- *
7
- * Usage:
8
- * 1. Import and call applyTheme() with your custom theme
9
- * 2. Or set CSS custom properties directly on the widget container
10
- *
11
- * Example:
12
- * ```js
13
- * import { applyTheme, themes } from '@getmicdrop/venue-calendar/theme';
14
- * applyTheme(themes.dark);
15
- *
16
- * // Or custom theme:
17
- * applyTheme({
18
- * brandPrimary: '270 76% 60%', // Purple
19
- * textPrimary: '0 0% 100%',
20
- * bgPrimary: '0 0% 10%',
21
- * });
22
- * ```
23
- */
24
-
25
- // Default light theme
26
- export const lightTheme = {
27
- // Brand colors
28
- brandPrimary: '217 91% 60%', // #2563EB - Blue
29
-
30
- // Text colors
31
- textPrimary: '0 0% 0%', // Black
32
- textSecondary: '0 0% 40%', // Dark Gray
33
- textTertiary: '0 0% 60%', // Gray
34
-
35
- // Background colors
36
- bgPrimary: '0 0% 100%', // White
37
- bgSecondary: '0 0% 98%', // Light Gray
38
- bgQuaternary: '0 0% 96%', // Very Light Gray
39
-
40
- // Border/Stroke colors
41
- strokePrimary: '0 0% 80%', // Medium Gray
42
- strokeSecondary: '0 0% 90%', // Light Gray
43
-
44
- // Status colors
45
- statusOnSale: '217 91% 60%', // Blue
46
- statusSellingFast: '38 92% 50%', // Orange
47
- statusSoldOut: '0 84% 60%', // Red
48
-
49
- // Calendar specific
50
- todayBg: '217 91% 97%', // Light blue
51
- todayText: '217 91% 50%', // Blue
52
- eventDotOnSale: '217 91% 60%',
53
- eventDotSellingFast: '38 92% 50%',
54
- eventDotSoldOut: '0 84% 60%',
55
-
56
- // Interaction states
57
- hoverBg: '0 0% 96%',
58
- focusRing: '217 91% 60%',
59
- };
60
-
61
- // Dark theme
62
- export const darkTheme = {
63
- // Brand colors
64
- brandPrimary: '217 91% 65%', // Lighter blue for dark mode
65
-
66
- // Text colors
67
- textPrimary: '0 0% 98%', // Near white
68
- textSecondary: '0 0% 70%', // Light gray
69
- textTertiary: '0 0% 50%', // Gray
70
-
71
- // Background colors
72
- bgPrimary: '0 0% 9%', // Very dark gray
73
- bgSecondary: '0 0% 13%', // Dark gray
74
- bgQuaternary: '0 0% 17%', // Slightly lighter
75
-
76
- // Border/Stroke colors
77
- strokePrimary: '0 0% 30%',
78
- strokeSecondary: '0 0% 20%',
79
-
80
- // Status colors
81
- statusOnSale: '217 91% 65%',
82
- statusSellingFast: '38 92% 55%',
83
- statusSoldOut: '0 84% 65%',
84
-
85
- // Calendar specific
86
- todayBg: '217 50% 20%',
87
- todayText: '217 91% 70%',
88
- eventDotOnSale: '217 91% 65%',
89
- eventDotSellingFast: '38 92% 55%',
90
- eventDotSoldOut: '0 84% 65%',
91
-
92
- // Interaction states
93
- hoverBg: '0 0% 20%',
94
- focusRing: '217 91% 65%',
95
- };
96
-
97
- // High contrast theme for accessibility
98
- export const highContrastTheme = {
99
- brandPrimary: '217 100% 50%',
100
- textPrimary: '0 0% 0%',
101
- textSecondary: '0 0% 20%',
102
- textTertiary: '0 0% 30%',
103
- bgPrimary: '0 0% 100%',
104
- bgSecondary: '0 0% 95%',
105
- bgQuaternary: '0 0% 90%',
106
- strokePrimary: '0 0% 0%',
107
- strokeSecondary: '0 0% 30%',
108
- statusOnSale: '217 100% 40%',
109
- statusSellingFast: '30 100% 40%',
110
- statusSoldOut: '0 100% 40%',
111
- todayBg: '217 100% 90%',
112
- todayText: '217 100% 30%',
113
- eventDotOnSale: '217 100% 40%',
114
- eventDotSellingFast: '30 100% 40%',
115
- eventDotSoldOut: '0 100% 40%',
116
- hoverBg: '217 100% 95%',
117
- focusRing: '217 100% 40%',
118
- };
119
-
120
- // Preset themes collection
121
- export const themes = {
122
- light: lightTheme,
123
- dark: darkTheme,
124
- highContrast: highContrastTheme,
125
- };
126
-
127
- /**
128
- * Apply a theme to the calendar widget
129
- * @param {Object} theme - Theme object with HSL color values
130
- * @param {HTMLElement} container - Optional container element (defaults to :root)
131
- */
132
- export function applyTheme(theme, container = document.documentElement) {
133
- const cssVarMap = {
134
- brandPrimary: '--brand-primary',
135
- textPrimary: '--text-primary',
136
- textSecondary: '--text-secondary',
137
- textTertiary: '--text-tertiary',
138
- bgPrimary: '--bg-primary',
139
- bgSecondary: '--bg-secondary',
140
- bgQuaternary: '--bg-quaternary',
141
- strokePrimary: '--stroke-primary',
142
- strokeSecondary: '--stroke-secondary',
143
- statusOnSale: '--status-on-sale',
144
- statusSellingFast: '--status-selling-fast',
145
- statusSoldOut: '--status-sold-out',
146
- todayBg: '--today-bg',
147
- todayText: '--today-text',
148
- eventDotOnSale: '--event-dot-on-sale',
149
- eventDotSellingFast: '--event-dot-selling-fast',
150
- eventDotSoldOut: '--event-dot-sold-out',
151
- hoverBg: '--hover-bg',
152
- focusRing: '--focus-ring',
153
- };
154
-
155
- Object.entries(theme).forEach(([key, value]) => {
156
- const cssVar = cssVarMap[key];
157
- if (cssVar) {
158
- container.style.setProperty(cssVar, value);
159
- }
160
- });
161
-
162
- // Sync data-theme attribute when a known preset is applied so SC
163
- // components (Stripe theme detector, DarkModeToggle reader, etc.)
164
- // see the same intent. Partial/custom themes don't trigger this —
165
- // they edit a few CSS vars without flipping the overall light/dark
166
- // mode signal.
167
- if (container.setAttribute) {
168
- if (theme === darkTheme) {
169
- container.setAttribute('data-theme', 'dark');
170
- } else if (theme === lightTheme || theme === highContrastTheme) {
171
- container.setAttribute('data-theme', 'light');
172
- }
173
- }
174
- }
175
-
176
- /**
177
- * Generate CSS string for embedding
178
- * @param {Object} theme - Theme object
179
- * @returns {string} CSS string
180
- */
181
- export function generateThemeCSS(theme) {
182
- const cssVarMap = {
183
- brandPrimary: '--brand-primary',
184
- textPrimary: '--text-primary',
185
- textSecondary: '--text-secondary',
186
- textTertiary: '--text-tertiary',
187
- bgPrimary: '--bg-primary',
188
- bgSecondary: '--bg-secondary',
189
- bgQuaternary: '--bg-quaternary',
190
- strokePrimary: '--stroke-primary',
191
- strokeSecondary: '--stroke-secondary',
192
- statusOnSale: '--status-on-sale',
193
- statusSellingFast: '--status-selling-fast',
194
- statusSoldOut: '--status-sold-out',
195
- todayBg: '--today-bg',
196
- todayText: '--today-text',
197
- eventDotOnSale: '--event-dot-on-sale',
198
- eventDotSellingFast: '--event-dot-selling-fast',
199
- eventDotSoldOut: '--event-dot-sold-out',
200
- hoverBg: '--hover-bg',
201
- focusRing: '--focus-ring',
202
- };
203
-
204
- const lines = [];
205
- Object.entries(theme).forEach(([key, value]) => {
206
- const cssVar = cssVarMap[key];
207
- if (cssVar) {
208
- lines.push(` ${cssVar}: ${value};`);
209
- }
210
- });
211
-
212
- return `:root {\n${lines.join('\n')}\n}`;
213
- }
214
-
215
- export default {
216
- themes,
217
- lightTheme,
218
- darkTheme,
219
- highContrastTheme,
220
- applyTheme,
221
- generateThemeCSS,
222
- };
1
+ /**
2
+ * Theme Configuration for Embeddable Calendar Widget
3
+ *
4
+ * This module provides comprehensive theming options for the calendar widget.
5
+ * All colors use HSL format for easy manipulation.
6
+ *
7
+ * Usage:
8
+ * 1. Import and call applyTheme() with your custom theme
9
+ * 2. Or set CSS custom properties directly on the widget container
10
+ *
11
+ * Example:
12
+ * ```js
13
+ * import { applyTheme, themes } from '@getmicdrop/venue-calendar/theme';
14
+ * applyTheme(themes.dark);
15
+ *
16
+ * // Or custom theme:
17
+ * applyTheme({
18
+ * brandPrimary: '270 76% 60%', // Purple
19
+ * textPrimary: '0 0% 100%',
20
+ * bgPrimary: '0 0% 10%',
21
+ * });
22
+ * ```
23
+ */
24
+
25
+ // Default light theme
26
+ export const lightTheme = {
27
+ // Brand colors
28
+ brandPrimary: '217 91% 60%', // #2563EB - Blue
29
+
30
+ // Text colors
31
+ textPrimary: '0 0% 0%', // Black
32
+ textSecondary: '0 0% 40%', // Dark Gray
33
+ textTertiary: '0 0% 60%', // Gray
34
+
35
+ // Background colors
36
+ bgPrimary: '0 0% 100%', // White
37
+ bgSecondary: '0 0% 98%', // Light Gray
38
+ bgQuaternary: '0 0% 96%', // Very Light Gray
39
+
40
+ // Border/Stroke colors
41
+ strokePrimary: '0 0% 80%', // Medium Gray
42
+ strokeSecondary: '0 0% 90%', // Light Gray
43
+
44
+ // Status colors
45
+ statusOnSale: '217 91% 60%', // Blue
46
+ statusSellingFast: '38 92% 50%', // Orange
47
+ statusSoldOut: '0 84% 60%', // Red
48
+
49
+ // Calendar specific
50
+ todayBg: '217 91% 97%', // Light blue
51
+ todayText: '217 91% 50%', // Blue
52
+ eventDotOnSale: '217 91% 60%',
53
+ eventDotSellingFast: '38 92% 50%',
54
+ eventDotSoldOut: '0 84% 60%',
55
+
56
+ // Interaction states
57
+ hoverBg: '0 0% 96%',
58
+ focusRing: '217 91% 60%',
59
+ };
60
+
61
+ // Dark theme
62
+ export const darkTheme = {
63
+ // Brand colors
64
+ brandPrimary: '217 91% 65%', // Lighter blue for dark mode
65
+
66
+ // Text colors
67
+ textPrimary: '0 0% 98%', // Near white
68
+ textSecondary: '0 0% 70%', // Light gray
69
+ textTertiary: '0 0% 50%', // Gray
70
+
71
+ // Background colors
72
+ bgPrimary: '0 0% 9%', // Very dark gray
73
+ bgSecondary: '0 0% 13%', // Dark gray
74
+ bgQuaternary: '0 0% 17%', // Slightly lighter
75
+
76
+ // Border/Stroke colors
77
+ strokePrimary: '0 0% 30%',
78
+ strokeSecondary: '0 0% 20%',
79
+
80
+ // Status colors
81
+ statusOnSale: '217 91% 65%',
82
+ statusSellingFast: '38 92% 55%',
83
+ statusSoldOut: '0 84% 65%',
84
+
85
+ // Calendar specific
86
+ todayBg: '217 50% 20%',
87
+ todayText: '217 91% 70%',
88
+ eventDotOnSale: '217 91% 65%',
89
+ eventDotSellingFast: '38 92% 55%',
90
+ eventDotSoldOut: '0 84% 65%',
91
+
92
+ // Interaction states
93
+ hoverBg: '0 0% 20%',
94
+ focusRing: '217 91% 65%',
95
+ };
96
+
97
+ // High contrast theme for accessibility
98
+ export const highContrastTheme = {
99
+ brandPrimary: '217 100% 50%',
100
+ textPrimary: '0 0% 0%',
101
+ textSecondary: '0 0% 20%',
102
+ textTertiary: '0 0% 30%',
103
+ bgPrimary: '0 0% 100%',
104
+ bgSecondary: '0 0% 95%',
105
+ bgQuaternary: '0 0% 90%',
106
+ strokePrimary: '0 0% 0%',
107
+ strokeSecondary: '0 0% 30%',
108
+ statusOnSale: '217 100% 40%',
109
+ statusSellingFast: '30 100% 40%',
110
+ statusSoldOut: '0 100% 40%',
111
+ todayBg: '217 100% 90%',
112
+ todayText: '217 100% 30%',
113
+ eventDotOnSale: '217 100% 40%',
114
+ eventDotSellingFast: '30 100% 40%',
115
+ eventDotSoldOut: '0 100% 40%',
116
+ hoverBg: '217 100% 95%',
117
+ focusRing: '217 100% 40%',
118
+ };
119
+
120
+ // Preset themes collection
121
+ export const themes = {
122
+ light: lightTheme,
123
+ dark: darkTheme,
124
+ highContrast: highContrastTheme,
125
+ };
126
+
127
+ /**
128
+ * Apply a theme to the calendar widget
129
+ * @param {Object} theme - Theme object with HSL color values
130
+ * @param {HTMLElement} container - Optional container element (defaults to :root)
131
+ */
132
+ export function applyTheme(theme, container = document.documentElement) {
133
+ const cssVarMap = {
134
+ brandPrimary: '--brand-primary',
135
+ textPrimary: '--text-primary',
136
+ textSecondary: '--text-secondary',
137
+ textTertiary: '--text-tertiary',
138
+ bgPrimary: '--bg-primary',
139
+ bgSecondary: '--bg-secondary',
140
+ bgQuaternary: '--bg-quaternary',
141
+ strokePrimary: '--stroke-primary',
142
+ strokeSecondary: '--stroke-secondary',
143
+ statusOnSale: '--status-on-sale',
144
+ statusSellingFast: '--status-selling-fast',
145
+ statusSoldOut: '--status-sold-out',
146
+ todayBg: '--today-bg',
147
+ todayText: '--today-text',
148
+ eventDotOnSale: '--event-dot-on-sale',
149
+ eventDotSellingFast: '--event-dot-selling-fast',
150
+ eventDotSoldOut: '--event-dot-sold-out',
151
+ hoverBg: '--hover-bg',
152
+ focusRing: '--focus-ring',
153
+ };
154
+
155
+ Object.entries(theme).forEach(([key, value]) => {
156
+ const cssVar = cssVarMap[key];
157
+ if (cssVar) {
158
+ container.style.setProperty(cssVar, value);
159
+ }
160
+ });
161
+
162
+ // Sync data-theme attribute when a known preset is applied so SC
163
+ // components (Stripe theme detector, DarkModeToggle reader, etc.)
164
+ // see the same intent. Partial/custom themes don't trigger this —
165
+ // they edit a few CSS vars without flipping the overall light/dark
166
+ // mode signal.
167
+ if (container.setAttribute) {
168
+ if (theme === darkTheme) {
169
+ container.setAttribute('data-theme', 'dark');
170
+ } else if (theme === lightTheme || theme === highContrastTheme) {
171
+ container.setAttribute('data-theme', 'light');
172
+ }
173
+ }
174
+ }
175
+
176
+ /**
177
+ * Generate CSS string for embedding
178
+ * @param {Object} theme - Theme object
179
+ * @returns {string} CSS string
180
+ */
181
+ export function generateThemeCSS(theme) {
182
+ const cssVarMap = {
183
+ brandPrimary: '--brand-primary',
184
+ textPrimary: '--text-primary',
185
+ textSecondary: '--text-secondary',
186
+ textTertiary: '--text-tertiary',
187
+ bgPrimary: '--bg-primary',
188
+ bgSecondary: '--bg-secondary',
189
+ bgQuaternary: '--bg-quaternary',
190
+ strokePrimary: '--stroke-primary',
191
+ strokeSecondary: '--stroke-secondary',
192
+ statusOnSale: '--status-on-sale',
193
+ statusSellingFast: '--status-selling-fast',
194
+ statusSoldOut: '--status-sold-out',
195
+ todayBg: '--today-bg',
196
+ todayText: '--today-text',
197
+ eventDotOnSale: '--event-dot-on-sale',
198
+ eventDotSellingFast: '--event-dot-selling-fast',
199
+ eventDotSoldOut: '--event-dot-sold-out',
200
+ hoverBg: '--hover-bg',
201
+ focusRing: '--focus-ring',
202
+ };
203
+
204
+ const lines = [];
205
+ Object.entries(theme).forEach(([key, value]) => {
206
+ const cssVar = cssVarMap[key];
207
+ if (cssVar) {
208
+ lines.push(` ${cssVar}: ${value};`);
209
+ }
210
+ });
211
+
212
+ return `:root {\n${lines.join('\n')}\n}`;
213
+ }
214
+
215
+ export default {
216
+ themes,
217
+ lightTheme,
218
+ darkTheme,
219
+ highContrastTheme,
220
+ applyTheme,
221
+ generateThemeCSS,
222
+ };
@@ -1,108 +0,0 @@
1
- import { o as e, r as t } from "./keyboard-Crrnn87b.js";
2
- import { n, t as r } from "./sizing-CFDo_qh_.js";
3
- import "svelte/internal/disclose-version";
4
- import * as i from "svelte/internal/client";
5
- //#region node_modules/@getmicdrop/svelte-components/dist/tokens/variants.js
6
- var a = {
7
- success: "text-status-success-text bg-status-success-bg",
8
- warning: "text-status-warning-text bg-status-warning-bg",
9
- error: "text-status-error-text bg-status-error-bg",
10
- danger: "text-status-error-text bg-status-error-bg",
11
- info: "text-status-info-text bg-status-info-bg",
12
- brand: "text-brand-primary-foreground bg-brand-primary",
13
- neutral: "text-text-primary bg-muted",
14
- red: "text-status-error-text bg-status-error-bg",
15
- blue: "text-status-info-text bg-status-info-bg",
16
- purple: "text-brand-primary bg-status-info-bg",
17
- green: "text-status-success-text bg-status-success-bg",
18
- orange: "text-status-warning-text bg-status-warning-bg",
19
- yellow: "text-status-warning-text bg-status-warning-bg",
20
- gray: "text-text-primary bg-muted",
21
- pink: "text-accent-danger bg-status-error-bg",
22
- indigo: "text-brand-primary bg-status-info-bg",
23
- cyan: "text-status-info-text bg-status-info-bg",
24
- notification: "text-white bg-accent-danger"
25
- }, o = {
26
- success: "border-status-success-border",
27
- warning: "border-status-warning-border",
28
- error: "border-status-error-border",
29
- danger: "border-status-error-border",
30
- info: "border-status-info-border",
31
- brand: "border-stroke-primary",
32
- neutral: "border-stroke-primary",
33
- red: "border-status-error-border",
34
- blue: "border-status-info-border",
35
- purple: "border-status-info-border",
36
- green: "border-status-success-border",
37
- orange: "border-status-warning-border",
38
- yellow: "border-status-warning-border",
39
- gray: "border-stroke-primary",
40
- pink: "border-status-error-border",
41
- indigo: "border-status-info-border",
42
- cyan: "border-status-info-border",
43
- notification: "border-status-error-border"
44
- }, s = {
45
- info: "text-status-info-text border border-status-info-border bg-status-info-bg",
46
- success: "text-status-success-text border border-status-success-border bg-status-success-bg",
47
- warning: "text-status-warning-text border border-status-warning-border bg-status-warning-bg",
48
- danger: "text-status-error-text border border-status-error-border bg-status-error-bg"
49
- }, c = {
50
- blue: "fill-brand-primary",
51
- gray: "fill-muted-foreground",
52
- green: "fill-accent-success",
53
- red: "fill-accent-danger",
54
- yellow: "fill-accent-warning",
55
- pink: "fill-accent-danger",
56
- purple: "fill-brand-primary",
57
- white: "fill-white"
58
- };
59
- function l(e) {
60
- return `border ${o[String(e || "neutral").toLowerCase()] || o.neutral}`;
61
- }
62
- //#endregion
63
- //#region node_modules/@getmicdrop/svelte-components/dist/primitives/Badges/Badge.svelte
64
- var u = i.from_html("<span class=\"w-1.5 h-1.5 rounded-full bg-current shrink-0\"></span>"), d = i.from_html("<!> <!> <!>", 1);
65
- function f(o, s) {
66
- i.push(s, !0);
67
- let c = i.prop(s, "as", 3, "div"), f = i.prop(s, "size", 3, "md"), p = i.prop(s, "class", 3, ""), m = i.prop(s, "variant", 3, "neutral"), h = i.prop(s, "tone", 3, "default"), g = i.prop(s, "textColor", 3, null), _ = i.prop(s, "bgColor", 3, null), v = i.prop(s, "showDot", 3, !1), y = i.prop(s, "pill", 3, !1), b = i.prop(s, "shape", 3, "rounded"), x = i.prop(s, "large", 3, !1), S = i.derived(() => () => x() ? "lg" : r[f()] || f() || "md"), C = i.derived(() => (() => {
68
- let e = n[i.get(S)()] || n.md;
69
- return h() === "minimal" ? e.replaceAll(/\bp[xy]?-[^\s]+/g, "").trim() : e;
70
- })()), w = i.derived(() => h() === "minimal" ? "" : y() ? "rounded-full min-w-5 h-5 px-1.5 justify-center" : b() === "pill" ? "rounded-full" : "rounded"), T = i.derived(() => String(m()).toLowerCase()), E = "text-white", D = { notification: "text-accent-danger" }, O = i.derived(() => (() => {
71
- let e = a[i.get(T)] || a.neutral;
72
- if (h() === "outlined") return `${e} ${l(i.get(T))}`;
73
- if (h() === "minimal") {
74
- let t = e.replaceAll(/\bbg-[^\s]+/g, "").trim(), n = D[i.get(T)];
75
- return n ? t.includes(E) ? t.replace(E, n) : n : t;
76
- }
77
- return e;
78
- })()), k = i.derived(() => (() => {
79
- let e = [];
80
- return g() && e.push(`color: ${g()}`), _() && e.push(`background-color: ${_()}`), e.length > 0 ? e.join("; ") : void 0;
81
- })());
82
- var A = i.comment(), j = i.first_child(A);
83
- i.element(j, () => c() === "span" ? "span" : "div", !1, (n, r) => {
84
- i.attribute_effect(n, (e) => ({
85
- class: e,
86
- style: i.get(k),
87
- role: s.onclick ? "button" : void 0,
88
- tabindex: s.onclick ? 0 : void 0,
89
- onclick: s.onclick ? (e) => s.onclick(e) : void 0,
90
- onkeydown: s.onclick ? (e) => {
91
- t(e) && e.target === e.currentTarget && (e.preventDefault(), e.currentTarget.click());
92
- } : void 0
93
- }), [() => e("inline-flex items-center gap-1.5", i.get(C), i.get(O), i.get(w), p())]);
94
- var a = d(), o = i.first_child(a), c = (e) => {
95
- var t = u();
96
- i.append(e, t);
97
- };
98
- i.if(o, (e) => {
99
- v() && e(c);
100
- });
101
- var l = i.sibling(o, 2);
102
- i.snippet(l, () => s.leftIcon ?? i.noop);
103
- var f = i.sibling(l, 2);
104
- i.snippet(f, () => s.children ?? i.noop), i.append(r, a);
105
- }), i.append(o, A), i.pop();
106
- }
107
- //#endregion
108
- export { c as i, s as n, a as r, f as t };