linear-react-components-ui 1.1.26-beta-1 → 1.1.26-beta.10

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 (225) hide show
  1. package/lib/alerts/AlertContainer.js +8 -2
  2. package/lib/alerts/AlertProvider.js +11 -5
  3. package/lib/alerts/BaseAlert.js +10 -8
  4. package/lib/alerts/Message.js +91 -64
  5. package/lib/alerts/withAlert.js +10 -6
  6. package/lib/assets/BaseAlert.css +1 -1
  7. package/lib/assets/Content.css +1 -1
  8. package/lib/assets/DefaultFile.css +1 -1
  9. package/lib/assets/Drawer.css +1 -1
  10. package/lib/assets/index11.css +1 -1
  11. package/lib/assets/index5.css +1 -1
  12. package/lib/avatar/index.js +29 -51
  13. package/lib/badge/index.js +25 -23
  14. package/lib/buttons/ActivateButton.js +9 -4
  15. package/lib/buttons/AddButton.js +12 -5
  16. package/lib/buttons/Button.js +16 -5
  17. package/lib/buttons/ButtonGroups.js +10 -3
  18. package/lib/buttons/CancelButton.js +14 -4
  19. package/lib/buttons/DangerButton.js +15 -4
  20. package/lib/buttons/DefaultButton.js +76 -111
  21. package/lib/buttons/DestroyButton.js +21 -5
  22. package/lib/buttons/EditButton.js +9 -4
  23. package/lib/buttons/InactivateButton.js +9 -4
  24. package/lib/buttons/InfoButton.js +15 -4
  25. package/lib/buttons/PrimaryButton.js +15 -4
  26. package/lib/buttons/RestoreButton.js +9 -4
  27. package/lib/buttons/SaveButton.js +14 -4
  28. package/lib/buttons/SuccessButton.js +15 -4
  29. package/lib/buttons/WarningButton.js +15 -4
  30. package/lib/buttons/button_container/index.js +21 -16
  31. package/lib/buttons/split_button/index.js +53 -55
  32. package/lib/calendar/DangerCalendar.js +18 -4
  33. package/lib/calendar/InfoCalendar.js +18 -4
  34. package/lib/calendar/PrimaryCalendar.js +18 -4
  35. package/lib/calendar/SuccessCalendar.js +18 -4
  36. package/lib/calendar/WarningCalendar.js +18 -4
  37. package/lib/calendar/base/Day.js +32 -22
  38. package/lib/calendar/base/Month.js +24 -21
  39. package/lib/calendar/base/Week.js +20 -19
  40. package/lib/calendar/base/helpers.js +11 -19
  41. package/lib/calendar/base/index.js +129 -97
  42. package/lib/checkbox/index.js +6 -5
  43. package/lib/chunks/compiler-runtime.Cu50tn6L.js +54 -0
  44. package/lib/chunks/{index.Da--18GT.js → index.Df3kt2LQ.js} +179 -181
  45. package/lib/chunks/index.aw0XaUkg.js +266 -0
  46. package/lib/chunks/jsx-runtime.D1SHvdVE.js +282 -0
  47. package/lib/chunks/lodash.CIAK_hAg.js +3684 -0
  48. package/lib/chunks/moment.DMLRxgRE.js +2589 -0
  49. package/lib/chunks/tabs.BvKfeA6Y.js +244 -0
  50. package/lib/chunks/v1.Ds1rkxUj.js +49 -0
  51. package/lib/dialog/Alert.js +18 -17
  52. package/lib/dialog/Custom.js +42 -28
  53. package/lib/dialog/Error.js +18 -17
  54. package/lib/dialog/Information.js +18 -17
  55. package/lib/dialog/Question.js +43 -59
  56. package/lib/dialog/Warning.js +18 -17
  57. package/lib/dialog/base/Content.js +13 -4
  58. package/lib/dialog/base/Footer.js +8 -3
  59. package/lib/dialog/base/Header.js +4 -3
  60. package/lib/dialog/base/index.js +5 -4
  61. package/lib/dialog/form/index.js +5 -4
  62. package/lib/dialog/index.js +1 -1
  63. package/lib/dialog/wizard/index.js +11 -10
  64. package/lib/dialog/wizard/progressbar.js +96 -3
  65. package/lib/dialog/wizard/step.js +4 -3
  66. package/lib/dialog/wizard/useWizard.js +42 -29
  67. package/lib/drawer/Content.js +15 -8
  68. package/lib/drawer/Drawer.js +38 -35
  69. package/lib/drawer/Header.js +53 -40
  70. package/lib/drawer/helpers.js +2 -2
  71. package/lib/dropdown/Popup.js +4 -2
  72. package/lib/dropdown/withDropdown.js +75 -50
  73. package/lib/fieldset/index.js +66 -47
  74. package/lib/form/Field.js +88 -62
  75. package/lib/form/FieldArray.js +18 -39
  76. package/lib/form/FieldNumber.js +42 -38
  77. package/lib/form/FieldPeriod.js +90 -59
  78. package/lib/form/helpers.js +14 -11
  79. package/lib/form/index.js +88 -100
  80. package/lib/form/withFieldHOC.js +57 -48
  81. package/lib/form/withFormSecurity.js +15 -18
  82. package/lib/gridlayout/GridCol.js +21 -20
  83. package/lib/gridlayout/GridRow.js +22 -20
  84. package/lib/hint/helpers.js +6 -2
  85. package/lib/hint/index.js +27 -25
  86. package/lib/icons/helper.js +142 -569
  87. package/lib/icons/index.js +62 -57
  88. package/lib/index.js +20 -19
  89. package/lib/inputs/base/InputTextBase.js +121 -207
  90. package/lib/inputs/base/Label.js +27 -29
  91. package/lib/inputs/base/helpers.d.ts +3 -3
  92. package/lib/inputs/base/helpers.js +4 -2
  93. package/lib/inputs/color/index.js +52 -73
  94. package/lib/inputs/date/Dialog.js +15 -16
  95. package/lib/inputs/date/Dropdown.js +16 -14
  96. package/lib/inputs/date/helpers.js +7 -7
  97. package/lib/inputs/date/index.js +101 -147
  98. package/lib/inputs/errorMessage/index.js +21 -13
  99. package/lib/inputs/file/DefaultFile.js +64 -67
  100. package/lib/inputs/file/DragDropFile.js +79 -135
  101. package/lib/inputs/file/File.d.ts +1 -1
  102. package/lib/inputs/file/File.js +24 -39
  103. package/lib/inputs/file/FileButtonSettings.js +20 -17
  104. package/lib/inputs/inputHOC.js +38 -20
  105. package/lib/inputs/mask/BaseMask.js +51 -30
  106. package/lib/inputs/mask/Cnpj.js +42 -36
  107. package/lib/inputs/mask/Cpf.js +45 -33
  108. package/lib/inputs/mask/Phone.js +10 -6
  109. package/lib/inputs/mask/ZipCode.js +9 -4
  110. package/lib/inputs/mask/helpers.d.ts +33 -33
  111. package/lib/inputs/mask/helpers.js +44 -44
  112. package/lib/inputs/multiSelect/ActionButtons.js +35 -46
  113. package/lib/inputs/multiSelect/Dropdown.js +94 -133
  114. package/lib/inputs/multiSelect/helper.js +4 -7
  115. package/lib/inputs/multiSelect/index.js +167 -127
  116. package/lib/inputs/number/BaseNumber.js +43 -31
  117. package/lib/inputs/number/Currency.js +19 -12
  118. package/lib/inputs/number/Decimal.js +9 -4
  119. package/lib/inputs/number/index.js +31 -35
  120. package/lib/inputs/period/Dialog.js +16 -16
  121. package/lib/inputs/period/Dropdown.js +15 -15
  122. package/lib/inputs/period/PeriodList.js +41 -27
  123. package/lib/inputs/period/helper.js +8 -4
  124. package/lib/inputs/period/index.js +192 -330
  125. package/lib/inputs/search/index.js +95 -71
  126. package/lib/inputs/select/ActionButtons.js +24 -45
  127. package/lib/inputs/select/Dropdown.js +61 -110
  128. package/lib/inputs/select/helper.d.ts +1 -1
  129. package/lib/inputs/select/helper.js +43 -45
  130. package/lib/inputs/select/index.js +23 -25
  131. package/lib/inputs/select/multiple/Selecteds.js +23 -19
  132. package/lib/inputs/select/multiple/index.js +106 -176
  133. package/lib/inputs/select/simple/index.js +126 -196
  134. package/lib/inputs/text/index.js +9 -4
  135. package/lib/inputs/textarea/index.js +13 -15
  136. package/lib/internals/withTooltip.js +114 -67
  137. package/lib/labelMessages/index.js +50 -45
  138. package/lib/labels/DangerLabel.js +18 -4
  139. package/lib/labels/DefaultLabel.js +53 -39
  140. package/lib/labels/InfoLabel.js +18 -4
  141. package/lib/labels/PrimaryLabel.js +18 -4
  142. package/lib/labels/SuccessLabel.js +18 -4
  143. package/lib/labels/WarningLabel.js +18 -4
  144. package/lib/labels/label_container/index.js +15 -9
  145. package/lib/list/Header.js +18 -6
  146. package/lib/list/Item.js +5 -4
  147. package/lib/list/Separator.js +8 -3
  148. package/lib/list/helpers.js +2 -2
  149. package/lib/list/index.js +21 -18
  150. package/lib/menus/float/MenuItem.js +49 -52
  151. package/lib/menus/float/SubMenuContainer.d.ts +10 -10
  152. package/lib/menus/float/index.js +102 -81
  153. package/lib/menus/sidenav/ExpandMenu.js +17 -15
  154. package/lib/menus/sidenav/MenuLink.js +21 -14
  155. package/lib/menus/sidenav/NavMenuGroup.js +19 -14
  156. package/lib/menus/sidenav/NavMenuItem.js +131 -111
  157. package/lib/menus/sidenav/NavSubMenuItem.js +36 -20
  158. package/lib/menus/sidenav/helpers.js +4 -4
  159. package/lib/menus/sidenav/index.js +145 -123
  160. package/lib/menus/sidenav/popup_menu_search/EmptyList.js +21 -17
  161. package/lib/menus/sidenav/popup_menu_search/index.js +17 -51
  162. package/lib/noPermission/index.js +13 -8
  163. package/lib/panel/Content.js +49 -40
  164. package/lib/panel/DangerPanel.js +10 -5
  165. package/lib/panel/Default.js +62 -36
  166. package/lib/panel/Header.js +53 -37
  167. package/lib/panel/InfoPanel.js +10 -5
  168. package/lib/panel/PrimaryPanel.js +10 -5
  169. package/lib/panel/SuccessPanel.js +10 -5
  170. package/lib/panel/ToolBar.js +17 -4
  171. package/lib/panel/WarningPanel.js +10 -5
  172. package/lib/panel/helpers.js +8 -5
  173. package/lib/permissionValidations.js +15 -11
  174. package/lib/popover/PopoverText.js +12 -5
  175. package/lib/popover/PopoverTitle.js +10 -3
  176. package/lib/popover/index.js +36 -56
  177. package/lib/progress/Bar.js +43 -34
  178. package/lib/progress/index.js +23 -18
  179. package/lib/radio/index.js +105 -89
  180. package/lib/shortcuts/index.js +20 -7
  181. package/lib/skeleton/SkeletonContainer.js +16 -6
  182. package/lib/skeleton/index.js +42 -18
  183. package/lib/spinner/SpinnerLoading.js +53 -16
  184. package/lib/spinner/index.js +47 -37
  185. package/lib/split/Split.js +83 -79
  186. package/lib/split/SplitSide.js +24 -16
  187. package/lib/table/Body.js +36 -49
  188. package/lib/table/Header.js +45 -35
  189. package/lib/table/HeaderColumn.js +40 -27
  190. package/lib/table/Row.js +47 -48
  191. package/lib/table/RowColumn.js +50 -38
  192. package/lib/table/helpers.js +3 -1
  193. package/lib/table/index.js +101 -104
  194. package/lib/tabs/DropdownTabs.js +64 -61
  195. package/lib/tabs/Menu.js +35 -49
  196. package/lib/tabs/MenuTabs.js +59 -84
  197. package/lib/tabs/Panel.js +57 -47
  198. package/lib/tabs/context.js +36 -40
  199. package/lib/tabs/index.js +69 -64
  200. package/lib/tabs/tabHelpers.js +10 -8
  201. package/lib/textContent/index.js +30 -32
  202. package/lib/toolbar/ButtonBar.js +62 -58
  203. package/lib/toolbar/LabelBar.js +46 -38
  204. package/lib/toolbar/Separator.js +8 -3
  205. package/lib/toolbar/ToolBarGroup.js +14 -3
  206. package/lib/toolbar/index.js +35 -29
  207. package/lib/tooltip/index.js +24 -24
  208. package/lib/treetable/Body.js +26 -27
  209. package/lib/treetable/Header.js +23 -19
  210. package/lib/treetable/Row.js +210 -147
  211. package/lib/treetable/helpers.d.ts +4 -5
  212. package/lib/treetable/helpers.js +6 -14
  213. package/lib/treetable/index.js +25 -15
  214. package/lib/treeview/Header.js +13 -5
  215. package/lib/treeview/Node.js +198 -175
  216. package/lib/treeview/index.js +257 -174
  217. package/lib/uitour/index.js +167 -166
  218. package/package.json +32 -43
  219. package/lib/chunks/index.CmrLK9Qe.js +0 -675
  220. package/lib/chunks/index.D5f6Ow9V.js +0 -89
  221. package/lib/chunks/index.yztgndLc.js +0 -206
  222. package/lib/chunks/jsx-runtime.CYK1ROHF.js +0 -445
  223. package/lib/chunks/tabs.Cvj2MJH6.js +0 -246
  224. package/lib/chunks/v1.CDXKvGzE.js +0 -41
  225. /package/lib/assets/{index29.css → progressbar.css} +0 -0
@@ -1,5 +1,5 @@
1
1
  import a from "react";
2
- import l from "lodash";
2
+ import { _ as l } from "../../chunks/lodash.CIAK_hAg.js";
3
3
  const p = ({
4
4
  textAlign: r,
5
5
  readOnly: t,
@@ -19,7 +19,9 @@ const p = ({
19
19
  ${o && " -disabled"}`;
20
20
  }, c = (r, t, n) => {
21
21
  let e = n || [];
22
- return t ? null : (l.isArray(e) || (e = [e]), e = e.map((s, o) => s && a.cloneElement(s, { key: `rightelement-${o + 1}` })), e);
22
+ return t ? null : (l.isArray(e) || (e = [e]), e = e.map((s, o) => s && a.cloneElement(s, {
23
+ key: `rightelement-${o + 1}`
24
+ })), e);
23
25
  };
24
26
  export {
25
27
  p as getInputClass,
@@ -1,78 +1,57 @@
1
- import { j as e } from "../../chunks/jsx-runtime.CYK1ROHF.js";
2
- import { useState as k, useRef as x, useEffect as g } from "react";
3
- import h from "lodash";
4
- import j from "../text/index.js";
5
- import v from "../../buttons/Button.js";
1
+ import { j as c } from "../../chunks/jsx-runtime.D1SHvdVE.js";
2
+ import { c as N } from "../../chunks/compiler-runtime.Cu50tn6L.js";
3
+ import { useState as R, useRef as S, useEffect as B } from "react";
4
+ import { _ as F } from "../../chunks/lodash.CIAK_hAg.js";
5
+ import T from "../text/index.js";
6
+ import _ from "../../buttons/Button.js";
6
7
  import "../../icons/index.js";
7
8
  import '../../assets/button.css';import '../../assets/index20.css';/* empty css */
8
- const F = (u) => {
9
- const {
10
- asTextField: m = !0,
11
- value: c = "#aaaaaa",
12
- onChange: n,
13
- onButtonClick: r,
14
- name: s
15
- } = u, [l, i] = k(c), a = x(null), p = h.debounce((o, t) => {
16
- o(t);
17
- }, 300), d = (o) => {
18
- const { target: t } = o;
19
- i(t.value), n && p(n, o);
20
- }, f = (o) => {
21
- const { target: t } = o;
22
- i(t.value), n && (o.persist(), p(n, o));
23
- }, C = () => {
24
- a.current && a.current.click();
25
- };
26
- return g(() => {
27
- i(c);
28
- }, [c]), m ? /* @__PURE__ */ e.jsx(
29
- j,
30
- {
31
- ...u,
32
- value: l,
33
- onChange: (o) => {
34
- o && d(o);
35
- },
36
- leftElements: [
37
- /* @__PURE__ */ e.jsx("div", { className: "colorpicker-colormirror", style: { background: l } }, "colorMirror"),
38
- /* @__PURE__ */ e.jsx(
39
- "input",
40
- {
41
- className: "colorpicker-hideinputcolor",
42
- ref: a,
43
- type: "color",
44
- defaultValue: l,
45
- name: s,
46
- onClick: (o) => r ? r(o) : void 0,
47
- onInput: f
48
- },
49
- "inputColor"
50
- )
51
- ],
52
- rightElements: /* @__PURE__ */ e.jsx(
53
- v,
54
- {
55
- className: "colorpicker-palettebutton",
56
- onClick: C,
57
- iconName: "pallete",
58
- boxShadow: !1
59
- },
60
- "palettebutton"
61
- )
62
- }
63
- ) : /* @__PURE__ */ e.jsx(
64
- "input",
65
- {
66
- name: s,
67
- ref: a,
68
- type: "color",
69
- defaultValue: l,
70
- onClick: (o) => r ? r(o) : void 0,
71
- onInput: f
72
- },
73
- "inputColor"
74
- );
9
+ const A = (l) => {
10
+ const t = N.c(17), {
11
+ asTextField: j,
12
+ value: y,
13
+ onChange: o,
14
+ onButtonClick: n,
15
+ name: a
16
+ } = l, g = j === void 0 ? !0 : j, i = y === void 0 ? "#aaaaaa" : y, [r, h] = R(i), s = S(null);
17
+ let u;
18
+ t[0] === Symbol.for("react.memo_cache_sentinel") ? (u = F.debounce(P, 300), t[0] = u) : u = t[0];
19
+ const E = u;
20
+ let m;
21
+ t[1] !== o ? (m = (e) => {
22
+ const {
23
+ target: b
24
+ } = e;
25
+ h(b.value), o && E(o, e);
26
+ }, t[1] = o, t[2] = m) : m = t[2];
27
+ const v = m;
28
+ let f;
29
+ t[3] !== o ? (f = (e) => {
30
+ const {
31
+ target: b
32
+ } = e;
33
+ h(b.value), o && (e.persist(), E(o, e));
34
+ }, t[3] = o, t[4] = f) : f = t[4];
35
+ const p = f;
36
+ let d;
37
+ t[5] === Symbol.for("react.memo_cache_sentinel") ? (d = () => {
38
+ s.current && s.current.click();
39
+ }, t[5] = d) : d = t[5];
40
+ const I = d;
41
+ let C, x;
42
+ t[6] !== i ? (C = () => {
43
+ h(i);
44
+ }, x = [i], t[6] = i, t[7] = C, t[8] = x) : (C = t[7], x = t[8]), B(C, x);
45
+ let k;
46
+ return t[9] !== g || t[10] !== r || t[11] !== a || t[12] !== n || t[13] !== v || t[14] !== p || t[15] !== l ? (k = g ? /* @__PURE__ */ c.jsx(T, { ...l, value: r, onChange: (e) => {
47
+ e && v(e);
48
+ }, leftElements: [/* @__PURE__ */ c.jsx("div", { className: "colorpicker-colormirror", style: {
49
+ background: r
50
+ } }, "colorMirror"), /* @__PURE__ */ c.jsx("input", { className: "colorpicker-hideinputcolor", ref: s, type: "color", defaultValue: r, name: a, onClick: (e) => n ? n(e) : void 0, onInput: p }, "inputColor")], rightElements: /* @__PURE__ */ c.jsx(_, { className: "colorpicker-palettebutton", onClick: I, iconName: "pallete", boxShadow: !1 }, "palettebutton") }) : /* @__PURE__ */ c.jsx("input", { name: a, ref: s, type: "color", defaultValue: r, onClick: (e) => n ? n(e) : void 0, onInput: p }, "inputColor"), t[9] = g, t[10] = r, t[11] = a, t[12] = n, t[13] = v, t[14] = p, t[15] = l, t[16] = k) : k = t[16], k;
75
51
  };
52
+ function P(l, t) {
53
+ l(t);
54
+ }
76
55
  export {
77
- F as default
56
+ A as default
78
57
  };
@@ -1,18 +1,17 @@
1
- import { j as a } from "../../chunks/jsx-runtime.CYK1ROHF.js";
2
- import { B as o } from "../../chunks/index.yztgndLc.js";
3
- const h = ({ handlerClose: e, children: t, dialogSize: s }) => /* @__PURE__ */ a.jsx(
4
- o,
5
- {
6
- closeOnEsc: !0,
7
- closeOnOutsideClick: !0,
8
- handlerClose: () => e(!1),
9
- wrapperClassName: "",
10
- width: s.width,
11
- height: s.height,
12
- onOpenChange: e,
13
- children: t
14
- }
15
- );
1
+ import { j as a } from "../../chunks/jsx-runtime.D1SHvdVE.js";
2
+ import { c as h } from "../../chunks/compiler-runtime.Cu50tn6L.js";
3
+ import { B as n } from "../../chunks/index.aw0XaUkg.js";
4
+ const p = (r) => {
5
+ const e = h.c(8), {
6
+ handlerClose: t,
7
+ children: l,
8
+ dialogSize: i
9
+ } = r;
10
+ let s;
11
+ e[0] !== t ? (s = () => t(!1), e[0] = t, e[1] = s) : s = e[1];
12
+ let o;
13
+ return e[2] !== l || e[3] !== i.height || e[4] !== i.width || e[5] !== t || e[6] !== s ? (o = /* @__PURE__ */ a.jsx(n, { closeOnEsc: !0, closeOnOutsideClick: !0, handlerClose: s, wrapperClassName: "", width: i.width, height: i.height, onOpenChange: t, children: l }), e[2] = l, e[3] = i.height, e[4] = i.width, e[5] = t, e[6] = s, e[7] = o) : o = e[7], o;
14
+ };
16
15
  export {
17
- h as default
16
+ p as default
18
17
  };
@@ -1,17 +1,19 @@
1
- import { useRef as f, useEffect as d } from "react";
2
- import m from "react-dom";
3
- const s = 24, h = 250, R = (r) => {
4
- const { containerRef: c, showButtonOpen: u, dropdownRef: l, children: p, inputDimensions: e } = r, t = f(document.createElement("div")), n = e && e.width + (u ? s : 0) + 4 || h;
5
- return d(() => {
6
- var o;
7
- return t.current.className = "datepicker-component", t.current.style.width = String(n).concat("px"), t.current.style.top = String(e == null ? void 0 : e.bottom).concat("px"), (o = c.current) == null || o.appendChild(t.current), l(t.current), () => {
8
- var a;
9
- (a = c.current) == null || a.removeChild(t.current);
10
- };
11
- }, []), d(() => {
12
- t.current.style.width = String(n).concat("px"), t.current.style.top = String(e == null ? void 0 : e.bottom).concat("px");
13
- }, [r]), m.createPortal(p, t.current);
1
+ import { useRef as a, useEffect as o } from "react";
2
+ import d from "react-dom";
3
+ const p = 24, m = 250, h = (n) => {
4
+ const {
5
+ containerRef: r,
6
+ showButtonOpen: i,
7
+ dropdownRef: u,
8
+ children: s,
9
+ inputDimensions: e
10
+ } = n, t = a(document.createElement("div")), c = e && e.width + (i ? p : 0) + 4 || m;
11
+ return o(() => (t.current.className = "datepicker-component", t.current.style.width = String(c).concat("px"), t.current.style.top = String(e?.bottom).concat("px"), r.current?.appendChild(t.current), u(t.current), () => {
12
+ r.current?.removeChild(t.current);
13
+ }), []), o(() => {
14
+ t.current.style.width = String(c).concat("px"), t.current.style.top = String(e?.bottom).concat("px");
15
+ }, [n]), d.createPortal(s, t.current);
14
16
  };
15
17
  export {
16
- R as default
18
+ h as default
17
19
  };
@@ -1,10 +1,10 @@
1
- import e from "moment";
2
- const o = "DD/MM/YYYY", r = "YYYY-MM-DD", M = (n) => {
3
- let t = n;
4
- return e(t, o, !0).isValid() && (t = e(t, o).format(o)), typeof t == "string" ? e(t, r) : t;
1
+ import { h as o } from "../../chunks/moment.DMLRxgRE.js";
2
+ const e = "DD/MM/YYYY", Y = "YYYY-MM-DD", s = (r) => {
3
+ let t = r;
4
+ return o(t, e, !0).isValid() && (t = o(t, e).format(e)), typeof t == "string" ? o(t, Y) : t;
5
5
  };
6
6
  export {
7
- r as EN_US_FORMAT,
8
- o as PT_BR_FORMAT,
9
- M as getMomentValue
7
+ Y as EN_US_FORMAT,
8
+ e as PT_BR_FORMAT,
9
+ s as getMomentValue
10
10
  };
@@ -1,182 +1,136 @@
1
- import { j as d } from "../../chunks/jsx-runtime.CYK1ROHF.js";
2
- import { useState as m, useRef as g, useEffect as F } from "react";
3
- import l from "moment";
4
- import ce from "./Dialog.js";
5
- import ue from "./Dropdown.js";
6
- import de from "../../buttons/Button.js";
1
+ import { j as d } from "../../chunks/jsx-runtime.D1SHvdVE.js";
2
+ import { useState as m, useRef as g, useEffect as w } from "react";
3
+ import { h as s } from "../../chunks/moment.DMLRxgRE.js";
4
+ import se from "./Dialog.js";
5
+ import le from "./Dropdown.js";
6
+ import "../../chunks/compiler-runtime.Cu50tn6L.js";
7
+ import ce from "../../buttons/Button.js";
7
8
  import "../../icons/index.js";
8
9
  import '../../assets/gridlayout.css';import '../../assets/button.css';import '../../assets/index21.css';/* empty css */
9
10
  /* empty css */
10
- import fe from "../../gridlayout/GridCol.js";
11
- import me from "../../calendar/base/index.js";
12
- import ge from "../mask/BaseMask.js";
13
- import { getMomentValue as Ce, EN_US_FORMAT as h, PT_BR_FORMAT as f } from "./helpers.js";
14
- const xe = (o) => {
11
+ import ue from "../../gridlayout/GridCol.js";
12
+ import de from "../../calendar/base/index.js";
13
+ import fe from "../mask/BaseMask.js";
14
+ import { getMomentValue as me, EN_US_FORMAT as h, PT_BR_FORMAT as f } from "./helpers.js";
15
+ const Fe = (n) => {
15
16
  const {
16
- showButtonOpen: S = !0,
17
+ showButtonOpen: O = !0,
17
18
  openOnFocus: q = !0,
18
19
  shouldCloseOnSelect: G = !0,
19
20
  setFocusOnSelect: U = !0,
20
21
  showCalendarInDialog: c = !1,
21
22
  required: W = !1,
22
- value: i = "",
23
+ value: r = "",
23
24
  name: H = "",
24
- inputRef: p,
25
- dialogSize: J = { width: "384px", height: "384px" },
26
- gridLayout: x,
25
+ inputRef: F,
26
+ dialogSize: J = {
27
+ width: "384px",
28
+ height: "384px"
29
+ },
30
+ gridLayout: S,
27
31
  shouldCloseOnEsc: Q = !0
28
- } = o, [y, D] = m(i ? Ce(i) : void 0), [a, u] = m(!1), [j, V] = m(i), [X, L] = m(), [Y, v] = m(!1), [s, Z] = m({
32
+ } = n, [p, D] = m(r ? me(r) : void 0), [a, u] = m(!1), [x, j] = m(r), [X, V] = m(), [Y, v] = m(!1), [l, Z] = m({
29
33
  disabled: !1,
30
34
  readOnly: !1,
31
35
  unvisible: !1,
32
36
  hideContent: !1
33
- }), r = g(null), $ = g(null), E = g(null), I = g(null), B = g(null), w = g(null), R = () => {
34
- var e;
35
- L((e = r == null ? void 0 : r.current) == null ? void 0 : e.getBoundingClientRect());
36
- }, ee = () => {
37
+ }), i = g(null), $ = g(null), y = g(null), L = g(null), B = g(null), R = g(null), k = () => {
38
+ V(i?.current?.getBoundingClientRect());
39
+ }, _ = () => {
37
40
  u(!1), c && setTimeout(() => {
38
- var e;
39
- v(!1), (e = r.current) == null || e.focus();
41
+ v(!1), i.current?.focus();
40
42
  }, 100);
41
- }, te = (e) => {
42
- var n;
43
- const t = !((n = w.current) != null && n.contains(e.relatedTarget));
43
+ }, ee = (e) => {
44
+ const t = !R.current?.contains(e.relatedTarget);
44
45
  !c && a && t && u(!1);
45
- }, P = (e) => {
46
- var t, n, C;
47
- if (Q && a && e && e.key && e.key === "Escape" && (e.preventDefault(), u(!1), (t = r.current) == null || t.focus()), a && c && e && e.key && e.key === "Tab") {
48
- const k = (n = B.current) == null ? void 0 : n.getElementsByClassName("navbutton"), se = ((C = B.current) == null ? void 0 : C.getElementsByClassName("-selectedday"))[0].firstChild, O = Array.from([...k, se]), _ = O[0], K = O[O.length - 1];
49
- e.shiftKey && document.activeElement === _ ? (e.preventDefault(), K.focus()) : !e.shiftKey && document.activeElement === K && (e.preventDefault(), _.focus());
46
+ }, I = (e) => {
47
+ if (Q && a && e && e.key && e.key === "Escape" && (e.preventDefault(), u(!1), i.current?.focus()), a && c && e && e.key && e.key === "Tab") {
48
+ const t = B.current?.getElementsByClassName("navbutton"), b = (B.current?.getElementsByClassName("-selectedday"))[0].firstChild, C = Array.from([...t, b]), M = C[0], K = C[C.length - 1];
49
+ e.shiftKey && document.activeElement === M ? (e.preventDefault(), K.focus()) : !e.shiftKey && document.activeElement === K && (e.preventDefault(), M.focus());
50
50
  }
51
51
  e.stopPropagation();
52
- }, b = () => {
53
- var n;
54
- const e = (n = r.current) == null ? void 0 : n.getBoundingClientRect(), t = e && e.bottom;
55
- E && E.current && e && (E.current.style.top = String(t).concat("px"));
56
- }, T = () => {
57
- var e;
58
- u(!0), r.current && (r.current.focus(), L((e = r.current) == null ? void 0 : e.getBoundingClientRect())), c && setTimeout(() => {
59
- var t;
60
- (t = I.current) == null || t.focus();
52
+ }, E = () => {
53
+ const e = i.current?.getBoundingClientRect(), t = e && e.bottom;
54
+ y && y.current && e && (y.current.style.top = String(t).concat("px"));
55
+ }, P = () => {
56
+ u(!0), i.current && (i.current.focus(), V(i.current?.getBoundingClientRect())), c && setTimeout(() => {
57
+ L.current?.focus();
61
58
  }, 100);
59
+ }, te = (e) => {
60
+ n.onFocus && n.onFocus(e), q && !a && !Y && P();
62
61
  }, ne = (e) => {
63
- o.onFocus && o.onFocus(e), q && !a && !Y && T();
62
+ n.onBlur && n.onBlur(e);
64
63
  }, oe = (e) => {
65
- o.onBlur && o.onBlur(e);
66
- }, re = (e) => {
67
64
  if (typeof e == "object" && !(e instanceof Date)) {
68
- const t = l(e.initial, f, !0).isValid(), n = l(e.final, f, !0).isValid();
69
- return t && n;
65
+ const t = s(e.initial, f, !0).isValid(), o = s(e.final, f, !0).isValid();
66
+ return t && o;
70
67
  }
71
- return l(e, f, !0).isValid();
72
- }, N = (e, t = "") => {
68
+ return s(e, f, !0).isValid();
69
+ }, T = (e, t = "") => {
73
70
  if (typeof t == "string") {
74
- const n = e.target.value ?? "";
75
- if (o.onChange) {
76
- if (re(n)) {
77
- const k = { target: { value: l(n, f).format(h), name: e.target.name } };
78
- o.onChange(k, n);
71
+ const o = e.target.value ?? "";
72
+ if (n.onChange) {
73
+ if (oe(o)) {
74
+ const C = {
75
+ target: {
76
+ value: s(o, f).format(h),
77
+ name: e.target.name
78
+ }
79
+ };
80
+ n.onChange(C, o);
79
81
  } else if (e.target.value === "") {
80
- const C = { target: { value: "", name: e.target.name } };
81
- o.onChange(C, n), u(!1), D(void 0);
82
+ const b = {
83
+ target: {
84
+ value: "",
85
+ name: e.target.name
86
+ }
87
+ };
88
+ n.onChange(b, o), u(!1), D(void 0);
82
89
  }
83
90
  }
84
91
  }
85
- }, A = (e, t) => {
86
- var n;
87
- a && U && ((n = r.current) == null || n.focus()), o.onComplete && o.onComplete(t, e), o.onChange && N({ target: { value: e, name: H } }, e), G && u(!1), D(l(e, f));
88
- }, ie = () => o.disabled || s && (s.disabled || s.hideContent), ae = () => {
89
- if (S)
90
- return /* @__PURE__ */ d.jsx(
91
- de,
92
- {
93
- disabled: ie(),
94
- tabIndex: -1,
95
- customClass: "calendar-button",
96
- iconName: "calendar",
97
- title: a ? "Fechar Calendário" : "Abrir Calendário",
98
- onClick: () => {
99
- a ? u(!1) : T();
100
- },
101
- targetRef: (e) => {
102
- $.current = e;
103
- }
104
- },
105
- "button-open-date-picker"
106
- );
107
- }, z = (e, t) => /* @__PURE__ */ d.jsx(
108
- me,
109
- {
110
- colorStyle: t,
111
- currentDate: e !== void 0 ? e : l(),
112
- onDateChange: (n) => {
113
- A(n.format(f), void 0), c && v(!1);
114
- },
115
- currentDateButton: (n) => I.current = n,
116
- calendarContainer: (n) => {
117
- B.current = n;
118
- }
119
- }
120
- ), le = () => s && s.readOnly ? null : c ? /* @__PURE__ */ d.jsx(
121
- ce,
122
- {
123
- dialogSize: J,
124
- handlerClose: ee,
125
- children: z(y, o == null ? void 0 : o.calendarColorStyle)
126
- }
127
- ) : /* @__PURE__ */ d.jsx(
128
- ue,
129
- {
130
- showButtonOpen: S,
131
- inputDimensions: X,
132
- containerRef: w,
133
- dropdownRef: (e) => {
134
- E.current = e;
135
- },
136
- children: z(y, o == null ? void 0 : o.calendarColorStyle)
137
- }
138
- );
139
- if (F(() => {
140
- i && l(i, h).format() !== "Invalid date" && l(j, h).format() !== l(i, h).format() ? (D(l(i, h)), V(i)) : !i && i !== j && (D(void 0), V(i));
141
- }, [i]), F(() => (window.addEventListener("resize", R), document.addEventListener("keydown", P), r.current && R(), a && c && v(!0), () => {
142
- window.removeEventListener("resize", R), document.removeEventListener("keydown", P);
143
- }), [r.current, a]), F(() => {
144
- var e;
145
- return document.addEventListener("scroll", b), (e = document.getElementById("modal-dialog-content")) == null || e.addEventListener("scroll", b), () => {
146
- var t;
147
- document.removeEventListener("scroll", b), (t = document.getElementById("modal-dialog-content")) == null || t.removeEventListener("scroll", b);
148
- };
149
- }, []), s && s.unvisible) return null;
150
- const M = () => /* @__PURE__ */ d.jsxs("div", { ref: w, onBlur: te, className: "datepicker-container", children: [
151
- /* @__PURE__ */ d.jsx(
152
- ge,
153
- {
154
- ...o,
155
- gridLayout: void 0,
156
- value: y ? y.format(f) : " ",
157
- mask: "00/00/0000",
158
- onComplete: (e, t) => {
159
- t && A(t, e);
160
- },
161
- onBlur: oe,
162
- onFocus: (e) => {
163
- ne(e);
164
- },
165
- onChange: (e, t) => {
166
- t && N(e, t);
167
- },
168
- inputRef: (e) => {
169
- r.current = e, p && (p.current = e);
170
- },
171
- rightElements: ae(),
172
- required: W,
173
- handlerSetOnDenied: () => Z(s)
92
+ }, N = (e, t) => {
93
+ a && U && i.current?.focus(), n.onComplete && n.onComplete(t, e), n.onChange && T({
94
+ target: {
95
+ value: e,
96
+ name: H
174
97
  }
175
- ),
176
- a && le()
98
+ }, e), G && u(!1), D(s(e, f));
99
+ }, re = () => n.disabled || l && (l.disabled || l.hideContent), ie = () => {
100
+ if (O)
101
+ return /* @__PURE__ */ d.jsx(ce, { disabled: re(), tabIndex: -1, customClass: "calendar-button", iconName: "calendar", title: a ? "Fechar Calendário" : "Abrir Calendário", onClick: () => {
102
+ a ? u(!1) : P();
103
+ }, targetRef: (e) => {
104
+ $.current = e;
105
+ } }, "button-open-date-picker");
106
+ }, A = (e, t) => /* @__PURE__ */ d.jsx(de, { colorStyle: t, currentDate: e !== void 0 ? e : s(), onDateChange: (o) => {
107
+ N(o.format(f), void 0), c && v(!1);
108
+ }, currentDateButton: (o) => L.current = o, calendarContainer: (o) => {
109
+ B.current = o;
110
+ } }), ae = () => l && l.readOnly ? null : c ? /* @__PURE__ */ d.jsx(se, { dialogSize: J, handlerClose: _, children: A(p, n?.calendarColorStyle) }) : /* @__PURE__ */ d.jsx(le, { showButtonOpen: O, inputDimensions: X, containerRef: R, dropdownRef: (e) => {
111
+ y.current = e;
112
+ }, children: A(p, n?.calendarColorStyle) });
113
+ if (w(() => {
114
+ r && s(r, h).format() !== "Invalid date" && s(x, h).format() !== s(r, h).format() ? (D(s(r, h)), j(r)) : !r && r !== x && (D(void 0), j(r));
115
+ }, [r]), w(() => (window.addEventListener("resize", k), document.addEventListener("keydown", I), i.current && k(), a && c && v(!0), () => {
116
+ window.removeEventListener("resize", k), document.removeEventListener("keydown", I);
117
+ }), [i.current, a]), w(() => (document.addEventListener("scroll", E), document.getElementById("modal-dialog-content")?.addEventListener("scroll", E), () => {
118
+ document.removeEventListener("scroll", E), document.getElementById("modal-dialog-content")?.removeEventListener("scroll", E);
119
+ }), []), l && l.unvisible) return null;
120
+ const z = () => /* @__PURE__ */ d.jsxs("div", { ref: R, onBlur: ee, className: "datepicker-container", children: [
121
+ /* @__PURE__ */ d.jsx(fe, { ...n, gridLayout: void 0, value: p ? p.format(f) : " ", mask: "00/00/0000", onComplete: (e, t) => {
122
+ t && N(t, e);
123
+ }, onBlur: ne, onFocus: (e) => {
124
+ te(e);
125
+ }, onChange: (e, t) => {
126
+ t && T(e, t);
127
+ }, inputRef: (e) => {
128
+ i.current = e, F && (F.current = e);
129
+ }, rightElements: ie(), required: W, handlerSetOnDenied: () => Z(l) }),
130
+ a && ae()
177
131
  ] });
178
- return x ? /* @__PURE__ */ d.jsx(fe, { customClass: "-withinput", cols: x, children: M() }) : M();
132
+ return S ? /* @__PURE__ */ d.jsx(ue, { customClass: "-withinput", cols: S, children: z() }) : z();
179
133
  };
180
134
  export {
181
- xe as default
135
+ Fe as default
182
136
  };
@@ -1,16 +1,24 @@
1
- import { j as n } from "../../chunks/jsx-runtime.CYK1ROHF.js";
2
- import { forwardRef as o } from "react";
3
- import '../../assets/index7.css';const i = o(({
4
- customClass: e = "",
5
- messages: r,
6
- style: s
7
- }, t) => {
8
- if (!r || r.length === 0) return null;
9
- const a = Array.isArray(r) ? r : [r];
10
- return /* @__PURE__ */ n.jsx("p", { ref: t, style: s, className: `errormessages-component ${e}`, children: a.join(", ") });
1
+ import { j as f } from "../../chunks/jsx-runtime.D1SHvdVE.js";
2
+ import { c as u } from "../../chunks/compiler-runtime.Cu50tn6L.js";
3
+ import { forwardRef as g } from "react";
4
+ import '../../assets/index7.css';const d = g((c, a) => {
5
+ const s = u.c(9), {
6
+ customClass: i,
7
+ messages: e,
8
+ style: m
9
+ } = c, p = i === void 0 ? "" : i;
10
+ if (!e || e.length === 0)
11
+ return null;
12
+ let r;
13
+ s[0] !== e ? (r = Array.isArray(e) ? e : [e], s[0] = e, s[1] = r) : r = s[1];
14
+ const l = r, n = `errormessages-component ${p}`;
15
+ let t;
16
+ s[2] !== l ? (t = l.join(", "), s[2] = l, s[3] = t) : t = s[3];
17
+ let o;
18
+ return s[4] !== a || s[5] !== m || s[6] !== n || s[7] !== t ? (o = /* @__PURE__ */ f.jsx("p", { ref: a, style: m, className: n, children: t }), s[4] = a, s[5] = m, s[6] = n, s[7] = t, s[8] = o) : o = s[8], o;
11
19
  });
12
- i.displayName = "ErrorMessage";
20
+ d.displayName = "ErrorMessage";
13
21
  export {
14
- i as ErrorMessage,
15
- i as default
22
+ d as ErrorMessage,
23
+ d as default
16
24
  };