@norges-domstoler/dds-components 0.0.12 → 0.0.13
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.
|
@@ -4,9 +4,11 @@ export declare type GlobalMessageProps = {
|
|
|
4
4
|
message?: string;
|
|
5
5
|
purpose?: GlobalMessagePurpose;
|
|
6
6
|
closable?: boolean;
|
|
7
|
+
onClose?: () => void;
|
|
7
8
|
} & HTMLAttributes<HTMLDivElement>;
|
|
8
9
|
export declare const GlobalMessage: import("react").ForwardRefExoticComponent<{
|
|
9
10
|
message?: string | undefined;
|
|
10
11
|
purpose?: GlobalMessagePurpose | undefined;
|
|
11
12
|
closable?: boolean | undefined;
|
|
13
|
+
onClose?: (() => void) | undefined;
|
|
12
14
|
} & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -6,6 +6,7 @@ export declare type LocalMessageProps = {
|
|
|
6
6
|
message?: string;
|
|
7
7
|
purpose?: LocalMessagePurpose;
|
|
8
8
|
closable?: boolean;
|
|
9
|
+
onClose?: () => void;
|
|
9
10
|
width?: CSS.WidthProperty<string>;
|
|
10
11
|
layout?: LocalMessageLayout;
|
|
11
12
|
} & HTMLAttributes<HTMLDivElement>;
|
|
@@ -13,6 +14,7 @@ export declare const LocalMessage: import("react").ForwardRefExoticComponent<{
|
|
|
13
14
|
message?: string | undefined;
|
|
14
15
|
purpose?: LocalMessagePurpose | undefined;
|
|
15
16
|
closable?: boolean | undefined;
|
|
17
|
+
onClose?: (() => void) | undefined;
|
|
16
18
|
width?: string | undefined;
|
|
17
19
|
layout?: LocalMessageLayout | undefined;
|
|
18
20
|
} & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
package/dist/index.es.js
CHANGED
|
@@ -28920,8 +28920,9 @@ var GlobalMessage = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
28920
28920
|
_b = _a.purpose,
|
|
28921
28921
|
purpose = _b === void 0 ? 'info' : _b,
|
|
28922
28922
|
closable = _a.closable,
|
|
28923
|
+
onClose = _a.onClose,
|
|
28923
28924
|
children = _a.children,
|
|
28924
|
-
rest = __rest(_a, ["message", "purpose", "closable", "children"]);
|
|
28925
|
+
rest = __rest(_a, ["message", "purpose", "closable", "onClose", "children"]);
|
|
28925
28926
|
|
|
28926
28927
|
var _c = useState(false),
|
|
28927
28928
|
isClosed = _c[0],
|
|
@@ -28952,7 +28953,8 @@ var GlobalMessage = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
28952
28953
|
purpose: buttonPurpose,
|
|
28953
28954
|
appearance: "borderless",
|
|
28954
28955
|
onClick: function onClick() {
|
|
28955
|
-
|
|
28956
|
+
setClosed(true);
|
|
28957
|
+
onClose && onClose();
|
|
28956
28958
|
},
|
|
28957
28959
|
size: "small"
|
|
28958
28960
|
}, void 0)
|
|
@@ -29202,12 +29204,13 @@ var LocalMessage = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
29202
29204
|
_b = _a.purpose,
|
|
29203
29205
|
purpose = _b === void 0 ? 'info' : _b,
|
|
29204
29206
|
closable = _a.closable,
|
|
29207
|
+
onClose = _a.onClose,
|
|
29205
29208
|
_c = _a.width,
|
|
29206
29209
|
width = _c === void 0 ? localMessageTokens.container.defaultWidth : _c,
|
|
29207
29210
|
_d = _a.layout,
|
|
29208
29211
|
layout = _d === void 0 ? 'horisontal' : _d,
|
|
29209
29212
|
children = _a.children,
|
|
29210
|
-
rest = __rest(_a, ["message", "purpose", "closable", "width", "layout", "children"]);
|
|
29213
|
+
rest = __rest(_a, ["message", "purpose", "closable", "onClose", "width", "layout", "children"]);
|
|
29211
29214
|
|
|
29212
29215
|
var _e = useState(false),
|
|
29213
29216
|
isClosed = _e[0],
|
|
@@ -29243,7 +29246,8 @@ var LocalMessage = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
29243
29246
|
purpose: buttonPurpose,
|
|
29244
29247
|
appearance: "borderless",
|
|
29245
29248
|
onClick: function onClick() {
|
|
29246
|
-
|
|
29249
|
+
setClosed(true);
|
|
29250
|
+
onClose && onClose();
|
|
29247
29251
|
},
|
|
29248
29252
|
size: "small"
|
|
29249
29253
|
}, void 0);
|
package/dist/index.js
CHANGED
|
@@ -28948,8 +28948,9 @@ var GlobalMessage = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
28948
28948
|
_b = _a.purpose,
|
|
28949
28949
|
purpose = _b === void 0 ? 'info' : _b,
|
|
28950
28950
|
closable = _a.closable,
|
|
28951
|
+
onClose = _a.onClose,
|
|
28951
28952
|
children = _a.children,
|
|
28952
|
-
rest = __rest(_a, ["message", "purpose", "closable", "children"]);
|
|
28953
|
+
rest = __rest(_a, ["message", "purpose", "closable", "onClose", "children"]);
|
|
28953
28954
|
|
|
28954
28955
|
var _c = React.useState(false),
|
|
28955
28956
|
isClosed = _c[0],
|
|
@@ -28980,7 +28981,8 @@ var GlobalMessage = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
28980
28981
|
purpose: buttonPurpose,
|
|
28981
28982
|
appearance: "borderless",
|
|
28982
28983
|
onClick: function onClick() {
|
|
28983
|
-
|
|
28984
|
+
setClosed(true);
|
|
28985
|
+
onClose && onClose();
|
|
28984
28986
|
},
|
|
28985
28987
|
size: "small"
|
|
28986
28988
|
}, void 0)
|
|
@@ -29230,12 +29232,13 @@ var LocalMessage = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
29230
29232
|
_b = _a.purpose,
|
|
29231
29233
|
purpose = _b === void 0 ? 'info' : _b,
|
|
29232
29234
|
closable = _a.closable,
|
|
29235
|
+
onClose = _a.onClose,
|
|
29233
29236
|
_c = _a.width,
|
|
29234
29237
|
width = _c === void 0 ? localMessageTokens.container.defaultWidth : _c,
|
|
29235
29238
|
_d = _a.layout,
|
|
29236
29239
|
layout = _d === void 0 ? 'horisontal' : _d,
|
|
29237
29240
|
children = _a.children,
|
|
29238
|
-
rest = __rest(_a, ["message", "purpose", "closable", "width", "layout", "children"]);
|
|
29241
|
+
rest = __rest(_a, ["message", "purpose", "closable", "onClose", "width", "layout", "children"]);
|
|
29239
29242
|
|
|
29240
29243
|
var _e = React.useState(false),
|
|
29241
29244
|
isClosed = _e[0],
|
|
@@ -29271,7 +29274,8 @@ var LocalMessage = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
29271
29274
|
purpose: buttonPurpose,
|
|
29272
29275
|
appearance: "borderless",
|
|
29273
29276
|
onClick: function onClick() {
|
|
29274
|
-
|
|
29277
|
+
setClosed(true);
|
|
29278
|
+
onClose && onClose();
|
|
29275
29279
|
},
|
|
29276
29280
|
size: "small"
|
|
29277
29281
|
}, void 0);
|