abrplus-ui-kit 1.0.7 → 1.0.9

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 (60) hide show
  1. package/dist/antOverrides.cjs.js +1 -127
  2. package/dist/antOverrides.es.js +70 -98
  3. package/dist/atoms.cjs.js +1 -391
  4. package/dist/atoms.es.js +252 -306
  5. package/dist/colors-BDQwGpaB.cjs +5 -0
  6. package/dist/{colors-CztsZ6e_.js → colors-BW-NR0oP.js} +30 -34
  7. package/dist/deepMerge-2zqLIrFM.cjs +1 -0
  8. package/dist/deepMerge-Dm_AZi0Z.js +14 -0
  9. package/dist/index-B1HRk2-g.cjs +1 -0
  10. package/dist/index-BCH1vT85.js +8 -0
  11. package/dist/index-BJmt8SSx.cjs +1 -0
  12. package/dist/index-BPqX2Hsu.js +75 -0
  13. package/dist/{index-B02Mlfa4.js → index-BRLLsEKX.js} +19905 -19821
  14. package/dist/index-BeP9-mrf.js +200 -0
  15. package/dist/index-Bpx-uyOR.cjs +1 -0
  16. package/dist/index-CpGdrWps.js +19 -0
  17. package/dist/index-CwKyw6uN.cjs +1 -0
  18. package/dist/index-CzPs2mPX.js +478 -0
  19. package/dist/index-QraJKad8.cjs +1 -0
  20. package/dist/index-R9oQ5kp6.js +1569 -0
  21. package/dist/index-bNh4-ggT.cjs +1 -0
  22. package/dist/index-lDQ4dr86.cjs +1 -0
  23. package/dist/index.cjs.js +1 -109
  24. package/dist/index.css +1 -1519
  25. package/dist/index.es.js +5 -5
  26. package/dist/index2.css +1 -3
  27. package/dist/molecules.cjs.js +8 -7826
  28. package/dist/molecules.es.js +4270 -6306
  29. package/dist/organisms.cjs.js +1 -940
  30. package/dist/organisms.es.js +651 -758
  31. package/dist/provider.cjs.js +1 -48
  32. package/dist/provider.es.js +29 -34
  33. package/dist/sortable.esm-BSCvBWLi.js +2943 -0
  34. package/dist/sortable.esm-CA8VbUF-.cjs +5 -0
  35. package/dist/theme.css +1 -102
  36. package/dist/types/components/atoms/icon/constants/iconNames.d.ts +1 -1
  37. package/dist/types/components/molecules/noResult/index.d.ts +1 -1
  38. package/dist/types/components/organisms/avatarGroup/index.d.ts +2 -2
  39. package/dist/types/components/organisms/table/components/cell/currencyCell.d.ts +1 -1
  40. package/dist/types/components/organisms/table/components/cell/dateCell.d.ts +1 -1
  41. package/dist/types/components/organisms/table/components/cell/status.d.ts +1 -1
  42. package/package.json +4 -4
  43. package/dist/colors-TPZkyKI4.cjs +0 -2212
  44. package/dist/deepMerge-CG1he8ZD.js +0 -20
  45. package/dist/deepMerge-Cn27K7-s.cjs +0 -19
  46. package/dist/index-B1Z0XlNV.cjs +0 -542
  47. package/dist/index-CCvWoynu.cjs +0 -12
  48. package/dist/index-CVNEow23.js +0 -543
  49. package/dist/index-Cbtrrxcv.js +0 -90
  50. package/dist/index-CiSH4Pqy.js +0 -266
  51. package/dist/index-Crz4ws0L.js +0 -1630
  52. package/dist/index-D-q_-bu0.cjs +0 -1629
  53. package/dist/index-DLUd_0LP.js +0 -13
  54. package/dist/index-DM-zAoQS.cjs +0 -89
  55. package/dist/index-DPvG_H_Y.cjs +0 -27
  56. package/dist/index-DdzyIn4u.js +0 -28
  57. package/dist/index-DsPAgC23.cjs +0 -37937
  58. package/dist/index-PyheoujP.cjs +0 -265
  59. package/dist/sortable.esm-BPjdpL-J.cjs +0 -3872
  60. package/dist/sortable.esm-C7oRJuPU.js +0 -3873
package/dist/atoms.es.js CHANGED
@@ -1,392 +1,338 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { Badge as Badge$1, Collapse as Collapse$1, Radio as Radio$1, ConfigProvider, Tabs } from "antd";
3
- import { m as mainExports, d as datePickerColors, I as InputErrorMessage } from "./index-Crz4ws0L.js";
4
- import { B, a, C, b, U, V } from "./index-Crz4ws0L.js";
5
- import { twMerge } from "tailwind-merge";
6
- import { useState, useEffect, useRef, useMemo, useCallback, Children } from "react";
7
- import require$$0 from "moment-jalaali";
8
- import { useTranslation } from "react-i18next";
9
- import { F as Flex, R as Render, I as Icon, T as Text, L as Loading } from "./index-B02Mlfa4.js";
10
- import { T as Tooltip } from "./index-CVNEow23.js";
11
- import { c as colors } from "./colors-CztsZ6e_.js";
12
- import { P, V as V2 } from "./index-CiSH4Pqy.js";
13
- import require$$2 from "react-dom";
14
- const Badge = ({ children, ...rest }) => {
15
- return /* @__PURE__ */ jsx(Badge$1, { ...rest, children });
16
- };
17
- const PortalContainer = ({ children, id }) => {
18
- const [container, setContainer] = useState(null);
19
- useEffect(() => {
20
- let el = document.getElementById(id);
21
- if (!el) {
22
- const observer = new MutationObserver(() => {
23
- el = document.getElementById(id);
24
- if (el) {
25
- setContainer(el);
26
- observer.disconnect();
27
- }
1
+ import { jsx as e, jsxs as g } from "react/jsx-runtime";
2
+ import { Badge as O, Collapse as M, Radio as R, ConfigProvider as A, Tabs as $ } from "antd";
3
+ import { m as E, d as F, I as V } from "./index-R9oQ5kp6.js";
4
+ import { B as Ye, a as Pe, C as Te, b as je, U as _e, V as De } from "./index-R9oQ5kp6.js";
5
+ import { twMerge as f } from "tailwind-merge";
6
+ import { useState as H, useEffect as L, useRef as J, useMemo as Q, useCallback as S, Children as D } from "react";
7
+ import W from "moment-jalaali";
8
+ import { useTranslation as q } from "react-i18next";
9
+ import { F as s, R as y, I as N, T as k, L as X } from "./index-BRLLsEKX.js";
10
+ import { T as B } from "./index-CzPs2mPX.js";
11
+ import { c } from "./colors-BW-NR0oP.js";
12
+ import { P as Me, V as Re } from "./index-BeP9-mrf.js";
13
+ import Z from "react-dom";
14
+ const pe = ({ children: r, ...n }) => /* @__PURE__ */ e(O, { ...n, children: r }), ge = ({ children: r, id: n }) => {
15
+ const [o, t] = H(null);
16
+ return L(() => {
17
+ let l = document.getElementById(n);
18
+ if (!l) {
19
+ const a = new MutationObserver(() => {
20
+ l = document.getElementById(n), l && (t(l), a.disconnect());
28
21
  });
29
- observer.observe(document.body, { childList: true, subtree: true });
30
- return () => observer.disconnect();
31
- }
32
- setContainer(el);
33
- }, [id]);
34
- if (!container) return null;
35
- return require$$2.createPortal(children, container);
36
- };
37
- const Clickable = ({ children, onClick, className, ...rest }) => {
38
- return /* @__PURE__ */ jsx(
39
- "div",
40
- {
41
- onClick,
42
- className: twMerge(
43
- "hover:bg-light-2 flex cursor-pointer items-center justify-center rounded-full p-2 transition-colors",
44
- className
45
- ),
46
- ...rest,
47
- children
22
+ return a.observe(document.body, { childList: !0, subtree: !0 }), () => a.disconnect();
48
23
  }
49
- );
50
- };
51
- const ClickAwayListener = ({
52
- children,
53
- onClickAway,
54
- document: document2 = window.document,
55
- active = true,
56
- className,
57
- hasDefaultStyle = true
24
+ t(l);
25
+ }, [n]), o ? Z.createPortal(r, o) : null;
26
+ }, he = ({ children: r, onClick: n, className: o, ...t }) => /* @__PURE__ */ e(
27
+ "div",
28
+ {
29
+ onClick: n,
30
+ className: f(
31
+ "hover:bg-light-2 flex cursor-pointer items-center justify-center rounded-full p-2 transition-colors",
32
+ o
33
+ ),
34
+ ...t,
35
+ children: r
36
+ }
37
+ ), be = ({
38
+ children: r,
39
+ onClickAway: n,
40
+ document: o = window.document,
41
+ active: t = !0,
42
+ className: l,
43
+ hasDefaultStyle: a = !0
58
44
  }) => {
59
- const containerRef = useRef(null);
60
- useEffect(() => {
61
- if (!active) return;
62
- const handleClickOutside = (event) => {
63
- if (containerRef.current && !containerRef.current.contains(event.target)) {
64
- onClickAway();
65
- }
45
+ const d = J(null);
46
+ return L(() => {
47
+ if (!t) return;
48
+ const m = (u) => {
49
+ d.current && !d.current.contains(u.target) && n();
66
50
  };
67
- document2.addEventListener("mousedown", handleClickOutside);
68
- return () => {
69
- document2.removeEventListener("mousedown", handleClickOutside);
51
+ return o.addEventListener("mousedown", m), () => {
52
+ o.removeEventListener("mousedown", m);
70
53
  };
71
- }, [onClickAway, active, document2]);
72
- return /* @__PURE__ */ jsxs(
54
+ }, [n, t, o]), /* @__PURE__ */ g(
73
55
  "div",
74
56
  {
75
- ref: containerRef,
76
- ...hasDefaultStyle ? { className: twMerge("flex h-full w-full flex-1", className) } : { className },
57
+ ref: d,
58
+ ...a ? { className: f("flex h-full w-full flex-1", l) } : { className: l },
77
59
  children: [
78
60
  " ",
79
- children
61
+ r
80
62
  ]
81
63
  }
82
64
  );
83
- };
84
- const Collapse = ({ ...props }) => {
85
- return /* @__PURE__ */ jsx(Collapse$1, { ...props });
86
- };
87
- Collapse.Panel = Collapse$1.Panel;
88
- const DatePicker = ({
89
- helperText,
90
- required,
91
- label,
92
- error,
93
- wrapperClassName,
94
- onChange: onChangeProp,
95
- onChangeISO,
96
- value: valueProp,
97
- valueISO,
98
- locale,
99
- hideErrorMessage = false,
100
- ...props
65
+ }, I = ({ ...r }) => /* @__PURE__ */ e(M, { ...r });
66
+ I.Panel = M.Panel;
67
+ const we = ({
68
+ helperText: r,
69
+ required: n,
70
+ label: o,
71
+ error: t,
72
+ wrapperClassName: l,
73
+ onChange: a,
74
+ onChangeISO: d,
75
+ value: m,
76
+ valueISO: u,
77
+ locale: h,
78
+ hideErrorMessage: w = !1,
79
+ ...z
101
80
  }) => {
102
- const { i18n } = useTranslation();
103
- const value = useMemo(() => {
104
- if (valueISO) {
105
- return require$$0(valueISO);
106
- }
107
- return valueProp;
108
- }, [valueISO, valueProp]);
109
- const onChange = useCallback(
110
- (date, dateString) => {
111
- onChangeProp?.(date, dateString);
112
- onChangeISO?.(date?.toISOString());
81
+ const { i18n: x } = q(), Y = Q(() => u ? W(u) : m, [u, m]), P = S(
82
+ (v, C) => {
83
+ a?.(v, C), d?.(v?.toISOString());
113
84
  },
114
85
  // eslint-disable-next-line react-hooks/exhaustive-deps
115
86
  []
116
87
  );
117
- return /* @__PURE__ */ jsxs(Flex, { vertical: true, className: `w-full ${!hideErrorMessage && "inputErrorMessageContainer"}`, children: [
118
- /* @__PURE__ */ jsxs("label", { htmlFor: "language-textarea", className: "flex flex-row items-center gap-1", children: [
119
- /* @__PURE__ */ jsx(Render, { when: helperText, children: /* @__PURE__ */ jsx(Tooltip, { variant: "default", title: helperText, arrow: { pointAtCenter: true }, children: /* @__PURE__ */ jsx(Icon, { name: "Help_header", color: colors.primary_light_3, size: 15 }) }) }),
120
- typeof label === "string" ? /* @__PURE__ */ jsx(Text, { color: colors.primary, children: label }) : label,
121
- /* @__PURE__ */ jsx(Render, { when: required, children: /* @__PURE__ */ jsx(Icon, { name: "Asterisk", size: 6, color: colors.negative, className: "mb-2" }) })
88
+ return /* @__PURE__ */ g(s, { vertical: !0, className: `w-full ${!w && "inputErrorMessageContainer"}`, children: [
89
+ /* @__PURE__ */ g("label", { htmlFor: "language-textarea", className: "flex flex-row items-center gap-1", children: [
90
+ /* @__PURE__ */ e(y, { when: r, children: /* @__PURE__ */ e(B, { variant: "default", title: r, arrow: { pointAtCenter: !0 }, children: /* @__PURE__ */ e(N, { name: "Help_header", color: c.primary_light_3, size: 15 }) }) }),
91
+ typeof o == "string" ? /* @__PURE__ */ e(k, { color: c.primary, children: o }) : o,
92
+ /* @__PURE__ */ e(y, { when: n, children: /* @__PURE__ */ e(N, { name: "Asterisk", size: 6, color: c.negative, className: "mb-2" }) })
122
93
  ] }),
123
- /* @__PURE__ */ jsx(
124
- mainExports.DatePicker,
94
+ /* @__PURE__ */ e(
95
+ E.DatePicker,
125
96
  {
126
- format: i18n.language === "fa" ? "jYYYY/jMM/jDD" : "YYYY/MM/DD",
127
- locale: locale || i18n.language === "fa" ? "fa" : "en",
128
- customColors: datePickerColors,
129
- onChange,
130
- value,
131
- ...props
97
+ format: x.language === "fa" ? "jYYYY/jMM/jDD" : "YYYY/MM/DD",
98
+ locale: h || x.language === "fa" ? "fa" : "en",
99
+ customColors: F,
100
+ onChange: P,
101
+ value: Y,
102
+ ...z
132
103
  }
133
104
  ),
134
- !hideErrorMessage && error?.message && /* @__PURE__ */ jsx(InputErrorMessage, { message: error?.message })
105
+ !w && t?.message && /* @__PURE__ */ e(V, { message: t?.message })
135
106
  ] });
136
- };
137
- const Empty = ({ flex, direction = "horizontal" }) => {
138
- return /* @__PURE__ */ jsx(
139
- "div",
107
+ }, xe = ({ flex: r, direction: n = "horizontal" }) => /* @__PURE__ */ e(
108
+ "div",
109
+ {
110
+ className: f("flex", n === "horizontal" ? "flex-row" : "flex-col"),
111
+ style: { flex: r }
112
+ }
113
+ ), ve = ({ size: r }) => /* @__PURE__ */ e(s, { className: "h-full min-h-[100px] w-full", align: "center", justify: "center", children: /* @__PURE__ */ e(X, { isLoading: !0, size: r }) }), Ce = ({
114
+ className: r,
115
+ wrapperClassName: n,
116
+ style: o,
117
+ color: t,
118
+ text: l
119
+ }) => /* @__PURE__ */ g(s, { "data-testid": "horizontal-line", className: n, align: "center", gap: 10, children: [
120
+ l ? /* @__PURE__ */ e(
121
+ k,
140
122
  {
141
- className: twMerge("flex", direction === "horizontal" ? "flex-row" : "flex-col"),
142
- style: { flex }
123
+ className: "whitespace-nowrap",
124
+ weight: "normal",
125
+ size: "medium",
126
+ color: c.primary,
127
+ children: l
143
128
  }
144
- );
145
- };
146
- const Fallback = ({ size }) => {
147
- return /* @__PURE__ */ jsx(Flex, { className: "h-full min-h-[100px] w-full", align: "center", justify: "center", children: /* @__PURE__ */ jsx(Loading, { isLoading: true, size }) });
148
- };
149
- const HorizontalLine = ({
150
- className,
151
- wrapperClassName,
152
- style,
153
- color,
154
- text
155
- }) => {
156
- return /* @__PURE__ */ jsxs(Flex, { "data-testid": "horizontal-line", className: wrapperClassName, align: "center", gap: 10, children: [
157
- text ? /* @__PURE__ */ jsx(
158
- Text,
159
- {
160
- className: "whitespace-nowrap",
161
- weight: "normal",
162
- size: "medium",
163
- color: colors.primary,
164
- children: text
165
- }
166
- ) : null,
167
- /* @__PURE__ */ jsx(
168
- "hr",
169
- {
170
- role: "separator",
171
- className: twMerge("border-t-light-7 m-0 w-full border-x-0 border-b-0 border-t", className),
172
- style: { ...style, borderTopColor: color }
173
- }
174
- )
175
- ] });
176
- };
177
- const NavigationTabs = ({
178
- children,
179
- onChange,
180
- wrapperStyle,
181
- wrapperClassName,
182
- spaceBetweenTabs,
183
- activeStyleMode = "background",
184
- defaultTabKey,
185
- extraAfterItem,
186
- extraBeforeItem,
187
- extraBeforeChildren,
188
- extraAfterChildren,
189
- tabFontSize = 18,
190
- tabsClassName,
191
- tabClassName,
192
- tabsWrapperStyle,
193
- innerContentClassName,
194
- extraChildrenInheritBorder,
195
- hasBorder = true
129
+ ) : null,
130
+ /* @__PURE__ */ e(
131
+ "hr",
132
+ {
133
+ role: "separator",
134
+ className: f("border-t-light-7 m-0 w-full border-x-0 border-b-0 border-t", r),
135
+ style: { ...o, borderTopColor: t }
136
+ }
137
+ )
138
+ ] }), K = ({
139
+ children: r,
140
+ onChange: n,
141
+ wrapperStyle: o,
142
+ wrapperClassName: t,
143
+ spaceBetweenTabs: l,
144
+ activeStyleMode: a = "background",
145
+ defaultTabKey: d,
146
+ extraAfterItem: m,
147
+ extraBeforeItem: u,
148
+ extraBeforeChildren: h,
149
+ extraAfterChildren: w,
150
+ tabFontSize: z = 18,
151
+ tabsClassName: x,
152
+ tabClassName: Y,
153
+ tabsWrapperStyle: P,
154
+ innerContentClassName: v,
155
+ extraChildrenInheritBorder: C,
156
+ hasBorder: G = !0
196
157
  }) => {
197
- const [currentTabKey, setCurrentTabKey] = useState(void 0);
198
- useEffect(() => {
199
- const defaultActiveTab = Children.map(children, ({ props }) => props)[0];
200
- if (!defaultTabKey) {
201
- setCurrentTabKey(defaultActiveTab.tabKey);
158
+ const [p, T] = H(void 0);
159
+ return L(() => {
160
+ const i = D.map(r, ({ props: b }) => b)[0];
161
+ if (!d) {
162
+ T(i.tabKey);
202
163
  return;
203
164
  }
204
- setCurrentTabKey(defaultTabKey);
205
- }, []);
206
- return /* @__PURE__ */ jsxs(Flex, { style: wrapperStyle, vertical: true, className: twMerge("w-full flex-1", wrapperClassName), children: [
207
- /* @__PURE__ */ jsxs(
208
- Flex,
165
+ T(d);
166
+ }, []), /* @__PURE__ */ g(s, { style: o, vertical: !0, className: f("w-full flex-1", t), children: [
167
+ /* @__PURE__ */ g(
168
+ s,
209
169
  {
210
170
  align: "center",
211
- className: twMerge(
212
- activeStyleMode === "underlined" && hasBorder && "border-light-7 border-b border-solid"
171
+ className: f(
172
+ a === "underlined" && G && "border-light-7 border-b border-solid"
213
173
  ),
214
174
  children: [
215
- extraBeforeItem && /* @__PURE__ */ jsx(
216
- Flex,
175
+ u && /* @__PURE__ */ e(
176
+ s,
217
177
  {
218
178
  justify: "center",
219
- className: twMerge(
179
+ className: f(
220
180
  "h-full px-2",
221
- extraChildrenInheritBorder && "border-light-6 border-b border-solid"
181
+ C && "border-light-6 border-b border-solid"
222
182
  ),
223
- children: typeof extraBeforeItem === "function" ? extraBeforeItem(currentTabKey) : extraBeforeItem
183
+ children: typeof u == "function" ? u(p) : u
224
184
  }
225
185
  ),
226
- /* @__PURE__ */ jsx(
227
- Flex,
186
+ /* @__PURE__ */ e(
187
+ s,
228
188
  {
229
189
  align: "center",
230
- className: twMerge(
190
+ className: f(
231
191
  "w-full min-w-max flex-1 flex-row overflow-y-auto overflow-x-hidden",
232
- tabsClassName
192
+ x
233
193
  ),
234
- gap: spaceBetweenTabs !== void 0 ? spaceBetweenTabs : 24,
235
- style: tabsWrapperStyle,
236
- children: Children.map(
237
- children,
238
- ({ props: { tabKey, title, className, style, isVisible = true } }) => isVisible ? /* @__PURE__ */ jsx(
239
- Flex,
194
+ gap: l !== void 0 ? l : 24,
195
+ style: P,
196
+ children: D.map(
197
+ r,
198
+ ({ props: { tabKey: i, title: b, className: j, style: _, isVisible: U = !0 } }) => U ? /* @__PURE__ */ e(
199
+ s,
240
200
  {
241
201
  align: "center",
242
202
  justify: "center",
243
- style: typeof style === "function" ? style(currentTabKey || tabKey) : style,
244
- className: twMerge(
203
+ style: typeof _ == "function" ? _(p || i) : _,
204
+ className: f(
245
205
  "relative h-full min-h-[35px] w-fit min-w-[24px] cursor-pointer rounded",
246
- tabClassName,
247
- typeof title === "string" ? "px-4 pb-2 pt-4" : "px-0 pb-2 pt-4",
248
- tabKey === currentTabKey && (activeStyleMode === "background" ? "after:bg-primary-light-1 z-auto overflow-hidden px-4 after:absolute after:left-0 after:top-0 after:h-full after:w-full" : activeStyleMode === "underlined" ? " after:border-action z-auto after:absolute after:left-0 after:top-0 after:h-full after:w-full after:border-b-[2px] after:border-solid" : void 0),
249
- typeof className === "function" ? className(currentTabKey || tabKey) : className
206
+ Y,
207
+ typeof b == "string" ? "px-4 pb-2 pt-4" : "px-0 pb-2 pt-4",
208
+ i === p && (a === "background" ? "after:bg-primary-light-1 z-auto overflow-hidden px-4 after:absolute after:left-0 after:top-0 after:h-full after:w-full" : a === "underlined" ? " after:border-action z-auto after:absolute after:left-0 after:top-0 after:h-full after:w-full after:border-b-[2px] after:border-solid" : void 0),
209
+ typeof j == "function" ? j(p || i) : j
250
210
  ),
251
211
  onClick: () => {
252
- setCurrentTabKey(tabKey);
253
- onChange?.(tabKey);
212
+ T(i), n?.(i);
254
213
  },
255
- children: typeof title === "string" ? /* @__PURE__ */ jsx(
256
- Text,
214
+ children: typeof b == "string" ? /* @__PURE__ */ e(
215
+ k,
257
216
  {
258
- size: tabFontSize,
217
+ size: z,
259
218
  weight: "medium",
260
- className: twMerge(
219
+ className: f(
261
220
  "z-10",
262
- activeStyleMode === "background" && tabKey === currentTabKey && "text-white-ff",
263
- activeStyleMode === "underlined" && tabKey === currentTabKey && "text-action"
221
+ a === "background" && i === p && "text-white-ff",
222
+ a === "underlined" && i === p && "text-action"
264
223
  ),
265
- children: title
224
+ children: b
266
225
  }
267
- ) : title?.(tabKey === currentTabKey ? colors.negative : colors.negative)
226
+ ) : b?.(i === p ? c.negative : c.negative)
268
227
  },
269
- tabKey
228
+ i
270
229
  ) : null
271
230
  )
272
231
  }
273
232
  ),
274
- extraAfterItem && /* @__PURE__ */ jsx(
275
- Flex,
233
+ m && /* @__PURE__ */ e(
234
+ s,
276
235
  {
277
236
  justify: "center",
278
237
  align: "center",
279
- className: twMerge(
238
+ className: f(
280
239
  "h-full px-2",
281
- extraChildrenInheritBorder && "border-light-6 border-b border-solid"
240
+ C && "border-light-6 border-b border-solid"
282
241
  ),
283
- children: typeof extraAfterItem === "function" ? extraAfterItem(currentTabKey) : extraAfterItem
242
+ children: typeof m == "function" ? m(p) : m
284
243
  }
285
244
  )
286
245
  ]
287
246
  }
288
247
  ),
289
- /* @__PURE__ */ jsxs(Flex, { className: twMerge("max-w-full flex-1", innerContentClassName), children: [
290
- extraBeforeChildren && /* @__PURE__ */ jsx(Flex, { children: typeof extraBeforeChildren === "function" ? extraBeforeChildren(currentTabKey) : extraBeforeChildren }),
291
- Children.map(children, ({ props: { tabKey, children: children2 } }) => {
292
- if (tabKey === currentTabKey) {
293
- return /* @__PURE__ */ jsx(Flex, { className: "max-w-full flex-1", children: children2 }, tabKey);
294
- }
295
- return null;
296
- }),
297
- extraAfterChildren && /* @__PURE__ */ jsx(Flex, { children: typeof extraAfterChildren === "function" ? extraAfterChildren(currentTabKey) : extraAfterChildren })
248
+ /* @__PURE__ */ g(s, { className: f("max-w-full flex-1", v), children: [
249
+ h && /* @__PURE__ */ e(s, { children: typeof h == "function" ? h(p) : h }),
250
+ D.map(r, ({ props: { tabKey: i, children: b } }) => i === p ? /* @__PURE__ */ e(s, { className: "max-w-full flex-1", children: b }, i) : null),
251
+ w && /* @__PURE__ */ e(s, { children: typeof w == "function" ? w(p) : w })
298
252
  ] })
299
253
  ] });
300
254
  };
301
- NavigationTabs.Tab = (_props) => null;
302
- const Radio = (props) => /* @__PURE__ */ jsx(Radio$1, { ...props });
303
- Radio.Group = Radio$1.Group;
304
- const RangePicker = ({
305
- helperText,
306
- required,
307
- label,
308
- error,
309
- wrapperClassName,
310
- value,
311
- hideErrorMessage = false,
312
- ...props
255
+ K.Tab = (r) => null;
256
+ const ee = (r) => /* @__PURE__ */ e(R, { ...r });
257
+ ee.Group = R.Group;
258
+ const ye = ({
259
+ helperText: r,
260
+ required: n,
261
+ label: o,
262
+ error: t,
263
+ wrapperClassName: l,
264
+ value: a,
265
+ hideErrorMessage: d = !1,
266
+ ...m
313
267
  }) => {
314
- const { i18n } = useTranslation();
315
- const isValueValid = (value?.filter(Boolean)?.length || 0) > 0 && !!value;
316
- return /* @__PURE__ */ jsxs(Flex, { vertical: true, className: `w-full ${!hideErrorMessage && "inputErrorMessageContainer"}`, children: [
317
- /* @__PURE__ */ jsxs("label", { htmlFor: "language-textarea", className: "flex flex-row items-center gap-1", children: [
318
- /* @__PURE__ */ jsx(Render, { when: helperText, children: /* @__PURE__ */ jsx(Tooltip, { variant: "default", title: helperText, arrow: { pointAtCenter: true }, children: /* @__PURE__ */ jsx(Icon, { name: "Help_header", color: colors.primary_light_3, size: 15 }) }) }),
319
- typeof label === "string" ? /* @__PURE__ */ jsx(Text, { color: colors.primary, children: label }) : label,
320
- /* @__PURE__ */ jsx(Render, { when: required, children: /* @__PURE__ */ jsx(Icon, { name: "Asterisk", size: 6, color: colors.negative, className: "mb-2" }) })
268
+ const { i18n: u } = q(), h = (a?.filter(Boolean)?.length || 0) > 0 && !!a;
269
+ return /* @__PURE__ */ g(s, { vertical: !0, className: `w-full ${!d && "inputErrorMessageContainer"}`, children: [
270
+ /* @__PURE__ */ g("label", { htmlFor: "language-textarea", className: "flex flex-row items-center gap-1", children: [
271
+ /* @__PURE__ */ e(y, { when: r, children: /* @__PURE__ */ e(B, { variant: "default", title: r, arrow: { pointAtCenter: !0 }, children: /* @__PURE__ */ e(N, { name: "Help_header", color: c.primary_light_3, size: 15 }) }) }),
272
+ typeof o == "string" ? /* @__PURE__ */ e(k, { color: c.primary, children: o }) : o,
273
+ /* @__PURE__ */ e(y, { when: n, children: /* @__PURE__ */ e(N, { name: "Asterisk", size: 6, color: c.negative, className: "mb-2" }) })
321
274
  ] }),
322
- /* @__PURE__ */ jsx(
323
- mainExports.RangePicker,
275
+ /* @__PURE__ */ e(
276
+ E.RangePicker,
324
277
  {
325
- format: i18n.language === "fa" ? "jYYYY/jMM/jDD" : "YYYY/MM/DD",
326
- locale: i18n.language === "fa" ? "fa" : "en",
327
- customColors: datePickerColors,
328
- value: isValueValid ? value : null,
329
- ...props
278
+ format: u.language === "fa" ? "jYYYY/jMM/jDD" : "YYYY/MM/DD",
279
+ locale: u.language === "fa" ? "fa" : "en",
280
+ customColors: F,
281
+ value: h ? a : null,
282
+ ...m
330
283
  }
331
284
  ),
332
- !hideErrorMessage && error?.message && /* @__PURE__ */ jsx(InputErrorMessage, { message: error?.message })
285
+ !d && t?.message && /* @__PURE__ */ e(V, { message: t?.message })
333
286
  ] });
334
- };
335
- const Separator = ({ direction = "vertical", className }) => {
336
- return /* @__PURE__ */ jsx(
337
- "div",
338
- {
339
- role: "separator",
340
- className: twMerge(
341
- "bg-light-7",
342
- direction === "vertical" ? "mx-2 h-full w-[1px]" : "my-2 h-[1px] w-full",
343
- className
344
- )
345
- }
346
- );
347
- };
348
- const TabConfig = {
287
+ }, Ne = ({ direction: r = "vertical", className: n }) => /* @__PURE__ */ e(
288
+ "div",
289
+ {
290
+ role: "separator",
291
+ className: f(
292
+ "bg-light-7",
293
+ r === "vertical" ? "mx-2 h-full w-[1px]" : "my-2 h-[1px] w-full",
294
+ n
295
+ )
296
+ }
297
+ ), re = {
349
298
  components: {
350
299
  Tabs: {
351
- inkBarColor: colors.secondary,
352
- itemColor: colors.primary,
353
- itemSelectedColor: colors.secondary,
300
+ inkBarColor: c.secondary,
301
+ itemColor: c.primary,
302
+ itemSelectedColor: c.secondary,
354
303
  titleFontSize: 18,
355
304
  horizontalItemPadding: "0px",
356
305
  horizontalMargin: "0",
357
- itemHoverColor: colors.primary_light_1,
358
- itemActiveColor: colors.primary_light_2
306
+ itemHoverColor: c.primary_light_1,
307
+ itemActiveColor: c.primary_light_2
359
308
  }
360
309
  }
361
- };
362
- const Tab = (props) => {
363
- return /* @__PURE__ */ jsx(ConfigProvider, { theme: TabConfig, children: /* @__PURE__ */ jsx(Tabs, { ...props }) });
364
- };
365
- Tab.TabPane = Tabs.TabPane;
310
+ }, ne = (r) => /* @__PURE__ */ e(A, { theme: re, children: /* @__PURE__ */ e($, { ...r }) });
311
+ ne.TabPane = $.TabPane;
366
312
  export {
367
- Badge,
368
- B as BorderedTitle,
369
- a as Breadcrumbs,
370
- C as Card,
371
- b as Checkbox,
372
- ClickAwayListener,
373
- Clickable,
374
- Collapse,
375
- DatePicker,
376
- Empty,
377
- Fallback,
378
- HorizontalLine,
379
- Icon,
380
- NavigationTabs,
381
- P as Popover,
382
- PortalContainer,
383
- Radio,
384
- RangePicker,
385
- Render,
386
- Separator,
387
- Tab,
388
- Tooltip,
389
- U as Upload,
390
- V as VerticalLine,
391
- V2 as View
313
+ pe as Badge,
314
+ Ye as BorderedTitle,
315
+ Pe as Breadcrumbs,
316
+ Te as Card,
317
+ je as Checkbox,
318
+ be as ClickAwayListener,
319
+ he as Clickable,
320
+ I as Collapse,
321
+ we as DatePicker,
322
+ xe as Empty,
323
+ ve as Fallback,
324
+ Ce as HorizontalLine,
325
+ N as Icon,
326
+ K as NavigationTabs,
327
+ Me as Popover,
328
+ ge as PortalContainer,
329
+ ee as Radio,
330
+ ye as RangePicker,
331
+ y as Render,
332
+ Ne as Separator,
333
+ ne as Tab,
334
+ B as Tooltip,
335
+ _e as Upload,
336
+ De as VerticalLine,
337
+ Re as View
392
338
  };