kitzo 2.1.8 → 2.1.10

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
@@ -26,7 +26,7 @@ npm i kitzo
26
26
  or
27
27
 
28
28
  ```javascript
29
- <script src="https://cdn.jsdelivr.net/npm/kitzo@2.1.8/dist/kitzo.umd.min.js"></script>
29
+ <script src="https://cdn.jsdelivr.net/npm/kitzo@2.1.10/dist/kitzo.umd.min.js"></script>
30
30
  ```
31
31
 
32
32
  > Vanilla: Attach this script tag in the html head tag and you are good to go.
package/dist/react.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ReactNode, CSSProperties } from 'react';
1
+ import { type ReactNode, type CSSProperties, type JSX, type PropsWithChildren } from 'react';
2
2
 
3
3
  // Toast API types declaration
4
4
  export interface ToastOptions {
@@ -31,11 +31,13 @@ export declare const toast: ToastAPI;
31
31
  export declare function ToastContainer(props: { position?: 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right'; gap?: number }): JSX.Element;
32
32
 
33
33
  // Tooltip API types declaration
34
- export interface TooltipProps {
34
+ export interface TooltipCoreProps {
35
35
  content: string | ReactNode;
36
36
  position?: 'top' | 'right' | 'bottom' | 'left';
37
37
  offset?: number;
38
38
  hideOnTouch?: boolean;
39
39
  }
40
40
 
41
+ export type TooltipProps = PropsWithChildren<TooltipCoreProps>;
42
+
41
43
  export declare function Tooltip(props: TooltipProps): JSX.Element;
package/dist/react.esm.js CHANGED
@@ -201,7 +201,7 @@ function subscribe(callback) {
201
201
  function toast(text = 'Toast message', options = {}) {
202
202
  const id = Date.now();
203
203
  options = Object.assign({
204
- duration: 2000,
204
+ duration: 2800,
205
205
  id,
206
206
  style: {},
207
207
  showIcon: false
@@ -215,7 +215,7 @@ function toast(text = 'Toast message', options = {}) {
215
215
  toast.success = (text = 'Toast success', options = {}) => {
216
216
  const id = Date.now();
217
217
  options = Object.assign({
218
- duration: 2000,
218
+ duration: 2800,
219
219
  id,
220
220
  style: {},
221
221
  showIcon: true
@@ -229,7 +229,7 @@ toast.success = (text = 'Toast success', options = {}) => {
229
229
  toast.error = (text = 'Toast denied', options = {}) => {
230
230
  const id = Date.now();
231
231
  options = Object.assign({
232
- duration: 2000,
232
+ duration: 2800,
233
233
  id,
234
234
  style: {},
235
235
  showIcon: true
@@ -243,7 +243,7 @@ toast.error = (text = 'Toast denied', options = {}) => {
243
243
  toast.promise = (callback, msgs = {}, options = {}) => {
244
244
  const id = Date.now();
245
245
  options = Object.assign({
246
- duration: 2000,
246
+ duration: 2800,
247
247
  id,
248
248
  style: {},
249
249
  showIcon: true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kitzo",
3
- "version": "2.1.8",
3
+ "version": "2.1.10",
4
4
  "description": "A lightweight JavaScript UI micro-library.",
5
5
  "type": "module",
6
6
  "main": "./dist/kitzo.umd.js",
@@ -47,6 +47,7 @@
47
47
  "@rollup/plugin-babel": "^6.0.4",
48
48
  "@rollup/plugin-commonjs": "^28.0.6",
49
49
  "@rollup/plugin-node-resolve": "^16.0.1",
50
+ "@types/react": "^19.2.6",
50
51
  "@vitejs/plugin-react": "^5.0.4",
51
52
  "prettier": "^3.6.2",
52
53
  "react": "^19.1.1",