@oliasoft-open-source/react-ui-library 9.5.1-beta-4 → 9.6.0-beta-1
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 +4 -9
- package/dist/index.js +89 -77
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { ChangeEvent } from 'react';
|
|
2
2
|
import { Color as Color_2 } from 'react-aria-components/ColorPicker';
|
|
3
|
-
import { ComponentProps } from 'react';
|
|
4
|
-
import { ComponentType } from 'react';
|
|
5
3
|
import { Context } from 'react';
|
|
6
4
|
import { CSSProperties } from 'react';
|
|
7
5
|
import { default as default_2 } from 'react';
|
|
@@ -16,7 +14,6 @@ import { Id } from 'react-toastify';
|
|
|
16
14
|
import { JSX } from 'react/jsx-runtime';
|
|
17
15
|
import { KeyboardEvent as KeyboardEvent_2 } from 'react';
|
|
18
16
|
import { KeyboardEventHandler } from 'react';
|
|
19
|
-
import { MemoExoticComponent } from 'react';
|
|
20
17
|
import { MouseEvent as MouseEvent_2 } from 'react';
|
|
21
18
|
import { MouseEventHandler } from 'react';
|
|
22
19
|
import { MutableRefObject } from 'react';
|
|
@@ -1271,6 +1268,7 @@ export declare interface IPopoverProps {
|
|
|
1271
1268
|
closeOnOutsideClick?: boolean;
|
|
1272
1269
|
fullWidth?: boolean;
|
|
1273
1270
|
showCloseButton?: boolean;
|
|
1271
|
+
showArrow?: boolean;
|
|
1274
1272
|
testId?: string;
|
|
1275
1273
|
disabled?: boolean;
|
|
1276
1274
|
isOpen?: boolean;
|
|
@@ -2130,7 +2128,7 @@ declare type Placement = 'top-start' | 'top-center' | 'top-end' | 'right-start'
|
|
|
2130
2128
|
|
|
2131
2129
|
export declare const PopConfirm: ({ children, placement, closeOnOutsideClick, fullWidth, title, cancelText, onClickCancel, okText, onClickOk, disableConfirmButton, testId, }: IPopConfirmProps) => JSX.Element;
|
|
2132
2130
|
|
|
2133
|
-
export declare const Popover: ({ children, content, placement, closeOnOutsideClick, fullWidth, showCloseButton, testId, disabled, isOpen: externalIsOpen, onToggle: externalOnToggle, toggleOnTriggerClick, isNonModal, restoreTriggerFocusOnClose, }: IPopoverProps) => JSX.Element | null;
|
|
2131
|
+
export declare const Popover: ({ children, content, placement, closeOnOutsideClick, fullWidth, showCloseButton, showArrow, testId, disabled, isOpen: externalIsOpen, onToggle: externalOnToggle, toggleOnTriggerClick, isNonModal, restoreTriggerFocusOnClose, }: IPopoverProps) => JSX.Element | null;
|
|
2134
2132
|
|
|
2135
2133
|
export declare const Portal: ({ id, children }: IPortalProps) => ReactPortal | null;
|
|
2136
2134
|
|
|
@@ -2477,11 +2475,8 @@ declare type ViewType = typeof SPLIT_VIEW | typeof UNIFIED_VIEW;
|
|
|
2477
2475
|
|
|
2478
2476
|
export declare const widthOfCharacters: (characterCount: number) => string;
|
|
2479
2477
|
|
|
2480
|
-
export declare const withChainableErrorBoundary: (options?: ErrorBoundaryOptions) => <
|
|
2478
|
+
export declare const withChainableErrorBoundary: (options?: ErrorBoundaryOptions) => <T extends default_2.JSXElementConstructor<any>>(Component: T) => T;
|
|
2481
2479
|
|
|
2482
|
-
export declare const withErrorBoundary: <T extends
|
|
2483
|
-
(props: ComponentProps<T>): JSX.Element;
|
|
2484
|
-
displayName: string;
|
|
2485
|
-
}>;
|
|
2480
|
+
export declare const withErrorBoundary: <T extends default_2.JSXElementConstructor<any>>(Component: T, options?: ErrorBoundaryOptions) => T;
|
|
2486
2481
|
|
|
2487
2482
|
export { }
|
package/dist/index.js
CHANGED
|
@@ -870,32 +870,40 @@ var Ca = {
|
|
|
870
870
|
let { sections: t } = e;
|
|
871
871
|
return !s(t) && (!Array.isArray(t) || t.every((e) => un(e)));
|
|
872
872
|
}, J = {
|
|
873
|
-
layer: "
|
|
874
|
-
nested: "
|
|
875
|
-
fileInput: "
|
|
876
|
-
trigger: "
|
|
877
|
-
heading: "
|
|
878
|
-
headingIcon: "
|
|
879
|
-
clickable: "
|
|
880
|
-
option: "
|
|
881
|
-
active: "
|
|
882
|
-
disabled: "
|
|
883
|
-
selected: "
|
|
884
|
-
optionContent: "
|
|
885
|
-
inline: "
|
|
886
|
-
icon: "
|
|
887
|
-
check: "
|
|
888
|
-
label: "
|
|
889
|
-
description: "
|
|
890
|
-
arrow: "
|
|
891
|
-
divider: "
|
|
892
|
-
buttonLabel: "
|
|
893
|
-
component: "
|
|
894
|
-
right: "
|
|
895
|
-
actions: "
|
|
896
|
-
menuPopover: "
|
|
897
|
-
|
|
898
|
-
|
|
873
|
+
layer: "_layer_1wspp_72",
|
|
874
|
+
nested: "_nested_1wspp_85",
|
|
875
|
+
fileInput: "_fileInput_1wspp_88",
|
|
876
|
+
trigger: "_trigger_1wspp_94",
|
|
877
|
+
heading: "_heading_1wspp_103",
|
|
878
|
+
headingIcon: "_headingIcon_1wspp_109",
|
|
879
|
+
clickable: "_clickable_1wspp_116",
|
|
880
|
+
option: "_option_1wspp_120",
|
|
881
|
+
active: "_active_1wspp_139",
|
|
882
|
+
disabled: "_disabled_1wspp_144",
|
|
883
|
+
selected: "_selected_1wspp_147",
|
|
884
|
+
optionContent: "_optionContent_1wspp_154",
|
|
885
|
+
inline: "_inline_1wspp_158",
|
|
886
|
+
icon: "_icon_1wspp_163",
|
|
887
|
+
check: "_check_1wspp_164",
|
|
888
|
+
label: "_label_1wspp_190",
|
|
889
|
+
description: "_description_1wspp_202",
|
|
890
|
+
arrow: "_arrow_1wspp_206",
|
|
891
|
+
divider: "_divider_1wspp_210",
|
|
892
|
+
buttonLabel: "_buttonLabel_1wspp_218",
|
|
893
|
+
component: "_component_1wspp_225",
|
|
894
|
+
right: "_right_1wspp_231",
|
|
895
|
+
actions: "_actions_1wspp_236",
|
|
896
|
+
menuPopover: "_menuPopover_1wspp_243",
|
|
897
|
+
overlayEnterTop: "_overlayEnterTop_1wspp_1",
|
|
898
|
+
overlayEnterBottom: "_overlayEnterBottom_1wspp_1",
|
|
899
|
+
overlayEnterRight: "_overlayEnterRight_1wspp_1",
|
|
900
|
+
overlayEnterLeft: "_overlayEnterLeft_1wspp_1",
|
|
901
|
+
overlayExitTop: "_overlayExitTop_1wspp_1",
|
|
902
|
+
overlayExitBottom: "_overlayExitBottom_1wspp_1",
|
|
903
|
+
overlayExitRight: "_overlayExitRight_1wspp_1",
|
|
904
|
+
overlayExitLeft: "_overlayExitLeft_1wspp_1",
|
|
905
|
+
menuPopoverNested: "_menuPopoverNested_1wspp_271",
|
|
906
|
+
menuItem: "_menuItem_1wspp_274"
|
|
899
907
|
}, Ha = ({ label: e, onClick: t, icon: n, testId: r }) => /* @__PURE__ */ C("div", {
|
|
900
908
|
"data-testid": r,
|
|
901
909
|
children: [e, !!n && /* @__PURE__ */ S("span", {
|
|
@@ -1490,63 +1498,71 @@ var Ca = {
|
|
|
1490
1498
|
children: n
|
|
1491
1499
|
})]
|
|
1492
1500
|
}), So = {
|
|
1493
|
-
toggleBox: "
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1501
|
+
toggleBox: "_toggleBox_1i03y_72",
|
|
1502
|
+
overlayEnterTop: "_overlayEnterTop_1i03y_1",
|
|
1503
|
+
overlayEnterBottom: "_overlayEnterBottom_1i03y_1",
|
|
1504
|
+
overlayEnterRight: "_overlayEnterRight_1i03y_1",
|
|
1505
|
+
overlayEnterLeft: "_overlayEnterLeft_1i03y_1",
|
|
1506
|
+
overlayExitTop: "_overlayExitTop_1i03y_1",
|
|
1507
|
+
overlayExitBottom: "_overlayExitBottom_1i03y_1",
|
|
1508
|
+
overlayExitRight: "_overlayExitRight_1i03y_1",
|
|
1509
|
+
overlayExitLeft: "_overlayExitLeft_1i03y_1",
|
|
1510
|
+
arrowIcon: "_arrowIcon_1i03y_105",
|
|
1511
|
+
fullWidthStyleFix: "_fullWidthStyleFix_1i03y_133",
|
|
1512
|
+
dismiss: "_dismiss_1i03y_138"
|
|
1513
|
+
}, Co = ({ children: e, content: t, placement: i = "top-center", closeOnOutsideClick: a = !0, fullWidth: o = !1, showCloseButton: c = !1, showArrow: f = !0, testId: p, disabled: m = !1, isOpen: h, onToggle: g, toggleOnTriggerClick: y = !0, isNonModal: w = !1, restoreTriggerFocusOnClose: T = !0 }) => {
|
|
1514
|
+
let E = u(W), D = _(null), [O, k] = v(!1), A = m || E, j = h !== void 0, M = j ? h : O, N = l((e) => {
|
|
1515
|
+
A || (j ? g == null || g(e) : k(e));
|
|
1500
1516
|
}, [
|
|
1517
|
+
j,
|
|
1501
1518
|
A,
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
}, [M]);
|
|
1519
|
+
g
|
|
1520
|
+
]), P = l((e) => {
|
|
1521
|
+
!y && e || N(e);
|
|
1522
|
+
}, [N, y]), F = l(() => {
|
|
1523
|
+
N(!1);
|
|
1524
|
+
}, [N]);
|
|
1509
1525
|
if (d(() => {
|
|
1510
|
-
|
|
1526
|
+
A && M && F();
|
|
1511
1527
|
}, [
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1528
|
+
A,
|
|
1529
|
+
M,
|
|
1530
|
+
F
|
|
1515
1531
|
]), Ba({
|
|
1516
|
-
isOpen:
|
|
1517
|
-
enabled: a && !
|
|
1518
|
-
triggerRef:
|
|
1519
|
-
close:
|
|
1532
|
+
isOpen: M,
|
|
1533
|
+
enabled: a && !w,
|
|
1534
|
+
triggerRef: D,
|
|
1535
|
+
close: F
|
|
1520
1536
|
}), !Pa(e)) return null;
|
|
1521
|
-
let
|
|
1537
|
+
let I = s(t) && typeof t.type != "string" && t.type !== n ? r(t, { close: F }) : t, L = /* @__PURE__ */ S(Ia, {
|
|
1522
1538
|
behavior: Fa.PRESS,
|
|
1523
|
-
testId:
|
|
1524
|
-
isDisabled:
|
|
1525
|
-
triggerRef:
|
|
1539
|
+
testId: p,
|
|
1540
|
+
isDisabled: A,
|
|
1541
|
+
triggerRef: D,
|
|
1526
1542
|
safeComponents: [q],
|
|
1527
1543
|
children: e
|
|
1528
|
-
}),
|
|
1544
|
+
}), R = /* @__PURE__ */ C(Ra, {
|
|
1529
1545
|
className: b(So.toggleBox, o && So.fullWidthStyleFix),
|
|
1530
1546
|
placement: i,
|
|
1531
|
-
portalTriggerRef:
|
|
1532
|
-
offset: 6,
|
|
1533
|
-
isNonModal:
|
|
1534
|
-
disableFocusManagement: !
|
|
1535
|
-
isOpen:
|
|
1536
|
-
onOpenChange:
|
|
1537
|
-
triggerRef:
|
|
1547
|
+
portalTriggerRef: D,
|
|
1548
|
+
offset: f ? 6 : 0,
|
|
1549
|
+
isNonModal: w,
|
|
1550
|
+
disableFocusManagement: !T || void 0,
|
|
1551
|
+
isOpen: y ? void 0 : M,
|
|
1552
|
+
onOpenChange: y ? void 0 : N,
|
|
1553
|
+
triggerRef: y ? void 0 : D,
|
|
1538
1554
|
shouldCloseOnInteractOutside: a ? void 0 : () => !1,
|
|
1539
1555
|
isKeyboardDismissDisabled: !a,
|
|
1540
|
-
"data-testid":
|
|
1541
|
-
children: [/* @__PURE__ */ C("div", { children: [
|
|
1556
|
+
"data-testid": p ? `${p}-layer` : void 0,
|
|
1557
|
+
children: [/* @__PURE__ */ C("div", { children: [I, c && /* @__PURE__ */ S("div", {
|
|
1542
1558
|
className: So.dismiss,
|
|
1543
1559
|
children: /* @__PURE__ */ S(q, {
|
|
1544
1560
|
small: !0,
|
|
1545
1561
|
round: !0,
|
|
1546
|
-
onClick:
|
|
1562
|
+
onClick: F,
|
|
1547
1563
|
icon: U.CLOSE
|
|
1548
1564
|
})
|
|
1549
|
-
})] }), /* @__PURE__ */ S(Vn, { children: /* @__PURE__ */ S("svg", {
|
|
1565
|
+
})] }), f && /* @__PURE__ */ S(Vn, { children: /* @__PURE__ */ S("svg", {
|
|
1550
1566
|
width: "12",
|
|
1551
1567
|
height: "12",
|
|
1552
1568
|
viewBox: "0 0 12 12",
|
|
@@ -1555,11 +1571,11 @@ var Ca = {
|
|
|
1555
1571
|
children: /* @__PURE__ */ S("path", { d: "M0 0 L6 6 L12 0" })
|
|
1556
1572
|
}) })]
|
|
1557
1573
|
});
|
|
1558
|
-
return
|
|
1559
|
-
isOpen:
|
|
1560
|
-
onOpenChange:
|
|
1561
|
-
children: [
|
|
1562
|
-
}) : /* @__PURE__ */ C(x, { children: [
|
|
1574
|
+
return y ? /* @__PURE__ */ C(zn, {
|
|
1575
|
+
isOpen: M,
|
|
1576
|
+
onOpenChange: P,
|
|
1577
|
+
children: [L, R]
|
|
1578
|
+
}) : /* @__PURE__ */ C(x, { children: [L, R] });
|
|
1563
1579
|
}, wo = { grid: "_grid_obkz4_1" }, To = (e) => typeof e == "boolean" ? e ? "var(--padding)" : "0px" : typeof e == "number" ? `${e}px` : e || "initial", Eo = (e) => typeof e == "number" ? `${e}px` : e || "initial", Do = ({ rows: e = "initial", columns: t = "initial", columnsTablet: n = null, columnsMobile: r = null, gap: i = !1, height: a = "initial", children: o }) => {
|
|
1564
1580
|
let s = {
|
|
1565
1581
|
"--grid-gap": To(i),
|
|
@@ -10152,14 +10168,10 @@ var Um = (e = {}) => Hm({
|
|
|
10152
10168
|
console.error("Error caught by boundary:", e, t);
|
|
10153
10169
|
},
|
|
10154
10170
|
children: e
|
|
10155
|
-
}), hh = (e, t = {}) => {
|
|
10156
|
-
|
|
10157
|
-
|
|
10158
|
-
|
|
10159
|
-
children: /* @__PURE__ */ S(e, { ...n })
|
|
10160
|
-
});
|
|
10161
|
-
return i.displayName = `WithErrorBoundary(${(n = (r = e.displayName) == null ? e.name : r) == null ? "Component" : n})`, c(i);
|
|
10162
|
-
}, gh = (e = {}) => (t) => hh(t, e), _h = (e) => typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null, vh = (e) => {
|
|
10171
|
+
}), hh = (e, t = {}) => (n) => /* @__PURE__ */ S(mh, {
|
|
10172
|
+
options: t,
|
|
10173
|
+
children: /* @__PURE__ */ S(e, { ...n })
|
|
10174
|
+
}), gh = (e = {}) => (t) => hh(t, e), _h = (e) => typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null, vh = (e) => {
|
|
10163
10175
|
jp(Ep.LanguageKey, e.languageKey), Object.entries(e).forEach(([e, t]) => {
|
|
10164
10176
|
e === Ep.Translations ? jp(e, Op(t)) : jp(e, _h(t) ? t : { ...t });
|
|
10165
10177
|
});
|
package/package.json
CHANGED