@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.
@@ -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: 2px dashed rgb(var(--color-surface-400));
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
- [data-component='dropzone'].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
- }
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
- [data-component='dropzone'].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
- }
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
- [data-component='dropzone'].state-active-drop {
37
- animation: drop-pulse 0.3s ease-out;
38
- border-color: rgb(var(--color-success-500));
39
- background-color: rgb(var(--color-success-500) / 0.1);
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
- [data-component='dropzone'].state-drop-disabled {
43
- opacity: 0.5;
44
- cursor: not-allowed;
45
- background-color: rgb(var(--color-surface-100));
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
- /* Empty state */
49
- [data-element='drop-zone-empty'] {
50
- display: flex;
51
- align-items: center;
52
- justify-content: center;
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
- /* Animations */
59
- @keyframes drop-pulse {
60
- 0% {
61
- transform: scale(1);
62
- box-shadow: 0 0 0 0 rgb(var(--color-success-500) / 0.4);
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
  }
@@ -1,6 +1,8 @@
1
1
  declare const _default: {};
2
2
  export default _default;
3
3
  export type DragData = {
4
+ offsetX: number;
5
+ offsetY: number;
4
6
  /**
5
7
  * - The item being dragged
6
8
  */
@@ -1,5 +1,7 @@
1
1
  /**
2
2
  * @typedef {Object} DragData
3
+ * @property {number} offsetX
4
+ * @property {number} offsetY
3
5
  * @property {any} item - The item being dragged
4
6
  * @property {string} [source] - Source identifier
5
7
  * @property {string} [group] - Drag group
@@ -1,20 +1,11 @@
1
1
  declare const _default: {};
2
2
  export default _default;
3
3
  export type DropData = {
4
- /**
5
- * - The dropped item
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
  };
@@ -1,9 +1,12 @@
1
1
  /**
2
2
  * @typedef {Object} DropData
3
- * @property {any} item - The dropped item
4
- * @property {string} source - Source identifier
5
- * @property {string} group - Drag group
6
- * @property {any} [metadata] - Additional metadata
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 {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hkdigital/lib-sveltekit",
3
- "version": "0.1.80",
3
+ "version": "0.1.82",
4
4
  "author": {
5
5
  "name": "HKdigital",
6
6
  "url": "https://hkdigital.nl"