@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/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) => <P extends object>(Component: ComponentType<P>) => ComponentType<P>;
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 ComponentType<any>>(Component: T, options?: ErrorBoundaryOptions) => MemoExoticComponent<{
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: "_layer_14ect_1",
874
- nested: "_nested_14ect_14",
875
- fileInput: "_fileInput_14ect_17",
876
- trigger: "_trigger_14ect_23",
877
- heading: "_heading_14ect_32",
878
- headingIcon: "_headingIcon_14ect_38",
879
- clickable: "_clickable_14ect_45",
880
- option: "_option_14ect_49",
881
- active: "_active_14ect_68",
882
- disabled: "_disabled_14ect_73",
883
- selected: "_selected_14ect_76",
884
- optionContent: "_optionContent_14ect_83",
885
- inline: "_inline_14ect_87",
886
- icon: "_icon_14ect_92",
887
- check: "_check_14ect_93",
888
- label: "_label_14ect_119",
889
- description: "_description_14ect_131",
890
- arrow: "_arrow_14ect_135",
891
- divider: "_divider_14ect_139",
892
- buttonLabel: "_buttonLabel_14ect_147",
893
- component: "_component_14ect_154",
894
- right: "_right_14ect_160",
895
- actions: "_actions_14ect_165",
896
- menuPopover: "_menuPopover_14ect_172",
897
- menuPopoverNested: "_menuPopoverNested_14ect_194",
898
- menuItem: "_menuItem_14ect_197"
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: "_toggleBox_eamgh_1",
1494
- arrowIcon: "_arrowIcon_eamgh_27",
1495
- fullWidthStyleFix: "_fullWidthStyleFix_eamgh_43",
1496
- dismiss: "_dismiss_eamgh_48"
1497
- }, Co = ({ children: e, content: t, placement: i = "top-center", closeOnOutsideClick: a = !0, fullWidth: o = !1, showCloseButton: c = !1, testId: f, disabled: p = !1, isOpen: m, onToggle: h, toggleOnTriggerClick: g = !0, isNonModal: y = !1, restoreTriggerFocusOnClose: w = !0 }) => {
1498
- let T = u(W), E = _(null), [D, O] = v(!1), k = p || T, A = m !== void 0, j = A ? m : D, M = l((e) => {
1499
- k || (A ? h == null || h(e) : O(e));
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
- k,
1503
- h
1504
- ]), N = l((e) => {
1505
- !g && e || M(e);
1506
- }, [M, g]), P = l(() => {
1507
- M(!1);
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
- k && j && P();
1526
+ A && M && F();
1511
1527
  }, [
1512
- k,
1513
- j,
1514
- P
1528
+ A,
1529
+ M,
1530
+ F
1515
1531
  ]), Ba({
1516
- isOpen: j,
1517
- enabled: a && !y,
1518
- triggerRef: E,
1519
- close: P
1532
+ isOpen: M,
1533
+ enabled: a && !w,
1534
+ triggerRef: D,
1535
+ close: F
1520
1536
  }), !Pa(e)) return null;
1521
- let F = s(t) && typeof t.type != "string" && t.type !== n ? r(t, { close: P }) : t, I = /* @__PURE__ */ S(Ia, {
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: f,
1524
- isDisabled: k,
1525
- triggerRef: E,
1539
+ testId: p,
1540
+ isDisabled: A,
1541
+ triggerRef: D,
1526
1542
  safeComponents: [q],
1527
1543
  children: e
1528
- }), L = /* @__PURE__ */ C(Ra, {
1544
+ }), R = /* @__PURE__ */ C(Ra, {
1529
1545
  className: b(So.toggleBox, o && So.fullWidthStyleFix),
1530
1546
  placement: i,
1531
- portalTriggerRef: E,
1532
- offset: 6,
1533
- isNonModal: y,
1534
- disableFocusManagement: !w || void 0,
1535
- isOpen: g ? void 0 : j,
1536
- onOpenChange: g ? void 0 : M,
1537
- triggerRef: g ? void 0 : E,
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": f ? `${f}-layer` : void 0,
1541
- children: [/* @__PURE__ */ C("div", { children: [F, c && /* @__PURE__ */ S("div", {
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: P,
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 g ? /* @__PURE__ */ C(zn, {
1559
- isOpen: j,
1560
- onOpenChange: N,
1561
- children: [I, L]
1562
- }) : /* @__PURE__ */ C(x, { children: [I, L] });
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
- var n, r;
10157
- let i = (n) => /* @__PURE__ */ S(mh, {
10158
- options: t,
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oliasoft-open-source/react-ui-library",
3
- "version": "9.5.1-beta-4",
3
+ "version": "9.6.0-beta-1",
4
4
  "description": "Reusable UI components for React projects",
5
5
  "homepage": "https://oliasoft-open-source.gitlab.io/react-ui-library",
6
6
  "bugs": {