qaema-ui 0.0.42 → 0.0.44

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 o } from "../node_modules/prop-types/index.js";
3
- var p = /* @__PURE__ */ o();
4
- const s = /* @__PURE__ */ r(p);
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
- s 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
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 o } from "../node_modules/prop-types/index.js";
3
+ var p = /* @__PURE__ */ o();
4
+ const s = /* @__PURE__ */ r(p);
5
5
  export {
6
- t as default
6
+ s as default
7
7
  };
@@ -19,6 +19,7 @@ export type RadioInputProps = {
19
19
  optional?: boolean;
20
20
  error?: string;
21
21
  badge?: BadgeConfig;
22
+ optionsVariant?: string;
22
23
  };
23
24
  declare const RadioInput: React.FC<RadioInputProps>;
24
25
  export default RadioInput;
@@ -1,20 +1,20 @@
1
- import { j as l } from "../_virtual/jsx-runtime.js";
2
- import { TbSparkles as y } from "../node_modules/react-icons/tb/index.js";
3
- import o from "styled-components";
4
- import { useQaemaCoreTranslation as m } from "../i18n/i18n.js";
5
- import w from "./Hint.js";
6
- import { Optional as $ } from "./InputField.js";
7
- import j from "./Radio.js";
8
- const b = o.div`
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";
5
+ import j from "./Hint.js";
6
+ import { Optional as v } from "./InputField.js";
7
+ import b from "./Radio.js";
8
+ const F = a.div`
9
9
  display: flex;
10
10
  align-items: center;
11
11
  gap: ${({ theme: e }) => e.spacing.xs};
12
- `, v = o.div`
12
+ `, z = a.div`
13
13
  display: flex;
14
14
  flex-direction: column;
15
15
  justify-content: space-between;
16
16
  gap: ${({ theme: e }) => e.spacing.xs};
17
- `, F = o.div`
17
+ `, R = a.div`
18
18
  display: flex;
19
19
  flex-direction: row;
20
20
  align-items: center;
@@ -30,7 +30,7 @@ const b = o.div`
30
30
  line-height: ${({ theme: e }) => e.typography.lineHeights.xs};
31
31
  color: ${({ theme: e }) => e.colors.grey.n350};
32
32
  }
33
- `, z = o.span`
33
+ `, I = a.span`
34
34
  display: inline-flex;
35
35
  align-items: center;
36
36
  height: 20px;
@@ -38,52 +38,62 @@ const b = o.div`
38
38
  gap: 8px;
39
39
  border-radius: 4px;
40
40
  background: ${({ theme: e }) => {
41
- var n, i, s;
42
- return ((s = (i = (n = e.colors) == null ? void 0 : n.primary) == null ? void 0 : i.purple) == null ? void 0 : s.n100) || "#F1EEFF";
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
43
  }};
44
44
  color: ${({ theme: e }) => {
45
- var n, i, s;
46
- return ((s = (i = (n = e.colors) == null ? void 0 : n.primary) == null ? void 0 : i.purple) == null ? void 0 : s.n450) || "#7259FF";
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
47
  }};
48
48
  font-size: ${({ theme: e }) => e.typography.sizes.s2 || "10px"};
49
49
  line-height: ${({ theme: e }) => e.typography.lineHeights.m};
50
50
  font-weight: 400;
51
- `, R = o(y)`
51
+ `, O = a($)`
52
52
  width: 12px;
53
53
  height: 12px;
54
54
  flex: 0 0 auto;
55
- `, E = (e) => {
56
- const { name: n, label: i = "", options: s, value: p, disabled: h, optional: c = !1, onChange: g, error: a, badge: r } = e, { t: d } = m();
57
- if (!(s != null && s.length)) return null;
58
- const x = (t) => r != null && r.showFor ? typeof r.showFor == "function" ? !!r.showFor(t) : r.showFor === t.value : !1, f = (r == null ? void 0 : r.label) ?? "Recommended";
59
- return /* @__PURE__ */ l.jsxs(v, { children: [
60
- i && /* @__PURE__ */ l.jsxs(F, { children: [
61
- /* @__PURE__ */ l.jsx("label", { children: i }),
62
- c && /* @__PURE__ */ l.jsx($, { children: d("OPTIONAL") })
55
+ `, S = a.div`
56
+ display: flex;
57
+ width: 100%;
58
+ flex-direction: ${({ $variant: e }) => e};
59
+ ${({ $variant: e, theme: n }) => e === "row" ? p`
60
+ justify-content: space-between;
61
+ align-items: center;
62
+ ` : p`
63
+ gap: ${n.spacing.xs};
64
+ `}
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") })
63
73
  ] }),
64
- s.map((t) => {
65
- const u = x(t);
66
- return /* @__PURE__ */ l.jsxs(b, { children: [
67
- /* @__PURE__ */ l.jsx(
68
- j,
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,
69
79
  {
70
80
  name: n,
71
- label: t.label,
72
- value: t.value,
73
- $selected: p === (t == null ? void 0 : t.value),
81
+ label: r.label,
82
+ value: r.value,
83
+ $selected: c === (r == null ? void 0 : r.value),
74
84
  onChange: g,
75
85
  $disabled: h
76
86
  }
77
87
  ),
78
- u && /* @__PURE__ */ l.jsxs(z, { children: [
79
- (r == null ? void 0 : r.showIcon) !== !1 && /* @__PURE__ */ l.jsx(R, {}),
80
- f
88
+ m && /* @__PURE__ */ i.jsxs(I, { children: [
89
+ (s == null ? void 0 : s.showIcon) !== !1 && /* @__PURE__ */ i.jsx(O, {}),
90
+ y
81
91
  ] })
82
- ] }, t.value);
83
- }),
84
- a && /* @__PURE__ */ l.jsx(w, { variant: "error", title: a })
92
+ ] }, r.value);
93
+ }) }),
94
+ o && /* @__PURE__ */ i.jsx(j, { variant: "error", title: o })
85
95
  ] });
86
96
  };
87
97
  export {
88
- E as default
98
+ A as default
89
99
  };
@@ -15,6 +15,7 @@ export type TextAreaProps = {
15
15
  onClick: () => void;
16
16
  };
17
17
  identifier: string;
18
+ maxLength?: number;
18
19
  };
19
20
  declare const TextArea: React.FC<TextAreaProps>;
20
21
  export default TextArea;
@@ -1,8 +1,8 @@
1
1
  import { j as o } from "../_virtual/jsx-runtime.js";
2
2
  import "react";
3
3
  import d from "../node_modules/react-bootstrap/esm/Form.js";
4
- import e, { useTheme as h, css as i } from "styled-components";
5
- const m = {
4
+ import e, { useTheme as m, css as i } from "styled-components";
5
+ const b = {
6
6
  success: i`
7
7
  color: ${({ theme: r }) => r.colors.state.success.n450};
8
8
  border: 0.063rem solid ${({ theme: r }) => r.colors.state.success.n450};
@@ -39,12 +39,12 @@ const m = {
39
39
  outline: 0;
40
40
  }
41
41
  `
42
- }, b = e.div`
42
+ }, w = e.div`
43
43
  position: relative;
44
44
  width: 100%;
45
45
  direction: ${({ theme: r }) => r.dir === "rtl" ? "rtl" : "ltr"};
46
- `, w = e(d.Control)`
47
- ${({ $state: r }) => m[r]};
46
+ `, j = e(d.Control)`
47
+ ${({ $state: r }) => b[r]};
48
48
 
49
49
  width: 100%;
50
50
  height: 14.125rem;
@@ -87,13 +87,13 @@ const m = {
87
87
  &::placeholder {
88
88
  text-align: ${({ theme: r }) => r.dir === "rtl" ? "right" : "left"};
89
89
  }
90
- `, j = e(d.Group)`
90
+ `, S = e(d.Group)`
91
91
  display: flex;
92
92
  flex-direction: column;
93
93
  row-gap: ${({ theme: r }) => r.spacing.xs};
94
94
  align-items: 'flex-start';
95
95
  font-family: ${({ theme: r }) => r.dir === "rtl" ? r.fonts.arabic : r.fonts.english};
96
- `, S = e(d.Label)`
96
+ `, v = e(d.Label)`
97
97
  color: ${({ theme: r }) => r.colors.grey.n700};
98
98
  display: flex;
99
99
  align-items: flex-end;
@@ -101,7 +101,7 @@ const m = {
101
101
  font-size: ${({ theme: r }) => r.typography.sizes.s4};
102
102
  font-weight: 400;
103
103
  text-align: ${({ theme: r }) => r.dir === "rtl" ? "right" : "left"};
104
- `, v = e.div`
104
+ `, z = e.div`
105
105
  display: flex;
106
106
  align-items: center;
107
107
  gap: ${({ theme: r }) => r.spacing.xxs};
@@ -134,7 +134,7 @@ const m = {
134
134
  display: flex;
135
135
  justify-content: ${({ theme: r }) => r.dir === "rtl" ? "flex-end" : "flex-start"};
136
136
  text-align: ${({ theme: r }) => r.dir === "rtl" ? "right" : "left"};
137
- `, z = e.span`
137
+ `, C = e.span`
138
138
  color: ${({ theme: r }) => r.colors.grey.n300};
139
139
  font-size: ${({ theme: r }) => r.typography.sizes.s2};
140
140
 
@@ -142,7 +142,7 @@ const m = {
142
142
  display: flex;
143
143
  justify-content: ${({ theme: r }) => r.dir === "rtl" ? "flex-end" : "flex-start"};
144
144
  text-align: ${({ theme: r }) => r.dir === "rtl" ? "right" : "left"};
145
- `, H = ({
145
+ `, E = ({
146
146
  label: r,
147
147
  placeholder: s,
148
148
  value: n,
@@ -153,23 +153,24 @@ const m = {
153
153
  optional: x = "",
154
154
  helperText: c,
155
155
  helperTextLink: t,
156
- identifier: u
156
+ identifier: u,
157
+ maxLength: y = 500
157
158
  }) => {
158
- const a = h().dir, y = () => !c && !t ? null : /* @__PURE__ */ o.jsx(v, { $state: l, children: a ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
159
+ const a = m().dir, h = () => !c && !t ? null : /* @__PURE__ */ o.jsx(z, { $state: l, children: a ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
159
160
  t && /* @__PURE__ */ o.jsx($, { onClick: t.onClick, children: t.text }),
160
161
  c
161
162
  ] }) : /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
162
163
  c,
163
164
  t && /* @__PURE__ */ o.jsx($, { onClick: t.onClick, children: t.text })
164
165
  ] }) });
165
- return /* @__PURE__ */ o.jsxs(j, { $dir: a, children: [
166
- r && /* @__PURE__ */ o.jsxs(S, { children: [
166
+ return /* @__PURE__ */ o.jsxs(S, { $dir: a, children: [
167
+ r && /* @__PURE__ */ o.jsxs(v, { children: [
167
168
  r,
168
169
  " ",
169
- x && /* @__PURE__ */ o.jsx(z, { children: x })
170
+ x && /* @__PURE__ */ o.jsx(C, { children: x })
170
171
  ] }),
171
- /* @__PURE__ */ o.jsx(b, { children: /* @__PURE__ */ o.jsx(
172
- w,
172
+ /* @__PURE__ */ o.jsx(w, { children: /* @__PURE__ */ o.jsx(
173
+ j,
173
174
  {
174
175
  htmlSize: 80,
175
176
  style: { resize: "none" },
@@ -179,6 +180,7 @@ const m = {
179
180
  as: "textarea",
180
181
  value: n,
181
182
  id: u,
183
+ maxLength: y,
182
184
  onChange: g,
183
185
  placeholder: s,
184
186
  disabled: p || l == "readonly",
@@ -186,9 +188,9 @@ const m = {
186
188
  isValid: l == "success"
187
189
  }
188
190
  ) }),
189
- y()
191
+ h()
190
192
  ] });
191
193
  };
192
194
  export {
193
- H as default
195
+ E as default
194
196
  };
@@ -1,4 +1,4 @@
1
- import o from "../../../_virtual/index2.js";
1
+ import o from "../../../_virtual/index4.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/index2.js";
3
+ import e from "../../../_virtual/index4.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/index2.js";
2
+ import o from "../../../_virtual/index4.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/index2.js";
3
+ import o from "../../../_virtual/index4.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/index3.js";
5
+ import ee from "../../../_virtual/index2.js";
6
6
  import F from "../../../_virtual/browser.js";
7
- import te from "../../../_virtual/index4.js";
7
+ import te from "../../../_virtual/index3.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/index2.js";
2
+ import a from "../../../_virtual/index4.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/index2.js";
3
+ import o from "../../../_virtual/index4.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/index2.js";
1
+ import e from "../../../../_virtual/index4.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.42",
4
+ "version": "0.0.44",
5
5
  "type": "module",
6
6
  "publishConfig": {
7
7
  "access": "public"