@witchcraft/ui 0.3.25 → 0.3.26
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/module.json +1 -1
- package/dist/runtime/assets/utils.css +1 -1
- package/dist/runtime/components/LibColorInput/LibColorInput.d.vue.ts +2 -2
- package/dist/runtime/components/LibColorInput/LibColorInput.vue.d.ts +2 -2
- package/dist/runtime/components/LibColorPicker/LibColorPicker.d.vue.ts +3 -3
- package/dist/runtime/components/LibColorPicker/LibColorPicker.vue.d.ts +3 -3
- package/dist/runtime/components/LibInputDeprecated/LibInputDeprecated.d.vue.ts +3 -3
- package/dist/runtime/components/LibInputDeprecated/LibInputDeprecated.vue.d.ts +3 -3
- package/dist/runtime/components/LibPopup/LibPopup.d.vue.ts +1 -1
- package/dist/runtime/components/LibPopup/LibPopup.vue.d.ts +1 -1
- package/dist/runtime/helpers/NotificationHandler.d.ts +6 -2
- package/dist/runtime/helpers/NotificationHandler.js +5 -8
- package/package.json +7 -7
- package/src/runtime/assets/utils.css +43 -0
- package/src/runtime/helpers/NotificationHandler.ts +7 -9
package/dist/module.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@custom-variant dark (&:where(.dark, .dark *));@utility focus-outline-within{@apply outlined-within:outline-2 outlined-within:outline-accent-500 outlined-within:outline-offset-2}@utility focus-outline{@apply outlined:outline-2 outlined:outline-accent-500 outlined:outline-offset-2}@utility focus-outline-no-offset{@apply outlined:outline-2 outlined:outline-accent-500}@utility focus-outline-hidden{@apply outlined:outline-none}@utility bg-squares-gradient{--_square:var(--squareSize,5px);--_double_square:calc(var(--_square)*2);--_light_square:var(--lightSquare,var(--color-white));--_dark_square:var(--darkSquare,var(--color-black));background-color:var(--_light_square);background:repeating-conic-gradient(var(--_dark_square) 0 25%,var(--_light_square) 0 50%) 50% /var(--_double_square) var(--_double_square)}@utility square-light-*{--lightSquare:--value(--color- *)}@utility square-dark-*{--darkSquare:--value(--color- *)}@utility square-size-*{--squareSize:calc(--value(integer) * 1px)}@utility bg-bars-gradient{--_bg_color:var(--bars-bg-color,var(--color-accent-700));--_fg_color:var(--bars-fg-color,var(--color-accent-800));--_angle:var(--bars-angle,45deg);--_fg_width:var(--bars-fg-width,50%);--_bg_width:calc(100% - var(--_fg_width));background-color:var(--_bg_color);--_pos_1:calc(var(--_bg_width)/2);--_pos_2:calc(var(--_bg_width)/2 + var(--_fg_width)/2);--_pos_3:calc(var(--_bg_width) + var(--_fg_width)/2);background-image:repeating-linear-gradient(var(--_angle),var(--_bg_color),var(--_bg_color) var(--_pos_1),var(--_fg_color) var(--_pos_1),var(--_fg_color) var(--_pos_2),var(--_bg_color) var(--_pos_2),var(--_bg_color) var(--_pos_3),var(--_fg_color) var(--_pos_3),var(--_fg_color))}@utility bars-angle-*{--bars-angle:var(--value(integer) * 1deg)}@utility bars-fg-*{--bars-fg-color:--value(--color-*)}@utility bars-bg-*{--bars-bg-color:--value(--color-*)}@utility bars-w-*{--bars-fg-width:calc(--value(integer) * 1%, 50%)}@utility scrollbar-hidden{-ms-overflow-style:none;scrollbar-width:none;&::-webkit-scrollbar{display:none}}@utility styled-scrollbar{--_scrollbar_width:var(--scrollbar-width,calc(var(--spacing)*3));--_scrollbar_border_width:var(--scrollbar-border-width,calc(var(--spacing)/2));--_scrollbar_color:var(--scrollbar-color,--alpha(var(--color-accent-500)/40%));--_scrollbar_hover_color:var(--scrollbar-hover-color,--alpha(var(--color-accent-500)/80%));--_scrollbar_bg_color:var(--scrollbar-bg-color,var(--color-bg));.dark &{--_scrollbar_bg_color:var(--scrollbar-bg-color,var(--color-fg))}&::-webkit-scrollbar{height:var(--_scrollbar_width);width:var(--_scrollbar_width)}&::-webkit-scrollbar-corner,&::-webkit-scrollbar-track{background-color:transparent}&::-webkit-scrollbar-thumb,&::-webkit-scrollbar-track{border-radius:var(--_scrollbar_width)}&::-webkit-scrollbar-thumb{background-color:var(--_scrollbar_color);border:var(--_scrollbar_border_width) solid var(--_scrollbar_bg_color)}&::-webkit-scrollbar-thumb:hover{cursor:pointer}&::-webkit-scrollbar-thumb:active,&::-webkit-scrollbar-thumb:hover{background-color:var(--_scrollbar_hover_color);border-radius:var(--_scrollbar_width)}}@utility styled-scrollbar-w-*{--scrollbar-width:--value(integer)}@utility styled-scrollbar-border-w-*{--scrollbar-border-width:--value(integer)}@utility styled-scrollbar-*{--scrollbar-color:--value(--color-*)}@utility styled-scrollbar-bg-*{--scrollbar-bg-color:--value(--color-*)}@utility styled-resizer{--_resizer_width:var(--resizer-width,8px);--_resizer_color:var(--resizer-color,var(--color-neutral-300));.dark &{--_resizer_color:var(--resizer-color,var(--color-neutral-700))}&::-webkit-resizer{border-bottom-color:var(--_resizer_color);border-left-color:transparent;border-right-color:var(--_resizer_color);border-style:solid;border-top-color:transparent;border-width:var(--_resizer_width)}}@utility styled-resizer-w-*{--resizer-width:--value(integer)}@utility styled-resizer-color-*{--resizer-color:--value(--color-*)}@utility content-vertical-holder{--tw-content:"\200b";content:var(--tw-content)}@utility no-touch-action{touch-action:none}@utility bg-transparency-squares{@apply bg-squares-gradient square-light-white square-dark-neutral-300 square-size-6}@utility link-like{@apply cursor-pointer hover:text-accent-500}@utility no-truncate{overflow:visible;text-overflow:unset;white-space:normal}
|
|
1
|
+
@custom-variant dark (&:where(.dark, .dark *));@utility focus-outline-within{@apply outlined-within:outline-2 outlined-within:outline-accent-500 outlined-within:outline-offset-2}@utility focus-outline{@apply outlined:outline-2 outlined:outline-accent-500 outlined:outline-offset-2}@utility focus-outline-no-offset{@apply outlined:outline-2 outlined:outline-accent-500}@utility focus-outline-hidden{@apply outlined:outline-none}@utility bg-squares-gradient{--_square:var(--squareSize,5px);--_double_square:calc(var(--_square)*2);--_light_square:var(--lightSquare,var(--color-white));--_dark_square:var(--darkSquare,var(--color-black));background-color:var(--_light_square);background:repeating-conic-gradient(var(--_dark_square) 0 25%,var(--_light_square) 0 50%) 50% /var(--_double_square) var(--_double_square)}@utility square-light-*{--lightSquare:--value(--color- *)}@utility square-dark-*{--darkSquare:--value(--color- *)}@utility square-size-*{--squareSize:calc(--value(integer) * 1px)}@utility bg-bars-gradient{--_bg_color:var(--bars-bg-color,var(--color-accent-700));--_fg_color:var(--bars-fg-color,var(--color-accent-800));--_angle:var(--bars-angle,45deg);--_fg_width:var(--bars-fg-width,50%);--_bg_width:calc(100% - var(--_fg_width));background-color:var(--_bg_color);--_pos_1:calc(var(--_bg_width)/2);--_pos_2:calc(var(--_bg_width)/2 + var(--_fg_width)/2);--_pos_3:calc(var(--_bg_width) + var(--_fg_width)/2);background-image:repeating-linear-gradient(var(--_angle),var(--_bg_color),var(--_bg_color) var(--_pos_1),var(--_fg_color) var(--_pos_1),var(--_fg_color) var(--_pos_2),var(--_bg_color) var(--_pos_2),var(--_bg_color) var(--_pos_3),var(--_fg_color) var(--_pos_3),var(--_fg_color))}@utility bars-angle-*{--bars-angle:var(--value(integer) * 1deg)}@utility bars-fg-*{--bars-fg-color:--value(--color-*)}@utility bars-bg-*{--bars-bg-color:--value(--color-*)}@utility bars-w-*{--bars-fg-width:calc(--value(integer) * 1%, 50%)}@utility mix-from-*{--mix-from:--value(--color-*);--mix:color-mix(in srgb,var(--mix-from),var(--mix-to,transparent) var(--mix-percentage,50%))}@utility mix-to-*{--mix-to:--value(--color-*);--mix-percentage:calc(--modifier(integer) * 1%);--mix:color-mix(in srgb,var(--mix-from),var(--mix-to,transparent) var(--mix-percentage,50%))}@utility tint-*{--mix-from:--value(--color-*);--mix-to:#fff;--mix-percentage:calc(--modifier(integer) * 1%);--mix:color-mix(in srgb,var(--mix-from),var(--mix-to) var(--mix-percentage,20%))}@utility shade-*{--mix-from:--value(--color-*);--mix-to:#000;--mix-percentage:calc(--modifier(integer) * 1%);--mix:color-mix(in srgb,var(--mix-from),var(--mix-to) var(--mix-percentage))}@utility scrollbar-hidden{-ms-overflow-style:none;scrollbar-width:none;&::-webkit-scrollbar{display:none}}@utility styled-scrollbar{--_scrollbar_width:var(--scrollbar-width,calc(var(--spacing)*3));--_scrollbar_border_width:var(--scrollbar-border-width,calc(var(--spacing)/2));--_scrollbar_color:var(--scrollbar-color,--alpha(var(--color-accent-500)/40%));--_scrollbar_hover_color:var(--scrollbar-hover-color,--alpha(var(--color-accent-500)/80%));--_scrollbar_bg_color:var(--scrollbar-bg-color,var(--color-bg));.dark &{--_scrollbar_bg_color:var(--scrollbar-bg-color,var(--color-fg))}&::-webkit-scrollbar{height:var(--_scrollbar_width);width:var(--_scrollbar_width)}&::-webkit-scrollbar-corner,&::-webkit-scrollbar-track{background-color:transparent}&::-webkit-scrollbar-thumb,&::-webkit-scrollbar-track{border-radius:var(--_scrollbar_width)}&::-webkit-scrollbar-thumb{background-color:var(--_scrollbar_color);border:var(--_scrollbar_border_width) solid var(--_scrollbar_bg_color)}&::-webkit-scrollbar-thumb:hover{cursor:pointer}&::-webkit-scrollbar-thumb:active,&::-webkit-scrollbar-thumb:hover{background-color:var(--_scrollbar_hover_color);border-radius:var(--_scrollbar_width)}}@utility styled-scrollbar-w-*{--scrollbar-width:--value(integer)}@utility styled-scrollbar-border-w-*{--scrollbar-border-width:--value(integer)}@utility styled-scrollbar-*{--scrollbar-color:--value(--color-*)}@utility styled-scrollbar-bg-*{--scrollbar-bg-color:--value(--color-*)}@utility styled-resizer{--_resizer_width:var(--resizer-width,8px);--_resizer_color:var(--resizer-color,var(--color-neutral-300));.dark &{--_resizer_color:var(--resizer-color,var(--color-neutral-700))}&::-webkit-resizer{border-bottom-color:var(--_resizer_color);border-left-color:transparent;border-right-color:var(--_resizer_color);border-style:solid;border-top-color:transparent;border-width:var(--_resizer_width)}}@utility styled-resizer-w-*{--resizer-width:--value(integer)}@utility styled-resizer-color-*{--resizer-color:--value(--color-*)}@utility content-vertical-holder{--tw-content:"\200b";content:var(--tw-content)}@utility no-touch-action{touch-action:none}@utility bg-transparency-squares{@apply bg-squares-gradient square-light-white square-dark-neutral-300 square-size-6}@utility link-like{@apply cursor-pointer hover:text-accent-500}@utility no-truncate{overflow:visible;text-overflow:unset;white-space:normal}
|
|
@@ -36,16 +36,16 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<Props
|
|
|
36
36
|
}> & Readonly<{
|
|
37
37
|
"onUpdate:modelValue"?: ((value: RgbaColor) => any) | undefined;
|
|
38
38
|
onCancel?: (() => any) | undefined;
|
|
39
|
-
"onUpdate:tempValue"?: ((value: RgbaColor | undefined) => any) | undefined;
|
|
40
39
|
onSave?: (() => any) | undefined;
|
|
40
|
+
"onUpdate:tempValue"?: ((value: RgbaColor | undefined) => any) | undefined;
|
|
41
41
|
}>, {
|
|
42
42
|
border: boolean;
|
|
43
43
|
allowAlpha: boolean;
|
|
44
|
-
copyTransform: (val: HsvaColor, stringVal: string) => any;
|
|
45
44
|
stringPrecision: number;
|
|
46
45
|
customRepresentation: {
|
|
47
46
|
fromHsvaToString: (hsva: HsvaColor, includeAlpha: boolean) => string;
|
|
48
47
|
};
|
|
48
|
+
copyTransform: (val: HsvaColor, stringVal: string) => any;
|
|
49
49
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
50
50
|
default?: (props: {
|
|
51
51
|
stringColor: string;
|
|
@@ -36,16 +36,16 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<Props
|
|
|
36
36
|
}> & Readonly<{
|
|
37
37
|
"onUpdate:modelValue"?: ((value: RgbaColor) => any) | undefined;
|
|
38
38
|
onCancel?: (() => any) | undefined;
|
|
39
|
-
"onUpdate:tempValue"?: ((value: RgbaColor | undefined) => any) | undefined;
|
|
40
39
|
onSave?: (() => any) | undefined;
|
|
40
|
+
"onUpdate:tempValue"?: ((value: RgbaColor | undefined) => any) | undefined;
|
|
41
41
|
}>, {
|
|
42
42
|
border: boolean;
|
|
43
43
|
allowAlpha: boolean;
|
|
44
|
-
copyTransform: (val: HsvaColor, stringVal: string) => any;
|
|
45
44
|
stringPrecision: number;
|
|
46
45
|
customRepresentation: {
|
|
47
46
|
fromHsvaToString: (hsva: HsvaColor, includeAlpha: boolean) => string;
|
|
48
47
|
};
|
|
48
|
+
copyTransform: (val: HsvaColor, stringVal: string) => any;
|
|
49
49
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
50
50
|
default?: (props: {
|
|
51
51
|
stringColor: string;
|
|
@@ -40,18 +40,18 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
40
40
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
41
41
|
"onUpdate:modelValue"?: ((value: RgbaColor) => any) | undefined;
|
|
42
42
|
onCancel?: (() => any) | undefined;
|
|
43
|
-
"onUpdate:tempValue"?: ((value: RgbaColor | undefined) => any) | undefined;
|
|
44
43
|
onSave?: ((val: RgbaColor) => any) | undefined;
|
|
44
|
+
"onUpdate:tempValue"?: ((value: RgbaColor | undefined) => any) | undefined;
|
|
45
45
|
}>, {
|
|
46
46
|
border: boolean;
|
|
47
|
+
valid: boolean;
|
|
47
48
|
allowAlpha: boolean;
|
|
48
|
-
copyTransform: (val: HsvaColor, stringVal: string) => any;
|
|
49
49
|
stringPrecision: number;
|
|
50
50
|
customRepresentation: {
|
|
51
51
|
fromHsvaToString: (hsva: HsvaColor, includeAlpha: boolean) => string;
|
|
52
52
|
fromStringToHsva?: (string: string) => HsvaColor | undefined;
|
|
53
53
|
};
|
|
54
|
-
|
|
54
|
+
copyTransform: (val: HsvaColor, stringVal: string) => any;
|
|
55
55
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
56
56
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
57
57
|
declare const _default: typeof __VLS_export;
|
|
@@ -40,18 +40,18 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
40
40
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
41
41
|
"onUpdate:modelValue"?: ((value: RgbaColor) => any) | undefined;
|
|
42
42
|
onCancel?: (() => any) | undefined;
|
|
43
|
-
"onUpdate:tempValue"?: ((value: RgbaColor | undefined) => any) | undefined;
|
|
44
43
|
onSave?: ((val: RgbaColor) => any) | undefined;
|
|
44
|
+
"onUpdate:tempValue"?: ((value: RgbaColor | undefined) => any) | undefined;
|
|
45
45
|
}>, {
|
|
46
46
|
border: boolean;
|
|
47
|
+
valid: boolean;
|
|
47
48
|
allowAlpha: boolean;
|
|
48
|
-
copyTransform: (val: HsvaColor, stringVal: string) => any;
|
|
49
49
|
stringPrecision: number;
|
|
50
50
|
customRepresentation: {
|
|
51
51
|
fromHsvaToString: (hsva: HsvaColor, includeAlpha: boolean) => string;
|
|
52
52
|
fromStringToHsva?: (string: string) => HsvaColor | undefined;
|
|
53
53
|
};
|
|
54
|
-
|
|
54
|
+
copyTransform: (val: HsvaColor, stringVal: string) => any;
|
|
55
55
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
56
56
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
57
57
|
declare const _default: typeof __VLS_export;
|
|
@@ -112,8 +112,8 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<Props
|
|
|
112
112
|
input: (val: InputEvent) => any;
|
|
113
113
|
blur: (val: FocusEvent) => any;
|
|
114
114
|
submit: (val: string, suggestion?: any) => any;
|
|
115
|
-
focus: (val: FocusEvent) => any;
|
|
116
115
|
keydown: (val: KeyboardEvent) => any;
|
|
116
|
+
focus: (val: FocusEvent) => any;
|
|
117
117
|
indicatorClick: (val: MouseEvent) => any;
|
|
118
118
|
}, string, import("vue").PublicProps, Readonly<Props & {
|
|
119
119
|
values?: string[] | undefined;
|
|
@@ -124,10 +124,10 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<Props
|
|
|
124
124
|
onBlur?: ((val: FocusEvent) => any) | undefined;
|
|
125
125
|
onSubmit?: ((val: string, suggestion?: any) => any) | undefined;
|
|
126
126
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
127
|
-
onFocus?: ((val: FocusEvent) => any) | undefined;
|
|
128
|
-
onKeydown?: ((val: KeyboardEvent) => any) | undefined;
|
|
129
127
|
"onUpdate:inputValue"?: ((value: string) => any) | undefined;
|
|
130
128
|
"onUpdate:values"?: ((value: string[] | undefined) => any) | undefined;
|
|
129
|
+
onKeydown?: ((val: KeyboardEvent) => any) | undefined;
|
|
130
|
+
onFocus?: ((val: FocusEvent) => any) | undefined;
|
|
131
131
|
onIndicatorClick?: ((val: MouseEvent) => any) | undefined;
|
|
132
132
|
}>, {
|
|
133
133
|
disabled: boolean;
|
|
@@ -112,8 +112,8 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<Props
|
|
|
112
112
|
input: (val: InputEvent) => any;
|
|
113
113
|
blur: (val: FocusEvent) => any;
|
|
114
114
|
submit: (val: string, suggestion?: any) => any;
|
|
115
|
-
focus: (val: FocusEvent) => any;
|
|
116
115
|
keydown: (val: KeyboardEvent) => any;
|
|
116
|
+
focus: (val: FocusEvent) => any;
|
|
117
117
|
indicatorClick: (val: MouseEvent) => any;
|
|
118
118
|
}, string, import("vue").PublicProps, Readonly<Props & {
|
|
119
119
|
values?: string[] | undefined;
|
|
@@ -124,10 +124,10 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<Props
|
|
|
124
124
|
onBlur?: ((val: FocusEvent) => any) | undefined;
|
|
125
125
|
onSubmit?: ((val: string, suggestion?: any) => any) | undefined;
|
|
126
126
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
127
|
-
onFocus?: ((val: FocusEvent) => any) | undefined;
|
|
128
|
-
onKeydown?: ((val: KeyboardEvent) => any) | undefined;
|
|
129
127
|
"onUpdate:inputValue"?: ((value: string) => any) | undefined;
|
|
130
128
|
"onUpdate:values"?: ((value: string[] | undefined) => any) | undefined;
|
|
129
|
+
onKeydown?: ((val: KeyboardEvent) => any) | undefined;
|
|
130
|
+
onFocus?: ((val: FocusEvent) => any) | undefined;
|
|
131
131
|
onIndicatorClick?: ((val: MouseEvent) => any) | undefined;
|
|
132
132
|
}>, {
|
|
133
133
|
disabled: boolean;
|
|
@@ -24,12 +24,12 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<Props
|
|
|
24
24
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
25
25
|
onClose?: (() => any) | undefined;
|
|
26
26
|
}>, {
|
|
27
|
+
canClose: boolean;
|
|
27
28
|
useDialogForBackdrop: false;
|
|
28
29
|
useBackdrop: boolean;
|
|
29
30
|
preferredHorizontal: ("center" | "right" | "left" | "either" | "center-screen" | "right-most" | "left-most" | "center-most")[] | import("../../main.lib.js").PopupPositioner;
|
|
30
31
|
preferredVertical: ("top" | "bottom" | "center" | "either" | "center-screen" | "top-most" | "bottom-most" | "center-most")[] | import("../../main.lib.js").PopupPositioner;
|
|
31
32
|
avoidRepositioning: boolean;
|
|
32
|
-
canClose: boolean;
|
|
33
33
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
34
34
|
button?: (props: {
|
|
35
35
|
extractEl: (_: any) => any;
|
|
@@ -24,12 +24,12 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<Props
|
|
|
24
24
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
25
25
|
onClose?: (() => any) | undefined;
|
|
26
26
|
}>, {
|
|
27
|
+
canClose: boolean;
|
|
27
28
|
useDialogForBackdrop: false;
|
|
28
29
|
useBackdrop: boolean;
|
|
29
30
|
preferredHorizontal: ("center" | "right" | "left" | "either" | "center-screen" | "right-most" | "left-most" | "center-most")[] | import("../../main.lib.js").PopupPositioner;
|
|
30
31
|
preferredVertical: ("top" | "bottom" | "center" | "either" | "center-screen" | "top-most" | "bottom-most" | "center-most")[] | import("../../main.lib.js").PopupPositioner;
|
|
31
32
|
avoidRepositioning: boolean;
|
|
32
|
-
canClose: boolean;
|
|
33
33
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
34
34
|
button?: (props: {
|
|
35
35
|
extractEl: (_: any) => any;
|
|
@@ -53,8 +53,12 @@ export type RawNotificationEntry<TOptions extends string[] = ["Ok", "Cancel"], T
|
|
|
53
53
|
icon?: string;
|
|
54
54
|
message: string;
|
|
55
55
|
component?: string | Component;
|
|
56
|
-
/** Props for the custom component. By default the component is passed the message and the
|
|
57
|
-
componentProps?: Record<string, any
|
|
56
|
+
/** Props for the custom component. By default the component is passed the message, the messageClasses, and the full notification. Both will be overriden if you set them on componentProps. */
|
|
57
|
+
componentProps?: Record<string, any> & {
|
|
58
|
+
notification: NotificationEntry;
|
|
59
|
+
message: string;
|
|
60
|
+
messageClasses: string;
|
|
61
|
+
};
|
|
58
62
|
/**
|
|
59
63
|
* Props for the notification component itself. They are bound to the root of the element and the class property is merged with twMerge.
|
|
60
64
|
*
|
|
@@ -57,13 +57,6 @@ export class NotificationHandler {
|
|
|
57
57
|
);
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
if (entry.timeout !== void 0 && !entry.cancellable) {
|
|
61
|
-
throw new Error(
|
|
62
|
-
crop`Cannot timeout notification that is not cancellable:
|
|
63
|
-
${indent(pretty(entry), 5)}
|
|
64
|
-
`
|
|
65
|
-
);
|
|
66
|
-
}
|
|
67
60
|
if (entry.timeout !== void 0 && entry.requiresAction) {
|
|
68
61
|
throw new Error(
|
|
69
62
|
crop`Cannot timeout notification that requires action:
|
|
@@ -152,7 +145,11 @@ export class NotificationHandler {
|
|
|
152
145
|
const remaining = notification.timeout - notification._timer.elapsedBeforePause;
|
|
153
146
|
clearTimeout(notification._timer.id);
|
|
154
147
|
notification._timer.id = setTimeout(() => {
|
|
155
|
-
|
|
148
|
+
if (notification.cancellable) {
|
|
149
|
+
notification.resolve(notification.cancellable);
|
|
150
|
+
} else {
|
|
151
|
+
notification.resolve(notification.default);
|
|
152
|
+
}
|
|
156
153
|
}, remaining);
|
|
157
154
|
}
|
|
158
155
|
static resolveToDefault(notification) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@witchcraft/ui",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.26",
|
|
4
4
|
"description": "Vue component library.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/runtime/main.lib.js",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@alanscodelog/utils": "^6.
|
|
66
|
+
"@alanscodelog/utils": "^6.2.0",
|
|
67
67
|
"@iconify/json": "^2.2.450",
|
|
68
68
|
"@nuxt/kit": "^4.4.2",
|
|
69
69
|
"@nuxt/schema": "^4.4.2",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"defu": "^6.1.4",
|
|
76
76
|
"fast-glob": "^3.3.3",
|
|
77
77
|
"metamorphosis": "^0.6.1",
|
|
78
|
-
"reka-ui": "^2.9.
|
|
78
|
+
"reka-ui": "^2.9.5",
|
|
79
79
|
"tailwind-merge": "^3.5.0",
|
|
80
80
|
"unplugin-icons": "^22.5.0",
|
|
81
81
|
"unplugin-vue-components": "^28.8.0",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"@alanscodelog/commitlint-config": "^3.1.2",
|
|
86
86
|
"@alanscodelog/eslint-config": "^6.3.1",
|
|
87
87
|
"@alanscodelog/semantic-release-config": "^6.0.2",
|
|
88
|
-
"@alanscodelog/tsconfigs": "^6.
|
|
88
|
+
"@alanscodelog/tsconfigs": "^6.3.0",
|
|
89
89
|
"@alanscodelog/vite-config": "^0.0.7",
|
|
90
90
|
"@chromatic-com/storybook": "^3.2.7",
|
|
91
91
|
"@commitlint/cli": "^20.5.0",
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
"@nuxt/eslint-config": "^1.15.2",
|
|
95
95
|
"@nuxt/module-builder": "^1.0.2",
|
|
96
96
|
"@nuxtjs/i18n": "^9.5.6",
|
|
97
|
-
"@playwright/test": "
|
|
97
|
+
"@playwright/test": "=1.58.2",
|
|
98
98
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
99
99
|
"@storybook/addon-a11y": "^8.6.18",
|
|
100
100
|
"@storybook/addon-actions": "^8.6.18",
|
|
@@ -125,8 +125,8 @@
|
|
|
125
125
|
"indexit": "2.1.0-beta.3",
|
|
126
126
|
"madge": "^7.0.0",
|
|
127
127
|
"nuxt": "^4.4.2",
|
|
128
|
-
"playwright": "
|
|
129
|
-
"playwright-core": "
|
|
128
|
+
"playwright": "=1.58.2",
|
|
129
|
+
"playwright-core": "=1.58.2",
|
|
130
130
|
"semantic-release": "^24.2.9",
|
|
131
131
|
"storybook": "^8.6.18",
|
|
132
132
|
"storybook-dark-mode": "^4.0.2",
|
|
@@ -115,6 +115,49 @@
|
|
|
115
115
|
--bars-fg-width: calc(--value(integer) * 1%, 50%);
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
+
/* Mix utils can be used like bg-(--mix) mix-from-red-500 mix-to-blue-500/20 (where 20 is the percentage of "to"). It mixes with transparent if no from/to. There are also tint-* and shade-* variants to mix with white and black respectively. */
|
|
119
|
+
@utility mix-from-* {
|
|
120
|
+
--mix-from: --value(--color-*);
|
|
121
|
+
--mix: color-mix(
|
|
122
|
+
in srgb,
|
|
123
|
+
var(--mix-from),
|
|
124
|
+
var(--mix-to, transparent) var(--mix-percentage, 50%)
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
@utility mix-to-* {
|
|
129
|
+
--mix-to: --value(--color-*);
|
|
130
|
+
--mix-percentage: calc(--modifier(integer) * 1%);
|
|
131
|
+
--mix: color-mix(
|
|
132
|
+
in srgb,
|
|
133
|
+
var(--mix-from),
|
|
134
|
+
var(--mix-to, transparent) var(--mix-percentage, 50%)
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
@utility tint-* {
|
|
139
|
+
--mix-from: --value(--color-*);
|
|
140
|
+
--mix-to: white;
|
|
141
|
+
--mix-percentage: calc(--modifier(integer) * 1%);
|
|
142
|
+
--mix: color-mix(
|
|
143
|
+
in srgb,
|
|
144
|
+
var(--mix-from),
|
|
145
|
+
var(--mix-to) var(--mix-percentage, 20%)
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
@utility shade-* {
|
|
150
|
+
--mix-from: --value(--color-*);
|
|
151
|
+
--mix-to: black;
|
|
152
|
+
--mix-percentage: calc(--modifier(integer) * 1%);
|
|
153
|
+
--mix: color-mix(
|
|
154
|
+
in srgb,
|
|
155
|
+
var(--mix-from),
|
|
156
|
+
var(--mix-to) var(--mix-percentage)
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
|
|
118
161
|
@utility scrollbar-hidden {
|
|
119
162
|
/* IE and Edge */
|
|
120
163
|
-ms-overflow-style: none;
|
|
@@ -71,12 +71,6 @@ export class NotificationHandler<
|
|
|
71
71
|
`)
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
if (entry.timeout !== undefined && !entry.cancellable) {
|
|
75
|
-
throw new Error(
|
|
76
|
-
crop`Cannot timeout notification that is not cancellable:
|
|
77
|
-
${indent(pretty(entry), 5)}
|
|
78
|
-
`)
|
|
79
|
-
}
|
|
80
74
|
if (entry.timeout !== undefined && entry.requiresAction) {
|
|
81
75
|
throw new Error(
|
|
82
76
|
crop`Cannot timeout notification that requires action:
|
|
@@ -177,7 +171,11 @@ export class NotificationHandler<
|
|
|
177
171
|
const remaining = notification.timeout - notification._timer.elapsedBeforePause
|
|
178
172
|
clearTimeout(notification._timer.id)
|
|
179
173
|
notification._timer.id = setTimeout(() => {
|
|
180
|
-
|
|
174
|
+
if (notification.cancellable) {
|
|
175
|
+
notification.resolve(notification.cancellable)
|
|
176
|
+
} else {
|
|
177
|
+
notification.resolve(notification.default)
|
|
178
|
+
}
|
|
181
179
|
}, remaining)
|
|
182
180
|
}
|
|
183
181
|
|
|
@@ -238,8 +236,8 @@ export type RawNotificationEntry<
|
|
|
238
236
|
icon?: string
|
|
239
237
|
message: string
|
|
240
238
|
component?: string | Component
|
|
241
|
-
/** Props for the custom component. By default the component is passed the message and the
|
|
242
|
-
componentProps?: Record<string, any>
|
|
239
|
+
/** Props for the custom component. By default the component is passed the message, the messageClasses, and the full notification. Both will be overriden if you set them on componentProps. */
|
|
240
|
+
componentProps?: Record<string, any> & { notification: NotificationEntry, message: string, messageClasses: string }
|
|
243
241
|
/**
|
|
244
242
|
* Props for the notification component itself. They are bound to the root of the element and the class property is merged with twMerge.
|
|
245
243
|
*
|