qaema-ui 0.0.44 → 0.0.46

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,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/prop-types/index.js";
3
+ var p = /* @__PURE__ */ o();
4
+ const s = /* @__PURE__ */ r(p);
5
5
  export {
6
- m as default
6
+ s as default
7
7
  };
@@ -1,7 +1,7 @@
1
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);
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 o } from "../node_modules/prop-types/index.js";
3
- var p = /* @__PURE__ */ o();
4
- const s = /* @__PURE__ */ r(p);
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
- s as default
6
+ t as default
7
7
  };
@@ -1,35 +1,35 @@
1
- import { j as o } from "../_virtual/jsx-runtime.js";
2
- import { useState as f, useRef as re, useEffect as A } from "react";
3
- import { useTranslation as te } from "react-i18next";
4
- import { FaRegCalendarAlt as oe, FaAngleDown as ne, FaAngleLeft as se } from "../node_modules/react-icons/fa/index.js";
5
- import i, { useTheme as ie } from "styled-components";
6
- import ae from "./Hint.js";
1
+ import { j as n } from "../_virtual/jsx-runtime.js";
2
+ import { useState as f, useRef as te, useEffect as A } from "react";
3
+ import { useTranslation as oe } from "react-i18next";
4
+ import { FaRegCalendarAlt as ne, FaAngleDown as se, FaAngleLeft as ie } from "../node_modules/react-icons/fa/index.js";
5
+ import i, { useTheme as ae } from "styled-components";
6
+ import le from "./Hint.js";
7
7
  import { formatDate as b } from "../node_modules/date-fns/format.js";
8
- import { parse as le } from "../node_modules/date-fns/parse.js";
8
+ import { parse as ce } from "../node_modules/date-fns/parse.js";
9
9
  import { isBefore as L } from "../node_modules/date-fns/isBefore.js";
10
10
  import { isAfter as z } from "../node_modules/date-fns/isAfter.js";
11
- import { isValid as ce } from "../node_modules/date-fns/isValid.js";
12
- import { arSA as de } from "../node_modules/date-fns/locale/ar-SA.js";
13
- import { enUS as pe } from "../node_modules/date-fns/locale/en-US.js";
11
+ import { isValid as de } from "../node_modules/date-fns/isValid.js";
12
+ import { arSA as pe } from "../node_modules/date-fns/locale/ar-SA.js";
13
+ import { enUS as me } from "../node_modules/date-fns/locale/en-US.js";
14
14
  import { addMonths as ge } from "../node_modules/date-fns/addMonths.js";
15
- import { subMonths as me } from "../node_modules/date-fns/subMonths.js";
16
- import { startOfWeek as fe } from "../node_modules/date-fns/startOfWeek.js";
17
- import { startOfMonth as ue } from "../node_modules/date-fns/startOfMonth.js";
18
- import { endOfWeek as he } from "../node_modules/date-fns/endOfWeek.js";
19
- import { endOfMonth as ye } from "../node_modules/date-fns/endOfMonth.js";
20
- import { addDays as be } from "../node_modules/date-fns/addDays.js";
21
- import { isSameMonth as xe } from "../node_modules/date-fns/isSameMonth.js";
22
- import { isSameDay as $e } from "../node_modules/date-fns/isSameDay.js";
23
- import { getYear as we } from "../node_modules/date-fns/getYear.js";
24
- import { setYear as Me } from "../node_modules/date-fns/setYear.js";
25
- import { setMonth as je } from "../node_modules/date-fns/setMonth.js";
26
- const De = i.div`
15
+ import { subMonths as fe } from "../node_modules/date-fns/subMonths.js";
16
+ import { startOfWeek as ue } from "../node_modules/date-fns/startOfWeek.js";
17
+ import { startOfMonth as he } from "../node_modules/date-fns/startOfMonth.js";
18
+ import { endOfWeek as ye } from "../node_modules/date-fns/endOfWeek.js";
19
+ import { endOfMonth as be } from "../node_modules/date-fns/endOfMonth.js";
20
+ import { addDays as xe } from "../node_modules/date-fns/addDays.js";
21
+ import { isSameMonth as $e } from "../node_modules/date-fns/isSameMonth.js";
22
+ import { isSameDay as we } from "../node_modules/date-fns/isSameDay.js";
23
+ import { getYear as Me } from "../node_modules/date-fns/getYear.js";
24
+ import { setYear as je } from "../node_modules/date-fns/setYear.js";
25
+ import { setMonth as De } from "../node_modules/date-fns/setMonth.js";
26
+ const Se = i.div`
27
27
  position: relative;
28
28
  display: flex;
29
29
  flex-direction: column;
30
30
  justify-content: space-between;
31
31
  gap: 0.5rem;
32
- `, Se = i.div`
32
+ `, ke = i.div`
33
33
  position: relative;
34
34
  width: 100%;
35
35
  height: 3.5rem;
@@ -40,7 +40,7 @@ const De = i.div`
40
40
  align-items: center;
41
41
  padding: ${({ theme: e }) => `${e.spacing.s} ${e.spacing.sm}`};
42
42
  box-shadow: ${({ theme: e }) => e.boxShadow.s3};
43
- `, ke = i.input`
43
+ `, ve = i.input`
44
44
  all: unset;
45
45
  flex: 1;
46
46
  height: 100%;
@@ -54,7 +54,7 @@ const De = i.div`
54
54
  }
55
55
 
56
56
  cursor: ${({ disabled: e }) => e ? "not-allowed" : "pointer"};
57
- `, ve = i.div`
57
+ `, Oe = i.div`
58
58
  display: flex;
59
59
  align-items: center;
60
60
  justify-content: center;
@@ -62,7 +62,7 @@ const De = i.div`
62
62
  color: ${({ theme: e }) => e.colors.grey.n400};
63
63
  font-size: 1rem;
64
64
  flex-shrink: 0;
65
- `, Oe = i.div`
65
+ `, Fe = i.div`
66
66
  position: absolute;
67
67
  top: 110%;
68
68
  left: 0;
@@ -78,7 +78,7 @@ const De = i.div`
78
78
  font-weight: bold;
79
79
  cursor: pointer;
80
80
  margin-bottom: 0.5rem;
81
- `, Y = i(se)`
81
+ `, Y = i(ie)`
82
82
  cursor: pointer;
83
83
  font-size: 1.25rem;
84
84
  color: ${({ theme: e }) => e.colors.primary.purple.n450};
@@ -107,9 +107,9 @@ const De = i.div`
107
107
  opacity: ${(e) => e.disabled ? 0.2 : 1};
108
108
  background-color: ${(e) => e.selected ? e.theme.colors.primary.purple.n450 : "transparent"};
109
109
  color: ${(e) => e.selected ? "white" : "inherit"};
110
- border-radius: ${({ theme: e, isToday: a }) => (d) => a && !d.selected ? e.borderRadius.circle : e.borderRadius.md};
110
+ border-radius: ${({ theme: e, isToday: a }) => (c) => a && !c.selected ? e.borderRadius.circle : e.borderRadius.md};
111
111
 
112
- background-color: ${({ theme: e, isToday: a }) => (d) => a && !d.selected && e.colors.primary.purple.n100};
112
+ background-color: ${({ theme: e, isToday: a }) => (c) => a && !c.selected && e.colors.primary.purple.n100};
113
113
  &:hover {
114
114
  background-color: ${(e) => !e.disabled && !e.selected ? e.theme.colors.grey.n50 : ""};
115
115
  }
@@ -123,23 +123,23 @@ const De = i.div`
123
123
  border: none;
124
124
  border-radius: ${({ theme: e }) => e.borderRadius.md};
125
125
  cursor: pointer;
126
- `, F = i.div`
126
+ `, N = i.div`
127
127
  width: 100%;
128
128
  background-color: white;
129
129
  border-radius: ${({ theme: e }) => e.borderRadius.md};
130
- `, Fe = i.div`
130
+ `, Ne = i.div`
131
131
  display: grid;
132
132
  grid-template-columns: repeat(4, 1fr);
133
133
  gap: 0.313rem;
134
134
  max-height: 12.5rem;
135
135
  overflow-y: auto;
136
136
  padding: ${({ theme: e }) => e.spacing.sm};
137
- `, Ne = i.div`
137
+ `, We = i.div`
138
138
  display: grid;
139
139
  grid-template-columns: repeat(3, 1fr);
140
140
  gap: 0.313rem;
141
141
  padding: ${({ theme: e }) => e.spacing.sm};
142
- `, N = i.div`
142
+ `, W = i.div`
143
143
  text-align: center;
144
144
  padding: ${({ theme: e }) => e.spacing.sm};
145
145
  cursor: pointer;
@@ -148,7 +148,7 @@ const De = i.div`
148
148
  &:hover {
149
149
  background-color: #eee;
150
150
  }
151
- `, We = i.label`
151
+ `, Ee = i.label`
152
152
  display: flex;
153
153
  align-items: flex-end;
154
154
  column-gap: ${({ theme: e }) => e.spacing.xs};
@@ -157,59 +157,59 @@ const De = i.div`
157
157
  font-weight: 400;
158
158
  text-align: ${({ theme: e }) => e.dir === "rtl" ? "right" : "left"};
159
159
  line-height: ${({ theme: e }) => e.typography.lineHeights.s};
160
- `, Ee = i.span`
160
+ `, Ie = i.span`
161
161
  color: ${({ theme: e }) => e.colors.grey.n300};
162
162
  font-size: ${({ theme: e }) => e.typography.sizes.s2};
163
163
 
164
164
  display: flex;
165
165
  justify-content: ${({ theme: e }) => e.dir === "rtl" ? "flex-end" : "flex-start"};
166
166
  text-align: ${({ theme: e }) => e.dir === "rtl" ? "right" : "left"};
167
- `, fr = ({ value: e, onChange: a, minDate: d, maxDate: x, label: v, optional: O, disabled: W, error: D }) => {
168
- const [E, $] = f(!1), [p, g] = f(e || /* @__PURE__ */ new Date()), [w, u] = f(e || null), [I, h] = f(e ? b(e, "dd/MM/yyyy") : ""), [M, j] = f("calendar"), [T, R] = f(0), S = re(null), k = /* @__PURE__ */ new Date(), C = ie(), { t: V, i18n: H } = te(), l = (H.language || "").toLowerCase().startsWith("ar") || C.dir === "rtl", y = l ? "rtl" : "ltr", P = l ? de : pe, J = l ? ["أح", "اث", "ثل", "أر", "خم", "جم", "سب"] : ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], B = l ? ["يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"] : ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], m = (r) => {
167
+ `, ur = ({ value: e, onChange: a, minDate: c, maxDate: x, label: O, optional: F, disabled: E, error: D }) => {
168
+ const [I, $] = f(!1), [d, p] = f(e || /* @__PURE__ */ new Date()), [w, u] = f(e || null), [T, h] = f(e ? b(e, "dd/MM/yyyy") : ""), [M, j] = f("calendar"), [V, R] = f(0), S = te(null), k = /* @__PURE__ */ new Date(), C = ae(), { t: H, i18n: P } = oe(), l = (P.language || "").toLowerCase().startsWith("ar") || C.dir === "rtl", y = l ? "rtl" : "ltr", J = l ? pe : me, B = l ? ["أح", "اث", "ثل", "أر", "خم", "جم", "سب"] : ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], _ = l ? ["يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"] : ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], m = (o) => {
169
169
  const s = ["٠", "١", "٢", "٣", "٤", "٥", "٦", "٧", "٨", "٩"];
170
- return r.toString().replace(/\d/g, (n) => s[Number(n)]);
171
- }, _ = (r) => {
170
+ return o.toString().replace(/\d/g, (r) => s[Number(r)]);
171
+ }, G = (o) => {
172
172
  const s = "٠١٢٣٤٥٦٧٨٩";
173
- return r.replace(/[٠-٩]/g, (n) => s.indexOf(n).toString());
173
+ return o.replace(/[٠-٩]/g, (r) => s.indexOf(r).toString());
174
174
  };
175
175
  A(() => {
176
- const r = (s) => {
176
+ const o = (s) => {
177
177
  S.current && !S.current.contains(s.target) && ($(!1), j("calendar"));
178
178
  };
179
- return document.addEventListener("mousedown", r), () => document.removeEventListener("mousedown", r);
179
+ return document.addEventListener("mousedown", o), () => document.removeEventListener("mousedown", o);
180
180
  }, []), A(() => {
181
181
  if (e) {
182
- const r = b(e, "dd/MM/yyyy");
183
- u(e), g(e), h(l ? m(r) : r);
182
+ const s = b(e, l ? "yyyy/MM/dd" : "dd/MM/yyyy");
183
+ u(e), p(e), h(l ? m(s) : s);
184
184
  } else
185
185
  u(null), h("");
186
186
  }, [e, l]);
187
- const G = (r) => {
188
- const s = r.target.value;
189
- let n = _(s).replace(/\D/g, "");
190
- if (n === "") {
187
+ const U = (o) => {
188
+ const s = o.target.value;
189
+ let r = G(s).replace(/\D/g, "");
190
+ if (r === "") {
191
191
  h(""), u(null), a(null);
192
192
  return;
193
193
  }
194
- n.length >= 3 && (n = n.slice(0, 2) + "/" + n.slice(2)), n.length >= 6 && (n = n.slice(0, 5) + "/" + n.slice(5, 9));
195
- const t = l ? m(n) : n;
196
- if (h(t), n.length === 10) {
197
- const c = le(n, "dd/MM/yyyy", /* @__PURE__ */ new Date()), ee = d && L(c, d) || x && z(c, x);
198
- ce(c) && !ee && (u(c), g(c), a(c));
194
+ l ? (r.length >= 5 && (r = r.slice(0, 4) + "/" + r.slice(4)), r.length >= 8 && (r = r.slice(0, 7) + "/" + r.slice(7, 9))) : (r.length >= 3 && (r = r.slice(0, 2) + "/" + r.slice(2)), r.length >= 6 && (r = r.slice(0, 5) + "/" + r.slice(5, 9)));
195
+ const t = l ? m(r) : r;
196
+ if (h(t), r.length === 10) {
197
+ const g = ce(r, l ? "yyyy/MM/dd" : "dd/MM/yyyy", /* @__PURE__ */ new Date()), re = c && L(g, c) || x && z(g, x);
198
+ de(g) && !re && (u(g), p(g), a(g));
199
199
  }
200
- }, U = () => {
201
- const r = fe(ue(p), { weekStartsOn: 0 }), s = he(ye(p), { weekStartsOn: 0 }), n = [];
202
- for (let t = r; t <= s; t = be(t, 1)) {
203
- const c = d && L(t, d) || x && z(t, x) || !xe(t, p);
204
- n.push(
205
- /* @__PURE__ */ o.jsx(
200
+ }, q = () => {
201
+ const o = ue(he(d), { weekStartsOn: 0 }), s = ye(be(d), { weekStartsOn: 0 }), r = [];
202
+ for (let t = o; t <= s; t = xe(t, 1)) {
203
+ const v = c && L(t, c) || x && z(t, x) || !$e(t, d);
204
+ r.push(
205
+ /* @__PURE__ */ n.jsx(
206
206
  Le,
207
207
  {
208
208
  isToday: k.getDate() === t.getDate() && k.getMonth() === t.getMonth() && k.getFullYear() === t.getFullYear(),
209
- disabled: c,
210
- selected: w ? $e(t, w) : !1,
209
+ disabled: v,
210
+ selected: w ? we(t, w) : !1,
211
211
  onClick: () => {
212
- c || (u(t), h(l ? m(b(t, "dd/MM/yyyy")) : b(t, "dd/MM/yyyy")), a(t), $(!1));
212
+ v || (u(t), h(l ? m(b(t, "dd/MM/yyyy")) : b(t, "dd/MM/yyyy")), a(t), $(!1));
213
213
  },
214
214
  children: l ? m(t.getDate()) : t.getDate()
215
215
  },
@@ -217,89 +217,89 @@ const De = i.div`
217
217
  )
218
218
  );
219
219
  }
220
- return /* @__PURE__ */ o.jsx(Ae, { $dir: y, children: n });
221
- }, q = () => {
222
- const s = we(/* @__PURE__ */ new Date()) + T * 12;
223
- return Array.from({ length: 12 }, (n, t) => s + t);
224
- }, K = (r) => {
225
- g(Me(p, r)), j("month");
226
- }, Q = (r) => {
227
- const s = je(p, r);
228
- g(s), j("calendar");
229
- }, X = () => {
230
- const r = y === "rtl", s = () => {
231
- M === "calendar" ? g(me(p)) : R((t) => t - 1);
232
- }, n = () => {
233
- M === "calendar" ? g(ge(p, 1)) : R((t) => t + 1);
220
+ return /* @__PURE__ */ n.jsx(Ae, { $dir: y, children: r });
221
+ }, K = () => {
222
+ const s = Me(/* @__PURE__ */ new Date()) + V * 12;
223
+ return Array.from({ length: 12 }, (r, t) => s + t);
224
+ }, Q = (o) => {
225
+ p(je(d, o)), j("month");
226
+ }, X = (o) => {
227
+ const s = De(d, o);
228
+ p(s), j("calendar");
229
+ }, Z = () => {
230
+ const o = y === "rtl", s = () => {
231
+ M === "calendar" ? p(fe(d)) : R((t) => t - 1);
232
+ }, r = () => {
233
+ M === "calendar" ? p(ge(d, 1)) : R((t) => t + 1);
234
234
  };
235
- return /* @__PURE__ */ o.jsxs(Re, { children: [
236
- /* @__PURE__ */ o.jsx(
235
+ return /* @__PURE__ */ n.jsxs(Re, { children: [
236
+ /* @__PURE__ */ n.jsx(
237
237
  Y,
238
238
  {
239
239
  $dir: y,
240
240
  $position: "left",
241
241
  onClick: (t) => {
242
- t.stopPropagation(), r ? n() : s();
242
+ t.stopPropagation(), o ? r() : s();
243
243
  }
244
244
  }
245
245
  ),
246
- /* @__PURE__ */ o.jsxs("div", { onClick: () => j("year"), children: [
246
+ /* @__PURE__ */ n.jsxs("div", { onClick: () => j("year"), children: [
247
247
  (() => {
248
- const t = b(p, "MMMM yyyy", { locale: P });
248
+ const t = b(d, "MMMM yyyy", { locale: J });
249
249
  return l ? m(t) : t;
250
250
  })(),
251
- /* @__PURE__ */ o.jsx(ne, { color: C.colors.grey.n300, size: 12 })
251
+ /* @__PURE__ */ n.jsx(se, { color: C.colors.grey.n300, size: 12 })
252
252
  ] }),
253
- /* @__PURE__ */ o.jsx(
253
+ /* @__PURE__ */ n.jsx(
254
254
  Y,
255
255
  {
256
256
  $dir: y,
257
257
  $position: "right",
258
258
  onClick: (t) => {
259
- t.stopPropagation(), r ? s() : n();
259
+ t.stopPropagation(), o ? s() : r();
260
260
  }
261
261
  }
262
262
  )
263
263
  ] });
264
- }, Z = () => M === "calendar" ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
265
- /* @__PURE__ */ o.jsx(Ce, { $dir: y, children: J.map((r) => /* @__PURE__ */ o.jsx("div", { children: r }, r)) }),
266
- U(),
267
- /* @__PURE__ */ o.jsx(ze, { children: /* @__PURE__ */ o.jsx(
264
+ }, ee = () => M === "calendar" ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
265
+ /* @__PURE__ */ n.jsx(Ce, { $dir: y, children: B.map((o) => /* @__PURE__ */ n.jsx("div", { children: o }, o)) }),
266
+ q(),
267
+ /* @__PURE__ */ n.jsx(ze, { children: /* @__PURE__ */ n.jsx(
268
268
  Ye,
269
269
  {
270
270
  onClick: () => {
271
271
  w && a(w), $(!1);
272
272
  },
273
- children: V("SET_DATE")
273
+ children: H("SET_DATE")
274
274
  }
275
275
  ) })
276
- ] }) : M === "year" ? /* @__PURE__ */ o.jsx(F, { children: /* @__PURE__ */ o.jsx(Fe, { children: q().map((r) => /* @__PURE__ */ o.jsx(N, { onClick: () => K(r), children: l ? m(r) : r }, r)) }) }) : /* @__PURE__ */ o.jsx(F, { children: /* @__PURE__ */ o.jsx(Ne, { children: B.map((r, s) => /* @__PURE__ */ o.jsx(N, { onClick: () => Q(s), children: r }, `${r}-${s}`)) }) });
277
- return /* @__PURE__ */ o.jsxs(De, { ref: S, children: [
278
- v && /* @__PURE__ */ o.jsxs(We, { children: [
279
- v,
276
+ ] }) : M === "year" ? /* @__PURE__ */ n.jsx(N, { children: /* @__PURE__ */ n.jsx(Ne, { children: K().map((o) => /* @__PURE__ */ n.jsx(W, { onClick: () => Q(o), children: l ? m(o) : o }, o)) }) }) : /* @__PURE__ */ n.jsx(N, { children: /* @__PURE__ */ n.jsx(We, { children: _.map((o, s) => /* @__PURE__ */ n.jsx(W, { onClick: () => X(s), children: o }, `${o}-${s}`)) }) });
277
+ return /* @__PURE__ */ n.jsxs(Se, { ref: S, children: [
278
+ O && /* @__PURE__ */ n.jsxs(Ee, { children: [
279
+ O,
280
280
  " ",
281
- O && /* @__PURE__ */ o.jsx(Ee, { children: O })
281
+ F && /* @__PURE__ */ n.jsx(Ie, { children: F })
282
282
  ] }),
283
- /* @__PURE__ */ o.jsxs(Se, { $error: D, children: [
284
- /* @__PURE__ */ o.jsx(ve, { children: /* @__PURE__ */ o.jsx(oe, {}) }),
285
- /* @__PURE__ */ o.jsx(
286
- ke,
283
+ /* @__PURE__ */ n.jsxs(ke, { $error: D, children: [
284
+ /* @__PURE__ */ n.jsx(Oe, { children: /* @__PURE__ */ n.jsx(ne, {}) }),
285
+ /* @__PURE__ */ n.jsx(
286
+ ve,
287
287
  {
288
- disabled: W,
289
- value: I,
290
- onChange: G,
288
+ disabled: E,
289
+ value: T,
290
+ onChange: U,
291
291
  placeholder: l ? "يوم/شهر/سنة" : "dd/mm/yyyy",
292
292
  onFocus: () => $(!0)
293
293
  }
294
294
  )
295
295
  ] }),
296
- E && /* @__PURE__ */ o.jsxs(Oe, { children: [
297
- X(),
298
- Z()
296
+ I && /* @__PURE__ */ n.jsxs(Fe, { children: [
297
+ Z(),
298
+ ee()
299
299
  ] }),
300
- D && /* @__PURE__ */ o.jsx(ae, { variant: "error", showLeadIcon: !1, title: D, showLink: !1 })
300
+ D && /* @__PURE__ */ n.jsx(le, { variant: "error", showLeadIcon: !1, title: D, showLink: !1 })
301
301
  ] });
302
302
  };
303
303
  export {
304
- fr as default
304
+ ur as default
305
305
  };
@@ -2,6 +2,7 @@ import type React from 'react';
2
2
  type RadioInputOption = {
3
3
  label: string;
4
4
  value: string | number;
5
+ disabled?: boolean;
5
6
  };
6
7
  type BadgeConfig = {
7
8
  label?: string;
@@ -1,20 +1,22 @@
1
- import { j as i } from "../_virtual/jsx-runtime.js";
2
- import { TbSparkles as $ } from "../node_modules/react-icons/tb/index.js";
3
- import a, { css as p } from "styled-components";
4
- import { useQaemaCoreTranslation as w } from "../i18n/i18n.js";
1
+ import { j as t } from "../_virtual/jsx-runtime.js";
2
+ import { TbSparkles as w } from "../node_modules/react-icons/tb/index.js";
3
+ import l, { css as c } from "styled-components";
4
+ import { useQaemaCoreTranslation as b } from "../i18n/i18n.js";
5
5
  import j from "./Hint.js";
6
6
  import { Optional as v } from "./InputField.js";
7
- import b from "./Radio.js";
8
- const F = a.div`
7
+ import F from "./Radio.js";
8
+ const z = l.div`
9
9
  display: flex;
10
10
  align-items: center;
11
11
  gap: ${({ theme: e }) => e.spacing.xs};
12
- `, z = a.div`
12
+ opacity: ${({ $disabled: e }) => e ? 0.5 : 1};
13
+ color: ${({ $disabled: e }) => e ? "#8A94A1" : "inherit"};
14
+ `, O = l.div`
13
15
  display: flex;
14
16
  flex-direction: column;
15
17
  justify-content: space-between;
16
18
  gap: ${({ theme: e }) => e.spacing.xs};
17
- `, R = a.div`
19
+ `, R = l.div`
18
20
  display: flex;
19
21
  flex-direction: row;
20
22
  align-items: center;
@@ -30,7 +32,7 @@ const F = a.div`
30
32
  line-height: ${({ theme: e }) => e.typography.lineHeights.xs};
31
33
  color: ${({ theme: e }) => e.colors.grey.n350};
32
34
  }
33
- `, I = a.span`
35
+ `, I = l.span`
34
36
  display: inline-flex;
35
37
  align-items: center;
36
38
  height: 20px;
@@ -38,62 +40,63 @@ const F = a.div`
38
40
  gap: 8px;
39
41
  border-radius: 4px;
40
42
  background: ${({ theme: e }) => {
41
- var n, l, t;
42
- return ((t = (l = (n = e.colors) == null ? void 0 : n.primary) == null ? void 0 : l.purple) == null ? void 0 : t.n100) || "#F1EEFF";
43
+ var n, a, r;
44
+ return ((r = (a = (n = e.colors) == null ? void 0 : n.primary) == null ? void 0 : a.purple) == null ? void 0 : r.n100) || "#F1EEFF";
43
45
  }};
44
46
  color: ${({ theme: e }) => {
45
- var n, l, t;
46
- return ((t = (l = (n = e.colors) == null ? void 0 : n.primary) == null ? void 0 : l.purple) == null ? void 0 : t.n450) || "#7259FF";
47
+ var n, a, r;
48
+ return ((r = (a = (n = e.colors) == null ? void 0 : n.primary) == null ? void 0 : a.purple) == null ? void 0 : r.n450) || "#7259FF";
47
49
  }};
48
50
  font-size: ${({ theme: e }) => e.typography.sizes.s2 || "10px"};
49
51
  line-height: ${({ theme: e }) => e.typography.lineHeights.m};
50
52
  font-weight: 400;
51
- `, O = a($)`
53
+ `, S = l(w)`
52
54
  width: 12px;
53
55
  height: 12px;
54
56
  flex: 0 0 auto;
55
- `, S = a.div`
57
+ `, H = l.div`
56
58
  display: flex;
57
59
  width: 100%;
58
60
  flex-direction: ${({ $variant: e }) => e};
59
- ${({ $variant: e, theme: n }) => e === "row" ? p`
61
+ ${({ $variant: e, theme: n }) => e === "row" ? c`
60
62
  justify-content: space-between;
61
63
  align-items: center;
62
- ` : p`
64
+ ` : c`
63
65
  gap: ${n.spacing.xs};
64
66
  `}
65
- `, A = (e) => {
66
- const { name: n, label: l = "", options: t, value: c, disabled: h, optional: d = !1, onChange: g, error: o, badge: s, optionsVariant: x = "column" } = e, { t: f } = w();
67
- if (!(t != null && t.length)) return null;
68
- const u = (r) => s != null && s.showFor ? typeof s.showFor == "function" ? !!s.showFor(r) : s.showFor === r.value : !1, y = (s == null ? void 0 : s.label) ?? "Recommended";
69
- return /* @__PURE__ */ i.jsxs(z, { children: [
70
- l && /* @__PURE__ */ i.jsxs(R, { children: [
71
- /* @__PURE__ */ i.jsx("label", { children: l }),
72
- d && /* @__PURE__ */ i.jsx(v, { children: f("OPTIONAL") })
67
+ `, D = (e) => {
68
+ const { name: n, label: a = "", options: r, value: h, disabled: d, optional: g = !1, onChange: x, error: p, badge: s, optionsVariant: f = "column" } = e, { t: y } = b();
69
+ if (!(r != null && r.length)) return null;
70
+ const u = (i) => s != null && s.showFor ? typeof s.showFor == "function" ? !!s.showFor(i) : s.showFor === i.value : !1, m = (s == null ? void 0 : s.label) ?? "Recommended";
71
+ return /* @__PURE__ */ t.jsxs(O, { children: [
72
+ a && /* @__PURE__ */ t.jsxs(R, { children: [
73
+ /* @__PURE__ */ t.jsx("label", { children: a }),
74
+ g && /* @__PURE__ */ t.jsx(v, { children: y("OPTIONAL") })
73
75
  ] }),
74
- /* @__PURE__ */ i.jsx(S, { $variant: x, children: t.map((r) => {
75
- const m = u(r);
76
- return /* @__PURE__ */ i.jsxs(F, { children: [
77
- /* @__PURE__ */ i.jsx(
78
- b,
76
+ /* @__PURE__ */ t.jsx(H, { $variant: f, children: r.map((i) => {
77
+ const $ = u(i), o = i.disabled || d;
78
+ return /* @__PURE__ */ t.jsxs(z, { $disabled: o, children: [
79
+ /* @__PURE__ */ t.jsx(
80
+ F,
79
81
  {
80
82
  name: n,
81
- label: r.label,
82
- value: r.value,
83
- $selected: c === (r == null ? void 0 : r.value),
84
- onChange: g,
85
- $disabled: h
83
+ label: i.label,
84
+ value: i.value,
85
+ $selected: h === (i == null ? void 0 : i.value),
86
+ onChange: x,
87
+ $disabled: o,
88
+ $variant: o ? "grey" : "primary"
86
89
  }
87
90
  ),
88
- m && /* @__PURE__ */ i.jsxs(I, { children: [
89
- (s == null ? void 0 : s.showIcon) !== !1 && /* @__PURE__ */ i.jsx(O, {}),
90
- y
91
+ $ && /* @__PURE__ */ t.jsxs(I, { children: [
92
+ (s == null ? void 0 : s.showIcon) !== !1 && /* @__PURE__ */ t.jsx(S, {}),
93
+ m
91
94
  ] })
92
- ] }, r.value);
95
+ ] }, i.value);
93
96
  }) }),
94
- o && /* @__PURE__ */ i.jsx(j, { variant: "error", title: o })
97
+ p && /* @__PURE__ */ t.jsx(j, { variant: "error", title: p })
95
98
  ] });
96
99
  };
97
100
  export {
98
- A as default
101
+ D as default
99
102
  };
@@ -1,4 +1,4 @@
1
- import o from "../../../_virtual/index4.js";
1
+ import o from "../../../_virtual/index2.js";
2
2
  import * as p from "react";
3
3
  import n from "../../../_virtual/index.js";
4
4
  import { j as i } from "../../../_virtual/jsx-runtime.js";
@@ -1,6 +1,6 @@
1
1
  import i from "../../../_virtual/index.js";
2
2
  import * as f from "react";
3
- import e from "../../../_virtual/index4.js";
3
+ import e from "../../../_virtual/index2.js";
4
4
  import { j as l } from "../../../_virtual/jsx-runtime.js";
5
5
  const c = {
6
6
  /**
@@ -1,5 +1,5 @@
1
1
  import i from "../../../_virtual/index.js";
2
- import o from "../../../_virtual/index4.js";
2
+ import o from "../../../_virtual/index2.js";
3
3
  import * as s from "react";
4
4
  import f from "./FormCheck.js";
5
5
  import l from "./FormControl.js";
@@ -1,6 +1,6 @@
1
1
  import f from "../../../_virtual/index.js";
2
2
  import * as d from "react";
3
- import o from "../../../_virtual/index4.js";
3
+ import o from "../../../_virtual/index2.js";
4
4
  import { useBootstrapPrefix as u } from "./ThemeProvider.js";
5
5
  import { j as p } from "../../../_virtual/jsx-runtime.js";
6
6
  o.string, o.bool, o.bool, o.bool, o.bool;
@@ -2,9 +2,9 @@ var Q = Object.defineProperty;
2
2
  var X = (e, t, r) => t in e ? Q(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
3
  var h = (e, t, r) => X(e, typeof t != "symbol" ? t + "" : t, r);
4
4
  import y, { Component as R } from "react";
5
- import ee from "../../../_virtual/index2.js";
5
+ import ee from "../../../_virtual/index3.js";
6
6
  import F from "../../../_virtual/browser.js";
7
- import te from "../../../_virtual/index3.js";
7
+ import te from "../../../_virtual/index4.js";
8
8
  var Y = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "head", e.HTML = "html", e.LINK = "link", e.META = "meta", e.NOSCRIPT = "noscript", e.SCRIPT = "script", e.STYLE = "style", e.TITLE = "title", e.FRAGMENT = "Symbol(react.fragment)", e))(Y || {}), $ = {
9
9
  link: { rel: ["amphtml", "canonical", "alternate"] },
10
10
  script: { type: ["application/ld+json"] },
@@ -1,5 +1,5 @@
1
1
  import x, { Children as w, cloneElement as z, PureComponent as F } from "react";
2
- import a from "../../../_virtual/index4.js";
2
+ import a from "../../../_virtual/index2.js";
3
3
  import { deepEqual as H } from "../../fast-equals/dist/esm/index.js";
4
4
  import L from "./AnimateManager.js";
5
5
  import { configEasing as V } from "./easing.js";
@@ -1,6 +1,6 @@
1
1
  import C from "../../@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js";
2
2
  import D from "../../@babel/runtime/helpers/esm/inheritsLoose.js";
3
- import o from "../../../_virtual/index4.js";
3
+ import o from "../../../_virtual/index2.js";
4
4
  import v from "react";
5
5
  import b from "react-dom";
6
6
  import T from "./config.js";
@@ -1,4 +1,4 @@
1
- import e from "../../../../_virtual/index4.js";
1
+ import e from "../../../../_virtual/index2.js";
2
2
  var n = process.env.NODE_ENV !== "production" ? e.oneOfType([e.number, e.shape({
3
3
  enter: e.number,
4
4
  exit: e.number,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "qaema-ui",
3
3
  "private": false,
4
- "version": "0.0.44",
4
+ "version": "0.0.46",
5
5
  "type": "module",
6
6
  "publishConfig": {
7
7
  "access": "public"