@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
|
@@ -65,13 +65,13 @@
|
|
|
65
65
|
|
|
66
66
|
// Section styling
|
|
67
67
|
const sectionClass = (dark: boolean) =>
|
|
68
|
-
`rounded-xl p-6 ${dark ? 'bg-
|
|
68
|
+
`rounded-xl p-6 ${dark ? 'bg-bg-secondary border-stroke-primary' : 'bg-card border-border'} border`;
|
|
69
69
|
|
|
70
70
|
const headingClass = (dark: boolean) =>
|
|
71
|
-
`text-xl font-semibold mb-1 ${dark ? 'text-white' : 'text-
|
|
71
|
+
`text-xl font-semibold mb-1 ${dark ? 'text-white' : 'text-text-primary'}`;
|
|
72
72
|
|
|
73
73
|
const subheadingClass = (dark: boolean) =>
|
|
74
|
-
`text-sm mb-4 ${dark ? 'text-
|
|
74
|
+
`text-sm mb-4 ${dark ? 'text-muted-foreground' : 'text-muted-foreground'}`;
|
|
75
75
|
|
|
76
76
|
// Demo data - MultiSelect uses 'items' with {name, value} format
|
|
77
77
|
const multiSelectItems = [
|
|
@@ -97,16 +97,16 @@
|
|
|
97
97
|
];
|
|
98
98
|
</script>
|
|
99
99
|
|
|
100
|
-
<div class="min-h-screen p-6 space-y-8 {isDark ? 'bg-
|
|
100
|
+
<div class="min-h-screen p-6 space-y-8 {isDark ? 'bg-bg-primary' : 'bg-bg-secondary'}">
|
|
101
101
|
<!-- Header -->
|
|
102
102
|
<div class="flex items-center justify-between mb-8">
|
|
103
103
|
<div>
|
|
104
|
-
<h1 class="text-3xl font-bold {isDark ? 'text-white' : 'text-
|
|
105
|
-
<p class="{isDark ? 'text-
|
|
104
|
+
<h1 class="text-3xl font-bold {isDark ? 'text-white' : 'text-text-primary'}">Recipes Gallery</h1>
|
|
105
|
+
<p class="{isDark ? 'text-muted-foreground' : 'text-text-secondary'}">Domain-agnostic compositions (Layer 2)</p>
|
|
106
106
|
</div>
|
|
107
107
|
<button
|
|
108
108
|
onclick={toggleDark}
|
|
109
|
-
class="px-4 py-2 rounded-lg font-medium {isDark ? 'bg-
|
|
109
|
+
class="px-4 py-2 rounded-lg font-medium {isDark ? 'bg-accent-warning text-text-primary' : 'bg-bg-secondary text-white'}"
|
|
110
110
|
>
|
|
111
111
|
{isDark ? '☀️ Light' : '🌙 Dark'}
|
|
112
112
|
</button>
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
|
|
120
120
|
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
|
121
121
|
<Card>
|
|
122
|
-
<p class="text-xs {isDark ? 'text-
|
|
122
|
+
<p class="text-xs {isDark ? 'text-muted-foreground' : 'text-muted-foreground'} mb-2">EmptyState</p>
|
|
123
123
|
<EmptyState
|
|
124
124
|
title="No items yet"
|
|
125
125
|
description="Get started by creating your first item"
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
</Card>
|
|
130
130
|
|
|
131
131
|
<Card>
|
|
132
|
-
<p class="text-xs {isDark ? 'text-
|
|
132
|
+
<p class="text-xs {isDark ? 'text-muted-foreground' : 'text-muted-foreground'} mb-2">ErrorDisplay</p>
|
|
133
133
|
<ErrorDisplay
|
|
134
134
|
title="Something went wrong"
|
|
135
135
|
message="We couldn't load the data. Please try again."
|
|
@@ -140,27 +140,27 @@
|
|
|
140
140
|
</div>
|
|
141
141
|
|
|
142
142
|
<div class="mt-6">
|
|
143
|
-
<p class="text-xs {isDark ? 'text-
|
|
143
|
+
<p class="text-xs {isDark ? 'text-muted-foreground' : 'text-muted-foreground'} mb-3">StatusIndicator</p>
|
|
144
144
|
<div class="flex flex-wrap gap-6">
|
|
145
145
|
<div class="flex items-center gap-2">
|
|
146
146
|
<StatusIndicator status="active" />
|
|
147
|
-
<span class={isDark ? 'text-white' : 'text-
|
|
147
|
+
<span class={isDark ? 'text-white' : 'text-text-primary'}>Active</span>
|
|
148
148
|
</div>
|
|
149
149
|
<div class="flex items-center gap-2">
|
|
150
150
|
<StatusIndicator status="pending" />
|
|
151
|
-
<span class={isDark ? 'text-white' : 'text-
|
|
151
|
+
<span class={isDark ? 'text-white' : 'text-text-primary'}>Pending</span>
|
|
152
152
|
</div>
|
|
153
153
|
<div class="flex items-center gap-2">
|
|
154
154
|
<StatusIndicator status="inactive" />
|
|
155
|
-
<span class={isDark ? 'text-white' : 'text-
|
|
155
|
+
<span class={isDark ? 'text-white' : 'text-text-primary'}>Inactive</span>
|
|
156
156
|
</div>
|
|
157
157
|
<div class="flex items-center gap-2">
|
|
158
158
|
<StatusIndicator status="error" />
|
|
159
|
-
<span class={isDark ? 'text-white' : 'text-
|
|
159
|
+
<span class={isDark ? 'text-white' : 'text-text-primary'}>Error</span>
|
|
160
160
|
</div>
|
|
161
161
|
<div class="flex items-center gap-2">
|
|
162
162
|
<StatusIndicator status="success" />
|
|
163
|
-
<span class={isDark ? 'text-white' : 'text-
|
|
163
|
+
<span class={isDark ? 'text-white' : 'text-text-primary'}>Success</span>
|
|
164
164
|
</div>
|
|
165
165
|
</div>
|
|
166
166
|
</div>
|
|
@@ -183,7 +183,7 @@
|
|
|
183
183
|
type="text"
|
|
184
184
|
placeholder="John Doe"
|
|
185
185
|
bind:value={formFieldValue}
|
|
186
|
-
class="w-full px-3 py-2 border border-
|
|
186
|
+
class="w-full px-3 py-2 border border-stroke-primary rounded-lg bg-bg-secondary focus:outline-hidden focus:ring-2 focus:ring-focus-ring"
|
|
187
187
|
/>
|
|
188
188
|
{/snippet}
|
|
189
189
|
</FormField>
|
|
@@ -199,7 +199,7 @@
|
|
|
199
199
|
{id}
|
|
200
200
|
type="email"
|
|
201
201
|
placeholder="email@example.com"
|
|
202
|
-
class="w-full px-3 py-2 border {error ? 'border-
|
|
202
|
+
class="w-full px-3 py-2 border {error ? 'border-status-error-border' : 'border-stroke-primary'} rounded-lg bg-bg-secondary focus:outline-hidden focus:ring-2 focus:ring-focus-ring"
|
|
203
203
|
/>
|
|
204
204
|
{/snippet}
|
|
205
205
|
</FormField>
|
|
@@ -254,7 +254,7 @@
|
|
|
254
254
|
|
|
255
255
|
<div class="grid grid-cols-1 md:grid-cols-2 gap-8">
|
|
256
256
|
<div>
|
|
257
|
-
<p class="text-xs {isDark ? 'text-
|
|
257
|
+
<p class="text-xs {isDark ? 'text-muted-foreground' : 'text-muted-foreground'} mb-2">PasswordInput</p>
|
|
258
258
|
<PasswordInput
|
|
259
259
|
label="Password"
|
|
260
260
|
placeholder="Enter password"
|
|
@@ -263,21 +263,21 @@
|
|
|
263
263
|
</div>
|
|
264
264
|
|
|
265
265
|
<div>
|
|
266
|
-
<p class="text-xs {isDark ? 'text-
|
|
266
|
+
<p class="text-xs {isDark ? 'text-muted-foreground' : 'text-muted-foreground'} mb-2">PasswordStrengthIndicator</p>
|
|
267
267
|
<PasswordStrengthIndicator password={passwordValue} />
|
|
268
268
|
</div>
|
|
269
269
|
|
|
270
270
|
<div>
|
|
271
|
-
<p class="text-xs {isDark ? 'text-
|
|
271
|
+
<p class="text-xs {isDark ? 'text-muted-foreground' : 'text-muted-foreground'} mb-2">OTPInput (6 digits)</p>
|
|
272
272
|
<OTPInput
|
|
273
273
|
length={6}
|
|
274
274
|
bind:value={otpValue}
|
|
275
275
|
/>
|
|
276
|
-
<p class="text-sm text-
|
|
276
|
+
<p class="text-sm text-muted-foreground mt-2">Value: {otpValue || '(empty)'}</p>
|
|
277
277
|
</div>
|
|
278
278
|
|
|
279
279
|
<div>
|
|
280
|
-
<p class="text-xs {isDark ? 'text-
|
|
280
|
+
<p class="text-xs {isDark ? 'text-muted-foreground' : 'text-muted-foreground'} mb-2">Search</p>
|
|
281
281
|
<Search
|
|
282
282
|
placeholder="Search..."
|
|
283
283
|
bind:value={searchValue}
|
|
@@ -285,7 +285,7 @@
|
|
|
285
285
|
</div>
|
|
286
286
|
|
|
287
287
|
<div>
|
|
288
|
-
<p class="text-xs {isDark ? 'text-
|
|
288
|
+
<p class="text-xs {isDark ? 'text-muted-foreground' : 'text-muted-foreground'} mb-2">MultiSelect</p>
|
|
289
289
|
<MultiSelect
|
|
290
290
|
label="Frameworks"
|
|
291
291
|
items={multiSelectItems}
|
|
@@ -360,7 +360,7 @@
|
|
|
360
360
|
secondaryButtonText="Cancel"
|
|
361
361
|
onconfirm={() => {
|
|
362
362
|
showConfirmModal = false;
|
|
363
|
-
|
|
363
|
+
// confirmed
|
|
364
364
|
}}
|
|
365
365
|
oncancel={() => showConfirmModal = false}
|
|
366
366
|
onclose={() => showConfirmModal = false}
|
|
@@ -374,7 +374,7 @@
|
|
|
374
374
|
inputPlaceholder="Enter your name"
|
|
375
375
|
primaryButtonText="Submit"
|
|
376
376
|
onconfirm={(detail: { value: string }) => {
|
|
377
|
-
|
|
377
|
+
// submitted
|
|
378
378
|
showInputModal = false;
|
|
379
379
|
}}
|
|
380
380
|
oncancel={() => showInputModal = false}
|
|
@@ -406,7 +406,7 @@
|
|
|
406
406
|
{id}
|
|
407
407
|
type="email"
|
|
408
408
|
placeholder="email@example.com"
|
|
409
|
-
class="w-full px-3 py-2 border border-
|
|
409
|
+
class="w-full px-3 py-2 border border-stroke-primary rounded-lg bg-bg-secondary focus:outline-hidden focus:ring-2 focus:ring-focus-ring"
|
|
410
410
|
/>
|
|
411
411
|
{/snippet}
|
|
412
412
|
</FormField>
|
|
@@ -34,7 +34,7 @@ describe('Typography Base CSS', () => {
|
|
|
34
34
|
it('headings have dark mode support', () => {
|
|
35
35
|
const headingMatches = cssContent.match(/h[1-6]\s*\{[^}]+\}/g) || [];
|
|
36
36
|
headingMatches.forEach(match => {
|
|
37
|
-
expect(match).toContain('
|
|
37
|
+
expect(match).toContain('');
|
|
38
38
|
});
|
|
39
39
|
});
|
|
40
40
|
});
|
|
@@ -45,8 +45,8 @@ describe('Typography Base CSS', () => {
|
|
|
45
45
|
it('paragraph uses secondary color for visual hierarchy', () => {
|
|
46
46
|
const pMatch = cssContent.match(/p\s*\{[^}]+\}/);
|
|
47
47
|
expect(pMatch).toBeTruthy();
|
|
48
|
-
expect(pMatch[0]).toContain('text-
|
|
49
|
-
expect(pMatch[0]).toContain('
|
|
48
|
+
expect(pMatch[0]).toContain('text-text-secondary');
|
|
49
|
+
expect(pMatch[0]).toContain('');
|
|
50
50
|
});
|
|
51
51
|
it('paragraph has relaxed line height', () => {
|
|
52
52
|
const pMatch = cssContent.match(/p\s*\{[^}]+\}/);
|
|
@@ -70,7 +70,7 @@ describe('Typography Base CSS', () => {
|
|
|
70
70
|
it('links have blue color and hover underline', () => {
|
|
71
71
|
const aMatch = cssContent.match(/a\s*\{[^}]+\}/);
|
|
72
72
|
expect(aMatch).toBeTruthy();
|
|
73
|
-
expect(aMatch[0]).toContain('text-
|
|
73
|
+
expect(aMatch[0]).toContain('text-brand-primary');
|
|
74
74
|
expect(aMatch[0]).toContain('hover:underline');
|
|
75
75
|
});
|
|
76
76
|
});
|
|
@@ -132,7 +132,7 @@ describe('Typography Base CSS Consistency with typography.ts', () => {
|
|
|
132
132
|
it('documents the intentional difference between CSS <p> and typography.body', () => {
|
|
133
133
|
// This test exists to document the design decision
|
|
134
134
|
const pMatch = cssContent.match(/p\s*\{[^}]+\}/);
|
|
135
|
-
expect(pMatch[0]).toContain('text-
|
|
135
|
+
expect(pMatch[0]).toContain('text-text-secondary'); // CSS uses secondary
|
|
136
136
|
// typography.body uses gray-900 (primary) - verified in typography.test.ts
|
|
137
137
|
});
|
|
138
138
|
});
|
|
@@ -4,8 +4,7 @@ describe('Typography Headings', () => {
|
|
|
4
4
|
it('h1 has 2xl size and semibold weight', () => {
|
|
5
5
|
expect(typography.h1).toContain('text-2xl');
|
|
6
6
|
expect(typography.h1).toContain('font-semibold');
|
|
7
|
-
expect(typography.h1).toContain('text-
|
|
8
|
-
expect(typography.h1).toContain('dark:text-white');
|
|
7
|
+
expect(typography.h1).toContain('text-text-primary');
|
|
9
8
|
});
|
|
10
9
|
it('h2 has xl size and semibold weight', () => {
|
|
11
10
|
expect(typography.h2).toContain('text-xl');
|
|
@@ -32,33 +31,31 @@ describe('Typography Body Text', () => {
|
|
|
32
31
|
it('body has base size and relaxed leading', () => {
|
|
33
32
|
expect(typography.body).toContain('text-base');
|
|
34
33
|
expect(typography.body).toContain('leading-relaxed');
|
|
35
|
-
expect(typography.body).toContain('text-
|
|
34
|
+
expect(typography.body).toContain('text-text-primary');
|
|
36
35
|
});
|
|
37
|
-
it('bodyMuted has muted
|
|
38
|
-
expect(typography.bodyMuted).toContain('text-
|
|
39
|
-
expect(typography.bodyMuted).toContain('dark:text-gray-400');
|
|
36
|
+
it('bodyMuted has muted token color', () => {
|
|
37
|
+
expect(typography.bodyMuted).toContain('text-muted-foreground');
|
|
40
38
|
});
|
|
41
39
|
it('sm has sm size', () => {
|
|
42
40
|
expect(typography.sm).toContain('text-sm');
|
|
43
|
-
expect(typography.sm).toContain('text-
|
|
41
|
+
expect(typography.sm).toContain('text-text-primary');
|
|
44
42
|
});
|
|
45
43
|
it('smMuted has sm size and muted color', () => {
|
|
46
44
|
expect(typography.smMuted).toContain('text-sm');
|
|
47
|
-
expect(typography.smMuted).toContain('text-
|
|
45
|
+
expect(typography.smMuted).toContain('text-muted-foreground');
|
|
48
46
|
});
|
|
49
47
|
it('xs has xs size', () => {
|
|
50
48
|
expect(typography.xs).toContain('text-xs');
|
|
51
|
-
expect(typography.xs).toContain('text-
|
|
49
|
+
expect(typography.xs).toContain('text-text-primary');
|
|
52
50
|
});
|
|
53
51
|
it('xsMuted has xs size and muted color', () => {
|
|
54
52
|
expect(typography.xsMuted).toContain('text-xs');
|
|
55
|
-
expect(typography.xsMuted).toContain('text-
|
|
53
|
+
expect(typography.xsMuted).toContain('text-muted-foreground');
|
|
56
54
|
});
|
|
57
55
|
});
|
|
58
56
|
describe('Typography Muted Colors', () => {
|
|
59
|
-
it('textMuted has muted
|
|
60
|
-
expect(typography.textMuted).toContain('text-
|
|
61
|
-
expect(typography.textMuted).toContain('dark:text-gray-400');
|
|
57
|
+
it('textMuted has muted token color', () => {
|
|
58
|
+
expect(typography.textMuted).toContain('text-muted-foreground');
|
|
62
59
|
});
|
|
63
60
|
it('iconMuted matches textMuted', () => {
|
|
64
61
|
expect(typography.iconMuted).toBe(typography.textMuted);
|
|
@@ -68,7 +65,7 @@ describe('Typography Labels', () => {
|
|
|
68
65
|
it('label has sm size and medium weight', () => {
|
|
69
66
|
expect(typography.label).toContain('text-sm');
|
|
70
67
|
expect(typography.label).toContain('font-medium');
|
|
71
|
-
expect(typography.label).toContain('text-
|
|
68
|
+
expect(typography.label).toContain('text-text-primary');
|
|
72
69
|
});
|
|
73
70
|
it('labelSpaced includes bottom margin', () => {
|
|
74
71
|
expect(typography.labelSpaced).toContain('mb-2');
|
|
@@ -77,40 +74,39 @@ describe('Typography Labels', () => {
|
|
|
77
74
|
});
|
|
78
75
|
it('helper has muted color', () => {
|
|
79
76
|
expect(typography.helper).toContain('text-sm');
|
|
80
|
-
expect(typography.helper).toContain('text-
|
|
77
|
+
expect(typography.helper).toContain('text-muted-foreground');
|
|
81
78
|
});
|
|
82
|
-
it('placeholder has
|
|
79
|
+
it('placeholder has muted color', () => {
|
|
83
80
|
expect(typography.placeholder).toContain('text-sm');
|
|
84
|
-
expect(typography.placeholder).toContain('text-
|
|
81
|
+
expect(typography.placeholder).toContain('text-muted-foreground');
|
|
85
82
|
});
|
|
86
83
|
});
|
|
87
84
|
describe('Typography Status Text', () => {
|
|
88
|
-
it('error has
|
|
85
|
+
it('error has danger token color', () => {
|
|
89
86
|
expect(typography.error).toContain('text-sm');
|
|
90
|
-
expect(typography.error).toContain('text-
|
|
91
|
-
expect(typography.error).toContain('dark:text-red-400');
|
|
87
|
+
expect(typography.error).toContain('text-accent-danger');
|
|
92
88
|
});
|
|
93
|
-
it('success has
|
|
89
|
+
it('success has success token color', () => {
|
|
94
90
|
expect(typography.success).toContain('text-sm');
|
|
95
|
-
expect(typography.success).toContain('text-
|
|
91
|
+
expect(typography.success).toContain('text-accent-success');
|
|
96
92
|
});
|
|
97
|
-
it('warning has
|
|
93
|
+
it('warning has warning token color', () => {
|
|
98
94
|
expect(typography.warning).toContain('text-sm');
|
|
99
|
-
expect(typography.warning).toContain('text-
|
|
95
|
+
expect(typography.warning).toContain('text-accent-warning');
|
|
100
96
|
});
|
|
101
|
-
it('info has
|
|
97
|
+
it('info has brand token color', () => {
|
|
102
98
|
expect(typography.info).toContain('text-sm');
|
|
103
|
-
expect(typography.info).toContain('text-
|
|
99
|
+
expect(typography.info).toContain('text-brand-primary');
|
|
104
100
|
});
|
|
105
101
|
});
|
|
106
102
|
describe('Typography Links', () => {
|
|
107
|
-
it('link has
|
|
108
|
-
expect(typography.link).toContain('text-
|
|
103
|
+
it('link has brand color and hover underline', () => {
|
|
104
|
+
expect(typography.link).toContain('text-brand-primary');
|
|
109
105
|
expect(typography.link).toContain('hover:underline');
|
|
110
106
|
});
|
|
111
|
-
it('linkMuted has
|
|
112
|
-
expect(typography.linkMuted).toContain('text-
|
|
113
|
-
expect(typography.linkMuted).toContain('hover:text-
|
|
107
|
+
it('linkMuted has muted color and hover state', () => {
|
|
108
|
+
expect(typography.linkMuted).toContain('text-muted-foreground');
|
|
109
|
+
expect(typography.linkMuted).toContain('hover:text-text-secondary');
|
|
114
110
|
});
|
|
115
111
|
});
|
|
116
112
|
describe('Typography Special Cases', () => {
|
|
@@ -137,7 +133,7 @@ describe('Typography Special Cases', () => {
|
|
|
137
133
|
});
|
|
138
134
|
it('codeMuted has mono font and muted color', () => {
|
|
139
135
|
expect(typography.codeMuted).toContain('font-mono');
|
|
140
|
-
expect(typography.codeMuted).toContain('text-
|
|
136
|
+
expect(typography.codeMuted).toContain('text-muted-foreground');
|
|
141
137
|
});
|
|
142
138
|
});
|
|
143
139
|
describe('Typography Token Type', () => {
|
|
@@ -147,10 +143,10 @@ describe('Typography Token Type', () => {
|
|
|
147
143
|
expect(typeof typography[token]).toBe('string');
|
|
148
144
|
});
|
|
149
145
|
});
|
|
150
|
-
it('all tokens
|
|
151
|
-
const
|
|
152
|
-
|
|
153
|
-
expect(typography[token]).toContain('dark:');
|
|
146
|
+
it('all tokens use centralized token classes instead of dark: variants', () => {
|
|
147
|
+
const tokenKeys = Object.keys(typography);
|
|
148
|
+
tokenKeys.forEach(token => {
|
|
149
|
+
expect(typography[token]).not.toContain('dark:');
|
|
154
150
|
});
|
|
155
151
|
});
|
|
156
152
|
});
|
|
@@ -4,37 +4,33 @@ describe('color variant tokens', () => {
|
|
|
4
4
|
describe('badgeColorVariants', () => {
|
|
5
5
|
describe('semantic variants', () => {
|
|
6
6
|
it('has success variant with green colors', () => {
|
|
7
|
-
expect(badgeColorVariants.success).toContain('text-
|
|
8
|
-
expect(badgeColorVariants.success).toContain('bg-
|
|
9
|
-
expect(badgeColorVariants.success).toContain('
|
|
10
|
-
expect(badgeColorVariants.success).toContain('
|
|
7
|
+
expect(badgeColorVariants.success).toContain('text-status-success-text');
|
|
8
|
+
expect(badgeColorVariants.success).toContain('bg-status-success-bg');
|
|
9
|
+
expect(badgeColorVariants.success).toContain('');
|
|
10
|
+
expect(badgeColorVariants.success).toContain('');
|
|
11
11
|
});
|
|
12
12
|
it('has warning variant with yellow colors', () => {
|
|
13
|
-
expect(badgeColorVariants.warning).toContain('text-
|
|
14
|
-
expect(badgeColorVariants.warning).toContain('bg-
|
|
15
|
-
expect(badgeColorVariants.warning).toContain('
|
|
16
|
-
expect(badgeColorVariants.warning).toContain('
|
|
13
|
+
expect(badgeColorVariants.warning).toContain('text-status-warning-text');
|
|
14
|
+
expect(badgeColorVariants.warning).toContain('bg-status-warning-bg');
|
|
15
|
+
expect(badgeColorVariants.warning).toContain('');
|
|
16
|
+
expect(badgeColorVariants.warning).toContain('');
|
|
17
17
|
});
|
|
18
18
|
it('has error variant with red colors', () => {
|
|
19
|
-
expect(badgeColorVariants.error).toContain('text-
|
|
20
|
-
expect(badgeColorVariants.error).toContain('bg-
|
|
21
|
-
expect(badgeColorVariants.error).toContain('dark:bg-red-900');
|
|
22
|
-
expect(badgeColorVariants.error).toContain('dark:text-red-300');
|
|
19
|
+
expect(badgeColorVariants.error).toContain('text-status-error-text');
|
|
20
|
+
expect(badgeColorVariants.error).toContain('bg-status-error-bg');
|
|
23
21
|
});
|
|
24
22
|
it('has danger variant identical to error', () => {
|
|
25
23
|
expect(badgeColorVariants.danger).toBe(badgeColorVariants.error);
|
|
26
24
|
});
|
|
27
25
|
it('has info variant with blue colors', () => {
|
|
28
|
-
expect(badgeColorVariants.info).toContain('text-
|
|
29
|
-
expect(badgeColorVariants.info).toContain('bg-
|
|
30
|
-
expect(badgeColorVariants.info).toContain('dark:bg-blue-900');
|
|
31
|
-
expect(badgeColorVariants.info).toContain('dark:text-blue-300');
|
|
26
|
+
expect(badgeColorVariants.info).toContain('text-status-info-text');
|
|
27
|
+
expect(badgeColorVariants.info).toContain('bg-status-info-bg');
|
|
32
28
|
});
|
|
33
29
|
it('has neutral variant with gray colors', () => {
|
|
34
|
-
expect(badgeColorVariants.neutral).toContain('text-
|
|
35
|
-
expect(badgeColorVariants.neutral).toContain('bg-
|
|
36
|
-
expect(badgeColorVariants.neutral).toContain('
|
|
37
|
-
expect(badgeColorVariants.neutral).toContain('
|
|
30
|
+
expect(badgeColorVariants.neutral).toContain('text-text-primary');
|
|
31
|
+
expect(badgeColorVariants.neutral).toContain('bg-muted');
|
|
32
|
+
expect(badgeColorVariants.neutral).toContain('');
|
|
33
|
+
expect(badgeColorVariants.neutral).toContain('');
|
|
38
34
|
});
|
|
39
35
|
});
|
|
40
36
|
describe('color variants', () => {
|
|
@@ -52,8 +48,8 @@ describe('color variant tokens', () => {
|
|
|
52
48
|
];
|
|
53
49
|
it.each(colorVariants)('has %s color variant', (color) => {
|
|
54
50
|
expect(badgeColorVariants[color]).toBeDefined();
|
|
55
|
-
expect(badgeColorVariants[color]).
|
|
56
|
-
expect(badgeColorVariants[color]).
|
|
51
|
+
expect(typeof badgeColorVariants[color]).toBe('string');
|
|
52
|
+
expect(badgeColorVariants[color].length).toBeGreaterThan(0);
|
|
57
53
|
});
|
|
58
54
|
it('green color variant matches success semantic variant', () => {
|
|
59
55
|
expect(badgeColorVariants.green).toBe(badgeColorVariants.success);
|
|
@@ -68,55 +64,47 @@ describe('color variant tokens', () => {
|
|
|
68
64
|
describe('special variants', () => {
|
|
69
65
|
it('has notification variant with white text and red background', () => {
|
|
70
66
|
expect(badgeColorVariants.notification).toContain('text-white');
|
|
71
|
-
expect(badgeColorVariants.notification).toContain('bg-
|
|
72
|
-
expect(badgeColorVariants.notification).toContain('
|
|
67
|
+
expect(badgeColorVariants.notification).toContain('bg-accent-danger');
|
|
68
|
+
expect(badgeColorVariants.notification).toContain('');
|
|
73
69
|
});
|
|
74
70
|
});
|
|
75
71
|
it('has exactly 17 variants', () => {
|
|
76
72
|
expect(Object.keys(badgeColorVariants)).toHaveLength(17);
|
|
77
73
|
});
|
|
78
|
-
it('all variants
|
|
74
|
+
it('all variants are non-empty strings', () => {
|
|
79
75
|
for (const [key, value] of Object.entries(badgeColorVariants)) {
|
|
80
|
-
expect(value).
|
|
76
|
+
expect(typeof value).toBe('string');
|
|
77
|
+
expect(value.length).toBeGreaterThan(0);
|
|
81
78
|
}
|
|
82
79
|
});
|
|
83
80
|
});
|
|
84
81
|
describe('alertColorVariants', () => {
|
|
85
|
-
it('has info variant with
|
|
86
|
-
expect(alertColorVariants.info).toContain('text-
|
|
87
|
-
expect(alertColorVariants.info).toContain('bg-
|
|
88
|
-
expect(alertColorVariants.info).toContain('border-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
expect(alertColorVariants.
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
expect(alertColorVariants.
|
|
97
|
-
expect(alertColorVariants.
|
|
98
|
-
expect(alertColorVariants.
|
|
99
|
-
});
|
|
100
|
-
it('has
|
|
101
|
-
expect(alertColorVariants.
|
|
102
|
-
expect(alertColorVariants.
|
|
103
|
-
expect(alertColorVariants.
|
|
104
|
-
expect(alertColorVariants.warning).toContain('dark:bg-gray-800');
|
|
105
|
-
expect(alertColorVariants.warning).toContain('dark:text-yellow-300');
|
|
106
|
-
});
|
|
107
|
-
it('has danger variant with red-50 background and border', () => {
|
|
108
|
-
expect(alertColorVariants.danger).toContain('text-red-800');
|
|
109
|
-
expect(alertColorVariants.danger).toContain('bg-red-50');
|
|
110
|
-
expect(alertColorVariants.danger).toContain('border-red-300');
|
|
111
|
-
expect(alertColorVariants.danger).toContain('dark:bg-gray-800');
|
|
112
|
-
expect(alertColorVariants.danger).toContain('dark:text-red-400');
|
|
82
|
+
it('has info variant with status-info background and border', () => {
|
|
83
|
+
expect(alertColorVariants.info).toContain('text-status-info-text');
|
|
84
|
+
expect(alertColorVariants.info).toContain('bg-status-info-bg');
|
|
85
|
+
expect(alertColorVariants.info).toContain('border-status-info-border');
|
|
86
|
+
});
|
|
87
|
+
it('has success variant with green background and border', () => {
|
|
88
|
+
expect(alertColorVariants.success).toContain('text-status-success-text');
|
|
89
|
+
expect(alertColorVariants.success).toContain('bg-status-success-bg');
|
|
90
|
+
expect(alertColorVariants.success).toContain('border-status-success-border');
|
|
91
|
+
});
|
|
92
|
+
it('has warning variant with yellow background and border', () => {
|
|
93
|
+
expect(alertColorVariants.warning).toContain('text-status-warning-text');
|
|
94
|
+
expect(alertColorVariants.warning).toContain('bg-status-warning-bg');
|
|
95
|
+
expect(alertColorVariants.warning).toContain('border-status-warning-border');
|
|
96
|
+
});
|
|
97
|
+
it('has danger variant with red background and border', () => {
|
|
98
|
+
expect(alertColorVariants.danger).toContain('text-status-error-text');
|
|
99
|
+
expect(alertColorVariants.danger).toContain('bg-status-error-bg');
|
|
100
|
+
expect(alertColorVariants.danger).toContain('border-status-error-border');
|
|
113
101
|
});
|
|
114
102
|
it('has exactly 4 variants', () => {
|
|
115
103
|
expect(Object.keys(alertColorVariants)).toHaveLength(4);
|
|
116
104
|
});
|
|
117
|
-
it('uses bg-*-
|
|
105
|
+
it('uses bg-status-*-bg pattern for semantic backgrounds', () => {
|
|
118
106
|
for (const value of Object.values(alertColorVariants)) {
|
|
119
|
-
expect(value).toMatch(/bg-\w+-
|
|
107
|
+
expect(value).toMatch(/bg-status-\w+-bg/);
|
|
120
108
|
}
|
|
121
109
|
});
|
|
122
110
|
});
|
|
@@ -129,12 +117,12 @@ describe('color variant tokens', () => {
|
|
|
129
117
|
it('includes hover states for each variant', () => {
|
|
130
118
|
for (const value of Object.values(alertCloseButtonVariants)) {
|
|
131
119
|
expect(value).toContain('hover:');
|
|
132
|
-
expect(value).toContain('
|
|
120
|
+
expect(value).toContain(':');
|
|
133
121
|
}
|
|
134
122
|
});
|
|
135
123
|
it('info close button has correct colors', () => {
|
|
136
|
-
expect(alertCloseButtonVariants.info).toContain('text-
|
|
137
|
-
expect(alertCloseButtonVariants.info).toContain('hover:bg-
|
|
124
|
+
expect(alertCloseButtonVariants.info).toContain('text-brand-primary');
|
|
125
|
+
expect(alertCloseButtonVariants.info).toContain('hover:bg-status-info-bg/80');
|
|
138
126
|
});
|
|
139
127
|
});
|
|
140
128
|
describe('spinnerColorVariants', () => {
|
|
@@ -156,7 +144,7 @@ describe('color variant tokens', () => {
|
|
|
156
144
|
expect(Object.keys(spinnerColorVariants)).toHaveLength(8);
|
|
157
145
|
});
|
|
158
146
|
it('gray spinner has dark mode support', () => {
|
|
159
|
-
expect(spinnerColorVariants.gray).toContain('
|
|
147
|
+
expect(spinnerColorVariants.gray).toContain('');
|
|
160
148
|
});
|
|
161
149
|
it('white spinner is just fill-white', () => {
|
|
162
150
|
expect(spinnerColorVariants.white).toBe('fill-white');
|
|
@@ -293,8 +281,7 @@ describe('type exports', () => {
|
|
|
293
281
|
});
|
|
294
282
|
});
|
|
295
283
|
describe('consistency checks', () => {
|
|
296
|
-
it('all badge variants
|
|
297
|
-
// Check that all non-special variants follow the same structure
|
|
284
|
+
it('all badge variants have text and background classes', () => {
|
|
298
285
|
const standardVariants = [
|
|
299
286
|
'success',
|
|
300
287
|
'warning',
|
|
@@ -312,26 +299,24 @@ describe('consistency checks', () => {
|
|
|
312
299
|
];
|
|
313
300
|
for (const variant of standardVariants) {
|
|
314
301
|
const classes = badgeColorVariants[variant];
|
|
315
|
-
// Should have text
|
|
316
|
-
expect(classes).toMatch(/text
|
|
317
|
-
expect(classes).toMatch(/bg
|
|
318
|
-
expect(classes).toMatch(/dark:bg-\w+-900/);
|
|
319
|
-
expect(classes).toMatch(/dark:text-\w+-300/);
|
|
302
|
+
// Should have both a text class and a bg class
|
|
303
|
+
expect(classes).toMatch(/text-/);
|
|
304
|
+
expect(classes).toMatch(/bg-/);
|
|
320
305
|
}
|
|
321
306
|
});
|
|
322
307
|
it('gray and neutral badge variants are identical', () => {
|
|
323
308
|
expect(badgeColorVariants.gray).toBe(badgeColorVariants.neutral);
|
|
324
309
|
});
|
|
325
|
-
it('semantic badge variants
|
|
326
|
-
// success
|
|
327
|
-
expect(badgeColorVariants.success).toContain('
|
|
328
|
-
// error
|
|
329
|
-
expect(badgeColorVariants.error).toContain('
|
|
330
|
-
// warning
|
|
331
|
-
expect(badgeColorVariants.warning).toContain('
|
|
332
|
-
// info
|
|
333
|
-
expect(badgeColorVariants.info).toContain('
|
|
334
|
-
// neutral
|
|
335
|
-
expect(badgeColorVariants.neutral).toContain('
|
|
310
|
+
it('semantic badge variants use semantic tokens', () => {
|
|
311
|
+
// success uses status-success tokens
|
|
312
|
+
expect(badgeColorVariants.success).toContain('status-success');
|
|
313
|
+
// error uses status-error or red
|
|
314
|
+
expect(badgeColorVariants.error).toContain('status-error');
|
|
315
|
+
// warning uses status-warning tokens
|
|
316
|
+
expect(badgeColorVariants.warning).toContain('status-warning');
|
|
317
|
+
// info uses status-info tokens
|
|
318
|
+
expect(badgeColorVariants.info).toContain('status-info');
|
|
319
|
+
// neutral uses muted
|
|
320
|
+
expect(badgeColorVariants.neutral).toContain('muted');
|
|
336
321
|
});
|
|
337
322
|
});
|
package/dist/tokens/tokens.css
CHANGED
|
@@ -33,21 +33,21 @@
|
|
|
33
33
|
--sidebar-primary: 221 65% 54%;
|
|
34
34
|
--sidebar-primary-foreground: 221 50% 10%;
|
|
35
35
|
|
|
36
|
-
--
|
|
37
|
-
--
|
|
38
|
-
--
|
|
39
|
-
--
|
|
40
|
-
--
|
|
41
|
-
--
|
|
42
|
-
--
|
|
43
|
-
--
|
|
44
|
-
--
|
|
45
|
-
--
|
|
46
|
-
--
|
|
47
|
-
--
|
|
48
|
-
--
|
|
49
|
-
--
|
|
50
|
-
--
|
|
36
|
+
--bg-primary: var(--bg-primary);
|
|
37
|
+
--bg-secondary: var(--bg-secondary);
|
|
38
|
+
--bg-tertiary: var(--bg-tertiary);
|
|
39
|
+
--bg-quaternary: var(--bg-quaternary);
|
|
40
|
+
--text-primary: var(--text-primary);
|
|
41
|
+
--text-secondary: var(--text-secondary);
|
|
42
|
+
--text-tertiary: var(--text-tertiary);
|
|
43
|
+
--text-tertiary: var(--text-tertiary);
|
|
44
|
+
--text-head: var(--text-head);
|
|
45
|
+
--brand-primary: var(--brand-primary);
|
|
46
|
+
--accent-warning: var(--accent-warning);
|
|
47
|
+
--accent-danger: var(--accent-danger);
|
|
48
|
+
--accent-success: var(--accent-success);
|
|
49
|
+
--stroke-primary: var(--stroke-primary);
|
|
50
|
+
--stroke-secondary: var(--stroke-secondary);
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
.dark {
|