@greghowe79/the-lib 0.5.3 → 0.5.5

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.
@@ -9,6 +9,7 @@ const Input = qwik.component$(({ id, type, placeholder, value, error, onValidate
9
9
  const internalError = qwik.useSignal(null);
10
10
  const showError = error ?? internalError;
11
11
  const inputHandler = qwik.$(async (_, elem) => {
12
+ value.value = elem.value;
12
13
  if (onInput$) {
13
14
  await onInput$();
14
15
  }
@@ -7,6 +7,7 @@ const Input = component$(({ id, type, placeholder, value, error, onValidate$, on
7
7
  const internalError = useSignal(null);
8
8
  const showError = error ?? internalError;
9
9
  const inputHandler = $(async (_, elem) => {
10
+ value.value = elem.value;
10
11
  if (onInput$) {
11
12
  await onInput$();
12
13
  }
@@ -12,7 +12,7 @@ const Modal = qwik.component$(({ title, open, primaryButtonLabel, secondaryButto
12
12
  return /* @__PURE__ */ jsxRuntime.jsx("div", {
13
13
  id: "modal",
14
14
  class: "modal-overlay",
15
- "aria-hidden": !open.value,
15
+ "aria-hidden": !open?.value,
16
16
  role: "dialog",
17
17
  "aria-modal": "true",
18
18
  "aria-labelledby": "modal-title",
@@ -30,7 +30,9 @@ const Modal = qwik.component$(({ title, open, primaryButtonLabel, secondaryButto
30
30
  closeButtonVisible && /* @__PURE__ */ jsxRuntime.jsx(button.Button, {
31
31
  id: "close-button",
32
32
  ariaLabel: "Chiudi modale",
33
- onClick$: () => open.value = false,
33
+ onClick$: () => {
34
+ if (open) open.value = false;
35
+ },
34
36
  icon: /* @__PURE__ */ jsxRuntime.jsx(closeIcon.CloseIcon, {}),
35
37
  variant: "icon"
36
38
  })
@@ -10,7 +10,7 @@ const Modal = component$(({ title, open, primaryButtonLabel, secondaryButtonLabe
10
10
  return /* @__PURE__ */ jsx("div", {
11
11
  id: "modal",
12
12
  class: "modal-overlay",
13
- "aria-hidden": !open.value,
13
+ "aria-hidden": !open?.value,
14
14
  role: "dialog",
15
15
  "aria-modal": "true",
16
16
  "aria-labelledby": "modal-title",
@@ -28,7 +28,9 @@ const Modal = component$(({ title, open, primaryButtonLabel, secondaryButtonLabe
28
28
  closeButtonVisible && /* @__PURE__ */ jsx(Button, {
29
29
  id: "close-button",
30
30
  ariaLabel: "Chiudi modale",
31
- onClick$: () => open.value = false,
31
+ onClick$: () => {
32
+ if (open) open.value = false;
33
+ },
32
34
  icon: /* @__PURE__ */ jsx(CloseIcon, {}),
33
35
  variant: "icon"
34
36
  })
@@ -2,7 +2,7 @@ import { QRL, Signal } from '@builder.io/qwik';
2
2
  import '@fontsource/roboto-condensed';
3
3
  export interface ModalProps {
4
4
  title?: string;
5
- open: Signal<boolean>;
5
+ open?: Signal<boolean>;
6
6
  closeButtonVisible?: boolean;
7
7
  primaryButtonLabel?: string;
8
8
  secondaryButtonLabel?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@greghowe79/the-lib",
3
- "version": "0.5.3",
3
+ "version": "0.5.5",
4
4
  "description": "Collection of fast components for Qwik",
5
5
  "main": "./lib/index.qwik.mjs",
6
6
  "qwik": "./lib/index.qwik.mjs",