@oliasoft-open-source/react-ui-library 5.15.1 → 5.15.3-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
@@ -137,7 +137,7 @@ declare type FilterToggle = {
137
137
  onChange: () => void;
138
138
  };
139
139
 
140
- export declare const Flex: ({ alignItems, justifyContent, direction, height, children, wrap, gap, }: IFlexProps) => JSX_2.Element;
140
+ export declare const Flex: ({ alignItems, justifyContent, direction, height, width, children, wrap, gap, }: IFlexProps) => JSX_2.Element;
141
141
 
142
142
  export declare const FormRow: ({ children }: IFormRowProps) => JSX_2.Element;
143
143
 
@@ -541,6 +541,7 @@ export declare interface IFlexProps {
541
541
  justifyContent?: string;
542
542
  direction?: Property.FlexDirection;
543
543
  height?: TStringOrNumber;
544
+ width?: TStringOrNumber;
544
545
  children?: default_2.ReactNode;
545
546
  wrap?: boolean;
546
547
  gap?: boolean | TStringOrNumber;
package/dist/index.js CHANGED
@@ -5463,17 +5463,18 @@ const Field = ({ label: e, labelLeft: t = !1, labelWidth: n = "auto", children:
5463
5463
  className: form_module_default.fieldInput,
5464
5464
  children: r
5465
5465
  })]
5466
- }), Flex = ({ alignItems: e = "initial", justifyContent: t = "initial", direction: n = "initial", height: r = "initial", children: i = null, wrap: a = !0, gap: o = !1 }) => /* @__PURE__ */ jsx("div", {
5466
+ }), Flex = ({ alignItems: e = "initial", justifyContent: t = "initial", direction: n = "initial", height: r = "initial", width: i = "initial", children: a = null, wrap: o = !0, gap: s = !1 }) => /* @__PURE__ */ jsx("div", {
5467
5467
  style: {
5468
5468
  display: "flex",
5469
5469
  flexDirection: n,
5470
5470
  alignItems: e,
5471
5471
  justifyContent: t,
5472
5472
  height: typeof r == "number" ? `${r}px` : r,
5473
- flexWrap: a ? "wrap" : "nowrap",
5474
- gap: o === !1 ? 0 : o === !0 ? "var(--padding)" : typeof o == "number" ? `${o}px` : o
5473
+ width: typeof i == "number" ? `${i}px` : i,
5474
+ flexWrap: o ? "wrap" : "nowrap",
5475
+ gap: s === !1 ? 0 : s === !0 ? "var(--padding)" : typeof s == "number" ? `${s}px` : s
5475
5476
  },
5476
- children: i
5477
+ children: a
5477
5478
  });
5478
5479
  var form_row_module_default = { formRow: "_formRow_odewu_1" };
5479
5480
  const FormRow = ({ children: e }) => /* @__PURE__ */ jsx("div", {
@@ -6627,30 +6628,30 @@ var tree_module_default = {
6627
6628
  placeholderContainer: "_placeholderContainer_1cqsz_38"
6628
6629
  };
6629
6630
  const TreeItem = ({ node: t, depth: n, isOpen: r, onToggle: i, hasChild: a, draggable: o, icons: s, onDrop: c }) => {
6630
- let { id: l, data: u } = t, { active: d, testId: f, onClick: p, actions: m = [] } = u, [h, _] = React.useState(!1), [v, y] = React.useState(0), b = (e) => {
6631
+ 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) => {
6631
6632
  e.stopPropagation(), i(l);
6632
- }, x = (e) => {
6633
- e.preventDefault(), e.stopPropagation(), h || (_(!0), y((/* @__PURE__ */ new Date()).getTime()));
6634
6633
  }, S = (e) => {
6635
- e.preventDefault(), e.stopPropagation(), (/* @__PURE__ */ new Date()).getTime() - v > 20 && _(!1);
6634
+ e.preventDefault(), e.stopPropagation(), _ || (v(!0), b((/* @__PURE__ */ new Date()).getTime()));
6636
6635
  }, C = (e) => {
6637
- e.preventDefault(), e.stopPropagation(), a && !r && (/* @__PURE__ */ new Date()).getTime() - v > 200 && b(e);
6636
+ e.preventDefault(), e.stopPropagation(), (/* @__PURE__ */ new Date()).getTime() - y > 20 && v(!1);
6638
6637
  }, w = (e) => {
6639
- e.preventDefault(), e.stopPropagation(), _(!1), y((/* @__PURE__ */ new Date()).getTime()), c == null || c(e);
6638
+ e.preventDefault(), e.stopPropagation(), a && !r && (/* @__PURE__ */ new Date()).getTime() - y > 200 && x(e);
6639
+ }, T = (e) => {
6640
+ e.preventDefault(), e.stopPropagation(), v(!1), b((/* @__PURE__ */ new Date()).getTime()), c == null || c(e);
6640
6641
  };
6641
6642
  return /* @__PURE__ */ jsx("div", {
6642
- className: cx(list_module_default.item, list_module_default.action, d ? list_module_default.active : "", n > 0 ? list_module_default.indented : "", h ? list_module_default.bordered : ""),
6643
+ 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 : ""),
6643
6644
  style: { marginInlineStart: n * 24 },
6644
- "data-testid": f,
6645
+ "data-testid": p,
6645
6646
  onClick: (e) => {
6646
- p ? p(e) : a && b(e);
6647
+ f || (m ? m(e) : a && x(e));
6647
6648
  },
6648
- onDrop: (e) => c ? w(e) : {},
6649
- onDragEnter: (e) => c ? x(e) : {},
6650
- onDragOver: (e) => c ? C(e) : {},
6651
- onDragLeave: (e) => c ? S(e) : {},
6649
+ onDrop: (e) => c ? T(e) : {},
6650
+ onDragEnter: (e) => c ? S(e) : {},
6651
+ onDragOver: (e) => c ? w(e) : {},
6652
+ onDragLeave: (e) => c ? C(e) : {},
6652
6653
  children: /* @__PURE__ */ jsxs("div", {
6653
- className: cx(list_module_default.itemHeader, h ? list_module_default.noPointerEvents : ""),
6654
+ className: cx(list_module_default.itemHeader, _ ? list_module_default.noPointerEvents : ""),
6654
6655
  children: [
6655
6656
  a && /* @__PURE__ */ jsx("div", {
6656
6657
  className: tree_module_default.toggle,
@@ -6660,7 +6661,7 @@ const TreeItem = ({ node: t, depth: n, isOpen: r, onToggle: i, hasChild: a, drag
6660
6661
  small: !0,
6661
6662
  round: !0,
6662
6663
  icon: r ? (s == null ? void 0 : s.collapse) || IconType.COLLAPSE : (s == null ? void 0 : s.expand) || IconType.EXPAND,
6663
- onClick: b
6664
+ onClick: x
6664
6665
  })
6665
6666
  }),
6666
6667
  o && /* @__PURE__ */ jsx("div", {
@@ -6668,12 +6669,12 @@ const TreeItem = ({ node: t, depth: n, isOpen: r, onToggle: i, hasChild: a, drag
6668
6669
  children: /* @__PURE__ */ jsx(Icon, { icon: IconType.DRAG })
6669
6670
  }),
6670
6671
  /* @__PURE__ */ jsx(MetaContent, { item: u }),
6671
- /* @__PURE__ */ jsx("div", {
6672
+ /* @__PURE__ */ jsxs("div", {
6672
6673
  className: list_module_default.right,
6673
- children: /* @__PURE__ */ jsx("div", {
6674
+ children: [/* @__PURE__ */ jsx(MetaCount, { item: u }), !f && h.length > 0 && /* @__PURE__ */ jsx("div", {
6674
6675
  className: list_module_default.actions,
6675
- children: /* @__PURE__ */ jsx(Actions, { actions: m })
6676
- })
6676
+ children: /* @__PURE__ */ jsx(Actions, { actions: h })
6677
+ })]
6677
6678
  })
6678
6679
  ]
6679
6680
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oliasoft-open-source/react-ui-library",
3
- "version": "5.15.1",
3
+ "version": "5.15.3-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": {