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,71 +1,68 @@
1
- import { j as t } from "../../chunks/jsx-runtime.CYK1ROHF.js";
2
- import { useState as g } from "react";
3
- import C from "lodash";
4
- import F from "../base/InputTextBase.js";
5
- import y from "./FileButtonSettings.js";
6
- import B from "../../buttons/Button.js";
7
- import E 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 I from "../../popover/index.js";
10
- import N from "../../popover/PopoverText.js";
11
- const U = (l) => {
12
- const {
13
- id: r = "file",
14
- accept: m = "image/*",
15
- onBtnClickInsert: p,
16
- onBtnClickRemove: d,
17
- inputRef: u,
18
- defaultFiles: x,
19
- hint: f = [],
20
- onChange: i
21
- } = l, h = (e) => e != null && e.length ? C.map(e, (s) => s) : [], [o, a] = g(x), n = o instanceof Array && o.length > 0, j = () => /* @__PURE__ */ t.jsx("div", { className: `size-position-icon ${n ? "" : "-disabled-popover"}`, children: /* @__PURE__ */ t.jsx(I, { iconSize: 16, children: /* @__PURE__ */ t.jsxs(N, { children: [
22
- /* @__PURE__ */ t.jsx("strong", { children: "Arquivos" }),
23
- /* @__PURE__ */ t.jsx("br", {}),
24
- n && o.map((e) => /* @__PURE__ */ t.jsx("div", { className: "list-simple-file", children: /* @__PURE__ */ t.jsx("div", { className: "file-name", children: /* @__PURE__ */ t.jsx("span", { children: e.name }) }) }, `${e.name}${e.size}`))
25
- ] }) }) }), v = () => /* @__PURE__ */ t.jsx(
26
- B,
27
- {
28
- disabled: !n,
29
- className: "-pointerEventsRemove",
30
- transparent: !0,
31
- boxShadow: !1,
32
- onClick: () => {
33
- d(), a([]);
34
- },
35
- icon: /* @__PURE__ */ t.jsx(E, { customClass: "colorIconUpload", name: "close" })
36
- }
37
- ), b = (e) => {
38
- var c;
39
- (c = e.preventDefault) == null || c.call(e);
40
- const s = h(e.target.files);
41
- a(s), i == null || i(s, e);
42
- };
43
- return /* @__PURE__ */ t.jsx("div", { className: "input-simple-file-container", children: /* @__PURE__ */ t.jsxs(
44
- F,
45
- {
46
- ...l,
47
- hint: f,
48
- readOnlyClass: "-disabledVisualApply",
49
- customClassForInputContent: "-absolute -pointEventDisabled -disabledVisualApply",
50
- type: "file",
51
- id: r,
52
- accept: m,
53
- inputRef: u,
54
- onChange: b,
55
- rightElements: /* @__PURE__ */ t.jsx(
56
- y,
57
- {
58
- id: r,
59
- onBtnClickInsert: p
60
- }
61
- ),
62
- children: [
63
- j(),
64
- v()
65
- ]
66
- }
67
- ) });
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;
68
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
+ }
69
66
  export {
70
- U as default
67
+ ee as default
71
68
  };
@@ -1,191 +1,135 @@
1
- import { j as t } from "../../chunks/jsx-runtime.CYK1ROHF.js";
2
- import { useState as b, Fragment as M } from "react";
3
- import ee from "lodash";
1
+ import { j as t } from "../../chunks/jsx-runtime.D1SHvdVE.js";
2
+ import { useState as D, Fragment as w } from "react";
3
+ import { _ as ee } from "../../chunks/lodash.CIAK_hAg.js";
4
+ import "../../chunks/compiler-runtime.Cu50tn6L.js";
4
5
  import "../../buttons/DefaultButton.js";
5
- import P from "../../buttons/PrimaryButton.js";
6
- import U from "../../buttons/DangerButton.js";
7
- import B from "../../icons/index.js";
6
+ import S from "../../buttons/PrimaryButton.js";
7
+ import $ from "../../buttons/DangerButton.js";
8
+ import F from "../../icons/index.js";
8
9
  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 I = (i) => i != null && i.length ? ee.map(i, (n) => n) : [], g = (i) => i.split(",").map((n) => n.includes(".") ? n.split(".")[1] : n.split("/")[1]).join(", "), re = (i) => i.split(", "), xe = (i) => {
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
- id: n = Math.random().toString(36).substring(2, 7),
15
+ id: i = Math.random().toString(36).substring(2, 7),
15
16
  accept: o = "image/png, image/jpeg",
16
- labelButton: w = "Selecionar",
17
- subtitleDragDrop: u = "Selecione arquivos do tipo ",
18
- titleDragDrop: f = "Arquivo para importação",
19
- onBtnClickInsert: C,
20
- inputRef: _,
21
- onChange: m,
22
- onDragEnter: N,
23
- onDragOver: y,
24
- onDragLeave: D,
25
- onDrop: F,
17
+ labelButton: L = "Selecionar",
18
+ subtitleDragDrop: f = "Selecione arquivos do tipo ",
19
+ titleDragDrop: u = "Arquivo para importação",
20
+ onBtnClickInsert: A,
21
+ inputRef: z,
22
+ onChange: C,
23
+ onDragEnter: M,
24
+ onDragOver: P,
25
+ onDragLeave: U,
26
+ onDrop: I,
26
27
  showSubtitle: H = !0,
27
28
  multiple: x = !1,
28
- hint: S = [],
29
+ hint: R = [],
29
30
  hintPosition: W = "below",
30
31
  errorMessages: G = [],
31
- skeletonize: A = !1
32
- } = i, [J, R] = b(!1), [r, h] = b([]), [j, E] = b(!1), [p, d] = b({
32
+ skeletonize: b = !1
33
+ } = n, [J, N] = D(!1), [r, h] = D([]), [j, T] = D(!1), [c, m] = D({
33
34
  class: "",
34
- text: f,
35
- subtitle: u + g(o),
35
+ text: u,
36
+ subtitle: f + g(o),
36
37
  error: !1
37
38
  }), v = (e) => {
38
- var s, a;
39
- (s = e.preventDefault) == null || s.call(e), (a = e.stopPropagation) == null || a.call(e);
39
+ e.preventDefault?.(), e.stopPropagation?.();
40
40
  }, K = (e, s, a) => {
41
- E(!1), s.forEach((l) => (!j && e.indexOf(l) === -1 && E(!0), j)), !x && (a.dataTransfer.items.length > 1 || r.length > 0) ? d({
41
+ T(!1), s.forEach((l) => (!j && e.indexOf(l) === -1 && T(!0), j)), !x && (a.dataTransfer.items.length > 1 || r.length > 0) ? m({
42
42
  class: "disapprovedFile",
43
43
  text: "Não é permitido anexar mais de um arquivo.",
44
44
  subtitle: "",
45
45
  error: !0
46
- }) : d(j ? {
46
+ }) : m(j ? {
47
47
  class: "disapprovedFile",
48
48
  text: "Por favor, verifique a extensão do(s) arquivo(s) inserido(s).",
49
49
  subtitle: `Apenas as extensões ${g(o)} são permitidas.`,
50
50
  error: !0
51
51
  } : {
52
52
  class: "approvedFile",
53
- text: f,
54
- subtitle: u + g(o),
53
+ text: u,
54
+ subtitle: f + g(o),
55
55
  error: !1
56
56
  });
57
57
  }, Q = (e) => {
58
58
  let s = [];
59
59
  return e.dataTransfer.items && Array.from(e.dataTransfer.items).map((a) => (s.indexOf(a.type) === -1 && (s = [...s, a.type]), s)), s;
60
- }, O = (e) => {
60
+ }, k = (e) => {
61
61
  const s = re(o), a = Q(e);
62
- K(s, a, e), v(e), R(!0), N == null || N(e);
63
- }, $ = (e) => {
64
- d({
62
+ K(s, a, e), v(e), N(!0), M?.(e);
63
+ }, B = (e) => {
64
+ m({
65
65
  class: "",
66
- text: f,
67
- subtitle: u + g(o),
66
+ text: u,
67
+ subtitle: f + g(o),
68
68
  error: !1
69
- }), v(e), R(!1), D == null || D(e);
70
- }, q = (e) => {
71
- v(e), y == null || y(e);
72
- }, z = (e) => {
73
- v(e), R(!1);
69
+ }), v(e), N(!1), U?.(e);
70
+ }, E = (e) => {
71
+ v(e), P?.(e);
72
+ }, O = (e) => {
73
+ v(e), N(!1);
74
74
  const s = e.dataTransfer;
75
- if (s && !p.error) {
76
- const a = I(s.files);
75
+ if (s && !c.error) {
76
+ const a = q(s.files);
77
77
  if (a.length > 0) {
78
- const l = r.concat(a), T = l.map((c) => c.name), L = l.filter(({ name: c }, k) => !T.includes(c, k + 1));
79
- h(L), m == null || m(a, e), F == null || F(e);
78
+ const l = r.concat(a), y = l.map((d) => d.name), p = l.filter(({
79
+ name: d
80
+ }, _) => !y.includes(d, _ + 1));
81
+ h(p), C?.(a, e), I?.(e);
80
82
  }
81
83
  }
82
- d({
84
+ m({
83
85
  class: "",
84
- text: f,
85
- subtitle: u + g(o),
86
+ text: u,
87
+ subtitle: f + g(o),
86
88
  error: !1
87
89
  });
88
90
  }, V = (e) => {
89
- var a;
90
- (a = e.preventDefault) == null || a.call(e);
91
- const s = I(e.target.files);
91
+ e.preventDefault?.();
92
+ const s = q(e.target.files);
92
93
  if (s.length > 0 && !j) {
93
- const l = r.concat(s), T = l.map((c) => c.name), L = l.filter(({ name: c }, k) => !T.includes(c, k + 1));
94
- h(L), m == null || m(s, e);
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));
97
+ h(y), C?.(s, e);
95
98
  }
96
99
  }, X = () => h([]), Y = (e) => {
97
100
  h((s) => s.filter((a) => a.name !== e));
98
- }, Z = () => (r == null ? void 0 : r.length) === 1 ? /* @__PURE__ */ t.jsxs(M, { children: [
99
- 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(B, { size: 64, name: "file_excel" }),
101
+ }, Z = () => r?.length === 1 ? /* @__PURE__ */ t.jsxs(w, { children: [
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" }),
100
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 }) }) })
101
- ] }) : /* @__PURE__ */ t.jsx("ul", { className: "file-list", children: r.length > 0 && r.map((e) => /* @__PURE__ */ t.jsxs(
102
- "li",
103
- {
104
- className: "file-card",
105
- children: [
106
- /* @__PURE__ */ t.jsx(
107
- U,
108
- {
109
- transparent: !0,
110
- boxShadow: !1,
111
- className: "delete-button",
112
- onClick: () => Y(e.name),
113
- icon: /* @__PURE__ */ t.jsx(B, { customClass: "color-icon-upload", name: "close" })
114
- }
115
- ),
116
- /* @__PURE__ */ t.jsx("div", { className: "image-content", children: (e.type === "image/jpeg" || e.type === "image/png") && /* @__PURE__ */ t.jsx(
117
- "img",
118
- {
119
- alt: e.name,
120
- className: "image-preview",
121
- src: URL.createObjectURL(e)
122
- }
123
- ) }),
124
- /* @__PURE__ */ t.jsx("div", { className: "description-file", children: /* @__PURE__ */ t.jsx("span", { className: "subtitle", children: e.name }) })
125
- ]
126
- },
127
- `${e.name}${e.size}`
128
- )) });
129
- return /* @__PURE__ */ t.jsxs("div", { className: "input-dragdrop-container", onDragEnter: O, onSubmit: (e) => e.preventDefault(), children: [
130
- /* @__PURE__ */ t.jsxs("div", { className: `drag-content ${A ? "-skeletonized" : ""}`, children: [
131
- /* @__PURE__ */ t.jsx("div", { className: `${p.class} ${A ? "" : "content"}`, children: p.error || r.length === 0 ? /* @__PURE__ */ t.jsxs("label", { htmlFor: n, children: [
132
- /* @__PURE__ */ t.jsx("h1", { className: "title", style: { paddingBottom: "20px" }, children: p.text }),
133
- H && /* @__PURE__ */ t.jsx("p", { className: "subtitle", children: p.subtitle }),
134
- !A && /* @__PURE__ */ t.jsx(P, { onClick: C, label: w })
135
- ] }) : /* @__PURE__ */ t.jsxs(M, { children: [
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}`)) });
109
+ return /* @__PURE__ */ t.jsxs("div", { className: "input-dragdrop-container", onDragEnter: k, onSubmit: (e) => e.preventDefault(), children: [
110
+ /* @__PURE__ */ t.jsxs("div", { className: `drag-content ${b ? "-skeletonized" : ""}`, children: [
111
+ /* @__PURE__ */ t.jsx("div", { className: `${c.class} ${b ? "" : "content"}`, children: c.error || r.length === 0 ? /* @__PURE__ */ t.jsxs("label", { htmlFor: i, children: [
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 }),
116
+ !b && /* @__PURE__ */ t.jsx(S, { onClick: A, label: L })
117
+ ] }) : /* @__PURE__ */ t.jsxs(w, { children: [
136
118
  Z(),
137
119
  /* @__PURE__ */ t.jsxs("footer", { className: "footer-button-action", children: [
138
- (!x && r.length < 1 || x) && /* @__PURE__ */ t.jsx(
139
- P,
140
- {
141
- className: "selectButton",
142
- onClick: C,
143
- label: w
144
- }
145
- ),
146
- /* @__PURE__ */ t.jsx(
147
- U,
148
- {
149
- className: "cancelButton",
150
- onClick: X,
151
- icon: /* @__PURE__ */ t.jsx(B, { name: "close", color: "white" }),
152
- label: "Limpar"
153
- }
154
- )
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" })
155
122
  ] })
156
123
  ] }) }),
157
- /* @__PURE__ */ t.jsx(
158
- te,
159
- {
160
- ...i,
161
- inputRef: _,
162
- style: { display: "none" },
163
- type: "file",
164
- id: n,
165
- accept: o,
166
- multiple: x,
167
- onDragOver: q,
168
- onDrop: z,
169
- onDragLeave: $,
170
- onChange: V
171
- }
172
- ),
173
- J && /* @__PURE__ */ t.jsx(
174
- "div",
175
- {
176
- className: "drag-position-element",
177
- id: "dragFileElement",
178
- onDragEnter: O,
179
- onDragLeave: $,
180
- onDragOver: q,
181
- onDrop: z
182
- }
183
- )
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 })
184
128
  ] }),
185
129
  /* @__PURE__ */ t.jsx(ae, { messages: G }),
186
- /* @__PURE__ */ t.jsx(se, { visible: !!S && W === "below", customClass: "hint", description: S })
130
+ /* @__PURE__ */ t.jsx(se, { visible: !!R && W === "below", customClass: "hint", description: R })
187
131
  ] });
188
132
  };
189
133
  export {
190
- xe as default
134
+ he as default
191
135
  };
@@ -1,3 +1,3 @@
1
1
  import { IFileProps } from './types';
2
- declare const File: ({ applyDragDrop, defaultFiles, gridLayout, onBtnClickRemove: onBtnClickRemoveProp, ...rest }: Omit<IFileProps, 'onBtnClickInsert'>) => import("react/jsx-runtime").JSX.Element;
2
+ declare const File: ({ applyDragDrop, defaultFiles, gridLayout, onBtnClickRemove: onBtnClickRemoveProp, ...rest }: Omit<IFileProps, "onBtnClickInsert">) => import("react/jsx-runtime").JSX.Element;
3
3
  export default File;
@@ -1,46 +1,31 @@
1
- import { j as o } from "../../chunks/jsx-runtime.CYK1ROHF.js";
2
- import { useRef as u, useEffect as p } from "react";
3
- import C from "./DefaultFile.js";
4
- import k from "./DragDropFile.js";
1
+ import { j as n } from "../../chunks/jsx-runtime.D1SHvdVE.js";
2
+ import { useRef as l, useEffect as u } from "react";
3
+ import p from "./DefaultFile.js";
4
+ import C from "./DragDropFile.js";
5
+ import "../../chunks/compiler-runtime.Cu50tn6L.js";
5
6
  import '../../assets/gridlayout.css';/* empty css */
6
- import x from "../../gridlayout/GridCol.js";
7
- import { transformFilesToFileList as a } from "./helpers.js";
8
- const E = ({
9
- applyDragDrop: f = !1,
10
- defaultFiles: t,
11
- gridLayout: n,
7
+ import R from "../../gridlayout/GridCol.js";
8
+ import { transformFilesToFileList as k } from "./helpers.js";
9
+ const I = ({
10
+ applyDragDrop: m = !1,
11
+ defaultFiles: r,
12
+ gridLayout: o,
12
13
  onBtnClickRemove: e,
13
- ...c
14
+ ...i
14
15
  }) => {
15
- const r = u(null), i = () => {
16
- var m;
17
- (m = r.current) == null || m.click();
18
- }, l = () => {
19
- r.current && (r.current.value = ""), e && e();
16
+ const t = l(null), c = () => {
17
+ t.current?.click();
18
+ }, f = () => {
19
+ t.current && (t.current.value = ""), e && e();
20
20
  };
21
- p(() => {
22
- r != null && r.current && t && (r.current.files = a(t));
23
- }, [r == null ? void 0 : r.current]);
24
- const s = f ? /* @__PURE__ */ o.jsx(
25
- k,
26
- {
27
- ...c,
28
- defaultFiles: t,
29
- inputRef: r,
30
- onBtnClickInsert: () => i()
31
- }
32
- ) : /* @__PURE__ */ o.jsx(
33
- C,
34
- {
35
- ...c,
36
- inputRef: r,
37
- defaultFiles: t,
38
- onBtnClickRemove: () => l(),
39
- onBtnClickInsert: () => i()
40
- }
41
- );
42
- return n !== void 0 ? /* @__PURE__ */ o.jsx(x, { customClass: "-withinput", cols: n, style: { height: "100%" }, children: s }) : s;
21
+ u(() => {
22
+ t?.current && r && (t.current.files = k(r));
23
+ }, [t?.current]);
24
+ const s = m ? /* @__PURE__ */ n.jsx(C, { ...i, defaultFiles: r, inputRef: t, onBtnClickInsert: () => c() }) : /* @__PURE__ */ n.jsx(p, { ...i, inputRef: t, defaultFiles: r, onBtnClickRemove: () => f(), onBtnClickInsert: () => c() });
25
+ return o !== void 0 ? /* @__PURE__ */ n.jsx(R, { customClass: "-withinput", cols: o, style: {
26
+ height: "100%"
27
+ }, children: s }) : s;
43
28
  };
44
29
  export {
45
- E as default
30
+ I as default
46
31
  };
@@ -1,21 +1,24 @@
1
- import { j as t } from "../../chunks/jsx-runtime.CYK1ROHF.js";
2
- import s from "../../buttons/Button.js";
3
- import r from "../../icons/index.js";
1
+ import { j as m } from "../../chunks/jsx-runtime.D1SHvdVE.js";
2
+ import { c as u } from "../../chunks/compiler-runtime.Cu50tn6L.js";
3
+ import f from "../../buttons/Button.js";
4
+ import b from "../../icons/index.js";
4
5
  import '../../assets/button.css';/* empty css */
5
- const u = (o) => {
6
- const { size: e = "medium", labelButton: n = "Selecionar", id: i, onBtnClickInsert: l } = o;
7
- return /* @__PURE__ */ t.jsx("label", { id: "", htmlFor: i, children: /* @__PURE__ */ t.jsx(
8
- s,
9
- {
10
- className: "uploadButton simple-search-file-button -shadowsdisabled -transparent",
11
- onClick: l,
12
- size: e,
13
- style: { height: "100%" },
14
- icon: /* @__PURE__ */ t.jsx(r, { name: "file_download" }),
15
- label: n
16
- }
17
- ) });
6
+ const _ = (p) => {
7
+ const t = u.c(9), {
8
+ size: c,
9
+ labelButton: d,
10
+ id: s,
11
+ onBtnClickInsert: n
12
+ } = p, r = c === void 0 ? "medium" : c, a = d === void 0 ? "Selecionar" : d;
13
+ let o, l;
14
+ t[0] === Symbol.for("react.memo_cache_sentinel") ? (o = {
15
+ height: "100%"
16
+ }, l = /* @__PURE__ */ m.jsx(b, { name: "file_download" }), t[0] = o, t[1] = l) : (o = t[0], l = t[1]);
17
+ let e;
18
+ t[2] !== a || t[3] !== n || t[4] !== r ? (e = /* @__PURE__ */ m.jsx(f, { className: "uploadButton simple-search-file-button -shadowsdisabled -transparent", onClick: n, size: r, style: o, icon: l, label: a }), t[2] = a, t[3] = n, t[4] = r, t[5] = e) : e = t[5];
19
+ let i;
20
+ return t[6] !== s || t[7] !== e ? (i = /* @__PURE__ */ m.jsx("label", { id: "", htmlFor: s, children: e }), t[6] = s, t[7] = e, t[8] = i) : i = t[8], i;
18
21
  };
19
22
  export {
20
- u as default
23
+ _ as default
21
24
  };
@@ -1,24 +1,42 @@
1
- import { j as o } from "../chunks/jsx-runtime.CYK1ROHF.js";
2
- import { useState as c } from "react";
1
+ import { j as f } from "../chunks/jsx-runtime.D1SHvdVE.js";
2
+ import { c as F } from "../chunks/compiler-runtime.Cu50tn6L.js";
3
+ import { useState as E } from "react";
3
4
  import '../assets/gridlayout.css';/* empty css */
4
- import m from "../gridlayout/GridCol.js";
5
- const v = (s) => (t) => {
6
- const {
7
- visible: i = !0,
8
- gridLayout: n = void 0
9
- } = t, [a, e] = c(!1), [l] = c(!1), u = {
10
- inputHasFocus: a,
11
- requiredError: l,
12
- onInputReceiveFocus: () => {
13
- e(!0);
14
- },
15
- onInputLostFocus: () => {
16
- e(!1);
17
- }
18
- };
19
- let r = /* @__PURE__ */ o.jsx(s, { ...t, ...u });
20
- return n !== void 0 && i && (r = /* @__PURE__ */ o.jsx(m, { customClass: "-withinput", cols: n, children: /* @__PURE__ */ o.jsx(s, { ...t, ...u }) })), r;
5
+ import I from "../gridlayout/GridCol.js";
6
+ const g = (d) => (e) => {
7
+ const t = F.c(14), {
8
+ visible: v,
9
+ gridLayout: x
10
+ } = e, b = v === void 0 ? !0 : v, n = x === void 0 ? void 0 : x, [m, h] = E(!1), [a] = E(!1);
11
+ let i;
12
+ t[0] === Symbol.for("react.memo_cache_sentinel") ? (i = () => {
13
+ h(!0);
14
+ }, t[0] = i) : i = t[0];
15
+ const y = i;
16
+ let c;
17
+ t[1] === Symbol.for("react.memo_cache_sentinel") ? (c = () => {
18
+ h(!1);
19
+ }, t[1] = c) : c = t[1];
20
+ const C = c;
21
+ let l;
22
+ t[2] !== m || t[3] !== a ? (l = {
23
+ inputHasFocus: m,
24
+ requiredError: a,
25
+ onInputReceiveFocus: y,
26
+ onInputLostFocus: C
27
+ }, t[2] = m, t[3] = a, t[4] = l) : l = t[4];
28
+ const o = l;
29
+ let r;
30
+ t[5] !== o || t[6] !== e ? (r = /* @__PURE__ */ f.jsx(d, { ...e, ...o }), t[5] = o, t[6] = e, t[7] = r) : r = t[7];
31
+ let j = r;
32
+ if (n !== void 0 && b) {
33
+ let s;
34
+ t[8] !== o || t[9] !== e ? (s = /* @__PURE__ */ f.jsx(d, { ...e, ...o }), t[8] = o, t[9] = e, t[10] = s) : s = t[10];
35
+ let u;
36
+ t[11] !== n || t[12] !== s ? (u = /* @__PURE__ */ f.jsx(I, { customClass: "-withinput", cols: n, children: s }), t[11] = n, t[12] = s, t[13] = u) : u = t[13], j = u;
37
+ }
38
+ return j;
21
39
  };
22
40
  export {
23
- v as default
41
+ g as default
24
42
  };