@oliasoft-open-source/react-ui-library 5.15.1-beta-2 → 5.15.1-beta-4
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/dist/global.css +1 -1
- package/dist/index.d.ts +2 -3
- package/dist/index.js +85 -82
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -631,7 +631,6 @@ export declare interface IInputGroupAddonProps {
|
|
|
631
631
|
children: ReactNode;
|
|
632
632
|
groupOrder?: TGroupOrder;
|
|
633
633
|
small?: boolean;
|
|
634
|
-
testId?: string;
|
|
635
634
|
}
|
|
636
635
|
|
|
637
636
|
export declare interface IInputGroupProps {
|
|
@@ -1011,7 +1010,7 @@ export declare const Input: default_2.ForwardRefExoticComponent<IInputProps & de
|
|
|
1011
1010
|
|
|
1012
1011
|
export declare const InputGroup: ({ children, small, width, }: IInputGroupProps) => ReactElement;
|
|
1013
1012
|
|
|
1014
|
-
export declare const InputGroupAddon: ({ children, groupOrder, small,
|
|
1013
|
+
export declare const InputGroupAddon: ({ children, groupOrder, small, }: IInputGroupAddonProps) => default_2.ReactElement;
|
|
1015
1014
|
|
|
1016
1015
|
export declare enum InputReaderMethods {
|
|
1017
1016
|
READ_AS_TEXT = "readAsText",
|
|
@@ -1810,7 +1809,7 @@ declare interface ITreeRowItem extends TRowType_2 {
|
|
|
1810
1809
|
|
|
1811
1810
|
export declare interface ITreeTableProps extends ITreeProps {
|
|
1812
1811
|
table: {
|
|
1813
|
-
columnAlignment?: (Align.LEFT | Align.RIGHT
|
|
1812
|
+
columnAlignment?: (Align.LEFT | Align.RIGHT)[];
|
|
1814
1813
|
columnWidths?: string[];
|
|
1815
1814
|
fixedWidth?: string;
|
|
1816
1815
|
headers?: TRowType_2[];
|
package/dist/index.js
CHANGED
|
@@ -519,30 +519,30 @@ const AccordionWithDefaultToggle = ({ heading: e, toggleLabel: t, onClickDefault
|
|
|
519
519
|
})] });
|
|
520
520
|
};
|
|
521
521
|
var button_module_default = {
|
|
522
|
-
inputInTable: "
|
|
523
|
-
inputHover: "
|
|
524
|
-
inputFocus: "
|
|
525
|
-
inputError: "
|
|
526
|
-
inputWarning: "
|
|
527
|
-
inputDisabled: "
|
|
528
|
-
hideScrollbars: "
|
|
529
|
-
button: "
|
|
530
|
-
active: "
|
|
531
|
-
green: "
|
|
532
|
-
red: "
|
|
533
|
-
orange: "
|
|
534
|
-
icon: "
|
|
535
|
-
iconOnly: "
|
|
536
|
-
basic: "
|
|
537
|
-
muted: "
|
|
538
|
-
disabled: "
|
|
539
|
-
small: "
|
|
540
|
-
pill: "
|
|
541
|
-
round: "
|
|
542
|
-
inverted: "
|
|
543
|
-
groupOrderFirst: "
|
|
544
|
-
groupOrderMiddle: "
|
|
545
|
-
groupOrderLast: "
|
|
522
|
+
inputInTable: "_inputInTable_1vpoe_1",
|
|
523
|
+
inputHover: "_inputHover_1vpoe_13",
|
|
524
|
+
inputFocus: "_inputFocus_1vpoe_18",
|
|
525
|
+
inputError: "_inputError_1vpoe_25",
|
|
526
|
+
inputWarning: "_inputWarning_1vpoe_26",
|
|
527
|
+
inputDisabled: "_inputDisabled_1vpoe_61",
|
|
528
|
+
hideScrollbars: "_hideScrollbars_1vpoe_67",
|
|
529
|
+
button: "_button_1vpoe_100",
|
|
530
|
+
active: "_active_1vpoe_135",
|
|
531
|
+
green: "_green_1vpoe_135",
|
|
532
|
+
red: "_red_1vpoe_135",
|
|
533
|
+
orange: "_orange_1vpoe_135",
|
|
534
|
+
icon: "_icon_1vpoe_147",
|
|
535
|
+
iconOnly: "_iconOnly_1vpoe_153",
|
|
536
|
+
basic: "_basic_1vpoe_163",
|
|
537
|
+
muted: "_muted_1vpoe_169",
|
|
538
|
+
disabled: "_disabled_1vpoe_188",
|
|
539
|
+
small: "_small_1vpoe_197",
|
|
540
|
+
pill: "_pill_1vpoe_202",
|
|
541
|
+
round: "_round_1vpoe_203",
|
|
542
|
+
inverted: "_inverted_1vpoe_309",
|
|
543
|
+
groupOrderFirst: "_groupOrderFirst_1vpoe_339",
|
|
544
|
+
groupOrderMiddle: "_groupOrderMiddle_1vpoe_340",
|
|
545
|
+
groupOrderLast: "_groupOrderLast_1vpoe_341"
|
|
546
546
|
}, spinner_module_default = { spinner: "_spinner_156m4_1" };
|
|
547
547
|
const Spinner = ({ small: e = !1, colored: t = !1, dark: n = !1, tiny: r = !1 }) => {
|
|
548
548
|
let i = t ? "var(--color-text-primary)" : n ? "var(--color-text-muted)" : "white", a = e ? "var(--font-size)" : r ? "var(--font-size-xs)" : "var(--size)";
|
|
@@ -1738,20 +1738,20 @@ const InputGroup = ({ children: n, small: r = !1, width: a = "100%" }) => {
|
|
|
1738
1738
|
});
|
|
1739
1739
|
};
|
|
1740
1740
|
var input_module_default = {
|
|
1741
|
-
inputInTable: "
|
|
1742
|
-
inputHover: "
|
|
1743
|
-
inputFocus: "
|
|
1744
|
-
inputError: "
|
|
1745
|
-
inputWarning: "
|
|
1746
|
-
inputDisabled: "
|
|
1747
|
-
hideScrollbars: "
|
|
1748
|
-
input: "
|
|
1749
|
-
isInTable: "
|
|
1750
|
-
small: "
|
|
1751
|
-
right: "
|
|
1752
|
-
groupOrderFirst: "
|
|
1753
|
-
groupOrderMiddle: "
|
|
1754
|
-
groupOrderLast: "
|
|
1741
|
+
inputInTable: "_inputInTable_1285q_1",
|
|
1742
|
+
inputHover: "_inputHover_1285q_13",
|
|
1743
|
+
inputFocus: "_inputFocus_1285q_18",
|
|
1744
|
+
inputError: "_inputError_1285q_25",
|
|
1745
|
+
inputWarning: "_inputWarning_1285q_26",
|
|
1746
|
+
inputDisabled: "_inputDisabled_1285q_61",
|
|
1747
|
+
hideScrollbars: "_hideScrollbars_1285q_67",
|
|
1748
|
+
input: "_input_1285q_1",
|
|
1749
|
+
isInTable: "_isInTable_1285q_100",
|
|
1750
|
+
small: "_small_1285q_124",
|
|
1751
|
+
right: "_right_1285q_170",
|
|
1752
|
+
groupOrderFirst: "_groupOrderFirst_1285q_173",
|
|
1753
|
+
groupOrderMiddle: "_groupOrderMiddle_1285q_174",
|
|
1754
|
+
groupOrderLast: "_groupOrderLast_1285q_175"
|
|
1755
1755
|
};
|
|
1756
1756
|
const Input = forwardRef(({ error: e = null, tooltip: t = null, isInTable: n, width: r = void 0, small: i = !1, onChange: a = noop, placeholder: o = "", value: c = "", onKeyPress: l = () => {}, onFocus: u = () => {}, onBlur: d = () => {}, onPaste: f = () => {}, onKeyDown: p = () => {}, selectOnFocus: m = !0, name: h = void 0, type: _ = "text", tabIndex: v = 0, disabled: y = !1, right: b = !1, warning: x = null, groupOrder: S = null, maxTooltipWidth: C = void 0, testId: w = void 0, size: T = null }, E) => {
|
|
1757
1757
|
let D = useContext(DisabledContext), O = (() => {
|
|
@@ -3042,14 +3042,14 @@ const useCustomSelectLogic = ({ state: e, dispatch: t, options: n, setTriggerFoc
|
|
|
3042
3042
|
} : i;
|
|
3043
3043
|
};
|
|
3044
3044
|
var pagination_module_default = { paginationContainer: "_paginationContainer_1tmz4_1" }, input_group_addon_module_default = {
|
|
3045
|
-
addon: "
|
|
3046
|
-
small: "
|
|
3047
|
-
groupOrderFirst: "
|
|
3048
|
-
groupOrderMiddle: "
|
|
3049
|
-
groupOrderLast: "
|
|
3050
|
-
};
|
|
3051
|
-
const InputGroupAddon = ({ children: e, groupOrder: t, small: n = !1
|
|
3052
|
-
let
|
|
3045
|
+
addon: "_addon_b4w53_1",
|
|
3046
|
+
small: "_small_b4w53_12",
|
|
3047
|
+
groupOrderFirst: "_groupOrderFirst_b4w53_16",
|
|
3048
|
+
groupOrderMiddle: "_groupOrderMiddle_b4w53_17",
|
|
3049
|
+
groupOrderLast: "_groupOrderLast_b4w53_21"
|
|
3050
|
+
};
|
|
3051
|
+
const InputGroupAddon = ({ children: e, groupOrder: t, small: n = !1 }) => {
|
|
3052
|
+
let r = (() => {
|
|
3053
3053
|
if (t) switch (t) {
|
|
3054
3054
|
case GroupOrder.FIRST: return input_group_addon_module_default.groupOrderFirst;
|
|
3055
3055
|
case GroupOrder.LAST: return input_group_addon_module_default.groupOrderLast;
|
|
@@ -3058,8 +3058,7 @@ const InputGroupAddon = ({ children: e, groupOrder: t, small: n = !1, testId: r
|
|
|
3058
3058
|
return "";
|
|
3059
3059
|
})();
|
|
3060
3060
|
return /* @__PURE__ */ jsx("span", {
|
|
3061
|
-
className: cx(input_group_addon_module_default.addon,
|
|
3062
|
-
"data-testid": r,
|
|
3061
|
+
className: cx(input_group_addon_module_default.addon, r, n ? input_group_addon_module_default.small : ""),
|
|
3063
3062
|
children: e
|
|
3064
3063
|
});
|
|
3065
3064
|
}, Pagination = ({ pagination: e }) => {
|
|
@@ -6628,30 +6627,30 @@ var tree_module_default = {
|
|
|
6628
6627
|
placeholderContainer: "_placeholderContainer_1cqsz_38"
|
|
6629
6628
|
};
|
|
6630
6629
|
const TreeItem = ({ node: t, depth: n, isOpen: r, onToggle: i, hasChild: a, draggable: o, icons: s, onDrop: c }) => {
|
|
6631
|
-
let { id: l, data: u } = t, { active: d,
|
|
6630
|
+
let { id: l, data: u } = t, { active: d, disabled: f, testId: p, onClick: m, actions: h = [] } = u, [_, v] = React.useState(!1), [y, b] = React.useState(0), x = (e) => {
|
|
6632
6631
|
e.stopPropagation(), i(l);
|
|
6633
|
-
}, x = (e) => {
|
|
6634
|
-
e.preventDefault(), e.stopPropagation(), h || (_(!0), y((/* @__PURE__ */ new Date()).getTime()));
|
|
6635
6632
|
}, S = (e) => {
|
|
6636
|
-
e.preventDefault(), e.stopPropagation(), (/* @__PURE__ */ new Date()).getTime()
|
|
6633
|
+
e.preventDefault(), e.stopPropagation(), _ || (v(!0), b((/* @__PURE__ */ new Date()).getTime()));
|
|
6637
6634
|
}, C = (e) => {
|
|
6638
|
-
e.preventDefault(), e.stopPropagation(),
|
|
6635
|
+
e.preventDefault(), e.stopPropagation(), (/* @__PURE__ */ new Date()).getTime() - y > 20 && v(!1);
|
|
6639
6636
|
}, w = (e) => {
|
|
6640
|
-
e.preventDefault(), e.stopPropagation(),
|
|
6637
|
+
e.preventDefault(), e.stopPropagation(), a && !r && (/* @__PURE__ */ new Date()).getTime() - y > 200 && x(e);
|
|
6638
|
+
}, T = (e) => {
|
|
6639
|
+
e.preventDefault(), e.stopPropagation(), v(!1), b((/* @__PURE__ */ new Date()).getTime()), c == null || c(e);
|
|
6641
6640
|
};
|
|
6642
6641
|
return /* @__PURE__ */ jsx("div", {
|
|
6643
|
-
className: cx(list_module_default.item, list_module_default.action, d ? list_module_default.active : "", n > 0 ? list_module_default.indented : "",
|
|
6642
|
+
className: cx(list_module_default.item, f ? "" : list_module_default.action, d ? list_module_default.active : "", f ? list_module_default.disabled : "", n > 0 ? list_module_default.indented : "", _ ? list_module_default.bordered : ""),
|
|
6644
6643
|
style: { marginInlineStart: n * 24 },
|
|
6645
|
-
"data-testid":
|
|
6644
|
+
"data-testid": p,
|
|
6646
6645
|
onClick: (e) => {
|
|
6647
|
-
|
|
6646
|
+
f || (m ? m(e) : a && x(e));
|
|
6648
6647
|
},
|
|
6649
|
-
onDrop: (e) => c ?
|
|
6650
|
-
onDragEnter: (e) => c ?
|
|
6651
|
-
onDragOver: (e) => c ?
|
|
6652
|
-
onDragLeave: (e) => c ?
|
|
6648
|
+
onDrop: (e) => c ? T(e) : {},
|
|
6649
|
+
onDragEnter: (e) => c ? S(e) : {},
|
|
6650
|
+
onDragOver: (e) => c ? w(e) : {},
|
|
6651
|
+
onDragLeave: (e) => c ? C(e) : {},
|
|
6653
6652
|
children: /* @__PURE__ */ jsxs("div", {
|
|
6654
|
-
className: cx(list_module_default.itemHeader,
|
|
6653
|
+
className: cx(list_module_default.itemHeader, _ ? list_module_default.noPointerEvents : ""),
|
|
6655
6654
|
children: [
|
|
6656
6655
|
a && /* @__PURE__ */ jsx("div", {
|
|
6657
6656
|
className: tree_module_default.toggle,
|
|
@@ -6661,7 +6660,7 @@ const TreeItem = ({ node: t, depth: n, isOpen: r, onToggle: i, hasChild: a, drag
|
|
|
6661
6660
|
small: !0,
|
|
6662
6661
|
round: !0,
|
|
6663
6662
|
icon: r ? (s == null ? void 0 : s.collapse) || IconType.COLLAPSE : (s == null ? void 0 : s.expand) || IconType.EXPAND,
|
|
6664
|
-
onClick:
|
|
6663
|
+
onClick: x
|
|
6665
6664
|
})
|
|
6666
6665
|
}),
|
|
6667
6666
|
o && /* @__PURE__ */ jsx("div", {
|
|
@@ -6669,12 +6668,12 @@ const TreeItem = ({ node: t, depth: n, isOpen: r, onToggle: i, hasChild: a, drag
|
|
|
6669
6668
|
children: /* @__PURE__ */ jsx(Icon, { icon: IconType.DRAG })
|
|
6670
6669
|
}),
|
|
6671
6670
|
/* @__PURE__ */ jsx(MetaContent, { item: u }),
|
|
6672
|
-
/* @__PURE__ */
|
|
6671
|
+
/* @__PURE__ */ jsxs("div", {
|
|
6673
6672
|
className: list_module_default.right,
|
|
6674
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
6673
|
+
children: [/* @__PURE__ */ jsx(MetaCount, { item: u }), !f && h.length > 0 && /* @__PURE__ */ jsx("div", {
|
|
6675
6674
|
className: list_module_default.actions,
|
|
6676
|
-
children: /* @__PURE__ */ jsx(Actions, { actions:
|
|
6677
|
-
})
|
|
6675
|
+
children: /* @__PURE__ */ jsx(Actions, { actions: h })
|
|
6676
|
+
})]
|
|
6678
6677
|
})
|
|
6679
6678
|
]
|
|
6680
6679
|
})
|
|
@@ -6800,16 +6799,17 @@ const TreeItem = ({ node: t, depth: n, isOpen: r, onToggle: i, hasChild: a, drag
|
|
|
6800
6799
|
});
|
|
6801
6800
|
};
|
|
6802
6801
|
var tree_table_module_default = {
|
|
6803
|
-
treeTable: "
|
|
6804
|
-
treeTableHeader: "
|
|
6805
|
-
folderCell: "
|
|
6806
|
-
dragCell: "
|
|
6807
|
-
drag: "
|
|
6808
|
-
folder: "
|
|
6809
|
-
|
|
6802
|
+
treeTable: "_treeTable_3rlrs_1",
|
|
6803
|
+
treeTableHeader: "_treeTableHeader_3rlrs_21",
|
|
6804
|
+
folderCell: "_folderCell_3rlrs_29",
|
|
6805
|
+
dragCell: "_dragCell_3rlrs_30",
|
|
6806
|
+
drag: "_drag_3rlrs_30",
|
|
6807
|
+
folder: "_folder_3rlrs_29",
|
|
6808
|
+
treeTableRow: "_treeTableRow_3rlrs_60",
|
|
6809
|
+
nested: "_nested_3rlrs_63"
|
|
6810
6810
|
};
|
|
6811
6811
|
const TreeTableRow = ({ columnAlignment: e, columnWidths: t, depth: n, draggable: r, handleRef: i, hasChild: a, hasRowActions: o, icons: s, isOpen: c, node: l, onDragEnter: u, onDragOver: d, onDragLeave: f, onDrop: p, onToggle: m }) => {
|
|
6812
|
-
let { data: h, droppable: _ } = l, { id: v, cells: y, testId: b, actions: x = []
|
|
6812
|
+
let { data: h, droppable: _ } = l, { id: v, cells: y, testId: b, actions: x = [] } = h, S = `max(calc(var(--size) * ${a ? n + 1 : n}), var(--size))`;
|
|
6813
6813
|
return /* @__PURE__ */ jsx("table", {
|
|
6814
6814
|
className: table_module_default.table,
|
|
6815
6815
|
"data-testid": b,
|
|
@@ -6818,8 +6818,7 @@ const TreeTableRow = ({ columnAlignment: e, columnWidths: t, depth: n, draggable
|
|
|
6818
6818
|
onDragOver: d,
|
|
6819
6819
|
onDragLeave: f,
|
|
6820
6820
|
children: /* @__PURE__ */ jsx("tbody", { children: /* @__PURE__ */ jsxs("tr", {
|
|
6821
|
-
|
|
6822
|
-
className: cx(tree_table_module_default.treeTableRow, S ? tree_table_module_default.active : void 0),
|
|
6821
|
+
className: cx(tree_table_module_default.treeTableRow, n > 0 && tree_table_module_default.nested),
|
|
6823
6822
|
children: [
|
|
6824
6823
|
r && /* @__PURE__ */ jsx("td", {
|
|
6825
6824
|
className: tree_table_module_default.dragCell,
|
|
@@ -6830,10 +6829,14 @@ const TreeTableRow = ({ columnAlignment: e, columnWidths: t, depth: n, draggable
|
|
|
6830
6829
|
children: /* @__PURE__ */ jsx(Icon, { icon: IconType.DRAG })
|
|
6831
6830
|
})
|
|
6832
6831
|
}),
|
|
6833
|
-
|
|
6834
|
-
_ && /* @__PURE__ */ jsx("td", {
|
|
6832
|
+
/* @__PURE__ */ jsx("td", {
|
|
6835
6833
|
className: tree_table_module_default.folderCell,
|
|
6836
|
-
|
|
6834
|
+
style: {
|
|
6835
|
+
width: S,
|
|
6836
|
+
minWidth: S,
|
|
6837
|
+
maxWidth: S
|
|
6838
|
+
},
|
|
6839
|
+
children: (_ || a) && /* @__PURE__ */ jsx("div", {
|
|
6837
6840
|
className: tree_table_module_default.folder,
|
|
6838
6841
|
onClick: () => m(v),
|
|
6839
6842
|
onMouseDown: (e) => e.stopPropagation(),
|
|
@@ -6852,7 +6855,7 @@ const TreeTableRow = ({ columnAlignment: e, columnWidths: t, depth: n, draggable
|
|
|
6852
6855
|
return /* @__PURE__ */ jsx(Cell, {
|
|
6853
6856
|
isHeader: !1,
|
|
6854
6857
|
cell: n,
|
|
6855
|
-
width: r === 0 ? `calc(${i} - ${
|
|
6858
|
+
width: r === 0 ? `calc(${i} - ${S} + var(--size))` : i,
|
|
6856
6859
|
columnAlignment: e ? e[r] : null
|
|
6857
6860
|
}, r);
|
|
6858
6861
|
}),
|
|
@@ -6870,6 +6873,7 @@ const TreeTableRow = ({ columnAlignment: e, columnWidths: t, depth: n, draggable
|
|
|
6870
6873
|
className: cx(table_module_default.table, tree_table_module_default.treeTableHeader),
|
|
6871
6874
|
children: /* @__PURE__ */ jsx("thead", { children: i.map((i, a) => /* @__PURE__ */ jsxs("tr", { children: [
|
|
6872
6875
|
n && /* @__PURE__ */ jsx("th", { className: tree_table_module_default.dragCell }),
|
|
6876
|
+
/* @__PURE__ */ jsx("th", { className: tree_table_module_default.folderCell }),
|
|
6873
6877
|
i.cells.map((n, r) => /* @__PURE__ */ jsx(Cell, {
|
|
6874
6878
|
isHeader: !0,
|
|
6875
6879
|
cell: n,
|
|
@@ -7249,7 +7253,6 @@ const UnitInput = ({ name: e, placeholder: t = "", disabled: n = !1, disabledUni
|
|
|
7249
7253
|
Q && (ae || !H ? /* @__PURE__ */ jsx(InputGroupAddon, {
|
|
7250
7254
|
groupOrder: ue,
|
|
7251
7255
|
small: o,
|
|
7252
|
-
testId: x && `${x}-addon`,
|
|
7253
7256
|
children: Q
|
|
7254
7257
|
}) : /* @__PURE__ */ jsx(Menu, {
|
|
7255
7258
|
groupOrder: ue,
|
package/package.json
CHANGED