@nr1e/qwik-ui 0.0.7 → 0.0.9

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.
package/README.md CHANGED
@@ -2,12 +2,20 @@
2
2
  <img width="200" src="https://nr1e.com/images/logo-tagline.svg" />
3
3
  </div>
4
4
 
5
- # Qwik Icons Library ⚡️
5
+ # Qwik UI Library ⚡️
6
6
 
7
- This library contains approved icons for use in NR1E projects.
7
+ This library contains approved UI components for use in NR1E projects.
8
8
 
9
- ## Prefixes
9
+ ## Installation
10
10
 
11
- Each icon has a prefix identifying where it came from.
11
+ ```bash
12
+ pnpm i @nr1e/qwik-ui
13
+ ```
12
14
 
13
- - **Mdi** = [Material Design Icons](https://icon-sets.iconify.design/mdi/)
15
+ Inside _global.css_, add the following:
16
+
17
+ ```css
18
+ @import '@nr1e/qwik-ui/styles.css';
19
+ ```
20
+
21
+ This typically should appear under your _@import 'tailwindcss';_ statement.
@@ -0,0 +1,33 @@
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 mdiClose_qwik = require("../qwik-icons/lib/components/icons/mdi-close.qwik.qwik.cjs");
6
+ const Dialog = qwik.component$((props) => {
7
+ qwik.useOnDocument("keydown", qwik.$((event) => {
8
+ if (event.key === "Escape") {
9
+ props.open.value = false;
10
+ }
11
+ }));
12
+ return /* @__PURE__ */ jsxRuntime.jsx("dialog", {
13
+ class: "modal",
14
+ id: props.id,
15
+ open: props.open.value,
16
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", {
17
+ class: "modal-box",
18
+ children: [
19
+ props.showCloseIcon && /* @__PURE__ */ jsxRuntime.jsx("div", {
20
+ class: "absolute top-0 right-0 cursor-pointer",
21
+ onClick$: () => {
22
+ props.open.value = false;
23
+ },
24
+ children: /* @__PURE__ */ jsxRuntime.jsx(mdiClose_qwik.MdiClose, {
25
+ size: 24
26
+ })
27
+ }),
28
+ /* @__PURE__ */ jsxRuntime.jsx(qwik.Slot, {})
29
+ ]
30
+ })
31
+ });
32
+ });
33
+ exports.Dialog = Dialog;
@@ -0,0 +1,33 @@
1
+ import { jsx, jsxs } from "@builder.io/qwik/jsx-runtime";
2
+ import { component$, useOnDocument, $, Slot } from "@builder.io/qwik";
3
+ import { MdiClose } from "../qwik-icons/lib/components/icons/mdi-close.qwik.qwik.mjs";
4
+ const Dialog = component$((props) => {
5
+ useOnDocument("keydown", $((event) => {
6
+ if (event.key === "Escape") {
7
+ props.open.value = false;
8
+ }
9
+ }));
10
+ return /* @__PURE__ */ jsx("dialog", {
11
+ class: "modal",
12
+ id: props.id,
13
+ open: props.open.value,
14
+ children: /* @__PURE__ */ jsxs("div", {
15
+ class: "modal-box",
16
+ children: [
17
+ props.showCloseIcon && /* @__PURE__ */ jsx("div", {
18
+ class: "absolute top-0 right-0 cursor-pointer",
19
+ onClick$: () => {
20
+ props.open.value = false;
21
+ },
22
+ children: /* @__PURE__ */ jsx(MdiClose, {
23
+ size: 24
24
+ })
25
+ }),
26
+ /* @__PURE__ */ jsx(Slot, {})
27
+ ]
28
+ })
29
+ });
30
+ });
31
+ export {
32
+ Dialog
33
+ };
@@ -4,11 +4,13 @@ const alertError = require("./components/alert-error.qwik.cjs");
4
4
  const alertInfo = require("./components/alert-info.qwik.cjs");
5
5
  const alertSuccess = require("./components/alert-success.qwik.cjs");
6
6
  const alertWarning = require("./components/alert-warning.qwik.cjs");
7
+ const dialog = require("./components/dialog.qwik.cjs");
7
8
  const paceBar = require("./components/pace-bar.qwik.cjs");
8
9
  const universalLayout = require("./components/universal-layout.qwik.cjs");
9
10
  exports.AlertError = alertError.AlertError;
10
11
  exports.AlertInfo = alertInfo.AlertInfo;
11
12
  exports.AlertSuccess = alertSuccess.AlertSuccess;
12
13
  exports.AlertWarning = alertWarning.AlertWarning;
14
+ exports.Dialog = dialog.Dialog;
13
15
  exports.PaceBar = paceBar.PaceBar;
14
16
  exports.UniversalLayout = universalLayout.UniversalLayout;
@@ -2,6 +2,7 @@ import { AlertError } from "./components/alert-error.qwik.mjs";
2
2
  import { AlertInfo } from "./components/alert-info.qwik.mjs";
3
3
  import { AlertSuccess } from "./components/alert-success.qwik.mjs";
4
4
  import { AlertWarning } from "./components/alert-warning.qwik.mjs";
5
+ import { Dialog } from "./components/dialog.qwik.mjs";
5
6
  import { PaceBar } from "./components/pace-bar.qwik.mjs";
6
7
  import { UniversalLayout } from "./components/universal-layout.qwik.mjs";
7
8
  export {
@@ -9,6 +10,7 @@ export {
9
10
  AlertInfo,
10
11
  AlertSuccess,
11
12
  AlertWarning,
13
+ Dialog,
12
14
  PaceBar,
13
15
  UniversalLayout
14
16
  };
@@ -0,0 +1,16 @@
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 svg_qwik = require("../svg.qwik.qwik.cjs");
6
+ const MdiClose = qwik.component$((props) => {
7
+ return /* @__PURE__ */ jsxRuntime.jsx(svg_qwik.Svg, {
8
+ ...props,
9
+ viewBox: "0 0 24 24",
10
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", {
11
+ fill: "currentColor",
12
+ d: "M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12z"
13
+ })
14
+ });
15
+ });
16
+ exports.MdiClose = MdiClose;
@@ -0,0 +1,16 @@
1
+ import { jsx } from "@builder.io/qwik/jsx-runtime";
2
+ import { component$ } from "@builder.io/qwik";
3
+ import { Svg } from "../svg.qwik.qwik.mjs";
4
+ const MdiClose = component$((props) => {
5
+ return /* @__PURE__ */ jsx(Svg, {
6
+ ...props,
7
+ viewBox: "0 0 24 24",
8
+ children: /* @__PURE__ */ jsx("path", {
9
+ fill: "currentColor",
10
+ d: "M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12z"
11
+ })
12
+ });
13
+ });
14
+ export {
15
+ MdiClose
16
+ };
@@ -0,0 +1,7 @@
1
+ import { Signal } from '@builder.io/qwik';
2
+ export interface DialogProps {
3
+ id: string;
4
+ open: Signal<boolean>;
5
+ showCloseIcon?: boolean;
6
+ }
7
+ export declare const Dialog: import("@builder.io/qwik").Component<DialogProps>;
@@ -2,5 +2,6 @@ export * from './components/alert-error';
2
2
  export * from './components/alert-info';
3
3
  export * from './components/alert-success';
4
4
  export * from './components/alert-warning';
5
+ export * from './components/dialog';
5
6
  export * from './components/pace-bar';
6
7
  export * from './components/universal-layout';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nr1e/qwik-ui",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "description": "NR1E Qwik UI Library",
5
5
  "author": "NR1E, Inc.",
6
6
  "publishConfig": {
@@ -19,11 +19,13 @@
19
19
  "import": "./lib/index.qwik.mjs",
20
20
  "require": "./lib/index.qwik.cjs",
21
21
  "types": "./lib-types/index.d.ts"
22
- }
22
+ },
23
+ "./styles.css": "./styles.css"
23
24
  },
24
25
  "files": [
25
26
  "lib",
26
- "lib-types"
27
+ "lib-types",
28
+ "styles.css"
27
29
  ],
28
30
  "engines": {
29
31
  "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
package/styles.css ADDED
@@ -0,0 +1 @@
1
+ @source './lib';