alope-ui 1.2.24 → 1.2.25
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/main.cjs +1 -1
- package/dist/main.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/main.cjs
CHANGED
|
@@ -33,7 +33,7 @@ return e.jsxs("div",{className:a.cn("border border-gray-300 dark:border-white/20
|
|
|
33
33
|
p?n?.(o?a[0]??null:a):b(a)})(t),className:"w-full flex justify-between items-center p-4 text-left dark:text-white",children:[e.jsx("span",{className:a.cn("font-semibold",i),children:r.label}),"function"==typeof l?l(s):l??e.jsx("svg",{className:a.cn("w-5 h-5 transition-transform",s&&"rotate-180"),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",children:e.jsx("path",{d:"M19 9l-7 7-7-7",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})]}),e.jsx("div",{className:a.cn("overflow-hidden bg-gray-50 px-4 transition-all dark:bg-gray-700 dark:text-white",s?"max-h-40 py-4":"max-h-0",m),children:r.description})]},t)})})},exports.Alert=({title:t,description:s,icon:d,titleClassName:i,descriptionClassName:c,action:m,withClose:u=!1,iconColor:p="secondary",type:x="secondary",variant:b="outline"})=>{const[g,h]=r.useState(!0)
|
|
34
34
|
return g?e.jsxs("div",{id:"alopeAlert",className:a.cn("flex gap-2 p-4 rounded-md w-full",l[x],o[b]),children:[d??e.jsx("svg",{viewBox:"0 0 24 24",className:a.cn("w-6 h-6",n[p]),children:e.jsx("path",{d:"M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM11 15H13V17H11V15ZM11 7H13V13H11V7Z"})}),e.jsxs("div",{className:"flex md:flex-row flex-col justify-between md:items-center w-full",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("p",{className:a.cn("font-medium",i),children:t}),s&&e.jsx("p",{className:a.cn("text-sm",c),children:s}),u&&("function"==typeof m?e.jsx("div",{className:"mt-2",children:m()}):e.jsx("div",{className:"mt-2",children:m}))]}),e.jsx("div",{children:!u&&("function"==typeof m?e.jsx("div",{className:"mt-2",children:m()}):e.jsx("div",{className:"mt-2",children:m}))})]}),u&&e.jsx("svg",{onClick:()=>h(!1),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",className:"w-7 h-7 hover:cursor-pointer",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})]}):null},exports.Avatar=u,exports.AvatarGroup=({avatars:r,maxVisible:t=3,size:s="md",overlap:o="-ml-3",className:n})=>{const l=r.slice(0,t),d=r.length-t
|
|
35
35
|
return e.jsxs("div",{className:a.cn("flex items-center",n),children:[l.map((r,t)=>e.jsx("div",{className:a.cn(0!==t&&o),children:e.jsx(u,{...r,size:s})},t)),d>0&&e.jsxs("div",{className:a.cn("flex items-center justify-center bg-secondary dark:bg-secondary-dark font-medium",o,"sm"===s&&"w-8 h-8 text-xs rounded-full","md"===s&&"w-12 h-12 text-sm rounded-full","lg"===s&&"w-16 h-16 text-base rounded-full"),children:["+",d]})]})},exports.Badge=({children:r,variant:t="default",position:s="top-right",isAbsolute:o=!1,className:n,icon:l})=>{const d=p[t],i=o?x[s]:""
|
|
36
|
-
return e.jsxs("span",{className:a.cn("inline-flex items-center px-3 py-1 rounded-full text-sm font-semibold",d,i,n),children:[l&&e.jsx("span",{className:"mr-1",children:l}),r]})},exports.BottomNavbar=({children:a,className:t,value:s,onChangeValue:o})=>e.jsx("div",{className:`fixed bottom-0 left-0 z-50 w-full bg-white border-t border-secondary dark:bg-gray-800 dark:border-secondary-dark-700 ${t??""}`,children:e.jsx("div",{className:"flex items-center justify-center h-full max-w-lg md:max-w-md mx-auto font-medium",children:r.Children.map(a,e=>r.isValidElement(e)&&e.type===b?r.cloneElement(e,{selectedValue:s,onChangeValue:o}):(process.env.NODE_ENV,null))})}),exports.BottomNavbarAction=b,exports.Breadcrumb=({data:r,variant:s="primary",separator:o="/"})=>e.jsx("nav",{"aria-label":"breadcrumb",children:e.jsx("ol",{className:"flex flex-wrap items-center gap-2 text-sm",children:r.map((n,l)=>{const d=null===n.path||l===r.length-1
|
|
36
|
+
return e.jsxs("span",{className:a.cn("inline-flex items-center px-3 py-1 rounded-full text-sm font-semibold",d,i,n),children:[l&&e.jsx("span",{className:"mr-1",children:l}),r]})},exports.BottomNavbar=({children:a,className:t,value:s,onChangeValue:o})=>e.jsx("div",{className:`fixed bottom-0 left-0 z-50 w-full bg-white border-t border-secondary dark:bg-gray-800 dark:border-secondary-dark-700 ${t??""}`,children:e.jsx("div",{className:"flex items-center justify-center h-full max-w-lg md:max-w-md mx-auto font-medium",children:r.Children.map(a,e=>r.isValidElement(e)&&e.type===b?r.cloneElement(e,{selectedValue:s,onChangeValue:o}):(process.env.NODE_ENV,null))})}),exports.BottomNavbarAction=b,exports.Breadcrumb=({data:r,variant:s="primary",separator:o="/"})=>e.jsx("nav",{"aria-label":"breadcrumb mb-5",children:e.jsx("ol",{className:"flex flex-wrap items-center gap-2 text-sm",children:r.map((n,l)=>{const d=null===n.path||l===r.length-1
|
|
37
37
|
return e.jsxs("li",{className:"flex items-center",children:[d?e.jsxs("span",{"aria-current":"page",className:a.cn("flex items-center font-medium",g[s]),children:[n.icon&&e.jsx("span",{className:"mr-1.5",children:n.icon}),n.label]}):n.path?e.jsxs(t.Link,{to:n.path,className:"flex items-center text-zinc-400 transition-colors hover:text-zinc-700 dark:text-zinc-500 dark:hover:text-zinc-300",children:[n.icon&&e.jsx("span",{className:"mr-1.5",children:n.icon}),n.label]}):e.jsxs("span",{className:"flex items-center text-zinc-400 dark:text-zinc-500",children:[n.icon&&e.jsx("span",{className:"mr-1.5",children:n.icon}),n.label]}),!d&&e.jsx("span",{"aria-hidden":"true",className:"ml-2 select-none text-zinc-300 dark:text-zinc-700",children:o})]},l)})})}),exports.Button=({children:r,onClick:s,size:o="md",to:n,type:l="button",disabled:d=!1,variant:i="solid",variantType:c="primary",borderType:m="regular",fullWidth:u=!1,prefixIcon:p,suffixIcon:x,className:b})=>{const g=k[m],f=y(i,c),w=h[o]||"",v=d?"opacity-50 cursor-not-allowed":"cursor-pointer",N=u?"w-full":""
|
|
38
38
|
return n?e.jsxs(t.Link,{to:n,className:a.cn("inline-flex items-center justify-center transition-all duration-[170ms] hover:scale-[98%]",f,w,v,N,g,b),children:[p&&e.jsx("span",{className:"mr-2",children:p}),r,x&&e.jsx("span",{className:"ml-2",children:x})]}):e.jsxs("button",{disabled:d,type:l,onClick:s,className:a.cn("inline-flex items-center justify-center transition-all duration-[170ms] hover:scale-[98%]",f,w,v,N,g,b),children:[p&&e.jsx("span",{className:"mr-2",children:p}),r,x&&e.jsx("span",{className:"ml-2",children:x})]})},exports.ButtonVariantsMap=f,exports.Card=({title:r,description:t,image:s,onClick:o,footer:n,horizontal:l=!1,size:d="md",containerClassName:i,descriptionClassName:c,imageClassName:m,titleClassName:u,ribbonClassName:p,ribbon:x,children:b})=>e.jsx("div",{onClick:o,className:a.cn("relative bg-white rounded-xl shadow-lg hover:shadow-xl transition-shadow duration-300 cursor-pointer overflow-hidden dark:border dark:bg-gray-800 dark:border-gray-700",l?"flex flex-col md:flex-row":"flex flex-col",{sm:"max-w-xs",md:"max-w-sm",lg:"max-w-md",full:"w-full"}[d]||d,i),children:b??e.jsxs(e.Fragment,{children:[s?"string"==typeof s?e.jsx("img",{src:s,alt:r,className:a.cn("object-cover w-full h-48 md:h-full",l?"md:w-[40%]":"w-full",m)}):e.jsx("div",{className:a.cn("w-full h-48 md:h-full",l?"md:w-[40%]":"w-full",m),children:s}):null,e.jsxs("div",{className:"p-4 flex flex-col justify-between flex-1",children:[x&&e.jsx("span",{className:a.cn("bg-red-500 text-white py-1 absolute text-[10px] md:text-xs w-[150px] text-center z-10",l?"top-3 -left-[50px] -rotate-45":"top-3 -right-[50px] rotate-45",p),children:x}),e.jsxs("div",{children:[r&&e.jsx("h3",{className:a.cn("text-lg font-semibold text-gray-800 line-clamp-1 dark:text-white",u),children:r}),t&&e.jsx("p",{className:a.cn("mt-2 text-secondary-700 text-sm mb-2 line-clamp-3 dark:text-secondary-dark",c),children:t})]}),n&&e.jsx("div",{className:"mt-2",children:n})]})]})}),exports.CheckboxInput=w,exports.CodeInput=({id:t,label:s,length:o,value:n,disabled:l,labelClassName:d,name:i,onCodeChange:c,inputSize:m="md",...u})=>{const p=r.useRef([]),x=j[m],b=e=>{const r=p.current.map(e=>e?.value||"").join("")
|
|
39
39
|
c&&c(r),p.current[e]?.value&&e<o-1&&p.current[e+1]?.focus()}
|
package/dist/main.js
CHANGED
|
@@ -349,7 +349,7 @@ const Breadcrumb = ({
|
|
|
349
349
|
variant = "primary",
|
|
350
350
|
separator = "/"
|
|
351
351
|
}) => {
|
|
352
|
-
return /* @__PURE__ */ jsx("nav", { "aria-label": "breadcrumb", children: /* @__PURE__ */ jsx("ol", { className: "flex flex-wrap items-center gap-2 text-sm", children: data.map((item, index) => {
|
|
352
|
+
return /* @__PURE__ */ jsx("nav", { "aria-label": "breadcrumb mb-5", children: /* @__PURE__ */ jsx("ol", { className: "flex flex-wrap items-center gap-2 text-sm", children: data.map((item, index) => {
|
|
353
353
|
const isLast = item.path === null || index === data.length - 1;
|
|
354
354
|
return /* @__PURE__ */ jsxs("li", { className: "flex items-center", children: [
|
|
355
355
|
isLast ? /* @__PURE__ */ jsxs(
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@
|
|
1
|
+
@theme{ --color-primary: #80c41c; --color-primary-dark: #65a30d; --color-primary-700: #4d7c0f; --color-primary-dark-700: #365314; --color-primary-30: #d9f99d; --color-primary-dark-30: #a3e635; --color-primary-30-50: #ecfccb; --color-primary-dark-30-50: #bef264; --color-primary-dark-30-20: #1a2e05; --color-secondary: #e2e8f0; --color-secondary-dark: #94a3b8; --color-secondary-foreground: #475569; --color-secondary-foreground-dark: #cbd5e1; --color-secondary-700: #64748b; --color-secondary-dark-700: #334155; --color-secondary-30: #f1f5f9; --color-secondary-dark-30: #cbd5e1; --color-secondary-30-50: #f8fafc; --color-secondary-dark-30-50: #94a3b8; --color-secondary-dark-30-20: #1e293b; --color-success: #14b8a6; --color-success-dark: #0d9488; --color-success-700: #0f766e; --color-success-dark-700: #115e59; --color-success-30: #99f6e4; --color-success-dark-30: #5eead4; --color-success-30-50: #ccfbf1; --color-success-dark-30-50: #2dd4bf; --color-success-dark-30-20: #042f2e; --color-info: #0ea5e9; --color-info-dark: #0284c7; --color-info-700: #0369a1; --color-info-dark-700: #0c4a6e; --color-info-30: #bae6fd; --color-info-dark-30: #7dd3fc; --color-info-30-50: #e0f2fe; --color-info-dark-30-50: #38bdf8; --color-info-dark-30-20: #082f49; --color-warning: #f59e0b; --color-warning-dark: #d97706; --color-warning-700: #b45309; --color-warning-dark-700: #78350f; --color-warning-30: #fde68a; --color-warning-dark-30: #fcd34d; --color-warning-30-50: #fef3c7; --color-warning-dark-30-50: #fbbf24; --color-warning-dark-30-20: #451a03; --color-error: #f43f5e; --color-error-dark: #e11d48; --color-error-700: #be123c; --color-error-dark-700: #881337; --color-error-30: #fecdd3; --color-error-dark-30: #fda4af; --color-error-30-50: #ffe4e6; --color-error-dark-30-50: #fb7185; --color-error-dark-30-20: #4c0519; --color-flash-light-0: hsla(215, 20%, 75%, .5); --color-flash-light-100: hsla(215, 20%, 90%, .7); --background-shimmer-light: linear-gradient(90deg, hsla(215, 20%, 82%, .6) 25%, hsla(215, 20%, 94%, .9) 50%, hsla(215, 20%, 82%, .6) 75%); --color-flash-dark-0: hsla(222, 22%, 22%, .6); --color-flash-dark-100: hsla(222, 22%, 34%, .7); --background-shimmer-dark: linear-gradient(90deg, hsla(222, 22%, 24%, .6) 25%, hsla(222, 22%, 36%, .85) 50%, hsla(222, 22%, 24%, .6) 75%); }@layer components{@keyframes flash-anim{0%{background-color:var(--flash-anim-start)}to{background-color:var(--flash-anim-end)}}.flash{animation:flash-anim .8s linear infinite alternate;--flash-anim-start: var(--color-flash-light-0);--flash-anim-end: var(--color-flash-light-100)}.dark .flash{--flash-anim-start: var(--color-flash-dark-0);--flash-anim-end: var(--color-flash-dark-100)}@keyframes shimmer-anim{0%{background-position:-200% 0}to{background-position:200% 0}}.shimmer{position:relative;overflow:hidden;background:var(--background-shimmer-light);background-size:200% 100%;animation:shimmer-anim 2.5s infinite linear}.dark .shimmer{position:relative;overflow:hidden;background:var(--background-shimmer-dark);background-size:200% 100%;animation:shimmer-anim 2.5s infinite linear}@keyframes pop{0%{transform:scale(0);opacity:0}to{transform:scale(1);opacity:1}}@keyframes pop-out{0%{transform:scale(1);opacity:1}to{transform:scale(0);opacity:0}}.animate-pop{animation:pop .3s ease forwards}.animate-pop-out{animation:pop-out .1s ease forwards}}
|