abrplus-ui-kit 1.0.7 → 1.0.8

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 (55) 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/package.json +4 -4
  38. package/dist/colors-TPZkyKI4.cjs +0 -2212
  39. package/dist/deepMerge-CG1he8ZD.js +0 -20
  40. package/dist/deepMerge-Cn27K7-s.cjs +0 -19
  41. package/dist/index-B1Z0XlNV.cjs +0 -542
  42. package/dist/index-CCvWoynu.cjs +0 -12
  43. package/dist/index-CVNEow23.js +0 -543
  44. package/dist/index-Cbtrrxcv.js +0 -90
  45. package/dist/index-CiSH4Pqy.js +0 -266
  46. package/dist/index-Crz4ws0L.js +0 -1630
  47. package/dist/index-D-q_-bu0.cjs +0 -1629
  48. package/dist/index-DLUd_0LP.js +0 -13
  49. package/dist/index-DM-zAoQS.cjs +0 -89
  50. package/dist/index-DPvG_H_Y.cjs +0 -27
  51. package/dist/index-DdzyIn4u.js +0 -28
  52. package/dist/index-DsPAgC23.cjs +0 -37937
  53. package/dist/index-PyheoujP.cjs +0 -265
  54. package/dist/sortable.esm-BPjdpL-J.cjs +0 -3872
  55. package/dist/sortable.esm-C7oRJuPU.js +0 -3873
@@ -0,0 +1,478 @@
1
+ import { jsxs as w, jsx as e } from "react/jsx-runtime";
2
+ import { F as _, T as v, I as m, a as N, R as g, L as z } from "./index-BRLLsEKX.js";
3
+ import { c as u, A as I } from "./colors-BW-NR0oP.js";
4
+ import { twMerge as p } from "tailwind-merge";
5
+ function S(c) {
6
+ return c.slice(0, 1).toLowerCase() + c.slice(1);
7
+ }
8
+ function j(c) {
9
+ const i = Object.assign({}, { ...c });
10
+ return new Proxy(i, {
11
+ get(t, h) {
12
+ const r = Object.freeze({
13
+ ...t,
14
+ [Symbol.toPrimitive]() {
15
+ return "Error: Attempted to render object as a JSX";
16
+ }
17
+ });
18
+ if (h in r)
19
+ return r[h];
20
+ const a = S(h);
21
+ return a in r ? r[a] : null;
22
+ }
23
+ });
24
+ }
25
+ const A = ({ title: c, iconName: i }) => /* @__PURE__ */ w(_, { align: "center", gap: 8, children: [
26
+ /* @__PURE__ */ e(v, { size: 14, color: u.white_ff, children: c }),
27
+ i && /* @__PURE__ */ e(m, { name: i })
28
+ ] }), X = ({ children: c, title: i, iconName: t, ...h }) => /* @__PURE__ */ e(
29
+ N,
30
+ {
31
+ title: typeof i == "string" ? /* @__PURE__ */ e(A, { title: i, iconName: t }) : i,
32
+ ...h,
33
+ children: c
34
+ }
35
+ ), n = {
36
+ block: "text-[16px]",
37
+ medium: "text-[16px]",
38
+ small: "text-[12px]"
39
+ }, x = (c) => ({
40
+ start: {
41
+ block: `pe-4 ${c ? "ps-3" : "ps-4"} `,
42
+ medium: `pe-4 ${c ? "ps-3" : "ps-4"} `,
43
+ small: "pe-3 ps-[8px]"
44
+ },
45
+ end: {
46
+ block: "ps-4 pe-3",
47
+ medium: "ps-4 pe-3",
48
+ small: "ps-4 pe-3"
49
+ }
50
+ }), y = "flex relative select-none w-fit appearance-none flex-row items-center justify-center gap-2 whitespace-nowrap rounded text-center outline-none", $ = ({
51
+ style: c,
52
+ height: i,
53
+ mode: t,
54
+ children: h,
55
+ iconName: r,
56
+ disabled: a,
57
+ className: d,
58
+ iconPosition: s = "start",
59
+ isLoading: l,
60
+ lang: b = "fa",
61
+ ...f
62
+ }) => {
63
+ const o = I.config().getAppName(), k = () => (a || l) && o ? o === "home" || o === "sandbox" || o === "bi" || o === "storybook" ? u.sales.action_light_2 : u[o].action_light_2 : u.white_ff, T = () => {
64
+ if (!o) return;
65
+ const C = {
66
+ bi: p("bg-sales-action hover:bg-sales-action-light-1 active:bg-sales-action-dark-1"),
67
+ call: p("bg-call-action hover:bg-call-action-light-1 active:bg-call-action-dark-1"),
68
+ club: p("bg-club-action hover:bg-club-action-light-1 active:bg-club-action-dark-1"),
69
+ marketing: p(
70
+ "bg-marketing-action hover:bg-marketing-action-light-1 active:bg-marketing-action-dark-1"
71
+ ),
72
+ sales: p("bg-sales-action hover:bg-sales-action-light-1 active:bg-sales-action-dark-1"),
73
+ team: p("bg-team-action hover:bg-team-action-light-1 active:bg-team-action-dark-1"),
74
+ rayan: p("bg-rayan-action hover:bg-rayan-action-light-1 active:bg-rayan-action-dark-1")
75
+ };
76
+ return C?.[o] || C.sales;
77
+ };
78
+ return /* @__PURE__ */ w(
79
+ "button",
80
+ {
81
+ lang: b,
82
+ style: {
83
+ height: i || 34,
84
+ ...c
85
+ },
86
+ className: p(
87
+ "bg-repo disabled:bg-light-6 ",
88
+ T(),
89
+ x(!!r)[s][t || "block"],
90
+ n[t || "block"],
91
+ y,
92
+ t === "block" && "w-full",
93
+ (a || l) && "cursor-not-allowed border-light-6",
94
+ d
95
+ ),
96
+ disabled: a || l,
97
+ ...f,
98
+ children: [
99
+ /* @__PURE__ */ e(g, { when: l, children: /* @__PURE__ */ e(_, { className: "absolute", children: /* @__PURE__ */ e(z, { isLoading: !0, size: 16 }) }) }),
100
+ /* @__PURE__ */ e(g, { when: s === "start", children: r && /* @__PURE__ */ e(m, { name: r, className: n[t || "block"], color: k() }) }),
101
+ /* @__PURE__ */ e(
102
+ v,
103
+ {
104
+ lang: b,
105
+ weight: "medium",
106
+ className: n[t || "block"],
107
+ color: k(),
108
+ children: h
109
+ }
110
+ ),
111
+ /* @__PURE__ */ e(g, { when: s === "end", children: r && /* @__PURE__ */ e(m, { name: r, className: n[t || "block"], color: k() }) })
112
+ ]
113
+ }
114
+ );
115
+ }, F = ({
116
+ style: c,
117
+ height: i = 34,
118
+ iconName: t,
119
+ disabled: h,
120
+ className: r,
121
+ iconPosition: a = "start",
122
+ iconProps: d,
123
+ color: s,
124
+ ...l
125
+ }) => /* @__PURE__ */ e(
126
+ "button",
127
+ {
128
+ style: {
129
+ height: i,
130
+ ...c
131
+ },
132
+ className: p(
133
+ y,
134
+ "h-[34px] w-[34px] p-4",
135
+ "bg-light-1 border-primary-light-3 border",
136
+ "hover:bg-white-ff hover:border-primary-light-2",
137
+ "active:bg-light-6 active:border-primary-light-2",
138
+ "disabled:text-primary-light-2 disabled:bg-light-6 disabled:border-light-6",
139
+ h && "border-light-6 cursor-not-allowed",
140
+ r
141
+ ),
142
+ disabled: h,
143
+ ...l,
144
+ children: d?.renderIcon ? d.renderIcon : /* @__PURE__ */ e(
145
+ m,
146
+ {
147
+ name: t,
148
+ color: h ? u.primary_light_3 : s ?? u.primary,
149
+ ...d
150
+ }
151
+ )
152
+ }
153
+ ), O = ({
154
+ style: c,
155
+ height: i,
156
+ mode: t,
157
+ children: h,
158
+ iconName: r,
159
+ disabled: a,
160
+ className: d,
161
+ iconPosition: s = "start",
162
+ isLoading: l,
163
+ lang: b = "fa",
164
+ variant: f = "outline",
165
+ // Default variant
166
+ ...o
167
+ }) => {
168
+ const k = () => a || l ? u.primary_light_2 : f === "contain" ? u.white_ff : u.negative, B = f === "contain" ? "bg-negative hover:bg-negative-light-1 active:bg-negative-dark-1 disabled:bg-light-6 border-transparent" : "hover:bg-negative-light-1 active:bg-negative-dark-1 [&_p]:hover:!text-white-ff [&_*]:hover:fill-white-ff disabled:bg-light-6 bg-transparent border-negative hover:border-negative-light-1 active:border-negative-dark-1 disabled:light-6 border-[2px] border-solid";
169
+ return /* @__PURE__ */ w(
170
+ "button",
171
+ {
172
+ lang: b,
173
+ style: {
174
+ height: i || 34,
175
+ ...c
176
+ },
177
+ className: p(
178
+ y,
179
+ B,
180
+ x(!!r)[s][t || "block"],
181
+ n[t || "block"],
182
+ (a || l) && "cursor-not-allowed",
183
+ d
184
+ ),
185
+ disabled: a || l,
186
+ ...o,
187
+ children: [
188
+ /* @__PURE__ */ e(g, { when: l, children: /* @__PURE__ */ e(_, { className: "absolute", children: /* @__PURE__ */ e(z, { isLoading: !0, size: 16 }) }) }),
189
+ /* @__PURE__ */ e(g, { when: s === "start", children: r && /* @__PURE__ */ e(
190
+ m,
191
+ {
192
+ name: r,
193
+ className: p(n[t || "block"]),
194
+ color: k()
195
+ }
196
+ ) }),
197
+ /* @__PURE__ */ e(v, { weight: "medium", size: 16, color: k(), lang: b, children: h }),
198
+ /* @__PURE__ */ e(g, { when: s === "end", children: r && /* @__PURE__ */ e(m, { name: r, className: n[t || "block"], color: k() }) })
199
+ ]
200
+ }
201
+ );
202
+ }, Q = ({
203
+ style: c,
204
+ height: i = 34,
205
+ mode: t,
206
+ children: h,
207
+ iconName: r,
208
+ disabled: a,
209
+ className: d,
210
+ iconPosition: s = "start",
211
+ isLoading: l,
212
+ lang: b = "fa",
213
+ textSize: f,
214
+ ...o
215
+ }) => {
216
+ const k = () => a || l ? u.primary_light_2 : u.white_ff;
217
+ return /* @__PURE__ */ w(
218
+ "button",
219
+ {
220
+ lang: b,
221
+ style: { height: i, ...c },
222
+ className: p(
223
+ "bg-primary hover:bg-primary-light-1 active:bg-primary-dark-1 disabled:bg-light-6",
224
+ x(!!r)[s][t || "block"],
225
+ n[t || "block"],
226
+ y,
227
+ t === "block" && "w-full",
228
+ (a || l) && "cursor-not-allowed border-light-6",
229
+ d
230
+ ),
231
+ disabled: a || l,
232
+ ...o,
233
+ children: [
234
+ /* @__PURE__ */ e(g, { when: l, children: /* @__PURE__ */ e(_, { className: "absolute", children: /* @__PURE__ */ e(z, { isLoading: !0, size: 16 }) }) }),
235
+ /* @__PURE__ */ e(g, { when: s === "start", children: r && /* @__PURE__ */ e(m, { name: r, className: n[t || "block"], color: k() }) }),
236
+ /* @__PURE__ */ e(
237
+ v,
238
+ {
239
+ lang: b,
240
+ weight: "medium",
241
+ className: p(
242
+ "text-white-ff",
243
+ (a || l) && "text-primary-light-2",
244
+ n[t || "block"]
245
+ ),
246
+ size: f,
247
+ children: h
248
+ }
249
+ ),
250
+ /* @__PURE__ */ e(g, { when: s === "end", children: r && /* @__PURE__ */ e(m, { name: r, className: n[t || "block"], color: k() }) })
251
+ ]
252
+ }
253
+ );
254
+ }, R = ({
255
+ style: c,
256
+ height: i = 34,
257
+ mode: t,
258
+ children: h,
259
+ iconName: r,
260
+ disabled: a,
261
+ className: d,
262
+ iconPosition: s = "start",
263
+ isLoading: l,
264
+ lang: b = "fa",
265
+ ...f
266
+ }) => {
267
+ const o = () => a || l ? u.primary_light_2 : u.primary;
268
+ return /* @__PURE__ */ w(
269
+ "button",
270
+ {
271
+ lang: b,
272
+ style: { height: i, ...c },
273
+ className: p(
274
+ "bg-transparent hover:bg-primary-light-1 active:bg-primary-dark-1 disabled:bg-light-6 [&_p]:text-primary [&_p]:hover:text-white-ff [&_svg]:hover:!fill-white-ff",
275
+ "border-[2px] border-solid border-primary hover:border-primary-light-1 active:border-primary-dark-1 disabled:bg-light-6",
276
+ x(!!r)[s][t || "block"],
277
+ n[t || "block"],
278
+ y,
279
+ (a || l) && "cursor-not-allowed",
280
+ d
281
+ ),
282
+ disabled: a || l,
283
+ ...f,
284
+ children: [
285
+ /* @__PURE__ */ e(g, { when: l, children: /* @__PURE__ */ e(_, { className: "absolute", children: /* @__PURE__ */ e(z, { isLoading: !0, size: 16 }) }) }),
286
+ /* @__PURE__ */ e(g, { when: s === "start", children: r && /* @__PURE__ */ e(m, { name: r, className: n[t || "block"], color: o() }) }),
287
+ /* @__PURE__ */ e(v, { lang: b, weight: "medium", className: n[t || "block"], children: h }),
288
+ /* @__PURE__ */ e(g, { when: s === "end", children: r && /* @__PURE__ */ e(m, { name: r, className: n[t || "block"], color: o() }) })
289
+ ]
290
+ }
291
+ );
292
+ }, D = ({
293
+ style: c,
294
+ height: i,
295
+ mode: t,
296
+ children: h,
297
+ iconName: r,
298
+ disabled: a,
299
+ className: d,
300
+ iconPosition: s = "start",
301
+ isLoading: l,
302
+ lang: b = "fa",
303
+ ...f
304
+ }) => {
305
+ const o = () => a || l ? u.primary_light_2 : u.primary;
306
+ return /* @__PURE__ */ w(
307
+ "button",
308
+ {
309
+ lang: b,
310
+ style: {
311
+ height: i || 34,
312
+ ...c
313
+ },
314
+ className: p(
315
+ "hover:bg-light-6 active:bg-light-7 disabled:light-6 bg-transparent",
316
+ x(!!r)[s][t || "block"],
317
+ n[t || "block"],
318
+ y,
319
+ (a || l) && "cursor-not-allowed ",
320
+ d
321
+ ),
322
+ disabled: a || l,
323
+ ...f,
324
+ children: [
325
+ /* @__PURE__ */ e(g, { when: s === "start", children: r && /* @__PURE__ */ e(m, { name: r, className: n[t || "block"], color: o() }) }),
326
+ /* @__PURE__ */ e(
327
+ v,
328
+ {
329
+ lang: b,
330
+ weight: "medium",
331
+ className: n[t || "block"],
332
+ color: o(),
333
+ children: h
334
+ }
335
+ ),
336
+ /* @__PURE__ */ e(g, { when: s === "end", children: r && /* @__PURE__ */ e(m, { name: r, className: n[t || "block"], color: o() }) })
337
+ ]
338
+ }
339
+ );
340
+ }, E = ({
341
+ style: c,
342
+ height: i,
343
+ mode: t,
344
+ children: h,
345
+ iconName: r,
346
+ disabled: a,
347
+ className: d,
348
+ iconPosition: s = "start",
349
+ isLoading: l,
350
+ lang: b = "fa",
351
+ ...f
352
+ }) => {
353
+ const o = () => a || l ? u.primary_light_2 : u.primary_dark_1;
354
+ return /* @__PURE__ */ w(
355
+ "button",
356
+ {
357
+ lang: b,
358
+ style: {
359
+ height: i || 34,
360
+ ...c
361
+ },
362
+ className: p(
363
+ "bg-light-1 hover:bg-white-ff active:light-6 disabled:light-6",
364
+ "border-primary-light-3 hover:border-primary-light-2 active:bg-primary-light-2 disabled:light-6 border-[1px] border-solid",
365
+ x(!!r)[s][t || "block"],
366
+ n[t || "block"],
367
+ y,
368
+ (a || l) && "cursor-not-allowed",
369
+ d
370
+ ),
371
+ disabled: a || l,
372
+ ...f,
373
+ children: [
374
+ /* @__PURE__ */ e(g, { when: s === "start", children: r && /* @__PURE__ */ e(m, { name: r, className: n[t || "block"], color: o() }) }),
375
+ /* @__PURE__ */ e(
376
+ v,
377
+ {
378
+ lang: b,
379
+ weight: "medium",
380
+ className: n[t || "block"],
381
+ color: o(),
382
+ children: h
383
+ }
384
+ ),
385
+ /* @__PURE__ */ e(g, { when: s === "end", children: r && /* @__PURE__ */ e(m, { name: r, className: n[t || "block"], color: o() }) })
386
+ ]
387
+ }
388
+ );
389
+ }, J = ({
390
+ style: c,
391
+ height: i = 34,
392
+ mode: t,
393
+ children: h,
394
+ iconName: r,
395
+ disabled: a,
396
+ className: d,
397
+ iconPosition: s = "start",
398
+ isLoading: l,
399
+ lang: b = "fa",
400
+ underline: f,
401
+ textProps: o,
402
+ startIconSize: k,
403
+ endIconSize: T,
404
+ ...C
405
+ }) => {
406
+ const B = () => a || l ? u.primary_light_2 : u.black;
407
+ return /* @__PURE__ */ w(
408
+ "button",
409
+ {
410
+ lang: b,
411
+ style: { height: i, ...c },
412
+ className: p(
413
+ "disabled:bg-light-6 border-none hover:bg-none focus:bg-none",
414
+ x(!!r)[s][t || "block"],
415
+ n[t || "block"],
416
+ y,
417
+ t === "block" && "w-full",
418
+ (a || l) && "border-light-6 cursor-not-allowed",
419
+ d
420
+ ),
421
+ disabled: a || l,
422
+ ...C,
423
+ children: [
424
+ /* @__PURE__ */ e(g, { when: l, children: /* @__PURE__ */ e(_, { className: "absolute", children: /* @__PURE__ */ e(z, { isLoading: !0, size: 16 }) }) }),
425
+ /* @__PURE__ */ e(g, { when: s === "start", children: r && /* @__PURE__ */ e(
426
+ m,
427
+ {
428
+ size: k,
429
+ name: r,
430
+ className: n[t || "block"],
431
+ color: B()
432
+ }
433
+ ) }),
434
+ /* @__PURE__ */ e(
435
+ v,
436
+ {
437
+ lang: b,
438
+ weight: "medium",
439
+ className: p(
440
+ (a || l) && "text-primary-light-2",
441
+ n[t || "block"],
442
+ f && "underline"
443
+ ),
444
+ ...o,
445
+ children: h
446
+ }
447
+ ),
448
+ /* @__PURE__ */ e(g, { when: s === "end", children: r && /* @__PURE__ */ e(
449
+ m,
450
+ {
451
+ size: T,
452
+ name: r,
453
+ className: n[t || "block"],
454
+ color: B()
455
+ }
456
+ ) })
457
+ ]
458
+ }
459
+ );
460
+ }, q = j({
461
+ Primary: Q,
462
+ Secondary: R,
463
+ Tertiary: E,
464
+ SecondaryQuiet: D,
465
+ Icon: F,
466
+ Negative: O,
467
+ Action: $,
468
+ Text: J
469
+ });
470
+ export {
471
+ q as B,
472
+ F as I,
473
+ X as T,
474
+ y as a,
475
+ j as b,
476
+ n as f,
477
+ x as p
478
+ };
@@ -0,0 +1 @@
1
+ "use strict";const r=require("react/jsx-runtime"),d=require("antd"),g=require("tailwind-merge"),f=require("react"),m=require("./index-B1HRk2-g.cjs"),h={components:{Dropdown:{}}},p=({className:e,...t})=>r.jsx(d.ConfigProvider,{theme:h,children:r.jsx(d.Dropdown,{...t,className:g.twMerge("bg-light-7",e)})}),I=({preview:e=!1,width:t,height:o,fallback:c,onError:s,wrapperClassName:i,...u})=>{const[n,l]=f.useState(!1);return r.jsx(m.Flex,{style:{width:t,height:o},align:"center",justify:"center",className:i,children:n&&c?c:r.jsx(d.Image,{preview:e,onError:a=>{l(!0),s?.(a)},width:t,height:o,...u})})},L=e=>document.getElementById(e),S=(e,t)=>{let o;return function(){clearTimeout(o),o=setTimeout(e,t)}},q=({children:e,indicatorColor:t,indicatorSize:o,className:c,hasMore:s,scrollableNodeId:i,onNextPage:u})=>(f.useEffect(()=>{const n=L(i);if(n){const l=()=>{if(s){const{scrollHeight:x,scrollTop:j,clientHeight:w}=n;Math.ceil(j)+w===x&&u()}};l();const a=S(l,1500);return n.addEventListener("scroll",a),()=>n.removeEventListener("scroll",a)}},[s,i]),r.jsxs("div",{className:g.twMerge(c,"w-full"),onClick:n=>n.stopPropagation(),children:[e,s&&r.jsx(m.Flex,{className:"min-h-12",align:"center",justify:"center",children:r.jsx(m.Loading,{isLoading:!0,color:t,size:o})})]}));exports.Dropdown=p;exports.Image=I;exports.InfiniteLoader=q;