@nr1e/qwik-ui 0.0.27 → 0.0.28

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.
@@ -11,19 +11,25 @@ const alertSuccess = require("./alert-success.qwik.cjs");
11
11
  const Dialog = qwik.component$((props) => {
12
12
  const internalOpen = qwik.useSignal(props.open.value);
13
13
  const dialog = qwik.useSignal();
14
- qwik.useTask$(({ track }) => {
14
+ qwik.useTask$(async ({ track }) => {
15
15
  track(() => props.open.value);
16
16
  if (!props.open.value && internalOpen.value) {
17
17
  if (props.onClose$ && dialog.value) {
18
- props.onClose$(dialog.value);
18
+ await props.onClose$(dialog.value);
19
19
  }
20
20
  internalOpen.value = false;
21
+ if (props.onPostClose$ && dialog.value) {
22
+ await props.onPostClose$(dialog.value);
23
+ }
21
24
  }
22
25
  if (props.open.value && !internalOpen.value) {
23
26
  if (props.onOpen$ && dialog.value) {
24
- props.onOpen$(dialog.value);
27
+ await props.onOpen$(dialog.value);
25
28
  }
26
29
  internalOpen.value = true;
30
+ if (props.onPostOpen$ && dialog.value) {
31
+ await props.onPostOpen$(dialog.value);
32
+ }
27
33
  }
28
34
  });
29
35
  qwik.useOnDocument("keydown", qwik.$((event) => {
@@ -56,7 +62,7 @@ const Dialog = qwik.component$((props) => {
56
62
  class: "py-4",
57
63
  children: [
58
64
  props.loading && props.loading.value && /* @__PURE__ */ jsxRuntime.jsx("div", {
59
- class: "flex justify-center",
65
+ class: "flex justify-center p-20",
60
66
  children: /* @__PURE__ */ jsxRuntime.jsx("div", {
61
67
  class: "opacity-20",
62
68
  children: /* @__PURE__ */ jsxRuntime.jsx(spinners6DotsRotate_qwik.Spinners6DotsRotate, {
@@ -9,19 +9,25 @@ import { AlertSuccess } from "./alert-success.qwik.mjs";
9
9
  const Dialog = component$((props) => {
10
10
  const internalOpen = useSignal(props.open.value);
11
11
  const dialog = useSignal();
12
- useTask$(({ track }) => {
12
+ useTask$(async ({ track }) => {
13
13
  track(() => props.open.value);
14
14
  if (!props.open.value && internalOpen.value) {
15
15
  if (props.onClose$ && dialog.value) {
16
- props.onClose$(dialog.value);
16
+ await props.onClose$(dialog.value);
17
17
  }
18
18
  internalOpen.value = false;
19
+ if (props.onPostClose$ && dialog.value) {
20
+ await props.onPostClose$(dialog.value);
21
+ }
19
22
  }
20
23
  if (props.open.value && !internalOpen.value) {
21
24
  if (props.onOpen$ && dialog.value) {
22
- props.onOpen$(dialog.value);
25
+ await props.onOpen$(dialog.value);
23
26
  }
24
27
  internalOpen.value = true;
28
+ if (props.onPostOpen$ && dialog.value) {
29
+ await props.onPostOpen$(dialog.value);
30
+ }
25
31
  }
26
32
  });
27
33
  useOnDocument("keydown", $((event) => {
@@ -54,7 +60,7 @@ const Dialog = component$((props) => {
54
60
  class: "py-4",
55
61
  children: [
56
62
  props.loading && props.loading.value && /* @__PURE__ */ jsx("div", {
57
- class: "flex justify-center",
63
+ class: "flex justify-center p-20",
58
64
  children: /* @__PURE__ */ jsx("div", {
59
65
  class: "opacity-20",
60
66
  children: /* @__PURE__ */ jsx(Spinners6DotsRotate, {
@@ -10,7 +10,9 @@ export interface DialogProps {
10
10
  successMessage?: string;
11
11
  warningMessage?: string;
12
12
  onClose$?: QRL<(e: HTMLDialogElement) => void>;
13
+ onPostClose$?: QRL<(e: HTMLDialogElement) => void>;
13
14
  onOpen$?: QRL<(e: HTMLDialogElement) => void>;
15
+ onPostOpen$?: QRL<(e: HTMLDialogElement) => void>;
14
16
  loading?: Signal<boolean>;
15
17
  }
16
18
  export declare const Dialog: import("@builder.io/qwik").Component<DialogProps>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nr1e/qwik-ui",
3
- "version": "0.0.27",
3
+ "version": "0.0.28",
4
4
  "description": "NR1E Qwik UI Library",
5
5
  "author": "NR1E, Inc.",
6
6
  "publishConfig": {