@getmicdrop/svelte-components 5.17.4 → 5.18.1
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/calendar/AboutShow/AboutShow.svelte +9 -5
- package/dist/calendar/AboutShow/AboutShow.svelte.d.ts +2 -2
- package/dist/calendar/AboutShow/AboutShow.svelte.d.ts.map +1 -1
- package/dist/calendar/Calendar/MiniMonthCalendar.svelte +39 -18
- package/dist/calendar/Calendar/MiniMonthCalendar.svelte.d.ts +4 -0
- package/dist/calendar/Calendar/MiniMonthCalendar.svelte.d.ts.map +1 -1
- package/dist/calendar/FAQs/FAQs.svelte +16 -5
- package/dist/calendar/FAQs/FAQs.svelte.d.ts +6 -4
- package/dist/calendar/FAQs/FAQs.svelte.d.ts.map +1 -1
- package/dist/calendar/MonthSwitcher/MonthSwitcher.svelte +19 -4
- package/dist/calendar/MonthSwitcher/MonthSwitcher.svelte.d.ts +2 -0
- package/dist/calendar/MonthSwitcher/MonthSwitcher.svelte.d.ts.map +1 -1
- package/dist/calendar/OrderSummary/OrderSummary.spec.js +3 -3
- package/dist/calendar/OrderSummary/OrderSummary.svelte +17 -13
- package/dist/calendar/OrderSummary/OrderSummary.svelte.d.ts +4 -2
- package/dist/calendar/OrderSummary/OrderSummary.svelte.d.ts.map +1 -1
- package/dist/calendar/PublicCard/PublicCard.svelte +11 -2
- package/dist/calendar/PublicCard/PublicCard.svelte.d.ts +4 -0
- package/dist/calendar/PublicCard/PublicCard.svelte.d.ts.map +1 -1
- package/dist/calendar/ShowCard/ShowCard.svelte +25 -11
- package/dist/calendar/ShowCard/ShowCard.svelte.d.ts +4 -0
- package/dist/calendar/ShowCard/ShowCard.svelte.d.ts.map +1 -1
- package/dist/calendar/ShowTimeCard/ShowTimeCard.svelte +12 -4
- package/dist/calendar/ShowTimeCard/ShowTimeCard.svelte.d.ts +4 -0
- package/dist/calendar/ShowTimeCard/ShowTimeCard.svelte.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/patterns/chat/ChatBubble.svelte +9 -1
- package/dist/patterns/chat/ChatBubble.svelte.d.ts +6 -4
- package/dist/patterns/chat/ChatBubble.svelte.d.ts.map +1 -1
- package/dist/patterns/chat/ChatInvitationBubble.svelte +10 -1
- package/dist/patterns/chat/ChatInvitationBubble.svelte.d.ts +6 -3
- package/dist/patterns/chat/ChatInvitationBubble.svelte.d.ts.map +1 -1
- package/dist/patterns/chat/ChatInvitationNotice.svelte +10 -1
- package/dist/patterns/chat/ChatInvitationNotice.svelte.d.ts +6 -3
- package/dist/patterns/chat/ChatInvitationNotice.svelte.d.ts.map +1 -1
- package/dist/patterns/forms/FormValidationSummary.svelte +9 -1
- package/dist/patterns/forms/FormValidationSummary.svelte.d.ts +5 -3
- package/dist/patterns/forms/FormValidationSummary.svelte.d.ts.map +1 -1
- package/dist/patterns/navigation/BottomNav.svelte +9 -1
- package/dist/patterns/navigation/BottomNav.svelte.d.ts +10 -9
- package/dist/patterns/navigation/BottomNav.svelte.d.ts.map +1 -1
- package/dist/patterns/navigation/Header.svelte +20 -8
- package/dist/patterns/navigation/Header.svelte.d.ts +17 -9
- package/dist/patterns/navigation/Header.svelte.d.ts.map +1 -1
- package/dist/patterns/page/PageLoader.svelte +12 -3
- package/dist/patterns/page/PageLoader.svelte.d.ts +6 -3
- package/dist/patterns/page/PageLoader.svelte.d.ts.map +1 -1
- package/dist/primitives/Accordion/AccordionItem.svelte +9 -1
- package/dist/primitives/Accordion/AccordionItem.svelte.d.ts +6 -4
- package/dist/primitives/Accordion/AccordionItem.svelte.d.ts.map +1 -1
- package/dist/primitives/Alert/Alert.svelte +10 -2
- package/dist/primitives/Alert/Alert.svelte.d.ts +6 -4
- package/dist/primitives/Alert/Alert.svelte.d.ts.map +1 -1
- package/dist/primitives/Breadcrumb/Breadcrumb.svelte +9 -1
- package/dist/primitives/Breadcrumb/Breadcrumb.svelte.d.ts +13 -9
- package/dist/primitives/Breadcrumb/Breadcrumb.svelte.d.ts.map +1 -1
- package/dist/primitives/DarkModeToggle.svelte +16 -5
- package/dist/primitives/DarkModeToggle.svelte.d.ts +9 -3
- package/dist/primitives/DarkModeToggle.svelte.d.ts.map +1 -1
- package/dist/primitives/Dropdown/Dropdown.svelte +11 -2
- package/dist/primitives/Dropdown/Dropdown.svelte.d.ts +7 -4
- package/dist/primitives/Dropdown/Dropdown.svelte.d.ts.map +1 -1
- package/dist/primitives/Input/Input.svelte +19 -6
- package/dist/primitives/Input/Input.svelte.d.ts.map +1 -1
- package/dist/primitives/NumberInput/NumberInput.svelte +10 -2
- package/dist/primitives/NumberInput/NumberInput.svelte.d.ts.map +1 -1
- package/dist/primitives/Pagination/Pagination.svelte +21 -7
- package/dist/primitives/Pagination/Pagination.svelte.d.ts +14 -6
- package/dist/primitives/Pagination/Pagination.svelte.d.ts.map +1 -1
- package/dist/primitives/Skeleton/CardPlaceholder.svelte +11 -2
- package/dist/primitives/Skeleton/CardPlaceholder.svelte.d.ts +8 -5
- package/dist/primitives/Skeleton/CardPlaceholder.svelte.d.ts.map +1 -1
- package/dist/primitives/Skeleton/ImagePlaceholder.svelte +11 -2
- package/dist/primitives/Skeleton/ImagePlaceholder.svelte.d.ts +8 -5
- package/dist/primitives/Skeleton/ImagePlaceholder.svelte.d.ts.map +1 -1
- package/dist/primitives/Skeleton/ListPlaceholder.svelte +11 -2
- package/dist/primitives/Skeleton/ListPlaceholder.svelte.d.ts +8 -5
- package/dist/primitives/Skeleton/ListPlaceholder.svelte.d.ts.map +1 -1
- package/dist/primitives/Skeleton/Skeleton.svelte +11 -2
- package/dist/primitives/Skeleton/Skeleton.svelte.d.ts +7 -4
- package/dist/primitives/Skeleton/Skeleton.svelte.d.ts.map +1 -1
- package/dist/primitives/Spinner/Spinner.svelte +9 -1
- package/dist/primitives/Spinner/Spinner.svelte.d.ts +6 -4
- package/dist/primitives/Spinner/Spinner.svelte.d.ts.map +1 -1
- package/dist/recipes/ImageUploader/ImageUploader.svelte +5 -3
- package/dist/recipes/ImageUploader/ImageUploader.svelte.d.ts +1 -0
- package/dist/recipes/ImageUploader/ImageUploader.svelte.d.ts.map +1 -1
- package/dist/recipes/SuperLogin/SuperLogin.svelte +25 -23
- package/dist/recipes/SuperLogin/SuperLogin.svelte.d.ts.map +1 -1
- package/dist/recipes/feedback/EmptyState/EmptyState.svelte +12 -3
- package/dist/recipes/feedback/EmptyState/EmptyState.svelte.d.ts +7 -4
- package/dist/recipes/feedback/EmptyState/EmptyState.svelte.d.ts.map +1 -1
- package/dist/recipes/inputs/MultiSelect.svelte +10 -2
- package/dist/recipes/inputs/MultiSelect.svelte.d.ts.map +1 -1
- package/dist/recipes/inputs/OTPInput.svelte +14 -3
- package/dist/recipes/inputs/OTPInput.svelte.d.ts +14 -12
- package/dist/recipes/inputs/OTPInput.svelte.d.ts.map +1 -1
- package/dist/recipes/inputs/PasswordInput.svelte +10 -1
- package/dist/recipes/inputs/PasswordInput.svelte.d.ts +7 -4
- package/dist/recipes/inputs/PasswordInput.svelte.d.ts.map +1 -1
- package/dist/recipes/inputs/PasswordStrengthIndicator/PasswordStrengthIndicator.svelte +21 -10
- package/dist/recipes/inputs/PasswordStrengthIndicator/PasswordStrengthIndicator.svelte.d.ts +8 -3
- package/dist/recipes/inputs/PasswordStrengthIndicator/PasswordStrengthIndicator.svelte.d.ts.map +1 -1
- package/dist/recipes/inputs/PhoneInput.svelte +254 -0
- package/dist/recipes/inputs/PhoneInput.svelte.d.ts +40 -0
- package/dist/recipes/inputs/PhoneInput.svelte.d.ts.map +1 -0
- package/dist/recipes/inputs/PlaceAutocomplete/PlaceAutocomplete.svelte +22 -9
- package/dist/recipes/inputs/PlaceAutocomplete/PlaceAutocomplete.svelte.d.ts +21 -16
- package/dist/recipes/inputs/PlaceAutocomplete/PlaceAutocomplete.svelte.d.ts.map +1 -1
- package/dist/recipes/inputs/Search.svelte +10 -2
- package/dist/recipes/inputs/Search.svelte.d.ts +7 -5
- package/dist/recipes/inputs/Search.svelte.d.ts.map +1 -1
- package/dist/recipes/inputs/index.d.ts +1 -0
- package/dist/recipes/inputs/index.js +1 -0
- package/dist/recipes/inputs/phoneInput/CountrySelector.svelte +240 -0
- package/dist/recipes/inputs/phoneInput/CountrySelector.svelte.d.ts +15 -0
- package/dist/recipes/inputs/phoneInput/CountrySelector.svelte.d.ts.map +1 -0
- package/dist/recipes/inputs/phoneInput/countryData.d.ts +18 -0
- package/dist/recipes/inputs/phoneInput/countryData.d.ts.map +1 -0
- package/dist/recipes/inputs/phoneInput/countryData.js +211 -0
- package/dist/recipes/modals/AlertModal.svelte +11 -2
- package/dist/recipes/modals/AlertModal.svelte.d.ts +4 -2
- package/dist/recipes/modals/AlertModal.svelte.d.ts.map +1 -1
- package/dist/recipes/modals/ConfirmationModal.svelte +8 -1
- package/dist/recipes/modals/ConfirmationModal.svelte.d.ts +2 -0
- package/dist/recipes/modals/ConfirmationModal.svelte.d.ts.map +1 -1
- package/dist/recipes/modals/InputModal.svelte +19 -7
- package/dist/recipes/modals/InputModal.svelte.d.ts +6 -4
- package/dist/recipes/modals/InputModal.svelte.d.ts.map +1 -1
- package/dist/recipes/modals/StatusModal.svelte +14 -4
- package/dist/recipes/modals/StatusModal.svelte.d.ts +4 -2
- package/dist/recipes/modals/StatusModal.svelte.d.ts.map +1 -1
- package/dist/tokens/__tests__/variants.test.js +12 -4
- package/dist/tokens/variants.d.ts +4 -4
- package/dist/tokens/variants.js +4 -4
- package/dist/utils/formatters.d.ts +6 -0
- package/dist/utils/formatters.d.ts.map +1 -1
- package/dist/utils/formatters.js +8 -0
- package/dist/utils/phoneUtils.d.ts +35 -0
- package/dist/utils/phoneUtils.d.ts.map +1 -0
- package/dist/utils/phoneUtils.js +104 -0
- package/dist/utils/utils.js +25 -16
- package/package.json +6 -1
|
@@ -7,10 +7,14 @@
|
|
|
7
7
|
* Consumers can override via the `labels` prop.
|
|
8
8
|
*/
|
|
9
9
|
const defaultLabels = {
|
|
10
|
+
title: 'About the Show',
|
|
10
11
|
followLabel: (name) => `Follow ${name}:`,
|
|
11
12
|
showLess: 'Show less',
|
|
12
13
|
showMore: 'Show more',
|
|
13
14
|
closePopover: 'Close',
|
|
15
|
+
instagramProfile: 'Instagram profile',
|
|
16
|
+
twitterProfile: 'Twitter profile',
|
|
17
|
+
performerAlt: 'Performer',
|
|
14
18
|
};
|
|
15
19
|
|
|
16
20
|
let {
|
|
@@ -18,7 +22,7 @@
|
|
|
18
22
|
ShowImage = '',
|
|
19
23
|
description = '',
|
|
20
24
|
showTitle = true,
|
|
21
|
-
title =
|
|
25
|
+
title = undefined,
|
|
22
26
|
showReadMore = true,
|
|
23
27
|
getImageUrl = (url) => url,
|
|
24
28
|
/** @type {Partial<typeof defaultLabels>} Override any user-visible string */
|
|
@@ -58,7 +62,7 @@
|
|
|
58
62
|
|
|
59
63
|
<div class="flex flex-col gap-3">
|
|
60
64
|
{#if showTitle}
|
|
61
|
-
<h2 class="{typography.h2} text-xl">{title}</h2>
|
|
65
|
+
<h2 class="{typography.h2} text-xl">{title ?? labels.title}</h2>
|
|
62
66
|
{/if}
|
|
63
67
|
|
|
64
68
|
{#if ShowImage && description}
|
|
@@ -139,7 +143,7 @@
|
|
|
139
143
|
target="_blank"
|
|
140
144
|
rel="noopener noreferrer"
|
|
141
145
|
class="text-blue-700 dark:text-blue-500 hover:opacity-70 transition-opacity"
|
|
142
|
-
aria-label=
|
|
146
|
+
aria-label={labels.instagramProfile}
|
|
143
147
|
>
|
|
144
148
|
<LogoInstagram size={20} />
|
|
145
149
|
</a>
|
|
@@ -150,7 +154,7 @@
|
|
|
150
154
|
target="_blank"
|
|
151
155
|
rel="noopener noreferrer"
|
|
152
156
|
class="text-blue-700 dark:text-blue-500 hover:opacity-70 transition-opacity"
|
|
153
|
-
aria-label=
|
|
157
|
+
aria-label={labels.twitterProfile}
|
|
154
158
|
>
|
|
155
159
|
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 24 24">
|
|
156
160
|
<path d="M23.953 4.57a10 10 0 01-2.825.775 4.958 4.958 0 002.163-2.723c-.951.555-2.005.959-3.127 1.184a4.92 4.92 0 00-8.384 4.482C7.69 8.095 4.067 6.13 1.64 3.162a4.822 4.822 0 00-.666 2.475c0 1.71.87 3.213 2.188 4.096a4.904 4.904 0 01-2.228-.616v.06a4.923 4.923 0 003.946 4.827 4.996 4.996 0 01-2.212.085 4.936 4.936 0 004.604 3.417 9.867 9.867 0 01-6.102 2.105c-.39 0-.779-.023-1.17-.067a13.995 13.995 0 007.557 2.209c9.053 0 13.998-7.496 13.998-13.985 0-.21 0-.42-.015-.63A9.935 9.935 0 0024 4.59z"/>
|
|
@@ -170,7 +174,7 @@
|
|
|
170
174
|
>
|
|
171
175
|
<img
|
|
172
176
|
src={performer.shouldBeHidden ? '' : profile?.profileImage ? getImageUrl(profile.profileImage) : ''}
|
|
173
|
-
alt={displayName ||
|
|
177
|
+
alt={displayName || labels.performerAlt}
|
|
174
178
|
class="size-16 rounded object-cover {!profile?.profileImage || performer.shouldBeHidden ? 'bg-gray-50 dark:bg-gray-700' : ''}"
|
|
175
179
|
/>
|
|
176
180
|
<p class="{typography.xs} text-center leading-tight line-clamp-2">
|
|
@@ -8,7 +8,7 @@ declare const AboutShow: import("svelte").Component<{
|
|
|
8
8
|
ShowImage?: string;
|
|
9
9
|
description?: string;
|
|
10
10
|
showTitle?: boolean;
|
|
11
|
-
title?:
|
|
11
|
+
title?: any;
|
|
12
12
|
showReadMore?: boolean;
|
|
13
13
|
getImageUrl?: Function;
|
|
14
14
|
labels?: Record<string, any>;
|
|
@@ -18,7 +18,7 @@ type $$ComponentProps = {
|
|
|
18
18
|
ShowImage?: string;
|
|
19
19
|
description?: string;
|
|
20
20
|
showTitle?: boolean;
|
|
21
|
-
title?:
|
|
21
|
+
title?: any;
|
|
22
22
|
showReadMore?: boolean;
|
|
23
23
|
getImageUrl?: Function;
|
|
24
24
|
labels?: Record<string, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AboutShow.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/calendar/AboutShow/AboutShow.svelte.js"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"AboutShow.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/calendar/AboutShow/AboutShow.svelte.js"],"names":[],"mappings":";;;;;AAsKA;iBA7IkC,GAAG,EAAE;gBAAc,MAAM;kBAAgB,MAAM;gBAAc,OAAO;YAAU,GAAG;mBAAiB,OAAO;;aAAmC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;WA6IzI;wBA7IrC;IAAE,UAAU,CAAC,EAAE,GAAG,EAAE,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,GAAG,CAAC;IAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAAC,WAAW,CAAC,WAAW;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAAE"}
|
|
@@ -4,6 +4,27 @@
|
|
|
4
4
|
import { typography } from '../../tokens/typography';
|
|
5
5
|
import { formatDayOfWeek, formatMonth } from '../../datetime/format';
|
|
6
6
|
|
|
7
|
+
const defaultLabels = {
|
|
8
|
+
monthNames: ["January", "February", "March", "April", "May", "June",
|
|
9
|
+
"July", "August", "September", "October", "November", "December"],
|
|
10
|
+
dayNames: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
11
|
+
dayLetters: ["S", "M", "T", "W", "T", "F", "S"],
|
|
12
|
+
fullDayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
|
|
13
|
+
today: 'Today',
|
|
14
|
+
previousMonth: 'Previous month',
|
|
15
|
+
nextMonth: 'Next month',
|
|
16
|
+
goToCurrentMonth: 'Go to current month',
|
|
17
|
+
todayLabel: 'Today',
|
|
18
|
+
available: 'Available',
|
|
19
|
+
notAvailable: 'Not available',
|
|
20
|
+
pressEnterToToggle: 'Press Enter to toggle.',
|
|
21
|
+
pressEnterToView: 'Press Enter to view.',
|
|
22
|
+
eventSingular: 'event',
|
|
23
|
+
eventPlural: 'events',
|
|
24
|
+
legendAvailable: 'Available',
|
|
25
|
+
legendUnavailable: 'Unavailable',
|
|
26
|
+
};
|
|
27
|
+
|
|
7
28
|
let {
|
|
8
29
|
variant = 'availability',
|
|
9
30
|
selectedDates = $bindable([]),
|
|
@@ -18,8 +39,12 @@
|
|
|
18
39
|
onDateSelect,
|
|
19
40
|
onDayClick,
|
|
20
41
|
onMonthChange,
|
|
42
|
+
locale = 'en-US',
|
|
43
|
+
labels: userLabels = {},
|
|
21
44
|
} = $props();
|
|
22
45
|
|
|
46
|
+
let labels = $derived({ ...defaultLabels, ...userLabels });
|
|
47
|
+
|
|
23
48
|
let currentDate = new Date();
|
|
24
49
|
let currentYear = $state(currentDate.getFullYear());
|
|
25
50
|
let currentMonth = $state(currentDate.getMonth());
|
|
@@ -49,13 +74,9 @@
|
|
|
49
74
|
const VELOCITY_THRESHOLD = 0.3;
|
|
50
75
|
const DRAG_RESISTANCE = 0.8;
|
|
51
76
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
];
|
|
56
|
-
|
|
57
|
-
const DAY_NAMES = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
|
|
58
|
-
const DAY_LETTERS = ["S", "M", "T", "W", "T", "F", "S"];
|
|
77
|
+
let MONTH_NAMES = $derived(labels.monthNames);
|
|
78
|
+
let DAY_NAMES = $derived(labels.dayNames);
|
|
79
|
+
let DAY_LETTERS = $derived(labels.dayLetters);
|
|
59
80
|
|
|
60
81
|
const today = new Date();
|
|
61
82
|
const todayLocal = new Date(today.getFullYear(), today.getMonth(), today.getDate());
|
|
@@ -599,13 +620,13 @@
|
|
|
599
620
|
const dateStr = `${dayOfWeek}, ${month} ${day.day}, ${currentYear}`;
|
|
600
621
|
|
|
601
622
|
let label = dateStr;
|
|
602
|
-
if (day.isToday) label +=
|
|
623
|
+
if (day.isToday) label += `, ${labels.todayLabel}`;
|
|
603
624
|
if (variant === 'availability') {
|
|
604
|
-
label += day.isSelected ?
|
|
605
|
-
if (!day.isPast) label +=
|
|
625
|
+
label += day.isSelected ? `, ${labels.available}` : `, ${labels.notAvailable}`;
|
|
626
|
+
if (!day.isPast) label += `. ${labels.pressEnterToToggle}`;
|
|
606
627
|
} else if (day.hasEvents) {
|
|
607
628
|
const count = day.events.length;
|
|
608
|
-
label += `, ${count}
|
|
629
|
+
label += `, ${count} ${count > 1 ? labels.eventPlural : labels.eventSingular}. ${labels.pressEnterToView}`;
|
|
609
630
|
}
|
|
610
631
|
return label;
|
|
611
632
|
}
|
|
@@ -654,7 +675,7 @@
|
|
|
654
675
|
onmouseup={() => prevPressed = false}
|
|
655
676
|
onmouseleave={() => prevPressed = false}
|
|
656
677
|
disabled={!canGoPrev}
|
|
657
|
-
aria-label=
|
|
678
|
+
aria-label={labels.previousMonth}
|
|
658
679
|
>
|
|
659
680
|
<ChevronLeftOutline class="w-5 h-5" />
|
|
660
681
|
</button>
|
|
@@ -673,9 +694,9 @@
|
|
|
673
694
|
onmouseup={() => todayPressed = false}
|
|
674
695
|
onmouseleave={() => todayPressed = false}
|
|
675
696
|
disabled={isAtCurrentMonth}
|
|
676
|
-
aria-label=
|
|
697
|
+
aria-label={labels.goToCurrentMonth}
|
|
677
698
|
>
|
|
678
|
-
|
|
699
|
+
{labels.today}
|
|
679
700
|
</button>
|
|
680
701
|
{/if}
|
|
681
702
|
|
|
@@ -691,7 +712,7 @@
|
|
|
691
712
|
onmousedown={() => nextPressed = true}
|
|
692
713
|
onmouseup={() => nextPressed = false}
|
|
693
714
|
onmouseleave={() => nextPressed = false}
|
|
694
|
-
aria-label=
|
|
715
|
+
aria-label={labels.nextMonth}
|
|
695
716
|
>
|
|
696
717
|
<ChevronRightOutline class="w-5 h-5" />
|
|
697
718
|
</button>
|
|
@@ -710,7 +731,7 @@
|
|
|
710
731
|
<div
|
|
711
732
|
class="flex items-end justify-center pb-1 {typography.xsMuted} overflow-hidden leading-none sm:pb-2 sm:pt-1 sm:justify-end sm:pr-2 sm:text-lg sm:text-gray-900 sm:dark:text-white sm:border-b sm:border-gray-200 sm:dark:border-gray-700"
|
|
712
733
|
role="columnheader"
|
|
713
|
-
aria-label={[
|
|
734
|
+
aria-label={labels.fullDayNames[i]}
|
|
714
735
|
>
|
|
715
736
|
<span class="sm:hidden">{DAY_LETTERS[i]}</span>
|
|
716
737
|
<span class="hidden sm:block">{dayName}</span>
|
|
@@ -769,11 +790,11 @@
|
|
|
769
790
|
<div class="flex items-center justify-center gap-6 pt-4">
|
|
770
791
|
<div class="flex items-center gap-2">
|
|
771
792
|
<span class="w-5 h-5 rounded bg-blue-700 dark:bg-blue-600 border border-blue-700 dark:border-blue-600"></span>
|
|
772
|
-
<span class="{typography.sm}">
|
|
793
|
+
<span class="{typography.sm}">{labels.legendAvailable}</span>
|
|
773
794
|
</div>
|
|
774
795
|
<div class="flex items-center gap-2">
|
|
775
796
|
<span class="w-5 h-5 rounded bg-gray-50 dark:bg-gray-700 border-2 border-gray-400 dark:border-gray-500"></span>
|
|
776
|
-
<span class="{typography.sm}">
|
|
797
|
+
<span class="{typography.sm}">{labels.legendUnavailable}</span>
|
|
777
798
|
</div>
|
|
778
799
|
</div>
|
|
779
800
|
{/if}
|
|
@@ -17,6 +17,8 @@ declare const MiniMonthCalendar: import("svelte").Component<{
|
|
|
17
17
|
onDateSelect: any;
|
|
18
18
|
onDayClick: any;
|
|
19
19
|
onMonthChange: any;
|
|
20
|
+
locale?: string;
|
|
21
|
+
labels?: Record<string, any>;
|
|
20
22
|
}, {}, "selectedDates">;
|
|
21
23
|
type $$ComponentProps = {
|
|
22
24
|
variant?: string;
|
|
@@ -32,5 +34,7 @@ type $$ComponentProps = {
|
|
|
32
34
|
onDateSelect: any;
|
|
33
35
|
onDayClick: any;
|
|
34
36
|
onMonthChange: any;
|
|
37
|
+
locale?: string;
|
|
38
|
+
labels?: Record<string, any>;
|
|
35
39
|
};
|
|
36
40
|
//# sourceMappingURL=MiniMonthCalendar.svelte.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MiniMonthCalendar.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/calendar/Calendar/MiniMonthCalendar.svelte.js"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"MiniMonthCalendar.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/calendar/Calendar/MiniMonthCalendar.svelte.js"],"names":[],"mappings":";;;;;AAquBA;cAlsB+B,MAAM;oBAAkB,GAAG,EAAE;aAAW,GAAG,EAAE;iBAAe,MAAM;iBAAe,OAAO;qBAAmB,OAAO;sBAAoB,OAAO;eAAa,OAAO;yBAAuB,OAAO;4BAA0B,OAAO;kBAAgB,GAAG;gBAAc,GAAG;mBAAiB,GAAG;aAAW,MAAM;aAAW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;wBAksBtS;wBAlsB7C;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,aAAa,CAAC,EAAE,GAAG,EAAE,CAAC;IAAC,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAAC,eAAe,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAAC,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAAC,YAAY,EAAE,GAAG,CAAC;IAAC,UAAU,EAAE,GAAG,CAAC;IAAC,aAAa,EAAE,GAAG,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAAE"}
|
|
@@ -2,15 +2,26 @@
|
|
|
2
2
|
import { ChevronUpOutline } from "../../primitives/Icons";
|
|
3
3
|
import { typography } from '../../tokens/typography';
|
|
4
4
|
|
|
5
|
+
const defaultLabels = {
|
|
6
|
+
title: 'FAQs',
|
|
7
|
+
emptyMessage: 'No FAQs available.',
|
|
8
|
+
itemFallback: 'Item',
|
|
9
|
+
};
|
|
10
|
+
|
|
5
11
|
let {
|
|
6
12
|
faqs = [],
|
|
7
|
-
title =
|
|
13
|
+
title = undefined,
|
|
8
14
|
showTitle = true,
|
|
9
15
|
accordion = false,
|
|
10
16
|
/** @type {string} Text shown when no FAQs are available */
|
|
11
|
-
emptyMessage =
|
|
17
|
+
emptyMessage = undefined,
|
|
18
|
+
labels: userLabels = {},
|
|
12
19
|
} = $props();
|
|
13
20
|
|
|
21
|
+
let labels = $derived({ ...defaultLabels, ...userLabels });
|
|
22
|
+
let effectiveTitle = $derived(title ?? labels.title);
|
|
23
|
+
let effectiveEmptyMessage = $derived(emptyMessage ?? labels.emptyMessage);
|
|
24
|
+
|
|
14
25
|
let openIndex = $state(null);
|
|
15
26
|
|
|
16
27
|
let items = $derived(faqs.map((f) =>
|
|
@@ -24,7 +35,7 @@
|
|
|
24
35
|
|
|
25
36
|
<div class="flex flex-col gap-3">
|
|
26
37
|
{#if showTitle}
|
|
27
|
-
<h2 class={typography.h2}>{
|
|
38
|
+
<h2 class={typography.h2}>{effectiveTitle}</h2>
|
|
28
39
|
{/if}
|
|
29
40
|
|
|
30
41
|
{#if items.length}
|
|
@@ -43,7 +54,7 @@
|
|
|
43
54
|
aria-expanded={openIndex === index}
|
|
44
55
|
aria-controls="accordion-body-{index}"
|
|
45
56
|
>
|
|
46
|
-
<span>{question ||
|
|
57
|
+
<span>{question || `${labels.itemFallback} ${index + 1}`}</span>
|
|
47
58
|
<ChevronUpOutline class="w-3 h-3 shrink-0 transition-transform duration-200 {openIndex === index ? 'rotate-180' : ''}" aria-hidden="true" />
|
|
48
59
|
</button>
|
|
49
60
|
</h3>
|
|
@@ -72,6 +83,6 @@
|
|
|
72
83
|
</div>
|
|
73
84
|
{/if}
|
|
74
85
|
{:else}
|
|
75
|
-
<p class="{typography.smMuted}">{
|
|
86
|
+
<p class="{typography.smMuted}">{effectiveEmptyMessage}</p>
|
|
76
87
|
{/if}
|
|
77
88
|
</div>
|
|
@@ -5,16 +5,18 @@ type FAQs = {
|
|
|
5
5
|
};
|
|
6
6
|
declare const FAQs: import("svelte").Component<{
|
|
7
7
|
faqs?: any[];
|
|
8
|
-
title?:
|
|
8
|
+
title?: any;
|
|
9
9
|
showTitle?: boolean;
|
|
10
10
|
accordion?: boolean;
|
|
11
|
-
emptyMessage?:
|
|
11
|
+
emptyMessage?: any;
|
|
12
|
+
labels?: Record<string, any>;
|
|
12
13
|
}, {}, "">;
|
|
13
14
|
type $$ComponentProps = {
|
|
14
15
|
faqs?: any[];
|
|
15
|
-
title?:
|
|
16
|
+
title?: any;
|
|
16
17
|
showTitle?: boolean;
|
|
17
18
|
accordion?: boolean;
|
|
18
|
-
emptyMessage?:
|
|
19
|
+
emptyMessage?: any;
|
|
20
|
+
labels?: Record<string, any>;
|
|
19
21
|
};
|
|
20
22
|
//# sourceMappingURL=FAQs.svelte.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FAQs.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/calendar/FAQs/FAQs.svelte.js"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"FAQs.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/calendar/FAQs/FAQs.svelte.js"],"names":[],"mappings":";;;;;AAuFA;WAvE4B,GAAG,EAAE;YAAU,GAAG;gBAAc,OAAO;gBAAc,OAAO;mBAAiB,GAAG;aAAW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;WAuEvF;wBAvEhC;IAAE,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;IAAC,KAAK,CAAC,EAAE,GAAG,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAAC,YAAY,CAAC,EAAE,GAAG,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAAE"}
|
|
@@ -3,6 +3,18 @@
|
|
|
3
3
|
import { typography } from '../../tokens/typography';
|
|
4
4
|
import { formatMonth } from '../../datetime/format';
|
|
5
5
|
|
|
6
|
+
const monthNames = [
|
|
7
|
+
'January', 'February', 'March', 'April', 'May', 'June',
|
|
8
|
+
'July', 'August', 'September', 'October', 'November', 'December'
|
|
9
|
+
];
|
|
10
|
+
|
|
11
|
+
const defaultLabels = {
|
|
12
|
+
today: 'Today',
|
|
13
|
+
previousMonth: 'Previous month',
|
|
14
|
+
goToCurrentMonth: 'Go to current month',
|
|
15
|
+
nextMonth: 'Next month',
|
|
16
|
+
};
|
|
17
|
+
|
|
6
18
|
const today = new Date();
|
|
7
19
|
const todayLocalMonth = today.getMonth();
|
|
8
20
|
const todayLocalYear = today.getFullYear();
|
|
@@ -14,8 +26,11 @@
|
|
|
14
26
|
handlePrev = () => {},
|
|
15
27
|
handleToday = () => {},
|
|
16
28
|
disablePastNavigation = true,
|
|
29
|
+
labels: userLabels = {},
|
|
17
30
|
} = $props();
|
|
18
31
|
|
|
32
|
+
let labels = $derived({ ...defaultLabels, ...userLabels });
|
|
33
|
+
|
|
19
34
|
let isAtCurrentMonth = $derived(
|
|
20
35
|
currentYear === todayLocalYear && currentMonth === todayLocalMonth
|
|
21
36
|
);
|
|
@@ -82,7 +97,7 @@
|
|
|
82
97
|
onmouseup={() => prevPressed = false}
|
|
83
98
|
onmouseleave={() => prevPressed = false}
|
|
84
99
|
disabled={!canGoPrev}
|
|
85
|
-
aria-label=
|
|
100
|
+
aria-label={labels.previousMonth}
|
|
86
101
|
>
|
|
87
102
|
<ChevronLeftOutline class="w-5 h-5" />
|
|
88
103
|
</button>
|
|
@@ -99,9 +114,9 @@
|
|
|
99
114
|
onmouseup={() => todayPressed = false}
|
|
100
115
|
onmouseleave={() => todayPressed = false}
|
|
101
116
|
disabled={isAtCurrentMonth}
|
|
102
|
-
aria-label=
|
|
117
|
+
aria-label={labels.goToCurrentMonth}
|
|
103
118
|
>
|
|
104
|
-
|
|
119
|
+
{labels.today}
|
|
105
120
|
</button>
|
|
106
121
|
<button
|
|
107
122
|
class="p-3 -m-1.5 flex items-center justify-center border-0 rounded-full bg-transparent text-gray-500 dark:text-gray-400 cursor-pointer select-none transition-transform duration-100 ease-out hover:bg-gray-100 dark:hover:bg-gray-700 hover:text-gray-900 dark:hover:text-white focus:outline-hidden focus-visible:ring-2 focus-visible:ring-blue-600 focus-visible:ring-offset-2"
|
|
@@ -117,7 +132,7 @@
|
|
|
117
132
|
onmousedown={() => nextPressed = true}
|
|
118
133
|
onmouseup={() => nextPressed = false}
|
|
119
134
|
onmouseleave={() => nextPressed = false}
|
|
120
|
-
aria-label=
|
|
135
|
+
aria-label={labels.nextMonth}
|
|
121
136
|
>
|
|
122
137
|
<ChevronRightOutline class="w-5 h-5" />
|
|
123
138
|
</button>
|
|
@@ -10,6 +10,7 @@ declare const MonthSwitcher: import("svelte").Component<{
|
|
|
10
10
|
handlePrev?: Function;
|
|
11
11
|
handleToday?: Function;
|
|
12
12
|
disablePastNavigation?: boolean;
|
|
13
|
+
labels?: Record<string, any>;
|
|
13
14
|
}, {}, "">;
|
|
14
15
|
type $$ComponentProps = {
|
|
15
16
|
currentYear?: number;
|
|
@@ -18,5 +19,6 @@ type $$ComponentProps = {
|
|
|
18
19
|
handlePrev?: Function;
|
|
19
20
|
handleToday?: Function;
|
|
20
21
|
disablePastNavigation?: boolean;
|
|
22
|
+
labels?: Record<string, any>;
|
|
21
23
|
};
|
|
22
24
|
//# sourceMappingURL=MonthSwitcher.svelte.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MonthSwitcher.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/calendar/MonthSwitcher/MonthSwitcher.svelte.js"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"MonthSwitcher.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/calendar/MonthSwitcher/MonthSwitcher.svelte.js"],"names":[],"mappings":";;;;;AAyGA;;;;;;4BA7E+L,OAAO;aAAW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;WA6ExK;wBA7EzC;IAAE,WAAW,CAAC,SAAwB;IAAC,YAAY,CAAC,SAAyB;IAAC,UAAU,CAAC,WAAW;IAAC,UAAU,CAAC,WAAW;IAAC,WAAW,CAAC,WAAW;IAAC,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAAE"}
|
|
@@ -503,12 +503,12 @@ describe('OrderSummary Component', () => {
|
|
|
503
503
|
expect(checkoutTicket).not.toHaveBeenCalled();
|
|
504
504
|
});
|
|
505
505
|
|
|
506
|
-
it('displays terms of service when
|
|
506
|
+
it('displays terms of service when showTerms is true', () => {
|
|
507
507
|
const props = {
|
|
508
508
|
...defaultProps,
|
|
509
509
|
quantities: { 1: 1 },
|
|
510
510
|
eventTickets: sampleTickets,
|
|
511
|
-
|
|
511
|
+
showTerms: true,
|
|
512
512
|
};
|
|
513
513
|
render(OrderSummary, { props });
|
|
514
514
|
expect(screen.getByText(/By selecting Place order, I agree to the/)).toBeInTheDocument();
|
|
@@ -728,7 +728,7 @@ describe('OrderSummary Component', () => {
|
|
|
728
728
|
...defaultProps,
|
|
729
729
|
quantities: { 1: 1 },
|
|
730
730
|
eventTickets: sampleTickets,
|
|
731
|
-
|
|
731
|
+
showTerms: true,
|
|
732
732
|
};
|
|
733
733
|
const { container } = render(OrderSummary, { props });
|
|
734
734
|
const link = container.querySelector('a[href*="tos"]');
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import { ChevronDownOutline, CloseOutline } from '../../primitives/Icons';
|
|
5
5
|
import Spinner from '../../primitives/Spinner/Spinner.svelte';
|
|
6
6
|
import { typography } from '../../tokens/typography';
|
|
7
|
+
import { roundCurrency } from '../../utils/formatters';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Default labels for all user-visible strings in OrderSummary.
|
|
@@ -23,6 +24,8 @@
|
|
|
23
24
|
amountDue: 'Amount Due',
|
|
24
25
|
fullyCoveredByGiftCard: 'Fully covered by gift card',
|
|
25
26
|
total: 'Total',
|
|
27
|
+
checkoutButtonText: 'Checkout',
|
|
28
|
+
placeOrderButtonText: 'Place order',
|
|
26
29
|
placeOrderTos: 'By selecting Place order, I agree to the',
|
|
27
30
|
termsOfService: 'terms of service',
|
|
28
31
|
checkout: 'Checkout',
|
|
@@ -38,7 +41,8 @@
|
|
|
38
41
|
eventTickets = [],
|
|
39
42
|
checkoutTicket = null,
|
|
40
43
|
isAgreed = true,
|
|
41
|
-
btnText =
|
|
44
|
+
btnText = undefined,
|
|
45
|
+
showTerms = false,
|
|
42
46
|
promoApplied = false,
|
|
43
47
|
promoDiscount = 0,
|
|
44
48
|
currentPromoRule = null,
|
|
@@ -95,7 +99,7 @@
|
|
|
95
99
|
fee = maxFee / 100;
|
|
96
100
|
}
|
|
97
101
|
|
|
98
|
-
return fee;
|
|
102
|
+
return roundCurrency(fee);
|
|
99
103
|
}
|
|
100
104
|
|
|
101
105
|
function makeOrderSummaryVisible() {
|
|
@@ -123,15 +127,15 @@
|
|
|
123
127
|
let totalQuantity = $derived(Object.values(quantities).reduce((sum, q) => sum + q, 0));
|
|
124
128
|
let showFooter = $derived(totalQuantity > 0);
|
|
125
129
|
|
|
126
|
-
let subtotalWithoutDiscount = $derived(Object.keys(quantities).reduce((acc, key) => {
|
|
130
|
+
let subtotalWithoutDiscount = $derived(roundCurrency(Object.keys(quantities).reduce((acc, key) => {
|
|
127
131
|
const ticket = eventTickets.find(t => t.ID == key);
|
|
128
132
|
if (!ticket) return acc;
|
|
129
133
|
// For donation tickets, use the donation amount; otherwise use ticket price
|
|
130
134
|
const effectivePrice = getEffectivePrice(ticket);
|
|
131
135
|
return acc + quantities[key] * effectivePrice;
|
|
132
|
-
}, 0));
|
|
136
|
+
}, 0)));
|
|
133
137
|
|
|
134
|
-
let subtotal = $derived(Object.keys(quantities).reduce((acc, key) => {
|
|
138
|
+
let subtotal = $derived(roundCurrency(Object.keys(quantities).reduce((acc, key) => {
|
|
135
139
|
const ticket = eventTickets.find(t => t.ID == key);
|
|
136
140
|
if (!ticket) return acc;
|
|
137
141
|
// For donation tickets, use the donation amount (no discounts apply)
|
|
@@ -143,21 +147,21 @@
|
|
|
143
147
|
const discountedPrice = getDiscountedPrice(ticket);
|
|
144
148
|
const priceToUse = discountedPrice !== null ? parseFloat(discountedPrice) : ticket.price;
|
|
145
149
|
return acc + quantities[key] * priceToUse;
|
|
146
|
-
}, 0));
|
|
150
|
+
}, 0)));
|
|
147
151
|
|
|
148
152
|
let promoSavings = $derived(currentPromoRule?.provideDiscount ? (subtotalWithoutDiscount - subtotal) : 0);
|
|
149
153
|
|
|
150
|
-
let fees = $derived(Object.keys(quantities).reduce((acc, key) => {
|
|
154
|
+
let fees = $derived(roundCurrency(Object.keys(quantities).reduce((acc, key) => {
|
|
151
155
|
const ticket = eventTickets.find(t => t.ID == key);
|
|
152
156
|
// Skip fees for: no ticket, free tickets, and donation tickets (type 2)
|
|
153
157
|
if (!ticket || ticket.price == 0 || isDonationTicket(ticket)) return acc;
|
|
154
158
|
const discountedPrice = getDiscountedPrice(ticket);
|
|
155
159
|
const priceToUse = discountedPrice !== null ? parseFloat(discountedPrice) : ticket.price;
|
|
156
160
|
return acc + quantities[key] * feeFor(priceToUse);
|
|
157
|
-
}, 0));
|
|
161
|
+
}, 0)));
|
|
158
162
|
|
|
159
163
|
let taxRate = $derived((venueServiceCharge.taxPercentage || 0) / 100);
|
|
160
|
-
let taxes = $derived(subtotal > 0 ? subtotal * taxRate : 0);
|
|
164
|
+
let taxes = $derived(subtotal > 0 ? roundCurrency(subtotal * taxRate) : 0);
|
|
161
165
|
|
|
162
166
|
// Gift card derived values
|
|
163
167
|
let giftCardAmountDisplay = $derived(
|
|
@@ -169,10 +173,10 @@
|
|
|
169
173
|
|
|
170
174
|
// Total accounts for gift card deduction
|
|
171
175
|
let total = $derived(
|
|
172
|
-
Math.max(0, subtotal + fees + taxes
|
|
176
|
+
roundCurrency(Math.max(0, subtotal + fees + taxes
|
|
173
177
|
- (promoApplied && !currentPromoRule?.provideDiscount ? promoDiscount : 0)
|
|
174
178
|
- (giftCardApplied ? giftCardApplied.giftCardAmount / 100 : 0)
|
|
175
|
-
)
|
|
179
|
+
))
|
|
176
180
|
);
|
|
177
181
|
|
|
178
182
|
$effect(() => {
|
|
@@ -281,7 +285,7 @@
|
|
|
281
285
|
{/if}
|
|
282
286
|
{/if}
|
|
283
287
|
|
|
284
|
-
{#if totalQuantity > 0 &&
|
|
288
|
+
{#if totalQuantity > 0 && showTerms}
|
|
285
289
|
<p class="{typography.xsMuted} text-center mb-3">
|
|
286
290
|
{labels.placeOrderTos} <a href="https://get-micdrop.com/tos" class="text-blue-700 dark:text-blue-500 underline hover:opacity-80" target="_blank" rel="noopener noreferrer">{labels.termsOfService}</a>
|
|
287
291
|
</p>
|
|
@@ -302,7 +306,7 @@
|
|
|
302
306
|
{#if loading}
|
|
303
307
|
<Spinner size="sm" color="white" />
|
|
304
308
|
{:else}
|
|
305
|
-
<span translate="no">{btnText}</span>
|
|
309
|
+
<span translate="no">{btnText ?? (showTerms ? labels.placeOrderButtonText : labels.checkoutButtonText)}</span>
|
|
306
310
|
{/if}
|
|
307
311
|
</button>
|
|
308
312
|
</div>
|
|
@@ -10,7 +10,8 @@ declare const OrderSummary: import("svelte").Component<{
|
|
|
10
10
|
eventTickets?: any[];
|
|
11
11
|
checkoutTicket?: any;
|
|
12
12
|
isAgreed?: boolean;
|
|
13
|
-
btnText?:
|
|
13
|
+
btnText?: any;
|
|
14
|
+
showTerms?: boolean;
|
|
14
15
|
promoApplied?: boolean;
|
|
15
16
|
promoDiscount?: number;
|
|
16
17
|
currentPromoRule?: any;
|
|
@@ -28,7 +29,8 @@ type $$ComponentProps = {
|
|
|
28
29
|
eventTickets?: any[];
|
|
29
30
|
checkoutTicket?: any;
|
|
30
31
|
isAgreed?: boolean;
|
|
31
|
-
btnText?:
|
|
32
|
+
btnText?: any;
|
|
33
|
+
showTerms?: boolean;
|
|
32
34
|
promoApplied?: boolean;
|
|
33
35
|
promoDiscount?: number;
|
|
34
36
|
currentPromoRule?: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrderSummary.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/calendar/OrderSummary/OrderSummary.svelte.js"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"OrderSummary.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/calendar/OrderSummary/OrderSummary.svelte.js"],"names":[],"mappings":";;;;;AAybA;cA3Y+B,OAAO;iBAAe,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;sBAAoB,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;mBAAiB,GAAG,EAAE;qBAAmB,GAAG;eAAa,OAAO;cAAY,GAAG;gBAAc,OAAO;mBAAiB,OAAO;oBAAkB,MAAM;uBAAqB,GAAG;sBAAoB,GAAG;eAAa,GAAG;yBAAuB,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;mBAAiB,GAAG;sBAAoB,GAAG;aAAW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;WA2Y1X;wBA3YxC;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAAC,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAAC,YAAY,CAAC,EAAE,GAAG,EAAE,CAAC;IAAC,cAAc,CAAC,EAAE,GAAG,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,GAAG,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAAC,gBAAgB,CAAC,EAAE,GAAG,CAAC;IAAC,eAAe,CAAC,EAAE,GAAG,CAAC;IAAC,QAAQ,CAAC,EAAE,GAAG,CAAC;IAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAAC,aAAa,EAAE,GAAG,CAAC;IAAC,eAAe,CAAC,EAAE,GAAG,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAAE"}
|
|
@@ -2,13 +2,22 @@
|
|
|
2
2
|
import { typography } from '../../tokens/typography';
|
|
3
3
|
import { formatEventDate as formatDateTz, formatEventTime } from '../../datetime/format';
|
|
4
4
|
|
|
5
|
+
const defaultLabels = {
|
|
6
|
+
onSale: 'On Sale',
|
|
7
|
+
pressEnterToViewDetails: 'Press Enter to view details.',
|
|
8
|
+
};
|
|
9
|
+
|
|
5
10
|
let {
|
|
6
11
|
events = [],
|
|
7
12
|
view = "row",
|
|
8
13
|
placeholderImage = null,
|
|
9
14
|
onEventClick,
|
|
15
|
+
locale = 'en-US',
|
|
16
|
+
labels: userLabels = {},
|
|
10
17
|
} = $props();
|
|
11
18
|
|
|
19
|
+
let labels = $derived({ ...defaultLabels, ...userLabels });
|
|
20
|
+
|
|
12
21
|
let _isSmallScreen = $state(false);
|
|
13
22
|
|
|
14
23
|
const DEFAULT_PLACEHOLDER = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Crect fill='%23e5e7eb' width='100' height='100'/%3E%3Cpath d='M50 25c-8.3 0-15 6.7-15 15v5c0 8.3 6.7 15 15 15s15-6.7 15-15v-5c0-8.3-6.7-15-15-15zm0 45c-13.8 0-25 5.6-25 12.5V90h50v-7.5c0-6.9-11.2-12.5-25-12.5z' fill='%239ca3af'/%3E%3C/svg%3E";
|
|
@@ -66,7 +75,7 @@
|
|
|
66
75
|
if (!event.date) return '';
|
|
67
76
|
const [year, month, day] = event.date.split('-').map(Number);
|
|
68
77
|
const date = new Date(year, month - 1, day);
|
|
69
|
-
return date.toLocaleDateString(
|
|
78
|
+
return date.toLocaleDateString(locale, { weekday: "short", month: "short", day: "numeric" });
|
|
70
79
|
}
|
|
71
80
|
|
|
72
81
|
function formatTime(event) {
|
|
@@ -89,7 +98,7 @@
|
|
|
89
98
|
onkeydown={(e) => handleKeydown(e, event)}
|
|
90
99
|
tabindex="0"
|
|
91
100
|
role="button"
|
|
92
|
-
aria-label={`${event.name}, ${event.status ||
|
|
101
|
+
aria-label={`${event.name}, ${event.status || labels.onSale}, ${formatEventDate(event)}. ${labels.pressEnterToViewDetails}`}
|
|
93
102
|
>
|
|
94
103
|
<div
|
|
95
104
|
class="bg-gray-100 dark:bg-gray-700 flex items-center justify-center overflow-hidden {view === 'col'
|
|
@@ -8,11 +8,15 @@ declare const PublicCard: import("svelte").Component<{
|
|
|
8
8
|
view?: string;
|
|
9
9
|
placeholderImage?: any;
|
|
10
10
|
onEventClick: any;
|
|
11
|
+
locale?: string;
|
|
12
|
+
labels?: Record<string, any>;
|
|
11
13
|
}, {}, "">;
|
|
12
14
|
type $$ComponentProps = {
|
|
13
15
|
events?: any[];
|
|
14
16
|
view?: string;
|
|
15
17
|
placeholderImage?: any;
|
|
16
18
|
onEventClick: any;
|
|
19
|
+
locale?: string;
|
|
20
|
+
labels?: Record<string, any>;
|
|
17
21
|
};
|
|
18
22
|
//# sourceMappingURL=PublicCard.svelte.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublicCard.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/calendar/PublicCard/PublicCard.svelte.js"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"PublicCard.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/calendar/PublicCard/PublicCard.svelte.js"],"names":[],"mappings":";;;;;AAuJA;aAxI8B,GAAG,EAAE;WAAS,MAAM;uBAAqB,GAAG;kBAAgB,GAAG;aAAW,MAAM;aAAW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;WAwInF;wBAxItC;IAAE,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,gBAAgB,CAAC,EAAE,GAAG,CAAC;IAAC,YAAY,EAAE,GAAG,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAAE"}
|