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.
- package/lib/alerts/AlertContainer.js +8 -2
- package/lib/alerts/AlertProvider.js +11 -5
- package/lib/alerts/BaseAlert.js +10 -8
- package/lib/alerts/Message.js +91 -64
- package/lib/alerts/withAlert.js +10 -6
- package/lib/assets/BaseAlert.css +1 -1
- package/lib/assets/Content.css +1 -1
- package/lib/assets/DefaultFile.css +1 -1
- package/lib/assets/Drawer.css +1 -1
- package/lib/assets/index11.css +1 -1
- package/lib/assets/index5.css +1 -1
- package/lib/avatar/index.js +29 -51
- package/lib/badge/index.js +25 -23
- package/lib/buttons/ActivateButton.js +9 -4
- package/lib/buttons/AddButton.js +12 -5
- package/lib/buttons/Button.js +16 -5
- package/lib/buttons/ButtonGroups.js +10 -3
- package/lib/buttons/CancelButton.js +14 -4
- package/lib/buttons/DangerButton.js +15 -4
- package/lib/buttons/DefaultButton.js +76 -111
- package/lib/buttons/DestroyButton.js +21 -5
- package/lib/buttons/EditButton.js +9 -4
- package/lib/buttons/InactivateButton.js +9 -4
- package/lib/buttons/InfoButton.js +15 -4
- package/lib/buttons/PrimaryButton.js +15 -4
- package/lib/buttons/RestoreButton.js +9 -4
- package/lib/buttons/SaveButton.js +14 -4
- package/lib/buttons/SuccessButton.js +15 -4
- package/lib/buttons/WarningButton.js +15 -4
- package/lib/buttons/button_container/index.js +21 -16
- package/lib/buttons/split_button/index.js +53 -55
- package/lib/calendar/DangerCalendar.js +18 -4
- package/lib/calendar/InfoCalendar.js +18 -4
- package/lib/calendar/PrimaryCalendar.js +18 -4
- package/lib/calendar/SuccessCalendar.js +18 -4
- package/lib/calendar/WarningCalendar.js +18 -4
- package/lib/calendar/base/Day.js +32 -22
- package/lib/calendar/base/Month.js +24 -21
- package/lib/calendar/base/Week.js +20 -19
- package/lib/calendar/base/helpers.js +11 -19
- package/lib/calendar/base/index.js +129 -97
- package/lib/checkbox/index.js +6 -5
- package/lib/chunks/compiler-runtime.Cu50tn6L.js +54 -0
- package/lib/chunks/{index.Da--18GT.js → index.Df3kt2LQ.js} +179 -181
- package/lib/chunks/index.aw0XaUkg.js +266 -0
- package/lib/chunks/jsx-runtime.D1SHvdVE.js +282 -0
- package/lib/chunks/lodash.CIAK_hAg.js +3684 -0
- package/lib/chunks/moment.DMLRxgRE.js +2589 -0
- package/lib/chunks/tabs.BvKfeA6Y.js +244 -0
- package/lib/chunks/v1.Ds1rkxUj.js +49 -0
- package/lib/dialog/Alert.js +18 -17
- package/lib/dialog/Custom.js +42 -28
- package/lib/dialog/Error.js +18 -17
- package/lib/dialog/Information.js +18 -17
- package/lib/dialog/Question.js +43 -59
- package/lib/dialog/Warning.js +18 -17
- package/lib/dialog/base/Content.js +13 -4
- package/lib/dialog/base/Footer.js +8 -3
- package/lib/dialog/base/Header.js +4 -3
- package/lib/dialog/base/index.js +5 -4
- package/lib/dialog/form/index.js +5 -4
- package/lib/dialog/index.js +1 -1
- package/lib/dialog/wizard/index.js +11 -10
- package/lib/dialog/wizard/progressbar.js +96 -3
- package/lib/dialog/wizard/step.js +4 -3
- package/lib/dialog/wizard/useWizard.js +42 -29
- package/lib/drawer/Content.js +15 -8
- package/lib/drawer/Drawer.js +38 -35
- package/lib/drawer/Header.js +53 -40
- package/lib/drawer/helpers.js +2 -2
- package/lib/dropdown/Popup.js +4 -2
- package/lib/dropdown/withDropdown.js +75 -50
- package/lib/fieldset/index.js +66 -47
- package/lib/form/Field.js +88 -62
- package/lib/form/FieldArray.js +18 -39
- package/lib/form/FieldNumber.js +42 -38
- package/lib/form/FieldPeriod.js +90 -59
- package/lib/form/helpers.js +14 -11
- package/lib/form/index.js +88 -100
- package/lib/form/withFieldHOC.js +57 -48
- package/lib/form/withFormSecurity.js +15 -18
- package/lib/gridlayout/GridCol.js +21 -20
- package/lib/gridlayout/GridRow.js +22 -20
- package/lib/hint/helpers.js +6 -2
- package/lib/hint/index.js +27 -25
- package/lib/icons/helper.js +142 -569
- package/lib/icons/index.js +62 -57
- package/lib/index.js +20 -19
- package/lib/inputs/base/InputTextBase.js +121 -207
- package/lib/inputs/base/Label.js +27 -29
- package/lib/inputs/base/helpers.d.ts +3 -3
- package/lib/inputs/base/helpers.js +4 -2
- package/lib/inputs/color/index.js +52 -73
- package/lib/inputs/date/Dialog.js +15 -16
- package/lib/inputs/date/Dropdown.js +16 -14
- package/lib/inputs/date/helpers.js +7 -7
- package/lib/inputs/date/index.js +101 -147
- package/lib/inputs/errorMessage/index.js +21 -13
- package/lib/inputs/file/DefaultFile.js +64 -67
- package/lib/inputs/file/DragDropFile.js +79 -135
- package/lib/inputs/file/File.d.ts +1 -1
- package/lib/inputs/file/File.js +24 -39
- package/lib/inputs/file/FileButtonSettings.js +20 -17
- package/lib/inputs/inputHOC.js +38 -20
- package/lib/inputs/mask/BaseMask.js +51 -30
- package/lib/inputs/mask/Cnpj.js +42 -36
- package/lib/inputs/mask/Cpf.js +45 -33
- package/lib/inputs/mask/Phone.js +10 -6
- package/lib/inputs/mask/ZipCode.js +9 -4
- package/lib/inputs/mask/helpers.d.ts +33 -33
- package/lib/inputs/mask/helpers.js +44 -44
- package/lib/inputs/multiSelect/ActionButtons.js +35 -46
- package/lib/inputs/multiSelect/Dropdown.js +94 -133
- package/lib/inputs/multiSelect/helper.js +4 -7
- package/lib/inputs/multiSelect/index.js +167 -127
- package/lib/inputs/number/BaseNumber.js +43 -31
- package/lib/inputs/number/Currency.js +19 -12
- package/lib/inputs/number/Decimal.js +9 -4
- package/lib/inputs/number/index.js +31 -35
- package/lib/inputs/period/Dialog.js +16 -16
- package/lib/inputs/period/Dropdown.js +15 -15
- package/lib/inputs/period/PeriodList.js +41 -27
- package/lib/inputs/period/helper.js +8 -4
- package/lib/inputs/period/index.js +192 -330
- package/lib/inputs/search/index.js +95 -71
- package/lib/inputs/select/ActionButtons.js +24 -45
- package/lib/inputs/select/Dropdown.js +61 -110
- package/lib/inputs/select/helper.d.ts +1 -1
- package/lib/inputs/select/helper.js +43 -45
- package/lib/inputs/select/index.js +23 -25
- package/lib/inputs/select/multiple/Selecteds.js +23 -19
- package/lib/inputs/select/multiple/index.js +106 -176
- package/lib/inputs/select/simple/index.js +126 -196
- package/lib/inputs/text/index.js +9 -4
- package/lib/inputs/textarea/index.js +13 -15
- package/lib/internals/withTooltip.js +114 -67
- package/lib/labelMessages/index.js +50 -45
- package/lib/labels/DangerLabel.js +18 -4
- package/lib/labels/DefaultLabel.js +53 -39
- package/lib/labels/InfoLabel.js +18 -4
- package/lib/labels/PrimaryLabel.js +18 -4
- package/lib/labels/SuccessLabel.js +18 -4
- package/lib/labels/WarningLabel.js +18 -4
- package/lib/labels/label_container/index.js +15 -9
- package/lib/list/Header.js +18 -6
- package/lib/list/Item.js +5 -4
- package/lib/list/Separator.js +8 -3
- package/lib/list/helpers.js +2 -2
- package/lib/list/index.js +21 -18
- package/lib/menus/float/MenuItem.js +49 -52
- package/lib/menus/float/SubMenuContainer.d.ts +10 -10
- package/lib/menus/float/index.js +102 -81
- package/lib/menus/sidenav/ExpandMenu.js +17 -15
- package/lib/menus/sidenav/MenuLink.js +21 -14
- package/lib/menus/sidenav/NavMenuGroup.js +19 -14
- package/lib/menus/sidenav/NavMenuItem.js +131 -111
- package/lib/menus/sidenav/NavSubMenuItem.js +36 -20
- package/lib/menus/sidenav/helpers.js +4 -4
- package/lib/menus/sidenav/index.js +145 -123
- package/lib/menus/sidenav/popup_menu_search/EmptyList.js +21 -17
- package/lib/menus/sidenav/popup_menu_search/index.js +17 -51
- package/lib/noPermission/index.js +13 -8
- package/lib/panel/Content.js +49 -40
- package/lib/panel/DangerPanel.js +10 -5
- package/lib/panel/Default.js +62 -36
- package/lib/panel/Header.js +53 -37
- package/lib/panel/InfoPanel.js +10 -5
- package/lib/panel/PrimaryPanel.js +10 -5
- package/lib/panel/SuccessPanel.js +10 -5
- package/lib/panel/ToolBar.js +17 -4
- package/lib/panel/WarningPanel.js +10 -5
- package/lib/panel/helpers.js +8 -5
- package/lib/permissionValidations.js +15 -11
- package/lib/popover/PopoverText.js +12 -5
- package/lib/popover/PopoverTitle.js +10 -3
- package/lib/popover/index.js +36 -56
- package/lib/progress/Bar.js +43 -34
- package/lib/progress/index.js +23 -18
- package/lib/radio/index.js +105 -89
- package/lib/shortcuts/index.js +20 -7
- package/lib/skeleton/SkeletonContainer.js +16 -6
- package/lib/skeleton/index.js +42 -18
- package/lib/spinner/SpinnerLoading.js +53 -16
- package/lib/spinner/index.js +47 -37
- package/lib/split/Split.js +83 -79
- package/lib/split/SplitSide.js +24 -16
- package/lib/table/Body.js +36 -49
- package/lib/table/Header.js +45 -35
- package/lib/table/HeaderColumn.js +40 -27
- package/lib/table/Row.js +47 -48
- package/lib/table/RowColumn.js +50 -38
- package/lib/table/helpers.js +3 -1
- package/lib/table/index.js +101 -104
- package/lib/tabs/DropdownTabs.js +64 -61
- package/lib/tabs/Menu.js +35 -49
- package/lib/tabs/MenuTabs.js +59 -84
- package/lib/tabs/Panel.js +57 -47
- package/lib/tabs/context.js +36 -40
- package/lib/tabs/index.js +69 -64
- package/lib/tabs/tabHelpers.js +10 -8
- package/lib/textContent/index.js +30 -32
- package/lib/toolbar/ButtonBar.js +62 -58
- package/lib/toolbar/LabelBar.js +46 -38
- package/lib/toolbar/Separator.js +8 -3
- package/lib/toolbar/ToolBarGroup.js +14 -3
- package/lib/toolbar/index.js +35 -29
- package/lib/tooltip/index.js +24 -24
- package/lib/treetable/Body.js +26 -27
- package/lib/treetable/Header.js +23 -19
- package/lib/treetable/Row.js +210 -147
- package/lib/treetable/helpers.d.ts +4 -5
- package/lib/treetable/helpers.js +6 -14
- package/lib/treetable/index.js +25 -15
- package/lib/treeview/Header.js +13 -5
- package/lib/treeview/Node.js +198 -175
- package/lib/treeview/index.js +257 -174
- package/lib/uitour/index.js +167 -166
- package/package.json +32 -43
- package/lib/chunks/index.CmrLK9Qe.js +0 -675
- package/lib/chunks/index.D5f6Ow9V.js +0 -89
- package/lib/chunks/index.yztgndLc.js +0 -206
- package/lib/chunks/jsx-runtime.CYK1ROHF.js +0 -445
- package/lib/chunks/tabs.Cvj2MJH6.js +0 -246
- package/lib/chunks/v1.CDXKvGzE.js +0 -41
- /package/lib/assets/{index29.css → progressbar.css} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { j as pt } from "../../chunks/jsx-runtime.
|
|
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.
|
|
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) ||
|
|
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
|
|
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
|
|
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
|
|
2516
|
-
}, [e]), Z = U((f) => l.current &&
|
|
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
|
|
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 {
|
|
2560
|
-
|
|
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 {
|
|
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 {
|
|
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), {
|
|
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
|
-
|
|
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
|
package/lib/inputs/mask/Cnpj.js
CHANGED
|
@@ -1,40 +1,46 @@
|
|
|
1
|
-
import { j
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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
|
-
|
|
40
|
+
S.displayName = "CnpjField";
|
|
41
|
+
function k() {
|
|
42
|
+
return V;
|
|
43
|
+
}
|
|
38
44
|
export {
|
|
39
|
-
|
|
45
|
+
S as default
|
|
40
46
|
};
|
package/lib/inputs/mask/Cpf.js
CHANGED
|
@@ -1,36 +1,48 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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
|
-
|
|
42
|
+
y.displayName = "CpfField";
|
|
43
|
+
function k() {
|
|
44
|
+
return x;
|
|
45
|
+
}
|
|
34
46
|
export {
|
|
35
|
-
|
|
47
|
+
y as default
|
|
36
48
|
};
|
package/lib/inputs/mask/Phone.js
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
|
|
12
|
+
f as default
|
|
9
13
|
};
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
3
|
-
|
|
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
|
-
|
|
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
|
|
4
|
-
onBlur?: (
|
|
5
|
-
onKeyDown?: (
|
|
6
|
-
defaultValue?: string
|
|
7
|
-
isNumeric?: boolean
|
|
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?: (
|
|
10
|
-
onChange?: (
|
|
11
|
-
onComplete?: (
|
|
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?: (
|
|
29
|
-
required?: boolean
|
|
30
|
-
returnFormattedValueOnBlur?: boolean
|
|
31
|
-
returnFormattedValueOnKeyDown?: boolean
|
|
32
|
-
autoCompleteMask?: "left" | "right"
|
|
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[]
|
|
36
|
-
hintPosition?: "below" | "onLabelRight"
|
|
37
|
-
themePopover?: "
|
|
38
|
-
popoverAlign?: "
|
|
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 {
|
|
2
|
-
const
|
|
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:
|
|
8
|
-
pattern:
|
|
9
|
-
radix:
|
|
10
|
-
thousandsSeparator:
|
|
11
|
-
mapToRadix:
|
|
12
|
-
scale:
|
|
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:
|
|
15
|
-
rightElements:
|
|
16
|
-
leftElements:
|
|
17
|
-
...
|
|
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:
|
|
23
|
-
pattern:
|
|
24
|
-
radix:
|
|
25
|
-
thousandsSeparator:
|
|
26
|
-
mapToRadix:
|
|
27
|
-
scale:
|
|
22
|
+
lazy: n,
|
|
23
|
+
pattern: o,
|
|
24
|
+
radix: r,
|
|
25
|
+
thousandsSeparator: f,
|
|
26
|
+
mapToRadix: P,
|
|
27
|
+
scale: C,
|
|
28
28
|
normalizeZeros: h,
|
|
29
|
-
padFractionalZeros:
|
|
30
|
-
...
|
|
29
|
+
padFractionalZeros: p,
|
|
30
|
+
...F
|
|
31
31
|
}), c = (d) => d.split("").every((i) => i === d[0]);
|
|
32
|
-
function
|
|
32
|
+
function m(d, i) {
|
|
33
33
|
const l = d ? d.replace(/[^\d]+/g, "") : "";
|
|
34
|
-
let t = 0,
|
|
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
|
|
37
|
-
t +=
|
|
38
|
-
if (
|
|
39
|
-
t = 0,
|
|
40
|
-
for (let
|
|
41
|
-
t +=
|
|
42
|
-
return
|
|
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
|
|
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,
|
|
48
|
-
const
|
|
49
|
-
let
|
|
50
|
-
for (let
|
|
51
|
-
|
|
52
|
-
let
|
|
53
|
-
if (
|
|
54
|
-
t += 1,
|
|
55
|
-
for (let
|
|
56
|
-
|
|
57
|
-
return
|
|
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
|
-
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
I as CNPJValidation,
|
|
61
|
+
m as CPFValidation,
|
|
62
|
+
A as getMaskOptions
|
|
63
63
|
};
|
|
@@ -1,50 +1,39 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
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
|
|
7
|
-
import { L as
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
/* @__PURE__ */
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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
|
-
|
|
38
|
+
O as default
|
|
50
39
|
};
|