@veevarts/design-system 1.0.0-dev.4 → 1.0.0-dev.6

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.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),y=require("@heroui/react"),v=require("react"),F=require("lucide-react"),De=require("framer-motion"),dr=require("@tiptap/react"),L=require("@tiptap/core"),jo=require("@tiptap/extension-underline"),Lo=require("@tiptap/extension-color"),Ro=require("@tiptap/extension-highlight"),Fo=require("@tiptap/extension-link"),Po=require("@tiptap/extension-task-list"),Vo=require("@tiptap/extension-task-item"),Bo=require("@tiptap/extension-text-align");function _o({children:t}){return c.jsx(y.HeroUIProvider,{children:t})}function fe({color:t="primary",radius:e="full",testId:n="veevart-button",...r}){return c.jsx(y.Button,{color:t,radius:e,"data-testid":n,...r})}const $o={login:"Login",logout:"Logout",selectLanguage:"Select your language"};function zo({languages:t,selectedLanguage:e,onLanguageChange:n,label:r}){return c.jsx("div",{className:"flex items-center",children:c.jsxs("div",{className:"relative flex items-center",children:[c.jsx(F.Globe,{className:"absolute left-3 w-5 h-5 pointer-events-none text-black"}),c.jsx(y.Select,{"data-testid":"language-select-desktop","aria-label":r,selectedKeys:e?[e]:[],onSelectionChange:s=>{const i=Array.from(s)[0]||e;n?.(i)},className:"min-w-40 hidden md:inline-flex",isDisabled:t.length===0,placeholder:r,startContent:c.jsx(F.Globe,{className:"w-5 h-5 text-black"}),children:t.map(s=>c.jsx(y.SelectItem,{textValue:s.label,"data-testid":`language-select-option-${s.code}`,children:s.label},s.code))}),c.jsx(y.Select,{"aria-label":r,"data-testid":"language-select-mobile",selectedKeys:e?[e]:[],onSelectionChange:s=>{const i=Array.from(s)[0]||e;n?.(i)},className:"min-w-20 inline-flex md:hidden",isDisabled:t.length===0,placeholder:e||"Language",children:t.map(s=>c.jsx(y.SelectItem,{className:"min-w-4",textValue:s.code.toUpperCase(),"data-testid":`language-select-option-mobile-${s.code}`,children:s.code.toUpperCase()},s.code))})]})})}function Ho({isLoggedIn:t,onLogin:e,onLogout:n,labels:r}){return t?c.jsxs(fe,{"data-testid":"navbar-auth-button",className:"px-2 py-1 w-1 min-w-12 md:min-w-24 rounded-full bg-black text-white text-sm flex items-center",onPress:n,children:[c.jsx(F.User,{className:"inline w-5 h-5"}),c.jsx("span",{className:"hidden md:inline",children:r.logout})]}):c.jsxs(fe,{"data-testid":"navbar-auth-button",className:"px-2 py-1 min-w-12 md:min-w-24 rounded-full bg-black text-white text-sm flex items-center",onPress:e,children:[c.jsx(F.User,{className:"inline w-5 h-5"}),c.jsx("span",{className:"hidden md:inline",children:r.login})]})}function Uo({logo:t,languages:e=[],selectedLanguage:n,onLanguageChange:r,isLoggedIn:s,onLogin:i,onLogout:o,hasLanguages:l,hasAuth:a,labels:u={},className:d}){const f={...$o,...u};return c.jsxs("nav",{"data-testid":"navbar",className:y.cn("w-full px-4 md:px-8 py-4 bg-white border-b border-zinc-100 flex items-center justify-between",d),children:[c.jsx("div",{className:"flex items-center min-w-10",children:t&&c.jsx("a",{href:"/",className:"block",children:c.jsx("img",{"data-testid":"navbar-logo",src:t,alt:"Logo",className:"h-8 max-w-28 md:max-w-40"})})}),c.jsxs("div",{className:"flex items-center gap-2 md:gap-4",children:[(l||e.length>0)&&c.jsx(zo,{languages:e,selectedLanguage:n,onLanguageChange:r,label:f.selectLanguage}),a&&c.jsx(Ho,{isLoggedIn:s,onLogin:i,onLogout:o,labels:f})]})]})}function qo(t){return c.jsx("div",{className:"min-h-screen flex flex-col",children:c.jsx("div",{className:"flex-1 flex items-center justify-center p-12",children:c.jsx(y.Alert,{description:"This template combines Navbar, Footer, and a confirmation Card. Include title, message, confirmation number, details list, icon, and action buttons. Use Card for the confirmation content.",title:"TODO: Implement ConfirmationPageTemplate",variant:"faded",className:"max-w-2xl"})})})}var En;const Ko=typeof document<"u"?(En=v.useInsertionEffect)!==null&&En!==void 0?En:v.useLayoutEffect:()=>{};function fr(t,e,n){let[r,s]=v.useState(t||e),i=v.useRef(r),o=v.useRef(t!==void 0),l=t!==void 0;v.useEffect(()=>{let f=o.current;f!==l&&process.env.NODE_ENV!=="production"&&console.warn(`WARN: A component changed from ${f?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}.`),o.current=l},[l]);let a=l?t:r;Ko(()=>{i.current=a});let[,u]=v.useReducer(()=>({}),{}),d=v.useCallback((f,...p)=>{let m=typeof f=="function"?f(i.current):f;Object.is(i.current,m)||(i.current=m,s(m),u(),n?.(m,...p))},[n]);return[a,d]}function Jo(t){return c.jsx("svg",{...t,fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:c.jsx(De.m.path,{animate:{pathLength:1},d:"M5 13l4 4L19 7",initial:{pathLength:0},strokeLinecap:"round",strokeLinejoin:"round",transition:{delay:.2,type:"tween",ease:"easeOut",duration:.3}})})}const Js=v.forwardRef(({color:t="primary",stepsCount:e=3,defaultStep:n=0,label:r,onStepChange:s,currentStep:i,hideProgressBars:o=!1,stepClassName:l,className:a,...u},d)=>{const[f,p]=fr(i,n,s),m=v.useMemo(()=>{let k,x;const C=["[--active-fg-color:hsl(var(--step-fg-color))]","[--active-border-color:hsl(var(--step-color))]","[--active-color:hsl(var(--step-color))]","[--complete-background-color:hsl(var(--step-color))]","[--complete-border-color:hsl(var(--step-color))]","[--inactive-border-color:hsl(var(--heroui-default-300))]","[--inactive-color:hsl(var(--heroui-default-300))]"];switch(t){case"primary":k="[--step-color:var(--heroui-primary)]",x="[--step-fg-color:var(--heroui-primary-foreground)]";break;case"secondary":k="[--step-color:var(--heroui-secondary)]",x="[--step-fg-color:var(--heroui-secondary-foreground)]";break;case"success":k="[--step-color:var(--heroui-success)]",x="[--step-fg-color:var(--heroui-success-foreground)]";break;case"warning":k="[--step-color:var(--heroui-warning)]",x="[--step-fg-color:var(--heroui-warning-foreground)]";break;case"danger":k="[--step-color:var(--heroui-danger)]",x="[--step-fg-color:var(--heroui-danger-foreground)]";break;case"default":k="[--step-color:var(--heroui-default)]",x="[--step-fg-color:var(--heroui-default-foreground)]";break;default:k="[--step-color:var(--heroui-primary)]",x="[--step-fg-color:var(--heroui-primary-foreground)]";break}return C.unshift(x),C.unshift(k),C},[t]);return c.jsxs("nav",{ref:d,"aria-label":"Progress",className:y.cn("flex max-w-fit items-center overflow-x-auto",a),"data-testid":"stepper-root",...u,children:[r&&c.jsx("label",{className:"text-small text-default-foreground lg:text-medium font-light w-full me-3","data-testid":"stepper-label",children:r}),c.jsx("ol",{className:y.cn("flex flex-row flex-nowrap gap-x-3",m,a),"data-testid":"stepper-list",children:Array.from({length:e})?.map((k,x)=>{const C=f===x?"active":f<x?"inactive":"complete";return c.jsx("li",{className:"relative flex w-full items-center pr-12","data-testid":`stepper-step-${x}`,children:c.jsxs("button",{"aria-current":C==="active"?"step":void 0,className:y.cn("group rounded-large flex w-full cursor-pointer flex-row items-center justify-center gap-x-3 py-2.5",l),onClick:()=>p(x),"data-testid":`stepper-step-btn-${x}`,children:[c.jsx("div",{className:"h-full relative flex items-center",children:c.jsx(De.LazyMotion,{features:De.domAnimation,children:c.jsx(De.m.div,{animate:C,className:"relative",children:c.jsx(De.m.div,{animate:C,className:y.cn("border-medium text-large text-default-foreground relative flex h-[26px] w-[26px] items-center justify-center rounded-full font-semibold",{"shadow-lg":C==="complete"}),initial:!1,transition:{duration:.25},variants:{inactive:{backgroundColor:"transparent",borderColor:"var(--inactive-border-color)",color:"var(--inactive-color)"},active:{backgroundColor:"transparent",borderColor:"var(--active-border-color)",color:"var(--active-color)"},complete:{backgroundColor:"var(--complete-background-color)",borderColor:"var(--complete-border-color)",color:"var(--active-fg-color)"}},children:c.jsx("div",{className:"flex items-center justify-center",children:C==="complete"?c.jsx(Jo,{className:"h-5 w-5 text-(--active-fg-color)","data-testid":`stepper-step-check-${x}`}):c.jsx("span",{})})})})})}),x<e-1&&!o&&c.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 left-[26px] w-[calc(100%-13px)] flex-none items-center",style:{"--idx":x},children:c.jsx("div",{className:y.cn("bg-default-200 relative h-0.5 w-full transition-colors duration-300","after:absolute after:block after:h-full after:w-0 after:bg-(--active-border-color) after:transition-[width] after:duration-300 after:content-['']",{"after:w-full":x<f})})})]},x)},x)})})]})});Js.displayName="Stepper";function Wo(t){return c.jsx("div",{className:"min-h-screen flex flex-col",children:c.jsx("div",{className:"flex-1 flex items-center justify-center p-12",children:c.jsx(y.Alert,{description:"This template combines Navbar, Stepper, Footer, and an event details Card. Include event image, category/spots chips, tags, details grid, and action buttons. Use Card, CardHeader, CardBody for content structure.",title:"TODO: Implement EventDetailsTemplate",variant:"faded",className:"max-w-2xl"})})})}function Go(){return c.jsxs("footer",{"data-testid":"footer",className:"fixed left-0 bottom-0 w-full text-left p-4 bg-white font-inter font-light text-base text-zinc-500",children:["Powered by Veevart ® ",new Date().getFullYear()]})}function jt(t){return typeof t=="string"?t:t.type}function et({className:t}){return c.jsx("div",{className:`flex items-center h-6 ${t||""}`,children:c.jsx(y.Divider,{orientation:"vertical"})})}function Ue({icon:t,label:e,isActive:n=!1,isDisabled:r=!1,onClick:s,shortcut:i,iconSize:o=16,className:l}){const a=i?`${e} (${i})`:e;return c.jsx(y.Tooltip,{content:a,children:c.jsx(fe,{size:"sm",radius:"sm",color:n?"primary":"default",variant:n?"solid":"bordered",isIconOnly:!0,isDisabled:r,onPress:s,"aria-label":e,className:l,children:c.jsx(t,{size:o})})})}const $e={bold:{execute:({editor:t})=>t.chain().focus().toggleBold().run(),canExecute:t=>t.can().chain().focus().toggleBold().run(),isActive:t=>t.isActive("bold"),shortcut:"Mod-b",label:"Bold"},italic:{execute:({editor:t})=>t.chain().focus().toggleItalic().run(),canExecute:t=>t.can().chain().focus().toggleItalic().run(),isActive:t=>t.isActive("italic"),shortcut:"Mod-i",label:"Italic"},strike:{execute:({editor:t})=>t.chain().focus().toggleStrike().run(),canExecute:t=>t.can().chain().focus().toggleStrike().run(),isActive:t=>t.isActive("strike"),shortcut:"Mod-Shift-x",label:"Strikethrough"},underline:{execute:({editor:t})=>t.chain().focus().toggleUnderline().run(),canExecute:t=>t.can().chain().focus().toggleUnderline().run(),isActive:t=>t.isActive("underline"),shortcut:"Mod-u",label:"Underline"},code:{execute:({editor:t})=>t.chain().focus().toggleCode().run(),canExecute:t=>t.can().chain().focus().toggleCode().run(),isActive:t=>t.isActive("code"),shortcut:"Mod-e",label:"Inline code"},textColor:{execute:({editor:t,config:e})=>{const n=e?.type==="textColor"?e.color:"";n?t.chain().focus().setColor(n).run():t.chain().focus().unsetColor().run()},canExecute:()=>!0,isActive:t=>t.isActive("textStyle"),label:"Text color"},highlight:{execute:({editor:t,config:e})=>{const n=e?.type==="highlight"?e.color:"";n?t.chain().focus().setHighlight({color:n}).run():t.chain().focus().unsetHighlight().run()},canExecute:()=>!0,isActive:t=>t.isActive("highlight"),label:"Highlight"},link:{execute:({editor:t,config:e})=>{const n=e?.type==="link"?e.href:"";if(n){const r=e?.type==="link"?e.target:void 0,s=e?.type==="link"?e.rel:void 0;t.chain().focus().setLink({href:n,target:r,rel:s}).run()}else t.chain().focus().unsetLink().run()},canExecute:()=>!0,isActive:t=>t.isActive("link"),shortcut:"Mod-k",label:"Link"},paragraph:{execute:({editor:t})=>t.chain().focus().setParagraph().run(),canExecute:t=>t.can().chain().focus().setParagraph().run(),isActive:t=>t.isActive("paragraph"),shortcut:"Mod-Alt-0",label:"Paragraph"},heading:{execute:({editor:t,config:e})=>{const n=e?.type==="heading"?e.level:1;t.chain().focus().toggleHeading({level:n}).run()},canExecute:(t,e)=>{const n=e?.type==="heading"?e.level:1;return t.can().chain().focus().toggleHeading({level:n}).run()},isActive:(t,e)=>e?.type==="heading"?t.isActive("heading",{level:e.level}):t.isActive("heading"),label:"Heading"},bulletList:{execute:({editor:t})=>t.chain().focus().toggleBulletList().run(),canExecute:t=>t.can().chain().focus().toggleBulletList().run(),isActive:t=>t.isActive("bulletList"),shortcut:"Mod-Shift-8",label:"Bullet list"},orderedList:{execute:({editor:t})=>t.chain().focus().toggleOrderedList().run(),canExecute:t=>t.can().chain().focus().toggleOrderedList().run(),isActive:t=>t.isActive("orderedList"),shortcut:"Mod-Shift-7",label:"Numbered list"},taskList:{execute:({editor:t})=>t.chain().focus().toggleTaskList().run(),canExecute:t=>t.can().chain().focus().toggleTaskList().run(),isActive:t=>t.isActive("taskList"),label:"Task list"},codeBlock:{execute:({editor:t})=>t.chain().focus().toggleCodeBlock().run(),canExecute:t=>t.can().chain().focus().toggleCodeBlock().run(),isActive:t=>t.isActive("codeBlock"),shortcut:"Mod-Alt-c",label:"Code block"},blockquote:{execute:({editor:t})=>t.chain().focus().toggleBlockquote().run(),canExecute:t=>t.can().chain().focus().toggleBlockquote().run(),isActive:t=>t.isActive("blockquote"),shortcut:"Mod-Shift-b",label:"Blockquote"},horizontalRule:{execute:({editor:t})=>t.chain().focus().setHorizontalRule().run(),canExecute:t=>t.can().chain().focus().setHorizontalRule().run(),isActive:()=>!1,label:"Horizontal rule"},hardBreak:{execute:({editor:t})=>t.chain().focus().setHardBreak().run(),canExecute:t=>t.can().chain().focus().setHardBreak().run(),isActive:()=>!1,shortcut:"Mod-Enter",label:"Line break"},textAlign:{execute:({editor:t,config:e})=>{const n=e?.type==="textAlign"?e.alignment:"left";t.chain().focus().setTextAlign(n).run()},canExecute:()=>!0,isActive:(t,e)=>e?.type==="textAlign"?t.isActive({textAlign:e.alignment}):!1,label:"Text alignment"},clearMarks:{execute:({editor:t})=>t.chain().focus().unsetAllMarks().run(),canExecute:t=>t.can().chain().focus().unsetAllMarks().run(),isActive:()=>!1,label:"Clear formatting"},clearNodes:{execute:({editor:t})=>t.chain().focus().clearNodes().run(),canExecute:t=>t.can().chain().focus().clearNodes().run(),isActive:()=>!1,label:"Clear nodes"},undo:{execute:({editor:t})=>t.chain().focus().undo().run(),canExecute:t=>t.can().chain().focus().undo().run(),isActive:()=>!1,shortcut:"Mod-z",label:"Undo"},redo:{execute:({editor:t})=>t.chain().focus().redo().run(),canExecute:t=>t.can().chain().focus().redo().run(),isActive:()=>!1,shortcut:"Mod-Shift-z",label:"Redo"}},Zo={1:"Heading 1",2:"Heading 2",3:"Heading 3",4:"Heading 4",5:"Heading 5",6:"Heading 6"};function Qo({editor:t,levels:e=[1,2,3,4,5,6],isDisabled:n=!1}){const[,r]=v.useState(0);v.useEffect(()=>{const o=()=>r(l=>l+1);return t.on("selectionUpdate",o),t.on("transaction",o),()=>{t.off("selectionUpdate",o),t.off("transaction",o)}},[t]);const s=e.find(o=>t.isActive("heading",{level:o})),i=o=>{const l=Number(o),a=$e.heading;a&&a.execute({editor:t,config:{type:"heading",level:l}})};return c.jsxs(y.Dropdown,{children:[c.jsx(y.DropdownTrigger,{children:c.jsx(fe,{size:"sm",radius:"sm",variant:s?"solid":"bordered",color:s?"primary":"default",isDisabled:n,startContent:c.jsx(F.Heading,{size:16}),"aria-label":"Select heading level",children:s?`H${s}`:"H"})}),c.jsx(y.DropdownMenu,{"aria-label":"Heading levels",selectionMode:"single",selectedKeys:s?new Set([String(s)]):new Set,onAction:i,children:e.map(o=>c.jsx(y.DropdownItem,{startContent:t.isActive("heading",{level:o})?c.jsx(F.Check,{size:16}):c.jsx("div",{className:"w-4"}),children:Zo[o]},o))})]})}const Tn={bulletList:{label:"Bullet List",icon:F.List},orderedList:{label:"Numbered List",icon:F.ListOrdered},taskList:{label:"Task List",icon:F.ListTodo}};function Xo({editor:t,types:e=["bulletList","orderedList","taskList"],isDisabled:n=!1}){const[,r]=v.useState(0);v.useEffect(()=>{const l=()=>r(a=>a+1);return t.on("selectionUpdate",l),t.on("transaction",l),()=>{t.off("selectionUpdate",l),t.off("transaction",l)}},[t]);const s=e.find(l=>t.isActive(l)),i=s?Tn[s].icon:F.List,o=l=>{const u=$e[l];u&&u.execute({editor:t})};return c.jsxs(y.Dropdown,{children:[c.jsx(y.DropdownTrigger,{children:c.jsx(fe,{size:"sm",radius:"sm",variant:s?"solid":"bordered",color:s?"primary":"default",isDisabled:n,isIconOnly:!0,"aria-label":"Select list type",children:c.jsx(i,{size:16})})}),c.jsx(y.DropdownMenu,{"aria-label":"List types",selectionMode:"single",selectedKeys:s?new Set([s]):new Set,onAction:o,children:e.map(l=>{const a=Tn[l].icon;return c.jsx(y.DropdownItem,{startContent:c.jsx(a,{size:16}),children:Tn[l].label},l)})})]})}function Yo({colors:t,selectedColor:e,onColorSelect:n,columns:r=4}){return c.jsx("div",{className:"grid gap-2",style:{gridTemplateColumns:`repeat(${r}, minmax(0, 1fr))`},children:t.map(s=>{const i=e===s;return c.jsx("button",{type:"button",onClick:()=>n(s),className:`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),y=require("@heroui/react"),v=require("react"),F=require("lucide-react"),De=require("framer-motion"),dr=require("@tiptap/react"),L=require("@tiptap/core"),jo=require("@tiptap/extension-underline"),Lo=require("@tiptap/extension-color"),Ro=require("@tiptap/extension-highlight"),Fo=require("@tiptap/extension-link"),Po=require("@tiptap/extension-task-list"),Vo=require("@tiptap/extension-task-item"),Bo=require("@tiptap/extension-text-align");function _o({children:t}){return c.jsx(y.HeroUIProvider,{children:t})}function fe({color:t="primary",radius:e="full",testId:n="veevart-button",...r}){return c.jsx(y.Button,{color:t,radius:e,"data-testid":n,...r})}const $o={login:"Login",logout:"Logout",selectLanguage:"Select your language"};function zo({languages:t,selectedLanguage:e,onLanguageChange:n,label:r}){return c.jsx("div",{className:"flex items-center",children:c.jsxs("div",{className:"relative flex items-center",children:[c.jsx(F.Globe,{className:"absolute left-3 w-5 h-5 pointer-events-none text-black"}),c.jsx(y.Select,{"data-testid":"language-select-desktop","aria-label":r,selectedKeys:e?[e]:[],onSelectionChange:s=>{const i=Array.from(s)[0]||e;n?.(i)},className:"min-w-40 hidden md:inline-flex",isDisabled:t.length===0,placeholder:r,startContent:c.jsx(F.Globe,{className:"w-5 h-5 text-black"}),children:t.map(s=>c.jsx(y.SelectItem,{textValue:s.label,"data-testid":`language-select-option-${s.code}`,children:s.label},s.code))}),c.jsx(y.Select,{"aria-label":r,"data-testid":"language-select-mobile",selectedKeys:e?[e]:[],onSelectionChange:s=>{const i=Array.from(s)[0]||e;n?.(i)},className:"min-w-20 inline-flex md:hidden",isDisabled:t.length===0,placeholder:e||"Language",children:t.map(s=>c.jsx(y.SelectItem,{className:"min-w-4",textValue:s.code.toUpperCase(),"data-testid":`language-select-option-mobile-${s.code}`,children:s.code.toUpperCase()},s.code))})]})})}function Ho({isLoggedIn:t,onLogin:e,onLogout:n,labels:r}){return t?c.jsxs(fe,{"data-testid":"navbar-auth-button",className:"px-2 py-1 w-1 min-w-12 md:min-w-24 rounded-full bg-black text-white text-sm flex items-center",onPress:n,children:[c.jsx(F.User,{className:"inline w-5 h-5"}),c.jsx("span",{className:"hidden md:inline",children:r.logout})]}):c.jsxs(fe,{"data-testid":"navbar-auth-button",className:"px-2 py-1 min-w-12 md:min-w-24 rounded-full bg-black text-white text-sm flex items-center",onPress:e,children:[c.jsx(F.User,{className:"inline w-5 h-5"}),c.jsx("span",{className:"hidden md:inline",children:r.login})]})}function Uo({logo:t,languages:e=[],selectedLanguage:n,onLanguageChange:r,isLoggedIn:s,onLogin:i,onLogout:o,hasLanguages:l,hasAuth:a,labels:u={},className:d}){const f={...$o,...u};return c.jsxs("nav",{"data-testid":"navbar",className:y.cn("w-full px-4 md:px-8 py-4 bg-white border-b border-zinc-100 flex items-center justify-between",d),children:[c.jsx("div",{className:"flex items-center min-w-10",children:t&&c.jsx("a",{href:"/",className:"block",children:c.jsx("img",{"data-testid":"navbar-logo",src:t,alt:"Logo",className:"h-8 max-w-28 md:max-w-40"})})}),c.jsxs("div",{className:"flex items-center gap-2 md:gap-4",children:[(l||e.length>0)&&c.jsx(zo,{languages:e,selectedLanguage:n,onLanguageChange:r,label:f.selectLanguage}),a&&c.jsx(Ho,{isLoggedIn:s,onLogin:i,onLogout:o,labels:f})]})]})}function qo(t){return c.jsx("div",{className:"min-h-screen flex flex-col",children:c.jsx("div",{className:"flex-1 flex items-center justify-center p-12",children:c.jsx(y.Alert,{description:"This template combines Navbar, Footer, and a confirmation Card. Include title, message, confirmation number, details list, icon, and action buttons. Use Card for the confirmation content.",title:"TODO: Implement ConfirmationPageTemplate",variant:"faded",className:"max-w-2xl"})})})}var En;const Ko=typeof document<"u"?(En=v.useInsertionEffect)!==null&&En!==void 0?En:v.useLayoutEffect:()=>{};function fr(t,e,n){let[r,s]=v.useState(t||e),i=v.useRef(r),o=v.useRef(t!==void 0),l=t!==void 0;v.useEffect(()=>{let f=o.current;f!==l&&process.env.NODE_ENV!=="production"&&console.warn(`WARN: A component changed from ${f?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}.`),o.current=l},[l]);let a=l?t:r;Ko(()=>{i.current=a});let[,u]=v.useReducer(()=>({}),{}),d=v.useCallback((f,...p)=>{let m=typeof f=="function"?f(i.current):f;Object.is(i.current,m)||(i.current=m,s(m),u(),n?.(m,...p))},[n]);return[a,d]}function Jo(t){return c.jsx("svg",{...t,fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:c.jsx(De.m.path,{animate:{pathLength:1},d:"M5 13l4 4L19 7",initial:{pathLength:0},strokeLinecap:"round",strokeLinejoin:"round",transition:{delay:.2,type:"tween",ease:"easeOut",duration:.3}})})}const Js=v.forwardRef(({color:t="primary",stepsCount:e=3,defaultStep:n=0,label:r,onStepChange:s,currentStep:i,hideProgressBars:o=!1,stepClassName:l,className:a,...u},d)=>{const[f,p]=fr(i,n,s),m=v.useMemo(()=>{let k,x;const C=["[--active-fg-color:hsl(var(--step-fg-color))]","[--active-border-color:hsl(var(--step-color))]","[--active-color:hsl(var(--step-color))]","[--complete-background-color:hsl(var(--step-color))]","[--complete-border-color:hsl(var(--step-color))]","[--inactive-border-color:hsl(var(--heroui-default-300))]","[--inactive-color:hsl(var(--heroui-default-300))]"];switch(t){case"primary":k="[--step-color:var(--heroui-primary)]",x="[--step-fg-color:var(--heroui-primary-foreground)]";break;case"secondary":k="[--step-color:var(--heroui-secondary)]",x="[--step-fg-color:var(--heroui-secondary-foreground)]";break;case"success":k="[--step-color:var(--heroui-success)]",x="[--step-fg-color:var(--heroui-success-foreground)]";break;case"warning":k="[--step-color:var(--heroui-warning)]",x="[--step-fg-color:var(--heroui-warning-foreground)]";break;case"danger":k="[--step-color:var(--heroui-danger)]",x="[--step-fg-color:var(--heroui-danger-foreground)]";break;case"default":k="[--step-color:var(--heroui-default)]",x="[--step-fg-color:var(--heroui-default-foreground)]";break;default:k="[--step-color:var(--heroui-primary)]",x="[--step-fg-color:var(--heroui-primary-foreground)]";break}return C.unshift(x),C.unshift(k),C},[t]);return c.jsxs("nav",{ref:d,"aria-label":"Progress",className:y.cn("flex max-w-fit items-center overflow-x-auto",a),"data-testid":"stepper-root",...u,children:[r&&c.jsx("label",{className:"text-small text-default-foreground lg:text-medium font-light w-full me-3","data-testid":"stepper-label",children:r}),c.jsx("ol",{className:y.cn("flex flex-row flex-nowrap gap-x-3",m,a),"data-testid":"stepper-list",children:Array.from({length:e})?.map((k,x)=>{const C=f===x?"active":f<x?"inactive":"complete";return c.jsx("li",{className:"relative flex w-full items-center pr-12","data-testid":`stepper-step-${x}`,children:c.jsxs("button",{"aria-current":C==="active"?"step":void 0,className:y.cn("group rounded-large flex w-full cursor-pointer flex-row items-center justify-center gap-x-3 py-2.5",l),onClick:()=>p(x),"data-testid":`stepper-step-btn-${x}`,children:[c.jsx("div",{className:"h-full relative flex items-center",children:c.jsx(De.LazyMotion,{features:De.domAnimation,children:c.jsx(De.m.div,{animate:C,className:"relative",children:c.jsx(De.m.div,{animate:C,className:y.cn("border-medium text-large text-default-foreground relative flex h-[26px] w-[26px] items-center justify-center rounded-full font-semibold",{"shadow-lg":C==="complete"}),initial:!1,transition:{duration:.25},variants:{inactive:{backgroundColor:"transparent",borderColor:"var(--inactive-border-color)",color:"var(--inactive-color)"},active:{backgroundColor:"transparent",borderColor:"var(--active-border-color)",color:"var(--active-color)"},complete:{backgroundColor:"var(--complete-background-color)",borderColor:"var(--complete-border-color)",color:"var(--active-fg-color)"}},children:c.jsx("div",{className:"flex items-center justify-center",children:C==="complete"?c.jsx(Jo,{className:"h-5 w-5 text-(--active-fg-color)","data-testid":`stepper-step-check-${x}`}):c.jsx("span",{})})})})})}),x<e-1&&!o&&c.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 left-[26px] w-[calc(100%-13px)] flex-none items-center",style:{"--idx":x},children:c.jsx("div",{className:y.cn("bg-default-200 relative h-0.5 w-full transition-colors duration-300","after:absolute after:block after:h-full after:w-0 after:bg-(--active-border-color) after:transition-[width] after:duration-300 after:content-['']",{"after:w-full":x<f})})})]},x)},x)})})]})});Js.displayName="Stepper";function Wo(t){return c.jsx("div",{className:"min-h-screen flex flex-col",children:c.jsx("div",{className:"flex-1 flex items-center justify-center p-12",children:c.jsx(y.Alert,{description:"This template combines Navbar, Stepper, Footer, and an event details Card. Include event image, category/spots chips, tags, details grid, and action buttons. Use Card, CardHeader, CardBody for content structure.",title:"TODO: Implement EventDetailsTemplate",variant:"faded",className:"max-w-2xl"})})})}function Go(){return c.jsxs("footer",{"data-testid":"footer",className:"fixed left-0 bottom-0 w-full text-left p-4 bg-white font-inter font-light text-base text-zinc-500",children:["Powered by Veevart ® ",new Date().getFullYear()]})}function jt(t){return typeof t=="string"?t:t.type}function et({className:t}){return c.jsx("div",{className:`flex items-center h-6 ${t||""}`,children:c.jsx(y.Divider,{orientation:"vertical"})})}function Ue({icon:t,label:e,isActive:n=!1,isDisabled:r=!1,onClick:s,shortcut:i,iconSize:o=16,className:l}){const a=i?`${e} (${i})`:e;return c.jsx(y.Tooltip,{content:a,placement:"top",delay:300,closeDelay:0,showArrow:!0,children:c.jsx(fe,{size:"sm",radius:"sm",color:n?"primary":"default",variant:n?"solid":"bordered",isIconOnly:!0,isDisabled:r,onPress:s,"aria-label":e,className:l,children:c.jsx(t,{size:o})})})}const $e={bold:{execute:({editor:t})=>t.chain().focus().toggleBold().run(),canExecute:t=>t.can().chain().focus().toggleBold().run(),isActive:t=>t.isActive("bold"),shortcut:"Mod-b",label:"Bold"},italic:{execute:({editor:t})=>t.chain().focus().toggleItalic().run(),canExecute:t=>t.can().chain().focus().toggleItalic().run(),isActive:t=>t.isActive("italic"),shortcut:"Mod-i",label:"Italic"},strike:{execute:({editor:t})=>t.chain().focus().toggleStrike().run(),canExecute:t=>t.can().chain().focus().toggleStrike().run(),isActive:t=>t.isActive("strike"),shortcut:"Mod-Shift-x",label:"Strikethrough"},underline:{execute:({editor:t})=>t.chain().focus().toggleUnderline().run(),canExecute:t=>t.can().chain().focus().toggleUnderline().run(),isActive:t=>t.isActive("underline"),shortcut:"Mod-u",label:"Underline"},code:{execute:({editor:t})=>t.chain().focus().toggleCode().run(),canExecute:t=>t.can().chain().focus().toggleCode().run(),isActive:t=>t.isActive("code"),shortcut:"Mod-e",label:"Inline code"},textColor:{execute:({editor:t,config:e})=>{const n=e?.type==="textColor"?e.color:"";n?t.chain().focus().setColor(n).run():t.chain().focus().unsetColor().run()},canExecute:()=>!0,isActive:t=>t.isActive("textStyle"),label:"Text color"},highlight:{execute:({editor:t,config:e})=>{const n=e?.type==="highlight"?e.color:"";n?t.chain().focus().setHighlight({color:n}).run():t.chain().focus().unsetHighlight().run()},canExecute:()=>!0,isActive:t=>t.isActive("highlight"),label:"Highlight"},link:{execute:({editor:t,config:e})=>{const n=e?.type==="link"?e.href:"";if(n){const r=e?.type==="link"?e.target:void 0,s=e?.type==="link"?e.rel:void 0;t.chain().focus().setLink({href:n,target:r,rel:s}).run()}else t.chain().focus().unsetLink().run()},canExecute:()=>!0,isActive:t=>t.isActive("link"),shortcut:"Mod-k",label:"Link"},paragraph:{execute:({editor:t})=>t.chain().focus().setParagraph().run(),canExecute:t=>t.can().chain().focus().setParagraph().run(),isActive:t=>t.isActive("paragraph"),shortcut:"Mod-Alt-0",label:"Paragraph"},heading:{execute:({editor:t,config:e})=>{const n=e?.type==="heading"?e.level:1;t.chain().focus().toggleHeading({level:n}).run()},canExecute:(t,e)=>{const n=e?.type==="heading"?e.level:1;return t.can().chain().focus().toggleHeading({level:n}).run()},isActive:(t,e)=>e?.type==="heading"?t.isActive("heading",{level:e.level}):t.isActive("heading"),label:"Heading"},bulletList:{execute:({editor:t})=>t.chain().focus().toggleBulletList().run(),canExecute:t=>t.can().chain().focus().toggleBulletList().run(),isActive:t=>t.isActive("bulletList"),shortcut:"Mod-Shift-8",label:"Bullet list"},orderedList:{execute:({editor:t})=>t.chain().focus().toggleOrderedList().run(),canExecute:t=>t.can().chain().focus().toggleOrderedList().run(),isActive:t=>t.isActive("orderedList"),shortcut:"Mod-Shift-7",label:"Numbered list"},taskList:{execute:({editor:t})=>t.chain().focus().toggleTaskList().run(),canExecute:t=>t.can().chain().focus().toggleTaskList().run(),isActive:t=>t.isActive("taskList"),label:"Task list"},codeBlock:{execute:({editor:t})=>t.chain().focus().toggleCodeBlock().run(),canExecute:t=>t.can().chain().focus().toggleCodeBlock().run(),isActive:t=>t.isActive("codeBlock"),shortcut:"Mod-Alt-c",label:"Code block"},blockquote:{execute:({editor:t})=>t.chain().focus().toggleBlockquote().run(),canExecute:t=>t.can().chain().focus().toggleBlockquote().run(),isActive:t=>t.isActive("blockquote"),shortcut:"Mod-Shift-b",label:"Blockquote"},horizontalRule:{execute:({editor:t})=>t.chain().focus().setHorizontalRule().run(),canExecute:t=>t.can().chain().focus().setHorizontalRule().run(),isActive:()=>!1,label:"Horizontal rule"},hardBreak:{execute:({editor:t})=>t.chain().focus().setHardBreak().run(),canExecute:t=>t.can().chain().focus().setHardBreak().run(),isActive:()=>!1,shortcut:"Mod-Enter",label:"Line break"},textAlign:{execute:({editor:t,config:e})=>{const n=e?.type==="textAlign"?e.alignment:"left";t.chain().focus().setTextAlign(n).run()},canExecute:()=>!0,isActive:(t,e)=>e?.type==="textAlign"?t.isActive({textAlign:e.alignment}):!1,label:"Text alignment"},clearMarks:{execute:({editor:t})=>t.chain().focus().unsetAllMarks().run(),canExecute:t=>t.can().chain().focus().unsetAllMarks().run(),isActive:()=>!1,label:"Clear formatting"},clearNodes:{execute:({editor:t})=>t.chain().focus().clearNodes().run(),canExecute:t=>t.can().chain().focus().clearNodes().run(),isActive:()=>!1,label:"Clear nodes"},undo:{execute:({editor:t})=>t.chain().focus().undo().run(),canExecute:t=>t.can().chain().focus().undo().run(),isActive:()=>!1,shortcut:"Mod-z",label:"Undo"},redo:{execute:({editor:t})=>t.chain().focus().redo().run(),canExecute:t=>t.can().chain().focus().redo().run(),isActive:()=>!1,shortcut:"Mod-Shift-z",label:"Redo"}},Zo={1:"Heading 1",2:"Heading 2",3:"Heading 3",4:"Heading 4",5:"Heading 5",6:"Heading 6"};function Qo({editor:t,levels:e=[1,2,3,4,5,6],isDisabled:n=!1}){const[,r]=v.useState(0);v.useEffect(()=>{const o=()=>r(l=>l+1);return t.on("selectionUpdate",o),t.on("transaction",o),()=>{t.off("selectionUpdate",o),t.off("transaction",o)}},[t]);const s=e.find(o=>t.isActive("heading",{level:o})),i=o=>{const l=Number(o),a=$e.heading;a&&a.execute({editor:t,config:{type:"heading",level:l}})};return c.jsxs(y.Dropdown,{children:[c.jsx(y.DropdownTrigger,{children:c.jsx(fe,{size:"sm",radius:"sm",variant:s?"solid":"bordered",color:s?"primary":"default",isDisabled:n,startContent:c.jsx(F.Heading,{size:16}),"aria-label":"Select heading level",children:s?`H${s}`:"H"})}),c.jsx(y.DropdownMenu,{"aria-label":"Heading levels",selectionMode:"single",selectedKeys:s?new Set([String(s)]):new Set,onAction:i,children:e.map(o=>c.jsx(y.DropdownItem,{startContent:t.isActive("heading",{level:o})?c.jsx(F.Check,{size:16}):c.jsx("div",{className:"w-4"}),children:Zo[o]},o))})]})}const Tn={bulletList:{label:"Bullet List",icon:F.List},orderedList:{label:"Numbered List",icon:F.ListOrdered},taskList:{label:"Task List",icon:F.ListTodo}};function Xo({editor:t,types:e=["bulletList","orderedList","taskList"],isDisabled:n=!1}){const[,r]=v.useState(0);v.useEffect(()=>{const l=()=>r(a=>a+1);return t.on("selectionUpdate",l),t.on("transaction",l),()=>{t.off("selectionUpdate",l),t.off("transaction",l)}},[t]);const s=e.find(l=>t.isActive(l)),i=s?Tn[s].icon:F.List,o=l=>{const u=$e[l];u&&u.execute({editor:t})};return c.jsxs(y.Dropdown,{children:[c.jsx(y.DropdownTrigger,{children:c.jsx(fe,{size:"sm",radius:"sm",variant:s?"solid":"bordered",color:s?"primary":"default",isDisabled:n,isIconOnly:!0,"aria-label":"Select list type",children:c.jsx(i,{size:16})})}),c.jsx(y.DropdownMenu,{"aria-label":"List types",selectionMode:"single",selectedKeys:s?new Set([s]):new Set,onAction:o,children:e.map(l=>{const a=Tn[l].icon;return c.jsx(y.DropdownItem,{startContent:c.jsx(a,{size:16}),children:Tn[l].label},l)})})]})}function Yo({colors:t,selectedColor:e,onColorSelect:n,columns:r=4}){return c.jsx("div",{className:"grid gap-2",style:{gridTemplateColumns:`repeat(${r}, minmax(0, 1fr))`},children:t.map(s=>{const i=e===s;return c.jsx("button",{type:"button",onClick:()=>n(s),className:`
2
2
  w-8 h-8 rounded-full border-2 cursor-pointer
3
3
  transition-all duration-200
4
4
  hover:scale-110 hover:shadow-md
package/dist/index.js CHANGED
@@ -410,21 +410,31 @@ function Ze({
410
410
  className: l
411
411
  }) {
412
412
  const a = s ? `${e} (${s})` : e;
413
- return /* @__PURE__ */ f(At, { content: a, children: /* @__PURE__ */ f(
414
- ve,
413
+ return /* @__PURE__ */ f(
414
+ At,
415
415
  {
416
- size: "sm",
417
- radius: "sm",
418
- color: n ? "primary" : "default",
419
- variant: n ? "solid" : "bordered",
420
- isIconOnly: !0,
421
- isDisabled: r,
422
- onPress: i,
423
- "aria-label": e,
424
- className: l,
425
- children: /* @__PURE__ */ f(t, { size: o })
416
+ content: a,
417
+ placement: "top",
418
+ delay: 300,
419
+ closeDelay: 0,
420
+ showArrow: !0,
421
+ children: /* @__PURE__ */ f(
422
+ ve,
423
+ {
424
+ size: "sm",
425
+ radius: "sm",
426
+ color: n ? "primary" : "default",
427
+ variant: n ? "solid" : "bordered",
428
+ isIconOnly: !0,
429
+ isDisabled: r,
430
+ onPress: i,
431
+ "aria-label": e,
432
+ className: l,
433
+ children: /* @__PURE__ */ f(t, { size: o })
434
+ }
435
+ )
426
436
  }
427
- ) });
437
+ );
428
438
  }
429
439
  const We = {
430
440
  // ============================================================
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@veevarts/design-system",
3
3
  "private": false,
4
- "version": "1.0.0-dev.4",
4
+ "version": "1.0.0-dev.6",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",