@marianmeres/stuic 1.70.0 → 1.72.0
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.
|
@@ -88,6 +88,9 @@ export const droppable = (node, options) => {
|
|
|
88
88
|
};
|
|
89
89
|
const onDragover = (e) => {
|
|
90
90
|
// _log('onDragover', e.dataTransfer); // too much spam
|
|
91
|
+
// this is important, otherwise onDrop will no be fired
|
|
92
|
+
// (so we're preventing default not to prevent future onDrop)
|
|
93
|
+
e.preventDefault();
|
|
91
94
|
options?.isDraggedOver?.set(options.id);
|
|
92
95
|
if (_isFn(options.onDragover)) {
|
|
93
96
|
return options.onDragover(e);
|
|
@@ -7,7 +7,7 @@ export declare enum AlertConfirmPromptType {
|
|
|
7
7
|
export type AlertConfirmPromptVariant = 'info' | 'success' | 'warn' | 'error';
|
|
8
8
|
type FnOnOK = (value: any) => any;
|
|
9
9
|
type FnOnCancel = (value: false) => any;
|
|
10
|
-
type FnOnEscape = () =>
|
|
10
|
+
type FnOnEscape = () => void;
|
|
11
11
|
type FnOnCustom = (value: any) => any;
|
|
12
12
|
export interface AlertConfirmPromptKnownClasses {
|
|
13
13
|
dialog: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
|
+
export type SwitchPreHook = (previosValue: boolean) => Promise<void | boolean>;
|
|
2
3
|
export declare class SwitchConfig {
|
|
3
4
|
static defaultSize: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
4
5
|
static defaultVariant: string | undefined;
|
|
@@ -34,7 +35,7 @@ declare const __propDef: {
|
|
|
34
35
|
variant?: string | undefined;
|
|
35
36
|
stopPropagation?: boolean | undefined;
|
|
36
37
|
preventDefault?: boolean | undefined;
|
|
37
|
-
preHook?:
|
|
38
|
+
preHook?: SwitchPreHook | undefined;
|
|
38
39
|
size?: "sm" | "md" | "lg" | "xs" | "xl" | undefined;
|
|
39
40
|
};
|
|
40
41
|
events: {
|
package/dist/index.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export { default as Fieldset, FieldsetConfig, type FieldsetConfigClasses, } from
|
|
|
17
17
|
export { createNotificationsStore, NOTIFICATION_EVENT, type NotiticationsCreateStoreOptions, type NotificationCreateParam, type Notification, type NotificationInput, type NotificationType, type NotificationOnEventHandler, type NotificationsSortOrder, type NotificationKnownClasses, } from './components/Notifications/notifications.js';
|
|
18
18
|
export { default as Notifications, NotificationsConfig, } from './components/Notifications/Notifications.svelte';
|
|
19
19
|
export { default as Popover } from './components/Popover/Popover.svelte';
|
|
20
|
-
export { default as Switch, SwitchConfig } from './components/Switch/Switch.svelte';
|
|
20
|
+
export { default as Switch, SwitchConfig, type SwitchPreHook, } from './components/Switch/Switch.svelte';
|
|
21
21
|
export { default as Thc, type THC, isTHCNotEmpty } from './components/Thc/Thc.svelte';
|
|
22
22
|
export { default as X } from './components/X/X.svelte';
|
|
23
23
|
export { autogrow } from './actions/autogrow.js';
|
package/dist/index.js
CHANGED
|
@@ -30,7 +30,7 @@ export { default as Notifications, NotificationsConfig, } from './components/Not
|
|
|
30
30
|
//
|
|
31
31
|
export { default as Popover } from './components/Popover/Popover.svelte';
|
|
32
32
|
//
|
|
33
|
-
export { default as Switch, SwitchConfig } from './components/Switch/Switch.svelte';
|
|
33
|
+
export { default as Switch, SwitchConfig, } from './components/Switch/Switch.svelte';
|
|
34
34
|
export { default as Thc, isTHCNotEmpty } from './components/Thc/Thc.svelte';
|
|
35
35
|
//
|
|
36
36
|
export { default as X } from './components/X/X.svelte';
|