@nr1e/qwik-ui 0.0.11 → 0.0.12

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,14 +10,14 @@ const Dialog = qwik.component$((props) => {
10
10
  }
11
11
  }));
12
12
  return /* @__PURE__ */ jsxRuntime.jsx("dialog", {
13
- class: `modal z-20 ${props.class}`,
13
+ class: `modal ${props.class}`,
14
14
  id: props.id,
15
15
  open: props.open.value,
16
16
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", {
17
17
  class: "modal-box",
18
18
  children: [
19
- props.showCloseIcon && /* @__PURE__ */ jsxRuntime.jsx("div", {
20
- class: "absolute top-0 right-0 cursor-pointer",
19
+ props.showCloseIcon && /* @__PURE__ */ jsxRuntime.jsx("button", {
20
+ class: "btn btn-sm btn-circle btn-ghost absolute top-1 right-1",
21
21
  onClick$: () => {
22
22
  props.open.value = false;
23
23
  },
@@ -25,7 +25,20 @@ const Dialog = qwik.component$((props) => {
25
25
  size: 24
26
26
  })
27
27
  }),
28
- /* @__PURE__ */ jsxRuntime.jsx(qwik.Slot, {})
28
+ props.title && /* @__PURE__ */ jsxRuntime.jsx("div", {
29
+ class: "text-lg font-bold",
30
+ children: props.title
31
+ }),
32
+ /* @__PURE__ */ jsxRuntime.jsx("div", {
33
+ class: "py-4",
34
+ children: /* @__PURE__ */ jsxRuntime.jsx(qwik.Slot, {})
35
+ }),
36
+ /* @__PURE__ */ jsxRuntime.jsx("div", {
37
+ class: "modal-action",
38
+ children: /* @__PURE__ */ jsxRuntime.jsx(qwik.Slot, {
39
+ name: "actions"
40
+ })
41
+ })
29
42
  ]
30
43
  })
31
44
  });
@@ -8,14 +8,14 @@ const Dialog = component$((props) => {
8
8
  }
9
9
  }));
10
10
  return /* @__PURE__ */ jsx("dialog", {
11
- class: `modal z-20 ${props.class}`,
11
+ class: `modal ${props.class}`,
12
12
  id: props.id,
13
13
  open: props.open.value,
14
14
  children: /* @__PURE__ */ jsxs("div", {
15
15
  class: "modal-box",
16
16
  children: [
17
- props.showCloseIcon && /* @__PURE__ */ jsx("div", {
18
- class: "absolute top-0 right-0 cursor-pointer",
17
+ props.showCloseIcon && /* @__PURE__ */ jsx("button", {
18
+ class: "btn btn-sm btn-circle btn-ghost absolute top-1 right-1",
19
19
  onClick$: () => {
20
20
  props.open.value = false;
21
21
  },
@@ -23,7 +23,20 @@ const Dialog = component$((props) => {
23
23
  size: 24
24
24
  })
25
25
  }),
26
- /* @__PURE__ */ jsx(Slot, {})
26
+ props.title && /* @__PURE__ */ jsx("div", {
27
+ class: "text-lg font-bold",
28
+ children: props.title
29
+ }),
30
+ /* @__PURE__ */ jsx("div", {
31
+ class: "py-4",
32
+ children: /* @__PURE__ */ jsx(Slot, {})
33
+ }),
34
+ /* @__PURE__ */ jsx("div", {
35
+ class: "modal-action",
36
+ children: /* @__PURE__ */ jsx(Slot, {
37
+ name: "actions"
38
+ })
39
+ })
27
40
  ]
28
41
  })
29
42
  });
@@ -0,0 +1,32 @@
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 SelectField = qwik.component$((props) => {
6
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", {
7
+ class: "fieldset",
8
+ children: [
9
+ /* @__PURE__ */ jsxRuntime.jsx("label", {
10
+ class: "label",
11
+ ...props.id && {
12
+ for: props.id
13
+ },
14
+ children: /* @__PURE__ */ jsxRuntime.jsx("span", {
15
+ class: "label-text",
16
+ children: props.title
17
+ })
18
+ }),
19
+ /* @__PURE__ */ jsxRuntime.jsx("select", {
20
+ ...props.name && {
21
+ name: props.name
22
+ },
23
+ ...props.id && {
24
+ id: props.id
25
+ },
26
+ class: "select",
27
+ children: /* @__PURE__ */ jsxRuntime.jsx(qwik.Slot, {})
28
+ })
29
+ ]
30
+ });
31
+ });
32
+ exports.SelectField = SelectField;
@@ -0,0 +1,32 @@
1
+ import { jsxs, jsx } from "@builder.io/qwik/jsx-runtime";
2
+ import { component$, Slot } from "@builder.io/qwik";
3
+ const SelectField = component$((props) => {
4
+ return /* @__PURE__ */ jsxs("div", {
5
+ class: "fieldset",
6
+ children: [
7
+ /* @__PURE__ */ jsx("label", {
8
+ class: "label",
9
+ ...props.id && {
10
+ for: props.id
11
+ },
12
+ children: /* @__PURE__ */ jsx("span", {
13
+ class: "label-text",
14
+ children: props.title
15
+ })
16
+ }),
17
+ /* @__PURE__ */ jsx("select", {
18
+ ...props.name && {
19
+ name: props.name
20
+ },
21
+ ...props.id && {
22
+ id: props.id
23
+ },
24
+ class: "select",
25
+ children: /* @__PURE__ */ jsx(Slot, {})
26
+ })
27
+ ]
28
+ });
29
+ });
30
+ export {
31
+ SelectField
32
+ };
@@ -0,0 +1,51 @@
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 TextField = qwik.component$((props) => {
6
+ const error = qwik.useSignal(props.error);
7
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", {
8
+ class: "fieldset",
9
+ children: [
10
+ /* @__PURE__ */ jsxRuntime.jsx("label", {
11
+ class: "label",
12
+ ...props.id && {
13
+ for: props.id
14
+ },
15
+ children: /* @__PURE__ */ jsxRuntime.jsx("span", {
16
+ class: "label-text",
17
+ children: props.label
18
+ })
19
+ }),
20
+ /* @__PURE__ */ jsxRuntime.jsxs("label", {
21
+ class: `input w-full ${error.value ? "input-error" : ""}`,
22
+ children: [
23
+ /* @__PURE__ */ jsxRuntime.jsx(qwik.Slot, {
24
+ name: "left"
25
+ }),
26
+ /* @__PURE__ */ jsxRuntime.jsx("input", {
27
+ type: "text",
28
+ ...props.name && {
29
+ name: props.name
30
+ },
31
+ ...props.id && {
32
+ id: props.id
33
+ },
34
+ class: "placeholder:opacity-50",
35
+ placeholder: props.placeholder,
36
+ onBlur$: (e) => props.onBlur$ && props.onBlur$(e, error),
37
+ onInput$: (e) => props.onInput$ && props.onInput$(e, error)
38
+ }),
39
+ /* @__PURE__ */ jsxRuntime.jsx(qwik.Slot, {
40
+ name: "right"
41
+ })
42
+ ]
43
+ }),
44
+ error.value && /* @__PURE__ */ jsxRuntime.jsx("div", {
45
+ class: "text-error mt-1 text-xs",
46
+ children: error.value
47
+ })
48
+ ]
49
+ });
50
+ });
51
+ exports.TextField = TextField;
@@ -0,0 +1,51 @@
1
+ import { jsxs, jsx } from "@builder.io/qwik/jsx-runtime";
2
+ import { component$, useSignal, Slot } from "@builder.io/qwik";
3
+ const TextField = component$((props) => {
4
+ const error = useSignal(props.error);
5
+ return /* @__PURE__ */ jsxs("div", {
6
+ class: "fieldset",
7
+ children: [
8
+ /* @__PURE__ */ jsx("label", {
9
+ class: "label",
10
+ ...props.id && {
11
+ for: props.id
12
+ },
13
+ children: /* @__PURE__ */ jsx("span", {
14
+ class: "label-text",
15
+ children: props.label
16
+ })
17
+ }),
18
+ /* @__PURE__ */ jsxs("label", {
19
+ class: `input w-full ${error.value ? "input-error" : ""}`,
20
+ children: [
21
+ /* @__PURE__ */ jsx(Slot, {
22
+ name: "left"
23
+ }),
24
+ /* @__PURE__ */ jsx("input", {
25
+ type: "text",
26
+ ...props.name && {
27
+ name: props.name
28
+ },
29
+ ...props.id && {
30
+ id: props.id
31
+ },
32
+ class: "placeholder:opacity-50",
33
+ placeholder: props.placeholder,
34
+ onBlur$: (e) => props.onBlur$ && props.onBlur$(e, error),
35
+ onInput$: (e) => props.onInput$ && props.onInput$(e, error)
36
+ }),
37
+ /* @__PURE__ */ jsx(Slot, {
38
+ name: "right"
39
+ })
40
+ ]
41
+ }),
42
+ error.value && /* @__PURE__ */ jsx("div", {
43
+ class: "text-error mt-1 text-xs",
44
+ children: error.value
45
+ })
46
+ ]
47
+ });
48
+ });
49
+ export {
50
+ TextField
51
+ };
@@ -6,6 +6,8 @@ const alertSuccess = require("./components/alert-success.qwik.cjs");
6
6
  const alertWarning = require("./components/alert-warning.qwik.cjs");
7
7
  const dialog = require("./components/dialog.qwik.cjs");
8
8
  const paceBar = require("./components/pace-bar.qwik.cjs");
9
+ const selectField = require("./components/select-field.qwik.cjs");
10
+ const textField = require("./components/text-field.qwik.cjs");
9
11
  const universalLayout = require("./components/universal-layout.qwik.cjs");
10
12
  exports.AlertError = alertError.AlertError;
11
13
  exports.AlertInfo = alertInfo.AlertInfo;
@@ -13,4 +15,6 @@ exports.AlertSuccess = alertSuccess.AlertSuccess;
13
15
  exports.AlertWarning = alertWarning.AlertWarning;
14
16
  exports.Dialog = dialog.Dialog;
15
17
  exports.PaceBar = paceBar.PaceBar;
18
+ exports.SelectField = selectField.SelectField;
19
+ exports.TextField = textField.TextField;
16
20
  exports.UniversalLayout = universalLayout.UniversalLayout;
@@ -4,6 +4,8 @@ import { AlertSuccess } from "./components/alert-success.qwik.mjs";
4
4
  import { AlertWarning } from "./components/alert-warning.qwik.mjs";
5
5
  import { Dialog } from "./components/dialog.qwik.mjs";
6
6
  import { PaceBar } from "./components/pace-bar.qwik.mjs";
7
+ import { SelectField } from "./components/select-field.qwik.mjs";
8
+ import { TextField } from "./components/text-field.qwik.mjs";
7
9
  import { UniversalLayout } from "./components/universal-layout.qwik.mjs";
8
10
  export {
9
11
  AlertError,
@@ -12,5 +14,7 @@ export {
12
14
  AlertWarning,
13
15
  Dialog,
14
16
  PaceBar,
17
+ SelectField,
18
+ TextField,
15
19
  UniversalLayout
16
20
  };
@@ -0,0 +1,8 @@
1
+ export interface CheckboxFieldProps {
2
+ id?: string;
3
+ label: string;
4
+ name?: string;
5
+ checked?: boolean;
6
+ }
7
+ declare const _default: import("@builder.io/qwik").Component<CheckboxFieldProps>;
8
+ export default _default;
@@ -4,5 +4,6 @@ export interface DialogProps {
4
4
  open: Signal<boolean>;
5
5
  showCloseIcon?: boolean;
6
6
  class?: string;
7
+ title?: string;
7
8
  }
8
9
  export declare const Dialog: import("@builder.io/qwik").Component<DialogProps>;
@@ -0,0 +1,6 @@
1
+ export interface SelectFieldProps {
2
+ id?: string;
3
+ title: string;
4
+ name?: string;
5
+ }
6
+ export declare const SelectField: import("@builder.io/qwik").Component<SelectFieldProps>;
@@ -0,0 +1,12 @@
1
+ import { QRL, Signal } from '@builder.io/qwik';
2
+ export interface TextFieldProps {
3
+ id?: string;
4
+ label: string;
5
+ name?: string;
6
+ placeholder?: string;
7
+ error?: string;
8
+ maxLength?: number;
9
+ onBlur$?: QRL<(event: FocusEvent, error: Signal<string | undefined | null>) => void>;
10
+ onInput$?: QRL<(event: InputEvent, error: Signal<string | undefined | null>) => void>;
11
+ }
12
+ export declare const TextField: import("@builder.io/qwik").Component<TextFieldProps>;
@@ -2,6 +2,9 @@ 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/checkbox-field';
5
6
  export * from './components/dialog';
6
7
  export * from './components/pace-bar';
8
+ export * from './components/select-field';
9
+ export * from './components/text-field';
7
10
  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.11",
3
+ "version": "0.0.12",
4
4
  "description": "NR1E Qwik UI Library",
5
5
  "author": "NR1E, Inc.",
6
6
  "publishConfig": {