@stack-spot/portal-layout 2.5.7 → 2.6.1
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/components/PortalSwitcher.d.ts.map +1 -1
- package/dist/components/PortalSwitcher.js +2 -4
- package/dist/components/PortalSwitcher.js.map +1 -1
- package/dist/components/Toaster.js +1 -1
- package/package.json +1 -1
- package/src/components/PortalSwitcher.tsx +1 -4
- package/src/components/Toaster.tsx +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.6.1](https://github.com/stack-spot/portal-commons/compare/portal-layout@v2.6.0...portal-layout@v2.6.1) (2024-08-23)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* change h1 to h2 on title toaster content ([16e69f3](https://github.com/stack-spot/portal-commons/commit/16e69f31222f56044fab744cf9540fcf8d1608ff))
|
|
9
|
+
|
|
10
|
+
## [2.6.0](https://github.com/stack-spot/portal-commons/compare/portal-layout@v2.5.7...portal-layout@v2.6.0) (2024-08-21)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* Remove unnecessary info on button ([#305](https://github.com/stack-spot/portal-commons/issues/305)) ([a24f3e7](https://github.com/stack-spot/portal-commons/commit/a24f3e70cb83032f18dddaa73f08b4f1ab815635))
|
|
16
|
+
|
|
3
17
|
## [2.5.7](https://github.com/stack-spot/portal-commons/compare/portal-layout@v2.5.6...portal-layout@v2.5.7) (2024-08-19)
|
|
4
18
|
|
|
5
19
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PortalSwitcher.d.ts","sourceRoot":"","sources":["../../src/components/PortalSwitcher.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PortalSwitcher.d.ts","sourceRoot":"","sources":["../../src/components/PortalSwitcher.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AASvC,MAAM,WAAW,MAAM;IACrB;;OAEG;IACH,OAAO,EAAE,aAAa,CAAC;IACvB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AA0DD;;;;GAIG;AACH,eAAO,MAAM,cAAc,gBAAsB,mBAAmB,4CA6CnE,CAAA;AAuBD;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,YAkBrC,CAAA"}
|
|
@@ -7,7 +7,6 @@ import { theme } from '@stack-spot/portal-theme';
|
|
|
7
7
|
import { useTranslate } from '@stack-spot/portal-translate';
|
|
8
8
|
import { useState } from 'react';
|
|
9
9
|
import styled from 'styled-components';
|
|
10
|
-
import { announce } from '../utils.js';
|
|
11
10
|
import { useTour } from './tour/index.js';
|
|
12
11
|
const Logos = {
|
|
13
12
|
'AI': _jsx(AI, {}),
|
|
@@ -81,9 +80,8 @@ export const PortalSwitcher = ({ portals = [] }) => {
|
|
|
81
80
|
const currentPortal = portals?.find(portal => location.href.startsWith(portal.url));
|
|
82
81
|
usePortalSwitcherTourStep();
|
|
83
82
|
return _jsxs(PortalSwitcherBox, { children: [currentPortal ?
|
|
84
|
-
_jsx(Button, { className: "current-portal", appearance: "text", colorScheme: "light", "aria-controls": PORTAL_SWITCHER_ID, "aria-expanded": visible,
|
|
85
|
-
setVisible(
|
|
86
|
-
announce(`${t.portalSwitcher} ${t.selected}`);
|
|
83
|
+
_jsx(Button, { className: "current-portal", appearance: "text", colorScheme: "light", "aria-controls": PORTAL_SWITCHER_ID, "aria-expanded": visible, onClick: () => {
|
|
84
|
+
setVisible(!visible);
|
|
87
85
|
}, children: _jsxs(Flex, { alignItems: "center", className: "portal-switcher", children: [Logos[currentPortal.acronym], _jsx(IconBox, { size: "xs", ml: 3, children: _jsx(Select, {}) })] }) }) :
|
|
88
86
|
_jsx(Logo, {}), _jsx(SelectionList, { id: PORTAL_SWITCHER_ID, items: portals?.map(portal => ({
|
|
89
87
|
label: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PortalSwitcher.js","sourceRoot":"","sources":["../../src/components/PortalSwitcher.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACtE,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAA;AAC3E,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,mCAAmC,CAAA;AAC1E,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAA;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,EAAa,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC3C,OAAO,MAAM,MAAM,mBAAmB,CAAA;AACtC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"PortalSwitcher.js","sourceRoot":"","sources":["../../src/components/PortalSwitcher.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACtE,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAA;AAC3E,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,mCAAmC,CAAA;AAC1E,OAAO,EAAE,KAAK,EAAE,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G;IACvB,EAAE,EAAE;QACF,KAAK,EAAE,qCAAqC;QAC5C,WAAW,EAAE,8LAA8L;QAC3M,QAAQ,EAAE,oFAAoF;KAC/F;IACD,EAAE,EAAE;QACF,KAAK,EAAE,uCAAuC;QAC9C,WAAW,EAAE,wMAAwM;QACrN,QAAQ,EAAE,sFAAsF;KACjG;CACF,CAAA"}
|
|
@@ -35,6 +35,6 @@ export const ToasterContent = ({ id, message, actions, onClick, title }) => {
|
|
|
35
35
|
if (closeOnClick)
|
|
36
36
|
toast.dismiss(id);
|
|
37
37
|
}, children: label }, label))), [actions]);
|
|
38
|
-
return (_jsxs("div", { onClick: onClick, children: [_jsx("
|
|
38
|
+
return (_jsxs("div", { onClick: onClick, children: [_jsx("h2", { style: { textTransform: 'capitalize' }, children: title }), typeof message === 'string' ? _jsx("p", { children: message }) : message, buttons?.length ? _jsx(Flex, { style: { gap: '12px', marginTop: '12px' }, children: buttons }) : null] }));
|
|
39
39
|
};
|
|
40
40
|
//# sourceMappingURL=Toaster.js.map
|
package/package.json
CHANGED
|
@@ -6,7 +6,6 @@ import { theme } from '@stack-spot/portal-theme'
|
|
|
6
6
|
import { useTranslate } from '@stack-spot/portal-translate'
|
|
7
7
|
import { ReactNode, useState } from 'react'
|
|
8
8
|
import styled from 'styled-components'
|
|
9
|
-
import { announce } from '../utils'
|
|
10
9
|
import { useTour } from './tour'
|
|
11
10
|
import { PortalAcronym } from './types'
|
|
12
11
|
|
|
@@ -110,10 +109,8 @@ export const PortalSwitcher = ({ portals = [] }: PortalSwitcherProps) => {
|
|
|
110
109
|
colorScheme="light"
|
|
111
110
|
aria-controls={PORTAL_SWITCHER_ID}
|
|
112
111
|
aria-expanded={visible}
|
|
113
|
-
aria-label={`${t.portalSwitcher}: ${currentPortal?.acronym} ${t.selected}`}
|
|
114
112
|
onClick={() => {
|
|
115
|
-
setVisible(
|
|
116
|
-
announce(`${t.portalSwitcher} ${t.selected}`)
|
|
113
|
+
setVisible(!visible)
|
|
117
114
|
}}>
|
|
118
115
|
<Flex alignItems="center" className="portal-switcher">
|
|
119
116
|
{Logos[currentPortal.acronym]}
|
|
@@ -87,7 +87,7 @@ export const ToasterContent = ({ id, message, actions, onClick, title }: Toaster
|
|
|
87
87
|
), [actions])
|
|
88
88
|
return (
|
|
89
89
|
<div onClick={onClick}>
|
|
90
|
-
<
|
|
90
|
+
<h2 style={{ textTransform: 'capitalize' }}>{title}</h2>
|
|
91
91
|
{typeof message === 'string' ? <p>{message}</p> : message}
|
|
92
92
|
{buttons?.length ? <Flex style={{ gap: '12px', marginTop: '12px' }}>{buttons}</Flex> : null}
|
|
93
93
|
</div>
|