@hkdigital/lib-sveltekit 0.1.80 → 0.1.82
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/components/drag-drop/{PreviewController.d.ts → DragController.d.ts} +3 -2
- package/dist/components/drag-drop/{PreviewController.js → DragController.js} +3 -2
- package/dist/components/drag-drop/Draggable.svelte +127 -32
- package/dist/components/drag-drop/Draggable.svelte.d.ts +11 -3
- package/dist/components/drag-drop/DropZone.svelte +74 -43
- package/dist/components/drag-drop/DropZone.svelte.d.ts +9 -35
- package/dist/components/layout/grid-layers/GridLayers.svelte +177 -158
- package/dist/components/layout/grid-layers/GridLayers.svelte.d.ts +2 -0
- package/dist/components/layout/grid-layers/GridLayers.svelte__ +167 -0
- package/dist/components/layout/grid-layers/util.d.ts +19 -0
- package/dist/components/layout/grid-layers/util.js +74 -0
- package/dist/constants/state-labels/drop-states.d.ts +0 -2
- package/dist/constants/state-labels/drop-states.js +2 -2
- package/dist/themes/hkdev/components/drag-drop/draggable.css +4 -0
- package/dist/themes/hkdev/components/drag-drop/dropzone.css +34 -58
- package/dist/typedef/drag.d.ts +2 -0
- package/dist/typedef/drag.js +2 -0
- package/dist/typedef/drop.d.ts +4 -13
- package/dist/typedef/drop.js +8 -5
- package/package.json +1 -1
@@ -1,73 +1,49 @@
|
|
1
1
|
@define-mixin component-dropzone {
|
2
|
+
/* Visual styling and customizable aspects */
|
2
3
|
[data-component='dropzone'] {
|
3
|
-
min-height: 100px
|
4
|
-
border:
|
4
|
+
/*min-height: 100px;*/
|
5
|
+
border: 1px dashed rgb(var(--color-surface-400));
|
5
6
|
border-radius: var(--theme-rounded-container);
|
6
|
-
padding: 1rem
|
7
|
+
/*padding: 1rem;*/
|
7
8
|
transition: all 0.2s ease;
|
8
9
|
position: relative;
|
9
10
|
background-color: rgb(var(--color-surface-50) / 0.5);
|
10
|
-
}
|
11
|
-
|
12
|
-
/* State-based styling using state classes */
|
13
|
-
[data-component='dropzone'].state-ready {
|
14
|
-
border-color: rgb(var(--color-surface-400));
|
15
|
-
background-color: transparent;
|
16
|
-
}
|
17
|
-
|
18
|
-
[data-component='dropzone'].state-drag-over {
|
19
|
-
border-color: rgb(var(--color-primary-400));
|
20
|
-
background-color: rgb(var(--color-primary-500) / 0.05);
|
21
|
-
}
|
22
11
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
}
|
12
|
+
/* State-based styling using state classes - visual aspects only */
|
13
|
+
&.state-ready {
|
14
|
+
border-color: rgb(var(--color-surface-400));
|
15
|
+
background-color: transparent;
|
16
|
+
}
|
29
17
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
}
|
18
|
+
&.state-drag-over {
|
19
|
+
border-color: rgb(var(--color-primary-400));
|
20
|
+
background-color: rgb(var(--color-primary-500) / 0.05);
|
21
|
+
}
|
35
22
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
23
|
+
&.state-can-drop {
|
24
|
+
border-color: rgb(var(--color-success-500));
|
25
|
+
background-color: rgb(var(--color-success-500) / 0.08);
|
26
|
+
/*transform: scale(1.01);*/
|
27
|
+
box-shadow: 0 0 0 3px rgb(var(--color-success-500) / 0.2);
|
28
|
+
}
|
41
29
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
30
|
+
&.state-cannot-drop {
|
31
|
+
border-color: rgb(var(--color-error-500));
|
32
|
+
background-color: rgb(var(--color-error-500) / 0.08);
|
33
|
+
cursor: not-allowed;
|
34
|
+
}
|
47
35
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
height: 100%;
|
54
|
-
color: rgb(var(--color-surface-500));
|
55
|
-
font-style: italic;
|
36
|
+
&.state-drop-disabled {
|
37
|
+
opacity: 0.5;
|
38
|
+
cursor: not-allowed;
|
39
|
+
background-color: rgb(var(--color-surface-100));
|
40
|
+
}
|
56
41
|
}
|
57
42
|
|
58
|
-
/*
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
}
|
64
|
-
50% {
|
65
|
-
transform: scale(1.02);
|
66
|
-
box-shadow: 0 0 0 8px rgb(var(--color-success-500) / 0);
|
67
|
-
}
|
68
|
-
100% {
|
69
|
-
transform: scale(1);
|
70
|
-
box-shadow: 0 0 0 0 rgb(var(--color-success-500) / 0);
|
71
|
-
}
|
43
|
+
/* Default styling for inner elements - all visual/customizable */
|
44
|
+
[data-layer='content'],
|
45
|
+
[data-layer='preview'],
|
46
|
+
[data-layer='empty'] {
|
47
|
+
@apply type-base-md;
|
72
48
|
}
|
73
49
|
}
|
package/dist/typedef/drag.d.ts
CHANGED
package/dist/typedef/drag.js
CHANGED
package/dist/typedef/drop.d.ts
CHANGED
@@ -1,20 +1,11 @@
|
|
1
1
|
declare const _default: {};
|
2
2
|
export default _default;
|
3
3
|
export type DropData = {
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
event: DragEvent;
|
5
|
+
offsetX: number;
|
6
|
+
offsetY: number;
|
7
|
+
zone: string;
|
7
8
|
item: any;
|
8
|
-
/**
|
9
|
-
* - Source identifier
|
10
|
-
*/
|
11
9
|
source: string;
|
12
|
-
/**
|
13
|
-
* - Drag group
|
14
|
-
*/
|
15
|
-
group: string;
|
16
|
-
/**
|
17
|
-
* - Additional metadata
|
18
|
-
*/
|
19
10
|
metadata?: any;
|
20
11
|
};
|
package/dist/typedef/drop.js
CHANGED
@@ -1,9 +1,12 @@
|
|
1
1
|
/**
|
2
2
|
* @typedef {Object} DropData
|
3
|
-
* @property {
|
4
|
-
* @property {
|
5
|
-
* @property {
|
6
|
-
* @property {
|
3
|
+
* @property {DragEvent} event
|
4
|
+
* @property {number} offsetX
|
5
|
+
* @property {number} offsetY
|
6
|
+
* @property {string} zone
|
7
|
+
* @property {any} item
|
8
|
+
* @property {string} source
|
9
|
+
* @property {any} [metadata]
|
7
10
|
*/
|
8
11
|
|
9
|
-
export default {}
|
12
|
+
export default {};
|