@dt-dds/react-message 1.0.0-beta.102 → 1.0.0-beta.104
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 +20 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -6
- package/dist/index.mjs +2 -2
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @dt-ui/react-message
|
|
2
2
|
|
|
3
|
+
## 1.0.0-beta.104
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- @dt-dds/react-button@1.0.0-beta.88
|
|
8
|
+
|
|
9
|
+
## 1.0.0-beta.103
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- fix(config): update ESLint, TS, and Storybook config
|
|
14
|
+
- fix(icon-button): add missing @dt-dds/react-icon devDependency
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
- @dt-dds/react-button@1.0.0-beta.87
|
|
18
|
+
- @dt-dds/react-core@1.0.0-beta.52
|
|
19
|
+
- @dt-dds/react-icon@1.0.0-beta.55
|
|
20
|
+
- @dt-dds/react-typography@1.0.0-beta.43
|
|
21
|
+
- @dt-dds/themes@1.0.0-beta.10
|
|
22
|
+
|
|
3
23
|
## 1.0.0-beta.102
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CustomTheme } from '@dt-dds/themes';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
-
import { BaseProps, Orientation } from '@dt-dds/react-core';
|
|
4
3
|
import { ReactNode } from 'react';
|
|
4
|
+
import { BaseProps, Orientation } from '@dt-dds/react-core';
|
|
5
5
|
|
|
6
6
|
declare const OMessageType: {
|
|
7
7
|
readonly Default: "default";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CustomTheme } from '@dt-dds/themes';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
-
import { BaseProps, Orientation } from '@dt-dds/react-core';
|
|
4
3
|
import { ReactNode } from 'react';
|
|
4
|
+
import { BaseProps, Orientation } from '@dt-dds/react-core';
|
|
5
5
|
|
|
6
6
|
declare const OMessageType: {
|
|
7
7
|
readonly Default: "default";
|
package/dist/index.js
CHANGED
|
@@ -109,12 +109,12 @@ __export(index_exports, {
|
|
|
109
109
|
module.exports = __toCommonJS(index_exports);
|
|
110
110
|
|
|
111
111
|
// src/Message.tsx
|
|
112
|
+
var import_react = require("react");
|
|
113
|
+
var import_react2 = require("@emotion/react");
|
|
112
114
|
var import_react_box = __toESM(require_dist());
|
|
113
115
|
var import_react_core = require("@dt-dds/react-core");
|
|
114
116
|
var import_react_icon = require("@dt-dds/react-icon");
|
|
115
117
|
var import_react_typography = require("@dt-dds/react-typography");
|
|
116
|
-
var import_react = require("@emotion/react");
|
|
117
|
-
var import_react2 = require("react");
|
|
118
118
|
|
|
119
119
|
// src/types/index.ts
|
|
120
120
|
var OMessageType = {
|
|
@@ -236,7 +236,7 @@ var Message = ({
|
|
|
236
236
|
title,
|
|
237
237
|
orientation: propOrientation = "horizontal"
|
|
238
238
|
}) => {
|
|
239
|
-
const theme = (0,
|
|
239
|
+
const theme = (0, import_react2.useTheme)();
|
|
240
240
|
const isDefault = type === OMessageType.Default;
|
|
241
241
|
const isMobile = (0, import_react_core.useMedia)(`(max-width: ${theme.breakpoints.mq2}px)`);
|
|
242
242
|
const orientation = isMobile ? "vertical" : propOrientation || "horizontal";
|
|
@@ -244,9 +244,9 @@ var Message = ({
|
|
|
244
244
|
const isDismissible = !!onClose;
|
|
245
245
|
const textColor = isDefault ? "content.default" : `${type}.dark`;
|
|
246
246
|
const iconColor = isDefault ? theme.palette.content.default : theme.palette[type].dark;
|
|
247
|
-
const clonedChildren = (0,
|
|
248
|
-
() =>
|
|
249
|
-
return child && (0,
|
|
247
|
+
const clonedChildren = (0, import_react.useMemo)(
|
|
248
|
+
() => import_react.Children.map(children, (child) => {
|
|
249
|
+
return child && (0, import_react.cloneElement)(child, __spreadProps(__spreadValues({}, child.props), {
|
|
250
250
|
type
|
|
251
251
|
}));
|
|
252
252
|
}),
|
package/dist/index.mjs
CHANGED
|
@@ -103,11 +103,11 @@ var require_dist = __commonJS({
|
|
|
103
103
|
|
|
104
104
|
// src/Message.tsx
|
|
105
105
|
var import_react_box = __toESM(require_dist());
|
|
106
|
+
import { Children, cloneElement, useMemo } from "react";
|
|
107
|
+
import { useTheme } from "@emotion/react";
|
|
106
108
|
import { useMedia } from "@dt-dds/react-core";
|
|
107
109
|
import { Icon } from "@dt-dds/react-icon";
|
|
108
110
|
import { Typography } from "@dt-dds/react-typography";
|
|
109
|
-
import { useTheme } from "@emotion/react";
|
|
110
|
-
import { Children, cloneElement, useMemo } from "react";
|
|
111
111
|
|
|
112
112
|
// src/types/index.ts
|
|
113
113
|
var OMessageType = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dt-dds/react-message",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.104",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dist/index.js"
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
"test:update:snapshot": "jest -u"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@dt-dds/react-button": "1.0.0-beta.
|
|
24
|
-
"@dt-dds/react-core": "1.0.0-beta.
|
|
25
|
-
"@dt-dds/react-icon": "1.0.0-beta.
|
|
26
|
-
"@dt-dds/react-typography": "1.0.0-beta.
|
|
27
|
-
"@dt-dds/themes": "1.0.0-beta.
|
|
23
|
+
"@dt-dds/react-button": "1.0.0-beta.88",
|
|
24
|
+
"@dt-dds/react-core": "1.0.0-beta.52",
|
|
25
|
+
"@dt-dds/react-icon": "1.0.0-beta.55",
|
|
26
|
+
"@dt-dds/react-typography": "1.0.0-beta.43",
|
|
27
|
+
"@dt-dds/themes": "1.0.0-beta.10"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@babel/core": "^7.22.9",
|