@alxgrn/telefrag-ui 0.0.12 → 0.0.14
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/Content.css +1 -1
- package/dist/assets/Header.css +1 -1
- package/dist/assets/MainMenu.css +1 -1
- package/dist/components/form/checkbox/Checkbox.js +20 -18
- package/dist/components/form/checkbox/CheckboxList.d.ts +1 -0
- package/dist/components/form/checkbox/CheckboxList.js +18 -16
- package/dist/components/form/radio/Radio.d.ts +1 -0
- package/dist/components/form/radio/Radio.js +18 -16
- package/dist/components/form/radio/RadioList.d.ts +1 -0
- package/dist/components/form/radio/RadioList.js +13 -12
- package/package.json +1 -1
package/dist/assets/Content.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.Content{display:flex;align-items:stretch;gap:var(--alxgrn-unit);max-width:var(--alxgrn-layout-width);margin:0 auto;margin-top:var(--alxgrn-layout-header-height)}.Content .ContentMenu{flex:0 0 auto;width:var(--alxgrn-layout-menu-width);color:var(--alxgrn-color-text);background-color:var(--alxgrn-bg-main)}.Content .ContentMenu .ContentMenuInner{position:sticky;top:var(--alxgrn-layout-header-height)}.Content .ContentMain{flex:1 1 auto}@media (max-width: 1024px){.Content .ContentMenu{display:none}}@media (max-width: 768px){.Content{padding-left:0;padding-right:0}}
|
|
1
|
+
.Content{display:flex;align-items:stretch;gap:var(--alxgrn-unit);max-width:var(--alxgrn-layout-width);margin:0 auto;margin-top:calc(var(--alxgrn-unit-half) + var(--alxgrn-layout-header-height))}.Content .ContentMenu{flex:0 0 auto;width:var(--alxgrn-layout-menu-width);color:var(--alxgrn-color-text);background-color:var(--alxgrn-bg-main)}.Content .ContentMenu .ContentMenuInner{position:sticky;top:calc(var(--alxgrn-unit) + var(--alxgrn-layout-header-height))}.Content .ContentMain{flex:1 1 auto}@media (max-width: 1024px){.Content .ContentMenu{display:none}}@media (max-width: 768px){.Content{padding-left:0;padding-right:0}}
|
package/dist/assets/Header.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.HeaderWrapper{z-index:100;display:block;position:fixed;top:0;width:100%;background-color:var(--alxgrn-bg-
|
|
1
|
+
.HeaderWrapper{z-index:100;display:block;position:fixed;top:0;width:100%;background-color:var(--alxgrn-bg-panel)}.Header{display:flex;align-items:center;gap:var(--alxgrn-unit);max-width:var(--alxgrn-layout-width);height:var(--alxgrn-layout-header-height);margin:0 auto}.HeaderLeft{display:none}.HeaderLeft span{cursor:pointer}.HeaderCenter{flex:1 1 auto;display:flex;align-items:center;padding-left:calc(var(--alxgrn-unit) + var(--alxgrn-layout-menu-width))}.HeaderCenter svg{width:auto;height:calc(2 * var(--alxgrn-unit))}@media (max-width: 1024px){.HeaderLeft{flex:0 0 auto;display:flex;align-items:center;justify-content:center}.HeaderCenter{padding-left:0}}
|
package/dist/assets/MainMenu.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.MainMenu div{display:flex;align-items:center;gap:var(--alxgrn-unit-half);margin-bottom:var(--alxgrn-unit
|
|
1
|
+
.MainMenu div{display:flex;align-items:center;gap:var(--alxgrn-unit-half);margin-bottom:var(--alxgrn-unit);cursor:pointer}.MainMenu div:hover *{color:var(--alxgrn-color-accent)}.MainMenu div svg{font-size:var(--alxgrn-font-size-big)}.MainMenu div span{font-size:var(--alxgrn-font-size)}
|
|
@@ -1,26 +1,28 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { Radio as
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
import { Radio as l } from "../radio/Radio.js";
|
|
3
|
+
const p = ({
|
|
4
|
+
id: o,
|
|
5
|
+
value: a,
|
|
6
|
+
onChange: s,
|
|
7
|
+
label: m,
|
|
8
|
+
bottom: r,
|
|
9
|
+
required: t = !1,
|
|
10
|
+
disabled: c = !1,
|
|
11
|
+
checked: f = !1
|
|
11
12
|
}) => /* @__PURE__ */ e("div", { className: "FormItem", children: /* @__PURE__ */ e(
|
|
12
|
-
|
|
13
|
+
l,
|
|
13
14
|
{
|
|
15
|
+
id: o,
|
|
14
16
|
type: "checkbox",
|
|
15
|
-
label:
|
|
16
|
-
value:
|
|
17
|
-
bottom:
|
|
18
|
-
required:
|
|
19
|
-
disabled:
|
|
20
|
-
checked:
|
|
21
|
-
onChange:
|
|
17
|
+
label: m,
|
|
18
|
+
value: a,
|
|
19
|
+
bottom: r,
|
|
20
|
+
required: t,
|
|
21
|
+
disabled: c,
|
|
22
|
+
checked: f,
|
|
23
|
+
onChange: s
|
|
22
24
|
}
|
|
23
25
|
) });
|
|
24
26
|
export {
|
|
25
|
-
|
|
27
|
+
p as default
|
|
26
28
|
};
|
|
@@ -1,32 +1,34 @@
|
|
|
1
1
|
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
3
|
-
import
|
|
4
|
-
import { Radio as
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
import { useState as b, useEffect as i } from "react";
|
|
3
|
+
import k from "../fieldset/Fieldset.js";
|
|
4
|
+
import { Radio as m } from "../radio/Radio.js";
|
|
5
|
+
const v = ({
|
|
6
|
+
id: d,
|
|
7
|
+
label: n,
|
|
8
|
+
onChange: h,
|
|
8
9
|
required: t = !1,
|
|
9
10
|
disabled: a = !1,
|
|
10
11
|
options: r
|
|
11
12
|
}) => {
|
|
12
|
-
const [l, s] =
|
|
13
|
-
|
|
13
|
+
const [l, s] = b(!1);
|
|
14
|
+
i(() => {
|
|
14
15
|
s(!1), t && r.findIndex((o) => o.checked === !0) < 0 && s(!0);
|
|
15
16
|
}, [t, r]);
|
|
16
|
-
const
|
|
17
|
+
const u = (e, o) => {
|
|
17
18
|
const c = [...r];
|
|
18
|
-
c[e].checked = o,
|
|
19
|
+
c[e].checked = o, h(c);
|
|
19
20
|
};
|
|
20
21
|
return /* @__PURE__ */ f(
|
|
21
|
-
|
|
22
|
+
k,
|
|
22
23
|
{
|
|
23
|
-
label:
|
|
24
|
+
label: n,
|
|
24
25
|
error: l,
|
|
25
26
|
disabled: a,
|
|
26
27
|
required: t,
|
|
27
28
|
children: r.map((e, o) => /* @__PURE__ */ f(
|
|
28
|
-
|
|
29
|
+
m,
|
|
29
30
|
{
|
|
31
|
+
id: d,
|
|
30
32
|
type: "checkbox",
|
|
31
33
|
error: l,
|
|
32
34
|
label: e.label,
|
|
@@ -35,7 +37,7 @@ const g = ({
|
|
|
35
37
|
disabled: e.disabled || a,
|
|
36
38
|
required: e.required,
|
|
37
39
|
checked: e.checked,
|
|
38
|
-
onChange: (c) =>
|
|
40
|
+
onChange: (c) => u(o, c)
|
|
39
41
|
},
|
|
40
42
|
o
|
|
41
43
|
))
|
|
@@ -43,6 +45,6 @@ const g = ({
|
|
|
43
45
|
);
|
|
44
46
|
};
|
|
45
47
|
export {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
+
v as CheckboxList,
|
|
49
|
+
v as default
|
|
48
50
|
};
|
|
@@ -1,29 +1,31 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
import c from "./RadioLabel.js";
|
|
3
|
+
const h = ({
|
|
4
|
+
id: l,
|
|
5
|
+
type: s = "radio",
|
|
6
|
+
value: f,
|
|
7
|
+
onChange: o,
|
|
8
|
+
label: u,
|
|
9
|
+
bottom: d,
|
|
10
|
+
error: i = !1,
|
|
10
11
|
required: e = !1,
|
|
11
12
|
disabled: r = !1,
|
|
12
13
|
checked: a = !1
|
|
13
14
|
}) => /* @__PURE__ */ t(
|
|
14
|
-
|
|
15
|
+
c,
|
|
15
16
|
{
|
|
16
|
-
label:
|
|
17
|
-
bottom:
|
|
17
|
+
label: u,
|
|
18
|
+
bottom: d,
|
|
18
19
|
required: !!e,
|
|
19
|
-
error:
|
|
20
|
+
error: i || e && !a,
|
|
20
21
|
disabled: !!r,
|
|
21
22
|
checked: !!a,
|
|
22
23
|
children: /* @__PURE__ */ t(
|
|
23
24
|
"input",
|
|
24
25
|
{
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
id: l,
|
|
27
|
+
type: s,
|
|
28
|
+
onChange: (n) => o(n.target.checked, f),
|
|
27
29
|
checked: !!a,
|
|
28
30
|
disabled: !!r,
|
|
29
31
|
required: !!e
|
|
@@ -32,6 +34,6 @@ const p = ({
|
|
|
32
34
|
}
|
|
33
35
|
);
|
|
34
36
|
export {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
+
h as Radio,
|
|
38
|
+
h as default
|
|
37
39
|
};
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
3
|
-
import { Radio as
|
|
4
|
-
import
|
|
5
|
-
const
|
|
6
|
-
const [t, s] =
|
|
7
|
-
return
|
|
2
|
+
import { useState as b, useEffect as x } from "react";
|
|
3
|
+
import { Radio as p } from "./Radio.js";
|
|
4
|
+
import h from "../fieldset/Fieldset.js";
|
|
5
|
+
const j = ({ id: n, label: i, value: r, onChange: c, required: o = !1, disabled: l = !1, options: a }) => {
|
|
6
|
+
const [t, s] = b(!1);
|
|
7
|
+
return x(() => {
|
|
8
8
|
s(!1), o && a.findIndex((f) => f.value === r) < 0 && s(!0);
|
|
9
9
|
}, [r, o, a]), /* @__PURE__ */ d(
|
|
10
|
-
|
|
10
|
+
h,
|
|
11
11
|
{
|
|
12
|
-
label:
|
|
12
|
+
label: i,
|
|
13
13
|
error: t,
|
|
14
14
|
disabled: l,
|
|
15
15
|
required: o,
|
|
16
16
|
children: a.map((e, f) => /* @__PURE__ */ d(
|
|
17
|
-
|
|
17
|
+
p,
|
|
18
18
|
{
|
|
19
|
+
id: n,
|
|
19
20
|
label: e.label,
|
|
20
21
|
value: e.value,
|
|
21
22
|
error: t,
|
|
@@ -23,7 +24,7 @@ const g = ({ label: n, value: r, onChange: i, required: o = !1, disabled: l = !1
|
|
|
23
24
|
disabled: e.disabled || l,
|
|
24
25
|
required: e.required,
|
|
25
26
|
checked: e.value === r,
|
|
26
|
-
onChange: (
|
|
27
|
+
onChange: (u, m) => c(m, u)
|
|
27
28
|
},
|
|
28
29
|
f
|
|
29
30
|
))
|
|
@@ -31,6 +32,6 @@ const g = ({ label: n, value: r, onChange: i, required: o = !1, disabled: l = !1
|
|
|
31
32
|
);
|
|
32
33
|
};
|
|
33
34
|
export {
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
j as RadioList,
|
|
36
|
+
j as default
|
|
36
37
|
};
|
package/package.json
CHANGED