@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
|
@@ -18,7 +18,7 @@ describe('DataTable Component', () => {
|
|
|
18
18
|
const { container } = render(DataTable);
|
|
19
19
|
const wrapper = container.querySelector('.overflow-x-auto');
|
|
20
20
|
expect(wrapper).toBeInTheDocument();
|
|
21
|
-
expect(wrapper).toHaveClass('rounded-lg', 'border', 'border-
|
|
21
|
+
expect(wrapper).toHaveClass('rounded-lg', 'border', 'border-border');
|
|
22
22
|
});
|
|
23
23
|
|
|
24
24
|
it('applies custom className', () => {
|
|
@@ -37,7 +37,7 @@ describe('DataTable Component', () => {
|
|
|
37
37
|
it('applies striped classes when striped is true', () => {
|
|
38
38
|
const { container } = render(DataTable, { props: { striped: true } });
|
|
39
39
|
const tbody = container.querySelector('tbody');
|
|
40
|
-
expect(tbody.className).toContain('[&>tr:nth-child(odd)]:bg-
|
|
40
|
+
expect(tbody.className).toContain('[&>tr:nth-child(odd)]:bg-bg-secondary');
|
|
41
41
|
});
|
|
42
42
|
});
|
|
43
43
|
|
|
@@ -45,13 +45,13 @@ describe('DataTable Component', () => {
|
|
|
45
45
|
it('applies hover classes by default', () => {
|
|
46
46
|
const { container } = render(DataTable);
|
|
47
47
|
const tbody = container.querySelector('tbody');
|
|
48
|
-
expect(tbody.className).toContain('[&>tr]:hover:bg-
|
|
48
|
+
expect(tbody.className).toContain('[&>tr]:hover:bg-bg-secondary');
|
|
49
49
|
});
|
|
50
50
|
|
|
51
51
|
it('does not apply hover classes when hoverable is false', () => {
|
|
52
52
|
const { container } = render(DataTable, { props: { hoverable: false } });
|
|
53
53
|
const tbody = container.querySelector('tbody');
|
|
54
|
-
expect(tbody.className).not.toContain('[&>tr]:hover:bg-
|
|
54
|
+
expect(tbody.className).not.toContain('[&>tr]:hover:bg-bg-secondary');
|
|
55
55
|
});
|
|
56
56
|
});
|
|
57
57
|
|
|
@@ -106,7 +106,7 @@ describe('DataTable Component', () => {
|
|
|
106
106
|
it('tbody has divide styles', () => {
|
|
107
107
|
const { container } = render(DataTable);
|
|
108
108
|
const tbody = container.querySelector('tbody');
|
|
109
|
-
expect(tbody).toHaveClass('divide-y', 'divide-
|
|
109
|
+
expect(tbody).toHaveClass('divide-y', 'divide-border');
|
|
110
110
|
});
|
|
111
111
|
|
|
112
112
|
it('table has full width', () => {
|
|
@@ -126,31 +126,31 @@ describe('DataTable Component', () => {
|
|
|
126
126
|
it('includes dark mode border classes', () => {
|
|
127
127
|
const { container } = render(DataTable);
|
|
128
128
|
const wrapper = container.querySelector('.overflow-x-auto');
|
|
129
|
-
expect(wrapper.className).toContain('
|
|
129
|
+
expect(wrapper.className).toContain('');
|
|
130
130
|
});
|
|
131
131
|
|
|
132
132
|
it('includes dark mode divide classes on tbody', () => {
|
|
133
133
|
const { container } = render(DataTable);
|
|
134
134
|
const tbody = container.querySelector('tbody');
|
|
135
|
-
expect(tbody.className).toContain('
|
|
135
|
+
expect(tbody.className).toContain('');
|
|
136
136
|
});
|
|
137
137
|
|
|
138
|
-
it('
|
|
138
|
+
it('striped classes use token-based bg (auto dark mode via CSS vars)', () => {
|
|
139
139
|
const { container } = render(DataTable, { props: { striped: true } });
|
|
140
140
|
const tbody = container.querySelector('tbody');
|
|
141
|
-
expect(tbody.className).toContain('
|
|
141
|
+
expect(tbody.className).toContain('[&>tr:nth-child(odd)]:bg-bg-secondary');
|
|
142
142
|
});
|
|
143
143
|
|
|
144
|
-
it('
|
|
144
|
+
it('hover classes use token-based bg (auto dark mode via CSS vars)', () => {
|
|
145
145
|
const { container } = render(DataTable, { props: { hoverable: true } });
|
|
146
146
|
const tbody = container.querySelector('tbody');
|
|
147
|
-
expect(tbody.className).toContain('
|
|
147
|
+
expect(tbody.className).toContain('[&>tr]:hover:bg-bg-secondary');
|
|
148
148
|
});
|
|
149
149
|
|
|
150
|
-
it('
|
|
150
|
+
it('bordered classes use token-based border (auto dark mode via CSS vars)', () => {
|
|
151
151
|
const { container } = render(DataTable, { props: { bordered: true } });
|
|
152
152
|
const tbody = container.querySelector('tbody');
|
|
153
|
-
expect(tbody.className).toContain('
|
|
153
|
+
expect(tbody.className).toContain('[&_td]:border-border');
|
|
154
154
|
});
|
|
155
155
|
});
|
|
156
156
|
|
|
@@ -158,7 +158,7 @@ describe('DataTable Component', () => {
|
|
|
158
158
|
it('can combine striped and bordered', () => {
|
|
159
159
|
const { container } = render(DataTable, { props: { striped: true, bordered: true } });
|
|
160
160
|
const tbody = container.querySelector('tbody');
|
|
161
|
-
expect(tbody.className).toContain('[&>tr:nth-child(odd)]:bg-
|
|
161
|
+
expect(tbody.className).toContain('[&>tr:nth-child(odd)]:bg-bg-secondary');
|
|
162
162
|
expect(tbody.className).toContain('[&_td]:border-x');
|
|
163
163
|
});
|
|
164
164
|
|
|
@@ -175,9 +175,9 @@ describe('DataTable Component', () => {
|
|
|
175
175
|
const wrapper = container.querySelector('.overflow-x-auto');
|
|
176
176
|
expect(wrapper).toHaveClass('test-class');
|
|
177
177
|
const tbody = container.querySelector('tbody');
|
|
178
|
-
expect(tbody.className).toContain('[&>tr:nth-child(odd)]:bg-
|
|
178
|
+
expect(tbody.className).toContain('[&>tr:nth-child(odd)]:bg-bg-secondary');
|
|
179
179
|
expect(tbody.className).toContain('[&_td]:border-x');
|
|
180
|
-
expect(tbody.className).toContain('[&>tr]:hover:bg-
|
|
180
|
+
expect(tbody.className).toContain('[&>tr]:hover:bg-bg-secondary');
|
|
181
181
|
});
|
|
182
182
|
|
|
183
183
|
it('can disable all visual effects', () => {
|
|
@@ -209,7 +209,7 @@ describe('DataTable Component', () => {
|
|
|
209
209
|
const { container } = render(DataTable, { props: { header } });
|
|
210
210
|
const thead = container.querySelector('thead');
|
|
211
211
|
expect(thead).toBeInTheDocument();
|
|
212
|
-
expect(thead).toHaveClass('text-xs', 'uppercase', 'bg-
|
|
212
|
+
expect(thead).toHaveClass('text-xs', 'uppercase', 'bg-bg-secondary');
|
|
213
213
|
});
|
|
214
214
|
|
|
215
215
|
it('header receives cellSize as argument', () => {
|
|
@@ -228,7 +228,7 @@ describe('DataTable Component', () => {
|
|
|
228
228
|
}));
|
|
229
229
|
const { container } = render(DataTable, { props: { header } });
|
|
230
230
|
const thead = container.querySelector('thead');
|
|
231
|
-
expect(thead.className).toContain('
|
|
231
|
+
expect(thead.className).toContain('');
|
|
232
232
|
});
|
|
233
233
|
});
|
|
234
234
|
|
|
@@ -20,15 +20,15 @@
|
|
|
20
20
|
let cellSize = $derived(sizeClasses[size] || sizeClasses.md);
|
|
21
21
|
</script>
|
|
22
22
|
|
|
23
|
-
<div class="overflow-x-auto rounded-lg border border-
|
|
23
|
+
<div class="overflow-x-auto rounded-lg border border-border {className}">
|
|
24
24
|
<table class={`w-full text-left ${typography.textMuted}`}>
|
|
25
25
|
{#if header}
|
|
26
|
-
<thead class={`text-xs uppercase bg-
|
|
26
|
+
<thead class={`text-xs uppercase bg-bg-secondary ${typography.textMuted}`}>
|
|
27
27
|
{@render header(cellSize)}
|
|
28
28
|
</thead>
|
|
29
29
|
{/if}
|
|
30
30
|
|
|
31
|
-
<tbody class="divide-y divide-
|
|
31
|
+
<tbody class="divide-y divide-border {striped ? '[&>tr:nth-child(odd)]:bg-bg-secondary' : ''} {hoverable ? '[&>tr]:hover:bg-bg-secondary' : ''} {bordered ? '[&_td]:border-x [&_td]:border-border' : ''}">
|
|
32
32
|
{@render children?.(cellSize)}
|
|
33
33
|
</tbody>
|
|
34
34
|
</table>
|
|
@@ -54,8 +54,8 @@ describe("FormActions Component Tests", () => {
|
|
|
54
54
|
setupTest({ isSuccess: true });
|
|
55
55
|
const submitBtn = screen.getByText("Save").closest("button, a");
|
|
56
56
|
// Check for success variant classes (green background)
|
|
57
|
-
expect(submitBtn).toHaveClass("bg-
|
|
58
|
-
expect(submitBtn).toHaveClass("border-
|
|
57
|
+
expect(submitBtn).toHaveClass("bg-accent-success");
|
|
58
|
+
expect(submitBtn).toHaveClass("border-accent-success");
|
|
59
59
|
});
|
|
60
60
|
|
|
61
61
|
test("Submit button is disabled when disabled prop is true", () => {
|
|
@@ -73,16 +73,16 @@ describe("FormActions Component Tests", () => {
|
|
|
73
73
|
setupTest({ submitVariant: "red-solid" });
|
|
74
74
|
const submitBtn = screen.getByText("Save").closest("button, a");
|
|
75
75
|
// Check for red variant classes (red-solid maps to "red" variant)
|
|
76
|
-
expect(submitBtn).toHaveClass("bg-
|
|
77
|
-
expect(submitBtn).toHaveClass("border-
|
|
76
|
+
expect(submitBtn).toHaveClass("bg-accent-danger");
|
|
77
|
+
expect(submitBtn).toHaveClass("border-accent-danger");
|
|
78
78
|
});
|
|
79
79
|
|
|
80
80
|
test("Uses custom cancel variant", () => {
|
|
81
81
|
setupTest({ cancelVariant: "blue-outline" });
|
|
82
82
|
const cancelBtn = screen.getByText("Cancel").closest("button, a");
|
|
83
83
|
// Check for outline variant classes (blue-outline maps to "outline" variant)
|
|
84
|
-
expect(cancelBtn).toHaveClass("text-
|
|
85
|
-
expect(cancelBtn).toHaveClass("border-
|
|
84
|
+
expect(cancelBtn).toHaveClass("text-brand-primary");
|
|
85
|
+
expect(cancelBtn).toHaveClass("border-brand-primary");
|
|
86
86
|
expect(cancelBtn).toHaveClass("bg-transparent");
|
|
87
87
|
});
|
|
88
88
|
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
</script>
|
|
19
19
|
|
|
20
20
|
<div
|
|
21
|
-
class="w-full md:static flex bg-
|
|
21
|
+
class="w-full md:static flex bg-card md:bg-transparent md: md:rounded-b-lg items-center justify-center md:justify-end gap-4 py-5 px-4 {className}"
|
|
22
22
|
>
|
|
23
23
|
{#if showCancel}
|
|
24
24
|
<Button
|
|
@@ -101,16 +101,16 @@ describe('FormSection Divider', () => {
|
|
|
101
101
|
expect(container.querySelector('hr')).not.toBeInTheDocument();
|
|
102
102
|
});
|
|
103
103
|
|
|
104
|
-
test('divider has border-
|
|
104
|
+
test('divider has border-border', () => {
|
|
105
105
|
const { container } = render(FormSection, { props: { divider: true } });
|
|
106
106
|
const hr = container.querySelector('hr');
|
|
107
|
-
expect(hr).toHaveClass('border-
|
|
107
|
+
expect(hr).toHaveClass('border-border');
|
|
108
108
|
});
|
|
109
109
|
|
|
110
|
-
test('divider
|
|
110
|
+
test('divider uses token-based border class', () => {
|
|
111
111
|
const { container } = render(FormSection, { props: { divider: true } });
|
|
112
112
|
const hr = container.querySelector('hr');
|
|
113
|
-
expect(hr).toHaveClass('
|
|
113
|
+
expect(hr).toHaveClass('border-border');
|
|
114
114
|
});
|
|
115
115
|
});
|
|
116
116
|
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
} = $props();
|
|
12
12
|
</script>
|
|
13
13
|
|
|
14
|
-
<section class="space-y-4 {bordered ? 'border border-
|
|
14
|
+
<section class="space-y-4 {bordered ? 'border border-border rounded-lg p-4' : ''} {className}">
|
|
15
15
|
{#if divider}
|
|
16
|
-
<hr class="border-
|
|
16
|
+
<hr class="border-border" />
|
|
17
17
|
{/if}
|
|
18
18
|
|
|
19
19
|
{#if title || description}
|
|
@@ -154,8 +154,8 @@ describe('FormValidationSummary Component', () => {
|
|
|
154
154
|
},
|
|
155
155
|
});
|
|
156
156
|
const alert = container.querySelector('[role="alert"]');
|
|
157
|
-
expect(alert.classList.contains('bg-
|
|
158
|
-
expect(alert.classList.contains('border-
|
|
157
|
+
expect(alert.classList.contains('bg-status-error-bg')).toBe(true);
|
|
158
|
+
expect(alert.classList.contains('border-status-error-border')).toBe(true);
|
|
159
159
|
});
|
|
160
160
|
it('renders warning icon', () => {
|
|
161
161
|
const { container } = render(FormValidationSummary, {
|
|
@@ -73,15 +73,15 @@
|
|
|
73
73
|
<div class="space-y-4 mt-4">
|
|
74
74
|
<div>
|
|
75
75
|
<label for="firstName" class="block text-sm font-medium mb-1">First Name</label>
|
|
76
|
-
<input id="firstName" type="text" class="w-full px-3 py-2 border border-
|
|
76
|
+
<input id="firstName" type="text" class="w-full px-3 py-2 border border-status-error-border rounded" />
|
|
77
77
|
</div>
|
|
78
78
|
<div>
|
|
79
79
|
<label for="email" class="block text-sm font-medium mb-1">Email</label>
|
|
80
|
-
<input id="email" type="email" class="w-full px-3 py-2 border border-
|
|
80
|
+
<input id="email" type="email" class="w-full px-3 py-2 border border-status-error-border rounded" />
|
|
81
81
|
</div>
|
|
82
82
|
<div>
|
|
83
83
|
<label for="phone" class="block text-sm font-medium mb-1">Phone</label>
|
|
84
|
-
<input id="phone" type="tel" class="w-full px-3 py-2 border border-
|
|
84
|
+
<input id="phone" type="tel" class="w-full px-3 py-2 border border-status-error-border rounded" />
|
|
85
85
|
</div>
|
|
86
86
|
</div>
|
|
87
87
|
</div>
|
|
@@ -93,5 +93,5 @@
|
|
|
93
93
|
{fieldLabels}
|
|
94
94
|
show={false}
|
|
95
95
|
/>
|
|
96
|
-
<p class="text-sm text-
|
|
96
|
+
<p class="text-sm text-muted-foreground mt-2">The validation summary is hidden</p>
|
|
97
97
|
</Story>
|
|
@@ -52,14 +52,14 @@
|
|
|
52
52
|
{#if show && hasErrors}
|
|
53
53
|
<div
|
|
54
54
|
transition:safeSlide={{ duration: 300, easing: cubicOut }}
|
|
55
|
-
class="bg-
|
|
55
|
+
class="bg-status-error-bg border border-status-error-border rounded-lg p-4 mb-4"
|
|
56
56
|
role="alert"
|
|
57
57
|
aria-live="polite"
|
|
58
58
|
>
|
|
59
59
|
<div class="flex items-start gap-2">
|
|
60
|
-
<WarningIcon class="shrink-0 text-
|
|
60
|
+
<WarningIcon class="shrink-0 text-accent-danger mt-0.5" />
|
|
61
61
|
<div class="flex-1">
|
|
62
|
-
<p class="text-sm font-medium text-
|
|
62
|
+
<p class="text-sm font-medium text-status-error-text">
|
|
63
63
|
{labels.pleaseFixTheFollowing}
|
|
64
64
|
</p>
|
|
65
65
|
<ul class="mt-2 space-y-1">
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
<Button
|
|
69
69
|
variant="link"
|
|
70
70
|
size="sm"
|
|
71
|
-
class="
|
|
71
|
+
class="!text-accent-danger hover:!text-accent-danger"
|
|
72
72
|
onclick={() => scrollToField(field.elementId)}
|
|
73
73
|
>
|
|
74
74
|
{field.label}
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
</script>
|
|
31
31
|
|
|
32
32
|
<Story name="Default (4 Tabs)">
|
|
33
|
-
<div class="bg-
|
|
34
|
-
<p class="text-sm text-
|
|
35
|
-
<div class="max-w-md mx-auto bg-
|
|
33
|
+
<div class="bg-muted p-4">
|
|
34
|
+
<p class="text-sm text-muted-foreground mb-4">Mobile Bottom Navigation (4 tabs)</p>
|
|
35
|
+
<div class="max-w-md mx-auto bg-card rounded-lg shadow-lg overflow-hidden">
|
|
36
36
|
<div class="h-64 bg-gradient-to-br from-blue-50 to-blue-100 flex items-center justify-center">
|
|
37
|
-
<p class="text-
|
|
37
|
+
<p class="text-muted-foreground">Page Content Area</p>
|
|
38
38
|
</div>
|
|
39
|
-
<div class="flex border-t bg-
|
|
39
|
+
<div class="flex border-t bg-card">
|
|
40
40
|
<BottomNav links={defaultLinks} />
|
|
41
41
|
</div>
|
|
42
42
|
</div>
|
|
@@ -44,13 +44,13 @@
|
|
|
44
44
|
</Story>
|
|
45
45
|
|
|
46
46
|
<Story name="With 5 Tabs">
|
|
47
|
-
<div class="bg-
|
|
48
|
-
<p class="text-sm text-
|
|
49
|
-
<div class="max-w-md mx-auto bg-
|
|
47
|
+
<div class="bg-muted p-4">
|
|
48
|
+
<p class="text-sm text-muted-foreground mb-4">Extended Navigation (5 tabs)</p>
|
|
49
|
+
<div class="max-w-md mx-auto bg-card rounded-lg shadow-lg overflow-hidden">
|
|
50
50
|
<div class="h-64 bg-gradient-to-br from-purple-50 to-purple-100 flex items-center justify-center">
|
|
51
|
-
<p class="text-
|
|
51
|
+
<p class="text-muted-foreground">Page Content Area</p>
|
|
52
52
|
</div>
|
|
53
|
-
<div class="flex border-t bg-
|
|
53
|
+
<div class="flex border-t bg-card">
|
|
54
54
|
<BottomNav links={extendedLinks} />
|
|
55
55
|
</div>
|
|
56
56
|
</div>
|
|
@@ -58,13 +58,13 @@
|
|
|
58
58
|
</Story>
|
|
59
59
|
|
|
60
60
|
<Story name="Different Icon Set">
|
|
61
|
-
<div class="bg-
|
|
62
|
-
<p class="text-sm text-
|
|
63
|
-
<div class="max-w-md mx-auto bg-
|
|
61
|
+
<div class="bg-muted p-4">
|
|
62
|
+
<p class="text-sm text-muted-foreground mb-4">Custom Icons</p>
|
|
63
|
+
<div class="max-w-md mx-auto bg-card rounded-lg shadow-lg overflow-hidden">
|
|
64
64
|
<div class="h-64 bg-gradient-to-br from-green-50 to-green-100 flex items-center justify-center">
|
|
65
|
-
<p class="text-
|
|
65
|
+
<p class="text-muted-foreground">Page Content Area</p>
|
|
66
66
|
</div>
|
|
67
|
-
<div class="flex border-t bg-
|
|
67
|
+
<div class="flex border-t bg-card">
|
|
68
68
|
<BottomNav
|
|
69
69
|
links={[
|
|
70
70
|
{ label: 'Dashboard', href: '/', icon: 'Home' },
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
</Story>
|
|
80
80
|
|
|
81
81
|
<Story name="Mobile Viewport">
|
|
82
|
-
<div class="max-w-[375px] mx-auto bg-
|
|
82
|
+
<div class="max-w-[375px] mx-auto bg-card shadow-2xl rounded-3xl overflow-hidden">
|
|
83
83
|
<!-- Mock iPhone screen -->
|
|
84
84
|
<div class="h-[667px] flex flex-col">
|
|
85
85
|
<!-- Status bar -->
|
|
@@ -91,11 +91,11 @@
|
|
|
91
91
|
<!-- Content area -->
|
|
92
92
|
<div class="flex-1 bg-gradient-to-br from-blue-50 to-purple-50 p-4">
|
|
93
93
|
<h1 class="text-2xl font-bold mb-2">Home</h1>
|
|
94
|
-
<p class="text-
|
|
94
|
+
<p class="text-muted-foreground">This is a mobile viewport simulation</p>
|
|
95
95
|
</div>
|
|
96
96
|
|
|
97
97
|
<!-- Bottom navigation -->
|
|
98
|
-
<div class="flex border-t bg-
|
|
98
|
+
<div class="flex border-t bg-card safe-bottom">
|
|
99
99
|
<BottomNav links={defaultLinks} />
|
|
100
100
|
</div>
|
|
101
101
|
</div>
|
|
@@ -103,13 +103,13 @@
|
|
|
103
103
|
</Story>
|
|
104
104
|
|
|
105
105
|
<Story name="Dark Mode">
|
|
106
|
-
<div class="dark bg-
|
|
107
|
-
<p class="text-sm text-
|
|
108
|
-
<div class="max-w-md mx-auto bg-
|
|
106
|
+
<div class="dark bg-bg-primary p-4 min-h-screen">
|
|
107
|
+
<p class="text-sm text-muted-foreground mb-4">Dark Mode Bottom Navigation</p>
|
|
108
|
+
<div class="max-w-md mx-auto bg-bg-secondary rounded-lg shadow-2xl overflow-hidden">
|
|
109
109
|
<div class="h-64 bg-gradient-to-br from-gray-900 to-gray-800 flex items-center justify-center">
|
|
110
|
-
<p class="text-
|
|
110
|
+
<p class="text-muted-foreground">Dark Mode Content</p>
|
|
111
111
|
</div>
|
|
112
|
-
<div class="flex border-t border-
|
|
112
|
+
<div class="flex border-t border-stroke-primary bg-bg-secondary">
|
|
113
113
|
<BottomNav links={defaultLinks} />
|
|
114
114
|
</div>
|
|
115
115
|
</div>
|
|
@@ -66,16 +66,16 @@
|
|
|
66
66
|
{href}
|
|
67
67
|
class={`bottom-nav-item flex-1 flex items-center justify-center py-3 px-2 no-underline bg-transparent border-none cursor-pointer min-w-0
|
|
68
68
|
${typography.textMuted} transition-colors duration-150
|
|
69
|
-
hover:text-
|
|
69
|
+
hover:text-text-primary hover:no-underline
|
|
70
70
|
select-none touch-manipulation
|
|
71
|
-
${isActive(href, currentPath) ? 'active text-
|
|
71
|
+
${isActive(href, currentPath) ? 'active text-brand-primary' : ''}`}
|
|
72
72
|
aria-label={label}
|
|
73
73
|
style="-webkit-tap-highlight-color: transparent; -webkit-touch-callout: none;"
|
|
74
74
|
>
|
|
75
75
|
<span class="bottom-nav-icon relative flex items-center justify-center transition-transform duration-150 active:scale-[0.8]">
|
|
76
76
|
<Icon name={icon} size="24" />
|
|
77
77
|
{#if label === labels.showsLabel && invitationCount > 0}
|
|
78
|
-
<span class="notification-dot absolute -top-1 -right-1 w-2 h-2 bg-
|
|
78
|
+
<span class="notification-dot absolute -top-1 -right-1 w-2 h-2 bg-accent-danger rounded-full"></span>
|
|
79
79
|
{/if}
|
|
80
80
|
</span>
|
|
81
81
|
</a>
|
|
@@ -159,7 +159,7 @@ describe('Header', () => {
|
|
|
159
159
|
await fireEvent.click(mobileButton);
|
|
160
160
|
// The mobile sheet uses portal action to render to document.body,
|
|
161
161
|
// so we need to check in document.body instead of container
|
|
162
|
-
const mobileSheet = document.body.querySelector('div.fixed.inset-0.bg-
|
|
162
|
+
const mobileSheet = document.body.querySelector('div.fixed.inset-0.bg-overlay-bg');
|
|
163
163
|
expect(mobileSheet).toBeTruthy();
|
|
164
164
|
});
|
|
165
165
|
it('navigates when a mobile sheet dropdown link is clicked', async () => {
|
|
@@ -168,7 +168,7 @@ describe('Header', () => {
|
|
|
168
168
|
const mobileButton = container.querySelector('button.block.md\\:hidden');
|
|
169
169
|
await fireEvent.click(mobileButton);
|
|
170
170
|
// Mobile sheet renders via portal in document.body
|
|
171
|
-
const mobileSheet = document.body.querySelector('div.fixed.inset-0.bg-
|
|
171
|
+
const mobileSheet = document.body.querySelector('div.fixed.inset-0.bg-overlay-bg');
|
|
172
172
|
expect(mobileSheet).toBeTruthy();
|
|
173
173
|
// Click the first dropdown link in the mobile sheet
|
|
174
174
|
const menuItems = mobileSheet.querySelectorAll('button');
|
|
@@ -183,7 +183,7 @@ describe('Header', () => {
|
|
|
183
183
|
const { container } = render(Header, { ...defaultProps, signoutHandler });
|
|
184
184
|
const mobileButton = container.querySelector('button.block.md\\:hidden');
|
|
185
185
|
await fireEvent.click(mobileButton);
|
|
186
|
-
const mobileSheet = document.body.querySelector('div.fixed.inset-0.bg-
|
|
186
|
+
const mobileSheet = document.body.querySelector('div.fixed.inset-0.bg-overlay-bg');
|
|
187
187
|
expect(mobileSheet).toBeTruthy();
|
|
188
188
|
// Find the Sign Out button in the mobile sheet
|
|
189
189
|
const menuItems = mobileSheet.querySelectorAll('button');
|
|
@@ -230,8 +230,8 @@ describe('Header', () => {
|
|
|
230
230
|
it('marks current path as active', () => {
|
|
231
231
|
const { container } = render(Header, defaultProps);
|
|
232
232
|
const showsLink = container.querySelector('a[href="/shows"]');
|
|
233
|
-
// The active link should have 'text-
|
|
234
|
-
expect(showsLink.classList.contains('text-
|
|
233
|
+
// The active link should have 'text-brand-primary' class (or dark mode '')
|
|
234
|
+
expect(showsLink.classList.contains('text-brand-primary')).toBe(true);
|
|
235
235
|
});
|
|
236
236
|
});
|
|
237
237
|
describe('default values', () => {
|
|
@@ -245,7 +245,7 @@ describe('Header', () => {
|
|
|
245
245
|
const { container } = render(Header, { ...defaultProps, name: 'Jane Doe' });
|
|
246
246
|
const mobileButton = container.querySelector('button.block.md\\:hidden');
|
|
247
247
|
await fireEvent.click(mobileButton);
|
|
248
|
-
const mobileSheet = document.body.querySelector('div.fixed.inset-0.bg-
|
|
248
|
+
const mobileSheet = document.body.querySelector('div.fixed.inset-0.bg-overlay-bg');
|
|
249
249
|
expect(mobileSheet).toBeTruthy();
|
|
250
250
|
expect(mobileSheet.textContent).toContain('Jane Doe');
|
|
251
251
|
});
|
|
@@ -253,7 +253,7 @@ describe('Header', () => {
|
|
|
253
253
|
const { container } = render(Header, { ...defaultProps, name: '' });
|
|
254
254
|
const mobileButton = container.querySelector('button.block.md\\:hidden');
|
|
255
255
|
await fireEvent.click(mobileButton);
|
|
256
|
-
const mobileSheet = document.body.querySelector('div.fixed.inset-0.bg-
|
|
256
|
+
const mobileSheet = document.body.querySelector('div.fixed.inset-0.bg-overlay-bg');
|
|
257
257
|
expect(mobileSheet).toBeTruthy();
|
|
258
258
|
expect(mobileSheet.textContent).toContain('Performer');
|
|
259
259
|
});
|
|
@@ -281,13 +281,13 @@ describe('Header', () => {
|
|
|
281
281
|
const { container } = render(Header, propsWithRoot);
|
|
282
282
|
const homeLink = container.querySelector('a[href="/performers/"]');
|
|
283
283
|
// /shows does not match /performers/, so it should NOT be active
|
|
284
|
-
expect(homeLink.classList.contains('text-
|
|
284
|
+
expect(homeLink.classList.contains('text-brand-primary')).toBe(false);
|
|
285
285
|
});
|
|
286
286
|
it('marks link as active using startsWith for non-root paths', () => {
|
|
287
287
|
const { container } = render(Header, defaultProps);
|
|
288
288
|
// '/shows' starts with '/shows' so it should be active
|
|
289
289
|
const showsLink = container.querySelector('a[href="/shows"]');
|
|
290
|
-
expect(showsLink.classList.contains('text-
|
|
290
|
+
expect(showsLink.classList.contains('text-brand-primary')).toBe(true);
|
|
291
291
|
});
|
|
292
292
|
});
|
|
293
293
|
});
|
|
@@ -92,8 +92,7 @@
|
|
|
92
92
|
<a
|
|
93
93
|
{href}
|
|
94
94
|
class={`px-4 py-2 ${typography.label} ${typography.textMuted} no-underline rounded-lg transition-all duration-150
|
|
95
|
-
hover:text-
|
|
96
|
-
${isActive(href, currentPath) ? 'text-blue-700 bg-gray-100 dark:text-blue-500 dark:bg-gray-700' : ''}`}
|
|
95
|
+
hover:text-text-primary hover:bg-muted hover:no-underline ${isActive(href, currentPath) ? 'text-brand-primary bg-muted' : ''}`}
|
|
97
96
|
>
|
|
98
97
|
{label}
|
|
99
98
|
</a>
|
|
@@ -114,8 +113,8 @@
|
|
|
114
113
|
<!-- svelte-ignore a11y_click_events_have_key_events -->
|
|
115
114
|
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
116
115
|
<div class="fixed inset-0 z-30 bg-transparent" onclick={() => showDesktopDropdown = false}></div>
|
|
117
|
-
<div class="absolute top-[calc(100%+0.5rem)] right-0 w-56 bg-
|
|
118
|
-
<div class="py-3 px-4 border-b border-
|
|
116
|
+
<div class="absolute top-[calc(100%+0.5rem)] right-0 w-56 bg-card border border-border rounded-lg shadow-lg z-40 overflow-hidden">
|
|
117
|
+
<div class="py-3 px-4 border-b border-border">
|
|
119
118
|
<span class={`block ${typography.label}`}>{name || labels.defaultName}</span>
|
|
120
119
|
<span class={`block ${typography.xsMuted} mt-0.5`}>{email || ""}</span>
|
|
121
120
|
</div>
|
|
@@ -127,7 +126,7 @@
|
|
|
127
126
|
{label}
|
|
128
127
|
</MenuItem>
|
|
129
128
|
{/each}
|
|
130
|
-
<div class="h-px bg-
|
|
129
|
+
<div class="h-px bg-bg-tertiary"></div>
|
|
131
130
|
<MenuItem
|
|
132
131
|
danger
|
|
133
132
|
size="md"
|
|
@@ -150,8 +149,7 @@
|
|
|
150
149
|
<a
|
|
151
150
|
{href}
|
|
152
151
|
class={`px-4 py-2 ${typography.label} ${typography.textMuted} no-underline rounded-lg transition-all duration-150
|
|
153
|
-
hover:text-
|
|
154
|
-
${isActive(href, currentPath) ? 'text-blue-700 bg-gray-100 dark:text-blue-500 dark:bg-gray-700' : ''}`}
|
|
152
|
+
hover:text-text-primary hover:bg-muted hover:no-underline ${isActive(href, currentPath) ? 'text-brand-primary bg-muted' : ''}`}
|
|
155
153
|
>
|
|
156
154
|
{label}
|
|
157
155
|
</a>
|
|
@@ -182,8 +180,8 @@
|
|
|
182
180
|
<!-- svelte-ignore a11y_click_events_have_key_events -->
|
|
183
181
|
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
184
182
|
<div class="fixed inset-0 z-30 bg-transparent" onclick={() => showDesktopDropdown = false}></div>
|
|
185
|
-
<div class="absolute top-[calc(100%+0.5rem)] right-0 w-56 bg-
|
|
186
|
-
<div class="py-3 px-4 border-b border-
|
|
183
|
+
<div class="absolute top-[calc(100%+0.5rem)] right-0 w-56 bg-card border border-border rounded-lg shadow-lg z-40 overflow-hidden">
|
|
184
|
+
<div class="py-3 px-4 border-b border-border">
|
|
187
185
|
<span class={`block ${typography.label}`}>{name || labels.defaultName}</span>
|
|
188
186
|
<span class={`block ${typography.xsMuted} mt-0.5`}>{email || ""}</span>
|
|
189
187
|
</div>
|
|
@@ -195,7 +193,7 @@
|
|
|
195
193
|
{label}
|
|
196
194
|
</MenuItem>
|
|
197
195
|
{/each}
|
|
198
|
-
<div class="h-px bg-
|
|
196
|
+
<div class="h-px bg-bg-tertiary"></div>
|
|
199
197
|
<MenuItem
|
|
200
198
|
danger
|
|
201
199
|
size="md"
|
|
@@ -213,7 +211,7 @@
|
|
|
213
211
|
<!-- svelte-ignore a11y_click_events_have_key_events -->
|
|
214
212
|
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
215
213
|
<div
|
|
216
|
-
class="fixed inset-0 flex items-end justify-center bg-
|
|
214
|
+
class="fixed inset-0 flex items-end justify-center bg-overlay-bg z-50 touch-none overscroll-none"
|
|
217
215
|
onclick={() => { showMobileSheet = false; }}
|
|
218
216
|
transition:fade={{ duration: 300 }}
|
|
219
217
|
use:portal
|
|
@@ -221,15 +219,15 @@
|
|
|
221
219
|
<!-- svelte-ignore a11y_click_events_have_key_events -->
|
|
222
220
|
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
223
221
|
<div
|
|
224
|
-
class="bg-
|
|
222
|
+
class="bg-card rounded-t-3xl shadow-xl w-full max-h-[90vh] max-h-[90dvh] overflow-hidden pb-[var(--safe-bottom,0px)] touch-pan-y overscroll-contain"
|
|
225
223
|
onclick={(e) => e.stopPropagation()}
|
|
226
224
|
transition:fly={{ y: 300, duration: 300, easing: cubicOut }}
|
|
227
225
|
>
|
|
228
226
|
<div class="flex justify-center pt-3 pb-2">
|
|
229
|
-
<div class="w-10 h-1 bg-
|
|
227
|
+
<div class="w-10 h-1 bg-bg-quaternary rounded-xs"></div>
|
|
230
228
|
</div>
|
|
231
229
|
|
|
232
|
-
<div class="px-6 py-4 border-b border-
|
|
230
|
+
<div class="px-6 py-4 border-b border-border">
|
|
233
231
|
<p class={`${typography.h4} m-0`}>{name || labels.defaultName}</p>
|
|
234
232
|
<p class={`${typography.smMuted} mt-0.5 m-0`}>{email || ""}</p>
|
|
235
233
|
</div>
|
|
@@ -253,7 +251,7 @@
|
|
|
253
251
|
</MenuItem>
|
|
254
252
|
</div>
|
|
255
253
|
|
|
256
|
-
<div class="border-t-8 border-
|
|
254
|
+
<div class="border-t-8 border-border">
|
|
257
255
|
<Button variant="ghost" size="full" class="py-4 text-base font-semibold" onclick={() => showMobileSheet = false}>
|
|
258
256
|
{labels.cancel}
|
|
259
257
|
</Button>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/patterns/navigation/Header.svelte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Header.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/patterns/navigation/Header.svelte.ts"],"names":[],"mappings":"AA4OA,QAAA,MAAM,MAAM;qBA1LS,MAAM,IAAI;WACpB,MAAM;aACJ,MAAM;YACP,MAAM;eACH;eAjBJ,MAAM;cACP,MAAM;OAgBQ;oBACJ;eAlBT,MAAM;cACP,MAAM;OAiBa;qBACR,OAAO;aACf,OAAO;;;;;;MAAsB;UAmLU,CAAC;AACrD,KAAK,MAAM,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC;AACxC,eAAe,MAAM,CAAC"}
|
|
@@ -42,14 +42,14 @@ describe('PageLayout Variant', () => {
|
|
|
42
42
|
test('default variant renders children directly', () => {
|
|
43
43
|
const { container } = render(PageLayout, { props: { variant: 'default' } });
|
|
44
44
|
// Should not have a Card wrapper
|
|
45
|
-
const card = container.querySelector('.bg-
|
|
45
|
+
const card = container.querySelector('.bg-card.dark\\:bg-bg-secondary');
|
|
46
46
|
expect(card).not.toBeInTheDocument();
|
|
47
47
|
});
|
|
48
48
|
|
|
49
49
|
test('card variant wraps content in Card', () => {
|
|
50
50
|
const { container } = render(PageLayout, { props: { variant: 'card' } });
|
|
51
51
|
// Card should be rendered with white bg
|
|
52
|
-
const cardWrapper = container.querySelector('.bg-
|
|
52
|
+
const cardWrapper = container.querySelector('.bg-card');
|
|
53
53
|
expect(cardWrapper).toBeInTheDocument();
|
|
54
54
|
});
|
|
55
55
|
});
|
|
@@ -122,8 +122,8 @@ describe('PageLayout Combinations', () => {
|
|
|
122
122
|
const { container } = render(PageLayout, {
|
|
123
123
|
props: { variant: 'card', maxWidth: 'max-w-3xl' }
|
|
124
124
|
});
|
|
125
|
-
// Card renders with bg-
|
|
126
|
-
expect(container.querySelector('.bg-
|
|
125
|
+
// Card renders with bg-card
|
|
126
|
+
expect(container.querySelector('.bg-card')).toBeInTheDocument();
|
|
127
127
|
});
|
|
128
128
|
|
|
129
129
|
test('all props together', () => {
|
|
@@ -139,7 +139,7 @@ describe('PageLayout Combinations', () => {
|
|
|
139
139
|
}
|
|
140
140
|
});
|
|
141
141
|
expect(container.querySelector('nav')).toBeInTheDocument();
|
|
142
|
-
expect(container.querySelector('.bg-
|
|
142
|
+
expect(container.querySelector('.bg-card')).toBeInTheDocument();
|
|
143
143
|
expect(container.querySelector('.custom-page')).toBeInTheDocument();
|
|
144
144
|
});
|
|
145
145
|
});
|