@nr1e/qwik-ui 0.1.2 → 0.1.4
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/auto-dismiss.qwik.cjs +16 -7
- package/lib/components/auto-dismiss.qwik.mjs +16 -7
- package/lib/components/fixed-center-bottom.qwik.cjs +11 -0
- package/lib/components/fixed-center-bottom.qwik.mjs +11 -0
- package/lib/index.qwik.cjs +2 -0
- package/lib/index.qwik.mjs +2 -0
- package/lib-types/components/fixed-center-bottom.d.ts +10 -0
- package/lib-types/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -3,22 +3,31 @@ 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 AutoDismiss = qwik.component$((props) => {
|
|
6
|
-
const visible = qwik.useSignal(props?.visible?.value ??
|
|
6
|
+
const visible = qwik.useSignal(props?.visible?.value ?? true);
|
|
7
7
|
if (!visible.value) return null;
|
|
8
|
+
qwik.useTask$(async ({ track }) => {
|
|
9
|
+
track(() => props?.visible?.value);
|
|
10
|
+
if (props?.visible?.value && props.visible.value !== visible.value) {
|
|
11
|
+
visible.value = props.visible.value;
|
|
12
|
+
}
|
|
13
|
+
});
|
|
8
14
|
qwik.useTask$(async ({ track }) => {
|
|
9
15
|
track(() => visible.value);
|
|
10
|
-
if (props?.visible) {
|
|
16
|
+
if (props?.visible?.value && props.visible.value !== visible.value) {
|
|
11
17
|
props.visible.value = visible.value;
|
|
12
18
|
}
|
|
13
19
|
if (!visible.value && props?.onDismiss$) {
|
|
14
20
|
props.onDismiss$();
|
|
15
21
|
}
|
|
16
22
|
});
|
|
17
|
-
qwik.useVisibleTask$(({ cleanup }) => {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
23
|
+
qwik.useVisibleTask$(({ track, cleanup }) => {
|
|
24
|
+
track(() => visible.value);
|
|
25
|
+
if (visible.value) {
|
|
26
|
+
const id = setTimeout(() => {
|
|
27
|
+
visible.value = false;
|
|
28
|
+
}, 6e3);
|
|
29
|
+
cleanup(() => clearTimeout(id));
|
|
30
|
+
}
|
|
22
31
|
});
|
|
23
32
|
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
24
33
|
class: [
|
|
@@ -1,22 +1,31 @@
|
|
|
1
1
|
import { jsx } from "@builder.io/qwik/jsx-runtime";
|
|
2
2
|
import { component$, useSignal, useTask$, useVisibleTask$, Slot } from "@builder.io/qwik";
|
|
3
3
|
const AutoDismiss = component$((props) => {
|
|
4
|
-
const visible = useSignal(props?.visible?.value ??
|
|
4
|
+
const visible = useSignal(props?.visible?.value ?? true);
|
|
5
5
|
if (!visible.value) return null;
|
|
6
|
+
useTask$(async ({ track }) => {
|
|
7
|
+
track(() => props?.visible?.value);
|
|
8
|
+
if (props?.visible?.value && props.visible.value !== visible.value) {
|
|
9
|
+
visible.value = props.visible.value;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
6
12
|
useTask$(async ({ track }) => {
|
|
7
13
|
track(() => visible.value);
|
|
8
|
-
if (props?.visible) {
|
|
14
|
+
if (props?.visible?.value && props.visible.value !== visible.value) {
|
|
9
15
|
props.visible.value = visible.value;
|
|
10
16
|
}
|
|
11
17
|
if (!visible.value && props?.onDismiss$) {
|
|
12
18
|
props.onDismiss$();
|
|
13
19
|
}
|
|
14
20
|
});
|
|
15
|
-
useVisibleTask$(({ cleanup }) => {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
21
|
+
useVisibleTask$(({ track, cleanup }) => {
|
|
22
|
+
track(() => visible.value);
|
|
23
|
+
if (visible.value) {
|
|
24
|
+
const id = setTimeout(() => {
|
|
25
|
+
visible.value = false;
|
|
26
|
+
}, 6e3);
|
|
27
|
+
cleanup(() => clearTimeout(id));
|
|
28
|
+
}
|
|
20
29
|
});
|
|
21
30
|
return /* @__PURE__ */ jsx("div", {
|
|
22
31
|
class: [
|
|
@@ -0,0 +1,11 @@
|
|
|
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 FixedCenterBottom = qwik.component$((props) => {
|
|
6
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
7
|
+
class: `fixed bottom-4 left-1/2 z-50 -translate-x-1/2 ${props?.class ?? ""}`,
|
|
8
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(qwik.Slot, {})
|
|
9
|
+
});
|
|
10
|
+
});
|
|
11
|
+
exports.FixedCenterBottom = FixedCenterBottom;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx } from "@builder.io/qwik/jsx-runtime";
|
|
2
|
+
import { component$, Slot } from "@builder.io/qwik";
|
|
3
|
+
const FixedCenterBottom = component$((props) => {
|
|
4
|
+
return /* @__PURE__ */ jsx("div", {
|
|
5
|
+
class: `fixed bottom-4 left-1/2 z-50 -translate-x-1/2 ${props?.class ?? ""}`,
|
|
6
|
+
children: /* @__PURE__ */ jsx(Slot, {})
|
|
7
|
+
});
|
|
8
|
+
});
|
|
9
|
+
export {
|
|
10
|
+
FixedCenterBottom
|
|
11
|
+
};
|
package/lib/index.qwik.cjs
CHANGED
|
@@ -9,6 +9,7 @@ const autoDismiss = require("./components/auto-dismiss.qwik.cjs");
|
|
|
9
9
|
const checkboxField = require("./components/checkbox-field.qwik.cjs");
|
|
10
10
|
const dialog = require("./components/dialog.qwik.cjs");
|
|
11
11
|
const dock = require("./components/dock.qwik.cjs");
|
|
12
|
+
const fixedCenterBottom = require("./components/fixed-center-bottom.qwik.cjs");
|
|
12
13
|
const dropUp = require("./components/drop-up.qwik.cjs");
|
|
13
14
|
const googleSignInButton = require("./components/google-sign-in-button.qwik.cjs");
|
|
14
15
|
const gtm = require("./components/gtm.qwik.cjs");
|
|
@@ -32,6 +33,7 @@ exports.Dock = dock.Dock;
|
|
|
32
33
|
exports.DockButton = dock.DockButton;
|
|
33
34
|
exports.DockLabel = dock.DockLabel;
|
|
34
35
|
exports.DockLink = dock.DockLink;
|
|
36
|
+
exports.FixedCenterBottom = fixedCenterBottom.FixedCenterBottom;
|
|
35
37
|
exports.DropUp = dropUp.DropUp;
|
|
36
38
|
exports.DropUpButtonSelector = dropUp.DropUpButtonSelector;
|
|
37
39
|
exports.DropUpItem = dropUp.DropUpItem;
|
package/lib/index.qwik.mjs
CHANGED
|
@@ -7,6 +7,7 @@ import { AutoDismiss } from "./components/auto-dismiss.qwik.mjs";
|
|
|
7
7
|
import { CheckboxField } from "./components/checkbox-field.qwik.mjs";
|
|
8
8
|
import { Dialog } from "./components/dialog.qwik.mjs";
|
|
9
9
|
import { Dock, DockButton, DockLabel, DockLink } from "./components/dock.qwik.mjs";
|
|
10
|
+
import { FixedCenterBottom } from "./components/fixed-center-bottom.qwik.mjs";
|
|
10
11
|
import { DropUp, DropUpButtonSelector, DropUpItem, DropUpSubmenu } from "./components/drop-up.qwik.mjs";
|
|
11
12
|
import { GoogleSignInButton } from "./components/google-sign-in-button.qwik.mjs";
|
|
12
13
|
import { GtmBody, GtmHead } from "./components/gtm.qwik.mjs";
|
|
@@ -35,6 +36,7 @@ export {
|
|
|
35
36
|
DropUpButtonSelector,
|
|
36
37
|
DropUpItem,
|
|
37
38
|
DropUpSubmenu,
|
|
39
|
+
FixedCenterBottom,
|
|
38
40
|
GoogleSignInButton,
|
|
39
41
|
GtmBody,
|
|
40
42
|
GtmHead,
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Properties for FixedCenterBottom.
|
|
3
|
+
*/
|
|
4
|
+
export interface FixedCenterBottomProps {
|
|
5
|
+
class?: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Renders the contents centered at the bottom of the viewport.
|
|
9
|
+
*/
|
|
10
|
+
export declare const FixedCenterBottom: import("@builder.io/qwik").Component<FixedCenterBottomProps | undefined>;
|
package/lib-types/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export * from './components/auto-dismiss';
|
|
|
7
7
|
export * from './components/checkbox-field';
|
|
8
8
|
export * from './components/dialog';
|
|
9
9
|
export * from './components/dock';
|
|
10
|
+
export * from './components/fixed-center-bottom';
|
|
10
11
|
export * from './components/drop-up';
|
|
11
12
|
export * from './components/google-sign-in-button';
|
|
12
13
|
export * from './components/gtm';
|