Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
omarihab99 committed Feb 8, 2025
1 parent 6d55e96 commit 60ed0b9
Show file tree
Hide file tree
Showing 83 changed files with 17,104 additions and 25,165 deletions.
27 changes: 0 additions & 27 deletions assets/Carousel.stories-CaVBRhlx.js

This file was deleted.

27 changes: 27 additions & 0 deletions assets/Carousel.stories-oWUIBMf1.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import{j as e}from"./jsx-runtime-CmIOflP4.js";import{c as u}from"./createLucideIcon-T_K6St1q.js";import"./index-KqYmeiyw.js";/**
* @license lucide-react v0.465.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const d=u("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
* @license lucide-react v0.465.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const g=u("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),o={FullHeight:"h-full",Circle:"rounded-full w-20 h-20"},p=({content:h,numberOfItems:b,buttonStyle:s})=>e.jsxs("div",{className:"relative w-auto h-full",children:[e.jsxs("div",{className:" flex justify-between w-full px-4 absolute top-32 transform z-10",children:[e.jsx("button",{className:` border-none bg-transparent text-black hover:text-white focus:text-white ${o[s]} focus:bg-gray-900 hover:bg-gray-900`,children:e.jsx(d,{className:"m-2"})}),e.jsx("button",{className:`bg-transparent border-none text-black hover:text-white focus:text-white ${o[s]} focus:bg-gray-900 hover:bg-gray-900`,children:e.jsx(g,{className:"m-2"})})]}),e.jsx("div",{className:"absolute top-0 left-0 right-0 -z-20",children:h})]}),j={component:p,tags:["autodocs"],title:"Carousel",argTypes:{content:{control:"object"},numberOfItems:{control:"number"},buttonStyle:{control:"select",options:["FullHeight","Circle"]}}},t={args:{content:[e.jsx("div",{children:e.jsx("img",{src:"https://placehold.co/2000x500",alt:""})})],numberOfItems:3,buttonStyle:"FullHeight"}},r={args:{content:[e.jsx("div",{children:e.jsx("img",{src:"https://placehold.co/2000x500",alt:""})})],numberOfItems:3,buttonStyle:"Circle"}};var n,c,l;t.parameters={...t.parameters,docs:{...(n=t.parameters)==null?void 0:n.docs,source:{originalSource:`{
args: {
content: [<div>
<img src="https://placehold.co/2000x500" alt="" />
</div>],
numberOfItems: 3,
buttonStyle: "FullHeight"
}
}`,...(l=(c=t.parameters)==null?void 0:c.docs)==null?void 0:l.source}}};var a,i,m;r.parameters={...r.parameters,docs:{...(a=r.parameters)==null?void 0:a.docs,source:{originalSource:`{
args: {
content: [<div>
<img src="https://placehold.co/2000x500" alt="" />
</div>],
numberOfItems: 3,
buttonStyle: "Circle"
}
}`,...(m=(i=r.parameters)==null?void 0:i.docs)==null?void 0:m.source}}};const y=["FullHeight","Circle"];export{r as Circle,t as FullHeight,y as __namedExportsOrder,j as default};
1 change: 1 addition & 0 deletions assets/Color-F6OSRLHC-VfQs7bey.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion assets/Color-F6OSRLHC-a6cU-cr7.js

This file was deleted.

Large diffs are not rendered by default.

30 changes: 0 additions & 30 deletions assets/IconButton.stories-B6bEsp0R.js

This file was deleted.

30 changes: 30 additions & 0 deletions assets/IconButton.stories-C8rX1f7D.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import{j as e}from"./jsx-runtime-CmIOflP4.js";import{R as v}from"./index-KqYmeiyw.js";import{c as C}from"./createLucideIcon-T_K6St1q.js";/**
* @license lucide-react v0.465.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const d=C("BellRing",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}],["path",{d:"M4 2C2.8 3.7 2 5.7 2 8",key:"tap9e0"}],["path",{d:"M22 8c0-2.3-.8-4.3-2-6",key:"5bb3ad"}]]);/**
* @license lucide-react v0.465.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const u=C("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),B=({defaultIcon:m,text:p,onClick:g,buttonStyle:I,textStyle:h,iconClickInterval:x,onClickIcon:f,isIconChangeOnClick:b})=>{const[c,t]=v.useState(!1),y=()=>{t(!c),setTimeout(()=>{t(!1)},x||3e3)};return e.jsxs("button",{onClick:j=>{y(),g(j)},className:"flex items-center gap-2 justify-evenly w-fit hover:bg-gray-100 hover:text-black border-2 border-black border-solid hover:border-black",style:I,children:[b&&c?f:m,e.jsx("p",{className:"font-mono text-lg",style:h,children:p})]})},S={component:B,tags:["autodocs"],title:"IconButton",argTypes:{defaultIcon:{control:"object"},text:{control:"text"},onClick:{control:"object"},isIconChangeOnClick:{control:"boolean"},onClickIcon:{control:"object"}}},n={args:{defaultIcon:e.jsx(d,{}),text:"Click",onClick:()=>{},isIconChangeOnClick:!0,onClickIcon:e.jsx(u,{})}},o={args:{defaultIcon:e.jsx(d,{}),text:"Click",onClick:()=>{alert("clicked")},isIconChangeOnClick:!0,onClickIcon:e.jsx(u,{}),iconClickInterval:1e3}};var r,s,a;n.parameters={...n.parameters,docs:{...(r=n.parameters)==null?void 0:r.docs,source:{originalSource:`{
args: {
defaultIcon: <BellRing />,
text: "Click",
onClick: () => {},
isIconChangeOnClick: true,
onClickIcon: <Check />
}
}`,...(a=(s=n.parameters)==null?void 0:s.docs)==null?void 0:a.source}}};var l,i,k;o.parameters={...o.parameters,docs:{...(l=o.parameters)==null?void 0:l.docs,source:{originalSource:`{
args: {
defaultIcon: <BellRing />,
text: "Click",
onClick: () => {
alert("clicked");
},
isIconChangeOnClick: true,
onClickIcon: <Check />,
iconClickInterval: 1000
}
}`,...(k=(i=o.parameters)==null?void 0:i.docs)==null?void 0:k.source}}};const q=["Primary","lessInterval"];export{n as Primary,q as __namedExportsOrder,S as default,o as lessInterval};
54 changes: 54 additions & 0 deletions assets/Notification.stories-CSKh10Vn.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import{j as e}from"./jsx-runtime-CmIOflP4.js";import{r as m}from"./index-KqYmeiyw.js";import{c as t}from"./createLucideIcon-T_K6St1q.js";/**
* @license lucide-react v0.465.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const E=t("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
* @license lucide-react v0.465.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const W=t("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
* @license lucide-react v0.465.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const C=t("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
* @license lucide-react v0.465.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const M=t("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
* @license lucide-react v0.465.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const R=t("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),A={Success:e.jsx(W,{}),Error:e.jsx(E,{}),Warning:e.jsx(M,{}),Info:e.jsx(C,{})},B={Success:"bg-green-500",Error:"bg-red-500",Warning:"bg-yellow-400",Info:"bg-blue-500"},N=({animation:b,message:S,notificationType:c,showIcon:T})=>{const[a,i]=m.useState(!1),j={FromRight:`${a?"translate-x-0 opacity-100":"translate-x-full opacity-0"}`,FromBottom:`${a?"translate-y-0 opacity-100":"translate-y-full opacity-0"}`,FadeIn:`${a?"opacity-100":"opacity-0"}`};return m.useEffect(()=>{i(!0);const F=setTimeout(()=>{i(!1)},3e3);return()=>clearTimeout(F)},[]),e.jsx("div",{className:"fixed top-5 right-5 z-50",children:e.jsxs("div",{className:` ${B[c]} transform transition-all duration-500 ease-out gap-9 rounded-md flex items-center justify-between px-4 py-2 lg:w-fit md:w-1/3 ml-auto h-auto ${j[b]}`,children:[T&&A[c],e.jsx("p",{className:"text-lg font-extrabold font-mono m-2 text-white p-2 text-wrap",children:S}),e.jsx("button",{className:"bg-transparent border-none w-fit h-fit p-0",onClick:()=>i(!1),children:e.jsx(R,{size:20,color:"white"})})]})})},O={component:N,tags:["autodocs"],title:"Notification",argTypes:{message:{control:"text"},notificationType:{control:"select",options:["Success","Error","Warning"]},animation:{control:"select",options:["FromRight","FromBottom","FadeIn"]},showIcon:{control:"boolean"},icon:{control:"object"}}},o={args:{notificationType:"Success",message:"Success",animation:"FromRight",showIcon:!0}},n={args:{notificationType:"Error",message:"Error",animation:"FromBottom",showIcon:!0}},r={args:{notificationType:"Warning",message:"Warning",animation:"FadeIn",showIcon:!0}},s={args:{notificationType:"Success",message:"This is a long message that will be not truncated to fit in the notification",animation:"FromRight",showIcon:!0}};var l,p,g;o.parameters={...o.parameters,docs:{...(l=o.parameters)==null?void 0:l.docs,source:{originalSource:`{
args: {
notificationType: "Success",
message: "Success",
animation: "FromRight",
showIcon: true
}
}`,...(g=(p=o.parameters)==null?void 0:p.docs)==null?void 0:g.source}}};var u,d,h;n.parameters={...n.parameters,docs:{...(u=n.parameters)==null?void 0:u.docs,source:{originalSource:`{
args: {
notificationType: "Error",
message: "Error",
animation: "FromBottom",
showIcon: true
}
}`,...(h=(d=n.parameters)==null?void 0:d.docs)==null?void 0:h.source}}};var f,y,x;r.parameters={...r.parameters,docs:{...(f=r.parameters)==null?void 0:f.docs,source:{originalSource:`{
args: {
notificationType: "Warning",
message: "Warning",
animation: "FadeIn",
showIcon: true
}
}`,...(x=(y=r.parameters)==null?void 0:y.docs)==null?void 0:x.source}}};var w,k,I;s.parameters={...s.parameters,docs:{...(w=s.parameters)==null?void 0:w.docs,source:{originalSource:`{
args: {
notificationType: "Success",
message: "This is a long message that will be not truncated to fit in the notification",
animation: "FromRight",
showIcon: true
}
}`,...(I=(k=s.parameters)==null?void 0:k.docs)==null?void 0:I.source}}};const q=["Success","Error","Warning","longMessage"];export{n as Error,o as Success,r as Warning,q as __namedExportsOrder,O as default,s as longMessage};
Loading

0 comments on commit 60ed0b9

Please sign in to comment.