@getmicdrop/svelte-components 5.20.2 → 5.21.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.spec.js +10 -10
- package/dist/calendar/AboutShow/AboutShow.svelte +11 -11
- package/dist/calendar/Calendar/MiniMonthCalendar.spec.js +9 -8
- package/dist/calendar/Calendar/MiniMonthCalendar.svelte +22 -25
- package/dist/calendar/Calendar/MiniMonthCalendar.svelte.d.ts.map +1 -1
- package/dist/calendar/FAQs/FAQs.spec.js +6 -6
- package/dist/calendar/FAQs/FAQs.svelte +4 -4
- package/dist/calendar/MonthSwitcher/MonthSwitcher.svelte +8 -12
- package/dist/calendar/OrderSummary/OrderSummary.svelte +36 -36
- package/dist/calendar/PublicCard/PublicCard.spec.js +3 -3
- package/dist/calendar/PublicCard/PublicCard.svelte +7 -7
- package/dist/calendar/ShowCard/ShowCard.spec.js +8 -8
- package/dist/calendar/ShowCard/ShowCard.svelte +8 -8
- package/dist/calendar/ShowTimeCard/ShowTimeCard.spec.js +4 -4
- package/dist/calendar/ShowTimeCard/ShowTimeCard.svelte +4 -4
- package/dist/components/Heading.spec.js +1 -1
- package/dist/components/Heading.svelte +1 -1
- package/dist/components/Layout/AppShell.svelte +4 -4
- package/dist/components/Layout/ContentSection.svelte +2 -2
- package/dist/components/Layout/Heading.svelte +3 -3
- package/dist/components/Layout/PageContainer.svelte +2 -2
- package/dist/components/Layout/Section.spec.js +4 -4
- package/dist/components/Layout/Text.svelte +7 -7
- package/dist/components/Layout/__tests__/AppShell.test.js +5 -5
- package/dist/components/Layout/__tests__/ContentSection.test.js +1 -1
- package/dist/components/Layout/__tests__/Heading.test.js +3 -3
- package/dist/components/Layout/__tests__/PageContainer.test.js +4 -4
- package/dist/components/Layout/__tests__/Text.test.js +9 -9
- package/dist/components/Text.spec.js +4 -4
- package/dist/components/Text.svelte +7 -7
- package/dist/patterns/chat/ChatActivityNotice.spec.js +1 -1
- package/dist/patterns/chat/ChatActivityNotice.svelte +3 -3
- package/dist/patterns/chat/ChatBubble.spec.js +1 -1
- package/dist/patterns/chat/ChatBubble.svelte +7 -7
- package/dist/patterns/chat/ChatContainer.spec.js +1 -1
- package/dist/patterns/chat/ChatContainer.svelte +3 -3
- package/dist/patterns/chat/ChatDateDivider.svelte +1 -1
- package/dist/patterns/chat/ChatInvitationBubble.spec.js +2 -2
- package/dist/patterns/chat/ChatInvitationBubble.svelte +1 -1
- package/dist/patterns/chat/ChatInvitationNotice.spec.js +2 -2
- package/dist/patterns/chat/ChatInvitationNotice.svelte +1 -1
- package/dist/patterns/chat/ChatMessageGroup.svelte +2 -2
- package/dist/patterns/chat/ChatSlotUpdate.svelte +2 -2
- package/dist/patterns/chat/ChatStatusBadge.spec.js +10 -10
- package/dist/patterns/chat/ChatStatusBadge.svelte +8 -8
- package/dist/patterns/chat/ChatStatusTransition.spec.js +9 -9
- package/dist/patterns/chat/ChatStatusTransition.svelte +5 -5
- package/dist/patterns/chat/ChatTextBubble.spec.js +4 -4
- package/dist/patterns/chat/ChatTextBubble.svelte +2 -2
- package/dist/patterns/data/DataList.spec.js +5 -5
- package/dist/patterns/data/DataList.svelte +1 -1
- package/dist/patterns/data/DataTable.spec.js +18 -18
- package/dist/patterns/data/DataTable.svelte +3 -3
- package/dist/patterns/forms/FormActions.spec.js +6 -6
- package/dist/patterns/forms/FormActions.stories.svelte +1 -1
- package/dist/patterns/forms/FormActions.svelte +1 -1
- package/dist/patterns/forms/FormSection.spec.js +4 -4
- package/dist/patterns/forms/FormSection.svelte +2 -2
- package/dist/patterns/forms/FormValidationSummary.spec.js +2 -2
- package/dist/patterns/forms/FormValidationSummary.stories.svelte +4 -4
- package/dist/patterns/forms/FormValidationSummary.svelte +4 -4
- package/dist/patterns/navigation/BottomNav.stories.svelte +23 -23
- package/dist/patterns/navigation/BottomNav.svelte +3 -3
- package/dist/patterns/navigation/Header.spec.js +9 -9
- package/dist/patterns/navigation/Header.svelte +13 -15
- package/dist/patterns/navigation/Header.svelte.d.ts.map +1 -1
- package/dist/patterns/page/PageLayout.spec.js +5 -5
- package/dist/patterns/page/PageLayout.svelte +1 -1
- package/dist/patterns/page/PageLoader.stories.svelte +5 -5
- package/dist/patterns/page/SectionHeader.spec.js +8 -8
- package/dist/patterns/page/SectionHeader.svelte +2 -2
- package/dist/presets/buttons.js +1 -1
- package/dist/presets/buttons.spec.js +4 -4
- package/dist/primitives/Accordion/Accordion.spec.js +5 -5
- package/dist/primitives/Accordion/Accordion.stories.svelte +9 -9
- package/dist/primitives/Accordion/Accordion.svelte +2 -2
- package/dist/primitives/Accordion/AccordionItem.spec.js +19 -28
- package/dist/primitives/Accordion/AccordionItem.svelte +4 -4
- package/dist/primitives/Avatar/Avatar.spec.js +11 -11
- package/dist/primitives/Avatar/Avatar.stories.svelte +6 -5
- package/dist/primitives/Avatar/Avatar.stories.svelte.d.ts.map +1 -1
- package/dist/primitives/Avatar/Avatar.svelte +3 -3
- package/dist/primitives/Badges/Badge.spec.js +10 -10
- package/dist/primitives/BottomSheet/BottomSheet.spec.js +5 -5
- package/dist/primitives/BottomSheet/BottomSheet.svelte +7 -7
- package/dist/primitives/Breadcrumb/Breadcrumb.spec.js +4 -2
- package/dist/primitives/Breadcrumb/Breadcrumb.svelte +4 -4
- package/dist/primitives/Button/Button.spec.js +15 -15
- package/dist/primitives/Button/Button.svelte +16 -16
- package/dist/primitives/Button/ButtonVariantShowcase.spec.js +1 -1
- package/dist/primitives/Button/ButtonVariantShowcase.svelte +18 -18
- package/dist/primitives/Card.spec.js +1 -1
- package/dist/primitives/Card.stories.svelte +1 -1
- package/dist/primitives/Card.svelte +1 -1
- package/dist/primitives/CardAction/CardAction.svelte +3 -3
- package/dist/primitives/Checkbox/Checkbox.spec.js +16 -16
- package/dist/primitives/Checkbox/Checkbox.stories.svelte +3 -3
- package/dist/primitives/Checkbox/Checkbox.svelte +9 -9
- package/dist/primitives/DarkModeToggle.spec.js +11 -11
- package/dist/primitives/DarkModeToggle.stories.svelte +8 -8
- package/dist/primitives/DarkModeToggle.svelte +4 -4
- package/dist/primitives/Drawer/Drawer.spec.js +4 -4
- package/dist/primitives/Drawer/Drawer.stories.svelte +6 -6
- package/dist/primitives/Drawer/Drawer.svelte +11 -11
- package/dist/primitives/Dropdown/Dropdown.spec.js +9 -9
- package/dist/primitives/Dropdown/Dropdown.stories.svelte +4 -4
- package/dist/primitives/Dropdown/Dropdown.svelte +2 -2
- package/dist/primitives/Dropdown/DropdownDivider.svelte +1 -1
- package/dist/primitives/Dropdown/DropdownItem.spec.js +8 -15
- package/dist/primitives/Dropdown/DropdownItem.svelte +3 -3
- package/dist/primitives/Helper/Helper.spec.js +6 -6
- package/dist/primitives/Helper/Helper.svelte +3 -3
- package/dist/primitives/Icons/Icon.stories.svelte +15 -15
- package/dist/primitives/Icons/IconGallery.stories.svelte +26 -26
- package/dist/primitives/Icons/Icons.spec.js +3 -3
- package/dist/primitives/Input/Input.spec.js +9 -9
- package/dist/primitives/Input/Input.svelte +11 -11
- package/dist/primitives/Input/Select.spec.js +7 -7
- package/dist/primitives/Input/Select.stories.svelte +1 -1
- package/dist/primitives/Input/Select.svelte +6 -6
- package/dist/primitives/Input/Textarea.spec.js +8 -8
- package/dist/primitives/Input/Textarea.stories.svelte +1 -1
- package/dist/primitives/Input/Textarea.svelte +2 -2
- package/dist/primitives/Label/Label.spec.js +20 -21
- package/dist/primitives/Label/Label.svelte +4 -4
- package/dist/primitives/LandingButton/LandingButton.svelte +3 -3
- package/dist/primitives/MenuItem/MenuItem.spec.js +5 -5
- package/dist/primitives/MenuItem/MenuItem.svelte +4 -4
- package/dist/primitives/Modal/Modal.stories.svelte +8 -8
- package/dist/primitives/Modal/Modal.svelte +4 -4
- package/dist/primitives/NavItem/NavItem.spec.js +2 -2
- package/dist/primitives/NavItem/NavItem.svelte +3 -3
- package/dist/primitives/NumberInput/NumberInput.spec.js +17 -17
- package/dist/primitives/NumberInput/NumberInput.svelte +8 -8
- package/dist/primitives/Pagination/DotIndicator.svelte +6 -6
- package/dist/primitives/Pagination/Pagination.spec.js +6 -6
- package/dist/primitives/Pagination/Pagination.stories.svelte +4 -4
- package/dist/primitives/Pagination/Pagination.svelte +3 -3
- package/dist/primitives/Radio/Radio.spec.js +19 -19
- package/dist/primitives/Radio/Radio.stories.svelte +5 -5
- package/dist/primitives/Radio/Radio.svelte +8 -8
- package/dist/primitives/SearchResultItem/SearchResultItem.svelte +5 -5
- package/dist/primitives/SidebarToggle/SidebarToggle.svelte +2 -2
- package/dist/primitives/Skeleton/CardPlaceholder.spec.js +1 -1
- package/dist/primitives/Skeleton/CardPlaceholder.svelte +11 -11
- package/dist/primitives/Skeleton/ImagePlaceholder.spec.js +2 -2
- package/dist/primitives/Skeleton/ImagePlaceholder.svelte +7 -7
- package/dist/primitives/Skeleton/ListPlaceholder.spec.js +2 -2
- package/dist/primitives/Skeleton/ListPlaceholder.svelte +5 -5
- package/dist/primitives/Skeleton/Skeleton.spec.js +7 -7
- package/dist/primitives/Skeleton/Skeleton.stories.svelte +4 -4
- package/dist/primitives/Skeleton/Skeleton.svelte +1 -1
- package/dist/primitives/Spinner/Spinner.spec.js +4 -5
- package/dist/primitives/Spinner/Spinner.stories.svelte +2 -2
- package/dist/primitives/Spinner/Spinner.svelte +1 -1
- package/dist/primitives/Tabs/Tabs.spec.js +14 -14
- package/dist/primitives/Tabs/Tabs.stories.svelte +6 -6
- package/dist/primitives/Tabs/Tabs.svelte +8 -8
- package/dist/primitives/Toggle.spec.js +3 -5
- package/dist/primitives/Toggle.stories.svelte +7 -7
- package/dist/primitives/Toggle.svelte +7 -7
- package/dist/primitives/Tooltip/Tooltip.svelte +5 -5
- package/dist/primitives/ValidationError.spec.js +1 -1
- package/dist/primitives/ValidationError.stories.svelte +8 -8
- package/dist/primitives/ValidationError.svelte +1 -1
- package/dist/recipes/CropImage/CropImage.stories.svelte +8 -8
- package/dist/recipes/CropImage/CropImage.svelte +7 -7
- package/dist/recipes/ImageUploader/ImageUploader.spec.js +1 -1
- package/dist/recipes/ImageUploader/ImageUploader.svelte +34 -56
- package/dist/recipes/SuperLogin/SuperLogin.svelte +25 -25
- package/dist/recipes/Toaster/Toaster.stories.svelte +10 -10
- package/dist/recipes/feedback/EmptyState/EmptyState.svelte +1 -1
- package/dist/recipes/feedback/ErrorDisplay.spec.js +1 -1
- package/dist/recipes/feedback/ErrorDisplay.stories.svelte +2 -2
- package/dist/recipes/feedback/ErrorDisplay.svelte +2 -2
- package/dist/recipes/feedback/StatusIndicator/StatusIndicator.svelte +7 -7
- package/dist/recipes/fields/CheckboxField.spec.js +2 -2
- package/dist/recipes/fields/CheckboxField.svelte +2 -2
- package/dist/recipes/fields/FormField.spec.js +4 -4
- package/dist/recipes/fields/FormField.svelte +1 -1
- package/dist/recipes/fields/RadioGroup.spec.js +1 -1
- package/dist/recipes/fields/RadioGroup.svelte +2 -2
- package/dist/recipes/fields/SelectField.spec.js +2 -2
- package/dist/recipes/fields/TextareaField.spec.js +2 -2
- package/dist/recipes/fields/ToggleField.spec.js +2 -2
- package/dist/recipes/fields/ToggleField.svelte +1 -1
- package/dist/recipes/inputs/MultiSelect.stories.svelte +2 -2
- package/dist/recipes/inputs/MultiSelect.svelte +10 -10
- package/dist/recipes/inputs/OTPInput.stories.svelte +9 -9
- package/dist/recipes/inputs/OTPInput.svelte +1 -1
- package/dist/recipes/inputs/PasswordInput.spec.js +2 -2
- package/dist/recipes/inputs/PasswordStrengthIndicator/PasswordStrengthIndicator.spec.js +14 -14
- package/dist/recipes/inputs/PasswordStrengthIndicator/PasswordStrengthIndicator.svelte +3 -3
- package/dist/recipes/inputs/PasswordStrengthIndicator/TestWrapper.svelte +2 -2
- package/dist/recipes/inputs/PhoneInput.svelte +5 -5
- package/dist/recipes/inputs/PlaceAutocomplete/PlaceAutocomplete.spec.js +10 -10
- package/dist/recipes/inputs/PlaceAutocomplete/PlaceAutocomplete.stories.svelte +7 -7
- package/dist/recipes/inputs/PlaceAutocomplete/PlaceAutocomplete.svelte +11 -14
- package/dist/recipes/inputs/PlaceAutocomplete/PlaceAutocomplete.svelte.d.ts.map +1 -1
- package/dist/recipes/inputs/Search.spec.js +3 -3
- package/dist/recipes/inputs/Search.svelte +1 -1
- package/dist/recipes/inputs/phoneInput/CountrySelector.svelte +5 -5
- package/dist/recipes/modals/AlertModal.spec.js +36 -36
- package/dist/recipes/modals/AlertModal.svelte +8 -8
- package/dist/recipes/modals/ConfirmationModal.spec.js +20 -20
- package/dist/recipes/modals/ConfirmationModal.svelte +1 -1
- package/dist/recipes/modals/FeedbackModal.svelte +7 -7
- package/dist/recipes/modals/InputModal.spec.js +17 -17
- package/dist/recipes/modals/InputModal.svelte +3 -3
- package/dist/recipes/modals/ModalStateManager.spec.js +1 -1
- package/dist/recipes/modals/ModalStateManager.svelte +2 -2
- package/dist/recipes/modals/StatusModal.spec.js +7 -7
- package/dist/recipes/modals/StatusModal.svelte +10 -10
- package/dist/schemas/__tests__/order.test.js +1 -1
- package/dist/schemas/auth.d.ts +107 -17
- package/dist/schemas/auth.d.ts.map +1 -1
- package/dist/schemas/common.d.ts +41 -13
- package/dist/schemas/common.d.ts.map +1 -1
- package/dist/schemas/event.d.ts +147 -41
- package/dist/schemas/event.d.ts.map +1 -1
- package/dist/schemas/order.d.ts +208 -51
- package/dist/schemas/order.d.ts.map +1 -1
- package/dist/schemas/performer.d.ts +199 -44
- package/dist/schemas/performer.d.ts.map +1 -1
- package/dist/schemas/promo.d.ts +221 -55
- package/dist/schemas/promo.d.ts.map +1 -1
- package/dist/schemas/ticket.d.ts +187 -61
- package/dist/schemas/ticket.d.ts.map +1 -1
- package/dist/schemas/user.d.ts +114 -54
- package/dist/schemas/user.d.ts.map +1 -1
- package/dist/schemas/venue.d.ts +238 -20
- package/dist/schemas/venue.d.ts.map +1 -1
- package/dist/stories/ButtonAuditDashboard.spec.js +12 -12
- package/dist/stories/ButtonAuditDashboard.svelte +55 -55
- package/dist/stories/ButtonAuditReview.spec.js +8 -8
- package/dist/stories/ButtonAuditReview.svelte +87 -87
- package/dist/stories/ButtonGridView.spec.js +27 -27
- package/dist/stories/ButtonGridView.svelte +22 -22
- package/dist/stories/ButtonShowcase.spec.js +4 -4
- package/dist/stories/ButtonShowcase.svelte +119 -119
- package/dist/stories/ComponentConsolidation.stories.svelte +453 -453
- package/dist/stories/DesignSystemAudit.stories.svelte +127 -127
- package/dist/stories/PatternsGallery.spec.js +3 -3
- package/dist/stories/PatternsGallery.svelte +23 -23
- package/dist/stories/PrimitivesGallery.spec.js +9 -9
- package/dist/stories/PrimitivesGallery.svelte +68 -68
- package/dist/stories/RecipesGallery.svelte +26 -26
- package/dist/tokens/__tests__/typography-base.test.js +5 -5
- package/dist/tokens/__tests__/typography.test.js +32 -36
- package/dist/tokens/__tests__/variants.test.js +63 -78
- package/dist/tokens/tokens.css +15 -15
- package/dist/tokens/typography-base.css +16 -16
- package/dist/tokens/typography.d.ts +29 -29
- package/dist/tokens/typography.js +29 -29
- package/dist/tokens/utilities.css +35 -47
- package/dist/tokens/variants.d.ts +32 -32
- package/dist/tokens/variants.js +32 -32
- package/dist/utils/utils/utils.spec.js +2 -2
- package/package.json +1 -1
|
@@ -186,9 +186,9 @@
|
|
|
186
186
|
|
|
187
187
|
<div
|
|
188
188
|
id="orderSummary"
|
|
189
|
-
class="hidden
|
|
189
|
+
class="hidden md:block h-fit rounded-lg bg-card border border-border"
|
|
190
190
|
>
|
|
191
|
-
<div class="px-5 py-4 border-b border-
|
|
191
|
+
<div class="px-5 py-4 border-b border-border">
|
|
192
192
|
<h3 class={typography.h3}>
|
|
193
193
|
{labels.orderSummary}
|
|
194
194
|
</h3>
|
|
@@ -206,7 +206,7 @@
|
|
|
206
206
|
{#if ticket.ID == key}
|
|
207
207
|
{@const effectivePrice = getEffectivePrice(ticket)}
|
|
208
208
|
{@const isDonation = isDonationTicket(ticket)}
|
|
209
|
-
<div class="flex justify-between py-3 border-b border-
|
|
209
|
+
<div class="flex justify-between py-3 border-b border-border/50">
|
|
210
210
|
<div>
|
|
211
211
|
<p class="{typography.label}">{ticket.name}</p>
|
|
212
212
|
<p class="{typography.smMuted}">
|
|
@@ -234,35 +234,35 @@
|
|
|
234
234
|
|
|
235
235
|
<div class="{`${typography.sm} flex flex-col py-3 gap-2`}">
|
|
236
236
|
{#if promoSavings > 0 || (promoDiscount > 0 && !currentPromoRule?.provideDiscount)}
|
|
237
|
-
<div class="flex justify-between text-
|
|
237
|
+
<div class="flex justify-between text-text-secondary">
|
|
238
238
|
<span>{labels.fullPrice}</span><span>${subtotalWithoutDiscount.toFixed(2)}</span>
|
|
239
239
|
</div>
|
|
240
240
|
{/if}
|
|
241
241
|
{#if promoSavings > 0}
|
|
242
|
-
<div class="flex justify-between text-
|
|
242
|
+
<div class="flex justify-between text-accent-success">
|
|
243
243
|
<span>{labels.discount}</span><span>-${promoSavings.toFixed(2)}</span>
|
|
244
244
|
</div>
|
|
245
245
|
{:else if promoDiscount > 0 && !currentPromoRule?.provideDiscount}
|
|
246
|
-
<div class="flex justify-between text-
|
|
246
|
+
<div class="flex justify-between text-accent-success">
|
|
247
247
|
<span>{labels.discount}</span><span>-${promoDiscount.toFixed(2)}</span>
|
|
248
248
|
</div>
|
|
249
249
|
{/if}
|
|
250
|
-
<div class="flex justify-between text-
|
|
250
|
+
<div class="flex justify-between text-text-secondary">
|
|
251
251
|
<span>{labels.subtotal}</span><span>${subtotal.toFixed(2)}</span>
|
|
252
252
|
</div>
|
|
253
|
-
<div class="flex justify-between text-
|
|
253
|
+
<div class="flex justify-between text-text-secondary">
|
|
254
254
|
<span>{labels.fees}</span><span>${fees.toFixed(2)}</span>
|
|
255
255
|
</div>
|
|
256
|
-
<div class="flex justify-between text-
|
|
256
|
+
<div class="flex justify-between text-text-secondary">
|
|
257
257
|
<span>{labels.taxes}</span><span>${taxes.toFixed(2)}</span>
|
|
258
258
|
</div>
|
|
259
259
|
{#if giftCardApplied}
|
|
260
|
-
<div class="flex justify-between text-
|
|
260
|
+
<div class="flex justify-between text-accent-success">
|
|
261
261
|
<span>{labels.giftCardAppliedLabel}</span>
|
|
262
262
|
<span>-${giftCardAmountDisplay}</span>
|
|
263
263
|
</div>
|
|
264
264
|
{#if giftCardRemainingBalance && parseFloat(giftCardRemainingBalance) > 0}
|
|
265
|
-
<div class="flex justify-between text-
|
|
265
|
+
<div class="flex justify-between text-muted-foreground text-xs">
|
|
266
266
|
<span>{labels.giftCardBalanceAfterOrder}</span>
|
|
267
267
|
<span>${giftCardRemainingBalance}</span>
|
|
268
268
|
</div>
|
|
@@ -271,15 +271,15 @@
|
|
|
271
271
|
</div>
|
|
272
272
|
|
|
273
273
|
{#if giftCardApplied?.paymentType === 'gift_card_only'}
|
|
274
|
-
<div class="flex justify-between py-4 text-lg border-t border-
|
|
275
|
-
<span class="font-semibold text-
|
|
276
|
-
<span class="font-bold text-
|
|
274
|
+
<div class="flex justify-between py-4 text-lg border-t border-border">
|
|
275
|
+
<span class="font-semibold text-text-primary">{labels.amountDue}</span>
|
|
276
|
+
<span class="font-bold text-accent-success">$0.00</span>
|
|
277
277
|
</div>
|
|
278
|
-
<p class="text-xs text-
|
|
278
|
+
<p class="text-xs text-muted-foreground text-center -mt-2 mb-2">
|
|
279
279
|
{labels.fullyCoveredByGiftCard}
|
|
280
280
|
</p>
|
|
281
281
|
{:else}
|
|
282
|
-
<div class="flex justify-between {typography.h3} py-4 text-lg border-t border-
|
|
282
|
+
<div class="flex justify-between {typography.h3} py-4 text-lg border-t border-border">
|
|
283
283
|
<span>{labels.total}</span><span>${total.toFixed(2)}</span>
|
|
284
284
|
</div>
|
|
285
285
|
{/if}
|
|
@@ -287,12 +287,12 @@
|
|
|
287
287
|
|
|
288
288
|
{#if totalQuantity > 0 && showTerms}
|
|
289
289
|
<p class="{typography.xsMuted} text-center mb-3">
|
|
290
|
-
{labels.placeOrderTos} <a href="https://get-micdrop.com/tos" class="text-
|
|
290
|
+
{labels.placeOrderTos} <a href="https://get-micdrop.com/tos" class="text-brand-primary underline hover:opacity-80" target="_blank" rel="noopener noreferrer">{labels.termsOfService}</a>
|
|
291
291
|
</p>
|
|
292
292
|
{/if}
|
|
293
293
|
|
|
294
294
|
<button
|
|
295
|
-
class="w-full h-12 font-semibold rounded-lg flex items-center justify-center transition-colors select-none touch-manipulation {totalQuantity === 0 ? 'bg-
|
|
295
|
+
class="w-full h-12 font-semibold rounded-lg flex items-center justify-center transition-colors select-none touch-manipulation {totalQuantity === 0 ? 'bg-bg-tertiary text-muted-foreground cursor-not-allowed' : 'bg-brand-primary text-white hover:bg-brand-primary/90'}"
|
|
296
296
|
onclick={() => {
|
|
297
297
|
if (totalQuantity === 0) return;
|
|
298
298
|
if (executePurchase) {
|
|
@@ -314,7 +314,7 @@
|
|
|
314
314
|
|
|
315
315
|
{#if showOrderSummaryOnMobile}
|
|
316
316
|
<button
|
|
317
|
-
class="
|
|
317
|
+
class="md:hidden fixed inset-0 bg-overlay-bg z-40 border-none cursor-pointer"
|
|
318
318
|
onclick={() => (showOrderSummaryOnMobile = false)}
|
|
319
319
|
aria-label={labels.closeOrderSummary}
|
|
320
320
|
transition:fade={{ duration: 200 }}
|
|
@@ -322,15 +322,15 @@
|
|
|
322
322
|
<div
|
|
323
323
|
in:fly={{ y: 800, duration: 300, easing: cubicOut }}
|
|
324
324
|
out:fly={{ y: 800, duration: 300, easing: cubicOut }}
|
|
325
|
-
class="
|
|
325
|
+
class="md:hidden fixed bottom-0 left-0 w-full overflow-x-hidden overflow-y-auto z-50 max-h-[80vh] rounded-t-lg shadow-xl bg-card"
|
|
326
326
|
>
|
|
327
|
-
<div class="flex flex-row justify-between items-center px-5 py-4 border-b border-
|
|
327
|
+
<div class="flex flex-row justify-between items-center px-5 py-4 border-b border-border">
|
|
328
328
|
<h2 class="{typography.h2} text-xl">
|
|
329
329
|
{labels.orderSummary}
|
|
330
330
|
</h2>
|
|
331
331
|
<button
|
|
332
332
|
onclick={() => (showOrderSummaryOnMobile = false)}
|
|
333
|
-
class="transition-colors p-2 rounded-lg text-
|
|
333
|
+
class="transition-colors p-2 rounded-lg text-muted-foreground hover:text-text-primary hover:bg-bg-secondary"
|
|
334
334
|
aria-label={labels.closeOrderSummary}
|
|
335
335
|
>
|
|
336
336
|
<CloseOutline class="w-7 h-7" />
|
|
@@ -344,7 +344,7 @@
|
|
|
344
344
|
{#if ticket.ID == key}
|
|
345
345
|
{@const effectivePrice = getEffectivePrice(ticket)}
|
|
346
346
|
{@const isDonation = isDonationTicket(ticket)}
|
|
347
|
-
<div class="flex justify-between py-4 border-b border-
|
|
347
|
+
<div class="flex justify-between py-4 border-b border-border">
|
|
348
348
|
<div>
|
|
349
349
|
<p class="{typography.h5}">{ticket.name}</p>
|
|
350
350
|
<p class="{typography.smMuted}">
|
|
@@ -370,18 +370,18 @@
|
|
|
370
370
|
{/if}
|
|
371
371
|
{/each}
|
|
372
372
|
|
|
373
|
-
<div class="flex flex-col py-4 gap-3 text-
|
|
373
|
+
<div class="flex flex-col py-4 gap-3 text-text-secondary">
|
|
374
374
|
{#if promoSavings > 0 || (promoDiscount > 0 && !currentPromoRule?.provideDiscount)}
|
|
375
375
|
<div class="flex justify-between">
|
|
376
376
|
<span>{labels.fullPrice}</span><span>${subtotalWithoutDiscount.toFixed(2)}</span>
|
|
377
377
|
</div>
|
|
378
378
|
{/if}
|
|
379
379
|
{#if promoSavings > 0}
|
|
380
|
-
<div class="flex justify-between text-
|
|
380
|
+
<div class="flex justify-between text-accent-success">
|
|
381
381
|
<span>{labels.discount}</span><span>-${promoSavings.toFixed(2)}</span>
|
|
382
382
|
</div>
|
|
383
383
|
{:else if promoDiscount > 0 && !currentPromoRule?.provideDiscount}
|
|
384
|
-
<div class="flex justify-between text-
|
|
384
|
+
<div class="flex justify-between text-accent-success">
|
|
385
385
|
<span>{labels.discount}</span><span>-${promoDiscount.toFixed(2)}</span>
|
|
386
386
|
</div>
|
|
387
387
|
{/if}
|
|
@@ -395,12 +395,12 @@
|
|
|
395
395
|
<span>{labels.taxes}</span><span>${taxes.toFixed(2)}</span>
|
|
396
396
|
</div>
|
|
397
397
|
{#if giftCardApplied}
|
|
398
|
-
<div class="flex justify-between text-
|
|
398
|
+
<div class="flex justify-between text-accent-success">
|
|
399
399
|
<span>{labels.giftCardAppliedLabel}</span>
|
|
400
400
|
<span>-${giftCardAmountDisplay}</span>
|
|
401
401
|
</div>
|
|
402
402
|
{#if giftCardRemainingBalance && parseFloat(giftCardRemainingBalance) > 0}
|
|
403
|
-
<div class="flex justify-between text-
|
|
403
|
+
<div class="flex justify-between text-muted-foreground text-xs">
|
|
404
404
|
<span>{labels.giftCardBalanceAfterOrder}</span>
|
|
405
405
|
<span>${giftCardRemainingBalance}</span>
|
|
406
406
|
</div>
|
|
@@ -409,15 +409,15 @@
|
|
|
409
409
|
</div>
|
|
410
410
|
|
|
411
411
|
{#if giftCardApplied?.paymentType === 'gift_card_only'}
|
|
412
|
-
<div class="flex justify-between py-5 border-t border-
|
|
413
|
-
<span class="font-semibold text-
|
|
414
|
-
<span class="font-bold text-
|
|
412
|
+
<div class="flex justify-between py-5 border-t border-border">
|
|
413
|
+
<span class="font-semibold text-text-primary">{labels.amountDue}</span>
|
|
414
|
+
<span class="font-bold text-accent-success">$0.00</span>
|
|
415
415
|
</div>
|
|
416
|
-
<p class="text-xs text-
|
|
416
|
+
<p class="text-xs text-muted-foreground text-center -mt-2 mb-2">
|
|
417
417
|
{labels.fullyCoveredByGiftCard}
|
|
418
418
|
</p>
|
|
419
419
|
{:else}
|
|
420
|
-
<div class="flex justify-between {typography.h3} py-5 border-t border-
|
|
420
|
+
<div class="flex justify-between {typography.h3} py-5 border-t border-border">
|
|
421
421
|
<span>{labels.total}</span><span>${total.toFixed(2)}</span>
|
|
422
422
|
</div>
|
|
423
423
|
{/if}
|
|
@@ -428,11 +428,11 @@
|
|
|
428
428
|
{#if showFooter}
|
|
429
429
|
<div
|
|
430
430
|
transition:fly={{ y: 100, duration: 200 }}
|
|
431
|
-
class="
|
|
431
|
+
class="md:hidden fixed bottom-0 left-0 right-0 z-40 bg-card border-t border-border shadow-xl p-4 pb-[max(16px,calc(env(safe-area-inset-bottom)+8px))] select-none touch-manipulation"
|
|
432
432
|
>
|
|
433
433
|
<div class="flex items-stretch gap-3">
|
|
434
434
|
<button class="flex flex-col justify-between items-start shrink-0 whitespace-nowrap bg-transparent border-none p-0 cursor-pointer touch-manipulation" onclick={makeOrderSummaryVisible}>
|
|
435
|
-
<span class="{`${typography.sm} flex items-center gap-1 text-
|
|
435
|
+
<span class="{`${typography.sm} flex items-center gap-1 text-text-secondary`}">
|
|
436
436
|
{totalQuantity} {totalQuantity > 1 ? labels.ticketPlural : labels.ticketSingular}
|
|
437
437
|
<ChevronDownOutline class={`w-4 h-4 ${typography.iconMuted} transition-transform duration-200 ${showOrderSummaryOnMobile ? 'rotate-180' : ''}`} />
|
|
438
438
|
</span>
|
|
@@ -440,7 +440,7 @@
|
|
|
440
440
|
</button>
|
|
441
441
|
|
|
442
442
|
<button
|
|
443
|
-
class="{`${typography.label} flex-1 min-w-36 h-12 rounded-lg touch-manipulation flex items-center justify-center ${totalQuantity === 0 || !isAgreed ? 'bg-
|
|
443
|
+
class="{`${typography.label} flex-1 min-w-36 h-12 rounded-lg touch-manipulation flex items-center justify-center ${totalQuantity === 0 || !isAgreed ? 'bg-bg-tertiary text-muted-foreground cursor-not-allowed' : 'bg-brand-primary text-white hover:bg-brand-primary/90'}`}"
|
|
444
444
|
onclick={() => {
|
|
445
445
|
if (executePurchase) {
|
|
446
446
|
executePurchase(elements);
|
|
@@ -126,14 +126,14 @@ describe('PublicCard Component', () => {
|
|
|
126
126
|
const soldOutEvent = { ...mockEvent, status: 'Sold out' };
|
|
127
127
|
render(PublicCard, { props: { events: [soldOutEvent] } });
|
|
128
128
|
const badge = screen.getByText('Sold out');
|
|
129
|
-
expect(badge.className).toContain('bg-
|
|
129
|
+
expect(badge.className).toContain('bg-status-error-bg');
|
|
130
130
|
});
|
|
131
131
|
|
|
132
132
|
it('applies correct class for Selling fast', () => {
|
|
133
133
|
const sellingFastEvent = { ...mockEvent, status: 'Selling fast' };
|
|
134
134
|
render(PublicCard, { props: { events: [sellingFastEvent] } });
|
|
135
135
|
const badge = screen.getByText('Selling fast');
|
|
136
|
-
expect(badge.className).toContain('bg-
|
|
136
|
+
expect(badge.className).toContain('bg-status-warning-bg');
|
|
137
137
|
});
|
|
138
138
|
});
|
|
139
139
|
|
|
@@ -277,7 +277,7 @@ describe('PublicCard Component', () => {
|
|
|
277
277
|
it('has dark mode support', () => {
|
|
278
278
|
const { container } = render(PublicCard, { props: { events: [mockEvent] } });
|
|
279
279
|
const article = container.querySelector('article');
|
|
280
|
-
expect(article.className).toContain('
|
|
280
|
+
expect(article.className).toContain('');
|
|
281
281
|
});
|
|
282
282
|
});
|
|
283
283
|
|
|
@@ -52,13 +52,13 @@
|
|
|
52
52
|
function getStatusBadgeClass(status) {
|
|
53
53
|
switch (status) {
|
|
54
54
|
case 'Sold out':
|
|
55
|
-
return 'bg-
|
|
55
|
+
return 'bg-status-error-bg text-status-error-text';
|
|
56
56
|
case 'Selling fast':
|
|
57
|
-
return 'bg-
|
|
57
|
+
return 'bg-status-warning-bg text-status-warning-text';
|
|
58
58
|
case 'Almost sold out':
|
|
59
|
-
return 'bg-
|
|
59
|
+
return 'bg-status-error-bg text-status-error-text';
|
|
60
60
|
default:
|
|
61
|
-
return 'bg-
|
|
61
|
+
return 'bg-muted text-text-secondary';
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
{#each events as event}
|
|
92
92
|
<!-- svelte-ignore a11y_no_noninteractive_element_to_interactive_role -->
|
|
93
93
|
<article
|
|
94
|
-
class="bg-
|
|
94
|
+
class="bg-card rounded-lg border border-border cursor-pointer overflow-hidden transition-all duration-200 hover:shadow-lg hover:border-stroke-primary focus:outline-hidden focus:ring-4 focus:ring-focus-ring relative {view === 'col'
|
|
95
95
|
? 'flex flex-col'
|
|
96
96
|
: 'grid grid-cols-[100px_1fr] sm:grid-cols-[160px_1fr] gap-3 sm:gap-4 p-3 sm:p-4'}"
|
|
97
97
|
onclick={() => handleEventClick(event)}
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
aria-label={`${event.name}, ${event.status || labels.onSale}, ${formatEventDate(event)}. ${labels.pressEnterToViewDetails}`}
|
|
102
102
|
>
|
|
103
103
|
<div
|
|
104
|
-
class="bg-
|
|
104
|
+
class="bg-muted flex items-center justify-center overflow-hidden {view === 'col'
|
|
105
105
|
? 'w-full aspect-[4/3] rounded-t-lg'
|
|
106
106
|
: 'w-24 h-24 sm:w-40 sm:h-32 rounded-lg shrink-0'}"
|
|
107
107
|
>
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
<span class="font-medium">
|
|
143
143
|
{formatEventDate(event)}
|
|
144
144
|
{#if event.startDateTime || event.timeline}
|
|
145
|
-
<span class="text-
|
|
145
|
+
<span class="text-muted-foreground">•</span>
|
|
146
146
|
{formatTime(event)}
|
|
147
147
|
{/if}
|
|
148
148
|
</span>
|
|
@@ -233,7 +233,7 @@ describe('ShowCard Component', () => {
|
|
|
233
233
|
|
|
234
234
|
// Should show check icon
|
|
235
235
|
await waitFor(() => {
|
|
236
|
-
const checkIcon = shareButton.querySelector('.text-
|
|
236
|
+
const checkIcon = shareButton.querySelector('.text-accent-success, .text-accent-success');
|
|
237
237
|
expect(checkIcon).toBeInTheDocument();
|
|
238
238
|
});
|
|
239
239
|
|
|
@@ -241,7 +241,7 @@ describe('ShowCard Component', () => {
|
|
|
241
241
|
vi.advanceTimersByTime(2000);
|
|
242
242
|
|
|
243
243
|
await waitFor(() => {
|
|
244
|
-
const shareIcon = shareButton.querySelector('.text-
|
|
244
|
+
const shareIcon = shareButton.querySelector('.text-muted-foreground, .text-muted-foreground');
|
|
245
245
|
expect(shareIcon).toBeInTheDocument();
|
|
246
246
|
});
|
|
247
247
|
|
|
@@ -557,7 +557,7 @@ describe('ShowCard Component', () => {
|
|
|
557
557
|
it('has dark mode support', () => {
|
|
558
558
|
const { container } = render(ShowCard, { props: { event: mockEvent } });
|
|
559
559
|
const wrapper = container.querySelector('.rounded-lg');
|
|
560
|
-
expect(wrapper.className).toContain('
|
|
560
|
+
expect(wrapper.className).toContain('');
|
|
561
561
|
});
|
|
562
562
|
|
|
563
563
|
it('has border on medium screens and up', () => {
|
|
@@ -569,15 +569,15 @@ describe('ShowCard Component', () => {
|
|
|
569
569
|
it('applies hover styles to share button', () => {
|
|
570
570
|
const { container } = render(ShowCard, { props: { event: mockEvent, showTitle: true } });
|
|
571
571
|
const shareButton = screen.getByLabelText('Share event');
|
|
572
|
-
expect(shareButton.className).toContain('hover:bg-
|
|
573
|
-
expect(shareButton.className).toContain('
|
|
572
|
+
expect(shareButton.className).toContain('hover:bg-muted');
|
|
573
|
+
expect(shareButton.className).toContain('');
|
|
574
574
|
});
|
|
575
575
|
|
|
576
576
|
it('applies hover styles to venue link', () => {
|
|
577
577
|
const { container } = render(ShowCard, { props: { event: mockEvent } });
|
|
578
578
|
const venueName = screen.getByText('The Music Hall');
|
|
579
|
-
expect(venueName.className).toContain('group-hover:text-
|
|
580
|
-
expect(venueName.className).toContain('
|
|
579
|
+
expect(venueName.className).toContain('group-hover:text-brand-primary');
|
|
580
|
+
expect(venueName.className).toContain('');
|
|
581
581
|
});
|
|
582
582
|
|
|
583
583
|
it('has border between sections', () => {
|
|
@@ -689,7 +689,7 @@ describe('ShowCard Component', () => {
|
|
|
689
689
|
|
|
690
690
|
// Wait for success indicator
|
|
691
691
|
await waitFor(() => {
|
|
692
|
-
const checkIcon = shareButton.querySelector('.text-
|
|
692
|
+
const checkIcon = shareButton.querySelector('.text-accent-success, .text-accent-success');
|
|
693
693
|
expect(checkIcon).toBeInTheDocument();
|
|
694
694
|
});
|
|
695
695
|
|
|
@@ -99,21 +99,21 @@
|
|
|
99
99
|
}
|
|
100
100
|
</script>
|
|
101
101
|
|
|
102
|
-
<div class="h-fit rounded-lg sm:px-5 py-4 md:border md:border-
|
|
102
|
+
<div class="h-fit rounded-lg sm:px-5 py-4 md:border md:border-border md: bg-card">
|
|
103
103
|
{#if showTitle}
|
|
104
104
|
<div class="flex justify-between items-start gap-2 mb-4">
|
|
105
105
|
<h2 class="{typography.h2} flex-1 text-left">
|
|
106
106
|
{event.name || ''}
|
|
107
107
|
</h2>
|
|
108
108
|
<button
|
|
109
|
-
class="shrink-0 p-2 rounded-lg transition-colors hover:bg-
|
|
109
|
+
class="shrink-0 p-2 rounded-lg transition-colors hover:bg-muted relative"
|
|
110
110
|
aria-label={labels.shareEvent}
|
|
111
111
|
onclick={handleShare}
|
|
112
112
|
>
|
|
113
113
|
{#if shareSuccess}
|
|
114
|
-
<CheckOutline class="w-5 h-5 text-
|
|
114
|
+
<CheckOutline class="w-5 h-5 text-accent-success" />
|
|
115
115
|
{:else}
|
|
116
|
-
<ShareOutline class="w-5 h-5 text-
|
|
116
|
+
<ShareOutline class="w-5 h-5 text-muted-foreground hover:text-text-secondary cursor-pointer" />
|
|
117
117
|
{/if}
|
|
118
118
|
</button>
|
|
119
119
|
</div>
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
</div>
|
|
131
131
|
|
|
132
132
|
{#if showtimes && showtimes.length > 1}
|
|
133
|
-
<div class="mt-4 pt-4 border-t border-
|
|
133
|
+
<div class="mt-4 pt-4 border-t border-border">
|
|
134
134
|
<p class="{typography.smMuted} mb-2">{labels.moreShowtimes}</p>
|
|
135
135
|
<div class="flex flex-wrap gap-2">
|
|
136
136
|
{#each showtimes as showtime}
|
|
@@ -149,17 +149,17 @@
|
|
|
149
149
|
{/if}
|
|
150
150
|
|
|
151
151
|
{#if event.venue}
|
|
152
|
-
<div class="mt-4 pt-4 border-t border-
|
|
152
|
+
<div class="mt-4 pt-4 border-t border-border">
|
|
153
153
|
<a
|
|
154
154
|
href="https://www.google.com/maps/search/?api=1&query={encodeURIComponent(event.venue.googleLocationNameCache || event.venue.address || event.venue.name)}"
|
|
155
155
|
target="_blank"
|
|
156
156
|
rel="noopener noreferrer"
|
|
157
157
|
class="group block"
|
|
158
158
|
>
|
|
159
|
-
<p class="{typography.label} transition-colors group-hover:text-
|
|
159
|
+
<p class="{typography.label} transition-colors group-hover:text-brand-primary">
|
|
160
160
|
{event.venue.name}
|
|
161
161
|
</p>
|
|
162
|
-
<p class="{typography.smMuted} transition-colors group-hover:text-
|
|
162
|
+
<p class="{typography.smMuted} transition-colors group-hover:text-brand-primary">
|
|
163
163
|
{event.venue.address || ''}
|
|
164
164
|
</p>
|
|
165
165
|
</a>
|
|
@@ -106,13 +106,13 @@ describe('ShowTimeCard Component', () => {
|
|
|
106
106
|
it('applies selected border class', () => {
|
|
107
107
|
const { container } = render(ShowTimeCard, { props: { isSelected: true } });
|
|
108
108
|
const card = container.querySelector('[role="button"]');
|
|
109
|
-
expect(card.className).toContain('border-
|
|
109
|
+
expect(card.className).toContain('border-brand-primary');
|
|
110
110
|
});
|
|
111
111
|
|
|
112
112
|
it('applies unselected border class when not selected', () => {
|
|
113
113
|
const { container } = render(ShowTimeCard, { props: { isSelected: false } });
|
|
114
114
|
const card = container.querySelector('[role="button"]');
|
|
115
|
-
expect(card.className).toContain('border-
|
|
115
|
+
expect(card.className).toContain('border-border');
|
|
116
116
|
});
|
|
117
117
|
});
|
|
118
118
|
|
|
@@ -225,7 +225,7 @@ describe('ShowTimeCard Component', () => {
|
|
|
225
225
|
it('includes dark mode background', () => {
|
|
226
226
|
const { container } = render(ShowTimeCard);
|
|
227
227
|
const card = container.querySelector('[role="button"]');
|
|
228
|
-
expect(card.className).toContain('
|
|
228
|
+
expect(card.className).toContain('');
|
|
229
229
|
});
|
|
230
230
|
|
|
231
231
|
it('applies selected text color when selected', () => {
|
|
@@ -235,7 +235,7 @@ describe('ShowTimeCard Component', () => {
|
|
|
235
235
|
// Find the date span (middle one) which gets the selected color
|
|
236
236
|
const spans = container.querySelectorAll('span');
|
|
237
237
|
const dateSpan = spans[1]; // Second span is the date
|
|
238
|
-
expect(dateSpan.className).toContain('text-
|
|
238
|
+
expect(dateSpan.className).toContain('text-brand-primary');
|
|
239
239
|
});
|
|
240
240
|
});
|
|
241
241
|
});
|
|
@@ -62,9 +62,9 @@
|
|
|
62
62
|
</script>
|
|
63
63
|
|
|
64
64
|
<div
|
|
65
|
-
class="w-full h-28 rounded-lg flex flex-col justify-center items-center gap-1.5 cursor-pointer border-2 px-1 transition-colors bg-
|
|
66
|
-
? 'border-
|
|
67
|
-
: 'border-
|
|
65
|
+
class="w-full h-28 rounded-lg flex flex-col justify-center items-center gap-1.5 cursor-pointer border-2 px-1 transition-colors bg-card {isSelected
|
|
66
|
+
? 'border-brand-primary'
|
|
67
|
+
: 'border-border hover:border-brand-primary'}"
|
|
68
68
|
onclick={handleCardClick}
|
|
69
69
|
onkeydown={handleKeydown}
|
|
70
70
|
tabindex="0"
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
aria-pressed={isSelected}
|
|
74
74
|
>
|
|
75
75
|
<span class="{typography.label} text-sm {typography.textMuted}">{day}</span>
|
|
76
|
-
<span class="{typography.label} text-base {isSelected ? 'text-
|
|
76
|
+
<span class="{typography.label} text-base {isSelected ? 'text-brand-primary' : ''}">
|
|
77
77
|
{formatDate(date)}
|
|
78
78
|
</span>
|
|
79
79
|
<span class="{typography.label} text-sm {typography.textMuted}">{formatHour(time)}</span>
|
|
@@ -84,6 +84,6 @@ describe('Heading', () => {
|
|
|
84
84
|
|
|
85
85
|
test('has dark mode text class', () => {
|
|
86
86
|
const { container } = render(Heading, { props: { children: textSnippet('T') } });
|
|
87
|
-
expect(container.querySelector('h2').className).toContain('
|
|
87
|
+
expect(container.querySelector('h2').className).toContain('');
|
|
88
88
|
});
|
|
89
89
|
});
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
|
|
39
39
|
// Background classes based on variant
|
|
40
40
|
const variantBackgrounds: Record<Variant, string> = {
|
|
41
|
-
admin: 'bg-
|
|
42
|
-
performer: 'bg-
|
|
43
|
-
public: 'bg-
|
|
44
|
-
minimal: 'bg-
|
|
41
|
+
admin: 'bg-bg-secondary',
|
|
42
|
+
performer: 'bg-bg-secondary',
|
|
43
|
+
public: 'bg-card',
|
|
44
|
+
minimal: 'bg-card',
|
|
45
45
|
};
|
|
46
46
|
|
|
47
47
|
// Sidebar width classes
|
|
@@ -55,13 +55,13 @@
|
|
|
55
55
|
{#if title}
|
|
56
56
|
<svelte:element
|
|
57
57
|
this={headingElement}
|
|
58
|
-
class="{titleSizeClasses[titleSize]} font-semibold text-
|
|
58
|
+
class="{titleSizeClasses[titleSize]} font-semibold text-text-primary"
|
|
59
59
|
>
|
|
60
60
|
{title}
|
|
61
61
|
</svelte:element>
|
|
62
62
|
{/if}
|
|
63
63
|
{#if subtitle}
|
|
64
|
-
<p class="text-sm text-
|
|
64
|
+
<p class="text-sm text-muted-foreground mt-1">
|
|
65
65
|
{subtitle}
|
|
66
66
|
</p>
|
|
67
67
|
{/if}
|
|
@@ -54,9 +54,9 @@
|
|
|
54
54
|
};
|
|
55
55
|
|
|
56
56
|
const variantClasses: Record<Variant, string> = {
|
|
57
|
-
default: 'text-
|
|
58
|
-
muted: 'text-
|
|
59
|
-
primary: 'text-primary
|
|
57
|
+
default: 'text-text-primary',
|
|
58
|
+
muted: 'text-text-secondary',
|
|
59
|
+
primary: 'text-primary',
|
|
60
60
|
};
|
|
61
61
|
|
|
62
62
|
const weightClasses: Record<string, string> = {
|
|
@@ -118,14 +118,14 @@ describe('Section Combinations', () => {
|
|
|
118
118
|
const { container } = render(Section, {
|
|
119
119
|
props: {
|
|
120
120
|
title: 'Orders',
|
|
121
|
-
titleClass: 'text-
|
|
121
|
+
titleClass: 'text-brand-primary',
|
|
122
122
|
class: 'my-section'
|
|
123
123
|
}
|
|
124
124
|
});
|
|
125
125
|
const section = container.querySelector('section');
|
|
126
126
|
const h2 = container.querySelector('h2');
|
|
127
127
|
expect(section).toHaveClass('my-section');
|
|
128
|
-
expect(h2).toHaveClass('text-
|
|
128
|
+
expect(h2).toHaveClass('text-brand-primary');
|
|
129
129
|
});
|
|
130
130
|
|
|
131
131
|
test('all props together', () => {
|
|
@@ -134,12 +134,12 @@ describe('Section Combinations', () => {
|
|
|
134
134
|
title: 'Statistics',
|
|
135
135
|
titleSize: 'lg',
|
|
136
136
|
gap: '6',
|
|
137
|
-
class: 'bg-
|
|
137
|
+
class: 'bg-card',
|
|
138
138
|
titleClass: 'font-bold'
|
|
139
139
|
}
|
|
140
140
|
});
|
|
141
141
|
const section = container.querySelector('section');
|
|
142
|
-
expect(section).toHaveClass('bg-
|
|
142
|
+
expect(section).toHaveClass('bg-card');
|
|
143
143
|
expect(section).toHaveClass('space-y-6');
|
|
144
144
|
expect(section).toHaveAttribute('aria-label', 'Statistics');
|
|
145
145
|
const h2 = container.querySelector('h2');
|
|
@@ -39,13 +39,13 @@
|
|
|
39
39
|
}: Props = $props();
|
|
40
40
|
|
|
41
41
|
const variantClasses: Record<Variant, string> = {
|
|
42
|
-
primary: 'text-
|
|
43
|
-
secondary: 'text-
|
|
44
|
-
muted: 'text-
|
|
45
|
-
error: 'text-
|
|
46
|
-
success: 'text-
|
|
47
|
-
warning: 'text-
|
|
48
|
-
info: 'text-
|
|
42
|
+
primary: 'text-text-primary',
|
|
43
|
+
secondary: 'text-muted-foreground',
|
|
44
|
+
muted: 'text-muted-foreground',
|
|
45
|
+
error: 'text-accent-danger',
|
|
46
|
+
success: 'text-accent-success',
|
|
47
|
+
warning: 'text-accent-warning',
|
|
48
|
+
info: 'text-brand-primary',
|
|
49
49
|
};
|
|
50
50
|
|
|
51
51
|
const sizeClasses: Record<Size, string> = {
|
|
@@ -23,27 +23,27 @@ describe('AppShell', () => {
|
|
|
23
23
|
it('applies admin background by default', () => {
|
|
24
24
|
const { container } = render(AppShell);
|
|
25
25
|
const shell = container.querySelector('div');
|
|
26
|
-
expect(shell?.classList.contains('bg-
|
|
26
|
+
expect(shell?.classList.contains('bg-bg-secondary')).toBe(true);
|
|
27
27
|
});
|
|
28
28
|
it('applies admin background for variant="admin"', () => {
|
|
29
29
|
const { container } = render(AppShell, { variant: 'admin' });
|
|
30
30
|
const shell = container.querySelector('div');
|
|
31
|
-
expect(shell?.classList.contains('bg-
|
|
31
|
+
expect(shell?.classList.contains('bg-bg-secondary')).toBe(true);
|
|
32
32
|
});
|
|
33
33
|
it('applies performer background for variant="performer"', () => {
|
|
34
34
|
const { container } = render(AppShell, { variant: 'performer' });
|
|
35
35
|
const shell = container.querySelector('div');
|
|
36
|
-
expect(shell?.classList.contains('bg-
|
|
36
|
+
expect(shell?.classList.contains('bg-bg-secondary')).toBe(true);
|
|
37
37
|
});
|
|
38
38
|
it('applies public background for variant="public"', () => {
|
|
39
39
|
const { container } = render(AppShell, { variant: 'public' });
|
|
40
40
|
const shell = container.querySelector('div');
|
|
41
|
-
expect(shell?.classList.contains('bg-
|
|
41
|
+
expect(shell?.classList.contains('bg-card')).toBe(true);
|
|
42
42
|
});
|
|
43
43
|
it('applies minimal background for variant="minimal"', () => {
|
|
44
44
|
const { container } = render(AppShell, { variant: 'minimal' });
|
|
45
45
|
const shell = container.querySelector('div');
|
|
46
|
-
expect(shell?.classList.contains('bg-
|
|
46
|
+
expect(shell?.classList.contains('bg-card')).toBe(true);
|
|
47
47
|
});
|
|
48
48
|
});
|
|
49
49
|
describe('fixedHeader prop', () => {
|