@stack-spot/portal-layout 2.7.0 → 2.9.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/CHANGELOG.md +14 -0
- package/dist/LayoutOverlayManager.d.ts +4 -5
- package/dist/LayoutOverlayManager.d.ts.map +1 -1
- package/dist/LayoutOverlayManager.js.map +1 -1
- package/dist/components/Backdrop.d.ts +67 -1
- package/dist/components/Backdrop.d.ts.map +1 -1
- package/dist/components/Backdrop.js +60 -9
- package/dist/components/Backdrop.js.map +1 -1
- package/dist/components/Contact/show-contact-modal.d.ts +5 -2
- package/dist/components/Contact/show-contact-modal.d.ts.map +1 -1
- package/dist/components/Contact/show-contact-modal.js +15 -15
- package/dist/components/Contact/show-contact-modal.js.map +1 -1
- package/dist/components/NotificationCenter/NotificationPanel.js +1 -1
- package/dist/components/NotificationCenter/NotificationPanel.js.map +1 -1
- package/dist/components/NotificationCenter/styled.d.ts +1 -1
- package/dist/components/NotificationCenter/styled.d.ts.map +1 -1
- package/dist/components/PortalSwitcher.d.ts +1 -1
- package/dist/components/PortalSwitcher.d.ts.map +1 -1
- package/dist/components/PortalSwitcher.js +3 -22
- package/dist/components/PortalSwitcher.js.map +1 -1
- package/dist/components/Rate/hook.d.ts +2 -1
- package/dist/components/Rate/hook.d.ts.map +1 -1
- package/dist/components/Rate/hook.js +7 -19
- package/dist/components/Rate/hook.js.map +1 -1
- package/dist/components/Rate/on-nps-submit.js +1 -1
- package/dist/components/Rate/on-nps-submit.js.map +1 -1
- package/dist/components/menu/MenuSections.d.ts.map +1 -1
- package/dist/components/menu/MenuSections.js +24 -3
- package/dist/components/menu/MenuSections.js.map +1 -1
- package/dist/components/menu/types.d.ts +25 -0
- package/dist/components/menu/types.d.ts.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/layout.css +60 -12
- 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/types.d.ts +5 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js.map +1 -0
- package/package.json +1 -1
- package/src/LayoutOverlayManager.tsx +4 -5
- package/src/components/Backdrop.tsx +91 -7
- package/src/components/Contact/show-contact-modal.tsx +15 -18
- package/src/components/NotificationCenter/NotificationPanel.tsx +1 -1
- package/src/components/PortalSwitcher.tsx +4 -29
- package/src/components/Rate/hook.tsx +7 -20
- package/src/components/Rate/on-nps-submit.ts +1 -1
- package/src/components/menu/MenuSections.tsx +47 -12
- package/src/components/menu/types.ts +25 -0
- package/src/index.ts +3 -3
- package/src/layout.css +60 -12
- package/src/svg/StarFillWithGradient.tsx +14 -0
- package/src/types.ts +4 -0
- package/dist/components/Contact/ContactPopover.d.ts +0 -2
- package/dist/components/Contact/ContactPopover.d.ts.map +0 -1
- package/dist/components/Contact/ContactPopover.js +0 -44
- package/dist/components/Contact/ContactPopover.js.map +0 -1
- package/dist/components/types.d.ts +0 -2
- package/dist/components/types.d.ts.map +0 -1
- package/dist/components/types.js.map +0 -1
- package/src/components/Contact/ContactPopover.tsx +0 -63
- package/src/components/types.ts +0 -1
- /package/dist/{components/types.js → types.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuSections.d.ts","sourceRoot":"","sources":["../../../src/components/menu/MenuSections.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MenuSections.d.ts","sourceRoot":"","sources":["../../../src/components/menu/MenuSections.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,SAAS,EAAe,MAAM,SAAS,CAAA;AAwChD;;GAEG;AACH,wBAAgB,sBAAsB,SAOrC;AA8ID;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,YAAY,2BAAiC,SAAS,4CAsGlE,CAAA"}
|
|
@@ -4,8 +4,10 @@ import { ChevronRight, Cog, Collapse, Expand, Support } from '@citric/icons';
|
|
|
4
4
|
import { useKeyboardControls } from '@stack-spot/portal-components';
|
|
5
5
|
import { useAnchorTag } from '@stack-spot/portal-components/anchor';
|
|
6
6
|
import { interpolate, useTranslate } from '@stack-spot/portal-translate';
|
|
7
|
-
import { useCallback, useMemo, useState } from 'react';
|
|
7
|
+
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
8
8
|
import { elementIds, getLayoutElements } from '../../elements.js';
|
|
9
|
+
import { StarFillWithGradient } from '../../svg/StarFillWithGradient.js';
|
|
10
|
+
import { isLessThan30Days } from '../Rate/hook.js';
|
|
9
11
|
import { MenuContent } from './MenuContent.js';
|
|
10
12
|
/**
|
|
11
13
|
* Amount of time to wait before hiding the menu overlay once the mouse leaves its area.
|
|
@@ -210,10 +212,25 @@ export const MenuSections = ({ sections = [], ...props }) => {
|
|
|
210
212
|
? _jsx(OverlayRenderer, { content: props.content, customContent: props.customContent }, 'contentKey' in props ? props.contentKey : undefined)
|
|
211
213
|
: _jsx(OverlayRenderer, { content: sections[currentOverlay].content, customContent: sections[currentOverlay].customContent }, currentOverlay);
|
|
212
214
|
}
|
|
213
|
-
return (_jsxs(_Fragment, { children: [_jsx("ul", { role: "menu", children: sectionItems }), _jsxs(Flex, { mb: 7, alignItems: "center", children: [(props.
|
|
214
|
-
_jsxs("button", { role: "menuitem", className: "toggle sections-footer", onClick: props.contactUs?.onClick, ...(props.contactUs.active ? { 'aria-current': 'page' } : undefined), children: [_jsx(IconBox, { "aria-label": t.contactIcon, children: _jsx(Support, {}) }), _jsx(Text, { appearance: "microtext1", ml: 8, sx: { marginTop: '3px' }, className: "collapse", colorScheme: "light.contrastText", children: t.contactUs })] }), _jsxs("button", { role: "menuitem", className: "toggle sections-footer", onClick: () => toggleMenu(!!props.content || !!props.customContent), title: t.toggle, tabIndex: -1, children: [_jsxs(IconBox, { children: [_jsx(Expand, { className: "expand" }), _jsx(Collapse, { className: "collapse" })] }), _jsx(Text, { appearance: "microtext1", ml: 8, className: "collapse", colorScheme: "light.contrastText", children: t.hide })] }), (props.settings?.show) &&
|
|
215
|
+
return (_jsxs(_Fragment, { children: [_jsx("ul", { role: "menu", children: sectionItems }), _jsxs(Flex, { mb: 7, alignItems: "center", children: [_jsx(RateAndContactUsItem, { ...props }), _jsxs("button", { role: "menuitem", className: "toggle sections-footer", onClick: () => toggleMenu(!!props.content || !!props.customContent), title: t.toggle, tabIndex: -1, children: [_jsxs(IconBox, { children: [_jsx(Expand, { className: "expand" }), _jsx(Collapse, { className: "collapse" })] }), _jsx(Text, { appearance: "microtext1", ml: 8, className: "collapse", colorScheme: "light.contrastText", children: t.hide })] }), (props.settings?.show) &&
|
|
215
216
|
_jsxs(Link, { href: props.settings?.href, onClick: props.settings?.onClick, className: "sections-footer toggle", ...(props.settings.active ? { 'aria-current': 'page' } : undefined), children: [_jsx(IconBox, { "aria-label": t.settingsIcon, children: _jsx(Cog, {}) }), _jsx(Text, { appearance: "microtext1", ml: 8, className: "collapse", children: t.settings })] })] }), _jsx("div", { id: MENU_OVERLAY_ID, onMouseEnter: showOverlay, onMouseLeave: hideOverlay, ref: overlayRef, children: renderMenuOverlay() })] }));
|
|
216
217
|
};
|
|
218
|
+
const RateAndContactUsItem = ({ ...props }) => {
|
|
219
|
+
const t = useTranslate(dictionary);
|
|
220
|
+
const alreadyAnswered = localStorage.getItem('RATED_US_IN');
|
|
221
|
+
const hasAnsweredLess30Days = alreadyAnswered ? isLessThan30Days(new Date(+alreadyAnswered), new Date(Date.now())) : false;
|
|
222
|
+
//This effect is only used to remove from local storage unused keys from
|
|
223
|
+
//previous rate us and contact us versions. We do not want to fill the users storage
|
|
224
|
+
//with things that are not used anymore.
|
|
225
|
+
useEffect(() => {
|
|
226
|
+
localStorage.removeItem('CONTACT_POPOVER');
|
|
227
|
+
localStorage.removeItem('RATE_POPOVER');
|
|
228
|
+
localStorage.removeItem('viewNpsItem');
|
|
229
|
+
}, []);
|
|
230
|
+
return _jsxs(_Fragment, { children: [(props.rateUs?.show && !hasAnsweredLess30Days) &&
|
|
231
|
+
_jsxs("button", { role: "menuitem", className: "toggle sections-footer", onClick: props.rateUs?.onClick, ...(props.rateUs.active ? { 'aria-current': 'page' } : undefined), children: [_jsx(IconBox, { "aria-label": t.rateUsIcon, sx: { paddingTop: '2px' }, children: _jsx(StarFillWithGradient, { id: "svg-icon", className: "gradient-svg rotate-icon" }) }), _jsx(Text, { appearance: "microtext1", ml: 8, sx: { marginTop: '3px' }, className: "collapse gradient grow-shrink", colorScheme: "light.contrastText", children: t.rateUs })] }), (props.contactUs?.show) &&
|
|
232
|
+
_jsxs("button", { role: "menuitem", className: "toggle sections-footer", onClick: props.contactUs?.onClick, ...(props.contactUs.active ? { 'aria-current': 'page' } : undefined), children: [_jsx(IconBox, { "aria-label": t.contactIcon, children: _jsx(Support, {}) }), _jsx(Text, { appearance: "microtext1", ml: 8, sx: { marginTop: '3px' }, className: "collapse", colorScheme: "light.contrastText", children: t.contactUs })] })] });
|
|
233
|
+
};
|
|
217
234
|
const dictionary = {
|
|
218
235
|
en: {
|
|
219
236
|
toggle: 'Show or hide the menu',
|
|
@@ -223,6 +240,8 @@ const dictionary = {
|
|
|
223
240
|
hide: 'Hide',
|
|
224
241
|
contactUs: 'Contact us',
|
|
225
242
|
contactIcon: 'Contact icon',
|
|
243
|
+
rateUs: 'Rate us',
|
|
244
|
+
rateUsIcon: 'Rate us icon',
|
|
226
245
|
},
|
|
227
246
|
pt: {
|
|
228
247
|
toggle: 'Visualizar ou esconder o menu',
|
|
@@ -232,6 +251,8 @@ const dictionary = {
|
|
|
232
251
|
hide: 'Esconder',
|
|
233
252
|
contactUs: 'Fale conosco',
|
|
234
253
|
contactIcon: 'Ícone de contato',
|
|
254
|
+
rateUs: 'Avalie-nos',
|
|
255
|
+
rateUsIcon: 'Avalie-nos icon',
|
|
235
256
|
},
|
|
236
257
|
};
|
|
237
258
|
//# sourceMappingURL=MenuSections.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AAE,kBAAkB;QAC/B,MAAM,EAAE,YAAY;QACpB,UAAU,EAAE,iBAAiB;KAC9B;CACmB,CAAA"}
|
|
@@ -173,6 +173,31 @@ interface BaseMenuProps {
|
|
|
173
173
|
/**
|
|
174
174
|
* Options for the rate button.
|
|
175
175
|
*/
|
|
176
|
+
rateUs?: {
|
|
177
|
+
/**
|
|
178
|
+
* Whether or not to show the rate button.
|
|
179
|
+
*/
|
|
180
|
+
show?: boolean;
|
|
181
|
+
/**
|
|
182
|
+
* A function to call when the button is clicked.
|
|
183
|
+
*/
|
|
184
|
+
onClick?: () => void;
|
|
185
|
+
/**
|
|
186
|
+
* A url to go to when the button is clicked.
|
|
187
|
+
*/
|
|
188
|
+
href?: string;
|
|
189
|
+
/**
|
|
190
|
+
* Whether or not this button represents the page currently active.
|
|
191
|
+
*/
|
|
192
|
+
active?: boolean;
|
|
193
|
+
/**
|
|
194
|
+
* A css class to pass to the button.
|
|
195
|
+
*/
|
|
196
|
+
className?: string;
|
|
197
|
+
};
|
|
198
|
+
/**
|
|
199
|
+
* Options for the contact us button.
|
|
200
|
+
*/
|
|
176
201
|
contactUs?: {
|
|
177
202
|
/**
|
|
178
203
|
* Whether or not to show the rate button.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/menu/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,6CAA6C,CAAA;AACpE,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAE/C,UAAU,YAAY;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC1B;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC3B;;;OAGG;IACH,QAAQ,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;CAC3C;AAED,MA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rB;;WAEG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;QACd;;WAEG;QACH,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB;;WAEG;QACH,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IACF;;OAEG;IACH,MAAM,CAAC,EAAE;QACP;;WAEG;QACH,IAAI,CAAC,EAAE,OAAO,CAAC;QACf;;WAEG;QACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;QACrB;;WAEG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;QACd;;WAEG;QACH,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB;;WAEG;QACH,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IACF;;OAEG;IACH,SAAS,CAAC,EAAE;QACV;;WAEG;QACH,IAAI,CAAC,EAAE,OAAO,CAAC;QACf;;WAEG;QACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;QACrB;;WAEG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;QACd;;WAEG;QACH,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB;;WAEG;QACH,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACH;AAED,MAAM,WAAW,0BAA2B,SAAQ,aAAa;IAC/D;;OAEG;IACH,OAAO,CAAC,EAAE,kBAAkB,CAAC;CAC9B;AAED,MAAM,WAAW,2BAA4B,SAAQ,aAAa;IAChE;;;;;OAKG;IACH,OAAO,EAAE,kBAAkB,GAAG,CAAC,MAAM,kBAAkB,CAAC,CAAC;IACzD;;OAEG;IACH,UAAU,EAAE,KAAK,CAAC,GAAG,CAAC;CACvB;AAED,MAAM,MAAM,SAAS,GAAG,0BAA0B,GAAG,2BAA2B,CAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export { Backdrop } from './components/Backdrop.js';
|
|
2
|
+
export { showContactUsModal, showRateUsModal } from './components/Contact/show-contact-modal.js';
|
|
1
3
|
export { Dialog } from './components/Dialog.js';
|
|
2
4
|
export { Header, HeaderProps } from './components/Header.js';
|
|
3
5
|
export { ActionItem, MenuContent, MenuGroup, Title } from './components/menu/MenuContent.js';
|
|
@@ -8,13 +10,11 @@ export { PortalSwitcher } from './components/PortalSwitcher.js';
|
|
|
8
10
|
export { RateComponent } from './components/Rate/index.js';
|
|
9
11
|
export { useRatingEffect } from './components/Rate/hook.js';
|
|
10
12
|
export { showRatingModal } from './components/Rate/show-rating-modal.js';
|
|
11
|
-
export { showContactUsModal } from './components/Contact/show-contact-modal.js';
|
|
12
|
-
export { ContactPopover } from './components/Contact/ContactPopover.js';
|
|
13
13
|
export * from './components/tour/index.js';
|
|
14
|
-
export * from './components/types.js';
|
|
15
14
|
export * from './elements.js';
|
|
16
15
|
export * from './errors.js';
|
|
17
16
|
export { Layout, RawLayout } from './Layout.js';
|
|
18
17
|
export { overlay } from './LayoutOverlayManager.js';
|
|
18
|
+
export * from './types.js';
|
|
19
19
|
export * from './utils.js';
|
|
20
20
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACzD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAA;AACzF,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAA;AAC7D,cAAc,yBAAyB,CAAA;AACvC,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAA;AACrE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAChD,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAA;AAC7F,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACzD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAA;AACzF,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAA;AAC7D,cAAc,yBAAyB,CAAA;AACvC,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAA;AACrE,cAAc,mBAAmB,CAAA;AACjC,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAChD,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export { Backdrop } from './components/Backdrop.js';
|
|
2
|
+
export { showContactUsModal, showRateUsModal } from './components/Contact/show-contact-modal.js';
|
|
1
3
|
export { Dialog } from './components/Dialog.js';
|
|
2
4
|
export { Header } from './components/Header.js';
|
|
3
5
|
export { ActionItem, MenuContent, MenuGroup, Title } from './components/menu/MenuContent.js';
|
|
@@ -8,13 +10,11 @@ export { PortalSwitcher } from './components/PortalSwitcher.js';
|
|
|
8
10
|
export { RateComponent } from './components/Rate/index.js';
|
|
9
11
|
export { useRatingEffect } from './components/Rate/hook.js';
|
|
10
12
|
export { showRatingModal } from './components/Rate/show-rating-modal.js';
|
|
11
|
-
export { showContactUsModal } from './components/Contact/show-contact-modal.js';
|
|
12
|
-
export { ContactPopover } from './components/Contact/ContactPopover.js';
|
|
13
13
|
export * from './components/tour/index.js';
|
|
14
|
-
export * from './components/types.js';
|
|
15
14
|
export * from './elements.js';
|
|
16
15
|
export * from './errors.js';
|
|
17
16
|
export { Layout, RawLayout } from './Layout.js';
|
|
18
17
|
export { overlay } from './LayoutOverlayManager.js';
|
|
18
|
+
export * from './types.js';
|
|
19
19
|
export * from './utils.js';
|
|
20
20
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,EAAE,MAAM,EAAe,MAAM,qBAAqB,CAAA;AACzD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAA;AACzF,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAA;AAC7D,cAAc,yBAAyB,CAAA;AACvC,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAA;AACrE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAChD,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAA;AAC7F,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,EAAE,MAAM,EAAe,MAAM,qBAAqB,CAAA;AACzD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAA;AACzF,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAA;AAC7D,cAAc,yBAAyB,CAAA;AACvC,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAA;AACrE,cAAc,mBAAmB,CAAA;AACjC,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAChD,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA"}
|
package/dist/layout.css
CHANGED
|
@@ -192,6 +192,54 @@ body {
|
|
|
192
192
|
z-index: 2;
|
|
193
193
|
}
|
|
194
194
|
|
|
195
|
+
.gradient-svg {
|
|
196
|
+
width: 100px;
|
|
197
|
+
height: 100px;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.gradient-svg path {
|
|
201
|
+
fill: url(#gradient);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
#menuSections .toggle .gradient {
|
|
205
|
+
background: linear-gradient(to right, #FF9900, #FF6633);
|
|
206
|
+
-webkit-background-clip: text;
|
|
207
|
+
background-clip: text;
|
|
208
|
+
-webkit-text-fill-color: transparent;
|
|
209
|
+
font-weight: 500;
|
|
210
|
+
line-height: 16px;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
@keyframes rotate {
|
|
214
|
+
from {
|
|
215
|
+
transform: rotate(0deg);
|
|
216
|
+
}
|
|
217
|
+
to {
|
|
218
|
+
transform: rotate(360deg);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.rotate-icon {
|
|
223
|
+
animation: rotate 2s linear forwards;
|
|
224
|
+
animation-delay: 2s;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
@keyframes growShrink {
|
|
228
|
+
0% {
|
|
229
|
+
transform: scale(1);
|
|
230
|
+
}
|
|
231
|
+
50% {
|
|
232
|
+
transform: scale(1.2);
|
|
233
|
+
}
|
|
234
|
+
100% {
|
|
235
|
+
transform: scale(1);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.grow-shrink {
|
|
240
|
+
animation: growShrink 2s ease-in-out forwards;
|
|
241
|
+
}
|
|
242
|
+
|
|
195
243
|
#menuSections > ul li a:before {
|
|
196
244
|
content: '';
|
|
197
245
|
position: absolute;
|
|
@@ -301,7 +349,7 @@ body {
|
|
|
301
349
|
pointer-events: auto;
|
|
302
350
|
}
|
|
303
351
|
|
|
304
|
-
#modal {
|
|
352
|
+
#modal, #backdrop .modal-box {
|
|
305
353
|
transform: scale(0);
|
|
306
354
|
display: flex;
|
|
307
355
|
flex-direction: column;
|
|
@@ -309,32 +357,32 @@ body {
|
|
|
309
357
|
width: calc(100% - 60px);
|
|
310
358
|
}
|
|
311
359
|
|
|
312
|
-
#modal.fit-content {
|
|
360
|
+
#modal.fit-content, #backdrop .modal-box.fit-content {
|
|
313
361
|
width: auto;
|
|
314
362
|
}
|
|
315
363
|
|
|
316
|
-
#modal.full {
|
|
364
|
+
#modal.full, #backdrop .modal-box.full {
|
|
317
365
|
width: 100%;
|
|
318
366
|
height: 100%;
|
|
319
367
|
}
|
|
320
368
|
|
|
321
|
-
#modal.large {
|
|
369
|
+
#modal.large, #backdrop .modal-box.large {
|
|
322
370
|
max-width: 1000px;
|
|
323
371
|
}
|
|
324
372
|
|
|
325
|
-
#modal.medium {
|
|
373
|
+
#modal.medium, #backdrop .modal-box.medium {
|
|
326
374
|
max-width: 800px;
|
|
327
375
|
}
|
|
328
376
|
|
|
329
|
-
#modal.small {
|
|
377
|
+
#modal.small, #backdrop .modal-box.small {
|
|
330
378
|
max-width: 600px;
|
|
331
379
|
}
|
|
332
380
|
|
|
333
|
-
#modal.visible {
|
|
381
|
+
#modal.visible, #backdrop.visible .modal-box {
|
|
334
382
|
transform: scale(1);
|
|
335
383
|
}
|
|
336
384
|
|
|
337
|
-
#rightPanel {
|
|
385
|
+
#rightPanel, #backdrop .right-panel-box {
|
|
338
386
|
position: fixed;
|
|
339
387
|
display: flex;
|
|
340
388
|
flex-direction: column;
|
|
@@ -347,22 +395,22 @@ body {
|
|
|
347
395
|
border-bottom-left-radius: 1rem;
|
|
348
396
|
}
|
|
349
397
|
|
|
350
|
-
#rightPanel.small {
|
|
398
|
+
#rightPanel.small, #backdrop .right-panel-box.small {
|
|
351
399
|
right: -400px;
|
|
352
400
|
width: 400px;
|
|
353
401
|
}
|
|
354
402
|
|
|
355
|
-
#rightPanel.medium {
|
|
403
|
+
#rightPanel.medium, #backdrop .right-panel-box.medium {
|
|
356
404
|
right: -600px;
|
|
357
405
|
width: 600px;
|
|
358
406
|
}
|
|
359
407
|
|
|
360
|
-
#rightPanel.large {
|
|
408
|
+
#rightPanel.large, #backdrop .right-panel-box.large {
|
|
361
409
|
right: -800px;
|
|
362
410
|
width: 800px;
|
|
363
411
|
}
|
|
364
412
|
|
|
365
|
-
#rightPanel.visible {
|
|
413
|
+
#rightPanel.visible, #backdrop.visible .right-panel-box {
|
|
366
414
|
right: 0;
|
|
367
415
|
}
|
|
368
416
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StarFillWithGradient.d.ts","sourceRoot":"","sources":["../../src/svg/StarFillWithGradient.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,6BAA8B;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,aAAa,CAAA;CAAE,4CAU9H,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/* eslint-disable max-len */
|
|
3
|
+
export const StarFillWithGradient = ({ className, id, style }) => (_jsxs("svg", { viewBox: "0 0 512 512", className: className, id: id, style: style, width: "16", height: "16", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("defs", { children: _jsxs("linearGradient", { id: "gradient", x1: "0%", y1: "0%", x2: "100%", y2: "100%", children: [_jsx("stop", { offset: "0%", style: { 'stopColor': '#FF9900', 'stopOpacity': 1 } }), _jsx("stop", { offset: "100%", style: { 'stopColor': '#FF6633', 'stopOpacity': 1 } })] }) }), _jsx("path", { d: "M226.885 21.9523C231.432 9.88404 242.98 1.91992 255.85 1.91992C268.719 1.91992 280.268 9.88408 284.814 21.9523C284.863 22.0812 284.91 22.2105 284.956 22.3403L335.667 165.876L478.048 165.876H478.049C490.986 165.876 502.581 173.922 507.079 186.08C511.579 198.245 508.006 211.912 498.152 220.324C498.075 220.39 497.997 220.456 497.918 220.521L377.676 320.039L428.087 471.216L428.091 471.226C432.349 484.019 427.824 498.078 416.935 505.998C406.055 513.912 391.305 513.892 380.445 505.949L380.435 505.941L255.825 414.67L131.151 505.944L131.075 506C131.045 506.021 131.016 506.042 130.987 506.063C120.124 513.848 105.488 513.783 94.6943 505.902C83.8927 498.015 79.374 484.073 83.5272 471.34C83.5408 471.299 83.5545 471.257 83.5683 471.216L133.979 320.041L13.7166 220.522C13.6378 220.457 13.5595 220.391 13.4817 220.324C3.62771 211.912 0.054518 198.245 4.55486 186.08C9.05287 173.922 20.6475 165.876 33.5842 165.876H33.5857L175.992 165.876L226.745 22.3356C226.791 22.2074 226.837 22.0796 226.885 21.9523Z" })] }));
|
|
4
|
+
//# sourceMappingURL=StarFillWithGradient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StarFillWithGradient.js","sourceRoot":"","sources":["../../src/svg/StarFillWithGradient.tsx"],"names":[],"mappings":";AAAA,4BAA4B;AAE5B,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,KAAK,EAAoE,EAAE,EAAE,CAAC,CAClI,eAAK,OAAO,EAAC,aAAa,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAG,KAAK,EAAC,4BAA4B,aACjI,yBACE,0BAAgB,EAAE,EAAC,UAAU,EAAC,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,MAAM,EAAC,EAAE,EAAC,MAAM,aAC/D,eAAM,MAAM,EAAC,IAAI,EAAC,KAAK,EAAE,EAAE,WAAW,EAAC,SAAS,EAAE,aAAa,EAAE,CAAC,EAAE,GAAG,EACvE,eAAM,MAAM,EAAC,MAAM,EAAC,KAAK,EAAE,EAAE,WAAW,EAAC,SAAS,EAAE,aAAa,EAAE,CAAC,EAAE,GAAG,IAC1D,GACZ,EACP,eAAM,CAAC,EAAC,u+BAAu+B,GAAG,IAC9+B,CACP,CAAA"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,IAAI,GAAG,KAAK,GAAG,IAAI,CAAA;AACvD,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;AACzD,MAAM,MAAM,SAAS,GAAG,cAAc,GAAG,aAAa,CAAA;AACtD,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,MAAM,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -9,6 +9,7 @@ import { getDictionary } from './dictionary'
|
|
|
9
9
|
import { LayoutElements, elementIds, getLayoutElements } from './elements'
|
|
10
10
|
import { ElementNotFound, LayoutError } from './errors'
|
|
11
11
|
import { CustomToasterOptions, DefaultToasterOptions, closeReactToaster, showToaster as showReactToaster } from './toaster'
|
|
12
|
+
import { CustomModalSize, ModalSize, RightPanelSize } from './types'
|
|
12
13
|
import { valueOfLayoutVar } from './utils'
|
|
13
14
|
|
|
14
15
|
interface AlertOptions extends Omit<DialogOptions, 'cancel'> {
|
|
@@ -20,8 +21,6 @@ interface AlertOptions extends Omit<DialogOptions, 'cancel'> {
|
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
type BottomDialogOptions = Omit<DialogOptions, 'title'>
|
|
23
|
-
type OverlaySize = 'small' | 'medium' | 'large'
|
|
24
|
-
type ModalSize = 'fit-content' | OverlaySize
|
|
25
24
|
type SetContentFn = ((content: ReactElement | undefined) => void) | undefined
|
|
26
25
|
|
|
27
26
|
interface OverlayContentSetter {
|
|
@@ -34,7 +33,7 @@ interface CustomModalOptions {
|
|
|
34
33
|
/**
|
|
35
34
|
* The size of the modal.
|
|
36
35
|
*/
|
|
37
|
-
size?:
|
|
36
|
+
size?: CustomModalSize,
|
|
38
37
|
/**
|
|
39
38
|
* A function to call when the modal closes.
|
|
40
39
|
*/
|
|
@@ -45,7 +44,7 @@ interface CustomRightPanelOptions {
|
|
|
45
44
|
/**
|
|
46
45
|
* The size of the right panel.
|
|
47
46
|
*/
|
|
48
|
-
size?:
|
|
47
|
+
size?: RightPanelSize,
|
|
49
48
|
/**
|
|
50
49
|
* A function to call when the right panel closes.
|
|
51
50
|
*/
|
|
@@ -351,7 +350,7 @@ class LayoutOverlayManager {
|
|
|
351
350
|
*
|
|
352
351
|
* @param options the modal options: {@link OverlayContentProps} & { size: {@link ModalSize} }.
|
|
353
352
|
*/
|
|
354
|
-
showRightPanel({ size, ...props }: OverlayContentProps & { size?:
|
|
353
|
+
showRightPanel({ size, ...props }: OverlayContentProps & { size?: RightPanelSize }) {
|
|
355
354
|
this.showCustomRightPanel(
|
|
356
355
|
<OverlayContent {...props} onClose={() => this.closeRightPanel()} type="panel" />,
|
|
357
356
|
{ size, onClose: props.onClose },
|
|
@@ -1,26 +1,110 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { delay } from '@stack-spot/portal-components'
|
|
2
|
+
import { listToClass } from '@stack-spot/portal-theme'
|
|
3
|
+
import { useEffect, useMemo, useRef, useState } from 'react'
|
|
2
4
|
import { createPortal } from 'react-dom'
|
|
3
5
|
import { getLayoutElements } from '../elements'
|
|
4
6
|
import { overlay } from '../LayoutOverlayManager'
|
|
7
|
+
import { CustomModalSize, RightPanelSize } from '../types'
|
|
8
|
+
import { valueOfLayoutVar } from '../utils'
|
|
5
9
|
|
|
6
10
|
export interface BackdropProps {
|
|
7
11
|
children: React.ReactNode,
|
|
8
12
|
visible: boolean,
|
|
13
|
+
/**
|
|
14
|
+
* A function to run when the backdrop is closed. Since the backdrop is a controlled element, this should be used to set the state
|
|
15
|
+
* of `visible` to false.
|
|
16
|
+
*/
|
|
9
17
|
onClose: () => void,
|
|
10
18
|
style?: React.CSSProperties,
|
|
19
|
+
/**
|
|
20
|
+
* Makes this backdrop act as a modal or a right panel.
|
|
21
|
+
* - `actAs = 'modal'` adds the className 'modal-box' to the backdrop, making it behave like a modal with medium size.
|
|
22
|
+
* - `actAs = 'right-panel'` adds the className 'right-panel-box' to the backdrop, making it behave like a right-panel with medium size.
|
|
23
|
+
* - `actAs = { type: T, size: S }` adds the className 'modal-box' or 'right-panel-box' to the backdrop, depending on the value of `T`.
|
|
24
|
+
* The size will depend on the value of `S`.
|
|
25
|
+
*/
|
|
26
|
+
actAs?: 'modal' | 'right-panel' | { type: 'modal', size: CustomModalSize } | { type: 'right-panel', size: RightPanelSize },
|
|
27
|
+
/**
|
|
28
|
+
* A persistent backdrop is always rendered, despite the value of `visible`. It still appears or disappears according to `visible`, but
|
|
29
|
+
* it never leaves the DOM.
|
|
30
|
+
*
|
|
31
|
+
* This can help preserving complex animations.
|
|
32
|
+
*
|
|
33
|
+
* Attention: if you have many complex backdrops with persistent = true, it may affect performance.
|
|
34
|
+
*
|
|
35
|
+
* @default false
|
|
36
|
+
*/
|
|
37
|
+
persistent?: boolean,
|
|
38
|
+
/**
|
|
39
|
+
* This doesn't change the animation of the backdrop! Use this property if `persistent` is false and the backdrop's content is animated
|
|
40
|
+
* in a different time than `--modal-animation-duration` (layout css variable).
|
|
41
|
+
*
|
|
42
|
+
* This lets you preserve the animations on your content when `persistent` is false.
|
|
43
|
+
*/
|
|
44
|
+
animationMS?: number,
|
|
11
45
|
className?: string,
|
|
12
46
|
}
|
|
13
47
|
|
|
14
|
-
|
|
48
|
+
/**
|
|
49
|
+
* The backdrop is a component for creating a Modal content. This can have any shape or form, it's free to accept any kind of content, and,
|
|
50
|
+
* by default, it has no animations attached to it (with the exception of the backdrop's animation, which is a fade-in-out).
|
|
51
|
+
*
|
|
52
|
+
* In general, to create modal and side-panels, you should use `overlay.showModal`, `overlay.showCustomModal`, `overlay.showRightPanel` and
|
|
53
|
+
* `overlay.showCustomRightPanel`.
|
|
54
|
+
*
|
|
55
|
+
* Use this when:
|
|
56
|
+
* 1. Your content is neither a modal, nor a right panel, but it needs a backdrop. Meaning, it can't be animated like a modal, but still
|
|
57
|
+
* needs to show a backdrop.
|
|
58
|
+
* 2. Your content is a modal or a right panel, but it needs to update according to an external state. The ideal scenario is to have the
|
|
59
|
+
* modal content completely independent of the external state, but sometimes, we do need to interact with an external state and calling
|
|
60
|
+
* `overlay.show*` multiple times is not ideal.
|
|
61
|
+
*
|
|
62
|
+
* Attention: if you open a modal/right panel through this component, you should not use the methods `overlay.close*` or `overlay.is*Open`
|
|
63
|
+
* to manage it.
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* Check the example below for rendering a medium-sized modal. Equivalent to `overlay.showModal`. Remember that calling `overlay.showModal`
|
|
67
|
+
* is always preferable. Use this only if you fall into the second case explained above.
|
|
68
|
+
* ```
|
|
69
|
+
* <Backdrop visible={isOpen} onClose={() => setOpen(false)} actAs="modal">
|
|
70
|
+
* <OverlayContent type="modal" onClose={() => setOpen(false)} title="Title">
|
|
71
|
+
* <p>Hello World!</p>
|
|
72
|
+
* </OverlayContent>
|
|
73
|
+
* </Backdrop>
|
|
74
|
+
* ```
|
|
75
|
+
* @param props the component props {@link BackdropProps}.
|
|
76
|
+
*/
|
|
77
|
+
export const Backdrop = ({ children, visible = false, onClose, className, actAs, persistent, animationMS = 0, style }: BackdropProps) => {
|
|
15
78
|
const ref = useRef<HTMLDivElement>(null)
|
|
79
|
+
const [shouldRender, setShouldRender] = useState(!!persistent)
|
|
80
|
+
const renderDelay = useMemo(() => Math.max(parseFloat(valueOfLayoutVar('--modal-animation-duration')), animationMS) * 1000, [])
|
|
81
|
+
const backdropType = typeof actAs === 'string' ? actAs : actAs?.type
|
|
82
|
+
const backdropSize = typeof actAs === 'string' ? 'medium' : actAs?.size
|
|
83
|
+
const classes = listToClass([
|
|
84
|
+
className,
|
|
85
|
+
backdropType === 'modal' && 'modal-box',
|
|
86
|
+
backdropType === 'right-panel' && 'right-panel-box',
|
|
87
|
+
backdropSize,
|
|
88
|
+
])
|
|
16
89
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
90
|
+
useEffect(() => {
|
|
91
|
+
(async () => {
|
|
92
|
+
if (visible) {
|
|
93
|
+
setShouldRender(true)
|
|
94
|
+
// arbitrary delay to make sure the content is rendered before actually showing it.
|
|
95
|
+
await delay(10)
|
|
96
|
+
overlay.showBackdrop(ref.current)
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
overlay.closeBackdrop(ref.current)
|
|
100
|
+
await delay(renderDelay)
|
|
101
|
+
setShouldRender(false)
|
|
102
|
+
}
|
|
103
|
+
})()
|
|
20
104
|
}, [visible])
|
|
21
105
|
|
|
22
106
|
const backdropContent = (
|
|
23
|
-
<div ref={ref} data-custom-backdrop-visibility={visible} className={
|
|
107
|
+
<div ref={ref} data-custom-backdrop-visibility={visible} className={classes} style={style}>
|
|
24
108
|
{children}
|
|
25
109
|
{/* This button allows the OverlayManager to programmatically close any custom backdrop by calling their respective onClose prop. */}
|
|
26
110
|
<button data-custom-backdrop-close onClick={onClose} style={{ display: 'none' }}>Close</button>
|
|
@@ -28,5 +112,5 @@ export const Backdrop = ({ children, visible = false, onClose, className, style
|
|
|
28
112
|
)
|
|
29
113
|
|
|
30
114
|
const backdrop = getLayoutElements().backdrop
|
|
31
|
-
return backdrop ? createPortal(backdropContent, backdrop) : null
|
|
115
|
+
return backdrop && (shouldRender || persistent) ? createPortal(backdropContent, backdrop) : null
|
|
32
116
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Box, Button, Flex, IconBox, Text } from '@citric/core'
|
|
2
|
-
import {
|
|
2
|
+
import { ExternalLink } from '@citric/icons'
|
|
3
3
|
import { Card } from '@citric/ui'
|
|
4
|
+
import { useAnchorTag } from '@stack-spot/portal-components/anchor'
|
|
4
5
|
import { Dictionary, useTranslate } from '@stack-spot/portal-translate'
|
|
5
6
|
import { ReactElement } from 'react'
|
|
6
|
-
import { useAnchorTag } from '@stack-spot/portal-components/anchor'
|
|
7
7
|
import { overlay } from '../../LayoutOverlayManager'
|
|
8
8
|
import { RateComponent } from '../Rate'
|
|
9
9
|
|
|
@@ -42,35 +42,32 @@ interface Props {
|
|
|
42
42
|
tenant: string,
|
|
43
43
|
portal: 'EDP' | 'AI',
|
|
44
44
|
formIdentifier: string,
|
|
45
|
-
serviceNowUrl:string,
|
|
46
45
|
}
|
|
47
46
|
|
|
48
|
-
const ContactUsComponent = ({ serviceNowUrl
|
|
47
|
+
const ContactUsComponent = ({ serviceNowUrl }: {serviceNowUrl:string}) => {
|
|
49
48
|
const t = useTranslate(dictionary)
|
|
50
49
|
|
|
51
|
-
const onClickContactUs = () => {
|
|
52
|
-
const { formIdentifier, sub, tenant, portal } = props
|
|
53
|
-
overlay.showModal({
|
|
54
|
-
title: t.rateUs,
|
|
55
|
-
children: <RateComponent tfLive={formIdentifier} userId={sub} orgId={tenant} portal={portal} />,
|
|
56
|
-
size: 'large',
|
|
57
|
-
})
|
|
58
|
-
}
|
|
59
|
-
|
|
60
50
|
return <Flex sx={{ gap: '8px' }} w={12} mb={10} flexWrap="nowrap">
|
|
61
|
-
<CardItem title={t.rateUs} description={t.rateUsDescription} buttonText={t.rateUsButton} onClick={onClickContactUs}
|
|
62
|
-
icon={<ArrowRight />} hasMargin={true}/>
|
|
63
51
|
<CardItem title={t.support} description={t.supportDescription} buttonText={t.supportButton} url={serviceNowUrl}
|
|
64
52
|
icon={<ExternalLink />} />
|
|
65
53
|
</Flex>
|
|
66
54
|
}
|
|
67
55
|
|
|
68
56
|
|
|
69
|
-
export const
|
|
57
|
+
export const showRateUsModal = ({ title, ...props }: Props & { title: string }) => {
|
|
58
|
+
const { formIdentifier, sub, tenant, portal } = props
|
|
59
|
+
overlay.showModal({
|
|
60
|
+
title: title,
|
|
61
|
+
children: <RateComponent tfLive={formIdentifier} userId={sub} orgId={tenant} portal={portal} />,
|
|
62
|
+
size: 'large',
|
|
63
|
+
})
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export const showContactUsModal = ({ title, serviceNowUrl }:{ serviceNowUrl:string, title: string }) => {
|
|
70
67
|
overlay.showModal({
|
|
71
68
|
title,
|
|
72
|
-
children: <ContactUsComponent {
|
|
73
|
-
size: '
|
|
69
|
+
children: <ContactUsComponent serviceNowUrl={serviceNowUrl} />,
|
|
70
|
+
size: 'small',
|
|
74
71
|
})
|
|
75
72
|
}
|
|
76
73
|
|
|
@@ -10,7 +10,7 @@ import { NotificationPanelProps } from './types'
|
|
|
10
10
|
export const NotificationPanel = ({ filter, onFilter, loading, error, visible, onClose, ...props }: NotificationPanelProps) => {
|
|
11
11
|
const controller = useNotificationController()
|
|
12
12
|
return (
|
|
13
|
-
<StyledBackdrop visible={visible} onClose={onClose}>
|
|
13
|
+
<StyledBackdrop visible={visible} onClose={onClose} persistent>
|
|
14
14
|
<AnimatedHeight
|
|
15
15
|
className="notification-panel"
|
|
16
16
|
visible={visible}
|