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,18 +1,17 @@
1
- import { j as a } from "../../chunks/jsx-runtime.C7wFtzyj.js";
2
- import { B as o } from "../../chunks/index.CM1aLH2W.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,7 +1,13 @@
1
1
  import { useRef as a, useEffect as o } from "react";
2
2
  import d from "react-dom";
3
3
  const p = 24, m = 250, h = (n) => {
4
- const { containerRef: r, showButtonOpen: i, dropdownRef: u, children: s, inputDimensions: e } = n, t = a(document.createElement("div")), c = e && e.width + (i ? p : 0) + 4 || m;
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;
5
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), () => {
6
12
  r.current?.removeChild(t.current);
7
13
  }), []), o(() => {
@@ -1,8 +1,9 @@
1
- import { j as d } from "../../chunks/jsx-runtime.C7wFtzyj.js";
1
+ import { j as d } from "../../chunks/jsx-runtime.D1SHvdVE.js";
2
2
  import { useState as m, useRef as g, useEffect as w } from "react";
3
3
  import { h as s } from "../../chunks/moment.DMLRxgRE.js";
4
4
  import se from "./Dialog.js";
5
5
  import le from "./Dropdown.js";
6
+ import "../../chunks/compiler-runtime.Cu50tn6L.js";
6
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 */
@@ -11,28 +12,31 @@ import ue from "../../gridlayout/GridCol.js";
11
12
  import de from "../../calendar/base/index.js";
12
13
  import fe from "../mask/BaseMask.js";
13
14
  import { getMomentValue as me, EN_US_FORMAT as h, PT_BR_FORMAT as f } from "./helpers.js";
14
- const Oe = (n) => {
15
+ const Fe = (n) => {
15
16
  const {
16
17
  showButtonOpen: O = !0,
17
- openOnFocus: K = !0,
18
- shouldCloseOnSelect: q = !0,
19
- setFocusOnSelect: G = !0,
18
+ openOnFocus: q = !0,
19
+ shouldCloseOnSelect: G = !0,
20
+ setFocusOnSelect: U = !0,
20
21
  showCalendarInDialog: c = !1,
21
- required: U = !1,
22
+ required: W = !1,
22
23
  value: r = "",
23
- name: W = "",
24
+ name: H = "",
24
25
  inputRef: F,
25
- dialogSize: H = { width: "384px", height: "384px" },
26
+ dialogSize: J = {
27
+ width: "384px",
28
+ height: "384px"
29
+ },
26
30
  gridLayout: S,
27
- shouldCloseOnEsc: J = !0
28
- } = n, [p, D] = m(r ? me(r) : void 0), [a, u] = m(!1), [x, j] = m(r), [Q, V] = m(), [X, v] = m(!1), [l, Y] = m({
31
+ shouldCloseOnEsc: Q = !0
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
- }), i = g(null), Z = g(null), y = g(null), L = g(null), B = g(null), R = g(null), k = () => {
37
+ }), i = g(null), $ = g(null), y = g(null), L = g(null), B = g(null), R = g(null), k = () => {
34
38
  V(i?.current?.getBoundingClientRect());
35
- }, $ = () => {
39
+ }, _ = () => {
36
40
  u(!1), c && setTimeout(() => {
37
41
  v(!1), i.current?.focus();
38
42
  }, 100);
@@ -40,9 +44,9 @@ const Oe = (n) => {
40
44
  const t = !R.current?.contains(e.relatedTarget);
41
45
  !c && a && t && u(!1);
42
46
  }, I = (e) => {
43
- if (J && a && e && e.key && e.key === "Escape" && (e.preventDefault(), u(!1), i.current?.focus()), a && c && e && e.key && e.key === "Tab") {
44
- const t = B.current?.getElementsByClassName("navbutton"), b = (B.current?.getElementsByClassName("-selectedday"))[0].firstChild, C = Array.from([...t, b]), M = C[0], _ = C[C.length - 1];
45
- e.shiftKey && document.activeElement === M ? (e.preventDefault(), _.focus()) : !e.shiftKey && document.activeElement === _ && (e.preventDefault(), M.focus());
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());
46
50
  }
47
51
  e.stopPropagation();
48
52
  }, E = () => {
@@ -53,7 +57,7 @@ const Oe = (n) => {
53
57
  L.current?.focus();
54
58
  }, 100);
55
59
  }, te = (e) => {
56
- n.onFocus && n.onFocus(e), K && !a && !X && P();
60
+ n.onFocus && n.onFocus(e), q && !a && !Y && P();
57
61
  }, ne = (e) => {
58
62
  n.onBlur && n.onBlur(e);
59
63
  }, oe = (e) => {
@@ -67,67 +71,45 @@ const Oe = (n) => {
67
71
  const o = e.target.value ?? "";
68
72
  if (n.onChange) {
69
73
  if (oe(o)) {
70
- const C = { target: { value: s(o, f).format(h), name: e.target.name } };
74
+ const C = {
75
+ target: {
76
+ value: s(o, f).format(h),
77
+ name: e.target.name
78
+ }
79
+ };
71
80
  n.onChange(C, o);
72
81
  } else if (e.target.value === "") {
73
- const b = { target: { value: "", name: e.target.name } };
82
+ const b = {
83
+ target: {
84
+ value: "",
85
+ name: e.target.name
86
+ }
87
+ };
74
88
  n.onChange(b, o), u(!1), D(void 0);
75
89
  }
76
90
  }
77
91
  }
78
92
  }, N = (e, t) => {
79
- a && G && i.current?.focus(), n.onComplete && n.onComplete(t, e), n.onChange && T({ target: { value: e, name: W } }, e), q && u(!1), D(s(e, f));
93
+ a && U && i.current?.focus(), n.onComplete && n.onComplete(t, e), n.onChange && T({
94
+ target: {
95
+ value: e,
96
+ name: H
97
+ }
98
+ }, e), G && u(!1), D(s(e, f));
80
99
  }, re = () => n.disabled || l && (l.disabled || l.hideContent), ie = () => {
81
100
  if (O)
82
- return /* @__PURE__ */ d.jsx(
83
- ce,
84
- {
85
- disabled: re(),
86
- tabIndex: -1,
87
- customClass: "calendar-button",
88
- iconName: "calendar",
89
- title: a ? "Fechar Calendário" : "Abrir Calendário",
90
- onClick: () => {
91
- a ? u(!1) : P();
92
- },
93
- targetRef: (e) => {
94
- Z.current = e;
95
- }
96
- },
97
- "button-open-date-picker"
98
- );
99
- }, A = (e, t) => /* @__PURE__ */ d.jsx(
100
- de,
101
- {
102
- colorStyle: t,
103
- currentDate: e !== void 0 ? e : s(),
104
- onDateChange: (o) => {
105
- N(o.format(f), void 0), c && v(!1);
106
- },
107
- currentDateButton: (o) => L.current = o,
108
- calendarContainer: (o) => {
109
- B.current = o;
110
- }
111
- }
112
- ), ae = () => l && l.readOnly ? null : c ? /* @__PURE__ */ d.jsx(
113
- se,
114
- {
115
- dialogSize: H,
116
- handlerClose: $,
117
- children: A(p, n?.calendarColorStyle)
118
- }
119
- ) : /* @__PURE__ */ d.jsx(
120
- le,
121
- {
122
- showButtonOpen: O,
123
- inputDimensions: Q,
124
- containerRef: R,
125
- dropdownRef: (e) => {
126
- y.current = e;
127
- },
128
- children: A(p, n?.calendarColorStyle)
129
- }
130
- );
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) });
131
113
  if (w(() => {
132
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));
133
115
  }, [r]), w(() => (window.addEventListener("resize", k), document.addEventListener("keydown", I), i.current && k(), a && c && v(!0), () => {
@@ -136,35 +118,19 @@ const Oe = (n) => {
136
118
  document.removeEventListener("scroll", E), document.getElementById("modal-dialog-content")?.removeEventListener("scroll", E);
137
119
  }), []), l && l.unvisible) return null;
138
120
  const z = () => /* @__PURE__ */ d.jsxs("div", { ref: R, onBlur: ee, className: "datepicker-container", children: [
139
- /* @__PURE__ */ d.jsx(
140
- fe,
141
- {
142
- ...n,
143
- gridLayout: void 0,
144
- value: p ? p.format(f) : " ",
145
- mask: "00/00/0000",
146
- onComplete: (e, t) => {
147
- t && N(t, e);
148
- },
149
- onBlur: ne,
150
- onFocus: (e) => {
151
- te(e);
152
- },
153
- onChange: (e, t) => {
154
- t && T(e, t);
155
- },
156
- inputRef: (e) => {
157
- i.current = e, F && (F.current = e);
158
- },
159
- rightElements: ie(),
160
- required: U,
161
- handlerSetOnDenied: () => Y(l)
162
- }
163
- ),
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) }),
164
130
  a && ae()
165
131
  ] });
166
132
  return S ? /* @__PURE__ */ d.jsx(ue, { customClass: "-withinput", cols: S, children: z() }) : z();
167
133
  };
168
134
  export {
169
- Oe as default
135
+ Fe as default
170
136
  };
@@ -1,16 +1,24 @@
1
- import { j as n } from "../../chunks/jsx-runtime.C7wFtzyj.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
  };
@@ -1,70 +1,68 @@
1
- import { j as e } from "../../chunks/jsx-runtime.C7wFtzyj.js";
2
- import { useState as g } from "react";
3
- import { _ as C } from "../../chunks/lodash.CIAK_hAg.js";
4
- import b from "../base/InputTextBase.js";
5
- import F from "./FileButtonSettings.js";
6
- import y from "../../buttons/Button.js";
7
- import B from "../../icons/index.js";
1
+ import { j as i } from "../../chunks/jsx-runtime.D1SHvdVE.js";
2
+ import { c as S } from "../../chunks/compiler-runtime.Cu50tn6L.js";
3
+ import { useState as $ } from "react";
4
+ import { _ as k } from "../../chunks/lodash.CIAK_hAg.js";
5
+ import z from "../base/InputTextBase.js";
6
+ import L from "./FileButtonSettings.js";
7
+ import _ from "../../buttons/Button.js";
8
+ import P from "../../icons/index.js";
8
9
  import '../../assets/button.css';import '../../assets/DefaultFile.css';/* empty css */
9
- import E from "../../popover/index.js";
10
- import I from "../../popover/PopoverText.js";
11
- const T = (n) => {
12
- const {
13
- id: l = "file",
14
- accept: r = "image/*",
15
- onBtnClickInsert: c,
16
- onBtnClickRemove: m,
17
- inputRef: p,
18
- defaultFiles: d,
19
- hint: f = [],
20
- onChange: u
21
- } = n, x = (s) => s?.length ? C.map(s, (t) => t) : [], [i, a] = g(d), o = i instanceof Array && i.length > 0, h = () => /* @__PURE__ */ e.jsx("div", { className: `size-position-icon ${o ? "" : "-disabled-popover"}`, children: /* @__PURE__ */ e.jsx(E, { iconSize: 16, children: /* @__PURE__ */ e.jsxs(I, { children: [
22
- /* @__PURE__ */ e.jsx("strong", { children: "Arquivos" }),
23
- /* @__PURE__ */ e.jsx("br", {}),
24
- o && i.map((s) => /* @__PURE__ */ e.jsx("div", { className: "list-simple-file", children: /* @__PURE__ */ e.jsx("div", { className: "file-name", children: /* @__PURE__ */ e.jsx("span", { children: s.name }) }) }, `${s.name}${s.size}`))
25
- ] }) }) }), j = () => /* @__PURE__ */ e.jsx(
26
- y,
27
- {
28
- disabled: !o,
29
- className: "-pointerEventsRemove",
30
- transparent: !0,
31
- boxShadow: !1,
32
- onClick: () => {
33
- m(), a([]);
34
- },
35
- icon: /* @__PURE__ */ e.jsx(B, { customClass: "colorIconUpload", name: "close" })
36
- }
37
- ), v = (s) => {
38
- s.preventDefault?.();
39
- const t = x(s.target.files);
40
- a(t), u?.(t, s);
41
- };
42
- return /* @__PURE__ */ e.jsx("div", { className: "input-simple-file-container", children: /* @__PURE__ */ e.jsxs(
43
- b,
44
- {
45
- ...n,
46
- hint: f,
47
- readOnlyClass: "-disabledVisualApply",
48
- customClassForInputContent: "-absolute -pointEventDisabled -disabledVisualApply",
49
- type: "file",
50
- id: l,
51
- accept: r,
52
- inputRef: p,
53
- onChange: v,
54
- rightElements: /* @__PURE__ */ e.jsx(
55
- F,
56
- {
57
- id: l,
58
- onBtnClickInsert: c
59
- }
60
- ),
61
- children: [
62
- h(),
63
- j()
64
- ]
65
- }
66
- ) });
10
+ import T from "../../popover/index.js";
11
+ import U from "../../popover/PopoverText.js";
12
+ const ee = (t) => {
13
+ const e = S.c(27), {
14
+ id: y,
15
+ accept: B,
16
+ onBtnClickInsert: x,
17
+ onBtnClickRemove: h,
18
+ inputRef: v,
19
+ defaultFiles: A,
20
+ hint: c,
21
+ onChange: j
22
+ } = t, n = y === void 0 ? "file" : y, g = B === void 0 ? "image/*" : B;
23
+ let m;
24
+ e[0] !== c ? (m = c === void 0 ? [] : c, e[0] = c, e[1] = m) : m = e[1];
25
+ const C = m, D = q, [a, I] = $(A), s = a instanceof Array && a.length > 0;
26
+ let p;
27
+ e[2] !== a || e[3] !== s ? (p = () => /* @__PURE__ */ i.jsx("div", { className: `size-position-icon ${s ? "" : "-disabled-popover"}`, children: /* @__PURE__ */ i.jsx(T, { iconSize: 16, children: /* @__PURE__ */ i.jsxs(U, { children: [
28
+ /* @__PURE__ */ i.jsx("strong", { children: "Arquivos" }),
29
+ /* @__PURE__ */ i.jsx("br", {}),
30
+ s && a.map(w)
31
+ ] }) }) }), e[2] = a, e[3] = s, e[4] = p) : p = e[4];
32
+ const b = p;
33
+ let f;
34
+ e[5] !== s || e[6] !== h ? (f = () => /* @__PURE__ */ i.jsx(_, { disabled: !s, className: "-pointerEventsRemove", transparent: !0, boxShadow: !1, onClick: () => {
35
+ h(), I([]);
36
+ }, icon: /* @__PURE__ */ i.jsx(P, { customClass: "colorIconUpload", name: "close" }) }), e[5] = s, e[6] = h, e[7] = f) : f = e[7];
37
+ const F = f;
38
+ let d;
39
+ e[8] !== j ? (d = (R) => {
40
+ R.preventDefault?.();
41
+ const N = D(R.target.files);
42
+ I(N), j?.(N, R);
43
+ }, e[8] = j, e[9] = d) : d = e[9];
44
+ const E = d;
45
+ let o;
46
+ e[10] !== n || e[11] !== x ? (o = /* @__PURE__ */ i.jsx(L, { id: n, onBtnClickInsert: x }), e[10] = n, e[11] = x, e[12] = o) : o = e[12];
47
+ let l;
48
+ e[13] !== b ? (l = b(), e[13] = b, e[14] = l) : l = e[14];
49
+ let r;
50
+ e[15] !== F ? (r = F(), e[15] = F, e[16] = r) : r = e[16];
51
+ let u;
52
+ return e[17] !== g || e[18] !== E || e[19] !== C || e[20] !== n || e[21] !== v || e[22] !== t || e[23] !== o || e[24] !== l || e[25] !== r ? (u = /* @__PURE__ */ i.jsx("div", { className: "input-simple-file-container", children: /* @__PURE__ */ i.jsxs(z, { ...t, hint: C, readOnlyClass: "-disabledVisualApply", customClassForInputContent: "-absolute -pointEventDisabled -disabledVisualApply", type: "file", id: n, accept: g, inputRef: v, onChange: E, rightElements: o, children: [
53
+ l,
54
+ r
55
+ ] }) }), e[17] = g, e[18] = E, e[19] = C, e[20] = n, e[21] = v, e[22] = t, e[23] = o, e[24] = l, e[25] = r, e[26] = u) : u = e[26], u;
67
56
  };
57
+ function V(t) {
58
+ return t;
59
+ }
60
+ function q(t) {
61
+ return t?.length ? k.map(t, V) : [];
62
+ }
63
+ function w(t) {
64
+ return /* @__PURE__ */ i.jsx("div", { className: "list-simple-file", children: /* @__PURE__ */ i.jsx("div", { className: "file-name", children: /* @__PURE__ */ i.jsx("span", { children: t.name }) }) }, `${t.name}${t.size}`);
65
+ }
68
66
  export {
69
- T as default
67
+ ee as default
70
68
  };
@@ -1,6 +1,7 @@
1
- import { j as t } from "../../chunks/jsx-runtime.C7wFtzyj.js";
1
+ import { j as t } from "../../chunks/jsx-runtime.D1SHvdVE.js";
2
2
  import { useState as D, Fragment as w } from "react";
3
3
  import { _ as ee } from "../../chunks/lodash.CIAK_hAg.js";
4
+ import "../../chunks/compiler-runtime.Cu50tn6L.js";
4
5
  import "../../buttons/DefaultButton.js";
5
6
  import S from "../../buttons/PrimaryButton.js";
6
7
  import $ from "../../buttons/DangerButton.js";
@@ -9,7 +10,7 @@ import '../../assets/button.css';/* empty css */
9
10
  import te from "../base/InputTextBase.js";
10
11
  import se from "../../hint/index.js";
11
12
  import { ErrorMessage as ae } from "../errorMessage/index.js";
12
- const q = (n) => n?.length ? ee.map(n, (i) => i) : [], g = (n) => n.split(",").map((i) => i.includes(".") ? i.split(".")[1] : i.split("/")[1]).join(", "), re = (n) => n.split(", "), xe = (n) => {
13
+ const q = (n) => n?.length ? ee.map(n, (i) => i) : [], g = (n) => n.split(",").map((i) => i.includes(".") ? i.split(".")[1] : i.split("/")[1]).join(", "), re = (n) => n.split(", "), he = (n) => {
13
14
  const {
14
15
  id: i = Math.random().toString(36).substring(2, 7),
15
16
  accept: o = "image/png, image/jpeg",
@@ -23,20 +24,20 @@ const q = (n) => n?.length ? ee.map(n, (i) => i) : [], g = (n) => n.split(",").m
23
24
  onDragOver: P,
24
25
  onDragLeave: U,
25
26
  onDrop: I,
26
- showSubtitle: _ = !0,
27
+ showSubtitle: H = !0,
27
28
  multiple: x = !1,
28
29
  hint: R = [],
29
- hintPosition: H = "below",
30
- errorMessages: W = [],
30
+ hintPosition: W = "below",
31
+ errorMessages: G = [],
31
32
  skeletonize: b = !1
32
- } = n, [G, N] = D(!1), [r, h] = D([]), [j, T] = D(!1), [c, m] = D({
33
+ } = n, [J, N] = D(!1), [r, h] = D([]), [j, T] = D(!1), [c, m] = D({
33
34
  class: "",
34
35
  text: u,
35
36
  subtitle: f + g(o),
36
37
  error: !1
37
38
  }), v = (e) => {
38
39
  e.preventDefault?.(), e.stopPropagation?.();
39
- }, J = (e, s, a) => {
40
+ }, K = (e, s, a) => {
40
41
  T(!1), s.forEach((l) => (!j && e.indexOf(l) === -1 && T(!0), j)), !x && (a.dataTransfer.items.length > 1 || r.length > 0) ? m({
41
42
  class: "disapprovedFile",
42
43
  text: "Não é permitido anexar mais de um arquivo.",
@@ -53,12 +54,12 @@ const q = (n) => n?.length ? ee.map(n, (i) => i) : [], g = (n) => n.split(",").m
53
54
  subtitle: f + g(o),
54
55
  error: !1
55
56
  });
56
- }, K = (e) => {
57
+ }, Q = (e) => {
57
58
  let s = [];
58
59
  return e.dataTransfer.items && Array.from(e.dataTransfer.items).map((a) => (s.indexOf(a.type) === -1 && (s = [...s, a.type]), s)), s;
59
60
  }, k = (e) => {
60
- const s = re(o), a = K(e);
61
- J(s, a, e), v(e), N(!0), M?.(e);
61
+ const s = re(o), a = Q(e);
62
+ K(s, a, e), v(e), N(!0), M?.(e);
62
63
  }, B = (e) => {
63
64
  m({
64
65
  class: "",
@@ -74,7 +75,9 @@ const q = (n) => n?.length ? ee.map(n, (i) => i) : [], g = (n) => n.split(",").m
74
75
  if (s && !c.error) {
75
76
  const a = q(s.files);
76
77
  if (a.length > 0) {
77
- const l = r.concat(a), y = l.map((d) => d.name), p = l.filter(({ name: d }, Z) => !y.includes(d, Z + 1));
78
+ const l = r.concat(a), y = l.map((d) => d.name), p = l.filter(({
79
+ name: d
80
+ }, _) => !y.includes(d, _ + 1));
78
81
  h(p), C?.(a, e), I?.(e);
79
82
  }
80
83
  }
@@ -84,106 +87,49 @@ const q = (n) => n?.length ? ee.map(n, (i) => i) : [], g = (n) => n.split(",").m
84
87
  subtitle: f + g(o),
85
88
  error: !1
86
89
  });
87
- }, Q = (e) => {
90
+ }, V = (e) => {
88
91
  e.preventDefault?.();
89
92
  const s = q(e.target.files);
90
93
  if (s.length > 0 && !j) {
91
- const a = r.concat(s), l = a.map((p) => p.name), y = a.filter(({ name: p }, d) => !l.includes(p, d + 1));
94
+ const a = r.concat(s), l = a.map((p) => p.name), y = a.filter(({
95
+ name: p
96
+ }, d) => !l.includes(p, d + 1));
92
97
  h(y), C?.(s, e);
93
98
  }
94
- }, V = () => h([]), X = (e) => {
99
+ }, X = () => h([]), Y = (e) => {
95
100
  h((s) => s.filter((a) => a.name !== e));
96
- }, Y = () => r?.length === 1 ? /* @__PURE__ */ t.jsxs(w, { children: [
101
+ }, Z = () => r?.length === 1 ? /* @__PURE__ */ t.jsxs(w, { children: [
97
102
  r[0].type === "image/jpeg" || r[0].type === "image/png" ? /* @__PURE__ */ t.jsx("img", { alt: r[0].name, src: URL.createObjectURL(r[0]) }) : /* @__PURE__ */ t.jsx(F, { size: 64, name: "file_excel" }),
98
103
  /* @__PURE__ */ t.jsx("div", { className: "image-preview-solo", children: /* @__PURE__ */ t.jsx("div", { className: "description-file", children: /* @__PURE__ */ t.jsx("span", { className: "subtitle", children: r[0].name }) }) })
99
- ] }) : /* @__PURE__ */ t.jsx("ul", { className: "file-list", children: r.length > 0 && r.map((e) => /* @__PURE__ */ t.jsxs(
100
- "li",
101
- {
102
- className: "file-card",
103
- children: [
104
- /* @__PURE__ */ t.jsx(
105
- $,
106
- {
107
- transparent: !0,
108
- boxShadow: !1,
109
- className: "delete-button",
110
- onClick: () => X(e.name),
111
- icon: /* @__PURE__ */ t.jsx(F, { customClass: "color-icon-upload", name: "close" })
112
- }
113
- ),
114
- /* @__PURE__ */ t.jsx("div", { className: "image-content", children: (e.type === "image/jpeg" || e.type === "image/png") && /* @__PURE__ */ t.jsx(
115
- "img",
116
- {
117
- alt: e.name,
118
- className: "image-preview",
119
- src: URL.createObjectURL(e)
120
- }
121
- ) }),
122
- /* @__PURE__ */ t.jsx("div", { className: "description-file", children: /* @__PURE__ */ t.jsx("span", { className: "subtitle", children: e.name }) })
123
- ]
124
- },
125
- `${e.name}${e.size}`
126
- )) });
104
+ ] }) : /* @__PURE__ */ t.jsx("ul", { className: "file-list", children: r.length > 0 && r.map((e) => /* @__PURE__ */ t.jsxs("li", { className: "file-card", children: [
105
+ /* @__PURE__ */ t.jsx($, { transparent: !0, boxShadow: !1, className: "delete-button", onClick: () => Y(e.name), icon: /* @__PURE__ */ t.jsx(F, { customClass: "color-icon-upload", name: "close" }) }),
106
+ /* @__PURE__ */ t.jsx("div", { className: "image-content", children: (e.type === "image/jpeg" || e.type === "image/png") && /* @__PURE__ */ t.jsx("img", { alt: e.name, className: "image-preview", src: URL.createObjectURL(e) }) }),
107
+ /* @__PURE__ */ t.jsx("div", { className: "description-file", children: /* @__PURE__ */ t.jsx("span", { className: "subtitle", children: e.name }) })
108
+ ] }, `${e.name}${e.size}`)) });
127
109
  return /* @__PURE__ */ t.jsxs("div", { className: "input-dragdrop-container", onDragEnter: k, onSubmit: (e) => e.preventDefault(), children: [
128
110
  /* @__PURE__ */ t.jsxs("div", { className: `drag-content ${b ? "-skeletonized" : ""}`, children: [
129
111
  /* @__PURE__ */ t.jsx("div", { className: `${c.class} ${b ? "" : "content"}`, children: c.error || r.length === 0 ? /* @__PURE__ */ t.jsxs("label", { htmlFor: i, children: [
130
- /* @__PURE__ */ t.jsx("h1", { className: "title", style: { paddingBottom: "20px" }, children: c.text }),
131
- _ && /* @__PURE__ */ t.jsx("p", { className: "subtitle", children: c.subtitle }),
112
+ /* @__PURE__ */ t.jsx("h1", { className: "title", style: {
113
+ paddingBottom: "20px"
114
+ }, children: c.text }),
115
+ H && /* @__PURE__ */ t.jsx("p", { className: "subtitle", children: c.subtitle }),
132
116
  !b && /* @__PURE__ */ t.jsx(S, { onClick: A, label: L })
133
117
  ] }) : /* @__PURE__ */ t.jsxs(w, { children: [
134
- Y(),
118
+ Z(),
135
119
  /* @__PURE__ */ t.jsxs("footer", { className: "footer-button-action", children: [
136
- (!x && r.length < 1 || x) && /* @__PURE__ */ t.jsx(
137
- S,
138
- {
139
- className: "selectButton",
140
- onClick: A,
141
- label: L
142
- }
143
- ),
144
- /* @__PURE__ */ t.jsx(
145
- $,
146
- {
147
- className: "cancelButton",
148
- onClick: V,
149
- icon: /* @__PURE__ */ t.jsx(F, { name: "close", color: "white" }),
150
- label: "Limpar"
151
- }
152
- )
120
+ (!x && r.length < 1 || x) && /* @__PURE__ */ t.jsx(S, { className: "selectButton", onClick: A, label: L }),
121
+ /* @__PURE__ */ t.jsx($, { className: "cancelButton", onClick: X, icon: /* @__PURE__ */ t.jsx(F, { name: "close", color: "white" }), label: "Limpar" })
153
122
  ] })
154
123
  ] }) }),
155
- /* @__PURE__ */ t.jsx(
156
- te,
157
- {
158
- ...n,
159
- inputRef: z,
160
- style: { display: "none" },
161
- type: "file",
162
- id: i,
163
- accept: o,
164
- multiple: x,
165
- onDragOver: E,
166
- onDrop: O,
167
- onDragLeave: B,
168
- onChange: Q
169
- }
170
- ),
171
- G && /* @__PURE__ */ t.jsx(
172
- "div",
173
- {
174
- className: "drag-position-element",
175
- id: "dragFileElement",
176
- onDragEnter: k,
177
- onDragLeave: B,
178
- onDragOver: E,
179
- onDrop: O
180
- }
181
- )
124
+ /* @__PURE__ */ t.jsx(te, { ...n, inputRef: z, style: {
125
+ display: "none"
126
+ }, type: "file", id: i, accept: o, multiple: x, onDragOver: E, onDrop: O, onDragLeave: B, onChange: V }),
127
+ J && /* @__PURE__ */ t.jsx("div", { className: "drag-position-element", id: "dragFileElement", onDragEnter: k, onDragLeave: B, onDragOver: E, onDrop: O })
182
128
  ] }),
183
- /* @__PURE__ */ t.jsx(ae, { messages: W }),
184
- /* @__PURE__ */ t.jsx(se, { visible: !!R && H === "below", customClass: "hint", description: R })
129
+ /* @__PURE__ */ t.jsx(ae, { messages: G }),
130
+ /* @__PURE__ */ t.jsx(se, { visible: !!R && W === "below", customClass: "hint", description: R })
185
131
  ] });
186
132
  };
187
133
  export {
188
- xe as default
134
+ he as default
189
135
  };