@marianmeres/stuic 1.105.0 → 1.107.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.
@@ -10,6 +10,7 @@ export let closeOnEscape = true;
10
10
  let _class = "";
11
11
  export { _class as class };
12
12
  export let style = "";
13
+ export let backdropFadeIn = "normal";
13
14
  let _el;
14
15
  let _open = !!openOnMount;
15
16
  export function toggle() {
@@ -60,9 +61,28 @@ onMount(() => {
60
61
  bind:this={_el}
61
62
  use:focusTrap={{ enabled: _open }}
62
63
  style="{style ? `${style}; ` : ''}padding: 0 !important;"
63
- class={_class}
64
+ class={`${_class} ${backdropFadeIn || ''}`}
64
65
  >
65
66
  {#if _open}
66
67
  <slot />
67
68
  {/if}
68
69
  </dialog>
70
+
71
+ <style>
72
+ dialog.normal[open]::backdrop {
73
+ animation: fade 0.2s ease-out;
74
+ }
75
+
76
+ dialog.slow[open]::backdrop {
77
+ animation: fade 0.5s ease-out;
78
+ }
79
+
80
+ @keyframes fade {
81
+ from {
82
+ opacity: 0;
83
+ }
84
+ to {
85
+ opacity: 1;
86
+ }
87
+ }
88
+ </style>
@@ -12,6 +12,7 @@ declare const __propDef: {
12
12
  closeOnEscape?: boolean | undefined;
13
13
  class?: string | undefined;
14
14
  style?: string | undefined;
15
+ backdropFadeIn?: false | "normal" | "slow" | undefined;
15
16
  toggle?: (() => void) | undefined;
16
17
  open?: (() => void) | undefined;
17
18
  close?: (() => void) | undefined;
package/dist/index.d.ts CHANGED
@@ -22,13 +22,14 @@ export { default as Switch, SwitchConfig, type SwitchPreHook, } from './componen
22
22
  export { default as Thc, type THC, isTHCNotEmpty } from './components/Thc/Thc.svelte';
23
23
  export { default as X } from './components/X/X.svelte';
24
24
  export { autogrow } from './actions/autogrow.js';
25
+ export { autoscroll } from './actions/autoscroll.js';
25
26
  export { draggable, droppable, type DraggableOptions, type DroppableOptions, } from './actions/drag-drop.js';
26
27
  export { focusTrap, type FocusTrapOptions } from './actions/focus-trap.js';
27
28
  export { onOutside } from './actions/on-outside.js';
28
29
  export { preSubmitValidityCheck } from './actions/pre-submit-validity-check.js';
29
30
  export { tooltip, TooltipConfig, type TooltipOptions, } from './actions/tooltip/tooltip.js';
30
- export { validate, type ValidateOptions, type ValidationResult, } from './actions/validate.js';
31
31
  export { trim } from './actions/trim.js';
32
+ export { validate, type ValidateOptions, type ValidationResult, } from './actions/validate.js';
32
33
  export { calculateAlignment } from './utils/calculate-alignment.js';
33
34
  export { DevicePointer } from './utils/device-pointer.js';
34
35
  export { getId } from './utils/get-id.js';
package/dist/index.js CHANGED
@@ -37,13 +37,14 @@ export { default as Thc, isTHCNotEmpty } from './components/Thc/Thc.svelte';
37
37
  export { default as X } from './components/X/X.svelte';
38
38
  // actions
39
39
  export { autogrow } from './actions/autogrow.js';
40
+ export { autoscroll } from './actions/autoscroll.js';
40
41
  export { draggable, droppable, } from './actions/drag-drop.js';
41
42
  export { focusTrap } from './actions/focus-trap.js';
42
43
  export { onOutside } from './actions/on-outside.js';
43
44
  export { preSubmitValidityCheck } from './actions/pre-submit-validity-check.js';
44
45
  export { tooltip, TooltipConfig, } from './actions/tooltip/tooltip.js';
45
- export { validate, } from './actions/validate.js';
46
46
  export { trim } from './actions/trim.js';
47
+ export { validate, } from './actions/validate.js';
47
48
  // utils
48
49
  export { calculateAlignment } from './utils/calculate-alignment.js';
49
50
  export { DevicePointer } from './utils/device-pointer.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marianmeres/stuic",
3
- "version": "1.105.0",
3
+ "version": "1.107.0",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run package && node ./scripts/date.js",