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,6 +1,6 @@
1
- import { j as pt } from "../../chunks/jsx-runtime.CYK1ROHF.js";
1
+ import { j as pt } from "../../chunks/jsx-runtime.D1SHvdVE.js";
2
2
  import R, { useRef as J, useState as N, useCallback as U, useEffect as w } from "react";
3
- import { P as h } from "../../chunks/index.Da--18GT.js";
3
+ import { P as h } from "../../chunks/index.Df3kt2LQ.js";
4
4
  import dt from "../base/InputTextBase.js";
5
5
  import { numberToPtBR as ct, formatOnlyNumbers as Q, numberToEnUS as ft } from "../number/format_number.js";
6
6
  import { actionsOnPermissionDenied as kt, OPTIONS_ON_DENIED as P } from "../../permissionValidations.js";
@@ -1242,7 +1242,7 @@ class K {
1242
1242
  var e;
1243
1243
  return {
1244
1244
  ...t,
1245
- _beforeTailState: (t == null || (e = t._beforeTailState) == null ? void 0 : e.masked) || (t == null ? void 0 : t._beforeTailState)
1245
+ _beforeTailState: (t == null || (e = t._beforeTailState) == null ? void 0 : e.masked) || t?._beforeTailState
1246
1246
  };
1247
1247
  }
1248
1248
  pad(t) {
@@ -1284,7 +1284,7 @@ class v extends _ {
1284
1284
  super({
1285
1285
  ...v.DEFAULTS,
1286
1286
  ...t,
1287
- definitions: Object.assign({}, K.DEFAULT_DEFINITIONS, t == null ? void 0 : t.definitions)
1287
+ definitions: Object.assign({}, K.DEFAULT_DEFINITIONS, t?.definitions)
1288
1288
  });
1289
1289
  }
1290
1290
  updateOptions(t) {
@@ -1783,7 +1783,7 @@ class q extends _ {
1783
1783
  }
1784
1784
  _applyDispatch(t, e, s) {
1785
1785
  t === void 0 && (t = ""), e === void 0 && (e = {}), s === void 0 && (s = "");
1786
- const i = e.tail && e._beforeTailState != null ? e._beforeTailState._value : this.value, n = this.rawInputValue, a = e.tail && e._beforeTailState != null ? e._beforeTailState._rawInputValue : n, r = n.slice(a.length), l = this.currentMask, p = new c(), k = l == null ? void 0 : l.state;
1786
+ const i = e.tail && e._beforeTailState != null ? e._beforeTailState._value : this.value, n = this.rawInputValue, a = e.tail && e._beforeTailState != null ? e._beforeTailState._rawInputValue : n, r = n.slice(a.length), l = this.currentMask, p = new c(), k = l?.state;
1787
1787
  return this.currentMask = this.doDispatch(t, {
1788
1788
  ...e
1789
1789
  }, s), this.currentMask && (this.currentMask !== l ? (this.currentMask.reset(), a && (this.currentMask.append(a, {
@@ -2512,8 +2512,8 @@ function Tt(u, t) {
2512
2512
  }), b(f.typedValue), M(f.unmaskedValue), g(f.value));
2513
2513
  }, []), y = U((f) => {
2514
2514
  const C = l.current;
2515
- C && (x(), e == null || e(C.value, C, f));
2516
- }, [e]), Z = U((f) => l.current && (s == null ? void 0 : s(l.current.value, l.current, f)), [s]);
2515
+ C && (x(), e?.(C.value, C, f));
2516
+ }, [e]), Z = U((f) => l.current && s?.(l.current.value, l.current, f), [s]);
2517
2517
  return w(() => {
2518
2518
  const {
2519
2519
  value: f,
@@ -2536,7 +2536,7 @@ function Tt(u, t) {
2536
2536
  const f = i.current;
2537
2537
  if (!f || !(u != null && u.mask)) return V();
2538
2538
  const C = l.current;
2539
- C ? C == null || C.updateOptions(u) : f && u != null && u.mask && (l.current = d(f, u), x(), n !== void 0 && g(n), a !== void 0 && M(a), r !== void 0 && b(r));
2539
+ C ? C?.updateOptions(u) : f && u != null && u.mask && (l.current = d(f, u), x(), n !== void 0 && g(n), a !== void 0 && M(a), r !== void 0 && b(r));
2540
2540
  }, [u, V, y]), w(() => {
2541
2541
  if (!l.current) return;
2542
2542
  const f = l.current;
@@ -2556,8 +2556,16 @@ function Tt(u, t) {
2556
2556
  }
2557
2557
  const st = (u, t) => {
2558
2558
  if (u.returnFormattedValueOnBlur || u.returnFormattedValueOnKeyDown) {
2559
- const { name: e } = t.target, s = u.defaultValue || "";
2560
- return { ...t, target: { value: ft(s), name: e } };
2559
+ const {
2560
+ name: e
2561
+ } = t.target, s = u.defaultValue || "";
2562
+ return {
2563
+ ...t,
2564
+ target: {
2565
+ value: ft(s),
2566
+ name: e
2567
+ }
2568
+ };
2561
2569
  }
2562
2570
  return t;
2563
2571
  }, wt = (u, t, e) => u.isNumeric ? {} : {
@@ -2578,22 +2586,32 @@ const st = (u, t) => {
2578
2586
  }
2579
2587
  }
2580
2588
  if (u.onBlur) {
2581
- const { value: i } = s.target, n = Q(i), a = { ...s, target: { ...s.target, value: n } }, r = st(u, a);
2589
+ const {
2590
+ value: i
2591
+ } = s.target, n = Q(i), a = {
2592
+ ...s,
2593
+ target: {
2594
+ ...s.target,
2595
+ value: n
2596
+ }
2597
+ }, r = st(u, a);
2582
2598
  u.onBlur(r);
2583
2599
  }
2584
2600
  },
2585
2601
  onKeyDown: (s) => {
2586
2602
  if (u.onKeyDown) {
2587
- const { value: i } = s.target, n = Q(i), a = { ...s, target: { value: n } }, r = st(u, a);
2603
+ const {
2604
+ value: i
2605
+ } = s.target, n = Q(i), a = {
2606
+ ...s,
2607
+ target: {
2608
+ value: n
2609
+ }
2610
+ }, r = st(u, a);
2588
2611
  u.onKeyDown(r);
2589
2612
  }
2590
2613
  }
2591
- }, Rt = [
2592
- P.disabled,
2593
- P.unvisible,
2594
- P.readOnly,
2595
- P.hideContent
2596
- ], zt = ({
2614
+ }, Rt = [P.disabled, P.unvisible, P.readOnly, P.hideContent], zt = ({
2597
2615
  value: u,
2598
2616
  defaultValue: t,
2599
2617
  inputRef: e,
@@ -2603,7 +2621,18 @@ const st = (u, t) => {
2603
2621
  mask: a,
2604
2622
  ...r
2605
2623
  }) => {
2606
- const l = kt(Rt, n), { disabled: p, readOnly: k } = l, m = p || k, g = mt({ mask: a, ...r }), { ref: E, setValue: M, setTypedValue: F, maskRef: b } = Tt(g, {
2624
+ const l = kt(Rt, n), {
2625
+ disabled: p,
2626
+ readOnly: k
2627
+ } = l, m = p || k, g = mt({
2628
+ mask: a,
2629
+ ...r
2630
+ }), {
2631
+ ref: E,
2632
+ setValue: M,
2633
+ setTypedValue: F,
2634
+ maskRef: b
2635
+ } = Tt(g, {
2607
2636
  defaultValue: t,
2608
2637
  onAccept: (V, x) => {
2609
2638
  if (!m && s) {
@@ -2634,17 +2663,9 @@ const st = (u, t) => {
2634
2663
  });
2635
2664
  return w(() => {
2636
2665
  typeof u == "number" && (String(u).trim().length > 0 ? F(u) : F(0)), M(ct(u) ?? "");
2637
- }, [u]), /* @__PURE__ */ pt.jsx(
2638
- dt,
2639
- {
2640
- inputRef: (V) => {
2641
- E.current = V, e && (typeof e == "object" ? e.current = V : e(V));
2642
- },
2643
- permissionAttr: n,
2644
- ...r,
2645
- ...wt(r, M, b.current)
2646
- }
2647
- );
2666
+ }, [u]), /* @__PURE__ */ pt.jsx(dt, { inputRef: (V) => {
2667
+ E.current = V, e && (typeof e == "object" ? e.current = V : e(V));
2668
+ }, permissionAttr: n, ...r, ...wt(r, M, b.current) });
2648
2669
  };
2649
2670
  export {
2650
2671
  zt as default
@@ -1,40 +1,46 @@
1
- import { j as l } from "../../chunks/jsx-runtime.CYK1ROHF.js";
2
- import { useState as g, useEffect as u } from "react";
3
- import C from "lodash";
4
- import c from "./BaseMask.js";
5
- import { CNPJValidation as i } from "./helpers.js";
6
- const h = (e) => {
7
- const {
8
- value: s = "",
9
- enableValidation: o = !0,
10
- handlerSetComponentValidator: a
11
- } = e, [r, m] = g("");
12
- u(() => {
13
- o && a && a(() => i);
14
- }, []);
15
- const d = (t) => {
16
- if (o && t) {
17
- let n;
18
- n || (n = C.debounce(() => {
19
- i(t.target.value, a ? void 0 : m);
20
- }, 300)), n(), e.onChange && e.onChange(t);
1
+ import { j } from "../../chunks/jsx-runtime.D1SHvdVE.js";
2
+ import { c as x } from "../../chunks/compiler-runtime.Cu50tn6L.js";
3
+ import { useState as E, useEffect as F } from "react";
4
+ import { _ as M } from "../../chunks/lodash.CIAK_hAg.js";
5
+ import _ from "./BaseMask.js";
6
+ import { CNPJValidation as V } from "./helpers.js";
7
+ const S = (t) => {
8
+ const e = x.c(19), {
9
+ value: h,
10
+ enableValidation: v,
11
+ handlerSetComponentValidator: n
12
+ } = t, d = h === void 0 ? "" : h, o = v === void 0 ? !0 : v, [i, b] = E("");
13
+ let l;
14
+ e[0] !== o || e[1] !== n ? (l = () => {
15
+ o && n && n(k);
16
+ }, e[0] = o, e[1] = n, e[2] = l) : l = e[2];
17
+ let r;
18
+ e[3] === Symbol.for("react.memo_cache_sentinel") ? (r = [], e[3] = r) : r = e[3], F(l, r);
19
+ let s;
20
+ e[4] !== o || e[5] !== n || e[6] !== t ? (s = (c) => {
21
+ if (o && c) {
22
+ let C;
23
+ C || (C = M.debounce(() => {
24
+ V(c.target.value, n ? void 0 : b);
25
+ }, 300)), C(), t.onChange && t.onChange(c);
21
26
  }
22
- e.onChange && e.onChange(t);
23
- }, f = () => o && !a && r ? {
24
- errorMessages: [r]
25
- } : {};
26
- return /* @__PURE__ */ l.jsx(
27
- c,
28
- {
29
- ...e,
30
- value: s,
31
- mask: "00.000.000/0000-00",
32
- onChange: d,
33
- ...f()
34
- }
35
- );
27
+ t.onChange && t.onChange(c);
28
+ }, e[4] = o, e[5] = n, e[6] = t, e[7] = s) : s = e[7];
29
+ const u = s;
30
+ let m;
31
+ e[8] !== o || e[9] !== n || e[10] !== i ? (m = () => o && !n && i ? {
32
+ errorMessages: [i]
33
+ } : {}, e[8] = o, e[9] = n, e[10] = i, e[11] = m) : m = e[11];
34
+ const g = m;
35
+ let a;
36
+ e[12] !== g ? (a = g(), e[12] = g, e[13] = a) : a = e[13];
37
+ let f;
38
+ return e[14] !== u || e[15] !== t || e[16] !== a || e[17] !== d ? (f = /* @__PURE__ */ j.jsx(_, { ...t, value: d, mask: "00.000.000/0000-00", onChange: u, ...a }), e[14] = u, e[15] = t, e[16] = a, e[17] = d, e[18] = f) : f = e[18], f;
36
39
  };
37
- h.displayName = "CnpjField";
40
+ S.displayName = "CnpjField";
41
+ function k() {
42
+ return V;
43
+ }
38
44
  export {
39
- h as default
45
+ S as default
40
46
  };
@@ -1,36 +1,48 @@
1
- import { j as l } from "../../chunks/jsx-runtime.CYK1ROHF.js";
2
- import { useState as g, useEffect as s, useMemo as u } from "react";
3
- import c from "lodash";
4
- import C from "./BaseMask.js";
5
- import { CPFValidation as i } from "./helpers.js";
6
- const h = (e) => {
7
- const { enableValidation: t = !0, handlerSetComponentValidator: a } = e, [n, m] = g("");
8
- s(() => {
9
- t && a && a(() => i);
10
- }, []);
11
- const r = u(
12
- () => c.debounce((o) => {
13
- i(o, a ? void 0 : m);
14
- }, 300),
15
- [a]
16
- );
17
- s(() => r.cancel, []);
18
- const f = (o) => {
19
- t && r(o.target.value), e.onChange && e.onChange(o);
20
- }, d = () => t && !a && n ? {
21
- errorMessages: [n]
22
- } : {};
23
- return /* @__PURE__ */ l.jsx(
24
- C,
25
- {
26
- ...e,
27
- onChange: f,
28
- mask: "000.000.000-00",
29
- ...d()
30
- }
31
- );
1
+ import { j as E } from "../../chunks/jsx-runtime.D1SHvdVE.js";
2
+ import { c as M } from "../../chunks/compiler-runtime.Cu50tn6L.js";
3
+ import { useState as S, useEffect as _ } from "react";
4
+ import { _ as j } from "../../chunks/lodash.CIAK_hAg.js";
5
+ import v from "./BaseMask.js";
6
+ import { CPFValidation as x } from "./helpers.js";
7
+ const y = (t) => {
8
+ const e = M.c(23), {
9
+ enableValidation: V,
10
+ handlerSetComponentValidator: n
11
+ } = t, a = V === void 0 ? !0 : V, [s, F] = S("");
12
+ let r;
13
+ e[0] !== a || e[1] !== n ? (r = () => {
14
+ a && n && n(k);
15
+ }, e[0] = a, e[1] = n, e[2] = r) : r = e[2];
16
+ let f;
17
+ e[3] === Symbol.for("react.memo_cache_sentinel") ? (f = [], e[3] = f) : f = e[3], _(r, f);
18
+ let m;
19
+ e[4] !== n ? (m = j.debounce((i) => {
20
+ x(i, n ? void 0 : F);
21
+ }, 300), e[4] = n, e[5] = m) : m = e[5];
22
+ const o = m;
23
+ let c;
24
+ e[6] !== o.cancel ? (c = () => o.cancel, e[6] = o.cancel, e[7] = c) : c = e[7];
25
+ let d;
26
+ e[8] === Symbol.for("react.memo_cache_sentinel") ? (d = [], e[8] = d) : d = e[8], _(c, d);
27
+ let u;
28
+ e[9] !== o || e[10] !== a || e[11] !== t ? (u = (i) => {
29
+ a && o(i.target.value), t.onChange && t.onChange(i);
30
+ }, e[9] = o, e[10] = a, e[11] = t, e[12] = u) : u = e[12];
31
+ const h = u;
32
+ let g;
33
+ e[13] !== a || e[14] !== n || e[15] !== s ? (g = () => a && !n && s ? {
34
+ errorMessages: [s]
35
+ } : {}, e[13] = a, e[14] = n, e[15] = s, e[16] = g) : g = e[16];
36
+ const b = g;
37
+ let l;
38
+ e[17] !== b ? (l = b(), e[17] = b, e[18] = l) : l = e[18];
39
+ let C;
40
+ return e[19] !== h || e[20] !== t || e[21] !== l ? (C = /* @__PURE__ */ E.jsx(v, { ...t, onChange: h, mask: "000.000.000-00", ...l }), e[19] = h, e[20] = t, e[21] = l, e[22] = C) : C = e[22], C;
32
41
  };
33
- h.displayName = "CpfField";
42
+ y.displayName = "CpfField";
43
+ function k() {
44
+ return x;
45
+ }
34
46
  export {
35
- h as default
47
+ y as default
36
48
  };
@@ -1,9 +1,13 @@
1
- import { j as t } from "../../chunks/jsx-runtime.CYK1ROHF.js";
2
- import o from "./BaseMask.js";
3
- const a = (e) => {
4
- const { cellNumber: s } = e;
5
- return /* @__PURE__ */ t.jsx(o, { ...e, mask: s ? "(00) 00000-0000" : "(00) 0000-0000" });
1
+ import { j as r } from "../../chunks/jsx-runtime.D1SHvdVE.js";
2
+ import { c } from "../../chunks/compiler-runtime.Cu50tn6L.js";
3
+ import i from "./BaseMask.js";
4
+ const f = (e) => {
5
+ const t = c.c(3), {
6
+ cellNumber: m
7
+ } = e, s = m ? "(00) 00000-0000" : "(00) 0000-0000";
8
+ let o;
9
+ return t[0] !== e || t[1] !== s ? (o = /* @__PURE__ */ r.jsx(i, { ...e, mask: s }), t[0] = e, t[1] = s, t[2] = o) : o = t[2], o;
6
10
  };
7
11
  export {
8
- a as default
12
+ f as default
9
13
  };
@@ -1,6 +1,11 @@
1
- import { j as o } from "../../chunks/jsx-runtime.CYK1ROHF.js";
2
- import t from "./BaseMask.js";
3
- const m = (s) => /* @__PURE__ */ o.jsx(t, { ...s, mask: "00000-000" });
1
+ import { j as s } from "../../chunks/jsx-runtime.D1SHvdVE.js";
2
+ import { c as m } from "../../chunks/compiler-runtime.Cu50tn6L.js";
3
+ import r from "./BaseMask.js";
4
+ const f = (o) => {
5
+ const t = m.c(2);
6
+ let e;
7
+ return t[0] !== o ? (e = /* @__PURE__ */ s.jsx(r, { ...o, mask: "00000-000" }), t[0] = o, t[1] = e) : e = t[1], e;
8
+ };
4
9
  export {
5
- m as default
10
+ f as default
6
11
  };
@@ -1,41 +1,41 @@
1
1
  import { IBaseMaskProps } from './types';
2
2
  export declare const getMaskOptions: ({ isDateField, placeholderChar, min, max, lazy, pattern, radix, thousandsSeparator, mapToRadix, scale, normalizeZeros, padFractionalZeros, rightElements, leftElements, ...rest }: IBaseMaskProps) => {
3
- value?: string | number | undefined;
4
- onBlur?: ((e: import('../base/types').CustomInputEvent) => void) | undefined;
5
- onKeyDown?: ((e: import('../base/types').CustomInputEvent | import('react').KeyboardEvent<Element>) => void) | undefined;
6
- defaultValue?: string | undefined;
7
- isNumeric?: boolean | undefined;
3
+ value?: string | number;
4
+ onBlur?: (e: import('../base/types').CustomInputEvent) => void;
5
+ onKeyDown?: (e: import('../base/types').CustomInputEvent | import('react').KeyboardEvent<Element>) => void;
6
+ defaultValue?: string;
7
+ isNumeric?: boolean;
8
8
  blocks?: any;
9
- handlerSetOnDenied?: ((onDeniedValue: import('../../@types/PermissionAttr').OnDenied) => void) | undefined;
10
- onChange?: ((e: import('../base/types').CustomInputEvent, maskValue?: string | undefined, date?: string | undefined) => void) | undefined;
11
- onComplete?: ((e: import('../base/types').CustomInputEvent, maskValue?: string | undefined, date?: string | undefined) => void) | undefined;
12
- inputRef?: import('react').MutableRefObject<HTMLInputElement | HTMLTextAreaElement | null> | ((ref: HTMLInputElement | HTMLTextAreaElement | null) => void) | undefined;
13
- permissionAttr?: import('../../@types/PermissionAttr').PermissionAttr | undefined;
14
- errorMessages?: string[] | undefined;
15
- rounded?: boolean | undefined;
16
- textAlign?: import('../../@types/Align').TextAlign | undefined;
17
- customClassForInputContent?: string | undefined;
18
- label?: string | undefined;
19
- name?: string | undefined;
20
- customClassForLabel?: string | undefined;
21
- customClass?: string | undefined;
22
- gridLayout?: string | undefined;
23
- placeHolder?: string | undefined;
24
- readOnly?: boolean | undefined;
25
- labelUppercase?: boolean | undefined;
26
- disabled?: boolean | undefined;
27
- unmask?: boolean | undefined;
28
- onFocus?: ((e: import('../base/types').CustomInputEvent) => void) | undefined;
29
- required?: boolean | undefined;
30
- returnFormattedValueOnBlur?: boolean | undefined;
31
- returnFormattedValueOnKeyDown?: boolean | undefined;
32
- autoCompleteMask?: "left" | "right" | undefined;
9
+ handlerSetOnDenied?: (onDeniedValue: import('../../@types/PermissionAttr').OnDenied) => void;
10
+ onChange?: (e: import('../base/types').CustomInputEvent, maskValue?: string, date?: string) => void;
11
+ onComplete?: (e: import('../base/types').CustomInputEvent, maskValue?: string, date?: string) => void;
12
+ inputRef?: import('react').MutableRefObject<HTMLInputElement | HTMLTextAreaElement | null> | ((ref: HTMLInputElement | HTMLTextAreaElement | null) => void);
13
+ permissionAttr?: import('../../@types/PermissionAttr').PermissionAttr;
14
+ errorMessages?: string[];
15
+ rounded?: boolean;
16
+ textAlign?: import('../../@types/Align').TextAlign;
17
+ customClassForInputContent?: string;
18
+ label?: string;
19
+ name?: string;
20
+ customClassForLabel?: string;
21
+ customClass?: string;
22
+ gridLayout?: string;
23
+ placeHolder?: string;
24
+ readOnly?: boolean;
25
+ labelUppercase?: boolean;
26
+ disabled?: boolean;
27
+ unmask?: boolean;
28
+ onFocus?: (e: import('../base/types').CustomInputEvent) => void;
29
+ required?: boolean;
30
+ returnFormattedValueOnBlur?: boolean;
31
+ returnFormattedValueOnKeyDown?: boolean;
32
+ autoCompleteMask?: "left" | "right";
33
33
  definitions?: any;
34
34
  mask?: any;
35
- hint?: string | string[] | undefined;
36
- hintPosition?: "below" | "onLabelRight" | undefined;
37
- themePopover?: "dark" | "light" | undefined;
38
- popoverAlign?: "left" | "right" | undefined;
35
+ hint?: string | string[];
36
+ hintPosition?: "below" | "onLabelRight";
37
+ themePopover?: "light" | "dark";
38
+ popoverAlign?: "right" | "left";
39
39
  placeholderChar: string;
40
40
  min: any;
41
41
  max: any;
@@ -1,63 +1,63 @@
1
- import { parseInt as P } from "lodash";
2
- const m = ({
1
+ import { l as v } from "../../chunks/lodash.CIAK_hAg.js";
2
+ const A = ({
3
3
  isDateField: d,
4
4
  placeholderChar: i = "_",
5
5
  min: l,
6
6
  max: t,
7
- lazy: o = !1,
8
- pattern: n = "",
9
- radix: f = " ",
10
- thousandsSeparator: C = "",
11
- mapToRadix: r = [],
12
- scale: v = 2,
7
+ lazy: n = !1,
8
+ pattern: o = "",
9
+ radix: r = " ",
10
+ thousandsSeparator: f = "",
11
+ mapToRadix: P = [],
12
+ scale: C = 2,
13
13
  normalizeZeros: h = !0,
14
- padFractionalZeros: F = !0,
15
- rightElements: N,
16
- leftElements: p,
17
- ...J
14
+ padFractionalZeros: p = !0,
15
+ rightElements: a,
16
+ leftElements: J,
17
+ ...F
18
18
  }) => ({
19
19
  placeholderChar: i === "" ? " " : i,
20
20
  min: l,
21
21
  max: t,
22
- lazy: o,
23
- pattern: n,
24
- radix: f,
25
- thousandsSeparator: C,
26
- mapToRadix: r,
27
- scale: v,
22
+ lazy: n,
23
+ pattern: o,
24
+ radix: r,
25
+ thousandsSeparator: f,
26
+ mapToRadix: P,
27
+ scale: C,
28
28
  normalizeZeros: h,
29
- padFractionalZeros: F,
30
- ...J
29
+ padFractionalZeros: p,
30
+ ...F
31
31
  }), c = (d) => d.split("").every((i) => i === d[0]);
32
- function b(d, i) {
32
+ function m(d, i) {
33
33
  const l = d ? d.replace(/[^\d]+/g, "") : "";
34
- let t = 0, o;
34
+ let t = 0, n;
35
35
  if (l === "" || l.length < 11 || c(l)) return i ? i("CPF inválido") : "CPF inválido";
36
- for (let n = 0; n < 9; n++)
37
- t += P(l.charAt(n), 10) * (10 - n);
38
- if (o = t * 10 % 11, (o === 10 || o === 11) && (o = 0), o !== P(l.charAt(9), 10)) return i ? i("CPF inválido") : "CPF inválido";
39
- t = 0, o = 0;
40
- for (let n = 0; n < 10; n++)
41
- t += P(l.charAt(n), 10) * (11 - n);
42
- return o = t * 10 % 11, (o === 10 || o === 11) && (o = 0), o !== P(l.charAt(10), 10) ? i ? i("CPF inválido") : "CPF inválido" : i ? i("") : void 0;
36
+ for (let o = 0; o < 9; o++)
37
+ t += v.parseInt(l.charAt(o), 10) * (10 - o);
38
+ if (n = t * 10 % 11, (n === 10 || n === 11) && (n = 0), n !== v.parseInt(l.charAt(9), 10)) return i ? i("CPF inválido") : "CPF inválido";
39
+ t = 0, n = 0;
40
+ for (let o = 0; o < 10; o++)
41
+ t += v.parseInt(l.charAt(o), 10) * (11 - o);
42
+ return n = t * 10 % 11, (n === 10 || n === 11) && (n = 0), n !== v.parseInt(l.charAt(10), 10) ? i ? i("CPF inválido") : "CPF inválido" : i ? i("") : void 0;
43
43
  }
44
- function u(d, i) {
44
+ function I(d, i) {
45
45
  const l = d ? d.replace(/[^\d]+/g, "") : "";
46
46
  if (l === "" || l.length !== 14 || c(l)) return i ? i("CNPJ inválido") : "CNPJ inválido";
47
- let t = l.length - 2, o = l.substring(0, t);
48
- const n = l.substring(t);
49
- let f = 0, C = t - 7;
50
- for (let v = t; v >= 1; v--)
51
- f += P(o.charAt(t - v)) * C--, C < 2 && (C = 9);
52
- let r = f % 11 < 2 ? 0 : 11 - f % 11;
53
- if (r.toString() !== n.charAt(0)) return i ? i("CNPJ inválido") : "CNPJ inválido";
54
- t += 1, o = l.substring(0, t), f = 0, C = t - 7;
55
- for (let v = t; v >= 1; v--)
56
- f += P(o.charAt(t - v)) * C--, C < 2 && (C = 9);
57
- return r = f % 11 < 2 ? 0 : 11 - f % 11, r.toString() !== n.charAt(1) ? i ? i("CNPJ inválido") : "CNPJ inválido" : i ? i("") : void 0;
47
+ let t = l.length - 2, n = l.substring(0, t);
48
+ const o = l.substring(t);
49
+ let r = 0, f = t - 7;
50
+ for (let C = t; C >= 1; C--)
51
+ r += v.parseInt(n.charAt(t - C)) * f--, f < 2 && (f = 9);
52
+ let P = r % 11 < 2 ? 0 : 11 - r % 11;
53
+ if (P.toString() !== o.charAt(0)) return i ? i("CNPJ inválido") : "CNPJ inválido";
54
+ t += 1, n = l.substring(0, t), r = 0, f = t - 7;
55
+ for (let C = t; C >= 1; C--)
56
+ r += v.parseInt(n.charAt(t - C)) * f--, f < 2 && (f = 9);
57
+ return P = r % 11 < 2 ? 0 : 11 - r % 11, P.toString() !== o.charAt(1) ? i ? i("CNPJ inválido") : "CNPJ inválido" : i ? i("") : void 0;
58
58
  }
59
59
  export {
60
- u as CNPJValidation,
61
- b as CPFValidation,
62
- m as getMaskOptions
60
+ I as CNPJValidation,
61
+ m as CPFValidation,
62
+ A as getMaskOptions
63
63
  };
@@ -1,50 +1,39 @@
1
- import { j as o } from "../../chunks/jsx-runtime.CYK1ROHF.js";
2
- import { Fragment as c } from "react";
3
- import r from "../../buttons/Button.js";
1
+ import { j as i } from "../../chunks/jsx-runtime.D1SHvdVE.js";
2
+ import { c as b } from "../../chunks/compiler-runtime.Cu50tn6L.js";
3
+ import { Fragment as C } from "react";
4
+ import x from "../../buttons/Button.js";
4
5
  import "../../icons/index.js";
5
6
  import '../../assets/button.css';/* empty css */
6
- import d from "../../list/index.js";
7
- import { L as s } from "../../chunks/tabs.Cvj2MJH6.js";
8
- const h = ({
9
- disabled: t,
10
- dropdownOpened: n,
11
- handleOpenClose: e,
12
- handleCheckAll: a,
13
- handleUncheckAll: i,
14
- dropdownAlignButton: m = "left"
15
- }) => /* @__PURE__ */ o.jsxs(c, { children: [
16
- /* @__PURE__ */ o.jsx(
17
- r,
18
- {
19
- transparent: !0,
20
- tabIndex: -1,
21
- disabled: t,
22
- boxShadow: !1,
23
- size: "small",
24
- onClick: e,
25
- customClass: "actionbutton",
26
- iconName: n ? "up" : "down"
27
- }
28
- ),
29
- /* @__PURE__ */ o.jsx(
30
- r,
31
- {
32
- dropdown: !0,
33
- transparent: !0,
34
- disabled: t,
35
- tabIndex: -1,
36
- boxShadow: !1,
37
- showIconDropdown: !1,
38
- iconName: "more1",
39
- customClass: "actionbutton",
40
- dropdownAlign: m,
41
- children: /* @__PURE__ */ o.jsxs(d, { children: [
42
- /* @__PURE__ */ o.jsx(s, { itemId: "1", text: "Marcar Todos", onClick: a }),
43
- /* @__PURE__ */ o.jsx(s, { itemId: "2", text: "Desmarcar Todos", onClick: i })
44
- ] })
45
- }
46
- )
47
- ] });
7
+ import A from "../../list/index.js";
8
+ import { L as h } from "../../chunks/tabs.BvKfeA6Y.js";
9
+ const O = (w) => {
10
+ const t = b.c(18), {
11
+ disabled: o,
12
+ dropdownOpened: j,
13
+ handleOpenClose: d,
14
+ handleCheckAll: m,
15
+ handleUncheckAll: c,
16
+ dropdownAlignButton: u
17
+ } = w, p = u === void 0 ? "left" : u, f = j ? "up" : "down";
18
+ let e;
19
+ t[0] !== o || t[1] !== d || t[2] !== f ? (e = /* @__PURE__ */ i.jsx(x, { transparent: !0, tabIndex: -1, disabled: o, boxShadow: !1, size: "small", onClick: d, customClass: "actionbutton", iconName: f }), t[0] = o, t[1] = d, t[2] = f, t[3] = e) : e = t[3];
20
+ let n;
21
+ t[4] !== m ? (n = /* @__PURE__ */ i.jsx(h, { itemId: "1", text: "Marcar Todos", onClick: m }), t[4] = m, t[5] = n) : n = t[5];
22
+ let s;
23
+ t[6] !== c ? (s = /* @__PURE__ */ i.jsx(h, { itemId: "2", text: "Desmarcar Todos", onClick: c }), t[6] = c, t[7] = s) : s = t[7];
24
+ let r;
25
+ t[8] !== n || t[9] !== s ? (r = /* @__PURE__ */ i.jsxs(A, { children: [
26
+ n,
27
+ s
28
+ ] }), t[8] = n, t[9] = s, t[10] = r) : r = t[10];
29
+ let l;
30
+ t[11] !== o || t[12] !== p || t[13] !== r ? (l = /* @__PURE__ */ i.jsx(x, { dropdown: !0, transparent: !0, disabled: o, tabIndex: -1, boxShadow: !1, showIconDropdown: !1, iconName: "more1", customClass: "actionbutton", dropdownAlign: p, children: r }), t[11] = o, t[12] = p, t[13] = r, t[14] = l) : l = t[14];
31
+ let a;
32
+ return t[15] !== e || t[16] !== l ? (a = /* @__PURE__ */ i.jsxs(C, { children: [
33
+ e,
34
+ l
35
+ ] }), t[15] = e, t[16] = l, t[17] = a) : a = t[17], a;
36
+ };
48
37
  export {
49
- h as default
38
+ O as default
50
39
  };