linear-react-components-ui 1.1.26-beta.6 → 1.1.26-beta.8
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 +10 -4
- package/lib/alerts/BaseAlert.js +3 -1
- package/lib/alerts/Message.js +91 -64
- package/lib/alerts/withAlert.js +10 -6
- package/lib/avatar/index.js +20 -42
- 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 +25 -59
- 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 +1 -9
- package/lib/calendar/base/index.js +129 -95
- package/lib/checkbox/index.js +5 -4
- package/lib/chunks/compiler-runtime.Cu50tn6L.js +54 -0
- package/lib/chunks/index.aw0XaUkg.js +266 -0
- package/lib/chunks/{jsx-runtime.C7wFtzyj.js → jsx-runtime.D1SHvdVE.js} +106 -108
- package/lib/chunks/tabs.BvKfeA6Y.js +244 -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 +41 -54
- 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 +10 -9
- package/lib/dialog/wizard/progressbar.js +89 -80
- 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 +25 -22
- package/lib/drawer/Header.js +53 -40
- package/lib/dropdown/Popup.js +3 -1
- 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 +17 -38
- package/lib/form/FieldNumber.js +40 -36
- package/lib/form/FieldPeriod.js +90 -59
- package/lib/form/helpers.js +4 -1
- package/lib/form/index.js +55 -67
- package/lib/form/withFieldHOC.js +57 -48
- package/lib/form/withFormSecurity.js +6 -9
- 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 +63 -55
- package/lib/index.js +20 -19
- package/lib/inputs/base/InputTextBase.js +62 -146
- package/lib/inputs/base/Label.js +27 -29
- package/lib/inputs/base/helpers.js +3 -1
- package/lib/inputs/color/index.js +52 -73
- package/lib/inputs/date/Dialog.js +15 -16
- package/lib/inputs/date/Dropdown.js +7 -1
- package/lib/inputs/date/index.js +60 -94
- package/lib/inputs/errorMessage/index.js +21 -13
- package/lib/inputs/file/DefaultFile.js +64 -66
- package/lib/inputs/file/DragDropFile.js +39 -93
- package/lib/inputs/file/File.js +8 -22
- package/lib/inputs/file/FileButtonSettings.js +20 -17
- package/lib/inputs/inputHOC.js +38 -20
- package/lib/inputs/mask/BaseMask.js +44 -23
- 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/multiSelect/ActionButtons.js +35 -46
- package/lib/inputs/multiSelect/Dropdown.js +93 -131
- package/lib/inputs/multiSelect/index.js +167 -125
- 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 +6 -1
- package/lib/inputs/period/PeriodList.js +41 -27
- package/lib/inputs/period/helper.js +5 -1
- package/lib/inputs/period/index.js +118 -240
- package/lib/inputs/search/index.js +95 -71
- package/lib/inputs/select/ActionButtons.js +24 -45
- package/lib/inputs/select/Dropdown.js +38 -87
- package/lib/inputs/select/helper.js +6 -2
- package/lib/inputs/select/index.js +23 -25
- package/lib/inputs/select/multiple/Selecteds.js +23 -19
- package/lib/inputs/select/multiple/index.js +35 -101
- package/lib/inputs/select/simple/index.js +26 -89
- 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 +4 -3
- package/lib/list/Separator.js +8 -3
- package/lib/list/index.js +21 -18
- package/lib/menus/float/MenuItem.js +48 -51
- 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 -109
- package/lib/menus/sidenav/NavSubMenuItem.js +36 -20
- 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 +48 -38
- 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 +4 -1
- package/lib/permissionValidations.js +5 -1
- 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 -32
- 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 -46
- package/lib/tabs/context.js +11 -11
- package/lib/tabs/index.js +69 -64
- package/lib/tabs/tabHelpers.js +9 -7
- 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 +1 -1
- package/lib/treetable/Body.js +25 -26
- package/lib/treetable/Header.js +22 -18
- package/lib/treetable/Row.js +210 -147
- 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 +11 -10
- package/lib/chunks/index.CM1aLH2W.js +0 -205
- package/lib/chunks/tabs.D0L_nVfP.js +0 -245
package/lib/tabs/MenuTabs.js
CHANGED
|
@@ -1,89 +1,64 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import y from "
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { j as M } from "../chunks/jsx-runtime.D1SHvdVE.js";
|
|
2
|
+
import { c as y } from "../chunks/compiler-runtime.Cu50tn6L.js";
|
|
3
|
+
import S from "react";
|
|
4
|
+
import { _ as z } from "../chunks/lodash.CIAK_hAg.js";
|
|
5
|
+
import A from "../buttons/Button.js";
|
|
5
6
|
import "../icons/index.js";
|
|
6
7
|
import '../assets/button.css';/* empty css */
|
|
7
|
-
import { menuStyles as
|
|
8
|
-
import { actionsOnPermissionDenied as
|
|
9
|
-
import { useTabs as
|
|
10
|
-
const
|
|
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
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
);
|
|
60
|
-
}, k = y.forwardRef(({
|
|
61
|
-
tabs: e = [],
|
|
62
|
-
tabWidth: t = "auto",
|
|
63
|
-
tabMenuSize: n = "medium",
|
|
64
|
-
tabMenuAlign: a = "left",
|
|
65
|
-
firstTabIdent: i = !1
|
|
66
|
-
}, m) => {
|
|
67
|
-
const l = N.uniqBy(e, "id");
|
|
68
|
-
return /* @__PURE__ */ s.jsx(
|
|
69
|
-
"ul",
|
|
70
|
-
{
|
|
71
|
-
className: `menu ${i && "-firsttabident"}`,
|
|
72
|
-
style: w(a),
|
|
73
|
-
ref: m,
|
|
74
|
-
children: l.map((o) => /* @__PURE__ */ s.jsx(
|
|
75
|
-
R,
|
|
76
|
-
{
|
|
77
|
-
tabMenuSize: n,
|
|
78
|
-
tabWidth: t,
|
|
79
|
-
...o
|
|
80
|
-
},
|
|
81
|
-
o.id
|
|
82
|
-
))
|
|
83
|
-
}
|
|
84
|
-
);
|
|
8
|
+
import { menuStyles as R, onDeniedOptions as W } from "./tabHelpers.js";
|
|
9
|
+
import { actionsOnPermissionDenied as $ } from "../permissionValidations.js";
|
|
10
|
+
import { useTabs as g } from "./useTabs.js";
|
|
11
|
+
const w = (N) => {
|
|
12
|
+
const e = y.c(21), {
|
|
13
|
+
id: t,
|
|
14
|
+
title: l,
|
|
15
|
+
tabWidth: m,
|
|
16
|
+
iconAlign: c,
|
|
17
|
+
iconName: r,
|
|
18
|
+
icon: b,
|
|
19
|
+
disabled: s,
|
|
20
|
+
permissionAttr: i,
|
|
21
|
+
tabMenuSize: o,
|
|
22
|
+
tooltip: n,
|
|
23
|
+
tooltipPosition: u,
|
|
24
|
+
tooltipWidth: T,
|
|
25
|
+
closeable: p
|
|
26
|
+
} = N, {
|
|
27
|
+
selectedTabId: f,
|
|
28
|
+
selectTab: x,
|
|
29
|
+
removeTab: v,
|
|
30
|
+
tabsCount: h
|
|
31
|
+
} = g();
|
|
32
|
+
let a;
|
|
33
|
+
e[0] !== i ? (a = $(W, i), e[0] = i, e[1] = a) : a = e[1];
|
|
34
|
+
const d = a;
|
|
35
|
+
let j;
|
|
36
|
+
return e[2] !== p || e[3] !== s || e[4] !== b || e[5] !== c || e[6] !== r || e[7] !== t || e[8] !== d.disabled || e[9] !== d.unvisible || e[10] !== v || e[11] !== x || e[12] !== f || e[13] !== o || e[14] !== m || e[15] !== h || e[16] !== l || e[17] !== n || e[18] !== u || e[19] !== T ? (j = d.unvisible ? null : /* @__PURE__ */ M.jsxs("li", { style: {
|
|
37
|
+
width: m
|
|
38
|
+
}, className: `menuitem ${f === t && "selected"}`, children: [
|
|
39
|
+
/* @__PURE__ */ M.jsx(A, { className: "btn menubutton", boxShadow: !1, onClick: () => x(t), iconAlign: c, iconName: r, icon: b, disabled: s || !!d.disabled, label: l, size: o, tooltip: n || l, tooltipPosition: u, tooltipWidth: T }),
|
|
40
|
+
p && h > 1 && /* @__PURE__ */ M.jsx("button", { className: "closepanel", onClick: () => v(t) })
|
|
41
|
+
] }, t), e[2] = p, e[3] = s, e[4] = b, e[5] = c, e[6] = r, e[7] = t, e[8] = d.disabled, e[9] = d.unvisible, e[10] = v, e[11] = x, e[12] = f, e[13] = o, e[14] = m, e[15] = h, e[16] = l, e[17] = n, e[18] = u, e[19] = T, e[20] = j) : j = e[20], j;
|
|
42
|
+
}, C = S.forwardRef((N, e) => {
|
|
43
|
+
const t = y.c(20), {
|
|
44
|
+
tabs: l,
|
|
45
|
+
tabWidth: m,
|
|
46
|
+
tabMenuSize: c,
|
|
47
|
+
tabMenuAlign: r,
|
|
48
|
+
firstTabIdent: b
|
|
49
|
+
} = N;
|
|
50
|
+
let s, i, o, n;
|
|
51
|
+
if (t[0] !== e || t[1] !== l || t[2] !== m || t[3] !== c || t[4] !== r || t[5] !== b) {
|
|
52
|
+
const T = l === void 0 ? [] : l, p = m === void 0 ? "auto" : m, f = c === void 0 ? "medium" : c, x = r === void 0 ? "left" : r, v = b === void 0 ? !1 : b, h = z.uniqBy(T, "id");
|
|
53
|
+
s = `menu ${v && "-firsttabident"}`, t[10] !== x ? (i = R(x), t[10] = x, t[11] = i) : i = t[11], o = e;
|
|
54
|
+
let a;
|
|
55
|
+
t[12] !== f || t[13] !== p ? (a = (d) => /* @__PURE__ */ M.jsx(w, { tabMenuSize: f, tabWidth: p, ...d }, d.id), t[12] = f, t[13] = p, t[14] = a) : a = t[14], n = h.map(a), t[0] = e, t[1] = l, t[2] = m, t[3] = c, t[4] = r, t[5] = b, t[6] = s, t[7] = i, t[8] = o, t[9] = n;
|
|
56
|
+
} else
|
|
57
|
+
s = t[6], i = t[7], o = t[8], n = t[9];
|
|
58
|
+
let u;
|
|
59
|
+
return t[15] !== s || t[16] !== i || t[17] !== o || t[18] !== n ? (u = /* @__PURE__ */ M.jsx("ul", { className: s, style: i, ref: o, children: n }), t[15] = s, t[16] = i, t[17] = o, t[18] = n, t[19] = u) : u = t[19], u;
|
|
85
60
|
});
|
|
86
|
-
|
|
61
|
+
C.displayName = "MenuTabs";
|
|
87
62
|
export {
|
|
88
|
-
|
|
63
|
+
C as default
|
|
89
64
|
};
|
package/lib/tabs/Panel.js
CHANGED
|
@@ -1,51 +1,62 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
import { j as P } from "../chunks/jsx-runtime.D1SHvdVE.js";
|
|
2
|
+
import { c as N } from "../chunks/compiler-runtime.Cu50tn6L.js";
|
|
3
|
+
import { useRef as g, useState as A, useEffect as I } from "react";
|
|
4
|
+
import { onDeniedOptions as _, getCurrentThreshold as k } from "./tabHelpers.js";
|
|
5
|
+
import { actionsOnPermissionDenied as q } from "../permissionValidations.js";
|
|
6
|
+
import B from "../noPermission/index.js";
|
|
7
|
+
import { useTabs as F } from "./useTabs.js";
|
|
8
|
+
const W = (j) => {
|
|
9
|
+
const e = N.c(18), {
|
|
10
|
+
id: c,
|
|
11
|
+
children: u,
|
|
12
|
+
onEndReached: s,
|
|
13
|
+
permissionAttr: f,
|
|
14
|
+
customClass: x,
|
|
15
|
+
onEndReachedThreshold: T,
|
|
16
|
+
style: h
|
|
17
|
+
} = j, C = x === void 0 ? "" : x, p = T === void 0 ? 0.1 : T, {
|
|
18
|
+
selectedTabId: L
|
|
19
|
+
} = F(), w = c !== L ? "hidepanel" : "", t = g(null);
|
|
20
|
+
let i;
|
|
21
|
+
e[0] !== f ? (i = q(_, f), e[0] = f, e[1] = i) : i = e[1];
|
|
22
|
+
const [z] = A(i), {
|
|
23
|
+
hideContent: E
|
|
24
|
+
} = z, v = g(!0), H = g(0);
|
|
25
|
+
let l;
|
|
26
|
+
e[2] !== s || e[3] !== p ? (l = async () => {
|
|
27
|
+
const n = t.current;
|
|
28
|
+
if (n && s) {
|
|
29
|
+
const {
|
|
30
|
+
scrollTop: b,
|
|
31
|
+
scrollHeight: O,
|
|
32
|
+
clientHeight: D
|
|
33
|
+
} = n, S = O - D - b - 1, $ = k(n, p);
|
|
34
|
+
S <= $ && v.current && (v.current = !1, await new Promise((y) => {
|
|
35
|
+
y(s());
|
|
36
|
+
}), H.current = O);
|
|
23
37
|
}
|
|
24
|
-
}, [
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
e.current?.removeEventListener("scroll", n), e.current?.removeEventListener("resize", n), r?.disconnect();
|
|
38
|
+
}, e[2] = s, e[3] = p, e[4] = l) : l = e[4];
|
|
39
|
+
const r = l;
|
|
40
|
+
let d;
|
|
41
|
+
e[5] !== s || e[6] !== r ? (d = () => {
|
|
42
|
+
let n;
|
|
43
|
+
return t.current && s && (n = new ResizeObserver(() => {
|
|
44
|
+
const {
|
|
45
|
+
scrollHeight: b
|
|
46
|
+
} = t.current;
|
|
47
|
+
b !== H.current && (v.current = !0, n?.disconnect());
|
|
48
|
+
}), n.observe(t.current), t.current.addEventListener("scroll", r), t.current.addEventListener("resize", r)), () => {
|
|
49
|
+
t.current?.removeEventListener("scroll", r), t.current?.removeEventListener("resize", r), n?.disconnect();
|
|
37
50
|
};
|
|
38
|
-
}, [
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
);
|
|
51
|
+
}, e[5] = s, e[6] = r, e[7] = d) : d = e[7];
|
|
52
|
+
let a;
|
|
53
|
+
e[8] !== r ? (a = [r], e[8] = r, e[9] = a) : a = e[9], I(d, a);
|
|
54
|
+
const R = `${C} panel ${w}`;
|
|
55
|
+
let o;
|
|
56
|
+
e[10] !== u || e[11] !== E ? (o = E ? /* @__PURE__ */ P.jsx(B, {}) : u, e[10] = u, e[11] = E, e[12] = o) : o = e[12];
|
|
57
|
+
let m;
|
|
58
|
+
return e[13] !== c || e[14] !== h || e[15] !== R || e[16] !== o ? (m = /* @__PURE__ */ P.jsx("div", { ref: t, id: c, className: R, style: h, children: o }), e[13] = c, e[14] = h, e[15] = R, e[16] = o, e[17] = m) : m = e[17], m;
|
|
48
59
|
};
|
|
49
60
|
export {
|
|
50
|
-
|
|
61
|
+
W as default
|
|
51
62
|
};
|
package/lib/tabs/context.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
1
|
+
import { j as F } from "../chunks/jsx-runtime.D1SHvdVE.js";
|
|
2
|
+
import G, { createContext as H, useState as y, useRef as J, useMemo as I, useCallback as x, useEffect as B } from "react";
|
|
3
3
|
import { _ as C } from "../chunks/lodash.CIAK_hAg.js";
|
|
4
4
|
import { getTabs as D } from "./tabHelpers.js";
|
|
5
|
-
const
|
|
6
|
-
function
|
|
5
|
+
const K = H({});
|
|
6
|
+
function V({
|
|
7
7
|
children: E,
|
|
8
8
|
tabs: b,
|
|
9
9
|
container: d,
|
|
@@ -14,7 +14,7 @@ function U({
|
|
|
14
14
|
firstTabIdent: M = !1,
|
|
15
15
|
keepTabOriginalPosition: O = !0
|
|
16
16
|
}) {
|
|
17
|
-
const [o, l] =
|
|
17
|
+
const [o, l] = G.useState(f), [w, R] = y(() => d.current?.clientWidth ?? 0), [n, a] = y(D(b)), v = J(null), h = (v.current?.clientWidth ?? 0) - 38 - (M ? 15 : 0), W = I(() => typeof c == "string" ? c === "auto" ? 100 : parseInt(c) || 100 : c, [c]), m = Math.round(h / W);
|
|
18
18
|
f && f !== o && l(f), n.length > 0 && o === null && l(n[0]?.id);
|
|
19
19
|
const u = I(() => h === 0 ? [] : n.slice(m), [n, m, w]), z = I(() => n.slice(0, m), [n, m, w]), k = n.length, S = x((e) => {
|
|
20
20
|
const t = u.findIndex((r) => r.id === e);
|
|
@@ -24,7 +24,7 @@ function U({
|
|
|
24
24
|
}
|
|
25
25
|
}, [a, z, n, u]), g = x((e) => {
|
|
26
26
|
O || S(e), l(e), T && T(e);
|
|
27
|
-
}, [T, l, S]),
|
|
27
|
+
}, [T, l, S]), q = x((e) => {
|
|
28
28
|
const t = n.findIndex((s) => s.id === e), r = t === 0 ? n[t + 1] : n[t - 1];
|
|
29
29
|
o === e && g(r.id), t !== -1 && a((s) => (s.splice(t, 1), s)), p && p(String(e));
|
|
30
30
|
}, [p, n, u, o]), j = x((e) => {
|
|
@@ -36,7 +36,7 @@ function U({
|
|
|
36
36
|
const t = C.differenceBy(e, n, "id"), r = C.differenceBy(n, e, "id").map((s) => s.id);
|
|
37
37
|
a((s) => {
|
|
38
38
|
let i = s;
|
|
39
|
-
return r && (i = i.filter((
|
|
39
|
+
return r && (i = i.filter((A) => !r.includes(A.id))), [...i, ...t];
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
}, [b]), B(() => {
|
|
@@ -46,7 +46,7 @@ function U({
|
|
|
46
46
|
return d.current && e.observe(d.current), () => {
|
|
47
47
|
e.disconnect();
|
|
48
48
|
};
|
|
49
|
-
}, [d.current, j]), /* @__PURE__ */
|
|
49
|
+
}, [d.current, j]), /* @__PURE__ */ F.jsx(K.Provider, { value: {
|
|
50
50
|
tabs: n,
|
|
51
51
|
menuTabs: z,
|
|
52
52
|
dropdownTabs: u,
|
|
@@ -54,11 +54,11 @@ function U({
|
|
|
54
54
|
tabsCount: k,
|
|
55
55
|
selectTab: g,
|
|
56
56
|
selectedTabId: o,
|
|
57
|
-
removeTab:
|
|
57
|
+
removeTab: q,
|
|
58
58
|
menuRef: v
|
|
59
59
|
}, children: E });
|
|
60
60
|
}
|
|
61
61
|
export {
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
K as TabsContext,
|
|
63
|
+
V as TabsProvider
|
|
64
64
|
};
|
package/lib/tabs/index.js
CHANGED
|
@@ -1,68 +1,73 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import "
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
tabMenuPosition: o = "top",
|
|
19
|
-
customClassForToolBar: j = "",
|
|
20
|
-
tabsWidth: s = "auto",
|
|
21
|
-
...i
|
|
1
|
+
import { j as C } from "../chunks/jsx-runtime.D1SHvdVE.js";
|
|
2
|
+
import { c as D } from "../chunks/compiler-runtime.Cu50tn6L.js";
|
|
3
|
+
import { useRef as G, Fragment as P } from "react";
|
|
4
|
+
import H from "./Menu.js";
|
|
5
|
+
import { default as lt } from "./Panel.js";
|
|
6
|
+
import { tabsClass as J } from "./tabHelpers.js";
|
|
7
|
+
import "../chunks/tabs.BvKfeA6Y.js";
|
|
8
|
+
import { TabsProvider as K } from "./context.js";
|
|
9
|
+
const L = ({
|
|
10
|
+
children: i,
|
|
11
|
+
tabMenuPosition: t,
|
|
12
|
+
toolbar: e,
|
|
13
|
+
tabsWidth: o,
|
|
14
|
+
customClassForToolBar: s,
|
|
15
|
+
tabMenuSize: n,
|
|
16
|
+
tabMenuAlign: r,
|
|
17
|
+
firstTabIdent: l
|
|
22
18
|
}) => {
|
|
23
|
-
const a =
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
19
|
+
const a = /* @__PURE__ */ C.jsx(H, { toolbar: e, tabWidth: o, customClassForToolBar: s, tabMenuSize: n, tabMenuAlign: r, firstTabIdent: l });
|
|
20
|
+
return t === "top" || t === "left" ? /* @__PURE__ */ C.jsxs(P, { children: [
|
|
21
|
+
a,
|
|
22
|
+
i
|
|
23
|
+
] }) : /* @__PURE__ */ C.jsxs(P, { children: [
|
|
24
|
+
i,
|
|
25
|
+
a
|
|
26
|
+
] });
|
|
27
|
+
}, tt = (i) => {
|
|
28
|
+
const t = D.c(38);
|
|
29
|
+
let e, o, s, n, r, l, a, p, h, T, x, c;
|
|
30
|
+
if (t[0] !== i) {
|
|
31
|
+
const {
|
|
32
|
+
toolbar: W,
|
|
33
|
+
toolBarRef: O,
|
|
34
|
+
children: k,
|
|
35
|
+
firstTabIdent: y,
|
|
36
|
+
handlerTabClick: z,
|
|
37
|
+
handlerCloseTab: A,
|
|
38
|
+
style: E,
|
|
39
|
+
tabMenuSize: I,
|
|
40
|
+
tabMenuAlign: S,
|
|
41
|
+
tabMenuPosition: N,
|
|
42
|
+
customClassForToolBar: $,
|
|
43
|
+
tabsWidth: q,
|
|
44
|
+
...w
|
|
45
|
+
} = i;
|
|
46
|
+
c = W, e = k, o = y, n = z, s = A, l = E, a = I, p = S, h = N, T = $, x = q, r = w, t[0] = i, t[1] = e, t[2] = o, t[3] = s, t[4] = n, t[5] = r, t[6] = l, t[7] = a, t[8] = p, t[9] = h, t[10] = T, t[11] = x, t[12] = c;
|
|
47
|
+
} else
|
|
48
|
+
e = t[1], o = t[2], s = t[3], n = t[4], r = t[5], l = t[6], a = t[7], p = t[8], h = t[9], T = t[10], x = t[11], c = t[12];
|
|
49
|
+
let v;
|
|
50
|
+
t[13] !== l ? (v = l === void 0 ? {} : l, t[13] = l, t[14] = v) : v = t[14];
|
|
51
|
+
const M = v, g = a === void 0 ? "default" : a, R = p === void 0 ? "left" : p, d = h === void 0 ? "top" : h, B = T === void 0 ? "" : T, f = x === void 0 ? "auto" : x, F = G(null);
|
|
52
|
+
let b;
|
|
53
|
+
t[15] !== d ? (b = J(d), t[15] = d, t[16] = b) : b = t[16];
|
|
54
|
+
let m;
|
|
55
|
+
t[17] !== e || t[18] !== B || t[19] !== o || t[20] !== R || t[21] !== d || t[22] !== g || t[23] !== f || t[24] !== c ? (m = L({
|
|
56
|
+
children: e,
|
|
57
|
+
tabMenuPosition: d,
|
|
58
|
+
toolbar: c,
|
|
59
|
+
tabsWidth: f,
|
|
60
|
+
customClassForToolBar: B,
|
|
61
|
+
tabMenuSize: g,
|
|
62
|
+
tabMenuAlign: R,
|
|
63
|
+
firstTabIdent: o
|
|
64
|
+
}), t[17] = e, t[18] = B, t[19] = o, t[20] = R, t[21] = d, t[22] = g, t[23] = f, t[24] = c, t[25] = m) : m = t[25];
|
|
65
|
+
let u;
|
|
66
|
+
t[26] !== M || t[27] !== b || t[28] !== m ? (u = /* @__PURE__ */ C.jsx("div", { ref: F, className: b, style: M, children: m }), t[26] = M, t[27] = b, t[28] = m, t[29] = u) : u = t[29];
|
|
67
|
+
let j;
|
|
68
|
+
return t[30] !== e || t[31] !== o || t[32] !== s || t[33] !== n || t[34] !== r || t[35] !== u || t[36] !== f ? (j = /* @__PURE__ */ C.jsx(K, { tabs: e, container: F, onTabChange: n, onTabClose: s, tabsWidth: f, firstTabIdent: o, ...r, children: u }), t[30] = e, t[31] = o, t[32] = s, t[33] = n, t[34] = r, t[35] = u, t[36] = f, t[37] = j) : j = t[37], j;
|
|
64
69
|
};
|
|
65
70
|
export {
|
|
66
|
-
|
|
67
|
-
|
|
71
|
+
lt as TabPanel,
|
|
72
|
+
tt as default
|
|
68
73
|
};
|
package/lib/tabs/tabHelpers.js
CHANGED
|
@@ -3,12 +3,18 @@ import { OPTIONS_ON_DENIED as r } from "../permissionValidations.js";
|
|
|
3
3
|
function h(t, n) {
|
|
4
4
|
if (n < 0) return 0;
|
|
5
5
|
if (n > 1) return 1;
|
|
6
|
-
const {
|
|
6
|
+
const {
|
|
7
|
+
scrollHeight: o,
|
|
8
|
+
clientHeight: c
|
|
9
|
+
} = t, s = o - c, u = Math.round(o * n), f = Math.round(s - s * 0.3);
|
|
7
10
|
return Math.min(u, f);
|
|
8
11
|
}
|
|
9
12
|
const p = (t) => (i.Children.map(t, (e) => {
|
|
10
13
|
if (!e || !i.isValidElement(e)) return null;
|
|
11
|
-
const {
|
|
14
|
+
const {
|
|
15
|
+
children: l,
|
|
16
|
+
...o
|
|
17
|
+
} = e.props;
|
|
12
18
|
return o;
|
|
13
19
|
}) || []).filter((e) => !e.hidden), a = {
|
|
14
20
|
top: "",
|
|
@@ -32,11 +38,7 @@ function M(t) {
|
|
|
32
38
|
justifyContent: m[t]
|
|
33
39
|
};
|
|
34
40
|
}
|
|
35
|
-
const O = [
|
|
36
|
-
r.disabled,
|
|
37
|
-
r.unvisible,
|
|
38
|
-
r.hideContent
|
|
39
|
-
];
|
|
41
|
+
const O = [r.disabled, r.unvisible, r.hideContent];
|
|
40
42
|
export {
|
|
41
43
|
h as getCurrentThreshold,
|
|
42
44
|
p as getTabs,
|
package/lib/textContent/index.js
CHANGED
|
@@ -1,35 +1,33 @@
|
|
|
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
|
-
);
|
|
1
|
+
import { j as C } from "../chunks/jsx-runtime.D1SHvdVE.js";
|
|
2
|
+
import { c as L } from "../chunks/compiler-runtime.Cu50tn6L.js";
|
|
3
|
+
import { forwardRef as N } from "react";
|
|
4
|
+
import { _ as T } from "../chunks/lodash.CIAK_hAg.js";
|
|
5
|
+
import j from "../internals/withTooltip.js";
|
|
6
|
+
import '../assets/index4.css';const x = N((p, m) => {
|
|
7
|
+
const t = L.c(17);
|
|
8
|
+
let e, o, r, l, s, a, n;
|
|
9
|
+
if (t[0] !== m || t[1] !== p) {
|
|
10
|
+
const {
|
|
11
|
+
as: d,
|
|
12
|
+
children: b,
|
|
13
|
+
className: R,
|
|
14
|
+
label: v,
|
|
15
|
+
styleForLabel: u,
|
|
16
|
+
disabled: E,
|
|
17
|
+
targetRef: $,
|
|
18
|
+
labelRef: w,
|
|
19
|
+
onHoverLabel: y,
|
|
20
|
+
...h
|
|
21
|
+
} = p;
|
|
22
|
+
o = b, r = R, s = u, l = y, e = d === void 0 ? "span" : d, n = m, a = T.omit(h, ["tooltipWidth", "tooltip", "tooltipPosition", "labelUppercase"]), t[0] = m, t[1] = p, t[2] = e, t[3] = o, t[4] = r, t[5] = l, t[6] = s, t[7] = a, t[8] = n;
|
|
23
|
+
} else
|
|
24
|
+
e = t[2], o = t[3], r = t[4], l = t[5], s = t[6], a = t[7], n = t[8];
|
|
25
|
+
const c = a, f = `text-content-component ${r}`;
|
|
26
|
+
let i;
|
|
27
|
+
return t[9] !== e || t[10] !== o || t[11] !== l || t[12] !== c || t[13] !== s || t[14] !== f || t[15] !== n ? (i = /* @__PURE__ */ C.jsx(e, { ref: n, style: s, className: f, "data-textcontent": e, onMouseEnter: l, ...c, children: o }), t[9] = e, t[10] = o, t[11] = l, t[12] = c, t[13] = s, t[14] = f, t[15] = n, t[16] = i) : i = t[16], i;
|
|
30
28
|
});
|
|
31
|
-
|
|
32
|
-
const
|
|
29
|
+
x.displayName = "TextContent";
|
|
30
|
+
const U = j(x);
|
|
33
31
|
export {
|
|
34
|
-
|
|
32
|
+
U as default
|
|
35
33
|
};
|