@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
|
@@ -162,42 +162,42 @@
|
|
|
162
162
|
|
|
163
163
|
<div class="p-6 max-w-7xl mx-auto space-y-8">
|
|
164
164
|
<div class="text-center mb-8">
|
|
165
|
-
<h1 class="text-3xl font-bold text-
|
|
166
|
-
<p class="text-
|
|
165
|
+
<h1 class="text-3xl font-bold text-text-primary mb-2">Button Audit Review</h1>
|
|
166
|
+
<p class="text-text-secondary">Last updated: December 30, 2024</p>
|
|
167
167
|
</div>
|
|
168
168
|
|
|
169
169
|
<!-- Summary Cards -->
|
|
170
170
|
<div class="grid grid-cols-3 gap-6 mb-8">
|
|
171
|
-
<div class="p-6 bg-
|
|
172
|
-
<div class="text-4xl font-bold text-
|
|
173
|
-
<div class="text-sm text-
|
|
174
|
-
<span class="inline-block mt-2 px-3 py-1 text-xs rounded-full bg-
|
|
171
|
+
<div class="p-6 bg-status-warning-bg border-2 border-status-warning-border rounded-lg text-center">
|
|
172
|
+
<div class="text-4xl font-bold text-accent-warning">{totalWithoutVariant}</div>
|
|
173
|
+
<div class="text-sm text-text-secondary mt-2">Buttons Without Variant</div>
|
|
174
|
+
<span class="inline-block mt-2 px-3 py-1 text-xs rounded-full bg-status-warning-bg text-status-warning-text">Needs Review</span>
|
|
175
175
|
</div>
|
|
176
|
-
<div class="p-6 bg-
|
|
177
|
-
<div class="text-4xl font-bold text-
|
|
178
|
-
<div class="text-sm text-
|
|
179
|
-
<span class="inline-block mt-2 px-3 py-1 text-xs rounded-full bg-
|
|
176
|
+
<div class="p-6 bg-status-success-bg border-2 border-accent-success rounded-lg text-center">
|
|
177
|
+
<div class="text-4xl font-bold text-accent-success">{recentFixes.length}</div>
|
|
178
|
+
<div class="text-sm text-text-secondary mt-2">Recent Fix Sessions</div>
|
|
179
|
+
<span class="inline-block mt-2 px-3 py-1 text-xs rounded-full bg-status-success-bg text-status-success-text">Today</span>
|
|
180
180
|
</div>
|
|
181
|
-
<div class="p-6 bg-
|
|
182
|
-
<div class="text-4xl font-bold text-
|
|
183
|
-
<div class="text-sm text-
|
|
184
|
-
<span class="inline-block mt-2 px-3 py-1 text-xs rounded-full bg-
|
|
181
|
+
<div class="p-6 bg-status-info-bg border-2 border-brand-primary rounded-lg text-center">
|
|
182
|
+
<div class="text-4xl font-bold text-brand-primary">{validVariants.length}</div>
|
|
183
|
+
<div class="text-sm text-text-secondary mt-2">Valid Variants</div>
|
|
184
|
+
<span class="inline-block mt-2 px-3 py-1 text-xs rounded-full bg-status-info-bg text-status-info-text">Reference</span>
|
|
185
185
|
</div>
|
|
186
186
|
</div>
|
|
187
187
|
|
|
188
188
|
<!-- Buttons Without Variant -->
|
|
189
|
-
<section class="border-2 border-
|
|
190
|
-
<h2 class="text-xl font-bold text-
|
|
189
|
+
<section class="border-2 border-status-warning-border rounded-lg p-6 bg-status-warning-bg">
|
|
190
|
+
<h2 class="text-xl font-bold text-status-warning-text mb-4 flex items-center gap-2">
|
|
191
191
|
<span class="text-2xl">⚠</span> Buttons Without Variant (Default to blue-solid)
|
|
192
192
|
</h2>
|
|
193
|
-
<p class="text-
|
|
194
|
-
These buttons have no <code class="bg-
|
|
193
|
+
<p class="text-text-secondary mb-4">
|
|
194
|
+
These buttons have no <code class="bg-card px-2 py-0.5 rounded text-sm">variant</code> prop and render as solid blue by default.
|
|
195
195
|
Review each to determine if blue-solid is correct or if another variant should be used.
|
|
196
196
|
</p>
|
|
197
197
|
|
|
198
|
-
<div class="overflow-x-auto bg-
|
|
198
|
+
<div class="overflow-x-auto bg-card rounded-lg">
|
|
199
199
|
<table class="w-full text-sm">
|
|
200
|
-
<thead class="bg-
|
|
200
|
+
<thead class="bg-muted">
|
|
201
201
|
<tr>
|
|
202
202
|
<th class="px-4 py-3 text-left font-medium">File</th>
|
|
203
203
|
<th class="px-4 py-3 text-center font-medium">Count</th>
|
|
@@ -207,16 +207,16 @@
|
|
|
207
207
|
</thead>
|
|
208
208
|
<tbody>
|
|
209
209
|
{#each buttonsWithoutVariant as item}
|
|
210
|
-
<tr class="border-b border-
|
|
210
|
+
<tr class="border-b border-border">
|
|
211
211
|
<td class="px-4 py-3">
|
|
212
|
-
<code class="text-xs bg-
|
|
212
|
+
<code class="text-xs bg-status-warning-bg text-status-warning-text px-2 py-1 rounded">
|
|
213
213
|
{item.file}
|
|
214
214
|
</code>
|
|
215
215
|
</td>
|
|
216
216
|
<td class="px-4 py-3 text-center font-medium">{item.count}</td>
|
|
217
|
-
<td class="px-4 py-3 text-
|
|
217
|
+
<td class="px-4 py-3 text-text-secondary">{item.context}</td>
|
|
218
218
|
<td class="px-4 py-3 text-center">
|
|
219
|
-
<span class="px-2 py-1 text-xs rounded-full bg-
|
|
219
|
+
<span class="px-2 py-1 text-xs rounded-full bg-status-warning-bg text-status-warning-text">Review</span>
|
|
220
220
|
</td>
|
|
221
221
|
</tr>
|
|
222
222
|
{/each}
|
|
@@ -224,8 +224,8 @@
|
|
|
224
224
|
</table>
|
|
225
225
|
</div>
|
|
226
226
|
|
|
227
|
-
<div class="mt-4 p-4 bg-
|
|
228
|
-
<p class="text-sm text-
|
|
227
|
+
<div class="mt-4 p-4 bg-status-warning-bg rounded-lg">
|
|
228
|
+
<p class="text-sm text-status-warning-text">
|
|
229
229
|
<strong>Total: ~{totalWithoutVariant} buttons</strong> across the codebase need variant review.
|
|
230
230
|
Many may be intentionally blue-solid (CTAs), but others may need gray-outline, menu-item, or icon variants.
|
|
231
231
|
</p>
|
|
@@ -233,48 +233,48 @@
|
|
|
233
233
|
</section>
|
|
234
234
|
|
|
235
235
|
<!-- Visual Examples: Current vs Recommended -->
|
|
236
|
-
<section class="border-2 border-
|
|
237
|
-
<h2 class="text-xl font-bold text-
|
|
236
|
+
<section class="border-2 border-accent-warning rounded-lg p-6 bg-status-warning-bg">
|
|
237
|
+
<h2 class="text-xl font-bold text-accent-warning mb-4 flex items-center gap-2">
|
|
238
238
|
<span class="text-2xl">👁</span> Visual Comparison: Current vs Recommended
|
|
239
239
|
</h2>
|
|
240
|
-
<p class="text-
|
|
240
|
+
<p class="text-text-secondary mb-6">
|
|
241
241
|
These examples show how buttons WITHOUT a variant currently render (blue-solid default) versus how they SHOULD render with the correct variant.
|
|
242
242
|
</p>
|
|
243
243
|
|
|
244
244
|
<div class="space-y-8">
|
|
245
245
|
{#each visualExamples as category}
|
|
246
|
-
<div class="bg-
|
|
246
|
+
<div class="bg-card rounded-lg p-5 border border-accent-warning">
|
|
247
247
|
<div class="flex items-center gap-3 mb-2">
|
|
248
|
-
<h3 class="font-bold text-
|
|
248
|
+
<h3 class="font-bold text-text-primary">{category.category}</h3>
|
|
249
249
|
{#if category.examples[0]?.correct}
|
|
250
|
-
<span class="px-2 py-0.5 text-xs rounded-full bg-
|
|
250
|
+
<span class="px-2 py-0.5 text-xs rounded-full bg-status-success-bg text-status-success-text">Correct</span>
|
|
251
251
|
{:else}
|
|
252
|
-
<span class="px-2 py-0.5 text-xs rounded-full bg-
|
|
252
|
+
<span class="px-2 py-0.5 text-xs rounded-full bg-status-error-bg text-status-error-text">Needs Fix</span>
|
|
253
253
|
{/if}
|
|
254
254
|
</div>
|
|
255
|
-
<p class="text-sm text-
|
|
255
|
+
<p class="text-sm text-muted-foreground mb-4">{category.description}</p>
|
|
256
256
|
|
|
257
257
|
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
|
|
258
258
|
{#each category.examples as example}
|
|
259
|
-
<div class="border border-
|
|
260
|
-
<div class="text-xs text-
|
|
259
|
+
<div class="border border-border rounded-lg p-4 bg-bg-secondary">
|
|
260
|
+
<div class="text-xs text-muted-foreground mb-3 font-mono truncate" title={example.location}>
|
|
261
261
|
{example.location}
|
|
262
262
|
</div>
|
|
263
263
|
|
|
264
264
|
<div class="space-y-3">
|
|
265
265
|
<!-- Current (no variant) -->
|
|
266
266
|
<div>
|
|
267
|
-
<div class="text-xs text-
|
|
267
|
+
<div class="text-xs text-accent-danger font-medium mb-1">Current (no variant):</div>
|
|
268
268
|
<Button size="sm">{example.label}</Button>
|
|
269
269
|
</div>
|
|
270
270
|
|
|
271
271
|
<!-- Arrow -->
|
|
272
|
-
<div class="text-center text-
|
|
272
|
+
<div class="text-center text-muted-foreground">↓</div>
|
|
273
273
|
|
|
274
274
|
<!-- Recommended -->
|
|
275
275
|
<div>
|
|
276
|
-
<div class="text-xs text-
|
|
277
|
-
Recommended: <code class="bg-
|
|
276
|
+
<div class="text-xs text-accent-success font-medium mb-1">
|
|
277
|
+
Recommended: <code class="bg-status-success-bg px-1 rounded">{example.recommended}</code>
|
|
278
278
|
</div>
|
|
279
279
|
<Button variant={example.recommended} size="sm">{example.label}</Button>
|
|
280
280
|
</div>
|
|
@@ -286,8 +286,8 @@
|
|
|
286
286
|
{/each}
|
|
287
287
|
</div>
|
|
288
288
|
|
|
289
|
-
<div class="mt-6 p-4 bg-
|
|
290
|
-
<p class="text-sm text-
|
|
289
|
+
<div class="mt-6 p-4 bg-status-warning-bg rounded-lg">
|
|
290
|
+
<p class="text-sm text-status-warning-text">
|
|
291
291
|
<strong>Key insight:</strong> Buttons without variant all render as solid blue (left), making it hard to distinguish
|
|
292
292
|
primary actions from secondary ones. Adding proper variants (right) creates visual hierarchy.
|
|
293
293
|
</p>
|
|
@@ -295,19 +295,19 @@
|
|
|
295
295
|
</section>
|
|
296
296
|
|
|
297
297
|
<!-- Recent Fixes -->
|
|
298
|
-
<section class="border-2 border-
|
|
299
|
-
<h2 class="text-xl font-bold text-
|
|
298
|
+
<section class="border-2 border-accent-success rounded-lg p-6 bg-status-success-bg">
|
|
299
|
+
<h2 class="text-xl font-bold text-status-success-text mb-4 flex items-center gap-2">
|
|
300
300
|
<span class="text-2xl">✓</span> Recent Fixes (December 30, 2024)
|
|
301
301
|
</h2>
|
|
302
302
|
|
|
303
303
|
<div class="space-y-6">
|
|
304
304
|
{#each recentFixes as fix}
|
|
305
|
-
<div class="bg-
|
|
306
|
-
<h3 class="font-semibold text-
|
|
307
|
-
<ul class="text-sm text-
|
|
305
|
+
<div class="bg-card rounded-lg p-4 border-l-4 border-accent-success">
|
|
306
|
+
<h3 class="font-semibold text-text-primary mb-2">{fix.description}</h3>
|
|
307
|
+
<ul class="text-sm text-text-secondary space-y-1">
|
|
308
308
|
{#each fix.fixes as item}
|
|
309
309
|
<li class="flex items-start gap-2">
|
|
310
|
-
<span class="text-
|
|
310
|
+
<span class="text-accent-success mt-0.5">✓</span>
|
|
311
311
|
{item}
|
|
312
312
|
</li>
|
|
313
313
|
{/each}
|
|
@@ -318,93 +318,93 @@
|
|
|
318
318
|
</section>
|
|
319
319
|
|
|
320
320
|
<!-- Valid Variants Reference -->
|
|
321
|
-
<section class="border rounded-lg p-6 bg-
|
|
322
|
-
<h2 class="text-xl font-bold text-
|
|
323
|
-
<span class="text-
|
|
321
|
+
<section class="border rounded-lg p-6 bg-card">
|
|
322
|
+
<h2 class="text-xl font-bold text-text-primary mb-4 flex items-center gap-2">
|
|
323
|
+
<span class="text-brand-primary">ℹ</span> Valid Variants Reference
|
|
324
324
|
</h2>
|
|
325
325
|
|
|
326
326
|
<div class="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4">
|
|
327
327
|
{#each validVariants as v}
|
|
328
|
-
<div class="border border-
|
|
328
|
+
<div class="border border-border rounded-lg p-4">
|
|
329
329
|
<div class="flex items-center gap-2 mb-3">
|
|
330
330
|
<Button variant={v.name} size="sm">{v.name}</Button>
|
|
331
331
|
</div>
|
|
332
|
-
<code class="text-xs bg-
|
|
332
|
+
<code class="text-xs bg-muted px-2 py-1 rounded block mb-1">
|
|
333
333
|
variant="{v.name}"
|
|
334
334
|
</code>
|
|
335
335
|
{#if v.alias}
|
|
336
|
-
<code class="text-xs bg-
|
|
336
|
+
<code class="text-xs bg-status-info-bg text-brand-primary px-2 py-1 rounded block mb-2">
|
|
337
337
|
or: "{v.alias}"
|
|
338
338
|
</code>
|
|
339
339
|
{/if}
|
|
340
|
-
<p class="text-xs text-
|
|
340
|
+
<p class="text-xs text-muted-foreground">{v.usage}</p>
|
|
341
341
|
</div>
|
|
342
342
|
{/each}
|
|
343
343
|
</div>
|
|
344
344
|
</section>
|
|
345
345
|
|
|
346
346
|
<!-- Decision Guide -->
|
|
347
|
-
<section class="border-2 border-
|
|
348
|
-
<h2 class="text-xl font-bold text-
|
|
347
|
+
<section class="border-2 border-brand-primary rounded-lg p-6 bg-status-info-bg">
|
|
348
|
+
<h2 class="text-xl font-bold text-brand-primary mb-4">Button Variant Decision Guide</h2>
|
|
349
349
|
|
|
350
350
|
<div class="grid grid-cols-2 gap-6">
|
|
351
|
-
<div class="bg-
|
|
352
|
-
<h3 class="font-semibold text-
|
|
351
|
+
<div class="bg-card rounded-lg p-4">
|
|
352
|
+
<h3 class="font-semibold text-text-primary mb-3">When to use each variant</h3>
|
|
353
353
|
<ul class="space-y-2 text-sm">
|
|
354
354
|
<li class="flex items-start gap-2">
|
|
355
|
-
<code class="bg-
|
|
356
|
-
<span class="text-
|
|
355
|
+
<code class="bg-status-info-bg text-status-info-text px-1 rounded text-xs shrink-0">default</code>
|
|
356
|
+
<span class="text-text-secondary">Primary CTAs: Save, Submit, + New</span>
|
|
357
357
|
</li>
|
|
358
358
|
<li class="flex items-start gap-2">
|
|
359
|
-
<code class="bg-
|
|
360
|
-
<span class="text-
|
|
359
|
+
<code class="bg-status-info-bg text-status-info-text px-1 rounded text-xs shrink-0">outline</code>
|
|
360
|
+
<span class="text-text-secondary">Secondary CTAs: Invite, Export</span>
|
|
361
361
|
</li>
|
|
362
362
|
<li class="flex items-start gap-2">
|
|
363
|
-
<code class="bg-
|
|
364
|
-
<span class="text-
|
|
363
|
+
<code class="bg-muted text-text-primary px-1 rounded text-xs shrink-0">alternative</code>
|
|
364
|
+
<span class="text-text-secondary">Cancel, Close, Filter, Actions triggers</span>
|
|
365
365
|
</li>
|
|
366
366
|
<li class="flex items-start gap-2">
|
|
367
|
-
<code class="bg-
|
|
368
|
-
<span class="text-
|
|
367
|
+
<code class="bg-status-error-bg text-status-error-text px-1 rounded text-xs shrink-0">red</code>
|
|
368
|
+
<span class="text-text-secondary">Delete confirmations, destructive actions</span>
|
|
369
369
|
</li>
|
|
370
370
|
<li class="flex items-start gap-2">
|
|
371
|
-
<code class="bg-
|
|
372
|
-
<span class="text-
|
|
371
|
+
<code class="bg-muted text-text-primary px-1 rounded text-xs shrink-0">ghost</code>
|
|
372
|
+
<span class="text-text-secondary">Tertiary actions: Edit, View, Show more</span>
|
|
373
373
|
</li>
|
|
374
374
|
<li class="flex items-start gap-2">
|
|
375
|
-
<code class="bg-
|
|
376
|
-
<span class="text-
|
|
375
|
+
<code class="bg-muted text-text-primary px-1 rounded text-xs shrink-0">menu-item</code>
|
|
376
|
+
<span class="text-text-secondary">Dropdown items, list selections</span>
|
|
377
377
|
</li>
|
|
378
378
|
<li class="flex items-start gap-2">
|
|
379
|
-
<code class="bg-
|
|
380
|
-
<span class="text-
|
|
379
|
+
<code class="bg-muted text-text-primary px-1 rounded text-xs shrink-0">icon</code>
|
|
380
|
+
<span class="text-text-secondary">Close buttons, drag handles</span>
|
|
381
381
|
</li>
|
|
382
382
|
</ul>
|
|
383
383
|
</div>
|
|
384
384
|
|
|
385
|
-
<div class="bg-
|
|
386
|
-
<h3 class="font-semibold text-
|
|
387
|
-
<ul class="space-y-2 text-sm text-
|
|
385
|
+
<div class="bg-card rounded-lg p-4">
|
|
386
|
+
<h3 class="font-semibold text-text-primary mb-3">Common mistakes</h3>
|
|
387
|
+
<ul class="space-y-2 text-sm text-text-secondary">
|
|
388
388
|
<li class="flex items-start gap-2">
|
|
389
|
-
<span class="text-
|
|
389
|
+
<span class="text-accent-danger">✗</span>
|
|
390
390
|
<span>No variant on dropdown items → defaults to solid blue</span>
|
|
391
391
|
</li>
|
|
392
392
|
<li class="flex items-start gap-2">
|
|
393
|
-
<span class="text-
|
|
393
|
+
<span class="text-accent-danger">✗</span>
|
|
394
394
|
<span>No variant on Cancel → should be alternative</span>
|
|
395
395
|
</li>
|
|
396
396
|
<li class="flex items-start gap-2">
|
|
397
|
-
<span class="text-
|
|
397
|
+
<span class="text-accent-danger">✗</span>
|
|
398
398
|
<span>No variant on close/X buttons → should be icon</span>
|
|
399
399
|
</li>
|
|
400
400
|
<li class="flex items-start gap-2">
|
|
401
|
-
<span class="text-
|
|
401
|
+
<span class="text-accent-danger">✗</span>
|
|
402
402
|
<span>Invalid variant names fall back to default (solid blue)</span>
|
|
403
403
|
</li>
|
|
404
404
|
</ul>
|
|
405
405
|
|
|
406
|
-
<div class="mt-4 p-3 bg-
|
|
407
|
-
<p class="text-xs text-
|
|
406
|
+
<div class="mt-4 p-3 bg-status-info-bg rounded-lg">
|
|
407
|
+
<p class="text-xs text-status-info-text">
|
|
408
408
|
<strong>Tip:</strong> When in doubt, use alternative for secondary actions
|
|
409
409
|
and default only for the primary action.
|
|
410
410
|
</p>
|
|
@@ -414,12 +414,12 @@
|
|
|
414
414
|
</section>
|
|
415
415
|
|
|
416
416
|
<!-- How to Find Issues -->
|
|
417
|
-
<section class="border rounded-lg p-6 bg-
|
|
418
|
-
<h2 class="text-xl font-bold text-
|
|
417
|
+
<section class="border rounded-lg p-6 bg-bg-secondary">
|
|
418
|
+
<h2 class="text-xl font-bold text-text-primary mb-4">How to Find Buttons Without Variant</h2>
|
|
419
419
|
|
|
420
|
-
<div class="bg-
|
|
421
|
-
<p class="text-sm text-
|
|
422
|
-
<code class="block bg-
|
|
420
|
+
<div class="bg-card rounded-lg p-4">
|
|
421
|
+
<p class="text-sm text-text-secondary mb-2">Run this command in micdrop-frontend:</p>
|
|
422
|
+
<code class="block bg-bg-primary text-accent-success p-3 rounded text-xs overflow-x-auto">
|
|
423
423
|
grep -rn "<Button" --include="*.svelte" src | grep -v "variant="
|
|
424
424
|
</code>
|
|
425
425
|
</div>
|
|
@@ -155,7 +155,7 @@ describe('ButtonGridView Component', () => {
|
|
|
155
155
|
it('renders all buttons from manifest', () => {
|
|
156
156
|
const { container } = render(ButtonGridView);
|
|
157
157
|
// Each button is in a card with specific structure
|
|
158
|
-
const buttonCards = container.querySelectorAll('.bg-
|
|
158
|
+
const buttonCards = container.querySelectorAll('.bg-card.rounded-lg.p-3');
|
|
159
159
|
expect(buttonCards.length).toBe(10);
|
|
160
160
|
});
|
|
161
161
|
|
|
@@ -213,7 +213,7 @@ describe('ButtonGridView Component', () => {
|
|
|
213
213
|
await fireEvent.click(toggleButton);
|
|
214
214
|
|
|
215
215
|
const darkButton = screen.getByRole('button', { name: /🌙/i });
|
|
216
|
-
expect(darkButton).toHaveClass('bg-
|
|
216
|
+
expect(darkButton).toHaveClass('bg-bg-secondary', 'text-white');
|
|
217
217
|
});
|
|
218
218
|
});
|
|
219
219
|
|
|
@@ -230,7 +230,7 @@ describe('ButtonGridView Component', () => {
|
|
|
230
230
|
|
|
231
231
|
await fireEvent.input(searchInput, { target: { value: 'Green' } });
|
|
232
232
|
|
|
233
|
-
const buttonCards = container.querySelectorAll('.bg-
|
|
233
|
+
const buttonCards = container.querySelectorAll('.bg-card.rounded-lg.p-3');
|
|
234
234
|
expect(buttonCards.length).toBe(1);
|
|
235
235
|
});
|
|
236
236
|
|
|
@@ -240,7 +240,7 @@ describe('ButtonGridView Component', () => {
|
|
|
240
240
|
|
|
241
241
|
await fireEvent.input(searchInput, { target: { value: 'AnotherComponent' } });
|
|
242
242
|
|
|
243
|
-
const buttonCards = container.querySelectorAll('.bg-
|
|
243
|
+
const buttonCards = container.querySelectorAll('.bg-card.rounded-lg.p-3');
|
|
244
244
|
expect(buttonCards.length).toBe(5);
|
|
245
245
|
});
|
|
246
246
|
|
|
@@ -250,7 +250,7 @@ describe('ButtonGridView Component', () => {
|
|
|
250
250
|
|
|
251
251
|
await fireEvent.input(searchInput, { target: { value: 'ghost' } });
|
|
252
252
|
|
|
253
|
-
const buttonCards = container.querySelectorAll('.bg-
|
|
253
|
+
const buttonCards = container.querySelectorAll('.bg-card.rounded-lg.p-3');
|
|
254
254
|
expect(buttonCards.length).toBe(1);
|
|
255
255
|
});
|
|
256
256
|
|
|
@@ -260,7 +260,7 @@ describe('ButtonGridView Component', () => {
|
|
|
260
260
|
|
|
261
261
|
await fireEvent.input(searchInput, { target: { value: 'GREEN' } });
|
|
262
262
|
|
|
263
|
-
const buttonCards = container.querySelectorAll('.bg-
|
|
263
|
+
const buttonCards = container.querySelectorAll('.bg-card.rounded-lg.p-3');
|
|
264
264
|
expect(buttonCards.length).toBe(1);
|
|
265
265
|
});
|
|
266
266
|
|
|
@@ -280,7 +280,7 @@ describe('ButtonGridView Component', () => {
|
|
|
280
280
|
await fireEvent.input(searchInput, { target: { value: 'Green' } });
|
|
281
281
|
await fireEvent.input(searchInput, { target: { value: '' } });
|
|
282
282
|
|
|
283
|
-
const buttonCards = container.querySelectorAll('.bg-
|
|
283
|
+
const buttonCards = container.querySelectorAll('.bg-card.rounded-lg.p-3');
|
|
284
284
|
expect(buttonCards.length).toBe(10);
|
|
285
285
|
});
|
|
286
286
|
});
|
|
@@ -309,7 +309,7 @@ describe('ButtonGridView Component', () => {
|
|
|
309
309
|
|
|
310
310
|
await fireEvent.change(variantSelect, { target: { value: 'blue-solid' } });
|
|
311
311
|
|
|
312
|
-
const buttonCards = container.querySelectorAll('.bg-
|
|
312
|
+
const buttonCards = container.querySelectorAll('.bg-card.rounded-lg.p-3');
|
|
313
313
|
expect(buttonCards.length).toBe(2);
|
|
314
314
|
});
|
|
315
315
|
|
|
@@ -348,7 +348,7 @@ describe('ButtonGridView Component', () => {
|
|
|
348
348
|
|
|
349
349
|
await fireEvent.change(sizeSelect, { target: { value: 'xs' } });
|
|
350
350
|
|
|
351
|
-
const buttonCards = container.querySelectorAll('.bg-
|
|
351
|
+
const buttonCards = container.querySelectorAll('.bg-card.rounded-lg.p-3');
|
|
352
352
|
expect(buttonCards.length).toBe(2);
|
|
353
353
|
});
|
|
354
354
|
|
|
@@ -373,7 +373,7 @@ describe('ButtonGridView Component', () => {
|
|
|
373
373
|
await fireEvent.change(variantSelect, { target: { value: 'blue-solid' } });
|
|
374
374
|
await fireEvent.change(sizeSelect, { target: { value: 'md' } });
|
|
375
375
|
|
|
376
|
-
const buttonCards = container.querySelectorAll('.bg-
|
|
376
|
+
const buttonCards = container.querySelectorAll('.bg-card.rounded-lg.p-3');
|
|
377
377
|
expect(buttonCards.length).toBe(2);
|
|
378
378
|
});
|
|
379
379
|
|
|
@@ -385,7 +385,7 @@ describe('ButtonGridView Component', () => {
|
|
|
385
385
|
await fireEvent.input(searchInput, { target: { value: 'Button' } });
|
|
386
386
|
await fireEvent.change(variantSelect, { target: { value: 'red-solid' } });
|
|
387
387
|
|
|
388
|
-
const buttonCards = container.querySelectorAll('.bg-
|
|
388
|
+
const buttonCards = container.querySelectorAll('.bg-card.rounded-lg.p-3');
|
|
389
389
|
expect(buttonCards.length).toBe(1);
|
|
390
390
|
});
|
|
391
391
|
|
|
@@ -400,7 +400,7 @@ describe('ButtonGridView Component', () => {
|
|
|
400
400
|
await fireEvent.change(variantSelect, { target: { value: 'blue-solid' } });
|
|
401
401
|
await fireEvent.change(sizeSelect, { target: { value: 'md' } });
|
|
402
402
|
|
|
403
|
-
const buttonCards = container.querySelectorAll('.bg-
|
|
403
|
+
const buttonCards = container.querySelectorAll('.bg-card.rounded-lg.p-3');
|
|
404
404
|
expect(buttonCards.length).toBe(1);
|
|
405
405
|
});
|
|
406
406
|
});
|
|
@@ -418,7 +418,7 @@ describe('ButtonGridView Component', () => {
|
|
|
418
418
|
const { container } = render(ButtonGridView);
|
|
419
419
|
|
|
420
420
|
// Check that size badges exist in the metadata sections
|
|
421
|
-
const sizeBadges = container.querySelectorAll('.px-1\\.5.py-0\\.5.rounded.bg-
|
|
421
|
+
const sizeBadges = container.querySelectorAll('.px-1\\.5.py-0\\.5.rounded.bg-muted');
|
|
422
422
|
expect(sizeBadges.length).toBeGreaterThan(0);
|
|
423
423
|
|
|
424
424
|
// Check for specific size values
|
|
@@ -455,7 +455,7 @@ describe('ButtonGridView Component', () => {
|
|
|
455
455
|
const { container } = render(ButtonGridView);
|
|
456
456
|
|
|
457
457
|
// Should render all button cards including those with (no text)
|
|
458
|
-
const buttonCards = container.querySelectorAll('.bg-
|
|
458
|
+
const buttonCards = container.querySelectorAll('.bg-card.rounded-lg.p-3');
|
|
459
459
|
expect(buttonCards.length).toBe(10);
|
|
460
460
|
|
|
461
461
|
// Check that we have actual button elements inside
|
|
@@ -507,7 +507,7 @@ describe('ButtonGridView Component', () => {
|
|
|
507
507
|
const blueSolidBadge = Array.from(container.querySelectorAll('.px-1\\.5.py-0\\.5.rounded'))
|
|
508
508
|
.find(el => el.textContent === 'blue-solid');
|
|
509
509
|
|
|
510
|
-
expect(blueSolidBadge).toHaveClass('bg-
|
|
510
|
+
expect(blueSolidBadge).toHaveClass('bg-status-info-bg', 'text-brand-primary');
|
|
511
511
|
});
|
|
512
512
|
|
|
513
513
|
it('applies correct color for gray-outline variant', () => {
|
|
@@ -515,7 +515,7 @@ describe('ButtonGridView Component', () => {
|
|
|
515
515
|
const grayOutlineBadge = Array.from(container.querySelectorAll('.px-1\\.5.py-0\\.5.rounded'))
|
|
516
516
|
.find(el => el.textContent === 'gray-outline');
|
|
517
517
|
|
|
518
|
-
expect(grayOutlineBadge).toHaveClass('bg-
|
|
518
|
+
expect(grayOutlineBadge).toHaveClass('bg-muted', 'text-text-secondary');
|
|
519
519
|
});
|
|
520
520
|
|
|
521
521
|
it('applies correct color for red-solid variant', () => {
|
|
@@ -523,7 +523,7 @@ describe('ButtonGridView Component', () => {
|
|
|
523
523
|
const redSolidBadge = Array.from(container.querySelectorAll('.px-1\\.5.py-0\\.5.rounded'))
|
|
524
524
|
.find(el => el.textContent === 'red-solid');
|
|
525
525
|
|
|
526
|
-
expect(redSolidBadge).toHaveClass('bg-
|
|
526
|
+
expect(redSolidBadge).toHaveClass('bg-status-error-bg', 'text-status-error-text');
|
|
527
527
|
});
|
|
528
528
|
|
|
529
529
|
it('applies correct color for green-solid variant', () => {
|
|
@@ -531,7 +531,7 @@ describe('ButtonGridView Component', () => {
|
|
|
531
531
|
const greenSolidBadge = Array.from(container.querySelectorAll('.px-1\\.5.py-0\\.5.rounded'))
|
|
532
532
|
.find(el => el.textContent === 'green-solid');
|
|
533
533
|
|
|
534
|
-
expect(greenSolidBadge).toHaveClass('bg-
|
|
534
|
+
expect(greenSolidBadge).toHaveClass('bg-status-success-bg', 'text-status-success-text');
|
|
535
535
|
});
|
|
536
536
|
|
|
537
537
|
it('applies correct color for icon variant', () => {
|
|
@@ -539,7 +539,7 @@ describe('ButtonGridView Component', () => {
|
|
|
539
539
|
const iconBadge = Array.from(container.querySelectorAll('.px-1\\.5.py-0\\.5.rounded'))
|
|
540
540
|
.find(el => el.textContent === 'icon');
|
|
541
541
|
|
|
542
|
-
expect(iconBadge).toHaveClass('bg-
|
|
542
|
+
expect(iconBadge).toHaveClass('bg-status-info-bg', 'text-brand-primary');
|
|
543
543
|
});
|
|
544
544
|
|
|
545
545
|
it('applies correct color for ghost variant', () => {
|
|
@@ -547,7 +547,7 @@ describe('ButtonGridView Component', () => {
|
|
|
547
547
|
const ghostBadge = Array.from(container.querySelectorAll('.px-1\\.5.py-0\\.5.rounded'))
|
|
548
548
|
.find(el => el.textContent === 'ghost');
|
|
549
549
|
|
|
550
|
-
expect(ghostBadge).toHaveClass('bg-
|
|
550
|
+
expect(ghostBadge).toHaveClass('bg-status-warning-bg', 'text-status-warning-text');
|
|
551
551
|
});
|
|
552
552
|
});
|
|
553
553
|
|
|
@@ -593,12 +593,12 @@ describe('ButtonGridView Component', () => {
|
|
|
593
593
|
);
|
|
594
594
|
});
|
|
595
595
|
|
|
596
|
-
it('applies
|
|
596
|
+
it('applies token-based classes for theming throughout', () => {
|
|
597
597
|
const { container } = render(ButtonGridView);
|
|
598
598
|
|
|
599
|
-
// Check various elements have dark mode
|
|
600
|
-
const
|
|
601
|
-
expect(
|
|
599
|
+
// Check various elements have token-based classes (dark mode via CSS custom properties)
|
|
600
|
+
const tokenElements = container.querySelectorAll('[class*="bg-card"], [class*="text-text-primary"]');
|
|
601
|
+
expect(tokenElements.length).toBeGreaterThan(0);
|
|
602
602
|
});
|
|
603
603
|
});
|
|
604
604
|
|
|
@@ -610,7 +610,7 @@ describe('ButtonGridView Component', () => {
|
|
|
610
610
|
await fireEvent.input(searchInput, { target: { value: 'nonexistent' } });
|
|
611
611
|
|
|
612
612
|
expect(screen.getByText(/Showing 0 of 10 buttons/i)).toBeInTheDocument();
|
|
613
|
-
const buttonCards = container.querySelectorAll('.bg-
|
|
613
|
+
const buttonCards = container.querySelectorAll('.bg-card.rounded-lg.p-3');
|
|
614
614
|
expect(buttonCards.length).toBe(0);
|
|
615
615
|
});
|
|
616
616
|
|
|
@@ -631,7 +631,7 @@ describe('ButtonGridView Component', () => {
|
|
|
631
631
|
await fireEvent.change(variantSelect, { target: { value: 'all' } });
|
|
632
632
|
await fireEvent.change(sizeSelect, { target: { value: 'all' } });
|
|
633
633
|
|
|
634
|
-
const buttonCards = container.querySelectorAll('.bg-
|
|
634
|
+
const buttonCards = container.querySelectorAll('.bg-card.rounded-lg.p-3');
|
|
635
635
|
expect(buttonCards.length).toBe(10);
|
|
636
636
|
});
|
|
637
637
|
});
|
|
@@ -641,7 +641,7 @@ describe('ButtonGridView Component', () => {
|
|
|
641
641
|
const { container } = render(ButtonGridView);
|
|
642
642
|
|
|
643
643
|
// Should have 10 buttons total from 2 routes
|
|
644
|
-
const buttonCards = container.querySelectorAll('.bg-
|
|
644
|
+
const buttonCards = container.querySelectorAll('.bg-card.rounded-lg.p-3');
|
|
645
645
|
expect(buttonCards.length).toBe(10);
|
|
646
646
|
});
|
|
647
647
|
|