@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
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { filterTap as A } from "@golemui/core";
|
|
2
|
+
import { A as t, b as l } from "./directive-1yd1wdny.js";
|
|
3
|
+
import { e as y } from "./class-map-DrTVAYz_.js";
|
|
4
|
+
class T {
|
|
5
|
+
constructor(r, e) {
|
|
6
|
+
r.addController(this), this.getTargets = e.getTargets, this.getState = e.getState;
|
|
7
|
+
}
|
|
8
|
+
hostConnected() {
|
|
9
|
+
}
|
|
10
|
+
hostUpdated() {
|
|
11
|
+
const r = this.getTargets();
|
|
12
|
+
if (!r) return;
|
|
13
|
+
let e = [];
|
|
14
|
+
r instanceof NodeList ? e = Array.from(r) : Array.isArray(r) ? e = r : e = [r];
|
|
15
|
+
const { uid: o, templateData: a } = this.getState(), { touched: h, errors: c, readonly: f, disabled: _, hint: v } = a, $ = h && c && c.length > 0;
|
|
16
|
+
A(
|
|
17
|
+
e,
|
|
18
|
+
(i) => !!i,
|
|
19
|
+
(i) => {
|
|
20
|
+
const n = (d, g) => {
|
|
21
|
+
g ? i.setAttribute(d, g) : i.removeAttribute(d);
|
|
22
|
+
};
|
|
23
|
+
n("aria-describedby", v ? `${o}_hint` : null), n("aria-invalid", $ ? "true" : null), n("aria-errormessage", $ ? `${o}_errors` : null), n("aria-readonly", _ || f ? "true" : null);
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
const q = (s, r, e = !1, o = void 0, a = !0) => a ? r.label ? l`<label
|
|
29
|
+
class="gui-label"
|
|
30
|
+
for=${s}
|
|
31
|
+
data-cy=${`${s}_label`}
|
|
32
|
+
id=${o ? `${s}_${o}_label` : `${s}_label`}
|
|
33
|
+
>
|
|
34
|
+
${r.label + (r.required ? " *" : "")} ${u(s, r)}
|
|
35
|
+
${e ? b(s, r) : t}
|
|
36
|
+
</label>` : t : r.label ? l`<span
|
|
37
|
+
class="gui-label"
|
|
38
|
+
data-cy=${`${s}_label`}
|
|
39
|
+
id=${o ? `${s}_${o}_label` : `${s}_label`}
|
|
40
|
+
>
|
|
41
|
+
${r.label + (r.required ? " *" : "")} ${u(s, r)}
|
|
42
|
+
${e ? b(s, r) : t}
|
|
43
|
+
</span>` : t, u = (s, r) => r.hint ? l`<div class="gui-widget-hint" id=${`${s}_hint`}>${r.hint}</div>` : l``, E = (s, r) => {
|
|
44
|
+
const e = {
|
|
45
|
+
[`gui-${s}--icon`]: !1,
|
|
46
|
+
[`gui-${s}--icon-right`]: !1
|
|
47
|
+
};
|
|
48
|
+
if (r.icon) {
|
|
49
|
+
e[`gui-${s}--icon`] = !0;
|
|
50
|
+
const o = {
|
|
51
|
+
"gui-widget-icon": !0,
|
|
52
|
+
[r.icon]: !0
|
|
53
|
+
};
|
|
54
|
+
return {
|
|
55
|
+
widgetClasses: e,
|
|
56
|
+
html: l`<span class=${y(o)} data-icon=${r.icon}></span>`
|
|
57
|
+
};
|
|
58
|
+
} else
|
|
59
|
+
return { widgetClasses: e, html: l`` };
|
|
60
|
+
}, b = (s, r) => {
|
|
61
|
+
const e = r.touched && r.errors && r.errors.length > 0;
|
|
62
|
+
return l`${e ? l`<ul class="gui-validator" id=${`${s}_errors`} data-cy=${`${s}_validator-errors`}>
|
|
63
|
+
${r.errors?.map(
|
|
64
|
+
(o) => l`<li class="gui-validator__error" role="alert" data-cy=${`${s}_validator-error`}>
|
|
65
|
+
${o}
|
|
66
|
+
</li>`
|
|
67
|
+
)}
|
|
68
|
+
</ul>` : ""}`;
|
|
69
|
+
};
|
|
70
|
+
export {
|
|
71
|
+
T as G,
|
|
72
|
+
E as a,
|
|
73
|
+
q as b,
|
|
74
|
+
b as c
|
|
75
|
+
};
|
package/Accordion-Btp_b0xA.js
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { jsx as o, jsxs as g } from "react/jsx-runtime";
|
|
2
|
-
import { useLayoutWidget as v, WidgetRenderer as b } from "@golemui/react";
|
|
3
|
-
import { useState as x, useEffect as y, useCallback as d } from "react";
|
|
4
|
-
const f = {};
|
|
5
|
-
function C(h) {
|
|
6
|
-
const m = h.widget, { uid: p, children: r, templateData: n, onChange: a } = v(m), [t, s] = x(f);
|
|
7
|
-
y(() => {
|
|
8
|
-
t === f && n.defaultOpen && s(n.defaultOpen || {});
|
|
9
|
-
}, [t, n]);
|
|
10
|
-
const l = d(
|
|
11
|
-
(i) => {
|
|
12
|
-
const e = { ...t };
|
|
13
|
-
n.singleOpen && Object.keys(e).filter((c) => c !== i).forEach((c) => {
|
|
14
|
-
e[c] = c === i ? !e[c] : !1;
|
|
15
|
-
}), e[i] = !e[i], s(e), a(e);
|
|
16
|
-
},
|
|
17
|
-
[t, n.singleOpen, a]
|
|
18
|
-
), u = d(
|
|
19
|
-
(i) => {
|
|
20
|
-
const e = r.find(
|
|
21
|
-
(w) => w.uid === i
|
|
22
|
-
), c = t[i];
|
|
23
|
-
return (c || n.renderMode !== "activeOnly") && e ? /* @__PURE__ */ o(
|
|
24
|
-
"section",
|
|
25
|
-
{
|
|
26
|
-
className: "gui-widget",
|
|
27
|
-
role: "region",
|
|
28
|
-
id: `accordion_section_${i}`,
|
|
29
|
-
hidden: !c && n.renderMode !== "activeOnly",
|
|
30
|
-
"aria-labelledby": `accordion_button_${i}`,
|
|
31
|
-
children: /* @__PURE__ */ o(b, { widget: e })
|
|
32
|
-
}
|
|
33
|
-
) : null;
|
|
34
|
-
},
|
|
35
|
-
[r, t, n.renderMode]
|
|
36
|
-
), _ = d(() => (n.sections || []).map((e, c) => /* @__PURE__ */ g("div", { className: "gui-accordion__section", children: [
|
|
37
|
-
/* @__PURE__ */ g(
|
|
38
|
-
"button",
|
|
39
|
-
{
|
|
40
|
-
type: "button",
|
|
41
|
-
tabIndex: 0,
|
|
42
|
-
id: `accordion_button_${e.uid}`,
|
|
43
|
-
"aria-controls": `accordion_section_${e.uid}`,
|
|
44
|
-
"aria-expanded": t[e.uid] ? "true" : "false",
|
|
45
|
-
className: t[e.uid] ? "active" : "",
|
|
46
|
-
onClick: () => l(e.uid),
|
|
47
|
-
children: [
|
|
48
|
-
e.label,
|
|
49
|
-
/* @__PURE__ */ o("span", { className: "gui-accordion__arrow", children: /* @__PURE__ */ o("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 256 256", children: /* @__PURE__ */ o("path", { d: "M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z" }) }) })
|
|
50
|
-
]
|
|
51
|
-
}
|
|
52
|
-
),
|
|
53
|
-
u(e.uid)
|
|
54
|
-
] }, `${"accordion_section_" + e.uid}`)), [n.sections, t, u, l]);
|
|
55
|
-
return /* @__PURE__ */ o("div", { className: "gui-accordion gui-field", style: { flex: n.size }, children: /* @__PURE__ */ o("div", { className: "gui-widget", id: p, children: _() }) });
|
|
56
|
-
}
|
|
57
|
-
export {
|
|
58
|
-
C as Accordion
|
|
59
|
-
};
|
package/Alert-CBgIsMKO.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { useDisplayWdiget as r } from "@golemui/react";
|
|
3
|
-
function s(t) {
|
|
4
|
-
const l = t.widget, { uid: a, templateData: e } = r(l);
|
|
5
|
-
return /* @__PURE__ */ i("div", { className: "gui-alert gui-field", style: { flex: e.size }, children: /* @__PURE__ */ i("div", { className: "gui-widget", id: a, children: /* @__PURE__ */ i(
|
|
6
|
-
"div",
|
|
7
|
-
{
|
|
8
|
-
role: "alert",
|
|
9
|
-
className: `gui-alert-notification gui-alert-notification--${e.level || "default"}`,
|
|
10
|
-
children: e.text
|
|
11
|
-
}
|
|
12
|
-
) }) });
|
|
13
|
-
}
|
|
14
|
-
export {
|
|
15
|
-
s as Alert
|
|
16
|
-
};
|
package/Button-DN0G-MUb.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { useActionWidget as l } from "@golemui/react";
|
|
3
|
-
/* empty css */
|
|
4
|
-
function r(o) {
|
|
5
|
-
const n = o.widget, { uid: e, templateData: i, onClick: a } = l(n);
|
|
6
|
-
return /* @__PURE__ */ t("div", { className: "gui-button gui-field", style: { flex: i.size }, children: /* @__PURE__ */ t(
|
|
7
|
-
"gui-button",
|
|
8
|
-
{
|
|
9
|
-
uid: e,
|
|
10
|
-
label: i.label,
|
|
11
|
-
disabled: i.disabled,
|
|
12
|
-
variant: i.variant,
|
|
13
|
-
icon: i.icon,
|
|
14
|
-
iconPosition: i.iconPosition,
|
|
15
|
-
onClick: a
|
|
16
|
-
}
|
|
17
|
-
) });
|
|
18
|
-
}
|
|
19
|
-
export {
|
|
20
|
-
r as Button
|
|
21
|
-
};
|
package/Checkbox-ViM9MktI.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { useInputWidget as f } from "@golemui/react";
|
|
3
|
-
import { useCallback as k } from "react";
|
|
4
|
-
/* empty css */
|
|
5
|
-
function w(t) {
|
|
6
|
-
const n = t.widget, { uid: a, errors: s, value: l, onValueChanged: o, onBlur: c, templateData: e, isTouched: d } = f(n), r = k(
|
|
7
|
-
(p) => o(p.nativeEvent.detail.value),
|
|
8
|
-
[o]
|
|
9
|
-
), u = e.label, h = e.hint, b = e.checkboxPosition, g = e.disabled, m = e.readonly, x = e.validator?.required;
|
|
10
|
-
return /* @__PURE__ */ i("div", { className: "gui-checkbox gui-field", style: { flex: e.size }, children: /* @__PURE__ */ i(
|
|
11
|
-
"gui-checkbox",
|
|
12
|
-
{
|
|
13
|
-
uid: a,
|
|
14
|
-
label: u,
|
|
15
|
-
errors: s,
|
|
16
|
-
touched: d,
|
|
17
|
-
required: x,
|
|
18
|
-
disabled: g,
|
|
19
|
-
readOnly: m,
|
|
20
|
-
value: l,
|
|
21
|
-
hint: h,
|
|
22
|
-
checkboxPosition: b,
|
|
23
|
-
onChange: r,
|
|
24
|
-
onBlur: c
|
|
25
|
-
}
|
|
26
|
-
) });
|
|
27
|
-
}
|
|
28
|
-
export {
|
|
29
|
-
w as Checkbox
|
|
30
|
-
};
|
package/Currency-C4QFWO7Y.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { useInputWidget as I } from "@golemui/react";
|
|
3
|
-
import { useCallback as w } from "react";
|
|
4
|
-
/* empty css */
|
|
5
|
-
function B(o) {
|
|
6
|
-
const n = o.widget, { uid: c, errors: a, value: r, isTouched: l, templateData: e, onValueChanged: t, onBlur: s } = I(n), u = w(
|
|
7
|
-
(q) => t(q.nativeEvent.detail.value),
|
|
8
|
-
[t]
|
|
9
|
-
), d = e.label, m = e.hint, p = e.placeholder, g = e.currency, h = e.step, y = e.maximumFractionDigits, v = e.minimumFractionDigits, b = e.autocomplete, f = e.icon, D = e.disabled, x = e.readonly, C = e.validator?.required, F = e.lang;
|
|
10
|
-
return /* @__PURE__ */ i("div", { className: "gui-currency gui-field", style: { flex: e.size }, children: /* @__PURE__ */ i(
|
|
11
|
-
"gui-currency",
|
|
12
|
-
{
|
|
13
|
-
uid: c,
|
|
14
|
-
label: d,
|
|
15
|
-
hint: m,
|
|
16
|
-
errors: a,
|
|
17
|
-
touched: l,
|
|
18
|
-
required: C,
|
|
19
|
-
disabled: D,
|
|
20
|
-
readOnly: x,
|
|
21
|
-
value: r,
|
|
22
|
-
currency: g,
|
|
23
|
-
step: h,
|
|
24
|
-
maximumFractionDigits: y,
|
|
25
|
-
minimumFractionDigits: v,
|
|
26
|
-
icon: f,
|
|
27
|
-
autocomplete: b ?? void 0,
|
|
28
|
-
placeholder: p ?? void 0,
|
|
29
|
-
localeId: F,
|
|
30
|
-
onInput: u,
|
|
31
|
-
onBlur: s
|
|
32
|
-
}
|
|
33
|
-
) });
|
|
34
|
-
}
|
|
35
|
-
export {
|
|
36
|
-
B as Currency
|
|
37
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
function a({
|
|
3
|
-
template: i,
|
|
4
|
-
selected: e,
|
|
5
|
-
disabled: t,
|
|
6
|
-
focused: s
|
|
7
|
-
}) {
|
|
8
|
-
const l = [
|
|
9
|
-
"gui-list__item",
|
|
10
|
-
t ? "gui-list__item-disabled" : "",
|
|
11
|
-
e ? "gui-list__item-selected" : "",
|
|
12
|
-
s ? "gui-list__item-focused" : ""
|
|
13
|
-
].filter(Boolean).join(" ");
|
|
14
|
-
return /* @__PURE__ */ o("div", { role: "option", className: l, "aria-selected": e, children: i });
|
|
15
|
-
}
|
|
16
|
-
export {
|
|
17
|
-
a as D
|
|
18
|
-
};
|
package/Flex-gD893rrB.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { useLayoutWidget as a, WidgetRenderer as c } from "@golemui/react";
|
|
3
|
-
import { useCallback as f } from "react";
|
|
4
|
-
/* empty css */
|
|
5
|
-
function $(l) {
|
|
6
|
-
const n = l.widget, { uid: d, children: i, templateData: e } = a(n), s = f(() => i ? i.map((r) => /* @__PURE__ */ t(c, { widget: r }, r.uid)) : null, [i]), g = `gui-flex__widget--${e.direction ?? "column"}`, u = `gui-flex__widget--justify-${e.justify ?? "stretch"}`, o = `gui-flex__widget--align-${e.align ?? "start"}`;
|
|
7
|
-
return /* @__PURE__ */ t("div", { className: "gui-flex gui-field", style: { flex: e.size }, children: /* @__PURE__ */ t(
|
|
8
|
-
"div",
|
|
9
|
-
{
|
|
10
|
-
className: `gui-flex__widget ${g} ${u} ${o}`,
|
|
11
|
-
style: e.gap ? { gap: `${e.gap}px` } : {},
|
|
12
|
-
id: d,
|
|
13
|
-
children: s()
|
|
14
|
-
}
|
|
15
|
-
) });
|
|
16
|
-
}
|
|
17
|
-
export {
|
|
18
|
-
$ as Flex
|
|
19
|
-
};
|
package/Markdown-Ck_88HOR.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { useInputWidget as P } from "@golemui/react";
|
|
3
|
-
import { useCallback as R } from "react";
|
|
4
|
-
/* empty css */
|
|
5
|
-
function N(o) {
|
|
6
|
-
const l = o.widget, { uid: n, errors: s, value: d, isTouched: r, templateData: e, onValueChanged: t, onBlur: a } = P(l), c = R(
|
|
7
|
-
(I) => t(I.nativeEvent.detail.value),
|
|
8
|
-
[t]
|
|
9
|
-
), u = e.label, m = e.hint, h = e.placeholder, p = e.autocomplete, T = e.validator?.maxLength, g = e.counterMode, w = e.autoGrow, v = e.minimumHeight, b = e.tools, f = e.defaultOpenPreview, k = e.headingTitle, L = e.boldTitle, q = e.italicTitle, x = e.strikethroughTitle, y = e.quoteTitle, C = e.linkTitle, M = e.orderedListTitle, O = e.unorderedListTitle, V = e.splitViewTitle, D = e.disabled, G = e.readonly, H = e.validator?.required;
|
|
10
|
-
return /* @__PURE__ */ i("div", { className: "gui-markdown gui-field", style: { flex: e.size }, children: /* @__PURE__ */ i(
|
|
11
|
-
"gui-markdown",
|
|
12
|
-
{
|
|
13
|
-
uid: n,
|
|
14
|
-
label: u,
|
|
15
|
-
errors: s,
|
|
16
|
-
touched: r,
|
|
17
|
-
required: H,
|
|
18
|
-
disabled: D,
|
|
19
|
-
readOnly: G,
|
|
20
|
-
value: d,
|
|
21
|
-
hint: m,
|
|
22
|
-
placeholder: h,
|
|
23
|
-
autocomplete: p ?? void 0,
|
|
24
|
-
counterMode: g,
|
|
25
|
-
minimumHeight: v,
|
|
26
|
-
autoGrow: w,
|
|
27
|
-
maxLength: T,
|
|
28
|
-
tools: b,
|
|
29
|
-
defaultOpenPreview: f,
|
|
30
|
-
headingTitle: k,
|
|
31
|
-
boldTitle: L,
|
|
32
|
-
italicTitle: q,
|
|
33
|
-
strikethroughTitle: x,
|
|
34
|
-
quoteTitle: y,
|
|
35
|
-
linkTitle: C,
|
|
36
|
-
orderedListTitle: M,
|
|
37
|
-
unorderedListTitle: O,
|
|
38
|
-
splitViewTitle: V,
|
|
39
|
-
dependencies: e.deps,
|
|
40
|
-
onInput: c,
|
|
41
|
-
onBlur: a
|
|
42
|
-
}
|
|
43
|
-
) });
|
|
44
|
-
}
|
|
45
|
-
export {
|
|
46
|
-
N as Markdown
|
|
47
|
-
};
|
package/MarkdownText-kJVkmihW.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { useDisplayWdiget as n } from "@golemui/react";
|
|
3
|
-
function m(t) {
|
|
4
|
-
const d = t.widget, { uid: s, templateData: e } = n(d);
|
|
5
|
-
return /* @__PURE__ */ i("div", { className: "gui-markdown-text gui-field", style: { flex: e.size }, children: /* @__PURE__ */ i("div", { className: "gui-widget", id: s, children: /* @__PURE__ */ i("gui-markdown-text", { md: e.md, dependencies: e.deps }) }) });
|
|
6
|
-
}
|
|
7
|
-
export {
|
|
8
|
-
m as MarkdownText
|
|
9
|
-
};
|
package/Number-CnQ95aLO.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { useInputWidget as C } from "@golemui/react";
|
|
3
|
-
import { useCallback as I } from "react";
|
|
4
|
-
/* empty css */
|
|
5
|
-
function j(i) {
|
|
6
|
-
const n = i.widget, { uid: a, errors: l, value: u, isTouched: r, templateData: e, onValueChanged: t, onBlur: s } = C(n), d = I(
|
|
7
|
-
(q) => t(q.nativeEvent.detail.value),
|
|
8
|
-
[t]
|
|
9
|
-
), m = e.label, c = e.hint, p = e.placeholder, h = e.step, b = e.minimum, g = e.maximum, v = e.autocomplete, f = e.autoGrow, x = e.disabled, w = e.readonly, y = e.validator?.required;
|
|
10
|
-
return /* @__PURE__ */ o("div", { className: "gui-number gui-field", style: { flex: e.size }, children: /* @__PURE__ */ o(
|
|
11
|
-
"gui-number",
|
|
12
|
-
{
|
|
13
|
-
uid: a,
|
|
14
|
-
label: m,
|
|
15
|
-
hint: c,
|
|
16
|
-
errors: l,
|
|
17
|
-
touched: r,
|
|
18
|
-
required: y,
|
|
19
|
-
disabled: x,
|
|
20
|
-
readOnly: w,
|
|
21
|
-
value: u,
|
|
22
|
-
step: h,
|
|
23
|
-
minimum: b,
|
|
24
|
-
maximum: g,
|
|
25
|
-
autoGrow: f,
|
|
26
|
-
autocomplete: v ?? void 0,
|
|
27
|
-
placeholder: p ?? void 0,
|
|
28
|
-
onInput: d,
|
|
29
|
-
onBlur: s
|
|
30
|
-
}
|
|
31
|
-
) });
|
|
32
|
-
}
|
|
33
|
-
export {
|
|
34
|
-
j as NumberInput
|
|
35
|
-
};
|
package/Password-Bg97DYW3.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { useInputWidget as q } from "@golemui/react";
|
|
3
|
-
import { useCallback as x } from "react";
|
|
4
|
-
/* empty css */
|
|
5
|
-
function k(a) {
|
|
6
|
-
const d = a.widget, { uid: t, errors: n, value: i, isTouched: l, templateData: o, onValueChanged: e, onBlur: r } = q(d), c = x(
|
|
7
|
-
(L) => e(L.nativeEvent.detail.value),
|
|
8
|
-
[e]
|
|
9
|
-
), u = o.label, h = o.hint, w = o.placeholder, p = o.autocomplete, m = o.showPasswordIcon, b = o.hidePasswordIcon, P = o.showPasswordLabel, g = o.hidePasswordLabel, v = o.icon, f = o.disabled, I = o.readonly, y = o.validator?.required;
|
|
10
|
-
return /* @__PURE__ */ s("div", { className: "gui-password gui-field", style: { flex: o.size }, children: /* @__PURE__ */ s(
|
|
11
|
-
"gui-password",
|
|
12
|
-
{
|
|
13
|
-
uid: t,
|
|
14
|
-
label: u,
|
|
15
|
-
hint: h,
|
|
16
|
-
errors: n,
|
|
17
|
-
touched: l,
|
|
18
|
-
required: y,
|
|
19
|
-
disabled: f,
|
|
20
|
-
readOnly: I,
|
|
21
|
-
value: i,
|
|
22
|
-
icon: v,
|
|
23
|
-
placeholder: w ?? void 0,
|
|
24
|
-
autocomplete: p ?? void 0,
|
|
25
|
-
showPasswordIcon: m,
|
|
26
|
-
hidePasswordIcon: b,
|
|
27
|
-
showPasswordLabel: P,
|
|
28
|
-
hidePasswordLabel: g,
|
|
29
|
-
onInput: c,
|
|
30
|
-
onBlur: r
|
|
31
|
-
}
|
|
32
|
-
) });
|
|
33
|
-
}
|
|
34
|
-
export {
|
|
35
|
-
k as Password
|
|
36
|
-
};
|
package/RadioGroup-Dldom5ja.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { useInputWidget as F } from "@golemui/react";
|
|
3
|
-
import { useCallback as q } from "react";
|
|
4
|
-
/* empty css */
|
|
5
|
-
function j(t) {
|
|
6
|
-
const l = t.widget, { uid: n, errors: a, value: d, isTouched: r, templateData: e, onValueChanged: i, onBlur: s } = F(l), u = q(
|
|
7
|
-
(C) => i(C.nativeEvent.detail.value),
|
|
8
|
-
[i]
|
|
9
|
-
), c = e.label, p = e.hint, g = e.options, h = e.labelField, m = e.valueField, b = e.direction, v = e.disabled, f = e.readonly, y = e.validator?.required;
|
|
10
|
-
return /* @__PURE__ */ o("div", { className: "gui-radiogroup gui-field", style: { flex: e.size }, children: /* @__PURE__ */ o(
|
|
11
|
-
"gui-radiogroup",
|
|
12
|
-
{
|
|
13
|
-
uid: n,
|
|
14
|
-
label: c,
|
|
15
|
-
errors: a,
|
|
16
|
-
touched: r,
|
|
17
|
-
required: y,
|
|
18
|
-
disabled: v,
|
|
19
|
-
readOnly: f,
|
|
20
|
-
value: d,
|
|
21
|
-
hint: p,
|
|
22
|
-
options: g,
|
|
23
|
-
labelField: h,
|
|
24
|
-
valueField: m,
|
|
25
|
-
direction: b,
|
|
26
|
-
onChange: u,
|
|
27
|
-
onBlur: s
|
|
28
|
-
}
|
|
29
|
-
) });
|
|
30
|
-
}
|
|
31
|
-
export {
|
|
32
|
-
j as RadioGroup
|
|
33
|
-
};
|
package/Repeater-BYgXVfbl.js
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import { jsx as n, jsxs as a } from "react/jsx-runtime";
|
|
2
|
-
import { getItemKey as C } from "@golemui/gui-shared";
|
|
3
|
-
import { useInputWidget as y, useRepeaterIndexes as F, RepeaterIndexesContext as k, WidgetRenderer as q } from "@golemui/react";
|
|
4
|
-
import { useRef as O, useCallback as u, useState as P } from "react";
|
|
5
|
-
/* empty css */
|
|
6
|
-
let S = 0;
|
|
7
|
-
const W = () => S++;
|
|
8
|
-
function z(I) {
|
|
9
|
-
const f = I.widget, { uid: o, value: i, onValueChanged: s, templateData: e, errors: c, isTouched: l, onBlur: v } = y(f), m = O(null), _ = u(
|
|
10
|
-
(t) => {
|
|
11
|
-
const r = [...t ?? [], {}];
|
|
12
|
-
s(r);
|
|
13
|
-
},
|
|
14
|
-
[s]
|
|
15
|
-
), g = u(
|
|
16
|
-
(t, r) => {
|
|
17
|
-
const d = (t ?? []).filter((j, B) => r !== B);
|
|
18
|
-
"structuredClone" in window ? s(structuredClone(d)) : s(JSON.parse(JSON.stringify(d)));
|
|
19
|
-
},
|
|
20
|
-
[s]
|
|
21
|
-
), [h, p] = P(!1), N = u((t) => {
|
|
22
|
-
t.stopPropagation(), p(!0);
|
|
23
|
-
}, []), x = u((t) => {
|
|
24
|
-
t.stopPropagation(), v(), p(!1);
|
|
25
|
-
}, []), b = F(), w = u(() => i?.map((t, r) => {
|
|
26
|
-
const d = C(t, W);
|
|
27
|
-
return /* @__PURE__ */ n(
|
|
28
|
-
k.Provider,
|
|
29
|
-
{
|
|
30
|
-
value: [...b, r],
|
|
31
|
-
children: /* @__PURE__ */ a("div", { className: "gui-repeater__card", children: [
|
|
32
|
-
/* @__PURE__ */ a("div", { className: "gui-repeater__card-header", children: [
|
|
33
|
-
e.title && /* @__PURE__ */ n("span", { className: "gui-repeater__card-title", children: `${e.title} ${r + 1}` }),
|
|
34
|
-
/* @__PURE__ */ a(
|
|
35
|
-
"button",
|
|
36
|
-
{
|
|
37
|
-
type: "button",
|
|
38
|
-
tabIndex: 0,
|
|
39
|
-
className: "gui-button gui-button--sm gui-repeater__remove-btn",
|
|
40
|
-
onClick: () => g(i, r),
|
|
41
|
-
children: [
|
|
42
|
-
e.removeButtonIcon && /* @__PURE__ */ n(
|
|
43
|
-
"span",
|
|
44
|
-
{
|
|
45
|
-
className: `gui-widget-icon gui-button-icon ${e.removeButtonIcon}`,
|
|
46
|
-
"data-icon": e.removeButtonIcon
|
|
47
|
-
}
|
|
48
|
-
),
|
|
49
|
-
e.removeLabel ?? "Remove"
|
|
50
|
-
]
|
|
51
|
-
}
|
|
52
|
-
)
|
|
53
|
-
] }),
|
|
54
|
-
/* @__PURE__ */ n(q, { widget: e.template }, `${o}-${d}`)
|
|
55
|
-
] })
|
|
56
|
-
},
|
|
57
|
-
`${o}-${d}`
|
|
58
|
-
);
|
|
59
|
-
}), [e, i, o, g, b]), R = e.validator?.required, $ = l && c && c.length > 0;
|
|
60
|
-
return /* @__PURE__ */ a("div", { className: "gui-repeater gui-field", style: { flex: e.size }, children: [
|
|
61
|
-
/* @__PURE__ */ a(
|
|
62
|
-
"div",
|
|
63
|
-
{
|
|
64
|
-
ref: m,
|
|
65
|
-
id: o,
|
|
66
|
-
className: `gui-repeater__main-card gui-repeater__card${h ? " gui-repeater__card--focused" : ""}`,
|
|
67
|
-
onFocus: N,
|
|
68
|
-
onBlur: x,
|
|
69
|
-
children: [
|
|
70
|
-
/* @__PURE__ */ n(
|
|
71
|
-
"gui-label",
|
|
72
|
-
{
|
|
73
|
-
targetElement: m.current || void 0,
|
|
74
|
-
uid: o,
|
|
75
|
-
label: e.label,
|
|
76
|
-
errors: c,
|
|
77
|
-
touched: l,
|
|
78
|
-
required: R,
|
|
79
|
-
native: !1
|
|
80
|
-
}
|
|
81
|
-
),
|
|
82
|
-
w(),
|
|
83
|
-
/* @__PURE__ */ a(
|
|
84
|
-
"button",
|
|
85
|
-
{
|
|
86
|
-
type: "button",
|
|
87
|
-
tabIndex: 0,
|
|
88
|
-
className: "gui-button gui-repeater__add-btn",
|
|
89
|
-
onClick: () => _(i || []),
|
|
90
|
-
disabled: e.limit ? e.limit === (i?.length ?? 0) : !1,
|
|
91
|
-
children: [
|
|
92
|
-
e.addButtonIcon && /* @__PURE__ */ n(
|
|
93
|
-
"span",
|
|
94
|
-
{
|
|
95
|
-
className: `gui-widget-icon gui-button-icon ${e.addButtonIcon}`,
|
|
96
|
-
"data-icon": e.addButtonIcon
|
|
97
|
-
}
|
|
98
|
-
),
|
|
99
|
-
e.addLabel ?? "Add"
|
|
100
|
-
]
|
|
101
|
-
}
|
|
102
|
-
)
|
|
103
|
-
]
|
|
104
|
-
}
|
|
105
|
-
),
|
|
106
|
-
$ && /* @__PURE__ */ n("gui-errors", { uid: o, errors: c, touched: l })
|
|
107
|
-
] });
|
|
108
|
-
}
|
|
109
|
-
export {
|
|
110
|
-
z as Repeater
|
|
111
|
-
};
|
package/Select-BLUX_W91.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { useInputWidget as I } from "@golemui/react";
|
|
3
|
-
import { useCallback as s } from "react";
|
|
4
|
-
/* empty css */
|
|
5
|
-
function B(r) {
|
|
6
|
-
const d = r.widget, {
|
|
7
|
-
uid: c,
|
|
8
|
-
errors: u,
|
|
9
|
-
value: p,
|
|
10
|
-
isTouched: m,
|
|
11
|
-
templateData: e,
|
|
12
|
-
onValueChanged: o,
|
|
13
|
-
onBlur: h,
|
|
14
|
-
injectValidationIssues: n
|
|
15
|
-
} = I(d), v = s(
|
|
16
|
-
(t) => o(t.nativeEvent.detail.value),
|
|
17
|
-
[o]
|
|
18
|
-
), g = s(
|
|
19
|
-
(t) => {
|
|
20
|
-
const i = t, l = (D) => {
|
|
21
|
-
n([D.detail.message]);
|
|
22
|
-
};
|
|
23
|
-
return t && i.addEventListener("inputError", l), () => {
|
|
24
|
-
i.removeEventListener("inputError", l);
|
|
25
|
-
};
|
|
26
|
-
},
|
|
27
|
-
[n]
|
|
28
|
-
), f = e.options, b = e.label, E = e.hint, y = e.placeholder, C = e.autocomplete, F = e.icon, q = e.valueField, x = e.labelField, R = e.disabled, j = e.readonly, w = e.validator?.required;
|
|
29
|
-
return /* @__PURE__ */ a("div", { className: "gui-select gui-field", style: { flex: e.size }, children: /* @__PURE__ */ a(
|
|
30
|
-
"gui-select",
|
|
31
|
-
{
|
|
32
|
-
ref: g,
|
|
33
|
-
uid: c,
|
|
34
|
-
label: b,
|
|
35
|
-
errors: u,
|
|
36
|
-
touched: m,
|
|
37
|
-
required: w,
|
|
38
|
-
disabled: R,
|
|
39
|
-
readOnly: j,
|
|
40
|
-
value: p,
|
|
41
|
-
hint: E,
|
|
42
|
-
placeholder: y,
|
|
43
|
-
autocomplete: C ?? void 0,
|
|
44
|
-
icon: F,
|
|
45
|
-
options: f,
|
|
46
|
-
labelField: x,
|
|
47
|
-
valueField: q,
|
|
48
|
-
onChange: v,
|
|
49
|
-
onBlur: h
|
|
50
|
-
}
|
|
51
|
-
) });
|
|
52
|
-
}
|
|
53
|
-
export {
|
|
54
|
-
B as Select
|
|
55
|
-
};
|
package/TextArea-cw3Q2v97.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { useInputWidget as C } from "@golemui/react";
|
|
3
|
-
import { useCallback as D } from "react";
|
|
4
|
-
/* empty css */
|
|
5
|
-
function M(a) {
|
|
6
|
-
const i = a.widget, { uid: n, errors: l, value: r, isTouched: d, templateData: e, onValueChanged: t, onBlur: s } = C(i), u = D(
|
|
7
|
-
(q) => t(q.nativeEvent.detail.value),
|
|
8
|
-
[t]
|
|
9
|
-
), c = e.label, m = e.hint, h = e.placeholder, p = e.validator?.maxLength, g = e.counterMode, v = e.autocomplete, x = e.autoGrow, b = e.minimumHeight, f = e.disabled, w = e.readonly, y = e.validator?.required;
|
|
10
|
-
return /* @__PURE__ */ o("div", { className: "gui-textarea gui-field", style: { flex: e.size }, children: /* @__PURE__ */ o(
|
|
11
|
-
"gui-textarea",
|
|
12
|
-
{
|
|
13
|
-
uid: n,
|
|
14
|
-
label: c,
|
|
15
|
-
errors: l,
|
|
16
|
-
touched: d,
|
|
17
|
-
required: y,
|
|
18
|
-
disabled: f,
|
|
19
|
-
readOnly: w,
|
|
20
|
-
value: r,
|
|
21
|
-
hint: m,
|
|
22
|
-
placeholder: h,
|
|
23
|
-
autocomplete: v ?? void 0,
|
|
24
|
-
counterMode: g,
|
|
25
|
-
minimumHeight: b,
|
|
26
|
-
autoGrow: x,
|
|
27
|
-
maxLength: p,
|
|
28
|
-
onInput: u,
|
|
29
|
-
onBlur: s
|
|
30
|
-
}
|
|
31
|
-
) });
|
|
32
|
-
}
|
|
33
|
-
export {
|
|
34
|
-
M as TextArea
|
|
35
|
-
};
|
package/TextInput-geLoAA0c.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { useInputWidget as y } from "@golemui/react";
|
|
3
|
-
import { useCallback as q } from "react";
|
|
4
|
-
/* empty css */
|
|
5
|
-
function R(i) {
|
|
6
|
-
const n = i.widget, { uid: l, errors: a, value: d, isTouched: r, templateData: e, onValueChanged: t, onBlur: s } = y(n), c = q(
|
|
7
|
-
(x) => t(x.nativeEvent.detail.value),
|
|
8
|
-
[t]
|
|
9
|
-
), u = e.label, p = e.hint, m = e.placeholder, h = e.autocomplete, g = e.icon, v = e.disabled, b = e.readonly, f = e.validator?.required;
|
|
10
|
-
return /* @__PURE__ */ o("div", { className: "gui-textinput gui-field", style: { flex: e.size }, children: /* @__PURE__ */ o(
|
|
11
|
-
"gui-textinput",
|
|
12
|
-
{
|
|
13
|
-
uid: l,
|
|
14
|
-
label: u,
|
|
15
|
-
hint: p,
|
|
16
|
-
errors: a,
|
|
17
|
-
touched: r,
|
|
18
|
-
required: f,
|
|
19
|
-
disabled: v,
|
|
20
|
-
readOnly: b,
|
|
21
|
-
value: d,
|
|
22
|
-
icon: g,
|
|
23
|
-
placeholder: m ?? void 0,
|
|
24
|
-
autocomplete: h ?? void 0,
|
|
25
|
-
onInput: c,
|
|
26
|
-
onBlur: s
|
|
27
|
-
}
|
|
28
|
-
) });
|
|
29
|
-
}
|
|
30
|
-
export {
|
|
31
|
-
R as TextInput
|
|
32
|
-
};
|