qaema-ui 0.0.59 → 0.0.61

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.
Files changed (61) hide show
  1. package/dist/_virtual/index.js +5 -5
  2. package/dist/_virtual/index2.js +4 -4
  3. package/dist/_virtual/index3.js +4 -4
  4. package/dist/_virtual/index7.js +2 -3
  5. package/dist/_virtual/index8.js +3 -2
  6. package/dist/components/DropDownWithTable/Table/Table.js +35 -34
  7. package/dist/components/DropDownWithTable/Table/Table.types.d.ts +1 -0
  8. package/dist/components/PriceCard.d.ts +13 -0
  9. package/dist/components/PriceCard.js +170 -91
  10. package/dist/components/StatCard.js +8 -7
  11. package/dist/components/Table/Table.js +39 -38
  12. package/dist/components/Table/Table.types.d.ts +1 -0
  13. package/dist/components/Table/components/CellComponents.js +1 -1
  14. package/dist/node_modules/react-bootstrap/esm/Alert.js +1 -1
  15. package/dist/node_modules/react-bootstrap/esm/AlertHeading.js +1 -1
  16. package/dist/node_modules/react-bootstrap/esm/AlertLink.js +1 -1
  17. package/dist/node_modules/react-bootstrap/esm/Button.js +1 -1
  18. package/dist/node_modules/react-bootstrap/esm/CloseButton.js +1 -1
  19. package/dist/node_modules/react-bootstrap/esm/Col.js +1 -1
  20. package/dist/node_modules/react-bootstrap/esm/Collapse.js +1 -1
  21. package/dist/node_modules/react-bootstrap/esm/Dropdown.js +1 -1
  22. package/dist/node_modules/react-bootstrap/esm/DropdownDivider.js +1 -1
  23. package/dist/node_modules/react-bootstrap/esm/DropdownHeader.js +1 -1
  24. package/dist/node_modules/react-bootstrap/esm/DropdownItem.js +1 -1
  25. package/dist/node_modules/react-bootstrap/esm/DropdownItemText.js +1 -1
  26. package/dist/node_modules/react-bootstrap/esm/DropdownMenu.js +1 -1
  27. package/dist/node_modules/react-bootstrap/esm/DropdownToggle.js +1 -1
  28. package/dist/node_modules/react-bootstrap/esm/Fade.js +1 -1
  29. package/dist/node_modules/react-bootstrap/esm/Feedback.js +1 -1
  30. package/dist/node_modules/react-bootstrap/esm/FloatingLabel.js +1 -1
  31. package/dist/node_modules/react-bootstrap/esm/Form.js +1 -1
  32. package/dist/node_modules/react-bootstrap/esm/FormCheck.js +1 -1
  33. package/dist/node_modules/react-bootstrap/esm/FormCheckInput.js +1 -1
  34. package/dist/node_modules/react-bootstrap/esm/FormCheckLabel.js +1 -1
  35. package/dist/node_modules/react-bootstrap/esm/FormControl.js +1 -1
  36. package/dist/node_modules/react-bootstrap/esm/FormFloating.js +1 -1
  37. package/dist/node_modules/react-bootstrap/esm/FormLabel.js +1 -1
  38. package/dist/node_modules/react-bootstrap/esm/FormRange.js +1 -1
  39. package/dist/node_modules/react-bootstrap/esm/FormSelect.js +1 -1
  40. package/dist/node_modules/react-bootstrap/esm/FormText.js +1 -1
  41. package/dist/node_modules/react-bootstrap/esm/Image.js +1 -1
  42. package/dist/node_modules/react-bootstrap/esm/Nav.js +1 -1
  43. package/dist/node_modules/react-bootstrap/esm/NavItem.js +1 -1
  44. package/dist/node_modules/react-bootstrap/esm/NavLink.js +1 -1
  45. package/dist/node_modules/react-bootstrap/esm/Navbar.js +1 -1
  46. package/dist/node_modules/react-bootstrap/esm/NavbarBrand.js +1 -1
  47. package/dist/node_modules/react-bootstrap/esm/NavbarText.js +1 -1
  48. package/dist/node_modules/react-bootstrap/esm/NavbarToggle.js +1 -1
  49. package/dist/node_modules/react-bootstrap/esm/Offcanvas.js +1 -1
  50. package/dist/node_modules/react-bootstrap/esm/OffcanvasBody.js +1 -1
  51. package/dist/node_modules/react-bootstrap/esm/OffcanvasHeader.js +1 -1
  52. package/dist/node_modules/react-bootstrap/esm/OffcanvasTitle.js +1 -1
  53. package/dist/node_modules/react-bootstrap/esm/OffcanvasToggling.js +1 -1
  54. package/dist/node_modules/react-bootstrap/esm/Toast.js +1 -1
  55. package/dist/node_modules/react-bootstrap/esm/ToastBody.js +1 -1
  56. package/dist/node_modules/react-bootstrap/esm/ToastHeader.js +1 -1
  57. package/dist/node_modules/react-bootstrap/esm/divWithClassName.js +1 -1
  58. package/dist/node_modules/react-helmet-async/lib/index.esm.js +2 -2
  59. package/dist/node_modules/react-is/index.js +1 -1
  60. package/dist/node_modules/recharts/es6/util/ReactUtils.js +1 -1
  61. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
- import { getDefaultExportFromCjs as s } from "./_commonjsHelpers.js";
2
- import { __require as r } from "../node_modules/classnames/index.js";
3
- var a = r();
4
- const t = /* @__PURE__ */ s(a);
1
+ import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
2
+ import { __require as t } from "../node_modules/react-helmet-async/node_modules/react-fast-compare/index.js";
3
+ var a = t();
4
+ const m = /* @__PURE__ */ r(a);
5
5
  export {
6
- t as default
6
+ m as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
2
- import { __require as t } from "../node_modules/react-helmet-async/node_modules/react-fast-compare/index.js";
3
- var a = t();
4
- const m = /* @__PURE__ */ r(a);
2
+ import { __require as o } from "../node_modules/shallowequal/index.js";
3
+ var a = o();
4
+ const t = /* @__PURE__ */ r(a);
5
5
  export {
6
- m as default
6
+ t as default
7
7
  };
@@ -1,7 +1,7 @@
1
- import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
2
- import { __require as o } from "../node_modules/shallowequal/index.js";
3
- var a = o();
4
- const t = /* @__PURE__ */ r(a);
1
+ import { getDefaultExportFromCjs as s } from "./_commonjsHelpers.js";
2
+ import { __require as r } from "../node_modules/classnames/index.js";
3
+ var a = r();
4
+ const t = /* @__PURE__ */ s(a);
5
5
  export {
6
6
  t as default
7
7
  };
@@ -1,5 +1,4 @@
1
- import { __require as r } from "../node_modules/recharts/node_modules/react-is/index.js";
2
- var a = r();
1
+ var e = { exports: {} };
3
2
  export {
4
- a as r
3
+ e as __module
5
4
  };
@@ -1,4 +1,5 @@
1
- var e = { exports: {} };
1
+ import { __require as r } from "../node_modules/recharts/node_modules/react-is/index.js";
2
+ var a = r();
2
3
  export {
3
- e as __module
4
+ a as r
4
5
  };
@@ -6,28 +6,28 @@ import Y from "../../Pagination.js";
6
6
  import Z from "../../Typography.js";
7
7
  import O, { CheckboxCell as H } from "./components/CellComponents.js";
8
8
  import z from "./components/TableHead.js";
9
- import { TableContainer as D, LoadingOverlay as k, TablesWrapper as F, DataScrollBox as R, StyledTable as w, TableBody as W, EmptyState as ee, TableRow as y, TableCellContainer as b, ActionsTable as te, TableFooter as ne } from "./Table.styles.js";
9
+ import { TableContainer as D, LoadingOverlay as k, TablesWrapper as F, DataScrollBox as R, StyledTable as w, TableBody as W, EmptyState as ee, TableRow as y, TableCellContainer as b, ActionsTable as te, TableFooter as se } from "./Table.styles.js";
10
10
  function xe({
11
11
  columns: T,
12
- data: n,
12
+ data: s,
13
13
  keyField: l,
14
14
  selectable: j = !1,
15
- onRowSelect: m,
15
+ onRowSelect: o,
16
16
  rowActions: x,
17
17
  stickyHeader: $ = !1,
18
18
  loading: f = !1,
19
19
  emptyStateMessage: I,
20
- pagination: s,
20
+ pagination: n,
21
21
  onRowClick: u,
22
22
  rowClassName: p,
23
23
  isRowDisabled: d,
24
- breakpoint: _ = "md",
24
+ breakpoint: N = "md",
25
25
  alignHeader: C = "start",
26
26
  // Dropdown related props
27
- isTableHeadVisible: K = !1,
27
+ isTableHeadVisible: _ = !1,
28
28
  isRowSelected: S
29
29
  }) {
30
- const [h, g] = v([]), [B, P] = v(_), [M, A] = v(null), { t: N } = U();
30
+ const [h, g] = v([]), [B, a] = v(N), [K, A] = v(null), { t: M } = U();
31
31
  L(() => {
32
32
  const e = () => {
33
33
  A(null);
@@ -38,31 +38,31 @@ function xe({
38
38
  }, []), L(() => {
39
39
  const e = () => {
40
40
  const i = window.innerWidth;
41
- i < 576 ? P("sm") : i < 992 ? P("md") : P("lg");
41
+ i < 576 ? a("sm") : i < 992 ? a("md") : a("lg");
42
42
  };
43
43
  return e(), window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
44
44
  }, []);
45
- const a = Q(() => T.filter((e) => typeof e.hidden == "function" ? !e.hidden(B) : !e.hidden), [T, B]), V = () => {
46
- h.length === n.length ? g([]) : g([...n]), m && m(h.length === n.length ? [] : [...n]);
45
+ const P = Q(() => T.filter((e) => typeof e.hidden == "function" ? !e.hidden(B) : !e.hidden), [T, B]), V = () => {
46
+ h.length === s.length ? g([]) : g([...s]), o && o(h.length === s.length ? [] : [...s]);
47
47
  }, q = (e) => {
48
48
  const i = h.filter((r) => e[l] === r[l]);
49
49
  return i && i.length > 0;
50
50
  }, G = (e) => {
51
- const i = h.some((o) => o[l] === e[l]);
51
+ const i = h.some((m) => m[l] === e[l]);
52
52
  let r;
53
- i ? r = h.filter((o) => o[l] !== e[l]) : r = [...h, e], g(r), m && m(r);
53
+ i ? r = h.filter((m) => m[l] !== e[l]) : r = [...h, e], g(r), o && o(r);
54
54
  };
55
55
  return /* @__PURE__ */ t.jsxs(D, { children: [
56
56
  f && /* @__PURE__ */ t.jsx(k, { children: /* @__PURE__ */ t.jsx(X, { size: "3rem" }) }),
57
57
  /* @__PURE__ */ t.jsxs(F, { children: [
58
58
  /* @__PURE__ */ t.jsx(R, { children: /* @__PURE__ */ t.jsxs(w, { children: [
59
- K && /* @__PURE__ */ t.jsx(
59
+ _ && /* @__PURE__ */ t.jsx(
60
60
  z,
61
61
  {
62
- data: n,
62
+ data: s,
63
63
  handleSelectAll: V,
64
64
  selectedRows: h,
65
- visibleColumns: a,
65
+ visibleColumns: P,
66
66
  alignHeader: C,
67
67
  rowActions: void 0,
68
68
  stickyHeader: $,
@@ -70,12 +70,12 @@ function xe({
70
70
  loading: f
71
71
  }
72
72
  ),
73
- /* @__PURE__ */ t.jsx(W, { children: n.length === 0 ? /* @__PURE__ */ t.jsx("tr", { children: /* @__PURE__ */ t.jsx("td", { colSpan: (j ? 1 : 0) + a.length, children: /* @__PURE__ */ t.jsx(ee, { children: /* @__PURE__ */ t.jsx(Z, { variant: "mdText", children: I ?? N("NO_DATA_AVAILABLE") }) }) }) }) : n == null ? void 0 : n.map((e, i) => {
74
- const r = (d == null ? void 0 : d(e)) ?? !1, o = S ? S(e) : h.some((c) => c[l] === e[l]), E = e[l], J = (p == null ? void 0 : p(e, i)) ?? "";
73
+ /* @__PURE__ */ t.jsx(W, { children: s.length === 0 ? /* @__PURE__ */ t.jsx("tr", { children: /* @__PURE__ */ t.jsx("td", { colSpan: (j ? 1 : 0) + P.length, children: /* @__PURE__ */ t.jsx(ee, { children: /* @__PURE__ */ t.jsx(Z, { variant: "mdText", children: I ?? M("NO_DATA_AVAILABLE") }) }) }) }) : s == null ? void 0 : s.map((e, i) => {
74
+ const r = (d == null ? void 0 : d(e)) ?? !1, m = S ? S(e) : h.some((c) => c[l] === e[l]), E = e[l], J = (p == null ? void 0 : p(e, i)) ?? "";
75
75
  return /* @__PURE__ */ t.jsxs(
76
76
  y,
77
77
  {
78
- $selected: o,
78
+ $selected: m,
79
79
  $disabled: r,
80
80
  $clickable: !!u && !r,
81
81
  onClick: () => !r && (u == null ? void 0 : u(e)),
@@ -93,13 +93,14 @@ function xe({
93
93
  }
94
94
  }
95
95
  ) }),
96
- a.map((c) => /* @__PURE__ */ t.jsx(b, { $align: c.align, children: /* @__PURE__ */ t.jsx(
96
+ P.map((c) => /* @__PURE__ */ t.jsx(b, { $align: c.align, children: /* @__PURE__ */ t.jsx(
97
97
  O,
98
98
  {
99
99
  column: c,
100
100
  row: e,
101
101
  type: c.cellType ?? "text",
102
102
  align: c.align,
103
+ className: c.className,
103
104
  width: c.width ?? "",
104
105
  minWidth: c.minWidth ?? "",
105
106
  maxWidth: c.maxWidth ?? ""
@@ -115,7 +116,7 @@ function xe({
115
116
  /* @__PURE__ */ t.jsx(
116
117
  z,
117
118
  {
118
- data: n,
119
+ data: s,
119
120
  handleSelectAll: () => {
120
121
  },
121
122
  selectedRows: h,
@@ -127,7 +128,7 @@ function xe({
127
128
  loading: f
128
129
  }
129
130
  ),
130
- /* @__PURE__ */ t.jsx(W, { children: n.length === 0 ? /* @__PURE__ */ t.jsx("tr", { children: /* @__PURE__ */ t.jsx("td", { children: /* @__PURE__ */ t.jsx("div", { style: { height: "3.5rem" } }) }) }) : n == null ? void 0 : n.map((e) => {
131
+ /* @__PURE__ */ t.jsx(W, { children: s.length === 0 ? /* @__PURE__ */ t.jsx("tr", { children: /* @__PURE__ */ t.jsx("td", { children: /* @__PURE__ */ t.jsx("div", { style: { height: "3.5rem" } }) }) }) : s == null ? void 0 : s.map((e) => {
131
132
  const i = (d == null ? void 0 : d(e)) ?? !1;
132
133
  return /* @__PURE__ */ t.jsx(y, { $disabled: i, children: /* @__PURE__ */ t.jsx(b, { $align: "center", $isActionCell: !0, children: /* @__PURE__ */ t.jsx(
133
134
  O,
@@ -137,7 +138,7 @@ function xe({
137
138
  iconOptions: {
138
139
  keyField: l,
139
140
  rowActions: x,
140
- activeDropdown: M,
141
+ activeDropdown: K,
141
142
  setActiveDropdown: A
142
143
  }
143
144
  }
@@ -145,21 +146,21 @@ function xe({
145
146
  }) })
146
147
  ] })
147
148
  ] }),
148
- s && s.enabled && /* @__PURE__ */ t.jsx(ne, { children: /* @__PURE__ */ t.jsx(
149
+ n && n.enabled && /* @__PURE__ */ t.jsx(se, { children: /* @__PURE__ */ t.jsx(
149
150
  Y,
150
151
  {
151
- currentPage: s.currentPage,
152
- totalPages: s.totalPages,
153
- onChange: s.onPageChange,
152
+ currentPage: n.currentPage,
153
+ totalPages: n.totalPages,
154
+ onChange: n.onPageChange,
154
155
  disabled: f,
155
- hidePrevButton: s.hidePrevButton,
156
- hideNextButton: s.hideNextButton,
157
- siblingCount: s.siblingCount,
158
- boundaryCount: s.boundaryCount,
159
- itemsPerPage: s.pageSize,
160
- totalItems: s.totalItems,
161
- itemsPerPageOptions: s.itemsPerPageOptions,
162
- onItemsPerPageChange: s.onItemsPerPageChange
156
+ hidePrevButton: n.hidePrevButton,
157
+ hideNextButton: n.hideNextButton,
158
+ siblingCount: n.siblingCount,
159
+ boundaryCount: n.boundaryCount,
160
+ itemsPerPage: n.pageSize,
161
+ totalItems: n.totalItems,
162
+ itemsPerPageOptions: n.itemsPerPageOptions,
163
+ onItemsPerPageChange: n.onItemsPerPageChange
163
164
  }
164
165
  ) })
165
166
  ] });
@@ -4,6 +4,7 @@ export type TableColumn<T> = {
4
4
  id: string;
5
5
  header: string | React.ReactNode;
6
6
  accessor: keyof T | ((row: T) => React.ReactNode);
7
+ className?: string;
7
8
  width?: string;
8
9
  minWidth?: string;
9
10
  maxWidth?: string;
@@ -20,6 +20,12 @@ export type PriceCardPrice = {
20
20
  color?: string;
21
21
  periodColor?: string;
22
22
  };
23
+ export type PriceCardAddon = {
24
+ id: string;
25
+ titleEn: string;
26
+ baseFare: number;
27
+ color?: string;
28
+ };
23
29
  export type PriceCardProps = {
24
30
  title: string;
25
31
  price: PriceCardPrice;
@@ -43,6 +49,13 @@ export type PriceCardProps = {
43
49
  showFeatures?: boolean;
44
50
  featuresTitle?: string;
45
51
  featuresDescription?: string;
52
+ showAddons?: boolean;
53
+ selectedAddon?: string;
54
+ setSelectedAddon?: (addonId: string) => void;
55
+ addOnsData?: PriceCardAddon[];
56
+ addonsTitle?: string;
57
+ addonsOptionalLabel?: string;
58
+ addonsMonthlyLabel?: string;
46
59
  };
47
60
  declare const PriceCard: React.FC<PriceCardProps>;
48
61
  export default PriceCard;