@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
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
<div class="max-w-md space-y-6">
|
|
84
84
|
<div>
|
|
85
85
|
<h3 class="text-lg font-semibold mb-2">Enter Verification Code</h3>
|
|
86
|
-
<p class="text-sm text-
|
|
86
|
+
<p class="text-sm text-muted-foreground mb-4">
|
|
87
87
|
Enter the 6-digit code sent to your phone
|
|
88
88
|
</p>
|
|
89
89
|
<OTPInput
|
|
@@ -95,8 +95,8 @@
|
|
|
95
95
|
</div>
|
|
96
96
|
|
|
97
97
|
{#if completedCode}
|
|
98
|
-
<div class="p-4 bg-
|
|
99
|
-
<p class="text-sm font-medium text-
|
|
98
|
+
<div class="p-4 bg-status-success-bg border border-status-success-border rounded">
|
|
99
|
+
<p class="text-sm font-medium text-status-success-text">
|
|
100
100
|
Code entered: {completedCode}
|
|
101
101
|
</p>
|
|
102
102
|
</div>
|
|
@@ -104,13 +104,13 @@
|
|
|
104
104
|
|
|
105
105
|
<div class="flex gap-2">
|
|
106
106
|
<button
|
|
107
|
-
class="px-4 py-2 bg-
|
|
107
|
+
class="px-4 py-2 bg-brand-primary text-white rounded hover:bg-primary"
|
|
108
108
|
onclick={() => otpRef?.focus()}
|
|
109
109
|
>
|
|
110
110
|
Focus First Input
|
|
111
111
|
</button>
|
|
112
112
|
<button
|
|
113
|
-
class="px-4 py-2 bg-
|
|
113
|
+
class="px-4 py-2 bg-muted-foreground text-white rounded hover:bg-bg-tertiary"
|
|
114
114
|
onclick={() => {
|
|
115
115
|
otpRef?.clear();
|
|
116
116
|
completedCode = '';
|
|
@@ -123,10 +123,10 @@
|
|
|
123
123
|
</Story>
|
|
124
124
|
|
|
125
125
|
<Story name="Verification Flow">
|
|
126
|
-
<div class="max-w-md mx-auto p-6 bg-
|
|
126
|
+
<div class="max-w-md mx-auto p-6 bg-card rounded-lg shadow-lg">
|
|
127
127
|
<div class="text-center mb-6">
|
|
128
128
|
<h2 class="text-2xl font-bold mb-2">Verify Your Phone</h2>
|
|
129
|
-
<p class="text-
|
|
129
|
+
<p class="text-muted-foreground">
|
|
130
130
|
We've sent a 4-digit code to<br />
|
|
131
131
|
<span class="font-medium">+1 (555) 123-4567</span>
|
|
132
132
|
</p>
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
/>
|
|
141
141
|
</div>
|
|
142
142
|
|
|
143
|
-
<p class="text-center text-sm text-
|
|
143
|
+
<p class="text-center text-sm text-muted-foreground">
|
|
144
144
|
Didn't receive a code?
|
|
145
145
|
<button class="text-primary hover:underline">Resend</button>
|
|
146
146
|
</p>
|
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
|
|
150
150
|
<Story name="With Auto-Submit">
|
|
151
151
|
<div class="max-w-md">
|
|
152
|
-
<p class="text-sm text-
|
|
152
|
+
<p class="text-sm text-muted-foreground mb-4">
|
|
153
153
|
Code will auto-submit when all digits are entered
|
|
154
154
|
</p>
|
|
155
155
|
<OTPInput
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
{disabled}
|
|
120
120
|
aria-label={labels.digitLabel(index, length)}
|
|
121
121
|
aria-describedby="otp-instructions"
|
|
122
|
-
class="h-12 w-12 border-2 border-
|
|
122
|
+
class="h-12 w-12 border-2 border-stroke-primary bg-bg-secondary p-0 text-center text-xl font-semibold leading-none text-text-primary transition-colors focus:border-interactive-border focus:outline-hidden focus:ring-focus-ring disabled:cursor-not-allowed disabled:bg-bg-tertiary:bg-bg-tertiary md:h-14 md:w-14 md:text-2xl rounded-lg"
|
|
123
123
|
oninput={(e) => handleInput(index, e)}
|
|
124
124
|
onkeydown={(e) => handleKeyDown(index, e)}
|
|
125
125
|
onpaste={handlePaste}
|
|
@@ -59,7 +59,7 @@ describe('PasswordInput Required Field', () => {
|
|
|
59
59
|
});
|
|
60
60
|
const asterisk = screen.getByText('*');
|
|
61
61
|
expect(asterisk).toBeInTheDocument();
|
|
62
|
-
expect(asterisk).toHaveClass('text-
|
|
62
|
+
expect(asterisk).toHaveClass('text-accent-danger');
|
|
63
63
|
});
|
|
64
64
|
|
|
65
65
|
test('does not show asterisk when required is false', () => {
|
|
@@ -69,7 +69,7 @@ describe('PasswordInput Required Field', () => {
|
|
|
69
69
|
required: false
|
|
70
70
|
}
|
|
71
71
|
});
|
|
72
|
-
const asterisk = container.querySelector('.text-
|
|
72
|
+
const asterisk = container.querySelector('.text-accent-danger');
|
|
73
73
|
expect(asterisk).not.toBeInTheDocument();
|
|
74
74
|
});
|
|
75
75
|
|
|
@@ -55,7 +55,7 @@ describe('PasswordStrengthIndicator Component - Strength Calculation', () => {
|
|
|
55
55
|
props: { password: 'VeryStrongPass123!' }
|
|
56
56
|
});
|
|
57
57
|
expect(container.querySelector('.pt-2.space-y-2')).toBeInTheDocument();
|
|
58
|
-
const greenBars = container.querySelectorAll('.bg-
|
|
58
|
+
const greenBars = container.querySelectorAll('.bg-accent-success');
|
|
59
59
|
expect(greenBars.length).toBeGreaterThan(0);
|
|
60
60
|
});
|
|
61
61
|
|
|
@@ -72,7 +72,7 @@ describe('PasswordStrengthIndicator Component - Visual Indicators', () => {
|
|
|
72
72
|
const { container } = render(TestWrapper, {
|
|
73
73
|
props: { password: 'ab' }
|
|
74
74
|
});
|
|
75
|
-
const filledBars = container.querySelectorAll('.bg-
|
|
75
|
+
const filledBars = container.querySelectorAll('.bg-accent-danger');
|
|
76
76
|
expect(filledBars.length).toBeGreaterThanOrEqual(1);
|
|
77
77
|
});
|
|
78
78
|
|
|
@@ -98,7 +98,7 @@ describe('PasswordStrengthIndicator Component - Visual Indicators', () => {
|
|
|
98
98
|
});
|
|
99
99
|
const indicator = container.querySelector('.pt-2.space-y-2');
|
|
100
100
|
expect(indicator).toBeInTheDocument();
|
|
101
|
-
const greenBars = container.querySelectorAll('.bg-
|
|
101
|
+
const greenBars = container.querySelectorAll('.bg-accent-success');
|
|
102
102
|
expect(greenBars.length).toBe(3);
|
|
103
103
|
});
|
|
104
104
|
|
|
@@ -106,7 +106,7 @@ describe('PasswordStrengthIndicator Component - Visual Indicators', () => {
|
|
|
106
106
|
const { container } = render(TestWrapper, {
|
|
107
107
|
props: { password: 'ab' }
|
|
108
108
|
});
|
|
109
|
-
const grayBars = container.querySelectorAll('.bg-
|
|
109
|
+
const grayBars = container.querySelectorAll('.bg-bg-tertiary');
|
|
110
110
|
expect(grayBars.length).toBeGreaterThan(0);
|
|
111
111
|
});
|
|
112
112
|
|
|
@@ -132,7 +132,7 @@ describe('PasswordStrengthIndicator Component - Color Coding', () => {
|
|
|
132
132
|
const { container } = render(TestWrapper, {
|
|
133
133
|
props: { password: 'ab' }
|
|
134
134
|
});
|
|
135
|
-
const redBars = container.querySelectorAll('.bg-
|
|
135
|
+
const redBars = container.querySelectorAll('.bg-accent-danger');
|
|
136
136
|
expect(redBars.length).toBeGreaterThan(0);
|
|
137
137
|
});
|
|
138
138
|
|
|
@@ -141,7 +141,7 @@ describe('PasswordStrengthIndicator Component - Color Coding', () => {
|
|
|
141
141
|
props: { password: 'test12' }
|
|
142
142
|
});
|
|
143
143
|
expect(container.querySelector('.pt-2.space-y-2')).toBeInTheDocument();
|
|
144
|
-
const redBars = container.querySelectorAll('.bg-
|
|
144
|
+
const redBars = container.querySelectorAll('.bg-accent-danger');
|
|
145
145
|
expect(redBars.length).toBeGreaterThan(0);
|
|
146
146
|
});
|
|
147
147
|
|
|
@@ -150,7 +150,7 @@ describe('PasswordStrengthIndicator Component - Color Coding', () => {
|
|
|
150
150
|
props: { password: 'Test1234' }
|
|
151
151
|
});
|
|
152
152
|
expect(container.querySelector('.pt-2.space-y-2')).toBeInTheDocument();
|
|
153
|
-
const greenBars = container.querySelectorAll('.bg-
|
|
153
|
+
const greenBars = container.querySelectorAll('.bg-accent-success');
|
|
154
154
|
expect(greenBars.length).toBeGreaterThan(0);
|
|
155
155
|
});
|
|
156
156
|
|
|
@@ -158,7 +158,7 @@ describe('PasswordStrengthIndicator Component - Color Coding', () => {
|
|
|
158
158
|
const { container } = render(TestWrapper, {
|
|
159
159
|
props: { password: 'VeryStrongPass123!' }
|
|
160
160
|
});
|
|
161
|
-
const greenBars = container.querySelectorAll('.bg-
|
|
161
|
+
const greenBars = container.querySelectorAll('.bg-accent-success');
|
|
162
162
|
expect(greenBars.length).toBeGreaterThan(0);
|
|
163
163
|
});
|
|
164
164
|
});
|
|
@@ -179,7 +179,7 @@ describe('PasswordStrengthIndicator Component - Edge Cases', () => {
|
|
|
179
179
|
props: { password: longPassword }
|
|
180
180
|
});
|
|
181
181
|
expect(container.querySelector('.pt-2.space-y-2')).toBeInTheDocument();
|
|
182
|
-
const greenBars = container.querySelectorAll('.bg-
|
|
182
|
+
const greenBars = container.querySelectorAll('.bg-accent-success');
|
|
183
183
|
expect(greenBars.length).toBe(3);
|
|
184
184
|
});
|
|
185
185
|
|
|
@@ -195,7 +195,7 @@ describe('PasswordStrengthIndicator Component - Edge Cases', () => {
|
|
|
195
195
|
props: { password: 'TestPass12345' }
|
|
196
196
|
});
|
|
197
197
|
expect(container.querySelector('.pt-2.space-y-2')).toBeInTheDocument();
|
|
198
|
-
const greenBars = container.querySelectorAll('.bg-
|
|
198
|
+
const greenBars = container.querySelectorAll('.bg-accent-success');
|
|
199
199
|
expect(greenBars.length).toBe(3);
|
|
200
200
|
});
|
|
201
201
|
|
|
@@ -214,12 +214,12 @@ describe('PasswordStrengthIndicator Component - Edge Cases', () => {
|
|
|
214
214
|
});
|
|
215
215
|
});
|
|
216
216
|
|
|
217
|
-
describe('PasswordStrengthIndicator Component -
|
|
218
|
-
test('unfilled bars have
|
|
217
|
+
describe('PasswordStrengthIndicator Component - Token-Based Styling', () => {
|
|
218
|
+
test('unfilled bars have token-based background class', () => {
|
|
219
219
|
const { container } = render(TestWrapper, {
|
|
220
220
|
props: { password: 'abc' }
|
|
221
221
|
});
|
|
222
|
-
const bars = container.querySelectorAll('.
|
|
222
|
+
const bars = container.querySelectorAll('.bg-bg-tertiary');
|
|
223
223
|
expect(bars.length).toBeGreaterThan(0);
|
|
224
224
|
});
|
|
225
225
|
});
|
|
@@ -232,7 +232,7 @@ describe('PasswordStrengthIndicator Component - Bar Filling', () => {
|
|
|
232
232
|
const allBars = container.querySelectorAll('.h-1.flex-1.rounded-full');
|
|
233
233
|
expect(allBars).toHaveLength(3);
|
|
234
234
|
|
|
235
|
-
const filledBars = container.querySelectorAll('.bg-
|
|
235
|
+
const filledBars = container.querySelectorAll('.bg-accent-danger, .bg-accent-success');
|
|
236
236
|
expect(filledBars.length).toBeGreaterThan(0);
|
|
237
237
|
});
|
|
238
238
|
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
computedScore === 3 ? labels.strong : ""
|
|
100
100
|
);
|
|
101
101
|
|
|
102
|
-
let computedTextColor = $derived(computedScore <= 1 ? "text-
|
|
102
|
+
let computedTextColor = $derived(computedScore <= 1 ? "text-accent-danger" : "text-accent-success");
|
|
103
103
|
|
|
104
104
|
$effect(() => {
|
|
105
105
|
const newText = computedStrengthText;
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
}
|
|
109
109
|
});
|
|
110
110
|
|
|
111
|
-
let strengthColor = $derived(computedScore <= 1 ? "bg-
|
|
111
|
+
let strengthColor = $derived(computedScore <= 1 ? "bg-accent-danger" : "bg-accent-success");
|
|
112
112
|
|
|
113
113
|
$effect(() => {
|
|
114
114
|
const newColor = computedTextColor;
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
class="h-1 flex-1 rounded-full transition-colors duration-300 {barIndex <
|
|
134
134
|
filledBars
|
|
135
135
|
? strengthColor
|
|
136
|
-
: 'bg-
|
|
136
|
+
: 'bg-bg-tertiary'}"
|
|
137
137
|
></div>
|
|
138
138
|
{/each}
|
|
139
139
|
</div>
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
// Compute score based on password length and strength
|
|
48
48
|
let score = $derived(password.length > 12 ? 3 : (strength?.id ?? -1));
|
|
49
49
|
|
|
50
|
-
let strengthColor = $derived(score <= 1 ? "bg-
|
|
50
|
+
let strengthColor = $derived(score <= 1 ? "bg-accent-danger" : "bg-accent-success");
|
|
51
51
|
|
|
52
52
|
// Calculate how many bars to fill (1-3)
|
|
53
53
|
let filledBars = $derived(score === 0 ? 1 : score === 1 ? 2 : score >= 2 ? 3 : 0);
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
class="h-1 flex-1 rounded-full transition-colors duration-300 {barIndex <
|
|
63
63
|
filledBars
|
|
64
64
|
? strengthColor
|
|
65
|
-
: 'bg-
|
|
65
|
+
: 'bg-bg-tertiary'}"
|
|
66
66
|
></div>
|
|
67
67
|
{/each}
|
|
68
68
|
</div>
|
|
@@ -186,10 +186,10 @@
|
|
|
186
186
|
{#if label}
|
|
187
187
|
<div class="flex justify-start items-center gap-1">
|
|
188
188
|
<label for={id} class={`${typography.label} leading-tight sm:leading-none`}>
|
|
189
|
-
{label}{#if required}<span class="text-
|
|
189
|
+
{label}{#if required}<span class="text-accent-danger font-medium text-sm ml-0.5">*</span>{/if}
|
|
190
190
|
</label>
|
|
191
191
|
{#if statusText}
|
|
192
|
-
<span class="text-sm font-medium {statusType === 'success' ? 'text-
|
|
192
|
+
<span class="text-sm font-medium {statusType === 'success' ? 'text-accent-success' : statusType === 'error' ? 'text-accent-danger' : ''}">({statusText})</span>
|
|
193
193
|
{/if}
|
|
194
194
|
{#if optional}
|
|
195
195
|
<span class={typography.smMuted}>{labels.optional}</span>
|
|
@@ -221,7 +221,7 @@
|
|
|
221
221
|
oninput={handleInput}
|
|
222
222
|
inputmode="tel"
|
|
223
223
|
autocomplete="tel"
|
|
224
|
-
class="{typography.body} w-full {sizeClass} bg-
|
|
224
|
+
class="{typography.body} w-full {sizeClass} bg-bg-secondary border border-l-0 rounded-r-lg font-medium placeholder-muted-foreground transition-all focus:outline-hidden focus:ring-4 focus:ring-focus-ring {hasError ? 'border-status-error-border' : 'border-stroke-primary hover:border-interactive-border focus:border-interactive-border'} {controlled && (buttonText) ? 'pr-20' : ''} {shouldAnimate ? 'focus:scale-[1.01]' : ''} {disabled ? 'opacity-50 cursor-not-allowed' : ''}"
|
|
225
225
|
required={false}
|
|
226
226
|
{disabled}
|
|
227
227
|
aria-required={required}
|
|
@@ -232,7 +232,7 @@
|
|
|
232
232
|
type="button"
|
|
233
233
|
onclick={handleButtonClick}
|
|
234
234
|
disabled={buttonDisabled}
|
|
235
|
-
class="absolute inset-y-0 right-0 gap-1 flex items-center justify-center px-4 text-
|
|
235
|
+
class="absolute inset-y-0 right-0 gap-1 flex items-center justify-center px-4 text-brand-primary hover:text-brand-primary disabled:opacity-50 disabled:cursor-not-allowed {helperText || errorText ? 'mb-7' : ''}"
|
|
236
236
|
>
|
|
237
237
|
<span class="text-sm font-medium">{buttonText}</span>
|
|
238
238
|
</button>
|
|
@@ -242,7 +242,7 @@
|
|
|
242
242
|
|
|
243
243
|
{#if errorText}
|
|
244
244
|
<div transition:safeSlide={{ duration: 300, easing: cubicOut }} class="flex items-start gap-1.5 mt-2" role="alert" aria-live="assertive">
|
|
245
|
-
<ExclamationCircleOutline class="w-4 h-4 shrink-0 text-
|
|
245
|
+
<ExclamationCircleOutline class="w-4 h-4 shrink-0 text-accent-danger mt-0.5" />
|
|
246
246
|
<p class={typography.error}>{errorText}</p>
|
|
247
247
|
</div>
|
|
248
248
|
{:else if helperText}
|
|
@@ -367,7 +367,7 @@ describe('PlaceAutocomplete Component', () => {
|
|
|
367
367
|
await fireEvent.keyDown(input, { key: 'ArrowDown' });
|
|
368
368
|
|
|
369
369
|
await waitFor(() => {
|
|
370
|
-
const highlighted = container.querySelector('.bg-
|
|
370
|
+
const highlighted = container.querySelector('.bg-muted');
|
|
371
371
|
expect(highlighted).toBeInTheDocument();
|
|
372
372
|
});
|
|
373
373
|
});
|
|
@@ -390,7 +390,7 @@ describe('PlaceAutocomplete Component', () => {
|
|
|
390
390
|
// Should cycle back to first
|
|
391
391
|
await fireEvent.keyDown(input, { key: 'ArrowDown' });
|
|
392
392
|
|
|
393
|
-
const highlighted = container.querySelectorAll('.bg-
|
|
393
|
+
const highlighted = container.querySelectorAll('.bg-muted');
|
|
394
394
|
expect(highlighted.length).toBeGreaterThan(0);
|
|
395
395
|
});
|
|
396
396
|
|
|
@@ -406,7 +406,7 @@ describe('PlaceAutocomplete Component', () => {
|
|
|
406
406
|
|
|
407
407
|
await fireEvent.keyDown(input, { key: 'ArrowUp' });
|
|
408
408
|
|
|
409
|
-
const highlighted = container.querySelector('.bg-
|
|
409
|
+
const highlighted = container.querySelector('.bg-muted');
|
|
410
410
|
expect(highlighted).toBeInTheDocument();
|
|
411
411
|
});
|
|
412
412
|
|
|
@@ -427,7 +427,7 @@ describe('PlaceAutocomplete Component', () => {
|
|
|
427
427
|
|
|
428
428
|
// Should be on first suggestion - check the li element
|
|
429
429
|
await waitFor(() => {
|
|
430
|
-
const highlighted = container.querySelector('li.bg-
|
|
430
|
+
const highlighted = container.querySelector('li.bg-muted');
|
|
431
431
|
expect(highlighted).toBeInTheDocument();
|
|
432
432
|
});
|
|
433
433
|
});
|
|
@@ -931,22 +931,22 @@ describe('PlaceAutocomplete Component', () => {
|
|
|
931
931
|
expect(input).toHaveClass('block');
|
|
932
932
|
expect(input).toHaveClass('w-full');
|
|
933
933
|
expect(input).toHaveClass('rounded-lg');
|
|
934
|
-
expect(input).toHaveClass('bg-
|
|
934
|
+
expect(input).toHaveClass('bg-bg-secondary');
|
|
935
935
|
expect(input).toHaveClass('border');
|
|
936
|
-
expect(input).toHaveClass('border-
|
|
936
|
+
expect(input).toHaveClass('border-stroke-primary');
|
|
937
937
|
});
|
|
938
938
|
|
|
939
939
|
test('has focus styles', () => {
|
|
940
940
|
setupTest();
|
|
941
941
|
const input = screen.getByRole('textbox');
|
|
942
|
-
expect(input).toHaveClass('focus:ring-
|
|
943
|
-
expect(input).toHaveClass('focus:border-
|
|
942
|
+
expect(input).toHaveClass('focus:ring-focus-ring');
|
|
943
|
+
expect(input).toHaveClass('focus:border-interactive-border');
|
|
944
944
|
});
|
|
945
945
|
|
|
946
946
|
test('has hover styles', () => {
|
|
947
947
|
setupTest();
|
|
948
948
|
const input = screen.getByRole('textbox');
|
|
949
|
-
expect(input).toHaveClass('hover:border-
|
|
949
|
+
expect(input).toHaveClass('hover:border-interactive-border');
|
|
950
950
|
});
|
|
951
951
|
|
|
952
952
|
test('icon has correct positioning', () => {
|
|
@@ -984,7 +984,7 @@ describe('PlaceAutocomplete Component', () => {
|
|
|
984
984
|
expect(list).toHaveClass('top-full');
|
|
985
985
|
expect(list).toHaveClass('rounded-lg');
|
|
986
986
|
expect(list).toHaveClass('shadow-lg');
|
|
987
|
-
expect(list).toHaveClass('bg-
|
|
987
|
+
expect(list).toHaveClass('bg-card');
|
|
988
988
|
});
|
|
989
989
|
});
|
|
990
990
|
|
|
@@ -79,19 +79,19 @@
|
|
|
79
79
|
<h2 class="text-2xl font-bold mb-6">Event Location</h2>
|
|
80
80
|
<div class="space-y-4">
|
|
81
81
|
<div>
|
|
82
|
-
<label for="venue-name" class="block text-sm font-medium text-
|
|
82
|
+
<label for="venue-name" class="block text-sm font-medium text-muted-foreground mb-2">
|
|
83
83
|
Venue Name
|
|
84
84
|
</label>
|
|
85
85
|
<input
|
|
86
86
|
id="venue-name"
|
|
87
87
|
type="text"
|
|
88
88
|
placeholder="Enter venue name"
|
|
89
|
-
class="w-full px-3 py-2 border border-
|
|
89
|
+
class="w-full px-3 py-2 border border-stroke-primary rounded-lg focus:ring-2 focus:ring-focus-ring"
|
|
90
90
|
/>
|
|
91
91
|
</div>
|
|
92
92
|
<div>
|
|
93
93
|
<!-- svelte-ignore a11y_label_has_associated_control -->
|
|
94
|
-
<label class="block text-sm font-medium text-
|
|
94
|
+
<label class="block text-sm font-medium text-muted-foreground mb-2">
|
|
95
95
|
Venue Location
|
|
96
96
|
</label>
|
|
97
97
|
<PlaceAutocomplete
|
|
@@ -111,10 +111,10 @@
|
|
|
111
111
|
<Story name="Performer Location">
|
|
112
112
|
<div style="max-width: 500px; margin: 0 auto;">
|
|
113
113
|
<!-- svelte-ignore a11y_label_has_associated_control -->
|
|
114
|
-
<label class="block text-sm font-medium text-
|
|
114
|
+
<label class="block text-sm font-medium text-muted-foreground mb-2">
|
|
115
115
|
Your Home Base
|
|
116
116
|
</label>
|
|
117
|
-
<p class="text-sm text-
|
|
117
|
+
<p class="text-sm text-muted-foreground mb-3">
|
|
118
118
|
Let venues know where you're based
|
|
119
119
|
</p>
|
|
120
120
|
<PlaceAutocomplete
|
|
@@ -132,7 +132,7 @@
|
|
|
132
132
|
<div class="space-y-6">
|
|
133
133
|
<div>
|
|
134
134
|
<!-- svelte-ignore a11y_label_has_associated_control -->
|
|
135
|
-
<label class="block text-sm font-medium text-
|
|
135
|
+
<label class="block text-sm font-medium text-muted-foreground mb-2">
|
|
136
136
|
Starting City
|
|
137
137
|
</label>
|
|
138
138
|
<PlaceAutocomplete
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
</div>
|
|
145
145
|
<div>
|
|
146
146
|
<!-- svelte-ignore a11y_label_has_associated_control -->
|
|
147
|
-
<label class="block text-sm font-medium text-
|
|
147
|
+
<label class="block text-sm font-medium text-muted-foreground mb-2">
|
|
148
148
|
Destination City
|
|
149
149
|
</label>
|
|
150
150
|
<PlaceAutocomplete
|
|
@@ -296,14 +296,11 @@
|
|
|
296
296
|
bind:this={inputRef}
|
|
297
297
|
type="text"
|
|
298
298
|
name="location"
|
|
299
|
-
class="block w-full h-10 pl-10 pr-2.5 py-2.5 bg-
|
|
300
|
-
focus:ring-
|
|
301
|
-
hover:border-
|
|
299
|
+
class="block w-full h-10 pl-10 pr-2.5 py-2.5 bg-bg-secondary border border-stroke-primary rounded-lg {typography.label}
|
|
300
|
+
focus:ring-focus-ring focus:border-interactive-border focus:outline-hidden
|
|
301
|
+
hover:border-interactive-border
|
|
302
302
|
disabled:opacity-50 disabled:cursor-not-allowed
|
|
303
|
-
placeholder:text-
|
|
304
|
-
dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400
|
|
305
|
-
dark:focus:ring-blue-500 dark:focus:border-blue-500
|
|
306
|
-
dark:hover:border-blue-500"
|
|
303
|
+
placeholder:text-muted-foreground"
|
|
307
304
|
{placeholder}
|
|
308
305
|
autocomplete={autocomplete as 'off' | 'on'}
|
|
309
306
|
{disabled}
|
|
@@ -315,27 +312,27 @@
|
|
|
315
312
|
|
|
316
313
|
{#if results.length > 0}
|
|
317
314
|
<div class="absolute inset-y-0 right-0 hidden md:flex items-center p-1.5 gap-1">
|
|
318
|
-
<kbd class="inline-flex items-center justify-center px-1 border border-
|
|
319
|
-
<kbd class="inline-flex items-center justify-center w-6 border border-
|
|
320
|
-
<kbd class="inline-flex items-center justify-center w-6 border border-
|
|
315
|
+
<kbd class="inline-flex items-center justify-center px-1 border border-stroke-primary rounded {typography.xsMuted} bg-card">Esc</kbd>
|
|
316
|
+
<kbd class="inline-flex items-center justify-center w-6 border border-stroke-primary rounded {typography.xsMuted} bg-card">⇑</kbd>
|
|
317
|
+
<kbd class="inline-flex items-center justify-center w-6 border border-stroke-primary rounded {typography.xsMuted} bg-card">⇓</kbd>
|
|
321
318
|
</div>
|
|
322
319
|
|
|
323
320
|
<ul
|
|
324
|
-
class="absolute top-full left-0 right-0 z-50 mt-1 py-1 bg-
|
|
325
|
-
|
|
321
|
+
class="absolute top-full left-0 right-0 z-50 mt-1 py-1 bg-card border border-border rounded-lg shadow-lg max-h-60 overflow-y-auto
|
|
322
|
+
"
|
|
326
323
|
id="options"
|
|
327
324
|
transition:bloom={{ origin: "top left" }}
|
|
328
325
|
>
|
|
329
326
|
{#each results as place, i}
|
|
330
327
|
<li
|
|
331
328
|
class="cursor-pointer transition-colors duration-100 {typography.body}
|
|
332
|
-
{i === currentSuggestion ? 'bg-
|
|
329
|
+
{i === currentSuggestion ? 'bg-muted' : 'hover:bg-muted'}"
|
|
333
330
|
id="option-{i + 1}"
|
|
334
331
|
>
|
|
335
332
|
<button
|
|
336
333
|
type="button"
|
|
337
334
|
class="block w-full text-left px-4 py-3 bg-transparent border-none cursor-pointer {typography.sm}
|
|
338
|
-
focus:outline-hidden focus:bg-
|
|
335
|
+
focus:outline-hidden focus:bg-muted"
|
|
339
336
|
tabindex={i + 1}
|
|
340
337
|
onclick={() => onPlaceSelected(place.to_place, place.text)}
|
|
341
338
|
>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlaceAutocomplete.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/recipes/inputs/PlaceAutocomplete/PlaceAutocomplete.svelte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PlaceAutocomplete.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/recipes/inputs/PlaceAutocomplete/PlaceAutocomplete.svelte.ts"],"names":[],"mappings":"AA2UA,QAAA,MAAM,iBAAiB;kBAhTL,MAAM,EAAE;kBACR,MAAM;eACT,MAAM;aACR,MAAM;mBACA,MAAM;mBACN,MAAM;iBACR,CAAC,IAAI;;2BATkM,MAAM;4BAAyB;sBAArK,MAAM;uBAAgB,MAAM;mBAAY,MAAM,EAAE;WAAuI;eAAY,MAAM;KAS1P,KAAK,IAAI;cAC5B,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI;WAC1B,MAAM,GAAG,WAAW;mBACZ,OAAO;eACX,OAAO;aACT,OAAO;;;;;;;MAAsB;qBAqSqB,CAAC;AAChE,KAAK,iBAAiB,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC9D,eAAe,iBAAiB,CAAC"}
|
|
@@ -109,7 +109,7 @@ describe('Search Input Styling', () => {
|
|
|
109
109
|
test('has gray background', () => {
|
|
110
110
|
const { container } = render(Search);
|
|
111
111
|
const input = container.querySelector('input');
|
|
112
|
-
expect(input).toHaveClass('bg-
|
|
112
|
+
expect(input).toHaveClass('bg-bg-secondary');
|
|
113
113
|
});
|
|
114
114
|
|
|
115
115
|
test('has rounded corners', () => {
|
|
@@ -122,14 +122,14 @@ describe('Search Input Styling', () => {
|
|
|
122
122
|
const { container } = render(Search);
|
|
123
123
|
const input = container.querySelector('input');
|
|
124
124
|
expect(input).toHaveClass('border');
|
|
125
|
-
expect(input).toHaveClass('border-
|
|
125
|
+
expect(input).toHaveClass('border-stroke-primary');
|
|
126
126
|
});
|
|
127
127
|
|
|
128
128
|
test('has focus ring', () => {
|
|
129
129
|
const { container } = render(Search);
|
|
130
130
|
const input = container.querySelector('input');
|
|
131
131
|
expect(input).toHaveClass('focus:ring-4');
|
|
132
|
-
expect(input).toHaveClass('focus:ring-
|
|
132
|
+
expect(input).toHaveClass('focus:ring-focus-ring');
|
|
133
133
|
});
|
|
134
134
|
});
|
|
135
135
|
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
{name}
|
|
93
93
|
placeholder={placeholder ?? labels.placeholder}
|
|
94
94
|
{disabled}
|
|
95
|
-
class="w-full pr-3 bg-
|
|
95
|
+
class="w-full pr-3 bg-bg-secondary font-medium border border-stroke-primary rounded-lg transition-colors focus:outline-hidden focus:ring-4 focus:ring-focus-ring focus:border-interactive-border hover:border-interactive-border placeholder-muted-foreground [&::-webkit-search-cancel-button]:appearance-none {sizeConfig.input} {disabled ? 'opacity-50 cursor-not-allowed' : ''}"
|
|
96
96
|
bind:value
|
|
97
97
|
oninput={handleInput}
|
|
98
98
|
onchange={handleChange}
|
|
@@ -177,7 +177,7 @@
|
|
|
177
177
|
<button
|
|
178
178
|
type="button"
|
|
179
179
|
bind:this={triggerElement}
|
|
180
|
-
class="flex items-center {sizeClass} bg-
|
|
180
|
+
class="flex items-center {sizeClass} bg-bg-secondary border border-r-0 rounded-l-lg cursor-pointer transition-colors text-left focus:outline-hidden focus:ring-4 focus:ring-focus-ring border-stroke-primary hover:border-interactive-border {disabled ? 'opacity-50 cursor-not-allowed' : ''}"
|
|
181
181
|
{disabled}
|
|
182
182
|
aria-haspopup="listbox"
|
|
183
183
|
aria-expanded={isOpen}
|
|
@@ -194,7 +194,7 @@
|
|
|
194
194
|
<!-- svelte-ignore a11y_no_noninteractive_tabindex -->
|
|
195
195
|
<div
|
|
196
196
|
bind:this={dropdownElement}
|
|
197
|
-
class="fixed z-[100] bg-
|
|
197
|
+
class="fixed z-[100] bg-card border border-stroke-primary rounded-lg shadow-lg overflow-hidden"
|
|
198
198
|
style="top: {dropdownPosition.top}px; left: {dropdownPosition.left}px; width: {dropdownPosition.width}px;"
|
|
199
199
|
role="listbox"
|
|
200
200
|
tabindex="-1"
|
|
@@ -202,11 +202,11 @@
|
|
|
202
202
|
transition:bloom={{ origin: "top left" }}
|
|
203
203
|
>
|
|
204
204
|
<!-- Search -->
|
|
205
|
-
<div class="p-2 border-b border-
|
|
205
|
+
<div class="p-2 border-b border-border">
|
|
206
206
|
<input
|
|
207
207
|
bind:this={searchInputElement}
|
|
208
208
|
type="text"
|
|
209
|
-
class="w-full px-3 py-2 text-sm bg-
|
|
209
|
+
class="w-full px-3 py-2 text-sm bg-bg-secondary border border-stroke-primary rounded-lg text-text-primary focus:outline-hidden focus:ring-2 focus:ring-focus-ring placeholder-muted-foreground"
|
|
210
210
|
placeholder={labels.searchPlaceholder}
|
|
211
211
|
bind:value={searchQuery}
|
|
212
212
|
onkeydown={handleKeydown}
|
|
@@ -218,7 +218,7 @@
|
|
|
218
218
|
{#each filteredCountries as c, idx}
|
|
219
219
|
<!-- svelte-ignore a11y_click_events_have_key_events -->
|
|
220
220
|
<li
|
|
221
|
-
class={`flex items-center gap-3 px-3 py-2 cursor-pointer ${typography.sm} transition-colors ${c.code === country.code ? '' : typography.textMuted} ${idx === focusedIndex ? 'bg-
|
|
221
|
+
class={`flex items-center gap-3 px-3 py-2 cursor-pointer ${typography.sm} transition-colors ${c.code === country.code ? '' : typography.textMuted} ${idx === focusedIndex ? 'bg-muted' : 'hover:bg-muted'}`}
|
|
222
222
|
role="option"
|
|
223
223
|
aria-selected={c.code === country.code}
|
|
224
224
|
data-index={idx}
|