@cagatayfdn/flora-components 0.0.156 → 0.0.157

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.
@@ -1,30 +1,47 @@
1
- import { j as t } from "../../jsx-runtime-BcAkpsdy.js";
2
- import m from "../ContentLoader/ContentLoader.js";
3
- import x from "../NoResult/NoResult.js";
4
- import p from "../TypographyText/TypographyText.js";
5
- import { s as f } from "../../InfoBoxList.module-BHkAHgos.js";
6
- const y = ({
7
- items: r,
8
- isLoading: e,
9
- className: s
1
+ import { j as i } from "../../jsx-runtime-BcAkpsdy.js";
2
+ import x from "../ContentLoader/ContentLoader.js";
3
+ import y from "../NoResult/NoResult.js";
4
+ import m from "../TypographyText/TypographyText.js";
5
+ import b from "../ScrollContainer/ScrollContainer.js";
6
+ import { s as c } from "../../InfoBoxList.module-BHkAHgos.js";
7
+ const $ = ({
8
+ items: d,
9
+ isLoading: n,
10
+ className: s,
11
+ scrollProps: p,
12
+ hasScroll: f
10
13
  }) => {
11
- const d = r.every(({ value: o }) => o === void 0);
12
- return /* @__PURE__ */ t.jsx("div", { className: s, "data-testid": "infoboxlist-container", children: d ? /* @__PURE__ */ t.jsx(x, {}) : r.map(
13
- ({ label: o, value: i, copy: n }) => i !== void 0 && /* @__PURE__ */ t.jsxs("div", { className: f.item, "data-testid": "infoboxlist-item", children: [
14
- /* @__PURE__ */ t.jsx("div", { children: o }),
15
- /* @__PURE__ */ t.jsx("div", { children: e ? /* @__PURE__ */ t.jsx(m, {}) : n ? /* @__PURE__ */ t.jsx(
16
- p,
14
+ const j = d.every(({ value: e }) => e === void 0), l = (e, h, a) => h ? /* @__PURE__ */ i.jsx(b, { ...a, children: e.map(
15
+ ({ label: t, value: r, copy: o }) => r !== void 0 && /* @__PURE__ */ i.jsxs("div", { className: c.item, "data-testid": "infoboxlist-item", children: [
16
+ /* @__PURE__ */ i.jsx("div", { children: t }),
17
+ /* @__PURE__ */ i.jsx("div", { children: n ? /* @__PURE__ */ i.jsx(x, {}) : o ? /* @__PURE__ */ i.jsx(
18
+ m,
17
19
  {
18
20
  className: s,
19
21
  ellipsis: !0,
20
- href: `${i}`,
22
+ href: `${r}`,
21
23
  copyable: !0,
22
- children: i
24
+ children: r
23
25
  }
24
- ) : i })
25
- ] }, o + i)
26
- ) });
26
+ ) : r })
27
+ ] }, t + r)
28
+ ) }) : e.map(
29
+ ({ label: t, value: r, copy: o }) => r !== void 0 && /* @__PURE__ */ i.jsxs("div", { className: c.item, "data-testid": "infoboxlist-item", children: [
30
+ /* @__PURE__ */ i.jsx("div", { children: t }),
31
+ /* @__PURE__ */ i.jsx("div", { children: n ? /* @__PURE__ */ i.jsx(x, {}) : o ? /* @__PURE__ */ i.jsx(
32
+ m,
33
+ {
34
+ className: s,
35
+ ellipsis: !0,
36
+ href: `${r}`,
37
+ copyable: !0,
38
+ children: r
39
+ }
40
+ ) : r })
41
+ ] }, t + r)
42
+ );
43
+ return /* @__PURE__ */ i.jsx("div", { className: s, "data-testid": "infoboxlist-container", children: j ? /* @__PURE__ */ i.jsx(y, {}) : l(d, f, p) });
27
44
  };
28
45
  export {
29
- y as default
46
+ $ as default
30
47
  };
package/dist/index.d.mts CHANGED
@@ -768,7 +768,7 @@ export declare interface InfiniteScrollProps {
768
768
  loadMore: () => void;
769
769
  }
770
770
 
771
- export declare const InfoBoxList: ({ items, isLoading, className, }: InfoBoxListProps) => JSX.Element;
771
+ export declare const InfoBoxList: ({ items, isLoading, className, scrollProps, hasScroll }: InfoBoxListProps) => JSX.Element;
772
772
 
773
773
  export declare type InfoBoxListItem = {
774
774
  label: string;
@@ -780,6 +780,8 @@ export declare type InfoBoxListItem = {
780
780
  export declare type InfoBoxListProps = {
781
781
  items: InfoBoxListItem[];
782
782
  isLoading?: boolean;
783
+ hasScroll?: boolean;
784
+ scrollProps?: ScrollPropType;
783
785
  className?: string;
784
786
  };
785
787
 
@@ -1191,6 +1193,8 @@ export declare type ScrollContainerProps = {
1191
1193
  onScroll?: (e: React.UIEvent<HTMLDivElement>) => void;
1192
1194
  };
1193
1195
 
1196
+ declare type ScrollPropType = Omit<typeof ScrollContainer, "children">;
1197
+
1194
1198
  export declare const Select: {
1195
1199
  (props: SelectProps): JSX.Element;
1196
1200
  displayName: string;
package/dist/index.d.ts CHANGED
@@ -768,7 +768,7 @@ export declare interface InfiniteScrollProps {
768
768
  loadMore: () => void;
769
769
  }
770
770
 
771
- export declare const InfoBoxList: ({ items, isLoading, className, }: InfoBoxListProps) => JSX.Element;
771
+ export declare const InfoBoxList: ({ items, isLoading, className, scrollProps, hasScroll }: InfoBoxListProps) => JSX.Element;
772
772
 
773
773
  export declare type InfoBoxListItem = {
774
774
  label: string;
@@ -780,6 +780,8 @@ export declare type InfoBoxListItem = {
780
780
  export declare type InfoBoxListProps = {
781
781
  items: InfoBoxListItem[];
782
782
  isLoading?: boolean;
783
+ hasScroll?: boolean;
784
+ scrollProps?: ScrollPropType;
783
785
  className?: string;
784
786
  };
785
787
 
@@ -1191,6 +1193,8 @@ export declare type ScrollContainerProps = {
1191
1193
  onScroll?: (e: React.UIEvent<HTMLDivElement>) => void;
1192
1194
  };
1193
1195
 
1196
+ declare type ScrollPropType = Omit<typeof ScrollContainer, "children">;
1197
+
1194
1198
  export declare const Select: {
1195
1199
  (props: SelectProps): JSX.Element;
1196
1200
  displayName: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cagatayfdn/flora-components",
3
- "version": "0.0.156",
3
+ "version": "0.0.157",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",