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
package/lib/icons/index.js
CHANGED
|
@@ -1,61 +1,66 @@
|
|
|
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
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
1
|
+
import { j } from "../chunks/jsx-runtime.D1SHvdVE.js";
|
|
2
|
+
import { c as T } from "../chunks/compiler-runtime.Cu50tn6L.js";
|
|
3
|
+
import { useRef as q } from "react";
|
|
4
|
+
import A from "./helper.js";
|
|
5
|
+
import D from "../internals/withTooltip.js";
|
|
6
|
+
import '../assets/index2.css';const P = A, G = "rgb(193, 193, 193)", H = (l) => {
|
|
7
|
+
const t = T.c(27), {
|
|
8
|
+
name: o,
|
|
9
|
+
onClick: c,
|
|
10
|
+
svgStruct: e,
|
|
11
|
+
size: k,
|
|
12
|
+
style: a,
|
|
13
|
+
visible: F,
|
|
14
|
+
disabled: R,
|
|
15
|
+
customClass: _,
|
|
16
|
+
customClassForContainer: B,
|
|
17
|
+
colorStyle: z,
|
|
18
|
+
color: n,
|
|
19
|
+
viewBox: x,
|
|
20
|
+
pointerEvents: N,
|
|
21
|
+
targetRef: r,
|
|
22
|
+
tooltip: g
|
|
23
|
+
} = l, f = k === void 0 ? 16 : k;
|
|
24
|
+
let d;
|
|
25
|
+
t[0] !== a ? (d = a === void 0 ? {} : a, t[0] = a, t[1] = d) : d = t[1];
|
|
26
|
+
const b = d, y = F === void 0 ? !0 : F, p = R === void 0 ? !1 : R, S = _ === void 0 ? "" : _, w = B === void 0 ? "" : B, i = z === void 0 ? "default" : z, C = N === void 0 ? "none" : N, E = i !== "default" || !n ? void 0 : n, U = q(null), I = o ? P[o].viewbox : e?.viewbox;
|
|
27
|
+
let m;
|
|
28
|
+
t[2] !== o || t[3] !== e?.paths ? (m = () => o ? P[o].paths : e?.paths, t[2] = o, t[3] = e?.paths, t[4] = m) : m = t[4];
|
|
29
|
+
const $ = m;
|
|
30
|
+
let u, s;
|
|
31
|
+
if (t[5] !== n || t[6] !== E || t[7] !== i || t[8] !== S || t[9] !== w || t[10] !== p || t[11] !== $ || t[12] !== o || t[13] !== c || t[14] !== C || t[15] !== f || t[16] !== b || t[17] !== e || t[18] !== r || t[19] !== g || t[20] !== x || t[21] !== I || t[22] !== y) {
|
|
32
|
+
s = Symbol.for("react.early_return_sentinel");
|
|
33
|
+
t: {
|
|
34
|
+
const O = () => /* @__PURE__ */ j.jsx("svg", { "data-testid": "icon", "data-color-style": i, onClick: () => {
|
|
35
|
+
c && !p && c();
|
|
36
|
+
}, ref: (h) => {
|
|
37
|
+
U.current = h;
|
|
38
|
+
}, width: `${f}px`, height: `${f}px`, fill: p ? G : E, viewBox: x || I, className: `icon-component ${S}`, pointerEvents: C, style: b, children: $()?.map(J) });
|
|
39
|
+
if (n && i !== "default")
|
|
40
|
+
throw new Error("Expected only one of the two properties: colorStyle or color");
|
|
41
|
+
if (!o && !e)
|
|
42
|
+
throw new Error('One of the "name" and "svgStruct" props must be filled');
|
|
43
|
+
if (!y) {
|
|
44
|
+
s = null;
|
|
45
|
+
break t;
|
|
43
46
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
className: `icon-component-container ${w}`,
|
|
52
|
-
ref: (n) => {
|
|
53
|
-
c && n && c(n);
|
|
54
|
-
},
|
|
55
|
-
children: a()
|
|
47
|
+
if (!g) {
|
|
48
|
+
s = O();
|
|
49
|
+
break t;
|
|
50
|
+
}
|
|
51
|
+
let v;
|
|
52
|
+
t[25] !== r ? (v = (h) => {
|
|
53
|
+
r && h && r(h);
|
|
54
|
+
}, t[25] = r, t[26] = v) : v = t[26], u = /* @__PURE__ */ j.jsx("div", { className: `icon-component-container ${w}`, ref: v, children: O() });
|
|
56
55
|
}
|
|
57
|
-
|
|
58
|
-
}
|
|
56
|
+
t[5] = n, t[6] = E, t[7] = i, t[8] = S, t[9] = w, t[10] = p, t[11] = $, t[12] = o, t[13] = c, t[14] = C, t[15] = f, t[16] = b, t[17] = e, t[18] = r, t[19] = g, t[20] = x, t[21] = I, t[22] = y, t[23] = u, t[24] = s;
|
|
57
|
+
} else
|
|
58
|
+
u = t[23], s = t[24];
|
|
59
|
+
return s !== Symbol.for("react.early_return_sentinel") ? s : u;
|
|
60
|
+
}, X = D(H);
|
|
61
|
+
function J(l) {
|
|
62
|
+
return /* @__PURE__ */ j.jsx("path", { "data-testid": "icon-path", d: l }, l);
|
|
63
|
+
}
|
|
59
64
|
export {
|
|
60
|
-
|
|
65
|
+
X as default
|
|
61
66
|
};
|
package/lib/index.js
CHANGED
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
import "./chunks/jsx-runtime.
|
|
1
|
+
import { default as s } from "./panel/Default.js";
|
|
2
|
+
import "./chunks/jsx-runtime.D1SHvdVE.js";
|
|
3
|
+
import "./chunks/compiler-runtime.Cu50tn6L.js";
|
|
3
4
|
import "react";
|
|
4
|
-
import { default as
|
|
5
|
-
import { default as
|
|
5
|
+
import { default as u } from "./icons/index.js";
|
|
6
|
+
import { default as b } from "./buttons/Button.js";
|
|
6
7
|
import './assets/label.css';import './assets/panel.css';import './assets/noPermission.css';import './assets/button.css';/* empty css */
|
|
7
8
|
import "./panel/helpers.js";
|
|
8
9
|
/* empty css */
|
|
9
10
|
/* empty css */
|
|
10
|
-
import { default as
|
|
11
|
-
import { default as
|
|
11
|
+
import { default as B } from "./toolbar/index.js";
|
|
12
|
+
import { default as T } from "./labels/DefaultLabel.js";
|
|
12
13
|
/* empty css */
|
|
13
|
-
import { default as
|
|
14
|
-
import { default as
|
|
15
|
-
import { default as
|
|
16
|
-
import { B as
|
|
14
|
+
import { default as g } from "./list/index.js";
|
|
15
|
+
import { default as I } from "./radio/index.js";
|
|
16
|
+
import { default as R } from "./tabs/index.js";
|
|
17
|
+
import { B as j } from "./chunks/index.aw0XaUkg.js";
|
|
17
18
|
export {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
b as Button,
|
|
20
|
+
j as Dialog,
|
|
21
|
+
u as Icon,
|
|
22
|
+
T as Label,
|
|
23
|
+
g as List,
|
|
24
|
+
s as Panel,
|
|
25
|
+
I as Radio,
|
|
26
|
+
R as Tab,
|
|
27
|
+
B as Toolbar
|
|
27
28
|
};
|
|
@@ -1,269 +1,183 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import ye from "lodash";
|
|
1
|
+
import { j as t } from "../../chunks/jsx-runtime.D1SHvdVE.js";
|
|
2
|
+
import { useRef as be, useState as ge, useEffect as K } from "react";
|
|
3
|
+
import { _ as ye } from "../../chunks/lodash.CIAK_hAg.js";
|
|
4
4
|
import ve from "../inputHOC.js";
|
|
5
5
|
import { getRightElements as Ce, getInputWrapperClass as Ie, getInputClass as je } from "./helpers.js";
|
|
6
6
|
import De from "../../internals/withTooltip.js";
|
|
7
|
-
import { actionsOnPermissionDenied as we, OPTIONS_ON_DENIED as
|
|
7
|
+
import { actionsOnPermissionDenied as we, OPTIONS_ON_DENIED as u } from "../../permissionValidations.js";
|
|
8
8
|
import Oe from "../../hint/index.js";
|
|
9
9
|
import { ErrorMessage as Fe } from "../errorMessage/index.js";
|
|
10
|
-
import
|
|
10
|
+
import k from "../../textContent/index.js";
|
|
11
11
|
import Ne from "../../popover/index.js";
|
|
12
|
-
import '../../assets/InputTextBase.css';const Re = (
|
|
12
|
+
import '../../assets/InputTextBase.css';const Re = (s) => {
|
|
13
13
|
const {
|
|
14
|
-
textAlign:
|
|
15
|
-
value:
|
|
16
|
-
defaultValue:
|
|
17
|
-
type:
|
|
18
|
-
readOnly:
|
|
19
|
-
placeHolder:
|
|
20
|
-
required:
|
|
21
|
-
leftElements:
|
|
14
|
+
textAlign: f = "left",
|
|
15
|
+
value: A,
|
|
16
|
+
defaultValue: z,
|
|
17
|
+
type: b = "text",
|
|
18
|
+
readOnly: m = !1,
|
|
19
|
+
placeHolder: H,
|
|
20
|
+
required: g,
|
|
21
|
+
leftElements: y,
|
|
22
22
|
rightElements: q,
|
|
23
23
|
children: M,
|
|
24
24
|
customClass: U,
|
|
25
25
|
customClassForInputContent: V,
|
|
26
|
-
customClassForLabel:
|
|
26
|
+
customClassForLabel: v,
|
|
27
27
|
customClassForSideButtons: G,
|
|
28
|
-
inputRef:
|
|
28
|
+
inputRef: i,
|
|
29
29
|
inputBaseRef: J,
|
|
30
|
-
label:
|
|
31
|
-
labelUppercase:
|
|
32
|
-
hint:
|
|
33
|
-
hintPosition:
|
|
34
|
-
errorMessages:
|
|
30
|
+
label: l,
|
|
31
|
+
labelUppercase: C,
|
|
32
|
+
hint: r,
|
|
33
|
+
hintPosition: I = "below",
|
|
34
|
+
errorMessages: j,
|
|
35
35
|
visible: Q = !0,
|
|
36
36
|
permissionAttr: X,
|
|
37
37
|
onDeniedActions: Y,
|
|
38
|
-
handlerSetOnDenied:
|
|
39
|
-
targetRef:
|
|
40
|
-
skeletonize:
|
|
38
|
+
handlerSetOnDenied: D,
|
|
39
|
+
targetRef: w,
|
|
40
|
+
skeletonize: p = !1,
|
|
41
41
|
style: Z,
|
|
42
42
|
styleForInputContent: ee,
|
|
43
43
|
styleForWrapper: te,
|
|
44
44
|
styleForLabel: Pe,
|
|
45
|
-
styleForSideButtons:
|
|
46
|
-
disabled:
|
|
47
|
-
autoFocus:
|
|
45
|
+
styleForSideButtons: se,
|
|
46
|
+
disabled: O = !1,
|
|
47
|
+
autoFocus: ne,
|
|
48
48
|
maxLength: oe,
|
|
49
49
|
name: ie,
|
|
50
50
|
id: le,
|
|
51
51
|
multiple: re = !1,
|
|
52
52
|
accept: ae,
|
|
53
|
-
onChange:
|
|
54
|
-
onDragOver:
|
|
55
|
-
onDrop:
|
|
56
|
-
onDragLeave:
|
|
57
|
-
onClick:
|
|
53
|
+
onChange: F,
|
|
54
|
+
onDragOver: N,
|
|
55
|
+
onDrop: R,
|
|
56
|
+
onDragLeave: P,
|
|
57
|
+
onClick: B,
|
|
58
58
|
readOnlyClass: ce,
|
|
59
59
|
autoComplete: de = "on",
|
|
60
60
|
themePopover: ue = "light",
|
|
61
61
|
popoverAlign: fe = "left",
|
|
62
|
-
tabIndex:
|
|
63
|
-
} =
|
|
64
|
-
let
|
|
65
|
-
const me = [
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
k(() => {
|
|
72
|
-
w && w(d);
|
|
62
|
+
tabIndex: W
|
|
63
|
+
} = s;
|
|
64
|
+
let a;
|
|
65
|
+
const me = [u.disabled, u.unvisible, u.readOnly, u.hideContent], o = be(null), c = Y || we(me, X), {
|
|
66
|
+
hideContent: d,
|
|
67
|
+
unvisible: pe
|
|
68
|
+
} = c, [he, h] = ge(!1);
|
|
69
|
+
K(() => {
|
|
70
|
+
D && D(c);
|
|
73
71
|
}, []);
|
|
74
|
-
const
|
|
75
|
-
const
|
|
76
|
-
return
|
|
77
|
-
value:
|
|
78
|
-
defaultValue:
|
|
72
|
+
const E = () => m ? -1 : W || 0, x = () => O || c.disabled, L = () => m || c.readOnly, T = () => {
|
|
73
|
+
const n = L() || x() || d;
|
|
74
|
+
return a = {
|
|
75
|
+
value: d ? "" : A,
|
|
76
|
+
defaultValue: z,
|
|
79
77
|
accept: ae,
|
|
80
|
-
type:
|
|
81
|
-
readOnly:
|
|
82
|
-
placeholder:
|
|
83
|
-
disabled:
|
|
84
|
-
autoFocus:
|
|
78
|
+
type: b,
|
|
79
|
+
readOnly: L(),
|
|
80
|
+
placeholder: H,
|
|
81
|
+
disabled: x() || d,
|
|
82
|
+
autoFocus: ne,
|
|
85
83
|
maxLength: oe,
|
|
86
84
|
name: ie,
|
|
87
85
|
id: le,
|
|
88
86
|
multiple: re,
|
|
89
|
-
className: je({
|
|
87
|
+
className: je({
|
|
88
|
+
textAlign: f,
|
|
89
|
+
readOnly: m,
|
|
90
|
+
readOnlyClass: ce
|
|
91
|
+
}),
|
|
90
92
|
ref: (e) => {
|
|
91
|
-
|
|
93
|
+
i && (ye.isFunction(i) ? i(e) : i.current = e), w && w(e);
|
|
92
94
|
}
|
|
93
|
-
},
|
|
94
|
-
...
|
|
95
|
+
}, n || (a = {
|
|
96
|
+
...a,
|
|
95
97
|
onFocus: (e) => {
|
|
96
|
-
|
|
97
|
-
(o = t.onInputReceiveFocus) == null || o.call(t), t.onFocus && t.onFocus(e);
|
|
98
|
+
s.onInputReceiveFocus?.(), s.onFocus && s.onFocus(e);
|
|
98
99
|
},
|
|
99
100
|
onBlur: (e) => {
|
|
100
|
-
|
|
101
|
-
(o = t.onInputLostFocus) == null || o.call(t), t.onBlur && t.onBlur(e);
|
|
101
|
+
s.onInputLostFocus?.(), s.onBlur && s.onBlur(e);
|
|
102
102
|
},
|
|
103
103
|
onKeyDown: (e) => {
|
|
104
|
-
|
|
104
|
+
s.onKeyDown && s.onKeyDown(e);
|
|
105
105
|
},
|
|
106
106
|
onKeyPress: (e) => {
|
|
107
|
-
|
|
107
|
+
s.onKeyPress && s.onKeyPress(e);
|
|
108
108
|
},
|
|
109
109
|
onChange: (e) => {
|
|
110
|
-
|
|
110
|
+
F && F(e);
|
|
111
111
|
},
|
|
112
112
|
onDragOver: (e) => {
|
|
113
|
-
|
|
113
|
+
N && N(e);
|
|
114
114
|
},
|
|
115
115
|
onDrop: (e) => {
|
|
116
|
-
|
|
116
|
+
R && R(e);
|
|
117
117
|
},
|
|
118
118
|
onDragLeave: (e) => {
|
|
119
|
-
|
|
119
|
+
P && P(e);
|
|
120
120
|
},
|
|
121
121
|
onClick: (e) => {
|
|
122
|
-
|
|
122
|
+
B && B(e);
|
|
123
123
|
}
|
|
124
|
-
}),
|
|
125
|
-
},
|
|
126
|
-
const e =
|
|
127
|
-
e.offsetWidth < e.scrollWidth &&
|
|
124
|
+
}), a;
|
|
125
|
+
}, xe = (n) => {
|
|
126
|
+
const e = n.target;
|
|
127
|
+
e.offsetWidth < e.scrollWidth && h(!0);
|
|
128
128
|
};
|
|
129
|
-
if (
|
|
130
|
-
const
|
|
131
|
-
const {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
129
|
+
if (K(() => {
|
|
130
|
+
const n = new ResizeObserver(([e]) => {
|
|
131
|
+
const {
|
|
132
|
+
target: S
|
|
133
|
+
} = e;
|
|
134
|
+
h((_) => {
|
|
135
|
+
const $ = S.clientWidth < S.scrollWidth;
|
|
136
|
+
return _ === $ ? _ : $;
|
|
135
137
|
});
|
|
136
138
|
});
|
|
137
|
-
return
|
|
138
|
-
|
|
139
|
+
return o.current && n.observe(o.current), () => {
|
|
140
|
+
n && n.disconnect();
|
|
139
141
|
};
|
|
140
|
-
}, []),
|
|
141
|
-
const
|
|
142
|
-
|
|
142
|
+
}, []), o.current) {
|
|
143
|
+
const n = o.current;
|
|
144
|
+
n.offsetWidth < n.scrollWidth && !he && h(!0);
|
|
143
145
|
}
|
|
144
|
-
return !Q ||
|
|
145
|
-
"div",
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
className:
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
style: { alignSelf: "center" },
|
|
180
|
-
children: [
|
|
181
|
-
r,
|
|
182
|
-
y && /* @__PURE__ */ n.jsx("span", { className: "-requiredlabel", children: "*" }),
|
|
183
|
-
!!a && j === "onLabelRight" && !x && /* @__PURE__ */ n.jsx(
|
|
184
|
-
Ne,
|
|
185
|
-
{
|
|
186
|
-
theme: ue,
|
|
187
|
-
align: fe,
|
|
188
|
-
customClass: "-hint",
|
|
189
|
-
iconColor: "#03bde2",
|
|
190
|
-
style: { margin: "0px 5px", height: "auto", width: 20 },
|
|
191
|
-
children: a
|
|
192
|
-
}
|
|
193
|
-
)
|
|
194
|
-
]
|
|
195
|
-
}
|
|
196
|
-
)
|
|
197
|
-
}
|
|
198
|
-
),
|
|
199
|
-
/* @__PURE__ */ n.jsx(A, {})
|
|
200
|
-
]
|
|
201
|
-
}
|
|
202
|
-
),
|
|
203
|
-
/* @__PURE__ */ n.jsxs(
|
|
204
|
-
"div",
|
|
205
|
-
{
|
|
206
|
-
"data-testid": "testInputWrapper",
|
|
207
|
-
style: te,
|
|
208
|
-
className: Ie({
|
|
209
|
-
...t,
|
|
210
|
-
disabled: g() || u
|
|
211
|
-
}),
|
|
212
|
-
children: [
|
|
213
|
-
v && /* @__PURE__ */ n.jsx(
|
|
214
|
-
"div",
|
|
215
|
-
{
|
|
216
|
-
style: ne,
|
|
217
|
-
className: `sidebuttons ${G}`,
|
|
218
|
-
children: v
|
|
219
|
-
}
|
|
220
|
-
),
|
|
221
|
-
/* @__PURE__ */ n.jsxs(
|
|
222
|
-
"div",
|
|
223
|
-
{
|
|
224
|
-
"data-testid": "testInputContent",
|
|
225
|
-
style: ee,
|
|
226
|
-
className: `inputcontent ${V}`,
|
|
227
|
-
children: [
|
|
228
|
-
p === "textarea" ? /* @__PURE__ */ n.jsx(
|
|
229
|
-
"textarea",
|
|
230
|
-
{
|
|
231
|
-
rows: t.rows,
|
|
232
|
-
cols: t.cols,
|
|
233
|
-
tabIndex: L(),
|
|
234
|
-
...S()
|
|
235
|
-
}
|
|
236
|
-
) : /* @__PURE__ */ n.jsx(
|
|
237
|
-
"input",
|
|
238
|
-
{
|
|
239
|
-
autoComplete: de,
|
|
240
|
-
tabIndex: L(),
|
|
241
|
-
"data-testid": "teste-123",
|
|
242
|
-
...S()
|
|
243
|
-
}
|
|
244
|
-
),
|
|
245
|
-
M
|
|
246
|
-
]
|
|
247
|
-
}
|
|
248
|
-
),
|
|
249
|
-
Ce(D || [], x, q)
|
|
250
|
-
]
|
|
251
|
-
}
|
|
252
|
-
),
|
|
253
|
-
/* @__PURE__ */ n.jsx(
|
|
254
|
-
Oe,
|
|
255
|
-
{
|
|
256
|
-
disabled: F,
|
|
257
|
-
visible: !!a && j === "below",
|
|
258
|
-
customClass: "hint",
|
|
259
|
-
description: a
|
|
260
|
-
}
|
|
261
|
-
),
|
|
262
|
-
/* @__PURE__ */ n.jsx(Fe, { messages: D })
|
|
263
|
-
]
|
|
264
|
-
}
|
|
265
|
-
);
|
|
266
|
-
}, He = ve(De(Re));
|
|
146
|
+
return !Q || pe ? null : /* @__PURE__ */ t.jsxs("div", { style: Z, className: `input-base-component ${p ? "-skeletonized" : ""} ${U}`, ref: J, children: [
|
|
147
|
+
l && /* @__PURE__ */ t.jsxs("div", { className: "labelcontainer", style: {
|
|
148
|
+
textAlign: f === "center" ? "left" : f
|
|
149
|
+
}, children: [
|
|
150
|
+
/* @__PURE__ */ t.jsx(k, { labelRef: o, required: g, label: l, onHoverLabel: xe, className: v, labelUppercase: C, tooltip: l.toString(), tooltipPosition: "top" }),
|
|
151
|
+
/* @__PURE__ */ t.jsx("div", { className: "text-content", style: {
|
|
152
|
+
display: "flex"
|
|
153
|
+
}, children: /* @__PURE__ */ t.jsxs("div", { className: `label ${v} ${C && " -uppercase"}`, style: {
|
|
154
|
+
alignSelf: "center"
|
|
155
|
+
}, children: [
|
|
156
|
+
l,
|
|
157
|
+
g && /* @__PURE__ */ t.jsx("span", { className: "-requiredlabel", children: "*" }),
|
|
158
|
+
!!r && I === "onLabelRight" && !p && /* @__PURE__ */ t.jsx(Ne, { theme: ue, align: fe, customClass: "-hint", iconColor: "#03bde2", style: {
|
|
159
|
+
margin: "0px 5px",
|
|
160
|
+
height: "auto",
|
|
161
|
+
width: 20
|
|
162
|
+
}, children: r })
|
|
163
|
+
] }) }),
|
|
164
|
+
/* @__PURE__ */ t.jsx(k, {})
|
|
165
|
+
] }),
|
|
166
|
+
/* @__PURE__ */ t.jsxs("div", { "data-testid": "testInputWrapper", style: te, className: Ie({
|
|
167
|
+
...s,
|
|
168
|
+
disabled: x() || d
|
|
169
|
+
}), children: [
|
|
170
|
+
y && /* @__PURE__ */ t.jsx("div", { style: se, className: `sidebuttons ${G}`, children: y }),
|
|
171
|
+
/* @__PURE__ */ t.jsxs("div", { "data-testid": "testInputContent", style: ee, className: `inputcontent ${V}`, children: [
|
|
172
|
+
b === "textarea" ? /* @__PURE__ */ t.jsx("textarea", { rows: s.rows, cols: s.cols, tabIndex: E(), ...T() }) : /* @__PURE__ */ t.jsx("input", { autoComplete: de, tabIndex: E(), "data-testid": "teste-123", ...T() }),
|
|
173
|
+
M
|
|
174
|
+
] }),
|
|
175
|
+
Ce(j || [], p, q)
|
|
176
|
+
] }),
|
|
177
|
+
/* @__PURE__ */ t.jsx(Oe, { disabled: O, visible: !!r && I === "below", customClass: "hint", description: r }),
|
|
178
|
+
/* @__PURE__ */ t.jsx(Fe, { messages: j })
|
|
179
|
+
] });
|
|
180
|
+
}, ze = ve(De(Re));
|
|
267
181
|
export {
|
|
268
|
-
|
|
182
|
+
ze as default
|
|
269
183
|
};
|
package/lib/inputs/base/Label.js
CHANGED
|
@@ -1,32 +1,30 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { j as f } from "../../chunks/jsx-runtime.D1SHvdVE.js";
|
|
2
|
+
import { c as d } from "../../chunks/compiler-runtime.Cu50tn6L.js";
|
|
3
|
+
import L from "../../internals/withTooltip.js";
|
|
4
|
+
const j = (b) => {
|
|
5
|
+
const e = d.c(12), {
|
|
6
|
+
label: o,
|
|
7
|
+
styleForLabel: i,
|
|
8
|
+
customClassForLabel: u,
|
|
9
|
+
labelUppercase: x,
|
|
9
10
|
required: c,
|
|
10
|
-
targetRef:
|
|
11
|
-
labelRef:
|
|
12
|
-
onHoverLabel:
|
|
13
|
-
} =
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
);
|
|
29
|
-
}, d = b(u);
|
|
11
|
+
targetRef: t,
|
|
12
|
+
labelRef: r,
|
|
13
|
+
onHoverLabel: n
|
|
14
|
+
} = b;
|
|
15
|
+
let l;
|
|
16
|
+
e[0] !== r || e[1] !== t ? (l = (m) => {
|
|
17
|
+
m && (r && (r.current = m), t && t(m));
|
|
18
|
+
}, e[0] = r, e[1] = t, e[2] = l) : l = e[2];
|
|
19
|
+
const p = `label ${u} ${x && " -uppercase"}`;
|
|
20
|
+
let s;
|
|
21
|
+
e[3] !== c ? (s = c && /* @__PURE__ */ f.jsx("span", { className: "-requiredlabel", children: "*" }), e[3] = c, e[4] = s) : s = e[4];
|
|
22
|
+
let a;
|
|
23
|
+
return e[5] !== o || e[6] !== n || e[7] !== i || e[8] !== l || e[9] !== p || e[10] !== s ? (a = /* @__PURE__ */ f.jsxs("span", { style: i, ref: l, onMouseEnter: n, className: p, children: [
|
|
24
|
+
o,
|
|
25
|
+
s
|
|
26
|
+
] }), e[5] = o, e[6] = n, e[7] = i, e[8] = l, e[9] = p, e[10] = s, e[11] = a) : a = e[11], a;
|
|
27
|
+
}, E = L(j);
|
|
30
28
|
export {
|
|
31
|
-
|
|
29
|
+
E as default
|
|
32
30
|
};
|
|
@@ -2,9 +2,9 @@ import { JSX } from 'react';
|
|
|
2
2
|
import { IBaseProps } from './types';
|
|
3
3
|
import { TextAlign } from '../../../lib/@types/Align';
|
|
4
4
|
export declare const getInputClass: ({ textAlign, readOnly, readOnlyClass, }: {
|
|
5
|
-
textAlign?: TextAlign
|
|
6
|
-
readOnly?: boolean
|
|
7
|
-
readOnlyClass?: string
|
|
5
|
+
textAlign?: TextAlign;
|
|
6
|
+
readOnly?: boolean;
|
|
7
|
+
readOnlyClass?: string;
|
|
8
8
|
}) => string;
|
|
9
9
|
export declare const getInputWrapperClass: (props: IBaseProps) => string;
|
|
10
10
|
export declare const getRightElements: (errorMessages: string[], skeletonize: boolean, rightElements?: JSX.Element | JSX.Element[]) => JSX.Element[] | null;
|