@getmicdrop/svelte-components 5.21.0 → 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 +191 -191
- package/dist/calendar/Calendar/MiniMonthCalendar.spec.js +9 -8
- package/dist/calendar/Calendar/MiniMonthCalendar.svelte +800 -803
- 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 +88 -88
- package/dist/calendar/MonthSwitcher/MonthSwitcher.svelte +136 -140
- package/dist/calendar/OrderSummary/OrderSummary.svelte +461 -461
- package/dist/calendar/PublicCard/PublicCard.spec.js +3 -3
- package/dist/calendar/PublicCard/PublicCard.svelte +164 -164
- package/dist/calendar/ShowCard/ShowCard.spec.js +8 -8
- package/dist/calendar/ShowCard/ShowCard.svelte +180 -180
- package/dist/calendar/ShowTimeCard/ShowTimeCard.spec.js +4 -4
- package/dist/calendar/ShowTimeCard/ShowTimeCard.svelte +80 -80
- package/dist/calendar/index.js +15 -15
- package/dist/components/Heading.spec.js +89 -89
- package/dist/components/Heading.svelte +66 -66
- package/dist/components/Layout/AppShell.svelte +104 -104
- package/dist/components/Layout/ContentSection.svelte +80 -80
- package/dist/components/Layout/Grid.svelte +101 -101
- package/dist/components/Layout/Heading.svelte +81 -81
- package/dist/components/Layout/PageContainer.svelte +69 -69
- package/dist/components/Layout/Responsive.svelte +75 -75
- package/dist/components/Layout/Section.spec.js +4 -4
- package/dist/components/Layout/Section.svelte +80 -80
- package/dist/components/Layout/ShowOnDesktop.svelte +37 -37
- package/dist/components/Layout/ShowOnMobile.svelte +37 -37
- package/dist/components/Layout/Sidebar.svelte +108 -108
- package/dist/components/Layout/Stack.spec.js +1 -1
- package/dist/components/Layout/Stack.svelte +52 -52
- package/dist/components/Layout/Text.svelte +87 -87
- package/dist/components/Layout/TwoColumn.svelte +108 -108
- 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 +89 -89
- package/dist/components/Text.svelte +64 -64
- package/dist/config.js +160 -160
- package/dist/config.spec.js +29 -29
- package/dist/constants/formOptions.js +48 -48
- package/dist/constants/validation.js +91 -91
- package/dist/constants/validation.spec.js +64 -64
- package/dist/datetime/README.md +323 -323
- package/dist/datetime/__tests__/format.test.js +1 -1
- package/dist/datetime/__tests__/parse.test.js +1 -1
- package/dist/datetime/__tests__/timezone.test.js +1 -1
- package/dist/datetime/parse.js +1 -1
- package/dist/forms/createFormStore.svelte.js +1 -0
- package/dist/forms/createFormStore.svelte.spec.js +1 -0
- package/dist/index.js +85 -85
- package/dist/index.spec.js +369 -369
- package/dist/patterns/chat/ChatActivityNotice.spec.js +59 -59
- package/dist/patterns/chat/ChatActivityNotice.svelte +41 -41
- package/dist/patterns/chat/ChatBubble.spec.js +91 -91
- package/dist/patterns/chat/ChatBubble.svelte +103 -103
- package/dist/patterns/chat/ChatContainer.spec.js +30 -30
- package/dist/patterns/chat/ChatContainer.svelte +46 -46
- package/dist/patterns/chat/ChatDateDivider.spec.js +30 -30
- package/dist/patterns/chat/ChatDateDivider.svelte +27 -27
- package/dist/patterns/chat/ChatInvitationBubble.spec.js +46 -46
- package/dist/patterns/chat/ChatInvitationBubble.svelte +46 -46
- package/dist/patterns/chat/ChatInvitationNotice.spec.js +32 -32
- package/dist/patterns/chat/ChatInvitationNotice.svelte +36 -36
- package/dist/patterns/chat/ChatMessageGroup.spec.js +58 -58
- package/dist/patterns/chat/ChatMessageGroup.svelte +57 -57
- package/dist/patterns/chat/ChatSlotUpdate.spec.js +65 -65
- package/dist/patterns/chat/ChatSlotUpdate.svelte +46 -46
- package/dist/patterns/chat/ChatStatusBadge.spec.js +79 -79
- package/dist/patterns/chat/ChatStatusBadge.svelte +91 -91
- package/dist/patterns/chat/ChatStatusTransition.spec.js +81 -81
- package/dist/patterns/chat/ChatStatusTransition.svelte +64 -64
- package/dist/patterns/chat/ChatTextBubble.spec.js +35 -35
- package/dist/patterns/chat/ChatTextBubble.svelte +41 -41
- package/dist/patterns/chat/index.js +22 -22
- package/dist/patterns/data/DataGrid.svelte +45 -45
- package/dist/patterns/data/DataList.spec.js +5 -5
- package/dist/patterns/data/DataList.svelte +24 -24
- package/dist/patterns/data/DataTable.spec.js +18 -18
- package/dist/patterns/data/DataTable.svelte +45 -45
- package/dist/patterns/data/index.js +4 -4
- package/dist/patterns/forms/FormActions.spec.js +95 -95
- package/dist/patterns/forms/FormActions.stories.svelte +97 -97
- package/dist/patterns/forms/FormActions.svelte +46 -46
- package/dist/patterns/forms/FormGrid.svelte +33 -33
- package/dist/patterns/forms/FormSection.spec.js +4 -4
- package/dist/patterns/forms/FormSection.svelte +33 -33
- package/dist/patterns/forms/FormValidationSummary.spec.js +2 -2
- package/dist/patterns/forms/FormValidationSummary.stories.svelte +97 -97
- package/dist/patterns/forms/FormValidationSummary.svelte +82 -82
- package/dist/patterns/forms/index.js +5 -5
- package/dist/patterns/index.js +21 -21
- package/dist/patterns/layout/Sidebar.svelte +39 -39
- package/dist/patterns/layout/SidebarTestWrapper.svelte +34 -34
- package/dist/patterns/layout/Stack.svelte +61 -61
- package/dist/patterns/layout/index.js +29 -29
- package/dist/patterns/navigation/BottomNav.stories.svelte +117 -117
- package/dist/patterns/navigation/BottomNav.svelte +82 -82
- package/dist/patterns/navigation/Header.spec.js +9 -9
- package/dist/patterns/navigation/Header.stories.svelte +77 -77
- package/dist/patterns/navigation/Header.svelte +261 -263
- package/dist/patterns/navigation/Header.svelte.d.ts.map +1 -1
- package/dist/patterns/navigation/index.js +3 -3
- package/dist/patterns/page/PageHeader.svelte +49 -49
- package/dist/patterns/page/PageLayout.spec.js +5 -5
- package/dist/patterns/page/PageLayout.svelte +40 -40
- package/dist/patterns/page/PageLoader.spec.js +57 -57
- package/dist/patterns/page/PageLoader.stories.svelte +137 -137
- package/dist/patterns/page/PageLoader.svelte +62 -62
- package/dist/patterns/page/SectionHeader.spec.js +8 -8
- package/dist/patterns/page/SectionHeader.svelte +51 -51
- package/dist/patterns/page/index.js +5 -5
- package/dist/presets/badges.js +112 -112
- package/dist/presets/buttons.js +76 -76
- package/dist/presets/buttons.spec.js +4 -4
- package/dist/presets/index.js +9 -9
- package/dist/primitives/Accordion/Accordion.spec.js +5 -5
- package/dist/primitives/Accordion/Accordion.stories.svelte +75 -75
- package/dist/primitives/Accordion/Accordion.svelte +62 -62
- package/dist/primitives/Accordion/AccordionItem.spec.js +19 -28
- package/dist/primitives/Accordion/AccordionItem.svelte +103 -103
- package/dist/primitives/Accordion/AccordionItemWrapper.test.svelte +107 -107
- package/dist/primitives/Accordion/AccordionToggleWrapper.test.svelte +28 -28
- package/dist/primitives/Alert/Alert.spec.js +173 -173
- package/dist/primitives/Alert/Alert.stories.svelte +88 -88
- package/dist/primitives/Alert/Alert.svelte +72 -72
- package/dist/primitives/Avatar/Avatar.spec.js +11 -11
- package/dist/primitives/Avatar/Avatar.stories.svelte +95 -94
- package/dist/primitives/Avatar/Avatar.stories.svelte.d.ts.map +1 -1
- package/dist/primitives/Avatar/Avatar.svelte +66 -66
- package/dist/primitives/AvatarButton/AvatarButton.svelte +57 -57
- package/dist/primitives/Badges/Badge.spec.js +144 -144
- package/dist/primitives/Badges/Badge.stories.svelte +86 -86
- package/dist/primitives/Badges/Badge.svelte +99 -99
- package/dist/primitives/BottomSheet/BottomSheet.spec.js +238 -238
- package/dist/primitives/BottomSheet/BottomSheet.stories.svelte +83 -83
- package/dist/primitives/BottomSheet/BottomSheet.svelte +115 -115
- package/dist/primitives/BottomSheet/BottomSheetWithActions.test.svelte +20 -20
- package/dist/primitives/Breadcrumb/Breadcrumb.spec.js +125 -123
- package/dist/primitives/Breadcrumb/Breadcrumb.stories.svelte +23 -23
- package/dist/primitives/Breadcrumb/Breadcrumb.svelte +107 -107
- package/dist/primitives/Button/Button.spec.js +225 -225
- package/dist/primitives/Button/Button.stories.svelte +76 -76
- package/dist/primitives/Button/Button.svelte +278 -278
- package/dist/primitives/Button/ButtonGroup.spec.js +44 -44
- package/dist/primitives/Button/ButtonGroup.svelte +50 -50
- package/dist/primitives/Button/ButtonSaveDemo.spec.js +146 -146
- package/dist/primitives/Button/ButtonSaveDemo.svelte +25 -25
- package/dist/primitives/Button/ButtonVariantShowcase.spec.js +1 -1
- package/dist/primitives/Button/ButtonVariantShowcase.svelte +129 -129
- package/dist/primitives/Card.spec.js +49 -49
- package/dist/primitives/Card.stories.svelte +22 -22
- package/dist/primitives/Card.svelte +28 -28
- package/dist/primitives/CardAction/CardAction.svelte +68 -68
- package/dist/primitives/Checkbox/Checkbox.spec.js +16 -16
- package/dist/primitives/Checkbox/Checkbox.stories.svelte +84 -84
- package/dist/primitives/Checkbox/Checkbox.svelte +88 -88
- package/dist/primitives/DarkModeToggle.spec.js +390 -390
- package/dist/primitives/DarkModeToggle.stories.svelte +57 -57
- package/dist/primitives/DarkModeToggle.svelte +147 -147
- package/dist/primitives/Drawer/Drawer.spec.js +4 -4
- package/dist/primitives/Drawer/Drawer.stories.svelte +100 -100
- package/dist/primitives/Drawer/Drawer.svelte +224 -224
- package/dist/primitives/Drawer/DrawerTestWrapper.svelte +86 -86
- package/dist/primitives/Dropdown/Dropdown.spec.js +9 -9
- package/dist/primitives/Dropdown/Dropdown.stories.svelte +137 -137
- package/dist/primitives/Dropdown/Dropdown.svelte +179 -179
- package/dist/primitives/Dropdown/DropdownDivider.spec.js +30 -30
- package/dist/primitives/Dropdown/DropdownDivider.svelte +9 -9
- package/dist/primitives/Dropdown/DropdownItem.spec.js +8 -15
- package/dist/primitives/Dropdown/DropdownItem.svelte +80 -80
- package/dist/primitives/Dropdown/DropdownItemTestWrapper.svelte +43 -43
- package/dist/primitives/Helper/Helper.spec.js +57 -57
- package/dist/primitives/Helper/Helper.svelte +33 -33
- package/dist/primitives/Icons/ArrowLeft.svelte +21 -21
- package/dist/primitives/Icons/ArrowRight.svelte +21 -21
- package/dist/primitives/Icons/Availability.svelte +27 -27
- package/dist/primitives/Icons/Back.svelte +27 -27
- package/dist/primitives/Icons/CheckCircle.svelte +19 -19
- package/dist/primitives/Icons/CheckCircleOutline.svelte +28 -28
- package/dist/primitives/Icons/ChevronLeft.svelte +17 -17
- package/dist/primitives/Icons/ChevronRight.svelte +17 -17
- package/dist/primitives/Icons/Copy.svelte +28 -28
- package/dist/primitives/Icons/Cross.svelte +18 -18
- package/dist/primitives/Icons/DownArrow.svelte +21 -21
- package/dist/primitives/Icons/ErrorCircle.svelte +19 -19
- package/dist/primitives/Icons/FacebookIcon.svelte +15 -15
- package/dist/primitives/Icons/Home.svelte +28 -28
- package/dist/primitives/Icons/Icon.spec.js +175 -175
- package/dist/primitives/Icons/Icon.stories.svelte +100 -100
- package/dist/primitives/Icons/Icon.svelte +79 -79
- package/dist/primitives/Icons/IconGallery.stories.svelte +235 -235
- package/dist/primitives/Icons/Icons.spec.js +3 -3
- package/dist/primitives/Icons/ImageOutline.svelte +21 -21
- package/dist/primitives/Icons/Info.svelte +20 -20
- package/dist/primitives/Icons/InstagramIcon.svelte +21 -21
- package/dist/primitives/Icons/LogoInstagram.svelte +15 -15
- package/dist/primitives/Icons/Message.svelte +28 -28
- package/dist/primitives/Icons/MoonIcon.svelte +18 -18
- package/dist/primitives/Icons/More.svelte +34 -34
- package/dist/primitives/Icons/MoreHori.spec.js +67 -67
- package/dist/primitives/Icons/MoreHori.svelte +35 -35
- package/dist/primitives/Icons/Notification.svelte +27 -27
- package/dist/primitives/Icons/Payment.svelte +27 -27
- package/dist/primitives/Icons/Profile.svelte +34 -34
- package/dist/primitives/Icons/Reload.svelte +42 -42
- package/dist/primitives/Icons/Shows.svelte +34 -34
- package/dist/primitives/Icons/Signout.svelte +34 -34
- package/dist/primitives/Icons/SunIcon.svelte +21 -21
- package/dist/primitives/Icons/TiktokIcon.svelte +15 -15
- package/dist/primitives/Icons/TrashBinOutline.svelte +21 -21
- package/dist/primitives/Icons/TwitterIcon.svelte +15 -15
- package/dist/primitives/Icons/WarningIcon.spec.js +30 -30
- package/dist/primitives/Icons/WarningIcon.svelte +24 -24
- package/dist/primitives/Input/Input.spec.js +1237 -1237
- package/dist/primitives/Input/Input.stories.svelte +139 -139
- package/dist/primitives/Input/Input.svelte +444 -444
- package/dist/primitives/Input/Select.spec.js +632 -632
- package/dist/primitives/Input/Select.stories.svelte +112 -112
- package/dist/primitives/Input/Select.svelte +252 -252
- package/dist/primitives/Input/Textarea.spec.js +8 -8
- package/dist/primitives/Input/Textarea.stories.svelte +137 -137
- package/dist/primitives/Input/Textarea.svelte +105 -105
- package/dist/primitives/Label/Label.spec.js +20 -21
- package/dist/primitives/Label/Label.svelte +37 -37
- package/dist/primitives/LandingButton/LandingButton.spec.js +61 -61
- package/dist/primitives/LandingButton/LandingButton.svelte +92 -92
- package/dist/primitives/MenuItem/MenuItem.spec.js +130 -130
- package/dist/primitives/MenuItem/MenuItem.svelte +85 -85
- package/dist/primitives/Modal/Modal.spec.js +314 -314
- package/dist/primitives/Modal/Modal.stories.svelte +86 -86
- package/dist/primitives/Modal/Modal.svelte +181 -181
- package/dist/primitives/NavItem/NavItem.spec.js +97 -97
- package/dist/primitives/NavItem/NavItem.svelte +75 -75
- package/dist/primitives/NumberInput/NumberInput.spec.js +17 -17
- package/dist/primitives/NumberInput/NumberInput.svelte +113 -113
- package/dist/primitives/Pagination/DotIndicator.svelte +66 -66
- package/dist/primitives/Pagination/Pagination.spec.js +6 -6
- package/dist/primitives/Pagination/Pagination.stories.svelte +76 -76
- package/dist/primitives/Pagination/Pagination.svelte +275 -275
- package/dist/primitives/Radio/Radio.spec.js +19 -19
- package/dist/primitives/Radio/Radio.stories.svelte +80 -80
- package/dist/primitives/Radio/Radio.svelte +67 -67
- package/dist/primitives/SearchResultItem/SearchResultItem.spec.js +78 -78
- package/dist/primitives/SearchResultItem/SearchResultItem.svelte +109 -109
- package/dist/primitives/SidebarToggle/SidebarToggle.spec.js +61 -61
- package/dist/primitives/SidebarToggle/SidebarToggle.svelte +55 -55
- package/dist/primitives/Skeleton/CardPlaceholder.spec.js +1 -1
- package/dist/primitives/Skeleton/CardPlaceholder.svelte +96 -96
- package/dist/primitives/Skeleton/ImagePlaceholder.spec.js +2 -2
- package/dist/primitives/Skeleton/ImagePlaceholder.svelte +68 -68
- package/dist/primitives/Skeleton/ListPlaceholder.spec.js +2 -2
- package/dist/primitives/Skeleton/ListPlaceholder.svelte +85 -85
- package/dist/primitives/Skeleton/Skeleton.spec.js +7 -7
- package/dist/primitives/Skeleton/Skeleton.stories.svelte +151 -151
- package/dist/primitives/Skeleton/Skeleton.svelte +55 -55
- package/dist/primitives/Spinner/Spinner.spec.js +83 -84
- package/dist/primitives/Spinner/Spinner.stories.svelte +29 -29
- package/dist/primitives/Spinner/Spinner.svelte +52 -52
- package/dist/primitives/Tabs/TabItem.svelte +52 -52
- package/dist/primitives/Tabs/Tabs.spec.js +14 -14
- package/dist/primitives/Tabs/Tabs.stories.svelte +112 -112
- package/dist/primitives/Tabs/Tabs.svelte +137 -137
- package/dist/primitives/Toggle.spec.js +219 -221
- package/dist/primitives/Toggle.stories.svelte +92 -92
- package/dist/primitives/Toggle.svelte +141 -141
- package/dist/primitives/ToggleTestWrapper.svelte +30 -30
- package/dist/primitives/Tooltip/Tooltip.spec.js +126 -126
- package/dist/primitives/Tooltip/Tooltip.svelte +83 -83
- package/dist/primitives/Typography/Typography.svelte +53 -53
- package/dist/primitives/ValidationError.spec.js +103 -103
- package/dist/primitives/ValidationError.stories.svelte +112 -112
- package/dist/primitives/ValidationError.svelte +29 -29
- package/dist/primitives/index.js +114 -114
- package/dist/recipes/CropImage/CropImage.spec.js +208 -208
- package/dist/recipes/CropImage/CropImage.stories.svelte +104 -104
- package/dist/recipes/CropImage/CropImage.svelte +241 -241
- package/dist/recipes/ImageUploader/ImageUploader.spec.js +1 -1
- package/dist/recipes/ImageUploader/ImageUploader.stories.svelte +125 -125
- package/dist/recipes/ImageUploader/ImageUploader.svelte +972 -994
- package/dist/recipes/SuperLogin/SuperLogin.svelte +24 -24
- package/dist/recipes/Toaster/Toaster.stories.svelte +62 -62
- package/dist/recipes/feedback/EmptyState/EmptyState.svelte +75 -75
- package/dist/recipes/feedback/ErrorDisplay.spec.js +69 -69
- package/dist/recipes/feedback/ErrorDisplay.stories.svelte +113 -113
- package/dist/recipes/feedback/ErrorDisplay.svelte +67 -67
- package/dist/recipes/feedback/StatusIndicator/StatusIndicator.spec.js +133 -133
- package/dist/recipes/feedback/StatusIndicator/StatusIndicator.svelte +176 -176
- package/dist/recipes/feedback/index.js +4 -4
- package/dist/recipes/fields/CheckboxField.spec.js +2 -2
- package/dist/recipes/fields/CheckboxField.svelte +85 -85
- package/dist/recipes/fields/FormField.spec.js +4 -4
- package/dist/recipes/fields/FormField.svelte +58 -58
- package/dist/recipes/fields/RadioGroup.spec.js +1 -1
- package/dist/recipes/fields/RadioGroup.svelte +95 -95
- package/dist/recipes/fields/SelectField.spec.js +2 -2
- package/dist/recipes/fields/SelectField.svelte +82 -82
- package/dist/recipes/fields/TextareaField.spec.js +2 -2
- package/dist/recipes/fields/TextareaField.svelte +101 -101
- package/dist/recipes/fields/ToggleField.spec.js +2 -2
- package/dist/recipes/fields/ToggleField.svelte +60 -60
- package/dist/recipes/fields/index.js +7 -7
- package/dist/recipes/index.js +24 -24
- package/dist/recipes/inputs/MultiSelect.spec.js +263 -263
- package/dist/recipes/inputs/MultiSelect.stories.svelte +133 -133
- package/dist/recipes/inputs/MultiSelect.svelte +291 -291
- package/dist/recipes/inputs/OTPInput.spec.js +251 -251
- package/dist/recipes/inputs/OTPInput.stories.svelte +162 -162
- package/dist/recipes/inputs/OTPInput.svelte +128 -128
- package/dist/recipes/inputs/PasswordInput.spec.js +2 -2
- package/dist/recipes/inputs/PasswordInput.svelte +130 -130
- package/dist/recipes/inputs/PasswordStrengthIndicator/PasswordStrengthIndicator.spec.js +14 -14
- package/dist/recipes/inputs/PasswordStrengthIndicator/PasswordStrengthIndicator.svelte +142 -142
- package/dist/recipes/inputs/PasswordStrengthIndicator/TestWrapper.svelte +2 -2
- package/dist/recipes/inputs/PhoneInput.svelte +254 -254
- package/dist/recipes/inputs/PlaceAutocomplete/PlaceAutocomplete.spec.js +10 -10
- package/dist/recipes/inputs/PlaceAutocomplete/PlaceAutocomplete.stories.svelte +170 -170
- package/dist/recipes/inputs/PlaceAutocomplete/PlaceAutocomplete.svelte +346 -349
- 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 +110 -110
- package/dist/recipes/inputs/index.js +8 -8
- package/dist/recipes/inputs/phoneInput/CountrySelector.svelte +240 -240
- package/dist/recipes/modals/AlertModal.spec.js +36 -36
- package/dist/recipes/modals/AlertModal.svelte +139 -139
- package/dist/recipes/modals/ConfirmationModal.spec.js +396 -396
- package/dist/recipes/modals/ConfirmationModal.stories.svelte +119 -119
- package/dist/recipes/modals/ConfirmationModal.svelte +169 -169
- package/dist/recipes/modals/FeedbackModal.svelte +205 -205
- package/dist/recipes/modals/InputModal.spec.js +17 -17
- package/dist/recipes/modals/InputModal.svelte +194 -194
- package/dist/recipes/modals/ModalStateManager.spec.js +100 -100
- package/dist/recipes/modals/ModalStateManager.svelte +77 -77
- package/dist/recipes/modals/ModalTestWrapper.svelte +65 -65
- package/dist/recipes/modals/StatusModal.spec.js +7 -7
- package/dist/recipes/modals/StatusModal.svelte +216 -216
- package/dist/recipes/modals/index.js +8 -8
- 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/common.js +1 -1
- package/dist/schemas/event.d.ts +147 -41
- package/dist/schemas/event.d.ts.map +1 -1
- package/dist/schemas/event.js +1 -1
- package/dist/schemas/order.d.ts +208 -51
- package/dist/schemas/order.d.ts.map +1 -1
- package/dist/schemas/order.js +1 -0
- package/dist/schemas/performer.d.ts +199 -44
- package/dist/schemas/performer.d.ts.map +1 -1
- package/dist/schemas/performer.js +1 -1
- package/dist/schemas/promo.d.ts +221 -55
- package/dist/schemas/promo.d.ts.map +1 -1
- package/dist/schemas/promo.js +2 -2
- package/dist/schemas/ticket.d.ts +187 -61
- package/dist/schemas/ticket.d.ts.map +1 -1
- package/dist/schemas/ticket.js +1 -1
- package/dist/schemas/user.d.ts +114 -54
- package/dist/schemas/user.d.ts.map +1 -1
- package/dist/schemas/user.js +2 -1
- package/dist/schemas/venue.d.ts +238 -20
- package/dist/schemas/venue.d.ts.map +1 -1
- package/dist/services/show.service.d.ts +46 -46
- package/dist/stores/auth.d.ts +8 -8
- package/dist/stores/auth.svelte.spec.js +1 -1
- package/dist/stores/index.js +9 -9
- package/dist/stores/toaster.d.ts +3 -3
- package/dist/stores/toaster.js +13 -13
- package/dist/stores/toaster.spec.js +59 -59
- 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.stories.svelte +14 -14
- package/dist/stories/ButtonAuditReview.svelte +427 -427
- 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.stories.svelte +19 -19
- package/dist/stories/PatternsGallery.svelte +399 -399
- package/dist/stories/PrimitivesGallery.spec.js +9 -9
- package/dist/stories/PrimitivesGallery.stories.svelte +19 -19
- package/dist/stories/PrimitivesGallery.svelte +756 -756
- package/dist/stories/RecipesGallery.stories.svelte +19 -19
- package/dist/stories/RecipesGallery.svelte +454 -454
- package/dist/stories/button-audit-manifest.json +11186 -11186
- package/dist/tailwind/preset.cjs +87 -87
- package/dist/telemetry.js +401 -401
- package/dist/telemetry.server.js +212 -212
- package/dist/telemetry.server.spec.js +437 -437
- package/dist/telemetry.spec.js +1273 -1273
- 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 +87 -87
- package/dist/tokens/typography-base.css +163 -163
- package/dist/tokens/typography.d.ts +29 -29
- package/dist/tokens/typography.js +29 -29
- package/dist/tokens/utilities.css +418 -430
- package/dist/tokens/variants.d.ts +32 -32
- package/dist/tokens/variants.js +32 -32
- package/dist/utils/__tests__/auth.test.js +431 -431
- package/dist/utils/apiConfig.d.ts +29 -29
- package/dist/utils/apiConfig.js +142 -142
- package/dist/utils/auth.d.ts +46 -46
- package/dist/utils/auth.js +195 -195
- package/dist/utils/greetings.js +187 -187
- package/dist/utils/greetings.spec.js +337 -337
- package/dist/utils/haptic.spec.js +1 -1
- package/dist/utils/imageValidation.js +121 -121
- package/dist/utils/imageValidation.spec.js +223 -223
- package/dist/utils/portal.d.ts +11 -11
- package/dist/utils/portal.js +25 -25
- package/dist/utils/portal.spec.js +143 -143
- package/dist/utils/transitions.js +16 -16
- package/dist/utils/utils/utils.d.ts +2 -2
- package/dist/utils/utils/utils.js +3 -3
- package/dist/utils/utils/utils.spec.js +698 -698
- package/dist/utils/utils.d.ts +41 -41
- package/dist/utils/utils.js +59 -59
- package/dist/utils/utils.spec.js +643 -643
- package/package.json +306 -306
|
@@ -1,427 +1,427 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import Button from '../primitives/Button/Button.svelte';
|
|
3
|
-
|
|
4
|
-
// Valid variants in the Button component
|
|
5
|
-
// Note: Both legacy names (default, alternative, etc.) and semantic aliases (blue-solid, gray-outline) work
|
|
6
|
-
const validVariants = [
|
|
7
|
-
{ name: 'default', alias: 'blue-solid', description: 'Primary solid blue', usage: 'Main CTAs, Save, Submit' },
|
|
8
|
-
{ name: 'alternative', alias: 'gray-outline', description: 'Gray outline', usage: 'Cancel, Secondary actions' },
|
|
9
|
-
{ name: 'outline', alias: 'blue-outline', description: 'Blue outline', usage: 'Secondary CTAs' },
|
|
10
|
-
{ name: 'red', alias: 'red-solid', description: 'Solid red danger', usage: 'Delete, destructive actions' },
|
|
11
|
-
{ name: 'red-outline', alias: null, description: 'Red outline', usage: 'Less prominent danger' },
|
|
12
|
-
{ name: 'ghost', alias: 'gray-text', description: 'Gray text, no border', usage: 'Tertiary actions' },
|
|
13
|
-
{ name: 'ghost-red', alias: 'red-text', description: 'Red text, no border', usage: 'Tertiary danger, Remove' },
|
|
14
|
-
{ name: 'icon', alias: null, description: 'Icon-only button', usage: 'Toolbar icons, close buttons' },
|
|
15
|
-
{ name: 'toggle', alias: null, description: 'Toggle button', usage: 'View switchers' },
|
|
16
|
-
{ name: 'menu-item', alias: null, description: 'Dropdown menu item', usage: 'Menu items, search results' },
|
|
17
|
-
{ name: 'menu-item-danger', alias: null, description: 'Red menu item', usage: 'Delete in menus' },
|
|
18
|
-
{ name: 'link', alias: null, description: 'Blue text link', usage: 'Inline text links' },
|
|
19
|
-
{ name: 'card', alias: null, description: 'Selectable card', usage: 'List selections' },
|
|
20
|
-
{ name: 'search-result', alias: null, description: 'Search result item', usage: 'Search dropdowns' },
|
|
21
|
-
{ name: 'nav', alias: null, description: 'Navigation item', usage: 'Bottom nav bars' },
|
|
22
|
-
];
|
|
23
|
-
|
|
24
|
-
// Recent fixes - December 30, 2024
|
|
25
|
-
const recentFixes = [
|
|
26
|
-
{
|
|
27
|
-
date: '2024-12-30',
|
|
28
|
-
description: 'Lineup page buttons',
|
|
29
|
-
fixes: [
|
|
30
|
-
'Changed + Add button to use Carbon Add icon with text-white',
|
|
31
|
-
'Changed + New spot button to use Carbon Add icon with text-white',
|
|
32
|
-
'Made + New spot blue-solid, + Add blue-solid',
|
|
33
|
-
'Removed 3-dot menus from lineup table (kept in roster)',
|
|
34
|
-
'Fixed icon sizes from w-4 h-4 to w-3 h-3 mr-1',
|
|
35
|
-
]
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
date: '2024-12-30',
|
|
39
|
-
description: 'Edit spot modal performer search',
|
|
40
|
-
fixes: [
|
|
41
|
-
'Added variant="menu-item" to performer search result buttons',
|
|
42
|
-
'Previously had no variant, defaulting to solid blue background',
|
|
43
|
-
]
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
date: '2024-12-30',
|
|
47
|
-
description: 'Actions dropdown in LineupSection',
|
|
48
|
-
fixes: [
|
|
49
|
-
'Fixed dropdown not opening - changed from triggeredBy to bind:open',
|
|
50
|
-
'Added actionsDropdownOpen state with $state(false)',
|
|
51
|
-
'Changed placement to bottom-end',
|
|
52
|
-
]
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
date: '2024-12-30',
|
|
56
|
-
description: 'Batch invalid variant fixes',
|
|
57
|
-
fixes: [
|
|
58
|
-
'alternative → gray-outline (across ~120 files)',
|
|
59
|
-
'default → blue-solid',
|
|
60
|
-
'ghost → gray-text',
|
|
61
|
-
'primary → blue-solid',
|
|
62
|
-
'outline → blue-outline',
|
|
63
|
-
'link → gray-text',
|
|
64
|
-
'green-solid → blue-solid',
|
|
65
|
-
]
|
|
66
|
-
},
|
|
67
|
-
];
|
|
68
|
-
|
|
69
|
-
// Buttons WITHOUT variant that need review (default to solid blue)
|
|
70
|
-
// Accurate count using multi-line tag parsing (260 total production buttons)
|
|
71
|
-
const buttonsWithoutVariant = [
|
|
72
|
-
// High priority - 5+ buttons
|
|
73
|
-
{ file: 'routes/a/profile/venue/add/+page.svelte', count: 8, context: 'Add venue form' },
|
|
74
|
-
{ file: 'routes/superuser/templates/sms/+page.svelte', count: 7, context: 'SMS template editor' },
|
|
75
|
-
{ file: 'routes/superuser/+page.svelte', count: 6, context: 'Superuser admin' },
|
|
76
|
-
{ file: 'lib/components/onboarding/VenueFaqModals.svelte', count: 6, context: 'Onboarding FAQ modals' },
|
|
77
|
-
{ file: 'routes/a/venues/[venueID]/roster/+page.svelte', count: 5, context: 'Venue roster' },
|
|
78
|
-
{ file: 'routes/a/venues/[venueID]/+page.svelte', count: 5, context: 'Venue page' },
|
|
79
|
-
{ file: 'routes/a/venues/[venueID]/[eventID]/tracking/+page.svelte', count: 5, context: 'Event tracking' },
|
|
80
|
-
{ file: 'routes/a/events/_components/CollectionForm.svelte', count: 5, context: 'Event collection form' },
|
|
81
|
-
{ file: 'components/PromoCode/PromoCode.svelte', count: 5, context: 'Promo code actions' },
|
|
82
|
-
|
|
83
|
-
// Medium priority - 4 buttons
|
|
84
|
-
{ file: 'routes/a/venues/[venueID]/[eventID]/tickets/+page.svelte', count: 4, context: 'Event tickets' },
|
|
85
|
-
{ file: 'routes/a/venues/_components/availsSettings.svelte', count: 4, context: 'Availability settings' },
|
|
86
|
-
{ file: 'routes/a/team/_components/TeamTabContent.svelte', count: 4, context: 'Team tab' },
|
|
87
|
-
{ file: 'lib/components/venues/VenueDisclaimersSection.svelte', count: 4, context: 'Venue disclaimers' },
|
|
88
|
-
{ file: 'components/IndividualPerformerTable/IndividualPerformerTableUnified.svelte', count: 4, context: 'Performer table' },
|
|
89
|
-
{ file: 'components/DateRangePicker/DateRangePicker.svelte', count: 4, context: 'Date range picker' },
|
|
90
|
-
{ file: 'components/DateRangeAndDate.svelte', count: 4, context: 'Date range' },
|
|
91
|
-
{ file: 'components/AllPerformerTable/AllPerformerTableUnified.svelte', count: 4, context: 'All performers table' },
|
|
92
|
-
|
|
93
|
-
// 3 buttons each
|
|
94
|
-
{ file: 'routes/superuser/templates/email/+page.svelte', count: 3, context: 'Email template editor' },
|
|
95
|
-
{ file: 'routes/superuser/+layout.svelte', count: 3, context: 'Superuser layout' },
|
|
96
|
-
{ file: 'routes/a/widgets/+page.svelte', count: 3, context: 'Widget management' },
|
|
97
|
-
{ file: 'routes/a/venues/[venueID]/[eventID]/schedule/+page.svelte', count: 3, context: 'Event schedule' },
|
|
98
|
-
{ file: 'components/FileDropzone/FileDropzone.svelte', count: 3, context: 'File upload' },
|
|
99
|
-
{ file: 'components/Events/Tickets/OrderSummary.svelte', count: 3, context: 'Order summary' },
|
|
100
|
-
{ file: 'components/DateTimePicker/DateTimePicker.svelte', count: 3, context: 'Date/time picker' },
|
|
101
|
-
{ file: 'components/DatePicker/ArrowsDatePicker.svelte', count: 3, context: 'Date picker arrows' },
|
|
102
|
-
{ file: 'components/CropImage/CropImage.svelte', count: 3, context: 'Image cropper' },
|
|
103
|
-
{ file: 'components/Calendar/QuarterView.svelte', count: 3, context: 'Calendar navigation' },
|
|
104
|
-
|
|
105
|
-
// Remaining ~100 files with 1-2 buttons each
|
|
106
|
-
{ file: '~100 other files (1-2 buttons each)', count: 142, context: 'Various actions across codebase' },
|
|
107
|
-
];
|
|
108
|
-
|
|
109
|
-
// Accurate count using multi-line tag parsing
|
|
110
|
-
const totalWithoutVariant = 260;
|
|
111
|
-
|
|
112
|
-
// Visual examples of buttons that need review
|
|
113
|
-
// These show CURRENT rendering (no variant = default/blue-solid) vs RECOMMENDED variant
|
|
114
|
-
const visualExamples = [
|
|
115
|
-
{
|
|
116
|
-
category: 'Tertiary Actions (Edit, View, Details)',
|
|
117
|
-
description: 'Text-only actions that should not compete with primary CTAs',
|
|
118
|
-
examples: [
|
|
119
|
-
{ label: 'Edit', location: 'Cards/LeftCard.svelte', current: undefined, recommended: 'ghost' },
|
|
120
|
-
{ label: 'View Details', location: 'Various card components', current: undefined, recommended: 'ghost' },
|
|
121
|
-
{ label: 'Show More', location: 'Lists and tables', current: undefined, recommended: 'ghost' },
|
|
122
|
-
]
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
category: 'Cancel / Dismiss Buttons',
|
|
126
|
-
description: 'Secondary actions that close modals or cancel operations',
|
|
127
|
-
examples: [
|
|
128
|
-
{ label: 'Cancel', location: 'Forms and modals', current: undefined, recommended: 'alternative' },
|
|
129
|
-
{ label: 'Close', location: 'Modal headers', current: undefined, recommended: 'alternative' },
|
|
130
|
-
{ label: 'Dismiss', location: 'Notifications', current: undefined, recommended: 'alternative' },
|
|
131
|
-
]
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
category: 'Dropdown / Menu Items',
|
|
135
|
-
description: 'Items in dropdown menus and search results',
|
|
136
|
-
examples: [
|
|
137
|
-
{ label: 'Select Option', location: 'Various dropdowns', current: undefined, recommended: 'menu-item' },
|
|
138
|
-
{ label: 'Search Result', location: 'Search dropdowns', current: undefined, recommended: 'search-result' },
|
|
139
|
-
{ label: 'Delete Item', location: 'Dropdown danger actions', current: undefined, recommended: 'menu-item-danger' },
|
|
140
|
-
]
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
category: 'Icon-Only Buttons',
|
|
144
|
-
description: 'Buttons with only icons (close X, calendar, etc)',
|
|
145
|
-
examples: [
|
|
146
|
-
{ label: 'X', location: 'TimePicker.svelte (calendar)', current: undefined, recommended: 'icon' },
|
|
147
|
-
{ label: 'X', location: 'Modal close buttons', current: undefined, recommended: 'icon' },
|
|
148
|
-
{ label: '...', location: 'More options buttons', current: undefined, recommended: 'icon' },
|
|
149
|
-
]
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
category: 'Primary CTAs (Correct as default)',
|
|
153
|
-
description: 'These buttons are correctly using the default (blue-solid)',
|
|
154
|
-
examples: [
|
|
155
|
-
{ label: 'Save', location: 'Form submissions', current: undefined, recommended: 'default', correct: true },
|
|
156
|
-
{ label: 'Add', location: 'Cards/LeftCard.svelte', current: undefined, recommended: 'default', correct: true },
|
|
157
|
-
{ label: 'Submit', location: 'Contact forms', current: undefined, recommended: 'default', correct: true },
|
|
158
|
-
]
|
|
159
|
-
},
|
|
160
|
-
];
|
|
161
|
-
</script>
|
|
162
|
-
|
|
163
|
-
<div class="p-6 max-w-7xl mx-auto space-y-8">
|
|
164
|
-
<div class="text-center mb-8">
|
|
165
|
-
<h1 class="text-3xl font-bold text-
|
|
166
|
-
<p class="text-
|
|
167
|
-
</div>
|
|
168
|
-
|
|
169
|
-
<!-- Summary Cards -->
|
|
170
|
-
<div class="grid grid-cols-3 gap-6 mb-8">
|
|
171
|
-
<div class="p-6 bg-
|
|
172
|
-
<div class="text-4xl font-bold text-
|
|
173
|
-
<div class="text-sm text-
|
|
174
|
-
<span class="inline-block mt-2 px-3 py-1 text-xs rounded-full bg-
|
|
175
|
-
</div>
|
|
176
|
-
<div class="p-6 bg-
|
|
177
|
-
<div class="text-4xl font-bold text-
|
|
178
|
-
<div class="text-sm text-
|
|
179
|
-
<span class="inline-block mt-2 px-3 py-1 text-xs rounded-full bg-
|
|
180
|
-
</div>
|
|
181
|
-
<div class="p-6 bg-
|
|
182
|
-
<div class="text-4xl font-bold text-
|
|
183
|
-
<div class="text-sm text-
|
|
184
|
-
<span class="inline-block mt-2 px-3 py-1 text-xs rounded-full bg-
|
|
185
|
-
</div>
|
|
186
|
-
</div>
|
|
187
|
-
|
|
188
|
-
<!-- Buttons Without Variant -->
|
|
189
|
-
<section class="border-2 border-
|
|
190
|
-
<h2 class="text-xl font-bold text-
|
|
191
|
-
<span class="text-2xl">⚠</span> Buttons Without Variant (Default to blue-solid)
|
|
192
|
-
</h2>
|
|
193
|
-
<p class="text-
|
|
194
|
-
These buttons have no <code class="bg-
|
|
195
|
-
Review each to determine if blue-solid is correct or if another variant should be used.
|
|
196
|
-
</p>
|
|
197
|
-
|
|
198
|
-
<div class="overflow-x-auto bg-
|
|
199
|
-
<table class="w-full text-sm">
|
|
200
|
-
<thead class="bg-
|
|
201
|
-
<tr>
|
|
202
|
-
<th class="px-4 py-3 text-left font-medium">File</th>
|
|
203
|
-
<th class="px-4 py-3 text-center font-medium">Count</th>
|
|
204
|
-
<th class="px-4 py-3 text-left font-medium">Context</th>
|
|
205
|
-
<th class="px-4 py-3 text-center font-medium">Status</th>
|
|
206
|
-
</tr>
|
|
207
|
-
</thead>
|
|
208
|
-
<tbody>
|
|
209
|
-
{#each buttonsWithoutVariant as item}
|
|
210
|
-
<tr class="border-b border-
|
|
211
|
-
<td class="px-4 py-3">
|
|
212
|
-
<code class="text-xs bg-
|
|
213
|
-
{item.file}
|
|
214
|
-
</code>
|
|
215
|
-
</td>
|
|
216
|
-
<td class="px-4 py-3 text-center font-medium">{item.count}</td>
|
|
217
|
-
<td class="px-4 py-3 text-
|
|
218
|
-
<td class="px-4 py-3 text-center">
|
|
219
|
-
<span class="px-2 py-1 text-xs rounded-full bg-
|
|
220
|
-
</td>
|
|
221
|
-
</tr>
|
|
222
|
-
{/each}
|
|
223
|
-
</tbody>
|
|
224
|
-
</table>
|
|
225
|
-
</div>
|
|
226
|
-
|
|
227
|
-
<div class="mt-4 p-4 bg-
|
|
228
|
-
<p class="text-sm text-
|
|
229
|
-
<strong>Total: ~{totalWithoutVariant} buttons</strong> across the codebase need variant review.
|
|
230
|
-
Many may be intentionally blue-solid (CTAs), but others may need gray-outline, menu-item, or icon variants.
|
|
231
|
-
</p>
|
|
232
|
-
</div>
|
|
233
|
-
</section>
|
|
234
|
-
|
|
235
|
-
<!-- Visual Examples: Current vs Recommended -->
|
|
236
|
-
<section class="border-2 border-
|
|
237
|
-
<h2 class="text-xl font-bold text-
|
|
238
|
-
<span class="text-2xl">👁</span> Visual Comparison: Current vs Recommended
|
|
239
|
-
</h2>
|
|
240
|
-
<p class="text-
|
|
241
|
-
These examples show how buttons WITHOUT a variant currently render (blue-solid default) versus how they SHOULD render with the correct variant.
|
|
242
|
-
</p>
|
|
243
|
-
|
|
244
|
-
<div class="space-y-8">
|
|
245
|
-
{#each visualExamples as category}
|
|
246
|
-
<div class="bg-
|
|
247
|
-
<div class="flex items-center gap-3 mb-2">
|
|
248
|
-
<h3 class="font-bold text-
|
|
249
|
-
{#if category.examples[0]?.correct}
|
|
250
|
-
<span class="px-2 py-0.5 text-xs rounded-full bg-
|
|
251
|
-
{:else}
|
|
252
|
-
<span class="px-2 py-0.5 text-xs rounded-full bg-
|
|
253
|
-
{/if}
|
|
254
|
-
</div>
|
|
255
|
-
<p class="text-sm text-
|
|
256
|
-
|
|
257
|
-
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
|
|
258
|
-
{#each category.examples as example}
|
|
259
|
-
<div class="border border-
|
|
260
|
-
<div class="text-xs text-
|
|
261
|
-
{example.location}
|
|
262
|
-
</div>
|
|
263
|
-
|
|
264
|
-
<div class="space-y-3">
|
|
265
|
-
<!-- Current (no variant) -->
|
|
266
|
-
<div>
|
|
267
|
-
<div class="text-xs text-
|
|
268
|
-
<Button size="sm">{example.label}</Button>
|
|
269
|
-
</div>
|
|
270
|
-
|
|
271
|
-
<!-- Arrow -->
|
|
272
|
-
<div class="text-center text-
|
|
273
|
-
|
|
274
|
-
<!-- Recommended -->
|
|
275
|
-
<div>
|
|
276
|
-
<div class="text-xs text-
|
|
277
|
-
Recommended: <code class="bg-
|
|
278
|
-
</div>
|
|
279
|
-
<Button variant={example.recommended} size="sm">{example.label}</Button>
|
|
280
|
-
</div>
|
|
281
|
-
</div>
|
|
282
|
-
</div>
|
|
283
|
-
{/each}
|
|
284
|
-
</div>
|
|
285
|
-
</div>
|
|
286
|
-
{/each}
|
|
287
|
-
</div>
|
|
288
|
-
|
|
289
|
-
<div class="mt-6 p-4 bg-
|
|
290
|
-
<p class="text-sm text-
|
|
291
|
-
<strong>Key insight:</strong> Buttons without variant all render as solid blue (left), making it hard to distinguish
|
|
292
|
-
primary actions from secondary ones. Adding proper variants (right) creates visual hierarchy.
|
|
293
|
-
</p>
|
|
294
|
-
</div>
|
|
295
|
-
</section>
|
|
296
|
-
|
|
297
|
-
<!-- Recent Fixes -->
|
|
298
|
-
<section class="border-2 border-
|
|
299
|
-
<h2 class="text-xl font-bold text-
|
|
300
|
-
<span class="text-2xl">✓</span> Recent Fixes (December 30, 2024)
|
|
301
|
-
</h2>
|
|
302
|
-
|
|
303
|
-
<div class="space-y-6">
|
|
304
|
-
{#each recentFixes as fix}
|
|
305
|
-
<div class="bg-
|
|
306
|
-
<h3 class="font-semibold text-
|
|
307
|
-
<ul class="text-sm text-
|
|
308
|
-
{#each fix.fixes as item}
|
|
309
|
-
<li class="flex items-start gap-2">
|
|
310
|
-
<span class="text-
|
|
311
|
-
{item}
|
|
312
|
-
</li>
|
|
313
|
-
{/each}
|
|
314
|
-
</ul>
|
|
315
|
-
</div>
|
|
316
|
-
{/each}
|
|
317
|
-
</div>
|
|
318
|
-
</section>
|
|
319
|
-
|
|
320
|
-
<!-- Valid Variants Reference -->
|
|
321
|
-
<section class="border rounded-lg p-6 bg-
|
|
322
|
-
<h2 class="text-xl font-bold text-
|
|
323
|
-
<span class="text-
|
|
324
|
-
</h2>
|
|
325
|
-
|
|
326
|
-
<div class="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4">
|
|
327
|
-
{#each validVariants as v}
|
|
328
|
-
<div class="border border-
|
|
329
|
-
<div class="flex items-center gap-2 mb-3">
|
|
330
|
-
<Button variant={v.name} size="sm">{v.name}</Button>
|
|
331
|
-
</div>
|
|
332
|
-
<code class="text-xs bg-
|
|
333
|
-
variant="{v.name}"
|
|
334
|
-
</code>
|
|
335
|
-
{#if v.alias}
|
|
336
|
-
<code class="text-xs bg-
|
|
337
|
-
or: "{v.alias}"
|
|
338
|
-
</code>
|
|
339
|
-
{/if}
|
|
340
|
-
<p class="text-xs text-
|
|
341
|
-
</div>
|
|
342
|
-
{/each}
|
|
343
|
-
</div>
|
|
344
|
-
</section>
|
|
345
|
-
|
|
346
|
-
<!-- Decision Guide -->
|
|
347
|
-
<section class="border-2 border-
|
|
348
|
-
<h2 class="text-xl font-bold text-
|
|
349
|
-
|
|
350
|
-
<div class="grid grid-cols-2 gap-6">
|
|
351
|
-
<div class="bg-
|
|
352
|
-
<h3 class="font-semibold text-
|
|
353
|
-
<ul class="space-y-2 text-sm">
|
|
354
|
-
<li class="flex items-start gap-2">
|
|
355
|
-
<code class="bg-
|
|
356
|
-
<span class="text-
|
|
357
|
-
</li>
|
|
358
|
-
<li class="flex items-start gap-2">
|
|
359
|
-
<code class="bg-
|
|
360
|
-
<span class="text-
|
|
361
|
-
</li>
|
|
362
|
-
<li class="flex items-start gap-2">
|
|
363
|
-
<code class="bg-
|
|
364
|
-
<span class="text-
|
|
365
|
-
</li>
|
|
366
|
-
<li class="flex items-start gap-2">
|
|
367
|
-
<code class="bg-
|
|
368
|
-
<span class="text-
|
|
369
|
-
</li>
|
|
370
|
-
<li class="flex items-start gap-2">
|
|
371
|
-
<code class="bg-
|
|
372
|
-
<span class="text-
|
|
373
|
-
</li>
|
|
374
|
-
<li class="flex items-start gap-2">
|
|
375
|
-
<code class="bg-
|
|
376
|
-
<span class="text-
|
|
377
|
-
</li>
|
|
378
|
-
<li class="flex items-start gap-2">
|
|
379
|
-
<code class="bg-
|
|
380
|
-
<span class="text-
|
|
381
|
-
</li>
|
|
382
|
-
</ul>
|
|
383
|
-
</div>
|
|
384
|
-
|
|
385
|
-
<div class="bg-
|
|
386
|
-
<h3 class="font-semibold text-
|
|
387
|
-
<ul class="space-y-2 text-sm text-
|
|
388
|
-
<li class="flex items-start gap-2">
|
|
389
|
-
<span class="text-
|
|
390
|
-
<span>No variant on dropdown items → defaults to solid blue</span>
|
|
391
|
-
</li>
|
|
392
|
-
<li class="flex items-start gap-2">
|
|
393
|
-
<span class="text-
|
|
394
|
-
<span>No variant on Cancel → should be alternative</span>
|
|
395
|
-
</li>
|
|
396
|
-
<li class="flex items-start gap-2">
|
|
397
|
-
<span class="text-
|
|
398
|
-
<span>No variant on close/X buttons → should be icon</span>
|
|
399
|
-
</li>
|
|
400
|
-
<li class="flex items-start gap-2">
|
|
401
|
-
<span class="text-
|
|
402
|
-
<span>Invalid variant names fall back to default (solid blue)</span>
|
|
403
|
-
</li>
|
|
404
|
-
</ul>
|
|
405
|
-
|
|
406
|
-
<div class="mt-4 p-3 bg-
|
|
407
|
-
<p class="text-xs text-
|
|
408
|
-
<strong>Tip:</strong> When in doubt, use alternative for secondary actions
|
|
409
|
-
and default only for the primary action.
|
|
410
|
-
</p>
|
|
411
|
-
</div>
|
|
412
|
-
</div>
|
|
413
|
-
</div>
|
|
414
|
-
</section>
|
|
415
|
-
|
|
416
|
-
<!-- How to Find Issues -->
|
|
417
|
-
<section class="border rounded-lg p-6 bg-
|
|
418
|
-
<h2 class="text-xl font-bold text-
|
|
419
|
-
|
|
420
|
-
<div class="bg-
|
|
421
|
-
<p class="text-sm text-
|
|
422
|
-
<code class="block bg-
|
|
423
|
-
grep -rn "<Button" --include="*.svelte" src | grep -v "variant="
|
|
424
|
-
</code>
|
|
425
|
-
</div>
|
|
426
|
-
</section>
|
|
427
|
-
</div>
|
|
1
|
+
<script>
|
|
2
|
+
import Button from '../primitives/Button/Button.svelte';
|
|
3
|
+
|
|
4
|
+
// Valid variants in the Button component
|
|
5
|
+
// Note: Both legacy names (default, alternative, etc.) and semantic aliases (blue-solid, gray-outline) work
|
|
6
|
+
const validVariants = [
|
|
7
|
+
{ name: 'default', alias: 'blue-solid', description: 'Primary solid blue', usage: 'Main CTAs, Save, Submit' },
|
|
8
|
+
{ name: 'alternative', alias: 'gray-outline', description: 'Gray outline', usage: 'Cancel, Secondary actions' },
|
|
9
|
+
{ name: 'outline', alias: 'blue-outline', description: 'Blue outline', usage: 'Secondary CTAs' },
|
|
10
|
+
{ name: 'red', alias: 'red-solid', description: 'Solid red danger', usage: 'Delete, destructive actions' },
|
|
11
|
+
{ name: 'red-outline', alias: null, description: 'Red outline', usage: 'Less prominent danger' },
|
|
12
|
+
{ name: 'ghost', alias: 'gray-text', description: 'Gray text, no border', usage: 'Tertiary actions' },
|
|
13
|
+
{ name: 'ghost-red', alias: 'red-text', description: 'Red text, no border', usage: 'Tertiary danger, Remove' },
|
|
14
|
+
{ name: 'icon', alias: null, description: 'Icon-only button', usage: 'Toolbar icons, close buttons' },
|
|
15
|
+
{ name: 'toggle', alias: null, description: 'Toggle button', usage: 'View switchers' },
|
|
16
|
+
{ name: 'menu-item', alias: null, description: 'Dropdown menu item', usage: 'Menu items, search results' },
|
|
17
|
+
{ name: 'menu-item-danger', alias: null, description: 'Red menu item', usage: 'Delete in menus' },
|
|
18
|
+
{ name: 'link', alias: null, description: 'Blue text link', usage: 'Inline text links' },
|
|
19
|
+
{ name: 'card', alias: null, description: 'Selectable card', usage: 'List selections' },
|
|
20
|
+
{ name: 'search-result', alias: null, description: 'Search result item', usage: 'Search dropdowns' },
|
|
21
|
+
{ name: 'nav', alias: null, description: 'Navigation item', usage: 'Bottom nav bars' },
|
|
22
|
+
];
|
|
23
|
+
|
|
24
|
+
// Recent fixes - December 30, 2024
|
|
25
|
+
const recentFixes = [
|
|
26
|
+
{
|
|
27
|
+
date: '2024-12-30',
|
|
28
|
+
description: 'Lineup page buttons',
|
|
29
|
+
fixes: [
|
|
30
|
+
'Changed + Add button to use Carbon Add icon with text-white',
|
|
31
|
+
'Changed + New spot button to use Carbon Add icon with text-white',
|
|
32
|
+
'Made + New spot blue-solid, + Add blue-solid',
|
|
33
|
+
'Removed 3-dot menus from lineup table (kept in roster)',
|
|
34
|
+
'Fixed icon sizes from w-4 h-4 to w-3 h-3 mr-1',
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
date: '2024-12-30',
|
|
39
|
+
description: 'Edit spot modal performer search',
|
|
40
|
+
fixes: [
|
|
41
|
+
'Added variant="menu-item" to performer search result buttons',
|
|
42
|
+
'Previously had no variant, defaulting to solid blue background',
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
date: '2024-12-30',
|
|
47
|
+
description: 'Actions dropdown in LineupSection',
|
|
48
|
+
fixes: [
|
|
49
|
+
'Fixed dropdown not opening - changed from triggeredBy to bind:open',
|
|
50
|
+
'Added actionsDropdownOpen state with $state(false)',
|
|
51
|
+
'Changed placement to bottom-end',
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
date: '2024-12-30',
|
|
56
|
+
description: 'Batch invalid variant fixes',
|
|
57
|
+
fixes: [
|
|
58
|
+
'alternative → gray-outline (across ~120 files)',
|
|
59
|
+
'default → blue-solid',
|
|
60
|
+
'ghost → gray-text',
|
|
61
|
+
'primary → blue-solid',
|
|
62
|
+
'outline → blue-outline',
|
|
63
|
+
'link → gray-text',
|
|
64
|
+
'green-solid → blue-solid',
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
];
|
|
68
|
+
|
|
69
|
+
// Buttons WITHOUT variant that need review (default to solid blue)
|
|
70
|
+
// Accurate count using multi-line tag parsing (260 total production buttons)
|
|
71
|
+
const buttonsWithoutVariant = [
|
|
72
|
+
// High priority - 5+ buttons
|
|
73
|
+
{ file: 'routes/a/profile/venue/add/+page.svelte', count: 8, context: 'Add venue form' },
|
|
74
|
+
{ file: 'routes/superuser/templates/sms/+page.svelte', count: 7, context: 'SMS template editor' },
|
|
75
|
+
{ file: 'routes/superuser/+page.svelte', count: 6, context: 'Superuser admin' },
|
|
76
|
+
{ file: 'lib/components/onboarding/VenueFaqModals.svelte', count: 6, context: 'Onboarding FAQ modals' },
|
|
77
|
+
{ file: 'routes/a/venues/[venueID]/roster/+page.svelte', count: 5, context: 'Venue roster' },
|
|
78
|
+
{ file: 'routes/a/venues/[venueID]/+page.svelte', count: 5, context: 'Venue page' },
|
|
79
|
+
{ file: 'routes/a/venues/[venueID]/[eventID]/tracking/+page.svelte', count: 5, context: 'Event tracking' },
|
|
80
|
+
{ file: 'routes/a/events/_components/CollectionForm.svelte', count: 5, context: 'Event collection form' },
|
|
81
|
+
{ file: 'components/PromoCode/PromoCode.svelte', count: 5, context: 'Promo code actions' },
|
|
82
|
+
|
|
83
|
+
// Medium priority - 4 buttons
|
|
84
|
+
{ file: 'routes/a/venues/[venueID]/[eventID]/tickets/+page.svelte', count: 4, context: 'Event tickets' },
|
|
85
|
+
{ file: 'routes/a/venues/_components/availsSettings.svelte', count: 4, context: 'Availability settings' },
|
|
86
|
+
{ file: 'routes/a/team/_components/TeamTabContent.svelte', count: 4, context: 'Team tab' },
|
|
87
|
+
{ file: 'lib/components/venues/VenueDisclaimersSection.svelte', count: 4, context: 'Venue disclaimers' },
|
|
88
|
+
{ file: 'components/IndividualPerformerTable/IndividualPerformerTableUnified.svelte', count: 4, context: 'Performer table' },
|
|
89
|
+
{ file: 'components/DateRangePicker/DateRangePicker.svelte', count: 4, context: 'Date range picker' },
|
|
90
|
+
{ file: 'components/DateRangeAndDate.svelte', count: 4, context: 'Date range' },
|
|
91
|
+
{ file: 'components/AllPerformerTable/AllPerformerTableUnified.svelte', count: 4, context: 'All performers table' },
|
|
92
|
+
|
|
93
|
+
// 3 buttons each
|
|
94
|
+
{ file: 'routes/superuser/templates/email/+page.svelte', count: 3, context: 'Email template editor' },
|
|
95
|
+
{ file: 'routes/superuser/+layout.svelte', count: 3, context: 'Superuser layout' },
|
|
96
|
+
{ file: 'routes/a/widgets/+page.svelte', count: 3, context: 'Widget management' },
|
|
97
|
+
{ file: 'routes/a/venues/[venueID]/[eventID]/schedule/+page.svelte', count: 3, context: 'Event schedule' },
|
|
98
|
+
{ file: 'components/FileDropzone/FileDropzone.svelte', count: 3, context: 'File upload' },
|
|
99
|
+
{ file: 'components/Events/Tickets/OrderSummary.svelte', count: 3, context: 'Order summary' },
|
|
100
|
+
{ file: 'components/DateTimePicker/DateTimePicker.svelte', count: 3, context: 'Date/time picker' },
|
|
101
|
+
{ file: 'components/DatePicker/ArrowsDatePicker.svelte', count: 3, context: 'Date picker arrows' },
|
|
102
|
+
{ file: 'components/CropImage/CropImage.svelte', count: 3, context: 'Image cropper' },
|
|
103
|
+
{ file: 'components/Calendar/QuarterView.svelte', count: 3, context: 'Calendar navigation' },
|
|
104
|
+
|
|
105
|
+
// Remaining ~100 files with 1-2 buttons each
|
|
106
|
+
{ file: '~100 other files (1-2 buttons each)', count: 142, context: 'Various actions across codebase' },
|
|
107
|
+
];
|
|
108
|
+
|
|
109
|
+
// Accurate count using multi-line tag parsing
|
|
110
|
+
const totalWithoutVariant = 260;
|
|
111
|
+
|
|
112
|
+
// Visual examples of buttons that need review
|
|
113
|
+
// These show CURRENT rendering (no variant = default/blue-solid) vs RECOMMENDED variant
|
|
114
|
+
const visualExamples = [
|
|
115
|
+
{
|
|
116
|
+
category: 'Tertiary Actions (Edit, View, Details)',
|
|
117
|
+
description: 'Text-only actions that should not compete with primary CTAs',
|
|
118
|
+
examples: [
|
|
119
|
+
{ label: 'Edit', location: 'Cards/LeftCard.svelte', current: undefined, recommended: 'ghost' },
|
|
120
|
+
{ label: 'View Details', location: 'Various card components', current: undefined, recommended: 'ghost' },
|
|
121
|
+
{ label: 'Show More', location: 'Lists and tables', current: undefined, recommended: 'ghost' },
|
|
122
|
+
]
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
category: 'Cancel / Dismiss Buttons',
|
|
126
|
+
description: 'Secondary actions that close modals or cancel operations',
|
|
127
|
+
examples: [
|
|
128
|
+
{ label: 'Cancel', location: 'Forms and modals', current: undefined, recommended: 'alternative' },
|
|
129
|
+
{ label: 'Close', location: 'Modal headers', current: undefined, recommended: 'alternative' },
|
|
130
|
+
{ label: 'Dismiss', location: 'Notifications', current: undefined, recommended: 'alternative' },
|
|
131
|
+
]
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
category: 'Dropdown / Menu Items',
|
|
135
|
+
description: 'Items in dropdown menus and search results',
|
|
136
|
+
examples: [
|
|
137
|
+
{ label: 'Select Option', location: 'Various dropdowns', current: undefined, recommended: 'menu-item' },
|
|
138
|
+
{ label: 'Search Result', location: 'Search dropdowns', current: undefined, recommended: 'search-result' },
|
|
139
|
+
{ label: 'Delete Item', location: 'Dropdown danger actions', current: undefined, recommended: 'menu-item-danger' },
|
|
140
|
+
]
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
category: 'Icon-Only Buttons',
|
|
144
|
+
description: 'Buttons with only icons (close X, calendar, etc)',
|
|
145
|
+
examples: [
|
|
146
|
+
{ label: 'X', location: 'TimePicker.svelte (calendar)', current: undefined, recommended: 'icon' },
|
|
147
|
+
{ label: 'X', location: 'Modal close buttons', current: undefined, recommended: 'icon' },
|
|
148
|
+
{ label: '...', location: 'More options buttons', current: undefined, recommended: 'icon' },
|
|
149
|
+
]
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
category: 'Primary CTAs (Correct as default)',
|
|
153
|
+
description: 'These buttons are correctly using the default (blue-solid)',
|
|
154
|
+
examples: [
|
|
155
|
+
{ label: 'Save', location: 'Form submissions', current: undefined, recommended: 'default', correct: true },
|
|
156
|
+
{ label: 'Add', location: 'Cards/LeftCard.svelte', current: undefined, recommended: 'default', correct: true },
|
|
157
|
+
{ label: 'Submit', location: 'Contact forms', current: undefined, recommended: 'default', correct: true },
|
|
158
|
+
]
|
|
159
|
+
},
|
|
160
|
+
];
|
|
161
|
+
</script>
|
|
162
|
+
|
|
163
|
+
<div class="p-6 max-w-7xl mx-auto space-y-8">
|
|
164
|
+
<div class="text-center mb-8">
|
|
165
|
+
<h1 class="text-3xl font-bold text-text-primary mb-2">Button Audit Review</h1>
|
|
166
|
+
<p class="text-text-secondary">Last updated: December 30, 2024</p>
|
|
167
|
+
</div>
|
|
168
|
+
|
|
169
|
+
<!-- Summary Cards -->
|
|
170
|
+
<div class="grid grid-cols-3 gap-6 mb-8">
|
|
171
|
+
<div class="p-6 bg-status-warning-bg border-2 border-status-warning-border rounded-lg text-center">
|
|
172
|
+
<div class="text-4xl font-bold text-accent-warning">{totalWithoutVariant}</div>
|
|
173
|
+
<div class="text-sm text-text-secondary mt-2">Buttons Without Variant</div>
|
|
174
|
+
<span class="inline-block mt-2 px-3 py-1 text-xs rounded-full bg-status-warning-bg text-status-warning-text">Needs Review</span>
|
|
175
|
+
</div>
|
|
176
|
+
<div class="p-6 bg-status-success-bg border-2 border-accent-success rounded-lg text-center">
|
|
177
|
+
<div class="text-4xl font-bold text-accent-success">{recentFixes.length}</div>
|
|
178
|
+
<div class="text-sm text-text-secondary mt-2">Recent Fix Sessions</div>
|
|
179
|
+
<span class="inline-block mt-2 px-3 py-1 text-xs rounded-full bg-status-success-bg text-status-success-text">Today</span>
|
|
180
|
+
</div>
|
|
181
|
+
<div class="p-6 bg-status-info-bg border-2 border-brand-primary rounded-lg text-center">
|
|
182
|
+
<div class="text-4xl font-bold text-brand-primary">{validVariants.length}</div>
|
|
183
|
+
<div class="text-sm text-text-secondary mt-2">Valid Variants</div>
|
|
184
|
+
<span class="inline-block mt-2 px-3 py-1 text-xs rounded-full bg-status-info-bg text-status-info-text">Reference</span>
|
|
185
|
+
</div>
|
|
186
|
+
</div>
|
|
187
|
+
|
|
188
|
+
<!-- Buttons Without Variant -->
|
|
189
|
+
<section class="border-2 border-status-warning-border rounded-lg p-6 bg-status-warning-bg">
|
|
190
|
+
<h2 class="text-xl font-bold text-status-warning-text mb-4 flex items-center gap-2">
|
|
191
|
+
<span class="text-2xl">⚠</span> Buttons Without Variant (Default to blue-solid)
|
|
192
|
+
</h2>
|
|
193
|
+
<p class="text-text-secondary mb-4">
|
|
194
|
+
These buttons have no <code class="bg-card px-2 py-0.5 rounded text-sm">variant</code> prop and render as solid blue by default.
|
|
195
|
+
Review each to determine if blue-solid is correct or if another variant should be used.
|
|
196
|
+
</p>
|
|
197
|
+
|
|
198
|
+
<div class="overflow-x-auto bg-card rounded-lg">
|
|
199
|
+
<table class="w-full text-sm">
|
|
200
|
+
<thead class="bg-muted">
|
|
201
|
+
<tr>
|
|
202
|
+
<th class="px-4 py-3 text-left font-medium">File</th>
|
|
203
|
+
<th class="px-4 py-3 text-center font-medium">Count</th>
|
|
204
|
+
<th class="px-4 py-3 text-left font-medium">Context</th>
|
|
205
|
+
<th class="px-4 py-3 text-center font-medium">Status</th>
|
|
206
|
+
</tr>
|
|
207
|
+
</thead>
|
|
208
|
+
<tbody>
|
|
209
|
+
{#each buttonsWithoutVariant as item}
|
|
210
|
+
<tr class="border-b border-border">
|
|
211
|
+
<td class="px-4 py-3">
|
|
212
|
+
<code class="text-xs bg-status-warning-bg text-status-warning-text px-2 py-1 rounded">
|
|
213
|
+
{item.file}
|
|
214
|
+
</code>
|
|
215
|
+
</td>
|
|
216
|
+
<td class="px-4 py-3 text-center font-medium">{item.count}</td>
|
|
217
|
+
<td class="px-4 py-3 text-text-secondary">{item.context}</td>
|
|
218
|
+
<td class="px-4 py-3 text-center">
|
|
219
|
+
<span class="px-2 py-1 text-xs rounded-full bg-status-warning-bg text-status-warning-text">Review</span>
|
|
220
|
+
</td>
|
|
221
|
+
</tr>
|
|
222
|
+
{/each}
|
|
223
|
+
</tbody>
|
|
224
|
+
</table>
|
|
225
|
+
</div>
|
|
226
|
+
|
|
227
|
+
<div class="mt-4 p-4 bg-status-warning-bg rounded-lg">
|
|
228
|
+
<p class="text-sm text-status-warning-text">
|
|
229
|
+
<strong>Total: ~{totalWithoutVariant} buttons</strong> across the codebase need variant review.
|
|
230
|
+
Many may be intentionally blue-solid (CTAs), but others may need gray-outline, menu-item, or icon variants.
|
|
231
|
+
</p>
|
|
232
|
+
</div>
|
|
233
|
+
</section>
|
|
234
|
+
|
|
235
|
+
<!-- Visual Examples: Current vs Recommended -->
|
|
236
|
+
<section class="border-2 border-accent-warning rounded-lg p-6 bg-status-warning-bg">
|
|
237
|
+
<h2 class="text-xl font-bold text-accent-warning mb-4 flex items-center gap-2">
|
|
238
|
+
<span class="text-2xl">👁</span> Visual Comparison: Current vs Recommended
|
|
239
|
+
</h2>
|
|
240
|
+
<p class="text-text-secondary mb-6">
|
|
241
|
+
These examples show how buttons WITHOUT a variant currently render (blue-solid default) versus how they SHOULD render with the correct variant.
|
|
242
|
+
</p>
|
|
243
|
+
|
|
244
|
+
<div class="space-y-8">
|
|
245
|
+
{#each visualExamples as category}
|
|
246
|
+
<div class="bg-card rounded-lg p-5 border border-accent-warning">
|
|
247
|
+
<div class="flex items-center gap-3 mb-2">
|
|
248
|
+
<h3 class="font-bold text-text-primary">{category.category}</h3>
|
|
249
|
+
{#if category.examples[0]?.correct}
|
|
250
|
+
<span class="px-2 py-0.5 text-xs rounded-full bg-status-success-bg text-status-success-text">Correct</span>
|
|
251
|
+
{:else}
|
|
252
|
+
<span class="px-2 py-0.5 text-xs rounded-full bg-status-error-bg text-status-error-text">Needs Fix</span>
|
|
253
|
+
{/if}
|
|
254
|
+
</div>
|
|
255
|
+
<p class="text-sm text-muted-foreground mb-4">{category.description}</p>
|
|
256
|
+
|
|
257
|
+
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
|
|
258
|
+
{#each category.examples as example}
|
|
259
|
+
<div class="border border-border rounded-lg p-4 bg-bg-secondary">
|
|
260
|
+
<div class="text-xs text-muted-foreground mb-3 font-mono truncate" title={example.location}>
|
|
261
|
+
{example.location}
|
|
262
|
+
</div>
|
|
263
|
+
|
|
264
|
+
<div class="space-y-3">
|
|
265
|
+
<!-- Current (no variant) -->
|
|
266
|
+
<div>
|
|
267
|
+
<div class="text-xs text-accent-danger font-medium mb-1">Current (no variant):</div>
|
|
268
|
+
<Button size="sm">{example.label}</Button>
|
|
269
|
+
</div>
|
|
270
|
+
|
|
271
|
+
<!-- Arrow -->
|
|
272
|
+
<div class="text-center text-muted-foreground">↓</div>
|
|
273
|
+
|
|
274
|
+
<!-- Recommended -->
|
|
275
|
+
<div>
|
|
276
|
+
<div class="text-xs text-accent-success font-medium mb-1">
|
|
277
|
+
Recommended: <code class="bg-status-success-bg px-1 rounded">{example.recommended}</code>
|
|
278
|
+
</div>
|
|
279
|
+
<Button variant={example.recommended} size="sm">{example.label}</Button>
|
|
280
|
+
</div>
|
|
281
|
+
</div>
|
|
282
|
+
</div>
|
|
283
|
+
{/each}
|
|
284
|
+
</div>
|
|
285
|
+
</div>
|
|
286
|
+
{/each}
|
|
287
|
+
</div>
|
|
288
|
+
|
|
289
|
+
<div class="mt-6 p-4 bg-status-warning-bg rounded-lg">
|
|
290
|
+
<p class="text-sm text-status-warning-text">
|
|
291
|
+
<strong>Key insight:</strong> Buttons without variant all render as solid blue (left), making it hard to distinguish
|
|
292
|
+
primary actions from secondary ones. Adding proper variants (right) creates visual hierarchy.
|
|
293
|
+
</p>
|
|
294
|
+
</div>
|
|
295
|
+
</section>
|
|
296
|
+
|
|
297
|
+
<!-- Recent Fixes -->
|
|
298
|
+
<section class="border-2 border-accent-success rounded-lg p-6 bg-status-success-bg">
|
|
299
|
+
<h2 class="text-xl font-bold text-status-success-text mb-4 flex items-center gap-2">
|
|
300
|
+
<span class="text-2xl">✓</span> Recent Fixes (December 30, 2024)
|
|
301
|
+
</h2>
|
|
302
|
+
|
|
303
|
+
<div class="space-y-6">
|
|
304
|
+
{#each recentFixes as fix}
|
|
305
|
+
<div class="bg-card rounded-lg p-4 border-l-4 border-accent-success">
|
|
306
|
+
<h3 class="font-semibold text-text-primary mb-2">{fix.description}</h3>
|
|
307
|
+
<ul class="text-sm text-text-secondary space-y-1">
|
|
308
|
+
{#each fix.fixes as item}
|
|
309
|
+
<li class="flex items-start gap-2">
|
|
310
|
+
<span class="text-accent-success mt-0.5">✓</span>
|
|
311
|
+
{item}
|
|
312
|
+
</li>
|
|
313
|
+
{/each}
|
|
314
|
+
</ul>
|
|
315
|
+
</div>
|
|
316
|
+
{/each}
|
|
317
|
+
</div>
|
|
318
|
+
</section>
|
|
319
|
+
|
|
320
|
+
<!-- Valid Variants Reference -->
|
|
321
|
+
<section class="border rounded-lg p-6 bg-card">
|
|
322
|
+
<h2 class="text-xl font-bold text-text-primary mb-4 flex items-center gap-2">
|
|
323
|
+
<span class="text-brand-primary">ℹ</span> Valid Variants Reference
|
|
324
|
+
</h2>
|
|
325
|
+
|
|
326
|
+
<div class="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4">
|
|
327
|
+
{#each validVariants as v}
|
|
328
|
+
<div class="border border-border rounded-lg p-4">
|
|
329
|
+
<div class="flex items-center gap-2 mb-3">
|
|
330
|
+
<Button variant={v.name} size="sm">{v.name}</Button>
|
|
331
|
+
</div>
|
|
332
|
+
<code class="text-xs bg-muted px-2 py-1 rounded block mb-1">
|
|
333
|
+
variant="{v.name}"
|
|
334
|
+
</code>
|
|
335
|
+
{#if v.alias}
|
|
336
|
+
<code class="text-xs bg-status-info-bg text-brand-primary px-2 py-1 rounded block mb-2">
|
|
337
|
+
or: "{v.alias}"
|
|
338
|
+
</code>
|
|
339
|
+
{/if}
|
|
340
|
+
<p class="text-xs text-muted-foreground">{v.usage}</p>
|
|
341
|
+
</div>
|
|
342
|
+
{/each}
|
|
343
|
+
</div>
|
|
344
|
+
</section>
|
|
345
|
+
|
|
346
|
+
<!-- Decision Guide -->
|
|
347
|
+
<section class="border-2 border-brand-primary rounded-lg p-6 bg-status-info-bg">
|
|
348
|
+
<h2 class="text-xl font-bold text-brand-primary mb-4">Button Variant Decision Guide</h2>
|
|
349
|
+
|
|
350
|
+
<div class="grid grid-cols-2 gap-6">
|
|
351
|
+
<div class="bg-card rounded-lg p-4">
|
|
352
|
+
<h3 class="font-semibold text-text-primary mb-3">When to use each variant</h3>
|
|
353
|
+
<ul class="space-y-2 text-sm">
|
|
354
|
+
<li class="flex items-start gap-2">
|
|
355
|
+
<code class="bg-status-info-bg text-status-info-text px-1 rounded text-xs shrink-0">default</code>
|
|
356
|
+
<span class="text-text-secondary">Primary CTAs: Save, Submit, + New</span>
|
|
357
|
+
</li>
|
|
358
|
+
<li class="flex items-start gap-2">
|
|
359
|
+
<code class="bg-status-info-bg text-status-info-text px-1 rounded text-xs shrink-0">outline</code>
|
|
360
|
+
<span class="text-text-secondary">Secondary CTAs: Invite, Export</span>
|
|
361
|
+
</li>
|
|
362
|
+
<li class="flex items-start gap-2">
|
|
363
|
+
<code class="bg-muted text-text-primary px-1 rounded text-xs shrink-0">alternative</code>
|
|
364
|
+
<span class="text-text-secondary">Cancel, Close, Filter, Actions triggers</span>
|
|
365
|
+
</li>
|
|
366
|
+
<li class="flex items-start gap-2">
|
|
367
|
+
<code class="bg-status-error-bg text-status-error-text px-1 rounded text-xs shrink-0">red</code>
|
|
368
|
+
<span class="text-text-secondary">Delete confirmations, destructive actions</span>
|
|
369
|
+
</li>
|
|
370
|
+
<li class="flex items-start gap-2">
|
|
371
|
+
<code class="bg-muted text-text-primary px-1 rounded text-xs shrink-0">ghost</code>
|
|
372
|
+
<span class="text-text-secondary">Tertiary actions: Edit, View, Show more</span>
|
|
373
|
+
</li>
|
|
374
|
+
<li class="flex items-start gap-2">
|
|
375
|
+
<code class="bg-muted text-text-primary px-1 rounded text-xs shrink-0">menu-item</code>
|
|
376
|
+
<span class="text-text-secondary">Dropdown items, list selections</span>
|
|
377
|
+
</li>
|
|
378
|
+
<li class="flex items-start gap-2">
|
|
379
|
+
<code class="bg-muted text-text-primary px-1 rounded text-xs shrink-0">icon</code>
|
|
380
|
+
<span class="text-text-secondary">Close buttons, drag handles</span>
|
|
381
|
+
</li>
|
|
382
|
+
</ul>
|
|
383
|
+
</div>
|
|
384
|
+
|
|
385
|
+
<div class="bg-card rounded-lg p-4">
|
|
386
|
+
<h3 class="font-semibold text-text-primary mb-3">Common mistakes</h3>
|
|
387
|
+
<ul class="space-y-2 text-sm text-text-secondary">
|
|
388
|
+
<li class="flex items-start gap-2">
|
|
389
|
+
<span class="text-accent-danger">✗</span>
|
|
390
|
+
<span>No variant on dropdown items → defaults to solid blue</span>
|
|
391
|
+
</li>
|
|
392
|
+
<li class="flex items-start gap-2">
|
|
393
|
+
<span class="text-accent-danger">✗</span>
|
|
394
|
+
<span>No variant on Cancel → should be alternative</span>
|
|
395
|
+
</li>
|
|
396
|
+
<li class="flex items-start gap-2">
|
|
397
|
+
<span class="text-accent-danger">✗</span>
|
|
398
|
+
<span>No variant on close/X buttons → should be icon</span>
|
|
399
|
+
</li>
|
|
400
|
+
<li class="flex items-start gap-2">
|
|
401
|
+
<span class="text-accent-danger">✗</span>
|
|
402
|
+
<span>Invalid variant names fall back to default (solid blue)</span>
|
|
403
|
+
</li>
|
|
404
|
+
</ul>
|
|
405
|
+
|
|
406
|
+
<div class="mt-4 p-3 bg-status-info-bg rounded-lg">
|
|
407
|
+
<p class="text-xs text-status-info-text">
|
|
408
|
+
<strong>Tip:</strong> When in doubt, use alternative for secondary actions
|
|
409
|
+
and default only for the primary action.
|
|
410
|
+
</p>
|
|
411
|
+
</div>
|
|
412
|
+
</div>
|
|
413
|
+
</div>
|
|
414
|
+
</section>
|
|
415
|
+
|
|
416
|
+
<!-- How to Find Issues -->
|
|
417
|
+
<section class="border rounded-lg p-6 bg-bg-secondary">
|
|
418
|
+
<h2 class="text-xl font-bold text-text-primary mb-4">How to Find Buttons Without Variant</h2>
|
|
419
|
+
|
|
420
|
+
<div class="bg-card rounded-lg p-4">
|
|
421
|
+
<p class="text-sm text-text-secondary mb-2">Run this command in micdrop-frontend:</p>
|
|
422
|
+
<code class="block bg-bg-primary text-accent-success p-3 rounded text-xs overflow-x-auto">
|
|
423
|
+
grep -rn "<Button" --include="*.svelte" src | grep -v "variant="
|
|
424
|
+
</code>
|
|
425
|
+
</div>
|
|
426
|
+
</section>
|
|
427
|
+
</div>
|