@memobit/libs 2.1.0 → 3.1.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/components/Accordion/Accordion.css +1 -0
- package/dist/components/Accordion/Accordion2.js +79 -0
- package/dist/components/AlertDialog/AlertDialog.css +1 -0
- package/dist/components/AlertDialog/AlertDialog2.js +26 -0
- package/dist/components/AnalogClock/AnalogClock.css +1 -0
- package/dist/components/AnalogClock/AnalogClock2.js +293 -0
- package/dist/components/AngleSlider/AngleSlider.css +1 -0
- package/dist/components/AngleSlider/AngleSlider2.js +135 -0
- package/dist/components/AppHeader/AppHeader.css +1 -0
- package/dist/components/AppHeader/AppHeader2.js +44 -0
- package/dist/components/Auth/ChangePasswordModal/ChangePasswordModal.css +1 -0
- package/dist/components/Auth/ChangePasswordModal/ChangePasswordModal2.js +138 -0
- package/dist/components/Auth/Login/Login.css +1 -0
- package/dist/components/Auth/Login/Login2.js +155 -0
- package/dist/components/Auth/MfaSetupModal/MfaSetupModal.css +1 -0
- package/dist/components/Auth/MfaSetupModal/MfaSetupModal2.js +327 -0
- package/dist/components/AvatarInitials/AvatarInitials.css +1 -0
- package/dist/components/AvatarInitials/AvatarInitials2.js +73 -0
- package/dist/components/BMI/BMI.css +1 -0
- package/dist/components/BMI/BMI2.js +53 -0
- package/dist/components/BMI/bmiUtils.js +265 -0
- package/dist/components/Badge/Badge.css +1 -0
- package/dist/components/Badge/Badge2.js +30 -0
- package/dist/components/Banner/Banner.css +1 -0
- package/dist/components/Banner/Banner2.js +57 -0
- package/dist/components/Blockquote/Blockquote.css +1 -0
- package/dist/components/Blockquote/Blockquote2.js +55 -0
- package/dist/components/Breadcrumb/Breadcrumb.css +1 -0
- package/dist/components/Breadcrumb/Breadcrumb2.js +36 -0
- package/dist/components/BulkActionBar/BulkActionBar.css +1 -0
- package/dist/components/BulkActionBar/BulkActionBar2.js +39 -0
- package/dist/components/Button/Button.css +1 -0
- package/dist/components/Button/Button2.js +32 -0
- package/dist/components/Calendar/Calendar.css +1 -0
- package/dist/components/Calendar/Calendar2.js +279 -0
- package/dist/components/CalendarHeatmap/CalendarHeatmap.css +1 -0
- package/dist/components/CalendarHeatmap/CalendarHeatmap2.js +91 -0
- package/dist/components/Card/Card.css +1 -0
- package/dist/components/Card/Card2.js +47 -0
- package/dist/components/Checkbox/Checkbox.css +1 -0
- package/dist/components/Checkbox/Checkbox2.js +35 -0
- package/dist/components/Chip/Chip.css +1 -0
- package/dist/components/Chip/Chip2.js +31 -0
- package/dist/components/CollapsibleSection/CollapsibleSection.css +1 -0
- package/dist/components/CollapsibleSection/CollapsibleSection2.js +68 -0
- package/dist/components/ColorPicker/ColorPicker.css +1 -0
- package/dist/components/ColorPicker/ColorPicker2.js +257 -0
- package/dist/components/CommandPalette/CommandPalette.css +1 -0
- package/dist/components/CommandPalette/CommandPalette2.js +97 -0
- package/dist/components/Confetti/Confetti.css +1 -0
- package/dist/components/Confetti/Confetti2.js +175 -0
- package/dist/components/ConfirmDialog/ConfirmDialog.css +1 -0
- package/dist/components/ConfirmDialog/ConfirmDialog2.js +37 -0
- package/dist/components/ConfirmPopover/ConfirmPopover.css +1 -0
- package/dist/components/ConfirmPopover/ConfirmPopover2.js +55 -0
- package/dist/components/ContextMenu/ContextMenu.css +1 -0
- package/dist/components/ContextMenu/ContextMenu2.js +53 -0
- package/dist/components/ContextToast/ContextToast.css +1 -0
- package/dist/components/ContextToast/ContextToast2.js +96 -0
- package/dist/components/ControlPanel/ControlPanel.css +1 -0
- package/dist/components/ControlPanel/ControlPanel.types.js +21 -0
- package/dist/components/ControlPanel/ControlPanel2.js +137 -0
- package/dist/components/ControlPanel/ControlPanelContext.js +31 -0
- package/dist/components/ControlPanel/ControlPanelFilter.js +386 -0
- package/dist/components/ControlPanel/ControlPanelNav.js +74 -0
- package/dist/components/ControlPanel/ControlPanelOptions.js +197 -0
- package/dist/components/CopyButton/CopyButton.css +1 -0
- package/dist/components/CopyButton/CopyButton2.js +48 -0
- package/dist/components/CountryWithFlag/CountryWithFlag.css +1 -0
- package/dist/components/CountryWithFlag/CountryWithFlag2.js +21 -0
- package/dist/components/DataView/DataView.CardView.js +189 -0
- package/dist/components/DataView/DataView.ColumnSelector.js +51 -0
- package/dist/components/DataView/DataView.MiniSort.js +25 -0
- package/dist/components/DataView/DataView.css +1 -0
- package/dist/components/DataView/DataView2.js +433 -0
- package/dist/components/DatePicker/DatePicker.css +1 -0
- package/dist/components/DatePicker/DatePicker2.js +151 -0
- package/dist/components/DateRangePicker/DateRangePicker.css +1 -0
- package/dist/components/DateRangePicker/DateRangePicker2.js +223 -0
- package/dist/components/DayAgenda/DayAgenda.css +1 -0
- package/dist/components/DayAgenda/DayAgenda2.js +120 -0
- package/dist/components/DiffViewer/DiffViewer.css +1 -0
- package/dist/components/DiffViewer/DiffViewer2.js +270 -0
- package/dist/components/Drawer/Drawer.css +1 -0
- package/dist/components/Drawer/Drawer2.js +119 -0
- package/dist/components/Dropdown/Dropdown.css +1 -0
- package/dist/components/Dropdown/Dropdown2.js +413 -0
- package/dist/components/EmojiPicker/EmojiPicker.css +1 -0
- package/dist/components/EmojiPicker/EmojiPicker2.js +789 -0
- package/dist/components/EmojiPicker/emojiKeywords/activities.js +508 -0
- package/dist/components/EmojiPicker/emojiKeywords/animals.js +501 -0
- package/dist/components/EmojiPicker/emojiKeywords/food.js +540 -0
- package/dist/components/EmojiPicker/emojiKeywords/index.js +21 -0
- package/dist/components/EmojiPicker/emojiKeywords/objects.js +652 -0
- package/dist/components/EmojiPicker/emojiKeywords/people.js +488 -0
- package/dist/components/EmojiPicker/emojiKeywords/smileys.js +538 -0
- package/dist/components/EmojiPicker/emojiKeywords/symbols.js +597 -0
- package/dist/components/EmojiPicker/emojiKeywords/travel.js +507 -0
- package/dist/components/EmptyState/EmptyState.css +1 -0
- package/dist/components/EmptyState/EmptyState2.js +47 -0
- package/dist/components/ErrorBoundary/ErrorBoundary.css +1 -0
- package/dist/components/ErrorBoundary/ErrorBoundary2.js +37 -0
- package/dist/components/EventCalendar/EventCalendar.Chip.js +45 -0
- package/dist/components/EventCalendar/EventCalendar.Month.js +118 -0
- package/dist/components/EventCalendar/EventCalendar.Week.js +131 -0
- package/dist/components/EventCalendar/EventCalendar.css +1 -0
- package/dist/components/EventCalendar/EventCalendar.helpers.js +72 -0
- package/dist/components/EventCalendar/EventCalendar2.js +157 -0
- package/dist/components/FileDropzone/FileDropzone.css +1 -0
- package/dist/components/FileDropzone/FileDropzone2.js +71 -0
- package/dist/components/Flag/Flag.css +1 -0
- package/dist/components/Flag/Flag2.js +36 -0
- package/dist/components/FloatButton/FloatButton.css +1 -0
- package/dist/components/FloatButton/FloatButton2.js +68 -0
- package/dist/components/FloatingWindow/FloatingWindow.css +1 -0
- package/dist/components/FloatingWindow/FloatingWindow2.js +203 -0
- package/dist/components/FolderBrowserModal/FolderBrowserModal.css +1 -0
- package/dist/components/FolderBrowserModal/FolderBrowserModal2.js +144 -0
- package/dist/components/Grid/Col.js +17 -0
- package/dist/components/Grid/Grid.css +1 -0
- package/dist/components/Grid/Grid2.js +28 -0
- package/dist/components/Icon/Icon.css +1 -0
- package/dist/components/Icon/Icon2.js +23 -0
- package/dist/components/IconPicker/IconPicker.css +1 -0
- package/dist/components/IconPicker/IconPicker2.js +51 -0
- package/dist/components/InfiniteScroll/InfiniteScroll.css +1 -0
- package/dist/components/InfiniteScroll/InfiniteScroll2.js +66 -0
- package/dist/components/InputDate/InputDate.css +1 -0
- package/dist/components/InputDate/InputDate2.js +87 -0
- package/dist/components/InputEmail/InputEmail.css +1 -0
- package/dist/components/InputEmail/InputEmail2.js +73 -0
- package/dist/components/InputFile/InputFile.css +1 -0
- package/dist/components/InputFile/InputFile2.js +41 -0
- package/dist/components/InputMask/InputMask.css +1 -0
- package/dist/components/InputMask/InputMask2.js +163 -0
- package/dist/components/InputNumber/InputNumber.css +1 -0
- package/dist/components/InputNumber/InputNumber2.js +60 -0
- package/dist/components/InputPIN/InputPIN.css +1 -0
- package/dist/components/InputPIN/InputPIN2.js +121 -0
- package/dist/components/InputPassword/InputPassword.css +1 -0
- package/dist/components/InputPassword/InputPassword2.js +47 -0
- package/dist/components/InputPhone/InputPhone.css +1 -0
- package/dist/components/InputPhone/InputPhone2.js +82 -0
- package/dist/components/InputSearch/InputSearch.css +1 -0
- package/dist/components/InputSearch/InputSearch2.js +53 -0
- package/dist/components/InputText/InputText.css +1 -0
- package/dist/components/InputText/InputText2.js +47 -0
- package/dist/components/InputTextarea/InputTextarea.css +1 -0
- package/dist/components/InputTextarea/InputTextarea2.js +46 -0
- package/dist/components/InputTime/InputTime.css +1 -0
- package/dist/components/InputTime/InputTime2.js +85 -0
- package/dist/components/InputUrl/InputUrl.css +1 -0
- package/dist/components/InputUrl/InputUrl2.js +65 -0
- package/dist/components/JourneyWizard/JourneyWizard.css +1 -0
- package/dist/components/JourneyWizard/JourneyWizard2.js +147 -0
- package/dist/components/List/List.css +1 -0
- package/dist/components/List/List2.js +28 -0
- package/dist/components/Loading/Loading.css +1 -0
- package/dist/components/Loading/Loading2.js +11 -0
- package/dist/components/MenuHamburger/MenuHamburger.css +1 -0
- package/dist/components/MenuHamburger/MenuHamburger2.js +65 -0
- package/dist/components/MiniSort/MiniSort.css +1 -0
- package/dist/components/MiniSort/MiniSort2.js +52 -0
- package/dist/components/MiniStatsCard/MiniStatsCard.css +1 -0
- package/dist/components/MiniStatsCard/MiniStatsCard2.js +67 -0
- package/dist/components/Minimap/Minimap.css +1 -0
- package/dist/components/Minimap/Minimap2.js +62 -0
- package/dist/components/Modal/Modal.css +1 -0
- package/dist/components/Modal/Modal2.js +87 -0
- package/dist/components/NavBar/NavBar.css +1 -0
- package/dist/components/NavBar/NavBar2.js +64 -0
- package/dist/components/NotificationPanel/NotificationPanel.css +1 -0
- package/dist/components/NotificationPanel/NotificationPanel2.js +66 -0
- package/dist/components/Pagination/Pagination.css +1 -0
- package/dist/components/Pagination/Pagination2.js +92 -0
- package/dist/components/PieChart/PieChart.css +1 -0
- package/dist/components/PieChart/PieChart2.js +142 -0
- package/dist/components/Popover/Popover.css +1 -0
- package/dist/components/Popover/Popover2.js +109 -0
- package/dist/components/Popover/hooks/Popover.hook.js +33 -0
- package/dist/components/ProgressBar/ProgressBar.css +1 -0
- package/dist/components/ProgressBar/ProgressBar2.js +48 -0
- package/dist/components/ProgressRing/ProgressRing.css +1 -0
- package/dist/components/ProgressRing/ProgressRing2.js +54 -0
- package/dist/components/QuantitySelector/QuantitySelector.css +1 -0
- package/dist/components/QuantitySelector/QuantitySelector2.js +94 -0
- package/dist/components/QuickAdd/QuickAdd.css +1 -0
- package/dist/components/QuickAdd/QuickAdd2.js +56 -0
- package/dist/components/QuickNumberUpdate/QuickNumberUpdate.css +1 -0
- package/dist/components/QuickNumberUpdate/QuickNumberUpdate2.js +52 -0
- package/dist/components/QuickOptionUpdate/QuickOptionUpdate.css +1 -0
- package/dist/components/QuickOptionUpdate/QuickOptionUpdate2.js +67 -0
- package/dist/components/Radio/Radio.css +1 -0
- package/dist/components/Radio/Radio2.js +36 -0
- package/dist/components/RangeSlider/RangeSlider.css +1 -0
- package/dist/components/RangeSlider/RangeSlider2.js +157 -0
- package/dist/components/Rating/Rating.css +1 -0
- package/dist/components/Rating/Rating2.js +148 -0
- package/dist/components/Rating/RatingIcon.js +102 -0
- package/dist/components/RichTextEditor/RichTextEditor.css +1 -0
- package/dist/components/RichTextEditor/RichTextEditor2.js +212 -0
- package/dist/components/RichTextEditor/RteLinkPrompt.js +42 -0
- package/dist/components/RichTextEditor/RteTableToolbar.js +95 -0
- package/dist/components/RichTextEditor/RteToolbar.js +106 -0
- package/dist/components/RichTextEditor/helpers.js +73 -0
- package/dist/components/RichTextEditor/hooks/useEditorHistory.js +39 -0
- package/dist/components/RichTextEditor/hooks/useLinkPrompt.js +61 -0
- package/dist/components/RichTextEditor/hooks/useTableOps.js +134 -0
- package/dist/components/RollingNumber/RollingNumber.css +1 -0
- package/dist/components/RollingNumber/RollingNumber2.js +71 -0
- package/dist/components/ScrollToTop/ScrollToTop.css +1 -0
- package/dist/components/ScrollToTop/ScrollToTop2.js +40 -0
- package/dist/components/Separator/Separator.css +1 -0
- package/dist/components/Separator/Separator2.js +39 -0
- package/dist/components/Sidebar/Sidebar.css +1 -0
- package/dist/components/Sidebar/Sidebar2.js +115 -0
- package/dist/components/Sidebar/SidebarContext.js +31 -0
- package/dist/components/SignalStrength/SignalStrength.css +1 -0
- package/dist/components/SignalStrength/SignalStrength2.js +56 -0
- package/dist/components/Skeleton/Skeleton.css +1 -0
- package/dist/components/Skeleton/Skeleton2.js +50 -0
- package/dist/components/Slider/Slider.css +1 -0
- package/dist/components/Slider/Slider2.js +39 -0
- package/dist/components/SplitPanel/SplitPanel.css +1 -0
- package/dist/components/SplitPanel/SplitPanel2.js +69 -0
- package/dist/components/Splitter/Splitter.css +1 -0
- package/dist/components/Splitter/Splitter2.js +89 -0
- package/dist/components/StackedBar/StackedBar.css +1 -0
- package/dist/components/StackedBar/StackedBar2.js +50 -0
- package/dist/components/Stats/Stats.css +1 -0
- package/dist/components/Stats/Stats2.js +26 -0
- package/dist/components/StickyBar/StickyBar.css +1 -0
- package/dist/components/StickyBar/StickyBar2.js +29 -0
- package/dist/components/SuggestionsList/SuggestionsList.css +1 -0
- package/dist/components/SuggestionsList/SuggestionsList2.js +121 -0
- package/dist/components/ThemeSettings/ThemeContext.js +138 -0
- package/dist/components/ThemeSettings/ThemeContextValue.js +5 -0
- package/dist/components/ThemeSettings/ThemeSettings.css +1 -0
- package/dist/components/ThemeSettings/ThemeSettings2.js +245 -0
- package/dist/components/ThemeSettings/themeConfig.js +7 -0
- package/dist/components/ThemeSettings/useTheme.js +10 -0
- package/dist/components/TimePicker/TimePicker.css +1 -0
- package/dist/components/TimePicker/TimePicker2.js +118 -0
- package/dist/components/TimePicker/TimeSpinner.js +59 -0
- package/dist/components/Timeline/Timeline.css +1 -0
- package/dist/components/Timeline/Timeline2.js +57 -0
- package/dist/components/TimelineMarkers/TimelineMarkers.css +1 -0
- package/dist/components/TimelineMarkers/TimelineMarkers2.js +73 -0
- package/dist/components/TipsOfTheDay/TipsOfTheDay.css +1 -0
- package/dist/components/TipsOfTheDay/TipsOfTheDay2.js +24 -0
- package/dist/components/Toast/Toast.css +1 -0
- package/dist/components/Toast/Toast2.js +39 -0
- package/dist/components/ToggleButtons/ToggleButtons.css +1 -0
- package/dist/components/ToggleButtons/ToggleButtons2.js +47 -0
- package/dist/components/ToggleSwitch/ToggleSwitch.css +1 -0
- package/dist/components/ToggleSwitch/ToggleSwitch2.js +27 -0
- package/dist/components/Toolbar/Toolbar.css +1 -0
- package/dist/components/Toolbar/Toolbar2.js +129 -0
- package/dist/components/Tooltip/Tooltip.css +1 -0
- package/dist/components/Tooltip/Tooltip2.js +93 -0
- package/dist/components/TourHud/TourHud.css +1 -0
- package/dist/components/TourHud/TourHud2.js +70 -0
- package/dist/components/Transition/Transition.css +1 -0
- package/dist/components/Transition/Transition2.js +68 -0
- package/dist/components/Tree/Tree.css +1 -0
- package/dist/components/Tree/Tree2.js +95 -0
- package/dist/components/VirtualList/VirtualList.css +1 -0
- package/dist/components/VirtualList/VirtualList2.js +64 -0
- package/dist/components/WHtR/WHtR.css +1 -0
- package/dist/components/WHtR/WHtR2.js +115 -0
- package/dist/contexts/AuthContext/AuthContext.js +113 -0
- package/dist/helpers/AppPersistenceStorage.js +50 -0
- package/dist/helpers/Datetime.js +114 -0
- package/dist/helpers/Format.js +21 -0
- package/dist/helpers/Highlight.js +36 -0
- package/dist/helpers/HtmlContent.js +118 -0
- package/dist/helpers/LogicalOperators.js +15 -0
- package/dist/helpers/Numbers.js +15 -0
- package/dist/helpers/Pagination.js +7 -0
- package/dist/helpers/Search.js +15 -0
- package/dist/helpers/Strings.js +10 -0
- package/dist/helpers/Urls.js +68 -0
- package/dist/helpers/VersionInfo.js +36 -0
- package/dist/hooks/useAppPersistence.js +51 -0
- package/dist/hooks/useAuth/useAuth.js +10 -0
- package/dist/hooks/useBodyScrollLock.js +31 -0
- package/dist/hooks/useBreakpoint.js +65 -0
- package/dist/hooks/useComponentEffect.js +8 -0
- package/dist/hooks/useSwipe.js +45 -0
- package/dist/index.css +1 -2
- package/dist/index.d.ts +6 -10
- package/dist/index.esm.js +1 -17738
- package/dist/index.js +348 -0
- package/dist/mfa.js +4 -0
- package/dist/node_modules/qrcode.react/lib/esm/index.js +979 -0
- package/dist/validators/Vin.js +69 -0
- package/dist/version.js +8 -0
- package/dist/version.json +4 -4
- package/package.json +11 -75
- package/dist/mfa.esm.js +0 -1293
- package/dist/styles/themes.scss +0 -74
- package/dist/styles/theming/_profile-theme.scss +0 -317
- package/dist/styles/theming/amber-meridian.scss +0 -271
- package/dist/styles/theming/archive-indigo.scss +0 -270
- package/dist/styles/theming/arctic-blue.scss +0 -266
- package/dist/styles/theming/asphalt-code.scss +0 -271
- package/dist/styles/theming/atelier-media.scss +0 -272
- package/dist/styles/theming/audit-ember.scss +0 -286
- package/dist/styles/theming/azure-night.scss +0 -269
- package/dist/styles/theming/blossom-meadow.scss +0 -273
- package/dist/styles/theming/blueprint-clay.scss +0 -271
- package/dist/styles/theming/blush-market.scss +0 -271
- package/dist/styles/theming/brass-chronicle.scss +0 -271
- package/dist/styles/theming/carbon-velocity.scss +0 -270
- package/dist/styles/theming/chalk-circuit.scss +0 -271
- package/dist/styles/theming/chrono-atlas.scss +0 -279
- package/dist/styles/theming/citrus-vital.scss +0 -34
- package/dist/styles/theming/clinical-aqua.scss +0 -270
- package/dist/styles/theming/cobalt-pulse.scss +0 -272
- package/dist/styles/theming/command-slate.scss +0 -34
- package/dist/styles/theming/crawler-dusk.scss +0 -270
- package/dist/styles/theming/crimson-dusk.scss +0 -269
- package/dist/styles/theming/cyber-forest.scss +0 -269
- package/dist/styles/theming/dashdarkx.scss +0 -269
- package/dist/styles/theming/ember-night.scss +0 -269
- package/dist/styles/theming/emerald-ledger.scss +0 -271
- package/dist/styles/theming/frost-petal.scss +0 -269
- package/dist/styles/theming/garden-harvest.scss +0 -271
- package/dist/styles/theming/gilded-bear.scss +0 -271
- package/dist/styles/theming/graphite-shell.scss +0 -270
- package/dist/styles/theming/horizon-amber.scss +0 -270
- package/dist/styles/theming/horizon-drift.scss +0 -271
- package/dist/styles/theming/ivory-serif.scss +0 -271
- package/dist/styles/theming/lavender-mist.scss +0 -269
- package/dist/styles/theming/light-blue.scss +0 -269
- package/dist/styles/theming/lumen.scss +0 -276
- package/dist/styles/theming/luna.scss +0 -269
- package/dist/styles/theming/mesh-circuit.scss +0 -271
- package/dist/styles/theming/midnight-amber.scss +0 -273
- package/dist/styles/theming/midnight-atlas.scss +0 -35
- package/dist/styles/theming/midnight-folio.scss +0 -34
- package/dist/styles/theming/mint-meadow.scss +0 -269
- package/dist/styles/theming/mintone.scss +0 -269
- package/dist/styles/theming/neon-tokyo.scss +0 -269
- package/dist/styles/theming/noir-marquee.scss +0 -34
- package/dist/styles/theming/ocean-breeze.scss +0 -269
- package/dist/styles/theming/ocean-depths.scss +0 -269
- package/dist/styles/theming/orbital-night.scss +0 -276
- package/dist/styles/theming/sandstone.scss +0 -269
- package/dist/styles/theming/sandy-parchment.scss +0 -270
- package/dist/styles/theming/screening-room.scss +0 -34
- package/dist/styles/theming/signal-burst.scss +0 -271
- package/dist/styles/theming/signal-clarity.scss +0 -34
- package/dist/styles/theming/slate-bazaar.scss +0 -34
- package/dist/styles/theming/slate-focus.scss +0 -270
- package/dist/styles/theming/spectrum-vault.scss +0 -271
- package/dist/styles/theming/tailwind-vue-dark.scss +0 -269
- package/dist/styles/theming/terminal-phosphor.scss +0 -272
- package/dist/styles/theming/terracotta-kitchen.scss +0 -271
- package/dist/styles/theming/twilight-pulse.scss +0 -269
- package/dist/styles/theming/vault-guard.scss +0 -271
- package/dist/styles/theming/velvet-reel.scss +0 -272
- package/dist/styles/theming/velvet-tome.scss +0 -271
- package/dist/styles/theming/verdant-pulse.scss +0 -34
- package/dist/styles/theming/vital-aurora.scss +0 -45
- package/dist/styles/theming/vital-signal.scss +0 -270
- package/dist/useAuth-BBqdDG2z.js +0 -467
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import './ChangePasswordModal.css';
|
|
2
|
+
import { Modal as k } from "../../Modal/Modal2.js";
|
|
3
|
+
import { InputPassword as m } from "../../InputPassword/InputPassword2.js";
|
|
4
|
+
import { Toast as T } from "../../Toast/Toast2.js";
|
|
5
|
+
import { useAuth as F } from "../../../hooks/useAuth/useAuth.js";
|
|
6
|
+
/* empty css */
|
|
7
|
+
import { useEffect as E, useState as o } from "react";
|
|
8
|
+
import { jsx as e, jsxs as d } from "react/jsx-runtime";
|
|
9
|
+
function U({ isOpen: l, onClose: c }) {
|
|
10
|
+
const { config: b } = F(), [i, u] = o(""), [n, f] = o(""), [w, p] = o(""), [g, a] = o(""), [r, C] = o(!1), [h, P] = o(null);
|
|
11
|
+
E(() => {
|
|
12
|
+
l && (u(""), f(""), p(""), a(""));
|
|
13
|
+
}, [l]);
|
|
14
|
+
const y = async () => {
|
|
15
|
+
if (!i || !n || !w) {
|
|
16
|
+
a("All fields are required");
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
if (n !== w) {
|
|
20
|
+
a("New passwords do not match");
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
if (n.length < 8) {
|
|
24
|
+
a("New password must be at least 8 characters long");
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
C(!0), a("");
|
|
28
|
+
try {
|
|
29
|
+
const s = document.cookie.match(/(?:^|;\s*)csrf_token=([^;]+)/), t = s ? decodeURIComponent(s[1]) : null, _ = { "Content-Type": "application/json" };
|
|
30
|
+
t && (_["X-CSRF-Token"] = t);
|
|
31
|
+
const N = await fetch(`${b.apiBaseUrl}/auth/changePassword`, {
|
|
32
|
+
method: "POST",
|
|
33
|
+
credentials: "include",
|
|
34
|
+
headers: _,
|
|
35
|
+
body: JSON.stringify({
|
|
36
|
+
currentPassword: i,
|
|
37
|
+
newPassword: n
|
|
38
|
+
})
|
|
39
|
+
});
|
|
40
|
+
if (!N.ok) {
|
|
41
|
+
const v = await N.json();
|
|
42
|
+
throw new Error(v.error || "Failed to change password");
|
|
43
|
+
}
|
|
44
|
+
P({
|
|
45
|
+
message: "Password changed successfully!",
|
|
46
|
+
type: "success"
|
|
47
|
+
}), setTimeout(() => {
|
|
48
|
+
c();
|
|
49
|
+
}, 2e3);
|
|
50
|
+
} catch (s) {
|
|
51
|
+
const t = s instanceof Error ? s.message : "Failed to change password";
|
|
52
|
+
a(t);
|
|
53
|
+
} finally {
|
|
54
|
+
C(!1);
|
|
55
|
+
}
|
|
56
|
+
}, M = () => {
|
|
57
|
+
P(null);
|
|
58
|
+
};
|
|
59
|
+
return /* @__PURE__ */ d(k, {
|
|
60
|
+
isOpen: l,
|
|
61
|
+
onClose: c,
|
|
62
|
+
title: "Change Password",
|
|
63
|
+
size: "medium",
|
|
64
|
+
primary: {
|
|
65
|
+
text: r ? "Changing..." : "Change Password",
|
|
66
|
+
onClick: y,
|
|
67
|
+
icon: "lock",
|
|
68
|
+
variant: "success",
|
|
69
|
+
disabled: r
|
|
70
|
+
},
|
|
71
|
+
secondary: {
|
|
72
|
+
text: "Cancel",
|
|
73
|
+
onClick: c,
|
|
74
|
+
icon: "clear",
|
|
75
|
+
variant: "default",
|
|
76
|
+
disabled: r
|
|
77
|
+
},
|
|
78
|
+
children: [/* @__PURE__ */ d("div", {
|
|
79
|
+
className: "ChangePasswordModal",
|
|
80
|
+
children: [
|
|
81
|
+
/* @__PURE__ */ d("div", {
|
|
82
|
+
className: "ChangePasswordModal__field",
|
|
83
|
+
children: [/* @__PURE__ */ e("label", {
|
|
84
|
+
htmlFor: "current-password",
|
|
85
|
+
className: "ChangePasswordModal__label",
|
|
86
|
+
children: "Current Password"
|
|
87
|
+
}), /* @__PURE__ */ e(m, {
|
|
88
|
+
id: "current-password",
|
|
89
|
+
value: i,
|
|
90
|
+
onChange: (s) => u(s),
|
|
91
|
+
placeholder: "Enter current password",
|
|
92
|
+
disabled: r,
|
|
93
|
+
autoFocus: !0
|
|
94
|
+
})]
|
|
95
|
+
}),
|
|
96
|
+
/* @__PURE__ */ d("div", {
|
|
97
|
+
className: "ChangePasswordModal__field",
|
|
98
|
+
children: [/* @__PURE__ */ e("label", {
|
|
99
|
+
htmlFor: "new-password",
|
|
100
|
+
className: "ChangePasswordModal__label",
|
|
101
|
+
children: "New Password"
|
|
102
|
+
}), /* @__PURE__ */ e(m, {
|
|
103
|
+
id: "new-password",
|
|
104
|
+
value: n,
|
|
105
|
+
onChange: (s) => f(s),
|
|
106
|
+
placeholder: "Enter new password",
|
|
107
|
+
disabled: r
|
|
108
|
+
})]
|
|
109
|
+
}),
|
|
110
|
+
/* @__PURE__ */ d("div", {
|
|
111
|
+
className: "ChangePasswordModal__field",
|
|
112
|
+
children: [/* @__PURE__ */ e("label", {
|
|
113
|
+
htmlFor: "confirm-password",
|
|
114
|
+
className: "ChangePasswordModal__label",
|
|
115
|
+
children: "Confirm New Password"
|
|
116
|
+
}), /* @__PURE__ */ e(m, {
|
|
117
|
+
id: "confirm-password",
|
|
118
|
+
value: w,
|
|
119
|
+
onChange: (s) => p(s),
|
|
120
|
+
placeholder: "Confirm new password",
|
|
121
|
+
disabled: r
|
|
122
|
+
})]
|
|
123
|
+
}),
|
|
124
|
+
g && /* @__PURE__ */ e("div", {
|
|
125
|
+
className: "ChangePasswordModal__error",
|
|
126
|
+
children: g
|
|
127
|
+
})
|
|
128
|
+
]
|
|
129
|
+
}), h && /* @__PURE__ */ e(T, {
|
|
130
|
+
message: h.message,
|
|
131
|
+
type: h.type,
|
|
132
|
+
onClose: M
|
|
133
|
+
})]
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
export {
|
|
137
|
+
U as ChangePasswordModal
|
|
138
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.LoginPage{background:var(--body-background);min-height:100vh;padding:var(--spacing-24);justify-content:center;align-items:center;display:flex}.LoginPage__card{width:100%;max-width:400px;padding:var(--spacing-48);background:var(--card-background-color);border:1px solid var(--border-color);border-radius:var(--radius);box-shadow:var(--card-box-shadow)}.LoginPage__title{margin:0 0 var(--spacing-32) 0;font-size:var(--font-size-xxl);text-align:center;color:var(--body-title-color);overflow-wrap:break-word;font-weight:600}@media (width<=400px){.LoginPage__card{padding:var(--spacing-24)}.LoginPage__title{font-size:var(--font-size-xl)}}.LoginPage__form{gap:var(--spacing-16);flex-direction:column;display:flex}.LoginPage__hint{font-size:var(--font-size-sm);color:var(--body-sub-title-color);text-align:center;line-height:var(--line-height-normal);margin:0}.LoginPage__error{padding:var(--spacing-12);color:var(--body-danger-color);border:1px solid var(--body-danger-color);border-radius:var(--radius);font-size:var(--font-size-sm);text-align:center;background:#ff5a651a}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import './Login.css';
|
|
2
|
+
import { Button as f } from "../../Button/Button2.js";
|
|
3
|
+
import { Checkbox as b } from "../../Checkbox/Checkbox2.js";
|
|
4
|
+
import { InputText as _ } from "../../InputText/InputText2.js";
|
|
5
|
+
import { InputPassword as V } from "../../InputPassword/InputPassword2.js";
|
|
6
|
+
import { Toast as W } from "../../Toast/Toast2.js";
|
|
7
|
+
import { useAuth as Y } from "../../../hooks/useAuth/useAuth.js";
|
|
8
|
+
/* empty css */
|
|
9
|
+
import { useEffect as L, useState as r } from "react";
|
|
10
|
+
import { Fragment as j, jsx as a, jsxs as c } from "react/jsx-runtime";
|
|
11
|
+
function X({ redirectPath: h = "/" }) {
|
|
12
|
+
const { login: P, verifyMfa: C, config: S, isAuthenticated: g } = Y(), [x, p] = r("credentials"), [l, E] = r(""), [d, N] = r(""), [y, k] = r(!1), [M, T] = r("totp"), [m, u] = r(""), [w, q] = r(!1), [n, i] = r(""), [o, s] = r(!1), [U, v] = r(!1);
|
|
13
|
+
L(() => {
|
|
14
|
+
g && (window.location.href = h);
|
|
15
|
+
}, [g, h]), L(() => {
|
|
16
|
+
if (new URLSearchParams(window.location.search).get("session_expired") === "true") {
|
|
17
|
+
v(!0);
|
|
18
|
+
const e = window.location.pathname;
|
|
19
|
+
window.history.replaceState({}, "", e);
|
|
20
|
+
}
|
|
21
|
+
}, []);
|
|
22
|
+
const D = async (e) => {
|
|
23
|
+
if (e.preventDefault(), i(""), !l || !d) {
|
|
24
|
+
i("Username and password are required");
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
s(!0);
|
|
28
|
+
try {
|
|
29
|
+
const t = await P({
|
|
30
|
+
username: l,
|
|
31
|
+
password: d,
|
|
32
|
+
rememberMe: y
|
|
33
|
+
});
|
|
34
|
+
t.mfaRequired && (T(t.method ?? "totp"), u(""), p("mfa"));
|
|
35
|
+
} catch (t) {
|
|
36
|
+
i(t instanceof Error ? t.message : "Login failed. Please try again.");
|
|
37
|
+
} finally {
|
|
38
|
+
s(!1);
|
|
39
|
+
}
|
|
40
|
+
}, F = async (e) => {
|
|
41
|
+
if (e.preventDefault(), i(""), !m.trim()) {
|
|
42
|
+
i("Enter the verification code");
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
s(!0);
|
|
46
|
+
try {
|
|
47
|
+
await C(m.trim(), w);
|
|
48
|
+
} catch (t) {
|
|
49
|
+
i(t instanceof Error ? t.message : "Verification failed. Please try again.");
|
|
50
|
+
} finally {
|
|
51
|
+
s(!1);
|
|
52
|
+
}
|
|
53
|
+
}, I = () => {
|
|
54
|
+
p("credentials"), u(""), i("");
|
|
55
|
+
}, R = M === "email" ? "Enter the code we emailed you. You can also use a recovery code." : "Enter the code from your authenticator app. You can also use a recovery code.";
|
|
56
|
+
return /* @__PURE__ */ c(j, { children: [/* @__PURE__ */ a("div", {
|
|
57
|
+
className: "LoginPage",
|
|
58
|
+
children: /* @__PURE__ */ c("div", {
|
|
59
|
+
className: "LoginPage__card",
|
|
60
|
+
children: [/* @__PURE__ */ a("h1", {
|
|
61
|
+
className: "LoginPage__title",
|
|
62
|
+
children: S.appName || "Login"
|
|
63
|
+
}), x === "credentials" ? /* @__PURE__ */ c("form", {
|
|
64
|
+
onSubmit: D,
|
|
65
|
+
className: "LoginPage__form",
|
|
66
|
+
children: [
|
|
67
|
+
/* @__PURE__ */ a(_, {
|
|
68
|
+
placeholder: "Username",
|
|
69
|
+
value: l,
|
|
70
|
+
onChange: (e) => E(e),
|
|
71
|
+
required: !0,
|
|
72
|
+
autoFocus: !0,
|
|
73
|
+
disabled: o
|
|
74
|
+
}),
|
|
75
|
+
/* @__PURE__ */ a(V, {
|
|
76
|
+
placeholder: "Password",
|
|
77
|
+
value: d,
|
|
78
|
+
onChange: (e) => N(e),
|
|
79
|
+
required: !0,
|
|
80
|
+
disabled: o
|
|
81
|
+
}),
|
|
82
|
+
/* @__PURE__ */ a(b, {
|
|
83
|
+
checked: y,
|
|
84
|
+
onChange: (e) => k(e),
|
|
85
|
+
label: "Keep me logged in",
|
|
86
|
+
disabled: o
|
|
87
|
+
}),
|
|
88
|
+
n && /* @__PURE__ */ a("div", {
|
|
89
|
+
className: "LoginPage__error",
|
|
90
|
+
children: n
|
|
91
|
+
}),
|
|
92
|
+
/* @__PURE__ */ a(f, {
|
|
93
|
+
type: "submit",
|
|
94
|
+
variant: "info",
|
|
95
|
+
icon: "key",
|
|
96
|
+
loading: o,
|
|
97
|
+
fullWidth: !0,
|
|
98
|
+
children: "Sign In"
|
|
99
|
+
})
|
|
100
|
+
]
|
|
101
|
+
}) : /* @__PURE__ */ c("form", {
|
|
102
|
+
onSubmit: F,
|
|
103
|
+
className: "LoginPage__form",
|
|
104
|
+
children: [
|
|
105
|
+
/* @__PURE__ */ a("p", {
|
|
106
|
+
className: "LoginPage__hint",
|
|
107
|
+
children: R
|
|
108
|
+
}),
|
|
109
|
+
/* @__PURE__ */ a(_, {
|
|
110
|
+
placeholder: "Verification code",
|
|
111
|
+
value: m,
|
|
112
|
+
onChange: (e) => u(e),
|
|
113
|
+
required: !0,
|
|
114
|
+
autoFocus: !0,
|
|
115
|
+
disabled: o
|
|
116
|
+
}),
|
|
117
|
+
/* @__PURE__ */ a(b, {
|
|
118
|
+
checked: w,
|
|
119
|
+
onChange: (e) => q(e),
|
|
120
|
+
label: "Trust this device for 90 days",
|
|
121
|
+
disabled: o
|
|
122
|
+
}),
|
|
123
|
+
n && /* @__PURE__ */ a("div", {
|
|
124
|
+
className: "LoginPage__error",
|
|
125
|
+
children: n
|
|
126
|
+
}),
|
|
127
|
+
/* @__PURE__ */ a(f, {
|
|
128
|
+
type: "submit",
|
|
129
|
+
variant: "info",
|
|
130
|
+
icon: "key",
|
|
131
|
+
loading: o,
|
|
132
|
+
fullWidth: !0,
|
|
133
|
+
children: "Verify"
|
|
134
|
+
}),
|
|
135
|
+
/* @__PURE__ */ a(f, {
|
|
136
|
+
type: "button",
|
|
137
|
+
variant: "default",
|
|
138
|
+
icon: "clear",
|
|
139
|
+
disabled: o,
|
|
140
|
+
fullWidth: !0,
|
|
141
|
+
onClick: I,
|
|
142
|
+
children: "Back"
|
|
143
|
+
})
|
|
144
|
+
]
|
|
145
|
+
})]
|
|
146
|
+
})
|
|
147
|
+
}), U && /* @__PURE__ */ a(W, {
|
|
148
|
+
message: "Your session has expired. Please log in again.",
|
|
149
|
+
type: "warning",
|
|
150
|
+
onClose: () => v(!1)
|
|
151
|
+
})] });
|
|
152
|
+
}
|
|
153
|
+
export {
|
|
154
|
+
X as Login
|
|
155
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.MfaSetupModal{gap:var(--spacing-16);flex-direction:column;display:flex}.MfaSetupModal__section{gap:var(--spacing-12);flex-direction:column;display:flex}.MfaSetupModal__hint{font-size:var(--font-size-sm);color:var(--body-sub-title-color);line-height:var(--line-height-normal);margin:0}.MfaSetupModal__hint--muted{font-size:var(--font-size-xs)}.MfaSetupModal__status{font-size:var(--font-size-md);color:var(--body-title-color);margin:0}.MfaSetupModal__secret{padding:var(--spacing-12);border:1px solid var(--border-color);border-radius:var(--radius);background:var(--card-background-color);font-family:monospace;font-size:var(--font-size-xl);letter-spacing:var(--spacing-2);text-align:center;word-break:break-all;-webkit-user-select:all;user-select:all}.MfaSetupModal__qr{padding:var(--spacing-16);border-radius:var(--radius);background:#fff;justify-content:center;display:flex}.MfaSetupModal__qr svg{display:block}.MfaSetupModal__codes{gap:var(--spacing-8);padding:var(--spacing-12);border:1px solid var(--border-color);border-radius:var(--radius);background:var(--card-background-color);font-family:monospace;font-size:var(--font-size-md);text-align:center;-webkit-user-select:all;user-select:all;grid-template-columns:1fr 1fr;margin:0;list-style:none;display:grid}.MfaSetupModal__error{padding:var(--spacing-12);color:var(--body-danger-color);border:1px solid var(--body-danger-color);border-radius:var(--radius);font-size:var(--font-size-sm);text-align:center}
|
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
import './MfaSetupModal.css';
|
|
2
|
+
import { Button as o } from "../../Button/Button2.js";
|
|
3
|
+
import { Modal as Y } from "../../Modal/Modal2.js";
|
|
4
|
+
import { InputText as U } from "../../InputText/InputText2.js";
|
|
5
|
+
import { InputPassword as j } from "../../InputPassword/InputPassword2.js";
|
|
6
|
+
import { Toast as Z } from "../../Toast/Toast2.js";
|
|
7
|
+
import { useAuth as ee } from "../../../hooks/useAuth/useAuth.js";
|
|
8
|
+
import { QRCodeSVG as ae } from "../../../node_modules/qrcode.react/lib/esm/index.js";
|
|
9
|
+
/* empty css */
|
|
10
|
+
import { useCallback as A, useEffect as te, useState as n } from "react";
|
|
11
|
+
import { Fragment as D, jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
12
|
+
function pe({ isOpen: M, onClose: $ }) {
|
|
13
|
+
const { config: f } = ee(), [x, i] = n("loading"), [C, I] = n(!1), [_, P] = n(null), [V, z] = n(""), [S, G] = n(""), [p, l] = n(""), [m, d] = n(""), [b, v] = n([]), [k, u] = n(""), [a, N] = n(!1), [g, y] = n(null), c = A(async (t, h) => {
|
|
14
|
+
const W = document.cookie.match(/(?:^|;\s*)csrf_token=([^;]+)/), E = W ? decodeURIComponent(W[1]) : null, R = { "Content-Type": "application/json" };
|
|
15
|
+
E && (R["X-CSRF-Token"] = E);
|
|
16
|
+
const F = await fetch(`${f.apiBaseUrl}${t}`, {
|
|
17
|
+
method: "POST",
|
|
18
|
+
credentials: "include",
|
|
19
|
+
headers: R,
|
|
20
|
+
body: h ? JSON.stringify(h) : void 0
|
|
21
|
+
}), B = await F.json().catch(() => ({}));
|
|
22
|
+
if (!F.ok) throw new Error(B.error || "Request failed");
|
|
23
|
+
return B;
|
|
24
|
+
}, [f.apiBaseUrl]), w = A(async () => {
|
|
25
|
+
i("loading"), u("");
|
|
26
|
+
try {
|
|
27
|
+
const t = await (await fetch(`${f.apiBaseUrl}/auth/mfaStatus`, { credentials: "include" })).json();
|
|
28
|
+
I(!!t.enabled), P(t.method ?? null), i("overview");
|
|
29
|
+
} catch {
|
|
30
|
+
u("Could not load MFA status."), i("overview");
|
|
31
|
+
}
|
|
32
|
+
}, [f.apiBaseUrl]);
|
|
33
|
+
te(() => {
|
|
34
|
+
M && (l(""), d(""), u(""), v([]), w());
|
|
35
|
+
}, [M, w]);
|
|
36
|
+
const r = async (t) => {
|
|
37
|
+
N(!0), u("");
|
|
38
|
+
try {
|
|
39
|
+
await t();
|
|
40
|
+
} catch (h) {
|
|
41
|
+
u(h instanceof Error ? h.message : "Something went wrong.");
|
|
42
|
+
} finally {
|
|
43
|
+
N(!1);
|
|
44
|
+
}
|
|
45
|
+
}, q = () => r(async () => {
|
|
46
|
+
const t = await c("/auth/mfaSetupTotp");
|
|
47
|
+
z(t.secret || ""), G(t.otpauthUri || ""), l(""), i("totp-setup");
|
|
48
|
+
}), J = () => r(async () => {
|
|
49
|
+
const t = await c("/auth/mfaConfirmTotp", { code: p.trim() });
|
|
50
|
+
v(t.recoveryCodes || []), i("recovery");
|
|
51
|
+
}), T = () => r(async () => {
|
|
52
|
+
await c("/auth/mfaEnableEmail"), l(""), i("email-setup");
|
|
53
|
+
}), L = () => r(async () => {
|
|
54
|
+
const t = await c("/auth/mfaConfirmEmail", { code: p.trim() });
|
|
55
|
+
v(t.recoveryCodes || []), i("recovery");
|
|
56
|
+
}), O = () => r(async () => {
|
|
57
|
+
await c("/auth/mfaDisable", { password: m }), y({
|
|
58
|
+
message: "Two-factor authentication disabled.",
|
|
59
|
+
type: "success"
|
|
60
|
+
}), d(""), await w();
|
|
61
|
+
}), Q = () => r(async () => {
|
|
62
|
+
const t = await c("/auth/mfaRegenRecovery", { password: m });
|
|
63
|
+
v(t.recoveryCodes || []), d(""), i("recovery");
|
|
64
|
+
}), X = () => r(async () => {
|
|
65
|
+
await c("/auth/mfaForgetDevices"), y({
|
|
66
|
+
message: "All trusted devices have been signed out.",
|
|
67
|
+
type: "success"
|
|
68
|
+
});
|
|
69
|
+
}), H = () => {
|
|
70
|
+
navigator.clipboard?.writeText(b.join(`
|
|
71
|
+
`)), y({
|
|
72
|
+
message: "Recovery codes copied.",
|
|
73
|
+
type: "success"
|
|
74
|
+
});
|
|
75
|
+
}, K = V.replace(/(.{4})/g, "$1 ").trim();
|
|
76
|
+
return /* @__PURE__ */ s(Y, {
|
|
77
|
+
isOpen: M,
|
|
78
|
+
onClose: $,
|
|
79
|
+
title: "Two-factor authentication",
|
|
80
|
+
titleIcon: "key",
|
|
81
|
+
size: "medium",
|
|
82
|
+
children: [/* @__PURE__ */ s("div", {
|
|
83
|
+
className: "MfaSetupModal",
|
|
84
|
+
children: [(() => {
|
|
85
|
+
switch (x) {
|
|
86
|
+
case "loading":
|
|
87
|
+
return /* @__PURE__ */ e("p", {
|
|
88
|
+
className: "MfaSetupModal__hint",
|
|
89
|
+
children: "Loading…"
|
|
90
|
+
});
|
|
91
|
+
case "overview":
|
|
92
|
+
return /* @__PURE__ */ s("div", {
|
|
93
|
+
className: "MfaSetupModal__section",
|
|
94
|
+
children: [/* @__PURE__ */ s("p", {
|
|
95
|
+
className: "MfaSetupModal__status",
|
|
96
|
+
children: ["Status: ", /* @__PURE__ */ e("strong", { children: C ? `Enabled (${_ === "email" ? "email codes" : "authenticator app"})` : "Disabled" })]
|
|
97
|
+
}), C ? /* @__PURE__ */ s(D, { children: [
|
|
98
|
+
/* @__PURE__ */ e(o, {
|
|
99
|
+
variant: "default",
|
|
100
|
+
fullWidth: !0,
|
|
101
|
+
disabled: a,
|
|
102
|
+
onClick: () => i("regen"),
|
|
103
|
+
children: "Regenerate recovery codes"
|
|
104
|
+
}),
|
|
105
|
+
/* @__PURE__ */ e(o, {
|
|
106
|
+
variant: "default",
|
|
107
|
+
fullWidth: !0,
|
|
108
|
+
disabled: a,
|
|
109
|
+
onClick: () => r(X),
|
|
110
|
+
children: "Sign out trusted devices"
|
|
111
|
+
}),
|
|
112
|
+
/* @__PURE__ */ e(o, {
|
|
113
|
+
variant: "danger",
|
|
114
|
+
icon: "lock",
|
|
115
|
+
fullWidth: !0,
|
|
116
|
+
disabled: a,
|
|
117
|
+
onClick: () => i("disable"),
|
|
118
|
+
children: "Disable two-factor"
|
|
119
|
+
})
|
|
120
|
+
] }) : /* @__PURE__ */ s(D, { children: [
|
|
121
|
+
/* @__PURE__ */ e("p", {
|
|
122
|
+
className: "MfaSetupModal__hint",
|
|
123
|
+
children: "Add a second step at sign-in. Choose a method:"
|
|
124
|
+
}),
|
|
125
|
+
/* @__PURE__ */ e(o, {
|
|
126
|
+
variant: "info",
|
|
127
|
+
fullWidth: !0,
|
|
128
|
+
disabled: a,
|
|
129
|
+
onClick: q,
|
|
130
|
+
children: "Set up authenticator app"
|
|
131
|
+
}),
|
|
132
|
+
/* @__PURE__ */ e(o, {
|
|
133
|
+
variant: "default",
|
|
134
|
+
fullWidth: !0,
|
|
135
|
+
disabled: a,
|
|
136
|
+
onClick: T,
|
|
137
|
+
children: "Set up email codes"
|
|
138
|
+
})
|
|
139
|
+
] })]
|
|
140
|
+
});
|
|
141
|
+
case "totp-setup":
|
|
142
|
+
return /* @__PURE__ */ s("div", {
|
|
143
|
+
className: "MfaSetupModal__section",
|
|
144
|
+
children: [
|
|
145
|
+
/* @__PURE__ */ e("p", {
|
|
146
|
+
className: "MfaSetupModal__hint",
|
|
147
|
+
children: "Scan this with your authenticator app (Google Authenticator, Aegis, 1Password…)."
|
|
148
|
+
}),
|
|
149
|
+
S && /* @__PURE__ */ e("div", {
|
|
150
|
+
className: "MfaSetupModal__qr",
|
|
151
|
+
children: /* @__PURE__ */ e(ae, {
|
|
152
|
+
value: S,
|
|
153
|
+
size: 192,
|
|
154
|
+
marginSize: 2
|
|
155
|
+
})
|
|
156
|
+
}),
|
|
157
|
+
/* @__PURE__ */ e("p", {
|
|
158
|
+
className: "MfaSetupModal__hint MfaSetupModal__hint--muted",
|
|
159
|
+
children: "Can’t scan? Choose “Enter a setup key” and type this key (time-based):"
|
|
160
|
+
}),
|
|
161
|
+
/* @__PURE__ */ e("div", {
|
|
162
|
+
className: "MfaSetupModal__secret",
|
|
163
|
+
children: K
|
|
164
|
+
}),
|
|
165
|
+
/* @__PURE__ */ e(U, {
|
|
166
|
+
placeholder: "6-digit code from the app",
|
|
167
|
+
value: p,
|
|
168
|
+
onChange: l,
|
|
169
|
+
autoFocus: !0,
|
|
170
|
+
disabled: a
|
|
171
|
+
}),
|
|
172
|
+
/* @__PURE__ */ e(o, {
|
|
173
|
+
variant: "info",
|
|
174
|
+
icon: "key",
|
|
175
|
+
fullWidth: !0,
|
|
176
|
+
loading: a,
|
|
177
|
+
onClick: J,
|
|
178
|
+
children: "Verify & enable"
|
|
179
|
+
})
|
|
180
|
+
]
|
|
181
|
+
});
|
|
182
|
+
case "email-setup":
|
|
183
|
+
return /* @__PURE__ */ s("div", {
|
|
184
|
+
className: "MfaSetupModal__section",
|
|
185
|
+
children: [
|
|
186
|
+
/* @__PURE__ */ e("p", {
|
|
187
|
+
className: "MfaSetupModal__hint",
|
|
188
|
+
children: "We emailed you a 6-digit code. Enter it below to enable email verification."
|
|
189
|
+
}),
|
|
190
|
+
/* @__PURE__ */ e(U, {
|
|
191
|
+
placeholder: "6-digit code",
|
|
192
|
+
value: p,
|
|
193
|
+
onChange: l,
|
|
194
|
+
autoFocus: !0,
|
|
195
|
+
disabled: a
|
|
196
|
+
}),
|
|
197
|
+
/* @__PURE__ */ e(o, {
|
|
198
|
+
variant: "info",
|
|
199
|
+
icon: "key",
|
|
200
|
+
fullWidth: !0,
|
|
201
|
+
loading: a,
|
|
202
|
+
onClick: L,
|
|
203
|
+
children: "Verify & enable"
|
|
204
|
+
}),
|
|
205
|
+
/* @__PURE__ */ e(o, {
|
|
206
|
+
variant: "default",
|
|
207
|
+
fullWidth: !0,
|
|
208
|
+
disabled: a,
|
|
209
|
+
onClick: T,
|
|
210
|
+
children: "Resend code"
|
|
211
|
+
})
|
|
212
|
+
]
|
|
213
|
+
});
|
|
214
|
+
case "recovery":
|
|
215
|
+
return /* @__PURE__ */ s("div", {
|
|
216
|
+
className: "MfaSetupModal__section",
|
|
217
|
+
children: [
|
|
218
|
+
/* @__PURE__ */ s("p", {
|
|
219
|
+
className: "MfaSetupModal__hint",
|
|
220
|
+
children: [
|
|
221
|
+
"Save these one-time recovery codes somewhere safe. Each works once if you lose access to your",
|
|
222
|
+
" ",
|
|
223
|
+
_ === "email" ? "email" : "authenticator",
|
|
224
|
+
". They are shown only now."
|
|
225
|
+
]
|
|
226
|
+
}),
|
|
227
|
+
/* @__PURE__ */ e("ul", {
|
|
228
|
+
className: "MfaSetupModal__codes",
|
|
229
|
+
children: b.map((t) => /* @__PURE__ */ e("li", { children: t }, t))
|
|
230
|
+
}),
|
|
231
|
+
/* @__PURE__ */ e(o, {
|
|
232
|
+
variant: "default",
|
|
233
|
+
fullWidth: !0,
|
|
234
|
+
disabled: a,
|
|
235
|
+
onClick: H,
|
|
236
|
+
children: "Copy codes"
|
|
237
|
+
}),
|
|
238
|
+
/* @__PURE__ */ e(o, {
|
|
239
|
+
variant: "success",
|
|
240
|
+
fullWidth: !0,
|
|
241
|
+
disabled: a,
|
|
242
|
+
onClick: w,
|
|
243
|
+
children: "I've saved them"
|
|
244
|
+
})
|
|
245
|
+
]
|
|
246
|
+
});
|
|
247
|
+
case "disable":
|
|
248
|
+
return /* @__PURE__ */ s("div", {
|
|
249
|
+
className: "MfaSetupModal__section",
|
|
250
|
+
children: [
|
|
251
|
+
/* @__PURE__ */ e("p", {
|
|
252
|
+
className: "MfaSetupModal__hint",
|
|
253
|
+
children: "Confirm your password to disable two-factor authentication."
|
|
254
|
+
}),
|
|
255
|
+
/* @__PURE__ */ e(j, {
|
|
256
|
+
placeholder: "Current password",
|
|
257
|
+
value: m,
|
|
258
|
+
onChange: d,
|
|
259
|
+
autoFocus: !0,
|
|
260
|
+
disabled: a
|
|
261
|
+
}),
|
|
262
|
+
/* @__PURE__ */ e(o, {
|
|
263
|
+
variant: "danger",
|
|
264
|
+
icon: "lock",
|
|
265
|
+
fullWidth: !0,
|
|
266
|
+
loading: a,
|
|
267
|
+
onClick: O,
|
|
268
|
+
children: "Disable two-factor"
|
|
269
|
+
}),
|
|
270
|
+
/* @__PURE__ */ e(o, {
|
|
271
|
+
variant: "default",
|
|
272
|
+
icon: "clear",
|
|
273
|
+
fullWidth: !0,
|
|
274
|
+
disabled: a,
|
|
275
|
+
onClick: () => i("overview"),
|
|
276
|
+
children: "Cancel"
|
|
277
|
+
})
|
|
278
|
+
]
|
|
279
|
+
});
|
|
280
|
+
case "regen":
|
|
281
|
+
return /* @__PURE__ */ s("div", {
|
|
282
|
+
className: "MfaSetupModal__section",
|
|
283
|
+
children: [
|
|
284
|
+
/* @__PURE__ */ e("p", {
|
|
285
|
+
className: "MfaSetupModal__hint",
|
|
286
|
+
children: "Confirm your password to generate a new set of recovery codes. The old codes stop working."
|
|
287
|
+
}),
|
|
288
|
+
/* @__PURE__ */ e(j, {
|
|
289
|
+
placeholder: "Current password",
|
|
290
|
+
value: m,
|
|
291
|
+
onChange: d,
|
|
292
|
+
autoFocus: !0,
|
|
293
|
+
disabled: a
|
|
294
|
+
}),
|
|
295
|
+
/* @__PURE__ */ e(o, {
|
|
296
|
+
variant: "info",
|
|
297
|
+
icon: "key",
|
|
298
|
+
fullWidth: !0,
|
|
299
|
+
loading: a,
|
|
300
|
+
onClick: Q,
|
|
301
|
+
children: "Generate new codes"
|
|
302
|
+
}),
|
|
303
|
+
/* @__PURE__ */ e(o, {
|
|
304
|
+
variant: "default",
|
|
305
|
+
icon: "clear",
|
|
306
|
+
fullWidth: !0,
|
|
307
|
+
disabled: a,
|
|
308
|
+
onClick: () => i("overview"),
|
|
309
|
+
children: "Cancel"
|
|
310
|
+
})
|
|
311
|
+
]
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
})(), k && /* @__PURE__ */ e("div", {
|
|
315
|
+
className: "MfaSetupModal__error",
|
|
316
|
+
children: k
|
|
317
|
+
})]
|
|
318
|
+
}), g && /* @__PURE__ */ e(Z, {
|
|
319
|
+
message: g.message,
|
|
320
|
+
type: g.type,
|
|
321
|
+
onClose: () => y(null)
|
|
322
|
+
})]
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
export {
|
|
326
|
+
pe as MfaSetupModal
|
|
327
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.avatar-initials{font-family:var(--font-family,sans-serif);font-weight:var(--font-weight-semibold);line-height:var(--line-height-none);-webkit-user-select:none;user-select:none;flex-shrink:0;justify-content:center;align-items:center;display:inline-flex}.avatar-initials--small{width:28px;height:28px;font-size:var(--font-size-xxs)}.avatar-initials--medium{width:40px;height:40px;font-size:var(--font-size-sm)}.avatar-initials--large{width:56px;height:56px;font-size:var(--font-size-md)}.avatar-initials--rounded{border-radius:var(--radius-full)}.avatar-initials--squared{border-radius:var(--radius-sm)}.avatar-initials__text{letter-spacing:.04em;display:block}
|