@equinor/cpl-error-snackbar-react 0.0.5 → 0.0.7
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.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -3
- package/dist/index.mjs +5 -0
- package/package.json +10 -10
package/dist/index.d.mts
CHANGED
|
@@ -132,7 +132,7 @@ interface ErrorSnackbarsFixedListProps {
|
|
|
132
132
|
removeErrorSnackbarObjectById: (errorSnackbarId: string) => void;
|
|
133
133
|
}
|
|
134
134
|
declare const ERROR_SNACKBARS_FIXED_LIST_TESTID = "error-snackbars-fixed-wrapper";
|
|
135
|
-
declare function ErrorSnackbarFixedList({ disablePositionFixed, errorSnackbarObjects, removeErrorSnackbarObjectById, }: ErrorSnackbarsFixedListProps): react_jsx_runtime.JSX.Element;
|
|
135
|
+
declare function ErrorSnackbarFixedList({ disablePositionFixed, errorSnackbarObjects, removeErrorSnackbarObjectById, }: ErrorSnackbarsFixedListProps): react_jsx_runtime.JSX.Element | null;
|
|
136
136
|
|
|
137
137
|
interface ErrorSnackbarsContainerProps {
|
|
138
138
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -132,7 +132,7 @@ interface ErrorSnackbarsFixedListProps {
|
|
|
132
132
|
removeErrorSnackbarObjectById: (errorSnackbarId: string) => void;
|
|
133
133
|
}
|
|
134
134
|
declare const ERROR_SNACKBARS_FIXED_LIST_TESTID = "error-snackbars-fixed-wrapper";
|
|
135
|
-
declare function ErrorSnackbarFixedList({ disablePositionFixed, errorSnackbarObjects, removeErrorSnackbarObjectById, }: ErrorSnackbarsFixedListProps): react_jsx_runtime.JSX.Element;
|
|
135
|
+
declare function ErrorSnackbarFixedList({ disablePositionFixed, errorSnackbarObjects, removeErrorSnackbarObjectById, }: ErrorSnackbarsFixedListProps): react_jsx_runtime.JSX.Element | null;
|
|
136
136
|
|
|
137
137
|
interface ErrorSnackbarsContainerProps {
|
|
138
138
|
/**
|
package/dist/index.js
CHANGED
|
@@ -48,8 +48,8 @@ var __async = (__this, __arguments, generator) => {
|
|
|
48
48
|
};
|
|
49
49
|
|
|
50
50
|
// src/index.ts
|
|
51
|
-
var
|
|
52
|
-
__export(
|
|
51
|
+
var index_exports = {};
|
|
52
|
+
__export(index_exports, {
|
|
53
53
|
CopyToClipboardButton: () => CopyToClipboardButton,
|
|
54
54
|
ERROR_SNACKBARS_FIXED_LIST_TESTID: () => ERROR_SNACKBARS_FIXED_LIST_TESTID,
|
|
55
55
|
ErrorSnackbar: () => ErrorSnackbar,
|
|
@@ -60,7 +60,7 @@ __export(src_exports, {
|
|
|
60
60
|
parseUnknownError: () => parseUnknownError,
|
|
61
61
|
useErrorSnackbarContext: () => useErrorSnackbarContext
|
|
62
62
|
});
|
|
63
|
-
module.exports = __toCommonJS(
|
|
63
|
+
module.exports = __toCommonJS(index_exports);
|
|
64
64
|
|
|
65
65
|
// src/CopyToClipboardButton.tsx
|
|
66
66
|
var import_eds_core_react = require("@equinor/eds-core-react");
|
|
@@ -182,11 +182,13 @@ var MainColumn = import_styled_components2.default.div`
|
|
|
182
182
|
gap: 1rem;
|
|
183
183
|
`;
|
|
184
184
|
var HeaderWrapper = import_styled_components2.default.div`
|
|
185
|
+
flex: 1;
|
|
185
186
|
display: flex;
|
|
186
187
|
justify-content: space-between;
|
|
187
188
|
`;
|
|
188
189
|
var BodyTypography = (0, import_styled_components2.default)(import_eds_core_react2.Typography)`
|
|
189
190
|
font-size: 0.857rem; // 14px
|
|
191
|
+
word-break: break-word;
|
|
190
192
|
`;
|
|
191
193
|
var MetadataWrapper = import_styled_components2.default.div`
|
|
192
194
|
display: flex;
|
|
@@ -278,6 +280,9 @@ function ErrorSnackbarFixedList({
|
|
|
278
280
|
errorSnackbarObjects,
|
|
279
281
|
removeErrorSnackbarObjectById
|
|
280
282
|
}) {
|
|
283
|
+
if (errorSnackbarObjects.length === 0) {
|
|
284
|
+
return null;
|
|
285
|
+
}
|
|
281
286
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(FixedWrapper, { $disablePositionFixed: disablePositionFixed, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SnackbarList, { "data-testid": ERROR_SNACKBARS_FIXED_LIST_TESTID, children: errorSnackbarObjects.map((errorSnackbarObject) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
282
287
|
ErrorSnackbar,
|
|
283
288
|
{
|
package/dist/index.mjs
CHANGED
|
@@ -139,11 +139,13 @@ var MainColumn = styled2.div`
|
|
|
139
139
|
gap: 1rem;
|
|
140
140
|
`;
|
|
141
141
|
var HeaderWrapper = styled2.div`
|
|
142
|
+
flex: 1;
|
|
142
143
|
display: flex;
|
|
143
144
|
justify-content: space-between;
|
|
144
145
|
`;
|
|
145
146
|
var BodyTypography = styled2(Typography)`
|
|
146
147
|
font-size: 0.857rem; // 14px
|
|
148
|
+
word-break: break-word;
|
|
147
149
|
`;
|
|
148
150
|
var MetadataWrapper = styled2.div`
|
|
149
151
|
display: flex;
|
|
@@ -235,6 +237,9 @@ function ErrorSnackbarFixedList({
|
|
|
235
237
|
errorSnackbarObjects,
|
|
236
238
|
removeErrorSnackbarObjectById
|
|
237
239
|
}) {
|
|
240
|
+
if (errorSnackbarObjects.length === 0) {
|
|
241
|
+
return null;
|
|
242
|
+
}
|
|
238
243
|
return /* @__PURE__ */ jsx4(FixedWrapper, { $disablePositionFixed: disablePositionFixed, children: /* @__PURE__ */ jsx4(SnackbarList, { "data-testid": ERROR_SNACKBARS_FIXED_LIST_TESTID, children: errorSnackbarObjects.map((errorSnackbarObject) => /* @__PURE__ */ jsx4("li", { children: /* @__PURE__ */ jsx4(
|
|
239
244
|
ErrorSnackbar,
|
|
240
245
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/cpl-error-snackbar-react",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
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": {
|