@licklist/design 0.78.5-dev.105 → 0.78.5-dev.107
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/.vscode/settings.json +3 -0
- package/bitbucket-pipelines.yml +13 -4
- package/dist/index.js +1 -1
- package/dist/product-set/form/ProductsControl.d.ts +2 -1
- package/dist/product-set/form/ProductsControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductsControl.js +0 -24
- package/dist/v2/components/DataTable/DataTable.d.ts.map +1 -1
- package/dist/v2/components/DataTable/DataTable.js +86 -2
- package/dist/v2/components/InputCheckbox/InputCheckbox.scss.js +1 -1
- package/dist/v2/components/Modal/DeleteModal.d.ts.map +1 -1
- package/dist/v2/components/Modal/DeleteModal.js +13 -11
- package/dist/v2/components/Toggle/Toggle.d.ts.map +1 -1
- package/dist/v2/components/Toggle/Toggle.js +8 -5
- package/dist/v2/components/ZoneCard/ZoneCard.scss.js +1 -1
- package/dist/v2/components/index.d.ts +1 -1
- package/dist/v2/components/index.d.ts.map +1 -1
- package/dist/v2/icons/index.d.ts +4 -0
- package/dist/v2/icons/index.d.ts.map +1 -1
- package/dist/v2/icons/index.js +47 -16
- package/dist/v2/index.d.ts +0 -4
- package/dist/v2/index.d.ts.map +1 -1
- package/dist/v2/pages/Settings/components/SidebarCustomisation.js +0 -3
- package/dist/v2/pages/Settings/components/SidebarNavItem.js +0 -3
- package/package.json +6 -6
- package/rollup.config.js +16 -2
- package/src/iframe/payment/payment-status-page/PaymentStatusPage.tsx +1 -1
- package/src/product-set/form/ProductsControl.tsx +2 -1
- package/src/v2/components/DataTable/DataTable.tsx +23 -1
- package/src/v2/components/InputCheckbox/InputCheckbox.scss +6 -6
- package/src/v2/components/Modal/DeleteModal.tsx +12 -20
- package/src/v2/components/Toggle/Toggle.tsx +6 -5
- package/src/v2/components/ZoneCard/ZoneCard.scss +78 -0
- package/src/v2/components/index.ts +1 -0
- package/src/v2/icons/index.tsx +10 -0
- package/src/v2/index.ts +0 -73
- package/src/v2/navigation/Navigation/Navigation.stories.tsx +137 -0
- package/dist/v2/shadcn/components/ui/accordion.d.ts +0 -8
- package/dist/v2/shadcn/components/ui/accordion.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/alert-dialog.d.ts +0 -21
- package/dist/v2/shadcn/components/ui/alert-dialog.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/alert.d.ts +0 -9
- package/dist/v2/shadcn/components/ui/alert.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/aspect-ratio.d.ts +0 -4
- package/dist/v2/shadcn/components/ui/aspect-ratio.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/avatar.d.ts +0 -7
- package/dist/v2/shadcn/components/ui/avatar.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/badge.d.ts +0 -10
- package/dist/v2/shadcn/components/ui/badge.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/breadcrumb.d.ts +0 -20
- package/dist/v2/shadcn/components/ui/breadcrumb.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/button.d.ts +0 -14
- package/dist/v2/shadcn/components/ui/button.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/calendar.d.ts +0 -9
- package/dist/v2/shadcn/components/ui/calendar.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/card.d.ts +0 -9
- package/dist/v2/shadcn/components/ui/card.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/carousel.d.ts +0 -19
- package/dist/v2/shadcn/components/ui/carousel.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/checkbox.d.ts +0 -6
- package/dist/v2/shadcn/components/ui/checkbox.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/checkbox.js +0 -115
- package/dist/v2/shadcn/components/ui/checkbox.scss.js +0 -6
- package/dist/v2/shadcn/components/ui/collapsible.d.ts +0 -6
- package/dist/v2/shadcn/components/ui/collapsible.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/command.d.ts +0 -83
- package/dist/v2/shadcn/components/ui/command.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/context-menu.d.ts +0 -28
- package/dist/v2/shadcn/components/ui/context-menu.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/dialog.d.ts +0 -20
- package/dist/v2/shadcn/components/ui/dialog.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/dialog.js +0 -169
- package/dist/v2/shadcn/components/ui/drawer.d.ts +0 -23
- package/dist/v2/shadcn/components/ui/drawer.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/dropdown-menu.d.ts +0 -28
- package/dist/v2/shadcn/components/ui/dropdown-menu.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/form.d.ts +0 -24
- package/dist/v2/shadcn/components/ui/form.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/hover-card.d.ts +0 -7
- package/dist/v2/shadcn/components/ui/hover-card.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/input-otp.d.ts +0 -35
- package/dist/v2/shadcn/components/ui/input-otp.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/input.d.ts +0 -6
- package/dist/v2/shadcn/components/ui/input.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/label.d.ts +0 -6
- package/dist/v2/shadcn/components/ui/label.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/menubar.d.ts +0 -34
- package/dist/v2/shadcn/components/ui/menubar.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/navigation-menu.d.ts +0 -13
- package/dist/v2/shadcn/components/ui/navigation-menu.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/pagination.d.ts +0 -29
- package/dist/v2/shadcn/components/ui/pagination.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/popover.d.ts +0 -7
- package/dist/v2/shadcn/components/ui/popover.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/progress.d.ts +0 -5
- package/dist/v2/shadcn/components/ui/progress.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/radio-card.d.ts +0 -12
- package/dist/v2/shadcn/components/ui/radio-card.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/radio-group.d.ts +0 -6
- package/dist/v2/shadcn/components/ui/radio-group.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/scroll-area.d.ts +0 -6
- package/dist/v2/shadcn/components/ui/scroll-area.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/select.d.ts +0 -14
- package/dist/v2/shadcn/components/ui/select.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/separator.d.ts +0 -5
- package/dist/v2/shadcn/components/ui/separator.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/sheet.d.ts +0 -26
- package/dist/v2/shadcn/components/ui/sheet.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/sidebar.d.ts +0 -67
- package/dist/v2/shadcn/components/ui/sidebar.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/skeleton.d.ts +0 -3
- package/dist/v2/shadcn/components/ui/skeleton.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/slider.d.ts +0 -5
- package/dist/v2/shadcn/components/ui/slider.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/switch.d.ts +0 -6
- package/dist/v2/shadcn/components/ui/switch.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/switch.js +0 -115
- package/dist/v2/shadcn/components/ui/switch.scss.js +0 -6
- package/dist/v2/shadcn/components/ui/table-pagination.d.ts +0 -11
- package/dist/v2/shadcn/components/ui/table-pagination.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/table.d.ts +0 -11
- package/dist/v2/shadcn/components/ui/table.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/tabs.d.ts +0 -8
- package/dist/v2/shadcn/components/ui/tabs.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/textarea.d.ts +0 -6
- package/dist/v2/shadcn/components/ui/textarea.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/toast.d.ts +0 -16
- package/dist/v2/shadcn/components/ui/toast.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/toaster.d.ts +0 -2
- package/dist/v2/shadcn/components/ui/toaster.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/toggle-group.d.ts +0 -13
- package/dist/v2/shadcn/components/ui/toggle-group.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/toggle.d.ts +0 -13
- package/dist/v2/shadcn/components/ui/toggle.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/tooltip.d.ts +0 -8
- package/dist/v2/shadcn/components/ui/tooltip.d.ts.map +0 -1
- package/dist/v2/shadcn/components/ui/use-toast.d.ts +0 -3
- package/dist/v2/shadcn/components/ui/use-toast.d.ts.map +0 -1
- package/dist/v2/shadcn/hooks/use-mobile.d.ts +0 -2
- package/dist/v2/shadcn/hooks/use-mobile.d.ts.map +0 -1
- package/dist/v2/shadcn/hooks/use-toast.d.ts +0 -45
- package/dist/v2/shadcn/hooks/use-toast.d.ts.map +0 -1
- package/dist/v2/shadcn/index.d.ts +0 -20
- package/dist/v2/shadcn/index.d.ts.map +0 -1
- package/dist/v2/shadcn/lib/utils.d.ts +0 -3
- package/dist/v2/shadcn/lib/utils.d.ts.map +0 -1
- package/dist/v2/shadcn/lib/utils.js +0 -11
- package/dist/v2/shadcn/styles/globals.css +0 -112
- package/src/v2/shadcn/_reference/AccountManagerCard.tsx +0 -45
- package/src/v2/shadcn/_reference/AffiliatesTable.tsx +0 -178
- package/src/v2/shadcn/_reference/AuditArchive.tsx +0 -165
- package/src/v2/shadcn/_reference/AuditContent.tsx +0 -270
- package/src/v2/shadcn/_reference/AutomationsGeneralSettings.tsx +0 -251
- package/src/v2/shadcn/_reference/AvatarUpload.tsx +0 -150
- package/src/v2/shadcn/_reference/BookingsSummaryCard.tsx +0 -268
- package/src/v2/shadcn/_reference/CodeCleanUpAudit.tsx +0 -274
- package/src/v2/shadcn/_reference/CompaniesTable.tsx +0 -387
- package/src/v2/shadcn/_reference/ComponentAudit.tsx +0 -239
- package/src/v2/shadcn/_reference/ConfigureSettingsCard.tsx +0 -95
- package/src/v2/shadcn/_reference/CustomerCard.tsx +0 -155
- package/src/v2/shadcn/_reference/DashboardCards.tsx +0 -50
- package/src/v2/shadcn/_reference/DashboardFooter.tsx +0 -18
- package/src/v2/shadcn/_reference/DiarySettings.tsx +0 -187
- package/src/v2/shadcn/_reference/DiaryView.tsx +0 -998
- package/src/v2/shadcn/_reference/EmptyState.tsx +0 -76
- package/src/v2/shadcn/_reference/EntityInfoCard.tsx +0 -48
- package/src/v2/shadcn/_reference/ExistingUserAssignments.tsx +0 -131
- package/src/v2/shadcn/_reference/FeatureToggle.tsx +0 -72
- package/src/v2/shadcn/_reference/FlowCard.tsx +0 -170
- package/src/v2/shadcn/_reference/FlowsContent.tsx +0 -688
- package/src/v2/shadcn/_reference/FlowsGeneralSettings.tsx +0 -27
- package/src/v2/shadcn/_reference/GeneralSettings.tsx +0 -33
- package/src/v2/shadcn/_reference/InventoryGeneralSettings.tsx +0 -82
- package/src/v2/shadcn/_reference/LanguageSelector.tsx +0 -97
- package/src/v2/shadcn/_reference/LoadingScreen.tsx +0 -25
- package/src/v2/shadcn/_reference/LoadingSpinner.tsx +0 -41
- package/src/v2/shadcn/_reference/ManagedClientsList.tsx +0 -121
- package/src/v2/shadcn/_reference/NPSScore.tsx +0 -379
- package/src/v2/shadcn/_reference/NPSSummaryCard.tsx +0 -181
- package/src/v2/shadcn/_reference/NotificationBanner.tsx +0 -129
- package/src/v2/shadcn/_reference/NotificationPanel.tsx +0 -208
- package/src/v2/shadcn/_reference/OnlineUsersCard.tsx +0 -73
- package/src/v2/shadcn/_reference/ProtectedRoute.tsx +0 -39
- package/src/v2/shadcn/_reference/ProvidersTable.tsx +0 -353
- package/src/v2/shadcn/_reference/QuickAddPanel.tsx +0 -1057
- package/src/v2/shadcn/_reference/QuickFilters.tsx +0 -112
- package/src/v2/shadcn/_reference/ScheduleView.tsx +0 -410
- package/src/v2/shadcn/_reference/ScrollToTop.tsx +0 -14
- package/src/v2/shadcn/_reference/SecondaryNav.tsx +0 -50
- package/src/v2/shadcn/_reference/SecuritySettings.tsx +0 -258
- package/src/v2/shadcn/_reference/SessionDetailView.tsx +0 -294
- package/src/v2/shadcn/_reference/Sidebar.tsx +0 -14
- package/src/v2/shadcn/_reference/SidebarAwareLayout.tsx +0 -30
- package/src/v2/shadcn/_reference/SidebarLabelCustomization.tsx +0 -285
- package/src/v2/shadcn/_reference/SimulationBanner.tsx +0 -57
- package/src/v2/shadcn/_reference/SortControls.tsx +0 -65
- package/src/v2/shadcn/_reference/StatusBadge.tsx +0 -49
- package/src/v2/shadcn/_reference/StyleGuideContent.tsx +0 -331
- package/src/v2/shadcn/_reference/TableActionMenu.tsx +0 -126
- package/src/v2/shadcn/_reference/ThemeProvider.tsx +0 -119
- package/src/v2/shadcn/_reference/ThemeSettings.tsx +0 -73
- package/src/v2/shadcn/_reference/TopNavigation.tsx +0 -332
- package/src/v2/shadcn/_reference/UserActivityHistory.tsx +0 -209
- package/src/v2/shadcn/_reference/UserLanguageSettings.tsx +0 -94
- package/src/v2/shadcn/_reference/UserPanel.tsx +0 -472
- package/src/v2/shadcn/_reference/UsersTable.tsx +0 -1023
- package/src/v2/shadcn/_reference/WaiverForm.tsx +0 -301
- package/src/v2/shadcn/_reference/WaiversGeneralSettings.tsx +0 -46
- package/src/v2/shadcn/_reference/WaiversTable.tsx +0 -290
- package/src/v2/shadcn/_reference/WaiversTemplatesSettings.tsx +0 -416
- package/src/v2/shadcn/_reference/ai/AIChatPanel.tsx +0 -313
- package/src/v2/shadcn/_reference/ai/AIChatSearchBar.tsx +0 -36
- package/src/v2/shadcn/_reference/ai/ChatInteractiveBlock.tsx +0 -298
- package/src/v2/shadcn/_reference/ai/ChatMessageContent.tsx +0 -40
- package/src/v2/shadcn/_reference/ai/parseInteractiveBlocks.ts +0 -142
- package/src/v2/shadcn/_reference/auth/AuthLayout.tsx +0 -55
- package/src/v2/shadcn/_reference/auth/CreatePasswordForm.tsx +0 -285
- package/src/v2/shadcn/_reference/auth/CreatePasswordPanel.tsx +0 -20
- package/src/v2/shadcn/_reference/auth/LoginFooter.tsx +0 -14
- package/src/v2/shadcn/_reference/auth/LoginForm.tsx +0 -205
- package/src/v2/shadcn/_reference/auth/LoginPanel.tsx +0 -41
- package/src/v2/shadcn/_reference/auth/ResetPasswordForm.tsx +0 -102
- package/src/v2/shadcn/_reference/auth/ResetPasswordPanel.tsx +0 -20
- package/src/v2/shadcn/_reference/auth/VerifyEmailForm.tsx +0 -95
- package/src/v2/shadcn/_reference/auth/VerifyEmailPanel.tsx +0 -20
- package/src/v2/shadcn/_reference/email/EmailAttachment.tsx +0 -119
- package/src/v2/shadcn/_reference/email/EmailAutomation.tsx +0 -92
- package/src/v2/shadcn/_reference/email/EmailPlaceholders.tsx +0 -64
- package/src/v2/shadcn/_reference/email/UnlayerEmailEditor.tsx +0 -41
- package/src/v2/shadcn/_reference/email/emailTemplateData.ts +0 -53
- package/src/v2/shadcn/_reference/emptyStateIcons.tsx +0 -103
- package/src/v2/shadcn/_reference/games/MazeGame.tsx +0 -394
- package/src/v2/shadcn/_reference/games/RunnerGame.tsx +0 -497
- package/src/v2/shadcn/_reference/logos/BookedLogoFull.tsx +0 -36
- package/src/v2/shadcn/_reference/logos/BookedLogoMark.tsx +0 -31
- package/src/v2/shadcn/_reference/logos/BookedLogoNew.tsx +0 -36
- package/src/v2/shadcn/_reference/pricing/DynamicPricingRulesEditor.tsx +0 -401
- package/src/v2/shadcn/_reference/pricing/DynamicPricingTierCard.tsx +0 -77
- package/src/v2/shadcn/_reference/pricing/DynamicPricingTiersList.tsx +0 -218
- package/src/v2/shadcn/_reference/pricing/PricingCalendar.tsx +0 -810
- package/src/v2/shadcn/_reference/pricing/PricingPeriodCard.tsx +0 -152
- package/src/v2/shadcn/_reference/pricing/PricingPeriodForm.tsx +0 -377
- package/src/v2/shadcn/_reference/pricing/PricingPeriodsList.tsx +0 -213
- package/src/v2/shadcn/_reference/pricing/getRuleSummary.ts +0 -39
- package/src/v2/shadcn/_reference/products/AvailabilityRulesSection.tsx +0 -184
- package/src/v2/shadcn/_reference/products/AvailabilitySection.tsx +0 -677
- package/src/v2/shadcn/_reference/products/BookingTypeConfigOptions.tsx +0 -40
- package/src/v2/shadcn/_reference/products/CapacityPeriodsSection.tsx +0 -238
- package/src/v2/shadcn/_reference/products/DynamicPricingTiersSection.tsx +0 -131
- package/src/v2/shadcn/_reference/products/GiftCardOrdersTab.tsx +0 -192
- package/src/v2/shadcn/_reference/products/GiftCardSettings.tsx +0 -342
- package/src/v2/shadcn/_reference/products/PackageProductsSection.tsx +0 -322
- package/src/v2/shadcn/_reference/products/PricingSection.tsx +0 -173
- package/src/v2/shadcn/_reference/products/ProductTypeFields.tsx +0 -353
- package/src/v2/shadcn/_reference/products/ProductTypeIcon.tsx +0 -95
- package/src/v2/shadcn/_reference/products/VariablePricingSection.tsx +0 -140
- package/src/v2/shadcn/_reference/products/productTypeConfig.ts +0 -182
- package/src/v2/shadcn/_reference/shared/BackButton.tsx +0 -50
- package/src/v2/shadcn/_reference/shared/CancelConfirmationDialog.tsx +0 -18
- package/src/v2/shadcn/_reference/shared/ConfirmationDialog.tsx +0 -136
- package/src/v2/shadcn/_reference/shared/DeleteConfirmationDialog.tsx +0 -18
- package/src/v2/shadcn/_reference/shared/DeleteEntityPage.tsx +0 -221
- package/src/v2/shadcn/_reference/shared/SidebarIcons.tsx +0 -108
- package/src/v2/shadcn/_reference/shared/UnifiedSidebar.tsx +0 -722
- package/src/v2/shadcn/_reference/tables/BulkActionsBar.tsx +0 -68
- package/src/v2/shadcn/_reference/tables/DataTable.tsx +0 -221
- package/src/v2/shadcn/_reference/tables/TableControls.tsx +0 -94
- package/src/v2/shadcn/_reference/tables/index.ts +0 -3
- package/src/v2/shadcn/_reference/tables/types.ts +0 -79
- package/src/v2/shadcn/_reference/zones/LegacyZoneSettings.tsx +0 -299
- package/src/v2/shadcn/components/ui/accordion.stories.tsx +0 -63
- package/src/v2/shadcn/components/ui/accordion.tsx +0 -52
- package/src/v2/shadcn/components/ui/alert-dialog.stories.tsx +0 -44
- package/src/v2/shadcn/components/ui/alert-dialog.tsx +0 -104
- package/src/v2/shadcn/components/ui/alert.stories.tsx +0 -44
- package/src/v2/shadcn/components/ui/alert.tsx +0 -43
- package/src/v2/shadcn/components/ui/aspect-ratio.stories.tsx +0 -46
- package/src/v2/shadcn/components/ui/aspect-ratio.tsx +0 -5
- package/src/v2/shadcn/components/ui/avatar.stories.tsx +0 -39
- package/src/v2/shadcn/components/ui/avatar.tsx +0 -38
- package/src/v2/shadcn/components/ui/badge.stories.tsx +0 -17
- package/src/v2/shadcn/components/ui/badge.tsx +0 -30
- package/src/v2/shadcn/components/ui/breadcrumb.stories.tsx +0 -91
- package/src/v2/shadcn/components/ui/breadcrumb.tsx +0 -90
- package/src/v2/shadcn/components/ui/button.stories.tsx +0 -20
- package/src/v2/shadcn/components/ui/button.tsx +0 -60
- package/src/v2/shadcn/components/ui/calendar.stories.tsx +0 -61
- package/src/v2/shadcn/components/ui/calendar.tsx +0 -54
- package/src/v2/shadcn/components/ui/card.stories.tsx +0 -37
- package/src/v2/shadcn/components/ui/card.tsx +0 -43
- package/src/v2/shadcn/components/ui/carousel.stories.tsx +0 -92
- package/src/v2/shadcn/components/ui/carousel.tsx +0 -224
- package/src/v2/shadcn/components/ui/checkbox.scss +0 -38
- package/src/v2/shadcn/components/ui/checkbox.stories.tsx +0 -23
- package/src/v2/shadcn/components/ui/checkbox.tsx +0 -24
- package/src/v2/shadcn/components/ui/collapsible.stories.tsx +0 -59
- package/src/v2/shadcn/components/ui/collapsible.tsx +0 -9
- package/src/v2/shadcn/components/ui/command.stories.tsx +0 -70
- package/src/v2/shadcn/components/ui/command.tsx +0 -132
- package/src/v2/shadcn/components/ui/context-menu.stories.tsx +0 -72
- package/src/v2/shadcn/components/ui/context-menu.tsx +0 -178
- package/src/v2/shadcn/components/ui/dialog.stories.tsx +0 -67
- package/src/v2/shadcn/components/ui/dialog.tsx +0 -95
- package/src/v2/shadcn/components/ui/drawer.stories.tsx +0 -50
- package/src/v2/shadcn/components/ui/drawer.tsx +0 -87
- package/src/v2/shadcn/components/ui/dropdown-menu.stories.tsx +0 -73
- package/src/v2/shadcn/components/ui/dropdown-menu.tsx +0 -179
- package/src/v2/shadcn/components/ui/form.stories.tsx +0 -105
- package/src/v2/shadcn/components/ui/form.tsx +0 -129
- package/src/v2/shadcn/components/ui/hover-card.stories.tsx +0 -35
- package/src/v2/shadcn/components/ui/hover-card.tsx +0 -27
- package/src/v2/shadcn/components/ui/input-otp.stories.tsx +0 -72
- package/src/v2/shadcn/components/ui/input-otp.tsx +0 -61
- package/src/v2/shadcn/components/ui/input.stories.tsx +0 -16
- package/src/v2/shadcn/components/ui/input.tsx +0 -25
- package/src/v2/shadcn/components/ui/label.stories.tsx +0 -13
- package/src/v2/shadcn/components/ui/label.tsx +0 -17
- package/src/v2/shadcn/components/ui/menubar.stories.tsx +0 -86
- package/src/v2/shadcn/components/ui/menubar.tsx +0 -207
- package/src/v2/shadcn/components/ui/navigation-menu.stories.tsx +0 -68
- package/src/v2/shadcn/components/ui/navigation-menu.tsx +0 -120
- package/src/v2/shadcn/components/ui/pagination.stories.tsx +0 -78
- package/src/v2/shadcn/components/ui/pagination.tsx +0 -81
- package/src/v2/shadcn/components/ui/popover.stories.tsx +0 -44
- package/src/v2/shadcn/components/ui/popover.tsx +0 -29
- package/src/v2/shadcn/components/ui/progress.stories.tsx +0 -17
- package/src/v2/shadcn/components/ui/progress.tsx +0 -23
- package/src/v2/shadcn/components/ui/radio-card.stories.tsx +0 -68
- package/src/v2/shadcn/components/ui/radio-card.tsx +0 -52
- package/src/v2/shadcn/components/ui/radio-group.stories.tsx +0 -77
- package/src/v2/shadcn/components/ui/radio-group.tsx +0 -35
- package/src/v2/shadcn/components/ui/scroll-area.stories.tsx +0 -56
- package/src/v2/shadcn/components/ui/scroll-area.tsx +0 -38
- package/src/v2/shadcn/components/ui/select.stories.tsx +0 -60
- package/src/v2/shadcn/components/ui/select.tsx +0 -148
- package/src/v2/shadcn/components/ui/separator.stories.tsx +0 -30
- package/src/v2/shadcn/components/ui/separator.tsx +0 -20
- package/src/v2/shadcn/components/ui/sheet.stories.tsx +0 -115
- package/src/v2/shadcn/components/ui/sheet.tsx +0 -107
- package/src/v2/shadcn/components/ui/sidebar.stories.tsx +0 -167
- package/src/v2/shadcn/components/ui/sidebar.tsx +0 -637
- package/src/v2/shadcn/components/ui/skeleton.stories.tsx +0 -36
- package/src/v2/shadcn/components/ui/skeleton.tsx +0 -7
- package/src/v2/shadcn/components/ui/slider.stories.tsx +0 -16
- package/src/v2/shadcn/components/ui/slider.tsx +0 -23
- package/src/v2/shadcn/components/ui/switch.scss +0 -63
- package/src/v2/shadcn/components/ui/switch.stories.tsx +0 -23
- package/src/v2/shadcn/components/ui/switch.tsx +0 -24
- package/src/v2/shadcn/components/ui/table-pagination.stories.tsx +0 -81
- package/src/v2/shadcn/components/ui/table-pagination.tsx +0 -61
- package/src/v2/shadcn/components/ui/table.stories.tsx +0 -40
- package/src/v2/shadcn/components/ui/table.tsx +0 -72
- package/src/v2/shadcn/components/ui/tabs.stories.tsx +0 -85
- package/src/v2/shadcn/components/ui/tabs.tsx +0 -53
- package/src/v2/shadcn/components/ui/textarea.stories.tsx +0 -15
- package/src/v2/shadcn/components/ui/textarea.tsx +0 -21
- package/src/v2/shadcn/components/ui/toast.stories.tsx +0 -77
- package/src/v2/shadcn/components/ui/toast.tsx +0 -111
- package/src/v2/shadcn/components/ui/toaster.stories.tsx +0 -46
- package/src/v2/shadcn/components/ui/toaster.tsx +0 -24
- package/src/v2/shadcn/components/ui/toggle-group.stories.tsx +0 -95
- package/src/v2/shadcn/components/ui/toggle-group.tsx +0 -49
- package/src/v2/shadcn/components/ui/toggle.stories.tsx +0 -18
- package/src/v2/shadcn/components/ui/toggle.tsx +0 -37
- package/src/v2/shadcn/components/ui/tooltip.stories.tsx +0 -57
- package/src/v2/shadcn/components/ui/tooltip.tsx +0 -28
- package/src/v2/shadcn/components/ui/use-toast.ts +0 -3
- package/src/v2/shadcn/hooks/use-mobile.tsx +0 -19
- package/src/v2/shadcn/hooks/use-toast.ts +0 -184
- package/src/v2/shadcn/index.ts +0 -76
- package/src/v2/shadcn/lib/utils.ts +0 -6
- package/src/v2/shadcn/styles/globals.css +0 -112
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Parses AI chat message content into segments of plain text and interactive blocks.
|
|
3
|
-
*
|
|
4
|
-
* Interactive blocks are delimited by :::interactive:<type> … ::: markers.
|
|
5
|
-
* Supported types: radio-select, user-card, action-buttons
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
export type RadioOption = {
|
|
9
|
-
value: string;
|
|
10
|
-
label: string;
|
|
11
|
-
description?: string;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export type RadioSelectBlock = {
|
|
15
|
-
type: 'radio-select';
|
|
16
|
-
field: string;
|
|
17
|
-
options: RadioOption[];
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export type UserCardBlock = {
|
|
21
|
-
type: 'user-card';
|
|
22
|
-
firstName: string;
|
|
23
|
-
lastName: string;
|
|
24
|
-
email: string;
|
|
25
|
-
role: string;
|
|
26
|
-
roleLabel?: string;
|
|
27
|
-
providerName?: string;
|
|
28
|
-
companyName?: string;
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export type ActionButton = {
|
|
32
|
-
label: string;
|
|
33
|
-
action: string;
|
|
34
|
-
variant: 'primary' | 'ghost' | 'cancel' | 'destructive';
|
|
35
|
-
data?: Record<string, any>;
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export type ActionButtonsBlock = {
|
|
39
|
-
type: 'action-buttons';
|
|
40
|
-
buttons: ActionButton[];
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
export type QuickAction = {
|
|
44
|
-
label: string;
|
|
45
|
-
action: string;
|
|
46
|
-
type?: 'message' | 'date-picker';
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
export type QuickActionsBlock = {
|
|
50
|
-
type: 'quick-actions';
|
|
51
|
-
actions: QuickAction[];
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
export type EntityCardItem = {
|
|
55
|
-
id: string;
|
|
56
|
-
name: string;
|
|
57
|
-
subtitle?: string;
|
|
58
|
-
badge?: string;
|
|
59
|
-
entityType: 'customer' | 'user' | 'provider' | 'company';
|
|
60
|
-
providerId?: string;
|
|
61
|
-
providerType?: 'venue' | 'promoter';
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
export type EntityCardBlock = {
|
|
65
|
-
type: 'entity-card';
|
|
66
|
-
items: EntityCardItem[];
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
export type InteractiveBlock = RadioSelectBlock | UserCardBlock | ActionButtonsBlock | QuickActionsBlock | EntityCardBlock;
|
|
70
|
-
|
|
71
|
-
export type MessageSegment =
|
|
72
|
-
| { kind: 'text'; content: string }
|
|
73
|
-
| { kind: 'interactive'; block: InteractiveBlock };
|
|
74
|
-
|
|
75
|
-
const BLOCK_REGEX = /:::interactive:([\w-]+)\n([\s\S]*?)\n:::/g;
|
|
76
|
-
|
|
77
|
-
export function parseMessageContent(content: string): MessageSegment[] {
|
|
78
|
-
const segments: MessageSegment[] = [];
|
|
79
|
-
let lastIndex = 0;
|
|
80
|
-
|
|
81
|
-
for (const match of content.matchAll(BLOCK_REGEX)) {
|
|
82
|
-
const beforeText = content.slice(lastIndex, match.index);
|
|
83
|
-
if (beforeText.trim()) {
|
|
84
|
-
segments.push({ kind: 'text', content: beforeText.trim() });
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
const blockType = match[1];
|
|
88
|
-
const blockJson = match[2].trim();
|
|
89
|
-
|
|
90
|
-
try {
|
|
91
|
-
const parsed = JSON.parse(blockJson);
|
|
92
|
-
|
|
93
|
-
switch (blockType) {
|
|
94
|
-
case 'radio-select':
|
|
95
|
-
segments.push({
|
|
96
|
-
kind: 'interactive',
|
|
97
|
-
block: { type: 'radio-select', field: parsed.field, options: parsed.options } as RadioSelectBlock,
|
|
98
|
-
});
|
|
99
|
-
break;
|
|
100
|
-
case 'user-card':
|
|
101
|
-
segments.push({
|
|
102
|
-
kind: 'interactive',
|
|
103
|
-
block: { type: 'user-card', ...parsed } as UserCardBlock,
|
|
104
|
-
});
|
|
105
|
-
break;
|
|
106
|
-
case 'action-buttons':
|
|
107
|
-
segments.push({
|
|
108
|
-
kind: 'interactive',
|
|
109
|
-
block: { type: 'action-buttons', buttons: Array.isArray(parsed) ? parsed : parsed.buttons } as ActionButtonsBlock,
|
|
110
|
-
});
|
|
111
|
-
break;
|
|
112
|
-
case 'quick-actions':
|
|
113
|
-
segments.push({
|
|
114
|
-
kind: 'interactive',
|
|
115
|
-
block: { type: 'quick-actions', actions: Array.isArray(parsed) ? parsed : parsed.actions } as QuickActionsBlock,
|
|
116
|
-
});
|
|
117
|
-
break;
|
|
118
|
-
case 'entity-card':
|
|
119
|
-
segments.push({
|
|
120
|
-
kind: 'interactive',
|
|
121
|
-
block: { type: 'entity-card', items: Array.isArray(parsed) ? parsed : parsed.items } as EntityCardBlock,
|
|
122
|
-
});
|
|
123
|
-
break;
|
|
124
|
-
default:
|
|
125
|
-
// Unknown block type – render as text
|
|
126
|
-
segments.push({ kind: 'text', content: match[0] });
|
|
127
|
-
}
|
|
128
|
-
} catch {
|
|
129
|
-
// Invalid JSON – render as text
|
|
130
|
-
segments.push({ kind: 'text', content: match[0] });
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
lastIndex = (match.index ?? 0) + match[0].length;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
const trailing = content.slice(lastIndex);
|
|
137
|
-
if (trailing.trim()) {
|
|
138
|
-
segments.push({ kind: 'text', content: trailing.trim() });
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
return segments.length > 0 ? segments : [{ kind: 'text', content }];
|
|
142
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { AuthBackgroundGraphic } from '../../../../icons';
|
|
3
|
-
import { BookedLogoNew } from '../logos/BookedLogoNew';
|
|
4
|
-
|
|
5
|
-
interface AuthLayoutProps {
|
|
6
|
-
badgeLabel: string;
|
|
7
|
-
icon: React.ReactNode;
|
|
8
|
-
title: string;
|
|
9
|
-
subtitle: string;
|
|
10
|
-
children: React.ReactNode;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export const AuthLayout: React.FC<AuthLayoutProps> = ({
|
|
14
|
-
badgeLabel,
|
|
15
|
-
icon,
|
|
16
|
-
title,
|
|
17
|
-
subtitle,
|
|
18
|
-
children
|
|
19
|
-
}) => {
|
|
20
|
-
return (
|
|
21
|
-
<>
|
|
22
|
-
<AuthBackgroundGraphic className="fixed top-0 left-0 w-[489px] h-[588px] pointer-events-none z-0" />
|
|
23
|
-
|
|
24
|
-
<main className="shadow-lg self-center min-h-[400px] w-[846px] max-w-[calc(100%-32px)] md:max-w-[calc(100%-64px)] overflow-hidden bg-surface-primary mt-20 rounded-2xl max-md:mt-10 relative z-10">
|
|
25
|
-
{/* Header with logo and badge */}
|
|
26
|
-
<div className="flex items-center justify-between p-4 border-b border-border-primary">
|
|
27
|
-
<BookedLogoNew className="h-6" />
|
|
28
|
-
<div className="inline-flex justify-center items-center gap-2 border px-2 py-1 rounded-3xl border-colour-overlay bg-surface-tertiary">
|
|
29
|
-
<span className="text-label-primary text-[10px] font-mono font-medium leading-[13px] whitespace-nowrap">
|
|
30
|
-
{badgeLabel}
|
|
31
|
-
</span>
|
|
32
|
-
</div>
|
|
33
|
-
</div>
|
|
34
|
-
|
|
35
|
-
<div className="pt-[42px] max-md:pt-5 pb-6 px-[42px] max-md:px-5">
|
|
36
|
-
<section className="flex w-full gap-16 max-md:gap-8 flex-wrap max-md:max-w-full relative z-10">
|
|
37
|
-
<div className="min-w-60 text-neutral-600 flex-1 shrink basis-[0%] max-w-[260px]">
|
|
38
|
-
<div className="w-full">
|
|
39
|
-
{icon}
|
|
40
|
-
<h1 className="text-label-primary text-[32px] font-bold leading-none mt-2">
|
|
41
|
-
{title}
|
|
42
|
-
</h1>
|
|
43
|
-
<p className="text-label-secondary text-lg font-normal leading-none mt-2 max-md:mt-1">
|
|
44
|
-
{subtitle}
|
|
45
|
-
</p>
|
|
46
|
-
</div>
|
|
47
|
-
</div>
|
|
48
|
-
|
|
49
|
-
{children}
|
|
50
|
-
</section>
|
|
51
|
-
</div>
|
|
52
|
-
</main>
|
|
53
|
-
</>
|
|
54
|
-
);
|
|
55
|
-
};
|
|
@@ -1,285 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
import { useTranslation } from 'react-i18next';
|
|
3
|
-
import { Button } from '../ui/button';
|
|
4
|
-
import { Label } from '../ui/label';
|
|
5
|
-
import { Input } from '../ui/input';
|
|
6
|
-
import { useNotify } from '../../hooks/useNotify';
|
|
7
|
-
import { useNavigate } from 'react-router-dom';
|
|
8
|
-
import IconTick from '@/assets/Icon_Tick.svg';
|
|
9
|
-
import IconCross from '@/assets/Icon_Cross.svg';
|
|
10
|
-
import { supabase } from '@/integrations/supabase/client';
|
|
11
|
-
|
|
12
|
-
export const CreatePasswordForm: React.FC = () => {
|
|
13
|
-
const [password, setPassword] = useState('');
|
|
14
|
-
const [confirmPassword, setConfirmPassword] = useState('');
|
|
15
|
-
const [isSubmitting, setIsSubmitting] = useState(false);
|
|
16
|
-
const [showError, setShowError] = useState(false);
|
|
17
|
-
const navigate = useNavigate();
|
|
18
|
-
const { showSuccess, showError: showNotifyError } = useNotify();
|
|
19
|
-
const { t } = useTranslation(['Design', 'User', 'Validation']);
|
|
20
|
-
|
|
21
|
-
// Password strength calculation
|
|
22
|
-
const hasNumber = /\d/.test(password);
|
|
23
|
-
const hasCapital = /[A-Z]/.test(password);
|
|
24
|
-
const hasMinLength = password.length >= 8;
|
|
25
|
-
|
|
26
|
-
const criteriaCount = [hasNumber, hasCapital, hasMinLength].filter(Boolean).length;
|
|
27
|
-
const allCriteriaMet = hasNumber && hasCapital && hasMinLength;
|
|
28
|
-
|
|
29
|
-
// Strength bar color and width
|
|
30
|
-
const getStrengthColor = () => {
|
|
31
|
-
if (password.length === 0) return 'transparent';
|
|
32
|
-
if (criteriaCount <= 1) return 'var(--red-600)';
|
|
33
|
-
if (criteriaCount === 2) return 'var(--orange-500)';
|
|
34
|
-
return 'var(--green-600)';
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
const getStrengthWidth = () => {
|
|
38
|
-
if (password.length === 0) return '0%';
|
|
39
|
-
if (criteriaCount <= 1) return '33%';
|
|
40
|
-
if (criteriaCount === 2) return '66%';
|
|
41
|
-
return '100%';
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
const getStrengthLabel = () => {
|
|
45
|
-
if (password.length === 0) return '';
|
|
46
|
-
if (criteriaCount <= 1) return t('passwordStrengthWeak');
|
|
47
|
-
if (criteriaCount === 2) return t('passwordStrengthMedium');
|
|
48
|
-
return t('passwordStrengthStrong');
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
// Password match validation
|
|
52
|
-
const passwordsMatch = password === confirmPassword && confirmPassword.length > 0;
|
|
53
|
-
const showMatchIndicator = confirmPassword.length > 0;
|
|
54
|
-
|
|
55
|
-
const onSubmit = async (e: React.FormEvent) => {
|
|
56
|
-
e.preventDefault();
|
|
57
|
-
|
|
58
|
-
if (!allCriteriaMet) {
|
|
59
|
-
setShowError(true);
|
|
60
|
-
showNotifyError(t('pleaseMeetAllPasswordRequirements', { ns: 'Validation' }));
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
if (!passwordsMatch) {
|
|
65
|
-
setShowError(true);
|
|
66
|
-
showNotifyError(t('passwordsDoNotMatch', { ns: 'Validation' }));
|
|
67
|
-
return;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
setShowError(false);
|
|
71
|
-
setIsSubmitting(true);
|
|
72
|
-
try {
|
|
73
|
-
const { error } = await supabase.auth.updateUser({
|
|
74
|
-
password: password,
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
if (error) {
|
|
78
|
-
showNotifyError(t('updateFailed', { ns: 'User' }), error.message);
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
// Clear force_password_reset flag and update password_last_changed_at
|
|
83
|
-
const { data: { user: currentUser } } = await supabase.auth.getUser();
|
|
84
|
-
if (currentUser) {
|
|
85
|
-
const { error: profileError } = await supabase
|
|
86
|
-
.from('profiles')
|
|
87
|
-
.update({
|
|
88
|
-
force_password_reset: false,
|
|
89
|
-
password_last_changed_at: new Date().toISOString()
|
|
90
|
-
})
|
|
91
|
-
.eq('id', currentUser.id);
|
|
92
|
-
|
|
93
|
-
if (profileError) {
|
|
94
|
-
console.error('Error updating profile:', profileError);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
showSuccess(t('passwordUpdatedSuccessfully', { ns: 'User' }));
|
|
99
|
-
|
|
100
|
-
// Get user's primary role and assignments to determine dashboard
|
|
101
|
-
const { data: { user } } = await supabase.auth.getUser();
|
|
102
|
-
if (!user) {
|
|
103
|
-
showNotifyError(t('authenticationFailed', { ns: 'User' }));
|
|
104
|
-
navigate('/auth');
|
|
105
|
-
return;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
const { data: primaryRole, error: roleError } = await supabase
|
|
109
|
-
.rpc('get_user_primary_role', { _user_id: user.id });
|
|
110
|
-
|
|
111
|
-
if (roleError) {
|
|
112
|
-
console.error('Error fetching role:', roleError);
|
|
113
|
-
showNotifyError(t('failedToDeterminePermissions', { ns: 'User' }));
|
|
114
|
-
navigate('/auth');
|
|
115
|
-
return;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
// Super admins and system admins go to admin dashboard
|
|
119
|
-
if (primaryRole === 'super_admin' || primaryRole === 'system_admin') {
|
|
120
|
-
navigate('/admin');
|
|
121
|
-
return;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
// For other roles, check their assignments
|
|
125
|
-
// First check for company assignments
|
|
126
|
-
const { data: companyAssignments } = await supabase
|
|
127
|
-
.from('user_companies')
|
|
128
|
-
.select('company_id')
|
|
129
|
-
.eq('user_id', user.id)
|
|
130
|
-
.limit(1);
|
|
131
|
-
|
|
132
|
-
if (companyAssignments && companyAssignments.length > 0) {
|
|
133
|
-
const companyId = companyAssignments[0].company_id;
|
|
134
|
-
navigate(`/company/${companyId}`);
|
|
135
|
-
return;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
// Then check for provider assignments
|
|
139
|
-
const { data: providerAssignments } = await supabase
|
|
140
|
-
.from('user_providers')
|
|
141
|
-
.select('provider_id')
|
|
142
|
-
.eq('user_id', user.id)
|
|
143
|
-
.limit(1);
|
|
144
|
-
|
|
145
|
-
if (providerAssignments && providerAssignments.length > 0) {
|
|
146
|
-
const providerId = providerAssignments[0].provider_id;
|
|
147
|
-
|
|
148
|
-
// Fetch provider details to get the friendly ID and type
|
|
149
|
-
const { data: provider } = await supabase
|
|
150
|
-
.from('providers')
|
|
151
|
-
.select('venue_id, type')
|
|
152
|
-
.eq('id', providerId)
|
|
153
|
-
.single();
|
|
154
|
-
|
|
155
|
-
if (provider) {
|
|
156
|
-
const providerType = provider.type === 'venue' ? 'venue' : 'promoter';
|
|
157
|
-
const friendlyId = provider.venue_id || '01';
|
|
158
|
-
navigate(`/${providerType}/${friendlyId}`);
|
|
159
|
-
return;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
// No assignments found - show error
|
|
164
|
-
showNotifyError(t('noDashboardAccess', { ns: 'User' }));
|
|
165
|
-
navigate('/auth');
|
|
166
|
-
} catch (error) {
|
|
167
|
-
showNotifyError(t('unexpectedError', { ns: 'User' }));
|
|
168
|
-
} finally {
|
|
169
|
-
setIsSubmitting(false);
|
|
170
|
-
}
|
|
171
|
-
};
|
|
172
|
-
|
|
173
|
-
return (
|
|
174
|
-
<form onSubmit={onSubmit} className="flex min-w-60 flex-col items-stretch flex-1 shrink basis-[0%] max-md:max-w-full">
|
|
175
|
-
<div className="mb-6">
|
|
176
|
-
<p className="text-label-primary text-[15px] font-semibold leading-[1.4] mb-2">
|
|
177
|
-
{t('passwordsMustContain')}
|
|
178
|
-
</p>
|
|
179
|
-
<ul className="text-label-primary text-[15px] font-normal leading-[1.6] list-none pl-0 space-y-1">
|
|
180
|
-
<li className="flex items-center gap-2">
|
|
181
|
-
<img
|
|
182
|
-
src={hasNumber ? IconTick : IconCross}
|
|
183
|
-
alt=""
|
|
184
|
-
className="w-4 h-4"
|
|
185
|
-
/>
|
|
186
|
-
{t('passwordAtLeastOneNumber')}
|
|
187
|
-
</li>
|
|
188
|
-
<li className="flex items-center gap-2">
|
|
189
|
-
<img
|
|
190
|
-
src={hasCapital ? IconTick : IconCross}
|
|
191
|
-
alt=""
|
|
192
|
-
className="w-4 h-4"
|
|
193
|
-
/>
|
|
194
|
-
{t('passwordAtLeastOneCapital')}
|
|
195
|
-
</li>
|
|
196
|
-
<li className="flex items-center gap-2">
|
|
197
|
-
<img
|
|
198
|
-
src={hasMinLength ? IconTick : IconCross}
|
|
199
|
-
alt=""
|
|
200
|
-
className="w-4 h-4"
|
|
201
|
-
/>
|
|
202
|
-
{t('passwordAtLeastEightChars')}
|
|
203
|
-
</li>
|
|
204
|
-
</ul>
|
|
205
|
-
</div>
|
|
206
|
-
|
|
207
|
-
<div className="mb-4">
|
|
208
|
-
<Label htmlFor="password" className="text-label-primary text-[15px] font-semibold leading-[1.4] mb-2 block">
|
|
209
|
-
{t('password')}
|
|
210
|
-
</Label>
|
|
211
|
-
<Input
|
|
212
|
-
id="password"
|
|
213
|
-
type="password"
|
|
214
|
-
value={password}
|
|
215
|
-
onChange={(e) => setPassword(e.target.value)}
|
|
216
|
-
className="border-stroke-primary bg-surface-primary text-label-primary"
|
|
217
|
-
|
|
218
|
-
/>
|
|
219
|
-
|
|
220
|
-
{password.length > 0 && (
|
|
221
|
-
<div className="mt-2">
|
|
222
|
-
<div className="flex items-center justify-between mb-1">
|
|
223
|
-
<span className="text-label-secondary text-xs">{t('passwordStrength')}</span>
|
|
224
|
-
<span className="text-label-secondary text-xs">{getStrengthLabel()}</span>
|
|
225
|
-
</div>
|
|
226
|
-
<div className="h-1 bg-neutral-100 rounded-full overflow-hidden">
|
|
227
|
-
<div
|
|
228
|
-
className="h-full transition-all duration-300"
|
|
229
|
-
style={{
|
|
230
|
-
width: getStrengthWidth(),
|
|
231
|
-
backgroundColor: getStrengthColor()
|
|
232
|
-
}}
|
|
233
|
-
/>
|
|
234
|
-
</div>
|
|
235
|
-
</div>
|
|
236
|
-
)}
|
|
237
|
-
</div>
|
|
238
|
-
|
|
239
|
-
<div className="mb-6">
|
|
240
|
-
<Label htmlFor="confirmPassword" className="text-label-primary text-[15px] font-semibold leading-[1.4] mb-2 block">
|
|
241
|
-
{t('confirmPassword')}
|
|
242
|
-
</Label>
|
|
243
|
-
<Input
|
|
244
|
-
id="confirmPassword"
|
|
245
|
-
type="password"
|
|
246
|
-
value={confirmPassword}
|
|
247
|
-
onChange={(e) => setConfirmPassword(e.target.value)}
|
|
248
|
-
className="border-stroke-primary bg-surface-primary text-label-primary"
|
|
249
|
-
|
|
250
|
-
/>
|
|
251
|
-
|
|
252
|
-
{showMatchIndicator && (
|
|
253
|
-
<div className="flex items-center gap-2 mt-2">
|
|
254
|
-
<img
|
|
255
|
-
src={passwordsMatch ? IconTick : IconCross}
|
|
256
|
-
alt=""
|
|
257
|
-
className="w-4 h-4"
|
|
258
|
-
/>
|
|
259
|
-
<span className={passwordsMatch ? 'text-feedback-success' : 'text-feedback-error'} style={{ fontSize: '13px' }}>
|
|
260
|
-
{passwordsMatch ? t('passwordsMatch') : t('passwordsDoNotMatch')}
|
|
261
|
-
</span>
|
|
262
|
-
</div>
|
|
263
|
-
)}
|
|
264
|
-
</div>
|
|
265
|
-
|
|
266
|
-
<Button
|
|
267
|
-
type="submit"
|
|
268
|
-
disabled={isSubmitting}
|
|
269
|
-
size="lg"
|
|
270
|
-
className="min-w-[150px] w-fit"
|
|
271
|
-
>
|
|
272
|
-
{isSubmitting ? t('updatingPassword') : t('updatePassword')}
|
|
273
|
-
</Button>
|
|
274
|
-
|
|
275
|
-
<Button
|
|
276
|
-
type="button"
|
|
277
|
-
variant="link"
|
|
278
|
-
onClick={() => navigate('/auth/reset-password')}
|
|
279
|
-
className="mt-4 p-0 h-auto"
|
|
280
|
-
>
|
|
281
|
-
{t('resetPasswordInstead')}
|
|
282
|
-
</Button>
|
|
283
|
-
</form>
|
|
284
|
-
);
|
|
285
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { useTranslation } from 'react-i18next';
|
|
3
|
-
import { CreatePasswordForm } from './CreatePasswordForm';
|
|
4
|
-
import { AuthLayout } from './AuthLayout';
|
|
5
|
-
import { IconUser } from '../../../icons';
|
|
6
|
-
export const CreatePasswordPanel: React.FC = () => {
|
|
7
|
-
const { t } = useTranslation(['User']);
|
|
8
|
-
return (
|
|
9
|
-
<AuthLayout
|
|
10
|
-
badgeLabel={t('createNewPassword')}
|
|
11
|
-
icon={
|
|
12
|
-
<IconUser className="w-16 h-16 text-fill-primary" />
|
|
13
|
-
}
|
|
14
|
-
title={t('createNewPassword')}
|
|
15
|
-
subtitle={t('createNewPasswordSubtitle')}
|
|
16
|
-
>
|
|
17
|
-
<CreatePasswordForm />
|
|
18
|
-
</AuthLayout>
|
|
19
|
-
);
|
|
20
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { useNavigate, useLocation } from 'react-router-dom';
|
|
3
|
-
|
|
4
|
-
export const LoginFooter: React.FC = () => {
|
|
5
|
-
const navigate = useNavigate();
|
|
6
|
-
const location = useLocation();
|
|
7
|
-
const isLoginPage = location.pathname === '/auth' || location.pathname === '/auth/';
|
|
8
|
-
|
|
9
|
-
if (!isLoginPage) {
|
|
10
|
-
return null;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
return null;
|
|
14
|
-
};
|