@golemui/gui-react 0.12.2 → 0.13.1
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/Accordion-BU3skkjb.js +58 -0
- package/Alert-DpUiDxQT.js +17 -0
- package/Button-BYVR5EKG.js +86 -0
- package/CHANGELOG.md +16 -0
- package/{Calendar-Dxavv2c7.js → Calendar-BmMkpTcV.js} +13 -11
- package/Checkbox-B1Tsf-vi.js +164 -0
- package/Currency-D0pOQwU4.js +233 -0
- package/{DateInput-CdkyyAhc.js → DateInput-CqFHtc9F.js} +12 -10
- package/{DatePicker-TkMCndrw.js → DatePicker-BmW3TO0X.js} +18 -15
- package/{Dropdown-jKk4TyOa.js → Dropdown-C-_zDFCe.js} +5 -3
- package/Flex-Rs-RvIcq.js +20 -0
- package/{Grid-DREMTVQI.js → Grid-BcPUrfRL.js} +3 -2
- package/{List-BjMIo577.js → List-YkH8gdMh.js} +5 -3
- package/Markdown-DeAW4y3P.js +571 -0
- package/MarkdownText-BdISjAsE.js +11 -0
- package/Number-GsGZMR5a.js +247 -0
- package/Password-B8QjtpUe.js +204 -0
- package/RadioGroup-Cd1_Zkkz.js +197 -0
- package/{RangeCalendar-u2vxIhna.js → RangeCalendar-9IJoFEXw.js} +10 -8
- package/{RangeDateInput-CopLdb6J.js → RangeDateInput-DrVR4T_z.js} +21 -19
- package/{RangeDatePicker-DXpV-B_G.js → RangeDatePicker-Cq_Tt6NE.js} +38 -35
- package/{Renderer-B6WmwKDv.js → Renderer-CWqudTUu.js} +4 -2
- package/Repeater-DE-DAylQ.js +124 -0
- package/Select-CCCPYQW6.js +238 -0
- package/{Tabs-C2qqi8xO.js → Tabs-BVgVVvnu.js} +4 -3
- package/TextArea-BlRaVCon.js +202 -0
- package/TextInput-KuHLSN2X.js +169 -0
- package/Toggle-D-bglMPv.js +166 -0
- package/abstract-calendar-JfbbRwFb.js +528 -0
- package/calendar-BgptByan.js +95 -0
- package/class-map-DrTVAYz_.js +26 -0
- package/date-BS1lA1xg.js +786 -0
- package/date-input-Dux0mFJw.js +266 -0
- package/directive-1yd1wdny.js +555 -0
- package/errors-6UKoJh8Y.js +108 -0
- package/index.js +2705 -1171
- package/index.umd.cjs +878 -2
- package/lib/components/Accordion.d.ts +2 -2
- package/lib/components/Alert.d.ts +2 -2
- package/lib/components/Button.d.ts +2 -2
- package/lib/components/Calendar.d.ts +2 -2
- package/lib/components/Checkbox.d.ts +2 -2
- package/lib/components/Currency.d.ts +2 -2
- package/lib/components/DateInput.d.ts +2 -2
- package/lib/components/DatePicker.d.ts +2 -2
- package/lib/components/Dropdown.d.ts +2 -2
- package/lib/components/Flex.d.ts +2 -2
- package/lib/components/Form.d.ts +5 -5
- package/lib/components/Grid.d.ts +2 -2
- package/lib/components/List.d.ts +2 -2
- package/lib/components/Markdown.d.ts +2 -2
- package/lib/components/MarkdownText.d.ts +2 -2
- package/lib/components/Number.d.ts +2 -2
- package/lib/components/Password.d.ts +2 -2
- package/lib/components/RadioGroup.d.ts +2 -2
- package/lib/components/RangeCalendar.d.ts +2 -2
- package/lib/components/RangeDateInput.d.ts +2 -2
- package/lib/components/RangeDatePicker.d.ts +2 -2
- package/lib/components/Renderer.d.ts +2 -2
- package/lib/components/Repeater.d.ts +2 -2
- package/lib/components/Select.d.ts +2 -2
- package/lib/components/Tabs.d.ts +2 -2
- package/lib/components/TextArea.d.ts +2 -2
- package/lib/components/TextInput.d.ts +2 -2
- package/lib/components/Toggle.d.ts +2 -2
- package/lib/widget.loaders.d.ts +2 -2
- package/list-DHX7bG4r.js +282 -0
- package/live-BfTBpQrp.js +24 -0
- package/markdown-text-BUv0K0WF.js +44 -0
- package/one-of-DifUsEYY.js +48 -0
- package/package.json +6 -6
- package/query-h1h36oxg.js +12 -0
- package/range-calendar-SAyiW3EF.js +326 -0
- package/range-date-input-8WtB1urD.js +507 -0
- package/repeat-BucBfSPF.js +79 -0
- package/state-DI9ZsB5W.js +7 -0
- package/style-map-C_0XzJlx.js +29 -0
- package/tabs-DzSCq_98.js +13 -0
- package/templates-DBGyvZtc.js +75 -0
- package/Accordion-Btp_b0xA.js +0 -59
- package/Alert-CBgIsMKO.js +0 -16
- package/Button-DN0G-MUb.js +0 -21
- package/Checkbox-ViM9MktI.js +0 -30
- package/Currency-C4QFWO7Y.js +0 -37
- package/DefaultListItemRenderer-lNc9Kk7x.js +0 -18
- package/Flex-gD893rrB.js +0 -19
- package/Markdown-Ck_88HOR.js +0 -47
- package/MarkdownText-kJVkmihW.js +0 -9
- package/Number-CnQ95aLO.js +0 -35
- package/Password-Bg97DYW3.js +0 -36
- package/RadioGroup-Dldom5ja.js +0 -33
- package/Repeater-BYgXVfbl.js +0 -111
- package/Select-BLUX_W91.js +0 -55
- package/TextArea-cw3Q2v97.js +0 -35
- package/TextInput-geLoAA0c.js +0 -32
- package/Toggle-a7L71GwR.js +0 -30
|
@@ -1,49 +1,52 @@
|
|
|
1
1
|
import { jsxs as L, jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { useInputWidget as W } from "@golemui/react";
|
|
3
|
+
import "@golemui/gui-shared";
|
|
3
4
|
import { useState as Z, useRef as k, useCallback as M, useEffect as G } from "react";
|
|
5
|
+
import "./date-input-Dux0mFJw.js";
|
|
6
|
+
import "./calendar-BgptByan.js";
|
|
4
7
|
/* empty css */
|
|
5
8
|
import { E as J } from "./Errors-D7gxq0y6.js";
|
|
6
|
-
function
|
|
9
|
+
function se(D) {
|
|
7
10
|
const R = D.widget, {
|
|
8
11
|
uid: l,
|
|
9
12
|
errors: h,
|
|
10
13
|
value: w,
|
|
11
14
|
isTouched: f,
|
|
12
15
|
templateData: t,
|
|
13
|
-
onValueChanged:
|
|
16
|
+
onValueChanged: m,
|
|
14
17
|
onBlur: d,
|
|
15
18
|
injectValidationIssues: u
|
|
16
|
-
} = W(R), [c, o] = Z(!1), x = k(null),
|
|
19
|
+
} = W(R), [c, o] = Z(!1), x = k(null), p = k(null), v = k(null), F = M(
|
|
17
20
|
(n) => {
|
|
18
21
|
const e = n, r = (E) => {
|
|
19
|
-
u(null),
|
|
22
|
+
u(null), m(E.detail.value);
|
|
20
23
|
}, a = (E) => {
|
|
21
24
|
u([E.detail.message]);
|
|
22
25
|
}, s = () => {
|
|
23
26
|
o(!0);
|
|
24
27
|
};
|
|
25
|
-
return
|
|
28
|
+
return p.current = n, n && (e.addEventListener("change", r), e.addEventListener("focus", s), e.addEventListener("blur", d), e.addEventListener("inputError", a)), () => {
|
|
26
29
|
e.removeEventListener("change", r), e.removeEventListener("focus", s), e.removeEventListener("blur", d), e.removeEventListener("inputError", a);
|
|
27
30
|
};
|
|
28
31
|
},
|
|
29
|
-
[
|
|
32
|
+
[m, d, u]
|
|
30
33
|
), O = M(
|
|
31
34
|
(n) => {
|
|
32
35
|
const e = n, r = (s) => {
|
|
33
|
-
u(null),
|
|
36
|
+
u(null), m(s.detail.value);
|
|
34
37
|
}, a = (s) => {
|
|
35
38
|
d(), o(!1);
|
|
36
39
|
};
|
|
37
|
-
return
|
|
40
|
+
return v.current = n, n && (e.addEventListener("blur", a), e.addEventListener("change", r)), () => {
|
|
38
41
|
e.addEventListener("blur", a), e.addEventListener("change", r);
|
|
39
42
|
};
|
|
40
43
|
},
|
|
41
|
-
[
|
|
44
|
+
[m, u, d]
|
|
42
45
|
);
|
|
43
46
|
G(() => {
|
|
44
47
|
const n = (e) => {
|
|
45
48
|
if (!c) return;
|
|
46
|
-
const r = e.composedPath(), a =
|
|
49
|
+
const r = e.composedPath(), a = p.current && r.includes(p.current), s = v.current && r.includes(v.current);
|
|
47
50
|
!a && !s && o(!1);
|
|
48
51
|
};
|
|
49
52
|
return document.addEventListener("click", n), () => {
|
|
@@ -57,7 +60,7 @@ function ne(D) {
|
|
|
57
60
|
}, A = (n) => {
|
|
58
61
|
const e = n.target, r = e.closest(".gui-date-input__part"), a = e.closest("gui-calendar");
|
|
59
62
|
r || a ? c || o(!0) : o((s) => !s);
|
|
60
|
-
},
|
|
63
|
+
}, g = t.hint, H = t.icon, N = t.prevMonthIcon, q = t.nextMonthIcon, T = t.prevMonthAriaLabel, j = t.nextMonthAriaLabel, B = t.dayFormat, P = t.weekdayFormat, V = t.monthFormat, $ = t.minDate, z = t.maxDate, K = t.disabledRanges, S = t.numberOfMonths, U = f && h && h.length > 0, C = t.disabled, y = t.readonly, b = t.validator?.required, I = t.lang;
|
|
61
64
|
return /* @__PURE__ */ L(
|
|
62
65
|
"div",
|
|
63
66
|
{
|
|
@@ -68,7 +71,7 @@ function ne(D) {
|
|
|
68
71
|
children: [
|
|
69
72
|
t.label && /* @__PURE__ */ L("label", { className: "gui-label", htmlFor: l, "data-cy": `${l}_label`, children: [
|
|
70
73
|
t.label + (b ? " *" : ""),
|
|
71
|
-
|
|
74
|
+
g && /* @__PURE__ */ i("div", { className: "gui-widget-hint", id: `${l}_hint`, children: g })
|
|
72
75
|
] }),
|
|
73
76
|
/* @__PURE__ */ L(
|
|
74
77
|
"div",
|
|
@@ -87,7 +90,7 @@ function ne(D) {
|
|
|
87
90
|
{
|
|
88
91
|
ref: F,
|
|
89
92
|
uid: l,
|
|
90
|
-
hint:
|
|
93
|
+
hint: g,
|
|
91
94
|
showErrors: !1,
|
|
92
95
|
errors: h,
|
|
93
96
|
touched: f,
|
|
@@ -105,7 +108,7 @@ function ne(D) {
|
|
|
105
108
|
{
|
|
106
109
|
ref: O,
|
|
107
110
|
uid: l,
|
|
108
|
-
hint:
|
|
111
|
+
hint: g,
|
|
109
112
|
touched: f,
|
|
110
113
|
required: b,
|
|
111
114
|
disabled: C,
|
|
@@ -134,5 +137,5 @@ function ne(D) {
|
|
|
134
137
|
);
|
|
135
138
|
}
|
|
136
139
|
export {
|
|
137
|
-
|
|
140
|
+
se as DatePicker
|
|
138
141
|
};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { jsxs as M, jsx as u } from "react/jsx-runtime";
|
|
2
2
|
import { useInputWidget as ae, useDebounceCallback as oe, useItemRenderer as de } from "@golemui/react";
|
|
3
|
+
import "@golemui/gui-shared";
|
|
3
4
|
import { useState as g, useRef as q, useMemo as ue, useCallback as I, useEffect as R } from "react";
|
|
4
|
-
import { D as fe } from "./
|
|
5
|
-
|
|
5
|
+
import { D as fe } from "./list-DHX7bG4r.js";
|
|
6
|
+
import "./errors-6UKoJh8Y.js";
|
|
7
|
+
function Fe(P) {
|
|
6
8
|
const y = P.widget, { uid: d, errors: w, value: b, isTouched: L, templateData: t, onFilter: x, onValueChanged: D, onBlur: B } = ae(y), [k, z] = g({ start: 0, end: 10 }), [C, U] = g([]), [W, N] = g([]), [Z, A] = g(-1), [J, v] = g(!1), [m, f] = g(!1), [p, j] = g(void 0), r = q(null), c = q(null), O = q(null), Q = ue(() => C.slice(k.start, k.end), [C, k]), S = I(() => {
|
|
7
9
|
B(), f(!1), v(!1);
|
|
8
10
|
}, [B]), F = I(
|
|
@@ -197,5 +199,5 @@ function pe(P) {
|
|
|
197
199
|
] });
|
|
198
200
|
}
|
|
199
201
|
export {
|
|
200
|
-
|
|
202
|
+
Fe as Dropdown
|
|
201
203
|
};
|
package/Flex-Rs-RvIcq.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useLayoutWidget as a, WidgetRenderer as c } from "@golemui/react";
|
|
3
|
+
import "@golemui/gui-shared";
|
|
4
|
+
import { useCallback as f } from "react";
|
|
5
|
+
/* empty css */
|
|
6
|
+
function w(l) {
|
|
7
|
+
const n = l.widget, { uid: d, children: e, templateData: i } = a(n), s = f(() => e ? e.map((r) => /* @__PURE__ */ t(c, { widget: r }, r.uid)) : null, [e]), g = `gui-flex__widget--${i.direction ?? "column"}`, o = `gui-flex__widget--justify-${i.justify ?? "stretch"}`, u = `gui-flex__widget--align-${i.align ?? "start"}`;
|
|
8
|
+
return /* @__PURE__ */ t("div", { className: "gui-flex gui-field", style: { flex: i.size }, children: /* @__PURE__ */ t(
|
|
9
|
+
"div",
|
|
10
|
+
{
|
|
11
|
+
className: `gui-flex__widget ${g} ${o} ${u}`,
|
|
12
|
+
style: i.gap ? { gap: `${i.gap}px` } : {},
|
|
13
|
+
id: d,
|
|
14
|
+
children: s()
|
|
15
|
+
}
|
|
16
|
+
) });
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
w as Flex
|
|
20
|
+
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { useLayoutWidget as p, WidgetRenderer as w } from "@golemui/react";
|
|
3
|
+
import "@golemui/gui-shared";
|
|
3
4
|
import { useCallback as _ } from "react";
|
|
4
5
|
/* empty css */
|
|
5
|
-
function
|
|
6
|
+
function j(g) {
|
|
6
7
|
const n = g.widget, { uid: s, children: d, templateData: i } = p(n), o = i.direction !== "column", u = _(() => d.map((m) => {
|
|
7
8
|
const r = m;
|
|
8
9
|
return /* @__PURE__ */ t(
|
|
@@ -26,5 +27,5 @@ function h(g) {
|
|
|
26
27
|
) });
|
|
27
28
|
}
|
|
28
29
|
export {
|
|
29
|
-
|
|
30
|
+
j as Grid
|
|
30
31
|
};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { jsxs as T, jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback as R, useRef as $, useState as b, useMemo as S, useEffect as _ } from "react";
|
|
3
3
|
import { useInputWidget as z, useItemRenderer as A } from "@golemui/react";
|
|
4
|
-
import
|
|
5
|
-
|
|
4
|
+
import "@golemui/gui-shared";
|
|
5
|
+
import { D as M } from "./list-DHX7bG4r.js";
|
|
6
|
+
import "./errors-6UKoJh8Y.js";
|
|
7
|
+
function P(C) {
|
|
6
8
|
const F = C.widget, { uid: d, errors: c, value: I, isTouched: u, templateData: t, onValueChanged: m, onBlur: x } = z(F), y = R(
|
|
7
9
|
(e) => {
|
|
8
10
|
r.current && e.relatedTarget && r.current.contains(e.relatedTarget) || x();
|
|
@@ -99,5 +101,5 @@ function J(C) {
|
|
|
99
101
|
] });
|
|
100
102
|
}
|
|
101
103
|
export {
|
|
102
|
-
|
|
104
|
+
P as List
|
|
103
105
|
};
|