qaema-ui 0.0.30 → 0.0.31

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,17 +1,17 @@
1
1
  import { j as t } from "../../_virtual/jsx-runtime.js";
2
- import { useRef as g, useState as v, useCallback as re, useEffect as D } from "react";
3
- import { createPortal as oe } from "react-dom";
4
- import { FaTimes as k, FaAngleDown as le } from "../../node_modules/react-icons/fa/index.js";
5
- import { useTheme as ie } from "styled-components";
6
- import { HelperTextWrapper as se } from "../PhoneInputField.js";
7
- import ae from "../SearchBar.js";
8
- import ce from "../Spinner.js";
9
- import de from "../Typography.js";
10
- import ue from "../../hooks/useZIndex.js";
11
- import { useQaemaCoreTranslation as fe } from "../../i18n/i18n.js";
12
- import { StyledDropDownContainer as me, StyledlabelContainer as he, StyledDropDown as pe, StyledDropDownToggle as xe, StyledDropDownTitle as Se, IconsContainer as je, StyledDropDownMenu as we, SearchContainer as ye, StyledOptionsContainer as ge, SpinnerRow as ve, SelectedTagsContainer as Ce, SelectedTag as be } from "../../styles/Dropdown.styles.js";
13
- import De from "./Table/Table.js";
14
- const Me = (d) => {
2
+ import { useRef as g, useState as v, useCallback as oe, useEffect as D } from "react";
3
+ import { createPortal as le } from "react-dom";
4
+ import { FaTimes as k, FaAngleDown as ie } from "../../node_modules/react-icons/fa/index.js";
5
+ import { useTheme as se } from "styled-components";
6
+ import { HelperTextWrapper as ae } from "../PhoneInputField.js";
7
+ import ce from "../SearchBar.js";
8
+ import de from "../Spinner.js";
9
+ import ue from "../Typography.js";
10
+ import fe from "../../hooks/useZIndex.js";
11
+ import { useQaemaCoreTranslation as me } from "../../i18n/i18n.js";
12
+ import { StyledDropDownContainer as he, StyledlabelContainer as pe, StyledDropDown as xe, StyledDropDownToggle as Se, StyledDropDownTitle as je, IconsContainer as we, StyledDropDownMenu as ye, SearchContainer as ge, StyledOptionsContainer as ve, SpinnerRow as Ce, SelectedTagsContainer as be, SelectedTag as De } from "../../styles/Dropdown.styles.js";
13
+ import Te from "./Table/Table.js";
14
+ const Ne = (d) => {
15
15
  const {
16
16
  label: T,
17
17
  options: R,
@@ -31,17 +31,18 @@ const Me = (d) => {
31
31
  multiSelect: f = !1,
32
32
  isLoading: B = !1,
33
33
  currentSelectedOptions: h = [],
34
- isInteractive: E = !1,
34
+ isInteractive: I = !1,
35
35
  //Table related props
36
36
  columns: A,
37
37
  isTableHeadVisible: V = !1,
38
38
  getDisplayValue: y,
39
39
  isRowDisabled: Q,
40
- rowClassName: X
41
- } = d, p = ie(), { t: I } = fe(), C = g(null), a = g(null), Y = g(null), Z = g(d.currentSelectedOptions !== void 0), [u, b] = v(!1), [q, G] = v(0), [L, J] = v({ top: 0, left: 0 }), [l, x] = v(h), O = F ?? /* @__PURE__ */ t.jsx(t.Fragment, {}), K = ue("dropdown"), m = re(() => {
40
+ rowClassName: X,
41
+ endIcon: Y
42
+ } = d, p = se(), { t: E } = me(), C = g(null), a = g(null), Z = g(null), q = g(d.currentSelectedOptions !== void 0), [u, b] = v(!1), [G, J] = v(0), [L, K] = v({ top: 0, left: 0 }), [l, x] = v(h), O = F ?? /* @__PURE__ */ t.jsx(t.Fragment, {}), U = fe("dropdown"), m = oe(() => {
42
43
  if (a != null && a.current) {
43
44
  const e = a.current.getBoundingClientRect();
44
- G(a.current.offsetWidth / 16), J({
45
+ J(a.current.offsetWidth / 16), K({
45
46
  top: e.bottom + window.scrollY,
46
47
  left: e.left + window.scrollX
47
48
  });
@@ -50,23 +51,23 @@ const Me = (d) => {
50
51
  D(() => (u && (m(), window.addEventListener("resize", m), window.addEventListener("scroll", m, !0)), () => {
51
52
  window.removeEventListener("resize", m), window.removeEventListener("scroll", m, !0);
52
53
  }), [u, m]), D(() => {
53
- if (!Z.current) return;
54
+ if (!q.current) return;
54
55
  (h.length !== l.length || h.some((n, o) => {
55
56
  var c;
56
57
  return n[r] !== ((c = l[o]) == null ? void 0 : c[r]);
57
58
  })) && x(h);
58
59
  }, [h]);
59
- const U = (e, n, o, c = "default") => o ? p.colors.grey.n400 : e ? p.colors.state.error.n450 : n ? p.colors.primary.dark.n600 : c === "light-primary" ? p.colors.primary.purple.n450 : p.colors.grey.n300, $ = (e) => l.some((n) => typeof n == "object" && typeof e == "object" ? n[r] === e[r] : n.value === e.value), _ = (e) => {
60
+ const _ = (e, n, o, c = "default") => o ? p.colors.grey.n400 : e ? p.colors.state.error.n450 : n ? p.colors.primary.dark.n600 : c === "light-primary" ? p.colors.primary.purple.n450 : p.colors.grey.n300, $ = (e) => l.some((n) => typeof n == "object" && typeof e == "object" ? n[r] === e[r] : n.value === e.value), ee = (e) => {
60
61
  if (f) {
61
62
  const n = $(e);
62
63
  let o;
63
64
  n ? o = l.filter((c) => typeof c == "object" && typeof e == "object" ? c[r] !== e[r] : c.value !== e.value) : o = [...l, e], x(o), w(o);
64
65
  } else
65
66
  x([e]), w(e), b(!1), i == null || i(!1);
66
- }, ee = (e) => {
67
+ }, te = (e) => {
67
68
  const n = l.filter((o) => typeof o == "object" && typeof e == "object" ? o[r] !== e[r] : o.value !== e.value);
68
69
  x(n), w(n);
69
- }, te = (e) => {
70
+ }, ne = (e) => {
70
71
  if (e.length === 0) return P;
71
72
  if (!f) {
72
73
  const n = e[0];
@@ -77,7 +78,7 @@ const Me = (d) => {
77
78
  if (r)
78
79
  return String(n == null ? void 0 : n[r]);
79
80
  }
80
- return `${e.length} ${I("SELECTED")}`;
81
+ return `${e.length} ${E("SELECTED")}`;
81
82
  };
82
83
  D(() => {
83
84
  const e = (n) => {
@@ -87,14 +88,14 @@ const Me = (d) => {
87
88
  document.removeEventListener("mousedown", e);
88
89
  };
89
90
  }, [u, i]);
90
- const ne = () => E || (s == null ? void 0 : s.length) === 0 ? null : /* @__PURE__ */ t.jsx(se, { error: s, children: s });
91
- return /* @__PURE__ */ t.jsxs(me, { children: [
92
- T && /* @__PURE__ */ t.jsxs(he, { children: [
91
+ const re = () => I || (s == null ? void 0 : s.length) === 0 ? null : /* @__PURE__ */ t.jsx(ae, { error: s, children: s });
92
+ return /* @__PURE__ */ t.jsxs(he, { children: [
93
+ T && /* @__PURE__ */ t.jsxs(pe, { children: [
93
94
  /* @__PURE__ */ t.jsx("label", { children: T }),
94
- W && /* @__PURE__ */ t.jsx("span", { children: I("OPTIONAL") })
95
+ W && /* @__PURE__ */ t.jsx("span", { children: E("OPTIONAL") })
95
96
  ] }),
96
97
  /* @__PURE__ */ t.jsxs(
97
- pe,
98
+ xe,
98
99
  {
99
100
  show: u,
100
101
  onToggle: () => {
@@ -103,20 +104,21 @@ const Me = (d) => {
103
104
  placement: "bottom-start",
104
105
  autoClose: f ? "outside" : !0,
105
106
  children: [
106
- /* @__PURE__ */ t.jsx(xe, { disabled: S, ref: a, $valid: !s, $variant: d.variant || "default", children: /* @__PURE__ */ t.jsx(Se, { $valid: !s, $isInteractive: E, children: /* @__PURE__ */ t.jsxs("div", { className: "title-container", children: [
107
+ /* @__PURE__ */ t.jsx(Se, { disabled: S, ref: a, $valid: !s, $variant: d.variant || "default", children: /* @__PURE__ */ t.jsx(je, { $valid: !s, $isInteractive: I, children: /* @__PURE__ */ t.jsxs("div", { className: "title-container", children: [
107
108
  /* @__PURE__ */ t.jsxs("div", { className: "heading-container", children: [
108
109
  z && typeof O == "function" && /* @__PURE__ */ t.jsx(O, {}),
109
110
  /* @__PURE__ */ t.jsx(
110
- de,
111
+ ue,
111
112
  {
112
113
  component: "span",
113
114
  variant: "mdText",
114
- color: U(s, l.length > 0, S, d.variant || "default"),
115
- children: te(l)
115
+ color: _(s, l.length > 0, S, d.variant || "default"),
116
+ children: ne(l)
116
117
  }
117
118
  )
118
119
  ] }),
119
- /* @__PURE__ */ t.jsxs(je, { children: [
120
+ /* @__PURE__ */ t.jsxs(we, { children: [
121
+ Y,
120
122
  !f && l.length > 0 && !S && /* @__PURE__ */ t.jsx(
121
123
  k,
122
124
  {
@@ -126,46 +128,46 @@ const Me = (d) => {
126
128
  }
127
129
  }
128
130
  ),
129
- !S && /* @__PURE__ */ t.jsx(le, {})
131
+ !S && /* @__PURE__ */ t.jsx(ie, {})
130
132
  ] })
131
133
  ] }) }) }),
132
- u && oe(
134
+ u && le(
133
135
  /* @__PURE__ */ t.jsxs(
134
- we,
136
+ ye,
135
137
  {
136
138
  ref: C,
137
- $menuWidth: q,
138
- $zIndex: K,
139
+ $menuWidth: G,
140
+ $zIndex: U,
139
141
  style: {
140
142
  position: "fixed",
141
143
  top: `${L.top}px`,
142
144
  left: `${L.left}px`
143
145
  },
144
146
  children: [
145
- H && /* @__PURE__ */ t.jsx(ye, { children: /* @__PURE__ */ t.jsx(ae, { placeholder: N, onSearch: M }) }),
147
+ H && /* @__PURE__ */ t.jsx(ge, { children: /* @__PURE__ */ t.jsx(ce, { placeholder: N, onSearch: M }) }),
146
148
  /* @__PURE__ */ t.jsxs(
147
- ge,
149
+ ve,
148
150
  {
149
- ref: Y,
151
+ ref: Z,
150
152
  onScroll: (e) => {
151
153
  var n;
152
154
  (n = d.onScroll) == null || n.call(d, e);
153
155
  },
154
156
  children: [
155
157
  /* @__PURE__ */ t.jsx(
156
- De,
158
+ Te,
157
159
  {
158
160
  keyField: r,
159
161
  data: R,
160
162
  columns: A,
161
- onRowClick: (e) => _(e),
163
+ onRowClick: (e) => ee(e),
162
164
  isRowSelected: (e) => $(e),
163
165
  isTableHeadVisible: V,
164
166
  isRowDisabled: Q,
165
167
  rowClassName: X
166
168
  }
167
169
  ),
168
- B && /* @__PURE__ */ t.jsx(ve, { children: /* @__PURE__ */ t.jsx(ce, {}) })
170
+ B && /* @__PURE__ */ t.jsx(Ce, { children: /* @__PURE__ */ t.jsx(de, {}) })
169
171
  ]
170
172
  }
171
173
  )
@@ -177,13 +179,13 @@ const Me = (d) => {
177
179
  ]
178
180
  }
179
181
  ),
180
- f && l.length > 0 && /* @__PURE__ */ t.jsx(Ce, { children: l.map((e) => /* @__PURE__ */ t.jsxs(be, { children: [
182
+ f && l.length > 0 && /* @__PURE__ */ t.jsx(be, { children: l.map((e) => /* @__PURE__ */ t.jsxs(De, { children: [
181
183
  y ? y(e) : String(j ? e[j] : e[r]),
182
- /* @__PURE__ */ t.jsx(k, { onClick: () => ee(e) })
184
+ /* @__PURE__ */ t.jsx(k, { onClick: () => te(e) })
183
185
  ] }, String(e[r]))) }),
184
- ne()
186
+ re()
185
187
  ] });
186
188
  };
187
189
  export {
188
- Me as default
190
+ Ne as default
189
191
  };
@@ -26,4 +26,5 @@ export interface DropDownWithTableProps<T extends Record<string, unknown>> {
26
26
  getDisplayValue?: (option: T) => string;
27
27
  isRowDisabled?: (row: T) => boolean;
28
28
  rowClassName?: (row: T, index: number) => string;
29
+ endIcon?: React.ReactNode;
29
30
  }
@@ -1159,6 +1159,7 @@ export declare const AnimatedMainContent: import("styled-components/dist/types")
1159
1159
  viewBox?: string | import("@react-spring/shared").FluidValue<string, any> | undefined;
1160
1160
  }, {
1161
1161
  $variant: StepVariant;
1162
+ $showStepper: boolean;
1162
1163
  }>> & string & Omit<import("@react-spring/web").AnimatedComponent<"div">, keyof React.Component<any, {}, any>>;
1163
1164
  export declare const ScrollableContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>, "ref"> & {
1164
1165
  ref?: ((instance: HTMLDivElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLDivElement> | null | undefined;
@@ -1,7 +1,7 @@
1
1
  import { j as t } from "../_virtual/jsx-runtime.js";
2
- import r, { useState as I, useMemo as v, useEffect as D } from "react";
2
+ import o, { useState as I, useMemo as v, useEffect as D } from "react";
3
3
  import { Container as tt, Row as et, Col as _ } from "react-grid-system";
4
- import o, { useTheme as nt } from "styled-components";
4
+ import a, { useTheme as nt } from "styled-components";
5
5
  import it from "../assets/svg/failed.svg.js";
6
6
  import rt from "../assets/svg/success.svg.js";
7
7
  import ot from "./Stepper.js";
@@ -9,38 +9,38 @@ import { breakPoints as st, device as u } from "../constants/breakPoints.constan
9
9
  import at from "../hooks/useBreakpointCheck.js";
10
10
  import N from "../hooks/useZIndex.js";
11
11
  import { useQaemaCoreTranslation as dt } from "../i18n/i18n.js";
12
- import { a as c } from "../node_modules/@react-spring/web/dist/react-spring_web.modern.js";
12
+ import { a as m } from "../node_modules/@react-spring/web/dist/react-spring_web.modern.js";
13
13
  import { Scrollbar as lt } from "../styles/Scrollbar.styles.js";
14
14
  import { EmptyContent as ct, FeedbackHeader as mt, TextContainer as pt, ImageContainer as ft, StickyContent as ht } from "../styles/StatusFeedback.styles.js";
15
15
  import gt from "./Image.js";
16
16
  import ut from "./PageHeader.js";
17
17
  import H from "./Typography.js";
18
18
  import { useTransition as Y, useSpring as T } from "../node_modules/@react-spring/core/dist/react-spring_core.modern.js";
19
- const xt = o.div`
19
+ const xt = a.div`
20
20
  overflow: auto;
21
21
  padding-bottom: 1.938rem;
22
22
  height: 100vh;
23
23
  width: 100%;
24
- `, yt = o(c.div)`
24
+ `, yt = a(m.div)`
25
25
  background-color: ${({ theme: e }) => e.colors.secondary.lightBlue.n50};
26
26
  padding: 0 9.438rem;
27
- margin-top: ${({ $variant: e, theme: s }) => e === "step" ? "16.25rem" : s.spacing.m};
28
- height: ${({ $variant: e }) => e === "step" ? "calc(100vh - 16.25rem)" : "auto"};
27
+ margin-top: ${({ $variant: e, theme: i, $showStepper: s }) => e === "step" ? s ? "16.25rem" : "11rem" : i.spacing.m};
28
+ height: ${({ $variant: e, $showStepper: i }) => e === "step" && i ? "calc(100vh - 16.25rem)" : "auto"};
29
29
  width: 100%;
30
30
  @media ${u.tablet} {
31
31
  padding: 0 1.438rem;
32
- margin-top: ${({ $variant: e, theme: s }) => e === "step" ? "12.25rem" : s.spacing.m};
32
+ margin-top: ${({ $variant: e, theme: i, $showStepper: s }) => e === "step" ? s ? "12.25rem" : "11rem" : i.spacing.m};
33
33
  height: auto;
34
34
  }
35
- @media ${u.tablet} {
36
- margin-top: ${({ $variant: e, theme: s }) => e === "step" ? "8.25rem" : s.spacing.m};
35
+ @media ${u.mobile} {
36
+ margin-top: ${({ $variant: e, theme: i, $showStepper: s }) => e === "step" ? s ? "8.25rem" : "4rem" : i.spacing.m};
37
37
  }
38
- `, vt = o(lt)`
38
+ `, vt = a(lt)`
39
39
  background: white;
40
40
  height: 100%;
41
41
  overflow-y: ${({ $variant: e }) => e === "step" ? "auto" : "unset"};
42
42
  overflow-x: ${({ $variant: e }) => e === "step" ? "hidden" : "unset"};
43
- `, jt = o(c.div)`
43
+ `, jt = a(m.div)`
44
44
  position: fixed;
45
45
  top: 0;
46
46
  left: 0;
@@ -51,12 +51,12 @@ const xt = o.div`
51
51
  align-items: center;
52
52
  z-index: ${({ $zIndex: e }) => e};
53
53
  background-color: rgba(0, 0, 0, 0.5);
54
- `, Ct = o.div`
54
+ `, Ct = a.div`
55
55
  margin-inline-start: -60px;
56
56
  @media ${u.mobile} {
57
57
  margin-inline-start: -23px;
58
58
  }
59
- `, bt = o(c.div)`
59
+ `, $t = a(m.div)`
60
60
  background-color: white;
61
61
  width: 100%;
62
62
  height: 100%;
@@ -65,10 +65,10 @@ const xt = o.div`
65
65
  left: 0;
66
66
  overscroll-behavior: contain;
67
67
  direction: ${({ theme: e }) => e.dir};
68
- `, $t = o.div`
68
+ `, bt = a.div`
69
69
  display: flex;
70
70
  flex-direction: column;
71
- `, wt = o(c.div)`
71
+ `, wt = a(m.div)`
72
72
  padding-top: 7.25rem;
73
73
  padding-inline-start: 8.438rem;
74
74
  @media ${u.tablet} {
@@ -80,27 +80,27 @@ const xt = o.div`
80
80
  padding-inline-start: 0.5rem;
81
81
  width: 100% !important;
82
82
  }
83
- `, At = o.div`
83
+ `, At = a.div`
84
84
  padding-top: 1rem;
85
85
  @media ${u.mobile} {
86
86
  padding-top: 0;
87
87
  }
88
- `, St = o(c.div)`
88
+ `, St = a(m.div)`
89
89
  width: 100%;
90
90
  height: 100%;
91
- `, kt = o.div`
91
+ `, kt = a.div`
92
92
  display: flex;
93
93
  align-items: center;
94
- `, Et = o(c.div)`
94
+ `, Et = a(m.div)`
95
95
  ${({ theme: e }) => e.dir === "rtl" ? "left: 0" : "right: 0"};
96
- `, W = ({ children: e }) => /* @__PURE__ */ t.jsx(t.Fragment, { children: e }), F = ({ children: e }) => /* @__PURE__ */ t.jsx(t.Fragment, { children: e }), w = ({ children: e }) => {
97
- const s = r.Children.toArray(e).find((m) => r.isValidElement(m) && m.type === W);
98
- return /* @__PURE__ */ t.jsx(t.Fragment, { children: s });
96
+ `, W = ({ children: e }) => /* @__PURE__ */ t.jsx(t.Fragment, { children: e }), F = ({ children: e }) => /* @__PURE__ */ t.jsx(t.Fragment, { children: e }), A = ({ children: e }) => {
97
+ const i = o.Children.toArray(e).find((s) => o.isValidElement(s) && s.type === W);
98
+ return /* @__PURE__ */ t.jsx(t.Fragment, { children: i });
99
99
  };
100
- w.LeftSide = W;
101
- w.RightSide = F;
102
- const It = ({ isOpen: e, children: s }) => {
103
- const m = N("stepper"), p = T({
100
+ A.LeftSide = W;
101
+ A.RightSide = F;
102
+ const It = ({ isOpen: e, children: i }) => {
103
+ const s = N("stepper"), p = T({
104
104
  opacity: e ? 1 : 0,
105
105
  pointerEvents: e ? "all" : "none",
106
106
  config: { tension: 170, friction: 26 }
@@ -108,41 +108,41 @@ const It = ({ isOpen: e, children: s }) => {
108
108
  transform: e ? "translateY(0)" : "translateY(100%)",
109
109
  config: { tension: 170, friction: 26 }
110
110
  });
111
- return /* @__PURE__ */ t.jsx(jt, { style: p, $zIndex: m, children: /* @__PURE__ */ t.jsx(bt, { style: j, onClick: (A) => A.stopPropagation(), children: /* @__PURE__ */ t.jsx(xt, { children: /* @__PURE__ */ t.jsx($t, { children: s }) }) }) });
111
+ return /* @__PURE__ */ t.jsx(jt, { style: p, $zIndex: s, children: /* @__PURE__ */ t.jsx($t, { style: j, onClick: (C) => C.stopPropagation(), children: /* @__PURE__ */ t.jsx(xt, { children: /* @__PURE__ */ t.jsx(bt, { children: i }) }) }) });
112
112
  }, O = ({
113
113
  initialStep: e = 0,
114
- headerTitle: s = "Welcoming Business Bundle",
115
- onHeaderBack: m,
114
+ headerTitle: i = "Welcoming Business Bundle",
115
+ onHeaderBack: s,
116
116
  activeStep: p,
117
117
  children: j,
118
- showStepper: A = !0
118
+ showStepper: C = !0
119
119
  }) => {
120
120
  var z;
121
- const S = nt(), M = S.dir === "rtl", [a, Q] = I(e), [R, P] = I("forward"), [k, C] = I(!1), U = at(st.mobile), { steps: f, rightContents: x } = v(() => {
122
- const i = r.Children.toArray(j), h = [], g = {};
123
- return i.flatMap((d) => r.isValidElement(d) && d.type === r.Fragment ? r.Children.toArray(d.props.children) : d).forEach((d, X) => {
124
- if (r.isValidElement(d) && d.type === w) {
125
- const l = d, $ = X, E = r.Children.toArray(l.props.children).find((y) => r.isValidElement(y) && y.type === F);
121
+ const S = nt(), M = S.dir === "rtl", [d, Q] = I(e), [R, P] = I("forward"), [k, $] = I(!1), U = at(st.mobile), { steps: f, rightContents: x } = v(() => {
122
+ const r = o.Children.toArray(j), h = [], g = {};
123
+ return r.flatMap((l) => o.isValidElement(l) && l.type === o.Fragment ? o.Children.toArray(l.props.children) : l).forEach((l, X) => {
124
+ if (o.isValidElement(l) && l.type === A) {
125
+ const c = l, w = X, E = o.Children.toArray(c.props.children).find((y) => o.isValidElement(y) && y.type === F);
126
126
  h.push({
127
- id: $,
128
- title: l.props.title,
129
- description: l.props.description,
130
- variant: l.props.variant,
131
- statusProps: l.props.statusProps,
132
- element: r.cloneElement(l, {
133
- key: `step-${$}`,
134
- id: $,
135
- children: r.Children.toArray(l.props.children).filter((y) => !r.isValidElement(y) || y.type !== F)
127
+ id: w,
128
+ title: c.props.title,
129
+ description: c.props.description,
130
+ variant: c.props.variant,
131
+ statusProps: c.props.statusProps,
132
+ element: o.cloneElement(c, {
133
+ key: `step-${w}`,
134
+ id: w,
135
+ children: o.Children.toArray(c.props.children).filter((y) => !o.isValidElement(y) || y.type !== F)
136
136
  })
137
- }), E && r.isValidElement(E) && (g[$] = E.props.children);
137
+ }), E && o.isValidElement(E) && (g[w] = E.props.children);
138
138
  }
139
139
  }), { steps: h, rightContents: g };
140
- }, [j]), n = v(() => f.find((i) => i.id === a), [f, a]), b = v(() => !!x[a], [x, a]), { t: L } = dt(), Z = N("stepper");
140
+ }, [j]), n = v(() => f.find((r) => r.id === d), [f, d]), b = v(() => !!x[d], [x, d]), { t: L } = dt(), Z = N("stepper");
141
141
  D(() => {
142
142
  window.scrollTo(0, 0), p <= f.length && !k && P("forward"), p - 1 >= 0 && !k && P("backward"), Q(p);
143
143
  }, [p, k, f.length]);
144
- const q = v(() => x[a], [a, x]), G = Y(b ? q : null, {
145
- keys: () => `right-content-${a}`,
144
+ const q = v(() => x[d], [d, x]), G = Y(b ? q : null, {
145
+ keys: () => `right-content-${d}`,
146
146
  from: {
147
147
  opacity: 0,
148
148
  y: 66.5
@@ -160,18 +160,18 @@ const It = ({ isOpen: e, children: s }) => {
160
160
  damping: 20,
161
161
  mass: 1
162
162
  },
163
- onStart: () => C(!0),
163
+ onStart: () => $(!0),
164
164
  onRest: () => {
165
- C(!1);
165
+ $(!1);
166
166
  }
167
167
  }), J = T({
168
168
  width: b ? "60%" : "90%",
169
169
  config: { tension: 170, friction: 26 }
170
170
  }), V = v(
171
- () => (i) => M ? i === "forward" ? -750 : 793 : i === "forward" ? 750 : -793,
171
+ () => (r) => M ? r === "forward" ? -750 : 793 : r === "forward" ? 750 : -793,
172
172
  [M]
173
- ), K = Y(a, {
174
- keys: (i) => i,
173
+ ), K = Y(d, {
174
+ keys: (r) => r,
175
175
  from: {
176
176
  opacity: 0,
177
177
  x: V(R),
@@ -202,8 +202,8 @@ const It = ({ isOpen: e, children: s }) => {
202
202
  mass: 1
203
203
  }
204
204
  },
205
- onStart: () => C(!0),
206
- onRest: () => C(!1)
205
+ onStart: () => $(!0),
206
+ onRest: () => $(!1)
207
207
  });
208
208
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
209
209
  (n == null ? void 0 : n.variant) === "success" || (n == null ? void 0 : n.variant) === "fail" ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
@@ -223,48 +223,48 @@ const It = ({ isOpen: e, children: s }) => {
223
223
  ) })
224
224
  ] })
225
225
  ] }) : /* @__PURE__ */ t.jsx(ht, { $zIndex: Z, children: /* @__PURE__ */ t.jsxs(wt, { style: J, children: [
226
- /* @__PURE__ */ t.jsx(Ct, { children: /* @__PURE__ */ t.jsx(ut, { onHeaderBack: m, headerTitle: s }) }),
227
- A && /* @__PURE__ */ t.jsx(kt, { children: n && /* @__PURE__ */ t.jsx(
226
+ /* @__PURE__ */ t.jsx(Ct, { children: /* @__PURE__ */ t.jsx(ut, { onHeaderBack: s, headerTitle: i }) }),
227
+ C && /* @__PURE__ */ t.jsx(kt, { children: n && /* @__PURE__ */ t.jsx(
228
228
  ot,
229
229
  {
230
230
  currentStep: {
231
231
  description: n.description,
232
- number: a + 1,
232
+ number: d + 1,
233
233
  title: n.title
234
234
  },
235
- filledPercentage: a / f.length * 100
235
+ filledPercentage: d / f.length * 100
236
236
  }
237
237
  ) })
238
238
  ] }) }),
239
- /* @__PURE__ */ t.jsx(vt, { $variant: (n == null ? void 0 : n.variant) ?? "step", children: /* @__PURE__ */ t.jsx(yt, { $variant: (n == null ? void 0 : n.variant) ?? "step", children: /* @__PURE__ */ t.jsx(tt, { fluid: !0, style: { padding: 0 }, children: /* @__PURE__ */ t.jsxs(et, { children: [
240
- /* @__PURE__ */ t.jsx(_, { md: b ? 8 : 12, children: /* @__PURE__ */ t.jsx(At, { children: K((i, h) => {
239
+ /* @__PURE__ */ t.jsx(vt, { $variant: (n == null ? void 0 : n.variant) ?? "step", children: /* @__PURE__ */ t.jsx(yt, { $variant: (n == null ? void 0 : n.variant) ?? "step", $showStepper: C, children: /* @__PURE__ */ t.jsx(tt, { fluid: !0, style: { padding: 0 }, children: /* @__PURE__ */ t.jsxs(et, { children: [
240
+ /* @__PURE__ */ t.jsx(_, { md: b ? 8 : 12, children: /* @__PURE__ */ t.jsx(At, { children: K((r, h) => {
241
241
  const g = f.find((B) => B.id === h);
242
- return /* @__PURE__ */ t.jsx(St, { style: i, children: g == null ? void 0 : g.element });
242
+ return /* @__PURE__ */ t.jsx(St, { style: r, children: g == null ? void 0 : g.element });
243
243
  }) }) }),
244
- b && /* @__PURE__ */ t.jsx(_, { md: 4, style: { padding: 0, paddingInlineStart: U ? "unset" : "1.5rem" }, children: /* @__PURE__ */ t.jsx(Et, { children: G((i) => /* @__PURE__ */ t.jsx(
245
- c.div,
244
+ b && /* @__PURE__ */ t.jsx(_, { md: 4, style: { padding: 0, paddingInlineStart: U ? "unset" : "1.5rem" }, children: /* @__PURE__ */ t.jsx(Et, { children: G((r) => /* @__PURE__ */ t.jsx(
245
+ m.div,
246
246
  {
247
247
  style: {
248
- ...i,
249
- transform: i.y.to((h) => `translateY(${h}rem)`)
248
+ ...r,
249
+ transform: r.y.to((h) => `translateY(${h}rem)`)
250
250
  },
251
- children: x[a]
251
+ children: x[d]
252
252
  }
253
253
  )) }) })
254
254
  ] }) }) }) })
255
255
  ] });
256
256
  };
257
- O.Step = w;
257
+ O.Step = A;
258
258
  O.Layout = It;
259
259
  export {
260
260
  yt as AnimatedMainContent,
261
- bt as AnimatedModal,
261
+ $t as AnimatedModal,
262
262
  jt as AnimatedOverlay,
263
263
  Et as AnimatedSideMenu,
264
264
  St as AnimatedStepContent,
265
265
  xt as Container,
266
266
  At as FormContentContainer,
267
- $t as MainContent,
267
+ bt as MainContent,
268
268
  Ct as Margin,
269
269
  vt as ScrollableContent,
270
270
  wt as StepHeader,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "qaema-ui",
3
3
  "private": false,
4
- "version": "0.0.30",
4
+ "version": "0.0.31",
5
5
  "type": "module",
6
6
  "publishConfig": {
7
7
  "access": "public"