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,47 +1,59 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
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 {
|
|
7
|
-
|
|
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
|
-
},
|
|
11
|
-
const {
|
|
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
|
|
16
|
-
t.onBlur(
|
|
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
|
|
22
|
-
t.onKeyDown(
|
|
34
|
+
const o = n ? m(t, r) : r;
|
|
35
|
+
t.onKeyDown(o);
|
|
23
36
|
}
|
|
24
37
|
}
|
|
25
38
|
};
|
|
26
|
-
},
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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
|
-
|
|
58
|
+
w as default
|
|
47
59
|
};
|
|
@@ -1,15 +1,22 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import c from "
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
|
|
21
|
+
x as default
|
|
15
22
|
};
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import o from "
|
|
3
|
-
|
|
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
|
-
|
|
10
|
+
l as default
|
|
6
11
|
};
|
|
@@ -1,38 +1,34 @@
|
|
|
1
|
-
import { j
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { default as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
n((r
|
|
21
|
-
}, [r]
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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
|
-
|
|
36
|
-
|
|
37
|
-
|
|
31
|
+
T as CurrencyField,
|
|
32
|
+
k as DecimalField,
|
|
33
|
+
S as default
|
|
38
34
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
{
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
-
|
|
17
|
+
g as default
|
|
18
18
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { useRef as
|
|
2
|
-
import
|
|
3
|
-
const
|
|
4
|
-
const {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
t.current.style.width = String(
|
|
14
|
-
}, [
|
|
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
|
-
|
|
17
|
+
l as default
|
|
18
18
|
};
|
|
@@ -1,29 +1,43 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
-
|
|
42
|
+
h as default
|
|
29
43
|
};
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import r from "moment";
|
|
2
|
-
const l = ({
|
|
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
|
-
},
|
|
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
|
-
|
|
38
|
+
h as isDateValid
|
|
35
39
|
};
|