@greghowe79/the-lib 0.3.4 → 0.3.6

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.
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("@builder.io/qwik/jsx-runtime");
4
+ const qwik = require("@builder.io/qwik");
5
+ const CloseIcon = qwik.component$(() => {
6
+ return /* @__PURE__ */ jsxRuntime.jsx("svg", {
7
+ xmlns: "http://www.w3.org/2000/svg",
8
+ viewBox: "0 0 32 32",
9
+ "aria-hidden": "true",
10
+ role: "presentation",
11
+ focusable: "false",
12
+ style: "display: block; fill: none; height: 16px; width: 16px; stroke: currentcolor; stroke-width: 3; overflow: visible;",
13
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", {
14
+ d: "m6 6 20 20M26 6 6 26"
15
+ })
16
+ });
17
+ });
18
+ exports.CloseIcon = CloseIcon;
@@ -0,0 +1,18 @@
1
+ import { jsx } from "@builder.io/qwik/jsx-runtime";
2
+ import { component$ } from "@builder.io/qwik";
3
+ const CloseIcon = component$(() => {
4
+ return /* @__PURE__ */ jsx("svg", {
5
+ xmlns: "http://www.w3.org/2000/svg",
6
+ viewBox: "0 0 32 32",
7
+ "aria-hidden": "true",
8
+ role: "presentation",
9
+ focusable: "false",
10
+ style: "display: block; fill: none; height: 16px; width: 16px; stroke: currentcolor; stroke-width: 3; overflow: visible;",
11
+ children: /* @__PURE__ */ jsx("path", {
12
+ d: "m6 6 20 20M26 6 6 26"
13
+ })
14
+ });
15
+ });
16
+ export {
17
+ CloseIcon
18
+ };
@@ -4,8 +4,9 @@ const jsxRuntime = require("@builder.io/qwik/jsx-runtime");
4
4
  const qwik = require("@builder.io/qwik");
5
5
  const styles = require("./styles.css.qwik.cjs");
6
6
  const button = require("../button/button.qwik.cjs");
7
+ const closeIcon = require("../icons/closeIcon.qwik.cjs");
7
8
  require("@fontsource/roboto-condensed");
8
- const Modal = qwik.component$(({ title, open, icon, primaryButtonLabel, secondaryButtonLabel, primaryAction, secondaryAction }) => {
9
+ const Modal = qwik.component$(({ title, open, primaryButtonLabel, secondaryButtonLabel, primaryAction, secondaryAction }) => {
9
10
  qwik.useStylesScoped$(styles);
10
11
  return /* @__PURE__ */ jsxRuntime.jsx("div", {
11
12
  id: "modal",
@@ -29,7 +30,7 @@ const Modal = qwik.component$(({ title, open, icon, primaryButtonLabel, secondar
29
30
  id: "close-button",
30
31
  ariaLabel: "Chiudi modale",
31
32
  onClick$: () => open.value = false,
32
- icon,
33
+ icon: /* @__PURE__ */ jsxRuntime.jsx(closeIcon.CloseIcon, {}),
33
34
  variant: "icon"
34
35
  })
35
36
  ]
@@ -2,8 +2,9 @@ import { jsx, jsxs } from "@builder.io/qwik/jsx-runtime";
2
2
  import { component$, useStylesScoped$, Slot } from "@builder.io/qwik";
3
3
  import styles from "./styles.css.qwik.mjs";
4
4
  import { Button } from "../button/button.qwik.mjs";
5
+ import { CloseIcon } from "../icons/closeIcon.qwik.mjs";
5
6
  import "@fontsource/roboto-condensed";
6
- const Modal = component$(({ title, open, icon, primaryButtonLabel, secondaryButtonLabel, primaryAction, secondaryAction }) => {
7
+ const Modal = component$(({ title, open, primaryButtonLabel, secondaryButtonLabel, primaryAction, secondaryAction }) => {
7
8
  useStylesScoped$(styles);
8
9
  return /* @__PURE__ */ jsx("div", {
9
10
  id: "modal",
@@ -27,7 +28,7 @@ const Modal = component$(({ title, open, icon, primaryButtonLabel, secondaryButt
27
28
  id: "close-button",
28
29
  ariaLabel: "Chiudi modale",
29
30
  onClick$: () => open.value = false,
30
- icon,
31
+ icon: /* @__PURE__ */ jsx(CloseIcon, {}),
31
32
  variant: "icon"
32
33
  })
33
34
  ]
@@ -44,7 +44,8 @@ const NavigationMenu = qwik.component$(({ ariaLabel, logoComponent, listItems, a
44
44
  id: action.id,
45
45
  label: action.label ?? "",
46
46
  onClick$: action.onClick$,
47
- icon: action.icon
47
+ icon: action.icon,
48
+ variant: action.variant
48
49
  }, action.id);
49
50
  })
50
51
  })
@@ -42,7 +42,8 @@ const NavigationMenu = component$(({ ariaLabel, logoComponent, listItems, action
42
42
  id: action.id,
43
43
  label: action.label ?? "",
44
44
  onClick$: action.onClick$,
45
- icon: action.icon
45
+ icon: action.icon,
46
+ variant: action.variant
46
47
  }, action.id);
47
48
  })
48
49
  })
@@ -0,0 +1 @@
1
+ export declare const CloseIcon: import("@builder.io/qwik").Component<unknown>;
@@ -1,12 +1,11 @@
1
- import { Component, JSXOutput, QRL, Signal } from '@builder.io/qwik';
1
+ import { QRL, Signal } from '@builder.io/qwik';
2
2
  import '@fontsource/roboto-condensed';
3
3
  export interface ModalProps {
4
4
  title?: string;
5
5
  open: Signal<boolean>;
6
- icon?: JSXOutput | Component<unknown>;
7
6
  primaryButtonLabel?: string;
8
7
  secondaryButtonLabel?: string;
9
8
  primaryAction?: QRL<() => void> | QRL<() => boolean> | QRL<() => Promise<void>>;
10
9
  secondaryAction?: QRL<() => void> | QRL<() => boolean> | QRL<() => Promise<void>>;
11
10
  }
12
- export declare const Modal: Component<ModalProps>;
11
+ export declare const Modal: import("@builder.io/qwik").Component<ModalProps>;
@@ -1,4 +1,5 @@
1
1
  import { type Component, type QRL, JSXOutput } from '@builder.io/qwik';
2
+ import { ButtonVariant } from '../button/button';
2
3
  import '@fontsource/roboto-condensed/500.css';
3
4
  export interface NavigationMenuProps {
4
5
  ariaLabel?: string;
@@ -12,6 +13,7 @@ export interface NavigationMenuProps {
12
13
  label?: string;
13
14
  onClick$?: QRL<() => void> | QRL<() => boolean> | QRL<() => Promise<void>>;
14
15
  icon?: JSXOutput | Component<unknown>;
16
+ variant?: ButtonVariant;
15
17
  }>;
16
18
  }
17
19
  export declare const NavigationMenu: Component<NavigationMenuProps>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@greghowe79/the-lib",
3
- "version": "0.3.4",
3
+ "version": "0.3.6",
4
4
  "description": "Collection of fast components for Qwik",
5
5
  "main": "./lib/index.qwik.mjs",
6
6
  "qwik": "./lib/index.qwik.mjs",