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
|
|
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?:
|
|
58
|
-
success: (content: ToastContent, options?:
|
|
59
|
-
warning: (content: ToastContent, options?:
|
|
60
|
-
error: (content: ToastContent, options?:
|
|
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?:
|
|
63
|
-
custom: (content: ToastContent, options?:
|
|
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 { }
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
const o =
|
|
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")) {
|