@nr1e/qwik-ui 0.0.22 → 0.0.24
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/lib/components/add-button.qwik.cjs +17 -0
- package/lib/components/add-button.qwik.mjs +17 -0
- package/lib/components/checkbox-field.qwik.cjs +20 -5
- package/lib/components/checkbox-field.qwik.mjs +20 -5
- package/lib/components/select-field.qwik.cjs +2 -2
- package/lib/components/select-field.qwik.mjs +2 -2
- package/lib/components/text-field.qwik.cjs +20 -5
- package/lib/components/text-field.qwik.mjs +20 -5
- package/lib/index.qwik.cjs +2 -0
- package/lib/index.qwik.mjs +2 -0
- package/lib/qwik-icons/lib/components/icons/mdi-add-circle-outline.qwik.qwik.cjs +16 -0
- package/lib/qwik-icons/lib/components/icons/mdi-add-circle-outline.qwik.qwik.mjs +16 -0
- package/lib-types/components/add-button.d.ts +4 -0
- package/lib-types/components/checkbox-field.d.ts +1 -1
- package/lib-types/components/text-field.d.ts +1 -1
- package/lib-types/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,17 @@
|
|
|
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 mdiAddCircleOutline_qwik = require("../qwik-icons/lib/components/icons/mdi-add-circle-outline.qwik.qwik.cjs");
|
|
6
|
+
const AddButton = qwik.component$((props) => {
|
|
7
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("button", {
|
|
8
|
+
class: `btn ${props.class ?? ""}`,
|
|
9
|
+
children: [
|
|
10
|
+
/* @__PURE__ */ jsxRuntime.jsx(mdiAddCircleOutline_qwik.MdiAddCircleOutline, {
|
|
11
|
+
size: 24
|
|
12
|
+
}),
|
|
13
|
+
/* @__PURE__ */ jsxRuntime.jsx(qwik.Slot, {})
|
|
14
|
+
]
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
exports.AddButton = AddButton;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsxs, jsx } from "@builder.io/qwik/jsx-runtime";
|
|
2
|
+
import { component$, Slot } from "@builder.io/qwik";
|
|
3
|
+
import { MdiAddCircleOutline } from "../qwik-icons/lib/components/icons/mdi-add-circle-outline.qwik.qwik.mjs";
|
|
4
|
+
const AddButton = component$((props) => {
|
|
5
|
+
return /* @__PURE__ */ jsxs("button", {
|
|
6
|
+
class: `btn ${props.class ?? ""}`,
|
|
7
|
+
children: [
|
|
8
|
+
/* @__PURE__ */ jsx(MdiAddCircleOutline, {
|
|
9
|
+
size: 24
|
|
10
|
+
}),
|
|
11
|
+
/* @__PURE__ */ jsx(Slot, {})
|
|
12
|
+
]
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
export {
|
|
16
|
+
AddButton
|
|
17
|
+
};
|
|
@@ -4,22 +4,39 @@ const jsxRuntime = require("@builder.io/qwik/jsx-runtime");
|
|
|
4
4
|
const qwik = require("@builder.io/qwik");
|
|
5
5
|
const CheckboxField = qwik.component$((props) => {
|
|
6
6
|
const error = qwik.useSignal(typeof props.error === "string" ? props.error : props.error?.value);
|
|
7
|
+
const checked = qwik.useSignal(typeof props.checked === "boolean" ? props.checked : props.checked?.value ?? false);
|
|
7
8
|
qwik.useTask$(({ track }) => {
|
|
8
|
-
track(() => error.value);
|
|
9
9
|
if (props.error && typeof props.error !== "string") {
|
|
10
|
+
track(() => error.value);
|
|
10
11
|
if (error.value !== props.error?.value) {
|
|
11
12
|
props.error.value = error.value;
|
|
12
13
|
}
|
|
13
14
|
}
|
|
14
15
|
});
|
|
15
16
|
qwik.useTask$(({ track }) => {
|
|
16
|
-
track(() => props.error.value);
|
|
17
17
|
if (props.error && typeof props.error !== "string") {
|
|
18
|
+
track(() => props.error.value);
|
|
18
19
|
if (props.error && error.value !== props.error.value) {
|
|
19
20
|
error.value = props.error.value;
|
|
20
21
|
}
|
|
21
22
|
}
|
|
22
23
|
});
|
|
24
|
+
qwik.useTask$(({ track }) => {
|
|
25
|
+
if (props.checked && typeof props.checked !== "boolean") {
|
|
26
|
+
track(() => checked.value);
|
|
27
|
+
if (checked.value !== props.checked?.value) {
|
|
28
|
+
props.checked.value = checked.value;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
qwik.useTask$(({ track }) => {
|
|
33
|
+
if (props.checked && typeof props.checked !== "boolean") {
|
|
34
|
+
track(() => props.checked.value);
|
|
35
|
+
if (props.checked && checked.value !== props.checked.value) {
|
|
36
|
+
checked.value = props.checked.value;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
});
|
|
23
40
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
24
41
|
class: "fieldset",
|
|
25
42
|
children: [
|
|
@@ -37,9 +54,7 @@ const CheckboxField = qwik.component$((props) => {
|
|
|
37
54
|
...props.id && {
|
|
38
55
|
id: props.id
|
|
39
56
|
},
|
|
40
|
-
|
|
41
|
-
checked: props.checked
|
|
42
|
-
},
|
|
57
|
+
checked: checked.value,
|
|
43
58
|
class: `checkbox ${error.value ? "checkbox-error" : ""}`,
|
|
44
59
|
onClick$: (e) => props.onClick$ && props.onClick$(e, e.target.checked, error)
|
|
45
60
|
}),
|
|
@@ -2,22 +2,39 @@ import { jsxs, jsx } from "@builder.io/qwik/jsx-runtime";
|
|
|
2
2
|
import { component$, useSignal, useTask$ } from "@builder.io/qwik";
|
|
3
3
|
const CheckboxField = component$((props) => {
|
|
4
4
|
const error = useSignal(typeof props.error === "string" ? props.error : props.error?.value);
|
|
5
|
+
const checked = useSignal(typeof props.checked === "boolean" ? props.checked : props.checked?.value ?? false);
|
|
5
6
|
useTask$(({ track }) => {
|
|
6
|
-
track(() => error.value);
|
|
7
7
|
if (props.error && typeof props.error !== "string") {
|
|
8
|
+
track(() => error.value);
|
|
8
9
|
if (error.value !== props.error?.value) {
|
|
9
10
|
props.error.value = error.value;
|
|
10
11
|
}
|
|
11
12
|
}
|
|
12
13
|
});
|
|
13
14
|
useTask$(({ track }) => {
|
|
14
|
-
track(() => props.error.value);
|
|
15
15
|
if (props.error && typeof props.error !== "string") {
|
|
16
|
+
track(() => props.error.value);
|
|
16
17
|
if (props.error && error.value !== props.error.value) {
|
|
17
18
|
error.value = props.error.value;
|
|
18
19
|
}
|
|
19
20
|
}
|
|
20
21
|
});
|
|
22
|
+
useTask$(({ track }) => {
|
|
23
|
+
if (props.checked && typeof props.checked !== "boolean") {
|
|
24
|
+
track(() => checked.value);
|
|
25
|
+
if (checked.value !== props.checked?.value) {
|
|
26
|
+
props.checked.value = checked.value;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
useTask$(({ track }) => {
|
|
31
|
+
if (props.checked && typeof props.checked !== "boolean") {
|
|
32
|
+
track(() => props.checked.value);
|
|
33
|
+
if (props.checked && checked.value !== props.checked.value) {
|
|
34
|
+
checked.value = props.checked.value;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
});
|
|
21
38
|
return /* @__PURE__ */ jsxs("div", {
|
|
22
39
|
class: "fieldset",
|
|
23
40
|
children: [
|
|
@@ -35,9 +52,7 @@ const CheckboxField = component$((props) => {
|
|
|
35
52
|
...props.id && {
|
|
36
53
|
id: props.id
|
|
37
54
|
},
|
|
38
|
-
|
|
39
|
-
checked: props.checked
|
|
40
|
-
},
|
|
55
|
+
checked: checked.value,
|
|
41
56
|
class: `checkbox ${error.value ? "checkbox-error" : ""}`,
|
|
42
57
|
onClick$: (e) => props.onClick$ && props.onClick$(e, e.target.checked, error)
|
|
43
58
|
}),
|
|
@@ -5,16 +5,16 @@ const qwik = require("@builder.io/qwik");
|
|
|
5
5
|
const SelectField = qwik.component$((props) => {
|
|
6
6
|
const error = qwik.useSignal(typeof props.error === "string" ? props.error : props.error?.value);
|
|
7
7
|
qwik.useTask$(({ track }) => {
|
|
8
|
-
track(() => error.value);
|
|
9
8
|
if (props.error && typeof props.error !== "string") {
|
|
9
|
+
track(() => error.value);
|
|
10
10
|
if (error.value !== props.error?.value) {
|
|
11
11
|
props.error.value = error.value;
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
});
|
|
15
15
|
qwik.useTask$(({ track }) => {
|
|
16
|
-
track(() => props.error.value);
|
|
17
16
|
if (props.error && typeof props.error !== "string") {
|
|
17
|
+
track(() => props.error.value);
|
|
18
18
|
if (props.error && error.value !== props.error.value) {
|
|
19
19
|
error.value = props.error.value;
|
|
20
20
|
}
|
|
@@ -3,16 +3,16 @@ import { component$, useSignal, useTask$, Slot } from "@builder.io/qwik";
|
|
|
3
3
|
const SelectField = component$((props) => {
|
|
4
4
|
const error = useSignal(typeof props.error === "string" ? props.error : props.error?.value);
|
|
5
5
|
useTask$(({ track }) => {
|
|
6
|
-
track(() => error.value);
|
|
7
6
|
if (props.error && typeof props.error !== "string") {
|
|
7
|
+
track(() => error.value);
|
|
8
8
|
if (error.value !== props.error?.value) {
|
|
9
9
|
props.error.value = error.value;
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
});
|
|
13
13
|
useTask$(({ track }) => {
|
|
14
|
-
track(() => props.error.value);
|
|
15
14
|
if (props.error && typeof props.error !== "string") {
|
|
15
|
+
track(() => props.error.value);
|
|
16
16
|
if (props.error && error.value !== props.error.value) {
|
|
17
17
|
error.value = props.error.value;
|
|
18
18
|
}
|
|
@@ -4,22 +4,39 @@ const jsxRuntime = require("@builder.io/qwik/jsx-runtime");
|
|
|
4
4
|
const qwik = require("@builder.io/qwik");
|
|
5
5
|
const TextField = qwik.component$((props) => {
|
|
6
6
|
const error = qwik.useSignal(typeof props.error === "string" ? props.error : props.error?.value);
|
|
7
|
+
const value = qwik.useSignal(typeof props.value === "string" ? props.value : props.value?.value);
|
|
7
8
|
qwik.useTask$(({ track }) => {
|
|
8
|
-
track(() => error.value);
|
|
9
9
|
if (props.error && typeof props.error !== "string") {
|
|
10
|
+
track(() => error.value);
|
|
10
11
|
if (error.value !== props.error?.value) {
|
|
11
12
|
props.error.value = error.value;
|
|
12
13
|
}
|
|
13
14
|
}
|
|
14
15
|
});
|
|
15
16
|
qwik.useTask$(({ track }) => {
|
|
16
|
-
track(() => props.error.value);
|
|
17
17
|
if (props.error && typeof props.error !== "string") {
|
|
18
|
+
track(() => props.error.value);
|
|
18
19
|
if (props.error && error.value !== props.error.value) {
|
|
19
20
|
error.value = props.error.value;
|
|
20
21
|
}
|
|
21
22
|
}
|
|
22
23
|
});
|
|
24
|
+
qwik.useTask$(({ track }) => {
|
|
25
|
+
if (props.value && typeof props.value !== "string") {
|
|
26
|
+
track(() => value.value);
|
|
27
|
+
if (value.value !== props.value?.value) {
|
|
28
|
+
props.value.value = value.value;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
qwik.useTask$(({ track }) => {
|
|
33
|
+
if (props.value && typeof props.value !== "string") {
|
|
34
|
+
track(() => props.value.value);
|
|
35
|
+
if (props.value && error.value !== props.value.value) {
|
|
36
|
+
value.value = props.value.value;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
});
|
|
23
40
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
24
41
|
class: "fieldset",
|
|
25
42
|
children: [
|
|
@@ -47,9 +64,7 @@ const TextField = qwik.component$((props) => {
|
|
|
47
64
|
...props.name && {
|
|
48
65
|
name: props.name
|
|
49
66
|
},
|
|
50
|
-
|
|
51
|
-
value: props.value
|
|
52
|
-
},
|
|
67
|
+
value: value.value,
|
|
53
68
|
class: "placeholder:opacity-50",
|
|
54
69
|
placeholder: props.placeholder,
|
|
55
70
|
onBlur$: (e) => {
|
|
@@ -2,22 +2,39 @@ import { jsxs, jsx } from "@builder.io/qwik/jsx-runtime";
|
|
|
2
2
|
import { component$, useSignal, useTask$, Slot } from "@builder.io/qwik";
|
|
3
3
|
const TextField = component$((props) => {
|
|
4
4
|
const error = useSignal(typeof props.error === "string" ? props.error : props.error?.value);
|
|
5
|
+
const value = useSignal(typeof props.value === "string" ? props.value : props.value?.value);
|
|
5
6
|
useTask$(({ track }) => {
|
|
6
|
-
track(() => error.value);
|
|
7
7
|
if (props.error && typeof props.error !== "string") {
|
|
8
|
+
track(() => error.value);
|
|
8
9
|
if (error.value !== props.error?.value) {
|
|
9
10
|
props.error.value = error.value;
|
|
10
11
|
}
|
|
11
12
|
}
|
|
12
13
|
});
|
|
13
14
|
useTask$(({ track }) => {
|
|
14
|
-
track(() => props.error.value);
|
|
15
15
|
if (props.error && typeof props.error !== "string") {
|
|
16
|
+
track(() => props.error.value);
|
|
16
17
|
if (props.error && error.value !== props.error.value) {
|
|
17
18
|
error.value = props.error.value;
|
|
18
19
|
}
|
|
19
20
|
}
|
|
20
21
|
});
|
|
22
|
+
useTask$(({ track }) => {
|
|
23
|
+
if (props.value && typeof props.value !== "string") {
|
|
24
|
+
track(() => value.value);
|
|
25
|
+
if (value.value !== props.value?.value) {
|
|
26
|
+
props.value.value = value.value;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
useTask$(({ track }) => {
|
|
31
|
+
if (props.value && typeof props.value !== "string") {
|
|
32
|
+
track(() => props.value.value);
|
|
33
|
+
if (props.value && error.value !== props.value.value) {
|
|
34
|
+
value.value = props.value.value;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
});
|
|
21
38
|
return /* @__PURE__ */ jsxs("div", {
|
|
22
39
|
class: "fieldset",
|
|
23
40
|
children: [
|
|
@@ -45,9 +62,7 @@ const TextField = component$((props) => {
|
|
|
45
62
|
...props.name && {
|
|
46
63
|
name: props.name
|
|
47
64
|
},
|
|
48
|
-
|
|
49
|
-
value: props.value
|
|
50
|
-
},
|
|
65
|
+
value: value.value,
|
|
51
66
|
class: "placeholder:opacity-50",
|
|
52
67
|
placeholder: props.placeholder,
|
|
53
68
|
onBlur$: (e) => {
|
package/lib/index.qwik.cjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const addButton = require("./components/add-button.qwik.cjs");
|
|
3
4
|
const alertError = require("./components/alert-error.qwik.cjs");
|
|
4
5
|
const alertInfo = require("./components/alert-info.qwik.cjs");
|
|
5
6
|
const alertSuccess = require("./components/alert-success.qwik.cjs");
|
|
@@ -10,6 +11,7 @@ const paceBar = require("./components/pace-bar.qwik.cjs");
|
|
|
10
11
|
const selectField = require("./components/select-field.qwik.cjs");
|
|
11
12
|
const textField = require("./components/text-field.qwik.cjs");
|
|
12
13
|
const universalLayout = require("./components/universal-layout.qwik.cjs");
|
|
14
|
+
exports.AddButton = addButton.AddButton;
|
|
13
15
|
exports.AlertError = alertError.AlertError;
|
|
14
16
|
exports.AlertInfo = alertInfo.AlertInfo;
|
|
15
17
|
exports.AlertSuccess = alertSuccess.AlertSuccess;
|
package/lib/index.qwik.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AddButton } from "./components/add-button.qwik.mjs";
|
|
1
2
|
import { AlertError } from "./components/alert-error.qwik.mjs";
|
|
2
3
|
import { AlertInfo } from "./components/alert-info.qwik.mjs";
|
|
3
4
|
import { AlertSuccess } from "./components/alert-success.qwik.mjs";
|
|
@@ -9,6 +10,7 @@ import { SelectField } from "./components/select-field.qwik.mjs";
|
|
|
9
10
|
import { TextField } from "./components/text-field.qwik.mjs";
|
|
10
11
|
import { UniversalLayout } from "./components/universal-layout.qwik.mjs";
|
|
11
12
|
export {
|
|
13
|
+
AddButton,
|
|
12
14
|
AlertError,
|
|
13
15
|
AlertInfo,
|
|
14
16
|
AlertSuccess,
|
|
@@ -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 MdiAddCircleOutline = 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: "M12 20c-4.41 0-8-3.59-8-8s3.59-8 8-8s8 3.59 8 8s-3.59 8-8 8m0-18A10 10 0 0 0 2 12a10 10 0 0 0 10 10a10 10 0 0 0 10-10A10 10 0 0 0 12 2m1 5h-2v4H7v2h4v4h2v-4h4v-2h-4z"
|
|
13
|
+
})
|
|
14
|
+
});
|
|
15
|
+
});
|
|
16
|
+
exports.MdiAddCircleOutline = MdiAddCircleOutline;
|
|
@@ -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 MdiAddCircleOutline = 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: "M12 20c-4.41 0-8-3.59-8-8s3.59-8 8-8s8 3.59 8 8s-3.59 8-8 8m0-18A10 10 0 0 0 2 12a10 10 0 0 0 10 10a10 10 0 0 0 10-10A10 10 0 0 0 12 2m1 5h-2v4H7v2h4v4h2v-4h4v-2h-4z"
|
|
11
|
+
})
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
export {
|
|
15
|
+
MdiAddCircleOutline
|
|
16
|
+
};
|
|
@@ -3,7 +3,7 @@ export interface CheckboxFieldProps {
|
|
|
3
3
|
id?: string;
|
|
4
4
|
label: string;
|
|
5
5
|
name?: string;
|
|
6
|
-
checked?: boolean
|
|
6
|
+
checked?: boolean | Signal<boolean>;
|
|
7
7
|
error?: string | Signal<string | undefined>;
|
|
8
8
|
onClick$?: QRL<(event: Event, checked: boolean, error: Signal<string | undefined>) => void>;
|
|
9
9
|
}
|
package/lib-types/index.d.ts
CHANGED