@nr1e/qwik-ui 2.0.16 → 2.0.18
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 +6 -10
- package/lib/components/add-button.qwik.mjs +8 -12
- package/lib/components/button.qwik.cjs +28 -0
- package/lib/components/button.qwik.mjs +28 -0
- package/lib/components/cancel-button.qwik.cjs +12 -0
- package/lib/components/cancel-button.qwik.mjs +12 -0
- package/lib/components/processing-button.qwik.cjs +42 -0
- package/lib/components/processing-button.qwik.mjs +42 -0
- package/lib/components/refresh-button.qwik.cjs +16 -0
- package/lib/components/refresh-button.qwik.mjs +16 -0
- package/lib/components/submit-button.qwik.cjs +6 -19
- package/lib/components/submit-button.qwik.mjs +8 -21
- package/lib/components/text-field.qwik.cjs +10 -4
- package/lib/components/text-field.qwik.mjs +10 -4
- package/lib/index.qwik.cjs +8 -0
- package/lib/index.qwik.mjs +8 -0
- package/lib-types/components/add-button.d.ts +22 -1
- package/lib-types/components/button.d.ts +47 -0
- package/lib-types/components/cancel-button.d.ts +28 -0
- package/lib-types/components/processing-button.d.ts +18 -0
- package/lib-types/components/refresh-button.d.ts +36 -0
- package/lib-types/components/submit-button.d.ts +26 -3
- package/lib-types/components/text-field.d.ts +4 -2
- package/lib-types/index.d.ts +4 -0
- package/package.json +2 -2
|
@@ -3,17 +3,13 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const jsxRuntime = require("@builder.io/qwik/jsx-runtime");
|
|
4
4
|
const qwik = require("@builder.io/qwik");
|
|
5
5
|
const qwikIcons = require("@nr1e/qwik-icons");
|
|
6
|
+
const button = require("./button.qwik.cjs");
|
|
6
7
|
const AddButton = qwik.component$((props) => {
|
|
7
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
/* @__PURE__ */ jsxRuntime.jsx(qwikIcons.MdiAddCircleOutline, {
|
|
13
|
-
size: 18
|
|
14
|
-
}),
|
|
15
|
-
/* @__PURE__ */ jsxRuntime.jsx(qwik.Slot, {})
|
|
16
|
-
]
|
|
8
|
+
return /* @__PURE__ */ jsxRuntime.jsx(button.Button, {
|
|
9
|
+
...props,
|
|
10
|
+
class: `btn-primary ${props.class ?? ""}`,
|
|
11
|
+
icon: qwikIcons.MdiAddCircleOutline,
|
|
12
|
+
text: props.text || "Add"
|
|
17
13
|
});
|
|
18
14
|
});
|
|
19
15
|
exports.AddButton = AddButton;
|
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { component
|
|
1
|
+
import { jsx } from "@builder.io/qwik/jsx-runtime";
|
|
2
|
+
import { component$ } from "@builder.io/qwik";
|
|
3
3
|
import { MdiAddCircleOutline } from "@nr1e/qwik-icons";
|
|
4
|
+
import { Button } from "./button.qwik.mjs";
|
|
4
5
|
const AddButton = component$((props) => {
|
|
5
|
-
return /* @__PURE__ */
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
/* @__PURE__ */ jsx(MdiAddCircleOutline, {
|
|
11
|
-
size: 18
|
|
12
|
-
}),
|
|
13
|
-
/* @__PURE__ */ jsx(Slot, {})
|
|
14
|
-
]
|
|
6
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
7
|
+
...props,
|
|
8
|
+
class: `btn-primary ${props.class ?? ""}`,
|
|
9
|
+
icon: MdiAddCircleOutline,
|
|
10
|
+
text: props.text || "Add"
|
|
15
11
|
});
|
|
16
12
|
});
|
|
17
13
|
export {
|
|
@@ -0,0 +1,28 @@
|
|
|
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 Button = qwik.component$((props) => {
|
|
6
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("button", {
|
|
7
|
+
class: `btn props.disabled ? 'disabled' : ''} ${props.class ?? ""}`,
|
|
8
|
+
disabled: props.disabled,
|
|
9
|
+
id: props.id,
|
|
10
|
+
type: props.type ?? "button",
|
|
11
|
+
onClick$: !props.disabled && props.onClick$ ? props.onClick$ : void 0,
|
|
12
|
+
children: [
|
|
13
|
+
/* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
14
|
+
children: props.icon ? /* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
15
|
+
class: props.iconClass,
|
|
16
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(props.icon, {
|
|
17
|
+
size: props.iconSize ?? 18
|
|
18
|
+
})
|
|
19
|
+
}) : /* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
20
|
+
class: props.iconClass,
|
|
21
|
+
"q:slot": "icon"
|
|
22
|
+
})
|
|
23
|
+
}),
|
|
24
|
+
props.text ? props.text : /* @__PURE__ */ jsxRuntime.jsx(qwik.Slot, {})
|
|
25
|
+
]
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
exports.Button = Button;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsxs, jsx, Fragment } from "@builder.io/qwik/jsx-runtime";
|
|
2
|
+
import { component$, Slot } from "@builder.io/qwik";
|
|
3
|
+
const Button = component$((props) => {
|
|
4
|
+
return /* @__PURE__ */ jsxs("button", {
|
|
5
|
+
class: `btn props.disabled ? 'disabled' : ''} ${props.class ?? ""}`,
|
|
6
|
+
disabled: props.disabled,
|
|
7
|
+
id: props.id,
|
|
8
|
+
type: props.type ?? "button",
|
|
9
|
+
onClick$: !props.disabled && props.onClick$ ? props.onClick$ : void 0,
|
|
10
|
+
children: [
|
|
11
|
+
/* @__PURE__ */ jsx(Fragment, {
|
|
12
|
+
children: props.icon ? /* @__PURE__ */ jsx("span", {
|
|
13
|
+
class: props.iconClass,
|
|
14
|
+
children: /* @__PURE__ */ jsx(props.icon, {
|
|
15
|
+
size: props.iconSize ?? 18
|
|
16
|
+
})
|
|
17
|
+
}) : /* @__PURE__ */ jsx("span", {
|
|
18
|
+
class: props.iconClass,
|
|
19
|
+
"q:slot": "icon"
|
|
20
|
+
})
|
|
21
|
+
}),
|
|
22
|
+
props.text ? props.text : /* @__PURE__ */ jsx(Slot, {})
|
|
23
|
+
]
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
export {
|
|
27
|
+
Button
|
|
28
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
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 button = require("./button.qwik.cjs");
|
|
6
|
+
const CancelButton = qwik.component$((props) => {
|
|
7
|
+
return /* @__PURE__ */ jsxRuntime.jsx(button.Button, {
|
|
8
|
+
...props,
|
|
9
|
+
text: props.text || "Cancel"
|
|
10
|
+
});
|
|
11
|
+
});
|
|
12
|
+
exports.CancelButton = CancelButton;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx } from "@builder.io/qwik/jsx-runtime";
|
|
2
|
+
import { component$ } from "@builder.io/qwik";
|
|
3
|
+
import { Button } from "./button.qwik.mjs";
|
|
4
|
+
const CancelButton = component$((props) => {
|
|
5
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
6
|
+
...props,
|
|
7
|
+
text: props.text || "Cancel"
|
|
8
|
+
});
|
|
9
|
+
});
|
|
10
|
+
export {
|
|
11
|
+
CancelButton
|
|
12
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
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 qwikIcons = require("@nr1e/qwik-icons");
|
|
6
|
+
const button = require("./button.qwik.cjs");
|
|
7
|
+
const ProcessingButton = qwik.component$((props) => {
|
|
8
|
+
const externalProcessing = qwik.isSignal(props.processing) ? props.processing : void 0;
|
|
9
|
+
const internalProcessing = qwik.useSignal(qwik.isSignal(props.processing) ? props.processing.value : props.processing ?? false);
|
|
10
|
+
const onClick$ = props.onClick$;
|
|
11
|
+
qwik.useTask$(({ track }) => {
|
|
12
|
+
if (externalProcessing) {
|
|
13
|
+
track(() => externalProcessing.value);
|
|
14
|
+
if (externalProcessing.value !== internalProcessing.value) {
|
|
15
|
+
internalProcessing.value = externalProcessing.value;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
qwik.useTask$(({ track }) => {
|
|
20
|
+
if (externalProcessing) {
|
|
21
|
+
track(() => internalProcessing.value);
|
|
22
|
+
if (externalProcessing.value !== internalProcessing.value) {
|
|
23
|
+
externalProcessing.value = internalProcessing.value;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
return /* @__PURE__ */ jsxRuntime.jsx(button.Button, {
|
|
28
|
+
...props,
|
|
29
|
+
class: `${props.processing || props.disabled ? "disabled" : ""} ${props.class ?? ""}`,
|
|
30
|
+
disabled: internalProcessing.value || props.disabled,
|
|
31
|
+
onClick$: (e) => {
|
|
32
|
+
internalProcessing.value = true;
|
|
33
|
+
if (onClick$) {
|
|
34
|
+
onClick$(e);
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
icon: internalProcessing.value ? qwikIcons.SpinnersBarsFade : props.icon,
|
|
38
|
+
iconClass: internalProcessing.value ? "animate-spin" : props.iconClass,
|
|
39
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(qwik.Slot, {})
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
exports.ProcessingButton = ProcessingButton;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx } from "@builder.io/qwik/jsx-runtime";
|
|
2
|
+
import { component$, isSignal, useSignal, useTask$, Slot } from "@builder.io/qwik";
|
|
3
|
+
import { SpinnersBarsFade } from "@nr1e/qwik-icons";
|
|
4
|
+
import { Button } from "./button.qwik.mjs";
|
|
5
|
+
const ProcessingButton = component$((props) => {
|
|
6
|
+
const externalProcessing = isSignal(props.processing) ? props.processing : void 0;
|
|
7
|
+
const internalProcessing = useSignal(isSignal(props.processing) ? props.processing.value : props.processing ?? false);
|
|
8
|
+
const onClick$ = props.onClick$;
|
|
9
|
+
useTask$(({ track }) => {
|
|
10
|
+
if (externalProcessing) {
|
|
11
|
+
track(() => externalProcessing.value);
|
|
12
|
+
if (externalProcessing.value !== internalProcessing.value) {
|
|
13
|
+
internalProcessing.value = externalProcessing.value;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
useTask$(({ track }) => {
|
|
18
|
+
if (externalProcessing) {
|
|
19
|
+
track(() => internalProcessing.value);
|
|
20
|
+
if (externalProcessing.value !== internalProcessing.value) {
|
|
21
|
+
externalProcessing.value = internalProcessing.value;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
26
|
+
...props,
|
|
27
|
+
class: `${props.processing || props.disabled ? "disabled" : ""} ${props.class ?? ""}`,
|
|
28
|
+
disabled: internalProcessing.value || props.disabled,
|
|
29
|
+
onClick$: (e) => {
|
|
30
|
+
internalProcessing.value = true;
|
|
31
|
+
if (onClick$) {
|
|
32
|
+
onClick$(e);
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
icon: internalProcessing.value ? SpinnersBarsFade : props.icon,
|
|
36
|
+
iconClass: internalProcessing.value ? "animate-spin" : props.iconClass,
|
|
37
|
+
children: /* @__PURE__ */ jsx(Slot, {})
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
export {
|
|
41
|
+
ProcessingButton
|
|
42
|
+
};
|
|
@@ -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 qwikIcons = require("@nr1e/qwik-icons");
|
|
6
|
+
const processingButton = require("./processing-button.qwik.cjs");
|
|
7
|
+
const RefreshButton = qwik.component$((props) => {
|
|
8
|
+
return /* @__PURE__ */ jsxRuntime.jsx(processingButton.ProcessingButton, {
|
|
9
|
+
...props,
|
|
10
|
+
class: `btn-primary ${props.class ?? ""}`,
|
|
11
|
+
text: props.text || "Refresh",
|
|
12
|
+
icon: qwikIcons.MdiRefresh,
|
|
13
|
+
processing: props.refreshing
|
|
14
|
+
});
|
|
15
|
+
});
|
|
16
|
+
exports.RefreshButton = RefreshButton;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx } from "@builder.io/qwik/jsx-runtime";
|
|
2
|
+
import { component$ } from "@builder.io/qwik";
|
|
3
|
+
import { MdiRefresh } from "@nr1e/qwik-icons";
|
|
4
|
+
import { ProcessingButton } from "./processing-button.qwik.mjs";
|
|
5
|
+
const RefreshButton = component$((props) => {
|
|
6
|
+
return /* @__PURE__ */ jsx(ProcessingButton, {
|
|
7
|
+
...props,
|
|
8
|
+
class: `btn-primary ${props.class ?? ""}`,
|
|
9
|
+
text: props.text || "Refresh",
|
|
10
|
+
icon: MdiRefresh,
|
|
11
|
+
processing: props.refreshing
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
export {
|
|
15
|
+
RefreshButton
|
|
16
|
+
};
|
|
@@ -2,26 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const jsxRuntime = require("@builder.io/qwik/jsx-runtime");
|
|
4
4
|
const qwik = require("@builder.io/qwik");
|
|
5
|
-
const
|
|
5
|
+
const processingButton = require("./processing-button.qwik.cjs");
|
|
6
6
|
const SubmitButton = qwik.component$((props) => {
|
|
7
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
disabled: props.submitting || props.disabled,
|
|
13
|
-
children: [
|
|
14
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
15
|
-
"q:slot": "icon"
|
|
16
|
-
}),
|
|
17
|
-
props.submitting && /* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
18
|
-
class: "animate-spin",
|
|
19
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(qwikIcons.SpinnersBarsRotateFade, {
|
|
20
|
-
size: 18
|
|
21
|
-
})
|
|
22
|
-
}),
|
|
23
|
-
/* @__PURE__ */ jsxRuntime.jsx(qwik.Slot, {})
|
|
24
|
-
]
|
|
7
|
+
return /* @__PURE__ */ jsxRuntime.jsx(processingButton.ProcessingButton, {
|
|
8
|
+
...props,
|
|
9
|
+
class: `btn-primary ${props.class ?? ""}`,
|
|
10
|
+
text: props.text || "Submit",
|
|
11
|
+
processing: props.submitting
|
|
25
12
|
});
|
|
26
13
|
});
|
|
27
14
|
exports.SubmitButton = SubmitButton;
|
|
@@ -1,25 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { component
|
|
3
|
-
import {
|
|
1
|
+
import { jsx } from "@builder.io/qwik/jsx-runtime";
|
|
2
|
+
import { component$ } from "@builder.io/qwik";
|
|
3
|
+
import { ProcessingButton } from "./processing-button.qwik.mjs";
|
|
4
4
|
const SubmitButton = component$((props) => {
|
|
5
|
-
return /* @__PURE__ */
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
disabled: props.submitting || props.disabled,
|
|
11
|
-
children: [
|
|
12
|
-
/* @__PURE__ */ jsx("span", {
|
|
13
|
-
"q:slot": "icon"
|
|
14
|
-
}),
|
|
15
|
-
props.submitting && /* @__PURE__ */ jsx("span", {
|
|
16
|
-
class: "animate-spin",
|
|
17
|
-
children: /* @__PURE__ */ jsx(SpinnersBarsRotateFade, {
|
|
18
|
-
size: 18
|
|
19
|
-
})
|
|
20
|
-
}),
|
|
21
|
-
/* @__PURE__ */ jsx(Slot, {})
|
|
22
|
-
]
|
|
5
|
+
return /* @__PURE__ */ jsx(ProcessingButton, {
|
|
6
|
+
...props,
|
|
7
|
+
class: `btn-primary ${props.class ?? ""}`,
|
|
8
|
+
text: props.text || "Submit",
|
|
9
|
+
processing: props.submitting
|
|
23
10
|
});
|
|
24
11
|
});
|
|
25
12
|
export {
|
|
@@ -3,6 +3,8 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const jsxRuntime = require("@builder.io/qwik/jsx-runtime");
|
|
4
4
|
const qwik = require("@builder.io/qwik");
|
|
5
5
|
const TextField = qwik.component$((props) => {
|
|
6
|
+
const value = props.value;
|
|
7
|
+
const onInputHandler = props.onInput$;
|
|
6
8
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
7
9
|
class: "fieldset",
|
|
8
10
|
children: [
|
|
@@ -22,6 +24,10 @@ const TextField = qwik.component$((props) => {
|
|
|
22
24
|
/* @__PURE__ */ jsxRuntime.jsx(qwik.Slot, {
|
|
23
25
|
name: "left"
|
|
24
26
|
}),
|
|
27
|
+
props.icon && /* @__PURE__ */ jsxRuntime.jsx(props.icon, {
|
|
28
|
+
size: 18,
|
|
29
|
+
class: "opacity-50"
|
|
30
|
+
}),
|
|
25
31
|
/* @__PURE__ */ jsxRuntime.jsx("input", {
|
|
26
32
|
type: props.type || "text",
|
|
27
33
|
...props.id && {
|
|
@@ -39,11 +45,11 @@ const TextField = qwik.component$((props) => {
|
|
|
39
45
|
placeholder: props.placeholder,
|
|
40
46
|
onBlur$: props.onBlur$,
|
|
41
47
|
onInput$: (event, element) => {
|
|
42
|
-
if (
|
|
43
|
-
|
|
48
|
+
if (value && typeof value !== "string") {
|
|
49
|
+
value.value = element.value;
|
|
44
50
|
}
|
|
45
|
-
if (
|
|
46
|
-
|
|
51
|
+
if (onInputHandler) {
|
|
52
|
+
onInputHandler(event, element);
|
|
47
53
|
}
|
|
48
54
|
}
|
|
49
55
|
}),
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { jsxs, jsx } from "@builder.io/qwik/jsx-runtime";
|
|
2
2
|
import { component$, Slot } from "@builder.io/qwik";
|
|
3
3
|
const TextField = component$((props) => {
|
|
4
|
+
const value = props.value;
|
|
5
|
+
const onInputHandler = props.onInput$;
|
|
4
6
|
return /* @__PURE__ */ jsxs("div", {
|
|
5
7
|
class: "fieldset",
|
|
6
8
|
children: [
|
|
@@ -20,6 +22,10 @@ const TextField = component$((props) => {
|
|
|
20
22
|
/* @__PURE__ */ jsx(Slot, {
|
|
21
23
|
name: "left"
|
|
22
24
|
}),
|
|
25
|
+
props.icon && /* @__PURE__ */ jsx(props.icon, {
|
|
26
|
+
size: 18,
|
|
27
|
+
class: "opacity-50"
|
|
28
|
+
}),
|
|
23
29
|
/* @__PURE__ */ jsx("input", {
|
|
24
30
|
type: props.type || "text",
|
|
25
31
|
...props.id && {
|
|
@@ -37,11 +43,11 @@ const TextField = component$((props) => {
|
|
|
37
43
|
placeholder: props.placeholder,
|
|
38
44
|
onBlur$: props.onBlur$,
|
|
39
45
|
onInput$: (event, element) => {
|
|
40
|
-
if (
|
|
41
|
-
|
|
46
|
+
if (value && typeof value !== "string") {
|
|
47
|
+
value.value = element.value;
|
|
42
48
|
}
|
|
43
|
-
if (
|
|
44
|
-
|
|
49
|
+
if (onInputHandler) {
|
|
50
|
+
onInputHandler(event, element);
|
|
45
51
|
}
|
|
46
52
|
}
|
|
47
53
|
}),
|
package/lib/index.qwik.cjs
CHANGED
|
@@ -6,6 +6,8 @@ const alertInfo = require("./components/alert-info.qwik.cjs");
|
|
|
6
6
|
const alertSuccess = require("./components/alert-success.qwik.cjs");
|
|
7
7
|
const alertWarning = require("./components/alert-warning.qwik.cjs");
|
|
8
8
|
const autoDismiss = require("./components/auto-dismiss.qwik.cjs");
|
|
9
|
+
const button = require("./components/button.qwik.cjs");
|
|
10
|
+
const cancelButton = require("./components/cancel-button.qwik.cjs");
|
|
9
11
|
const checkboxField = require("./components/checkbox-field.qwik.cjs");
|
|
10
12
|
const dialog = require("./components/dialog.qwik.cjs");
|
|
11
13
|
const dock = require("./components/dock.qwik.cjs");
|
|
@@ -19,6 +21,8 @@ const gtm = require("./components/gtm.qwik.cjs");
|
|
|
19
21
|
const menu = require("./components/menu.qwik.cjs");
|
|
20
22
|
const microsoftSignInButton = require("./components/microsoft-sign-in-button.qwik.cjs");
|
|
21
23
|
const paceBar = require("./components/pace-bar.qwik.cjs");
|
|
24
|
+
const processingButton = require("./components/processing-button.qwik.cjs");
|
|
25
|
+
const refreshButton = require("./components/refresh-button.qwik.cjs");
|
|
22
26
|
const selectField = require("./components/select-field.qwik.cjs");
|
|
23
27
|
const submitButton = require("./components/submit-button.qwik.cjs");
|
|
24
28
|
const textField = require("./components/text-field.qwik.cjs");
|
|
@@ -31,6 +35,8 @@ exports.AlertInfo = alertInfo.AlertInfo;
|
|
|
31
35
|
exports.AlertSuccess = alertSuccess.AlertSuccess;
|
|
32
36
|
exports.AlertWarning = alertWarning.AlertWarning;
|
|
33
37
|
exports.AutoDismiss = autoDismiss.AutoDismiss;
|
|
38
|
+
exports.Button = button.Button;
|
|
39
|
+
exports.CancelButton = cancelButton.CancelButton;
|
|
34
40
|
exports.CheckboxField = checkboxField.CheckboxField;
|
|
35
41
|
exports.Dialog = dialog.Dialog;
|
|
36
42
|
exports.Dock = dock.Dock;
|
|
@@ -58,6 +64,8 @@ exports.MenuLink = menu.MenuLink;
|
|
|
58
64
|
exports.Submenu = menu.Submenu;
|
|
59
65
|
exports.MicrosoftSignInButton = microsoftSignInButton.MicrosoftSignInButton;
|
|
60
66
|
exports.PaceBar = paceBar.PaceBar;
|
|
67
|
+
exports.ProcessingButton = processingButton.ProcessingButton;
|
|
68
|
+
exports.RefreshButton = refreshButton.RefreshButton;
|
|
61
69
|
exports.SelectField = selectField.SelectField;
|
|
62
70
|
exports.SubmitButton = submitButton.SubmitButton;
|
|
63
71
|
exports.TextField = textField.TextField;
|
package/lib/index.qwik.mjs
CHANGED
|
@@ -4,6 +4,8 @@ import { AlertInfo } from "./components/alert-info.qwik.mjs";
|
|
|
4
4
|
import { AlertSuccess } from "./components/alert-success.qwik.mjs";
|
|
5
5
|
import { AlertWarning } from "./components/alert-warning.qwik.mjs";
|
|
6
6
|
import { AutoDismiss } from "./components/auto-dismiss.qwik.mjs";
|
|
7
|
+
import { Button } from "./components/button.qwik.mjs";
|
|
8
|
+
import { CancelButton } from "./components/cancel-button.qwik.mjs";
|
|
7
9
|
import { CheckboxField } from "./components/checkbox-field.qwik.mjs";
|
|
8
10
|
import { Dialog } from "./components/dialog.qwik.mjs";
|
|
9
11
|
import { Dock, DockButton, DockLabel, DockLink } from "./components/dock.qwik.mjs";
|
|
@@ -17,6 +19,8 @@ import { GtmBody, GtmHead } from "./components/gtm.qwik.mjs";
|
|
|
17
19
|
import { Menu, MenuButton, MenuDivider, MenuGroup, MenuGroupSummary, MenuLink, Submenu } from "./components/menu.qwik.mjs";
|
|
18
20
|
import { MicrosoftSignInButton } from "./components/microsoft-sign-in-button.qwik.mjs";
|
|
19
21
|
import { PaceBar } from "./components/pace-bar.qwik.mjs";
|
|
22
|
+
import { ProcessingButton } from "./components/processing-button.qwik.mjs";
|
|
23
|
+
import { RefreshButton } from "./components/refresh-button.qwik.mjs";
|
|
20
24
|
import { SelectField } from "./components/select-field.qwik.mjs";
|
|
21
25
|
import { SubmitButton } from "./components/submit-button.qwik.mjs";
|
|
22
26
|
import { TextField } from "./components/text-field.qwik.mjs";
|
|
@@ -30,6 +34,8 @@ export {
|
|
|
30
34
|
AlertSuccess,
|
|
31
35
|
AlertWarning,
|
|
32
36
|
AutoDismiss,
|
|
37
|
+
Button,
|
|
38
|
+
CancelButton,
|
|
33
39
|
CheckboxField,
|
|
34
40
|
Dialog,
|
|
35
41
|
Dock,
|
|
@@ -56,6 +62,8 @@ export {
|
|
|
56
62
|
MenuLink,
|
|
57
63
|
MicrosoftSignInButton,
|
|
58
64
|
PaceBar,
|
|
65
|
+
ProcessingButton,
|
|
66
|
+
RefreshButton,
|
|
59
67
|
SelectField,
|
|
60
68
|
Submenu,
|
|
61
69
|
SubmitButton,
|
|
@@ -1,7 +1,28 @@
|
|
|
1
1
|
import { QRL } from '@builder.io/qwik';
|
|
2
2
|
export interface AddButtonProps {
|
|
3
|
+
/**
|
|
4
|
+
* ID of the button.
|
|
5
|
+
*/
|
|
6
|
+
id?: string;
|
|
7
|
+
/**
|
|
8
|
+
* CSS class to apply to the button.
|
|
9
|
+
*/
|
|
3
10
|
class?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Callback function to be called when the button is clicked.
|
|
13
|
+
*/
|
|
4
14
|
onClick$?: QRL<(event: Event) => void>;
|
|
5
|
-
|
|
15
|
+
/**
|
|
16
|
+
* Whether the button is disabled.
|
|
17
|
+
*/
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Text to display on the button. Default is 'Add'.
|
|
21
|
+
*/
|
|
22
|
+
text?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Size of the icon in pixels if icon is provided in the props. Default is 18.
|
|
25
|
+
*/
|
|
26
|
+
iconSize?: number;
|
|
6
27
|
}
|
|
7
28
|
export declare const AddButton: import("@builder.io/qwik").Component<AddButtonProps>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Component, QRL } from '@builder.io/qwik';
|
|
2
|
+
import { IconProps } from '@nr1e/qwik-icons';
|
|
3
|
+
/**
|
|
4
|
+
* Props for the Button component.
|
|
5
|
+
*/
|
|
6
|
+
export interface ButtonProps {
|
|
7
|
+
/**
|
|
8
|
+
* ID of the button.
|
|
9
|
+
*/
|
|
10
|
+
id?: string;
|
|
11
|
+
/**
|
|
12
|
+
* CSS class to apply to the button.
|
|
13
|
+
*/
|
|
14
|
+
class?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Callback function to be called when the button is clicked.
|
|
17
|
+
*/
|
|
18
|
+
onClick$?: QRL<(event: Event) => void>;
|
|
19
|
+
/**
|
|
20
|
+
* Whether the button is disabled.
|
|
21
|
+
*/
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Icon component to display next to the button text. You can alternatively use the `icon` slot.
|
|
25
|
+
*/
|
|
26
|
+
icon?: Component<IconProps>;
|
|
27
|
+
/**
|
|
28
|
+
* Size of the icon in pixels if icon is provided in the props. Default is 18.
|
|
29
|
+
*/
|
|
30
|
+
iconSize?: number;
|
|
31
|
+
/**
|
|
32
|
+
* CSS class to apply to the icon.
|
|
33
|
+
*/
|
|
34
|
+
iconClass?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Type of the button. Default is 'button'.
|
|
37
|
+
*/
|
|
38
|
+
type?: 'button' | 'submit' | 'reset';
|
|
39
|
+
/**
|
|
40
|
+
* Text to display on the button. Alternative to the `default` slot.
|
|
41
|
+
*/
|
|
42
|
+
text?: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Button component.
|
|
46
|
+
*/
|
|
47
|
+
export declare const Button: Component<ButtonProps>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { QRL } from '@builder.io/qwik';
|
|
2
|
+
export interface CancelButtonProps {
|
|
3
|
+
/**
|
|
4
|
+
* ID of the button.
|
|
5
|
+
*/
|
|
6
|
+
id?: string;
|
|
7
|
+
/**
|
|
8
|
+
* CSS class to apply to the button.
|
|
9
|
+
*/
|
|
10
|
+
class?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Callback function to be called when the button is clicked.
|
|
13
|
+
*/
|
|
14
|
+
onClick$?: QRL<(event: Event) => void>;
|
|
15
|
+
/**
|
|
16
|
+
* Whether the button is disabled.
|
|
17
|
+
*/
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Text to display on the button. Default is 'Cancel'.
|
|
21
|
+
*/
|
|
22
|
+
text?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Size of the icon in pixels if icon is provided in the props. Default is 18.
|
|
25
|
+
*/
|
|
26
|
+
iconSize?: number;
|
|
27
|
+
}
|
|
28
|
+
export declare const CancelButton: import("@builder.io/qwik").Component<CancelButtonProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Signal } from '@builder.io/qwik';
|
|
2
|
+
import { ButtonProps } from './button';
|
|
3
|
+
/**
|
|
4
|
+
* Props for the ProcessingButton component. This class will replace the icon
|
|
5
|
+
* with a rotating spinner when the button is processing. It will also
|
|
6
|
+
* automatically set processing to true when the button is clicked. It does
|
|
7
|
+
* not set processing to false when the button is clicked.
|
|
8
|
+
*/
|
|
9
|
+
export interface ProcessingButtonProps extends ButtonProps {
|
|
10
|
+
/**
|
|
11
|
+
* Whether the button is processing.
|
|
12
|
+
*/
|
|
13
|
+
processing?: boolean | Signal<boolean>;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* ProcessingButton component.
|
|
17
|
+
*/
|
|
18
|
+
export declare const ProcessingButton: import("@builder.io/qwik").Component<ProcessingButtonProps>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { QRL, Signal } from '@builder.io/qwik';
|
|
2
|
+
export interface RefreshButtonProps {
|
|
3
|
+
/**
|
|
4
|
+
* ID of the button.
|
|
5
|
+
*/
|
|
6
|
+
id?: string;
|
|
7
|
+
/**
|
|
8
|
+
* CSS class to apply to the button.
|
|
9
|
+
*/
|
|
10
|
+
class?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Callback function to be called when the button is clicked.
|
|
13
|
+
*/
|
|
14
|
+
onClick$?: QRL<(event: Event) => void>;
|
|
15
|
+
/**
|
|
16
|
+
* Whether the button is disabled.
|
|
17
|
+
*/
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Type of the button. Default is 'button'.
|
|
21
|
+
*/
|
|
22
|
+
type?: 'button' | 'submit' | 'reset';
|
|
23
|
+
/**
|
|
24
|
+
* Text to display on the button. Default is 'Refresh'.
|
|
25
|
+
*/
|
|
26
|
+
text?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Whether the button is processing.
|
|
29
|
+
*/
|
|
30
|
+
refreshing?: boolean | Signal<boolean>;
|
|
31
|
+
/**
|
|
32
|
+
* Size of the icon in pixels if icon is provided in the props. Default is 18.
|
|
33
|
+
*/
|
|
34
|
+
iconSize?: number;
|
|
35
|
+
}
|
|
36
|
+
export declare const RefreshButton: import("@builder.io/qwik").Component<RefreshButtonProps>;
|
|
@@ -1,9 +1,32 @@
|
|
|
1
|
-
import { QRL } from '@builder.io/qwik';
|
|
1
|
+
import { QRL, Signal } from '@builder.io/qwik';
|
|
2
2
|
export interface SubmitButtonProps {
|
|
3
|
+
/**
|
|
4
|
+
* ID of the button.
|
|
5
|
+
*/
|
|
6
|
+
id?: string;
|
|
7
|
+
/**
|
|
8
|
+
* CSS class to apply to the button.
|
|
9
|
+
*/
|
|
3
10
|
class?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Callback function to be called when the button is clicked.
|
|
13
|
+
*/
|
|
4
14
|
onClick$?: QRL<(event: Event) => void>;
|
|
5
|
-
|
|
15
|
+
/**
|
|
16
|
+
* Whether the button is disabled.
|
|
17
|
+
*/
|
|
6
18
|
disabled?: boolean;
|
|
7
|
-
|
|
19
|
+
/**
|
|
20
|
+
* Type of the button. Default is 'button'.
|
|
21
|
+
*/
|
|
22
|
+
type?: 'button' | 'submit' | 'reset';
|
|
23
|
+
/**
|
|
24
|
+
* Text to display on the button. Default is 'Submit'.
|
|
25
|
+
*/
|
|
26
|
+
text?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Whether the button is processing.
|
|
29
|
+
*/
|
|
30
|
+
submitting?: boolean | Signal<boolean>;
|
|
8
31
|
}
|
|
9
32
|
export declare const SubmitButton: import("@builder.io/qwik").Component<SubmitButtonProps>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { QRL, Signal } from '@builder.io/qwik';
|
|
1
|
+
import { QRL, Signal, Component } from '@builder.io/qwik';
|
|
2
|
+
import { IconProps } from '@nr1e/qwik-icons';
|
|
2
3
|
/**
|
|
3
4
|
* The type of the input field.
|
|
4
5
|
*/
|
|
@@ -25,9 +26,10 @@ export interface TextFieldProps {
|
|
|
25
26
|
* Called when the input value changes.
|
|
26
27
|
*/
|
|
27
28
|
onInput$?: QRL<(event: InputEvent, element: HTMLInputElement) => void>;
|
|
29
|
+
icon?: Component<IconProps>;
|
|
28
30
|
}
|
|
29
31
|
/**
|
|
30
32
|
* A standardized text input field meant to be used independently or with Qwik
|
|
31
33
|
* Modular Forms.
|
|
32
34
|
*/
|
|
33
|
-
export declare const TextField:
|
|
35
|
+
export declare const TextField: Component<TextFieldProps>;
|
package/lib-types/index.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ export * from './components/alert-info';
|
|
|
4
4
|
export * from './components/alert-success';
|
|
5
5
|
export * from './components/alert-warning';
|
|
6
6
|
export * from './components/auto-dismiss';
|
|
7
|
+
export * from './components/button';
|
|
8
|
+
export * from './components/cancel-button';
|
|
7
9
|
export * from './components/checkbox-field';
|
|
8
10
|
export * from './components/dialog';
|
|
9
11
|
export * from './components/dock';
|
|
@@ -17,6 +19,8 @@ export * from './components/gtm';
|
|
|
17
19
|
export * from './components/menu';
|
|
18
20
|
export * from './components/microsoft-sign-in-button';
|
|
19
21
|
export * from './components/pace-bar';
|
|
22
|
+
export * from './components/processing-button';
|
|
23
|
+
export * from './components/refresh-button';
|
|
20
24
|
export * from './components/select-field';
|
|
21
25
|
export * from './components/submit-button';
|
|
22
26
|
export * from './components/text-field';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nr1e/qwik-ui",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.18",
|
|
4
4
|
"description": "NR1E Qwik UI Library",
|
|
5
5
|
"author": "NR1E, Inc.",
|
|
6
6
|
"publishConfig": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"@builder.io/qwik-city": "1.19.2",
|
|
38
38
|
"tailwindcss-animated": "2.0.0",
|
|
39
|
-
"@nr1e/qwik-icons": "0.0.
|
|
39
|
+
"@nr1e/qwik-icons": "0.0.33"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@builder.io/qwik": "1.19.1",
|