@prodivix/ui 0.1.0
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/LICENSE +21 -0
- package/dist/button/PdxButton.js +70 -0
- package/dist/button/PdxButtonLink.js +11 -0
- package/dist/container/PdxCard.js +32 -0
- package/dist/container/PdxDiv.js +80 -0
- package/dist/container/PdxPanel.js +71 -0
- package/dist/container/PdxSection.js +30 -0
- package/dist/data/PdxBadge.js +40 -0
- package/dist/data/PdxCheckList.js +58 -0
- package/dist/data/PdxDataGrid.js +70 -0
- package/dist/data/PdxList.js +35 -0
- package/dist/data/PdxProgress.js +38 -0
- package/dist/data/PdxSpinner.js +36 -0
- package/dist/data/PdxStatistic.js +40 -0
- package/dist/data/PdxSteps.js +37 -0
- package/dist/data/PdxTable.js +61 -0
- package/dist/data/PdxTag.js +36 -0
- package/dist/data/PdxTimeline.js +32 -0
- package/dist/data/PdxTree.js +71 -0
- package/dist/data/PdxTreeSelect.js +69 -0
- package/dist/embed/PdxEmbed.js +109 -0
- package/dist/embed/PdxIframe.js +76 -0
- package/dist/feedback/PdxDrawer.js +45 -0
- package/dist/feedback/PdxEmpty.js +33 -0
- package/dist/feedback/PdxMessage.js +32 -0
- package/dist/feedback/PdxModal.js +49 -0
- package/dist/feedback/PdxNotification.js +46 -0
- package/dist/feedback/PdxPopover.js +59 -0
- package/dist/feedback/PdxSkeleton.js +23 -0
- package/dist/feedback/PdxTooltip.js +30 -0
- package/dist/form/PdxColorPicker.js +75 -0
- package/dist/form/PdxDatePicker.js +89 -0
- package/dist/form/PdxDateRangePicker.js +90 -0
- package/dist/form/PdxFileUpload.js +108 -0
- package/dist/form/PdxImageUpload.js +87 -0
- package/dist/form/PdxPasswordStrength.js +73 -0
- package/dist/form/PdxRadioGroup.js +71 -0
- package/dist/form/PdxRange.js +95 -0
- package/dist/form/PdxRating.js +62 -0
- package/dist/form/PdxRegexInput.js +76 -0
- package/dist/form/PdxRegionPicker.js +121 -0
- package/dist/form/PdxRichTextEditor.js +177 -0
- package/dist/form/PdxSelect.js +69 -0
- package/dist/form/PdxSlider.js +64 -0
- package/dist/form/PdxTimePicker.js +89 -0
- package/dist/form/PdxVerificationCode.js +90 -0
- package/dist/icon/PdxIcon.js +73 -0
- package/dist/icon/PdxIconLink.js +13 -0
- package/dist/image/PdxAvatar.js +38 -0
- package/dist/image/PdxImage.js +39 -0
- package/dist/image/PdxImageGallery.js +77 -0
- package/dist/index.js +142 -0
- package/dist/input/PdxInput.js +75 -0
- package/dist/input/PdxSearch.js +89 -0
- package/dist/input/PdxTextarea.js +72 -0
- package/dist/link/PdxLink.js +34 -0
- package/dist/nav/PdxAnchorNavigation.js +37 -0
- package/dist/nav/PdxBreadcrumb.js +30 -0
- package/dist/nav/PdxCollapse.js +64 -0
- package/dist/nav/PdxNav.js +48 -0
- package/dist/nav/PdxNavbar.js +43 -0
- package/dist/nav/PdxOutlet.js +26 -0
- package/dist/nav/PdxPagination.js +66 -0
- package/dist/nav/PdxRoute.js +119 -0
- package/dist/nav/PdxSidebar.js +45 -0
- package/dist/nav/PdxTabs.js +49 -0
- package/dist/style.css +1 -0
- package/dist/text/PdxHeading.js +21 -0
- package/dist/text/PdxKbd.js +42 -0
- package/dist/text/PdxParagraph.js +21 -0
- package/dist/text/PdxText.js +22 -0
- package/dist/video/PdxAudio.js +57 -0
- package/dist/video/PdxVideo.js +84 -0
- package/package.json +67 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { jsx as a, jsxs as k } from "react/jsx-runtime";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import "@prodivix/shared";
|
|
4
|
+
function B({
|
|
5
|
+
type: u = "Text",
|
|
6
|
+
size: d = "Medium",
|
|
7
|
+
placeholder: f,
|
|
8
|
+
value: m,
|
|
9
|
+
state: s,
|
|
10
|
+
disabled: n = !1,
|
|
11
|
+
readOnly: l = !1,
|
|
12
|
+
required: c = !1,
|
|
13
|
+
minLength: i,
|
|
14
|
+
maxLength: x,
|
|
15
|
+
min: h,
|
|
16
|
+
max: o,
|
|
17
|
+
step: $,
|
|
18
|
+
pattern: I,
|
|
19
|
+
autoFocus: N = !1,
|
|
20
|
+
autoComplete: P,
|
|
21
|
+
name: g,
|
|
22
|
+
icon: e,
|
|
23
|
+
iconPosition: t = "Left",
|
|
24
|
+
onChange: p,
|
|
25
|
+
onFocus: C,
|
|
26
|
+
onBlur: L,
|
|
27
|
+
onKeyDown: j,
|
|
28
|
+
onKeyUp: v,
|
|
29
|
+
className: w,
|
|
30
|
+
style: R,
|
|
31
|
+
id: y,
|
|
32
|
+
dataAttributes: D = {},
|
|
33
|
+
onClick: E
|
|
34
|
+
}) {
|
|
35
|
+
const M = `PdxInput ${d} ${s || ""} ${n ? "Disabled" : ""} ${l ? "ReadOnly" : ""} ${e ? "WithIcon" : ""} ${t} ${w || ""}`.trim(), T = { ...D }, W = (b) => {
|
|
36
|
+
p && p(b.target.value);
|
|
37
|
+
}, r = /* @__PURE__ */ a(
|
|
38
|
+
"input",
|
|
39
|
+
{
|
|
40
|
+
className: M,
|
|
41
|
+
style: R,
|
|
42
|
+
id: y,
|
|
43
|
+
type: u.toLowerCase(),
|
|
44
|
+
placeholder: f,
|
|
45
|
+
value: m,
|
|
46
|
+
disabled: n,
|
|
47
|
+
readOnly: l,
|
|
48
|
+
required: c,
|
|
49
|
+
minLength: i,
|
|
50
|
+
maxLength: x,
|
|
51
|
+
min: h,
|
|
52
|
+
max: o,
|
|
53
|
+
step: $,
|
|
54
|
+
pattern: I,
|
|
55
|
+
autoFocus: N,
|
|
56
|
+
autoComplete: P,
|
|
57
|
+
name: g,
|
|
58
|
+
onChange: W,
|
|
59
|
+
onFocus: C,
|
|
60
|
+
onBlur: L,
|
|
61
|
+
onKeyDown: j,
|
|
62
|
+
onKeyUp: v,
|
|
63
|
+
onClick: E,
|
|
64
|
+
...T
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
return e ? /* @__PURE__ */ k("div", { className: "PdxInput-wrapper", children: [
|
|
68
|
+
t === "Left" && /* @__PURE__ */ a("span", { className: "PdxInput-icon", children: e }),
|
|
69
|
+
r,
|
|
70
|
+
t === "Right" && /* @__PURE__ */ a("span", { className: "PdxInput-icon", children: e })
|
|
71
|
+
] }) : r;
|
|
72
|
+
}
|
|
73
|
+
export {
|
|
74
|
+
B as default
|
|
75
|
+
};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { jsxs as c, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import "@prodivix/shared";
|
|
5
|
+
function $({
|
|
6
|
+
size: h = "Medium",
|
|
7
|
+
placeholder: s = "Search...",
|
|
8
|
+
value: t = "",
|
|
9
|
+
disabled: a = !1,
|
|
10
|
+
onClear: n,
|
|
11
|
+
onSearch: i,
|
|
12
|
+
className: d,
|
|
13
|
+
style: m,
|
|
14
|
+
id: p,
|
|
15
|
+
dataAttributes: f = {},
|
|
16
|
+
onChange: l,
|
|
17
|
+
onKeyDown: o,
|
|
18
|
+
...x
|
|
19
|
+
}) {
|
|
20
|
+
const u = `PdxSearch ${h} ${a ? "Disabled" : ""} ${t ? "HasValue" : ""} ${d || ""}`.trim(), C = { ...f }, g = () => {
|
|
21
|
+
n && n();
|
|
22
|
+
};
|
|
23
|
+
return /* @__PURE__ */ c(
|
|
24
|
+
"div",
|
|
25
|
+
{
|
|
26
|
+
className: u,
|
|
27
|
+
style: m,
|
|
28
|
+
id: p,
|
|
29
|
+
...C,
|
|
30
|
+
children: [
|
|
31
|
+
/* @__PURE__ */ e("span", { className: "PdxSearchIcon", children: /* @__PURE__ */ c(
|
|
32
|
+
"svg",
|
|
33
|
+
{
|
|
34
|
+
width: "16",
|
|
35
|
+
height: "16",
|
|
36
|
+
viewBox: "0 0 24 24",
|
|
37
|
+
fill: "none",
|
|
38
|
+
stroke: "currentColor",
|
|
39
|
+
strokeWidth: "2",
|
|
40
|
+
children: [
|
|
41
|
+
/* @__PURE__ */ e("circle", { cx: "11", cy: "11", r: "8" }),
|
|
42
|
+
/* @__PURE__ */ e("path", { d: "m21 21-4.35-4.35" })
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
) }),
|
|
46
|
+
/* @__PURE__ */ e(
|
|
47
|
+
"input",
|
|
48
|
+
{
|
|
49
|
+
type: "text",
|
|
50
|
+
placeholder: s,
|
|
51
|
+
value: t,
|
|
52
|
+
disabled: a,
|
|
53
|
+
onChange: (r) => {
|
|
54
|
+
l && l(r.target.value);
|
|
55
|
+
},
|
|
56
|
+
onKeyDown: (r) => {
|
|
57
|
+
r.key === "Enter" && i && i(t), o && o(r);
|
|
58
|
+
},
|
|
59
|
+
...x
|
|
60
|
+
}
|
|
61
|
+
),
|
|
62
|
+
t && !a && /* @__PURE__ */ e(
|
|
63
|
+
"button",
|
|
64
|
+
{
|
|
65
|
+
type: "button",
|
|
66
|
+
className: "PdxSearchClear",
|
|
67
|
+
onClick: g,
|
|
68
|
+
"aria-label": "Clear search",
|
|
69
|
+
children: /* @__PURE__ */ e(
|
|
70
|
+
"svg",
|
|
71
|
+
{
|
|
72
|
+
width: "14",
|
|
73
|
+
height: "14",
|
|
74
|
+
viewBox: "0 0 24 24",
|
|
75
|
+
fill: "none",
|
|
76
|
+
stroke: "currentColor",
|
|
77
|
+
strokeWidth: "2",
|
|
78
|
+
children: /* @__PURE__ */ e("path", { d: "M18 6 6 18M6 6l12 12" })
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
}
|
|
82
|
+
)
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
export {
|
|
88
|
+
$ as default
|
|
89
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { jsx as B } from "react/jsx-runtime";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import "react";
|
|
4
|
+
import "@prodivix/shared";
|
|
5
|
+
function L({
|
|
6
|
+
size: l = "Medium",
|
|
7
|
+
placeholder: i,
|
|
8
|
+
value: n,
|
|
9
|
+
state: e,
|
|
10
|
+
disabled: t = !1,
|
|
11
|
+
readOnly: a = !1,
|
|
12
|
+
required: c = !1,
|
|
13
|
+
minLength: f,
|
|
14
|
+
maxLength: m,
|
|
15
|
+
rows: p = 4,
|
|
16
|
+
cols: h,
|
|
17
|
+
wrap: u,
|
|
18
|
+
resize: o = "Both",
|
|
19
|
+
autoFocus: x = !1,
|
|
20
|
+
name: z,
|
|
21
|
+
onChange: r,
|
|
22
|
+
onFocus: $,
|
|
23
|
+
onBlur: d,
|
|
24
|
+
onKeyDown: g,
|
|
25
|
+
onKeyUp: y,
|
|
26
|
+
className: C,
|
|
27
|
+
style: M,
|
|
28
|
+
id: N,
|
|
29
|
+
dataAttributes: P = {},
|
|
30
|
+
onClick: R
|
|
31
|
+
}) {
|
|
32
|
+
const b = `PdxTextarea ${l} ${e || ""} ${t ? "Disabled" : ""} ${a ? "ReadOnly" : ""} ${o} ${C || ""}`.trim(), v = { ...P }, w = (s) => {
|
|
33
|
+
r && r(s.target.value);
|
|
34
|
+
};
|
|
35
|
+
return /* @__PURE__ */ B(
|
|
36
|
+
"textarea",
|
|
37
|
+
{
|
|
38
|
+
className: b,
|
|
39
|
+
style: { ...{
|
|
40
|
+
resize: {
|
|
41
|
+
None: "none",
|
|
42
|
+
Horizontal: "horizontal",
|
|
43
|
+
Vertical: "vertical",
|
|
44
|
+
Both: "both"
|
|
45
|
+
}[o] || "both"
|
|
46
|
+
}, ...M },
|
|
47
|
+
id: N,
|
|
48
|
+
placeholder: i,
|
|
49
|
+
value: n,
|
|
50
|
+
disabled: t,
|
|
51
|
+
readOnly: a,
|
|
52
|
+
required: c,
|
|
53
|
+
minLength: f,
|
|
54
|
+
maxLength: m,
|
|
55
|
+
rows: p,
|
|
56
|
+
cols: h,
|
|
57
|
+
wrap: u?.toLowerCase(),
|
|
58
|
+
autoFocus: x,
|
|
59
|
+
name: z,
|
|
60
|
+
onChange: w,
|
|
61
|
+
onFocus: $,
|
|
62
|
+
onBlur: d,
|
|
63
|
+
onKeyDown: g,
|
|
64
|
+
onKeyUp: y,
|
|
65
|
+
onClick: R,
|
|
66
|
+
...v
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
export {
|
|
71
|
+
L as default
|
|
72
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx as P } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { Link as h } from "react-router";
|
|
4
|
+
import "@prodivix/shared";
|
|
5
|
+
/* empty css */
|
|
6
|
+
function v({
|
|
7
|
+
to: s,
|
|
8
|
+
text: r,
|
|
9
|
+
title: e,
|
|
10
|
+
disabled: t = !1,
|
|
11
|
+
children: i,
|
|
12
|
+
className: a,
|
|
13
|
+
style: l,
|
|
14
|
+
id: c,
|
|
15
|
+
dataAttributes: m = {},
|
|
16
|
+
onClick: n,
|
|
17
|
+
as: p = h
|
|
18
|
+
}) {
|
|
19
|
+
const f = i ?? r ?? "Link", k = `PdxLink ${t ? "Disabled" : ""} ${a || ""}`.trim(), d = { ...m }, u = p, o = {
|
|
20
|
+
to: s,
|
|
21
|
+
className: k,
|
|
22
|
+
style: l,
|
|
23
|
+
id: c,
|
|
24
|
+
title: e,
|
|
25
|
+
onClick: n,
|
|
26
|
+
...d
|
|
27
|
+
}, x = t ? (L) => {
|
|
28
|
+
L.preventDefault();
|
|
29
|
+
} : n;
|
|
30
|
+
return o.onClick = x, /* @__PURE__ */ P(u, { ...o, children: f });
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
v as default
|
|
34
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import "@prodivix/shared";
|
|
4
|
+
function m({
|
|
5
|
+
items: o,
|
|
6
|
+
activeId: n,
|
|
7
|
+
orientation: i = "Vertical",
|
|
8
|
+
onSelect: c,
|
|
9
|
+
className: l,
|
|
10
|
+
style: t,
|
|
11
|
+
id: s,
|
|
12
|
+
dataAttributes: d = {}
|
|
13
|
+
}) {
|
|
14
|
+
const e = `PdxAnchorNavigation ${i} ${l || ""}`.trim(), h = { ...d };
|
|
15
|
+
return /* @__PURE__ */ r(
|
|
16
|
+
"nav",
|
|
17
|
+
{
|
|
18
|
+
className: e,
|
|
19
|
+
style: t,
|
|
20
|
+
id: s,
|
|
21
|
+
...h,
|
|
22
|
+
children: o.map((a) => /* @__PURE__ */ r(
|
|
23
|
+
"a",
|
|
24
|
+
{
|
|
25
|
+
href: a.href || `#${a.id}`,
|
|
26
|
+
className: `PdxAnchorNavigationItem ${n === a.id ? "Active" : ""}`,
|
|
27
|
+
onClick: () => c?.(a),
|
|
28
|
+
children: a.label
|
|
29
|
+
},
|
|
30
|
+
a.id
|
|
31
|
+
))
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
export {
|
|
36
|
+
m as default
|
|
37
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as r, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import "@prodivix/shared";
|
|
4
|
+
function f({
|
|
5
|
+
items: c,
|
|
6
|
+
separator: e = "/",
|
|
7
|
+
className: l,
|
|
8
|
+
style: n,
|
|
9
|
+
id: s,
|
|
10
|
+
dataAttributes: d = {}
|
|
11
|
+
}) {
|
|
12
|
+
const o = `PdxBreadcrumb ${l || ""}`.trim(), p = { ...d };
|
|
13
|
+
return /* @__PURE__ */ r(
|
|
14
|
+
"nav",
|
|
15
|
+
{
|
|
16
|
+
className: o,
|
|
17
|
+
style: n,
|
|
18
|
+
id: s,
|
|
19
|
+
...p,
|
|
20
|
+
children: c.map((a, h) => /* @__PURE__ */ m("span", { className: "PdxBreadcrumbItem", children: [
|
|
21
|
+
a.icon && /* @__PURE__ */ r("span", { className: "PdxBreadcrumbIcon", children: a.icon }),
|
|
22
|
+
a.href ? /* @__PURE__ */ r("a", { href: a.href, children: a.label }) : /* @__PURE__ */ r("span", { children: a.label }),
|
|
23
|
+
h < c.length - 1 && /* @__PURE__ */ r("span", { className: "PdxBreadcrumbSeparator", children: e })
|
|
24
|
+
] }, a.label))
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
f as default
|
|
30
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { jsx as l, jsxs as r } from "react/jsx-runtime";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import "@prodivix/shared";
|
|
4
|
+
import { Minus as h, Plus as I } from "lucide-react";
|
|
5
|
+
import { useState as $, useEffect as j } from "react";
|
|
6
|
+
function E({
|
|
7
|
+
items: d,
|
|
8
|
+
activeKeys: n,
|
|
9
|
+
defaultActiveKeys: i,
|
|
10
|
+
accordion: c = !1,
|
|
11
|
+
onChange: o,
|
|
12
|
+
className: p,
|
|
13
|
+
style: u,
|
|
14
|
+
id: f,
|
|
15
|
+
dataAttributes: m = {}
|
|
16
|
+
}) {
|
|
17
|
+
const [x, a] = $(
|
|
18
|
+
i || []
|
|
19
|
+
);
|
|
20
|
+
j(() => {
|
|
21
|
+
n && a(n);
|
|
22
|
+
}, [n]);
|
|
23
|
+
const t = n || x, C = (s) => {
|
|
24
|
+
let e = [];
|
|
25
|
+
c ? e = t.includes(s) ? [] : [s] : e = t.includes(s) ? t.filter((b) => b !== s) : [...t, s], n || a(e), o && o(e);
|
|
26
|
+
}, P = `PdxCollapse ${p || ""}`.trim(), N = { ...m };
|
|
27
|
+
return /* @__PURE__ */ l(
|
|
28
|
+
"div",
|
|
29
|
+
{
|
|
30
|
+
className: P,
|
|
31
|
+
style: u,
|
|
32
|
+
id: f,
|
|
33
|
+
...N,
|
|
34
|
+
children: d.map((s) => {
|
|
35
|
+
const e = t.includes(s.key);
|
|
36
|
+
return /* @__PURE__ */ r(
|
|
37
|
+
"div",
|
|
38
|
+
{
|
|
39
|
+
className: `PdxCollapseItem ${e ? "Open" : ""} ${s.disabled ? "Disabled" : ""}`,
|
|
40
|
+
children: [
|
|
41
|
+
/* @__PURE__ */ r(
|
|
42
|
+
"button",
|
|
43
|
+
{
|
|
44
|
+
type: "button",
|
|
45
|
+
className: "PdxCollapseHeader",
|
|
46
|
+
onClick: () => !s.disabled && C(s.key),
|
|
47
|
+
children: [
|
|
48
|
+
/* @__PURE__ */ l("span", { children: s.title }),
|
|
49
|
+
/* @__PURE__ */ l("span", { className: "PdxCollapseIcon", children: e ? /* @__PURE__ */ l(h, { size: 14 }) : /* @__PURE__ */ l(I, { size: 14 }) })
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
),
|
|
53
|
+
e && /* @__PURE__ */ l("div", { className: "PdxCollapseContent", children: s.content })
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
s.key
|
|
57
|
+
);
|
|
58
|
+
})
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
export {
|
|
63
|
+
E as default
|
|
64
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
/* empty css */
|
|
4
|
+
function t({
|
|
5
|
+
columns: a = 2,
|
|
6
|
+
canHide: n = !1,
|
|
7
|
+
isFloat: s = !1,
|
|
8
|
+
backgroundStyle: d = "Solid",
|
|
9
|
+
children: i,
|
|
10
|
+
className: r,
|
|
11
|
+
style: l,
|
|
12
|
+
id: o,
|
|
13
|
+
dataAttributes: N = {},
|
|
14
|
+
onClick: c,
|
|
15
|
+
as: m = "nav"
|
|
16
|
+
}) {
|
|
17
|
+
const v = `PdxNav Columns-${a} ${s ? "Float" : ""} ${n ? "CanHide" : ""} ${d} ${r || ""}`.trim(), f = { ...N };
|
|
18
|
+
return /* @__PURE__ */ e(
|
|
19
|
+
m,
|
|
20
|
+
{
|
|
21
|
+
className: v,
|
|
22
|
+
style: l,
|
|
23
|
+
id: o,
|
|
24
|
+
onClick: c,
|
|
25
|
+
...f,
|
|
26
|
+
children: i
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
function u({ children: a }) {
|
|
31
|
+
return /* @__PURE__ */ e("div", { className: "PdxNavLeft", children: a });
|
|
32
|
+
}
|
|
33
|
+
function x({ children: a }) {
|
|
34
|
+
return /* @__PURE__ */ e("div", { className: "PdxNavCenter", children: a });
|
|
35
|
+
}
|
|
36
|
+
function P({ children: a }) {
|
|
37
|
+
return /* @__PURE__ */ e("div", { className: "PdxNavRight", children: a });
|
|
38
|
+
}
|
|
39
|
+
function g({ heading: a }) {
|
|
40
|
+
return /* @__PURE__ */ e("h1", { className: "PdxNavHeading", children: a });
|
|
41
|
+
}
|
|
42
|
+
t.Left = u;
|
|
43
|
+
t.Center = x;
|
|
44
|
+
t.Right = P;
|
|
45
|
+
t.Heading = g;
|
|
46
|
+
export {
|
|
47
|
+
t as default
|
|
48
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsx as a, jsxs as b, Fragment as f } from "react/jsx-runtime";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import "@prodivix/shared";
|
|
4
|
+
function u({
|
|
5
|
+
brand: s,
|
|
6
|
+
items: l = [],
|
|
7
|
+
actions: d,
|
|
8
|
+
variant: c = "Solid",
|
|
9
|
+
size: i = "Medium",
|
|
10
|
+
sticky: t = !1,
|
|
11
|
+
children: e,
|
|
12
|
+
className: n,
|
|
13
|
+
style: m,
|
|
14
|
+
id: v,
|
|
15
|
+
dataAttributes: N = {}
|
|
16
|
+
}) {
|
|
17
|
+
const o = `PdxNavbar ${i} ${c} ${t ? "Sticky" : ""} ${n || ""}`.trim(), x = { ...N };
|
|
18
|
+
return /* @__PURE__ */ a(
|
|
19
|
+
"nav",
|
|
20
|
+
{
|
|
21
|
+
className: o,
|
|
22
|
+
style: m,
|
|
23
|
+
id: v,
|
|
24
|
+
...x,
|
|
25
|
+
children: e || /* @__PURE__ */ b(f, { children: [
|
|
26
|
+
/* @__PURE__ */ a("div", { className: "PdxNavbarBrand", children: s }),
|
|
27
|
+
/* @__PURE__ */ a("div", { className: "PdxNavbarItems", children: l.map((r) => /* @__PURE__ */ a(
|
|
28
|
+
"a",
|
|
29
|
+
{
|
|
30
|
+
href: r.href || "#",
|
|
31
|
+
className: `PdxNavbarItem ${r.active ? "Active" : ""}`,
|
|
32
|
+
children: r.label
|
|
33
|
+
},
|
|
34
|
+
r.label
|
|
35
|
+
)) }),
|
|
36
|
+
/* @__PURE__ */ a("div", { className: "PdxNavbarActions", children: d })
|
|
37
|
+
] })
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
export {
|
|
42
|
+
u as default
|
|
43
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import "@prodivix/shared";
|
|
3
|
+
/* empty css */
|
|
4
|
+
function n({
|
|
5
|
+
emptyText: i = "Outlet is empty.",
|
|
6
|
+
children: t,
|
|
7
|
+
className: l,
|
|
8
|
+
style: m,
|
|
9
|
+
id: o,
|
|
10
|
+
dataAttributes: s = {}
|
|
11
|
+
}) {
|
|
12
|
+
const r = t != null;
|
|
13
|
+
return /* @__PURE__ */ e(
|
|
14
|
+
"div",
|
|
15
|
+
{
|
|
16
|
+
className: `PdxOutlet ${l ?? ""}`.trim(),
|
|
17
|
+
style: m,
|
|
18
|
+
id: o,
|
|
19
|
+
...s,
|
|
20
|
+
children: r ? t : /* @__PURE__ */ e("div", { className: "PdxOutletEmpty", children: i })
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
n as default
|
|
26
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { jsxs as C, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import "@prodivix/shared";
|
|
4
|
+
function A({
|
|
5
|
+
page: e,
|
|
6
|
+
total: d,
|
|
7
|
+
pageSize: h = 10,
|
|
8
|
+
maxButtons: i = 5,
|
|
9
|
+
onChange: c,
|
|
10
|
+
className: m,
|
|
11
|
+
style: f,
|
|
12
|
+
id: M,
|
|
13
|
+
dataAttributes: p = {}
|
|
14
|
+
}) {
|
|
15
|
+
const n = Math.max(1, Math.ceil(d / h)), a = Math.min(Math.max(1, e), n), u = Math.floor(i / 2);
|
|
16
|
+
let o = Math.max(1, a - u), r = Math.min(n, o + i - 1);
|
|
17
|
+
o = Math.max(1, r - i + 1);
|
|
18
|
+
const x = Array.from(
|
|
19
|
+
{ length: r - o + 1 },
|
|
20
|
+
(t, y) => o + y
|
|
21
|
+
), l = (t) => {
|
|
22
|
+
t < 1 || t > n || c && c(t);
|
|
23
|
+
}, P = `PdxPagination ${m || ""}`.trim(), b = { ...p };
|
|
24
|
+
return /* @__PURE__ */ C(
|
|
25
|
+
"div",
|
|
26
|
+
{
|
|
27
|
+
className: P,
|
|
28
|
+
style: f,
|
|
29
|
+
id: M,
|
|
30
|
+
...b,
|
|
31
|
+
children: [
|
|
32
|
+
/* @__PURE__ */ s(
|
|
33
|
+
"button",
|
|
34
|
+
{
|
|
35
|
+
type: "button",
|
|
36
|
+
onClick: () => l(a - 1),
|
|
37
|
+
disabled: a === 1,
|
|
38
|
+
children: "Prev"
|
|
39
|
+
}
|
|
40
|
+
),
|
|
41
|
+
x.map((t) => /* @__PURE__ */ s(
|
|
42
|
+
"button",
|
|
43
|
+
{
|
|
44
|
+
type: "button",
|
|
45
|
+
className: t === a ? "Active" : "",
|
|
46
|
+
onClick: () => l(t),
|
|
47
|
+
children: t
|
|
48
|
+
},
|
|
49
|
+
t
|
|
50
|
+
)),
|
|
51
|
+
/* @__PURE__ */ s(
|
|
52
|
+
"button",
|
|
53
|
+
{
|
|
54
|
+
type: "button",
|
|
55
|
+
onClick: () => l(a + 1),
|
|
56
|
+
disabled: a === n,
|
|
57
|
+
children: "Next"
|
|
58
|
+
}
|
|
59
|
+
)
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
export {
|
|
65
|
+
A as default
|
|
66
|
+
};
|