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,47 +1,59 @@
1
- import { j as a } from "../../chunks/jsx-runtime.CYK1ROHF.js";
2
- import m from "../mask/BaseMask.js";
3
- import { numberToPtBR as l, numberToEnUS as s } from "./format_number.js";
4
- const o = (t, e) => {
1
+ import { j as s } from "../../chunks/jsx-runtime.D1SHvdVE.js";
2
+ import { c as i } from "../../chunks/compiler-runtime.Cu50tn6L.js";
3
+ import c from "../mask/BaseMask.js";
4
+ import { numberToPtBR as f, numberToEnUS as d } from "./format_number.js";
5
+ const m = (t, e) => {
5
6
  if (t.returnFormattedValueOnBlur || t.returnFormattedValueOnKeyDown) {
6
- const { value: n, name: r } = e.target;
7
- return { ...e, target: { value: s(n), name: r } };
7
+ const {
8
+ value: n,
9
+ name: r
10
+ } = e.target;
11
+ return {
12
+ ...e,
13
+ target: {
14
+ value: d(n),
15
+ name: r
16
+ }
17
+ };
8
18
  }
9
19
  return e;
10
- }, i = (t) => {
11
- const { returnFormattedValueOnBlur: e, returnFormattedValueOnKeyDown: n } = t;
20
+ }, B = (t) => {
21
+ const {
22
+ returnFormattedValueOnBlur: e,
23
+ returnFormattedValueOnKeyDown: n
24
+ } = t;
12
25
  return t.isNumeric ? {} : {
13
26
  onBlur: (r) => {
14
27
  if (t.onBlur) {
15
- const u = e ? o(t, r) : r;
16
- t.onBlur(u);
28
+ const o = e ? m(t, r) : r;
29
+ t.onBlur(o);
17
30
  }
18
31
  },
19
32
  onKeyDown: (r) => {
20
33
  if (t.onKeyDown) {
21
- const u = n ? o(t, r) : r;
22
- t.onKeyDown(u);
34
+ const o = n ? m(t, r) : r;
35
+ t.onKeyDown(o);
23
36
  }
24
37
  }
25
38
  };
26
- }, B = ({ value: t, ...e }) => {
27
- const n = {
28
- ...e,
29
- returnFormattedValueOnBlur: !0,
30
- returnFormattedValueOnKeyDown: !0
31
- };
32
- return /* @__PURE__ */ a.jsx(
33
- m,
34
- {
35
- value: l(t ?? 0),
36
- thousandsSeparator: ".",
37
- radix: ",",
38
- mask: Number,
39
- isNumeric: !0,
40
- ...e,
41
- ...i(n)
42
- }
43
- );
39
+ }, w = (t) => {
40
+ const e = i.c(4);
41
+ let n;
42
+ if (e[0] !== t) {
43
+ const {
44
+ value: r,
45
+ ...o
46
+ } = t, l = {
47
+ ...o,
48
+ returnFormattedValueOnBlur: !0,
49
+ returnFormattedValueOnKeyDown: !0
50
+ }, a = r ?? 0;
51
+ let u;
52
+ e[2] !== a ? (u = f(a), e[2] = a, e[3] = u) : u = e[3], n = /* @__PURE__ */ s.jsx(c, { value: u, thousandsSeparator: ".", radix: ",", mask: Number, isNumeric: !0, ...o, ...B(l) }), e[0] = t, e[1] = n;
53
+ } else
54
+ n = e[1];
55
+ return n;
44
56
  };
45
57
  export {
46
- B as default
58
+ w as default
47
59
  };
@@ -1,15 +1,22 @@
1
- import { j as r } from "../../chunks/jsx-runtime.CYK1ROHF.js";
2
- import c from "./BaseNumber.js";
3
- const l = ({ displayCurrencySymbol: s, ...e }) => {
4
- const { currencySymbol: t = "R$" } = e, n = s ? /* @__PURE__ */ r.jsx("span", { className: "currency-symbol", children: t }) : [];
5
- return /* @__PURE__ */ r.jsx(
6
- c,
7
- {
8
- leftElements: n,
9
- ...e
10
- }
11
- );
1
+ import { j as i } from "../../chunks/jsx-runtime.D1SHvdVE.js";
2
+ import { c as p } from "../../chunks/compiler-runtime.Cu50tn6L.js";
3
+ import u from "./BaseNumber.js";
4
+ const x = (l) => {
5
+ const e = p.c(9);
6
+ let s, r;
7
+ e[0] !== l ? ({
8
+ displayCurrencySymbol: s,
9
+ ...r
10
+ } = l, e[0] = l, e[1] = s, e[2] = r) : (s = e[1], r = e[2]);
11
+ const {
12
+ currencySymbol: n
13
+ } = r, c = n === void 0 ? "R$" : n;
14
+ let t;
15
+ e[3] !== c || e[4] !== s ? (t = s ? /* @__PURE__ */ i.jsx("span", { className: "currency-symbol", children: c }) : [], e[3] = c, e[4] = s, e[5] = t) : t = e[5];
16
+ const m = t;
17
+ let o;
18
+ return e[6] !== m || e[7] !== r ? (o = /* @__PURE__ */ i.jsx(u, { leftElements: m, ...r }), e[6] = m, e[7] = r, e[8] = o) : o = e[8], o;
12
19
  };
13
20
  export {
14
- l as default
21
+ x as default
15
22
  };
@@ -1,6 +1,11 @@
1
- import { j as m } from "../../chunks/jsx-runtime.CYK1ROHF.js";
2
- import o from "./BaseNumber.js";
3
- const t = (e) => /* @__PURE__ */ m.jsx(o, { ...e });
1
+ import { j as r } from "../../chunks/jsx-runtime.D1SHvdVE.js";
2
+ import { c as o } from "../../chunks/compiler-runtime.Cu50tn6L.js";
3
+ import i from "./BaseNumber.js";
4
+ const l = (m) => {
5
+ const t = o.c(2);
6
+ let e;
7
+ return t[0] !== m ? (e = /* @__PURE__ */ r.jsx(i, { ...m }), t[0] = m, t[1] = e) : e = t[1], e;
8
+ };
4
9
  export {
5
- t as default
10
+ l as default
6
11
  };
@@ -1,38 +1,34 @@
1
- import { j as g } from "../../chunks/jsx-runtime.CYK1ROHF.js";
2
- import { useState as p, useEffect as x } from "react";
3
- import { default as F } from "./Currency.js";
4
- import { default as y } from "./Decimal.js";
5
- import h from "../base/InputTextBase.js";
6
- import '../../assets/index23.css';const j = (t) => {
7
- const {
8
- textAlign: l = "left",
9
- value: r = "",
10
- themePopover: i = "light",
11
- popoverAlign: m = "left",
12
- removeZeroLeft: s = !0,
13
- min: a,
14
- max: o
15
- } = t, [f, n] = p(), c = (u) => {
16
- const e = u.target.value.replace(/\D/g, "");
17
- a && parseInt(e, 10) < a || o && parseInt(e, 10) > o || (s && e.charAt(0) === "0" && e.length > 1 ? n(e.substring(1)) : n(e), t.onChange && t.onChange(u));
18
- };
19
- return x(() => {
20
- n((r == null ? void 0 : r.toString()) ?? "");
21
- }, [r]), /* @__PURE__ */ g.jsx(
22
- h,
23
- {
24
- ...t,
25
- value: f,
26
- textAlign: l,
27
- themePopover: i,
28
- popoverAlign: m,
29
- onChange: c,
30
- type: "number"
31
- }
32
- );
1
+ import { j } from "../../chunks/jsx-runtime.D1SHvdVE.js";
2
+ import { c as E } from "../../chunks/compiler-runtime.Cu50tn6L.js";
3
+ import { useState as F, useEffect as I } from "react";
4
+ import { default as T } from "./Currency.js";
5
+ import { default as k } from "./Decimal.js";
6
+ import y from "../base/InputTextBase.js";
7
+ import '../../assets/index23.css';const S = (t) => {
8
+ const e = E.c(15), {
9
+ textAlign: p,
10
+ value: h,
11
+ themePopover: b,
12
+ popoverAlign: A,
13
+ removeZeroLeft: V,
14
+ min: n,
15
+ max: r
16
+ } = t, m = p === void 0 ? "left" : p, l = h === void 0 ? "" : h, c = b === void 0 ? "light" : b, f = A === void 0 ? "left" : A, v = V === void 0 ? !0 : V, [g, d] = F();
17
+ let i;
18
+ e[0] !== r || e[1] !== n || e[2] !== t || e[3] !== v ? (i = (C) => {
19
+ const o = C.target.value.replace(/\D/g, "");
20
+ n && parseInt(o, 10) < n || r && parseInt(o, 10) > r || (v && o.charAt(0) === "0" && o.length > 1 ? d(o.substring(1)) : d(o), t.onChange && t.onChange(C));
21
+ }, e[0] = r, e[1] = n, e[2] = t, e[3] = v, e[4] = i) : i = e[4];
22
+ const x = i;
23
+ let a, u;
24
+ e[5] !== l ? (a = () => {
25
+ d(l?.toString() ?? "");
26
+ }, u = [l], e[5] = l, e[6] = a, e[7] = u) : (a = e[6], u = e[7]), I(a, u);
27
+ let s;
28
+ return e[8] !== g || e[9] !== x || e[10] !== f || e[11] !== t || e[12] !== m || e[13] !== c ? (s = /* @__PURE__ */ j.jsx(y, { ...t, value: g, textAlign: m, themePopover: c, popoverAlign: f, onChange: x, type: "number" }), e[8] = g, e[9] = x, e[10] = f, e[11] = t, e[12] = m, e[13] = c, e[14] = s) : s = e[14], s;
33
29
  };
34
30
  export {
35
- F as CurrencyField,
36
- y as DecimalField,
37
- j as default
31
+ T as CurrencyField,
32
+ k as DecimalField,
33
+ S as default
38
34
  };
@@ -1,18 +1,18 @@
1
- import { j as o } from "../../chunks/jsx-runtime.CYK1ROHF.js";
2
- import { B as r } from "../../chunks/index.yztgndLc.js";
3
- const h = ({ onOpenChange: e, handlerClose: t, children: a, dialogSize: s }) => /* @__PURE__ */ o.jsx(
4
- r,
5
- {
6
- closeOnOutsideClick: !0,
7
- closeOnEsc: !0,
8
- wrapperClassName: "",
9
- width: s.width,
10
- height: s.height,
11
- onOpenChange: e,
12
- handlerClose: () => t(!1),
13
- children: a
14
- }
15
- );
1
+ import { j as h } from "../../chunks/jsx-runtime.D1SHvdVE.js";
2
+ import { c as n } from "../../chunks/compiler-runtime.Cu50tn6L.js";
3
+ import { B as c } from "../../chunks/index.aw0XaUkg.js";
4
+ const g = (a) => {
5
+ const e = n.c(8), {
6
+ onOpenChange: o,
7
+ handlerClose: l,
8
+ children: r,
9
+ dialogSize: t
10
+ } = a;
11
+ let i;
12
+ e[0] !== l ? (i = () => l(!1), e[0] = l, e[1] = i) : i = e[1];
13
+ let s;
14
+ return e[2] !== r || e[3] !== t.height || e[4] !== t.width || e[5] !== o || e[6] !== i ? (s = /* @__PURE__ */ h.jsx(c, { closeOnOutsideClick: !0, closeOnEsc: !0, wrapperClassName: "", width: t.width, height: t.height, onOpenChange: o, handlerClose: i, children: r }), e[2] = r, e[3] = t.height, e[4] = t.width, e[5] = o, e[6] = i, e[7] = s) : s = e[7], s;
15
+ };
16
16
  export {
17
- h as default
17
+ g as default
18
18
  };
@@ -1,18 +1,18 @@
1
- import { useRef as l, useEffect as i } from "react";
2
- import m from "react-dom";
3
- const s = 250, h = (n) => {
4
- const { children: a, dropdownRef: d, containerRef: c, inputDimensions: e } = n, t = l(document.createElement("div")), o = e && e.width || s;
5
- return i(() => {
6
- var r;
7
- return t.current.className = "datepicker-component", t.current.style.width = String(o).concat("px"), t.current.style.top = String(e == null ? void 0 : e.bottom).concat("px"), (r = c.current) == null || r.appendChild(t.current), d(t.current), () => {
8
- var u;
9
- (u = c.current) == null || u.removeChild(t.current);
10
- };
11
- }, []), i(() => {
12
- var r;
13
- t.current.style.width = String(o).concat("px"), t.current.style.top = String((r = n.inputDimensions) == null ? void 0 : r.bottom).concat("px");
14
- }, [n]), m.createPortal(a, t.current);
1
+ import { useRef as s, useEffect as o } from "react";
2
+ import a from "react-dom";
3
+ const d = 250, l = (e) => {
4
+ const {
5
+ children: i,
6
+ dropdownRef: u,
7
+ containerRef: r,
8
+ inputDimensions: n
9
+ } = e, t = s(document.createElement("div")), c = n && n.width || d;
10
+ return o(() => (t.current.className = "datepicker-component", t.current.style.width = String(c).concat("px"), t.current.style.top = String(n?.bottom).concat("px"), r.current?.appendChild(t.current), u(t.current), () => {
11
+ r.current?.removeChild(t.current);
12
+ }), []), o(() => {
13
+ t.current.style.width = String(c).concat("px"), t.current.style.top = String(e.inputDimensions?.bottom).concat("px");
14
+ }, [e]), a.createPortal(i, t.current);
15
15
  };
16
16
  export {
17
- h as default
17
+ l as default
18
18
  };
@@ -1,29 +1,43 @@
1
- import { j as l } from "../../chunks/jsx-runtime.CYK1ROHF.js";
2
- import { getDropdownItemCssClass as d, CalcDatesByPeriod as i } from "./helper.js";
3
- const n = [
4
- { id: "today", label: "Hoje" },
5
- { id: "week", label: "Semana Atual" },
6
- { id: "lastweek", label: "Última Semana" },
7
- { id: "last15", label: "Últimos 15 dias" },
8
- { id: "month", label: "Mês atual" },
9
- { id: "lastmonth", label: "Último Mês" },
10
- { id: "custom", label: "Customizar" }
11
- ], c = ({ selected: t, handleOnSelect: e }) => /* @__PURE__ */ l.jsx("div", { className: "dropdown-period", children: n.map((a) => {
12
- const s = t === a.id;
13
- return /* @__PURE__ */ l.jsx(
14
- "button",
15
- {
16
- tabIndex: -1,
17
- className: d(s),
18
- onClick: () => {
19
- const o = a.id !== "custom" ? i(a.id) : null;
20
- e(a.id, o);
21
- },
22
- children: a.label
23
- },
24
- "item-".concat(a.id)
25
- );
26
- }) });
1
+ import { j as i } from "../../chunks/jsx-runtime.D1SHvdVE.js";
2
+ import { c } from "../../chunks/compiler-runtime.Cu50tn6L.js";
3
+ import { getDropdownItemCssClass as m, CalcDatesByPeriod as p } from "./helper.js";
4
+ const u = [{
5
+ id: "today",
6
+ label: "Hoje"
7
+ }, {
8
+ id: "week",
9
+ label: "Semana Atual"
10
+ }, {
11
+ id: "lastweek",
12
+ label: "Última Semana"
13
+ }, {
14
+ id: "last15",
15
+ label: "Últimos 15 dias"
16
+ }, {
17
+ id: "month",
18
+ label: "Mês atual"
19
+ }, {
20
+ id: "lastmonth",
21
+ label: "Último Mês"
22
+ }, {
23
+ id: "custom",
24
+ label: "Customizar"
25
+ }], h = (d) => {
26
+ const e = c.c(5), {
27
+ selected: a,
28
+ handleOnSelect: o
29
+ } = d;
30
+ let t;
31
+ e[0] !== o || e[1] !== a ? (t = u.map((l) => {
32
+ const n = a === l.id;
33
+ return /* @__PURE__ */ i.jsx("button", { tabIndex: -1, className: m(n), onClick: () => {
34
+ const r = l.id !== "custom" ? p(l.id) : null;
35
+ o(l.id, r);
36
+ }, children: l.label }, "item-".concat(l.id));
37
+ }), e[0] = o, e[1] = a, e[2] = t) : t = e[2];
38
+ let s;
39
+ return e[3] !== t ? (s = /* @__PURE__ */ i.jsx("div", { className: "dropdown-period", children: t }), e[3] = t, e[4] = s) : s = e[4], s;
40
+ };
27
41
  export {
28
- c as default
42
+ h as default
29
43
  };
@@ -1,5 +1,9 @@
1
- import r from "moment";
2
- const l = ({ topPosition: n, leftPosition: t, width: o }) => `top: ${n}px;
1
+ import { h as r } from "../../chunks/moment.DMLRxgRE.js";
2
+ const l = ({
3
+ topPosition: n,
4
+ leftPosition: t,
5
+ width: o
6
+ }) => `top: ${n}px;
3
7
  left: ${t}px;
4
8
  width:${o}px`, d = (n = !1, t = !1, o = !1) => {
5
9
  let e = "item";
@@ -26,10 +30,10 @@ const l = ({ topPosition: n, leftPosition: t, width: o }) => `top: ${n}px;
26
30
  return [s, a];
27
31
  }
28
32
  }[n]();
29
- }, f = (n) => n && r(n).isValid();
33
+ }, h = (n) => n && r(n).isValid();
30
34
  export {
31
35
  m as CalcDatesByPeriod,
32
36
  l as default,
33
37
  d as getDropdownItemCssClass,
34
- f as isDateValid
38
+ h as isDateValid
35
39
  };