kitzo 2.3.16 → 2.3.18

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/index.d.ts CHANGED
@@ -13,13 +13,7 @@ declare type AnimationOptions = {
13
13
 
14
14
  declare type CopyStatus = 'standby' | 'copying' | 'copied' | 'error';
15
15
 
16
- declare type CustomToastOptions = Omit<ToastOptions, 'type' | 'showIcon' | 'icon'>;
17
-
18
- declare type ErrorToastOptions = ToastOptionsWithoutType;
19
-
20
- declare type InfoToastOptions = ToastOptionsWithoutType;
21
-
22
- declare type LoadingToastOptions = ToastOptionsWithoutType;
16
+ declare type Options = ToastOptionsWithoutType;
23
17
 
24
18
  declare type Position = 'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end';
25
19
 
@@ -35,8 +29,6 @@ declare type PromiseToastMsgs<T, E = unknown> = {
35
29
 
36
30
  declare type PromiseToastOptions = Omit<ToastOptions, 'id' | 'type'>;
37
31
 
38
- declare type SuccessToastOptions = ToastOptionsWithoutType;
39
-
40
32
  export declare const toast: ToastFn;
41
33
 
42
34
  declare type ToastContent = ((dismiss: () => void) => ReactNode) | ReactNode;
@@ -54,13 +46,13 @@ declare type ToasterProps = {
54
46
 
55
47
  declare type ToastFn = {
56
48
  (content: ToastContent, options?: ToastOptions): void;
57
- info: (content: ToastContent, options?: InfoToastOptions) => void;
58
- success: (content: ToastContent, options?: SuccessToastOptions) => void;
59
- warning: (content: ToastContent, options?: WarningToastOptions) => void;
60
- error: (content: ToastContent, options?: ErrorToastOptions) => void;
49
+ info: (content: ToastContent, options?: Options) => void;
50
+ success: (content: ToastContent, options?: Options) => void;
51
+ warning: (content: ToastContent, options?: Options) => void;
52
+ error: (content: ToastContent, options?: Options) => void;
61
53
  promise: PromiseToastFn;
62
- loading: (content: ToastContent, options?: LoadingToastOptions) => void;
63
- custom: (content: ToastContent, options?: CustomToastOptions) => void;
54
+ loading: (content: ToastContent, options?: Options) => void;
55
+ custom: (content: ToastContent, options?: Options) => void;
64
56
  dismiss: (id?: string | number) => void;
65
57
  update: (id: string | number, content: ToastContent, options?: UpdateToastOptions) => void;
66
58
  };
@@ -128,6 +120,4 @@ declare type UseWindowSizeOptions = {
128
120
  updateDelay?: number;
129
121
  };
130
122
 
131
- declare type WarningToastOptions = ToastOptionsWithoutType;
132
-
133
123
  export { }
@@ -9,11 +9,9 @@ function H(n) {
9
9
  content: r,
10
10
  children: t,
11
11
  position: c = "top",
12
- // arrowStyle = {},
13
12
  animation: i = !0,
14
13
  isHidden: s = !1,
15
14
  offset: m = 8,
16
- // arrow = false,
17
15
  smartHover: l = !0,
18
16
  hideOnTouch: f = !0
19
17
  } = n;
@@ -1,5 +1,4 @@
1
- const o = `/* Default styling */
2
- .kitzo-tooltip-root {
1
+ const o = `.kitzo-tooltip-root {
3
2
  --bg-clr: hsl(0, 0%, 15%);
4
3
  --text-clr: hsl(0, 0%, 95%);
5
4
 
@@ -65,6 +64,7 @@ const o = `/* Default styling */
65
64
  translate: 0 0;
66
65
  }
67
66
  .kitzo-tooltip-wrapper.top.end {
67
+ left: auto;
68
68
  right: 0;
69
69
  translate: 0 0;
70
70
  }
@@ -180,44 +180,6 @@ const o = `/* Default styling */
180
180
  .kitzo-tooltip-wrapper {
181
181
  pointer-events: all;
182
182
  }
183
- }
184
-
185
- /* Arrow */
186
- .kitzo-tooltip-content.tooltip-arrow {
187
- --effective-size: calc(var(--arrow-size, 6) * 1px);
188
- --effective-color: var(--arrow-color, var(--bg-clr));
189
-
190
- position: relative;
191
- }
192
- .kitzo-tooltip-content.tooltip-arrow::before {
193
- content: '';
194
- position: absolute;
195
- z-index: -1;
196
- border: var(--effective-size) solid transparent;
197
- }
198
- .kitzo-tooltip-content.tooltip-arrow.top::before {
199
- left: 50%;
200
- translate: -50% 0;
201
- top: calc(100% - 1px);
202
- border-top: var(--effective-size) solid var(--effective-color);
203
- }
204
- .kitzo-tooltip-content.tooltip-arrow.right::before {
205
- top: 50%;
206
- translate: 0 -50%;
207
- right: calc(100% - 1px);
208
- border-right: var(--effective-size) solid var(--effective-color);
209
- }
210
- .kitzo-tooltip-content.tooltip-arrow.bottom::before {
211
- left: 50%;
212
- translate: -50% 0;
213
- bottom: calc(100% - 1px);
214
- border-bottom: var(--effective-size) solid var(--effective-color);
215
- }
216
- .kitzo-tooltip-content.tooltip-arrow.left::before {
217
- top: 50%;
218
- translate: 0 -50%;
219
- left: calc(100% - 1px);
220
- border-left: var(--effective-size) solid var(--effective-color);
221
183
  }`;
222
184
  function i() {
223
185
  if (!document.getElementById("kitzo-tooltip-styles")) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kitzo",
3
- "version": "2.3.16",
3
+ "version": "2.3.18",
4
4
  "description": "A lightweight React micro-utility.",
5
5
  "type": "module",
6
6
  "files": [