@sonordev/site-kit 2.7.0 → 2.7.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.
- package/dist/{chunk-KCA5OLS4.js → chunk-5OX347TD.js} +29 -4
- package/dist/chunk-5OX347TD.js.map +1 -0
- package/dist/{chunk-FN7ADGWH.mjs → chunk-XCQ7BEZG.mjs} +29 -4
- package/dist/chunk-XCQ7BEZG.mjs.map +1 -0
- package/dist/commerce/index.js +46 -46
- package/dist/commerce/index.mjs +1 -1
- package/dist/index.js +26 -26
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-FN7ADGWH.mjs.map +0 -1
- package/dist/chunk-KCA5OLS4.js.map +0 -1
|
@@ -5019,6 +5019,31 @@ function loadSquareSDK2(environment) {
|
|
|
5019
5019
|
document.head.appendChild(script);
|
|
5020
5020
|
});
|
|
5021
5021
|
}
|
|
5022
|
+
function resolveCssVar(name, fallback) {
|
|
5023
|
+
if (typeof window === "undefined") return fallback;
|
|
5024
|
+
const raw = getComputedStyle(document.documentElement).getPropertyValue(name).trim();
|
|
5025
|
+
if (!raw) return fallback;
|
|
5026
|
+
return normalizeColorForSquare(raw) ?? fallback;
|
|
5027
|
+
}
|
|
5028
|
+
function normalizeColorForSquare(value) {
|
|
5029
|
+
const v = value.trim();
|
|
5030
|
+
if (!v) return null;
|
|
5031
|
+
if (/^#[0-9a-f]{6}$/i.test(v)) return v;
|
|
5032
|
+
const eightDigit = /^(#[0-9a-f]{6})[0-9a-f]{2}$/i.exec(v);
|
|
5033
|
+
if (eightDigit) return eightDigit[1];
|
|
5034
|
+
const threeDigit = /^#([0-9a-f])([0-9a-f])([0-9a-f])$/i.exec(v);
|
|
5035
|
+
if (threeDigit) {
|
|
5036
|
+
const [, r, g, b] = threeDigit;
|
|
5037
|
+
return `#${r}${r}${g}${g}${b}${b}`;
|
|
5038
|
+
}
|
|
5039
|
+
const rgb = /^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/i.exec(v);
|
|
5040
|
+
if (rgb) {
|
|
5041
|
+
const [, r, g, b] = rgb;
|
|
5042
|
+
const toHex = (n) => Number(n).toString(16).padStart(2, "0");
|
|
5043
|
+
return `#${toHex(r)}${toHex(g)}${toHex(b)}`;
|
|
5044
|
+
}
|
|
5045
|
+
return null;
|
|
5046
|
+
}
|
|
5022
5047
|
var SINGLE_TICKET_KEY = "__single__";
|
|
5023
5048
|
function EventCheckout({
|
|
5024
5049
|
event,
|
|
@@ -5109,11 +5134,11 @@ function EventCheckout({
|
|
|
5109
5134
|
const card = await payments.card({
|
|
5110
5135
|
style: {
|
|
5111
5136
|
".input-container": {
|
|
5112
|
-
borderColor: "
|
|
5137
|
+
borderColor: resolveCssVar("--sk-border", "#d1d5db"),
|
|
5113
5138
|
borderRadius: "6px"
|
|
5114
5139
|
},
|
|
5115
5140
|
".input-container.is-focus": {
|
|
5116
|
-
borderColor: "
|
|
5141
|
+
borderColor: resolveCssVar("--sk-primary", "#2563eb")
|
|
5117
5142
|
},
|
|
5118
5143
|
".input-container.is-error": {
|
|
5119
5144
|
borderColor: "#dc2626"
|
|
@@ -7734,5 +7759,5 @@ function groupEventsByOffering(events) {
|
|
|
7734
7759
|
}
|
|
7735
7760
|
|
|
7736
7761
|
export { CalendarView, CheckoutForm, EventCalendar, EventCheckout, EventEmbed, EventModal, EventTile, EventsWidget, OfferingCard, OfferingList, ProductDetail, ProductEmbed, ProductGrid, ProductPage, RegistrationForm, SizeChart, UpcomingEvents, createCheckoutSession, createPaymentIntent, fetchActiveProcessor, fetchCategories, fetchLatestOffering, fetchNextEvent, fetchOffering, fetchOfferings, fetchProcessorConfig, fetchProductBySlug, fetchProducts, fetchProductsPublic, fetchServices, fetchShippingRates, fetchUpcomingEvents, formatDate, formatDateRange, formatDateTime, formatPrice, formatTime, getOfferingUrl, getRelativeTimeUntil, getSpotsRemaining, isEventSoldOut, registerForEvent, useEventModal, validateAddress, validateDiscountCode };
|
|
7737
|
-
//# sourceMappingURL=chunk-
|
|
7738
|
-
//# sourceMappingURL=chunk-
|
|
7762
|
+
//# sourceMappingURL=chunk-XCQ7BEZG.mjs.map
|
|
7763
|
+
//# sourceMappingURL=chunk-XCQ7BEZG.mjs.map
|