abrplus-ui-kit 1.0.6 → 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-DqFzpRuD.cjs → index-BRLLsEKX.js} +20169 -19477
  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 +3 -3
  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-Bknzi7oo.js +0 -266
  42. package/dist/index-BvegjQUf.js +0 -90
  43. package/dist/index-Bvu3tjZA.js +0 -37331
  44. package/dist/index-CCvWoynu.cjs +0 -12
  45. package/dist/index-CIBuPhXl.cjs +0 -1629
  46. package/dist/index-C_d8YZwK.js +0 -28
  47. package/dist/index-Ck1A1Vbk.js +0 -543
  48. package/dist/index-DKwKBp9E.cjs +0 -265
  49. package/dist/index-DLUd_0LP.js +0 -13
  50. package/dist/index-DTnBytzT.cjs +0 -89
  51. package/dist/index-DvjH6QYq.cjs +0 -542
  52. package/dist/index-ITeOhLPx.js +0 -1630
  53. package/dist/index-vJLaOgWn.cjs +0 -27
  54. package/dist/sortable.esm-CJ4hbOQu.js +0 -3873
  55. package/dist/sortable.esm-grhzbi7z.cjs +0 -3872
@@ -0,0 +1,8 @@
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import { Avatar as o } from "antd";
3
+ import { twMerge as m } from "tailwind-merge";
4
+ const e = ({ className: r, ...t }) => /* @__PURE__ */ a(o, { ...t, className: m("bg-light-7 border-primary-light-3", r) }), p = ({ className: r, max: t, ...s }) => /* @__PURE__ */ a(o.Group, { max: t, ...s, className: m(r) });
5
+ e.Group = p;
6
+ export {
7
+ e as A
8
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("react/jsx-runtime"),r=require("./index-B1HRk2-g.cjs"),u=require("./colors-BDQwGpaB.cjs"),x=require("tailwind-merge");function I(c){return c.slice(0,1).toLowerCase()+c.slice(1)}function y(c){const h=Object.assign({},{...c});return new Proxy(h,{get(t,g){const l=Object.freeze({...t,[Symbol.toPrimitive](){return"Error: Attempted to render object as a JSX"}});if(g in l)return l[g];const a=I(g);return a in l?l[a]:null}})}const R=({title:c,iconName:h})=>e.jsxs(r.Flex,{align:"center",gap:8,children:[e.jsx(r.Text,{size:14,color:u.colors.white_ff,children:c}),h&&e.jsx(r.Icon,{name:h})]}),M=({children:c,title:h,iconName:t,...g})=>e.jsx(r.Tooltip,{title:typeof h=="string"?e.jsx(R,{title:h,iconName:t}):h,...g,children:c}),n={block:"text-[16px]",medium:"text-[16px]",small:"text-[12px]"},k=c=>({start:{block:`pe-4 ${c?"ps-3":"ps-4"} `,medium:`pe-4 ${c?"ps-3":"ps-4"} `,small:"pe-3 ps-[8px]"},end:{block:"ps-4 pe-3",medium:"ps-4 pe-3",small:"ps-4 pe-3"}}),j="flex relative select-none w-fit appearance-none flex-row items-center justify-center gap-2 whitespace-nowrap rounded text-center outline-none",T=({style:c,height:h,mode:t,children:g,iconName:l,disabled:a,className:d,iconPosition:o="start",isLoading:s,lang:b="fa",...p})=>{const i=u.AbrplusUIKit.config().getAppName(),w=()=>(a||s)&&i?i==="home"||i==="sandbox"||i==="bi"||i==="storybook"?u.colors.sales.action_light_2:u.colors[i].action_light_2:u.colors.white_ff,m=()=>{if(!i)return;const f={bi:x.twMerge("bg-sales-action hover:bg-sales-action-light-1 active:bg-sales-action-dark-1"),call:x.twMerge("bg-call-action hover:bg-call-action-light-1 active:bg-call-action-dark-1"),club:x.twMerge("bg-club-action hover:bg-club-action-light-1 active:bg-club-action-dark-1"),marketing:x.twMerge("bg-marketing-action hover:bg-marketing-action-light-1 active:bg-marketing-action-dark-1"),sales:x.twMerge("bg-sales-action hover:bg-sales-action-light-1 active:bg-sales-action-dark-1"),team:x.twMerge("bg-team-action hover:bg-team-action-light-1 active:bg-team-action-dark-1"),rayan:x.twMerge("bg-rayan-action hover:bg-rayan-action-light-1 active:bg-rayan-action-dark-1")};return f?.[i]||f.sales};return e.jsxs("button",{lang:b,style:{height:h||34,...c},className:x.twMerge("bg-repo disabled:bg-light-6 ",m(),k(!!l)[o][t||"block"],n[t||"block"],j,t==="block"&&"w-full",(a||s)&&"cursor-not-allowed border-light-6",d),disabled:a||s,...p,children:[e.jsx(r.Render,{when:s,children:e.jsx(r.Flex,{className:"absolute",children:e.jsx(r.Loading,{isLoading:!0,size:16})})}),e.jsx(r.Render,{when:o==="start",children:l&&e.jsx(r.Icon,{name:l,className:n[t||"block"],color:w()})}),e.jsx(r.Text,{lang:b,weight:"medium",className:n[t||"block"],color:w(),children:g}),e.jsx(r.Render,{when:o==="end",children:l&&e.jsx(r.Icon,{name:l,className:n[t||"block"],color:w()})})]})},_=({style:c,height:h=34,iconName:t,disabled:g,className:l,iconPosition:a="start",iconProps:d,color:o,...s})=>e.jsx("button",{style:{height:h,...c},className:x.twMerge(j,"h-[34px] w-[34px] p-4","bg-light-1 border-primary-light-3 border","hover:bg-white-ff hover:border-primary-light-2","active:bg-light-6 active:border-primary-light-2","disabled:text-primary-light-2 disabled:bg-light-6 disabled:border-light-6",g&&"border-light-6 cursor-not-allowed",l),disabled:g,...s,children:d?.renderIcon?d.renderIcon:e.jsx(r.Icon,{name:t,color:g?u.colors.primary_light_3:o??u.colors.primary,...d})}),C=({style:c,height:h,mode:t,children:g,iconName:l,disabled:a,className:d,iconPosition:o="start",isLoading:s,lang:b="fa",variant:p="outline",...i})=>{const w=()=>a||s?u.colors.primary_light_2:p==="contain"?u.colors.white_ff:u.colors.negative,v=p==="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";return e.jsxs("button",{lang:b,style:{height:h||34,...c},className:x.twMerge(j,v,k(!!l)[o][t||"block"],n[t||"block"],(a||s)&&"cursor-not-allowed",d),disabled:a||s,...i,children:[e.jsx(r.Render,{when:s,children:e.jsx(r.Flex,{className:"absolute",children:e.jsx(r.Loading,{isLoading:!0,size:16})})}),e.jsx(r.Render,{when:o==="start",children:l&&e.jsx(r.Icon,{name:l,className:x.twMerge(n[t||"block"]),color:w()})}),e.jsx(r.Text,{weight:"medium",size:16,color:w(),lang:b,children:g}),e.jsx(r.Render,{when:o==="end",children:l&&e.jsx(r.Icon,{name:l,className:n[t||"block"],color:w()})})]})},z=({style:c,height:h=34,mode:t,children:g,iconName:l,disabled:a,className:d,iconPosition:o="start",isLoading:s,lang:b="fa",textSize:p,...i})=>{const w=()=>a||s?u.colors.primary_light_2:u.colors.white_ff;return e.jsxs("button",{lang:b,style:{height:h,...c},className:x.twMerge("bg-primary hover:bg-primary-light-1 active:bg-primary-dark-1 disabled:bg-light-6",k(!!l)[o][t||"block"],n[t||"block"],j,t==="block"&&"w-full",(a||s)&&"cursor-not-allowed border-light-6",d),disabled:a||s,...i,children:[e.jsx(r.Render,{when:s,children:e.jsx(r.Flex,{className:"absolute",children:e.jsx(r.Loading,{isLoading:!0,size:16})})}),e.jsx(r.Render,{when:o==="start",children:l&&e.jsx(r.Icon,{name:l,className:n[t||"block"],color:w()})}),e.jsx(r.Text,{lang:b,weight:"medium",className:x.twMerge("text-white-ff",(a||s)&&"text-primary-light-2",n[t||"block"]),size:p,children:g}),e.jsx(r.Render,{when:o==="end",children:l&&e.jsx(r.Icon,{name:l,className:n[t||"block"],color:w()})})]})},B=({style:c,height:h=34,mode:t,children:g,iconName:l,disabled:a,className:d,iconPosition:o="start",isLoading:s,lang:b="fa",...p})=>{const i=()=>a||s?u.colors.primary_light_2:u.colors.primary;return e.jsxs("button",{lang:b,style:{height:h,...c},className:x.twMerge("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","border-[2px] border-solid border-primary hover:border-primary-light-1 active:border-primary-dark-1 disabled:bg-light-6",k(!!l)[o][t||"block"],n[t||"block"],j,(a||s)&&"cursor-not-allowed",d),disabled:a||s,...p,children:[e.jsx(r.Render,{when:s,children:e.jsx(r.Flex,{className:"absolute",children:e.jsx(r.Loading,{isLoading:!0,size:16})})}),e.jsx(r.Render,{when:o==="start",children:l&&e.jsx(r.Icon,{name:l,className:n[t||"block"],color:i()})}),e.jsx(r.Text,{lang:b,weight:"medium",className:n[t||"block"],children:g}),e.jsx(r.Render,{when:o==="end",children:l&&e.jsx(r.Icon,{name:l,className:n[t||"block"],color:i()})})]})},N=({style:c,height:h,mode:t,children:g,iconName:l,disabled:a,className:d,iconPosition:o="start",isLoading:s,lang:b="fa",...p})=>{const i=()=>a||s?u.colors.primary_light_2:u.colors.primary;return e.jsxs("button",{lang:b,style:{height:h||34,...c},className:x.twMerge("hover:bg-light-6 active:bg-light-7 disabled:light-6 bg-transparent",k(!!l)[o][t||"block"],n[t||"block"],j,(a||s)&&"cursor-not-allowed ",d),disabled:a||s,...p,children:[e.jsx(r.Render,{when:o==="start",children:l&&e.jsx(r.Icon,{name:l,className:n[t||"block"],color:i()})}),e.jsx(r.Text,{lang:b,weight:"medium",className:n[t||"block"],color:i(),children:g}),e.jsx(r.Render,{when:o==="end",children:l&&e.jsx(r.Icon,{name:l,className:n[t||"block"],color:i()})})]})},S=({style:c,height:h,mode:t,children:g,iconName:l,disabled:a,className:d,iconPosition:o="start",isLoading:s,lang:b="fa",...p})=>{const i=()=>a||s?u.colors.primary_light_2:u.colors.primary_dark_1;return e.jsxs("button",{lang:b,style:{height:h||34,...c},className:x.twMerge("bg-light-1 hover:bg-white-ff active:light-6 disabled:light-6","border-primary-light-3 hover:border-primary-light-2 active:bg-primary-light-2 disabled:light-6 border-[1px] border-solid",k(!!l)[o][t||"block"],n[t||"block"],j,(a||s)&&"cursor-not-allowed",d),disabled:a||s,...p,children:[e.jsx(r.Render,{when:o==="start",children:l&&e.jsx(r.Icon,{name:l,className:n[t||"block"],color:i()})}),e.jsx(r.Text,{lang:b,weight:"medium",className:n[t||"block"],color:i(),children:g}),e.jsx(r.Render,{when:o==="end",children:l&&e.jsx(r.Icon,{name:l,className:n[t||"block"],color:i()})})]})},F=({style:c,height:h=34,mode:t,children:g,iconName:l,disabled:a,className:d,iconPosition:o="start",isLoading:s,lang:b="fa",underline:p,textProps:i,startIconSize:w,endIconSize:m,...f})=>{const v=()=>a||s?u.colors.primary_light_2:u.colors.black;return e.jsxs("button",{lang:b,style:{height:h,...c},className:x.twMerge("disabled:bg-light-6 border-none hover:bg-none focus:bg-none",k(!!l)[o][t||"block"],n[t||"block"],j,t==="block"&&"w-full",(a||s)&&"border-light-6 cursor-not-allowed",d),disabled:a||s,...f,children:[e.jsx(r.Render,{when:s,children:e.jsx(r.Flex,{className:"absolute",children:e.jsx(r.Loading,{isLoading:!0,size:16})})}),e.jsx(r.Render,{when:o==="start",children:l&&e.jsx(r.Icon,{size:w,name:l,className:n[t||"block"],color:v()})}),e.jsx(r.Text,{lang:b,weight:"medium",className:x.twMerge((a||s)&&"text-primary-light-2",n[t||"block"],p&&"underline"),...i,children:g}),e.jsx(r.Render,{when:o==="end",children:l&&e.jsx(r.Icon,{size:m,name:l,className:n[t||"block"],color:v()})})]})},A=y({Primary:z,Secondary:B,Tertiary:S,SecondaryQuiet:N,Icon:_,Negative:C,Action:T,Text:F});exports.Button=A;exports.IconButton=_;exports.Tooltip=M;exports.batch=y;exports.buttonDefaultClasses=j;exports.fontSizePicker=n;exports.paddingPicker=k;
@@ -0,0 +1,75 @@
1
+ import { jsx as r, jsxs as h } from "react/jsx-runtime";
2
+ import { ConfigProvider as w, Dropdown as I, Image as L } from "antd";
3
+ import { twMerge as d } from "tailwind-merge";
4
+ import { useState as S, useEffect as v } from "react";
5
+ import { F as u, L as B } from "./index-BRLLsEKX.js";
6
+ const D = {
7
+ components: {
8
+ Dropdown: {}
9
+ }
10
+ }, C = ({ className: e, ...o }) => /* @__PURE__ */ r(w, { theme: D, children: /* @__PURE__ */ r(I, { ...o, className: d("bg-light-7", e) }) }), k = ({
11
+ preview: e = !1,
12
+ width: o,
13
+ height: n,
14
+ fallback: c,
15
+ onError: s,
16
+ wrapperClassName: l,
17
+ ...m
18
+ }) => {
19
+ const [t, i] = S(!1);
20
+ return /* @__PURE__ */ r(
21
+ u,
22
+ {
23
+ style: { width: o, height: n },
24
+ align: "center",
25
+ justify: "center",
26
+ className: l,
27
+ children: t && c ? c : /* @__PURE__ */ r(
28
+ L,
29
+ {
30
+ preview: e,
31
+ onError: (a) => {
32
+ i(!0), s?.(a);
33
+ },
34
+ width: o,
35
+ height: n,
36
+ ...m
37
+ }
38
+ )
39
+ }
40
+ );
41
+ }, E = (e) => document.getElementById(e), N = (e, o) => {
42
+ let n;
43
+ return function() {
44
+ clearTimeout(n), n = setTimeout(e, o);
45
+ };
46
+ }, H = ({
47
+ children: e,
48
+ indicatorColor: o,
49
+ indicatorSize: n,
50
+ className: c,
51
+ hasMore: s,
52
+ scrollableNodeId: l,
53
+ onNextPage: m
54
+ }) => (v(() => {
55
+ const t = E(l);
56
+ if (t) {
57
+ const i = () => {
58
+ if (s) {
59
+ const { scrollHeight: f, scrollTop: g, clientHeight: p } = t;
60
+ Math.ceil(g) + p === f && m();
61
+ }
62
+ };
63
+ i();
64
+ const a = N(i, 1500);
65
+ return t.addEventListener("scroll", a), () => t.removeEventListener("scroll", a);
66
+ }
67
+ }, [s, l]), /* @__PURE__ */ h("div", { className: d(c, "w-full"), onClick: (t) => t.stopPropagation(), children: [
68
+ e,
69
+ s && /* @__PURE__ */ r(u, { className: "min-h-12", align: "center", justify: "center", children: /* @__PURE__ */ r(B, { isLoading: !0, color: o, size: n }) })
70
+ ] }));
71
+ export {
72
+ C as D,
73
+ H as I,
74
+ k as a
75
+ };