@getmicdrop/svelte-components 5.17.3 → 5.18.0
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.svelte +187 -187
- package/dist/calendar/Calendar/MiniMonthCalendar.svelte +780 -782
- package/dist/calendar/Calendar/MiniMonthCalendar.svelte.d.ts.map +1 -1
- package/dist/calendar/FAQs/FAQs.svelte +77 -77
- package/dist/calendar/MonthSwitcher/MonthSwitcher.svelte +125 -126
- package/dist/calendar/MonthSwitcher/MonthSwitcher.svelte.d.ts.map +1 -1
- package/dist/calendar/OrderSummary/OrderSummary.svelte +457 -457
- package/dist/calendar/PublicCard/PublicCard.svelte +155 -146
- package/dist/calendar/PublicCard/PublicCard.svelte.d.ts.map +1 -1
- package/dist/calendar/ShowCard/ShowCard.spec.js +1 -7
- package/dist/calendar/ShowCard/ShowCard.svelte +166 -157
- package/dist/calendar/ShowCard/ShowCard.svelte.d.ts.map +1 -1
- package/dist/calendar/ShowTimeCard/ShowTimeCard.svelte +72 -61
- package/dist/calendar/ShowTimeCard/ShowTimeCard.svelte.d.ts +2 -0
- package/dist/calendar/ShowTimeCard/ShowTimeCard.svelte.d.ts.map +1 -1
- package/dist/components/Heading.svelte +60 -60
- package/dist/components/Layout/AppShell.svelte +104 -104
- package/dist/components/Layout/ContentSection.svelte +80 -80
- package/dist/components/Layout/Grid.svelte +4 -4
- 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.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 +6 -6
- package/dist/components/Layout/Text.svelte +87 -87
- package/dist/components/Layout/TwoColumn.svelte +108 -108
- package/dist/components/Text.svelte +53 -53
- package/dist/config.d.ts +102 -0
- package/dist/config.js +147 -1
- package/dist/constants/validation.js +91 -91
- package/dist/constants/validation.spec.js +64 -64
- package/dist/datetime/README.md +323 -0
- 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 +0 -1
- package/dist/forms/createFormStore.svelte.spec.js +0 -1
- package/dist/index.js +57 -57
- package/dist/index.spec.js +369 -369
- package/dist/messages.d.ts +43 -0
- package/dist/messages.d.ts.map +1 -0
- package/dist/messages.js +57 -0
- package/dist/patterns/chat/ChatActivityNotice.svelte +41 -41
- package/dist/patterns/chat/ChatBubble.svelte +95 -95
- package/dist/patterns/chat/ChatContainer.svelte +46 -46
- package/dist/patterns/chat/ChatDateDivider.svelte +27 -27
- package/dist/patterns/chat/ChatInvitationBubble.svelte +37 -37
- package/dist/patterns/chat/ChatInvitationNotice.svelte +27 -27
- package/dist/patterns/chat/ChatMessageGroup.svelte +57 -57
- package/dist/patterns/chat/ChatSlotUpdate.svelte +46 -46
- package/dist/patterns/chat/ChatStatusBadge.svelte +91 -91
- package/dist/patterns/chat/ChatStatusTransition.svelte +64 -64
- 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.svelte +24 -24
- package/dist/patterns/data/DataTable.svelte +36 -36
- 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.svelte +32 -32
- package/dist/patterns/forms/FormValidationSummary.stories.svelte +83 -83
- package/dist/patterns/forms/FormValidationSummary.svelte +74 -74
- package/dist/patterns/index.js +21 -21
- package/dist/patterns/layout/Sidebar.svelte +39 -39
- package/dist/patterns/layout/index.js +29 -29
- package/dist/patterns/navigation/BottomNav.stories.svelte +117 -117
- package/dist/patterns/navigation/BottomNav.svelte +74 -74
- package/dist/patterns/navigation/Header.stories.svelte +77 -77
- package/dist/patterns/navigation/Header.svelte +251 -251
- package/dist/patterns/page/PageHeader.svelte +18 -18
- 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 +24 -24
- package/dist/patterns/page/SectionHeader.svelte +29 -29
- package/dist/presets/badges.js +112 -112
- package/dist/presets/buttons.js +76 -76
- package/dist/presets/index.js +9 -9
- package/dist/primitives/Accordion/Accordion.stories.svelte +75 -75
- package/dist/primitives/Accordion/Accordion.svelte +42 -42
- package/dist/primitives/Accordion/AccordionItem.svelte +95 -95
- package/dist/primitives/Alert/Alert.spec.js +173 -173
- package/dist/primitives/Alert/Alert.stories.svelte +88 -88
- package/dist/primitives/Alert/Alert.svelte +27 -27
- package/dist/primitives/Avatar/Avatar.stories.svelte +94 -94
- 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/Breadcrumb/Breadcrumb.spec.js +123 -123
- package/dist/primitives/Breadcrumb/Breadcrumb.stories.svelte +23 -23
- package/dist/primitives/Breadcrumb/Breadcrumb.svelte +99 -99
- 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.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.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.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 +136 -136
- package/dist/primitives/Drawer/Drawer.stories.svelte +80 -80
- package/dist/primitives/Drawer/Drawer.svelte +224 -224
- package/dist/primitives/Dropdown/Dropdown.stories.svelte +137 -137
- package/dist/primitives/Dropdown/Dropdown.svelte +170 -170
- package/dist/primitives/Dropdown/DropdownDivider.svelte +9 -9
- package/dist/primitives/Dropdown/DropdownItem.svelte +80 -80
- package/dist/primitives/Helper/Helper.svelte +33 -33
- package/dist/primitives/Icons/ArrowLeft.svelte +8 -8
- package/dist/primitives/Icons/ArrowRight.svelte +8 -8
- package/dist/primitives/Icons/Availability.svelte +14 -14
- package/dist/primitives/Icons/Back.svelte +14 -14
- package/dist/primitives/Icons/CheckCircle.svelte +6 -6
- package/dist/primitives/Icons/CheckCircleOutline.svelte +15 -15
- package/dist/primitives/Icons/ChevronLeft.svelte +4 -4
- package/dist/primitives/Icons/ChevronRight.svelte +4 -4
- package/dist/primitives/Icons/Copy.svelte +15 -15
- package/dist/primitives/Icons/Cross.svelte +5 -5
- package/dist/primitives/Icons/DownArrow.svelte +8 -8
- package/dist/primitives/Icons/ErrorCircle.svelte +6 -6
- package/dist/primitives/Icons/FacebookIcon.svelte +2 -2
- package/dist/primitives/Icons/Home.svelte +15 -15
- package/dist/primitives/Icons/Icon.spec.js +169 -169
- package/dist/primitives/Icons/Icon.stories.svelte +100 -100
- package/dist/primitives/Icons/Icon.svelte +52 -52
- package/dist/primitives/Icons/IconGallery.stories.svelte +235 -235
- package/dist/primitives/Icons/Info.svelte +7 -7
- package/dist/primitives/Icons/InstagramIcon.svelte +4 -4
- package/dist/primitives/Icons/LogoInstagram.svelte +2 -2
- package/dist/primitives/Icons/Message.svelte +15 -15
- package/dist/primitives/Icons/MoonIcon.svelte +5 -5
- package/dist/primitives/Icons/More.svelte +21 -21
- package/dist/primitives/Icons/MoreHori.spec.js +61 -61
- package/dist/primitives/Icons/MoreHori.svelte +22 -22
- package/dist/primitives/Icons/Notification.svelte +14 -14
- package/dist/primitives/Icons/Payment.svelte +14 -14
- package/dist/primitives/Icons/Profile.svelte +21 -21
- package/dist/primitives/Icons/Reload.svelte +29 -29
- package/dist/primitives/Icons/Shows.svelte +21 -21
- package/dist/primitives/Icons/Signout.svelte +21 -21
- package/dist/primitives/Icons/SunIcon.svelte +8 -8
- package/dist/primitives/Icons/TiktokIcon.svelte +2 -2
- package/dist/primitives/Icons/TwitterIcon.svelte +2 -2
- package/dist/primitives/Icons/WarningIcon.spec.js +18 -18
- package/dist/primitives/Icons/WarningIcon.svelte +5 -5
- package/dist/primitives/Input/Input.spec.js +1237 -1235
- package/dist/primitives/Input/Input.stories.svelte +139 -139
- package/dist/primitives/Input/Input.svelte +431 -423
- package/dist/primitives/Input/Input.svelte.d.ts.map +1 -1
- 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.stories.svelte +137 -137
- package/dist/primitives/Input/Textarea.svelte +105 -105
- package/dist/primitives/Label/Label.svelte +37 -37
- package/dist/primitives/LandingButton/LandingButton.svelte +92 -92
- 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.svelte +75 -75
- package/dist/primitives/Pagination/Pagination.stories.svelte +76 -76
- package/dist/primitives/Pagination/Pagination.svelte +261 -261
- package/dist/primitives/Radio/Radio.stories.svelte +80 -80
- package/dist/primitives/Radio/Radio.svelte +67 -67
- package/dist/primitives/SearchResultItem/SearchResultItem.svelte +109 -109
- package/dist/primitives/SidebarToggle/SidebarToggle.svelte +55 -55
- package/dist/primitives/Skeleton/CardPlaceholder.svelte +87 -87
- package/dist/primitives/Skeleton/ImagePlaceholder.svelte +59 -59
- package/dist/primitives/Skeleton/ListPlaceholder.svelte +76 -76
- package/dist/primitives/Skeleton/Skeleton.stories.svelte +151 -151
- package/dist/primitives/Skeleton/Skeleton.svelte +26 -26
- package/dist/primitives/Spinner/Spinner.spec.js +84 -84
- package/dist/primitives/Spinner/Spinner.stories.svelte +29 -29
- package/dist/primitives/Spinner/Spinner.svelte +20 -20
- package/dist/primitives/Tabs/TabItem.svelte +49 -49
- package/dist/primitives/Tabs/Tabs.stories.svelte +112 -112
- package/dist/primitives/Tabs/Tabs.svelte +137 -137
- package/dist/primitives/Toggle.spec.js +221 -221
- package/dist/primitives/Toggle.stories.svelte +92 -92
- package/dist/primitives/Toggle.svelte +141 -141
- 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 +69 -69
- package/dist/primitives/ValidationError.svelte +29 -29
- package/dist/primitives/index.js +113 -113
- 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.stories.svelte +125 -125
- package/dist/recipes/ImageUploader/ImageUploader.svelte +992 -992
- package/dist/recipes/SuperLogin/SuperLogin.spec.js +2 -2
- package/dist/recipes/SuperLogin/SuperLogin.svelte +1 -1
- package/dist/recipes/Toaster/Toaster.stories.svelte +62 -62
- package/dist/recipes/feedback/EmptyState/EmptyState.svelte +1 -1
- package/dist/recipes/feedback/ErrorDisplay.spec.js +69 -69
- package/dist/recipes/feedback/ErrorDisplay.stories.svelte +101 -101
- package/dist/recipes/feedback/ErrorDisplay.svelte +1 -1
- package/dist/recipes/feedback/StatusIndicator/StatusIndicator.spec.js +133 -133
- package/dist/recipes/feedback/StatusIndicator/StatusIndicator.svelte +157 -157
- package/dist/recipes/fields/CheckboxField.svelte +85 -85
- package/dist/recipes/fields/FormField.svelte +58 -58
- package/dist/recipes/fields/RadioGroup.svelte +95 -95
- package/dist/recipes/fields/SelectField.svelte +82 -82
- package/dist/recipes/fields/TextareaField.svelte +97 -97
- package/dist/recipes/fields/ToggleField.svelte +60 -60
- package/dist/recipes/fields/index.js +7 -7
- package/dist/recipes/inputs/MultiSelect.spec.js +263 -263
- package/dist/recipes/inputs/MultiSelect.stories.svelte +133 -133
- package/dist/recipes/inputs/MultiSelect.svelte +283 -283
- package/dist/recipes/inputs/OTPInput.spec.js +251 -251
- package/dist/recipes/inputs/OTPInput.stories.svelte +162 -162
- package/dist/recipes/inputs/OTPInput.svelte +117 -117
- package/dist/recipes/inputs/PasswordInput.svelte +22 -22
- package/dist/recipes/inputs/PasswordStrengthIndicator/PasswordStrengthIndicator.svelte +131 -131
- package/dist/recipes/inputs/PhoneInput.svelte +258 -0
- package/dist/recipes/inputs/PhoneInput.svelte.d.ts +42 -0
- package/dist/recipes/inputs/PhoneInput.svelte.d.ts.map +1 -0
- package/dist/recipes/inputs/PlaceAutocomplete/PlaceAutocomplete.stories.svelte +123 -123
- package/dist/recipes/inputs/PlaceAutocomplete/PlaceAutocomplete.svelte +336 -336
- package/dist/recipes/inputs/Search.svelte +102 -102
- package/dist/recipes/inputs/index.d.ts +1 -0
- package/dist/recipes/inputs/index.js +8 -7
- package/dist/recipes/inputs/phoneInput/CountrySelector.svelte +297 -0
- package/dist/recipes/inputs/phoneInput/CountrySelector.svelte.d.ts +17 -0
- package/dist/recipes/inputs/phoneInput/CountrySelector.svelte.d.ts.map +1 -0
- package/dist/recipes/inputs/phoneInput/countryData.d.ts +20 -0
- package/dist/recipes/inputs/phoneInput/countryData.d.ts.map +1 -0
- package/dist/recipes/inputs/phoneInput/countryData.js +211 -0
- package/dist/recipes/modals/AlertModal.svelte +130 -130
- package/dist/recipes/modals/ConfirmationModal.spec.js +396 -396
- package/dist/recipes/modals/ConfirmationModal.stories.svelte +119 -119
- package/dist/recipes/modals/ConfirmationModal.svelte +162 -162
- package/dist/recipes/modals/InputModal.svelte +182 -182
- 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.svelte +206 -206
- package/dist/schemas/__tests__/auth.test.d.ts +2 -0
- package/dist/schemas/__tests__/auth.test.d.ts.map +1 -0
- package/dist/schemas/__tests__/auth.test.js +210 -0
- package/dist/schemas/__tests__/common.test.d.ts +2 -0
- package/dist/schemas/__tests__/common.test.d.ts.map +1 -0
- package/dist/schemas/__tests__/common.test.js +340 -0
- package/dist/schemas/__tests__/domain.test.d.ts +2 -0
- package/dist/schemas/__tests__/domain.test.d.ts.map +1 -0
- package/dist/schemas/__tests__/domain.test.js +293 -0
- package/dist/schemas/__tests__/order.test.d.ts +2 -0
- package/dist/schemas/__tests__/order.test.d.ts.map +1 -0
- package/dist/schemas/__tests__/order.test.js +349 -0
- package/dist/schemas/__tests__/user.test.d.ts +2 -0
- package/dist/schemas/__tests__/user.test.d.ts.map +1 -0
- package/dist/schemas/__tests__/user.test.js +325 -0
- package/dist/schemas/auth.d.ts +41 -0
- package/dist/schemas/auth.d.ts.map +1 -0
- package/dist/schemas/auth.js +69 -0
- package/dist/schemas/common.d.ts +43 -0
- package/dist/schemas/common.d.ts.map +1 -0
- package/dist/schemas/common.js +157 -0
- package/dist/schemas/event.d.ts +82 -0
- package/dist/schemas/event.d.ts.map +1 -0
- package/dist/schemas/event.js +58 -0
- package/dist/schemas/index.d.ts +10 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +9 -0
- package/dist/schemas/order.d.ts +111 -0
- package/dist/schemas/order.d.ts.map +1 -0
- package/dist/schemas/order.js +73 -0
- package/dist/schemas/performer.d.ts +133 -0
- package/dist/schemas/performer.d.ts.map +1 -0
- package/dist/schemas/performer.js +73 -0
- package/dist/schemas/promo.d.ts +87 -0
- package/dist/schemas/promo.d.ts.map +1 -0
- package/dist/schemas/promo.js +98 -0
- package/dist/schemas/ticket.d.ts +104 -0
- package/dist/schemas/ticket.d.ts.map +1 -0
- package/dist/schemas/ticket.js +82 -0
- package/dist/schemas/user.d.ts +92 -0
- package/dist/schemas/user.d.ts.map +1 -0
- package/dist/schemas/user.js +53 -0
- package/dist/schemas/venue.d.ts +95 -0
- package/dist/schemas/venue.d.ts.map +1 -0
- package/dist/schemas/venue.js +52 -0
- package/dist/services/EventService.js +79 -79
- package/dist/services/EventService.spec.js +217 -217
- package/dist/services/ShowService.js +144 -144
- package/dist/services/ShowService.spec.js +345 -345
- package/dist/stores/auth.svelte.spec.js +1 -1
- package/dist/stores/toaster.js +13 -13
- package/dist/stories/ButtonAuditReview.stories.svelte +14 -14
- package/dist/stories/ButtonAuditReview.svelte +427 -427
- package/dist/stories/PatternsGallery.stories.svelte +19 -19
- package/dist/stories/PatternsGallery.svelte +206 -206
- 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 +82 -82
- package/dist/telemetry.js +402 -402
- package/dist/telemetry.server.js +212 -212
- package/dist/telemetry.server.spec.js +437 -437
- package/dist/telemetry.spec.js +1173 -1168
- package/dist/tokens/__tests__/sizing.test.js +2 -2
- package/dist/tokens/sizing.d.ts +5 -0
- package/dist/tokens/sizing.d.ts.map +1 -1
- package/dist/tokens/sizing.js +6 -0
- package/dist/tokens/tokens.css +87 -87
- package/dist/tokens/typography-base.css +163 -163
- package/dist/tokens/utilities.css +353 -353
- package/dist/utils/apiConfig.js +117 -117
- package/dist/utils/apiConfig.spec.js +219 -219
- package/dist/utils/greetings.js +187 -187
- package/dist/utils/haptic.spec.js +1 -1
- package/dist/utils/imageValidation.js +121 -121
- package/dist/utils/phoneUtils.d.ts +35 -0
- package/dist/utils/phoneUtils.d.ts.map +1 -0
- package/dist/utils/phoneUtils.js +104 -0
- package/dist/utils/transitions.js +4 -4
- package/dist/utils/utils.js +693 -693
- package/package.json +297 -292
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Centralized validation messages for Zod schemas
|
|
3
|
+
*/
|
|
4
|
+
export declare const VALIDATION_MESSAGES: {
|
|
5
|
+
readonly REQUIRED: "This field is required";
|
|
6
|
+
readonly INVALID_EMAIL: "Please enter a valid email address";
|
|
7
|
+
readonly INVALID_PHONE: "Please enter a valid phone number";
|
|
8
|
+
readonly INVALID_URL: "Please enter a valid URL";
|
|
9
|
+
readonly INVALID_UUID: "Invalid identifier format";
|
|
10
|
+
readonly INVALID_DATE: "Please enter a valid date";
|
|
11
|
+
readonly DATE_MUST_BE_FUTURE: "Date must be in the future";
|
|
12
|
+
readonly MUST_BE_INTEGER: "Must be a whole number";
|
|
13
|
+
readonly MUST_BE_POSITIVE: "Must be a positive number";
|
|
14
|
+
readonly MUST_BE_NON_NEGATIVE: "Must be zero or greater";
|
|
15
|
+
readonly PRICE_TOO_HIGH: "Price is too high (max $10,000)";
|
|
16
|
+
readonly PERCENTAGE_TOO_HIGH: "Percentage must be 100 or less";
|
|
17
|
+
readonly PASSWORD_TOO_SHORT: (min: number) => string;
|
|
18
|
+
readonly PASSWORD_TOO_LONG: (max: number) => string;
|
|
19
|
+
readonly INVALID_FORMAT: "Invalid format";
|
|
20
|
+
readonly INVALID_TIMEZONE: "Please enter a valid timezone";
|
|
21
|
+
readonly INVALID_STATE: "Please enter a valid 2-letter state code";
|
|
22
|
+
readonly INVALID_ZIP: "Please enter a valid zip code";
|
|
23
|
+
readonly tooLong: (field: string, max: number) => string;
|
|
24
|
+
readonly tooShort: (field: string, min: number) => string;
|
|
25
|
+
readonly tooSmall: (field: string, min: number) => string;
|
|
26
|
+
readonly tooLarge: (field: string, max: number) => string;
|
|
27
|
+
readonly fileTooLarge: (maxMB: number) => string;
|
|
28
|
+
readonly invalidFileType: (types: readonly string[]) => string;
|
|
29
|
+
readonly DISCOUNT_REQUIRED: "A discount amount is required";
|
|
30
|
+
readonly INVALID_DISCOUNT_TYPE: "Invalid discount type";
|
|
31
|
+
readonly END_DATE_AFTER_START: "End date must be after start date";
|
|
32
|
+
readonly MIN_EXCEEDS_MAX: "Minimum cannot exceed maximum";
|
|
33
|
+
readonly ACCEPT_TERMS_REQUIRED: "You must accept the terms and conditions";
|
|
34
|
+
readonly passwordTooShort: (min: number) => string;
|
|
35
|
+
readonly passwordTooLong: (max: number) => string;
|
|
36
|
+
readonly PASSWORD_NEEDS_UPPERCASE: "Password must contain at least one uppercase letter";
|
|
37
|
+
readonly PASSWORD_NEEDS_LOWERCASE: "Password must contain at least one lowercase letter";
|
|
38
|
+
readonly PASSWORD_NEEDS_NUMBER: "Password must contain at least one number";
|
|
39
|
+
readonly PASSWORD_NEEDS_SPECIAL: "Password must contain at least one special character";
|
|
40
|
+
readonly PASSWORDS_MUST_MATCH: "Passwords do not match";
|
|
41
|
+
readonly PASSWORD_SAME_AS_CURRENT: "New password must be different from current password";
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=messages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../src/lib/messages.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;uCA4BJ,MAAM;sCACP,MAAM;;;;;8BASd,MAAM,OAAO,MAAM;+BAClB,MAAM,OAAO,MAAM;+BACnB,MAAM,OAAO,MAAM;+BACnB,MAAM,OAAO,MAAM;mCAGf,MAAM;sCACH,SAAS,MAAM,EAAE;;;;;;qCAclB,MAAM;oCACP,MAAM;;;;;;;CAOrB,CAAC"}
|
package/dist/messages.js
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Centralized validation messages for Zod schemas
|
|
3
|
+
*/
|
|
4
|
+
export const VALIDATION_MESSAGES = {
|
|
5
|
+
// Required field
|
|
6
|
+
REQUIRED: 'This field is required',
|
|
7
|
+
// Email validation
|
|
8
|
+
INVALID_EMAIL: 'Please enter a valid email address',
|
|
9
|
+
// Phone validation
|
|
10
|
+
INVALID_PHONE: 'Please enter a valid phone number',
|
|
11
|
+
// URL validation
|
|
12
|
+
INVALID_URL: 'Please enter a valid URL',
|
|
13
|
+
// UUID validation
|
|
14
|
+
INVALID_UUID: 'Invalid identifier format',
|
|
15
|
+
// Date validation
|
|
16
|
+
INVALID_DATE: 'Please enter a valid date',
|
|
17
|
+
DATE_MUST_BE_FUTURE: 'Date must be in the future',
|
|
18
|
+
// Number validation
|
|
19
|
+
MUST_BE_INTEGER: 'Must be a whole number',
|
|
20
|
+
MUST_BE_POSITIVE: 'Must be a positive number',
|
|
21
|
+
MUST_BE_NON_NEGATIVE: 'Must be zero or greater',
|
|
22
|
+
PRICE_TOO_HIGH: 'Price is too high (max $10,000)',
|
|
23
|
+
PERCENTAGE_TOO_HIGH: 'Percentage must be 100 or less',
|
|
24
|
+
// Password validation
|
|
25
|
+
PASSWORD_TOO_SHORT: (min) => `Password must be at least ${min} characters`,
|
|
26
|
+
PASSWORD_TOO_LONG: (max) => `Password must be ${max} characters or less`,
|
|
27
|
+
// Format validation
|
|
28
|
+
INVALID_FORMAT: 'Invalid format',
|
|
29
|
+
INVALID_TIMEZONE: 'Please enter a valid timezone',
|
|
30
|
+
INVALID_STATE: 'Please enter a valid 2-letter state code',
|
|
31
|
+
INVALID_ZIP: 'Please enter a valid zip code',
|
|
32
|
+
// Dynamic length messages
|
|
33
|
+
tooLong: (field, max) => `${field} must be ${max} characters or less`,
|
|
34
|
+
tooShort: (field, min) => `${field} must be at least ${min} characters`,
|
|
35
|
+
tooSmall: (field, min) => `${field} must be at least ${min}`,
|
|
36
|
+
tooLarge: (field, max) => `${field} must be no more than ${max}`,
|
|
37
|
+
// File validation
|
|
38
|
+
fileTooLarge: (maxMB) => `File must be ${maxMB}MB or less`,
|
|
39
|
+
invalidFileType: (types) => `File must be one of: ${types.join(', ')}`,
|
|
40
|
+
// Promo code validation
|
|
41
|
+
DISCOUNT_REQUIRED: 'A discount amount is required',
|
|
42
|
+
INVALID_DISCOUNT_TYPE: 'Invalid discount type',
|
|
43
|
+
// Date range validation
|
|
44
|
+
END_DATE_AFTER_START: 'End date must be after start date',
|
|
45
|
+
MIN_EXCEEDS_MAX: 'Minimum cannot exceed maximum',
|
|
46
|
+
// Terms validation
|
|
47
|
+
ACCEPT_TERMS_REQUIRED: 'You must accept the terms and conditions',
|
|
48
|
+
// Password validation (function variants)
|
|
49
|
+
passwordTooShort: (min) => `Password must be at least ${min} characters`,
|
|
50
|
+
passwordTooLong: (max) => `Password must be ${max} characters or less`,
|
|
51
|
+
PASSWORD_NEEDS_UPPERCASE: 'Password must contain at least one uppercase letter',
|
|
52
|
+
PASSWORD_NEEDS_LOWERCASE: 'Password must contain at least one lowercase letter',
|
|
53
|
+
PASSWORD_NEEDS_NUMBER: 'Password must contain at least one number',
|
|
54
|
+
PASSWORD_NEEDS_SPECIAL: 'Password must contain at least one special character',
|
|
55
|
+
PASSWORDS_MUST_MATCH: 'Passwords do not match',
|
|
56
|
+
PASSWORD_SAME_AS_CURRENT: 'New password must be different from current password',
|
|
57
|
+
};
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
/**
|
|
3
|
-
* ChatActivityNotice - Centered notice for silent/background activity
|
|
4
|
-
*
|
|
5
|
-
* Displays activity that happened without notification (e.g., admin status changes)
|
|
6
|
-
* in a subtle centered format with decorative lines.
|
|
7
|
-
*/
|
|
8
|
-
import type { Snippet } from 'svelte';
|
|
9
|
-
import { classNames } from '../../utils/utils.js';
|
|
10
|
-
|
|
11
|
-
interface Props {
|
|
12
|
-
/** Actor name who performed the action */
|
|
13
|
-
actorName?: string;
|
|
14
|
-
/** Timestamp of the action */
|
|
15
|
-
timestamp?: string;
|
|
16
|
-
/** Additional CSS classes */
|
|
17
|
-
className?: string;
|
|
18
|
-
/** Content to display (status changes, etc.) */
|
|
19
|
-
children?: Snippet;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
let {
|
|
23
|
-
actorName,
|
|
24
|
-
timestamp,
|
|
25
|
-
className = '',
|
|
26
|
-
children,
|
|
27
|
-
}: Props = $props();
|
|
28
|
-
</script>
|
|
29
|
-
|
|
30
|
-
<div class={classNames('flex items-center justify-center gap-3 py-3', className)}>
|
|
31
|
-
<div class="h-px bg-gray-200 dark:bg-gray-700 w-12"></div>
|
|
32
|
-
<div class="flex flex-col items-center gap-1">
|
|
33
|
-
{@render children?.()}
|
|
34
|
-
{#if actorName || timestamp}
|
|
35
|
-
<span class="text-[10px] text-gray-400">
|
|
36
|
-
{#if actorName}{actorName}{/if}{#if actorName && timestamp} · {/if}{#if timestamp}{timestamp}{/if}
|
|
37
|
-
</span>
|
|
38
|
-
{/if}
|
|
39
|
-
</div>
|
|
40
|
-
<div class="h-px bg-gray-200 dark:bg-gray-700 w-12"></div>
|
|
41
|
-
</div>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* ChatActivityNotice - Centered notice for silent/background activity
|
|
4
|
+
*
|
|
5
|
+
* Displays activity that happened without notification (e.g., admin status changes)
|
|
6
|
+
* in a subtle centered format with decorative lines.
|
|
7
|
+
*/
|
|
8
|
+
import type { Snippet } from 'svelte';
|
|
9
|
+
import { classNames } from '../../utils/utils.js';
|
|
10
|
+
|
|
11
|
+
interface Props {
|
|
12
|
+
/** Actor name who performed the action */
|
|
13
|
+
actorName?: string;
|
|
14
|
+
/** Timestamp of the action */
|
|
15
|
+
timestamp?: string;
|
|
16
|
+
/** Additional CSS classes */
|
|
17
|
+
className?: string;
|
|
18
|
+
/** Content to display (status changes, etc.) */
|
|
19
|
+
children?: Snippet;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
let {
|
|
23
|
+
actorName,
|
|
24
|
+
timestamp,
|
|
25
|
+
className = '',
|
|
26
|
+
children,
|
|
27
|
+
}: Props = $props();
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<div class={classNames('flex items-center justify-center gap-3 py-3', className)}>
|
|
31
|
+
<div class="h-px bg-gray-200 dark:bg-gray-700 w-12"></div>
|
|
32
|
+
<div class="flex flex-col items-center gap-1">
|
|
33
|
+
{@render children?.()}
|
|
34
|
+
{#if actorName || timestamp}
|
|
35
|
+
<span class="text-[10px] text-gray-400">
|
|
36
|
+
{#if actorName}{actorName}{/if}{#if actorName && timestamp} · {/if}{#if timestamp}{timestamp}{/if}
|
|
37
|
+
</span>
|
|
38
|
+
{/if}
|
|
39
|
+
</div>
|
|
40
|
+
<div class="h-px bg-gray-200 dark:bg-gray-700 w-12"></div>
|
|
41
|
+
</div>
|
|
@@ -1,95 +1,95 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
/**
|
|
3
|
-
* ChatBubble - Message bubble for chat interfaces
|
|
4
|
-
*
|
|
5
|
-
* Displays inbound (left) or outbound (right) messages with optional
|
|
6
|
-
* error state, timestamp, and sender name.
|
|
7
|
-
*/
|
|
8
|
-
import type { Snippet } from 'svelte';
|
|
9
|
-
import { classNames } from '../../utils/utils.js';
|
|
10
|
-
import Renew from 'carbon-icons-svelte/lib/Renew.svelte';
|
|
11
|
-
|
|
12
|
-
interface Props {
|
|
13
|
-
/** Message direction - inbound (from other) or outbound (from us) */
|
|
14
|
-
direction?: 'inbound' | 'outbound';
|
|
15
|
-
/** Sender name (shown for inbound messages) */
|
|
16
|
-
senderName?: string;
|
|
17
|
-
/** Timestamp to display */
|
|
18
|
-
timestamp?: string;
|
|
19
|
-
/** Whether delivery failed */
|
|
20
|
-
failed?: boolean;
|
|
21
|
-
/** Error message when failed */
|
|
22
|
-
errorMessage?: string;
|
|
23
|
-
/** Callback when retry is clicked */
|
|
24
|
-
onretry?: () => void;
|
|
25
|
-
/** Additional CSS classes for the bubble */
|
|
26
|
-
className?: string;
|
|
27
|
-
/** Avatar snippet (for inbound messages) */
|
|
28
|
-
avatar?: Snippet;
|
|
29
|
-
/** Message content */
|
|
30
|
-
children?: Snippet;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
let {
|
|
34
|
-
direction = 'inbound',
|
|
35
|
-
senderName,
|
|
36
|
-
timestamp,
|
|
37
|
-
failed = false,
|
|
38
|
-
errorMessage,
|
|
39
|
-
onretry,
|
|
40
|
-
className = '',
|
|
41
|
-
avatar,
|
|
42
|
-
children,
|
|
43
|
-
}: Props = $props();
|
|
44
|
-
|
|
45
|
-
let isOutbound = $derived(direction === 'outbound');
|
|
46
|
-
|
|
47
|
-
let bubbleClasses = $derived(
|
|
48
|
-
classNames(
|
|
49
|
-
'px-4 py-2.5 rounded-2xl text-sm',
|
|
50
|
-
isOutbound
|
|
51
|
-
? 'bg-blue-600 text-white rounded-br-sm'
|
|
52
|
-
: 'bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white rounded-bl-sm',
|
|
53
|
-
className
|
|
54
|
-
)
|
|
55
|
-
);
|
|
56
|
-
</script>
|
|
57
|
-
|
|
58
|
-
<div class="flex {isOutbound ? 'justify-end' : 'justify-start'}">
|
|
59
|
-
<div class="flex items-end gap-2 max-w-[75%] {isOutbound ? 'flex-row-reverse' : ''}">
|
|
60
|
-
{#if !isOutbound && avatar}
|
|
61
|
-
{@render avatar()}
|
|
62
|
-
{/if}
|
|
63
|
-
<div class="flex flex-col {isOutbound ? 'items-end' : 'items-start'}">
|
|
64
|
-
{#if !isOutbound && senderName}
|
|
65
|
-
<span class="text-xs text-gray-500 mb-1 px-2">{senderName}</span>
|
|
66
|
-
{/if}
|
|
67
|
-
<div class="flex items-center gap-2 {isOutbound ? 'flex-row-reverse' : ''}">
|
|
68
|
-
<div class={bubbleClasses}>
|
|
69
|
-
{@render children?.()}
|
|
70
|
-
</div>
|
|
71
|
-
{#if failed}
|
|
72
|
-
<div class="flex items-center justify-center w-5 h-5 bg-red-500 rounded-full shrink-0">
|
|
73
|
-
<span class="text-white text-xs font-bold leading-none">!</span>
|
|
74
|
-
</div>
|
|
75
|
-
{/if}
|
|
76
|
-
</div>
|
|
77
|
-
{#if failed && errorMessage}
|
|
78
|
-
<div class="flex items-center gap-1 mt-0.5 px-2">
|
|
79
|
-
<span class="text-[9px] text-red-400">{errorMessage}</span>
|
|
80
|
-
{#if onretry}
|
|
81
|
-
<button
|
|
82
|
-
class="text-[9px] text-red-400 hover:text-red-500 flex items-center gap-0.5 opacity-75 hover:opacity-100"
|
|
83
|
-
onclick={onretry}
|
|
84
|
-
>
|
|
85
|
-
<Renew class="w-2 h-2" />
|
|
86
|
-
retry
|
|
87
|
-
</button>
|
|
88
|
-
{/if}
|
|
89
|
-
</div>
|
|
90
|
-
{:else if timestamp}
|
|
91
|
-
<span class="text-[10px] text-gray-400 mt-0.5 px-2">{timestamp}</span>
|
|
92
|
-
{/if}
|
|
93
|
-
</div>
|
|
94
|
-
</div>
|
|
95
|
-
</div>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* ChatBubble - Message bubble for chat interfaces
|
|
4
|
+
*
|
|
5
|
+
* Displays inbound (left) or outbound (right) messages with optional
|
|
6
|
+
* error state, timestamp, and sender name.
|
|
7
|
+
*/
|
|
8
|
+
import type { Snippet } from 'svelte';
|
|
9
|
+
import { classNames } from '../../utils/utils.js';
|
|
10
|
+
import Renew from 'carbon-icons-svelte/lib/Renew.svelte';
|
|
11
|
+
|
|
12
|
+
interface Props {
|
|
13
|
+
/** Message direction - inbound (from other) or outbound (from us) */
|
|
14
|
+
direction?: 'inbound' | 'outbound';
|
|
15
|
+
/** Sender name (shown for inbound messages) */
|
|
16
|
+
senderName?: string;
|
|
17
|
+
/** Timestamp to display */
|
|
18
|
+
timestamp?: string;
|
|
19
|
+
/** Whether delivery failed */
|
|
20
|
+
failed?: boolean;
|
|
21
|
+
/** Error message when failed */
|
|
22
|
+
errorMessage?: string;
|
|
23
|
+
/** Callback when retry is clicked */
|
|
24
|
+
onretry?: () => void;
|
|
25
|
+
/** Additional CSS classes for the bubble */
|
|
26
|
+
className?: string;
|
|
27
|
+
/** Avatar snippet (for inbound messages) */
|
|
28
|
+
avatar?: Snippet;
|
|
29
|
+
/** Message content */
|
|
30
|
+
children?: Snippet;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
let {
|
|
34
|
+
direction = 'inbound',
|
|
35
|
+
senderName,
|
|
36
|
+
timestamp,
|
|
37
|
+
failed = false,
|
|
38
|
+
errorMessage,
|
|
39
|
+
onretry,
|
|
40
|
+
className = '',
|
|
41
|
+
avatar,
|
|
42
|
+
children,
|
|
43
|
+
}: Props = $props();
|
|
44
|
+
|
|
45
|
+
let isOutbound = $derived(direction === 'outbound');
|
|
46
|
+
|
|
47
|
+
let bubbleClasses = $derived(
|
|
48
|
+
classNames(
|
|
49
|
+
'px-4 py-2.5 rounded-2xl text-sm',
|
|
50
|
+
isOutbound
|
|
51
|
+
? 'bg-blue-600 text-white rounded-br-sm'
|
|
52
|
+
: 'bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white rounded-bl-sm',
|
|
53
|
+
className
|
|
54
|
+
)
|
|
55
|
+
);
|
|
56
|
+
</script>
|
|
57
|
+
|
|
58
|
+
<div class="flex {isOutbound ? 'justify-end' : 'justify-start'}">
|
|
59
|
+
<div class="flex items-end gap-2 max-w-[75%] {isOutbound ? 'flex-row-reverse' : ''}">
|
|
60
|
+
{#if !isOutbound && avatar}
|
|
61
|
+
{@render avatar()}
|
|
62
|
+
{/if}
|
|
63
|
+
<div class="flex flex-col {isOutbound ? 'items-end' : 'items-start'}">
|
|
64
|
+
{#if !isOutbound && senderName}
|
|
65
|
+
<span class="text-xs text-gray-500 mb-1 px-2">{senderName}</span>
|
|
66
|
+
{/if}
|
|
67
|
+
<div class="flex items-center gap-2 {isOutbound ? 'flex-row-reverse' : ''}">
|
|
68
|
+
<div class={bubbleClasses}>
|
|
69
|
+
{@render children?.()}
|
|
70
|
+
</div>
|
|
71
|
+
{#if failed}
|
|
72
|
+
<div class="flex items-center justify-center w-5 h-5 bg-red-500 rounded-full shrink-0">
|
|
73
|
+
<span class="text-white text-xs font-bold leading-none">!</span>
|
|
74
|
+
</div>
|
|
75
|
+
{/if}
|
|
76
|
+
</div>
|
|
77
|
+
{#if failed && errorMessage}
|
|
78
|
+
<div class="flex items-center gap-1 mt-0.5 px-2">
|
|
79
|
+
<span class="text-[9px] text-red-400">{errorMessage}</span>
|
|
80
|
+
{#if onretry}
|
|
81
|
+
<button
|
|
82
|
+
class="text-[9px] text-red-400 hover:text-red-500 flex items-center gap-0.5 opacity-75 hover:opacity-100"
|
|
83
|
+
onclick={onretry}
|
|
84
|
+
>
|
|
85
|
+
<Renew class="w-2 h-2" />
|
|
86
|
+
retry
|
|
87
|
+
</button>
|
|
88
|
+
{/if}
|
|
89
|
+
</div>
|
|
90
|
+
{:else if timestamp}
|
|
91
|
+
<span class="text-[10px] text-gray-400 mt-0.5 px-2">{timestamp}</span>
|
|
92
|
+
{/if}
|
|
93
|
+
</div>
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
/**
|
|
3
|
-
* ChatContainer - Layout wrapper for chat interfaces
|
|
4
|
-
*
|
|
5
|
-
* Provides a flex column layout with optional header, scrollable message area,
|
|
6
|
-
* and fixed footer for message input.
|
|
7
|
-
*/
|
|
8
|
-
import type { Snippet } from 'svelte';
|
|
9
|
-
import { classNames } from '../../utils/utils.js';
|
|
10
|
-
|
|
11
|
-
interface Props {
|
|
12
|
-
/** Additional CSS classes for the container */
|
|
13
|
-
className?: string;
|
|
14
|
-
/** Header content (title, subtitle, etc.) */
|
|
15
|
-
header?: Snippet;
|
|
16
|
-
/** Footer content (message input, actions) */
|
|
17
|
-
footer?: Snippet;
|
|
18
|
-
/** Main scrollable content */
|
|
19
|
-
children?: Snippet;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
let {
|
|
23
|
-
className = '',
|
|
24
|
-
header,
|
|
25
|
-
footer,
|
|
26
|
-
children,
|
|
27
|
-
}: Props = $props();
|
|
28
|
-
</script>
|
|
29
|
-
|
|
30
|
-
<div class={classNames('flex flex-col h-full bg-white dark:bg-gray-900', className)}>
|
|
31
|
-
{#if header}
|
|
32
|
-
<div class="px-4 py-3 border-b border-gray-200 dark:border-gray-700 shrink-0">
|
|
33
|
-
{@render header()}
|
|
34
|
-
</div>
|
|
35
|
-
{/if}
|
|
36
|
-
|
|
37
|
-
<div class="flex-1 overflow-y-auto px-4 py-4 space-y-3">
|
|
38
|
-
{@render children?.()}
|
|
39
|
-
</div>
|
|
40
|
-
|
|
41
|
-
{#if footer}
|
|
42
|
-
<div class="px-4 py-3 border-t border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-900 shrink-0">
|
|
43
|
-
{@render footer()}
|
|
44
|
-
</div>
|
|
45
|
-
{/if}
|
|
46
|
-
</div>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* ChatContainer - Layout wrapper for chat interfaces
|
|
4
|
+
*
|
|
5
|
+
* Provides a flex column layout with optional header, scrollable message area,
|
|
6
|
+
* and fixed footer for message input.
|
|
7
|
+
*/
|
|
8
|
+
import type { Snippet } from 'svelte';
|
|
9
|
+
import { classNames } from '../../utils/utils.js';
|
|
10
|
+
|
|
11
|
+
interface Props {
|
|
12
|
+
/** Additional CSS classes for the container */
|
|
13
|
+
className?: string;
|
|
14
|
+
/** Header content (title, subtitle, etc.) */
|
|
15
|
+
header?: Snippet;
|
|
16
|
+
/** Footer content (message input, actions) */
|
|
17
|
+
footer?: Snippet;
|
|
18
|
+
/** Main scrollable content */
|
|
19
|
+
children?: Snippet;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
let {
|
|
23
|
+
className = '',
|
|
24
|
+
header,
|
|
25
|
+
footer,
|
|
26
|
+
children,
|
|
27
|
+
}: Props = $props();
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<div class={classNames('flex flex-col h-full bg-white dark:bg-gray-900', className)}>
|
|
31
|
+
{#if header}
|
|
32
|
+
<div class="px-4 py-3 border-b border-gray-200 dark:border-gray-700 shrink-0">
|
|
33
|
+
{@render header()}
|
|
34
|
+
</div>
|
|
35
|
+
{/if}
|
|
36
|
+
|
|
37
|
+
<div class="flex-1 overflow-y-auto px-4 py-4 space-y-3">
|
|
38
|
+
{@render children?.()}
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
{#if footer}
|
|
42
|
+
<div class="px-4 py-3 border-t border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-900 shrink-0">
|
|
43
|
+
{@render footer()}
|
|
44
|
+
</div>
|
|
45
|
+
{/if}
|
|
46
|
+
</div>
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
/**
|
|
3
|
-
* ChatDateDivider - Date separator for chat messages
|
|
4
|
-
*
|
|
5
|
-
* Displays a centered date label (Today, Yesterday, or formatted date)
|
|
6
|
-
* to separate messages by day.
|
|
7
|
-
*/
|
|
8
|
-
import { classNames } from '../../utils/utils.js';
|
|
9
|
-
|
|
10
|
-
interface Props {
|
|
11
|
-
/** Date label to display (e.g., "Today", "Yesterday", "Monday, Jan 15, 2024") */
|
|
12
|
-
label: string;
|
|
13
|
-
/** Additional CSS classes */
|
|
14
|
-
className?: string;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
let {
|
|
18
|
-
label,
|
|
19
|
-
className = '',
|
|
20
|
-
}: Props = $props();
|
|
21
|
-
</script>
|
|
22
|
-
|
|
23
|
-
<div class={classNames('text-center py-2', className)}>
|
|
24
|
-
<span class="text-xs font-semibold text-gray-500 dark:text-gray-400 bg-gray-100 dark:bg-gray-800 px-3 py-1 rounded-full">
|
|
25
|
-
{label}
|
|
26
|
-
</span>
|
|
27
|
-
</div>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* ChatDateDivider - Date separator for chat messages
|
|
4
|
+
*
|
|
5
|
+
* Displays a centered date label (Today, Yesterday, or formatted date)
|
|
6
|
+
* to separate messages by day.
|
|
7
|
+
*/
|
|
8
|
+
import { classNames } from '../../utils/utils.js';
|
|
9
|
+
|
|
10
|
+
interface Props {
|
|
11
|
+
/** Date label to display (e.g., "Today", "Yesterday", "Monday, Jan 15, 2024") */
|
|
12
|
+
label: string;
|
|
13
|
+
/** Additional CSS classes */
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
let {
|
|
18
|
+
label,
|
|
19
|
+
className = '',
|
|
20
|
+
}: Props = $props();
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<div class={classNames('text-center py-2', className)}>
|
|
24
|
+
<span class="text-xs font-semibold text-gray-500 dark:text-gray-400 bg-gray-100 dark:bg-gray-800 px-3 py-1 rounded-full">
|
|
25
|
+
{label}
|
|
26
|
+
</span>
|
|
27
|
+
</div>
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
/**
|
|
3
|
-
* ChatInvitationBubble - Invitation notification bubble
|
|
4
|
-
*
|
|
5
|
-
* Shows "Invited {performerName}" with send icon in a blue bubble.
|
|
6
|
-
*/
|
|
7
|
-
import { classNames } from '../../utils/utils.js';
|
|
8
|
-
import SendAltFilled from 'carbon-icons-svelte/lib/SendAltFilled.svelte';
|
|
9
|
-
|
|
10
|
-
interface Props {
|
|
11
|
-
/** Name of the performer who was invited */
|
|
12
|
-
performerName: string;
|
|
13
|
-
/** Whether this is outbound (right side) */
|
|
14
|
-
outbound?: boolean;
|
|
15
|
-
/** Additional CSS classes */
|
|
16
|
-
className?: string;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
let {
|
|
20
|
-
performerName,
|
|
21
|
-
outbound = true,
|
|
22
|
-
className = '',
|
|
23
|
-
}: Props = $props();
|
|
24
|
-
|
|
25
|
-
let bubbleClasses = $derived(
|
|
26
|
-
classNames(
|
|
27
|
-
'px-4 py-2.5 rounded-2xl text-sm bg-blue-600 text-white flex items-center gap-1.5',
|
|
28
|
-
outbound ? 'rounded-br-sm' : 'rounded-bl-sm',
|
|
29
|
-
className
|
|
30
|
-
)
|
|
31
|
-
);
|
|
32
|
-
</script>
|
|
33
|
-
|
|
34
|
-
<div class={bubbleClasses}>
|
|
35
|
-
<SendAltFilled class="w-4 h-4" />
|
|
36
|
-
Invited {performerName}
|
|
37
|
-
</div>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* ChatInvitationBubble - Invitation notification bubble
|
|
4
|
+
*
|
|
5
|
+
* Shows "Invited {performerName}" with send icon in a blue bubble.
|
|
6
|
+
*/
|
|
7
|
+
import { classNames } from '../../utils/utils.js';
|
|
8
|
+
import SendAltFilled from 'carbon-icons-svelte/lib/SendAltFilled.svelte';
|
|
9
|
+
|
|
10
|
+
interface Props {
|
|
11
|
+
/** Name of the performer who was invited */
|
|
12
|
+
performerName: string;
|
|
13
|
+
/** Whether this is outbound (right side) */
|
|
14
|
+
outbound?: boolean;
|
|
15
|
+
/** Additional CSS classes */
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
let {
|
|
20
|
+
performerName,
|
|
21
|
+
outbound = true,
|
|
22
|
+
className = '',
|
|
23
|
+
}: Props = $props();
|
|
24
|
+
|
|
25
|
+
let bubbleClasses = $derived(
|
|
26
|
+
classNames(
|
|
27
|
+
'px-4 py-2.5 rounded-2xl text-sm bg-blue-600 text-white flex items-center gap-1.5',
|
|
28
|
+
outbound ? 'rounded-br-sm' : 'rounded-bl-sm',
|
|
29
|
+
className
|
|
30
|
+
)
|
|
31
|
+
);
|
|
32
|
+
</script>
|
|
33
|
+
|
|
34
|
+
<div class={bubbleClasses}>
|
|
35
|
+
<SendAltFilled class="w-4 h-4" />
|
|
36
|
+
Invited {performerName}
|
|
37
|
+
</div>
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
/**
|
|
3
|
-
* ChatInvitationNotice - Inline invitation notice
|
|
4
|
-
*
|
|
5
|
-
* Shows "Invited {performerName}" with icon for activity notices.
|
|
6
|
-
* Smaller/subtler than ChatInvitationBubble.
|
|
7
|
-
*/
|
|
8
|
-
import { classNames } from '../../utils/utils.js';
|
|
9
|
-
import SendAltFilled from 'carbon-icons-svelte/lib/SendAltFilled.svelte';
|
|
10
|
-
|
|
11
|
-
interface Props {
|
|
12
|
-
/** Name of the performer who was invited */
|
|
13
|
-
performerName: string;
|
|
14
|
-
/** Additional CSS classes */
|
|
15
|
-
className?: string;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
let {
|
|
19
|
-
performerName,
|
|
20
|
-
className = '',
|
|
21
|
-
}: Props = $props();
|
|
22
|
-
</script>
|
|
23
|
-
|
|
24
|
-
<span class={classNames('text-xs font-medium text-blue-600 flex items-center gap-1', className)}>
|
|
25
|
-
<SendAltFilled class="w-3 h-3" />
|
|
26
|
-
Invited {performerName}
|
|
27
|
-
</span>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* ChatInvitationNotice - Inline invitation notice
|
|
4
|
+
*
|
|
5
|
+
* Shows "Invited {performerName}" with icon for activity notices.
|
|
6
|
+
* Smaller/subtler than ChatInvitationBubble.
|
|
7
|
+
*/
|
|
8
|
+
import { classNames } from '../../utils/utils.js';
|
|
9
|
+
import SendAltFilled from 'carbon-icons-svelte/lib/SendAltFilled.svelte';
|
|
10
|
+
|
|
11
|
+
interface Props {
|
|
12
|
+
/** Name of the performer who was invited */
|
|
13
|
+
performerName: string;
|
|
14
|
+
/** Additional CSS classes */
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
let {
|
|
19
|
+
performerName,
|
|
20
|
+
className = '',
|
|
21
|
+
}: Props = $props();
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<span class={classNames('text-xs font-medium text-blue-600 flex items-center gap-1', className)}>
|
|
25
|
+
<SendAltFilled class="w-3 h-3" />
|
|
26
|
+
Invited {performerName}
|
|
27
|
+
</span>
|