qaema-ui 0.0.31 → 0.0.32

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
  };
@@ -3,7 +3,7 @@ import a, { useTheme as b } from "styled-components";
3
3
  import j from "./Badge.js";
4
4
  import m from "./Button.js";
5
5
  import { Card as v } from "./Card.js";
6
- import c from "./Typography.js";
6
+ import l from "./Typography.js";
7
7
  const w = a.div`
8
8
  padding-bottom: ${(r) => r.theme.spacing.s};
9
9
  border-bottom: 1px solid ${(r) => r.theme.colors.grey.n100};
@@ -11,7 +11,7 @@ const w = a.div`
11
11
  display: inline-block;
12
12
  text-align: start;
13
13
  }
14
- `, k = a(c)`
14
+ `, k = a(l)`
15
15
  font-family: ${({ theme: r }) => r.fonts.arabic};
16
16
  font-weight: ${({ theme: r }) => r.typography.weights.semiBold};
17
17
  font-size: 15px;
@@ -26,7 +26,7 @@ const w = a.div`
26
26
  border-radius: ${({ theme: r }) => r.borderRadius.md};
27
27
  display: flex;
28
28
  justify-content: space-between;
29
- align-items: flex-start;
29
+ align-items: center;
30
30
 
31
31
  ${({ $variant: r, theme: e }) => {
32
32
  switch (r) {
@@ -54,20 +54,14 @@ const w = a.div`
54
54
  }
55
55
  }}
56
56
  `, T = a.button`
57
- width: 3.9375rem;
58
- height: 2rem;
59
57
  padding: 0.75rem;
60
58
  border-radius: 0.25rem;
61
59
  border: none;
62
60
  cursor: pointer;
63
- margin-top: ${({ theme: r }) => r.spacing.m};
64
- ${({ $variant: r, theme: e }) => {
65
- const i = r === "information" ? e.colors.primary.purple.n450 : r === "error" ? e.colors.state.error.n450 : r === "success" ? e.colors.state.success.n450 : e.colors.secondary.orange.n450;
66
- return `
67
- background:${e.colors.secondary.orange.n150};
68
- color: ${i};
69
- `;
70
- }}
61
+ ${({ $variant: r, theme: e }) => `
62
+ background: transparent;
63
+ color: ${r === "information" ? e.colors.primary.purple.n450 : r === "error" ? e.colors.state.error.n450 : r === "success" ? e.colors.state.success.n450 : e.colors.secondary.orange.n450};
64
+ `}
71
65
 
72
66
  font-weight: ${({ theme: r }) => r.typography.weights.semiBold};
73
67
  font-size: ${({ theme: r }) => r.typography.sizes.s2};
@@ -91,7 +85,7 @@ const w = a.div`
91
85
  display: flex;
92
86
  flex-direction: column;
93
87
  gap: ${(r) => r.theme.spacing.s};
94
- `, z = a(c)`
88
+ `, z = a(l)`
95
89
  font-family: ${({ theme: r }) => r.fonts.arabic};
96
90
  font-weight: ${({ theme: r }) => r.typography.weights.regular};
97
91
  font-size: ${({ theme: r }) => r.typography.sizes.s2};
@@ -113,21 +107,23 @@ const w = a.div`
113
107
  value: i,
114
108
  color: g
115
109
  }) => {
116
- const h = b();
117
- let l = null;
110
+ const y = b();
111
+ let c = null;
118
112
  if (r === "badge") {
119
113
  const s = i;
120
- l = /* @__PURE__ */ n.jsx(j, { ...s });
114
+ c = /* @__PURE__ */ n.jsx(j, { ...s });
121
115
  } else if (r === "trend") {
122
- const s = typeof i == "object" && i !== null ? i : { value: i }, t = s.direction ?? "neutral", d = h.colors.state.success.n450, o = h.colors.state.error.n450, y = t === "up" ? d : t === "down" ? o : g;
123
- l = /* @__PURE__ */ n.jsx(c, { variant: "smText", color: y, children: typeof s.value == "number" ? s.value.toString() : s.value });
124
- } else {
116
+ const s = typeof i == "object" && i !== null ? i : { value: i }, t = s.direction ?? "neutral", d = y.colors.state.success.n450, o = y.colors.state.error.n450, h = t === "up" ? d : t === "down" ? o : g;
117
+ c = /* @__PURE__ */ n.jsx(l, { variant: "smText", color: h, children: typeof s.value == "number" ? s.value.toString() : s.value });
118
+ } else if (r === "component")
119
+ c = i;
120
+ else {
125
121
  const s = i;
126
- l = /* @__PURE__ */ n.jsx(c, { variant: "smText", color: g, children: typeof s == "number" ? s.toString() : s });
122
+ c = /* @__PURE__ */ n.jsx(l, { variant: "smText", color: g, children: typeof s == "number" ? s.toString() : s });
127
123
  }
128
124
  return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
129
- /* @__PURE__ */ n.jsx(c, { variant: "smText", weight: "semiBold", children: e }),
130
- l
125
+ r !== "component" && /* @__PURE__ */ n.jsx(l, { variant: "smText", weight: "semiBold", children: e }),
126
+ c
131
127
  ] });
132
128
  };
133
129
  function G({
@@ -135,8 +131,8 @@ function G({
135
131
  total: e,
136
132
  title: i,
137
133
  subtitle: g,
138
- btnLabel: h,
139
- btnConfig: l,
134
+ btnLabel: y,
135
+ btnConfig: c,
140
136
  trailingActionsConfig: s,
141
137
  callout: t
142
138
  }) {
@@ -144,19 +140,19 @@ function G({
144
140
  return /* @__PURE__ */ n.jsxs(v, { padding: "2rem", shadowVariant: "none", hoverEffect: !1, border: `1px solid ${d.colors.grey.n100}`, children: [
145
141
  /* @__PURE__ */ n.jsxs(w, { children: [
146
142
  /* @__PURE__ */ n.jsxs(S, { children: [
147
- /* @__PURE__ */ n.jsx(c, { variant: "h6", weight: "semiBold", children: i }),
148
- l && /* @__PURE__ */ n.jsxs(m, { ...l, children: [
149
- h ?? "",
143
+ /* @__PURE__ */ n.jsx(l, { variant: "h6", weight: "semiBold", children: i }),
144
+ c && /* @__PURE__ */ n.jsxs(m, { ...c, children: [
145
+ y ?? "",
150
146
  " "
151
147
  ] })
152
148
  ] }),
153
- /* @__PURE__ */ n.jsx(c, { variant: "caption", color: d.colors.grey.n400, children: g })
149
+ /* @__PURE__ */ n.jsx(l, { variant: "caption", color: d.colors.grey.n400, children: g })
154
150
  ] }),
155
151
  /* @__PURE__ */ n.jsxs(R, { children: [
156
152
  r.map((o, u) => {
157
- var y;
158
- return ((y = o == null ? void 0 : o.items) == null ? void 0 : y.length) === 0 ? null : /* @__PURE__ */ n.jsxs(C, { children: [
159
- /* @__PURE__ */ n.jsx(c, { variant: "span", weight: "regular", color: d.colors.grey.n400, children: o.title }),
153
+ var h;
154
+ return ((h = o == null ? void 0 : o.items) == null ? void 0 : h.length) === 0 ? null : /* @__PURE__ */ n.jsxs(C, { children: [
155
+ /* @__PURE__ */ n.jsx(l, { variant: "span", weight: "regular", color: d.colors.grey.n400, children: o.title }),
160
156
  o.items.map((p, $) => /* @__PURE__ */ n.jsx(f, { children: /* @__PURE__ */ n.jsx(x, { variant: p == null ? void 0 : p.variant, label: p.label, value: p.value, color: d.colors.grey.n400 }) }, `${u}-${$}`))
161
157
  ] }, o.title);
162
158
  }),
@@ -10,4 +10,4 @@ export type TotalsSummaryProps = {
10
10
  showCurrencyIcon?: boolean;
11
11
  currencyIconWidth?: string;
12
12
  };
13
- export default function TotalsSummary({ title, items, showCurrencyIcon, currencyIconWidth, }: TotalsSummaryProps): import("react/jsx-runtime").JSX.Element;
13
+ export default function TotalsSummary({ title, items, showCurrencyIcon, currencyIconWidth }: TotalsSummaryProps): import("react/jsx-runtime").JSX.Element;
@@ -1,9 +1,10 @@
1
- import { j as t } from "../_virtual/jsx-runtime.js";
1
+ import { j as i } from "../_virtual/jsx-runtime.js";
2
2
  import o from "styled-components";
3
- import { device as n } from "../constants/breakPoints.constant.js";
4
3
  import p from "../assets/icons/RiyalIcon.js";
4
+ import { device as n } from "../constants/breakPoints.constant.js";
5
5
  const g = o.div`
6
6
  width: 100%;
7
+ direction: inherit;
7
8
  `, c = o.div`
8
9
  font-family: ${({ theme: e }) => e.fonts.english};
9
10
  font-weight: ${({ theme: e }) => e.typography.weights.semiBold};
@@ -21,7 +22,7 @@ const g = o.div`
21
22
  @media ${n.tablet} {
22
23
  gap: ${({ theme: e }) => e.spacing.l};
23
24
  }
24
- `, y = o.div`
25
+ `, d = o.div`
25
26
  display: flex;
26
27
  flex-direction: column;
27
28
  gap: ${({ theme: e }) => e.spacing.xs};
@@ -30,55 +31,57 @@ const g = o.div`
30
31
  @media ${n.tablet} {
31
32
  min-width: 9.5rem;
32
33
  }
33
- `, m = o.div`
34
+ `, y = o.div`
34
35
  font-family: ${({ theme: e }) => e.fonts.english};
35
36
  font-weight: ${({ theme: e }) => e.typography.weights.semiBold};
36
37
  font-size: ${({ theme: e }) => e.typography.sizes.s4};
37
38
  line-height: ${({ theme: e }) => e.typography.lineHeights.s};
38
39
  letter-spacing: ${({ theme: e }) => e.typography.letterSpacings.balancedNarrow};
39
40
  color: ${({ theme: e }) => e.colors.grey.n650};
40
- `, d = o.div`
41
+ `, m = o.div`
41
42
  display: flex;
42
43
  align-items: baseline;
43
44
  gap: ${({ theme: e }) => e.spacing.xxs};
44
- direction: ltr;
45
- `, $ = o.span`
45
+ direction: inherit;
46
+ [dir='rtl'] & {
47
+ flex-direction: row-reverse;
48
+ }
49
+ `, f = o.span`
46
50
  font-family: ${({ theme: e }) => e.fonts.arabic};
47
51
  font-weight: ${({ theme: e }) => e.typography.weights.bold};
48
52
  font-size: ${({ theme: e }) => e.typography.sizes.s10};
49
53
  line-height: ${({ theme: e }) => e.typography.lineHeights.xl};
50
54
  letter-spacing: ${({ theme: e }) => e.typography.letterSpacings.balancedNarrow};
51
55
  text-align: center;
52
- color: ${({ theme: e, $color: s }) => s || e.colors.grey.n400};
53
- `, f = o.span`
56
+ color: ${({ theme: e, $color: r }) => r || e.colors.grey.n400};
57
+ direction: ltr;
58
+ unicode-bidi: plaintext;
59
+ `, $ = o.span`
54
60
  font-family: ${({ theme: e }) => e.fonts.english};
55
61
  font-weight: ${({ theme: e }) => e.typography.weights.regular};
56
62
  font-size: ${({ theme: e }) => e.typography.sizes.s2};
57
63
  line-height: ${({ theme: e }) => e.typography.lineHeights.xs};
58
64
  letter-spacing: ${({ theme: e }) => e.typography.letterSpacings.normal};
59
- color: ${({ theme: e, $color: s }) => s || e.colors.grey.n400};
65
+ color: ${({ theme: e, $color: r }) => r || e.colors.grey.n400};
66
+ direction: ltr;
67
+ unicode-bidi: plaintext;
60
68
  `;
61
- function b({
62
- title: e,
63
- items: s,
64
- showCurrencyIcon: r = !0,
65
- currencyIconWidth: l = "18px"
66
- }) {
67
- return /* @__PURE__ */ t.jsxs(g, { children: [
68
- /* @__PURE__ */ t.jsx(c, { children: e }),
69
- /* @__PURE__ */ t.jsx(h, { children: s.map((i, a) => /* @__PURE__ */ t.jsxs(y, { children: [
70
- /* @__PURE__ */ t.jsx(m, { children: i.title }),
71
- /* @__PURE__ */ t.jsxs(d, { children: [
72
- r && /* @__PURE__ */ t.jsx(p, { width: l, height: "20", color: i.color }),
73
- /* @__PURE__ */ t.jsx($, { $color: i.color, children: i.amount }),
74
- i.decimal ? /* @__PURE__ */ t.jsxs(f, { $color: i.color, children: [
69
+ function j({ title: e, items: r, showCurrencyIcon: s = !0, currencyIconWidth: l = "18px" }) {
70
+ return /* @__PURE__ */ i.jsxs(g, { children: [
71
+ /* @__PURE__ */ i.jsx(c, { children: e }),
72
+ /* @__PURE__ */ i.jsx(h, { children: r.map((t, a) => /* @__PURE__ */ i.jsxs(d, { children: [
73
+ /* @__PURE__ */ i.jsx(y, { children: t.title }),
74
+ /* @__PURE__ */ i.jsxs(m, { children: [
75
+ s && /* @__PURE__ */ i.jsx(p, { width: l, height: "20", color: t.color }),
76
+ /* @__PURE__ */ i.jsx(f, { $color: t.color, children: t.amount }),
77
+ t.decimal ? /* @__PURE__ */ i.jsxs($, { $color: t.color, children: [
75
78
  ".",
76
- i.decimal
79
+ t.decimal
77
80
  ] }) : null
78
81
  ] })
79
- ] }, `${i.title}-${a}`)) })
82
+ ] }, `${t.title}-${a}`)) })
80
83
  ] });
81
84
  }
82
85
  export {
83
- b as default
86
+ j as default
84
87
  };
@@ -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.31",
4
+ "version": "0.0.32",
5
5
  "type": "module",
6
6
  "publishConfig": {
7
7
  "access": "public"