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.
Files changed (198) hide show
  1. package/lib/alerts/AlertContainer.js +8 -2
  2. package/lib/alerts/AlertProvider.js +10 -4
  3. package/lib/alerts/BaseAlert.js +3 -1
  4. package/lib/alerts/Message.js +91 -64
  5. package/lib/alerts/withAlert.js +10 -6
  6. package/lib/avatar/index.js +20 -42
  7. package/lib/badge/index.js +25 -23
  8. package/lib/buttons/ActivateButton.js +9 -4
  9. package/lib/buttons/AddButton.js +12 -5
  10. package/lib/buttons/Button.js +16 -5
  11. package/lib/buttons/ButtonGroups.js +10 -3
  12. package/lib/buttons/CancelButton.js +14 -4
  13. package/lib/buttons/DangerButton.js +15 -4
  14. package/lib/buttons/DefaultButton.js +25 -59
  15. package/lib/buttons/DestroyButton.js +21 -5
  16. package/lib/buttons/EditButton.js +9 -4
  17. package/lib/buttons/InactivateButton.js +9 -4
  18. package/lib/buttons/InfoButton.js +15 -4
  19. package/lib/buttons/PrimaryButton.js +15 -4
  20. package/lib/buttons/RestoreButton.js +9 -4
  21. package/lib/buttons/SaveButton.js +14 -4
  22. package/lib/buttons/SuccessButton.js +15 -4
  23. package/lib/buttons/WarningButton.js +15 -4
  24. package/lib/buttons/button_container/index.js +21 -16
  25. package/lib/buttons/split_button/index.js +53 -55
  26. package/lib/calendar/DangerCalendar.js +18 -4
  27. package/lib/calendar/InfoCalendar.js +18 -4
  28. package/lib/calendar/PrimaryCalendar.js +18 -4
  29. package/lib/calendar/SuccessCalendar.js +18 -4
  30. package/lib/calendar/WarningCalendar.js +18 -4
  31. package/lib/calendar/base/Day.js +32 -22
  32. package/lib/calendar/base/Month.js +24 -21
  33. package/lib/calendar/base/Week.js +20 -19
  34. package/lib/calendar/base/helpers.js +1 -9
  35. package/lib/calendar/base/index.js +129 -95
  36. package/lib/checkbox/index.js +5 -4
  37. package/lib/chunks/compiler-runtime.Cu50tn6L.js +54 -0
  38. package/lib/chunks/index.aw0XaUkg.js +266 -0
  39. package/lib/chunks/{jsx-runtime.C7wFtzyj.js → jsx-runtime.D1SHvdVE.js} +106 -108
  40. package/lib/chunks/tabs.BvKfeA6Y.js +244 -0
  41. package/lib/dialog/Alert.js +18 -17
  42. package/lib/dialog/Custom.js +42 -28
  43. package/lib/dialog/Error.js +18 -17
  44. package/lib/dialog/Information.js +18 -17
  45. package/lib/dialog/Question.js +41 -54
  46. package/lib/dialog/Warning.js +18 -17
  47. package/lib/dialog/base/Content.js +13 -4
  48. package/lib/dialog/base/Footer.js +8 -3
  49. package/lib/dialog/base/Header.js +4 -3
  50. package/lib/dialog/base/index.js +5 -4
  51. package/lib/dialog/form/index.js +5 -4
  52. package/lib/dialog/index.js +1 -1
  53. package/lib/dialog/wizard/index.js +10 -9
  54. package/lib/dialog/wizard/progressbar.js +89 -80
  55. package/lib/dialog/wizard/step.js +4 -3
  56. package/lib/dialog/wizard/useWizard.js +42 -29
  57. package/lib/drawer/Content.js +15 -8
  58. package/lib/drawer/Drawer.js +25 -22
  59. package/lib/drawer/Header.js +53 -40
  60. package/lib/dropdown/Popup.js +3 -1
  61. package/lib/dropdown/withDropdown.js +75 -50
  62. package/lib/fieldset/index.js +66 -47
  63. package/lib/form/Field.js +88 -62
  64. package/lib/form/FieldArray.js +17 -38
  65. package/lib/form/FieldNumber.js +40 -36
  66. package/lib/form/FieldPeriod.js +90 -59
  67. package/lib/form/helpers.js +4 -1
  68. package/lib/form/index.js +55 -67
  69. package/lib/form/withFieldHOC.js +57 -48
  70. package/lib/form/withFormSecurity.js +6 -9
  71. package/lib/gridlayout/GridCol.js +21 -20
  72. package/lib/gridlayout/GridRow.js +22 -20
  73. package/lib/hint/helpers.js +6 -2
  74. package/lib/hint/index.js +27 -25
  75. package/lib/icons/helper.js +142 -569
  76. package/lib/icons/index.js +63 -55
  77. package/lib/index.js +20 -19
  78. package/lib/inputs/base/InputTextBase.js +62 -146
  79. package/lib/inputs/base/Label.js +27 -29
  80. package/lib/inputs/base/helpers.js +3 -1
  81. package/lib/inputs/color/index.js +52 -73
  82. package/lib/inputs/date/Dialog.js +15 -16
  83. package/lib/inputs/date/Dropdown.js +7 -1
  84. package/lib/inputs/date/index.js +60 -94
  85. package/lib/inputs/errorMessage/index.js +21 -13
  86. package/lib/inputs/file/DefaultFile.js +64 -66
  87. package/lib/inputs/file/DragDropFile.js +39 -93
  88. package/lib/inputs/file/File.js +8 -22
  89. package/lib/inputs/file/FileButtonSettings.js +20 -17
  90. package/lib/inputs/inputHOC.js +38 -20
  91. package/lib/inputs/mask/BaseMask.js +44 -23
  92. package/lib/inputs/mask/Cnpj.js +42 -36
  93. package/lib/inputs/mask/Cpf.js +45 -33
  94. package/lib/inputs/mask/Phone.js +10 -6
  95. package/lib/inputs/mask/ZipCode.js +9 -4
  96. package/lib/inputs/multiSelect/ActionButtons.js +35 -46
  97. package/lib/inputs/multiSelect/Dropdown.js +93 -131
  98. package/lib/inputs/multiSelect/index.js +167 -125
  99. package/lib/inputs/number/BaseNumber.js +43 -31
  100. package/lib/inputs/number/Currency.js +19 -12
  101. package/lib/inputs/number/Decimal.js +9 -4
  102. package/lib/inputs/number/index.js +31 -35
  103. package/lib/inputs/period/Dialog.js +16 -16
  104. package/lib/inputs/period/Dropdown.js +6 -1
  105. package/lib/inputs/period/PeriodList.js +41 -27
  106. package/lib/inputs/period/helper.js +5 -1
  107. package/lib/inputs/period/index.js +118 -240
  108. package/lib/inputs/search/index.js +95 -71
  109. package/lib/inputs/select/ActionButtons.js +24 -45
  110. package/lib/inputs/select/Dropdown.js +38 -87
  111. package/lib/inputs/select/helper.js +6 -2
  112. package/lib/inputs/select/index.js +23 -25
  113. package/lib/inputs/select/multiple/Selecteds.js +23 -19
  114. package/lib/inputs/select/multiple/index.js +35 -101
  115. package/lib/inputs/select/simple/index.js +26 -89
  116. package/lib/inputs/text/index.js +9 -4
  117. package/lib/inputs/textarea/index.js +13 -15
  118. package/lib/internals/withTooltip.js +114 -67
  119. package/lib/labelMessages/index.js +50 -45
  120. package/lib/labels/DangerLabel.js +18 -4
  121. package/lib/labels/DefaultLabel.js +53 -39
  122. package/lib/labels/InfoLabel.js +18 -4
  123. package/lib/labels/PrimaryLabel.js +18 -4
  124. package/lib/labels/SuccessLabel.js +18 -4
  125. package/lib/labels/WarningLabel.js +18 -4
  126. package/lib/labels/label_container/index.js +15 -9
  127. package/lib/list/Header.js +18 -6
  128. package/lib/list/Item.js +4 -3
  129. package/lib/list/Separator.js +8 -3
  130. package/lib/list/index.js +21 -18
  131. package/lib/menus/float/MenuItem.js +48 -51
  132. package/lib/menus/float/index.js +102 -81
  133. package/lib/menus/sidenav/ExpandMenu.js +17 -15
  134. package/lib/menus/sidenav/MenuLink.js +21 -14
  135. package/lib/menus/sidenav/NavMenuGroup.js +19 -14
  136. package/lib/menus/sidenav/NavMenuItem.js +131 -109
  137. package/lib/menus/sidenav/NavSubMenuItem.js +36 -20
  138. package/lib/menus/sidenav/index.js +145 -123
  139. package/lib/menus/sidenav/popup_menu_search/EmptyList.js +21 -17
  140. package/lib/menus/sidenav/popup_menu_search/index.js +17 -51
  141. package/lib/noPermission/index.js +13 -8
  142. package/lib/panel/Content.js +48 -38
  143. package/lib/panel/DangerPanel.js +10 -5
  144. package/lib/panel/Default.js +62 -36
  145. package/lib/panel/Header.js +53 -37
  146. package/lib/panel/InfoPanel.js +10 -5
  147. package/lib/panel/PrimaryPanel.js +10 -5
  148. package/lib/panel/SuccessPanel.js +10 -5
  149. package/lib/panel/ToolBar.js +17 -4
  150. package/lib/panel/WarningPanel.js +10 -5
  151. package/lib/panel/helpers.js +4 -1
  152. package/lib/permissionValidations.js +5 -1
  153. package/lib/popover/PopoverText.js +12 -5
  154. package/lib/popover/PopoverTitle.js +10 -3
  155. package/lib/popover/index.js +36 -56
  156. package/lib/progress/Bar.js +43 -34
  157. package/lib/progress/index.js +23 -18
  158. package/lib/radio/index.js +105 -89
  159. package/lib/shortcuts/index.js +20 -7
  160. package/lib/skeleton/SkeletonContainer.js +16 -6
  161. package/lib/skeleton/index.js +42 -18
  162. package/lib/spinner/SpinnerLoading.js +53 -16
  163. package/lib/spinner/index.js +47 -37
  164. package/lib/split/Split.js +83 -79
  165. package/lib/split/SplitSide.js +24 -16
  166. package/lib/table/Body.js +36 -49
  167. package/lib/table/Header.js +45 -32
  168. package/lib/table/HeaderColumn.js +40 -27
  169. package/lib/table/Row.js +47 -48
  170. package/lib/table/RowColumn.js +50 -38
  171. package/lib/table/helpers.js +3 -1
  172. package/lib/table/index.js +101 -104
  173. package/lib/tabs/DropdownTabs.js +64 -61
  174. package/lib/tabs/Menu.js +35 -49
  175. package/lib/tabs/MenuTabs.js +59 -84
  176. package/lib/tabs/Panel.js +57 -46
  177. package/lib/tabs/context.js +11 -11
  178. package/lib/tabs/index.js +69 -64
  179. package/lib/tabs/tabHelpers.js +9 -7
  180. package/lib/textContent/index.js +30 -32
  181. package/lib/toolbar/ButtonBar.js +62 -58
  182. package/lib/toolbar/LabelBar.js +46 -38
  183. package/lib/toolbar/Separator.js +8 -3
  184. package/lib/toolbar/ToolBarGroup.js +14 -3
  185. package/lib/toolbar/index.js +35 -29
  186. package/lib/tooltip/index.js +1 -1
  187. package/lib/treetable/Body.js +25 -26
  188. package/lib/treetable/Header.js +22 -18
  189. package/lib/treetable/Row.js +210 -147
  190. package/lib/treetable/helpers.js +6 -14
  191. package/lib/treetable/index.js +25 -15
  192. package/lib/treeview/Header.js +13 -5
  193. package/lib/treeview/Node.js +198 -175
  194. package/lib/treeview/index.js +257 -174
  195. package/lib/uitour/index.js +167 -166
  196. package/package.json +11 -10
  197. package/lib/chunks/index.CM1aLH2W.js +0 -205
  198. package/lib/chunks/tabs.D0L_nVfP.js +0 -245
@@ -1,32 +1,45 @@
1
- import i, { useState as f } from "react";
2
- const l = () => {
3
- const [s, p] = f(0), [t, S] = i.useState(1), o = t < s, n = t > 1, e = (a) => {
4
- S((u) => u + a);
5
- }, r = () => {
6
- o && e(1);
7
- }, c = () => {
8
- n && e(-1);
9
- };
10
- return {
11
- changeStep: e,
12
- nextStep: r,
13
- hasNextStep: o,
14
- previousStep: c,
15
- hasPreviousStep: n,
16
- currentStep: t,
17
- totalSteps: s,
18
- controls: {
19
- changeStep: e,
20
- nextStep: r,
21
- hasNextStep: o,
22
- previousStep: c,
23
- hasPreviousStep: n,
24
- currentStep: t,
25
- totalSteps: s,
26
- setTotalSteps: p
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
- l as useWizard
44
+ g as useWizard
32
45
  };
@@ -1,11 +1,18 @@
1
- import { j as o } from "../chunks/jsx-runtime.C7wFtzyj.js";
2
- import { useContext as s } from "react";
3
- import m from "./helpers.js";
4
- import n from "../noPermission/index.js";
5
- const d = ({ children: t, style: r }) => {
6
- const { hideContent: e } = s(m);
7
- return e ? /* @__PURE__ */ o.jsx(n, {}) : /* @__PURE__ */ o.jsx("div", { className: "drawerbody", style: r, children: t });
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
- d as default
17
+ j as default
11
18
  };
@@ -1,6 +1,6 @@
1
- import { j as n } from "../chunks/jsx-runtime.C7wFtzyj.js";
2
- import { useRef as f, useState as R, useEffect as v, Suspense as M } from "react";
3
- import _ from "react-dom";
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 = { ...S, title: u }, s = f(document.createElement("div"));
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), { hideContent: O } = V, [P] = R(q([O], N)), B = p ? { opacity: 0.4, pointerEvent: "none", placeContent: "center" } : {}, g = () => p ? /* @__PURE__ */ n.jsx("div", { className: "waitingspinner", children: /* @__PURE__ */ n.jsx(F, { style: { width: 60 }, delayTime: 0 }) }) : null, k = (e, r) => {
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
- }, T = (e) => {
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 && k(e, r), D && !o && e && T(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
- }, L = () => /* @__PURE__ */ n.jsx(H.Provider, { value: $, children: /* @__PURE__ */ n.jsx("div", { "data-testid": "drawercontainer-component", className: `${w} ${C}`, style: E, children: /* @__PURE__ */ n.jsxs(
56
- "div",
57
- {
58
- style: B,
59
- "data-testid": "drawercontent",
60
- className: `drawercontent ${c ? "-skeletonized" : ""} ${x}`,
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
@@ -1,43 +1,56 @@
1
- import { j as e } from "../chunks/jsx-runtime.C7wFtzyj.js";
2
- import { useContext as p, Fragment as t } from "react";
3
- import h from "../icons/index.js";
4
- import N from "./helpers.js";
5
- const b = (r) => /* @__PURE__ */ e.jsx(
6
- "span",
7
- {
8
- "data-testid": "header-closebutton",
9
- className: "closebutton",
10
- onClick: r,
11
- role: "button",
12
- tabIndex: 0,
13
- children: /* @__PURE__ */ e.jsx(h, { name: "cancel2" })
14
- }
15
- ), o = (r, s) => r || s ? /* @__PURE__ */ e.jsx("span", { "data-testid": "icon-header", className: "icon-header", children: s || r && /* @__PURE__ */ e.jsx(h, { name: r, color: "#000", size: 24 }) }) : /* @__PURE__ */ e.jsx("noscript", {}), k = ({
16
- showCloseButton: r = !0,
17
- title: s,
18
- subTitle: a,
19
- icon: n,
20
- titleIcon: d,
21
- customClass: m,
22
- titleContent: c,
23
- subTitleContent: l,
24
- titleRightContent: x
25
- }) => {
26
- const { handlerClose: i } = p(N), u = () => c ? /* @__PURE__ */ e.jsx(t, { children: c }) : /* @__PURE__ */ e.jsxs(t, { children: [
27
- n ? o(d, n) : o(d, null),
28
- /* @__PURE__ */ e.jsx("h2", { className: "drawer-title", children: s }),
29
- x
30
- ] }), j = () => l ? /* @__PURE__ */ e.jsx(t, { children: l }) : a && /* @__PURE__ */ e.jsx("h3", { className: "drawer-subtitle", children: a }), f = () => i ? i() : void 0;
31
- return /* @__PURE__ */ e.jsxs("div", { className: `drawerheader ${m}`, "data-testid": "drawerheader", children: [
32
- /* @__PURE__ */ e.jsxs("div", { className: "left", children: [
33
- /* @__PURE__ */ e.jsx("div", { className: "title-subtitle", children: u() }),
34
- j()
35
- ] }),
36
- /* @__PURE__ */ e.jsx("div", { className: "right", children: r && b(() => {
37
- f();
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
- k as default
55
+ G as default
43
56
  };
@@ -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
- }, { body: g } = document, D = ({
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 r } from "../chunks/jsx-runtime.C7wFtzyj.js";
2
- import { createContext as L, useState as h, useRef as x, useEffect as O } from "react";
3
- import R from "./Popup.js";
4
- import '../assets/withDropdown.css';const A = L({}), M = (o) => o.displayName || o.name || "Component", b = (o) => {
5
- const u = (c) => {
6
- const {
7
- dropdownOpened: n,
8
- showDropdown: a,
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: w = !0,
11
- handlerClose: p,
12
- customClassForDropdown: v,
13
- children: C,
14
- dropdownAlign: j = "left",
15
- isFloatMenu: f,
16
- isDropdownOpened: P
17
- } = c, [l, t] = h(n), [k, E] = h(n), s = x(null), m = x(null);
18
- n !== k && (t(n), E(n));
19
- const D = (e) => {
20
- const { target: d } = e;
21
- s?.current && d !== s?.current && !e.composedPath().includes(s.current) && m.current !== d && t(!1);
22
- }, g = () => {
23
- t((e) => !e);
24
- }, N = (e) => !e || !l ? null : (m.current = e, /* @__PURE__ */ r.jsx(
25
- R,
26
- {
27
- targetRef: e,
28
- align: j,
29
- customClassForDropdown: v,
30
- isFloatMenu: f,
31
- children: /* @__PURE__ */ r.jsx("div", { className: f ? "items" : void 0, ref: (d) => {
32
- s.current = d;
33
- }, children: C })
34
- }
35
- ));
36
- O(() => (i && w && document.addEventListener("click", D), () => {
37
- i && w && document.removeEventListener("click", D);
38
- }), []), O(() => {
39
- p && p(() => t(!1));
40
- }, [p]);
41
- const y = {
42
- handleDropdownClose: g
43
- }, F = {
44
- getDropdownPopup: (e) => N(e),
45
- showDropdown: a || (() => t(!l)),
46
- isDropdownOpened: P || l
47
- };
48
- return i ? /* @__PURE__ */ r.jsx(A.Provider, { value: y, children: /* @__PURE__ */ r.jsx(o, { ...c, ...F }) }) : /* @__PURE__ */ r.jsx(o, { ...c });
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 u.displayName = `withDropdown(${M(o)})`, u;
72
+ return A.displayName = `withDropdown(${X(o)})`, A;
51
73
  };
74
+ function Y(o) {
75
+ return !o;
76
+ }
52
77
  export {
53
- A as WithDropdownContext,
54
- b as default
78
+ U as WithDropdownContext,
79
+ oe as default
55
80
  };
@@ -1,51 +1,70 @@
1
- import { j as e } from "../chunks/jsx-runtime.C7wFtzyj.js";
2
- import { useState as O, Fragment as D } from "react";
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 T from "../gridlayout/GridCol.js";
5
- import { actionsOnPermissionDenied as b, OPTIONS_ON_DENIED as v } from "../permissionValidations.js";
6
- import w from "../noPermission/index.js";
7
- const _ = (n) => {
8
- const {
9
- gridCols: r,
10
- children: c,
11
- title: o,
12
- titleAlign: d = "left",
13
- style: f,
14
- styleContent: u,
15
- styleTitle: C,
16
- template: l = "none",
17
- titleCustomClass: g,
18
- permissionAttr: p,
19
- leftElements: h = null,
20
- rightElements: j = null
21
- } = n, { hideContent: x, unvisible: $ } = v, [m] = O(b([x, $], p)), N = ({ type: s, customClass: i, hasError: E }) => {
22
- let t = `fieldset-component ${i}`;
23
- return s && (t = `${t} -${s}`), E && (t = `${t} -witherror`), t;
24
- }, y = ({ colsCount: s = 2, rowsCount: i = 2 }) => l === "rows" ? { gridTemplateRows: `repeat(${i}, 1fr)` } : l === "columns" ? { gridTemplateColumns: `repeat(${s}, 1fr)` } : {}, a = () => /* @__PURE__ */ e.jsx("fieldset", { style: f, className: N({ ...n }), children: m.hideContent ? /* @__PURE__ */ e.jsx(w, {}) : /* @__PURE__ */ e.jsxs(D, { children: [
25
- o && /* @__PURE__ */ e.jsxs(
26
- "legend",
27
- {
28
- style: C,
29
- align: d,
30
- className: `legend ${g}`,
31
- children: [
32
- h,
33
- o,
34
- j
35
- ]
36
- }
37
- ),
38
- /* @__PURE__ */ e.jsx(
39
- "div",
40
- {
41
- className: `contentfieldset -template${l} `,
42
- style: Object.assign(y(n), u),
43
- children: c
44
- }
45
- )
46
- ] }) });
47
- return m.unvisible ? null : r ? /* @__PURE__ */ e.jsx(T, { cols: r, children: a() }) : a();
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
- _ as default
69
+ V as default
51
70
  };