@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
|
@@ -78,15 +78,15 @@
|
|
|
78
78
|
<Story name="All Icons">
|
|
79
79
|
<div class="p-8">
|
|
80
80
|
<h1 class="text-3xl font-bold mb-6">Icon Gallery</h1>
|
|
81
|
-
<p class="text-
|
|
81
|
+
<p class="text-muted-foreground mb-8">All available icons in the component library</p>
|
|
82
82
|
|
|
83
83
|
<div class="grid grid-cols-2 md:grid-cols-4 lg:grid-cols-6 gap-6">
|
|
84
84
|
{#each icons as { name, component }}
|
|
85
|
-
<div class="flex flex-col items-center p-4 border rounded-lg hover:bg-
|
|
85
|
+
<div class="flex flex-col items-center p-4 border rounded-lg hover:bg-bg-secondary transition-colors">
|
|
86
86
|
<div class="w-12 h-12 flex items-center justify-center mb-2">
|
|
87
87
|
<svelte:component this={component} />
|
|
88
88
|
</div>
|
|
89
|
-
<span class="text-sm text-center text-
|
|
89
|
+
<span class="text-sm text-center text-muted-foreground font-medium">{name}</span>
|
|
90
90
|
</div>
|
|
91
91
|
{/each}
|
|
92
92
|
</div>
|
|
@@ -102,25 +102,25 @@
|
|
|
102
102
|
<div class="w-12 h-12 flex items-center justify-center mb-2">
|
|
103
103
|
<Home />
|
|
104
104
|
</div>
|
|
105
|
-
<span class="text-xs text-
|
|
105
|
+
<span class="text-xs text-muted-foreground">Home</span>
|
|
106
106
|
</div>
|
|
107
107
|
<div class="text-center">
|
|
108
108
|
<div class="w-12 h-12 flex items-center justify-center mb-2">
|
|
109
109
|
<Shows />
|
|
110
110
|
</div>
|
|
111
|
-
<span class="text-xs text-
|
|
111
|
+
<span class="text-xs text-muted-foreground">Shows</span>
|
|
112
112
|
</div>
|
|
113
113
|
<div class="text-center">
|
|
114
114
|
<div class="w-12 h-12 flex items-center justify-center mb-2">
|
|
115
115
|
<Availability />
|
|
116
116
|
</div>
|
|
117
|
-
<span class="text-xs text-
|
|
117
|
+
<span class="text-xs text-muted-foreground">Availability</span>
|
|
118
118
|
</div>
|
|
119
119
|
<div class="text-center">
|
|
120
120
|
<div class="w-12 h-12 flex items-center justify-center mb-2">
|
|
121
121
|
<Profile />
|
|
122
122
|
</div>
|
|
123
|
-
<span class="text-xs text-
|
|
123
|
+
<span class="text-xs text-muted-foreground">Profile</span>
|
|
124
124
|
</div>
|
|
125
125
|
</div>
|
|
126
126
|
</div>
|
|
@@ -129,28 +129,28 @@
|
|
|
129
129
|
<h2 class="text-2xl font-bold mb-4">Status Icons</h2>
|
|
130
130
|
<div class="flex gap-6 items-end">
|
|
131
131
|
<div class="text-center">
|
|
132
|
-
<div class="w-12 h-12 flex items-center justify-center mb-2 text-
|
|
132
|
+
<div class="w-12 h-12 flex items-center justify-center mb-2 text-accent-success">
|
|
133
133
|
<CheckCircle />
|
|
134
134
|
</div>
|
|
135
|
-
<span class="text-xs text-
|
|
135
|
+
<span class="text-xs text-muted-foreground">Success</span>
|
|
136
136
|
</div>
|
|
137
137
|
<div class="text-center">
|
|
138
|
-
<div class="w-12 h-12 flex items-center justify-center mb-2 text-
|
|
138
|
+
<div class="w-12 h-12 flex items-center justify-center mb-2 text-accent-danger">
|
|
139
139
|
<ErrorCircle />
|
|
140
140
|
</div>
|
|
141
|
-
<span class="text-xs text-
|
|
141
|
+
<span class="text-xs text-muted-foreground">Error</span>
|
|
142
142
|
</div>
|
|
143
143
|
<div class="text-center">
|
|
144
|
-
<div class="w-12 h-12 flex items-center justify-center mb-2 text-
|
|
144
|
+
<div class="w-12 h-12 flex items-center justify-center mb-2 text-accent-warning">
|
|
145
145
|
<WarningIcon />
|
|
146
146
|
</div>
|
|
147
|
-
<span class="text-xs text-
|
|
147
|
+
<span class="text-xs text-muted-foreground">Warning</span>
|
|
148
148
|
</div>
|
|
149
149
|
<div class="text-center">
|
|
150
|
-
<div class="w-12 h-12 flex items-center justify-center mb-2 text-
|
|
150
|
+
<div class="w-12 h-12 flex items-center justify-center mb-2 text-brand-primary">
|
|
151
151
|
<Info />
|
|
152
152
|
</div>
|
|
153
|
-
<span class="text-xs text-
|
|
153
|
+
<span class="text-xs text-muted-foreground">Info</span>
|
|
154
154
|
</div>
|
|
155
155
|
</div>
|
|
156
156
|
</div>
|
|
@@ -162,25 +162,25 @@
|
|
|
162
162
|
<div class="w-12 h-12 flex items-center justify-center mb-2">
|
|
163
163
|
<FacebookIcon />
|
|
164
164
|
</div>
|
|
165
|
-
<span class="text-xs text-
|
|
165
|
+
<span class="text-xs text-muted-foreground">Facebook</span>
|
|
166
166
|
</div>
|
|
167
167
|
<div class="text-center">
|
|
168
168
|
<div class="w-12 h-12 flex items-center justify-center mb-2">
|
|
169
169
|
<InstagramIcon />
|
|
170
170
|
</div>
|
|
171
|
-
<span class="text-xs text-
|
|
171
|
+
<span class="text-xs text-muted-foreground">Instagram</span>
|
|
172
172
|
</div>
|
|
173
173
|
<div class="text-center">
|
|
174
174
|
<div class="w-12 h-12 flex items-center justify-center mb-2">
|
|
175
175
|
<TwitterIcon />
|
|
176
176
|
</div>
|
|
177
|
-
<span class="text-xs text-
|
|
177
|
+
<span class="text-xs text-muted-foreground">Twitter</span>
|
|
178
178
|
</div>
|
|
179
179
|
<div class="text-center">
|
|
180
180
|
<div class="w-12 h-12 flex items-center justify-center mb-2">
|
|
181
181
|
<TiktokIcon />
|
|
182
182
|
</div>
|
|
183
|
-
<span class="text-xs text-
|
|
183
|
+
<span class="text-xs text-muted-foreground">TikTok</span>
|
|
184
184
|
</div>
|
|
185
185
|
</div>
|
|
186
186
|
</div>
|
|
@@ -192,25 +192,25 @@
|
|
|
192
192
|
<div class="w-12 h-12 flex items-center justify-center mb-2">
|
|
193
193
|
<Copy />
|
|
194
194
|
</div>
|
|
195
|
-
<span class="text-xs text-
|
|
195
|
+
<span class="text-xs text-muted-foreground">Copy</span>
|
|
196
196
|
</div>
|
|
197
197
|
<div class="text-center">
|
|
198
198
|
<div class="w-12 h-12 flex items-center justify-center mb-2">
|
|
199
199
|
<Reload />
|
|
200
200
|
</div>
|
|
201
|
-
<span class="text-xs text-
|
|
201
|
+
<span class="text-xs text-muted-foreground">Reload</span>
|
|
202
202
|
</div>
|
|
203
203
|
<div class="text-center">
|
|
204
204
|
<div class="w-12 h-12 flex items-center justify-center mb-2">
|
|
205
205
|
<Cross />
|
|
206
206
|
</div>
|
|
207
|
-
<span class="text-xs text-
|
|
207
|
+
<span class="text-xs text-muted-foreground">Close</span>
|
|
208
208
|
</div>
|
|
209
209
|
<div class="text-center">
|
|
210
210
|
<div class="w-12 h-12 flex items-center justify-center mb-2">
|
|
211
211
|
<More />
|
|
212
212
|
</div>
|
|
213
|
-
<span class="text-xs text-
|
|
213
|
+
<span class="text-xs text-muted-foreground">More</span>
|
|
214
214
|
</div>
|
|
215
215
|
</div>
|
|
216
216
|
</div>
|
|
@@ -218,16 +218,16 @@
|
|
|
218
218
|
</Story>
|
|
219
219
|
|
|
220
220
|
<Story name="Dark Mode Icons">
|
|
221
|
-
<div class="bg-
|
|
221
|
+
<div class="bg-bg-primary p-8">
|
|
222
222
|
<h1 class="text-3xl font-bold mb-6 text-white">Icons in Dark Mode</h1>
|
|
223
223
|
|
|
224
224
|
<div class="grid grid-cols-2 md:grid-cols-4 lg:grid-cols-6 gap-6">
|
|
225
225
|
{#each icons.slice(0, 12) as { name, component }}
|
|
226
|
-
<div class="flex flex-col items-center p-4 border border-
|
|
226
|
+
<div class="flex flex-col items-center p-4 border border-stroke-primary rounded-lg hover:bg-bg-secondary transition-colors">
|
|
227
227
|
<div class="w-12 h-12 flex items-center justify-center mb-2 text-white">
|
|
228
228
|
<svelte:component this={component} />
|
|
229
229
|
</div>
|
|
230
|
-
<span class="text-sm text-center text-
|
|
230
|
+
<span class="text-sm text-center text-muted-foreground font-medium">{name}</span>
|
|
231
231
|
</div>
|
|
232
232
|
{/each}
|
|
233
233
|
</div>
|
|
@@ -199,18 +199,18 @@ function testIcon(name, config) {
|
|
|
199
199
|
});
|
|
200
200
|
it('accepts custom color prop', () => {
|
|
201
201
|
const { container } = render(IconComponent, {
|
|
202
|
-
props: { color: '
|
|
202
|
+
props: { color: 'hsl(var(--accent-danger))' },
|
|
203
203
|
});
|
|
204
204
|
if (colorAttribute === 'stroke' || colorAttribute === 'both') {
|
|
205
205
|
const strokeElements = container.querySelectorAll('[stroke]');
|
|
206
|
-
const hasCustomStroke = Array.from(strokeElements).some((el) => el.getAttribute('stroke') === '
|
|
206
|
+
const hasCustomStroke = Array.from(strokeElements).some((el) => el.getAttribute('stroke') === 'hsl(var(--accent-danger))');
|
|
207
207
|
if (strokeElements.length > 0) {
|
|
208
208
|
expect(hasCustomStroke).toBe(true);
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
211
|
if (colorAttribute === 'fill' || colorAttribute === 'both') {
|
|
212
212
|
const fillElements = container.querySelectorAll('[fill]:not([fill="none"])');
|
|
213
|
-
const hasCustomFill = Array.from(fillElements).some((el) => el.getAttribute('fill') === '
|
|
213
|
+
const hasCustomFill = Array.from(fillElements).some((el) => el.getAttribute('fill') === 'hsl(var(--accent-danger))');
|
|
214
214
|
if (fillElements.length > 0) {
|
|
215
215
|
expect(hasCustomFill).toBe(true);
|
|
216
216
|
}
|
|
@@ -492,7 +492,7 @@ describe("Input States", () => {
|
|
|
492
492
|
});
|
|
493
493
|
const statusText = screen.getByText("(verified)");
|
|
494
494
|
expect(statusText).toBeInTheDocument();
|
|
495
|
-
expect(statusText).toHaveClass("text-
|
|
495
|
+
expect(statusText).toHaveClass("text-accent-success");
|
|
496
496
|
});
|
|
497
497
|
|
|
498
498
|
test("Shows status text with error type", () => {
|
|
@@ -505,7 +505,7 @@ describe("Input States", () => {
|
|
|
505
505
|
});
|
|
506
506
|
const statusText = screen.getByText("(unverified)");
|
|
507
507
|
expect(statusText).toBeInTheDocument();
|
|
508
|
-
expect(statusText).toHaveClass("text-
|
|
508
|
+
expect(statusText).toHaveClass("text-accent-danger");
|
|
509
509
|
});
|
|
510
510
|
|
|
511
511
|
test("Applies animate focus class when enabled", () => {
|
|
@@ -767,13 +767,13 @@ describe("Content Float Variants", () => {
|
|
|
767
767
|
});
|
|
768
768
|
|
|
769
769
|
describe("Error State via color prop", () => {
|
|
770
|
-
test("Applies border-
|
|
770
|
+
test("Applies border-status-error-border when color is red", () => {
|
|
771
771
|
setupTest({
|
|
772
772
|
type: "text",
|
|
773
773
|
id: "red-color-input",
|
|
774
774
|
color: "red",
|
|
775
775
|
});
|
|
776
|
-
expect(screen.getByRole("textbox")).toHaveClass("border-
|
|
776
|
+
expect(screen.getByRole("textbox")).toHaveClass("border-status-error-border");
|
|
777
777
|
});
|
|
778
778
|
|
|
779
779
|
test("Applies normal border when color is base", () => {
|
|
@@ -782,16 +782,16 @@ describe("Error State via color prop", () => {
|
|
|
782
782
|
id: "base-color-input",
|
|
783
783
|
color: "base",
|
|
784
784
|
});
|
|
785
|
-
expect(screen.getByRole("textbox")).toHaveClass("border-
|
|
785
|
+
expect(screen.getByRole("textbox")).toHaveClass("border-stroke-primary");
|
|
786
786
|
});
|
|
787
787
|
|
|
788
|
-
test("Textarea applies border-
|
|
788
|
+
test("Textarea applies border-status-error-border when color is red", () => {
|
|
789
789
|
setupTest({
|
|
790
790
|
type: "textarea",
|
|
791
791
|
id: "red-textarea",
|
|
792
792
|
color: "red",
|
|
793
793
|
});
|
|
794
|
-
expect(screen.getByRole("textbox")).toHaveClass("border-
|
|
794
|
+
expect(screen.getByRole("textbox")).toHaveClass("border-status-error-border");
|
|
795
795
|
});
|
|
796
796
|
});
|
|
797
797
|
|
|
@@ -1151,8 +1151,8 @@ describe("Status Text Variants", () => {
|
|
|
1151
1151
|
});
|
|
1152
1152
|
const statusEl = screen.getByText("(pending)");
|
|
1153
1153
|
expect(statusEl).toBeInTheDocument();
|
|
1154
|
-
expect(statusEl).not.toHaveClass("text-
|
|
1155
|
-
expect(statusEl).not.toHaveClass("text-
|
|
1154
|
+
expect(statusEl).not.toHaveClass("text-accent-success");
|
|
1155
|
+
expect(statusEl).not.toHaveClass("text-accent-danger");
|
|
1156
1156
|
});
|
|
1157
1157
|
});
|
|
1158
1158
|
|
|
@@ -282,10 +282,10 @@
|
|
|
282
282
|
{#if label}
|
|
283
283
|
<div class="flex justify-start items-center gap-1">
|
|
284
284
|
<label for={id} class={`${typography.label} leading-tight sm:leading-none`}>
|
|
285
|
-
{label}{#if required}<span class="text-
|
|
285
|
+
{label}{#if required}<span class="text-accent-danger font-medium text-sm ml-0.5">*</span>{/if}
|
|
286
286
|
</label>
|
|
287
287
|
{#if statusText}
|
|
288
|
-
<span class="text-sm font-medium {statusType === 'success' ? 'text-
|
|
288
|
+
<span class="text-sm font-medium {statusType === 'success' ? 'text-accent-success' : statusType === 'error' ? 'text-accent-danger' : ''}">({statusText})</span>
|
|
289
289
|
{/if}
|
|
290
290
|
{#if optional}
|
|
291
291
|
<span class={typography.smMuted}>{labels.optional}</span>
|
|
@@ -304,7 +304,7 @@
|
|
|
304
304
|
onfocus={handleFocus}
|
|
305
305
|
{maxlength}
|
|
306
306
|
{minlength}
|
|
307
|
-
class="{typography.sm} w-full px-3 py-2 bg-
|
|
307
|
+
class="{typography.sm} w-full px-3 py-2 bg-bg-secondary border rounded-lg font-medium placeholder-muted-foreground transition-all focus:outline-none focus:ring-4 focus:ring-focus-ring resize-y {hasError ? 'border-status-error-border' : 'border-stroke-primary hover:border-interactive-border focus:border-interactive-border'} {getContentFloatClass()} {getTextareaSizeClass()} {shouldAnimate ? 'focus:scale-[1.01]' : ''}"
|
|
308
308
|
required={false}
|
|
309
309
|
{disabled}
|
|
310
310
|
{readonly}
|
|
@@ -312,7 +312,7 @@
|
|
|
312
312
|
aria-required={required}
|
|
313
313
|
></textarea>
|
|
314
314
|
{:else if type === "password" && showPasswordToggle}
|
|
315
|
-
<div class="flex items-center w-full bg-
|
|
315
|
+
<div class="flex items-center w-full bg-bg-secondary border rounded-lg transition-all outline-none focus-within:ring-4 focus-within:ring-focus-ring {hasError ? 'border-status-error-border' : 'border-stroke-primary hover:border-interactive-border focus-within:border-interactive-border'} {shouldAnimate ? 'focus-within:scale-[1.01]' : ''} {disabled ? 'opacity-50 cursor-not-allowed' : ''}">
|
|
316
316
|
<!-- svelte-ignore a11y_autofocus -->
|
|
317
317
|
<input
|
|
318
318
|
bind:this={inputElement}
|
|
@@ -327,7 +327,7 @@
|
|
|
327
327
|
onfocus={handleFocus}
|
|
328
328
|
{maxlength}
|
|
329
329
|
{minlength}
|
|
330
|
-
class="password-input-inner {typography.sm} flex-1 w-full {sizeClass} bg-transparent border-0 font-medium placeholder-
|
|
330
|
+
class="password-input-inner {typography.sm} flex-1 w-full {sizeClass} bg-transparent border-0 font-medium placeholder-muted-foreground focus:outline-none focus:ring-0 {getContentFloatClass()}"
|
|
331
331
|
required={false}
|
|
332
332
|
{disabled}
|
|
333
333
|
{readonly}
|
|
@@ -339,7 +339,7 @@
|
|
|
339
339
|
<button
|
|
340
340
|
type="button"
|
|
341
341
|
onclick={togglePasswordVisibility}
|
|
342
|
-
class="flex items-center justify-center px-3 text-
|
|
342
|
+
class="flex items-center justify-center px-3 text-muted-foreground hover:text-text-secondary focus:outline-none"
|
|
343
343
|
tabindex="-1"
|
|
344
344
|
aria-label={isPasswordVisible ? labels.hidePassword : labels.showPassword}
|
|
345
345
|
>
|
|
@@ -353,7 +353,7 @@
|
|
|
353
353
|
{:else}
|
|
354
354
|
<div class="relative flex items-center w-full">
|
|
355
355
|
{#if leftIcon}
|
|
356
|
-
<div class="absolute left-3
|
|
356
|
+
<div class="absolute left-3 inset-y-0 flex items-center text-muted-foreground z-10 pointer-events-none">
|
|
357
357
|
{@render leftIcon()}
|
|
358
358
|
</div>
|
|
359
359
|
{/if}
|
|
@@ -372,7 +372,7 @@
|
|
|
372
372
|
onkeydown={handleSearchKeyDown}
|
|
373
373
|
{maxlength}
|
|
374
374
|
{minlength}
|
|
375
|
-
class="{typography.body} w-full {sizeClass} bg-
|
|
375
|
+
class="{typography.body} w-full {sizeClass} bg-bg-secondary border rounded-lg font-medium placeholder-muted-foreground transition-all focus:outline-none focus:ring-4 focus:ring-focus-ring {hasError ? 'border-status-error-border' : 'border-stroke-primary hover:border-interactive-border focus:border-interactive-border'} {icon || (showClearButton && inputValue) ? 'pr-10' : ''} {leftIcon ? 'pl-10' : ''} {getContentFloatClass()} {shouldAnimate ? 'focus:scale-[1.01]' : ''} {disabled ? 'opacity-50 cursor-not-allowed' : ''}"
|
|
376
376
|
required={false}
|
|
377
377
|
{disabled}
|
|
378
378
|
{readonly}
|
|
@@ -385,7 +385,7 @@
|
|
|
385
385
|
<button
|
|
386
386
|
type="button"
|
|
387
387
|
onclick={clearInput}
|
|
388
|
-
class="absolute right-2 top-1/2 -translate-y-1/2 flex items-center justify-center p-1 text-
|
|
388
|
+
class="absolute right-2 top-1/2 -translate-y-1/2 flex items-center justify-center p-1 text-muted-foreground hover:text-text-secondary"
|
|
389
389
|
aria-label={labels.clearInput}
|
|
390
390
|
tabindex="-1"
|
|
391
391
|
>
|
|
@@ -396,7 +396,7 @@
|
|
|
396
396
|
type="button"
|
|
397
397
|
onclick={handleButtonClick}
|
|
398
398
|
disabled={buttonDisabled}
|
|
399
|
-
class="absolute inset-y-0 right-0 gap-1 flex items-center justify-center px-4 text-
|
|
399
|
+
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 || hintText || errorText ? 'mb-7' : ''}"
|
|
400
400
|
>
|
|
401
401
|
{#if buttonIcon}
|
|
402
402
|
<img src={buttonIcon} alt={labels.buttonIconAlt} class="w-5 h-5" />
|
|
@@ -414,7 +414,7 @@
|
|
|
414
414
|
|
|
415
415
|
{#if errorText}
|
|
416
416
|
<div transition:safeSlide={{ duration: 300, easing: cubicOut }} class="flex items-start gap-1.5 mt-2" role="alert" aria-live="assertive">
|
|
417
|
-
<ExclamationCircleOutline class="w-4 h-4 shrink-0 text-
|
|
417
|
+
<ExclamationCircleOutline class="w-4 h-4 shrink-0 text-accent-danger mt-0.5" />
|
|
418
418
|
<p class={typography.error}>{errorText}</p>
|
|
419
419
|
</div>
|
|
420
420
|
{:else if helperText || hintText}
|
|
@@ -173,7 +173,7 @@ describe("Select Component Tests", () => {
|
|
|
173
173
|
const { user } = setupTest();
|
|
174
174
|
const trigger = screen.getByRole("button");
|
|
175
175
|
expect(trigger).toHaveClass("focus:ring-4");
|
|
176
|
-
expect(trigger).toHaveClass("focus:ring-
|
|
176
|
+
expect(trigger).toHaveClass("focus:ring-focus-ring");
|
|
177
177
|
});
|
|
178
178
|
|
|
179
179
|
test("Closes dropdown when clicking outside", async () => {
|
|
@@ -362,13 +362,13 @@ describe("Select - error border styling", () => {
|
|
|
362
362
|
test("Trigger has error border when error is set", () => {
|
|
363
363
|
setupTest({ error: "Required" });
|
|
364
364
|
const trigger = screen.getByRole("button");
|
|
365
|
-
expect(trigger).toHaveClass("border-
|
|
365
|
+
expect(trigger).toHaveClass("border-status-error-border");
|
|
366
366
|
});
|
|
367
367
|
|
|
368
368
|
test("Trigger has normal border when no error", () => {
|
|
369
369
|
setupTest({ error: "" });
|
|
370
370
|
const trigger = screen.getByRole("button");
|
|
371
|
-
expect(trigger).toHaveClass("border-
|
|
371
|
+
expect(trigger).toHaveClass("border-stroke-primary");
|
|
372
372
|
});
|
|
373
373
|
});
|
|
374
374
|
|
|
@@ -435,7 +435,7 @@ describe("Select - option hover highlight", () => {
|
|
|
435
435
|
await fireEvent.mouseEnter(options[2]);
|
|
436
436
|
|
|
437
437
|
// The hovered option should have the focused styling
|
|
438
|
-
expect(options[2]).toHaveClass("bg-
|
|
438
|
+
expect(options[2]).toHaveClass("bg-muted");
|
|
439
439
|
});
|
|
440
440
|
});
|
|
441
441
|
|
|
@@ -468,8 +468,8 @@ describe("Select - opening focuses current selected value", () => {
|
|
|
468
468
|
await user.click(trigger);
|
|
469
469
|
const options = screen.getAllByRole("option");
|
|
470
470
|
|
|
471
|
-
// opt2 is at index 1, so the focused option should have bg-
|
|
472
|
-
expect(options[1]).toHaveClass("bg-
|
|
471
|
+
// opt2 is at index 1, so the focused option should have bg-muted
|
|
472
|
+
expect(options[1]).toHaveClass("bg-muted");
|
|
473
473
|
});
|
|
474
474
|
});
|
|
475
475
|
|
|
@@ -551,7 +551,7 @@ describe("Select - no error text", () => {
|
|
|
551
551
|
setupTest({ error: "" });
|
|
552
552
|
// The trigger should be present with normal border
|
|
553
553
|
const trigger = screen.getByRole("button");
|
|
554
|
-
expect(trigger).toHaveClass("border-
|
|
554
|
+
expect(trigger).toHaveClass("border-stroke-primary");
|
|
555
555
|
// There should be no error paragraph element
|
|
556
556
|
const errorParagraph = document.querySelector('p');
|
|
557
557
|
expect(errorParagraph).not.toBeInTheDocument();
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
<option value="md">Medium</option>
|
|
48
48
|
<option value="lg">Large</option>
|
|
49
49
|
</Select>
|
|
50
|
-
<p class="text-sm text-
|
|
50
|
+
<p class="text-sm text-muted-foreground mt-2">Selected: {value || 'none'}</p>
|
|
51
51
|
</div>
|
|
52
52
|
{/snippet}
|
|
53
53
|
</Story>
|
|
@@ -170,7 +170,7 @@
|
|
|
170
170
|
{#if label}
|
|
171
171
|
<div class="flex justify-start items-center gap-1">
|
|
172
172
|
<label for={id || name} class={typography.label}>
|
|
173
|
-
{label}{#if required}<span class="text-
|
|
173
|
+
{label}{#if required}<span class="text-accent-danger font-medium text-sm ml-0.5">*</span>{/if}
|
|
174
174
|
</label>
|
|
175
175
|
</div>
|
|
176
176
|
{/if}
|
|
@@ -181,7 +181,7 @@
|
|
|
181
181
|
bind:this={triggerElement}
|
|
182
182
|
{id}
|
|
183
183
|
{name}
|
|
184
|
-
class="flex items-center justify-between w-full {sizeClass} bg-
|
|
184
|
+
class="flex items-center justify-between w-full {sizeClass} bg-bg-secondary border rounded-lg cursor-pointer transition-colors text-left focus:outline-hidden focus:ring-4 focus:ring-focus-ring {error ? 'border-status-error-border' : 'border-stroke-primary hover:border-interactive-border'} {disabled ? 'opacity-50 cursor-not-allowed' : ''} {!selectedItem ? `${typography.textMuted}` : `${typography.body}`}"
|
|
185
185
|
{disabled}
|
|
186
186
|
aria-haspopup="listbox"
|
|
187
187
|
aria-expanded={isOpen}
|
|
@@ -196,7 +196,7 @@
|
|
|
196
196
|
<!-- svelte-ignore a11y_no_noninteractive_tabindex -->
|
|
197
197
|
<ul
|
|
198
198
|
bind:this={dropdownElement}
|
|
199
|
-
class="absolute top-full left-0 right-0 z-50 mt-1 bg-
|
|
199
|
+
class="absolute top-full left-0 right-0 z-50 mt-1 bg-card border border-stroke-primary rounded-lg shadow-lg max-h-60 overflow-y-auto py-1"
|
|
200
200
|
role="listbox"
|
|
201
201
|
tabindex="-1"
|
|
202
202
|
transition:bloom={{ origin: "top left" }}
|
|
@@ -205,7 +205,7 @@
|
|
|
205
205
|
<!-- svelte-ignore a11y_click_events_have_key_events -->
|
|
206
206
|
<li
|
|
207
207
|
id="{id || name}-option-{index}"
|
|
208
|
-
class={`px-4 py-2 cursor-pointer ${typography.sm} transition-colors ${item.value === value ? '' : `${typography.textMuted}`} ${index === focusedIndex ? 'bg-
|
|
208
|
+
class={`px-4 py-2 cursor-pointer ${typography.sm} transition-colors ${item.value === value ? '' : `${typography.textMuted}`} ${index === focusedIndex ? 'bg-muted' : 'hover:bg-muted'}`}
|
|
209
209
|
role="option"
|
|
210
210
|
aria-selected={item.value === value}
|
|
211
211
|
onclick={() => selectItem(item)}
|
|
@@ -229,7 +229,7 @@
|
|
|
229
229
|
<ul
|
|
230
230
|
bind:this={dropdownElement}
|
|
231
231
|
use:portalAction
|
|
232
|
-
class="fixed z-[100] bg-
|
|
232
|
+
class="fixed z-[100] bg-card border border-stroke-primary rounded-lg shadow-lg max-h-60 overflow-y-auto py-1"
|
|
233
233
|
style="top: {dropdownPosition.top}px; left: {dropdownPosition.left}px; width: {dropdownPosition.width}px;"
|
|
234
234
|
role="listbox"
|
|
235
235
|
tabindex="-1"
|
|
@@ -239,7 +239,7 @@
|
|
|
239
239
|
<!-- svelte-ignore a11y_click_events_have_key_events -->
|
|
240
240
|
<li
|
|
241
241
|
id="{id || name}-option-{index}"
|
|
242
|
-
class={`px-4 py-2 cursor-pointer ${typography.sm} transition-colors ${item.value === value ? '' : `${typography.textMuted}`} ${index === focusedIndex ? 'bg-
|
|
242
|
+
class={`px-4 py-2 cursor-pointer ${typography.sm} transition-colors ${item.value === value ? '' : `${typography.textMuted}`} ${index === focusedIndex ? 'bg-muted' : 'hover:bg-muted'}`}
|
|
243
243
|
role="option"
|
|
244
244
|
aria-selected={item.value === value}
|
|
245
245
|
onclick={() => selectItem(item)}
|
|
@@ -109,7 +109,7 @@ describe('Textarea Label', () => {
|
|
|
109
109
|
|
|
110
110
|
test('label shows asterisk when required', () => {
|
|
111
111
|
const { container } = render(Textarea, { props: { label: 'Description', required: true } });
|
|
112
|
-
expect(container.querySelector('.text-
|
|
112
|
+
expect(container.querySelector('.text-accent-danger')).toBeInTheDocument();
|
|
113
113
|
expect(screen.getByText('*')).toBeInTheDocument();
|
|
114
114
|
});
|
|
115
115
|
|
|
@@ -125,10 +125,10 @@ describe('Textarea Error State', () => {
|
|
|
125
125
|
expect(screen.getByText('This field is required')).toBeInTheDocument();
|
|
126
126
|
});
|
|
127
127
|
|
|
128
|
-
test('has border-
|
|
128
|
+
test('has border-status-error-border when error is present', () => {
|
|
129
129
|
const { container } = render(Textarea, { props: { error: 'Error' } });
|
|
130
130
|
const textarea = container.querySelector('textarea');
|
|
131
|
-
expect(textarea).toHaveClass('border-
|
|
131
|
+
expect(textarea).toHaveClass('border-status-error-border');
|
|
132
132
|
});
|
|
133
133
|
|
|
134
134
|
test('aria-invalid is true when error is present', () => {
|
|
@@ -171,16 +171,16 @@ describe('Textarea Styling', () => {
|
|
|
171
171
|
expect(textarea).toHaveClass('p-2.5');
|
|
172
172
|
});
|
|
173
173
|
|
|
174
|
-
test('has bg-
|
|
174
|
+
test('has bg-bg-secondary background', () => {
|
|
175
175
|
const { container } = render(Textarea);
|
|
176
176
|
const textarea = container.querySelector('textarea');
|
|
177
|
-
expect(textarea).toHaveClass('bg-
|
|
177
|
+
expect(textarea).toHaveClass('bg-bg-secondary');
|
|
178
178
|
});
|
|
179
179
|
|
|
180
|
-
test('has
|
|
180
|
+
test('has token-based background', () => {
|
|
181
181
|
const { container } = render(Textarea);
|
|
182
182
|
const textarea = container.querySelector('textarea');
|
|
183
|
-
expect(textarea).toHaveClass('
|
|
183
|
+
expect(textarea).toHaveClass('bg-bg-secondary');
|
|
184
184
|
});
|
|
185
185
|
|
|
186
186
|
test('has rounded-lg border radius', () => {
|
|
@@ -199,7 +199,7 @@ describe('Textarea Styling', () => {
|
|
|
199
199
|
const { container } = render(Textarea);
|
|
200
200
|
const textarea = container.querySelector('textarea');
|
|
201
201
|
expect(textarea).toHaveClass('focus:ring-4');
|
|
202
|
-
expect(textarea).toHaveClass('focus:ring-
|
|
202
|
+
expect(textarea).toHaveClass('focus:ring-focus-ring');
|
|
203
203
|
});
|
|
204
204
|
|
|
205
205
|
test('has opacity-50 and cursor-not-allowed when disabled', () => {
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
<div class="flex flex-col gap-2 w-full">
|
|
73
73
|
{#if label}
|
|
74
74
|
<label for={id || name} class={`${typography.label} leading-tight`}>
|
|
75
|
-
{label}{#if required}<span class="text-
|
|
75
|
+
{label}{#if required}<span class="text-accent-danger font-medium text-sm ml-0.5">*</span>{/if}
|
|
76
76
|
</label>
|
|
77
77
|
{/if}
|
|
78
78
|
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
{readonly}
|
|
86
86
|
{maxlength}
|
|
87
87
|
{minlength}
|
|
88
|
-
class="{typography.sm} w-full p-2.5 bg-
|
|
88
|
+
class="{typography.sm} w-full p-2.5 bg-bg-secondary leading-normal border rounded-lg resize-y transition-colors focus:outline-hidden focus:ring-4 focus:ring-focus-ring placeholder-muted-foreground {error ? 'border-status-error-border' : 'border-stroke-primary hover:border-interactive-border focus:border-interactive-border'} {disabled ? 'opacity-50 cursor-not-allowed' : ''} {className}"
|
|
89
89
|
bind:value
|
|
90
90
|
oninput={handleInput}
|
|
91
91
|
onchange={handleChange}
|