linear-react-components-ui 1.1.26-beta.6 → 1.1.26-beta.8
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/lib/alerts/AlertContainer.js +8 -2
- package/lib/alerts/AlertProvider.js +10 -4
- package/lib/alerts/BaseAlert.js +3 -1
- package/lib/alerts/Message.js +91 -64
- package/lib/alerts/withAlert.js +10 -6
- package/lib/avatar/index.js +20 -42
- package/lib/badge/index.js +25 -23
- package/lib/buttons/ActivateButton.js +9 -4
- package/lib/buttons/AddButton.js +12 -5
- package/lib/buttons/Button.js +16 -5
- package/lib/buttons/ButtonGroups.js +10 -3
- package/lib/buttons/CancelButton.js +14 -4
- package/lib/buttons/DangerButton.js +15 -4
- package/lib/buttons/DefaultButton.js +25 -59
- package/lib/buttons/DestroyButton.js +21 -5
- package/lib/buttons/EditButton.js +9 -4
- package/lib/buttons/InactivateButton.js +9 -4
- package/lib/buttons/InfoButton.js +15 -4
- package/lib/buttons/PrimaryButton.js +15 -4
- package/lib/buttons/RestoreButton.js +9 -4
- package/lib/buttons/SaveButton.js +14 -4
- package/lib/buttons/SuccessButton.js +15 -4
- package/lib/buttons/WarningButton.js +15 -4
- package/lib/buttons/button_container/index.js +21 -16
- package/lib/buttons/split_button/index.js +53 -55
- package/lib/calendar/DangerCalendar.js +18 -4
- package/lib/calendar/InfoCalendar.js +18 -4
- package/lib/calendar/PrimaryCalendar.js +18 -4
- package/lib/calendar/SuccessCalendar.js +18 -4
- package/lib/calendar/WarningCalendar.js +18 -4
- package/lib/calendar/base/Day.js +32 -22
- package/lib/calendar/base/Month.js +24 -21
- package/lib/calendar/base/Week.js +20 -19
- package/lib/calendar/base/helpers.js +1 -9
- package/lib/calendar/base/index.js +129 -95
- package/lib/checkbox/index.js +5 -4
- package/lib/chunks/compiler-runtime.Cu50tn6L.js +54 -0
- package/lib/chunks/index.aw0XaUkg.js +266 -0
- package/lib/chunks/{jsx-runtime.C7wFtzyj.js → jsx-runtime.D1SHvdVE.js} +106 -108
- package/lib/chunks/tabs.BvKfeA6Y.js +244 -0
- package/lib/dialog/Alert.js +18 -17
- package/lib/dialog/Custom.js +42 -28
- package/lib/dialog/Error.js +18 -17
- package/lib/dialog/Information.js +18 -17
- package/lib/dialog/Question.js +41 -54
- package/lib/dialog/Warning.js +18 -17
- package/lib/dialog/base/Content.js +13 -4
- package/lib/dialog/base/Footer.js +8 -3
- package/lib/dialog/base/Header.js +4 -3
- package/lib/dialog/base/index.js +5 -4
- package/lib/dialog/form/index.js +5 -4
- package/lib/dialog/index.js +1 -1
- package/lib/dialog/wizard/index.js +10 -9
- package/lib/dialog/wizard/progressbar.js +89 -80
- package/lib/dialog/wizard/step.js +4 -3
- package/lib/dialog/wizard/useWizard.js +42 -29
- package/lib/drawer/Content.js +15 -8
- package/lib/drawer/Drawer.js +25 -22
- package/lib/drawer/Header.js +53 -40
- package/lib/dropdown/Popup.js +3 -1
- package/lib/dropdown/withDropdown.js +75 -50
- package/lib/fieldset/index.js +66 -47
- package/lib/form/Field.js +88 -62
- package/lib/form/FieldArray.js +17 -38
- package/lib/form/FieldNumber.js +40 -36
- package/lib/form/FieldPeriod.js +90 -59
- package/lib/form/helpers.js +4 -1
- package/lib/form/index.js +55 -67
- package/lib/form/withFieldHOC.js +57 -48
- package/lib/form/withFormSecurity.js +6 -9
- package/lib/gridlayout/GridCol.js +21 -20
- package/lib/gridlayout/GridRow.js +22 -20
- package/lib/hint/helpers.js +6 -2
- package/lib/hint/index.js +27 -25
- package/lib/icons/helper.js +142 -569
- package/lib/icons/index.js +63 -55
- package/lib/index.js +20 -19
- package/lib/inputs/base/InputTextBase.js +62 -146
- package/lib/inputs/base/Label.js +27 -29
- package/lib/inputs/base/helpers.js +3 -1
- package/lib/inputs/color/index.js +52 -73
- package/lib/inputs/date/Dialog.js +15 -16
- package/lib/inputs/date/Dropdown.js +7 -1
- package/lib/inputs/date/index.js +60 -94
- package/lib/inputs/errorMessage/index.js +21 -13
- package/lib/inputs/file/DefaultFile.js +64 -66
- package/lib/inputs/file/DragDropFile.js +39 -93
- package/lib/inputs/file/File.js +8 -22
- package/lib/inputs/file/FileButtonSettings.js +20 -17
- package/lib/inputs/inputHOC.js +38 -20
- package/lib/inputs/mask/BaseMask.js +44 -23
- package/lib/inputs/mask/Cnpj.js +42 -36
- package/lib/inputs/mask/Cpf.js +45 -33
- package/lib/inputs/mask/Phone.js +10 -6
- package/lib/inputs/mask/ZipCode.js +9 -4
- package/lib/inputs/multiSelect/ActionButtons.js +35 -46
- package/lib/inputs/multiSelect/Dropdown.js +93 -131
- package/lib/inputs/multiSelect/index.js +167 -125
- package/lib/inputs/number/BaseNumber.js +43 -31
- package/lib/inputs/number/Currency.js +19 -12
- package/lib/inputs/number/Decimal.js +9 -4
- package/lib/inputs/number/index.js +31 -35
- package/lib/inputs/period/Dialog.js +16 -16
- package/lib/inputs/period/Dropdown.js +6 -1
- package/lib/inputs/period/PeriodList.js +41 -27
- package/lib/inputs/period/helper.js +5 -1
- package/lib/inputs/period/index.js +118 -240
- package/lib/inputs/search/index.js +95 -71
- package/lib/inputs/select/ActionButtons.js +24 -45
- package/lib/inputs/select/Dropdown.js +38 -87
- package/lib/inputs/select/helper.js +6 -2
- package/lib/inputs/select/index.js +23 -25
- package/lib/inputs/select/multiple/Selecteds.js +23 -19
- package/lib/inputs/select/multiple/index.js +35 -101
- package/lib/inputs/select/simple/index.js +26 -89
- package/lib/inputs/text/index.js +9 -4
- package/lib/inputs/textarea/index.js +13 -15
- package/lib/internals/withTooltip.js +114 -67
- package/lib/labelMessages/index.js +50 -45
- package/lib/labels/DangerLabel.js +18 -4
- package/lib/labels/DefaultLabel.js +53 -39
- package/lib/labels/InfoLabel.js +18 -4
- package/lib/labels/PrimaryLabel.js +18 -4
- package/lib/labels/SuccessLabel.js +18 -4
- package/lib/labels/WarningLabel.js +18 -4
- package/lib/labels/label_container/index.js +15 -9
- package/lib/list/Header.js +18 -6
- package/lib/list/Item.js +4 -3
- package/lib/list/Separator.js +8 -3
- package/lib/list/index.js +21 -18
- package/lib/menus/float/MenuItem.js +48 -51
- package/lib/menus/float/index.js +102 -81
- package/lib/menus/sidenav/ExpandMenu.js +17 -15
- package/lib/menus/sidenav/MenuLink.js +21 -14
- package/lib/menus/sidenav/NavMenuGroup.js +19 -14
- package/lib/menus/sidenav/NavMenuItem.js +131 -109
- package/lib/menus/sidenav/NavSubMenuItem.js +36 -20
- package/lib/menus/sidenav/index.js +145 -123
- package/lib/menus/sidenav/popup_menu_search/EmptyList.js +21 -17
- package/lib/menus/sidenav/popup_menu_search/index.js +17 -51
- package/lib/noPermission/index.js +13 -8
- package/lib/panel/Content.js +48 -38
- package/lib/panel/DangerPanel.js +10 -5
- package/lib/panel/Default.js +62 -36
- package/lib/panel/Header.js +53 -37
- package/lib/panel/InfoPanel.js +10 -5
- package/lib/panel/PrimaryPanel.js +10 -5
- package/lib/panel/SuccessPanel.js +10 -5
- package/lib/panel/ToolBar.js +17 -4
- package/lib/panel/WarningPanel.js +10 -5
- package/lib/panel/helpers.js +4 -1
- package/lib/permissionValidations.js +5 -1
- package/lib/popover/PopoverText.js +12 -5
- package/lib/popover/PopoverTitle.js +10 -3
- package/lib/popover/index.js +36 -56
- package/lib/progress/Bar.js +43 -34
- package/lib/progress/index.js +23 -18
- package/lib/radio/index.js +105 -89
- package/lib/shortcuts/index.js +20 -7
- package/lib/skeleton/SkeletonContainer.js +16 -6
- package/lib/skeleton/index.js +42 -18
- package/lib/spinner/SpinnerLoading.js +53 -16
- package/lib/spinner/index.js +47 -37
- package/lib/split/Split.js +83 -79
- package/lib/split/SplitSide.js +24 -16
- package/lib/table/Body.js +36 -49
- package/lib/table/Header.js +45 -32
- package/lib/table/HeaderColumn.js +40 -27
- package/lib/table/Row.js +47 -48
- package/lib/table/RowColumn.js +50 -38
- package/lib/table/helpers.js +3 -1
- package/lib/table/index.js +101 -104
- package/lib/tabs/DropdownTabs.js +64 -61
- package/lib/tabs/Menu.js +35 -49
- package/lib/tabs/MenuTabs.js +59 -84
- package/lib/tabs/Panel.js +57 -46
- package/lib/tabs/context.js +11 -11
- package/lib/tabs/index.js +69 -64
- package/lib/tabs/tabHelpers.js +9 -7
- package/lib/textContent/index.js +30 -32
- package/lib/toolbar/ButtonBar.js +62 -58
- package/lib/toolbar/LabelBar.js +46 -38
- package/lib/toolbar/Separator.js +8 -3
- package/lib/toolbar/ToolBarGroup.js +14 -3
- package/lib/toolbar/index.js +35 -29
- package/lib/tooltip/index.js +1 -1
- package/lib/treetable/Body.js +25 -26
- package/lib/treetable/Header.js +22 -18
- package/lib/treetable/Row.js +210 -147
- package/lib/treetable/helpers.js +6 -14
- package/lib/treetable/index.js +25 -15
- package/lib/treeview/Header.js +13 -5
- package/lib/treeview/Node.js +198 -175
- package/lib/treeview/index.js +257 -174
- package/lib/uitour/index.js +167 -166
- package/package.json +11 -10
- package/lib/chunks/index.CM1aLH2W.js +0 -205
- package/lib/chunks/tabs.D0L_nVfP.js +0 -245
|
@@ -1,32 +1,45 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
1
|
+
import { c as _ } from "../../chunks/compiler-runtime.Cu50tn6L.js";
|
|
2
|
+
import v, { useState as R } from "react";
|
|
3
|
+
const g = () => {
|
|
4
|
+
const t = _.c(20), [n, m] = R(0), [o, u] = v.useState(1), e = o < n, s = o > 1;
|
|
5
|
+
let l;
|
|
6
|
+
t[0] === Symbol.for("react.memo_cache_sentinel") ? (l = (x) => {
|
|
7
|
+
u((h) => h + x);
|
|
8
|
+
}, t[0] = l) : l = t[0];
|
|
9
|
+
const i = l;
|
|
10
|
+
let S;
|
|
11
|
+
t[1] !== e ? (S = () => {
|
|
12
|
+
e && i(1);
|
|
13
|
+
}, t[1] = e, t[2] = S) : S = t[2];
|
|
14
|
+
const c = S;
|
|
15
|
+
let a;
|
|
16
|
+
t[3] !== s ? (a = () => {
|
|
17
|
+
s && i(-1);
|
|
18
|
+
}, t[3] = s, t[4] = a) : a = t[4];
|
|
19
|
+
const r = a;
|
|
20
|
+
let p;
|
|
21
|
+
t[5] !== o || t[6] !== e || t[7] !== s || t[8] !== c || t[9] !== r || t[10] !== n ? (p = {
|
|
22
|
+
changeStep: i,
|
|
23
|
+
nextStep: c,
|
|
24
|
+
hasNextStep: e,
|
|
25
|
+
previousStep: r,
|
|
26
|
+
hasPreviousStep: s,
|
|
27
|
+
currentStep: o,
|
|
28
|
+
totalSteps: n,
|
|
29
|
+
setTotalSteps: m
|
|
30
|
+
}, t[5] = o, t[6] = e, t[7] = s, t[8] = c, t[9] = r, t[10] = n, t[11] = p) : p = t[11];
|
|
31
|
+
let f;
|
|
32
|
+
return t[12] !== o || t[13] !== e || t[14] !== s || t[15] !== c || t[16] !== r || t[17] !== p || t[18] !== n ? (f = {
|
|
33
|
+
changeStep: i,
|
|
34
|
+
nextStep: c,
|
|
35
|
+
hasNextStep: e,
|
|
36
|
+
previousStep: r,
|
|
37
|
+
hasPreviousStep: s,
|
|
38
|
+
currentStep: o,
|
|
39
|
+
totalSteps: n,
|
|
40
|
+
controls: p
|
|
41
|
+
}, t[12] = o, t[13] = e, t[14] = s, t[15] = c, t[16] = r, t[17] = p, t[18] = n, t[19] = f) : f = t[19], f;
|
|
29
42
|
};
|
|
30
43
|
export {
|
|
31
|
-
|
|
44
|
+
g as useWizard
|
|
32
45
|
};
|
package/lib/drawer/Content.js
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { j as m } from "../chunks/jsx-runtime.D1SHvdVE.js";
|
|
2
|
+
import { c as i } from "../chunks/compiler-runtime.Cu50tn6L.js";
|
|
3
|
+
import { useContext as c } from "react";
|
|
4
|
+
import p from "./helpers.js";
|
|
5
|
+
import a from "../noPermission/index.js";
|
|
6
|
+
const j = (n) => {
|
|
7
|
+
const t = i.c(4), {
|
|
8
|
+
children: r,
|
|
9
|
+
style: e
|
|
10
|
+
} = n, {
|
|
11
|
+
hideContent: s
|
|
12
|
+
} = c(p);
|
|
13
|
+
let o;
|
|
14
|
+
return t[0] !== r || t[1] !== s || t[2] !== e ? (o = s ? /* @__PURE__ */ m.jsx(a, {}) : /* @__PURE__ */ m.jsx("div", { className: "drawerbody", style: e, children: r }), t[0] = r, t[1] = s, t[2] = e, t[3] = o) : o = t[3], o;
|
|
8
15
|
};
|
|
9
16
|
export {
|
|
10
|
-
|
|
17
|
+
j as default
|
|
11
18
|
};
|
package/lib/drawer/Drawer.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { j as n } from "../chunks/jsx-runtime.
|
|
2
|
-
import { useRef as f, useState as
|
|
3
|
-
import
|
|
1
|
+
import { j as n } from "../chunks/jsx-runtime.D1SHvdVE.js";
|
|
2
|
+
import { useRef as f, useState as L, useEffect as v, Suspense as R } from "react";
|
|
3
|
+
import M from "react-dom";
|
|
4
4
|
import H from "./helpers.js";
|
|
5
5
|
import { OPTIONS_ON_DENIED as V, actionsOnPermissionDenied as q } from "../permissionValidations.js";
|
|
6
6
|
import z from "./Header.js";
|
|
@@ -25,12 +25,23 @@ import '../assets/Drawer.css';const W = ({
|
|
|
25
25
|
isWaiting: p = !1,
|
|
26
26
|
...S
|
|
27
27
|
}) => {
|
|
28
|
-
const b = {
|
|
28
|
+
const b = {
|
|
29
|
+
...S,
|
|
30
|
+
title: u
|
|
31
|
+
}, s = f(document.createElement("div"));
|
|
29
32
|
s.current.className = "drawercontainer";
|
|
30
|
-
const a = f(null), {
|
|
33
|
+
const a = f(null), {
|
|
34
|
+
hideContent: O
|
|
35
|
+
} = V, [P] = L(q([O], N)), B = p ? {
|
|
36
|
+
opacity: 0.4,
|
|
37
|
+
pointerEvent: "none",
|
|
38
|
+
placeContent: "center"
|
|
39
|
+
} : {}, _ = () => p ? /* @__PURE__ */ n.jsx("div", { className: "waitingspinner", children: /* @__PURE__ */ n.jsx(F, { style: {
|
|
40
|
+
width: 60
|
|
41
|
+
}, delayTime: 0 }) }) : null, g = (e, r) => {
|
|
31
42
|
const t = document.createElement("div");
|
|
32
43
|
t.className = "drawer-component", t.id = String(r), e.appendChild(t), t.appendChild(s.current), a.current = t;
|
|
33
|
-
},
|
|
44
|
+
}, k = (e) => {
|
|
34
45
|
const r = document.createElement("div");
|
|
35
46
|
r.className = "drawer-overlay", r.dataset.testid = "drawer-overlay", e.appendChild(r);
|
|
36
47
|
}, i = (e) => {
|
|
@@ -39,7 +50,7 @@ import '../assets/Drawer.css';const W = ({
|
|
|
39
50
|
v(() => {
|
|
40
51
|
let e;
|
|
41
52
|
const r = Math.round(+/* @__PURE__ */ new Date() / 1e3);
|
|
42
|
-
return o === void 0 ? e = document.getElementsByTagName("body")[0] : e = document.getElementById(o), e &&
|
|
53
|
+
return o === void 0 ? e = document.getElementsByTagName("body")[0] : e = document.getElementById(o), e && g(e, r), D && !o && e && k(e), () => {
|
|
43
54
|
const t = document.getElementsByClassName("drawer-overlay")[0];
|
|
44
55
|
if (d && document.body.removeEventListener("keydown", i), o) {
|
|
45
56
|
const y = document.getElementById(o);
|
|
@@ -48,24 +59,16 @@ import '../assets/Drawer.css';const W = ({
|
|
|
48
59
|
t && !o && e && e.removeChild(t);
|
|
49
60
|
};
|
|
50
61
|
}, []), v(() => (d && document.body.addEventListener("keydown", i), () => document.body.removeEventListener("keydown", i)), [d]);
|
|
51
|
-
const
|
|
62
|
+
const T = {
|
|
52
63
|
handlerClose: m,
|
|
53
64
|
hideContent: P.hideContent,
|
|
54
65
|
skeletonize: c
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
{
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
children: [
|
|
62
|
-
u && /* @__PURE__ */ n.jsx(z, { ...b, customClass: j }),
|
|
63
|
-
/* @__PURE__ */ n.jsx(M, { children: l ? /* @__PURE__ */ n.jsx(A, { children: l }) : h }),
|
|
64
|
-
g()
|
|
65
|
-
]
|
|
66
|
-
}
|
|
67
|
-
) }) });
|
|
68
|
-
return _.createPortal(L(), s.current);
|
|
66
|
+
}, $ = () => /* @__PURE__ */ n.jsx(H.Provider, { value: T, children: /* @__PURE__ */ n.jsx("div", { "data-testid": "drawercontainer-component", className: `${w} ${C}`, style: E, children: /* @__PURE__ */ n.jsxs("div", { style: B, "data-testid": "drawercontent", className: `drawercontent ${c ? "-skeletonized" : ""} ${x}`, children: [
|
|
67
|
+
u && /* @__PURE__ */ n.jsx(z, { ...b, customClass: j }),
|
|
68
|
+
/* @__PURE__ */ n.jsx(R, { children: l ? /* @__PURE__ */ n.jsx(A, { children: l }) : h }),
|
|
69
|
+
_()
|
|
70
|
+
] }) }) });
|
|
71
|
+
return M.createPortal($(), s.current);
|
|
69
72
|
};
|
|
70
73
|
export {
|
|
71
74
|
W as default
|
package/lib/drawer/Header.js
CHANGED
|
@@ -1,43 +1,56 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
{
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
})
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
1
|
+
import { j as t } from "../chunks/jsx-runtime.D1SHvdVE.js";
|
|
2
|
+
import { c as I } from "../chunks/compiler-runtime.Cu50tn6L.js";
|
|
3
|
+
import { useContext as $, Fragment as R } from "react";
|
|
4
|
+
import E from "../icons/index.js";
|
|
5
|
+
import z from "./helpers.js";
|
|
6
|
+
const D = (s) => /* @__PURE__ */ t.jsx("span", { "data-testid": "header-closebutton", className: "closebutton", onClick: s, role: "button", tabIndex: 0, children: /* @__PURE__ */ t.jsx(E, { name: "cancel2" }) }), k = (s, e) => s || e ? /* @__PURE__ */ t.jsx("span", { "data-testid": "icon-header", className: "icon-header", children: e || s && /* @__PURE__ */ t.jsx(E, { name: s, color: "#000", size: 24 }) }) : /* @__PURE__ */ t.jsx("noscript", {}), G = (s) => {
|
|
7
|
+
const e = I.c(27), {
|
|
8
|
+
showCloseButton: T,
|
|
9
|
+
title: C,
|
|
10
|
+
subTitle: a,
|
|
11
|
+
icon: c,
|
|
12
|
+
titleIcon: d,
|
|
13
|
+
customClass: H,
|
|
14
|
+
titleContent: m,
|
|
15
|
+
subTitleContent: u,
|
|
16
|
+
titleRightContent: b
|
|
17
|
+
} = s, N = T === void 0 ? !0 : T, {
|
|
18
|
+
handlerClose: h
|
|
19
|
+
} = $(z);
|
|
20
|
+
let x;
|
|
21
|
+
e[0] !== c || e[1] !== C || e[2] !== m || e[3] !== d || e[4] !== b ? (x = () => m ? /* @__PURE__ */ t.jsx(R, { children: m }) : /* @__PURE__ */ t.jsxs(R, { children: [
|
|
22
|
+
c ? k(d, c) : k(d, null),
|
|
23
|
+
/* @__PURE__ */ t.jsx("h2", { className: "drawer-title", children: C }),
|
|
24
|
+
b
|
|
25
|
+
] }), e[0] = c, e[1] = C, e[2] = m, e[3] = d, e[4] = b, e[5] = x) : x = e[5];
|
|
26
|
+
const w = x;
|
|
27
|
+
let f;
|
|
28
|
+
e[6] !== a || e[7] !== u ? (f = () => u ? /* @__PURE__ */ t.jsx(R, { children: u }) : a && /* @__PURE__ */ t.jsx("h3", { className: "drawer-subtitle", children: a }), e[6] = a, e[7] = u, e[8] = f) : f = e[8];
|
|
29
|
+
const v = f;
|
|
30
|
+
let j;
|
|
31
|
+
e[9] !== h ? (j = () => h ? h() : void 0, e[9] = h, e[10] = j) : j = e[10];
|
|
32
|
+
const g = j, B = `drawerheader ${H}`;
|
|
33
|
+
let r;
|
|
34
|
+
e[11] !== w ? (r = /* @__PURE__ */ t.jsx("div", { className: "title-subtitle", children: w() }), e[11] = w, e[12] = r) : r = e[12];
|
|
35
|
+
let l;
|
|
36
|
+
e[13] !== v ? (l = v(), e[13] = v, e[14] = l) : l = e[14];
|
|
37
|
+
let n;
|
|
38
|
+
e[15] !== r || e[16] !== l ? (n = /* @__PURE__ */ t.jsxs("div", { className: "left", children: [
|
|
39
|
+
r,
|
|
40
|
+
l
|
|
41
|
+
] }), e[15] = r, e[16] = l, e[17] = n) : n = e[17];
|
|
42
|
+
let i;
|
|
43
|
+
e[18] !== g || e[19] !== N ? (i = N && D(() => {
|
|
44
|
+
g();
|
|
45
|
+
}), e[18] = g, e[19] = N, e[20] = i) : i = e[20];
|
|
46
|
+
let o;
|
|
47
|
+
e[21] !== i ? (o = /* @__PURE__ */ t.jsx("div", { className: "right", children: i }), e[21] = i, e[22] = o) : o = e[22];
|
|
48
|
+
let p;
|
|
49
|
+
return e[23] !== o || e[24] !== B || e[25] !== n ? (p = /* @__PURE__ */ t.jsxs("div", { className: B, "data-testid": "drawerheader", children: [
|
|
50
|
+
n,
|
|
51
|
+
o
|
|
52
|
+
] }), e[23] = o, e[24] = B, e[25] = n, e[26] = p) : p = e[26], p;
|
|
40
53
|
};
|
|
41
54
|
export {
|
|
42
|
-
|
|
55
|
+
G as default
|
|
43
56
|
};
|
package/lib/dropdown/Popup.js
CHANGED
|
@@ -17,7 +17,9 @@ const y = ({
|
|
|
17
17
|
}
|
|
18
18
|
let l = `top: ${n}px; min-width: ${c}px;`;
|
|
19
19
|
return o && (l += `max-height: ${t}px; overflow-y: scroll;`), s === "left" ? l += `left: ${p}px;` : s === "right" && (l += `right: ${a}px;`), l;
|
|
20
|
-
}, {
|
|
20
|
+
}, {
|
|
21
|
+
body: g
|
|
22
|
+
} = document, D = ({
|
|
21
23
|
id: s,
|
|
22
24
|
customClassForDropdown: r = "",
|
|
23
25
|
align: c = "left",
|
|
@@ -1,55 +1,80 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { j as f } from "../chunks/jsx-runtime.D1SHvdVE.js";
|
|
2
|
+
import { c as K } from "../chunks/compiler-runtime.Cu50tn6L.js";
|
|
3
|
+
import { createContext as Q, useState as V, useRef as q, useEffect as z } from "react";
|
|
4
|
+
import T from "./Popup.js";
|
|
5
|
+
import '../assets/withDropdown.css';const U = Q({}), X = (o) => o.displayName || o.name || "Component", oe = (o) => {
|
|
6
|
+
const A = (n) => {
|
|
7
|
+
const e = K.c(30), {
|
|
8
|
+
dropdownOpened: c,
|
|
9
|
+
showDropdown: m,
|
|
9
10
|
dropdown: i,
|
|
10
|
-
closeDropdownOnClickOutside:
|
|
11
|
-
handlerClose:
|
|
12
|
-
customClassForDropdown:
|
|
13
|
-
children:
|
|
14
|
-
dropdownAlign:
|
|
15
|
-
isFloatMenu:
|
|
16
|
-
isDropdownOpened:
|
|
17
|
-
} =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
));
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}, [
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
11
|
+
closeDropdownOnClickOutside: F,
|
|
12
|
+
handlerClose: d,
|
|
13
|
+
customClassForDropdown: P,
|
|
14
|
+
children: g,
|
|
15
|
+
dropdownAlign: L,
|
|
16
|
+
isFloatMenu: p,
|
|
17
|
+
isDropdownOpened: B
|
|
18
|
+
} = n, a = F === void 0 ? !0 : F, S = L === void 0 ? "left" : L, [s, u] = V(c), [G, H] = V(c), w = q(null), $ = q(null);
|
|
19
|
+
c !== G && (u(c), H(c));
|
|
20
|
+
let h;
|
|
21
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (h = (t) => {
|
|
22
|
+
const {
|
|
23
|
+
target: E
|
|
24
|
+
} = t;
|
|
25
|
+
w?.current && E !== w?.current && !t.composedPath().includes(w.current) && $.current !== E && u(!1);
|
|
26
|
+
}, e[0] = h) : h = e[0];
|
|
27
|
+
const M = h;
|
|
28
|
+
let D;
|
|
29
|
+
e[1] === Symbol.for("react.memo_cache_sentinel") ? (D = () => {
|
|
30
|
+
u(Y);
|
|
31
|
+
}, e[1] = D) : D = e[1];
|
|
32
|
+
const I = D;
|
|
33
|
+
let x;
|
|
34
|
+
e[2] !== g || e[3] !== P || e[4] !== S || e[5] !== p || e[6] !== s ? (x = (t) => !t || !s ? null : ($.current = t, /* @__PURE__ */ f.jsx(T, { targetRef: t, align: S, customClassForDropdown: P, isFloatMenu: p, children: /* @__PURE__ */ f.jsx("div", { className: p ? "items" : void 0, ref: (E) => {
|
|
35
|
+
w.current = E;
|
|
36
|
+
}, children: g }) })), e[2] = g, e[3] = P, e[4] = S, e[5] = p, e[6] = s, e[7] = x) : x = e[7];
|
|
37
|
+
const b = x;
|
|
38
|
+
let O;
|
|
39
|
+
e[8] !== a || e[9] !== i ? (O = () => (i && a && document.addEventListener("click", M), () => {
|
|
40
|
+
i && a && document.removeEventListener("click", M);
|
|
41
|
+
}), e[8] = a, e[9] = i, e[10] = O) : O = e[10];
|
|
42
|
+
let v;
|
|
43
|
+
e[11] === Symbol.for("react.memo_cache_sentinel") ? (v = [], e[11] = v) : v = e[11], z(O, v);
|
|
44
|
+
let C, _;
|
|
45
|
+
e[12] !== d ? (C = () => {
|
|
46
|
+
d && d(() => u(!1));
|
|
47
|
+
}, _ = [d], e[12] = d, e[13] = C, e[14] = _) : (C = e[13], _ = e[14]), z(C, _);
|
|
48
|
+
let j;
|
|
49
|
+
e[15] === Symbol.for("react.memo_cache_sentinel") ? (j = {
|
|
50
|
+
handleDropdownClose: I
|
|
51
|
+
}, e[15] = j) : j = e[15];
|
|
52
|
+
const J = j;
|
|
53
|
+
let r;
|
|
54
|
+
e[16] !== b ? (r = (t) => b(t), e[16] = b, e[17] = r) : r = e[17];
|
|
55
|
+
let l;
|
|
56
|
+
e[18] !== s || e[19] !== m ? (l = m || (() => u(!s)), e[18] = s, e[19] = m, e[20] = l) : l = e[20];
|
|
57
|
+
const N = B || s;
|
|
58
|
+
let y;
|
|
59
|
+
e[21] !== r || e[22] !== l || e[23] !== N ? (y = {
|
|
60
|
+
getDropdownPopup: r,
|
|
61
|
+
showDropdown: l,
|
|
62
|
+
isDropdownOpened: N
|
|
63
|
+
}, e[21] = r, e[22] = l, e[23] = N, e[24] = y) : y = e[24];
|
|
64
|
+
const R = y;
|
|
65
|
+
if (!i) {
|
|
66
|
+
let t;
|
|
67
|
+
return e[25] !== n ? (t = /* @__PURE__ */ f.jsx(o, { ...n }), e[25] = n, e[26] = t) : t = e[26], t;
|
|
68
|
+
}
|
|
69
|
+
let k;
|
|
70
|
+
return e[27] !== R || e[28] !== n ? (k = /* @__PURE__ */ f.jsx(U.Provider, { value: J, children: /* @__PURE__ */ f.jsx(o, { ...n, ...R }) }), e[27] = R, e[28] = n, e[29] = k) : k = e[29], k;
|
|
49
71
|
};
|
|
50
|
-
return
|
|
72
|
+
return A.displayName = `withDropdown(${X(o)})`, A;
|
|
51
73
|
};
|
|
74
|
+
function Y(o) {
|
|
75
|
+
return !o;
|
|
76
|
+
}
|
|
52
77
|
export {
|
|
53
|
-
|
|
54
|
-
|
|
78
|
+
U as WithDropdownContext,
|
|
79
|
+
oe as default
|
|
55
80
|
};
|
package/lib/fieldset/index.js
CHANGED
|
@@ -1,51 +1,70 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
1
|
+
import { j as l } from "../chunks/jsx-runtime.D1SHvdVE.js";
|
|
2
|
+
import { c as _ } from "../chunks/compiler-runtime.Cu50tn6L.js";
|
|
3
|
+
import { useState as F, Fragment as I } from "react";
|
|
3
4
|
import '../assets/gridlayout.css';import '../assets/index12.css';/* empty css */
|
|
4
|
-
import
|
|
5
|
-
import { actionsOnPermissionDenied as
|
|
6
|
-
import
|
|
7
|
-
const
|
|
8
|
-
const {
|
|
9
|
-
gridCols:
|
|
10
|
-
children:
|
|
11
|
-
title:
|
|
12
|
-
titleAlign:
|
|
13
|
-
style:
|
|
14
|
-
styleContent:
|
|
15
|
-
styleTitle:
|
|
16
|
-
template:
|
|
17
|
-
titleCustomClass:
|
|
18
|
-
permissionAttr:
|
|
19
|
-
leftElements:
|
|
20
|
-
rightElements:
|
|
21
|
-
} =
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
5
|
+
import G from "../gridlayout/GridCol.js";
|
|
6
|
+
import { actionsOnPermissionDenied as k, OPTIONS_ON_DENIED as q } from "../permissionValidations.js";
|
|
7
|
+
import z from "../noPermission/index.js";
|
|
8
|
+
const V = (s) => {
|
|
9
|
+
const t = _.c(21), {
|
|
10
|
+
gridCols: o,
|
|
11
|
+
children: i,
|
|
12
|
+
title: e,
|
|
13
|
+
titleAlign: $,
|
|
14
|
+
style: u,
|
|
15
|
+
styleContent: C,
|
|
16
|
+
styleTitle: g,
|
|
17
|
+
template: y,
|
|
18
|
+
titleCustomClass: p,
|
|
19
|
+
permissionAttr: h,
|
|
20
|
+
leftElements: N,
|
|
21
|
+
rightElements: w
|
|
22
|
+
} = s, x = $ === void 0 ? "left" : $, n = y === void 0 ? "none" : y, j = N === void 0 ? null : N, v = w === void 0 ? null : w, {
|
|
23
|
+
hideContent: T,
|
|
24
|
+
unvisible: b
|
|
25
|
+
} = q;
|
|
26
|
+
let r;
|
|
27
|
+
t[0] !== h ? (r = k([T, b], h), t[0] = h, t[1] = r) : r = t[1];
|
|
28
|
+
const [c] = F(r), A = B;
|
|
29
|
+
let m;
|
|
30
|
+
t[2] !== n ? (m = (P) => {
|
|
31
|
+
const {
|
|
32
|
+
colsCount: O,
|
|
33
|
+
rowsCount: D
|
|
34
|
+
} = P, R = O === void 0 ? 2 : O, S = D === void 0 ? 2 : D;
|
|
35
|
+
return n === "rows" ? {
|
|
36
|
+
gridTemplateRows: `repeat(${S}, 1fr)`
|
|
37
|
+
} : n === "columns" ? {
|
|
38
|
+
gridTemplateColumns: `repeat(${R}, 1fr)`
|
|
39
|
+
} : {};
|
|
40
|
+
}, t[2] = n, t[3] = m) : m = t[3];
|
|
41
|
+
const E = m;
|
|
42
|
+
let d;
|
|
43
|
+
t[4] !== i || t[5] !== E || t[6] !== j || t[7] !== c.hideContent || t[8] !== s || t[9] !== v || t[10] !== u || t[11] !== C || t[12] !== g || t[13] !== n || t[14] !== e || t[15] !== x || t[16] !== p ? (d = () => /* @__PURE__ */ l.jsx("fieldset", { style: u, className: A({
|
|
44
|
+
...s
|
|
45
|
+
}), children: c.hideContent ? /* @__PURE__ */ l.jsx(z, {}) : /* @__PURE__ */ l.jsxs(I, { children: [
|
|
46
|
+
e && /* @__PURE__ */ l.jsxs("legend", { style: g, align: x, className: `legend ${p}`, children: [
|
|
47
|
+
j,
|
|
48
|
+
e,
|
|
49
|
+
v
|
|
50
|
+
] }),
|
|
51
|
+
/* @__PURE__ */ l.jsx("div", { className: `contentfieldset -template${n} `, style: Object.assign(E(s), C), children: i })
|
|
52
|
+
] }) }), t[4] = i, t[5] = E, t[6] = j, t[7] = c.hideContent, t[8] = s, t[9] = v, t[10] = u, t[11] = C, t[12] = g, t[13] = n, t[14] = e, t[15] = x, t[16] = p, t[17] = d) : d = t[17];
|
|
53
|
+
const a = d;
|
|
54
|
+
if (c.unvisible)
|
|
55
|
+
return null;
|
|
56
|
+
let f;
|
|
57
|
+
return t[18] !== o || t[19] !== a ? (f = o ? /* @__PURE__ */ l.jsx(G, { cols: o, children: a() }) : a(), t[18] = o, t[19] = a, t[20] = f) : f = t[20], f;
|
|
48
58
|
};
|
|
59
|
+
function B(s) {
|
|
60
|
+
const {
|
|
61
|
+
type: t,
|
|
62
|
+
customClass: o,
|
|
63
|
+
hasError: i
|
|
64
|
+
} = s;
|
|
65
|
+
let e = `fieldset-component ${o}`;
|
|
66
|
+
return t && (e = `${e} -${t}`), i && (e = `${e} -witherror`), e;
|
|
67
|
+
}
|
|
49
68
|
export {
|
|
50
|
-
|
|
69
|
+
V as default
|
|
51
70
|
};
|