@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,61 @@
|
|
|
1
|
+
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import "@prodivix/shared";
|
|
4
|
+
function j({
|
|
5
|
+
data: l,
|
|
6
|
+
columns: r,
|
|
7
|
+
size: p = "Medium",
|
|
8
|
+
bordered: c = !1,
|
|
9
|
+
striped: f = !1,
|
|
10
|
+
hoverable: x = !1,
|
|
11
|
+
title: i,
|
|
12
|
+
caption: s,
|
|
13
|
+
emptyText: b = "No data",
|
|
14
|
+
className: N,
|
|
15
|
+
style: m,
|
|
16
|
+
id: $,
|
|
17
|
+
dataAttributes: g = {}
|
|
18
|
+
}) {
|
|
19
|
+
const P = `PdxTable ${p} ${c ? "Bordered" : ""} ${f ? "Striped" : ""} ${x ? "Hoverable" : ""} ${N || ""}`.trim(), T = { ...g };
|
|
20
|
+
return /* @__PURE__ */ t(
|
|
21
|
+
"div",
|
|
22
|
+
{
|
|
23
|
+
className: "PdxTableWrapper",
|
|
24
|
+
style: m,
|
|
25
|
+
id: $,
|
|
26
|
+
...T,
|
|
27
|
+
children: [
|
|
28
|
+
i && /* @__PURE__ */ e("div", { className: "PdxTableTitle", children: i }),
|
|
29
|
+
/* @__PURE__ */ t("table", { className: P, children: [
|
|
30
|
+
s && /* @__PURE__ */ e("caption", { children: s }),
|
|
31
|
+
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ e("tr", { children: r.map((a) => /* @__PURE__ */ e(
|
|
32
|
+
"th",
|
|
33
|
+
{
|
|
34
|
+
style: { width: a.width },
|
|
35
|
+
className: `Align${a.align || "Left"}`,
|
|
36
|
+
children: a.title
|
|
37
|
+
},
|
|
38
|
+
a.key
|
|
39
|
+
)) }) }),
|
|
40
|
+
/* @__PURE__ */ t("tbody", { children: [
|
|
41
|
+
l.length === 0 && /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { className: "PdxTableEmpty", colSpan: r.length, children: b }) }),
|
|
42
|
+
l.map((a, n) => /* @__PURE__ */ e("tr", { children: r.map((d) => {
|
|
43
|
+
const h = d.dataIndex ? a[d.dataIndex] : void 0;
|
|
44
|
+
return /* @__PURE__ */ e(
|
|
45
|
+
"td",
|
|
46
|
+
{
|
|
47
|
+
className: `Align${d.align || "Left"}`,
|
|
48
|
+
children: d.render ? d.render(h, a, n) : h
|
|
49
|
+
},
|
|
50
|
+
d.key
|
|
51
|
+
);
|
|
52
|
+
}) }, n))
|
|
53
|
+
] })
|
|
54
|
+
] })
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
export {
|
|
60
|
+
j as default
|
|
61
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsxs as u, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import "@prodivix/shared";
|
|
4
|
+
import { X as x } from "lucide-react";
|
|
5
|
+
function $({
|
|
6
|
+
text: s,
|
|
7
|
+
color: t = "Default",
|
|
8
|
+
size: e = "Medium",
|
|
9
|
+
variant: o = "Soft",
|
|
10
|
+
closable: l = !1,
|
|
11
|
+
onClose: r,
|
|
12
|
+
className: n,
|
|
13
|
+
style: i,
|
|
14
|
+
id: m,
|
|
15
|
+
dataAttributes: c = {},
|
|
16
|
+
onClick: d
|
|
17
|
+
}) {
|
|
18
|
+
const p = `PdxTag ${e} ${t} ${o} ${n || ""}`.trim(), f = { ...c };
|
|
19
|
+
return /* @__PURE__ */ u(
|
|
20
|
+
"span",
|
|
21
|
+
{
|
|
22
|
+
className: p,
|
|
23
|
+
style: i,
|
|
24
|
+
id: m,
|
|
25
|
+
onClick: d,
|
|
26
|
+
...f,
|
|
27
|
+
children: [
|
|
28
|
+
/* @__PURE__ */ a("span", { className: "PdxTagText", children: s }),
|
|
29
|
+
l && /* @__PURE__ */ a("button", { type: "button", className: "PdxTagClose", onClick: r, children: /* @__PURE__ */ a(x, { size: 12 }) })
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
export {
|
|
35
|
+
$ as default
|
|
36
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx as e, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import "@prodivix/shared";
|
|
4
|
+
function p({
|
|
5
|
+
items: s,
|
|
6
|
+
className: d,
|
|
7
|
+
style: n,
|
|
8
|
+
id: a,
|
|
9
|
+
dataAttributes: m = {}
|
|
10
|
+
}) {
|
|
11
|
+
const t = `PdxTimeline ${d || ""}`.trim(), c = { ...m };
|
|
12
|
+
return /* @__PURE__ */ e(
|
|
13
|
+
"div",
|
|
14
|
+
{
|
|
15
|
+
className: t,
|
|
16
|
+
style: n,
|
|
17
|
+
id: a,
|
|
18
|
+
...c,
|
|
19
|
+
children: s.map((i, r) => /* @__PURE__ */ l("div", { className: "PdxTimelineItem", children: [
|
|
20
|
+
/* @__PURE__ */ e("div", { className: `PdxTimelineDot ${i.status || "Default"}` }),
|
|
21
|
+
/* @__PURE__ */ l("div", { className: "PdxTimelineContent", children: [
|
|
22
|
+
/* @__PURE__ */ e("div", { className: "PdxTimelineTitle", children: i.title }),
|
|
23
|
+
i.time && /* @__PURE__ */ e("div", { className: "PdxTimelineTime", children: i.time }),
|
|
24
|
+
i.description && /* @__PURE__ */ e("div", { className: "PdxTimelineDescription", children: i.description })
|
|
25
|
+
] })
|
|
26
|
+
] }, r))
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
export {
|
|
31
|
+
p as default
|
|
32
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { jsx as s, jsxs as f } from "react/jsx-runtime";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import "@prodivix/shared";
|
|
4
|
+
import { useState as $, useEffect as j, useMemo as k } from "react";
|
|
5
|
+
import { Minus as w, Plus as z } from "lucide-react";
|
|
6
|
+
function A({
|
|
7
|
+
data: h,
|
|
8
|
+
expandedKeys: r,
|
|
9
|
+
defaultExpandedKeys: p,
|
|
10
|
+
selectedKey: x,
|
|
11
|
+
onToggle: l,
|
|
12
|
+
onSelect: n,
|
|
13
|
+
className: N,
|
|
14
|
+
style: P,
|
|
15
|
+
id: b,
|
|
16
|
+
dataAttributes: T = {}
|
|
17
|
+
}) {
|
|
18
|
+
const [E, c] = $(
|
|
19
|
+
p || []
|
|
20
|
+
);
|
|
21
|
+
j(() => {
|
|
22
|
+
r && c(r);
|
|
23
|
+
}, [r]);
|
|
24
|
+
const a = r || E, d = k(
|
|
25
|
+
() => new Set(a),
|
|
26
|
+
[a]
|
|
27
|
+
), C = (t) => {
|
|
28
|
+
const i = d.has(t) ? a.filter((e) => e !== t) : [...a, t];
|
|
29
|
+
r || c(i), l && l(i);
|
|
30
|
+
}, S = (t) => {
|
|
31
|
+
t.disabled || n && n(t);
|
|
32
|
+
}, o = (t, i) => t.map((e) => {
|
|
33
|
+
const m = !!e.children?.length, u = d.has(e.id);
|
|
34
|
+
return /* @__PURE__ */ f("div", { className: "PdxTreeNode", children: [
|
|
35
|
+
/* @__PURE__ */ f("div", { className: "PdxTreeRow", style: { paddingLeft: i * 16 }, children: [
|
|
36
|
+
m ? /* @__PURE__ */ s(
|
|
37
|
+
"button",
|
|
38
|
+
{
|
|
39
|
+
type: "button",
|
|
40
|
+
className: "PdxTreeToggle",
|
|
41
|
+
onClick: () => C(e.id),
|
|
42
|
+
children: u ? /* @__PURE__ */ s(w, { size: 14 }) : /* @__PURE__ */ s(z, { size: 14 })
|
|
43
|
+
}
|
|
44
|
+
) : /* @__PURE__ */ s("span", { className: "PdxTreeSpacer" }),
|
|
45
|
+
/* @__PURE__ */ s(
|
|
46
|
+
"button",
|
|
47
|
+
{
|
|
48
|
+
type: "button",
|
|
49
|
+
className: `PdxTreeLabel ${x === e.id ? "Selected" : ""} ${e.disabled ? "Disabled" : ""}`,
|
|
50
|
+
onClick: () => S(e),
|
|
51
|
+
children: e.label
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
] }),
|
|
55
|
+
m && u && /* @__PURE__ */ s("div", { className: "PdxTreeChildren", children: o(e.children || [], i + 1) })
|
|
56
|
+
] }, e.id);
|
|
57
|
+
}), g = `PdxTree ${N || ""}`.trim(), v = { ...T };
|
|
58
|
+
return /* @__PURE__ */ s(
|
|
59
|
+
"div",
|
|
60
|
+
{
|
|
61
|
+
className: g,
|
|
62
|
+
style: P,
|
|
63
|
+
id: b,
|
|
64
|
+
...v,
|
|
65
|
+
children: o(h, 0)
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
export {
|
|
70
|
+
A as default
|
|
71
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { jsxs as u, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import "@prodivix/shared";
|
|
4
|
+
import { useState as T, useEffect as g, useMemo as j } from "react";
|
|
5
|
+
const x = (a, d = 0) => a.flatMap((e) => [
|
|
6
|
+
{ option: e, depth: d },
|
|
7
|
+
...e.children ? x(e.children, d + 1) : []
|
|
8
|
+
]);
|
|
9
|
+
function I({
|
|
10
|
+
label: a,
|
|
11
|
+
description: d,
|
|
12
|
+
message: e,
|
|
13
|
+
options: s,
|
|
14
|
+
value: l,
|
|
15
|
+
defaultValue: h,
|
|
16
|
+
placeholder: p = "Select item",
|
|
17
|
+
disabled: c = !1,
|
|
18
|
+
onChange: o,
|
|
19
|
+
className: P,
|
|
20
|
+
style: N,
|
|
21
|
+
id: v,
|
|
22
|
+
dataAttributes: $ = {}
|
|
23
|
+
}) {
|
|
24
|
+
const [F, f] = T(h || "");
|
|
25
|
+
g(() => {
|
|
26
|
+
l !== void 0 && f(l);
|
|
27
|
+
}, [l]);
|
|
28
|
+
const S = l !== void 0 ? l : F, m = j(() => x(s), [s]), V = (r) => {
|
|
29
|
+
const t = r.target.value;
|
|
30
|
+
l === void 0 && f(t);
|
|
31
|
+
const n = m.find(
|
|
32
|
+
(M) => M.option.id === t
|
|
33
|
+
)?.option;
|
|
34
|
+
o && o(t, n);
|
|
35
|
+
}, b = `PdxTreeSelect ${c ? "Disabled" : ""} ${P || ""}`.trim(), C = { ...$ };
|
|
36
|
+
return /* @__PURE__ */ u(
|
|
37
|
+
"div",
|
|
38
|
+
{
|
|
39
|
+
className: `PdxField ${b}`,
|
|
40
|
+
style: N,
|
|
41
|
+
id: v,
|
|
42
|
+
...C,
|
|
43
|
+
children: [
|
|
44
|
+
a && /* @__PURE__ */ i("div", { className: "PdxFieldHeader", children: /* @__PURE__ */ i("label", { className: "PdxFieldLabel", children: a }) }),
|
|
45
|
+
d && /* @__PURE__ */ i("div", { className: "PdxFieldDescription", children: d }),
|
|
46
|
+
/* @__PURE__ */ u(
|
|
47
|
+
"select",
|
|
48
|
+
{
|
|
49
|
+
className: "PdxTreeSelectControl",
|
|
50
|
+
disabled: c,
|
|
51
|
+
value: S,
|
|
52
|
+
onChange: V,
|
|
53
|
+
children: [
|
|
54
|
+
/* @__PURE__ */ i("option", { value: "", disabled: !0, hidden: !0, children: p }),
|
|
55
|
+
m.map(({ option: r, depth: t }) => {
|
|
56
|
+
const n = t > 0 ? `${"-".repeat(t)} ` : "";
|
|
57
|
+
return /* @__PURE__ */ i("option", { value: r.id, children: `${n}${r.label}` }, r.id);
|
|
58
|
+
})
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
),
|
|
62
|
+
e && /* @__PURE__ */ i("div", { className: "PdxFieldMessage", children: e })
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
export {
|
|
68
|
+
I as default
|
|
69
|
+
};
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
function C(t, e) {
|
|
4
|
+
switch (t) {
|
|
5
|
+
case "YouTube":
|
|
6
|
+
const a = e.match(
|
|
7
|
+
/(?:youtube\.com\/(?:[^\/]+\/.+\/|(?:v|e(?:mbed)?)\/|.*[?&]v=)|youtu\.be\/)([^"&?\/\s]{11})/
|
|
8
|
+
);
|
|
9
|
+
return a ? `https://www.youtube.com/embed/${a[1]}` : e;
|
|
10
|
+
case "Vimeo":
|
|
11
|
+
const c = e.match(/vimeo\.com\/(\d+)/);
|
|
12
|
+
return c ? `https://player.vimeo.com/video/${c[1]}` : e;
|
|
13
|
+
case "Twitter":
|
|
14
|
+
return e;
|
|
15
|
+
case "Instagram":
|
|
16
|
+
return e;
|
|
17
|
+
case "Facebook":
|
|
18
|
+
return e.match(/facebook\.com\/.*\/videos\/(\d+)/) ? `https://www.facebook.com/plugins/video.php?href=${encodeURIComponent(e)}` : e;
|
|
19
|
+
default:
|
|
20
|
+
return e;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
function R({
|
|
24
|
+
type: t,
|
|
25
|
+
url: e,
|
|
26
|
+
title: a,
|
|
27
|
+
allowFullScreen: c = !1,
|
|
28
|
+
loading: s = "Lazy",
|
|
29
|
+
width: w,
|
|
30
|
+
height: v,
|
|
31
|
+
aspectRatio: i = "16:9",
|
|
32
|
+
className: y,
|
|
33
|
+
style: g,
|
|
34
|
+
id: n,
|
|
35
|
+
dataAttributes: $ = {},
|
|
36
|
+
onLoad: r,
|
|
37
|
+
onError: d,
|
|
38
|
+
...m
|
|
39
|
+
}) {
|
|
40
|
+
const h = `PdxEmbed ${t} ${i.replace(":", "-")} ${y || ""}`.trim(), l = { ...$ }, b = {
|
|
41
|
+
...g,
|
|
42
|
+
width: w || "100%",
|
|
43
|
+
height: v || "auto"
|
|
44
|
+
}, f = {
|
|
45
|
+
position: "relative",
|
|
46
|
+
width: "100%",
|
|
47
|
+
aspectRatio: {
|
|
48
|
+
"16:9": "16 / 9",
|
|
49
|
+
"4:3": "4 / 3",
|
|
50
|
+
"1:1": "1 / 1",
|
|
51
|
+
"21:9": "21 / 9"
|
|
52
|
+
}[i],
|
|
53
|
+
overflow: "hidden",
|
|
54
|
+
backgroundColor: "#f5f5f5",
|
|
55
|
+
borderRadius: "8px"
|
|
56
|
+
}, u = {
|
|
57
|
+
position: "absolute",
|
|
58
|
+
top: 0,
|
|
59
|
+
left: 0,
|
|
60
|
+
width: "100%",
|
|
61
|
+
height: "100%",
|
|
62
|
+
border: "none"
|
|
63
|
+
}, p = C(t, e);
|
|
64
|
+
return t === "Twitter" || t === "Instagram" ? /* @__PURE__ */ o(
|
|
65
|
+
"div",
|
|
66
|
+
{
|
|
67
|
+
className: h,
|
|
68
|
+
style: b,
|
|
69
|
+
id: n,
|
|
70
|
+
...l,
|
|
71
|
+
children: /* @__PURE__ */ o("div", { style: f, children: /* @__PURE__ */ o(
|
|
72
|
+
"iframe",
|
|
73
|
+
{
|
|
74
|
+
style: u,
|
|
75
|
+
src: p,
|
|
76
|
+
title: a || `${t} embed`,
|
|
77
|
+
loading: s.toLowerCase(),
|
|
78
|
+
onLoad: r,
|
|
79
|
+
onError: d,
|
|
80
|
+
...m
|
|
81
|
+
}
|
|
82
|
+
) })
|
|
83
|
+
}
|
|
84
|
+
) : /* @__PURE__ */ o(
|
|
85
|
+
"div",
|
|
86
|
+
{
|
|
87
|
+
className: h,
|
|
88
|
+
style: b,
|
|
89
|
+
id: n,
|
|
90
|
+
...l,
|
|
91
|
+
children: /* @__PURE__ */ o("div", { style: f, children: /* @__PURE__ */ o(
|
|
92
|
+
"iframe",
|
|
93
|
+
{
|
|
94
|
+
style: u,
|
|
95
|
+
src: p,
|
|
96
|
+
title: a || `${t} embed`,
|
|
97
|
+
allowFullScreen: c,
|
|
98
|
+
loading: s.toLowerCase(),
|
|
99
|
+
onLoad: r,
|
|
100
|
+
onError: d,
|
|
101
|
+
...m
|
|
102
|
+
}
|
|
103
|
+
) })
|
|
104
|
+
}
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
export {
|
|
108
|
+
R as default
|
|
109
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
function I({
|
|
4
|
+
src: o,
|
|
5
|
+
srcDoc: a,
|
|
6
|
+
title: r,
|
|
7
|
+
allow: i,
|
|
8
|
+
allowFullScreen: s = !1,
|
|
9
|
+
loading: l = "Lazy",
|
|
10
|
+
referrerPolicy: n,
|
|
11
|
+
sandbox: d,
|
|
12
|
+
width: f,
|
|
13
|
+
height: c,
|
|
14
|
+
aspectRatio: t = "16:9",
|
|
15
|
+
className: p,
|
|
16
|
+
style: m,
|
|
17
|
+
id: h,
|
|
18
|
+
dataAttributes: y = {},
|
|
19
|
+
onLoad: u,
|
|
20
|
+
onError: w,
|
|
21
|
+
...x
|
|
22
|
+
}) {
|
|
23
|
+
const C = `PdxIframe ${t.replace(":", "-")} ${p || ""}`.trim(), b = { ...y }, g = {
|
|
24
|
+
...m,
|
|
25
|
+
width: f || "100%",
|
|
26
|
+
height: c || "auto"
|
|
27
|
+
}, v = {
|
|
28
|
+
position: "relative",
|
|
29
|
+
width: "100%",
|
|
30
|
+
aspectRatio: {
|
|
31
|
+
"16:9": "16 / 9",
|
|
32
|
+
"4:3": "4 / 3",
|
|
33
|
+
"1:1": "1 / 1",
|
|
34
|
+
"21:9": "21 / 9"
|
|
35
|
+
}[t],
|
|
36
|
+
overflow: "hidden",
|
|
37
|
+
backgroundColor: "#f5f5f5",
|
|
38
|
+
borderRadius: "8px"
|
|
39
|
+
};
|
|
40
|
+
return /* @__PURE__ */ e(
|
|
41
|
+
"div",
|
|
42
|
+
{
|
|
43
|
+
className: C,
|
|
44
|
+
style: g,
|
|
45
|
+
id: h,
|
|
46
|
+
...b,
|
|
47
|
+
children: /* @__PURE__ */ e("div", { style: v, children: /* @__PURE__ */ e(
|
|
48
|
+
"iframe",
|
|
49
|
+
{
|
|
50
|
+
style: {
|
|
51
|
+
position: "absolute",
|
|
52
|
+
top: 0,
|
|
53
|
+
left: 0,
|
|
54
|
+
width: "100%",
|
|
55
|
+
height: "100%",
|
|
56
|
+
border: "none"
|
|
57
|
+
},
|
|
58
|
+
src: o,
|
|
59
|
+
srcDoc: a,
|
|
60
|
+
title: r,
|
|
61
|
+
allow: i,
|
|
62
|
+
allowFullScreen: s,
|
|
63
|
+
loading: l.toLowerCase(),
|
|
64
|
+
referrerPolicy: n?.toLowerCase(),
|
|
65
|
+
sandbox: d,
|
|
66
|
+
onLoad: u,
|
|
67
|
+
onError: w,
|
|
68
|
+
...x
|
|
69
|
+
}
|
|
70
|
+
) })
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
export {
|
|
75
|
+
I as default
|
|
76
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsx as r, jsxs as v } from "react/jsx-runtime";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import "@prodivix/shared";
|
|
4
|
+
function f({
|
|
5
|
+
open: s,
|
|
6
|
+
title: d,
|
|
7
|
+
children: t,
|
|
8
|
+
footer: e,
|
|
9
|
+
placement: a = "Right",
|
|
10
|
+
size: i = 360,
|
|
11
|
+
closeOnOverlayClick: l = !0,
|
|
12
|
+
onClose: c,
|
|
13
|
+
className: n,
|
|
14
|
+
style: o,
|
|
15
|
+
id: m,
|
|
16
|
+
dataAttributes: x = {}
|
|
17
|
+
}) {
|
|
18
|
+
if (!s) return null;
|
|
19
|
+
const h = `PdxDrawer ${a} ${n || ""}`.trim(), w = { ...x }, P = a === "Top" || a === "Bottom" ? { height: i, ...o } : { width: i, ...o };
|
|
20
|
+
return /* @__PURE__ */ r(
|
|
21
|
+
"div",
|
|
22
|
+
{
|
|
23
|
+
className: "PdxDrawerOverlay",
|
|
24
|
+
onClick: l ? c : void 0,
|
|
25
|
+
children: /* @__PURE__ */ v(
|
|
26
|
+
"div",
|
|
27
|
+
{
|
|
28
|
+
className: h,
|
|
29
|
+
style: P,
|
|
30
|
+
id: m,
|
|
31
|
+
...w,
|
|
32
|
+
onClick: (u) => u.stopPropagation(),
|
|
33
|
+
children: [
|
|
34
|
+
d && /* @__PURE__ */ r("div", { className: "PdxDrawerHeader", children: d }),
|
|
35
|
+
/* @__PURE__ */ r("div", { className: "PdxDrawerBody", children: t }),
|
|
36
|
+
e && /* @__PURE__ */ r("div", { className: "PdxDrawerFooter", children: e })
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
)
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
export {
|
|
44
|
+
f as default
|
|
45
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsxs as n, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import "@prodivix/shared";
|
|
4
|
+
function P({
|
|
5
|
+
title: m = "No data",
|
|
6
|
+
description: t,
|
|
7
|
+
icon: d,
|
|
8
|
+
action: a,
|
|
9
|
+
className: e,
|
|
10
|
+
style: i,
|
|
11
|
+
id: l,
|
|
12
|
+
dataAttributes: r = {}
|
|
13
|
+
}) {
|
|
14
|
+
const c = `PdxEmpty ${e || ""}`.trim(), p = { ...r };
|
|
15
|
+
return /* @__PURE__ */ n(
|
|
16
|
+
"div",
|
|
17
|
+
{
|
|
18
|
+
className: c,
|
|
19
|
+
style: i,
|
|
20
|
+
id: l,
|
|
21
|
+
...p,
|
|
22
|
+
children: [
|
|
23
|
+
d && /* @__PURE__ */ s("div", { className: "PdxEmptyIcon", children: d }),
|
|
24
|
+
/* @__PURE__ */ s("div", { className: "PdxEmptyTitle", children: m }),
|
|
25
|
+
t && /* @__PURE__ */ s("div", { className: "PdxEmptyDescription", children: t }),
|
|
26
|
+
a && /* @__PURE__ */ s("div", { className: "PdxEmptyAction", children: a })
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
P as default
|
|
33
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsxs as d, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import "@prodivix/shared";
|
|
4
|
+
import { X as p } from "lucide-react";
|
|
5
|
+
function g({
|
|
6
|
+
text: e,
|
|
7
|
+
type: t = "Info",
|
|
8
|
+
closable: o = !1,
|
|
9
|
+
onClose: a,
|
|
10
|
+
className: r,
|
|
11
|
+
style: n,
|
|
12
|
+
id: i,
|
|
13
|
+
dataAttributes: l = {}
|
|
14
|
+
}) {
|
|
15
|
+
const m = `PdxMessage ${t} ${r || ""}`.trim(), c = { ...l };
|
|
16
|
+
return /* @__PURE__ */ d(
|
|
17
|
+
"div",
|
|
18
|
+
{
|
|
19
|
+
className: m,
|
|
20
|
+
style: n,
|
|
21
|
+
id: i,
|
|
22
|
+
...c,
|
|
23
|
+
children: [
|
|
24
|
+
/* @__PURE__ */ s("span", { children: e }),
|
|
25
|
+
o && /* @__PURE__ */ s("button", { type: "button", className: "PdxMessageClose", onClick: a, children: /* @__PURE__ */ s(p, { size: 14 }) })
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
export {
|
|
31
|
+
g as default
|
|
32
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsx as d, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import "@prodivix/shared";
|
|
4
|
+
import { X as v } from "lucide-react";
|
|
5
|
+
function y({
|
|
6
|
+
open: e,
|
|
7
|
+
title: a,
|
|
8
|
+
children: s,
|
|
9
|
+
footer: l,
|
|
10
|
+
size: c = "Medium",
|
|
11
|
+
closeOnOverlayClick: n = !0,
|
|
12
|
+
showClose: o = !0,
|
|
13
|
+
onClose: r,
|
|
14
|
+
className: t,
|
|
15
|
+
style: m,
|
|
16
|
+
id: u,
|
|
17
|
+
dataAttributes: x = {}
|
|
18
|
+
}) {
|
|
19
|
+
if (!e) return null;
|
|
20
|
+
const p = `PdxModal ${c} ${t || ""}`.trim(), P = { ...x };
|
|
21
|
+
return /* @__PURE__ */ d(
|
|
22
|
+
"div",
|
|
23
|
+
{
|
|
24
|
+
className: "PdxModalOverlay",
|
|
25
|
+
onClick: n ? r : void 0,
|
|
26
|
+
children: /* @__PURE__ */ i(
|
|
27
|
+
"div",
|
|
28
|
+
{
|
|
29
|
+
className: p,
|
|
30
|
+
style: m,
|
|
31
|
+
id: u,
|
|
32
|
+
...P,
|
|
33
|
+
onClick: (M) => M.stopPropagation(),
|
|
34
|
+
children: [
|
|
35
|
+
(a || o) && /* @__PURE__ */ i("div", { className: "PdxModalHeader", children: [
|
|
36
|
+
a && /* @__PURE__ */ d("h3", { children: a }),
|
|
37
|
+
o && /* @__PURE__ */ d("button", { type: "button", className: "PdxModalClose", onClick: r, children: /* @__PURE__ */ d(v, { size: 16 }) })
|
|
38
|
+
] }),
|
|
39
|
+
/* @__PURE__ */ d("div", { className: "PdxModalBody", children: s }),
|
|
40
|
+
l && /* @__PURE__ */ d("div", { className: "PdxModalFooter", children: l })
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
export {
|
|
48
|
+
y as default
|
|
49
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsxs as a, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import "@prodivix/shared";
|
|
4
|
+
import { X as x } from "lucide-react";
|
|
5
|
+
function v({
|
|
6
|
+
title: s,
|
|
7
|
+
description: t,
|
|
8
|
+
type: c = "Info",
|
|
9
|
+
closable: e = !1,
|
|
10
|
+
actions: o,
|
|
11
|
+
onClose: n,
|
|
12
|
+
className: d,
|
|
13
|
+
style: l,
|
|
14
|
+
id: r,
|
|
15
|
+
dataAttributes: f = {}
|
|
16
|
+
}) {
|
|
17
|
+
const m = `PdxNotification ${c} ${d || ""}`.trim(), N = { ...f };
|
|
18
|
+
return /* @__PURE__ */ a(
|
|
19
|
+
"div",
|
|
20
|
+
{
|
|
21
|
+
className: m,
|
|
22
|
+
style: l,
|
|
23
|
+
id: r,
|
|
24
|
+
...N,
|
|
25
|
+
children: [
|
|
26
|
+
/* @__PURE__ */ a("div", { className: "PdxNotificationHeader", children: [
|
|
27
|
+
/* @__PURE__ */ i("div", { className: "PdxNotificationTitle", children: s }),
|
|
28
|
+
e && /* @__PURE__ */ i(
|
|
29
|
+
"button",
|
|
30
|
+
{
|
|
31
|
+
type: "button",
|
|
32
|
+
className: "PdxNotificationClose",
|
|
33
|
+
onClick: n,
|
|
34
|
+
children: /* @__PURE__ */ i(x, { size: 16 })
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
] }),
|
|
38
|
+
t && /* @__PURE__ */ i("div", { className: "PdxNotificationDescription", children: t }),
|
|
39
|
+
o && /* @__PURE__ */ i("div", { className: "PdxNotificationActions", children: o })
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
export {
|
|
45
|
+
v as default
|
|
46
|
+
};
|