d9-toast 2.5.36 → 2.5.38

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/Toast.js CHANGED
@@ -37,7 +37,7 @@ var Toast = function Toast(_ref) {
37
37
  _ref$expand = _ref.expand,
38
38
  expand = _ref$expand === void 0 ? "hover" : _ref$expand,
39
39
  _ref$duration = _ref.duration,
40
- duration = _ref$duration === void 0 ? 4000 : _ref$duration,
40
+ duration = _ref$duration === void 0 ? 3000 : _ref$duration,
41
41
  _ref$actions = _ref.actions,
42
42
  actions = _ref$actions === void 0 ? [] : _ref$actions,
43
43
  remove = _ref.remove,
@@ -110,7 +110,7 @@ var Toast = function Toast(_ref) {
110
110
  return actions.slice(0, 2).map(function (a, idx) {
111
111
  // Dynamic class names..
112
112
  var btnType = actions.length === 1 ? "action-btnA__".concat(type) : idx === 0 ? "action-btnB__".concat(type) : "action-btnA__".concat(type);
113
- var classNameStr = "action-btn ".concat(theme === "colored" ? "" : btnType, " ").concat(a.className || "").trim();
113
+ var classNameStr = "action-btn ".concat(theme === "colored" ? theme : btnType, " ").concat(a.className || "").trim();
114
114
  return /*#__PURE__*/_jsx("button", {
115
115
  "aria-label": "Action ".concat(a.text),
116
116
  onClick: function onClick() {
@@ -16,7 +16,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
16
16
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
17
17
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
18
18
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
19
- import React, { useCallback, useRef, useState } from "react";
19
+ import React, { useCallback, useRef, useState, useEffect } from "react";
20
20
  import Toast from "./Toast.js";
21
21
 
22
22
  // Audio.
package/dist/toast.css CHANGED
@@ -26,7 +26,6 @@
26
26
 
27
27
  --line-height-base: 1.5;
28
28
  --font-size-base: 14px;
29
-
30
29
  }
31
30
 
32
31
  /* Theme colors */
@@ -50,7 +49,6 @@
50
49
  --loading-bg: rgba(106, 31, 176, 0.1);
51
50
 
52
51
  --border-color: lch(91.6% 2.18 271.57);
53
-
54
52
  }
55
53
 
56
54
  .d9-toast.dark {
@@ -73,7 +71,6 @@
73
71
  --loading-bg: #ab4fff25;
74
72
 
75
73
  --border-color: #ffffff15;
76
-
77
74
  }
78
75
 
79
76
  /* Defaults */
@@ -143,7 +140,7 @@
143
140
  .toastContainer {
144
141
  position: relative;
145
142
  width: 100vw;
146
- max-width: 425px;
143
+ max-width: 375px;
147
144
  min-height: 60px;
148
145
  pointer-events: none;
149
146
  }
@@ -171,7 +168,7 @@
171
168
  position: relative;
172
169
  top: 0;
173
170
  min-width: 250px;
174
- max-width: 425px;
171
+ max-width: 375px;
175
172
  max-height: 425px;
176
173
  display: flex;
177
174
  flex-direction: column;
@@ -183,13 +180,24 @@
183
180
  font-size: var(--font-size-base);
184
181
  line-height: var(--line-height-base);
185
182
  text-align: start;
186
- font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
187
- Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
183
+ font-family:
184
+ system-ui,
185
+ -apple-system,
186
+ BlinkMacSystemFont,
187
+ "Segoe UI",
188
+ Roboto,
189
+ Oxygen,
190
+ Ubuntu,
191
+ Cantarell,
192
+ "Open Sans",
193
+ "Helvetica Neue",
194
+ sans-serif;
188
195
  will-change: transform, opacity;
189
196
  background-color: var(--primary-bg);
190
197
  color: var(--primary-color);
191
198
  border: 1px solid var(--border-color);
192
- transition: transform 650ms cubic-bezier(0.165, 0.84, 0.44, 1),
199
+ transition:
200
+ transform 650ms cubic-bezier(0.165, 0.84, 0.44, 1),
193
201
  opacity 300ms ease;
194
202
  pointer-events: auto;
195
203
  }
@@ -316,6 +324,11 @@
316
324
  filter: grayscale(1);
317
325
  }
318
326
 
327
+ .colored {
328
+ color: #000000;
329
+ background-color: #ffffff;
330
+ }
331
+
319
332
  /* Action button 1 */
320
333
  .action-btnA__success {
321
334
  color: var(--primary-bg);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "d9-toast",
3
- "version": "2.5.36",
3
+ "version": "2.5.38",
4
4
  "description": "Customizable toast notifications for React",
5
5
  "homepage": "https://psathul073.github.io/d9-toast-docs/",
6
6
  "repository": {