@tnf-dev/mui 1.0.1-6 → 1.0.1-7
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/README.md +1 -1
- package/dist/cjs/components/inbox/index.cjs +1 -1
- package/dist/cjs/components/inbox/notification-item.cjs +1 -1
- package/dist/cjs/components/index.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/esm/components/inbox/index.js +1 -1
- package/dist/esm/components/inbox/notification-item.js +1 -1
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
"use client"
|
2
|
-
"use strict";var g=Object.defineProperty;var
|
2
|
+
"use strict";var g=Object.defineProperty;var H=Object.getOwnPropertyDescriptor;var A=Object.getOwnPropertyNames;var L=Object.prototype.hasOwnProperty;var M=(o,i)=>{for(var e in i)g(o,e,{get:i[e],enumerable:!0})},O=(o,i,e,n)=>{if(i&&typeof i=="object"||typeof i=="function")for(let p of A(i))!L.call(o,p)&&p!==e&&g(o,p,{get:()=>i[p],enumerable:!(n=H(i,p))||n.enumerable});return o};var W=o=>O(g({},"__esModule",{value:!0}),o);var X={};M(X,{default:()=>V});module.exports=W(X);var w=require("@tnf-dev/react");var c=require("@mui/icons-material"),m=require("@mui/material"),a=require("react/jsx-runtime"),q=({onClick:o,counts:i,ref:e,active:n})=>(0,a.jsx)(m.Badge,{badgeContent:i,color:"error",slotProps:{badge(){return{sx(){return{top:5}}}}},children:(0,a.jsx)(m.IconButton,{onClick:o,ref:e,component:"button",children:n?(0,a.jsx)(c.Notifications,{}):(0,a.jsx)(c.NotificationsOutlined,{})})}),x=q;var s=require("@mui/material"),P=require("@tnf-dev/react"),b=require("react"),h=require("react/jsx-runtime"),D=()=>{let{locale:o}=(0,b.use)(P.TeknifyContext);return(0,h.jsx)(s.Stack,{p:2,children:(0,h.jsx)(s.Typography,{textAlign:"center",children:o.components.Empty.noNotifications})})},N=D;var f=require("@mui/material"),u=require("react/jsx-runtime"),G=()=>(0,u.jsx)(f.Stack,{py:2,alignItems:"center",children:(0,u.jsx)(f.CircularProgress,{})}),S=G;var d=require("@mui/material"),T=require("@tnf-dev/react"),v=require("react"),C=require("react/jsx-runtime"),J=()=>{let{locale:o}=(0,v.use)(T.TeknifyContext);return(0,C.jsx)(d.Stack,{p:2,bgcolor:"white",justifyContent:"center",borderBottom:"1px solid #ddd",children:(0,C.jsx)(d.Typography,{fontWeight:600,children:o.components.NotificationHeader.notifications})})},B=J;var l=require("@mui/icons-material"),t=require("@mui/material"),I=require("@tnf-dev/react"),F=require("react"),r=require("react/jsx-runtime"),K=({notification:o})=>{let{locale:i}=(0,F.useContext)(I.TeknifyContext);return(0,r.jsxs)(t.Card,{sx:{p:1,m:1,position:"relative","& [data-id=actions]":{visibility:"hidden",opacity:0,transition:"0.3s"},":hover [data-id=actions]":{visibility:"visible",opacity:1}},children:[(0,r.jsx)(t.Stack,{children:(0,r.jsxs)(t.Stack,{direction:"row",spacing:2,children:[o.icon?(0,r.jsx)(t.Avatar,{src:o.icon,sx:{width:"36px",height:"36px"}}):(0,r.jsx)(t.Stack,{width:"36px",height:"36px",borderRadius:100,alignItems:"center",justifyContent:"center",bgcolor:"#ddd",children:(0,r.jsx)(l.Notifications,{fontSize:"small"})}),(0,r.jsxs)(t.Stack,{flex:1,children:[(0,r.jsx)(t.Typography,{fontSize:14,fontWeight:600,children:o.title}),(0,r.jsx)(t.Typography,{fontSize:14,color:"textSecondary",children:o.message})]}),(0,r.jsx)(t.Stack,{children:!o.isRead&&(0,r.jsx)(t.Box,{width:10,height:10,bgcolor:"red",borderRadius:100,border:"2px solid #ddd"})})]})}),(0,r.jsx)(t.Stack,{position:"absolute",top:2,right:2,"data-id":"actions",p:1,spacing:1,bgcolor:"Background",children:!o.isRead&&(0,r.jsx)(t.Tooltip,{title:i.components.NotificationItem.markAsRead,children:(0,r.jsx)(t.IconButton,{size:"small",onClick:o.markAsRead,children:(0,r.jsx)(l.ChecklistOutlined,{fontSize:"small"})})})})]})},E=K;var y=require("@mui/material"),k=require("react/jsx-runtime"),Q=({anchorElement:o,children:i,onClose:e,open:n})=>(0,k.jsx)(y.Popover,{open:!!n,anchorEl:o,onClose:e,anchorOrigin:{horizontal:"center",vertical:"bottom"},anchorReference:"anchorEl",children:(0,k.jsx)(y.Box,{height:500,width:400,bgcolor:"#fafafa",children:i})}),R=Q;var z=require("react/jsx-runtime"),U=()=>(0,z.jsx)(w.TeknifyInbox,{components:{Bell:x,NotificationHeader:B,NotificationPopover:R,NotificationItem:E,Loader:S,Empty:N}}),V=U;
|
@@ -1,2 +1,2 @@
|
|
1
1
|
"use client"
|
2
|
-
"use strict";var
|
2
|
+
"use strict";var d=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var g=(i,e)=>{for(var r in e)d(i,r,{get:e[r],enumerable:!0})},k=(i,e,r,c)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of m(e))!h.call(i,a)&&a!==r&&d(i,a,{get:()=>e[a],enumerable:!(c=l(e,a))||c.enumerable});return i};var y=i=>k(d({},"__esModule",{value:!0}),i);var S={};g(S,{default:()=>x});module.exports=y(S);var s=require("@mui/icons-material"),t=require("@mui/material"),n=require("@tnf-dev/react"),p=require("react"),o=require("react/jsx-runtime"),f=({notification:i})=>{let{locale:e}=(0,p.useContext)(n.TeknifyContext);return(0,o.jsxs)(t.Card,{sx:{p:1,m:1,position:"relative","& [data-id=actions]":{visibility:"hidden",opacity:0,transition:"0.3s"},":hover [data-id=actions]":{visibility:"visible",opacity:1}},children:[(0,o.jsx)(t.Stack,{children:(0,o.jsxs)(t.Stack,{direction:"row",spacing:2,children:[i.icon?(0,o.jsx)(t.Avatar,{src:i.icon,sx:{width:"36px",height:"36px"}}):(0,o.jsx)(t.Stack,{width:"36px",height:"36px",borderRadius:100,alignItems:"center",justifyContent:"center",bgcolor:"#ddd",children:(0,o.jsx)(s.Notifications,{fontSize:"small"})}),(0,o.jsxs)(t.Stack,{flex:1,children:[(0,o.jsx)(t.Typography,{fontSize:14,fontWeight:600,children:i.title}),(0,o.jsx)(t.Typography,{fontSize:14,color:"textSecondary",children:i.message})]}),(0,o.jsx)(t.Stack,{children:!i.isRead&&(0,o.jsx)(t.Box,{width:10,height:10,bgcolor:"red",borderRadius:100,border:"2px solid #ddd"})})]})}),(0,o.jsx)(t.Stack,{position:"absolute",top:2,right:2,"data-id":"actions",p:1,spacing:1,bgcolor:"Background",children:!i.isRead&&(0,o.jsx)(t.Tooltip,{title:e.components.NotificationItem.markAsRead,children:(0,o.jsx)(t.IconButton,{size:"small",onClick:i.markAsRead,children:(0,o.jsx)(s.ChecklistOutlined,{fontSize:"small"})})})})]})},x=f;
|
@@ -1,2 +1,2 @@
|
|
1
1
|
"use client"
|
2
|
-
"use strict";var g=Object.defineProperty;var
|
2
|
+
"use strict";var g=Object.defineProperty;var A=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames;var M=Object.prototype.hasOwnProperty;var O=(o,i)=>{for(var e in i)g(o,e,{get:i[e],enumerable:!0})},W=(o,i,e,n)=>{if(i&&typeof i=="object"||typeof i=="function")for(let p of L(i))!M.call(o,p)&&p!==e&&g(o,p,{get:()=>i[p],enumerable:!(n=A(i,p))||n.enumerable});return o};var q=o=>W(g({},"__esModule",{value:!0}),o);var X={};O(X,{TeknifyMuiInbox:()=>z});module.exports=q(X);var w=require("@tnf-dev/react");var c=require("@mui/icons-material"),m=require("@mui/material"),a=require("react/jsx-runtime"),D=({onClick:o,counts:i,ref:e,active:n})=>(0,a.jsx)(m.Badge,{badgeContent:i,color:"error",slotProps:{badge(){return{sx(){return{top:5}}}}},children:(0,a.jsx)(m.IconButton,{onClick:o,ref:e,component:"button",children:n?(0,a.jsx)(c.Notifications,{}):(0,a.jsx)(c.NotificationsOutlined,{})})}),x=D;var f=require("@mui/material"),b=require("@tnf-dev/react"),P=require("react"),h=require("react/jsx-runtime"),G=()=>{let{locale:o}=(0,P.use)(b.TeknifyContext);return(0,h.jsx)(f.Stack,{p:2,children:(0,h.jsx)(f.Typography,{textAlign:"center",children:o.components.Empty.noNotifications})})},N=G;var s=require("@mui/material"),u=require("react/jsx-runtime"),J=()=>(0,u.jsx)(s.Stack,{py:2,alignItems:"center",children:(0,u.jsx)(s.CircularProgress,{})}),S=J;var d=require("@mui/material"),T=require("@tnf-dev/react"),I=require("react"),C=require("react/jsx-runtime"),K=()=>{let{locale:o}=(0,I.use)(T.TeknifyContext);return(0,C.jsx)(d.Stack,{p:2,bgcolor:"white",justifyContent:"center",borderBottom:"1px solid #ddd",children:(0,C.jsx)(d.Typography,{fontWeight:600,children:o.components.NotificationHeader.notifications})})},v=K;var l=require("@mui/icons-material"),t=require("@mui/material"),B=require("@tnf-dev/react"),F=require("react"),r=require("react/jsx-runtime"),Q=({notification:o})=>{let{locale:i}=(0,F.useContext)(B.TeknifyContext);return(0,r.jsxs)(t.Card,{sx:{p:1,m:1,position:"relative","& [data-id=actions]":{visibility:"hidden",opacity:0,transition:"0.3s"},":hover [data-id=actions]":{visibility:"visible",opacity:1}},children:[(0,r.jsx)(t.Stack,{children:(0,r.jsxs)(t.Stack,{direction:"row",spacing:2,children:[o.icon?(0,r.jsx)(t.Avatar,{src:o.icon,sx:{width:"36px",height:"36px"}}):(0,r.jsx)(t.Stack,{width:"36px",height:"36px",borderRadius:100,alignItems:"center",justifyContent:"center",bgcolor:"#ddd",children:(0,r.jsx)(l.Notifications,{fontSize:"small"})}),(0,r.jsxs)(t.Stack,{flex:1,children:[(0,r.jsx)(t.Typography,{fontSize:14,fontWeight:600,children:o.title}),(0,r.jsx)(t.Typography,{fontSize:14,color:"textSecondary",children:o.message})]}),(0,r.jsx)(t.Stack,{children:!o.isRead&&(0,r.jsx)(t.Box,{width:10,height:10,bgcolor:"red",borderRadius:100,border:"2px solid #ddd"})})]})}),(0,r.jsx)(t.Stack,{position:"absolute",top:2,right:2,"data-id":"actions",p:1,spacing:1,bgcolor:"Background",children:!o.isRead&&(0,r.jsx)(t.Tooltip,{title:i.components.NotificationItem.markAsRead,children:(0,r.jsx)(t.IconButton,{size:"small",onClick:o.markAsRead,children:(0,r.jsx)(l.ChecklistOutlined,{fontSize:"small"})})})})]})},E=Q;var y=require("@mui/material"),k=require("react/jsx-runtime"),U=({anchorElement:o,children:i,onClose:e,open:n})=>(0,k.jsx)(y.Popover,{open:!!n,anchorEl:o,onClose:e,anchorOrigin:{horizontal:"center",vertical:"bottom"},anchorReference:"anchorEl",children:(0,k.jsx)(y.Box,{height:500,width:400,bgcolor:"#fafafa",children:i})}),R=U;var H=require("react/jsx-runtime"),V=()=>(0,H.jsx)(w.TeknifyInbox,{components:{Bell:x,NotificationHeader:v,NotificationPopover:R,NotificationItem:E,Loader:S,Empty:N}}),z=V;0&&(module.exports={TeknifyMuiInbox});
|
package/dist/cjs/index.cjs
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
"use client"
|
2
|
-
"use strict";var g=Object.defineProperty;var
|
2
|
+
"use strict";var g=Object.defineProperty;var A=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames;var M=Object.prototype.hasOwnProperty;var O=(o,i)=>{for(var e in i)g(o,e,{get:i[e],enumerable:!0})},W=(o,i,e,n)=>{if(i&&typeof i=="object"||typeof i=="function")for(let p of L(i))!M.call(o,p)&&p!==e&&g(o,p,{get:()=>i[p],enumerable:!(n=A(i,p))||n.enumerable});return o};var q=o=>W(g({},"__esModule",{value:!0}),o);var X={};O(X,{TeknifyMuiInbox:()=>z});module.exports=q(X);var w=require("@tnf-dev/react");var c=require("@mui/icons-material"),m=require("@mui/material"),a=require("react/jsx-runtime"),D=({onClick:o,counts:i,ref:e,active:n})=>(0,a.jsx)(m.Badge,{badgeContent:i,color:"error",slotProps:{badge(){return{sx(){return{top:5}}}}},children:(0,a.jsx)(m.IconButton,{onClick:o,ref:e,component:"button",children:n?(0,a.jsx)(c.Notifications,{}):(0,a.jsx)(c.NotificationsOutlined,{})})}),x=D;var f=require("@mui/material"),b=require("@tnf-dev/react"),P=require("react"),h=require("react/jsx-runtime"),G=()=>{let{locale:o}=(0,P.use)(b.TeknifyContext);return(0,h.jsx)(f.Stack,{p:2,children:(0,h.jsx)(f.Typography,{textAlign:"center",children:o.components.Empty.noNotifications})})},N=G;var s=require("@mui/material"),u=require("react/jsx-runtime"),J=()=>(0,u.jsx)(s.Stack,{py:2,alignItems:"center",children:(0,u.jsx)(s.CircularProgress,{})}),S=J;var d=require("@mui/material"),T=require("@tnf-dev/react"),I=require("react"),C=require("react/jsx-runtime"),K=()=>{let{locale:o}=(0,I.use)(T.TeknifyContext);return(0,C.jsx)(d.Stack,{p:2,bgcolor:"white",justifyContent:"center",borderBottom:"1px solid #ddd",children:(0,C.jsx)(d.Typography,{fontWeight:600,children:o.components.NotificationHeader.notifications})})},v=K;var l=require("@mui/icons-material"),t=require("@mui/material"),B=require("@tnf-dev/react"),F=require("react"),r=require("react/jsx-runtime"),Q=({notification:o})=>{let{locale:i}=(0,F.useContext)(B.TeknifyContext);return(0,r.jsxs)(t.Card,{sx:{p:1,m:1,position:"relative","& [data-id=actions]":{visibility:"hidden",opacity:0,transition:"0.3s"},":hover [data-id=actions]":{visibility:"visible",opacity:1}},children:[(0,r.jsx)(t.Stack,{children:(0,r.jsxs)(t.Stack,{direction:"row",spacing:2,children:[o.icon?(0,r.jsx)(t.Avatar,{src:o.icon,sx:{width:"36px",height:"36px"}}):(0,r.jsx)(t.Stack,{width:"36px",height:"36px",borderRadius:100,alignItems:"center",justifyContent:"center",bgcolor:"#ddd",children:(0,r.jsx)(l.Notifications,{fontSize:"small"})}),(0,r.jsxs)(t.Stack,{flex:1,children:[(0,r.jsx)(t.Typography,{fontSize:14,fontWeight:600,children:o.title}),(0,r.jsx)(t.Typography,{fontSize:14,color:"textSecondary",children:o.message})]}),(0,r.jsx)(t.Stack,{children:!o.isRead&&(0,r.jsx)(t.Box,{width:10,height:10,bgcolor:"red",borderRadius:100,border:"2px solid #ddd"})})]})}),(0,r.jsx)(t.Stack,{position:"absolute",top:2,right:2,"data-id":"actions",p:1,spacing:1,bgcolor:"Background",children:!o.isRead&&(0,r.jsx)(t.Tooltip,{title:i.components.NotificationItem.markAsRead,children:(0,r.jsx)(t.IconButton,{size:"small",onClick:o.markAsRead,children:(0,r.jsx)(l.ChecklistOutlined,{fontSize:"small"})})})})]})},E=Q;var y=require("@mui/material"),k=require("react/jsx-runtime"),U=({anchorElement:o,children:i,onClose:e,open:n})=>(0,k.jsx)(y.Popover,{open:!!n,anchorEl:o,onClose:e,anchorOrigin:{horizontal:"center",vertical:"bottom"},anchorReference:"anchorEl",children:(0,k.jsx)(y.Box,{height:500,width:400,bgcolor:"#fafafa",children:i})}),R=U;var H=require("react/jsx-runtime"),V=()=>(0,H.jsx)(w.TeknifyInbox,{components:{Bell:x,NotificationHeader:v,NotificationPopover:R,NotificationItem:E,Loader:S,Empty:N}}),z=V;0&&(module.exports={TeknifyMuiInbox});
|
@@ -1,2 +1,2 @@
|
|
1
1
|
"use client"
|
2
|
-
import{TeknifyInbox as
|
2
|
+
import{TeknifyInbox as Z}from"@tnf-dev/react";import{Notifications as k,NotificationsOutlined as x}from"@mui/icons-material";import{Badge as P,IconButton as b}from"@mui/material";import{jsx as e}from"react/jsx-runtime";var N=({onClick:o,counts:i,ref:n,active:p})=>e(P,{badgeContent:i,color:"error",slotProps:{badge(){return{sx(){return{top:5}}}}},children:e(b,{onClick:o,ref:n,component:"button",children:p?e(k,{}):e(x,{})})}),c=N;import{Stack as S,Typography as T}from"@mui/material";import{TeknifyContext as v}from"@tnf-dev/react";import{use as B}from"react";import{jsx as m}from"react/jsx-runtime";var I=()=>{let{locale:o}=B(v);return m(S,{p:2,children:m(T,{textAlign:"center",children:o.components.Empty.noNotifications})})},s=I;import{CircularProgress as F,Stack as E}from"@mui/material";import{jsx as f}from"react/jsx-runtime";var R=()=>f(E,{py:2,alignItems:"center",children:f(F,{})}),d=R;import{Stack as w,Typography as z}from"@mui/material";import{TeknifyContext as H}from"@tnf-dev/react";import{use as A}from"react";import{jsx as l}from"react/jsx-runtime";var L=()=>{let{locale:o}=A(H);return l(w,{p:2,bgcolor:"white",justifyContent:"center",borderBottom:"1px solid #ddd",children:l(z,{fontWeight:600,children:o.components.NotificationHeader.notifications})})},y=L;import{ChecklistOutlined as M,Notifications as O}from"@mui/icons-material";import{Avatar as W,Box as q,Card as D,IconButton as G,Stack as r,Tooltip as J,Typography as g}from"@mui/material";import{TeknifyContext as K}from"@tnf-dev/react";import{useContext as Q}from"react";import{jsx as t,jsxs as a}from"react/jsx-runtime";var U=({notification:o})=>{let{locale:i}=Q(K);return a(D,{sx:{p:1,m:1,position:"relative","& [data-id=actions]":{visibility:"hidden",opacity:0,transition:"0.3s"},":hover [data-id=actions]":{visibility:"visible",opacity:1}},children:[t(r,{children:a(r,{direction:"row",spacing:2,children:[o.icon?t(W,{src:o.icon,sx:{width:"36px",height:"36px"}}):t(r,{width:"36px",height:"36px",borderRadius:100,alignItems:"center",justifyContent:"center",bgcolor:"#ddd",children:t(O,{fontSize:"small"})}),a(r,{flex:1,children:[t(g,{fontSize:14,fontWeight:600,children:o.title}),t(g,{fontSize:14,color:"textSecondary",children:o.message})]}),t(r,{children:!o.isRead&&t(q,{width:10,height:10,bgcolor:"red",borderRadius:100,border:"2px solid #ddd"})})]})}),t(r,{position:"absolute",top:2,right:2,"data-id":"actions",p:1,spacing:1,bgcolor:"Background",children:!o.isRead&&t(J,{title:i.components.NotificationItem.markAsRead,children:t(G,{size:"small",onClick:o.markAsRead,children:t(M,{fontSize:"small"})})})})]})},h=U;import{Box as V,Popover as X}from"@mui/material";import{jsx as u}from"react/jsx-runtime";var Y=({anchorElement:o,children:i,onClose:n,open:p})=>u(X,{open:!!p,anchorEl:o,onClose:n,anchorOrigin:{horizontal:"center",vertical:"bottom"},anchorReference:"anchorEl",children:u(V,{height:500,width:400,bgcolor:"#fafafa",children:i})}),C=Y;import{jsx as $}from"react/jsx-runtime";var _=()=>$(Z,{components:{Bell:c,NotificationHeader:y,NotificationPopover:C,NotificationItem:h,Loader:d,Empty:s}}),Wo=_;export{Wo as default};
|
@@ -1,2 +1,2 @@
|
|
1
1
|
"use client"
|
2
|
-
import{ChecklistOutlined as
|
2
|
+
import{ChecklistOutlined as s,Notifications as d}from"@mui/icons-material";import{Avatar as c,Box as n,Card as p,IconButton as l,Stack as i,Tooltip as m,Typography as a}from"@mui/material";import{TeknifyContext as h}from"@tnf-dev/react";import{useContext as g}from"react";import{jsx as t,jsxs as e}from"react/jsx-runtime";var k=({notification:o})=>{let{locale:r}=g(h);return e(p,{sx:{p:1,m:1,position:"relative","& [data-id=actions]":{visibility:"hidden",opacity:0,transition:"0.3s"},":hover [data-id=actions]":{visibility:"visible",opacity:1}},children:[t(i,{children:e(i,{direction:"row",spacing:2,children:[o.icon?t(c,{src:o.icon,sx:{width:"36px",height:"36px"}}):t(i,{width:"36px",height:"36px",borderRadius:100,alignItems:"center",justifyContent:"center",bgcolor:"#ddd",children:t(d,{fontSize:"small"})}),e(i,{flex:1,children:[t(a,{fontSize:14,fontWeight:600,children:o.title}),t(a,{fontSize:14,color:"textSecondary",children:o.message})]}),t(i,{children:!o.isRead&&t(n,{width:10,height:10,bgcolor:"red",borderRadius:100,border:"2px solid #ddd"})})]})}),t(i,{position:"absolute",top:2,right:2,"data-id":"actions",p:1,spacing:1,bgcolor:"Background",children:!o.isRead&&t(m,{title:r.components.NotificationItem.markAsRead,children:t(l,{size:"small",onClick:o.markAsRead,children:t(s,{fontSize:"small"})})})})]})},C=k;export{C as default};
|
@@ -1,2 +1,2 @@
|
|
1
1
|
"use client"
|
2
|
-
import{TeknifyInbox as
|
2
|
+
import{TeknifyInbox as Z}from"@tnf-dev/react";import{Notifications as k,NotificationsOutlined as x}from"@mui/icons-material";import{Badge as b,IconButton as P}from"@mui/material";import{jsx as e}from"react/jsx-runtime";var N=({onClick:o,counts:i,ref:n,active:p})=>e(b,{badgeContent:i,color:"error",slotProps:{badge(){return{sx(){return{top:5}}}}},children:e(P,{onClick:o,ref:n,component:"button",children:p?e(k,{}):e(x,{})})}),c=N;import{Stack as S,Typography as T}from"@mui/material";import{TeknifyContext as I}from"@tnf-dev/react";import{use as v}from"react";import{jsx as m}from"react/jsx-runtime";var B=()=>{let{locale:o}=v(I);return m(S,{p:2,children:m(T,{textAlign:"center",children:o.components.Empty.noNotifications})})},f=B;import{CircularProgress as F,Stack as E}from"@mui/material";import{jsx as s}from"react/jsx-runtime";var R=()=>s(E,{py:2,alignItems:"center",children:s(F,{})}),d=R;import{Stack as w,Typography as z}from"@mui/material";import{TeknifyContext as H}from"@tnf-dev/react";import{use as A}from"react";import{jsx as l}from"react/jsx-runtime";var L=()=>{let{locale:o}=A(H);return l(w,{p:2,bgcolor:"white",justifyContent:"center",borderBottom:"1px solid #ddd",children:l(z,{fontWeight:600,children:o.components.NotificationHeader.notifications})})},y=L;import{ChecklistOutlined as M,Notifications as O}from"@mui/icons-material";import{Avatar as W,Box as q,Card as D,IconButton as G,Stack as r,Tooltip as J,Typography as g}from"@mui/material";import{TeknifyContext as K}from"@tnf-dev/react";import{useContext as Q}from"react";import{jsx as t,jsxs as a}from"react/jsx-runtime";var U=({notification:o})=>{let{locale:i}=Q(K);return a(D,{sx:{p:1,m:1,position:"relative","& [data-id=actions]":{visibility:"hidden",opacity:0,transition:"0.3s"},":hover [data-id=actions]":{visibility:"visible",opacity:1}},children:[t(r,{children:a(r,{direction:"row",spacing:2,children:[o.icon?t(W,{src:o.icon,sx:{width:"36px",height:"36px"}}):t(r,{width:"36px",height:"36px",borderRadius:100,alignItems:"center",justifyContent:"center",bgcolor:"#ddd",children:t(O,{fontSize:"small"})}),a(r,{flex:1,children:[t(g,{fontSize:14,fontWeight:600,children:o.title}),t(g,{fontSize:14,color:"textSecondary",children:o.message})]}),t(r,{children:!o.isRead&&t(q,{width:10,height:10,bgcolor:"red",borderRadius:100,border:"2px solid #ddd"})})]})}),t(r,{position:"absolute",top:2,right:2,"data-id":"actions",p:1,spacing:1,bgcolor:"Background",children:!o.isRead&&t(J,{title:i.components.NotificationItem.markAsRead,children:t(G,{size:"small",onClick:o.markAsRead,children:t(M,{fontSize:"small"})})})})]})},h=U;import{Box as V,Popover as X}from"@mui/material";import{jsx as u}from"react/jsx-runtime";var Y=({anchorElement:o,children:i,onClose:n,open:p})=>u(X,{open:!!p,anchorEl:o,onClose:n,anchorOrigin:{horizontal:"center",vertical:"bottom"},anchorReference:"anchorEl",children:u(V,{height:500,width:400,bgcolor:"#fafafa",children:i})}),C=Y;import{jsx as j}from"react/jsx-runtime";var _=()=>j(Z,{components:{Bell:c,NotificationHeader:y,NotificationPopover:C,NotificationItem:h,Loader:d,Empty:f}}),$=_;export{$ as TeknifyMuiInbox};
|
package/dist/esm/index.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
"use client"
|
2
|
-
import{TeknifyInbox as
|
2
|
+
import{TeknifyInbox as Z}from"@tnf-dev/react";import{Notifications as k,NotificationsOutlined as x}from"@mui/icons-material";import{Badge as b,IconButton as P}from"@mui/material";import{jsx as e}from"react/jsx-runtime";var N=({onClick:o,counts:i,ref:n,active:p})=>e(b,{badgeContent:i,color:"error",slotProps:{badge(){return{sx(){return{top:5}}}}},children:e(P,{onClick:o,ref:n,component:"button",children:p?e(k,{}):e(x,{})})}),c=N;import{Stack as S,Typography as T}from"@mui/material";import{TeknifyContext as I}from"@tnf-dev/react";import{use as v}from"react";import{jsx as m}from"react/jsx-runtime";var B=()=>{let{locale:o}=v(I);return m(S,{p:2,children:m(T,{textAlign:"center",children:o.components.Empty.noNotifications})})},f=B;import{CircularProgress as F,Stack as E}from"@mui/material";import{jsx as s}from"react/jsx-runtime";var R=()=>s(E,{py:2,alignItems:"center",children:s(F,{})}),d=R;import{Stack as w,Typography as z}from"@mui/material";import{TeknifyContext as H}from"@tnf-dev/react";import{use as A}from"react";import{jsx as l}from"react/jsx-runtime";var L=()=>{let{locale:o}=A(H);return l(w,{p:2,bgcolor:"white",justifyContent:"center",borderBottom:"1px solid #ddd",children:l(z,{fontWeight:600,children:o.components.NotificationHeader.notifications})})},y=L;import{ChecklistOutlined as M,Notifications as O}from"@mui/icons-material";import{Avatar as W,Box as q,Card as D,IconButton as G,Stack as r,Tooltip as J,Typography as g}from"@mui/material";import{TeknifyContext as K}from"@tnf-dev/react";import{useContext as Q}from"react";import{jsx as t,jsxs as a}from"react/jsx-runtime";var U=({notification:o})=>{let{locale:i}=Q(K);return a(D,{sx:{p:1,m:1,position:"relative","& [data-id=actions]":{visibility:"hidden",opacity:0,transition:"0.3s"},":hover [data-id=actions]":{visibility:"visible",opacity:1}},children:[t(r,{children:a(r,{direction:"row",spacing:2,children:[o.icon?t(W,{src:o.icon,sx:{width:"36px",height:"36px"}}):t(r,{width:"36px",height:"36px",borderRadius:100,alignItems:"center",justifyContent:"center",bgcolor:"#ddd",children:t(O,{fontSize:"small"})}),a(r,{flex:1,children:[t(g,{fontSize:14,fontWeight:600,children:o.title}),t(g,{fontSize:14,color:"textSecondary",children:o.message})]}),t(r,{children:!o.isRead&&t(q,{width:10,height:10,bgcolor:"red",borderRadius:100,border:"2px solid #ddd"})})]})}),t(r,{position:"absolute",top:2,right:2,"data-id":"actions",p:1,spacing:1,bgcolor:"Background",children:!o.isRead&&t(J,{title:i.components.NotificationItem.markAsRead,children:t(G,{size:"small",onClick:o.markAsRead,children:t(M,{fontSize:"small"})})})})]})},h=U;import{Box as V,Popover as X}from"@mui/material";import{jsx as u}from"react/jsx-runtime";var Y=({anchorElement:o,children:i,onClose:n,open:p})=>u(X,{open:!!p,anchorEl:o,onClose:n,anchorOrigin:{horizontal:"center",vertical:"bottom"},anchorReference:"anchorEl",children:u(V,{height:500,width:400,bgcolor:"#fafafa",children:i})}),C=Y;import{jsx as j}from"react/jsx-runtime";var _=()=>j(Z,{components:{Bell:c,NotificationHeader:y,NotificationPopover:C,NotificationItem:h,Loader:d,Empty:f}}),$=_;export{$ as TeknifyMuiInbox};
|
package/package.json
CHANGED