@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
|
@@ -31,57 +31,57 @@ describe('Label Colors', () => {
|
|
|
31
31
|
test('default color is gray', () => {
|
|
32
32
|
const { container } = render(Label);
|
|
33
33
|
const label = container.querySelector('label');
|
|
34
|
-
expect(label).toHaveClass('text-
|
|
34
|
+
expect(label).toHaveClass('text-text-primary');
|
|
35
35
|
});
|
|
36
36
|
|
|
37
|
-
test('gray color applies text-
|
|
37
|
+
test('gray color applies text-text-primary', () => {
|
|
38
38
|
const { container } = render(Label, { props: { color: 'gray' } });
|
|
39
39
|
const label = container.querySelector('label');
|
|
40
|
-
expect(label).toHaveClass('text-
|
|
40
|
+
expect(label).toHaveClass('text-text-primary');
|
|
41
41
|
});
|
|
42
42
|
|
|
43
|
-
test('green color applies text-
|
|
43
|
+
test('green color applies text-status-success-text', () => {
|
|
44
44
|
const { container } = render(Label, { props: { color: 'green' } });
|
|
45
45
|
const label = container.querySelector('label');
|
|
46
|
-
expect(label).toHaveClass('text-
|
|
46
|
+
expect(label).toHaveClass('text-status-success-text');
|
|
47
47
|
});
|
|
48
48
|
|
|
49
|
-
test('red color applies text-
|
|
49
|
+
test('red color applies text-status-error-text', () => {
|
|
50
50
|
const { container } = render(Label, { props: { color: 'red' } });
|
|
51
51
|
const label = container.querySelector('label');
|
|
52
|
-
expect(label).toHaveClass('text-
|
|
52
|
+
expect(label).toHaveClass('text-status-error-text');
|
|
53
53
|
});
|
|
54
54
|
|
|
55
|
-
test('disabled color applies text-
|
|
55
|
+
test('disabled color applies text-muted-foreground', () => {
|
|
56
56
|
const { container } = render(Label, { props: { color: 'disabled' } });
|
|
57
57
|
const label = container.querySelector('label');
|
|
58
|
-
expect(label).toHaveClass('text-
|
|
58
|
+
expect(label).toHaveClass('text-muted-foreground');
|
|
59
59
|
});
|
|
60
60
|
});
|
|
61
61
|
|
|
62
|
-
describe('Label
|
|
63
|
-
test('gray
|
|
62
|
+
describe('Label Token-Based Colors', () => {
|
|
63
|
+
test('gray uses text-text-primary', () => {
|
|
64
64
|
const { container } = render(Label, { props: { color: 'gray' } });
|
|
65
65
|
const label = container.querySelector('label');
|
|
66
|
-
expect(label).toHaveClass('
|
|
66
|
+
expect(label).toHaveClass('text-text-primary');
|
|
67
67
|
});
|
|
68
68
|
|
|
69
|
-
test('green
|
|
69
|
+
test('green uses text-status-success-text', () => {
|
|
70
70
|
const { container } = render(Label, { props: { color: 'green' } });
|
|
71
71
|
const label = container.querySelector('label');
|
|
72
|
-
expect(label).toHaveClass('
|
|
72
|
+
expect(label).toHaveClass('text-status-success-text');
|
|
73
73
|
});
|
|
74
74
|
|
|
75
|
-
test('red
|
|
75
|
+
test('red uses text-status-error-text', () => {
|
|
76
76
|
const { container } = render(Label, { props: { color: 'red' } });
|
|
77
77
|
const label = container.querySelector('label');
|
|
78
|
-
expect(label).toHaveClass('
|
|
78
|
+
expect(label).toHaveClass('text-status-error-text');
|
|
79
79
|
});
|
|
80
80
|
|
|
81
|
-
test('disabled
|
|
81
|
+
test('disabled uses text-muted-foreground', () => {
|
|
82
82
|
const { container } = render(Label, { props: { color: 'disabled' } });
|
|
83
83
|
const label = container.querySelector('label');
|
|
84
|
-
expect(label).toHaveClass('
|
|
84
|
+
expect(label).toHaveClass('text-muted-foreground');
|
|
85
85
|
});
|
|
86
86
|
});
|
|
87
87
|
|
|
@@ -148,8 +148,7 @@ describe('Label Color Fallback', () => {
|
|
|
148
148
|
test('falls back to gray when an invalid color is provided', () => {
|
|
149
149
|
const { container } = render(Label, { props: { color: 'invalid-color' } });
|
|
150
150
|
const label = container.querySelector('label');
|
|
151
|
-
expect(label).toHaveClass('text-
|
|
152
|
-
expect(label).toHaveClass('dark:text-gray-300');
|
|
151
|
+
expect(label).toHaveClass('text-text-primary');
|
|
153
152
|
});
|
|
154
153
|
});
|
|
155
154
|
|
|
@@ -160,7 +159,7 @@ describe('Label Class Composition', () => {
|
|
|
160
159
|
});
|
|
161
160
|
const label = container.querySelector('label');
|
|
162
161
|
expect(label).toHaveClass('text-sm'); // from defaultClass
|
|
163
|
-
expect(label).toHaveClass('text-
|
|
162
|
+
expect(label).toHaveClass('text-status-success-text'); // from color
|
|
164
163
|
expect(label).toHaveClass('extra-class'); // from custom class
|
|
165
164
|
});
|
|
166
165
|
});
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
}: Props = $props();
|
|
21
21
|
|
|
22
22
|
const colorClasses = {
|
|
23
|
-
gray: "text-
|
|
24
|
-
green: "text-
|
|
25
|
-
red: "text-
|
|
26
|
-
disabled: "text-
|
|
23
|
+
gray: "text-text-primary",
|
|
24
|
+
green: "text-status-success-text",
|
|
25
|
+
red: "text-status-error-text",
|
|
26
|
+
disabled: "text-muted-foreground"
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
let labelClass = $derived(`${defaultClass} ${colorClasses[color] || colorClasses.gray} ${className}`.trim());
|
|
@@ -43,11 +43,11 @@
|
|
|
43
43
|
const baseClasses = 'inline-flex items-center justify-center rounded-xl font-medium leading-none focus:outline-hidden transition-all duration-150 ease-out select-none no-underline hover:no-underline shadow hover:shadow-md';
|
|
44
44
|
|
|
45
45
|
const variantClasses = {
|
|
46
|
-
primary: 'text-white bg-
|
|
47
|
-
secondary: 'text-
|
|
46
|
+
primary: 'text-white bg-brand-primary border border-brand-primary hover:bg-brand-primary',
|
|
47
|
+
secondary: 'text-text-secondary bg-card border border-border hover:border-stroke-primary hover:text-text-primary',
|
|
48
48
|
};
|
|
49
49
|
|
|
50
|
-
const disabledClasses = 'bg-
|
|
50
|
+
const disabledClasses = 'bg-bg-tertiary border-border text-muted-foreground cursor-not-allowed shadow-none';
|
|
51
51
|
|
|
52
52
|
// Landing size from tokens
|
|
53
53
|
let sizeClass = $derived(buttonSizes.landing);
|
|
@@ -29,19 +29,19 @@ describe('MenuItem', () => {
|
|
|
29
29
|
test('applies default (non-danger) styling', () => {
|
|
30
30
|
const { container } = render(MenuItem);
|
|
31
31
|
const button = container.querySelector('button');
|
|
32
|
-
expect(button.className).toContain('text-
|
|
32
|
+
expect(button.className).toContain('text-text-primary');
|
|
33
33
|
});
|
|
34
34
|
|
|
35
35
|
test('applies danger styling', () => {
|
|
36
36
|
const { container } = render(MenuItem, { props: { danger: true } });
|
|
37
37
|
const button = container.querySelector('button');
|
|
38
|
-
expect(button.className).toContain('text-
|
|
38
|
+
expect(button.className).toContain('text-accent-danger');
|
|
39
39
|
});
|
|
40
40
|
|
|
41
41
|
test('applies active styling', () => {
|
|
42
42
|
const { container } = render(MenuItem, { props: { active: true } });
|
|
43
43
|
const button = container.querySelector('button');
|
|
44
|
-
expect(button.className).toContain('bg-
|
|
44
|
+
expect(button.className).toContain('bg-status-info-bg');
|
|
45
45
|
});
|
|
46
46
|
|
|
47
47
|
test('applies disabled state', () => {
|
|
@@ -117,8 +117,8 @@ describe('MenuItem', () => {
|
|
|
117
117
|
test('danger + active combination applies danger active styling', () => {
|
|
118
118
|
const { container } = render(MenuItem, { props: { danger: true, active: true } });
|
|
119
119
|
const button = container.querySelector('button');
|
|
120
|
-
expect(button.className).toContain('text-
|
|
121
|
-
expect(button.className).toContain('bg-
|
|
120
|
+
expect(button.className).toContain('text-accent-danger');
|
|
121
|
+
expect(button.className).toContain('bg-status-info-bg');
|
|
122
122
|
});
|
|
123
123
|
|
|
124
124
|
test('unknown size falls back to md sizing', () => {
|
|
@@ -44,12 +44,12 @@
|
|
|
44
44
|
const baseClasses = 'w-full text-left whitespace-nowrap bg-transparent border-transparent rounded-lg font-medium leading-none focus:outline-hidden transition-all duration-150 ease-out select-none';
|
|
45
45
|
|
|
46
46
|
const variantClasses = {
|
|
47
|
-
default: 'text-
|
|
48
|
-
danger: 'text-
|
|
47
|
+
default: 'text-text-primary hover:bg-muted',
|
|
48
|
+
danger: 'text-accent-danger hover:bg-status-error-bg',
|
|
49
49
|
};
|
|
50
50
|
|
|
51
|
-
const activeClasses = 'bg-
|
|
52
|
-
const disabledClasses = 'text-
|
|
51
|
+
const activeClasses = 'bg-status-info-bg';
|
|
52
|
+
const disabledClasses = 'text-muted-foreground cursor-not-allowed';
|
|
53
53
|
|
|
54
54
|
let sizeClass = $derived(buttonMenuItemSizes[size] || buttonMenuItemSizes.md);
|
|
55
55
|
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
<h2 class="text-xl font-semibold mb-2">Modal Title</h2>
|
|
28
28
|
{/snippet}
|
|
29
29
|
{#snippet body()}
|
|
30
|
-
<p class="text-
|
|
30
|
+
<p class="text-muted-foreground">This is the modal body content.</p>
|
|
31
31
|
{/snippet}
|
|
32
32
|
{#snippet footer()}
|
|
33
33
|
<button
|
|
34
34
|
onclick={() => (show1 = false)}
|
|
35
|
-
class="px-4 py-2 bg-
|
|
35
|
+
class="px-4 py-2 bg-bg-tertiary text-white rounded-lg"
|
|
36
36
|
>
|
|
37
37
|
Close
|
|
38
38
|
</button>
|
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
{#snippet body()}
|
|
52
52
|
<div class="flex flex-col items-center gap-4">
|
|
53
53
|
<div
|
|
54
|
-
class="animate-spin rounded-full h-12 w-12 border-b-2 border-
|
|
54
|
+
class="animate-spin rounded-full h-12 w-12 border-b-2 border-brand-primary"
|
|
55
55
|
></div>
|
|
56
|
-
<p class="text-
|
|
56
|
+
<p class="text-muted-foreground">Processing your request...</p>
|
|
57
57
|
</div>
|
|
58
58
|
{/snippet}
|
|
59
59
|
</ModalProgress>
|
|
@@ -62,22 +62,22 @@
|
|
|
62
62
|
<Story name="Success State">
|
|
63
63
|
<button
|
|
64
64
|
onclick={() => (show3 = true)}
|
|
65
|
-
class="px-4 py-2 bg-
|
|
65
|
+
class="px-4 py-2 bg-accent-success text-white rounded-lg"
|
|
66
66
|
>
|
|
67
67
|
Open Success Modal
|
|
68
68
|
</button>
|
|
69
69
|
<ModalProgress bind:open={show3} isSuccess={true}>
|
|
70
70
|
{#snippet body()}
|
|
71
71
|
<div class="flex flex-col items-center gap-4 text-center">
|
|
72
|
-
<div class="text-
|
|
72
|
+
<div class="text-accent-success text-5xl">✓</div>
|
|
73
73
|
<h3 class="text-xl font-semibold">Success!</h3>
|
|
74
|
-
<p class="text-
|
|
74
|
+
<p class="text-muted-foreground">Your action was completed successfully.</p>
|
|
75
75
|
</div>
|
|
76
76
|
{/snippet}
|
|
77
77
|
{#snippet footer()}
|
|
78
78
|
<button
|
|
79
79
|
onclick={() => (show3 = false)}
|
|
80
|
-
class="px-4 py-2 bg-
|
|
80
|
+
class="px-4 py-2 bg-accent-success text-white rounded-lg"
|
|
81
81
|
>
|
|
82
82
|
Done
|
|
83
83
|
</button>
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
<!-- svelte-ignore a11y_click_events_have_key_events -->
|
|
122
122
|
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
123
123
|
<div
|
|
124
|
-
class="fixed inset-0 flex bg-
|
|
124
|
+
class="fixed inset-0 flex bg-overlay-bg z-50 items-end justify-center md:items-center md:p-4 touch-none overscroll-none"
|
|
125
125
|
onmousedown={(e) => {
|
|
126
126
|
// Only track direct clicks on backdrop, not drags that end on backdrop
|
|
127
127
|
if (e.target === e.currentTarget && !persistent) {
|
|
@@ -145,13 +145,13 @@
|
|
|
145
145
|
<!-- svelte-ignore a11y_click_events_have_key_events -->
|
|
146
146
|
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
147
147
|
<div
|
|
148
|
-
class="md:hidden bg-
|
|
148
|
+
class="md:hidden bg-card rounded-t-3xl w-full max-h-[90vh] max-h-[90dvh] overflow-hidden flex flex-col shadow-[0_-10px_40px_rgba(0,0,0,0.15)] touch-pan-y overscroll-contain"
|
|
149
149
|
onclick={(e) => e.stopPropagation()}
|
|
150
150
|
transition:fly={{ y: 300, duration: 300, easing: cubicOut }}
|
|
151
151
|
>
|
|
152
152
|
<!-- Handle bar -->
|
|
153
153
|
<div class="flex justify-center pt-3 pb-1 shrink-0">
|
|
154
|
-
<div class="w-10 h-1 bg-
|
|
154
|
+
<div class="w-10 h-1 bg-bg-quaternary rounded-xs"></div>
|
|
155
155
|
</div>
|
|
156
156
|
|
|
157
157
|
<div class="p-6 pb-[calc(5rem+env(safe-area-inset-bottom,0px))] overflow-y-auto flex-1">
|
|
@@ -167,7 +167,7 @@
|
|
|
167
167
|
<!-- svelte-ignore a11y_click_events_have_key_events -->
|
|
168
168
|
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
169
169
|
<div
|
|
170
|
-
class="hidden md:block bg-
|
|
170
|
+
class="hidden md:block bg-card p-6 rounded-lg {modalSizeClass} w-full max-h-[calc(100vh-4rem)] overflow-y-auto shadow-2xl"
|
|
171
171
|
onclick={(e) => e.stopPropagation()}
|
|
172
172
|
transition:fly={{ y: 20, duration: 200 }}
|
|
173
173
|
>
|
|
@@ -31,13 +31,13 @@ describe('NavItem', () => {
|
|
|
31
31
|
test('applies default (inactive) styling', () => {
|
|
32
32
|
const { container } = render(NavItem);
|
|
33
33
|
const button = container.querySelector('button');
|
|
34
|
-
expect(button.className).toContain('text-
|
|
34
|
+
expect(button.className).toContain('text-muted-foreground');
|
|
35
35
|
});
|
|
36
36
|
|
|
37
37
|
test('applies active styling', () => {
|
|
38
38
|
const { container } = render(NavItem, { props: { active: true } });
|
|
39
39
|
const button = container.querySelector('button');
|
|
40
|
-
expect(button.className).toContain('text-
|
|
40
|
+
expect(button.className).toContain('text-brand-primary');
|
|
41
41
|
});
|
|
42
42
|
|
|
43
43
|
test('applies disabled styling', () => {
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
}: Props = $props();
|
|
36
36
|
|
|
37
37
|
const baseClasses = 'flex flex-col items-center justify-center h-full py-2 bg-transparent border-transparent rounded-lg font-medium leading-none focus:outline-hidden transition-all duration-150 ease-out select-none';
|
|
38
|
-
const defaultClasses = 'text-
|
|
39
|
-
const activeClasses = 'text-
|
|
40
|
-
const disabledClasses = 'text-
|
|
38
|
+
const defaultClasses = 'text-muted-foreground hover:text-brand-primary';
|
|
39
|
+
const activeClasses = 'text-brand-primary';
|
|
40
|
+
const disabledClasses = 'text-muted-foreground cursor-not-allowed';
|
|
41
41
|
|
|
42
42
|
let variantClass = $derived(() => {
|
|
43
43
|
if (disabled) return disabledClasses;
|
|
@@ -146,54 +146,54 @@ describe('NumberInput Styling', () => {
|
|
|
146
146
|
expect(incrementBtn).toHaveClass('rounded-r-lg');
|
|
147
147
|
});
|
|
148
148
|
|
|
149
|
-
test('buttons have bg-
|
|
149
|
+
test('buttons have bg-muted background', () => {
|
|
150
150
|
const { container } = render(NumberInput);
|
|
151
151
|
const decrementBtn = container.querySelector('[aria-label="Decrease quantity"]');
|
|
152
|
-
expect(decrementBtn).toHaveClass('bg-
|
|
152
|
+
expect(decrementBtn).toHaveClass('bg-muted');
|
|
153
153
|
});
|
|
154
154
|
|
|
155
|
-
test('buttons have border-
|
|
155
|
+
test('buttons have border-stroke-primary border', () => {
|
|
156
156
|
const { container } = render(NumberInput);
|
|
157
157
|
const decrementBtn = container.querySelector('[aria-label="Decrease quantity"]');
|
|
158
|
-
expect(decrementBtn).toHaveClass('border-
|
|
158
|
+
expect(decrementBtn).toHaveClass('border-stroke-primary');
|
|
159
159
|
});
|
|
160
160
|
|
|
161
|
-
test('display has bg-
|
|
161
|
+
test('display has bg-bg-secondary background', () => {
|
|
162
162
|
const { container } = render(NumberInput);
|
|
163
163
|
const display = container.querySelector('span');
|
|
164
|
-
expect(display).toHaveClass('bg-
|
|
164
|
+
expect(display).toHaveClass('bg-bg-secondary');
|
|
165
165
|
});
|
|
166
166
|
|
|
167
|
-
test('display has text-
|
|
167
|
+
test('display has text-muted-foreground color', () => {
|
|
168
168
|
const { container } = render(NumberInput);
|
|
169
169
|
const display = container.querySelector('span');
|
|
170
|
-
expect(display).toHaveClass('text-
|
|
170
|
+
expect(display).toHaveClass('text-muted-foreground');
|
|
171
171
|
});
|
|
172
172
|
});
|
|
173
173
|
|
|
174
|
-
describe('NumberInput
|
|
175
|
-
test('buttons have
|
|
174
|
+
describe('NumberInput Token-Based Styling', () => {
|
|
175
|
+
test('buttons have token-based background', () => {
|
|
176
176
|
const { container } = render(NumberInput);
|
|
177
177
|
const decrementBtn = container.querySelector('[aria-label="Decrease quantity"]');
|
|
178
|
-
expect(decrementBtn).toHaveClass('
|
|
178
|
+
expect(decrementBtn).toHaveClass('bg-muted');
|
|
179
179
|
});
|
|
180
180
|
|
|
181
|
-
test('buttons have
|
|
181
|
+
test('buttons have token-based border', () => {
|
|
182
182
|
const { container } = render(NumberInput);
|
|
183
183
|
const decrementBtn = container.querySelector('[aria-label="Decrease quantity"]');
|
|
184
|
-
expect(decrementBtn).toHaveClass('
|
|
184
|
+
expect(decrementBtn).toHaveClass('border-stroke-primary');
|
|
185
185
|
});
|
|
186
186
|
|
|
187
|
-
test('display has
|
|
187
|
+
test('display has token-based background', () => {
|
|
188
188
|
const { container } = render(NumberInput);
|
|
189
189
|
const display = container.querySelector('span');
|
|
190
|
-
expect(display).toHaveClass('
|
|
190
|
+
expect(display).toHaveClass('bg-bg-secondary');
|
|
191
191
|
});
|
|
192
192
|
|
|
193
|
-
test('display has
|
|
193
|
+
test('display has token-based text color', () => {
|
|
194
194
|
const { container } = render(NumberInput);
|
|
195
195
|
const display = container.querySelector('span');
|
|
196
|
-
expect(display).toHaveClass('
|
|
196
|
+
expect(display).toHaveClass('text-muted-foreground');
|
|
197
197
|
});
|
|
198
198
|
});
|
|
199
199
|
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* Quantity stepper with increment/decrement buttons
|
|
5
5
|
*
|
|
6
6
|
* Matches Figma design:
|
|
7
|
-
* - Buttons: bg-
|
|
8
|
-
* - Display: bg-
|
|
7
|
+
* - Buttons: bg-muted, border-stroke-primary, outer corners rounded
|
|
8
|
+
* - Display: bg-bg-secondary, border-stroke-primary
|
|
9
9
|
* - Height: 37px
|
|
10
10
|
* - Icons: 10x10px
|
|
11
11
|
*/
|
|
@@ -55,9 +55,9 @@
|
|
|
55
55
|
let isMaxDisabled = $derived(disabled || value >= max);
|
|
56
56
|
|
|
57
57
|
// Button base classes matching Figma spec
|
|
58
|
-
const buttonBase = "h-[37px] px-3 flex items-center justify-center bg-
|
|
59
|
-
const buttonHover = "hover:bg-
|
|
60
|
-
const buttonDisabled = "disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-
|
|
58
|
+
const buttonBase = "h-[37px] px-3 flex items-center justify-center bg-muted border border-stroke-primary transition-colors";
|
|
59
|
+
const buttonHover = "hover:bg-bg-tertiary";
|
|
60
|
+
const buttonDisabled = "disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-muted:hover:bg-bg-secondary";
|
|
61
61
|
|
|
62
62
|
let decrementClasses = $derived(twMerge(
|
|
63
63
|
buttonBase,
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
));
|
|
75
75
|
|
|
76
76
|
// Display classes matching Figma spec
|
|
77
|
-
const displayClasses = "h-[37px] px-4 flex items-center justify-center text-
|
|
77
|
+
const displayClasses = "h-[37px] px-4 flex items-center justify-center text-muted-foreground text-sm bg-bg-secondary border-y border-stroke-primary -mx-px";
|
|
78
78
|
|
|
79
79
|
let containerClasses = $derived(twMerge(
|
|
80
80
|
"inline-flex items-center",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
disabled={isMinDisabled}
|
|
91
91
|
aria-label={labels.decreaseQuantity}
|
|
92
92
|
>
|
|
93
|
-
<svg class="w-3 h-3 text-
|
|
93
|
+
<svg class="w-3 h-3 text-text-primary" fill="none" viewBox="0 0 18 2">
|
|
94
94
|
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M1 1h16"/>
|
|
95
95
|
</svg>
|
|
96
96
|
</button>
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
disabled={isMaxDisabled}
|
|
107
107
|
aria-label={labels.increaseQuantity}
|
|
108
108
|
>
|
|
109
|
-
<svg class="w-3 h-3 text-
|
|
109
|
+
<svg class="w-3 h-3 text-text-primary" fill="none" viewBox="0 0 18 18">
|
|
110
110
|
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 1v16M1 9h16"/>
|
|
111
111
|
</svg>
|
|
112
112
|
</button>
|
|
@@ -31,14 +31,14 @@
|
|
|
31
31
|
|
|
32
32
|
const variantClasses: Record<string, { active: string; inactive: string; hover: string }> = {
|
|
33
33
|
light: {
|
|
34
|
-
active: 'bg-
|
|
35
|
-
inactive: 'bg-
|
|
36
|
-
hover: 'hover:bg-
|
|
34
|
+
active: 'bg-card',
|
|
35
|
+
inactive: 'bg-card/30',
|
|
36
|
+
hover: 'hover:bg-card/50',
|
|
37
37
|
},
|
|
38
38
|
dark: {
|
|
39
|
-
active: 'bg-
|
|
40
|
-
inactive: 'bg-
|
|
41
|
-
hover: 'hover:bg-
|
|
39
|
+
active: 'bg-bg-primary',
|
|
40
|
+
inactive: 'bg-bg-quaternary',
|
|
41
|
+
hover: 'hover:bg-muted-foreground',
|
|
42
42
|
},
|
|
43
43
|
};
|
|
44
44
|
|
|
@@ -193,13 +193,13 @@ describe('Pagination Button Styling', () => {
|
|
|
193
193
|
const { container } = render(Pagination, { props: { totalPages: 3 } });
|
|
194
194
|
const button = container.querySelector('[aria-label="Previous page"]');
|
|
195
195
|
expect(button).toHaveClass('border');
|
|
196
|
-
expect(button).toHaveClass('border-
|
|
196
|
+
expect(button).toHaveClass('border-stroke-primary');
|
|
197
197
|
});
|
|
198
198
|
|
|
199
|
-
test('buttons have bg-
|
|
199
|
+
test('buttons have bg-card background', () => {
|
|
200
200
|
const { container } = render(Pagination, { props: { totalPages: 3, currentPage: 1 } });
|
|
201
201
|
const nextButton = container.querySelector('[aria-label="Next page"]');
|
|
202
|
-
expect(nextButton).toHaveClass('bg-
|
|
202
|
+
expect(nextButton).toHaveClass('bg-card');
|
|
203
203
|
});
|
|
204
204
|
|
|
205
205
|
test('prev button has rounded-s-lg', () => {
|
|
@@ -214,11 +214,11 @@ describe('Pagination Button Styling', () => {
|
|
|
214
214
|
expect(nextButton).toHaveClass('rounded-e-lg');
|
|
215
215
|
});
|
|
216
216
|
|
|
217
|
-
test('active page has bg-
|
|
217
|
+
test('active page has bg-status-info-bg', () => {
|
|
218
218
|
const { container } = render(Pagination, { props: { totalPages: 3, currentPage: 2 } });
|
|
219
219
|
const activeButton = container.querySelector('[aria-current="page"]');
|
|
220
|
-
expect(activeButton).toHaveClass('bg-
|
|
221
|
-
expect(activeButton).toHaveClass('text-
|
|
220
|
+
expect(activeButton).toHaveClass('bg-status-info-bg');
|
|
221
|
+
expect(activeButton).toHaveClass('text-brand-primary');
|
|
222
222
|
});
|
|
223
223
|
|
|
224
224
|
test('disabled buttons have opacity-50', () => {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
{#snippet template()}
|
|
29
29
|
<div>
|
|
30
30
|
<Pagination totalPages={10} bind:currentPage={page1} />
|
|
31
|
-
<p class="text-sm text-
|
|
31
|
+
<p class="text-sm text-muted-foreground mt-4">Current page: {page1}</p>
|
|
32
32
|
</div>
|
|
33
33
|
{/snippet}
|
|
34
34
|
</Story>
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
{#snippet template()}
|
|
38
38
|
<div>
|
|
39
39
|
<Pagination totalPages={10} bind:currentPage={page2} />
|
|
40
|
-
<p class="text-sm text-
|
|
40
|
+
<p class="text-sm text-muted-foreground mt-4">Current page: {page2}</p>
|
|
41
41
|
</div>
|
|
42
42
|
{/snippet}
|
|
43
43
|
</Story>
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
{#snippet template()}
|
|
47
47
|
<div>
|
|
48
48
|
<Pagination totalPages={3} bind:currentPage={page3} />
|
|
49
|
-
<p class="text-sm text-
|
|
49
|
+
<p class="text-sm text-muted-foreground mt-4">Current page: {page3}</p>
|
|
50
50
|
</div>
|
|
51
51
|
{/snippet}
|
|
52
52
|
</Story>
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
<h3 class="font-medium mb-4">Search Results</h3>
|
|
64
64
|
<ul class="space-y-2 mb-4">
|
|
65
65
|
{#each [1, 2, 3, 4, 5] as i}
|
|
66
|
-
<li class="p-3 border rounded hover:bg-
|
|
66
|
+
<li class="p-3 border rounded hover:bg-bg-secondary">
|
|
67
67
|
Result item {i}
|
|
68
68
|
</li>
|
|
69
69
|
{/each}
|
|
@@ -116,10 +116,10 @@
|
|
|
116
116
|
let showEndEllipsis = $derived(visiblePages[visiblePages.length - 1] < totalPages);
|
|
117
117
|
|
|
118
118
|
// Base button classes (Flowbite connected style)
|
|
119
|
-
const baseButtonClasses = "flex items-center justify-center leading-tight font-medium border border-
|
|
119
|
+
const baseButtonClasses = "flex items-center justify-center leading-tight font-medium border border-stroke-primary bg-card text-muted-foreground hover:bg-muted hover:text-text-secondary";
|
|
120
120
|
|
|
121
121
|
// Active state classes (Flowbite style)
|
|
122
|
-
const activeClasses = "flex items-center justify-center leading-tight font-medium border border-
|
|
122
|
+
const activeClasses = "flex items-center justify-center leading-tight font-medium border border-stroke-primary bg-status-info-bg text-brand-primary hover:bg-status-info-bg hover:text-brand-primary";
|
|
123
123
|
|
|
124
124
|
// Disabled state classes
|
|
125
125
|
const disabledClasses = "cursor-not-allowed opacity-50";
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
|
|
128
128
|
{#if variant === 'table'}
|
|
129
129
|
<div class="flex flex-col items-center gap-3 sm:flex-row sm:justify-between {className}" {...restProps}>
|
|
130
|
-
<span class={`${typography.sm} text-
|
|
130
|
+
<span class={`${typography.sm} text-text-secondary`}>
|
|
131
131
|
{labels.showing} <span class={`font-semibold ${typography.sm}`}>{startItem}</span> {labels.to} <span class={`font-semibold ${typography.sm}`}>{endItem}</span> {labels.of} <span class={`font-semibold ${typography.sm}`}>{totalItems}</span> {labels.entries}
|
|
132
132
|
</span>
|
|
133
133
|
<nav class="inline-flex -space-x-px rtl:space-x-reverse" aria-label={labels.pagination}>
|
|
@@ -68,37 +68,37 @@ describe('Radio Colors', () => {
|
|
|
68
68
|
test('default color is blue', () => {
|
|
69
69
|
const { container } = render(Radio);
|
|
70
70
|
const input = container.querySelector('input');
|
|
71
|
-
expect(input).toHaveClass('text-
|
|
71
|
+
expect(input).toHaveClass('text-brand-primary');
|
|
72
72
|
});
|
|
73
73
|
|
|
74
|
-
test('red color applies text-
|
|
74
|
+
test('red color applies text-accent-danger', () => {
|
|
75
75
|
const { container } = render(Radio, { props: { color: 'red' } });
|
|
76
76
|
const input = container.querySelector('input');
|
|
77
|
-
expect(input).toHaveClass('text-
|
|
77
|
+
expect(input).toHaveClass('text-accent-danger');
|
|
78
78
|
});
|
|
79
79
|
|
|
80
|
-
test('green color applies text-
|
|
80
|
+
test('green color applies text-accent-success', () => {
|
|
81
81
|
const { container } = render(Radio, { props: { color: 'green' } });
|
|
82
82
|
const input = container.querySelector('input');
|
|
83
|
-
expect(input).toHaveClass('text-
|
|
83
|
+
expect(input).toHaveClass('text-accent-success');
|
|
84
84
|
});
|
|
85
85
|
|
|
86
|
-
test('purple color applies text-
|
|
86
|
+
test('purple color applies text-brand-primary', () => {
|
|
87
87
|
const { container } = render(Radio, { props: { color: 'purple' } });
|
|
88
88
|
const input = container.querySelector('input');
|
|
89
|
-
expect(input).toHaveClass('text-
|
|
89
|
+
expect(input).toHaveClass('text-brand-primary');
|
|
90
90
|
});
|
|
91
91
|
|
|
92
|
-
test('orange color applies text-
|
|
92
|
+
test('orange color applies text-accent-warning', () => {
|
|
93
93
|
const { container } = render(Radio, { props: { color: 'orange' } });
|
|
94
94
|
const input = container.querySelector('input');
|
|
95
|
-
expect(input).toHaveClass('text-
|
|
95
|
+
expect(input).toHaveClass('text-accent-warning');
|
|
96
96
|
});
|
|
97
97
|
|
|
98
|
-
test('yellow color applies text-
|
|
98
|
+
test('yellow color applies text-accent-warning', () => {
|
|
99
99
|
const { container } = render(Radio, { props: { color: 'yellow' } });
|
|
100
100
|
const input = container.querySelector('input');
|
|
101
|
-
expect(input).toHaveClass('text-
|
|
101
|
+
expect(input).toHaveClass('text-accent-warning');
|
|
102
102
|
});
|
|
103
103
|
});
|
|
104
104
|
|
|
@@ -110,28 +110,28 @@ describe('Radio Input Styling', () => {
|
|
|
110
110
|
expect(input).toHaveClass('h-4');
|
|
111
111
|
});
|
|
112
112
|
|
|
113
|
-
test('has bg-
|
|
113
|
+
test('has bg-muted background', () => {
|
|
114
114
|
const { container } = render(Radio);
|
|
115
115
|
const input = container.querySelector('input');
|
|
116
|
-
expect(input).toHaveClass('bg-
|
|
116
|
+
expect(input).toHaveClass('bg-muted');
|
|
117
117
|
});
|
|
118
118
|
|
|
119
|
-
test('has border-
|
|
119
|
+
test('has border-stroke-primary border', () => {
|
|
120
120
|
const { container } = render(Radio);
|
|
121
121
|
const input = container.querySelector('input');
|
|
122
|
-
expect(input).toHaveClass('border-
|
|
122
|
+
expect(input).toHaveClass('border-stroke-primary');
|
|
123
123
|
});
|
|
124
124
|
|
|
125
|
-
test('has
|
|
125
|
+
test('has token-based background', () => {
|
|
126
126
|
const { container } = render(Radio);
|
|
127
127
|
const input = container.querySelector('input');
|
|
128
|
-
expect(input).toHaveClass('
|
|
128
|
+
expect(input).toHaveClass('bg-muted');
|
|
129
129
|
});
|
|
130
130
|
|
|
131
|
-
test('has
|
|
131
|
+
test('has token-based border', () => {
|
|
132
132
|
const { container } = render(Radio);
|
|
133
133
|
const input = container.querySelector('input');
|
|
134
|
-
expect(input).toHaveClass('
|
|
134
|
+
expect(input).toHaveClass('border-stroke-primary');
|
|
135
135
|
});
|
|
136
136
|
|
|
137
137
|
test('has focus:outline-hidden', () => {
|