kitzo 2.0.10 → 2.0.12

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/README.md CHANGED
@@ -25,7 +25,7 @@ npm i kitzo
25
25
  or
26
26
 
27
27
  ```javascript
28
- <script src="https://cdn.jsdelivr.net/npm/kitzo@2.0.10/dist/kitzo.umd.min.js"></script>
28
+ <script src="https://cdn.jsdelivr.net/npm/kitzo@2.0.12/dist/kitzo.umd.min.js"></script>
29
29
  ```
30
30
 
31
31
  > Attach this script tag in the html head tag and you are good to go.
package/dist/react.esm.js CHANGED
@@ -3,13 +3,10 @@ import React, { useRef, useLayoutEffect, useState, useEffect } from 'react';
3
3
  const listeners = new Set();
4
4
  let isStyleAdded = false;
5
5
  function toastStyles() {
6
- return `@layer base {
7
- .toast-content,
8
- .toast-content-bottom {
9
- font-size: 0.925rem;
10
- }
6
+ return `.toast-content,
7
+ .toast-content-bottom {
8
+ font-size: 0.925rem;
11
9
  }
12
-
13
10
  .toast-content,
14
11
  .toast-content-bottom {
15
12
  pointer-events: all;
@@ -332,6 +329,7 @@ function Toast({
332
329
  setToasts(prev => {
333
330
  const index = prev.findIndex(t => t.options.id === toast.options.id);
334
331
  if (index === -1) return prev;
332
+ if (prev[index].height === height) return prev;
335
333
  const newToasts = [...prev];
336
334
  newToasts[index] = {
337
335
  ...newToasts[index],
@@ -348,7 +346,6 @@ function Toast({
348
346
  const transformY = position.includes('bottom') ? `translateY(-${toast.offset || 0}px)` : `translateY(${toast.offset || 0}px)`;
349
347
  return /*#__PURE__*/React.createElement("div", {
350
348
  ref: ref,
351
- className: "toast",
352
349
  style: {
353
350
  transform: transformY,
354
351
  ...getToastPosition(position)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kitzo",
3
- "version": "2.0.10",
3
+ "version": "2.0.12",
4
4
  "description": "A lightweight JavaScript UI micro-library.",
5
5
  "type": "module",
6
6
  "main": "./dist/kitzo.umd.js",