@alxgrn/telefrag-ui 0.0.3 → 0.0.7
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/dist/assets/Button.css +1 -1
- package/dist/assets/Content.css +1 -0
- package/dist/assets/DatePicker.css +1 -1
- package/dist/assets/Fieldset.css +1 -1
- package/dist/assets/Footer.css +1 -0
- package/dist/assets/Header.css +1 -0
- package/dist/assets/Input.css +1 -1
- package/dist/assets/Label.css +1 -1
- package/dist/assets/Menu.css +1 -1
- package/dist/assets/Modal.css +1 -1
- package/dist/assets/Overlay.css +1 -0
- package/dist/assets/Page.css +1 -0
- package/dist/assets/Popup.css +1 -1
- package/dist/assets/RadioLabel.css +1 -1
- package/dist/assets/RequiredMark.css +1 -0
- package/dist/assets/Sidebar.css +1 -0
- package/dist/components/{button → form/button}/Button.d.ts +1 -1
- package/dist/components/form/button/Button.js +16 -0
- package/dist/components/{date → form/date}/Date.js +1 -1
- package/dist/components/form/date/DatePicker.js +61 -0
- package/dist/components/form/fieldset/Fieldset.js +26 -0
- package/dist/components/{files → form/files}/Files.js +4 -3
- package/dist/components/form/{Form.js → form/Form.js} +36 -29
- package/dist/components/form/{FormCol.js → form/FormCol.js} +1 -1
- package/dist/components/form/{FormRow.js → form/FormRow.js} +1 -1
- package/dist/components/{input → form/input}/Input.js +14 -13
- package/dist/components/{fieldset/Fieldset.js → form/label/Label.js} +11 -10
- package/dist/components/form/radio/RadioLabel.js +28 -0
- package/dist/components/form/required/RequiredMark.js +8 -0
- package/dist/components/{select → form/select}/Select.js +9 -8
- package/dist/components/{time → form/time}/Time.js +10 -9
- package/dist/components/icons/Asterisk.d.ts +2 -0
- package/dist/components/icons/Asterisk.js +23 -0
- package/dist/components/icons/ChevronLeft.d.ts +2 -0
- package/dist/components/icons/ChevronLeft.js +19 -0
- package/dist/components/icons/ChevronRight.d.ts +2 -0
- package/dist/components/icons/ChevronRight.js +19 -0
- package/dist/components/icons/Menu.d.ts +2 -0
- package/dist/components/icons/Menu.js +23 -0
- package/dist/components/icons/Plus.d.ts +2 -0
- package/dist/components/icons/Plus.js +22 -0
- package/dist/components/icons/TelefragLogo.d.ts +6 -0
- package/dist/components/icons/TelefragLogo.js +49 -0
- package/dist/components/icons/index.d.ts +7 -0
- package/dist/components/icons/index.js +14 -0
- package/dist/components/layout/Content.d.ts +6 -0
- package/dist/components/layout/Content.js +9 -0
- package/dist/components/layout/Footer.d.ts +2 -0
- package/dist/components/layout/Footer.js +9 -0
- package/dist/components/layout/Header.d.ts +7 -0
- package/dist/components/layout/Header.js +12 -0
- package/dist/components/layout/Layout.d.ts +7 -0
- package/dist/components/layout/Layout.js +55 -0
- package/dist/components/layout/Page.d.ts +9 -0
- package/dist/components/layout/Page.js +51 -0
- package/dist/components/ui/alert/Alert.d.ts +1 -1
- package/dist/components/ui/alert/Alert.js +2 -2
- package/dist/components/ui/block/Block.js +4 -3
- package/dist/components/ui/confirm/Confirm.d.ts +1 -1
- package/dist/components/ui/confirm/Confirm.js +2 -2
- package/dist/components/ui/menu/Menu.js +9 -8
- package/dist/components/ui/modal/Modal.d.ts +1 -1
- package/dist/components/ui/modal/Modal.js +25 -35
- package/dist/components/ui/overlay/Overlay.d.ts +9 -0
- package/dist/components/ui/overlay/Overlay.js +26 -0
- package/dist/components/ui/popup/Popup.js +24 -22
- package/dist/components/ui/prompt/Prompt.d.ts +1 -1
- package/dist/components/ui/prompt/Prompt.js +3 -3
- package/dist/components/ui/sidebar/Sidebar.d.ts +8 -0
- package/dist/components/ui/sidebar/Sidebar.js +24 -0
- package/dist/config.d.ts +1 -0
- package/dist/config.js +4 -0
- package/dist/main.d.ts +23 -19
- package/dist/main.js +62 -53
- package/package.json +1 -1
- package/dist/assets/Form.css +0 -1
- package/dist/components/button/Button.js +0 -14
- package/dist/components/date/DatePicker.js +0 -58
- package/dist/components/label/Label.js +0 -25
- package/dist/components/radio/RadioLabel.js +0 -27
- package/dist/components/required/RequiredMark.js +0 -5
- /package/dist/components/{checkbox → form/checkbox}/Checkbox.d.ts +0 -0
- /package/dist/components/{checkbox → form/checkbox}/Checkbox.js +0 -0
- /package/dist/components/{checkbox → form/checkbox}/CheckboxList.d.ts +0 -0
- /package/dist/components/{checkbox → form/checkbox}/CheckboxList.js +0 -0
- /package/dist/components/{date → form/date}/Date.d.ts +0 -0
- /package/dist/components/{date → form/date}/DatePicker.d.ts +0 -0
- /package/dist/components/{fieldset → form/fieldset}/Fieldset.d.ts +0 -0
- /package/dist/components/{files → form/files}/Files.d.ts +0 -0
- /package/dist/components/form/{Form.d.ts → form/Form.d.ts} +0 -0
- /package/dist/components/form/{FormCol.d.ts → form/FormCol.d.ts} +0 -0
- /package/dist/components/form/{FormRow.d.ts → form/FormRow.d.ts} +0 -0
- /package/dist/components/{hidden → form/hidden}/Hidden.d.ts +0 -0
- /package/dist/components/{hidden → form/hidden}/Hidden.js +0 -0
- /package/dist/components/{input → form/input}/Input.d.ts +0 -0
- /package/dist/components/{label → form/label}/Label.d.ts +0 -0
- /package/dist/components/{radio → form/radio}/Radio.d.ts +0 -0
- /package/dist/components/{radio → form/radio}/Radio.js +0 -0
- /package/dist/components/{radio → form/radio}/RadioLabel.d.ts +0 -0
- /package/dist/components/{radio → form/radio}/RadioList.d.ts +0 -0
- /package/dist/components/{radio → form/radio}/RadioList.js +0 -0
- /package/dist/components/{required → form/required}/RequiredMark.d.ts +0 -0
- /package/dist/components/{select → form/select}/Select.d.ts +0 -0
- /package/dist/components/{time → form/time}/Time.d.ts +0 -0
|
@@ -1,39 +1,29 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
1
|
+
import { jsx as t, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect as n } from "react";
|
|
3
|
+
import { Overlay as l } from "../overlay/Overlay.js";
|
|
4
|
+
import s from "../../icons/Plus.js";
|
|
5
5
|
import '../../../assets/Modal.css';/* empty css */
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
const o = (l) => {
|
|
10
|
-
l.key === "Escape" && n();
|
|
11
|
-
};
|
|
12
|
-
return t && document.body.addEventListener("keydown", o), () => {
|
|
13
|
-
t && document.body.removeEventListener("keydown", o);
|
|
14
|
-
};
|
|
15
|
-
}, [t, n]);
|
|
16
|
-
const a = (o) => {
|
|
17
|
-
o.stopPropagation(), n();
|
|
6
|
+
const y = ({ children: a, isOpen: e, onClose: r, close: c = !0 }) => (n(() => {
|
|
7
|
+
const o = (d) => {
|
|
8
|
+
d.key === "Escape" && r();
|
|
18
9
|
};
|
|
19
|
-
return
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
) });
|
|
36
|
-
};
|
|
10
|
+
return e && document.body.addEventListener("keydown", o), () => {
|
|
11
|
+
e && document.body.removeEventListener("keydown", o);
|
|
12
|
+
};
|
|
13
|
+
}, [e, r]), /* @__PURE__ */ t(
|
|
14
|
+
l,
|
|
15
|
+
{
|
|
16
|
+
isOpen: e,
|
|
17
|
+
onClick: r,
|
|
18
|
+
children: /* @__PURE__ */ i("div", { className: "Modal", onClick: (o) => o.stopPropagation(), children: [
|
|
19
|
+
c && /* @__PURE__ */ t("div", { className: "ModalClose", onClick: (o) => {
|
|
20
|
+
o.stopPropagation(), r();
|
|
21
|
+
}, children: /* @__PURE__ */ t(s, {}) }),
|
|
22
|
+
/* @__PURE__ */ t("div", { className: "ModalInner Scrollbar", children: a })
|
|
23
|
+
] })
|
|
24
|
+
}
|
|
25
|
+
));
|
|
37
26
|
export {
|
|
38
|
-
|
|
27
|
+
y as Modal,
|
|
28
|
+
y as default
|
|
39
29
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FC, PropsWithChildren } from 'react';
|
|
2
|
+
export type Props = {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
onClick?: () => void;
|
|
5
|
+
vAlign?: 'Top' | 'Middle' | 'Bottom';
|
|
6
|
+
hAlign?: 'Left' | 'Center' | 'Right';
|
|
7
|
+
};
|
|
8
|
+
export declare const Overlay: FC<PropsWithChildren<Props>>;
|
|
9
|
+
export default Overlay;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as s } from "react";
|
|
3
|
+
import { CSSTransition as f } from "react-transition-group";
|
|
4
|
+
import c from "../portal/Portal.js";
|
|
5
|
+
import { ANIMATION_LENGTH as d } from "../../../config.js";
|
|
6
|
+
import '../../../assets/Overlay.css';/* empty css */
|
|
7
|
+
const p = d, T = ({ children: t, isOpen: i, onClick: o, vAlign: n = "Middle", hAlign: a = "Center" }) => {
|
|
8
|
+
const e = s(null), l = (m) => {
|
|
9
|
+
m.stopPropagation(), o && o();
|
|
10
|
+
};
|
|
11
|
+
return /* @__PURE__ */ r(c, { id: "alxgrn-overlay", fixBody: !0, children: /* @__PURE__ */ r(
|
|
12
|
+
f,
|
|
13
|
+
{
|
|
14
|
+
in: i,
|
|
15
|
+
timeout: p,
|
|
16
|
+
unmountOnExit: !0,
|
|
17
|
+
classNames: "Overlay",
|
|
18
|
+
nodeRef: e,
|
|
19
|
+
children: /* @__PURE__ */ r("div", { className: `Overlay ${n} ${a}`, ref: e, onClick: l, children: t })
|
|
20
|
+
}
|
|
21
|
+
) });
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
T as Overlay,
|
|
25
|
+
T as default
|
|
26
|
+
};
|
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as v, useState as y, useEffect as m } from "react";
|
|
3
|
-
import { CSSTransition as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
3
|
+
import { CSSTransition as L } from "react-transition-group";
|
|
4
|
+
import S from "../portal/Portal.js";
|
|
5
|
+
import { ANIMATION_LENGTH as T } from "../../../config.js";
|
|
6
|
+
import '../../../assets/Popup.css';/* empty css */
|
|
7
|
+
const N = T, M = ({
|
|
6
8
|
parent: s,
|
|
7
9
|
isOpen: d,
|
|
8
|
-
onClose:
|
|
10
|
+
onClose: c,
|
|
9
11
|
vertical: p = "auto",
|
|
10
12
|
horizontal: f = "auto",
|
|
11
13
|
margin: o = "0",
|
|
12
14
|
maxHeight: h = "none",
|
|
13
15
|
width: b = "auto",
|
|
14
16
|
position: l = "absolute",
|
|
15
|
-
children:
|
|
17
|
+
children: E
|
|
16
18
|
}) => {
|
|
17
|
-
const u = v(null), [
|
|
19
|
+
const u = v(null), [w, g] = y({}), [x, k] = y({});
|
|
18
20
|
return m(() => {
|
|
19
21
|
if (!d) return;
|
|
20
22
|
if (!s.current) {
|
|
@@ -32,25 +34,25 @@ import '../../../assets/Popup.css';const P = 100, I = ({
|
|
|
32
34
|
const t = {
|
|
33
35
|
width: b === "parent" ? e.width : "auto"
|
|
34
36
|
};
|
|
35
|
-
let
|
|
37
|
+
let i = 0;
|
|
36
38
|
switch (p) {
|
|
37
39
|
case "top":
|
|
38
|
-
t.bottom = "100%", t.marginBottom = o,
|
|
40
|
+
t.bottom = "100%", t.marginBottom = o, i = e.top;
|
|
39
41
|
break;
|
|
40
42
|
case "bottom":
|
|
41
|
-
t.top = "100%", t.marginTop = o,
|
|
43
|
+
t.top = "100%", t.marginTop = o, i = n - e.bottom;
|
|
42
44
|
break;
|
|
43
45
|
case "inner-top":
|
|
44
|
-
t.top = 0,
|
|
46
|
+
t.top = 0, i = n - e.top;
|
|
45
47
|
break;
|
|
46
48
|
case "inner-bottom":
|
|
47
|
-
t.bottom = 0,
|
|
49
|
+
t.bottom = 0, i = e.bottom;
|
|
48
50
|
break;
|
|
49
51
|
default:
|
|
50
|
-
e.top < n - e.bottom ? (t.top = "100%", t.marginTop = o,
|
|
52
|
+
e.top < n - e.bottom ? (t.top = "100%", t.marginTop = o, i = n - e.bottom) : (t.bottom = "100%", t.marginBottom = o, i = e.top);
|
|
51
53
|
break;
|
|
52
54
|
}
|
|
53
|
-
switch (h === "auto" && (t.maxHeight = `calc(${
|
|
55
|
+
switch (h === "auto" && (t.maxHeight = `calc(${i}px - 2 * ${o})`), f) {
|
|
54
56
|
case "left":
|
|
55
57
|
t.right = "100%", t.marginRight = o;
|
|
56
58
|
break;
|
|
@@ -70,31 +72,31 @@ import '../../../assets/Popup.css';const P = 100, I = ({
|
|
|
70
72
|
g(t);
|
|
71
73
|
}, [s, d, o, p, f, h, b, l]), m(() => {
|
|
72
74
|
const r = (n) => {
|
|
73
|
-
u.current && !u.current.contains(n.target) &&
|
|
75
|
+
u.current && !u.current.contains(n.target) && c();
|
|
74
76
|
};
|
|
75
77
|
return document.addEventListener("click", r, !0), () => {
|
|
76
78
|
document.removeEventListener("click", r, !0);
|
|
77
79
|
};
|
|
78
|
-
}, [
|
|
80
|
+
}, [c]), m(() => {
|
|
79
81
|
const r = (n) => {
|
|
80
|
-
n.key === "Escape" &&
|
|
82
|
+
n.key === "Escape" && c();
|
|
81
83
|
};
|
|
82
84
|
return document.body.addEventListener("keydown", r), () => {
|
|
83
85
|
document.body.removeEventListener("keydown", r);
|
|
84
86
|
};
|
|
85
|
-
}, [
|
|
86
|
-
|
|
87
|
+
}, [c]), /* @__PURE__ */ a(S, { id: "alxgrn-popup", children: /* @__PURE__ */ a(
|
|
88
|
+
L,
|
|
87
89
|
{
|
|
88
90
|
in: d,
|
|
89
|
-
timeout:
|
|
91
|
+
timeout: N,
|
|
90
92
|
unmountOnExit: !0,
|
|
91
93
|
classNames: "Popup",
|
|
92
94
|
nodeRef: u,
|
|
93
|
-
children: /* @__PURE__ */ a("div", { className: "Popup", style: x, children: /* @__PURE__ */ a("div", { className: "PopupInner", ref: u, style:
|
|
95
|
+
children: /* @__PURE__ */ a("div", { className: "Popup", style: x, children: /* @__PURE__ */ a("div", { className: "PopupInner", ref: u, style: w, children: E }) })
|
|
94
96
|
}
|
|
95
97
|
) });
|
|
96
98
|
};
|
|
97
99
|
export {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
+
M as Popup,
|
|
101
|
+
M as default
|
|
100
102
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as d, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { useState as p, useEffect as h } from "react";
|
|
3
|
-
import x from "../modal/Modal.js";
|
|
4
|
-
import { Form as b } from "../../form/Form.js";
|
|
5
|
-
import j from "../../input/Input.js";
|
|
3
|
+
import { Modal as x } from "../modal/Modal.js";
|
|
4
|
+
import { Form as b } from "../../form/form/Form.js";
|
|
5
|
+
import j from "../../form/input/Input.js";
|
|
6
6
|
const g = ({
|
|
7
7
|
value: o,
|
|
8
8
|
title: e,
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect as i } from "react";
|
|
3
|
+
import { Overlay as n } from "../overlay/Overlay.js";
|
|
4
|
+
import '../../../assets/Sidebar.css';/* empty css */
|
|
5
|
+
const y = ({ children: d, position: a = "Left", isOpen: e, onClose: t }) => (i(() => {
|
|
6
|
+
const r = (c) => {
|
|
7
|
+
c.key === "Escape" && t();
|
|
8
|
+
};
|
|
9
|
+
return e && document.body.addEventListener("keydown", r), () => {
|
|
10
|
+
e && document.body.removeEventListener("keydown", r);
|
|
11
|
+
};
|
|
12
|
+
}, [e, t]), /* @__PURE__ */ o(
|
|
13
|
+
n,
|
|
14
|
+
{
|
|
15
|
+
isOpen: e,
|
|
16
|
+
onClick: t,
|
|
17
|
+
hAlign: a,
|
|
18
|
+
children: /* @__PURE__ */ o("div", { className: `Sidebar ${a}`, onClick: (r) => r.stopPropagation(), children: /* @__PURE__ */ o("div", { className: "SidebarInner Scrollbar", children: d }) })
|
|
19
|
+
}
|
|
20
|
+
));
|
|
21
|
+
export {
|
|
22
|
+
y as Sidebar,
|
|
23
|
+
y as default
|
|
24
|
+
};
|
package/dist/config.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ANIMATION_LENGTH = 150;
|
package/dist/config.js
ADDED
package/dist/main.d.ts
CHANGED
|
@@ -1,29 +1,33 @@
|
|
|
1
|
-
import { Form, FormData } from './components/form/Form';
|
|
2
|
-
import { default as
|
|
3
|
-
import { default as
|
|
4
|
-
import { default as
|
|
5
|
-
import { default as
|
|
6
|
-
import { default as
|
|
7
|
-
import { default as
|
|
8
|
-
import { default as
|
|
9
|
-
import { default as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { default as
|
|
13
|
-
import { default as
|
|
14
|
-
import { default as
|
|
15
|
-
import { default as
|
|
16
|
-
import { default as
|
|
1
|
+
import { Form, FormData } from './components/form/form/Form';
|
|
2
|
+
import { default as FormRow } from './components/form/form/FormRow';
|
|
3
|
+
import { default as FormCol } from './components/form/form/FormCol';
|
|
4
|
+
import { default as Date } from './components/form/date/Date';
|
|
5
|
+
import { default as DatePicker } from './components/form/date/DatePicker';
|
|
6
|
+
import { default as Time } from './components/form/time/Time';
|
|
7
|
+
import { default as Files } from './components/form/files/Files';
|
|
8
|
+
import { default as Input } from './components/form/input/Input';
|
|
9
|
+
import { default as Label } from './components/form/label/Label';
|
|
10
|
+
import { RadioList, RadioListOption, RadioListValue } from './components/form/radio/RadioList';
|
|
11
|
+
import { Button, ButtonType } from './components/form/button/Button';
|
|
12
|
+
import { default as Select } from './components/form/select/Select';
|
|
13
|
+
import { default as Hidden } from './components/form/hidden/Hidden';
|
|
14
|
+
import { default as Checkbox } from './components/form/checkbox/Checkbox';
|
|
15
|
+
import { default as CheckboxList } from './components/form/checkbox/CheckboxList';
|
|
16
|
+
import { default as Fieldset } from './components/form/fieldset/Fieldset';
|
|
17
17
|
import { Menu, MenuItem } from './components/ui/menu/Menu';
|
|
18
18
|
import { default as Block } from './components/ui/block/Block';
|
|
19
19
|
import { default as Panel } from './components/ui/panel/Panel';
|
|
20
|
-
import {
|
|
20
|
+
import { Modal, ModalProps } from './components/ui/modal/Modal';
|
|
21
|
+
import { default as Overlay } from './components/ui/overlay/Overlay';
|
|
21
22
|
import { default as Popup } from './components/ui/popup/Popup';
|
|
22
23
|
import { default as Portal } from './components/ui/portal/Portal';
|
|
23
24
|
import { default as Message } from './components/ui/message/Message';
|
|
24
25
|
import { default as Alert } from './components/ui/alert/Alert';
|
|
25
26
|
import { default as Confirm } from './components/ui/confirm/Confirm';
|
|
26
27
|
import { default as Prompt } from './components/ui/prompt/Prompt';
|
|
28
|
+
import { default as Sidebar } from './components/ui/sidebar/Sidebar';
|
|
27
29
|
import { default as Editable } from './components/ui/editable/Editable';
|
|
28
|
-
|
|
29
|
-
|
|
30
|
+
import { default as Layout } from './components/layout/Layout';
|
|
31
|
+
import { default as Page } from './components/layout/Page';
|
|
32
|
+
export { Form, Date, Time, Files, Input, Label, RadioList, Button, Select, Hidden, Checkbox, CheckboxList, Fieldset, FormRow, FormCol, DatePicker, Menu, Block, Panel, Modal, Overlay, Popup, Portal, Message, Alert, Confirm, Prompt, Sidebar, Editable, Layout, Page, };
|
|
33
|
+
export type { FormData, MenuItem, ModalProps, ButtonType, RadioListOption, RadioListValue, };
|
package/dist/main.js
CHANGED
|
@@ -1,56 +1,65 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { default as
|
|
4
|
-
import {
|
|
5
|
-
import { default as
|
|
6
|
-
import { default as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { default as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { default as
|
|
15
|
-
import { default as
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import { default as
|
|
20
|
-
import { default as
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import { default as
|
|
25
|
-
import { default as
|
|
26
|
-
import { default as
|
|
27
|
-
import { default as
|
|
1
|
+
import './assets/Page.css';/* empty css */
|
|
2
|
+
import { Form as t } from "./components/form/form/Form.js";
|
|
3
|
+
import { default as f } from "./components/form/form/FormRow.js";
|
|
4
|
+
import { default as p } from "./components/form/form/FormCol.js";
|
|
5
|
+
import { default as l } from "./components/form/date/Date.js";
|
|
6
|
+
import { default as s } from "./components/form/date/DatePicker.js";
|
|
7
|
+
import { default as i } from "./components/form/time/Time.js";
|
|
8
|
+
import { Files as P } from "./components/form/files/Files.js";
|
|
9
|
+
import { default as c } from "./components/form/input/Input.js";
|
|
10
|
+
import { default as k } from "./components/form/label/Label.js";
|
|
11
|
+
import { RadioList as L } from "./components/form/radio/RadioList.js";
|
|
12
|
+
import { Button as g } from "./components/form/button/Button.js";
|
|
13
|
+
import { Select as y } from "./components/form/select/Select.js";
|
|
14
|
+
import { default as D } from "./components/form/hidden/Hidden.js";
|
|
15
|
+
import { default as S } from "./components/form/checkbox/Checkbox.js";
|
|
16
|
+
import { CheckboxList as w } from "./components/form/checkbox/CheckboxList.js";
|
|
17
|
+
import { default as E } from "./components/form/fieldset/Fieldset.js";
|
|
18
|
+
import { Menu as I } from "./components/ui/menu/Menu.js";
|
|
19
|
+
import { default as T } from "./components/ui/block/Block.js";
|
|
20
|
+
import { default as q } from "./components/ui/panel/Panel.js";
|
|
21
|
+
import { Modal as G } from "./components/ui/modal/Modal.js";
|
|
22
|
+
import { Overlay as K } from "./components/ui/overlay/Overlay.js";
|
|
23
|
+
import { Popup as Q } from "./components/ui/popup/Popup.js";
|
|
24
|
+
import { default as V } from "./components/ui/portal/Portal.js";
|
|
25
|
+
import { default as X } from "./components/ui/message/Message.js";
|
|
26
|
+
import { default as Z } from "./components/ui/alert/Alert.js";
|
|
27
|
+
import { default as $ } from "./components/ui/confirm/Confirm.js";
|
|
28
|
+
import { default as eo } from "./components/ui/prompt/Prompt.js";
|
|
29
|
+
import { Sidebar as to } from "./components/ui/sidebar/Sidebar.js";
|
|
30
|
+
import { default as fo } from "./components/ui/editable/Editable.js";
|
|
31
|
+
import { default as po } from "./components/layout/Layout.js";
|
|
32
|
+
import { default as lo } from "./components/layout/Page.js";
|
|
28
33
|
export {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
34
|
+
Z as Alert,
|
|
35
|
+
T as Block,
|
|
36
|
+
g as Button,
|
|
37
|
+
S as Checkbox,
|
|
38
|
+
w as CheckboxList,
|
|
39
|
+
$ as Confirm,
|
|
40
|
+
l as Date,
|
|
41
|
+
s as DatePicker,
|
|
42
|
+
fo as Editable,
|
|
43
|
+
E as Fieldset,
|
|
44
|
+
P as Files,
|
|
45
|
+
t as Form,
|
|
46
|
+
p as FormCol,
|
|
47
|
+
f as FormRow,
|
|
48
|
+
D as Hidden,
|
|
49
|
+
c as Input,
|
|
50
|
+
k as Label,
|
|
51
|
+
po as Layout,
|
|
52
|
+
I as Menu,
|
|
53
|
+
X as Message,
|
|
48
54
|
G as Modal,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
55
|
+
K as Overlay,
|
|
56
|
+
lo as Page,
|
|
57
|
+
q as Panel,
|
|
58
|
+
Q as Popup,
|
|
59
|
+
V as Portal,
|
|
60
|
+
eo as Prompt,
|
|
61
|
+
L as RadioList,
|
|
62
|
+
y as Select,
|
|
63
|
+
to as Sidebar,
|
|
64
|
+
i as Time
|
|
56
65
|
};
|
package/package.json
CHANGED
package/dist/assets/Form.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
*{box-sizing:border-box;overflow-wrap:anywhere}:root{--alxgrn-unit: 16px;--alxgrn-unit-half: 8px;--alxgrn-unit-small: 4px;--alxgrn-unit-double: 32px;--alxgrn-unit-smallest: 2px;--alxgrn-font-size: 16px;--alxgrn-font-small: 12px;--alxgrn-line-height: 1.3;--alxgrn-font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;--alxgrn-color-text: #555;--alxgrn-color-dark: var(--alxgrn-color-text);--alxgrn-color-light: lightslategrey;--alxgrn-color-error: firebrick;--alxgrn-color-accent: steelblue;--alxgrn-color-active: var(--alxgrn-color-text);--alxgrn-color-success: forestgreen;--alxgrn-bg-main: #eee;--alxgrn-bg-panel: #fff;--alxgrn-bg-modal: var(--alxgrn-bg-panel);--alxgrn-bg-popup: var(--alxgrn-bg-panel);--alxgrn-bg-dark: #888;--alxgrn-bg-light: rgba(119, 136, 153, .1);--alxgrn-bg-error: rgba(178, 34, 34, .1);--alxgrn-bg-accent: rgba(70, 130, 180, .1);--alxgrn-bg-active: moccasin;--alxgrn-bg-success: rgba(34, 139, 34, .1);--alxgrn-border-dark: rgba(136, 136, 136, 1);--alxgrn-border-light: rgba(119, 136, 153, 1);--alxgrn-border-error: rgba(178, 34, 34, 1);--alxgrn-border-accent: rgba(70, 130, 180, 1);--alxgrn-border-active: moccasin;--alxgrn-border-success: rgba(34, 139, 34, 1)}[data-theme=dark]{--alxgrn-color-text: #999;--alxgrn-color-light: #666;--alxgrn-bg-main: #111;--alxgrn-bg-panel: #222;--alxgrn-bg-modal: #222;--alxgrn-bg-popup: #333;--alxgrn-bg-active: #444;--alxgrn-border-dark: rgba(136, 136, 136, .5);--alxgrn-border-light: rgba(119, 136, 153, .5);--alxgrn-border-error: rgba(178, 34, 34, .5);--alxgrn-border-accent: rgba(70, 130, 180, .5);--alxgrn-border-active: rgba(255, 228, 181, .5);--alxgrn-border-success: rgba(34, 139, 34, .5)}:root{--alxgrn-form-width: 512px;--alxgrn-form-width-wide: 1024px}.Form{max-width:var(--alxgrn-form-width)}.Form.FormWide{max-width:var(--alxgrn-form-width-wide)}.Form *{font-size:inherit;line-height:inherit;font-family:inherit;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.Form .FormItem{display:block;margin:var(--alxgrn-unit) 0}.FormSubmitButtons{margin-top:var(--alxgrn-unit-double);margin-bottom:0;display:flex;flex-wrap:nowrap;justify-content:space-between;gap:var(--alxgrn-unit)}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
-
import '../../assets/Button.css';const u = ({ label: t, type: o = "Default", size: a = "Normal", disabled: n = !1, onClick: s }) => /* @__PURE__ */ f(
|
|
3
|
-
"span",
|
|
4
|
-
{
|
|
5
|
-
className: n ? `Button ${o} ${a} Disabled` : `Button ${o} ${a}`,
|
|
6
|
-
onClick: () => {
|
|
7
|
-
s && !n && s();
|
|
8
|
-
},
|
|
9
|
-
children: t && t
|
|
10
|
-
}
|
|
11
|
-
);
|
|
12
|
-
export {
|
|
13
|
-
u as default
|
|
14
|
-
};
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { jsxs as u, jsx as c } from "react/jsx-runtime";
|
|
2
|
-
import { useState as m, useEffect as y } from "react";
|
|
3
|
-
import '../../assets/DatePicker.css';const q = ({ year: o, month: i, day: l, onChange: N }) => {
|
|
4
|
-
const v = L(), f = /* @__PURE__ */ new Date(), D = f.getDate(), d = f.getMonth(), h = f.getFullYear(), [a, p] = m(h), [r, g] = m(d), [Y, x] = m([]), [C, k] = m(0), [S, M] = m(0), [w, F] = m(0);
|
|
5
|
-
y(() => {
|
|
6
|
-
let e = o, t = i, n = l;
|
|
7
|
-
typeof e == "string" && (e = parseInt(e)), typeof t == "string" && (t = parseInt(t)), typeof n == "string" && (n = parseInt(n)), e !== void 0 && isNaN(e) && (e = h), t !== void 0 && isNaN(t) && (t = d), n !== void 0 && isNaN(n) && (n = D);
|
|
8
|
-
const s = new Date(e ?? h, t ? t - 1 : d, n ?? D);
|
|
9
|
-
p(s.getFullYear()), g(s.getMonth()), k(s.getDate()), M(s.getMonth()), F(s.getFullYear());
|
|
10
|
-
}, [o, i, l, h, d, D]), y(() => {
|
|
11
|
-
const e = E(r, a);
|
|
12
|
-
let t = new Date(a, r, 1).getDay();
|
|
13
|
-
t === 0 && (t = 7);
|
|
14
|
-
const n = [];
|
|
15
|
-
for (let s = 1; s < t; s++) n.push(0);
|
|
16
|
-
for (let s = 1; s <= e; s++) n.push(s);
|
|
17
|
-
x(n);
|
|
18
|
-
}, [r, a]);
|
|
19
|
-
const P = (e) => {
|
|
20
|
-
let t = r + e;
|
|
21
|
-
t < 0 && (t = 11), t > 11 && (t = 0), g(t);
|
|
22
|
-
}, I = (e) => {
|
|
23
|
-
e && (k(e), M(r), F(a), N && N({ day: e, month: r + 1, year: a }));
|
|
24
|
-
}, j = (e) => {
|
|
25
|
-
if (!e) return "Empty";
|
|
26
|
-
if (e === C && r === S && a === w) return "Selected";
|
|
27
|
-
if (e === D && r === d && a === h) return "Current";
|
|
28
|
-
};
|
|
29
|
-
return /* @__PURE__ */ u("div", { className: "FormDatePicker", children: [
|
|
30
|
-
/* @__PURE__ */ u("div", { className: "FormDatePickerMenu", children: [
|
|
31
|
-
/* @__PURE__ */ c("span", { className: "FormDatePickerPrev", onClick: () => P(-1), children: "«" }),
|
|
32
|
-
/* @__PURE__ */ c("span", { className: "FormDatePickerText", children: v[r] }),
|
|
33
|
-
/* @__PURE__ */ c("span", { className: "FormDatePickerNext", onClick: () => P(1), children: "»" })
|
|
34
|
-
] }),
|
|
35
|
-
/* @__PURE__ */ c("div", { className: "FormDatePickerDays", children: Y.map((e, t) => /* @__PURE__ */ c(
|
|
36
|
-
"span",
|
|
37
|
-
{
|
|
38
|
-
className: j(e),
|
|
39
|
-
onClick: () => I(e),
|
|
40
|
-
children: e || ""
|
|
41
|
-
},
|
|
42
|
-
t
|
|
43
|
-
)) }),
|
|
44
|
-
/* @__PURE__ */ u("div", { className: "FormDatePickerMenu", children: [
|
|
45
|
-
/* @__PURE__ */ c("span", { className: "FormDatePickerPrev", onClick: () => p(a - 1), children: "«" }),
|
|
46
|
-
/* @__PURE__ */ c("span", { className: "FormDatePickerText", children: a }),
|
|
47
|
-
/* @__PURE__ */ c("span", { className: "FormDatePickerNext", onClick: () => p(a + 1), children: "»" })
|
|
48
|
-
] })
|
|
49
|
-
] });
|
|
50
|
-
}, E = (o, i) => new Date(i, o + 1, 0).getDate(), L = () => {
|
|
51
|
-
let o = new Date(2e3, 0), i = [];
|
|
52
|
-
for (let l = 0; l < 12; l++)
|
|
53
|
-
i.push(o.toLocaleString("default", { month: "long" })), o.setMonth(l + 1);
|
|
54
|
-
return i;
|
|
55
|
-
};
|
|
56
|
-
export {
|
|
57
|
-
q as default
|
|
58
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { jsxs as c, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import f from "../required/RequiredMark.js";
|
|
3
|
-
import '../../assets/Label.css';const h = ({
|
|
4
|
-
label: a,
|
|
5
|
-
top: l,
|
|
6
|
-
bottom: r,
|
|
7
|
-
required: i = !1,
|
|
8
|
-
error: d = !1,
|
|
9
|
-
disabled: m = !1,
|
|
10
|
-
children: n
|
|
11
|
-
}) => /* @__PURE__ */ c("label", { className: (() => {
|
|
12
|
-
let s = "";
|
|
13
|
-
return d && (s += " Error"), m && (s += " Disabled"), s;
|
|
14
|
-
})(), children: [
|
|
15
|
-
a && /* @__PURE__ */ c("div", { className: "Label", children: [
|
|
16
|
-
/* @__PURE__ */ e(f, { required: i }),
|
|
17
|
-
/* @__PURE__ */ e("span", { children: a })
|
|
18
|
-
] }),
|
|
19
|
-
l && /* @__PURE__ */ e("div", { className: "Top", children: l }),
|
|
20
|
-
n,
|
|
21
|
-
r && /* @__PURE__ */ e("div", { className: "Bottom", children: r })
|
|
22
|
-
] });
|
|
23
|
-
export {
|
|
24
|
-
h as default
|
|
25
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { jsxs as a, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import f from "../required/RequiredMark.js";
|
|
3
|
-
import '../../assets/RadioLabel.css';const v = ({
|
|
4
|
-
label: s,
|
|
5
|
-
bottom: l,
|
|
6
|
-
required: c = !1,
|
|
7
|
-
error: i = !1,
|
|
8
|
-
disabled: d = !1,
|
|
9
|
-
checked: o = !1,
|
|
10
|
-
children: n
|
|
11
|
-
}) => /* @__PURE__ */ a("label", { className: (() => {
|
|
12
|
-
let e = "Radio";
|
|
13
|
-
return i && (e += " Error"), d && (e += " Disabled"), o && (e += " Checked"), e;
|
|
14
|
-
})(), children: [
|
|
15
|
-
n,
|
|
16
|
-
/* @__PURE__ */ r("s", {}),
|
|
17
|
-
/* @__PURE__ */ a("div", { children: [
|
|
18
|
-
s && /* @__PURE__ */ a("div", { children: [
|
|
19
|
-
/* @__PURE__ */ r(f, { required: c }),
|
|
20
|
-
/* @__PURE__ */ r("span", { style: i ? { color: "var(--alxgrn-color-error)" } : void 0, children: s })
|
|
21
|
-
] }),
|
|
22
|
-
l && /* @__PURE__ */ r("div", { className: "Bottom", children: l })
|
|
23
|
-
] })
|
|
24
|
-
] });
|
|
25
|
-
export {
|
|
26
|
-
v as default
|
|
27
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|