@equinor/cpl-error-snackbar-react 0.1.3 → 0.1.5
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 +7 -2
- package/dist/index.mjs +7 -2
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -159,7 +159,7 @@ function ErrorSnackbar({
|
|
|
159
159
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(MainColumn, { children: [
|
|
160
160
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(HeaderWrapper, { children: [
|
|
161
161
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { children: [
|
|
162
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
162
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(HeaderTypography, { variant: "h6", children: error.title }),
|
|
163
163
|
error.detail && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(BodyTypography, { children: error.detail })
|
|
164
164
|
] }),
|
|
165
165
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
@@ -174,7 +174,7 @@ function ErrorSnackbar({
|
|
|
174
174
|
)
|
|
175
175
|
] }),
|
|
176
176
|
error.error && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { children: [
|
|
177
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
177
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(HeaderTypography, { variant: "h6", children: "Error details:" }),
|
|
178
178
|
error.error.message && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(BodyTypography, { children: error.error.message }),
|
|
179
179
|
error.error.possibleAction && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(BodyTypography, { children: error.error.possibleAction }),
|
|
180
180
|
((_a = error.error.accessRequirements) == null ? void 0 : _a.length) && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(StyledList, { style: { color: "inherit" }, children: error.error.accessRequirements.map((accessRequirement) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(StyledList.Item, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(BodyTypography, { children: [
|
|
@@ -218,9 +218,13 @@ var HeaderWrapper = import_styled_components2.default.div`
|
|
|
218
218
|
display: flex;
|
|
219
219
|
justify-content: space-between;
|
|
220
220
|
`;
|
|
221
|
+
var HeaderTypography = (0, import_styled_components2.default)(import_eds_core_react2.Typography)`
|
|
222
|
+
color: ${import_eds_tokens.tokens.colors.text.static_icons__default.rgba};
|
|
223
|
+
`;
|
|
221
224
|
var BodyTypography = (0, import_styled_components2.default)(import_eds_core_react2.Typography)`
|
|
222
225
|
font-size: 0.857rem; // 14px
|
|
223
226
|
word-break: break-word;
|
|
227
|
+
color: ${import_eds_tokens.tokens.colors.text.static_icons__default.rgba};
|
|
224
228
|
`;
|
|
225
229
|
var MetadataWrapper = import_styled_components2.default.div`
|
|
226
230
|
display: flex;
|
|
@@ -229,6 +233,7 @@ var MetadataWrapper = import_styled_components2.default.div`
|
|
|
229
233
|
`;
|
|
230
234
|
var MetadataTypography = (0, import_styled_components2.default)(import_eds_core_react2.Typography)`
|
|
231
235
|
font-size: 0.625rem; // 10px
|
|
236
|
+
color: ${import_eds_tokens.tokens.colors.text.static_icons__default.rgba};
|
|
232
237
|
`;
|
|
233
238
|
var CloseButton = (0, import_styled_components2.default)(import_eds_core_react2.Button)`
|
|
234
239
|
margin: -0.5rem;
|
package/dist/index.mjs
CHANGED
|
@@ -115,7 +115,7 @@ function ErrorSnackbar({
|
|
|
115
115
|
/* @__PURE__ */ jsxs2(MainColumn, { children: [
|
|
116
116
|
/* @__PURE__ */ jsxs2(HeaderWrapper, { children: [
|
|
117
117
|
/* @__PURE__ */ jsxs2("div", { children: [
|
|
118
|
-
/* @__PURE__ */ jsx2(
|
|
118
|
+
/* @__PURE__ */ jsx2(HeaderTypography, { variant: "h6", children: error.title }),
|
|
119
119
|
error.detail && /* @__PURE__ */ jsx2(BodyTypography, { children: error.detail })
|
|
120
120
|
] }),
|
|
121
121
|
/* @__PURE__ */ jsx2(
|
|
@@ -130,7 +130,7 @@ function ErrorSnackbar({
|
|
|
130
130
|
)
|
|
131
131
|
] }),
|
|
132
132
|
error.error && /* @__PURE__ */ jsxs2("div", { children: [
|
|
133
|
-
/* @__PURE__ */ jsx2(
|
|
133
|
+
/* @__PURE__ */ jsx2(HeaderTypography, { variant: "h6", children: "Error details:" }),
|
|
134
134
|
error.error.message && /* @__PURE__ */ jsx2(BodyTypography, { children: error.error.message }),
|
|
135
135
|
error.error.possibleAction && /* @__PURE__ */ jsx2(BodyTypography, { children: error.error.possibleAction }),
|
|
136
136
|
((_a = error.error.accessRequirements) == null ? void 0 : _a.length) && /* @__PURE__ */ jsx2(StyledList, { style: { color: "inherit" }, children: error.error.accessRequirements.map((accessRequirement) => /* @__PURE__ */ jsx2(StyledList.Item, { children: /* @__PURE__ */ jsxs2(BodyTypography, { children: [
|
|
@@ -174,9 +174,13 @@ var HeaderWrapper = styled2.div`
|
|
|
174
174
|
display: flex;
|
|
175
175
|
justify-content: space-between;
|
|
176
176
|
`;
|
|
177
|
+
var HeaderTypography = styled2(Typography)`
|
|
178
|
+
color: ${tokens.colors.text.static_icons__default.rgba};
|
|
179
|
+
`;
|
|
177
180
|
var BodyTypography = styled2(Typography)`
|
|
178
181
|
font-size: 0.857rem; // 14px
|
|
179
182
|
word-break: break-word;
|
|
183
|
+
color: ${tokens.colors.text.static_icons__default.rgba};
|
|
180
184
|
`;
|
|
181
185
|
var MetadataWrapper = styled2.div`
|
|
182
186
|
display: flex;
|
|
@@ -185,6 +189,7 @@ var MetadataWrapper = styled2.div`
|
|
|
185
189
|
`;
|
|
186
190
|
var MetadataTypography = styled2(Typography)`
|
|
187
191
|
font-size: 0.625rem; // 10px
|
|
192
|
+
color: ${tokens.colors.text.static_icons__default.rgba};
|
|
188
193
|
`;
|
|
189
194
|
var CloseButton = styled2(Button2)`
|
|
190
195
|
margin: -0.5rem;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/cpl-error-snackbar-react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"@equinor/eds-core-react": "^0.42.5",
|
|
17
|
-
"@storybook/react": "^9.
|
|
17
|
+
"@storybook/react": "^9.1.1",
|
|
18
18
|
"@types/react": "^18.3.18",
|
|
19
19
|
"@types/react-dom": "^18.3.5",
|
|
20
20
|
"@types/styled-components": "^5.1.34",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"react-dom": "^18.2.0",
|
|
24
24
|
"styled-components": "^6.1.14",
|
|
25
25
|
"tsup": "^8.3.6",
|
|
26
|
-
"@equinor/cpl-eslint-config": "0.0.
|
|
26
|
+
"@equinor/cpl-eslint-config": "0.0.9",
|
|
27
27
|
"@equinor/cpl-typescript-config": "0.0.2"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|