@stack-spot/portal-layout 0.0.65 → 1.0.0-dev.1768482785050
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/CHANGELOG.md +779 -0
- package/dist/Layout.d.ts +60 -8
- package/dist/Layout.d.ts.map +1 -1
- package/dist/Layout.js +59 -24
- package/dist/Layout.js.map +1 -1
- package/dist/LayoutOverlayManager.d.ts +274 -19
- package/dist/LayoutOverlayManager.d.ts.map +1 -1
- package/dist/LayoutOverlayManager.js +373 -82
- package/dist/LayoutOverlayManager.js.map +1 -1
- package/dist/WelcomeTour.d.ts +2 -0
- package/dist/WelcomeTour.d.ts.map +1 -0
- package/dist/WelcomeTour.js +8 -0
- package/dist/WelcomeTour.js.map +1 -0
- package/dist/components/Backdrop.d.ts +75 -0
- package/dist/components/Backdrop.d.ts.map +1 -0
- package/dist/components/Backdrop.js +69 -0
- package/dist/components/Backdrop.js.map +1 -0
- package/dist/components/Contact/show-contact-modal.d.ts +5 -0
- package/dist/components/Contact/show-contact-modal.d.ts.map +1 -0
- package/dist/components/Contact/show-contact-modal.js +37 -0
- package/dist/components/Contact/show-contact-modal.js.map +1 -0
- package/dist/components/ContactModal.d.ts +1 -0
- package/dist/components/ContactModal.d.ts.map +1 -0
- package/dist/components/ContactModal.js +2 -0
- package/dist/components/ContactModal.js.map +1 -0
- package/dist/components/Dialog.d.ts +54 -7
- package/dist/components/Dialog.d.ts.map +1 -1
- package/dist/components/Dialog.js +8 -2
- package/dist/components/Dialog.js.map +1 -1
- package/dist/components/Header.d.ts +38 -2
- package/dist/components/Header.d.ts.map +1 -1
- package/dist/components/Header.js +9 -4
- package/dist/components/Header.js.map +1 -1
- package/dist/components/NotificationCenter/NotificationPanel.d.ts +3 -0
- package/dist/components/NotificationCenter/NotificationPanel.d.ts.map +1 -0
- package/dist/components/NotificationCenter/NotificationPanel.js +19 -0
- package/dist/components/NotificationCenter/NotificationPanel.js.map +1 -0
- package/dist/components/NotificationCenter/NotificationPanelHeader.d.ts +3 -0
- package/dist/components/NotificationCenter/NotificationPanelHeader.d.ts.map +1 -0
- package/dist/components/NotificationCenter/NotificationPanelHeader.js +16 -0
- package/dist/components/NotificationCenter/NotificationPanelHeader.js.map +1 -0
- package/dist/components/NotificationCenter/NotificationsPanelFooter.d.ts +4 -0
- package/dist/components/NotificationCenter/NotificationsPanelFooter.d.ts.map +1 -0
- package/dist/components/NotificationCenter/NotificationsPanelFooter.js +12 -0
- package/dist/components/NotificationCenter/NotificationsPanelFooter.js.map +1 -0
- package/dist/components/NotificationCenter/dictionary.d.ts +2 -0
- package/dist/components/NotificationCenter/dictionary.d.ts.map +1 -0
- package/dist/components/NotificationCenter/dictionary.js +43 -0
- package/dist/components/NotificationCenter/dictionary.js.map +1 -0
- package/dist/components/NotificationCenter/index.d.ts +2 -0
- package/dist/components/NotificationCenter/index.d.ts.map +1 -0
- package/dist/components/NotificationCenter/index.js +34 -0
- package/dist/components/NotificationCenter/index.js.map +1 -0
- package/dist/components/NotificationCenter/styled.d.ts +3 -0
- package/dist/components/NotificationCenter/styled.d.ts.map +1 -0
- package/dist/components/NotificationCenter/styled.js +74 -0
- package/dist/components/NotificationCenter/styled.js.map +1 -0
- package/dist/components/NotificationCenter/types.d.ts +21 -0
- package/dist/components/NotificationCenter/types.d.ts.map +1 -0
- package/dist/components/NotificationCenter/types.js.map +1 -0
- package/dist/components/NotificationCenter/utils.d.ts +5 -0
- package/dist/components/NotificationCenter/utils.d.ts.map +1 -0
- package/dist/components/NotificationCenter/utils.js +18 -0
- package/dist/components/NotificationCenter/utils.js.map +1 -0
- package/dist/components/OverlayContent.d.ts +27 -1
- package/dist/components/OverlayContent.d.ts.map +1 -1
- package/dist/components/OverlayContent.js +8 -4
- package/dist/components/OverlayContent.js.map +1 -1
- package/dist/components/PortalSwitcher.d.ts +19 -1
- package/dist/components/PortalSwitcher.d.ts.map +1 -1
- package/dist/components/PortalSwitcher.js +16 -31
- package/dist/components/PortalSwitcher.js.map +1 -1
- package/dist/components/PrivacyPolicyMessage/hooks.d.ts +10 -0
- package/dist/components/PrivacyPolicyMessage/hooks.d.ts.map +1 -0
- package/dist/components/PrivacyPolicyMessage/hooks.js +33 -0
- package/dist/components/PrivacyPolicyMessage/hooks.js.map +1 -0
- package/dist/components/PrivacyPolicyMessage/index.d.ts +7 -0
- package/dist/components/PrivacyPolicyMessage/index.d.ts.map +1 -0
- package/dist/components/PrivacyPolicyMessage/index.js +5 -0
- package/dist/components/PrivacyPolicyMessage/index.js.map +1 -0
- package/dist/components/Rate/FeedbackModal.d.ts +8 -0
- package/dist/components/Rate/FeedbackModal.d.ts.map +1 -0
- package/dist/components/Rate/FeedbackModal.js +52 -0
- package/dist/components/Rate/FeedbackModal.js.map +1 -0
- package/dist/components/Rate/hook.d.ts +3 -0
- package/dist/components/Rate/hook.d.ts.map +1 -0
- package/dist/components/Rate/hook.js +48 -0
- package/dist/components/Rate/hook.js.map +1 -0
- package/dist/components/Rate/index.d.ts +10 -0
- package/dist/components/Rate/index.d.ts.map +1 -0
- package/dist/components/Rate/index.js +16 -0
- package/dist/components/Rate/index.js.map +1 -0
- package/dist/components/Rate/on-nps-submit.d.ts +7 -0
- package/dist/components/Rate/on-nps-submit.d.ts.map +1 -0
- package/dist/components/Rate/on-nps-submit.js +8 -0
- package/dist/components/Rate/on-nps-submit.js.map +1 -0
- package/dist/components/Rate/show-rate-us-modals.d.ts +17 -0
- package/dist/components/Rate/show-rate-us-modals.d.ts.map +1 -0
- package/dist/components/Rate/show-rate-us-modals.js +14 -0
- package/dist/components/Rate/show-rate-us-modals.js.map +1 -0
- package/dist/components/Rate/utils.d.ts +2 -0
- package/dist/components/Rate/utils.d.ts.map +1 -0
- package/dist/components/Rate/utils.js +10 -0
- package/dist/components/Rate/utils.js.map +1 -0
- package/dist/components/Toaster.d.ts +35 -0
- package/dist/components/Toaster.d.ts.map +1 -1
- package/dist/components/Toaster.js +32 -4
- package/dist/components/Toaster.js.map +1 -1
- package/dist/components/TypeForm/hook.d.ts +2 -0
- package/dist/components/TypeForm/hook.d.ts.map +1 -0
- package/dist/components/TypeForm/hook.js +11 -0
- package/dist/components/TypeForm/hook.js.map +1 -0
- package/dist/components/TypeForm/index.d.ts +6 -0
- package/dist/components/TypeForm/index.d.ts.map +1 -0
- package/dist/components/TypeForm/index.js +23 -0
- package/dist/components/TypeForm/index.js.map +1 -0
- package/dist/components/TypeForm/show-typeform-modal.d.ts +5 -0
- package/dist/components/TypeForm/show-typeform-modal.d.ts.map +1 -0
- package/dist/components/TypeForm/show-typeform-modal.js +11 -0
- package/dist/components/TypeForm/show-typeform-modal.js.map +1 -0
- package/dist/components/TypeForm/utils.d.ts +2 -0
- package/dist/components/TypeForm/utils.d.ts.map +1 -0
- package/dist/components/TypeForm/utils.js +9 -0
- package/dist/components/TypeForm/utils.js.map +1 -0
- package/dist/components/UserMenu.d.ts +19 -2
- package/dist/components/UserMenu.d.ts.map +1 -1
- package/dist/components/UserMenu.js +12 -6
- package/dist/components/UserMenu.js.map +1 -1
- package/dist/components/error/ErrorBoundary.d.ts +25 -4
- package/dist/components/error/ErrorBoundary.d.ts.map +1 -1
- package/dist/components/error/ErrorBoundary.js +10 -1
- package/dist/components/error/ErrorBoundary.js.map +1 -1
- package/dist/components/error/ErrorManager.d.ts +22 -6
- package/dist/components/error/ErrorManager.d.ts.map +1 -1
- package/dist/components/error/ErrorManager.js +21 -1
- package/dist/components/error/ErrorManager.js.map +1 -1
- package/dist/components/error/SilentErrorBoundary.d.ts +26 -5
- package/dist/components/error/SilentErrorBoundary.d.ts.map +1 -1
- package/dist/components/error/SilentErrorBoundary.js +10 -0
- package/dist/components/error/SilentErrorBoundary.js.map +1 -1
- package/dist/components/menu/MenuContent.d.ts +20 -4
- package/dist/components/menu/MenuContent.d.ts.map +1 -1
- package/dist/components/menu/MenuContent.js +89 -88
- package/dist/components/menu/MenuContent.js.map +1 -1
- package/dist/components/menu/MenuSectionGroup.d.ts +2 -0
- package/dist/components/menu/MenuSectionGroup.d.ts.map +1 -0
- package/dist/components/menu/MenuSectionGroup.js +121 -0
- package/dist/components/menu/MenuSectionGroup.js.map +1 -0
- package/dist/components/menu/MenuSections.d.ts +17 -0
- package/dist/components/menu/MenuSections.d.ts.map +1 -1
- package/dist/components/menu/MenuSections.js +159 -39
- package/dist/components/menu/MenuSections.js.map +1 -1
- package/dist/components/menu/PageSelector.d.ts +5 -0
- package/dist/components/menu/PageSelector.d.ts.map +1 -1
- package/dist/components/menu/PageSelector.js +9 -4
- package/dist/components/menu/PageSelector.js.map +1 -1
- package/dist/components/menu/types.d.ts +219 -8
- package/dist/components/menu/types.d.ts.map +1 -1
- package/dist/components/tour/StepContainer.d.ts +37 -0
- package/dist/components/tour/StepContainer.d.ts.map +1 -0
- package/dist/components/tour/StepContainer.js +51 -0
- package/dist/components/tour/StepContainer.js.map +1 -0
- package/dist/components/tour/StepNavigation.d.ts +29 -0
- package/dist/components/tour/StepNavigation.d.ts.map +1 -0
- package/dist/components/tour/StepNavigation.js +37 -0
- package/dist/components/tour/StepNavigation.js.map +1 -0
- package/dist/components/tour/StepTitle.d.ts +17 -0
- package/dist/components/tour/StepTitle.d.ts.map +1 -0
- package/dist/components/tour/StepTitle.js +10 -0
- package/dist/components/tour/StepTitle.js.map +1 -0
- package/dist/components/tour/hook.d.ts +3 -0
- package/dist/components/tour/hook.d.ts.map +1 -0
- package/dist/components/tour/hook.js +10 -0
- package/dist/components/tour/hook.js.map +1 -0
- package/dist/components/tour/index.d.ts +5 -0
- package/dist/components/tour/index.d.ts.map +1 -0
- package/dist/components/tour/index.js +5 -0
- package/dist/components/tour/index.js.map +1 -0
- package/dist/components/tour/manager.d.ts +34 -0
- package/dist/components/tour/manager.d.ts.map +1 -0
- package/dist/components/tour/manager.js +104 -0
- package/dist/components/tour/manager.js.map +1 -0
- package/dist/components/tour/utils.d.ts +67 -0
- package/dist/components/tour/utils.d.ts.map +1 -0
- package/dist/components/tour/utils.js +60 -0
- package/dist/components/tour/utils.js.map +1 -0
- package/dist/components/user-menu-manager.d.ts +13 -0
- package/dist/components/user-menu-manager.d.ts.map +1 -0
- package/dist/components/user-menu-manager.js +36 -0
- package/dist/components/user-menu-manager.js.map +1 -0
- package/dist/dictionary.d.ts +6 -1
- package/dist/dictionary.d.ts.map +1 -1
- package/dist/dictionary.js +7 -2
- package/dist/dictionary.js.map +1 -1
- package/dist/elements.d.ts +7 -0
- package/dist/elements.d.ts.map +1 -1
- package/dist/elements.js +7 -0
- package/dist/elements.js.map +1 -1
- package/dist/index.d.ts +15 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -8
- package/dist/index.js.map +1 -1
- package/dist/layout.css +190 -35
- package/dist/svg/StarFillWithGradient.d.ts +6 -0
- package/dist/svg/StarFillWithGradient.d.ts.map +1 -0
- package/dist/svg/StarFillWithGradient.js +4 -0
- package/dist/svg/StarFillWithGradient.js.map +1 -0
- package/dist/toaster.d.ts +55 -9
- package/dist/toaster.d.ts.map +1 -1
- package/dist/toaster.js +34 -6
- package/dist/toaster.js.map +1 -1
- package/dist/types.d.ts +5 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/utils.d.ts +6 -69
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +9 -130
- package/dist/utils.js.map +1 -1
- package/package.dev.json +3 -0
- package/package.json +24 -13
- package/package.stg.json +3 -0
- package/readme.md +147 -0
- package/src/Layout.tsx +166 -58
- package/src/LayoutOverlayManager.tsx +499 -85
- package/src/WelcomeTour.tsx +8 -0
- package/src/components/Backdrop.tsx +116 -0
- package/src/components/Contact/show-contact-modal.tsx +71 -0
- package/src/components/Dialog.tsx +58 -9
- package/src/components/Header.tsx +53 -5
- package/src/components/NotificationCenter/NotificationPanel.tsx +40 -0
- package/src/components/NotificationCenter/NotificationPanelHeader.tsx +53 -0
- package/src/components/NotificationCenter/NotificationsPanelFooter.tsx +25 -0
- package/src/components/NotificationCenter/dictionary.ts +44 -0
- package/src/components/NotificationCenter/index.tsx +58 -0
- package/src/components/NotificationCenter/styled.ts +75 -0
- package/src/components/NotificationCenter/types.ts +24 -0
- package/src/components/NotificationCenter/utils.ts +20 -0
- package/src/components/OverlayContent.tsx +40 -5
- package/src/components/PortalSwitcher.tsx +33 -39
- package/src/components/PrivacyPolicyMessage/hooks.tsx +49 -0
- package/src/components/PrivacyPolicyMessage/index.tsx +21 -0
- package/src/components/Rate/FeedbackModal.tsx +86 -0
- package/src/components/Rate/hook.tsx +61 -0
- package/src/components/Rate/index.tsx +36 -0
- package/src/components/Rate/on-nps-submit.ts +18 -0
- package/src/components/Rate/show-rate-us-modals.tsx +29 -0
- package/src/components/Rate/utils.ts +11 -0
- package/src/components/Toaster.tsx +82 -3
- package/src/components/TypeForm/hook.tsx +13 -0
- package/src/components/TypeForm/index.tsx +50 -0
- package/src/components/TypeForm/show-typeform-modal.tsx +10 -0
- package/src/components/TypeForm/utils.ts +8 -0
- package/src/components/UserMenu.tsx +32 -8
- package/src/components/error/ErrorBoundary.tsx +11 -2
- package/src/components/error/ErrorManager.ts +22 -6
- package/src/components/error/SilentErrorBoundary.tsx +12 -2
- package/src/components/menu/MenuContent.tsx +102 -110
- package/src/components/menu/MenuSectionGroup.tsx +121 -0
- package/src/components/menu/MenuSections.tsx +342 -93
- package/src/components/menu/PageSelector.tsx +16 -4
- package/src/components/menu/types.ts +221 -9
- package/src/components/tour/StepContainer.tsx +92 -0
- package/src/components/tour/StepNavigation.tsx +72 -0
- package/src/components/tour/StepTitle.tsx +28 -0
- package/src/components/tour/hook.ts +12 -0
- package/src/components/tour/index.ts +6 -0
- package/src/components/tour/manager.tsx +119 -0
- package/src/components/tour/utils.tsx +119 -0
- package/src/components/user-menu-manager.ts +31 -0
- package/src/dictionary.ts +7 -2
- package/src/elements.ts +7 -0
- package/src/index.ts +15 -8
- package/src/layout.css +190 -35
- package/src/svg/StarFillWithGradient.tsx +14 -0
- package/src/toaster.tsx +90 -13
- package/src/types.ts +4 -0
- package/src/utils.ts +9 -142
- package/dist/components/BottomNotification.d.ts +0 -1
- package/dist/components/BottomNotification.d.ts.map +0 -1
- package/dist/components/BottomNotification.js +0 -2
- package/dist/components/BottomNotification.js.map +0 -1
- package/dist/components/BottomPanel.d.ts +0 -1
- package/dist/components/BottomPanel.d.ts.map +0 -1
- package/dist/components/BottomPanel.js +0 -2
- package/dist/components/BottomPanel.js.map +0 -1
- package/dist/components/SelectionList.d.ts +0 -36
- package/dist/components/SelectionList.d.ts.map +0 -1
- package/dist/components/SelectionList.js +0 -140
- package/dist/components/SelectionList.js.map +0 -1
- package/dist/components/error/ErrorFeedback.d.ts +0 -3
- package/dist/components/error/ErrorFeedback.d.ts.map +0 -1
- package/dist/components/error/ErrorFeedback.js +0 -66
- package/dist/components/error/ErrorFeedback.js.map +0 -1
- package/dist/components/menu/use-check-text-overflow.d.ts +0 -6
- package/dist/components/menu/use-check-text-overflow.d.ts.map +0 -1
- package/dist/components/menu/use-check-text-overflow.js +0 -20
- package/dist/components/menu/use-check-text-overflow.js.map +0 -1
- package/dist/components/menu/use-keyboard-controls.d.ts +0 -23
- package/dist/components/menu/use-keyboard-controls.d.ts.map +0 -1
- package/dist/components/menu/use-keyboard-controls.js +0 -49
- package/dist/components/menu/use-keyboard-controls.js.map +0 -1
- package/dist/components/tour/PortalSwitcherStep.d.ts +0 -3
- package/dist/components/tour/PortalSwitcherStep.d.ts.map +0 -1
- package/dist/components/tour/PortalSwitcherStep.js +0 -29
- package/dist/components/tour/PortalSwitcherStep.js.map +0 -1
- package/dist/components/types.d.ts +0 -15
- package/dist/components/types.d.ts.map +0 -1
- package/dist/components/types.js.map +0 -1
- package/dist/layout-context.d.ts +0 -10
- package/dist/layout-context.d.ts.map +0 -1
- package/dist/layout-context.js +0 -11
- package/dist/layout-context.js.map +0 -1
- package/dist/svg/AI.d.ts +0 -6
- package/dist/svg/AI.d.ts.map +0 -1
- package/dist/svg/AI.js +0 -9
- package/dist/svg/AI.js.map +0 -1
- package/dist/svg/EDP.d.ts +0 -6
- package/dist/svg/EDP.d.ts.map +0 -1
- package/dist/svg/EDP.js +0 -5
- package/dist/svg/EDP.js.map +0 -1
- package/dist/svg/Forbidden.d.ts +0 -6
- package/dist/svg/Forbidden.d.ts.map +0 -1
- package/dist/svg/Forbidden.js +0 -4
- package/dist/svg/Forbidden.js.map +0 -1
- package/dist/svg/HUB.d.ts +0 -6
- package/dist/svg/HUB.d.ts.map +0 -1
- package/dist/svg/HUB.js +0 -5
- package/dist/svg/HUB.js.map +0 -1
- package/dist/svg/Logo.d.ts +0 -2
- package/dist/svg/Logo.d.ts.map +0 -1
- package/dist/svg/Logo.js +0 -4
- package/dist/svg/Logo.js.map +0 -1
- package/dist/svg/NotFound.d.ts +0 -6
- package/dist/svg/NotFound.d.ts.map +0 -1
- package/dist/svg/NotFound.js +0 -4
- package/dist/svg/NotFound.js.map +0 -1
- package/dist/svg/ServerError.d.ts +0 -6
- package/dist/svg/ServerError.d.ts.map +0 -1
- package/dist/svg/ServerError.js +0 -4
- package/dist/svg/ServerError.js.map +0 -1
- package/dist/svg/Unauthenticated.d.ts +0 -6
- package/dist/svg/Unauthenticated.d.ts.map +0 -1
- package/dist/svg/Unauthenticated.js +0 -4
- package/dist/svg/Unauthenticated.js.map +0 -1
- package/src/components/BottomPanel.tsx +0 -0
- package/src/components/SelectionList.tsx +0 -272
- package/src/components/error/ErrorFeedback.tsx +0 -114
- package/src/components/menu/use-check-text-overflow.tsx +0 -26
- package/src/components/menu/use-keyboard-controls.tsx +0 -70
- package/src/components/tour/PortalSwitcherStep.tsx +0 -36
- package/src/components/types.ts +0 -15
- package/src/layout-context.tsx +0 -22
- package/src/svg/AI.tsx +0 -37
- package/src/svg/EDP.tsx +0 -35
- package/src/svg/Forbidden.tsx +0 -22
- package/src/svg/HUB.tsx +0 -35
- package/src/svg/Logo.tsx +0 -35
- package/src/svg/NotFound.tsx +0 -16
- package/src/svg/ServerError.tsx +0 -33
- package/src/svg/Unauthenticated.tsx +0 -16
- /package/dist/components/{types.js → NotificationCenter/types.js} +0 -0
- /package/src/components/{BottomNotification.tsx → ContactModal.tsx} +0 -0
package/src/toaster.tsx
CHANGED
|
@@ -1,30 +1,75 @@
|
|
|
1
1
|
import { IconBox, OneOfColorSchemesWithVariants } from '@citric/core'
|
|
2
2
|
import { CheckCircleFill, ExclamationCircleFill, ExclamationTriangleFill, InfoCircleFill } from '@citric/icons'
|
|
3
|
+
import { Dictionary, translate } from '@stack-spot/portal-translate'
|
|
3
4
|
import { toast } from 'react-toastify'
|
|
4
5
|
import 'react-toastify/dist/ReactToastify.css'
|
|
6
|
+
import { ToasterAction, ToasterContent } from './components/Toaster'
|
|
5
7
|
|
|
6
8
|
type ToastType = 'error' | 'success' | 'warning' | 'info'
|
|
7
9
|
|
|
8
|
-
interface
|
|
10
|
+
interface BaseOptions {
|
|
11
|
+
/**
|
|
12
|
+
* An identifier for the toaster, if not provided, `Math.random()` will be used.
|
|
13
|
+
*
|
|
14
|
+
* The id can be used to programmatically control the toaster.
|
|
15
|
+
*/
|
|
16
|
+
id?: number | string,
|
|
17
|
+
/**
|
|
18
|
+
* The message to show.
|
|
19
|
+
* Can be either a string or a React element.
|
|
20
|
+
*/
|
|
21
|
+
message: React.ReactNode,
|
|
22
|
+
/**
|
|
23
|
+
* Level/severity of this message.
|
|
24
|
+
* @default 'info'
|
|
25
|
+
*/
|
|
9
26
|
type?: ToastType,
|
|
10
27
|
/**
|
|
11
28
|
* Seconds until auto-close or false to not auto-close.
|
|
12
|
-
* @default
|
|
29
|
+
* @default 3s for success toast and 10s for the others
|
|
13
30
|
*/
|
|
14
31
|
autoClose?: number | false,
|
|
32
|
+
/**
|
|
33
|
+
* If true, `message` must be a React Element and none of the default toaster UI is rendered (title, icon and close button).
|
|
34
|
+
* @default false
|
|
35
|
+
*/
|
|
36
|
+
custom?: boolean,
|
|
37
|
+
/**
|
|
38
|
+
* Whether or not to close the toaster when the user clicks it.
|
|
39
|
+
* @default false
|
|
40
|
+
*/
|
|
41
|
+
closeOnClick?: boolean,
|
|
15
42
|
}
|
|
16
43
|
|
|
17
|
-
interface
|
|
18
|
-
|
|
44
|
+
export interface DefaultToasterOptions extends BaseOptions {
|
|
45
|
+
/**
|
|
46
|
+
* The title of the toaster.
|
|
47
|
+
*/
|
|
19
48
|
title?: string,
|
|
49
|
+
/**
|
|
50
|
+
* A function to call when the user clicks the toaster. By default, it closes the toaster.
|
|
51
|
+
*/
|
|
20
52
|
onClick?: () => void,
|
|
53
|
+
/**
|
|
54
|
+
* A set of buttons (or links/anchors) to show after the message.
|
|
55
|
+
*/
|
|
56
|
+
actions?: ToasterAction[],
|
|
57
|
+
custom?: false,
|
|
21
58
|
}
|
|
22
59
|
|
|
23
|
-
interface
|
|
24
|
-
|
|
60
|
+
export interface CustomToasterOptions extends BaseOptions {
|
|
61
|
+
/**
|
|
62
|
+
* The whole content to render inside the toaster.
|
|
63
|
+
*/
|
|
64
|
+
message: React.ReactElement,
|
|
65
|
+
custom: true,
|
|
66
|
+
/**
|
|
67
|
+
* A close button to render on the top right corner of the toaster. If not provided, a close button won't be rendered.
|
|
68
|
+
*/
|
|
69
|
+
closeButton?: React.ReactElement,
|
|
25
70
|
}
|
|
26
71
|
|
|
27
|
-
type
|
|
72
|
+
export type ToasterOptions = DefaultToasterOptions | CustomToasterOptions | React.ReactNode
|
|
28
73
|
|
|
29
74
|
const toasterConfig: Record<ToastType, { element: React.ReactElement, color: string, duration: number }> = {
|
|
30
75
|
error: {
|
|
@@ -49,28 +94,60 @@ const toasterConfig: Record<ToastType, { element: React.ReactElement, color: str
|
|
|
49
94
|
},
|
|
50
95
|
}
|
|
51
96
|
|
|
52
|
-
export function showToaster(
|
|
97
|
+
export function showToaster(defaultToasterConfig: DefaultToasterOptions): number | string
|
|
98
|
+
export function showToaster(customToasterConfig: CustomToasterOptions): number | string
|
|
99
|
+
export function showToaster(message: React.ReactNode): number | string
|
|
100
|
+
export function showToaster(options: ToasterOptions): number | string {
|
|
101
|
+
const isToasterConfig = options && typeof options === 'object' && 'message' in options
|
|
102
|
+
const { type = 'info', autoClose, ...opts }: DefaultToasterOptions | CustomToasterOptions = isToasterConfig
|
|
103
|
+
? options
|
|
104
|
+
: { message: options }
|
|
53
105
|
const config = toasterConfig[type]
|
|
106
|
+
const id = opts.id ?? Math.random()
|
|
54
107
|
const closeTime = autoClose ? autoClose : config.duration
|
|
55
108
|
const bg = `var(--${config.color}-500)`
|
|
56
109
|
const bgDark = `var(--${config.color}-600)`
|
|
57
110
|
const fg = `var(--${config.color}-contrastText)`
|
|
111
|
+
|
|
58
112
|
toast(
|
|
59
|
-
|
|
60
|
-
?
|
|
61
|
-
:
|
|
113
|
+
opts.custom
|
|
114
|
+
? opts.message
|
|
115
|
+
: <ToasterContent {...opts} id={id} title={opts.title ?? translate(dictionary)[type]} />,
|
|
62
116
|
{
|
|
117
|
+
toastId: id,
|
|
63
118
|
type,
|
|
64
119
|
autoClose: autoClose === false ? false : closeTime * 1000,
|
|
65
120
|
className: 'main-toaster',
|
|
66
121
|
style: { backgroundColor: bg, color: fg },
|
|
67
122
|
progressStyle: { background: bgDark },
|
|
68
123
|
bodyClassName: 'toast-body',
|
|
69
|
-
icon:
|
|
124
|
+
icon: opts.custom ? false : () => (
|
|
70
125
|
<IconBox colorIcon={`${config.color}.contrastText` as OneOfColorSchemesWithVariants} size="xs">
|
|
71
126
|
{config.element}
|
|
72
127
|
</IconBox>
|
|
73
|
-
)
|
|
128
|
+
),
|
|
129
|
+
closeOnClick: opts.closeOnClick ?? false,
|
|
130
|
+
closeButton: opts.custom ? (opts.closeButton ?? false) : undefined,
|
|
74
131
|
},
|
|
75
132
|
)
|
|
133
|
+
return id
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export function closeReactToaster(id: number | string) {
|
|
137
|
+
toast.dismiss(id)
|
|
76
138
|
}
|
|
139
|
+
|
|
140
|
+
const dictionary = {
|
|
141
|
+
en: {
|
|
142
|
+
success: 'Success',
|
|
143
|
+
error: 'Error',
|
|
144
|
+
info: 'Info',
|
|
145
|
+
warning: 'Warning',
|
|
146
|
+
},
|
|
147
|
+
pt: {
|
|
148
|
+
success: 'Sucesso',
|
|
149
|
+
error: 'Erro',
|
|
150
|
+
info: 'Info',
|
|
151
|
+
warning: 'Atenção',
|
|
152
|
+
},
|
|
153
|
+
} satisfies Dictionary
|
package/src/types.ts
ADDED
package/src/utils.ts
CHANGED
|
@@ -1,152 +1,19 @@
|
|
|
1
1
|
import { valueOf } from '@stack-spot/portal-theme'
|
|
2
2
|
import { getLayoutElements } from './elements'
|
|
3
3
|
|
|
4
|
-
export function valueOfLayoutVar(varname: string): string {
|
|
5
|
-
const layout = document.getElementById('layout')
|
|
6
|
-
if (!layout) return ''
|
|
7
|
-
return valueOf(varname, layout)
|
|
8
|
-
}
|
|
9
|
-
|
|
10
4
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* Makes it so we focus the next focusable element in the DOM hierarchy, disregarding the element passed as parameter and its children.
|
|
5
|
+
* Gets the value for a css variable of the layout.
|
|
14
6
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* @param current the reference element to focus the next. If not provided, will be the currently active element.
|
|
19
|
-
*/
|
|
20
|
-
export function focusNextIgnoringChildren(current?: HTMLElement | null) {
|
|
21
|
-
current = current ?? document.activeElement as HTMLElement
|
|
22
|
-
while (current && !current.nextElementSibling) {
|
|
23
|
-
current = current?.parentElement
|
|
24
|
-
}
|
|
25
|
-
current = current?.nextElementSibling as HTMLElement
|
|
26
|
-
while (current && current.tabIndex < 0) {
|
|
27
|
-
current = (current.children.length ? current.firstChild : current.nextElementSibling) as HTMLElement
|
|
28
|
-
}
|
|
29
|
-
if (current) current?.focus?.()
|
|
30
|
-
else focusFirstChild(document)
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
type TagPriority = 'a' | 'button' | 'input' | 'textarea' | 'select' | 'other'
|
|
34
|
-
type TagPriorityElement = TagPriority | TagPriority[]
|
|
35
|
-
|
|
36
|
-
interface FocusOptions {
|
|
37
|
-
/**
|
|
38
|
-
* Instead of focusing the first element overall, focus the first according to this list of priorities.
|
|
39
|
-
*/
|
|
40
|
-
priority?: TagPriorityElement[],
|
|
41
|
-
/**
|
|
42
|
-
* Ignores any element that matches this query selector.
|
|
43
|
-
*/
|
|
44
|
-
ignore?: string,
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
const selectors: Record<TagPriority, string> = {
|
|
48
|
-
a: 'a[href]:not(:disabled)',
|
|
49
|
-
button: 'button:not(:disabled)',
|
|
50
|
-
input: 'input:not(:disabled):not([type="hidden"])',
|
|
51
|
-
select: 'textarea:not(:disabled)',
|
|
52
|
-
textarea: 'select:not(:disabled)',
|
|
53
|
-
other: '[tabindex]:not([tabindex="-1"])',
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Checks if an element can receive focus.
|
|
7
|
+
* Supposing the actual name of the variable is name-of-variable, the value passed to the first parameter (varname) may be: name-of-variable
|
|
8
|
+
* or --name-of-variable or var(--name-of-variable). All these formats work.
|
|
58
9
|
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
* - they're visible;
|
|
62
|
-
* - they're not disabled;
|
|
63
|
-
* - they are a focusable tag name or have a positive tab index;
|
|
64
|
-
* - they don't have a negative tab index.
|
|
65
|
-
* @param element the element to check.
|
|
66
|
-
* @returns true if the element is focusable, false otherwise.
|
|
10
|
+
* @param varname the name of css variable.
|
|
11
|
+
* @returns the value of `varname`.
|
|
67
12
|
*/
|
|
68
|
-
export function
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
// is invisible: return false
|
|
73
|
-
if (!element.checkVisibility({ checkOpacity: true, checkVisibilityCSS: true })) return false
|
|
74
|
-
// has tab index: return false if negative, true otherwise
|
|
75
|
-
const tabIndexStr = element.getAttribute('tabindex')
|
|
76
|
-
const tabIndex = tabIndexStr ? parseInt(tabIndexStr) : undefined
|
|
77
|
-
if (tabIndex !== undefined) return tabIndex >= 0
|
|
78
|
-
// check the tag name
|
|
79
|
-
return ['a', 'button', 'input', 'iframe', 'select', 'textarea'].includes(element.tagName.toLowerCase() ?? '')
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Focus the element passed as parameter if it can receive focus. Otherwise, decides on another element to focus based on the HTML tree
|
|
84
|
-
* and accessibility attributes.
|
|
85
|
-
*
|
|
86
|
-
* Decision making:
|
|
87
|
-
* - If the element is focusable, focus it.
|
|
88
|
-
* - If the element is not focusable, check if it has an id and if another element controls it (aria-controls).
|
|
89
|
-
* - If the element is controlled by another, try to focus the controller, based in this same algorithm.
|
|
90
|
-
* - Otherwise, try to focus its parent.
|
|
91
|
-
*
|
|
92
|
-
* If no focusable element is found. Nothing happens.
|
|
93
|
-
* @param element the element to focus.
|
|
94
|
-
*/
|
|
95
|
-
export function focusAccessibleElement(element?: Element | null) {
|
|
96
|
-
let elementToFocus = element as HTMLElement | null | undefined
|
|
97
|
-
while (elementToFocus && !isFocusable(elementToFocus)) {
|
|
98
|
-
const controlledBy = elementToFocus.id ? document.querySelector(`[aria-controls=${elementToFocus.id}]`) : undefined
|
|
99
|
-
elementToFocus = (controlledBy ?? elementToFocus.parentElement) as HTMLElement | null | undefined
|
|
100
|
-
}
|
|
101
|
-
elementToFocus?.focus?.()
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* Focus the first focusable child of the element provided. If the element has no focusable child, nothing happens.
|
|
106
|
-
*
|
|
107
|
-
* A priority list can be passed in the second parameter, as an option. If it's provided, it will focus the first element according to the
|
|
108
|
-
* list.
|
|
109
|
-
*
|
|
110
|
-
* An ignore query selector can also be passed in the options parameter. If the first focusable element matches the query selector, the
|
|
111
|
-
* next element is focused instead.
|
|
112
|
-
*
|
|
113
|
-
* @example
|
|
114
|
-
* Suppose the children of element are: h1, button, p, input, select.
|
|
115
|
-
* 1. We don't pass a priority list. The focused element will be the button.
|
|
116
|
-
* 2. Our priority list is ['button']. The focused element will be the button.
|
|
117
|
-
* 3. Our priority list is ['input', 'button']. The focused element will be the input.
|
|
118
|
-
* 4. Our priority list is ['select', 'input']. The focused element will be the select.
|
|
119
|
-
* 5. Our priority list is [['select', 'input'], 'button']. The focused element will be the input.
|
|
120
|
-
*
|
|
121
|
-
* @param element the element to search a child to focus.
|
|
122
|
-
* @param options optional.
|
|
123
|
-
*/
|
|
124
|
-
export function focusFirstChild(element: HTMLElement | Document | null | undefined, { priority = [], ignore }: FocusOptions = {}) {
|
|
125
|
-
let focusable: NodeListOf<HTMLElement> | null | undefined
|
|
126
|
-
let missing: TagPriority[] = ['a', 'button', 'input', 'other', 'select', 'textarea']
|
|
127
|
-
for (const p of priority) {
|
|
128
|
-
const tags = Array.isArray(p) ? p : [p]
|
|
129
|
-
const querySelectors = tags.map(t => {
|
|
130
|
-
missing = missing.filter(tag => tag != t)
|
|
131
|
-
return selectors[t]
|
|
132
|
-
})
|
|
133
|
-
focusable = element?.querySelectorAll(querySelectors.join(', '))
|
|
134
|
-
if (focusable) break
|
|
135
|
-
}
|
|
136
|
-
if (!focusable) {
|
|
137
|
-
element?.querySelectorAll(missing.map(t => selectors[t]).join(', '))
|
|
138
|
-
}
|
|
139
|
-
let elementToFocus: HTMLElement | undefined
|
|
140
|
-
for (const f of focusable ?? []) {
|
|
141
|
-
if (!ignore || !f.matches(ignore)) {
|
|
142
|
-
const styles = window.getComputedStyle(f)
|
|
143
|
-
if (styles.display != 'none' && styles.visibility != 'hidden') {
|
|
144
|
-
elementToFocus = f
|
|
145
|
-
break
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
elementToFocus?.focus?.()
|
|
13
|
+
export function valueOfLayoutVar(varname: string): string {
|
|
14
|
+
const layout = document.getElementById('layout')
|
|
15
|
+
if (!layout) return ''
|
|
16
|
+
return valueOf(varname, layout)
|
|
150
17
|
}
|
|
151
18
|
|
|
152
19
|
/**
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=BottomNotification.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BottomNotification.d.ts","sourceRoot":"","sources":["../../src/components/BottomNotification.tsx"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BottomNotification.js","sourceRoot":"","sources":["../../src/components/BottomNotification.tsx"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=BottomPanel.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BottomPanel.d.ts","sourceRoot":"","sources":["../../src/components/BottomPanel.tsx"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BottomPanel.js","sourceRoot":"","sources":["../../src/components/BottomPanel.tsx"],"names":[],"mappings":""}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { WithStyle } from '@stack-spot/portal-theme';
|
|
2
|
-
import { ReactElement } from 'react';
|
|
3
|
-
import { Action } from './types.js';
|
|
4
|
-
interface ItemWithIcon {
|
|
5
|
-
icon?: React.ReactElement;
|
|
6
|
-
iconRight?: React.ReactElement;
|
|
7
|
-
}
|
|
8
|
-
export interface ListAction extends ItemWithIcon, Action {
|
|
9
|
-
active?: boolean;
|
|
10
|
-
}
|
|
11
|
-
interface ListGroup {
|
|
12
|
-
type?: 'section' | 'collapsible';
|
|
13
|
-
children: ListItem[];
|
|
14
|
-
}
|
|
15
|
-
interface ListSection extends ListGroup {
|
|
16
|
-
type: 'section';
|
|
17
|
-
label?: string;
|
|
18
|
-
}
|
|
19
|
-
interface ListCollapsible extends ListGroup, ItemWithIcon {
|
|
20
|
-
type?: 'collapsible';
|
|
21
|
-
label: string;
|
|
22
|
-
}
|
|
23
|
-
type ListItem = ListSection | ListCollapsible | ListAction;
|
|
24
|
-
export interface SelectionListProps extends WithStyle {
|
|
25
|
-
id: string;
|
|
26
|
-
visible?: boolean;
|
|
27
|
-
items: ListItem[];
|
|
28
|
-
onHide?: () => void;
|
|
29
|
-
maxHeight?: string;
|
|
30
|
-
before?: ReactElement;
|
|
31
|
-
after?: ReactElement;
|
|
32
|
-
scroll?: boolean;
|
|
33
|
-
}
|
|
34
|
-
export declare const SelectionList: ({ id, items, className, style, visible, maxHeight, onHide, before, after, scroll, }: SelectionListProps) => import("react/jsx-runtime").JSX.Element;
|
|
35
|
-
export {};
|
|
36
|
-
//# sourceMappingURL=SelectionList.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SelectionList.d.ts","sourceRoot":"","sources":["../../src/components/SelectionList.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAsB,MAAM,0BAA0B,CAAA;AAExE,OAAO,EAAE,YAAY,EAA6C,MAAM,OAAO,CAAA;AAI/E,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAEhC,UAAU,YAAY;IACpB,IAAI,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC1B,SAAS,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;CAChC;AAED,MAAM,WAAW,UAAW,SAAQ,YAAY,EAAE,MAAM;IACtD,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,UAAU,SAAS;IACjB,IAAI,CAAC,EAAE,SAAS,GAAG,aAAa,CAAC;IACjC,QAAQ,EAAE,QAAQ,EAAE,CAAC;CACtB;AAED,UAAU,WAAY,SAAQ,SAAS;IACrC,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,eAAgB,SAAQ,SAAS,EAAE,YAAY;IACvD,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,KAAK,QAAQ,GAAG,WAAW,GAAG,eAAe,GAAG,UAAU,CAAA;AAW1D,MAAM,WAAW,kBAAmB,SAAQ,SAAS;IACnD,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAwHD,eAAO,MAAM,aAAa,wFAEvB,kBAAkB,4CAqFpB,CAAA"}
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Flex, IconBox, Text } from '@citric/core';
|
|
3
|
-
import { ArrowLeft, Check, ChevronRight } from '@citric/icons';
|
|
4
|
-
import { IconButton } from '@citric/ui';
|
|
5
|
-
import { listToClass, theme } from '@stack-spot/portal-theme';
|
|
6
|
-
import { useTranslate } from '@stack-spot/portal-translate';
|
|
7
|
-
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
8
|
-
import { styled } from 'styled-components';
|
|
9
|
-
import { useAnchorTag } from '../layout-context.js';
|
|
10
|
-
import { useKeyboardControls } from './menu/use-keyboard-controls.js';
|
|
11
|
-
const ANIMATION_DURATION_MS = 300;
|
|
12
|
-
const MAX_HEIGHT_TRANSITION = `max-height ease-in ${ANIMATION_DURATION_MS / 1000}s`;
|
|
13
|
-
const SelectionBox = styled.div `
|
|
14
|
-
max-height: 0;
|
|
15
|
-
overflow-y: ${({ $scroll }) => $scroll ? 'auto' : 'hidden'};
|
|
16
|
-
overflow-x: hidden;
|
|
17
|
-
transition: ${MAX_HEIGHT_TRANSITION}, visibility 0s ${ANIMATION_DURATION_MS / 1000}s;
|
|
18
|
-
z-index: 1;
|
|
19
|
-
box-shadow: 4px 4px 48px #000;
|
|
20
|
-
border-radius: 0.5rem;
|
|
21
|
-
visibility: hidden;
|
|
22
|
-
|
|
23
|
-
.selection-list-content {
|
|
24
|
-
display: flex;
|
|
25
|
-
flex-direction: column;
|
|
26
|
-
background: ${theme.color.light['500']};
|
|
27
|
-
border-radius: 0.5rem;
|
|
28
|
-
border: 1px solid ${theme.color.light['600']};
|
|
29
|
-
background-color: ${theme.color.light['300']};
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.section-title, li > a {
|
|
33
|
-
height: 40px;
|
|
34
|
-
padding: 0 8px;
|
|
35
|
-
display: flex;
|
|
36
|
-
flex-direction: row;
|
|
37
|
-
align-items: center;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
li > a {
|
|
41
|
-
gap: 4px;
|
|
42
|
-
transition: background-color 0.2s;
|
|
43
|
-
&:hover, &:focus {
|
|
44
|
-
background: ${theme.color.light['400']};
|
|
45
|
-
}
|
|
46
|
-
.label {
|
|
47
|
-
flex: 1;
|
|
48
|
-
white-space: nowrap;
|
|
49
|
-
overflow: hidden;
|
|
50
|
-
text-overflow: ellipsis;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
li.section {
|
|
55
|
-
border-bottom: 2px solid ${theme.color.light['600']};
|
|
56
|
-
&:last-child {
|
|
57
|
-
border-bottom: none;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
&.visible {
|
|
62
|
-
max-height: ${({ $maxHeight }) => $maxHeight};
|
|
63
|
-
visibility: visible;
|
|
64
|
-
transition: ${MAX_HEIGHT_TRANSITION};
|
|
65
|
-
}
|
|
66
|
-
`;
|
|
67
|
-
function renderAction({ label, href, onClick, icon, iconRight, active, target, iconActive = _jsx(Check, {}), }, { onClose, Link }) {
|
|
68
|
-
function handleClick() {
|
|
69
|
-
onClick?.();
|
|
70
|
-
onClose?.();
|
|
71
|
-
}
|
|
72
|
-
const isTextLabel = typeof label === 'string';
|
|
73
|
-
return (_jsx("li", { className: "action", children: _jsxs(Link, { href: href, onClick: handleClick, target: target, tabIndex: 0, "aria-selected": active, children: [icon && _jsx(IconBox, { children: icon }), isTextLabel ? _jsx(Text, { appearance: "body2", className: "label", children: label }) : label.element, iconRight && _jsx(IconBox, { children: iconRight }), active && _jsx(IconBox, { children: iconActive })] }) }, isTextLabel ? label : label.id));
|
|
74
|
-
}
|
|
75
|
-
function renderCollapsible({ label, icon, iconRight, children }, { setCurrent, controllerId, Link }) {
|
|
76
|
-
function handleClick(ev) {
|
|
77
|
-
// accessibility: this will tell the screen reader the section was expanded before this link is removed from the DOM.
|
|
78
|
-
ev.target?.setAttribute?.('aria-expanded', 'true');
|
|
79
|
-
setCurrent({ items: children, label });
|
|
80
|
-
}
|
|
81
|
-
return (_jsx("li", { className: "collapsible", children: _jsxs(Link, { onClick: handleClick, tabIndex: 0, "aria-expanded": false, "aria-controls": controllerId, children: [icon && _jsx(IconBox, { children: icon }), _jsx(Text, { appearance: "body2", className: "label", children: label }), iconRight && _jsx(IconBox, { children: iconRight }), _jsx(IconBox, { children: _jsx(ChevronRight, {}) })] }) }, label));
|
|
82
|
-
}
|
|
83
|
-
function renderSection({ label, children }, options) {
|
|
84
|
-
return (_jsxs("li", { className: "section", children: [label && _jsx(Text, { appearance: "overheader2", colorScheme: "primary", className: "section-title", children: label }), _jsx("ul", { children: children.map(i => renderItem(i, options)) })] }, label ?? children.map(c => c.label).join('-')));
|
|
85
|
-
}
|
|
86
|
-
function renderItem(item, options) {
|
|
87
|
-
if ('children' in item) {
|
|
88
|
-
return item.type === 'section' ? renderSection(item, options) : renderCollapsible(item, options);
|
|
89
|
-
}
|
|
90
|
-
return renderAction(item, options);
|
|
91
|
-
}
|
|
92
|
-
export const SelectionList = ({ id, items, className, style, visible = true, maxHeight = '300px', onHide, before, after, scroll, }) => {
|
|
93
|
-
const Link = useAnchorTag();
|
|
94
|
-
const t = useTranslate(dictionary);
|
|
95
|
-
const [current, setCurrent] = useState({ items });
|
|
96
|
-
const { keyboardControlledElement: wrapper, attachKeyboardListeners, detachKeyboardListeners } = useKeyboardControls({ onPressEscape: onHide, querySelectors: 'li.action a, li.collapsible a, button' });
|
|
97
|
-
const listItems = useMemo(() => current.items.map(i => renderItem(i, {
|
|
98
|
-
setCurrent: (next) => setCurrent({ ...next, parent: current }),
|
|
99
|
-
onClose: onHide,
|
|
100
|
-
controllerId: id,
|
|
101
|
-
Link,
|
|
102
|
-
})), [current]);
|
|
103
|
-
const hide = useCallback((event) => {
|
|
104
|
-
const target = event.target;
|
|
105
|
-
// if the element is not in the DOM anymore, we'll consider the click was inside the selection list
|
|
106
|
-
const isClickInsideSelectionList = !target?.isConnected || wrapper.current?.contains(target);
|
|
107
|
-
const isAction = target?.classList?.contains('action') || !!target?.closest('.action');
|
|
108
|
-
if (!isClickInsideSelectionList || isAction)
|
|
109
|
-
onHide?.();
|
|
110
|
-
}, []);
|
|
111
|
-
useEffect(() => {
|
|
112
|
-
if (visible) {
|
|
113
|
-
setCurrent({ items });
|
|
114
|
-
attachKeyboardListeners();
|
|
115
|
-
if (onHide)
|
|
116
|
-
setTimeout(() => document.addEventListener('click', hide), 50);
|
|
117
|
-
}
|
|
118
|
-
else {
|
|
119
|
-
detachKeyboardListeners();
|
|
120
|
-
document.removeEventListener('click', hide);
|
|
121
|
-
}
|
|
122
|
-
}, [visible]);
|
|
123
|
-
return (_jsx(SelectionBox, { id: id, ref: wrapper, "$maxHeight": maxHeight, style: style, className: listToClass(['selection-list', visible ? 'visible' : undefined, className]), "$scroll": scroll, "aria-hidden": !visible, children: _jsxs("div", { className: "selection-list-content", children: [before, current.parent
|
|
124
|
-
? (_jsxs(Flex, { mt: 5, mb: 1, alignItems: "center", children: [_jsx(IconButton, { onClick: (ev) => {
|
|
125
|
-
// accessibility: this will tell the screen reader the section was collapsed before this button is removed from the DOM.
|
|
126
|
-
ev.target?.setAttribute?.('aria-expanded', 'false');
|
|
127
|
-
setCurrent(current.parent ?? { items });
|
|
128
|
-
}, sx: { mr: 3 }, title: t.back, "aria-controls": id, "aria-expanded": true, children: _jsx(ArrowLeft, {}) }), _jsx(Text, { appearance: "microtext1", children: current.label })] }))
|
|
129
|
-
: undefined, _jsxs("ul", { children: [listItems, after &&
|
|
130
|
-
_jsx("li", { className: "action", children: after })] })] }) }));
|
|
131
|
-
};
|
|
132
|
-
const dictionary = {
|
|
133
|
-
en: {
|
|
134
|
-
back: 'Go back',
|
|
135
|
-
},
|
|
136
|
-
pt: {
|
|
137
|
-
back: 'Voltar',
|
|
138
|
-
},
|
|
139
|
-
};
|
|
140
|
-
//# sourceMappingURL=SelectionList.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SelectionList.js","sourceRoot":"","sources":["../../src/components/SelectionList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AACvC,OAAO,EAAa,WAAW,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAA;AACxE,OAAO,EAAc,YAAY,EAAE,MAAM,8BAA8B,CAAA;AACvE,OAAO,EAAgB,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC/E,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAC1C,OAAO,EAAmB,YAAY,EAAE,MAAM,mBAAmB,CAAA;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAA;AAmClE,MAAM,qBAAqB,GAAG,GAAG,CAAA;AACjC,MAAM,qBAAqB,GAAG,sBAAsB,qBAAqB,GAAG,IAAI,GAAG,CAAA;AAoBnF,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAA2C;;gBAE1D,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,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,EAAE,MAAM,gBAAgB,CAAA;AAajD,eAAO,MAAM,aAAa,6BAAkC,gBAAgB,4CAgD3E,CAAA"}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Box, Button, Container, Flex, LinkBox, Text } from '@citric/core';
|
|
3
|
-
import { useTranslate } from '@stack-spot/portal-translate';
|
|
4
|
-
import { useState } from 'react';
|
|
5
|
-
import { Forbidden } from '../../svg/Forbidden.js';
|
|
6
|
-
import { Logo } from '../../svg/Logo.js';
|
|
7
|
-
import { NotFound } from '../../svg/NotFound.js';
|
|
8
|
-
import { ServerError } from '../../svg/ServerError.js';
|
|
9
|
-
import { Unauthenticated } from '../../svg/Unauthenticated.js';
|
|
10
|
-
const imageStyle = {
|
|
11
|
-
width: '200px',
|
|
12
|
-
height: '200px',
|
|
13
|
-
};
|
|
14
|
-
const imageMap = {
|
|
15
|
-
401: _jsx(Unauthenticated, { style: imageStyle }),
|
|
16
|
-
403: _jsx(Forbidden, { style: imageStyle }),
|
|
17
|
-
404: _jsx(NotFound, { style: imageStyle }),
|
|
18
|
-
};
|
|
19
|
-
export const ErrorFeedback = ({ code = 0, message, debug }) => {
|
|
20
|
-
const t = useTranslate(dictionary);
|
|
21
|
-
const [showDetails, setShowDetails] = useState(false);
|
|
22
|
-
return (_jsx(Box, { bg: "light.400", children: _jsx(Container, { children: _jsxs(Flex, { alignItems: "center", sx: { padding: 12 }, children: [_jsx(Box, { width: 5, sx: { display: ['block', 'none'] }, children: _jsx(Flex, { justifyContent: "flex-end", pr: 20, children: imageMap[code] ?? _jsx(ServerError, { style: imageStyle }) }) }), _jsxs(Box, { width: [7, 12], children: [_jsx(LinkBox, { href: "/", children: _jsx(Logo, { style: { width: '130px', height: '30px' } }) }), _jsxs(Box, { w: [7, 12], children: [_jsxs(Text, { appearance: "h4", mt: 5, colorScheme: "inverse", children: [code ? `${code}. ` : '', _jsx(Text, { appearance: "h4", as: "span", colorScheme: "light.700", children: t[`${code}.title`] })] }), _jsx(Text, { appearance: "body1", mt: 5, colorScheme: "inverse", children: t[`${code}.description`] }), _jsx(Text, { appearance: "body1", colorScheme: "light.700", mt: 1, children: t[`${code}.help`] }), debug && message && (_jsx(Button, { appearance: "outlined", colorScheme: "inverse", onClick: () => setShowDetails(v => !v), children: showDetails ? t.hideDetails : t.showDetails })), showDetails && (_jsx(Box, { bg: "danger", mt: 8, p: 4, sx: { borderRadius: '5px' }, children: _jsx(Text, { appearance: "microtext1", colorScheme: "danger.contrastText", children: message }) }))] })] })] }) }) }));
|
|
23
|
-
};
|
|
24
|
-
const dictionary = {
|
|
25
|
-
en: {
|
|
26
|
-
altLogo: 'Logo Stackspot',
|
|
27
|
-
'0.title': 'Unknown client error',
|
|
28
|
-
'0.description': 'An unknown error happened while trying to load the resource.',
|
|
29
|
-
'0.help': 'Reload the page and, if it still doesn\'t work, report the error the Stackspot team.',
|
|
30
|
-
'401.title': 'Not authorized',
|
|
31
|
-
'401.description': 'There was a failure loading credentials for this page.',
|
|
32
|
-
'401.help': 'Check if the URL is correct or clear your cache and cookies from your browser and try again.',
|
|
33
|
-
'403.title': 'Private access',
|
|
34
|
-
'403.description': 'The page you have tried to visit is private.',
|
|
35
|
-
'403.help': 'Log in with another account or request access from the person who manages your organization.',
|
|
36
|
-
'404.title': 'Resource not found',
|
|
37
|
-
'404.description': 'This resource no longer exists.',
|
|
38
|
-
'404.help': 'Please try again or request a new URL from the person who manages your organization.',
|
|
39
|
-
'500.title': 'Server error',
|
|
40
|
-
'500.description': "We have identified a problem with the server, but don't worry. We are already investigating what happened.",
|
|
41
|
-
'500.help': 'Please try again after a few minutes.',
|
|
42
|
-
showDetails: 'Show Details',
|
|
43
|
-
hideDetails: 'Hide Details',
|
|
44
|
-
},
|
|
45
|
-
pt: {
|
|
46
|
-
altLogo: 'Logo Stackspot',
|
|
47
|
-
'0.title': 'Erro desconhecido (cliente)',
|
|
48
|
-
'0.description': 'Um erro desconhecido aconteceu ao carregar o recurso',
|
|
49
|
-
'0.help': 'Recarregue a página e, se ainda não funcionar, reporte o problema para o time da Stackspot.',
|
|
50
|
-
'401.title': 'Não autorizado',
|
|
51
|
-
'401.description': 'Houve uma falha no carregamento de credenciais dessa página.',
|
|
52
|
-
'401.help': 'Verifique se a URL está correta ou limpe o cache e os cookies de seu navegador e tente novamente.',
|
|
53
|
-
'403.title': 'Acesso privado',
|
|
54
|
-
'403.description': '"A página que você tentou visualizar é particular."',
|
|
55
|
-
'403.help': 'Solicite acesso com o administrador da sua organização.',
|
|
56
|
-
'404.title': 'Recurso não encontrado',
|
|
57
|
-
'404.description': 'Este recurso não existe mais.',
|
|
58
|
-
'404.help': 'Tente novamente ou fale com o administrador da sua organização.',
|
|
59
|
-
'500.title': 'Erro ao exibir o recurso',
|
|
60
|
-
'500.description': 'Mas não se preocupe, já estamos investigando o que aconteceu.',
|
|
61
|
-
'500.help': 'Tente novamente após alguns minutos.',
|
|
62
|
-
showDetails: 'Ver Detalhes',
|
|
63
|
-
hideDetails: 'Esconder Detalhes',
|
|
64
|
-
},
|
|
65
|
-
};
|
|
66
|
-
//# sourceMappingURL=ErrorFeedback.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorFeedback.js","sourceRoot":"","sources":["../../../src/components/error/ErrorFeedback.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC1E,OAAO,EAAc,YAAY,EAAE,MAAM,8BAA8B,CAAA;AACvE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAC7C,O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,CACP,IACG,IACF,IACD,GACG,GACR,CACP,CAAA;AACH,CAAC,CAAA;AAED,MAAM,UAAU,GAAG;IACjB,EAAE,EAAE;QACF,OAAO,EAAE,gBAAgB;QACzB,SAAS,EAAE,sBAAsB;QACjC,eAAe,EAAE,8DAA8D;QAC/E,QAAQ,EAAE,sFAAsF;QAChG,WAAW,EAAE,gBAAgB;QAC7B,iBAAiB,EAAE,wDAAwD;QAC3E,UAAU,EAAE,8FAA8F;QAC1G,WAAW,EAAE,gBAAgB;QAC7B,iBAAiB,EAAE,8CAA8C;QACjE,UAAU,EAAE,8FAA8F;QAC1G,WAAW,EAAE,oBAAoB;QACjC,iBAAiB,EAAE,iCAAiC;QACpD,UAAU,EAAE,sFAAsF;QAClG,WAAW,EAAE,cAAc;QAC3B,iBAAiB,EACf,4GAA4G;QAC9G,UAAU,EAAE,uCAAuC;QACnD,WAAW,EAAE,cAAc;QAC3B,WAAW,EAAE,cAAc;KAC5B;IACD,EAAE,EAAE;QACF,OAAO,EAAE,gBAAgB;QACzB,SAAS,EAAE,6BAA6B;QACxC,eAAe,EAAE,sDAAsD;QACvE,QAAQ,EAAE,6FAA6F;QACvG,WAAW,EAAE,gBAAgB;QAC7B,iBAAiB,EAAE,8DAA8D;QACjF,UAAU,EAAE,mGAAmG;QAC/G,WAAW,EAAE,gBAAgB;QAC7B,iBAAiB,EAAE,qDAAqD;QACxE,UAAU,EAAE,yDAAyD;QACrE,WAAW,EAAE,wBAAwB;QACrC,iBAAiB,EAAE,+BAA+B;QAClD,UAAU,EAAE,iEAAiE;QAC7E,WAAW,EAAE,0BAA0B;QACvC,iBAAiB,EAAE,+DAA+D;QAClF,UAAU,EAAE,sCAAsC;QAClD,WAAW,EAAE,cAAc;QAC3B,WAAW,EAAE,mBAAmB;KACjC;CACmB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-check-text-overflow.d.ts","sourceRoot":"","sources":["../../../src/components/menu/use-check-text-overflow.tsx"],"names":[],"mappings":";AAEA,wBAAgB,oBAAoB;;;EAuBnC"}
|