elcrm 0.1.3 → 0.1.4

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.
package/dist/index.es.js CHANGED
@@ -883,7 +883,7 @@ const ut = ({ config: t }) => {
883
883
  }, _t = ({ children: t }) => /* @__PURE__ */ r.jsx(r.Fragment, { children: t }), vt = ({ type: t, name: s, params: i }) => {
884
884
  let [c, v] = g.useState(null);
885
885
  return g.useEffect(() => {
886
- Y.config.moadl(v, t, s, i);
886
+ Y.config(v, t, s, i);
887
887
  }, [i.id]), /* @__PURE__ */ r.jsx(r.Fragment, { children: c });
888
888
  }, ht = { List: Mr, Scroll: Wr, Init: ut, Main: ft, Add: dt, Icon: vt }, xt = ({ children: t, config: s, ...i }) => /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
889
889
  /* @__PURE__ */ r.jsx(ht.Init, { config: s.modal }),
package/dist/index.umd.js CHANGED
@@ -25,4 +25,4 @@ Check the render method of \``+e+"`."}return""}}function tr(e){{if(e!==void 0){v
25
25
 
26
26
  Check your code at `+n+":"+a+"."}return""}}var Me={};function rr(e){{var n=De();if(!n){var a=typeof e=="string"?e:e.displayName||e.name;a&&(n=`
27
27
 
28
- Check the top-level render call using <`+a+">.")}return n}}function Le(e,n){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var a=rr(n);if(Me[a])return;Me[a]=!0;var s="";e&&e._owner&&e._owner!==ie.current&&(s=" It was passed a child from "+E(e._owner.type)+"."),N(e),w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',a,s),N(null)}}function We(e,n){{if(typeof e!="object")return;if(re(e))for(var a=0;a<e.length;a++){var s=e[a];oe(s)&&Le(s,n)}else if(oe(e))e._store&&(e._store.validated=!0);else if(e){var x=Rt(e);if(typeof x=="function"&&x!==e.entries)for(var u=x.call(e),d;!(d=u.next()).done;)oe(d.value)&&Le(d.value,n)}}}function nr(e){{var n=e.type;if(n==null||typeof n=="string")return;var a;if(typeof n=="function")a=n.propTypes;else if(typeof n=="object"&&(n.$$typeof===h||n.$$typeof===y))a=n.propTypes;else return;if(a){var s=E(n);Bt(a,e.props,"prop",s,e)}else if(n.PropTypes!==void 0&&!ae){ae=!0;var x=E(n);w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",x||"Unknown")}typeof n.getDefaultProps=="function"&&!n.getDefaultProps.isReactClassApproved&&w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ir(e){{for(var n=Object.keys(e.props),a=0;a<n.length;a++){var s=n[a];if(s!=="children"&&s!=="key"){N(e),w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",s),N(null);break}}e.ref!==null&&(N(e),w("Invalid attribute `ref` supplied to `React.Fragment`."),N(null))}}function Ye(e,n,a,s,x,u){{var d=Ft(e);if(!d){var c="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(c+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var k=tr(x);k?c+=k:c+=De();var p;e===null?p="null":re(e)?p="array":e!==void 0&&e.$$typeof===i?(p="<"+(E(e.type)||"Unknown")+" />",c=" Did you accidentally export a JSX literal instead of a component?"):p=typeof e,w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",p,c)}var _=er(e,n,a,x,u);if(_==null)return _;if(d){var j=n.children;if(j!==void 0)if(s)if(re(j)){for(var D=0;D<j.length;D++)We(j[D],e);Object.freeze&&Object.freeze(j)}else w("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else We(j,e)}return e===l?ir(_):nr(_),_}}function ar(e,n,a){return Ye(e,n,a,!0)}function or(e,n,a){return Ye(e,n,a,!1)}var sr=or,lr=ar;L.Fragment=l,L.jsx=sr,L.jsxs=lr}()),L}process.env.NODE_ENV==="production"?X.exports=Ue():X.exports=Ve();var t=X.exports;const qe={notice:"_notice_820sc_2",error:"_error_820sc_9",success:"_success_820sc_12",remark:"_remark_820sc_15",copy:"_copy_820sc_18","show-notice":"_show-notice_820sc_1","hide-notice":"_hide-notice_820sc_1"};let R={};function He(){let[r,i]=b.useState([]);return R.set=o=>{i([...r,o])},R.del=o=>{i(r.filter(l=>l.key!==o))},r.length===0?"":t.jsx("ul",{className:qe.notice,children:r.map(o=>o.item)})}function W({data:r}){let[i,o]=b.useState("show");b.useEffect(()=>{setTimeout(function(){o("hide")},1800),setTimeout(function(){R.del(r.key)},2500)},[r.key]);let l,f;switch(r.type){case"error":l=t.jsx(O.error,{}),f="Ошибка:";break;case"success":l=t.jsx(O.success,{}),f="Информация:";break;case"copy":l=t.jsx(O.success,{}),f="Копирование:";break;case"remark":l=t.jsx(O.success,{}),f="Подсказка:";break;default:l=t.jsx(O.success,{}),f="Предупреждение:";break}return t.jsxs("li",{className:"item "+r.type,"data-status":i,children:[l,t.jsx("b",{children:f}),t.jsx("p",{children:r.text})]})}function Je(r){let i=Date.now(),o={key:i,...r};R.set({item:t.jsx(W,{data:o},i),key:i})}function Ge(r){let i=Date.now(),o={key:i,text:r,type:"error"};R.set({item:t.jsx(W,{data:o},i),key:i})}function Ze(r){let i=Date.now(),o={key:i,text:r,type:"success"};R.set({item:t.jsx(W,{data:o},i),key:i})}function Ke(r){let i=Date.now(),o={key:i,text:r,type:"remark"};R.set({item:t.jsx(W,{data:o},i),key:i})}function Xe(r){let i=Date.now(),o={key:i,text:r,type:"copy"};R.set({item:t.jsx(W,{data:o},i),key:i})}const O={};O.error=()=>t.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[t.jsx("path",{d:"M12 22C7.28595 22 4.92893 22 3.46447 20.5355C2 19.0711 2 16.714 2 12C2 7.28595 2 4.92893 3.46447 3.46447C4.92893 2 7.28595 2 12 2C16.714 2 19.0711 2 20.5355 3.46447C22 4.92893 22 7.28595 22 12C22 16.714 22 19.0711 20.5355 20.5355C19.0711 22 16.714 22 12 22Z",fill:"#bb2014"}),t.jsx("path",{d:"M8.96967 8.96967C9.26256 8.67678 9.73744 8.67678 10.0303 8.96967L12 10.9394L13.9697 8.96969C14.2626 8.6768 14.7374 8.6768 15.0303 8.96969C15.3232 9.26258 15.3232 9.73746 15.0303 10.0303L13.0607 12L15.0303 13.9697C15.3232 14.2625 15.3232 14.7374 15.0303 15.0303C14.7374 15.3232 14.2625 15.3232 13.9696 15.0303L12 13.0607L10.0304 15.0303C9.73746 15.3232 9.26258 15.3232 8.96969 15.0303C8.6768 14.7374 8.6768 14.2626 8.96969 13.9697L10.9394 12L8.96967 10.0303C8.67678 9.73744 8.67678 9.26256 8.96967 8.96967Z",fill:"#fff"})]}),O.success=()=>t.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[t.jsx("path",{d:"M12 22C7.28595 22 4.92893 22 3.46447 20.5355C2 19.0711 2 16.714 2 12C2 7.28595 2 4.92893 3.46447 3.46447C4.92893 2 7.28595 2 12 2C16.714 2 19.0711 2 20.5355 3.46447C22 4.92893 22 7.28595 22 12C22 16.714 22 19.0711 20.5355 20.5355C19.0711 22 16.714 22 12 22Z",fill:"#367738"}),t.jsx("path",{d:"M16.0303 8.96967C16.3232 9.26256 16.3232 9.73744 16.0303 10.0303L11.0303 15.0303C10.7374 15.3232 10.2626 15.3232 9.96967 15.0303L7.96967 13.0303C7.67678 12.7374 7.67678 12.2626 7.96967 11.9697C8.26256 11.6768 8.73744 11.6768 9.03033 11.9697L10.5 13.4393L14.9697 8.96967C15.2626 8.67678 15.7374 8.67678 16.0303 8.96967Z",fill:"#fff"})]});const Qe={alerts:"_alerts_1e9y0_1",menuAnimation:"_menuAnimation_1e9y0_1",menuItemAnimation:"_menuItemAnimation_1e9y0_1","--body":"_--body_1e9y0_103",allert:"_allert_1e9y0_111","--form":"_--form_1e9y0_111"};let Y={};function et(){let[r,i]=b.useState("");return Y.set=o=>i(o),Y.del=()=>i(""),t.jsx(t.Fragment,{children:r})}const tt=({data:r,callback:i})=>(r.button=r.button===void 0?"Подтвердить":r.button,t.jsxs("div",{className:Qe.alerts,children:[t.jsxs("dl",{children:[t.jsx("dt",{children:r.title}),t.jsx("dd",{children:r.text}),t.jsx("ul",{children:t.jsx("button",{"data-color":r.color||"blue",onClick:()=>{i(),Y.del()},children:r.button})})]}),t.jsx("div",{className:"--body",onClick:Y.del})]}));function rt(r,i){Y.set(t.jsx(tt,{data:r,callback:i}))}function nt({children:r}){return t.jsx("div",{className:"l",children:t.jsx("ul",{children:r})})}function it({children:r}){return t.jsx("div",{className:"s",children:r})}const de=({children:r,disabled:i,label:o,onClick:l})=>{const f=m=>{i||l&&l(m)};return t.jsx("button",{disabled:i,onClick:f,children:o})},T={white:"_white_6ax6z_14",black:"_black_6ax6z_26",shake:"_shake_6ax6z_1",modal:"_modal_6ax6z_73",o:"_o_6ax6z_83",w:"_w_6ax6z_14",h:"_h_6ax6z_106",l:"_l_6ax6z_120",t:"_t_6ax6z_158",m:"_m_6ax6z_73",x:"_x_6ax6z_166",s:"_s_6ax6z_176",c:"_c_6ax6z_181",f:"_f_6ax6z_186",btn:"_btn_6ax6z_229",g:"_g_6ax6z_242","size-a":"_size-a_6ax6z_294","size-s":"_size-s_6ax6z_298","size-m":"_size-m_6ax6z_302","size-l":"_size-l_6ax6z_306","size-x":"_size-x_6ax6z_310","size-f":"_size-f_6ax6z_314",confirm:"_confirm_6ax6z_320",cancel:"_cancel_6ax6z_325",disabled:"_disabled_6ax6z_330",await:"_await_6ax6z_337",active:"_active_6ax6z_387",coincidence:"_coincidence_6ax6z_393"};let B={};const at=({config:r})=>{let[i,o]=b.useState([]);return B.x=()=>{o([])},B.config=r,B.add=l=>{o([...i,l])},t.jsx(t.Fragment,{children:i.map(l=>l)})},ot=({children:r,title:i,button:o,tabs:l,size:f="m",menu:m})=>{const[A,z]=b.useState(!0),h=b.useRef(),P=y=>{if(o&&o.onClick)return o.onClick({closed:z,disabled:y})},v=()=>{h.current.setAttribute("shake",!0),setTimeout(()=>{h.current.setAttribute("shake",!1)},1e3)};return t.jsx(t.Fragment,{children:A?t.jsxs("div",{className:`${T.modal} ${T.white}`,children:[t.jsx("div",{className:T.o,onClick:v}),t.jsxs("div",{className:T.w,ref:h,children:[t.jsxs("div",{className:T.h,children:[t.jsx("div",{className:T.t,children:i}),t.jsxs("div",{className:T.m,children:[l&&t.jsx("nav",{children:l.map((y,C)=>t.jsx("span",{onClick:y.onClick,className:y.active?"active":"",children:y.name},C))}),m]}),t.jsx("div",{className:T.x,onClick:()=>{z(!1)},children:"x"})]}),r,o!==void 0?t.jsx(de,{label:String(o.name),onClick:P}):""]})]}):""})},st=r=>{B.add(t.jsx(lt,{children:r},String(Date.now())))},lt=({children:r})=>t.jsx(t.Fragment,{children:r}),xe={List:nt,Scroll:it,Init:at,Main:ot,Add:st,Icon:({type:r,name:i,params:o})=>{let[l,f]=b.useState(null);return b.useEffect(()=>{B.config.moadl(f,r,i,o)},[o.id]),t.jsx(t.Fragment,{children:l})}},ue=({children:r,config:i,...o})=>t.jsxs(t.Fragment,{children:[t.jsx(xe.Init,{config:i.modal}),t.jsx(He,{}),t.jsx(et,{}),r]}),ct=({children:r,...i})=>t.jsx("menu",{children:r}),dt=({children:r,...i})=>t.jsxs("header",{children:["xz",r]}),xt={payment:"_payment_1lxfv_1"};function ut(){let[r,i]=b.useState({});return!r.active&&!r.payment?"":t.jsx("div",{className:xt.payment,children:"Истек срок оплаты! Доступ доступен до 16.04.2024"})}const pt=({children:r,...i})=>t.jsxs("div",{className:"app",children:[t.jsx(ut,{}),t.jsx(ct,{}),t.jsx(dt,{}),t.jsx(ue,{config:{modal:{}}}),r]}),pe=({list:r,onClick:i,active:o,size:l,view:f})=>t.jsx("nav",{children:t.jsx("ul",{className:[l,f].join(" "),children:r.map(m=>t.jsx(ft,{onClick:i,active:o,label:m.label,link:m.link},m.link))})}),ft=({onClick:r,label:i,link:o,active:l})=>t.jsx("li",{"tabs-active":String(l===o),onClick:()=>r(o),children:i});pe.defaultProps={size:"M",view:"H"};const _t=({title:r="",button:i,description:o="",children:l})=>t.jsxs("fieldset",{children:[r&&t.jsxs("legend",{children:[r,i&&t.jsx("div",{role:"button-outline",onClick:()=>i.onClick(),children:i.label})," "]}),t.jsx("ul",{children:l}),o&&t.jsx("article",{children:o})]}),ht={setting:"_setting_1r0pc_2"},gt=({children:r})=>t.jsx("div",{className:ht.setting,children:r}),bt=({label:r,children:i})=>{let[o,l]=b.useState(!1);return t.jsxs("li",{"data-item":"accordion",children:[t.jsxs("dl",{onClick:()=>l(!o),children:[t.jsx("dt",{children:r}),t.jsx("dd",{children:t.jsx("div",{"data-close":String(o)})})]}),o&&t.jsx("div",{children:i})]})},mt=({label:r,onClick:i,button:o})=>t.jsx("li",{children:t.jsxs("dl",{children:[t.jsx("dt",{children:r}),t.jsx("dd",{role:"button",onClick:()=>i(),children:o})]})}),fe={Switch:({active:r,onClick:i})=>(console.log(r),r=typeof r=="number"?!!r:r,t.jsx("div",{role:"switch",onClick:()=>{console.log("Wewew"),i()},"aria-checked":r?"true":"false"}))},vt={Accordion:bt,Button:mt,Switch:({label:r,onClick:i,active:o})=>t.jsx("li",{children:t.jsxs("dl",{children:[t.jsx("dt",{children:r}),t.jsx("dd",{children:t.jsx(fe.Switch,{onClick:i,active:o})})]})}),Info:({label:r,info:i})=>t.jsx("li",{children:t.jsxs("dl",{children:[t.jsx("dt",{children:r}),t.jsx("dd",{role:"info",children:i})]})}),Select:({label:r,active:i,options:o})=>t.jsx("li",{children:t.jsxs("dl",{children:[t.jsx("dt",{children:r}),t.jsx("dd",{role:"info",children:i})]})}),Component:({label:r,children:i})=>t.jsx("li",{children:t.jsxs("dl",{children:[t.jsx("dt",{children:r}),t.jsx("dd",{children:i})]})}),Node:({label:r,children:i})=>t.jsx("li",{children:t.jsxs("dl",{children:[t.jsx("dt",{children:r}),t.jsx("dd",{children:i})]})})};function _e({list:r,onClick:i,active:o,size:l,view:f}){return t.jsx("nav",{children:t.jsx("ul",{className:[l,f].join(" "),children:r.map(m=>t.jsx(yt,{onClick:i,active:o,label:m.label,link:m.link},m.link))})})}const yt=({onClick:r,label:i,link:o,active:l})=>t.jsx("li",{"tabs-active":String(l===o),onClick:()=>r(o),children:i});_e.defaultProps={size:"M",view:"H"};const wt={Section:_t,Main:gt,Item:vt,Tabs:_e},$={h:"_h_1b5x7_1",t:"_t_1b5x7_10",s:"_s_1b5x7_28",u:"_u_1b5x7_37",o:"_o_1b5x7_44",l:"_l_1b5x7_53",hh:"_hh_1b5x7_60"},he=({title:r,children:i})=>t.jsxs("div",{className:$.h,children:[t.jsx("div",{className:$.t,children:r}),i]}),kt=({children:r,title:i})=>t.jsxs("div",{className:$.o,children:[i&&t.jsx("div",{className:$.hh,children:i}),r]}),jt=({children:r})=>t.jsx("div",{className:$.u,children:r}),ge=({children:r})=>t.jsx("div",{className:$.s,children:r}),be=({children:r,...i})=>t.jsx("div",{className:$.l,children:r}),zt={Header:he,Section:ge,List:be,U:jt,L:be,O:kt,S:ge,H:he},Ct={Send:Je,Error:Ge,Remark:Ke,Success:Ze,Copy:Xe},Et={Send:rt};g.Action=fe,g.Alert=Et,g.Browser=pt,g.Button=de,g.Component=zt,g.Init=ue,g.Modal=xe,g.Notice=Ct,g.Setting=wt,g.Tabs=pe,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})});
28
+ Check the top-level render call using <`+a+">.")}return n}}function Le(e,n){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var a=rr(n);if(Me[a])return;Me[a]=!0;var s="";e&&e._owner&&e._owner!==ie.current&&(s=" It was passed a child from "+E(e._owner.type)+"."),N(e),w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',a,s),N(null)}}function We(e,n){{if(typeof e!="object")return;if(re(e))for(var a=0;a<e.length;a++){var s=e[a];oe(s)&&Le(s,n)}else if(oe(e))e._store&&(e._store.validated=!0);else if(e){var x=Rt(e);if(typeof x=="function"&&x!==e.entries)for(var u=x.call(e),d;!(d=u.next()).done;)oe(d.value)&&Le(d.value,n)}}}function nr(e){{var n=e.type;if(n==null||typeof n=="string")return;var a;if(typeof n=="function")a=n.propTypes;else if(typeof n=="object"&&(n.$$typeof===h||n.$$typeof===y))a=n.propTypes;else return;if(a){var s=E(n);Bt(a,e.props,"prop",s,e)}else if(n.PropTypes!==void 0&&!ae){ae=!0;var x=E(n);w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",x||"Unknown")}typeof n.getDefaultProps=="function"&&!n.getDefaultProps.isReactClassApproved&&w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ir(e){{for(var n=Object.keys(e.props),a=0;a<n.length;a++){var s=n[a];if(s!=="children"&&s!=="key"){N(e),w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",s),N(null);break}}e.ref!==null&&(N(e),w("Invalid attribute `ref` supplied to `React.Fragment`."),N(null))}}function Ye(e,n,a,s,x,u){{var d=Ft(e);if(!d){var c="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(c+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var k=tr(x);k?c+=k:c+=De();var p;e===null?p="null":re(e)?p="array":e!==void 0&&e.$$typeof===i?(p="<"+(E(e.type)||"Unknown")+" />",c=" Did you accidentally export a JSX literal instead of a component?"):p=typeof e,w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",p,c)}var _=er(e,n,a,x,u);if(_==null)return _;if(d){var j=n.children;if(j!==void 0)if(s)if(re(j)){for(var D=0;D<j.length;D++)We(j[D],e);Object.freeze&&Object.freeze(j)}else w("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else We(j,e)}return e===l?ir(_):nr(_),_}}function ar(e,n,a){return Ye(e,n,a,!0)}function or(e,n,a){return Ye(e,n,a,!1)}var sr=or,lr=ar;L.Fragment=l,L.jsx=sr,L.jsxs=lr}()),L}process.env.NODE_ENV==="production"?X.exports=Ue():X.exports=Ve();var t=X.exports;const qe={notice:"_notice_820sc_2",error:"_error_820sc_9",success:"_success_820sc_12",remark:"_remark_820sc_15",copy:"_copy_820sc_18","show-notice":"_show-notice_820sc_1","hide-notice":"_hide-notice_820sc_1"};let R={};function He(){let[r,i]=b.useState([]);return R.set=o=>{i([...r,o])},R.del=o=>{i(r.filter(l=>l.key!==o))},r.length===0?"":t.jsx("ul",{className:qe.notice,children:r.map(o=>o.item)})}function W({data:r}){let[i,o]=b.useState("show");b.useEffect(()=>{setTimeout(function(){o("hide")},1800),setTimeout(function(){R.del(r.key)},2500)},[r.key]);let l,f;switch(r.type){case"error":l=t.jsx(O.error,{}),f="Ошибка:";break;case"success":l=t.jsx(O.success,{}),f="Информация:";break;case"copy":l=t.jsx(O.success,{}),f="Копирование:";break;case"remark":l=t.jsx(O.success,{}),f="Подсказка:";break;default:l=t.jsx(O.success,{}),f="Предупреждение:";break}return t.jsxs("li",{className:"item "+r.type,"data-status":i,children:[l,t.jsx("b",{children:f}),t.jsx("p",{children:r.text})]})}function Je(r){let i=Date.now(),o={key:i,...r};R.set({item:t.jsx(W,{data:o},i),key:i})}function Ge(r){let i=Date.now(),o={key:i,text:r,type:"error"};R.set({item:t.jsx(W,{data:o},i),key:i})}function Ze(r){let i=Date.now(),o={key:i,text:r,type:"success"};R.set({item:t.jsx(W,{data:o},i),key:i})}function Ke(r){let i=Date.now(),o={key:i,text:r,type:"remark"};R.set({item:t.jsx(W,{data:o},i),key:i})}function Xe(r){let i=Date.now(),o={key:i,text:r,type:"copy"};R.set({item:t.jsx(W,{data:o},i),key:i})}const O={};O.error=()=>t.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[t.jsx("path",{d:"M12 22C7.28595 22 4.92893 22 3.46447 20.5355C2 19.0711 2 16.714 2 12C2 7.28595 2 4.92893 3.46447 3.46447C4.92893 2 7.28595 2 12 2C16.714 2 19.0711 2 20.5355 3.46447C22 4.92893 22 7.28595 22 12C22 16.714 22 19.0711 20.5355 20.5355C19.0711 22 16.714 22 12 22Z",fill:"#bb2014"}),t.jsx("path",{d:"M8.96967 8.96967C9.26256 8.67678 9.73744 8.67678 10.0303 8.96967L12 10.9394L13.9697 8.96969C14.2626 8.6768 14.7374 8.6768 15.0303 8.96969C15.3232 9.26258 15.3232 9.73746 15.0303 10.0303L13.0607 12L15.0303 13.9697C15.3232 14.2625 15.3232 14.7374 15.0303 15.0303C14.7374 15.3232 14.2625 15.3232 13.9696 15.0303L12 13.0607L10.0304 15.0303C9.73746 15.3232 9.26258 15.3232 8.96969 15.0303C8.6768 14.7374 8.6768 14.2626 8.96969 13.9697L10.9394 12L8.96967 10.0303C8.67678 9.73744 8.67678 9.26256 8.96967 8.96967Z",fill:"#fff"})]}),O.success=()=>t.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[t.jsx("path",{d:"M12 22C7.28595 22 4.92893 22 3.46447 20.5355C2 19.0711 2 16.714 2 12C2 7.28595 2 4.92893 3.46447 3.46447C4.92893 2 7.28595 2 12 2C16.714 2 19.0711 2 20.5355 3.46447C22 4.92893 22 7.28595 22 12C22 16.714 22 19.0711 20.5355 20.5355C19.0711 22 16.714 22 12 22Z",fill:"#367738"}),t.jsx("path",{d:"M16.0303 8.96967C16.3232 9.26256 16.3232 9.73744 16.0303 10.0303L11.0303 15.0303C10.7374 15.3232 10.2626 15.3232 9.96967 15.0303L7.96967 13.0303C7.67678 12.7374 7.67678 12.2626 7.96967 11.9697C8.26256 11.6768 8.73744 11.6768 9.03033 11.9697L10.5 13.4393L14.9697 8.96967C15.2626 8.67678 15.7374 8.67678 16.0303 8.96967Z",fill:"#fff"})]});const Qe={alerts:"_alerts_1e9y0_1",menuAnimation:"_menuAnimation_1e9y0_1",menuItemAnimation:"_menuItemAnimation_1e9y0_1","--body":"_--body_1e9y0_103",allert:"_allert_1e9y0_111","--form":"_--form_1e9y0_111"};let Y={};function et(){let[r,i]=b.useState("");return Y.set=o=>i(o),Y.del=()=>i(""),t.jsx(t.Fragment,{children:r})}const tt=({data:r,callback:i})=>(r.button=r.button===void 0?"Подтвердить":r.button,t.jsxs("div",{className:Qe.alerts,children:[t.jsxs("dl",{children:[t.jsx("dt",{children:r.title}),t.jsx("dd",{children:r.text}),t.jsx("ul",{children:t.jsx("button",{"data-color":r.color||"blue",onClick:()=>{i(),Y.del()},children:r.button})})]}),t.jsx("div",{className:"--body",onClick:Y.del})]}));function rt(r,i){Y.set(t.jsx(tt,{data:r,callback:i}))}function nt({children:r}){return t.jsx("div",{className:"l",children:t.jsx("ul",{children:r})})}function it({children:r}){return t.jsx("div",{className:"s",children:r})}const de=({children:r,disabled:i,label:o,onClick:l})=>{const f=m=>{i||l&&l(m)};return t.jsx("button",{disabled:i,onClick:f,children:o})},T={white:"_white_6ax6z_14",black:"_black_6ax6z_26",shake:"_shake_6ax6z_1",modal:"_modal_6ax6z_73",o:"_o_6ax6z_83",w:"_w_6ax6z_14",h:"_h_6ax6z_106",l:"_l_6ax6z_120",t:"_t_6ax6z_158",m:"_m_6ax6z_73",x:"_x_6ax6z_166",s:"_s_6ax6z_176",c:"_c_6ax6z_181",f:"_f_6ax6z_186",btn:"_btn_6ax6z_229",g:"_g_6ax6z_242","size-a":"_size-a_6ax6z_294","size-s":"_size-s_6ax6z_298","size-m":"_size-m_6ax6z_302","size-l":"_size-l_6ax6z_306","size-x":"_size-x_6ax6z_310","size-f":"_size-f_6ax6z_314",confirm:"_confirm_6ax6z_320",cancel:"_cancel_6ax6z_325",disabled:"_disabled_6ax6z_330",await:"_await_6ax6z_337",active:"_active_6ax6z_387",coincidence:"_coincidence_6ax6z_393"};let B={};const at=({config:r})=>{let[i,o]=b.useState([]);return B.x=()=>{o([])},B.config=r,B.add=l=>{o([...i,l])},t.jsx(t.Fragment,{children:i.map(l=>l)})},ot=({children:r,title:i,button:o,tabs:l,size:f="m",menu:m})=>{const[A,z]=b.useState(!0),h=b.useRef(),P=y=>{if(o&&o.onClick)return o.onClick({closed:z,disabled:y})},v=()=>{h.current.setAttribute("shake",!0),setTimeout(()=>{h.current.setAttribute("shake",!1)},1e3)};return t.jsx(t.Fragment,{children:A?t.jsxs("div",{className:`${T.modal} ${T.white}`,children:[t.jsx("div",{className:T.o,onClick:v}),t.jsxs("div",{className:T.w,ref:h,children:[t.jsxs("div",{className:T.h,children:[t.jsx("div",{className:T.t,children:i}),t.jsxs("div",{className:T.m,children:[l&&t.jsx("nav",{children:l.map((y,C)=>t.jsx("span",{onClick:y.onClick,className:y.active?"active":"",children:y.name},C))}),m]}),t.jsx("div",{className:T.x,onClick:()=>{z(!1)},children:"x"})]}),r,o!==void 0?t.jsx(de,{label:String(o.name),onClick:P}):""]})]}):""})},st=r=>{B.add(t.jsx(lt,{children:r},String(Date.now())))},lt=({children:r})=>t.jsx(t.Fragment,{children:r}),xe={List:nt,Scroll:it,Init:at,Main:ot,Add:st,Icon:({type:r,name:i,params:o})=>{let[l,f]=b.useState(null);return b.useEffect(()=>{B.config(f,r,i,o)},[o.id]),t.jsx(t.Fragment,{children:l})}},ue=({children:r,config:i,...o})=>t.jsxs(t.Fragment,{children:[t.jsx(xe.Init,{config:i.modal}),t.jsx(He,{}),t.jsx(et,{}),r]}),ct=({children:r,...i})=>t.jsx("menu",{children:r}),dt=({children:r,...i})=>t.jsxs("header",{children:["xz",r]}),xt={payment:"_payment_1lxfv_1"};function ut(){let[r,i]=b.useState({});return!r.active&&!r.payment?"":t.jsx("div",{className:xt.payment,children:"Истек срок оплаты! Доступ доступен до 16.04.2024"})}const pt=({children:r,...i})=>t.jsxs("div",{className:"app",children:[t.jsx(ut,{}),t.jsx(ct,{}),t.jsx(dt,{}),t.jsx(ue,{config:{modal:{}}}),r]}),pe=({list:r,onClick:i,active:o,size:l,view:f})=>t.jsx("nav",{children:t.jsx("ul",{className:[l,f].join(" "),children:r.map(m=>t.jsx(ft,{onClick:i,active:o,label:m.label,link:m.link},m.link))})}),ft=({onClick:r,label:i,link:o,active:l})=>t.jsx("li",{"tabs-active":String(l===o),onClick:()=>r(o),children:i});pe.defaultProps={size:"M",view:"H"};const _t=({title:r="",button:i,description:o="",children:l})=>t.jsxs("fieldset",{children:[r&&t.jsxs("legend",{children:[r,i&&t.jsx("div",{role:"button-outline",onClick:()=>i.onClick(),children:i.label})," "]}),t.jsx("ul",{children:l}),o&&t.jsx("article",{children:o})]}),ht={setting:"_setting_1r0pc_2"},gt=({children:r})=>t.jsx("div",{className:ht.setting,children:r}),bt=({label:r,children:i})=>{let[o,l]=b.useState(!1);return t.jsxs("li",{"data-item":"accordion",children:[t.jsxs("dl",{onClick:()=>l(!o),children:[t.jsx("dt",{children:r}),t.jsx("dd",{children:t.jsx("div",{"data-close":String(o)})})]}),o&&t.jsx("div",{children:i})]})},mt=({label:r,onClick:i,button:o})=>t.jsx("li",{children:t.jsxs("dl",{children:[t.jsx("dt",{children:r}),t.jsx("dd",{role:"button",onClick:()=>i(),children:o})]})}),fe={Switch:({active:r,onClick:i})=>(console.log(r),r=typeof r=="number"?!!r:r,t.jsx("div",{role:"switch",onClick:()=>{console.log("Wewew"),i()},"aria-checked":r?"true":"false"}))},vt={Accordion:bt,Button:mt,Switch:({label:r,onClick:i,active:o})=>t.jsx("li",{children:t.jsxs("dl",{children:[t.jsx("dt",{children:r}),t.jsx("dd",{children:t.jsx(fe.Switch,{onClick:i,active:o})})]})}),Info:({label:r,info:i})=>t.jsx("li",{children:t.jsxs("dl",{children:[t.jsx("dt",{children:r}),t.jsx("dd",{role:"info",children:i})]})}),Select:({label:r,active:i,options:o})=>t.jsx("li",{children:t.jsxs("dl",{children:[t.jsx("dt",{children:r}),t.jsx("dd",{role:"info",children:i})]})}),Component:({label:r,children:i})=>t.jsx("li",{children:t.jsxs("dl",{children:[t.jsx("dt",{children:r}),t.jsx("dd",{children:i})]})}),Node:({label:r,children:i})=>t.jsx("li",{children:t.jsxs("dl",{children:[t.jsx("dt",{children:r}),t.jsx("dd",{children:i})]})})};function _e({list:r,onClick:i,active:o,size:l,view:f}){return t.jsx("nav",{children:t.jsx("ul",{className:[l,f].join(" "),children:r.map(m=>t.jsx(yt,{onClick:i,active:o,label:m.label,link:m.link},m.link))})})}const yt=({onClick:r,label:i,link:o,active:l})=>t.jsx("li",{"tabs-active":String(l===o),onClick:()=>r(o),children:i});_e.defaultProps={size:"M",view:"H"};const wt={Section:_t,Main:gt,Item:vt,Tabs:_e},$={h:"_h_1b5x7_1",t:"_t_1b5x7_10",s:"_s_1b5x7_28",u:"_u_1b5x7_37",o:"_o_1b5x7_44",l:"_l_1b5x7_53",hh:"_hh_1b5x7_60"},he=({title:r,children:i})=>t.jsxs("div",{className:$.h,children:[t.jsx("div",{className:$.t,children:r}),i]}),kt=({children:r,title:i})=>t.jsxs("div",{className:$.o,children:[i&&t.jsx("div",{className:$.hh,children:i}),r]}),jt=({children:r})=>t.jsx("div",{className:$.u,children:r}),ge=({children:r})=>t.jsx("div",{className:$.s,children:r}),be=({children:r,...i})=>t.jsx("div",{className:$.l,children:r}),zt={Header:he,Section:ge,List:be,U:jt,L:be,O:kt,S:ge,H:he},Ct={Send:Je,Error:Ge,Remark:Ke,Success:Ze,Copy:Xe},Et={Send:rt};g.Action=fe,g.Alert=Et,g.Browser=pt,g.Button=de,g.Component=zt,g.Init=ue,g.Modal=xe,g.Notice=Ct,g.Setting=wt,g.Tabs=pe,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "elcrm",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite --open --port 4101",