@equinor/cpl-top-bar-react 0.2.0 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +8 -6
- package/dist/index.mjs +5 -3
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -28,12 +28,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
|
|
30
30
|
// src/index.ts
|
|
31
|
-
var
|
|
32
|
-
__export(
|
|
31
|
+
var index_exports = {};
|
|
32
|
+
__export(index_exports, {
|
|
33
33
|
TopBar: () => TopBar,
|
|
34
34
|
UserMenu: () => UserMenu
|
|
35
35
|
});
|
|
36
|
-
module.exports = __toCommonJS(
|
|
36
|
+
module.exports = __toCommonJS(index_exports);
|
|
37
37
|
|
|
38
38
|
// src/TopBar/TopBar.tsx
|
|
39
39
|
var import_eds_core_react = require("@equinor/eds-core-react");
|
|
@@ -68,6 +68,8 @@ function TopBar({
|
|
|
68
68
|
var StyledEDSTopBar = (0, import_styled_components.default)(import_eds_core_react.TopBar)`
|
|
69
69
|
border-color: rgba(255, 255, 255, 0.16);
|
|
70
70
|
gap: 0;
|
|
71
|
+
padding: 0px 20px;
|
|
72
|
+
margin: 0px;
|
|
71
73
|
${({ $darkMode }) => $darkMode ? import_styled_components.css`
|
|
72
74
|
background: ${import_eds_tokens.tokens.colors.interactive.table__cell__fill_resting.hex};
|
|
73
75
|
color: #fff;
|
|
@@ -126,12 +128,12 @@ function UserMenu({
|
|
|
126
128
|
};
|
|
127
129
|
const LogOutMenuItem = () => {
|
|
128
130
|
if (typeof logout === "string") {
|
|
129
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_eds_core_react2.Menu.Item, { as: "a", href: logout, className: "menu-item", children: [
|
|
131
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_eds_core_react2.Menu.Item, { as: "a", href: logout, className: "menu-item", id: "logout-button", children: [
|
|
130
132
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_eds_core_react2.Icon, { data: import_eds_icons2.log_out }),
|
|
131
133
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: "Log out" })
|
|
132
134
|
] });
|
|
133
135
|
} else {
|
|
134
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_eds_core_react2.Menu.Item, { as: "button", onClick: logout, className: "menu-item", children: [
|
|
136
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_eds_core_react2.Menu.Item, { as: "button", onClick: logout, className: "menu-item", id: "logout-button", children: [
|
|
135
137
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_eds_core_react2.Icon, { data: import_eds_icons2.log_out }),
|
|
136
138
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: "Log out" })
|
|
137
139
|
] });
|
|
@@ -236,7 +238,7 @@ var LetterCircle = import_styled_components2.default.span`
|
|
|
236
238
|
` : ``};
|
|
237
239
|
`;
|
|
238
240
|
var StyledUserButton = (0, import_styled_components2.default)(import_eds_core_react2.Button)`
|
|
239
|
-
margin:
|
|
241
|
+
margin-left: 12px;
|
|
240
242
|
font-weight: bold;
|
|
241
243
|
width: 32px;
|
|
242
244
|
height: 32px;
|
package/dist/index.mjs
CHANGED
|
@@ -31,6 +31,8 @@ function TopBar({
|
|
|
31
31
|
var StyledEDSTopBar = styled(EDSTopBar)`
|
|
32
32
|
border-color: rgba(255, 255, 255, 0.16);
|
|
33
33
|
gap: 0;
|
|
34
|
+
padding: 0px 20px;
|
|
35
|
+
margin: 0px;
|
|
34
36
|
${({ $darkMode }) => $darkMode ? css`
|
|
35
37
|
background: ${tokens.colors.interactive.table__cell__fill_resting.hex};
|
|
36
38
|
color: #fff;
|
|
@@ -89,12 +91,12 @@ function UserMenu({
|
|
|
89
91
|
};
|
|
90
92
|
const LogOutMenuItem = () => {
|
|
91
93
|
if (typeof logout === "string") {
|
|
92
|
-
return /* @__PURE__ */ jsxs2(Menu.Item, { as: "a", href: logout, className: "menu-item", children: [
|
|
94
|
+
return /* @__PURE__ */ jsxs2(Menu.Item, { as: "a", href: logout, className: "menu-item", id: "logout-button", children: [
|
|
93
95
|
/* @__PURE__ */ jsx2(Icon2, { data: log_out }),
|
|
94
96
|
/* @__PURE__ */ jsx2("span", { children: "Log out" })
|
|
95
97
|
] });
|
|
96
98
|
} else {
|
|
97
|
-
return /* @__PURE__ */ jsxs2(Menu.Item, { as: "button", onClick: logout, className: "menu-item", children: [
|
|
99
|
+
return /* @__PURE__ */ jsxs2(Menu.Item, { as: "button", onClick: logout, className: "menu-item", id: "logout-button", children: [
|
|
98
100
|
/* @__PURE__ */ jsx2(Icon2, { data: log_out }),
|
|
99
101
|
/* @__PURE__ */ jsx2("span", { children: "Log out" })
|
|
100
102
|
] });
|
|
@@ -199,7 +201,7 @@ var LetterCircle = styled2.span`
|
|
|
199
201
|
` : ``};
|
|
200
202
|
`;
|
|
201
203
|
var StyledUserButton = styled2(Button)`
|
|
202
|
-
margin:
|
|
204
|
+
margin-left: 12px;
|
|
203
205
|
font-weight: bold;
|
|
204
206
|
width: 32px;
|
|
205
207
|
height: 32px;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/cpl-top-bar-react",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -13,18 +13,18 @@
|
|
|
13
13
|
"@equinor/eds-tokens": "^0.9.2"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@equinor/eds-core-react": "^0.42.
|
|
17
|
-
"@storybook/react": "^8.
|
|
18
|
-
"@storybook/test": "^8.
|
|
19
|
-
"@types/react": "^18.3.
|
|
20
|
-
"@types/react-dom": "^18.3.
|
|
16
|
+
"@equinor/eds-core-react": "^0.42.5",
|
|
17
|
+
"@storybook/react": "^8.5.2",
|
|
18
|
+
"@storybook/test": "^8.5.2",
|
|
19
|
+
"@types/react": "^18.3.18",
|
|
20
|
+
"@types/react-dom": "^18.3.5",
|
|
21
21
|
"@types/styled-components": "^5.1.34",
|
|
22
|
-
"eslint": "^8.
|
|
22
|
+
"eslint": "^8.57.1",
|
|
23
23
|
"react": "^18.2.0",
|
|
24
24
|
"react-dom": "^18.2.0",
|
|
25
|
-
"styled-components": "^6.1.
|
|
26
|
-
"tsup": "^8.
|
|
27
|
-
"eslint-config-custom": "0.0.
|
|
25
|
+
"styled-components": "^6.1.14",
|
|
26
|
+
"tsup": "^8.3.6",
|
|
27
|
+
"eslint-config-custom": "0.0.6",
|
|
28
28
|
"tsconfig": "0.0.1"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|