linear-react-components-ui 1.1.26-beta.5 → 1.1.26-beta.6

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 (211) hide show
  1. package/lib/alerts/AlertProvider.js +2 -2
  2. package/lib/alerts/BaseAlert.js +8 -8
  3. package/lib/alerts/Message.js +1 -1
  4. package/lib/alerts/withAlert.js +1 -1
  5. package/lib/assets/BaseAlert.css +1 -1
  6. package/lib/assets/Content.css +1 -1
  7. package/lib/assets/DefaultFile.css +1 -1
  8. package/lib/assets/Drawer.css +1 -1
  9. package/lib/assets/index11.css +1 -1
  10. package/lib/assets/index5.css +1 -1
  11. package/lib/avatar/index.js +1 -1
  12. package/lib/badge/index.js +1 -1
  13. package/lib/buttons/ActivateButton.js +1 -1
  14. package/lib/buttons/AddButton.js +1 -1
  15. package/lib/buttons/Button.js +1 -1
  16. package/lib/buttons/ButtonGroups.js +1 -1
  17. package/lib/buttons/CancelButton.js +1 -1
  18. package/lib/buttons/DangerButton.js +1 -1
  19. package/lib/buttons/DefaultButton.js +70 -71
  20. package/lib/buttons/DestroyButton.js +1 -1
  21. package/lib/buttons/EditButton.js +1 -1
  22. package/lib/buttons/InactivateButton.js +1 -1
  23. package/lib/buttons/InfoButton.js +1 -1
  24. package/lib/buttons/PrimaryButton.js +1 -1
  25. package/lib/buttons/RestoreButton.js +1 -1
  26. package/lib/buttons/SaveButton.js +1 -1
  27. package/lib/buttons/SuccessButton.js +1 -1
  28. package/lib/buttons/WarningButton.js +1 -1
  29. package/lib/buttons/button_container/index.js +1 -1
  30. package/lib/buttons/split_button/index.js +1 -1
  31. package/lib/calendar/DangerCalendar.js +1 -1
  32. package/lib/calendar/InfoCalendar.js +1 -1
  33. package/lib/calendar/PrimaryCalendar.js +1 -1
  34. package/lib/calendar/SuccessCalendar.js +1 -1
  35. package/lib/calendar/WarningCalendar.js +1 -1
  36. package/lib/calendar/base/Day.js +2 -2
  37. package/lib/calendar/base/Month.js +1 -1
  38. package/lib/calendar/base/Week.js +1 -1
  39. package/lib/calendar/base/helpers.js +1 -1
  40. package/lib/calendar/base/index.js +64 -66
  41. package/lib/checkbox/index.js +4 -4
  42. package/lib/chunks/index.CM1aLH2W.js +205 -0
  43. package/lib/chunks/{index.CBPsbBt0.js → index.Df3kt2LQ.js} +3 -3
  44. package/lib/chunks/{jsx-runtime.gtoSnx-V.js → jsx-runtime.C7wFtzyj.js} +2 -2
  45. package/lib/chunks/{lodash.C68pWaTB.js → lodash.CIAK_hAg.js} +433 -433
  46. package/lib/chunks/{moment.CwOqp704.js → moment.DMLRxgRE.js} +8 -8
  47. package/lib/chunks/{tabs.CM2We4tV.js → tabs.D0L_nVfP.js} +95 -96
  48. package/lib/chunks/v1.Ds1rkxUj.js +49 -0
  49. package/lib/dialog/Alert.js +1 -1
  50. package/lib/dialog/Custom.js +3 -3
  51. package/lib/dialog/Error.js +1 -1
  52. package/lib/dialog/Information.js +1 -1
  53. package/lib/dialog/Question.js +36 -39
  54. package/lib/dialog/Warning.js +1 -1
  55. package/lib/dialog/base/Content.js +1 -1
  56. package/lib/dialog/base/Footer.js +1 -1
  57. package/lib/dialog/base/Header.js +2 -2
  58. package/lib/dialog/base/index.js +2 -2
  59. package/lib/dialog/form/index.js +2 -2
  60. package/lib/dialog/index.js +1 -1
  61. package/lib/dialog/wizard/index.js +4 -4
  62. package/lib/dialog/wizard/progressbar.js +87 -3
  63. package/lib/dialog/wizard/step.js +2 -2
  64. package/lib/drawer/Content.js +1 -1
  65. package/lib/drawer/Drawer.js +19 -19
  66. package/lib/drawer/Header.js +1 -1
  67. package/lib/dropdown/Popup.js +1 -1
  68. package/lib/dropdown/withDropdown.js +31 -31
  69. package/lib/fieldset/index.js +1 -1
  70. package/lib/form/Field.js +2 -2
  71. package/lib/form/FieldArray.js +2 -2
  72. package/lib/form/FieldNumber.js +27 -27
  73. package/lib/form/FieldPeriod.js +2 -2
  74. package/lib/form/helpers.js +1 -1
  75. package/lib/form/index.js +49 -49
  76. package/lib/form/withFieldHOC.js +1 -1
  77. package/lib/form/withFormSecurity.js +1 -1
  78. package/lib/gridlayout/GridCol.js +1 -1
  79. package/lib/gridlayout/GridRow.js +1 -1
  80. package/lib/hint/helpers.js +1 -1
  81. package/lib/hint/index.js +1 -1
  82. package/lib/icons/index.js +51 -54
  83. package/lib/index.js +2 -2
  84. package/lib/inputs/base/InputTextBase.js +112 -114
  85. package/lib/inputs/base/Label.js +1 -1
  86. package/lib/inputs/base/helpers.d.ts +3 -3
  87. package/lib/inputs/base/helpers.js +1 -1
  88. package/lib/inputs/color/index.js +2 -2
  89. package/lib/inputs/date/Dialog.js +2 -2
  90. package/lib/inputs/date/Dropdown.js +10 -14
  91. package/lib/inputs/date/helpers.js +1 -1
  92. package/lib/inputs/date/index.js +102 -114
  93. package/lib/inputs/errorMessage/index.js +1 -1
  94. package/lib/inputs/file/DefaultFile.js +43 -44
  95. package/lib/inputs/file/DragDropFile.js +91 -93
  96. package/lib/inputs/file/File.d.ts +1 -1
  97. package/lib/inputs/file/File.js +33 -34
  98. package/lib/inputs/file/FileButtonSettings.js +1 -1
  99. package/lib/inputs/inputHOC.js +1 -1
  100. package/lib/inputs/mask/BaseMask.js +8 -8
  101. package/lib/inputs/mask/Cnpj.js +2 -2
  102. package/lib/inputs/mask/Cpf.js +2 -2
  103. package/lib/inputs/mask/Phone.js +1 -1
  104. package/lib/inputs/mask/ZipCode.js +1 -1
  105. package/lib/inputs/mask/helpers.d.ts +33 -33
  106. package/lib/inputs/mask/helpers.js +1 -1
  107. package/lib/inputs/multiSelect/ActionButtons.js +2 -2
  108. package/lib/inputs/multiSelect/Dropdown.js +63 -64
  109. package/lib/inputs/multiSelect/helper.js +4 -7
  110. package/lib/inputs/multiSelect/index.js +45 -47
  111. package/lib/inputs/number/BaseNumber.js +1 -1
  112. package/lib/inputs/number/Currency.js +1 -1
  113. package/lib/inputs/number/Decimal.js +1 -1
  114. package/lib/inputs/number/index.js +10 -10
  115. package/lib/inputs/period/Dialog.js +2 -2
  116. package/lib/inputs/period/Dropdown.js +10 -15
  117. package/lib/inputs/period/PeriodList.js +1 -1
  118. package/lib/inputs/period/helper.js +1 -1
  119. package/lib/inputs/period/index.js +207 -223
  120. package/lib/inputs/search/index.js +29 -29
  121. package/lib/inputs/select/ActionButtons.js +1 -1
  122. package/lib/inputs/select/Dropdown.js +53 -53
  123. package/lib/inputs/select/helper.d.ts +1 -1
  124. package/lib/inputs/select/helper.js +39 -45
  125. package/lib/inputs/select/index.js +1 -1
  126. package/lib/inputs/select/multiple/Selecteds.js +1 -1
  127. package/lib/inputs/select/multiple/index.js +139 -143
  128. package/lib/inputs/select/simple/index.js +157 -164
  129. package/lib/inputs/text/index.js +1 -1
  130. package/lib/inputs/textarea/index.js +1 -1
  131. package/lib/internals/withTooltip.js +1 -1
  132. package/lib/labelMessages/index.js +1 -1
  133. package/lib/labels/DangerLabel.js +1 -1
  134. package/lib/labels/DefaultLabel.js +1 -1
  135. package/lib/labels/InfoLabel.js +1 -1
  136. package/lib/labels/PrimaryLabel.js +1 -1
  137. package/lib/labels/SuccessLabel.js +1 -1
  138. package/lib/labels/WarningLabel.js +1 -1
  139. package/lib/labels/label_container/index.js +1 -1
  140. package/lib/list/Header.js +1 -1
  141. package/lib/list/Item.js +2 -2
  142. package/lib/list/Separator.js +1 -1
  143. package/lib/list/index.js +2 -2
  144. package/lib/menus/float/MenuItem.js +18 -18
  145. package/lib/menus/float/SubMenuContainer.d.ts +10 -10
  146. package/lib/menus/float/index.js +2 -2
  147. package/lib/menus/sidenav/ExpandMenu.js +1 -1
  148. package/lib/menus/sidenav/MenuLink.js +1 -1
  149. package/lib/menus/sidenav/NavMenuGroup.js +1 -1
  150. package/lib/menus/sidenav/NavMenuItem.js +54 -56
  151. package/lib/menus/sidenav/NavSubMenuItem.js +1 -1
  152. package/lib/menus/sidenav/index.js +2 -2
  153. package/lib/menus/sidenav/popup_menu_search/EmptyList.js +1 -1
  154. package/lib/menus/sidenav/popup_menu_search/index.js +2 -2
  155. package/lib/noPermission/index.js +1 -1
  156. package/lib/panel/Content.js +30 -31
  157. package/lib/panel/DangerPanel.js +1 -1
  158. package/lib/panel/Default.js +1 -1
  159. package/lib/panel/Header.js +1 -1
  160. package/lib/panel/InfoPanel.js +1 -1
  161. package/lib/panel/PrimaryPanel.js +1 -1
  162. package/lib/panel/SuccessPanel.js +1 -1
  163. package/lib/panel/ToolBar.js +1 -1
  164. package/lib/panel/WarningPanel.js +1 -1
  165. package/lib/permissionValidations.js +11 -11
  166. package/lib/popover/PopoverText.js +1 -1
  167. package/lib/popover/PopoverTitle.js +1 -1
  168. package/lib/popover/index.js +1 -1
  169. package/lib/progress/Bar.js +1 -1
  170. package/lib/progress/index.js +1 -1
  171. package/lib/radio/index.js +1 -1
  172. package/lib/shortcuts/index.js +1 -1
  173. package/lib/skeleton/SkeletonContainer.js +1 -1
  174. package/lib/skeleton/index.js +1 -1
  175. package/lib/spinner/SpinnerLoading.js +1 -1
  176. package/lib/spinner/index.js +1 -1
  177. package/lib/split/Split.js +1 -1
  178. package/lib/split/SplitSide.js +1 -1
  179. package/lib/table/Body.js +25 -25
  180. package/lib/table/Header.js +28 -31
  181. package/lib/table/HeaderColumn.js +2 -2
  182. package/lib/table/Row.js +1 -1
  183. package/lib/table/RowColumn.js +1 -1
  184. package/lib/table/index.js +2 -2
  185. package/lib/tabs/DropdownTabs.js +4 -4
  186. package/lib/tabs/Menu.js +1 -1
  187. package/lib/tabs/MenuTabs.js +2 -2
  188. package/lib/tabs/Panel.js +29 -30
  189. package/lib/tabs/context.js +25 -29
  190. package/lib/tabs/index.js +2 -2
  191. package/lib/textContent/index.js +2 -2
  192. package/lib/toolbar/ButtonBar.js +1 -1
  193. package/lib/toolbar/LabelBar.js +1 -1
  194. package/lib/toolbar/Separator.js +1 -1
  195. package/lib/toolbar/ToolBarGroup.js +1 -1
  196. package/lib/toolbar/index.js +1 -1
  197. package/lib/tooltip/index.js +24 -24
  198. package/lib/treetable/Body.js +2 -2
  199. package/lib/treetable/Header.js +3 -3
  200. package/lib/treetable/Row.js +52 -52
  201. package/lib/treetable/helpers.d.ts +4 -5
  202. package/lib/treetable/index.js +1 -1
  203. package/lib/treeview/Header.js +1 -1
  204. package/lib/treeview/Node.js +4 -4
  205. package/lib/treeview/index.js +28 -28
  206. package/lib/uitour/index.js +32 -32
  207. package/package.json +24 -39
  208. package/lib/chunks/index.CjD97zna.js +0 -206
  209. package/lib/chunks/index.m4wxhMbx.js +0 -89
  210. package/lib/chunks/v1.CDXKvGzE.js +0 -41
  211. /package/lib/assets/{index29.css → progressbar.css} +0 -0
@@ -1,272 +1,256 @@
1
- import { j as a } from "../../chunks/jsx-runtime.gtoSnx-V.js";
2
- import { useId as ve, useState as Y, useRef as h, useEffect as V, useCallback as Ce } from "react";
3
- import { h as s } from "../../chunks/moment.CwOqp704.js";
4
- import qe from "./PeriodList.js";
5
- import De from "../mask/BaseMask.js";
6
- import _ from "./Dropdown.js";
7
- import Ne from "../../calendar/base/index.js";
8
- import Ye from "../../buttons/Button.js";
9
- import G from "../../icons/index.js";
1
+ import { j as i } from "../../chunks/jsx-runtime.C7wFtzyj.js";
2
+ import { useId as fe, useState as D, useRef as g, useEffect as k, useCallback as de } from "react";
3
+ import { h as r } from "../../chunks/moment.DMLRxgRE.js";
4
+ import ke from "./PeriodList.js";
5
+ import me from "../mask/BaseMask.js";
6
+ import U from "./Dropdown.js";
7
+ import Oe from "../../calendar/base/index.js";
8
+ import ge from "../../buttons/Button.js";
9
+ import W from "../../icons/index.js";
10
10
  import '../../assets/gridlayout.css';import '../../assets/button.css';import '../../assets/index24.css';/* empty css */
11
- import H from "./Dialog.js";
12
- import ze from "../../hint/index.js";
11
+ import $ from "./Dialog.js";
12
+ import Le from "../../hint/index.js";
13
13
  /* empty css */
14
- import Ke from "../../gridlayout/GridCol.js";
15
- import { getInputWrapperClass as Ue } from "../base/helpers.js";
16
- import { ErrorMessage as We } from "../errorMessage/index.js";
17
- import pe from "../../textContent/index.js";
18
- import $e from "../../popover/index.js";
19
- const mn = (t) => {
14
+ import Ve from "../../gridlayout/GridCol.js";
15
+ import { getInputWrapperClass as Te } from "../base/helpers.js";
16
+ import { ErrorMessage as Ae } from "../errorMessage/index.js";
17
+ import he from "../../textContent/index.js";
18
+ import qe from "../../popover/index.js";
19
+ const rn = (n) => {
20
20
  const {
21
- showButtonOpen: P = !0,
22
- openOnFocus: xe = !0,
23
- shouldCloseOnSelect: J = !0,
24
- calendarColorStyle: R,
21
+ showButtonOpen: j = !0,
22
+ openOnFocus: ve = !0,
23
+ shouldCloseOnSelect: _ = !0,
24
+ calendarColorStyle: S,
25
25
  showCalendarInDialog: b = !1,
26
- dialogSize: T = { width: "350px", height: "350px" },
27
- hint: E,
28
- hintPosition: Q = "below",
29
- themePopover: be = "light",
30
- popoverAlign: Ie = "left",
31
- gridLayout: X
32
- } = t, Fe = ve(), we = ve(), [r, I] = Y(t.value && s(t.value.initial, "DD/MM/YYYY")), [o, F] = Y(t.value && s(t.value.final, "DD/MM/YYYY")), [Z, ee] = Y("week"), [v, C] = Y(!1), [p, c] = Y(!1), [y, x] = Y(!1), [A, q] = Y(), [D, ne] = Y(), [te, ie] = Y("valueInitial"), M = h(null), g = h(null), m = h(null), ye = h(null), N = h(null), Me = h(null), w = h(null);
33
- h(null);
34
- const u = h(null), f = h(null), z = () => {
35
- var e;
36
- q((e = g == null ? void 0 : g.current) == null ? void 0 : e.getBoundingClientRect());
37
- }, je = (e) => {
38
- var i;
39
- const n = !((i = M.current) != null && i.contains(e.relatedTarget));
40
- !b && v && n && C(!1), !b && p && n && c(!1);
41
- }, le = (e) => {
42
- var l, d, j, S, B, de, me;
43
- const { target: n } = e, i = n;
44
- if (f.current && e && e.key && e.key === "Escape" && (e.preventDefault(), i.focus(), v && (i.id !== "valueInitial" && ((l = m.current) == null || l.focus()), C(!1)), p && (i.id !== "valueFinal" && ((d = u.current) == null || d.focus()), c(!1)), y && (x(!1), (j = u.current) == null || j.focus(), c(!1))), f.current && e && e.key && e.key === "Tab") {
45
- const Ve = (S = f.current) == null ? void 0 : S.getElementsByClassName("navbutton"), Te = ((B = f.current) == null ? void 0 : B.getElementsByClassName("-selectedday"))[0].firstChild, $ = Array.from([...Ve, Te]), ge = $[0], Ae = $[$.length - 1], he = f.current.id === "valueInitial";
46
- !e.shiftKey && v && document.activeElement === m.current && (e.preventDefault(), ge.focus()), e.shiftKey && he && document.activeElement === ge && (e.preventDefault(), (de = m.current) == null || de.focus()), !e.shiftKey && he && document.activeElement === Ae && (e.preventDefault(), (me = u.current) == null || me.focus());
26
+ dialogSize: O = { width: "350px", height: "350px" },
27
+ hint: B,
28
+ hintPosition: G = "below",
29
+ themePopover: Ce = "light",
30
+ popoverAlign: De = "left",
31
+ gridLayout: H
32
+ } = n, Ye = fe(), pe = fe(), [l, I] = D(n.value && r(n.value.initial, "DD/MM/YYYY")), [a, F] = D(n.value && r(n.value.final, "DD/MM/YYYY")), [J, Q] = D("week"), [h, v] = D(!1), [Y, u] = D(!1), [y, p] = D(!1), [L, V] = D(), [C, X] = D(), [Z, ee] = D("valueInitial"), M = g(null), x = g(null), d = g(null), xe = g(null), T = g(null), be = g(null), w = g(null);
33
+ g(null);
34
+ const o = g(null), f = g(null), A = () => {
35
+ V(x?.current?.getBoundingClientRect());
36
+ }, Ie = (e) => {
37
+ const t = !M.current?.contains(e.relatedTarget);
38
+ !b && h && t && v(!1), !b && Y && t && u(!1);
39
+ }, ne = (e) => {
40
+ const { target: t } = e, c = t;
41
+ if (f.current && e && e.key && e.key === "Escape" && (e.preventDefault(), c.focus(), h && (c.id !== "valueInitial" && d.current?.focus(), v(!1)), Y && (c.id !== "valueFinal" && o.current?.focus(), u(!1)), y && (p(!1), o.current?.focus(), u(!1))), f.current && e && e.key && e.key === "Tab") {
42
+ const s = f.current?.getElementsByClassName("navbutton"), Re = (f.current?.getElementsByClassName("-selectedday"))[0].firstChild, K = Array.from([...s, Re]), ue = K[0], Ee = K[K.length - 1], ce = f.current.id === "valueInitial";
43
+ !e.shiftKey && h && document.activeElement === d.current && (e.preventDefault(), ue.focus()), e.shiftKey && ce && document.activeElement === ue && (e.preventDefault(), d.current?.focus()), !e.shiftKey && ce && document.activeElement === Ee && (e.preventDefault(), o.current?.focus());
47
44
  }
48
45
  e.stopPropagation();
49
- }, k = () => {
50
- var i;
51
- const e = (i = g.current) == null ? void 0 : i.getBoundingClientRect(), n = e && e.bottom;
52
- w && w.current && e && (w.current.style.top = String(n).concat("px"));
46
+ }, P = () => {
47
+ const e = x.current?.getBoundingClientRect(), t = e && e.bottom;
48
+ w && w.current && e && (w.current.style.top = String(t).concat("px"));
53
49
  };
54
- V(() => {
55
- var e;
56
- return window.addEventListener("resize", z), document.addEventListener("scroll", k), (e = document.getElementById("modal-dialog-content")) == null || e.addEventListener("scroll", k), g.current && z(), m && m.current && (m.current.id = Fe), u && u.current && (u.current.id = we), () => {
57
- var n;
58
- window.removeEventListener("resize", z), document.removeEventListener("scroll", k), (n = document.getElementById("modal-dialog-content")) == null || n.removeEventListener("scroll", k);
59
- };
60
- }, []), V(() => (document.addEventListener("keydown", le), () => {
61
- document.removeEventListener("keydown", le);
50
+ k(() => (window.addEventListener("resize", A), document.addEventListener("scroll", P), document.getElementById("modal-dialog-content")?.addEventListener("scroll", P), x.current && A(), d && d.current && (d.current.id = Ye), o && o.current && (o.current.id = pe), () => {
51
+ window.removeEventListener("resize", A), document.removeEventListener("scroll", P), document.getElementById("modal-dialog-content")?.removeEventListener("scroll", P);
52
+ }), []), k(() => (document.addEventListener("keydown", ne), () => {
53
+ document.removeEventListener("keydown", ne);
62
54
  }), [
63
- p,
64
- v,
55
+ Y,
56
+ h,
65
57
  y,
66
58
  f.current
67
- ]), V(() => {
68
- if (o && r && s(o).isBefore(s(r)))
69
- I(o), F(r);
70
- else if (t.onChange) {
71
- const e = r ? r.format("YYYY-MM-DD") : "", n = o ? o.format("YYYY-MM-DD") : "";
72
- t.onChange(void 0, "", { initial: e, final: n });
59
+ ]), k(() => {
60
+ if (a && l && r(a).isBefore(r(l)))
61
+ I(a), F(l);
62
+ else if (n.onChange) {
63
+ const e = l ? l.format("YYYY-MM-DD") : "", t = a ? a.format("YYYY-MM-DD") : "";
64
+ n.onChange(void 0, "", { initial: e, final: t });
73
65
  }
74
- }, [r, o]), V(() => {
75
- if (t.value && !(s(t.value.initial).isSame(r) || s(t.value.final).isSame(o))) {
76
- const { initial: e, final: n } = t.value;
77
- let i, l;
78
- s(e, "YYYY-MM-DD", !0).isValid() && (i = s(e, "YYYY-MM-DD")), s(n, "YYYY-MM-DD", !0).isValid() && (l = s(n, "YYYY-MM-DD")), I(i), F(l);
66
+ }, [l, a]), k(() => {
67
+ if (n.value && !(r(n.value.initial).isSame(l) || r(n.value.final).isSame(a))) {
68
+ const { initial: e, final: t } = n.value;
69
+ let c, s;
70
+ r(e, "YYYY-MM-DD", !0).isValid() && (c = r(e, "YYYY-MM-DD")), r(t, "YYYY-MM-DD", !0).isValid() && (s = r(t, "YYYY-MM-DD")), I(c), F(s);
79
71
  }
80
- }, [t.value]);
81
- const ae = (e) => {
82
- var n, i;
83
- e === "valueInitial" && (ie("valueInitial"), c(!1), v || ((n = m.current) == null || n.focus(), b && setTimeout(() => {
84
- var l;
85
- (l = N.current) == null || l.focus();
86
- }, 100), C(!0))), e === "valueFinal" && (ie("valueFinal"), C(!1), p || ((i = u.current) == null || i.focus(), b && setTimeout(() => {
87
- var l;
88
- (l = N.current) == null || l.focus();
89
- }, 100), c(!0))), g.current && q(g.current.getBoundingClientRect());
90
- }, Se = (e) => {
91
- var n, i;
92
- e === "valueInitial" && ((n = m.current) == null || n.focus()), e === "valueFinal" && ((i = u.current) == null || i.focus()), C(!1), c(!1);
93
- }, K = (e) => {
72
+ }, [n.value]);
73
+ const te = (e) => {
74
+ e === "valueInitial" && (ee("valueInitial"), u(!1), h || (d.current?.focus(), b && setTimeout(() => {
75
+ T.current?.focus();
76
+ }, 100), v(!0))), e === "valueFinal" && (ee("valueFinal"), v(!1), Y || (o.current?.focus(), b && setTimeout(() => {
77
+ T.current?.focus();
78
+ }, 100), u(!0))), x.current && V(x.current.getBoundingClientRect());
79
+ }, Fe = (e) => {
80
+ e === "valueInitial" && d.current?.focus(), e === "valueFinal" && o.current?.focus(), v(!1), u(!1);
81
+ }, q = (e) => {
94
82
  setTimeout(() => {
95
- var n, i, l;
96
- e === "valueInitial" && ((n = m.current) == null || n.focus(), C(!1)), e === "valueFinal" && ((i = u.current) == null || i.focus(), c(!1)), e === "periodSelection" && (x(!1), (l = u.current) == null || l.focus(), c(!1));
83
+ e === "valueInitial" && (d.current?.focus(), v(!1)), e === "valueFinal" && (o.current?.focus(), u(!1)), e === "periodSelection" && (p(!1), o.current?.focus(), u(!1));
97
84
  }, 100);
98
- }, re = (e) => {
99
- const { name: n } = e.target;
100
- xe && ae(n), t.onFocus && t.onFocus(e);
101
- }, oe = (e) => {
102
- t.onBlur && t.onBlur(e);
103
- }, se = (e, n) => {
85
+ }, ie = (e) => {
86
+ const { name: t } = e.target;
87
+ ve && te(t), n.onFocus && n.onFocus(e);
88
+ }, le = (e) => {
89
+ n.onBlur && n.onBlur(e);
90
+ }, ae = (e, t) => {
104
91
  if (e) {
105
- const { name: i } = e.target;
106
- n && n.replace(/\D/g, "").trim().length !== 0 && (i === "valueInitial" ? I(void 0) : F(void 0));
92
+ const { name: c } = e.target;
93
+ t && t.replace(/\D/g, "").trim().length !== 0 && (c === "valueInitial" ? I(void 0) : F(void 0));
107
94
  }
108
- }, O = (e) => {
109
- if (t.onChange) {
110
- const n = e.initial ? e.initial.format("YYYY-MM-DD") : "", i = e.final ? e.final.format("YYYY-MM-DD") : "";
111
- t.onChange(void 0, "", { initial: n, final: i });
95
+ }, R = (e) => {
96
+ if (n.onChange) {
97
+ const t = e.initial ? e.initial.format("YYYY-MM-DD") : "", c = e.final ? e.final.format("YYYY-MM-DD") : "";
98
+ n.onChange(void 0, "", { initial: t, final: c });
112
99
  }
113
- }, U = (e, n, i = !0) => {
114
- var j, S, B;
115
- const l = e ? e.target.name : "", d = s(n, "DD/MM/YYYY");
116
- v && ((j = m.current) == null || j.focus()), p && ((S = u.current) == null || S.focus()), l === "valueFinal" && r && d.isBefore(r) ? (I(d), F(r), O({ initial: d, final: r })) : l === "valueInitial" && o && d.isAfter(o) ? (I(o), F(d), O({ initial: o, final: d })) : l === "valueInitial" ? (I(d), O({ initial: d, final: o })) : (F(d), O({ initial: r, final: d })), l === "valueInitial" && !o && i && ((B = u.current) == null || B.focus(), setTimeout(() => c(!0), 100)), J && (C(!1), c(!1));
117
- }, W = () => {
118
- const { disabled: e } = t;
119
- return e || D && (D.disabled || D.hideContent);
120
- }, Be = Ce(() => P ? /* @__PURE__ */ a.jsx(
121
- Ye,
100
+ }, N = (e, t, c = !0) => {
101
+ const s = e ? e.target.name : "", m = r(t, "DD/MM/YYYY");
102
+ h && d.current?.focus(), Y && o.current?.focus(), s === "valueFinal" && l && m.isBefore(l) ? (I(m), F(l), R({ initial: m, final: l })) : s === "valueInitial" && a && m.isAfter(a) ? (I(a), F(m), R({ initial: a, final: m })) : s === "valueInitial" ? (I(m), R({ initial: m, final: a })) : (F(m), R({ initial: l, final: m })), s === "valueInitial" && !a && c && (o.current?.focus(), setTimeout(() => u(!0), 100)), _ && (v(!1), u(!1));
103
+ }, z = () => {
104
+ const { disabled: e } = n;
105
+ return e || C && (C.disabled || C.hideContent);
106
+ }, we = de(() => j ? /* @__PURE__ */ i.jsx(
107
+ ge,
122
108
  {
123
109
  boxShadow: !1,
124
- disabled: W(),
110
+ disabled: z(),
125
111
  customClass: "calendar-button",
126
- icon: /* @__PURE__ */ a.jsx(G, { name: "calendar" }),
112
+ icon: /* @__PURE__ */ i.jsx(W, { name: "calendar" }),
127
113
  onClick: () => {
128
- p || v ? Se(te) : ae(te);
114
+ Y || h ? Fe(Z) : te(Z);
129
115
  },
130
116
  tabIndex: -1,
131
117
  targetRef: (e) => {
132
- ye.current = e;
118
+ xe.current = e;
133
119
  }
134
120
  },
135
121
  "button-open"
136
- ) : null, [p, v]), ue = (e, n) => /* @__PURE__ */ a.jsx(qe, { selected: e, handleOnSelect: n }), Pe = () => {
137
- c(!1), C(!1), x(!0), g.current && q(g.current.getBoundingClientRect());
138
- }, Re = () => {
139
- var e;
140
- x(!1), (e = u.current) == null || e.focus(), c(!1);
141
- }, Ee = Ce(() => /* @__PURE__ */ a.jsx(
142
- Ye,
122
+ ) : null, [Y, h]), re = (e, t) => /* @__PURE__ */ i.jsx(ke, { selected: e, handleOnSelect: t }), ye = () => {
123
+ u(!1), v(!1), p(!0), x.current && V(x.current.getBoundingClientRect());
124
+ }, Me = () => {
125
+ p(!1), o.current?.focus(), u(!1);
126
+ }, je = de(() => /* @__PURE__ */ i.jsx(
127
+ ge,
143
128
  {
144
- disabled: W(),
129
+ disabled: z(),
145
130
  tabIndex: -1,
146
131
  customClass: "calendar-button",
147
- icon: /* @__PURE__ */ a.jsx(G, { name: "more1" }),
148
- onBlur: () => setTimeout(() => x(!1), 100),
149
- onClick: () => y ? Re() : Pe(),
132
+ icon: /* @__PURE__ */ i.jsx(W, { name: "more1" }),
133
+ onBlur: () => setTimeout(() => p(!1), 100),
134
+ onClick: () => y ? Me() : ye(),
150
135
  targetRef: (e) => {
151
- Me.current = e;
136
+ be.current = e;
152
137
  }
153
138
  },
154
139
  "button-select-period"
155
- ), [y]), L = (e, n, i) => /* @__PURE__ */ a.jsx(
156
- Ne,
140
+ ), [y]), E = (e, t, c) => /* @__PURE__ */ i.jsx(
141
+ Oe,
157
142
  {
158
- colorStyle: n,
159
- currentDate: e !== void 0 ? s(e) : s(),
160
- calendarContainer: (l) => {
161
- f.current = l;
143
+ colorStyle: t,
144
+ currentDate: e !== void 0 ? r(e) : r(),
145
+ calendarContainer: (s) => {
146
+ f.current = s;
162
147
  },
163
- onDateChange: (l) => U({ target: { name: i } }, l),
164
- currentDateButton: (l) => N.current = l
148
+ onDateChange: (s) => N({ target: { name: c } }, s),
149
+ currentDateButton: (s) => T.current = s
165
150
  }
166
- ), ce = (e, n) => {
167
- var i, l;
151
+ ), oe = (e, t) => {
168
152
  if (e === "custom") {
169
- (i = m.current) == null || i.focus(), ee(e), x(!1);
153
+ d.current?.focus(), Q(e), p(!1);
170
154
  return;
171
155
  }
172
- ee(e), n && (I(n[0]), F(n[1])), J && x(!1), (l = u.current) == null || l.focus(), c(!1);
173
- }, ke = () => D && D.readOnly ? null : (f && f.current && (f.current.id = "valueInitial"), b ? /* @__PURE__ */ a.jsx(
174
- H,
156
+ Q(e), t && (I(t[0]), F(t[1])), _ && p(!1), o.current?.focus(), u(!1);
157
+ }, Se = () => C && C.readOnly ? null : (f && f.current && (f.current.id = "valueInitial"), b ? /* @__PURE__ */ i.jsx(
158
+ $,
175
159
  {
176
- handlerClose: () => K("valueInitial"),
177
- dialogSize: T,
178
- onOpenChange: C,
179
- children: L(r, R, "valueInitial")
160
+ handlerClose: () => q("valueInitial"),
161
+ dialogSize: O,
162
+ onOpenChange: v,
163
+ children: E(l, S, "valueInitial")
180
164
  }
181
- ) : /* @__PURE__ */ a.jsx(
182
- _,
165
+ ) : /* @__PURE__ */ i.jsx(
166
+ U,
183
167
  {
184
168
  containerRef: M,
185
- showButtonOpen: P,
186
- inputDimensions: A,
169
+ showButtonOpen: j,
170
+ inputDimensions: L,
187
171
  dropdownRef: (e) => {
188
172
  w.current = e;
189
173
  },
190
- children: L(r, R, "valueInitial")
174
+ children: E(l, S, "valueInitial")
191
175
  }
192
- )), Oe = () => D && D.readOnly ? null : (f && f.current && (f.current.id = "valueFinal"), b ? /* @__PURE__ */ a.jsx(
193
- H,
176
+ )), Be = () => C && C.readOnly ? null : (f && f.current && (f.current.id = "valueFinal"), b ? /* @__PURE__ */ i.jsx(
177
+ $,
194
178
  {
195
- handlerClose: () => K("valueFinal"),
196
- dialogSize: T,
197
- onOpenChange: c,
198
- children: L(o, R, "valueFinal")
179
+ handlerClose: () => q("valueFinal"),
180
+ dialogSize: O,
181
+ onOpenChange: u,
182
+ children: E(a, S, "valueFinal")
199
183
  }
200
- ) : /* @__PURE__ */ a.jsx(
201
- _,
184
+ ) : /* @__PURE__ */ i.jsx(
185
+ U,
202
186
  {
203
187
  containerRef: M,
204
- showButtonOpen: P,
205
- inputDimensions: A,
188
+ showButtonOpen: j,
189
+ inputDimensions: L,
206
190
  dropdownRef: (e) => {
207
191
  w.current = e;
208
192
  },
209
- children: L(o, R, "valueFinal")
193
+ children: E(a, S, "valueFinal")
210
194
  }
211
- )), Le = () => b ? /* @__PURE__ */ a.jsx(
212
- H,
195
+ )), Pe = () => b ? /* @__PURE__ */ i.jsx(
196
+ $,
213
197
  {
214
- handlerClose: () => K("periodSelection"),
215
- dialogSize: T,
216
- onOpenChange: x,
217
- children: ue(Z, ce)
198
+ handlerClose: () => q("periodSelection"),
199
+ dialogSize: O,
200
+ onOpenChange: p,
201
+ children: re(J, oe)
218
202
  }
219
- ) : /* @__PURE__ */ a.jsx(
220
- _,
203
+ ) : /* @__PURE__ */ i.jsx(
204
+ U,
221
205
  {
222
206
  containerRef: M,
223
- showButtonOpen: P,
224
- inputDimensions: A,
207
+ showButtonOpen: j,
208
+ inputDimensions: L,
225
209
  dropdownRef: (e) => {
226
210
  w.current = e;
227
211
  },
228
- children: ue(Z, ce)
212
+ children: re(J, oe)
229
213
  }
230
214
  );
231
- if (D && D.unvisible) return null;
232
- const fe = () => /* @__PURE__ */ a.jsxs(
215
+ if (C && C.unvisible) return null;
216
+ const se = () => /* @__PURE__ */ i.jsxs(
233
217
  "div",
234
218
  {
235
219
  ref: M,
236
- onBlur: je,
220
+ onBlur: Ie,
237
221
  className: "input-base-component datepicker-period-container",
238
222
  children: [
239
- t.label && /* @__PURE__ */ a.jsxs("div", { className: "labelcontainer", children: [
240
- /* @__PURE__ */ a.jsx(
241
- pe,
223
+ n.label && /* @__PURE__ */ i.jsxs("div", { className: "labelcontainer", children: [
224
+ /* @__PURE__ */ i.jsx(
225
+ he,
242
226
  {
243
- required: t.required,
244
- className: t.customClassForLabel,
245
- labelUppercase: t.labelUppercase
227
+ required: n.required,
228
+ className: n.customClassForLabel,
229
+ labelUppercase: n.labelUppercase
246
230
  }
247
231
  ),
248
- /* @__PURE__ */ a.jsx(
232
+ /* @__PURE__ */ i.jsx(
249
233
  "div",
250
234
  {
251
235
  className: "text-content",
252
236
  style: { display: "flex" },
253
- children: /* @__PURE__ */ a.jsxs(
237
+ children: /* @__PURE__ */ i.jsxs(
254
238
  "div",
255
239
  {
256
- className: `label ${t.customClassForLabel} ${t.labelUppercase && " -uppercase"}`,
240
+ className: `label ${n.customClassForLabel} ${n.labelUppercase && " -uppercase"}`,
257
241
  style: { alignSelf: "center" },
258
242
  children: [
259
- t.label,
260
- t.required && /* @__PURE__ */ a.jsx("span", { className: "-requiredlabel", children: "*" }),
261
- !!E && Q === "onLabelRight" && /* @__PURE__ */ a.jsx(
262
- $e,
243
+ n.label,
244
+ n.required && /* @__PURE__ */ i.jsx("span", { className: "-requiredlabel", children: "*" }),
245
+ !!B && G === "onLabelRight" && /* @__PURE__ */ i.jsx(
246
+ qe,
263
247
  {
264
- theme: be,
265
- align: Ie,
248
+ theme: Ce,
249
+ align: De,
266
250
  iconColor: "#03bde2",
267
251
  customClass: "-hint",
268
252
  style: { margin: "0px 5px", height: "auto", width: 20 },
269
- children: E
253
+ children: B
270
254
  }
271
255
  )
272
256
  ]
@@ -274,78 +258,78 @@ const mn = (t) => {
274
258
  )
275
259
  }
276
260
  ),
277
- /* @__PURE__ */ a.jsx(pe, {})
261
+ /* @__PURE__ */ i.jsx(he, {})
278
262
  ] }),
279
- /* @__PURE__ */ a.jsxs(
263
+ /* @__PURE__ */ i.jsxs(
280
264
  "div",
281
265
  {
282
- className: `periodpicker-component ${Ue({
283
- ...t,
284
- value: r ? s(r).format("DD/MM/YYYY") : "",
285
- disabled: W()
266
+ className: `periodpicker-component ${Te({
267
+ ...n,
268
+ value: l ? r(l).format("DD/MM/YYYY") : "",
269
+ disabled: z()
286
270
  })}`,
287
- ref: g,
271
+ ref: x,
288
272
  children: [
289
- /* @__PURE__ */ a.jsx(
290
- De,
273
+ /* @__PURE__ */ i.jsx(
274
+ me,
291
275
  {
292
276
  gridLayout: void 0,
293
- permissionAttr: t.permissionAttr,
277
+ permissionAttr: n.permissionAttr,
294
278
  name: "valueInitial",
295
- value: r ? s(r).format("DD/MM/YYYY") : "",
279
+ value: l ? r(l).format("DD/MM/YYYY") : "",
296
280
  mask: "00/00/0000",
297
281
  onComplete: (e) => {
298
- U(e, e.target.value, !0);
282
+ N(e, e.target.value, !0);
299
283
  },
300
- onFocus: re,
301
- onBlur: (e) => oe(e),
302
- onChange: se,
284
+ onFocus: ie,
285
+ onBlur: (e) => le(e),
286
+ onChange: ae,
303
287
  inputRef: (e) => {
304
- m.current = e;
288
+ d.current = e;
305
289
  },
306
290
  handlerSetOnDenied: (e) => {
307
- ne(e);
291
+ X(e);
308
292
  },
309
- required: t.required
293
+ required: n.required
310
294
  }
311
295
  ),
312
- /* @__PURE__ */ a.jsx(G, { name: "arrow_right", customClass: "separation_icon" }),
313
- /* @__PURE__ */ a.jsx(
314
- De,
296
+ /* @__PURE__ */ i.jsx(W, { name: "arrow_right", customClass: "separation_icon" }),
297
+ /* @__PURE__ */ i.jsx(
298
+ me,
315
299
  {
316
300
  gridLayout: void 0,
317
- permissionAttr: t.permissionAttr,
301
+ permissionAttr: n.permissionAttr,
318
302
  name: "valueFinal",
319
- value: o ? s(o).format("DD/MM/YYYY") : "",
303
+ value: a ? r(a).format("DD/MM/YYYY") : "",
320
304
  mask: "00/00/0000",
321
305
  onComplete: (e) => {
322
- U(e, e.target.value, !0);
306
+ N(e, e.target.value, !0);
323
307
  },
324
- onFocus: re,
325
- onBlur: (e) => oe(e),
326
- onChange: se,
308
+ onFocus: ie,
309
+ onBlur: (e) => le(e),
310
+ onChange: ae,
327
311
  inputRef: (e) => {
328
- u.current = e;
312
+ o.current = e;
329
313
  },
330
- handlerSetOnDenied: (e) => ne(e),
331
- required: t.required
314
+ handlerSetOnDenied: (e) => X(e),
315
+ required: n.required
332
316
  }
333
317
  ),
334
- Be(),
335
- Ee()
318
+ we(),
319
+ je()
336
320
  ]
337
321
  }
338
322
  ),
339
- v && ke(),
340
- p && Oe(),
341
- y && Le(),
342
- /* @__PURE__ */ a.jsx(ze, { visible: !!E && Q === "below", customClass: "hint", description: E }),
343
- /* @__PURE__ */ a.jsx(We, { messages: t.errorMessages })
323
+ h && Se(),
324
+ Y && Be(),
325
+ y && Pe(),
326
+ /* @__PURE__ */ i.jsx(Le, { visible: !!B && G === "below", customClass: "hint", description: B }),
327
+ /* @__PURE__ */ i.jsx(Ae, { messages: n.errorMessages })
344
328
  ]
345
329
  }
346
330
  );
347
- return X ? /* @__PURE__ */ a.jsx(Ke, { customClass: "-withinput", cols: X, children: fe() }) : fe();
331
+ return H ? /* @__PURE__ */ i.jsx(Ve, { customClass: "-withinput", cols: H, children: se() }) : se();
348
332
  };
349
333
  export {
350
- mn as default
334
+ rn as default
351
335
  };