@veevarts/design-system 0.1.16 → 0.1.17

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.
@@ -0,0 +1,3 @@
1
+ import { ButtonProps as ButtonHeroUIProps } from '@heroui/react';
2
+ export type ButtonProps = ButtonHeroUIProps;
3
+ export declare function Button({ color, radius, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { Button } from './Button';
2
+ export type { ButtonProps } from './Button';
@@ -0,0 +1,2 @@
1
+ export { Button } from './Button';
2
+ export type { ButtonProps } from './Button';
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("@heroui/react");require("react");const n={brand:{primary:"#C14615",secondary:"#000000",accent:"#F59E0B"},semantic:{success:"#10B981",warning:"#F59E0B",error:"#EF4444",info:"#3B82F6"},neutral:{white:"#FFFFFF",black:"#000000",gray:{50:"#F9FAFB",100:"#F3F4F6",200:"#E5E7EB",300:"#D1D5DB",400:"#9CA3AF",500:"#6B7280",600:"#4B5563",700:"#374151",800:"#1F2937",900:"#111827"}}},a={xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem","2xl":"3rem","3xl":"4rem","4xl":"6rem","5xl":"8rem"},i={fontFamily:{primary:'"NeueMontreal", system-ui, sans-serif',secondary:'"Scholar", Georgia, serif',sans:'"NeueMontreal", system-ui, sans-serif',serif:'"Scholar", Georgia, serif',mono:'"JetBrains Mono", Consolas, monospace'},fontSize:{xs:"0.75rem",sm:"0.875rem",base:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem"},fontWeight:{normal:"400",semibold:"600",bold:"700"},lineHeight:{tight:"1.25",normal:"1.5",relaxed:"1.75"}},o={colors:{primary:{50:"#fef5f1",100:"#fde8e0",200:"#fbd5c7",300:"#f7b79f",400:"#f18d68",500:n.brand.primary,600:"#a83b11",700:"#8b2f0e",800:"#73260d",900:"#5f210c",DEFAULT:n.brand.primary},secondary:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:n.brand.secondary,600:"#000000",700:"#000000",800:"#000000",900:"#000000",DEFAULT:n.brand.secondary}}};function s({children:t}){return e.jsx(r.HeroUIProvider,{children:t})}function l(t){return e.jsx("div",{className:"w-full p-8",children:e.jsx("div",{className:"container mx-auto flex items-center justify-center",children:e.jsx(r.Alert,{description:"This component needs to be implemented using HeroUI Navbar, NavbarBrand, NavbarContent, and NavbarItem components. Include logo, navigation links, language selector dropdown, and authentication state.",title:"TODO: Implement Navbar Pattern",variant:"faded"})})})}function c(t){return e.jsx("div",{className:"w-full p-8",children:e.jsx("div",{className:"container mx-auto flex items-center justify-center",children:e.jsx(r.Alert,{description:"This component needs to be implemented with visual step indicators, connecting lines, and support for both horizontal and vertical orientations. Include completed (green), current (blue), and upcoming (gray) states.",title:"TODO: Implement Stepper Pattern",variant:"faded"})})})}function m(t){return e.jsx("footer",{className:"w-full py-12",children:e.jsx("div",{className:"container mx-auto px-6 flex items-center justify-center",children:e.jsx(r.Alert,{description:"This component needs to be implemented using HeroUI Link components. Include grid layout with link sections, logo, social media icons, and copyright text. Should be responsive and adapt to mobile/desktop.",title:"TODO: Implement Footer Pattern",variant:"faded"})})})}function d(t){return e.jsx("div",{className:"min-h-screen flex flex-col",children:e.jsx("div",{className:"flex-1 flex items-center justify-center p-12",children:e.jsx(r.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"})})})}function p(t){return e.jsx("div",{className:"min-h-screen flex flex-col",children:e.jsx("div",{className:"flex-1 flex items-center justify-center p-12",children:e.jsx(r.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"})})})}exports.ConfirmationPageTemplate=d;exports.EventDetailsTemplate=p;exports.Footer=m;exports.HeroUIProvider=s;exports.Navbar=l;exports.Stepper=c;exports.colors=n;exports.spacing=a;exports.theme=o;exports.typography=i;Object.keys(r).forEach(t=>{t!=="default"&&!Object.prototype.hasOwnProperty.call(exports,t)&&Object.defineProperty(exports,t,{enumerable:!0,get:()=>r[t]})});
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("@heroui/react"),n=require("react"),p=require("framer-motion"),v={brand:{primary:"#C14615",secondary:"#000000",accent:"#F59E0B"},semantic:{success:"#10B981",warning:"#F59E0B",error:"#EF4444",info:"#3B82F6"},neutral:{white:"#FFFFFF",black:"#000000",gray:{50:"#F9FAFB",100:"#F3F4F6",200:"#E5E7EB",300:"#D1D5DB",400:"#9CA3AF",500:"#6B7280",600:"#4B5563",700:"#374151",800:"#1F2937",900:"#111827"}}},F={xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem","2xl":"3rem","3xl":"4rem","4xl":"6rem","5xl":"8rem"},C={fontFamily:{primary:'"NeueMontreal", system-ui, sans-serif',secondary:'"Scholar", Georgia, serif',sans:'"NeueMontreal", system-ui, sans-serif',serif:'"Scholar", Georgia, serif',mono:'"JetBrains Mono", Consolas, monospace'},fontSize:{xs:"0.75rem",sm:"0.875rem",base:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem"},fontWeight:{normal:"400",semibold:"600",bold:"700"},lineHeight:{tight:"1.25",normal:"1.5",relaxed:"1.75"}},k={colors:{primary:{50:"#fef5f1",100:"#fde8e0",200:"#fbd5c7",300:"#f7b79f",400:"#f18d68",500:v.brand.primary,600:"#a83b11",700:"#8b2f0e",800:"#73260d",900:"#5f210c",DEFAULT:v.brand.primary},secondary:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:v.brand.secondary,600:"#000000",700:"#000000",800:"#000000",900:"#000000",DEFAULT:v.brand.secondary}}};function E({children:r}){return e.jsx(o.HeroUIProvider,{children:r})}function T({color:r="primary",radius:d="full",...i}){return e.jsx(o.Button,{color:r,radius:d,...i})}function B(r){return e.jsx("div",{className:"w-full p-8",children:e.jsx("div",{className:"container mx-auto flex items-center justify-center",children:e.jsx(o.Alert,{description:"This component needs to be implemented using HeroUI Navbar, NavbarBrand, NavbarContent, and NavbarItem components. Include logo, navigation links, language selector dropdown, and authentication state.",title:"TODO: Implement Navbar Pattern",variant:"faded"})})})}var N;const O=typeof document<"u"?(N=n.useInsertionEffect)!==null&&N!==void 0?N:n.useLayoutEffect:()=>{};function S(r,d,i){let[m,b]=n.useState(r||d),u=n.useRef(m),h=n.useRef(r!==void 0),c=r!==void 0;n.useEffect(()=>{let a=h.current;a!==c&&process.env.NODE_ENV!=="production"&&console.warn(`WARN: A component changed from ${a?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}.`),h.current=c},[c]);let x=c?r:m;O(()=>{u.current=x});let[,g]=n.useReducer(()=>({}),{}),y=n.useCallback((a,...j)=>{let f=typeof a=="function"?a(u.current):a;Object.is(u.current,f)||(u.current=f,b(f),g(),i?.(f,...j))},[i]);return[x,y]}function A(r){return e.jsx("svg",{...r,fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:e.jsx(p.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 w=n.forwardRef(({color:r="primary",stepsCount:d=3,defaultStep:i=0,label:m,onStepChange:b,currentStep:u,hideProgressBars:h=!1,stepClassName:c,className:x,...g},y)=>{const[a,j]=S(u,i,b),f=n.useMemo(()=>{let l,t;const s=["[--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(r){case"primary":l="[--step-color:var(--heroui-primary)]",t="[--step-fg-color:var(--heroui-primary-foreground)]";break;case"secondary":l="[--step-color:var(--heroui-secondary)]",t="[--step-fg-color:var(--heroui-secondary-foreground)]";break;case"success":l="[--step-color:var(--heroui-success)]",t="[--step-fg-color:var(--heroui-success-foreground)]";break;case"warning":l="[--step-color:var(--heroui-warning)]",t="[--step-fg-color:var(--heroui-warning-foreground)]";break;case"danger":l="[--step-color:var(--heroui-danger)]",t="[--step-fg-color:var(--heroui-danger-foreground)]";break;case"default":l="[--step-color:var(--heroui-default)]",t="[--step-fg-color:var(--heroui-default-foreground)]";break;default:l="[--step-color:var(--heroui-primary)]",t="[--step-fg-color:var(--heroui-primary-foreground)]";break}return s.unshift(t),s.unshift(l),s},[r]);return e.jsxs("nav",{"aria-label":"Progress",className:"flex max-w-fit items-center overflow-x-auto",children:[m&&e.jsx("label",{className:"text-small text-default-foreground lg:text-medium font-light w-full me-3",children:m}),e.jsx("ol",{className:o.cn("flex flex-row flex-nowrap gap-x-3",f,x),children:Array.from({length:d})?.map((l,t)=>{const s=a===t?"active":a<t?"inactive":"complete";return e.jsx("li",{className:"relative flex w-full items-center pr-12",children:e.jsxs("button",{ref:y,"aria-current":s==="active"?"step":void 0,className:o.cn("group rounded-large flex w-full cursor-pointer flex-row items-center justify-center gap-x-3 py-2.5",c),onClick:()=>j(t),...g,children:[e.jsx("div",{className:"h-ful relative flex items-center",children:e.jsx(p.LazyMotion,{features:p.domAnimation,children:e.jsx(p.m.div,{animate:s,className:"relative",children:e.jsx(p.m.div,{animate:s,className:o.cn("border-medium text-large text-default-foreground relative flex h-[26px] w-[26px] items-center justify-center rounded-full font-semibold",{"shadow-lg":s==="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:e.jsx("div",{className:"flex items-center justify-center",children:s==="complete"?e.jsx(A,{className:"h-5 w-5 text-(--active-fg-color)"}):e.jsx("span",{})})})})})}),t<d-1&&!h&&e.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":t},children:e.jsx("div",{className:o.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":t<a})})})]},t)},t)})})]})});w.displayName="Stepper";function D(r){return e.jsx("footer",{className:"w-full py-12",children:e.jsx("div",{className:"container mx-auto px-6 flex items-center justify-center",children:e.jsx(o.Alert,{description:"This component needs to be implemented using HeroUI Link components. Include grid layout with link sections, logo, social media icons, and copyright text. Should be responsive and adapt to mobile/desktop.",title:"TODO: Implement Footer Pattern",variant:"faded"})})})}function $(r){return e.jsx("div",{className:"min-h-screen flex flex-col",children:e.jsx("div",{className:"flex-1 flex items-center justify-center p-12",children:e.jsx(o.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"})})})}function P(r){return e.jsx("div",{className:"min-h-screen flex flex-col",children:e.jsx("div",{className:"flex-1 flex items-center justify-center p-12",children:e.jsx(o.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"})})})}exports.Button=T;exports.ConfirmationPageTemplate=$;exports.EventDetailsTemplate=P;exports.Footer=D;exports.HeroUIProvider=E;exports.Navbar=B;exports.Stepper=w;exports.colors=v;exports.spacing=F;exports.theme=k;exports.typography=C;Object.keys(o).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(exports,r)&&Object.defineProperty(exports,r,{enumerable:!0,get:()=>o[r]})});
package/dist/index.d.ts CHANGED
@@ -7,8 +7,10 @@ export type { ColorToken } from './tokens';
7
7
  export { theme } from './theme';
8
8
  export type { Theme } from './theme';
9
9
  export { HeroUIProvider } from './providers';
10
+ export { Button } from './components';
11
+ export type { ButtonProps } from './components';
10
12
  export { Navbar, Stepper, Footer } from './patterns';
11
- export type { NavbarProps, NavbarLink, NavbarLanguage, StepperProps, Step, FooterProps, FooterSection, FooterLink, SocialLink, } from './patterns';
13
+ export type { NavbarProps, NavbarLink, NavbarLanguage, StepperProps, FooterProps, FooterSection, FooterLink, SocialLink, } from './patterns';
12
14
  export { ConfirmationPageTemplate, EventDetailsTemplate } from './templates';
13
15
  export type { ConfirmationPageTemplateProps, ConfirmationDetails, EventDetailsTemplateProps, EventInfo, } from './templates';
14
16
  export * from '@heroui/react';
package/dist/index.js CHANGED
@@ -1,8 +1,9 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import { HeroUIProvider as a, Alert as t } from "@heroui/react";
1
+ import { jsx as e, jsxs as F } from "react/jsx-runtime";
2
+ import { HeroUIProvider as E, Button as B, Alert as g, cn as p } from "@heroui/react";
3
3
  export * from "@heroui/react";
4
- import "react";
5
- const r = {
4
+ import h, { useState as $, useRef as C, useEffect as T, useReducer as D, useCallback as S } from "react";
5
+ import { LazyMotion as j, domAnimation as O, m as k } from "framer-motion";
6
+ const v = {
6
7
  brand: {
7
8
  primary: "#C14615",
8
9
  secondary: "#000000",
@@ -30,7 +31,7 @@ const r = {
30
31
  900: "#111827"
31
32
  }
32
33
  }
33
- }, l = {
34
+ }, R = {
34
35
  xs: "0.25rem",
35
36
  // 4px - Fine control (½ of base unit)
36
37
  sm: "0.5rem",
@@ -49,7 +50,7 @@ const r = {
49
50
  // 96px
50
51
  "5xl": "8rem"
51
52
  // 128px
52
- }, c = {
53
+ }, V = {
53
54
  fontFamily: {
54
55
  primary: '"NeueMontreal", system-ui, sans-serif',
55
56
  secondary: '"Scholar", Georgia, serif',
@@ -90,7 +91,7 @@ const r = {
90
91
  normal: "1.5",
91
92
  relaxed: "1.75"
92
93
  }
93
- }, m = {
94
+ }, W = {
94
95
  colors: {
95
96
  primary: {
96
97
  50: "#fef5f1",
@@ -98,13 +99,13 @@ const r = {
98
99
  200: "#fbd5c7",
99
100
  300: "#f7b79f",
100
101
  400: "#f18d68",
101
- 500: r.brand.primary,
102
+ 500: v.brand.primary,
102
103
  // #C14615
103
104
  600: "#a83b11",
104
105
  700: "#8b2f0e",
105
106
  800: "#73260d",
106
107
  900: "#5f210c",
107
- DEFAULT: r.brand.primary
108
+ DEFAULT: v.brand.primary
108
109
  },
109
110
  secondary: {
110
111
  50: "#f9fafb",
@@ -112,22 +113,25 @@ const r = {
112
113
  200: "#e5e7eb",
113
114
  300: "#d1d5db",
114
115
  400: "#9ca3af",
115
- 500: r.brand.secondary,
116
+ 500: v.brand.secondary,
116
117
  // #000000
117
118
  600: "#000000",
118
119
  700: "#000000",
119
120
  800: "#000000",
120
121
  900: "#000000",
121
- DEFAULT: r.brand.secondary
122
+ DEFAULT: v.brand.secondary
122
123
  }
123
124
  }
124
125
  };
125
- function d({ children: n }) {
126
- return /* @__PURE__ */ e(a, { children: n });
126
+ function z({ children: r }) {
127
+ return /* @__PURE__ */ e(E, { children: r });
127
128
  }
128
- function p(n) {
129
+ function G({ color: r = "primary", radius: c = "full", ...l }) {
130
+ return /* @__PURE__ */ e(B, { color: r, radius: c, ...l });
131
+ }
132
+ function J(r) {
129
133
  return /* @__PURE__ */ e("div", { className: "w-full p-8", children: /* @__PURE__ */ e("div", { className: "container mx-auto flex items-center justify-center", children: /* @__PURE__ */ e(
130
- t,
134
+ g,
131
135
  {
132
136
  description: "This component needs to be implemented using HeroUI Navbar, NavbarBrand, NavbarContent, and NavbarItem components. Include logo, navigation links, language selector dropdown, and authentication state.",
133
137
  title: "TODO: Implement Navbar Pattern",
@@ -135,19 +139,183 @@ function p(n) {
135
139
  }
136
140
  ) }) });
137
141
  }
138
- function f(n) {
139
- return /* @__PURE__ */ e("div", { className: "w-full p-8", children: /* @__PURE__ */ e("div", { className: "container mx-auto flex items-center justify-center", children: /* @__PURE__ */ e(
140
- t,
142
+ var w;
143
+ const A = typeof document < "u" ? (w = h.useInsertionEffect) !== null && w !== void 0 ? w : h.useLayoutEffect : () => {
144
+ };
145
+ function I(r, c, l) {
146
+ let [f, b] = $(r || c), s = C(f), u = C(r !== void 0), i = r !== void 0;
147
+ T(() => {
148
+ let o = u.current;
149
+ o !== i && process.env.NODE_ENV !== "production" && console.warn(`WARN: A component changed from ${o ? "controlled" : "uncontrolled"} to ${i ? "controlled" : "uncontrolled"}.`), u.current = i;
150
+ }, [
151
+ i
152
+ ]);
153
+ let m = i ? r : f;
154
+ A(() => {
155
+ s.current = m;
156
+ });
157
+ let [, x] = D(() => ({}), {}), y = S((o, ...N) => {
158
+ let d = typeof o == "function" ? o(s.current) : o;
159
+ Object.is(s.current, d) || (s.current = d, b(d), x(), l?.(d, ...N));
160
+ }, [
161
+ l
162
+ ]);
163
+ return [
164
+ m,
165
+ y
166
+ ];
167
+ }
168
+ function L(r) {
169
+ return /* @__PURE__ */ e("svg", { ...r, fill: "none", stroke: "currentColor", strokeWidth: 2, viewBox: "0 0 24 24", children: /* @__PURE__ */ e(
170
+ k.path,
141
171
  {
142
- description: "This component needs to be implemented with visual step indicators, connecting lines, and support for both horizontal and vertical orientations. Include completed (green), current (blue), and upcoming (gray) states.",
143
- title: "TODO: Implement Stepper Pattern",
144
- variant: "faded"
172
+ animate: { pathLength: 1 },
173
+ d: "M5 13l4 4L19 7",
174
+ initial: { pathLength: 0 },
175
+ strokeLinecap: "round",
176
+ strokeLinejoin: "round",
177
+ transition: {
178
+ delay: 0.2,
179
+ type: "tween",
180
+ ease: "easeOut",
181
+ duration: 0.3
182
+ }
145
183
  }
146
- ) }) });
184
+ ) });
147
185
  }
148
- function u(n) {
186
+ const U = h.forwardRef(
187
+ ({
188
+ color: r = "primary",
189
+ stepsCount: c = 3,
190
+ defaultStep: l = 0,
191
+ label: f,
192
+ onStepChange: b,
193
+ currentStep: s,
194
+ hideProgressBars: u = !1,
195
+ stepClassName: i,
196
+ className: m,
197
+ ...x
198
+ }, y) => {
199
+ const [o, N] = I(s, l, b), d = h.useMemo(() => {
200
+ let a, t;
201
+ const n = [
202
+ "[--active-fg-color:hsl(var(--step-fg-color))]",
203
+ "[--active-border-color:hsl(var(--step-color))]",
204
+ "[--active-color:hsl(var(--step-color))]",
205
+ "[--complete-background-color:hsl(var(--step-color))]",
206
+ "[--complete-border-color:hsl(var(--step-color))]",
207
+ "[--inactive-border-color:hsl(var(--heroui-default-300))]",
208
+ "[--inactive-color:hsl(var(--heroui-default-300))]"
209
+ ];
210
+ switch (r) {
211
+ case "primary":
212
+ a = "[--step-color:var(--heroui-primary)]", t = "[--step-fg-color:var(--heroui-primary-foreground)]";
213
+ break;
214
+ case "secondary":
215
+ a = "[--step-color:var(--heroui-secondary)]", t = "[--step-fg-color:var(--heroui-secondary-foreground)]";
216
+ break;
217
+ case "success":
218
+ a = "[--step-color:var(--heroui-success)]", t = "[--step-fg-color:var(--heroui-success-foreground)]";
219
+ break;
220
+ case "warning":
221
+ a = "[--step-color:var(--heroui-warning)]", t = "[--step-fg-color:var(--heroui-warning-foreground)]";
222
+ break;
223
+ case "danger":
224
+ a = "[--step-color:var(--heroui-danger)]", t = "[--step-fg-color:var(--heroui-danger-foreground)]";
225
+ break;
226
+ case "default":
227
+ a = "[--step-color:var(--heroui-default)]", t = "[--step-fg-color:var(--heroui-default-foreground)]";
228
+ break;
229
+ default:
230
+ a = "[--step-color:var(--heroui-primary)]", t = "[--step-fg-color:var(--heroui-primary-foreground)]";
231
+ break;
232
+ }
233
+ return n.unshift(t), n.unshift(a), n;
234
+ }, [r]);
235
+ return /* @__PURE__ */ F("nav", { "aria-label": "Progress", className: "flex max-w-fit items-center overflow-x-auto", children: [
236
+ f && /* @__PURE__ */ e("label", { className: "text-small text-default-foreground lg:text-medium font-light w-full me-3", children: f }),
237
+ /* @__PURE__ */ e("ol", { className: p("flex flex-row flex-nowrap gap-x-3", d, m), children: Array.from({ length: c })?.map((a, t) => {
238
+ const n = o === t ? "active" : o < t ? "inactive" : "complete";
239
+ return /* @__PURE__ */ e("li", { className: "relative flex w-full items-center pr-12", children: /* @__PURE__ */ F(
240
+ "button",
241
+ {
242
+ ref: y,
243
+ "aria-current": n === "active" ? "step" : void 0,
244
+ className: p(
245
+ "group rounded-large flex w-full cursor-pointer flex-row items-center justify-center gap-x-3 py-2.5",
246
+ i
247
+ ),
248
+ onClick: () => N(t),
249
+ ...x,
250
+ children: [
251
+ /* @__PURE__ */ e("div", { className: "h-ful relative flex items-center", children: /* @__PURE__ */ e(j, { features: O, children: /* @__PURE__ */ e(k.div, { animate: n, className: "relative", children: /* @__PURE__ */ e(
252
+ k.div,
253
+ {
254
+ animate: n,
255
+ className: p(
256
+ "border-medium text-large text-default-foreground relative flex h-[26px] w-[26px] items-center justify-center rounded-full font-semibold",
257
+ {
258
+ "shadow-lg": n === "complete"
259
+ }
260
+ ),
261
+ initial: !1,
262
+ transition: { duration: 0.25 },
263
+ variants: {
264
+ inactive: {
265
+ backgroundColor: "transparent",
266
+ borderColor: "var(--inactive-border-color)",
267
+ color: "var(--inactive-color)"
268
+ },
269
+ active: {
270
+ backgroundColor: "transparent",
271
+ borderColor: "var(--active-border-color)",
272
+ color: "var(--active-color)"
273
+ },
274
+ complete: {
275
+ backgroundColor: "var(--complete-background-color)",
276
+ borderColor: "var(--complete-border-color)",
277
+ color: "var(--active-fg-color)"
278
+ }
279
+ },
280
+ children: /* @__PURE__ */ e("div", { className: "flex items-center justify-center", children: n === "complete" ? /* @__PURE__ */ e(L, { className: "h-5 w-5 text-(--active-fg-color)" }) : /* @__PURE__ */ e("span", {}) })
281
+ }
282
+ ) }) }) }),
283
+ t < c - 1 && !u && /* @__PURE__ */ e(
284
+ "div",
285
+ {
286
+ "aria-hidden": "true",
287
+ className: "pointer-events-none absolute inset-x-0 left-[26px] w-[calc(100%-13px)] flex-none items-center",
288
+ style: {
289
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
290
+ // @ts-expect-error
291
+ "--idx": t
292
+ },
293
+ children: /* @__PURE__ */ e(
294
+ "div",
295
+ {
296
+ className: p(
297
+ "bg-default-200 relative h-0.5 w-full transition-colors duration-300",
298
+ "after:absolute after:block after:h-full after:w-0 after:bg-(--active-border-color) after:transition-[width] after:duration-300 after:content-['']",
299
+ {
300
+ "after:w-full": t < o
301
+ }
302
+ )
303
+ }
304
+ )
305
+ }
306
+ )
307
+ ]
308
+ },
309
+ t
310
+ ) }, t);
311
+ }) })
312
+ ] });
313
+ }
314
+ );
315
+ U.displayName = "Stepper";
316
+ function q(r) {
149
317
  return /* @__PURE__ */ e("footer", { className: "w-full py-12", children: /* @__PURE__ */ e("div", { className: "container mx-auto px-6 flex items-center justify-center", children: /* @__PURE__ */ e(
150
- t,
318
+ g,
151
319
  {
152
320
  description: "This component needs to be implemented using HeroUI Link components. Include grid layout with link sections, logo, social media icons, and copyright text. Should be responsive and adapt to mobile/desktop.",
153
321
  title: "TODO: Implement Footer Pattern",
@@ -155,9 +323,9 @@ function u(n) {
155
323
  }
156
324
  ) }) });
157
325
  }
158
- function b(n) {
326
+ function K(r) {
159
327
  return /* @__PURE__ */ e("div", { className: "min-h-screen flex flex-col", children: /* @__PURE__ */ e("div", { className: "flex-1 flex items-center justify-center p-12", children: /* @__PURE__ */ e(
160
- t,
328
+ g,
161
329
  {
162
330
  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.",
163
331
  title: "TODO: Implement ConfirmationPageTemplate",
@@ -166,9 +334,9 @@ function b(n) {
166
334
  }
167
335
  ) }) });
168
336
  }
169
- function x(n) {
337
+ function Q(r) {
170
338
  return /* @__PURE__ */ e("div", { className: "min-h-screen flex flex-col", children: /* @__PURE__ */ e("div", { className: "flex-1 flex items-center justify-center p-12", children: /* @__PURE__ */ e(
171
- t,
339
+ g,
172
340
  {
173
341
  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.",
174
342
  title: "TODO: Implement EventDetailsTemplate",
@@ -178,14 +346,15 @@ function x(n) {
178
346
  ) }) });
179
347
  }
180
348
  export {
181
- b as ConfirmationPageTemplate,
182
- x as EventDetailsTemplate,
183
- u as Footer,
184
- d as HeroUIProvider,
185
- p as Navbar,
186
- f as Stepper,
187
- r as colors,
188
- l as spacing,
189
- m as theme,
190
- c as typography
349
+ G as Button,
350
+ K as ConfirmationPageTemplate,
351
+ Q as EventDetailsTemplate,
352
+ q as Footer,
353
+ z as HeroUIProvider,
354
+ J as Navbar,
355
+ U as Stepper,
356
+ v as colors,
357
+ R as spacing,
358
+ W as theme,
359
+ V as typography
191
360
  };
@@ -1,28 +1,209 @@
1
+ import { ButtonProps } from '@heroui/react';
2
+ import { default as React } from 'react';
1
3
  /**
2
- * Stepper Pattern
3
- * TODO: Implement visual composition for step-by-step processes
4
- *
5
- * Requirements:
6
- * - Visual step indicators (completed, current, upcoming)
7
- * - Horizontal and vertical orientation
8
- * - Connecting lines between steps
9
- * - Clickable steps (optional)
10
- * - States: completed (green), current (blue), upcoming (gray)
11
- * - Show number or checkmark based on state
12
- * - Externally controlled state via props
13
- * - No business logic
14
- * - Strict TypeScript
4
+ * Props for the Stepper component
5
+ *
6
+ * @interface StepperProps
7
+ * @extends {React.HTMLAttributes<HTMLButtonElement>}
15
8
  */
16
- export interface Step {
17
- id: string;
18
- label: string;
19
- description?: string;
20
- }
21
- export interface StepperProps {
22
- steps: Step[];
23
- currentStep: number;
24
- orientation?: 'horizontal' | 'vertical';
25
- onStepClick?: (stepIndex: number) => void;
26
- allowStepClick?: boolean;
9
+ export interface StepperProps extends React.HTMLAttributes<HTMLButtonElement> {
10
+ /**
11
+ * Optional label displayed before the stepper to provide context.
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * <Stepper label="Step 2 of 4" stepsCount={4} />
16
+ * ```
17
+ */
18
+ label?: string;
19
+ /**
20
+ * Total number of steps in the sequence.
21
+ *
22
+ * @default 3
23
+ * @minimum 1
24
+ *
25
+ * @example
26
+ * ```tsx
27
+ * <Stepper stepsCount={5} /> // Creates 5 steps
28
+ * ```
29
+ */
30
+ stepsCount?: number;
31
+ /**
32
+ * The color theme for the stepper.
33
+ * Applies to active and completed steps.
34
+ *
35
+ * @default "primary"
36
+ *
37
+ * @example
38
+ * ```tsx
39
+ * <Stepper color="success" stepsCount={3} />
40
+ * ```
41
+ */
42
+ color?: ButtonProps['color'];
43
+ /**
44
+ * The current active step index (zero-based).
45
+ * Use this prop for controlled mode.
46
+ *
47
+ * @controlled
48
+ *
49
+ * @example
50
+ * ```tsx
51
+ * const [step, setStep] = useState(0);
52
+ * <Stepper currentStep={step} onStepChange={setStep} />
53
+ * ```
54
+ */
55
+ currentStep?: number;
56
+ /**
57
+ * The initial step index for uncontrolled mode.
58
+ *
59
+ * @default 0
60
+ * @uncontrolled
61
+ *
62
+ * @example
63
+ * ```tsx
64
+ * <Stepper defaultStep={2} stepsCount={5} />
65
+ * ```
66
+ */
67
+ defaultStep?: number;
68
+ /**
69
+ * Whether to hide the connecting lines between steps.
70
+ *
71
+ * @default false
72
+ *
73
+ * @example
74
+ * ```tsx
75
+ * <Stepper hideProgressBars stepsCount={4} /> // No progress bars
76
+ * ```
77
+ */
78
+ hideProgressBars?: boolean;
79
+ /**
80
+ * Custom CSS class for the stepper wrapper (ol element).
81
+ *
82
+ * @example
83
+ * ```tsx
84
+ * <Stepper className="gap-x-6" stepsCount={3} />
85
+ * ```
86
+ */
87
+ className?: string;
88
+ /**
89
+ * Custom CSS class applied to each individual step button.
90
+ *
91
+ * @example
92
+ * ```tsx
93
+ * <Stepper
94
+ * stepClassName="hover:bg-gray-100"
95
+ * stepsCount={3}
96
+ * />
97
+ * ```
98
+ */
99
+ stepClassName?: string;
100
+ /**
101
+ * Callback fired when the active step changes.
102
+ * Used in controlled mode.
103
+ *
104
+ * @param stepIndex - The new step index (zero-based)
105
+ *
106
+ * @example
107
+ * ```tsx
108
+ * <Stepper
109
+ * onStepChange={(index) => console.log('Step:', index)}
110
+ * stepsCount={4}
111
+ * />
112
+ * ```
113
+ */
114
+ onStepChange?: (stepIndex: number) => void;
27
115
  }
28
- export declare function Stepper(_props: StepperProps): import("react/jsx-runtime").JSX.Element;
116
+ /**
117
+ * Stepper - A horizontal progress indicator for multi-step processes.
118
+ *
119
+ * @description
120
+ * The Stepper component displays a sequence of numbered steps that indicate progress
121
+ * through a multi-step workflow. Each step can be clicked to navigate between steps,
122
+ * and completed steps are marked with a checkmark.
123
+ *
124
+ * @component
125
+ *
126
+ * @features
127
+ * - **Three step states**: inactive (upcoming), active (current), complete (finished)
128
+ * - **Interactive navigation**: Click any step to jump to it
129
+ * - **Animated transitions**: Smooth color and checkmark animations
130
+ * - **Progress indicators**: Optional connecting lines show completion progress
131
+ * - **Controlled & uncontrolled**: Works in both modes
132
+ * - **Customizable colors**: Supports all HeroUI color variants
133
+ * - **Accessible**: Full ARIA support and keyboard navigation
134
+ *
135
+ * @accessibility
136
+ * - Uses semantic HTML (`<nav>`, `<ol>`, `<li>`)
137
+ * - Includes `aria-label="Progress"` on navigation
138
+ * - Active step marked with `aria-current="step"`
139
+ * - All steps are keyboard accessible via tab navigation
140
+ *
141
+ * @performance
142
+ * - Lazy loads Framer Motion animations
143
+ * - Memoizes color calculations
144
+ * - Uses CSS variables for theming
145
+ *
146
+ * @example
147
+ * **Basic uncontrolled stepper**
148
+ * ```tsx
149
+ * <Stepper stepsCount={4} defaultStep={0} />
150
+ * ```
151
+ *
152
+ * @example
153
+ * **Controlled stepper with callback**
154
+ * ```tsx
155
+ * function MyForm() {
156
+ * const [currentStep, setCurrentStep] = useState(0);
157
+ *
158
+ * return (
159
+ * <Stepper
160
+ * currentStep={currentStep}
161
+ * onStepChange={setCurrentStep}
162
+ * stepsCount={4}
163
+ * color="primary"
164
+ * label={`Step ${currentStep + 1} of 4`}
165
+ * />
166
+ * );
167
+ * }
168
+ * ```
169
+ *
170
+ * @example
171
+ * **With validation (prevent forward navigation)**
172
+ * ```tsx
173
+ * function ValidatedStepper() {
174
+ * const [step, setStep] = useState(0);
175
+ * const [completed, setCompleted] = useState<number[]>([]);
176
+ *
177
+ * const handleStepChange = (newStep: number) => {
178
+ * // Only allow navigation to completed steps or current step
179
+ * if (newStep <= step || completed.includes(newStep)) {
180
+ * setStep(newStep);
181
+ * }
182
+ * };
183
+ *
184
+ * return (
185
+ * <Stepper
186
+ * currentStep={step}
187
+ * onStepChange={handleStepChange}
188
+ * stepsCount={5}
189
+ * />
190
+ * );
191
+ * }
192
+ * ```
193
+ *
194
+ * @example
195
+ * **Custom styling**
196
+ * ```tsx
197
+ * <Stepper
198
+ * stepsCount={3}
199
+ * color="success"
200
+ * className="gap-x-8"
201
+ * stepClassName="hover:bg-gray-50 rounded-xl"
202
+ * hideProgressBars
203
+ * />
204
+ * ```
205
+ *
206
+ * @see {@link StepperProps} for all available props
207
+ * @see {@link https://storybook.heroui.com Storybook} for interactive examples
208
+ */
209
+ export declare const Stepper: React.ForwardRefExoticComponent<StepperProps & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Stepper Component Tests
3
+ */
4
+ export {};
@@ -0,0 +1 @@
1
+ export declare function FormExampleStepper(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { StepperProps } from '../Stepper';
2
+ export declare function InteractiveStepper(args: StepperProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function ValidationStepper(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ export { InteractiveStepper } from './InteractiveStepper';
2
+ export { FormExampleStepper } from './FormExampleStepper';
3
+ export { ValidationStepper } from './ValidationStepper';
@@ -1,2 +1,2 @@
1
1
  export { Stepper } from './Stepper';
2
- export type { StepperProps, Step } from './Stepper';
2
+ export type { StepperProps } from './Stepper';
@@ -2,5 +2,5 @@ export { Navbar } from './Navbar';
2
2
  export { Stepper } from './Stepper';
3
3
  export { Footer } from './Footer';
4
4
  export type { NavbarProps, NavbarLink, NavbarLanguage } from './Navbar';
5
- export type { StepperProps, Step } from './Stepper';
5
+ export type { StepperProps } from './Stepper';
6
6
  export type { FooterProps, FooterSection, FooterLink, SocialLink } from './Footer';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@veevarts/design-system",
3
3
  "private": false,
4
- "version": "0.1.16",
4
+ "version": "0.1.17",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -14,6 +14,12 @@
14
14
  "build": "vite build",
15
15
  "lint": "eslint .",
16
16
  "preview": "vite preview",
17
+ "test": "vitest --run",
18
+ "test:watch": "vitest",
19
+ "test:unit": "vitest --project unit --run",
20
+ "test:unit:watch": "vitest --project unit",
21
+ "test:ui": "vitest --ui",
22
+ "test:coverage": "vitest --coverage --run",
17
23
  "storybook": "storybook dev -p 6006",
18
24
  "build-storybook": "storybook build",
19
25
  "deploy-storybook": "npm run build-storybook && npx vercel storybook-static --prod"
@@ -25,21 +31,21 @@
25
31
  "react-dom": "^18.0.0 || ^19.0.0"
26
32
  },
27
33
  "dependencies": {
28
- "vite-plugin-dts": "latest",
29
- "vite-plugin-css-injected-by-js": "latest"
34
+ "vite-plugin-css-injected-by-js": "latest",
35
+ "vite-plugin-dts": "latest"
30
36
  },
31
37
  "devDependencies": {
32
- "@heroui/react": "^2.8.7",
33
- "framer-motion": "^11.15.0",
34
- "react": "19.2.3",
35
- "react-dom": "19.2.3",
36
38
  "@chromatic-com/storybook": "^4.1.3",
37
39
  "@eslint/js": "^9.39.1",
40
+ "@heroui/react": "^2.8.7",
38
41
  "@storybook/addon-a11y": "^10.0.8",
39
42
  "@storybook/addon-docs": "^10.0.8",
40
43
  "@storybook/addon-onboarding": "^10.0.8",
41
44
  "@storybook/addon-vitest": "^10.0.8",
42
45
  "@storybook/react-vite": "^10.0.8",
46
+ "@testing-library/jest-dom": "^6.9.1",
47
+ "@testing-library/react": "^16.3.1",
48
+ "@testing-library/user-event": "^14.6.1",
43
49
  "@types/node": "^24.10.1",
44
50
  "@types/react": "^19.2.5",
45
51
  "@types/react-dom": "^19.2.3",
@@ -51,9 +57,13 @@
51
57
  "eslint-plugin-react-hooks": "^7.0.1",
52
58
  "eslint-plugin-react-refresh": "^0.4.24",
53
59
  "eslint-plugin-storybook": "^10.0.8",
60
+ "framer-motion": "^11.15.0",
54
61
  "globals": "^16.5.0",
62
+ "jsdom": "^27.4.0",
55
63
  "playwright": "^1.56.1",
56
64
  "postcss": "^8.5.6",
65
+ "react": "19.2.3",
66
+ "react-dom": "19.2.3",
57
67
  "storybook": "^10.0.8",
58
68
  "tailwindcss": "^3.4.19",
59
69
  "typescript": "~5.9.3",