@nr1e/qwik-ui 0.0.29 → 0.0.31
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/drop-up.qwik.cjs +54 -0
- package/lib/components/drop-up.qwik.mjs +54 -0
- package/lib/components/gtm.qwik.cjs +25 -0
- package/lib/components/gtm.qwik.mjs +25 -0
- package/lib/components/menu.qwik.cjs +1 -1
- package/lib/components/menu.qwik.mjs +1 -1
- package/lib/index.qwik.cjs +8 -0
- package/lib/index.qwik.mjs +8 -0
- package/lib-types/components/drop-up.d.ts +22 -0
- package/lib-types/components/gtm.d.ts +11 -0
- package/lib-types/index.d.ts +2 -0
- package/package.json +2 -2
|
@@ -0,0 +1,54 @@
|
|
|
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 qwikCity = require("@builder.io/qwik-city");
|
|
6
|
+
const DropUpItem = qwik.component$((props) => {
|
|
7
|
+
const nav = qwikCity.useNavigate();
|
|
8
|
+
return /* @__PURE__ */ jsxRuntime.jsx("li", {
|
|
9
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(qwikCity.Link, {
|
|
10
|
+
href: props.href,
|
|
11
|
+
prefetch: props.prefetch,
|
|
12
|
+
class: `text-nowrap ${props?.class ?? null}`,
|
|
13
|
+
onClick$: async (event) => {
|
|
14
|
+
if (props.onClick$) {
|
|
15
|
+
await props.onClick$(event);
|
|
16
|
+
} else {
|
|
17
|
+
if (props.loading) {
|
|
18
|
+
props.loading.value = true;
|
|
19
|
+
}
|
|
20
|
+
await nav(props.href);
|
|
21
|
+
if (props.loading) {
|
|
22
|
+
props.loading.value = false;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(qwik.Slot, {})
|
|
27
|
+
})
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
const DropUpSubmenu = qwik.component$((props) => {
|
|
31
|
+
return /* @__PURE__ */ jsxRuntime.jsx("ul", {
|
|
32
|
+
tabIndex: -1,
|
|
33
|
+
class: `dropdown-content menu bg-base-100 rounded-box z-1 shadow-sm ${props?.class ?? ""}`,
|
|
34
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(qwik.Slot, {})
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
const DropUpButtonSelector = qwik.component$((props) => {
|
|
38
|
+
return /* @__PURE__ */ jsxRuntime.jsx("button", {
|
|
39
|
+
tabIndex: 0,
|
|
40
|
+
role: "button",
|
|
41
|
+
class: `btn ${props?.class ?? ""}`,
|
|
42
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(qwik.Slot, {})
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
const DropUp = qwik.component$((props) => {
|
|
46
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
47
|
+
class: `dropdown dropdown-top ${props?.class ?? ""}`,
|
|
48
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(qwik.Slot, {})
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
exports.DropUp = DropUp;
|
|
52
|
+
exports.DropUpButtonSelector = DropUpButtonSelector;
|
|
53
|
+
exports.DropUpItem = DropUpItem;
|
|
54
|
+
exports.DropUpSubmenu = DropUpSubmenu;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { jsx } from "@builder.io/qwik/jsx-runtime";
|
|
2
|
+
import { component$, Slot } from "@builder.io/qwik";
|
|
3
|
+
import { useNavigate, Link } from "@builder.io/qwik-city";
|
|
4
|
+
const DropUpItem = component$((props) => {
|
|
5
|
+
const nav = useNavigate();
|
|
6
|
+
return /* @__PURE__ */ jsx("li", {
|
|
7
|
+
children: /* @__PURE__ */ jsx(Link, {
|
|
8
|
+
href: props.href,
|
|
9
|
+
prefetch: props.prefetch,
|
|
10
|
+
class: `text-nowrap ${props?.class ?? null}`,
|
|
11
|
+
onClick$: async (event) => {
|
|
12
|
+
if (props.onClick$) {
|
|
13
|
+
await props.onClick$(event);
|
|
14
|
+
} else {
|
|
15
|
+
if (props.loading) {
|
|
16
|
+
props.loading.value = true;
|
|
17
|
+
}
|
|
18
|
+
await nav(props.href);
|
|
19
|
+
if (props.loading) {
|
|
20
|
+
props.loading.value = false;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
children: /* @__PURE__ */ jsx(Slot, {})
|
|
25
|
+
})
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
const DropUpSubmenu = component$((props) => {
|
|
29
|
+
return /* @__PURE__ */ jsx("ul", {
|
|
30
|
+
tabIndex: -1,
|
|
31
|
+
class: `dropdown-content menu bg-base-100 rounded-box z-1 shadow-sm ${props?.class ?? ""}`,
|
|
32
|
+
children: /* @__PURE__ */ jsx(Slot, {})
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
const DropUpButtonSelector = component$((props) => {
|
|
36
|
+
return /* @__PURE__ */ jsx("button", {
|
|
37
|
+
tabIndex: 0,
|
|
38
|
+
role: "button",
|
|
39
|
+
class: `btn ${props?.class ?? ""}`,
|
|
40
|
+
children: /* @__PURE__ */ jsx(Slot, {})
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
const DropUp = component$((props) => {
|
|
44
|
+
return /* @__PURE__ */ jsx("div", {
|
|
45
|
+
class: `dropdown dropdown-top ${props?.class ?? ""}`,
|
|
46
|
+
children: /* @__PURE__ */ jsx(Slot, {})
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
export {
|
|
50
|
+
DropUp,
|
|
51
|
+
DropUpButtonSelector,
|
|
52
|
+
DropUpItem,
|
|
53
|
+
DropUpSubmenu
|
|
54
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
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 GtmHead = qwik.component$((props) => {
|
|
6
|
+
return /* @__PURE__ */ jsxRuntime.jsx("script", {
|
|
7
|
+
dangerouslySetInnerHTML: `(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
|
|
8
|
+
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
|
|
9
|
+
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
|
10
|
+
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
|
|
11
|
+
})(window,document,'script','dataLayer', ${props.id});`
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
const GtmBody = qwik.component$((props) => {
|
|
15
|
+
return /* @__PURE__ */ jsxRuntime.jsx("noscript", {
|
|
16
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("iframe", {
|
|
17
|
+
src: `https://www.googletagmanager.com/ns.html?id=${props.id}`,
|
|
18
|
+
height: "0",
|
|
19
|
+
width: "0",
|
|
20
|
+
style: "display:none;visibility:hidden"
|
|
21
|
+
})
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
exports.GtmBody = GtmBody;
|
|
25
|
+
exports.GtmHead = GtmHead;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx } from "@builder.io/qwik/jsx-runtime";
|
|
2
|
+
import { component$ } from "@builder.io/qwik";
|
|
3
|
+
const GtmHead = component$((props) => {
|
|
4
|
+
return /* @__PURE__ */ jsx("script", {
|
|
5
|
+
dangerouslySetInnerHTML: `(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
|
|
6
|
+
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
|
|
7
|
+
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
|
8
|
+
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
|
|
9
|
+
})(window,document,'script','dataLayer', ${props.id});`
|
|
10
|
+
});
|
|
11
|
+
});
|
|
12
|
+
const GtmBody = component$((props) => {
|
|
13
|
+
return /* @__PURE__ */ jsx("noscript", {
|
|
14
|
+
children: /* @__PURE__ */ jsx("iframe", {
|
|
15
|
+
src: `https://www.googletagmanager.com/ns.html?id=${props.id}`,
|
|
16
|
+
height: "0",
|
|
17
|
+
width: "0",
|
|
18
|
+
style: "display:none;visibility:hidden"
|
|
19
|
+
})
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
export {
|
|
23
|
+
GtmBody,
|
|
24
|
+
GtmHead
|
|
25
|
+
};
|
|
@@ -53,7 +53,7 @@ const MenuDivider = qwik.component$(() => {
|
|
|
53
53
|
});
|
|
54
54
|
const Menu = qwik.component$((props) => {
|
|
55
55
|
return /* @__PURE__ */ jsxRuntime.jsx("ul", {
|
|
56
|
-
class: `menu w-56 ${props?.class
|
|
56
|
+
class: `menu w-56 ${props?.class ?? ""}`,
|
|
57
57
|
children: /* @__PURE__ */ jsxRuntime.jsx(qwik.Slot, {})
|
|
58
58
|
});
|
|
59
59
|
});
|
|
@@ -51,7 +51,7 @@ const MenuDivider = component$(() => {
|
|
|
51
51
|
});
|
|
52
52
|
const Menu = component$((props) => {
|
|
53
53
|
return /* @__PURE__ */ jsx("ul", {
|
|
54
|
-
class: `menu w-56 ${props?.class
|
|
54
|
+
class: `menu w-56 ${props?.class ?? ""}`,
|
|
55
55
|
children: /* @__PURE__ */ jsx(Slot, {})
|
|
56
56
|
});
|
|
57
57
|
});
|
package/lib/index.qwik.cjs
CHANGED
|
@@ -7,6 +7,8 @@ const alertSuccess = require("./components/alert-success.qwik.cjs");
|
|
|
7
7
|
const alertWarning = require("./components/alert-warning.qwik.cjs");
|
|
8
8
|
const checkboxField = require("./components/checkbox-field.qwik.cjs");
|
|
9
9
|
const dialog = require("./components/dialog.qwik.cjs");
|
|
10
|
+
const dropUp = require("./components/drop-up.qwik.cjs");
|
|
11
|
+
const gtm = require("./components/gtm.qwik.cjs");
|
|
10
12
|
const menu = require("./components/menu.qwik.cjs");
|
|
11
13
|
const paceBar = require("./components/pace-bar.qwik.cjs");
|
|
12
14
|
const selectField = require("./components/select-field.qwik.cjs");
|
|
@@ -19,6 +21,12 @@ exports.AlertSuccess = alertSuccess.AlertSuccess;
|
|
|
19
21
|
exports.AlertWarning = alertWarning.AlertWarning;
|
|
20
22
|
exports.CheckboxField = checkboxField.CheckboxField;
|
|
21
23
|
exports.Dialog = dialog.Dialog;
|
|
24
|
+
exports.DropUp = dropUp.DropUp;
|
|
25
|
+
exports.DropUpButtonSelector = dropUp.DropUpButtonSelector;
|
|
26
|
+
exports.DropUpItem = dropUp.DropUpItem;
|
|
27
|
+
exports.DropUpSubmenu = dropUp.DropUpSubmenu;
|
|
28
|
+
exports.GtmBody = gtm.GtmBody;
|
|
29
|
+
exports.GtmHead = gtm.GtmHead;
|
|
22
30
|
exports.Menu = menu.Menu;
|
|
23
31
|
exports.MenuDivider = menu.MenuDivider;
|
|
24
32
|
exports.MenuGroup = menu.MenuGroup;
|
package/lib/index.qwik.mjs
CHANGED
|
@@ -5,6 +5,8 @@ import { AlertSuccess } from "./components/alert-success.qwik.mjs";
|
|
|
5
5
|
import { AlertWarning } from "./components/alert-warning.qwik.mjs";
|
|
6
6
|
import { CheckboxField } from "./components/checkbox-field.qwik.mjs";
|
|
7
7
|
import { Dialog } from "./components/dialog.qwik.mjs";
|
|
8
|
+
import { DropUp, DropUpButtonSelector, DropUpItem, DropUpSubmenu } from "./components/drop-up.qwik.mjs";
|
|
9
|
+
import { GtmBody, GtmHead } from "./components/gtm.qwik.mjs";
|
|
8
10
|
import { Menu, MenuDivider, MenuGroup, MenuGroupSummary, MenuItem, Submenu } from "./components/menu.qwik.mjs";
|
|
9
11
|
import { PaceBar } from "./components/pace-bar.qwik.mjs";
|
|
10
12
|
import { SelectField } from "./components/select-field.qwik.mjs";
|
|
@@ -18,6 +20,12 @@ export {
|
|
|
18
20
|
AlertWarning,
|
|
19
21
|
CheckboxField,
|
|
20
22
|
Dialog,
|
|
23
|
+
DropUp,
|
|
24
|
+
DropUpButtonSelector,
|
|
25
|
+
DropUpItem,
|
|
26
|
+
DropUpSubmenu,
|
|
27
|
+
GtmBody,
|
|
28
|
+
GtmHead,
|
|
21
29
|
Menu,
|
|
22
30
|
MenuDivider,
|
|
23
31
|
MenuGroup,
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { QRL, Signal } from '@builder.io/qwik';
|
|
2
|
+
export interface DropUpItemProps {
|
|
3
|
+
href?: string;
|
|
4
|
+
prefetch?: boolean;
|
|
5
|
+
selected?: boolean;
|
|
6
|
+
loading?: Signal<boolean>;
|
|
7
|
+
onClick$?: QRL<(event: Event) => void>;
|
|
8
|
+
class?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const DropUpItem: import("@builder.io/qwik").Component<DropUpItemProps>;
|
|
11
|
+
export interface DropUpSubmenuProps {
|
|
12
|
+
class?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const DropUpSubmenu: import("@builder.io/qwik").Component<DropUpSubmenuProps | undefined>;
|
|
15
|
+
export interface DropUpButtonProps {
|
|
16
|
+
class?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare const DropUpButtonSelector: import("@builder.io/qwik").Component<DropUpButtonProps | undefined>;
|
|
19
|
+
export interface DropUpProps {
|
|
20
|
+
class?: string;
|
|
21
|
+
}
|
|
22
|
+
export declare const DropUp: import("@builder.io/qwik").Component<DropUpProps | undefined>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface GtmProps {
|
|
2
|
+
id: string;
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* Sets up Google Tag Manager. This should go at the top of the <head> element.
|
|
6
|
+
*/
|
|
7
|
+
export declare const GtmHead: import("@builder.io/qwik").Component<GtmProps>;
|
|
8
|
+
/**
|
|
9
|
+
* Sets up Google Tag Manager. This should go at after the opening <body> tag.
|
|
10
|
+
*/
|
|
11
|
+
export declare const GtmBody: import("@builder.io/qwik").Component<GtmProps>;
|
package/lib-types/index.d.ts
CHANGED
|
@@ -5,6 +5,8 @@ export * from './components/alert-success';
|
|
|
5
5
|
export * from './components/alert-warning';
|
|
6
6
|
export * from './components/checkbox-field';
|
|
7
7
|
export * from './components/dialog';
|
|
8
|
+
export * from './components/drop-up';
|
|
9
|
+
export * from './components/gtm';
|
|
8
10
|
export * from './components/menu';
|
|
9
11
|
export * from './components/pace-bar';
|
|
10
12
|
export * from './components/select-field';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nr1e/qwik-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.31",
|
|
4
4
|
"description": "NR1E Qwik UI Library",
|
|
5
5
|
"author": "NR1E, Inc.",
|
|
6
6
|
"publishConfig": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"type": "module",
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"@builder.io/qwik-city": "1.19.0",
|
|
38
|
-
"@nr1e/qwik-icons": "0.0.
|
|
38
|
+
"@nr1e/qwik-icons": "0.0.18"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@builder.io/qwik": "1.19.0",
|