@kashifd/jwero-components 0.7.41 → 0.7.43

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.es.js CHANGED
@@ -46404,11 +46404,15 @@ const oa = ({ stroke: e = "#000", ...t }) => /* @__PURE__ */ v.jsxs(
46404
46404
  mt: 1,
46405
46405
  height: "2.375rem",
46406
46406
  borderRadius: "0.625rem",
46407
+ overflow: "hidden",
46407
46408
  backgroundColor: E
46408
46409
  },
46409
46410
  fullWidth: !0,
46410
46411
  SelectDisplayProps: {
46411
- style: { backgroundColor: E }
46412
+ style: {
46413
+ backgroundColor: E,
46414
+ borderRadius: "0.625rem"
46415
+ }
46412
46416
  },
46413
46417
  ...s,
46414
46418
  children: r == null ? void 0 : r.map((W, te) => {
@@ -48523,10 +48527,11 @@ const fW = ({
48523
48527
  tableHeaderList: r,
48524
48528
  rowData: a,
48525
48529
  onClick: s = () => {
48526
- }
48530
+ },
48531
+ enableScrollButtons: c = !1
48527
48532
  }) => {
48528
- const c = jt();
48529
- return /* @__PURE__ */ v.jsx(
48533
+ const d = jt();
48534
+ return /* @__PURE__ */ v.jsx(v.Fragment, { children: /* @__PURE__ */ v.jsx(
48530
48535
  iv,
48531
48536
  {
48532
48537
  component: lo,
@@ -48535,48 +48540,54 @@ const fW = ({
48535
48540
  ...e
48536
48541
  },
48537
48542
  children: /* @__PURE__ */ v.jsxs(ov, { stickyHeader: !0, children: [
48538
- /* @__PURE__ */ v.jsx(sv, { children: /* @__PURE__ */ v.jsx(xd, { sx: { border: 0 }, children: Gr.isArrayWithValues(r) && r.map((d) => /* @__PURE__ */ v.jsx(
48543
+ /* @__PURE__ */ v.jsx(sv, { children: /* @__PURE__ */ v.jsx(xd, { sx: { border: 0 }, children: Gr.isArrayWithValues(r) && r.map((g) => /* @__PURE__ */ v.jsx(
48539
48544
  bd,
48540
48545
  {
48541
48546
  sx: {
48542
- backgroundColor: c.palette.background.paper,
48547
+ backgroundColor: d.palette.background.paper,
48543
48548
  border: 0,
48544
48549
  padding: "1rem 1rem 0.5rem 1rem"
48545
48550
  },
48546
- align: d.align,
48547
- children: /* @__PURE__ */ v.jsx(vt, { sx: { color: c.colors.text_secondary }, children: d.label })
48551
+ align: g.align,
48552
+ children: /* @__PURE__ */ v.jsx(
48553
+ vt,
48554
+ {
48555
+ sx: { color: d.colors.text_secondary },
48556
+ children: g.label
48557
+ }
48558
+ )
48548
48559
  },
48549
- d.value
48560
+ g.value
48550
48561
  )) }) }),
48551
- /* @__PURE__ */ v.jsx(av, { children: Gr.isArrayWithValues(t) && t.map((d, g) => /* @__PURE__ */ v.jsx(
48562
+ /* @__PURE__ */ v.jsx(av, { children: Gr.isArrayWithValues(t) && t.map((g, m) => /* @__PURE__ */ v.jsx(
48552
48563
  xd,
48553
48564
  {
48554
- onClick: (m) => s(m, d),
48565
+ onClick: (b) => s(b, g),
48555
48566
  sx: {
48556
48567
  "&:last-child td, &:last-child th": { border: 0 },
48557
48568
  borderBottom: '1px solid "#f5f6f7"',
48558
48569
  cursor: "pointer",
48559
48570
  transition: "0.3s ease",
48560
48571
  "&:hover": {
48561
- backgroundColor: c.palette.background.default
48572
+ backgroundColor: d.palette.background.default
48562
48573
  }
48563
48574
  },
48564
- children: r.map((m) => /* @__PURE__ */ v.jsx(
48575
+ children: r.map((b) => /* @__PURE__ */ v.jsx(
48565
48576
  bd,
48566
48577
  {
48567
48578
  component: "th",
48568
48579
  scope: "row",
48569
- align: m.align,
48570
- children: a == null ? void 0 : a[m == null ? void 0 : m.value](d)
48580
+ align: b.align,
48581
+ children: a == null ? void 0 : a[b == null ? void 0 : b.value](g)
48571
48582
  },
48572
- m.value
48583
+ b.value
48573
48584
  ))
48574
48585
  },
48575
- `${d.id}_${g}`
48586
+ `${g.id}_${m}`
48576
48587
  )) })
48577
48588
  ] })
48578
48589
  }
48579
- );
48590
+ ) });
48580
48591
  }, VF = ({
48581
48592
  currentPage: e,
48582
48593
  totalPages: t,
@@ -48645,40 +48656,42 @@ const fW = ({
48645
48656
  customTableHeader: s,
48646
48657
  onClick: c = () => {
48647
48658
  },
48648
- pagination: d = {
48659
+ enableScrollButtons: d = !1,
48660
+ pagination: g = {
48649
48661
  flag: !1,
48650
48662
  currentPage: 1,
48651
48663
  totalPages: 1
48652
48664
  },
48653
- rowsPerPageProps: g = {
48665
+ rowsPerPageProps: m = {
48654
48666
  flag: !1,
48655
48667
  rowsPerPage: 10,
48656
48668
  rowsPerPageOptions: [10, 25, 50, 100],
48657
48669
  onChange: () => {
48658
48670
  }
48659
48671
  },
48660
- sx: m
48672
+ sx: b
48661
48673
  }) => {
48662
- const b = [
48674
+ const w = [
48663
48675
  { value: "title", label: "Title", align: "left" },
48664
48676
  { value: "event", label: "Event", align: "left" }
48665
- ], w = {
48666
- title: (S) => /* @__PURE__ */ v.jsx(vt, { children: "EXAMPLE TITLE" }),
48667
- event: (S) => /* @__PURE__ */ v.jsx(vt, { children: "EXAMPLE EVENT" })
48677
+ ], S = {
48678
+ title: (O) => /* @__PURE__ */ v.jsx(vt, { children: "EXAMPLE TITLE" }),
48679
+ event: (O) => /* @__PURE__ */ v.jsx(vt, { children: "EXAMPLE EVENT" })
48668
48680
  };
48669
- return /* @__PURE__ */ v.jsxs(Ve, { sx: { gap: "1rem", ...m }, children: [
48681
+ return /* @__PURE__ */ v.jsxs(Ve, { sx: { gap: "1rem", height: "100%", width: "100%", ...b }, children: [
48670
48682
  s,
48671
48683
  /* @__PURE__ */ v.jsx(
48672
48684
  YF,
48673
48685
  {
48674
48686
  tableSx: e,
48675
48687
  data: t,
48676
- tableHeaderList: r || b,
48677
- rowData: a || w,
48678
- onClick: c
48688
+ tableHeaderList: r || w,
48689
+ rowData: a || S,
48690
+ onClick: c,
48691
+ enableScrollButtons: d
48679
48692
  }
48680
48693
  ),
48681
- (d.flag || (g == null ? void 0 : g.flag)) && /* @__PURE__ */ v.jsxs(Ve, { direction: "row", sx: { width: "100%" }, children: [
48694
+ (g.flag || (m == null ? void 0 : m.flag)) && /* @__PURE__ */ v.jsxs(Ve, { direction: "row", sx: { width: "100%" }, children: [
48682
48695
  /* @__PURE__ */ v.jsx(
48683
48696
  Ve,
48684
48697
  {
@@ -48686,25 +48699,25 @@ const fW = ({
48686
48699
  alignItems: "center",
48687
48700
  justifyContent: "center",
48688
48701
  sx: { width: "100%" },
48689
- children: d.flag && /* @__PURE__ */ v.jsx(
48702
+ children: g.flag && /* @__PURE__ */ v.jsx(
48690
48703
  VF,
48691
48704
  {
48692
- currentPage: d.currentPage,
48693
- totalPages: d.totalPages,
48694
- onChange: d.onChange,
48705
+ currentPage: g.currentPage,
48706
+ totalPages: g.totalPages,
48707
+ onChange: g.onChange,
48695
48708
  sx: {
48696
- ml: g.flag ? "10%" : "0"
48709
+ ml: m.flag ? "10%" : "0"
48697
48710
  }
48698
48711
  }
48699
48712
  )
48700
48713
  }
48701
48714
  ),
48702
- g.flag && /* @__PURE__ */ v.jsx(
48715
+ m.flag && /* @__PURE__ */ v.jsx(
48703
48716
  UF,
48704
48717
  {
48705
- rowsPerPage: g.rowsPerPage,
48706
- rowsPerPageOptions: g.rowsPerPageOptions,
48707
- onChange: g.onChange,
48718
+ rowsPerPage: m.rowsPerPage,
48719
+ rowsPerPageOptions: m.rowsPerPageOptions,
48720
+ onChange: m.onChange,
48708
48721
  sx: { ml: "1rem" }
48709
48722
  }
48710
48723
  )
@@ -58585,6 +58598,7 @@ const hz = ({ name: e, data: t, labels: r }) => {
58585
58598
  return /* @__PURE__ */ v.jsxs(
58586
58599
  Ve,
58587
58600
  {
58601
+ className: "no-scrollbar",
58588
58602
  sx: {
58589
58603
  backgroundColor: w.colors.white,
58590
58604
  minWidth: "200px",
@@ -58607,48 +58621,55 @@ const hz = ({ name: e, data: t, labels: r }) => {
58607
58621
  children: /* @__PURE__ */ v.jsx(vt, { variant: "xxxlSemibold", ...r, children: e })
58608
58622
  }
58609
58623
  ),
58610
- /* @__PURE__ */ v.jsx(Ve, { sx: { gap: "1rem", height: "100%", overflowY: "auto", ...c }, children: Gr.isArrayWithValues(s) && s.map((S, O) => /* @__PURE__ */ v.jsx(
58611
- Mr,
58624
+ /* @__PURE__ */ v.jsx(
58625
+ Ve,
58612
58626
  {
58613
- title: S.access ? "" : `You don't have permission to edit ${S.label.toLowerCase() || ""}`,
58614
- children: /* @__PURE__ */ v.jsxs(
58615
- Ve,
58627
+ className: "no-scrollbar",
58628
+ sx: { gap: "1rem", height: "100%", overflowY: "auto", ...c },
58629
+ children: Gr.isArrayWithValues(s) && s.map((S, O) => /* @__PURE__ */ v.jsx(
58630
+ Mr,
58616
58631
  {
58617
- onClick: () => {
58618
- b && b(S.value, S.access, S == null ? void 0 : S.navigate);
58619
- },
58620
- direction: "row",
58621
- alignItems: "center",
58622
- justifyContent: "space-between",
58623
- sx: {
58624
- borderRadius: "0.5rem",
58625
- padding: "0.75rem",
58626
- backgroundColor: S.value === t ? w.colors.light_blue : w.palette.background.paper,
58627
- color: S.value === t ? w.colors.secondary : w.colors.text_secondary,
58628
- cursor: S.access ? "pointer" : "not-allowed",
58629
- "&:hover": {
58630
- backgroundColor: S.value === t ? w.colors.light_blue : w.colors.light_grey
58631
- },
58632
- ...m
58633
- },
58634
- children: [
58635
- /* @__PURE__ */ v.jsx(vt, { variant: "xlMedium", ...a, children: S.label }),
58636
- (S == null ? void 0 : S.count) && /* @__PURE__ */ v.jsx(
58637
- af,
58638
- {
58639
- type: "single",
58640
- count: S == null ? void 0 : S.count,
58641
- sx: {
58642
- backgroundColor: w.colors.secondary
58643
- }
58644
- }
58645
- )
58646
- ]
58647
- }
58648
- )
58649
- },
58650
- `${S.value}_${O}`
58651
- )) })
58632
+ title: S.access ? "" : `You don't have permission to edit ${S.label.toLowerCase() || ""}`,
58633
+ children: /* @__PURE__ */ v.jsxs(
58634
+ Ve,
58635
+ {
58636
+ onClick: () => {
58637
+ b && b(S.value, S.access, S == null ? void 0 : S.navigate);
58638
+ },
58639
+ direction: "row",
58640
+ alignItems: "center",
58641
+ justifyContent: "space-between",
58642
+ sx: {
58643
+ borderRadius: "0.5rem",
58644
+ padding: "0.75rem",
58645
+ backgroundColor: S.value === t ? w.colors.light_blue : w.palette.background.paper,
58646
+ color: S.value === t ? w.colors.secondary : w.colors.text_secondary,
58647
+ cursor: S.access ? "pointer" : "not-allowed",
58648
+ "&:hover": {
58649
+ backgroundColor: S.value === t ? w.colors.light_blue : w.colors.light_grey
58650
+ },
58651
+ ...m
58652
+ },
58653
+ children: [
58654
+ /* @__PURE__ */ v.jsx(vt, { variant: "xlMedium", ...a, children: S.label }),
58655
+ (S == null ? void 0 : S.count) && /* @__PURE__ */ v.jsx(
58656
+ af,
58657
+ {
58658
+ type: "single",
58659
+ count: S == null ? void 0 : S.count,
58660
+ sx: {
58661
+ backgroundColor: w.colors.secondary
58662
+ }
58663
+ }
58664
+ )
58665
+ ]
58666
+ }
58667
+ )
58668
+ },
58669
+ `${S.value}_${O}`
58670
+ ))
58671
+ }
58672
+ )
58652
58673
  ]
58653
58674
  }
58654
58675
  );
@@ -60212,7 +60233,7 @@ const fy = ({ ...e }) => /* @__PURE__ */ v.jsxs(
60212
60233
  }, c = [
60213
60234
  {
60214
60235
  name: e || "",
60215
- data: r == null ? void 0 : r.map((d, g) => (g + 1) * 20).reverse()
60236
+ data: r == null ? void 0 : r.map((d, g) => (g + 1) * 20)
60216
60237
  }
60217
60238
  ];
60218
60239
  return /* @__PURE__ */ v.jsx(