@dt-dds/react-toast 1.0.0-beta.73 → 1.0.0-beta.75
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 +13 -0
- package/dist/index.js +13 -13
- package/dist/index.mjs +13 -13
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @dt-ui/react-toast
|
|
2
2
|
|
|
3
|
+
## 1.0.0-beta.75
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fix: change prop name
|
|
8
|
+
- @dt-dds/react-button@1.0.0-beta.58
|
|
9
|
+
|
|
10
|
+
## 1.0.0-beta.74
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- @dt-dds/react-button@1.0.0-beta.57
|
|
15
|
+
|
|
3
16
|
## 1.0.0-beta.73
|
|
4
17
|
|
|
5
18
|
### Minor Changes
|
package/dist/index.js
CHANGED
|
@@ -163,19 +163,19 @@ var ToastStyled = import_styled.default.div`
|
|
|
163
163
|
animation: ${fadeIn} 0.75s ease-in;
|
|
164
164
|
transition: all 0.75s ease-in-out;
|
|
165
165
|
overflow: hidden;
|
|
166
|
-
${({ theme, isVisible,
|
|
167
|
-
border: 1px solid ${theme.palette[
|
|
168
|
-
border-left: 6px solid ${theme.palette[
|
|
169
|
-
background-color: ${theme.palette[
|
|
166
|
+
${({ theme, isVisible, type }) => `
|
|
167
|
+
border: 1px solid ${theme.palette[type].default};
|
|
168
|
+
border-left: 6px solid ${theme.palette[type].default};
|
|
169
|
+
background-color: ${theme.palette[type].light};
|
|
170
170
|
opacity: ${isVisible ? 1 : 0};
|
|
171
171
|
border-radius: ${theme.shape.toast};
|
|
172
172
|
padding: ${theme.spacing.spacing_50} ${theme.spacing.spacing_50} ${theme.spacing.spacing_50} ${theme.spacing.spacing_30};
|
|
173
173
|
`}
|
|
174
174
|
`;
|
|
175
175
|
var ToastMessageStyled = import_styled.default.div`
|
|
176
|
-
${({ theme,
|
|
176
|
+
${({ theme, type }) => `
|
|
177
177
|
${theme.fontStyles.bodyMdRegular};
|
|
178
|
-
color: ${theme.palette[
|
|
178
|
+
color: ${theme.palette[type].dark};
|
|
179
179
|
overflow: hidden;
|
|
180
180
|
word-break: break-word;
|
|
181
181
|
hyphens: auto;
|
|
@@ -204,7 +204,7 @@ var ToastButtonCloseStyled = import_styled.default.button`
|
|
|
204
204
|
`}
|
|
205
205
|
`;
|
|
206
206
|
var ActionsContainer = import_styled.default.div`
|
|
207
|
-
${({ theme,
|
|
207
|
+
${({ theme, type }) => `
|
|
208
208
|
display: flex;
|
|
209
209
|
flex-direction: row;
|
|
210
210
|
justify-content: flex-end;
|
|
@@ -212,11 +212,11 @@ var ActionsContainer = import_styled.default.div`
|
|
|
212
212
|
margin-top: ${theme.spacing.spacing_30};
|
|
213
213
|
|
|
214
214
|
button {
|
|
215
|
-
color: ${theme.palette[
|
|
215
|
+
color: ${theme.palette[type].dark};
|
|
216
216
|
|
|
217
217
|
&:hover {
|
|
218
|
-
background-color: ${theme.palette[
|
|
219
|
-
color: ${theme.palette[
|
|
218
|
+
background-color: ${theme.palette[type].medium};
|
|
219
|
+
color: ${theme.palette[type].dark};
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
222
|
`}
|
|
@@ -248,7 +248,7 @@ var Toast = ({
|
|
|
248
248
|
{
|
|
249
249
|
"data-testid": dataTest,
|
|
250
250
|
isVisible,
|
|
251
|
-
|
|
251
|
+
type,
|
|
252
252
|
children: [
|
|
253
253
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
254
254
|
import_react_box.Box,
|
|
@@ -282,8 +282,8 @@ var Toast = ({
|
|
|
282
282
|
]
|
|
283
283
|
}
|
|
284
284
|
),
|
|
285
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToastMessageStyled, {
|
|
286
|
-
Boolean(children) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ActionsContainer, {
|
|
285
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToastMessageStyled, { type, children: message }),
|
|
286
|
+
Boolean(children) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ActionsContainer, { type, children }) : null
|
|
287
287
|
]
|
|
288
288
|
},
|
|
289
289
|
id
|
package/dist/index.mjs
CHANGED
|
@@ -151,19 +151,19 @@ var ToastStyled = styled.div`
|
|
|
151
151
|
animation: ${fadeIn} 0.75s ease-in;
|
|
152
152
|
transition: all 0.75s ease-in-out;
|
|
153
153
|
overflow: hidden;
|
|
154
|
-
${({ theme, isVisible,
|
|
155
|
-
border: 1px solid ${theme.palette[
|
|
156
|
-
border-left: 6px solid ${theme.palette[
|
|
157
|
-
background-color: ${theme.palette[
|
|
154
|
+
${({ theme, isVisible, type }) => `
|
|
155
|
+
border: 1px solid ${theme.palette[type].default};
|
|
156
|
+
border-left: 6px solid ${theme.palette[type].default};
|
|
157
|
+
background-color: ${theme.palette[type].light};
|
|
158
158
|
opacity: ${isVisible ? 1 : 0};
|
|
159
159
|
border-radius: ${theme.shape.toast};
|
|
160
160
|
padding: ${theme.spacing.spacing_50} ${theme.spacing.spacing_50} ${theme.spacing.spacing_50} ${theme.spacing.spacing_30};
|
|
161
161
|
`}
|
|
162
162
|
`;
|
|
163
163
|
var ToastMessageStyled = styled.div`
|
|
164
|
-
${({ theme,
|
|
164
|
+
${({ theme, type }) => `
|
|
165
165
|
${theme.fontStyles.bodyMdRegular};
|
|
166
|
-
color: ${theme.palette[
|
|
166
|
+
color: ${theme.palette[type].dark};
|
|
167
167
|
overflow: hidden;
|
|
168
168
|
word-break: break-word;
|
|
169
169
|
hyphens: auto;
|
|
@@ -192,7 +192,7 @@ var ToastButtonCloseStyled = styled.button`
|
|
|
192
192
|
`}
|
|
193
193
|
`;
|
|
194
194
|
var ActionsContainer = styled.div`
|
|
195
|
-
${({ theme,
|
|
195
|
+
${({ theme, type }) => `
|
|
196
196
|
display: flex;
|
|
197
197
|
flex-direction: row;
|
|
198
198
|
justify-content: flex-end;
|
|
@@ -200,11 +200,11 @@ var ActionsContainer = styled.div`
|
|
|
200
200
|
margin-top: ${theme.spacing.spacing_30};
|
|
201
201
|
|
|
202
202
|
button {
|
|
203
|
-
color: ${theme.palette[
|
|
203
|
+
color: ${theme.palette[type].dark};
|
|
204
204
|
|
|
205
205
|
&:hover {
|
|
206
|
-
background-color: ${theme.palette[
|
|
207
|
-
color: ${theme.palette[
|
|
206
|
+
background-color: ${theme.palette[type].medium};
|
|
207
|
+
color: ${theme.palette[type].dark};
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
210
|
`}
|
|
@@ -236,7 +236,7 @@ var Toast = ({
|
|
|
236
236
|
{
|
|
237
237
|
"data-testid": dataTest,
|
|
238
238
|
isVisible,
|
|
239
|
-
|
|
239
|
+
type,
|
|
240
240
|
children: [
|
|
241
241
|
/* @__PURE__ */ jsxs(
|
|
242
242
|
import_react_box.Box,
|
|
@@ -270,8 +270,8 @@ var Toast = ({
|
|
|
270
270
|
]
|
|
271
271
|
}
|
|
272
272
|
),
|
|
273
|
-
/* @__PURE__ */ jsx(ToastMessageStyled, {
|
|
274
|
-
Boolean(children) ? /* @__PURE__ */ jsx(ActionsContainer, {
|
|
273
|
+
/* @__PURE__ */ jsx(ToastMessageStyled, { type, children: message }),
|
|
274
|
+
Boolean(children) ? /* @__PURE__ */ jsx(ActionsContainer, { type, children }) : null
|
|
275
275
|
]
|
|
276
276
|
},
|
|
277
277
|
id
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dt-dds/react-toast",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.75",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dist/index.js"
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"test:update:snapshot": "jest -u"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@dt-dds/react-button": "1.0.0-beta.
|
|
23
|
+
"@dt-dds/react-button": "1.0.0-beta.58",
|
|
24
24
|
"@dt-dds/react-core": "1.0.0-beta.49",
|
|
25
25
|
"@dt-dds/react-icon": "1.0.0-beta.50",
|
|
26
26
|
"@dt-dds/react-typography": "1.0.0-beta.40",
|