@tribepad/themis 1.6.12 → 1.8.0
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/CHANGELOG.md +20 -0
- package/dist/elements/Tabs/Tabs.d.ts +1 -1
- package/dist/elements/Tabs/Tabs.d.ts.map +1 -1
- package/dist/elements/Tabs/Tabs.types.d.ts +7 -0
- package/dist/elements/Tabs/Tabs.types.d.ts.map +1 -1
- package/dist/elements/Tabs/index.js +1 -1
- package/dist/elements/Tabs/index.js.map +1 -1
- package/dist/elements/Tabs/index.mjs +1 -1
- package/dist/elements/Tabs/index.mjs.map +1 -1
- package/dist/elements/Timeline/Timeline.d.ts +35 -0
- package/dist/elements/Timeline/Timeline.d.ts.map +1 -0
- package/dist/elements/Timeline/Timeline.styles.d.ts +41 -0
- package/dist/elements/Timeline/Timeline.styles.d.ts.map +1 -0
- package/dist/elements/Timeline/Timeline.types.d.ts +177 -0
- package/dist/elements/Timeline/Timeline.types.d.ts.map +1 -0
- package/dist/elements/Timeline/TimelineContext.d.ts +25 -0
- package/dist/elements/Timeline/TimelineContext.d.ts.map +1 -0
- package/dist/elements/Timeline/TimelineItem.d.ts +22 -0
- package/dist/elements/Timeline/TimelineItem.d.ts.map +1 -0
- package/dist/elements/Timeline/index.d.ts +14 -0
- package/dist/elements/Timeline/index.d.ts.map +1 -0
- package/dist/elements/Timeline/index.js +3 -0
- package/dist/elements/Timeline/index.js.map +1 -0
- package/dist/elements/Timeline/index.mjs +3 -0
- package/dist/elements/Timeline/index.mjs.map +1 -0
- package/dist/elements/index.d.ts +2 -0
- package/dist/elements/index.d.ts.map +1 -1
- package/dist/elements/index.js +1 -1
- package/dist/elements/index.js.map +1 -1
- package/dist/elements/index.mjs +1 -1
- package/dist/elements/index.mjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/elements/Tabs/Tabs.stories.tsx +63 -0
- package/src/elements/Timeline/Timeline.stories.tsx +244 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,26 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.8.0] - 2026-06-22
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- **`Tabs` stepper variant: per-step `errorDescription` on `Tab`.** A new optional `errorDescription` prop flags a step as errored — its presence is what triggers the error state (no separate boolean). The step circle renders in destructive colours with an alert icon instead of its number/checkmark, taking visual precedence over the active and completed states, and the description appears as a tooltip on hover or keyboard focus of the tab. The tooltip is built on the existing React Aria-based `Tooltip` (wired to the whole tab, so no extra tab stop is introduced and roving-tabindex is preserved) and is WCAG 2.2 AAA-compliant — Escape-dismissible, hoverable, and persistent (SC 1.4.13). The error state is also announced to screen readers via the tab's `aria-describedby` and an `sr-only` "Step N, error:" prefix, so it never relies on hover or colour alone. Applies to both horizontal and vertical orientations (tooltip placed above the step); ignored by non-stepper variants. Backwards-compatible.
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
- **`Tabs` vertical stepper: the ring now appears only on the active step.** Previously both the active and completed circles drew the primary ring; completed steps now keep the primary fill without the ring, so the ring unambiguously marks the current step.
|
|
15
|
+
|
|
16
|
+
## [1.7.0] - 2026-06-22
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
- **New `Timeline` component** — an accessible, chronological feed of events built on the compound pattern (`<Timeline>` + `<Timeline.Item>`) and rendered as a semantic `<ol>`/`<li>` (WCAG 2.2 AAA). Two axes of variation: `orientation` (`vertical` (default) | `horizontal`) × `marker` (`dot` | `basic` | `icon`). The `basic` style draws a continuous primary rail the full length of the timeline with a short primary stub branching into each item; `dot`/`icon` place a marker per event with a muted connector. Connector lines and markers are decorative (`aria-hidden`); meaning comes from the text.
|
|
20
|
+
- **Data & dates.** Events enter as `<Timeline.Item>` children. Each item takes `date` (`Date | string | number`), rendered inside `<time dateTime>`. Date granularity (hour/day/month/year) is controlled with `dateFormatOptions` (`Intl.DateTimeFormatOptions`, default `{ year: 'numeric', month: 'long' }` → "April 2025"), with `locale`, a per-item `dateFormatOptions` override, and a `formatDate` render override; a non-date `label` is supported as a fallback. A single `Intl.DateTimeFormat` instance is memoised at the root and shared by all items.
|
|
21
|
+
- **Body precedence.** `title`/`description` cover the common case; passing `children` supersedes them (dev-only warning if both are given) so richer item content — e.g. an activity-log row with an avatar and message bubble — can be composed via the `icon` slot + `children` body without a dedicated variant.
|
|
22
|
+
- **Responsive.** Horizontal timelines auto-collapse to vertical below `collapseBelow` (default `640`px, container-query based; pass `false` to disable). Wide horizontal timelines stay keyboard-scrollable.
|
|
23
|
+
- **Pagination.** Server/consumer-fed via `onLoadMore` / `hasMore` / `isLoadingMore` and a built-in "Show more" button (`loadMoreLabel`); the component renders every item it is given (no client-side windowing, which would hide content from find-in-page and screen readers) and uses `content-visibility: auto` per item for large-list performance. Focus stays on the button across loads and moves to the first new item when the final load removes it; a `role="status"` live region announces on user-initiated load only.
|
|
24
|
+
- **Navigation.** Imperative `ref` handle exposes `scrollToItem(id)` and `focusItem(id)` (smooth scrolling honours `prefers-reduced-motion`).
|
|
25
|
+
- **Interactive items.** `href` or `onPress` makes an item actionable (real `<a>`/`<button>`, 44px target, visible focus ring); hovering/focusing highlights the marker and shows a roomy background that doesn't shift the text. An optional `emptyState` slot renders when there are no items, and `titleHeadingLevel` (`'p'` default, or `h2`–`h6`) controls title semantics. There is **no** "active"/selected-item concept.
|
|
26
|
+
- New exports: `Timeline`, `TimelineItem`, `useTimelineContext`, the `timeline*Variants` CVA functions, `Timeline*Schema` schemas, and the `TimelineProps` / `TimelineItemProps` / `TimelineHandle` / orientation & marker types.
|
|
27
|
+
|
|
8
28
|
## [1.6.12] - 2026-06-22
|
|
9
29
|
|
|
10
30
|
### Fixed
|
|
@@ -110,7 +110,7 @@ declare namespace TabListComponent {
|
|
|
110
110
|
* @see PRD.md FR-013 (Icon Support)
|
|
111
111
|
* @see PRD.md FR-014 (Link-based Tabs)
|
|
112
112
|
*/
|
|
113
|
-
declare function TabComponent({ children, id, isDisabled, href, target, rel, download, completed, sublabel, className, ...props }: TabProps): import("react").JSX.Element;
|
|
113
|
+
declare function TabComponent({ children, id, isDisabled, href, target, rel, download, completed, sublabel, errorDescription, className, ...props }: TabProps): import("react").JSX.Element;
|
|
114
114
|
declare namespace TabComponent {
|
|
115
115
|
var displayName: string;
|
|
116
116
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../src/elements/Tabs/Tabs.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../src/elements/Tabs/Tabs.tsx"],"names":[],"mappings":"AAgEA,OAAO,KAAK,EACV,SAAS,EACT,WAAW,EAEX,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,QAAQ,EACR,aAAa,EACd,MAAM,cAAc,CAAC;AAsEtB;;;;;GAKG;AACH,eAAO,MAAM,eAAe;;;;8EAyC3B,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,WAAW;;;8EA8DvB,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,qBAAqB;;8EAiBjC,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sBAAsB;;8EAiBlC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,2FAU5B,CAAC;AAMF;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,iBAAS,QAAQ,CAAC,EAChB,QAAQ,EACR,OAAmB,EACnB,WAAW,EACX,kBAAkB,EAClB,iBAAiB,EACjB,WAA0B,EAC1B,kBAAgC,EAChC,UAAkB,EAClB,YAAY,EACZ,QAAQ,EAAE,YAAY,EACtB,SAAkB,EAClB,UAAU,EACV,SAAS,EACT,GAAG,KAAK,EACT,EAAE,SAAS,+BAsDX;kBArEQ,QAAQ;;;AAyEjB;;;;;;;;GAQG;AACH,iBAAS,gBAAgB,CAAC,EACxB,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACT,EAAE,YAAY,+BA8Cd;kBAlDQ,gBAAgB;;;AAsDzB;;;;;;;;;;GAUG;AACH,iBAAS,YAAY,CAAC,EACpB,QAAQ,EACR,EAAE,EACF,UAAkB,EAClB,IAAI,EACJ,MAAM,EACN,GAAG,EACH,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,gBAAgB,EAChB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,QAAQ,+BAsWV;kBAnXQ,YAAY;;;AAuXrB;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,iBAAS,iBAAiB,CAAC,EACzB,QAAQ,EACR,EAAE,EACF,gBAAwB,EACxB,aAAqB,EACrB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,aAAa,+BA2Ef;kBAlFQ,iBAAiB;;;AA0F1B;;;;;;;;;GASG;AACH,eAAO,MAAM,IAAI,iBAAW,CAAC;AAC7B,eAAO,MAAM,OAAO,yBAAmB,CAAC;AACxC,eAAO,MAAM,GAAG,qBAAe,CAAC;AAChC,eAAO,MAAM,QAAQ,0BAAoB,CAAC;AAG1C,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,cAAc,EAAE,gBAAgB,EAAE,YAAY,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -201,6 +201,7 @@ export declare const TabPropsSchema: z.ZodObject<{
|
|
|
201
201
|
download: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>;
|
|
202
202
|
completed: z.ZodOptional<z.ZodBoolean>;
|
|
203
203
|
sublabel: z.ZodOptional<z.ZodCustom<ReactNode, ReactNode>>;
|
|
204
|
+
errorDescription: z.ZodOptional<z.ZodCustom<ReactNode, ReactNode>>;
|
|
204
205
|
children: z.ZodCustom<ReactNode, ReactNode>;
|
|
205
206
|
}, z.core.$strip>;
|
|
206
207
|
export interface TabProps {
|
|
@@ -220,6 +221,12 @@ export interface TabProps {
|
|
|
220
221
|
completed?: boolean;
|
|
221
222
|
/** Stepper variant only: small secondary label beneath the tab label (e.g. "Current step"). */
|
|
222
223
|
sublabel?: ReactNode;
|
|
224
|
+
/**
|
|
225
|
+
* Stepper variant only: when set, marks this step as errored (destructive circle +
|
|
226
|
+
* alert icon, taking precedence over active/completed) and shows this text as a
|
|
227
|
+
* tooltip on hover/focus of the tab. Announced to screen readers via aria-describedby.
|
|
228
|
+
*/
|
|
229
|
+
errorDescription?: ReactNode;
|
|
223
230
|
}
|
|
224
231
|
/**
|
|
225
232
|
* TabPanel component props schema
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.types.d.ts","sourceRoot":"","sources":["../../../src/elements/Tabs/Tabs.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5C;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB;;;;;EAAkD,CAAC;AACjF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB;;;EAA8B,CAAC;AAClE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,oBAAoB;;;;EAAkC,CAAC;AACpE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE;;;;GAIG;AACH,eAAO,MAAM,qBAAqB;;;EAAqC,CAA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AE,SAAS,CAAC;IACrB,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;;;GAIG;AACH,eAAO,MAAM,0BAA0B;;;;;EAA0C,CAAC;AAClF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;+BAQT,IAAI,QAAJ,IAAI;;iBAI5B,CAAC;AAEH,MAAM,WAAW,gBAAgB;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,oBAAoB,CAAC;IAChC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
'use strict';var react=require('react'),lucideReact=require('lucide-react'),reactAriaComponents=require('react-aria-components'),classVarianceAuthority=require('class-variance-authority'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),jsxRuntime=require('react/jsx-runtime'),zod=require('zod');function s(...a){return tailwindMerge.twMerge(clsx.clsx(a))}function Y(a,o){return !(a===false||o)}var _="(prefers-reduced-motion: reduce)";function ge(){return typeof window>"u"?false:window.matchMedia(_).matches}function G(){let[a,o]=react.useState(ge);return react.useEffect(()=>{let i=window.matchMedia(_);o(i.matches);let l=d=>{o(d.matches);};return i.addEventListener("change",l),()=>i.removeEventListener("change",l)},[]),a}var W=react.Activity??function({children:o,mode:i}){return jsxRuntime.jsx("div",{"data-activity-mode":i,children:o})},R;function ze(){return R!==void 0?Promise.resolve(R):import('motion/react').then(a=>(R=a.motion.span,R)).catch(()=>(R=null,null))}var H=react.createContext({variant:"default",orientation:"horizontal",animated:true,separator:"line",visualSize:"sm"}),te=react.createContext({tabKeys:[]}),B=classVarianceAuthority.cva(["inline-flex items-center text-[var(--menu-muted)]"],{variants:{variant:{default:"border-b border-[var(--border)] bg-transparent rounded-none p-0 gap-0",block:"justify-center rounded-md p-1 bg-[var(--accent-background)]",pill:"gap-2 bg-transparent rounded-none p-0 border-none",stepper:"flex items-center justify-center gap-0 border-none bg-[var(--content-background)] p-2 rounded-none"},orientation:{horizontal:"flex-row",vertical:"h-auto flex-col w-full"},visualSize:{sm:"",default:"",lg:""}},compoundVariants:[{variant:"block",orientation:"horizontal",class:"gap-0"},{variant:"block",orientation:"horizontal",visualSize:"sm",class:"h-9"},{variant:"block",orientation:"horizontal",visualSize:"default",class:"h-11"},{variant:"block",orientation:"horizontal",visualSize:"lg",class:"h-[52px]"},{variant:"block",orientation:"vertical",class:"gap-1"},{variant:"default",orientation:"vertical",class:"border-b-0 border-l"},{variant:"stepper",orientation:"vertical",class:"gap-1"}],defaultVariants:{variant:"default",orientation:"horizontal",visualSize:"default"}}),z=classVarianceAuthority.cva(["inline-flex items-center justify-center gap-2 whitespace-nowrap","px-3 py-1.5 text-sm font-medium","ring-offset-[var(--content-background)] transition-colors","focus-visible:outline-none focus-visible:ring-2","focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","min-h-[44px]"],{variants:{variant:{default:["px-4","rounded-none bg-transparent","data-[selected]:text-[var(--content-foreground)]","hover:text-[var(--content-foreground)]"],block:["rounded-sm border-none bg-transparent p-0","hover:bg-transparent"],pill:["rounded-none border-none bg-transparent p-0","hover:bg-transparent"],stepper:["flex items-center gap-2 rounded-none border-none bg-transparent px-3 py-2"]},orientation:{horizontal:"",vertical:"w-full justify-start"}},compoundVariants:[{variant:"default",orientation:"horizontal",class:"relative -mb-px"},{variant:"default",orientation:"vertical",class:"relative -ml-px"}],defaultVariants:{variant:"default",orientation:"horizontal"}}),Ae=classVarianceAuthority.cva(["inline-flex items-center justify-center gap-2 whitespace-nowrap","rounded-lg border font-medium transition-colors"],{variants:{visualSize:{sm:"h-7 px-2.5 text-xs gap-1.5",default:"h-9 px-3 text-sm",lg:"h-11 px-4 text-sm"}},defaultVariants:{visualSize:"sm"}}),we=classVarianceAuthority.cva(["inline-flex items-center justify-center gap-2 whitespace-nowrap","rounded-sm font-medium transition-colors"],{variants:{visualSize:{sm:"h-7 px-2.5 text-xs gap-1.5",default:"h-9 px-3 text-sm",lg:"h-11 px-4 text-sm"}},defaultVariants:{visualSize:"default"}}),E=classVarianceAuthority.cva(["mt-2 ring-offset-[var(--content-background)]","focus-visible:outline-none focus-visible:ring-2","focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2"],{variants:{},defaultVariants:{}});function ae({children:a,variant:o="default",selectedKey:i,defaultSelectedKey:l,onSelectionChange:d,orientation:b="horizontal",keyboardActivation:u="automatic",isDisabled:r=false,disabledKeys:c,animated:m,separator:x="line",visualSize:T,className:p,...f}){let L=G(),P=Y(m,L),[I,D]=react.useState(i??l),V=k=>{o==="stepper"&&D(k),d?.(k);},N=o==="stepper"?i??I:void 0,O=T??(o==="pill"?"sm":"default");return jsxRuntime.jsx(H.Provider,{value:{variant:o,orientation:b,stepperSelectedKey:N,animated:P,separator:x,visualSize:O},children:jsxRuntime.jsx(reactAriaComponents.Tabs,{selectedKey:i,defaultSelectedKey:l,onSelectionChange:V,orientation:b,keyboardActivation:u,isDisabled:r,disabledKeys:c,className:s(p),...f,children:a})})}ae.displayName="Tabs";function ne({children:a,className:o,...i}){let{variant:l,orientation:d,visualSize:b}=react.useContext(H);if(l==="stepper"){let u=[];return react.Children.forEach(a,r=>{react.isValidElement(r)&&r.props&&typeof r.props.id<"u"&&u.push(r.props.id);}),jsxRuntime.jsx(te.Provider,{value:{tabKeys:u},children:jsxRuntime.jsx(reactAriaComponents.TabList,{className:reactAriaComponents.composeRenderProps(o,r=>s(B({variant:l,orientation:d,visualSize:b}),r)),...i,children:a})})}return jsxRuntime.jsx(reactAriaComponents.TabList,{className:reactAriaComponents.composeRenderProps(o,u=>s(B({variant:l,orientation:d,visualSize:b}),u)),...i,children:a})}ne.displayName="TabList";function oe({children:a,id:o,isDisabled:i=false,href:l,target:d,rel:b,download:u,completed:r,sublabel:c,className:m,...x}){process.env.NODE_ENV!=="production"&&!(typeof a=="string"||Array.isArray(a)&&a.some(v=>typeof v=="string"))&&!x["aria-label"]&&console.warn("Tabs: Icon-only tabs should have an aria-label for accessibility.");let T=l!==void 0?{href:l,target:d,rel:b,download:u}:{},{variant:p,orientation:f,stepperSelectedKey:L,animated:P,separator:I,visualSize:D}=react.useContext(H),V=react.useContext(te),[N,O]=react.useState(null),k=react.useRef(false);if(react.useEffect(()=>{p!=="default"&&p!=="block"||!P||k.current||(k.current=true,ze().then(n=>{n&&O(()=>n);}));},[p,P]),p==="stepper"){let n=V.tabKeys.indexOf(o),v=L!==void 0?V.tabKeys.indexOf(L):-1,ce=n===0,h=r!==void 0?r:n>=0&&v>=0&&n<v,C=n>=0&&n===v,U=f==="vertical";if(U){let j=n>=0&&n===V.tabKeys.length-1,pe=C||h?"bg-[var(--primary)] text-[var(--primary-foreground)] ring-4 ring-[var(--primary)]/25":"border border-[var(--border)] bg-[var(--content-background)] text-[var(--menu-muted)]",de=C?"font-semibold text-[var(--content-foreground)]":h?"font-medium text-[var(--content-foreground)]":"text-[var(--menu-muted)]";return jsxRuntime.jsxs(reactAriaComponents.Tab,{id:o,isDisabled:i,...T,className:reactAriaComponents.composeRenderProps(m,ue=>s(z({variant:p,orientation:f}),"items-start gap-0 py-0",ue)),...x,children:[jsxRuntime.jsxs("span",{className:"flex shrink-0 flex-col items-center",children:[jsxRuntime.jsx("span",{className:s("flex h-9 w-9 shrink-0 items-center justify-center rounded-full text-sm font-semibold transition-colors",pe),"aria-hidden":"true",children:h?jsxRuntime.jsx(lucideReact.Check,{className:"h-4 w-4"}):n+1}),!j&&jsxRuntime.jsx("span",{className:s("my-0.5 h-5 w-0.5 transition-colors",h?"bg-[var(--primary)]":"bg-[var(--border)]"),"aria-hidden":"true"})]}),jsxRuntime.jsx("span",{className:"sr-only",children:h?`Step ${n+1}, completed:`:`Step ${n+1}:`}),jsxRuntime.jsxs("span",{className:"flex min-h-9 flex-1 flex-col items-start justify-center pl-3 text-left",children:[jsxRuntime.jsx("span",{className:s("text-sm",de),children:a}),c!=null&&c!==false&&jsxRuntime.jsx("span",{className:"text-xs text-[var(--content-foreground)]",children:c})]})]})}return jsxRuntime.jsxs(reactAriaComponents.Tab,{id:o,isDisabled:i,...T,className:reactAriaComponents.composeRenderProps(m,j=>s(z({variant:p,orientation:f}),j)),...x,children:[!ce&&!U&&(I==="chevron"?jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4 shrink-0 text-[var(--muted-foreground)]","aria-hidden":"true"}):jsxRuntime.jsx("span",{className:"h-px w-6 bg-[var(--border)]","aria-hidden":"true"})),jsxRuntime.jsxs("span",{className:s("inline-flex items-center gap-2 rounded-lg p-2",C&&"bg-[var(--primary-action)]/10"),children:[jsxRuntime.jsx("span",{className:s("flex min-h-7 min-w-7 shrink-0 items-center justify-center rounded-lg px-1.5 text-xs font-bold",C||h?"bg-[var(--primary-action)] text-white":"bg-[var(--accent-background)] text-[var(--muted-foreground)]"),"aria-hidden":"true",children:h?jsxRuntime.jsx(lucideReact.Check,{className:"h-3.5 w-3.5"}):n+1}),jsxRuntime.jsx("span",{className:"sr-only",children:h?`Step ${n+1}, completed:`:`Step ${n+1}:`}),jsxRuntime.jsxs("span",{className:"flex flex-col items-start text-left",children:[jsxRuntime.jsx("span",{className:s(C&&"font-semibold text-[var(--primary-action)]"),children:a}),c!=null&&c!==false&&jsxRuntime.jsx("span",{className:"text-xs text-[var(--muted-foreground)]",children:c})]})]})]})}if(p==="pill")return jsxRuntime.jsx(reactAriaComponents.Tab,{id:o,isDisabled:i,...T,className:reactAriaComponents.composeRenderProps(m,n=>s(z({variant:p,orientation:f}),n)),...x,children:n=>jsxRuntime.jsx("span",{className:s(Ae({visualSize:D}),n.isSelected?"border-[var(--primary-action)] bg-[var(--primary-action)] text-[var(--primary-action-foreground)]":"border-[var(--border)] bg-[var(--content-background)] text-[var(--content-foreground)] hover:bg-[var(--accent-background)]",n.isSelected&&P&&"motion-safe:selection-pulse"),children:a})});if(p==="block"){let n=f==="horizontal";return jsxRuntime.jsx(reactAriaComponents.Tab,{id:o,isDisabled:i,...T,className:reactAriaComponents.composeRenderProps(m,v=>s(z({variant:p,orientation:f}),v)),...x,children:v=>jsxRuntime.jsxs("span",{className:s(we({visualSize:D}),"relative",v.isSelected?"font-semibold text-[var(--content-foreground)]":"text-[var(--menu-muted)] hover:text-[var(--content-foreground)]"),children:[v.isSelected&&(P&&N?jsxRuntime.jsx(N,{layoutId:`tab-block-indicator-${n?"h":"v"}`,className:"absolute inset-0 rounded-sm bg-[var(--content-background)] shadow-sm",transition:{type:"spring",stiffness:500,damping:30}}):jsxRuntime.jsx("span",{className:"absolute inset-0 rounded-sm bg-[var(--content-background)] shadow-sm"})),jsxRuntime.jsx("span",{className:"relative z-[1] inline-flex items-center gap-2",children:a})]})})}let Q=f==="horizontal",q=Q?"absolute bottom-0 left-0 right-0 h-0.5 bg-[var(--primary-action)]":"absolute top-0 bottom-0 left-0 w-0.5 bg-[var(--primary-action)]";return jsxRuntime.jsx(reactAriaComponents.Tab,{id:o,isDisabled:i,...T,className:reactAriaComponents.composeRenderProps(m,n=>s(z({variant:p,orientation:f}),n)),...x,children:n=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[a,p==="default"&&n.isSelected&&(P&&N?jsxRuntime.jsx(N,{layoutId:`tab-indicator-${Q?"h":"v"}`,className:q,transition:{type:"spring",stiffness:500,damping:30}}):jsxRuntime.jsx("span",{className:q}))]})})}oe.displayName="Tab";function re({children:a,id:o,shouldForceMount:i=false,preserveState:l=false,className:d,...b}){let u=l||i;return typeof a=="function"?jsxRuntime.jsx(reactAriaComponents.TabPanel,{id:o,shouldForceMount:u,className:reactAriaComponents.composeRenderProps(d,r=>s(E(),r)),...b,children:r=>{let c=!r.isInert,m=a({isSelected:c});return l?jsxRuntime.jsx(W,{mode:c?"visible":"hidden",children:m}):m}}):l?jsxRuntime.jsx(reactAriaComponents.TabPanel,{id:o,shouldForceMount:u,className:reactAriaComponents.composeRenderProps(d,r=>s(E(),r)),...b,children:r=>{let c=!r.isInert;return jsxRuntime.jsx(W,{mode:c?"visible":"hidden",children:a})}}):jsxRuntime.jsx(reactAriaComponents.TabPanel,{id:o,shouldForceMount:u,className:reactAriaComponents.composeRenderProps(d,r=>s(E(),r)),...b,children:a})}re.displayName="TabPanel";var Ve=ae,ke=ne,Ce=oe,Ke=re;var A=zod.z.object({className:zod.z.string().optional(),children:zod.z.any().optional(),id:zod.z.string().optional(),"aria-label":zod.z.string().optional(),"aria-labelledby":zod.z.string().optional(),"aria-describedby":zod.z.string().optional(),"aria-live":zod.z.enum(["off","polite","assertive"]).optional(),"aria-hidden":zod.z.boolean().optional(),"data-testid":zod.z.string().optional()});var Me=zod.z.enum(["default","block","pill","stepper"]),Le=zod.z.enum(["line","chevron"]),De=zod.z.enum(["sm","default","lg"]),ie=zod.z.enum(["horizontal","vertical"]),se=zod.z.enum(["automatic","manual"]),w=zod.z.union([zod.z.string(),zod.z.number()]),Ee=A.extend({variant:Me.optional().default("default"),selectedKey:w.optional(),defaultSelectedKey:w.optional(),onSelectionChange:zod.z.custom().optional(),orientation:ie.optional().default("horizontal"),keyboardActivation:se.optional().default("automatic"),isDisabled:zod.z.boolean().optional().default(false),disabledKeys:zod.z.array(w).optional(),children:zod.z.custom(),animated:zod.z.boolean().optional().default(true),separator:Le.optional().default("line"),visualSize:De.optional()}),Ie=A.extend({"aria-label":zod.z.string().optional(),"aria-labelledby":zod.z.string().optional(),children:zod.z.custom()}),Oe=A.extend({id:w,isDisabled:zod.z.boolean().optional().default(false),href:zod.z.string().optional(),target:zod.z.string().optional(),rel:zod.z.string().optional(),download:zod.z.union([zod.z.string(),zod.z.boolean()]).optional(),completed:zod.z.boolean().optional(),sublabel:zod.z.custom().optional(),children:zod.z.custom()}),je=A.extend({id:w,shouldForceMount:zod.z.boolean().optional().default(false),preserveState:zod.z.boolean().optional().default(false),children:zod.z.custom()}),le=zod.z.enum(["left","right","up","down"]),Fe=A.extend({direction:le,isDisabled:zod.z.boolean().optional().default(false),onPress:zod.z.custom(),"aria-label":zod.z.string()});exports.KeySchema=w;exports.ScrollArrowDirectionSchema=le;exports.ScrollArrowPropsSchema=Fe;exports.Tab=Ce;exports.TabList=ke;exports.TabListPropsSchema=Ie;exports.TabPanel=Ke;exports.TabPanelPropsSchema=je;exports.TabPropsSchema=Oe;exports.Tabs=Ve;exports.TabsKeyboardActivationSchema=se;exports.TabsOrientationSchema=ie;exports.TabsPropsSchema=Ee;exports.tabListVariants=B;exports.tabPanelVariants=E;exports.tabVariants=z;//# sourceMappingURL=index.js.map
|
|
2
|
+
'use strict';var react=require('react'),lucideReact=require('lucide-react'),reactAriaComponents=require('react-aria-components'),classVarianceAuthority=require('class-variance-authority'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),jsxRuntime=require('react/jsx-runtime'),zod=require('zod');function s(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var re=classVarianceAuthority.cva(["z-50 overflow-hidden rounded-md px-3 py-1.5 text-sm","bg-[var(--content-foreground)] text-[var(--content-background)]","motion-safe:animate-in motion-safe:fade-in-0","data-[exiting]:motion-safe:animate-out data-[exiting]:motion-safe:fade-out-0"],{variants:{side:{top:["motion-safe:slide-in-from-bottom-2","data-[exiting]:motion-safe:slide-out-to-bottom-2"],bottom:["motion-safe:slide-in-from-top-2","data-[exiting]:motion-safe:slide-out-to-top-2"],left:["motion-safe:slide-in-from-right-2","data-[exiting]:motion-safe:slide-out-to-right-2"],right:["motion-safe:slide-in-from-left-2","data-[exiting]:motion-safe:slide-out-to-left-2"]}},defaultVariants:{side:"top"}}),U=classVarianceAuthority.cva("fill-[var(--content-foreground)]",{variants:{side:{top:"rotate-180",bottom:"rotate-0",left:"rotate-90",right:"-rotate-90"}},defaultVariants:{side:"top"}});function q(e){if(!e)return "top";let a=e.split(" ")[0];return a==="top"||a==="bottom"||a==="left"||a==="right"?a:"top"}function ie({children:e,delay:a=700,closeDelay:r=300,trigger:l="hover",isOpen:p,defaultOpen:d=false,onOpenChange:u,isDisabled:i=false}){return jsxRuntime.jsx(reactAriaComponents.TooltipTrigger,{delay:l==="focus"?99999999:a,closeDelay:r,isOpen:p,defaultOpen:d,onOpenChange:u,isDisabled:i,children:e})}ie.displayName="Tooltip";function se({children:e}){return e}se.displayName="TooltipTrigger";function le({children:e,side:a="top",sideOffset:r=4,alignOffset:l=0,shouldFlip:p=true,showArrow:d=false,arrowSize:u=8,className:i,...c}){return jsxRuntime.jsx(reactAriaComponents.Tooltip,{placement:a,offset:r,crossOffset:l,shouldFlip:p,...c,className:reactAriaComponents.composeRenderProps(i,(f,b)=>{let v=q(b.placement);return s(re({side:v}),f)}),children:f=>{let b=q(f.placement);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[d&&jsxRuntime.jsx(reactAriaComponents.OverlayArrow,{children:jsxRuntime.jsx("svg",{width:u,height:u,viewBox:"0 0 8 8",className:U({side:b}),"data-testid":"tooltip-arrow",children:jsxRuntime.jsx("path",{d:"M0 0 L4 4 L8 0"})})}),e]})}})}le.displayName="TooltipContent";var j=ie,F=se,$=le;var k=zod.z.object({className:zod.z.string().optional(),children:zod.z.any().optional(),id:zod.z.string().optional(),"aria-label":zod.z.string().optional(),"aria-labelledby":zod.z.string().optional(),"aria-describedby":zod.z.string().optional(),"aria-live":zod.z.enum(["off","polite","assertive"]).optional(),"aria-hidden":zod.z.boolean().optional(),"data-testid":zod.z.string().optional()});function pe(e,a){return !(e===false||a)}var ce="(prefers-reduced-motion: reduce)";function Fe(){return typeof window>"u"?false:window.matchMedia(ce).matches}function de(){let[e,a]=react.useState(Fe);return react.useEffect(()=>{let r=window.matchMedia(ce);a(r.matches);let l=p=>{a(p.matches);};return r.addEventListener("change",l),()=>r.removeEventListener("change",l)},[]),e}var fe=react.Activity??function({children:a,mode:r}){return jsxRuntime.jsx("div",{"data-activity-mode":r,children:a})},L;function _e(){return L!==void 0?Promise.resolve(L):import('motion/react').then(e=>(L=e.motion.span,L)).catch(()=>(L=null,null))}var J=react.createContext({variant:"default",orientation:"horizontal",animated:true,separator:"line",visualSize:"sm"}),Te=react.createContext({tabKeys:[]}),G=classVarianceAuthority.cva(["inline-flex items-center text-[var(--menu-muted)]"],{variants:{variant:{default:"border-b border-[var(--border)] bg-transparent rounded-none p-0 gap-0",block:"justify-center rounded-md p-1 bg-[var(--accent-background)]",pill:"gap-2 bg-transparent rounded-none p-0 border-none",stepper:"flex items-center justify-center gap-0 border-none bg-[var(--content-background)] p-2 rounded-none"},orientation:{horizontal:"flex-row",vertical:"h-auto flex-col w-full"},visualSize:{sm:"",default:"",lg:""}},compoundVariants:[{variant:"block",orientation:"horizontal",class:"gap-0"},{variant:"block",orientation:"horizontal",visualSize:"sm",class:"h-9"},{variant:"block",orientation:"horizontal",visualSize:"default",class:"h-11"},{variant:"block",orientation:"horizontal",visualSize:"lg",class:"h-[52px]"},{variant:"block",orientation:"vertical",class:"gap-1"},{variant:"default",orientation:"vertical",class:"border-b-0 border-l"},{variant:"stepper",orientation:"vertical",class:"gap-1"}],defaultVariants:{variant:"default",orientation:"horizontal",visualSize:"default"}}),V=classVarianceAuthority.cva(["inline-flex items-center justify-center gap-2 whitespace-nowrap","px-3 py-1.5 text-sm font-medium","ring-offset-[var(--content-background)] transition-colors","focus-visible:outline-none focus-visible:ring-2","focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","min-h-[44px]"],{variants:{variant:{default:["px-4","rounded-none bg-transparent","data-[selected]:text-[var(--content-foreground)]","hover:text-[var(--content-foreground)]"],block:["rounded-sm border-none bg-transparent p-0","hover:bg-transparent"],pill:["rounded-none border-none bg-transparent p-0","hover:bg-transparent"],stepper:["flex items-center gap-2 rounded-none border-none bg-transparent px-3 py-2"]},orientation:{horizontal:"",vertical:"w-full justify-start"}},compoundVariants:[{variant:"default",orientation:"horizontal",class:"relative -mb-px"},{variant:"default",orientation:"vertical",class:"relative -ml-px"}],defaultVariants:{variant:"default",orientation:"horizontal"}}),Ge=classVarianceAuthority.cva(["inline-flex items-center justify-center gap-2 whitespace-nowrap","rounded-lg border font-medium transition-colors"],{variants:{visualSize:{sm:"h-7 px-2.5 text-xs gap-1.5",default:"h-9 px-3 text-sm",lg:"h-11 px-4 text-sm"}},defaultVariants:{visualSize:"sm"}}),Je=classVarianceAuthority.cva(["inline-flex items-center justify-center gap-2 whitespace-nowrap","rounded-sm font-medium transition-colors"],{variants:{visualSize:{sm:"h-7 px-2.5 text-xs gap-1.5",default:"h-9 px-3 text-sm",lg:"h-11 px-4 text-sm"}},defaultVariants:{visualSize:"default"}}),B=classVarianceAuthority.cva(["mt-2 ring-offset-[var(--content-background)]","focus-visible:outline-none focus-visible:ring-2","focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2"],{variants:{},defaultVariants:{}});function xe({children:e,variant:a="default",selectedKey:r,defaultSelectedKey:l,onSelectionChange:p,orientation:d="horizontal",keyboardActivation:u="automatic",isDisabled:i=false,disabledKeys:c,animated:f,separator:b="line",visualSize:v,className:A,...m}){let T=de(),D=pe(f,T),[N,H]=react.useState(r??l),O=I=>{a==="stepper"&&H(I),p?.(I);},K=a==="stepper"?r??N:void 0,C=v??(a==="pill"?"sm":"default");return jsxRuntime.jsx(J.Provider,{value:{variant:a,orientation:d,stepperSelectedKey:K,animated:D,separator:b,visualSize:C},children:jsxRuntime.jsx(reactAriaComponents.Tabs,{selectedKey:r,defaultSelectedKey:l,onSelectionChange:O,orientation:d,keyboardActivation:u,isDisabled:i,disabledKeys:c,className:s(A),...m,children:e})})}xe.displayName="Tabs";function ye({children:e,className:a,...r}){let{variant:l,orientation:p,visualSize:d}=react.useContext(J);if(l==="stepper"){let u=[];return react.Children.forEach(e,i=>{react.isValidElement(i)&&i.props&&typeof i.props.id<"u"&&u.push(i.props.id);}),jsxRuntime.jsx(Te.Provider,{value:{tabKeys:u},children:jsxRuntime.jsx(reactAriaComponents.TabList,{className:reactAriaComponents.composeRenderProps(a,i=>s(G({variant:l,orientation:p,visualSize:d}),i)),...r,children:e})})}return jsxRuntime.jsx(reactAriaComponents.TabList,{className:reactAriaComponents.composeRenderProps(a,u=>s(G({variant:l,orientation:p,visualSize:d}),u)),...r,children:e})}ye.displayName="TabList";function he({children:e,id:a,isDisabled:r=false,href:l,target:p,rel:d,download:u,completed:i,sublabel:c,errorDescription:f,className:b,...v}){process.env.NODE_ENV!=="production"&&!(typeof e=="string"||Array.isArray(e)&&e.some(x=>typeof x=="string"))&&!v["aria-label"]&&console.warn("Tabs: Icon-only tabs should have an aria-label for accessibility.");let A=l!==void 0?{href:l,target:p,rel:d,download:u}:{},{variant:m,orientation:T,stepperSelectedKey:D,animated:N,separator:H,visualSize:O}=react.useContext(J),K=react.useContext(Te),[C,I]=react.useState(null),W=react.useRef(false);if(react.useEffect(()=>{m!=="default"&&m!=="block"||!N||W.current||(W.current=true,_e().then(n=>{n&&I(()=>n);}));},[m,N]),m==="stepper"){let n=K.tabKeys.indexOf(a),x=D!==void 0?K.tabKeys.indexOf(D):-1,Ne=n===0,P=i!==void 0?i:n>=0&&x>=0&&n<x,z=n>=0&&n===x,ee=T==="vertical",g=f!=null&&f!==false;if(ee){let Q=n>=0&&n===K.tabKeys.length-1,Ce=g?s("bg-[var(--destructive-background)] text-[var(--destructive-foreground)]",z&&"ring-4 ring-[var(--destructive-background)]/25"):z?"bg-[var(--primary)] text-[var(--primary-foreground)] ring-4 ring-[var(--primary)]/25":P?"bg-[var(--primary)] text-[var(--primary-foreground)]":"border border-[var(--border)] bg-[var(--content-background)] text-[var(--menu-muted)]",ze=g?"font-medium text-[var(--destructive-background)]":z?"font-semibold text-[var(--content-foreground)]":P?"font-medium text-[var(--content-foreground)]":"text-[var(--menu-muted)]",ae=jsxRuntime.jsxs(reactAriaComponents.Tab,{id:a,isDisabled:r,...A,className:reactAriaComponents.composeRenderProps(b,ke=>s(V({variant:m,orientation:T}),"items-start gap-0 py-0",ke)),...v,children:[jsxRuntime.jsxs("span",{className:"flex shrink-0 flex-col items-center",children:[jsxRuntime.jsx("span",{className:s("flex h-9 w-9 shrink-0 items-center justify-center rounded-full text-sm font-semibold transition-colors",Ce),"aria-hidden":"true",children:g?jsxRuntime.jsx(lucideReact.TriangleAlert,{className:"h-4 w-4"}):P?jsxRuntime.jsx(lucideReact.Check,{className:"h-4 w-4"}):n+1}),!Q&&jsxRuntime.jsx("span",{className:s("my-0.5 h-5 w-0.5 transition-colors",P?"bg-[var(--primary)]":"bg-[var(--border)]"),"aria-hidden":"true"})]}),jsxRuntime.jsx("span",{className:"sr-only",children:g?`Step ${n+1}, error:`:P?`Step ${n+1}, completed:`:`Step ${n+1}:`}),jsxRuntime.jsxs("span",{className:"flex min-h-9 flex-1 flex-col items-start justify-center pl-3 text-left",children:[jsxRuntime.jsx("span",{className:s("text-sm",ze),children:e}),c!=null&&c!==false&&jsxRuntime.jsx("span",{className:"text-xs text-[var(--content-foreground)]",children:c})]})]});return g?jsxRuntime.jsxs(j,{delay:300,children:[jsxRuntime.jsx(F,{children:ae}),jsxRuntime.jsx($,{side:"top",children:f})]}):ae}let te=jsxRuntime.jsxs(reactAriaComponents.Tab,{id:a,isDisabled:r,...A,className:reactAriaComponents.composeRenderProps(b,Q=>s(V({variant:m,orientation:T}),Q)),...v,children:[!Ne&&!ee&&(H==="chevron"?jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4 shrink-0 text-[var(--muted-foreground)]","aria-hidden":"true"}):jsxRuntime.jsx("span",{className:"h-px w-6 bg-[var(--border)]","aria-hidden":"true"})),jsxRuntime.jsxs("span",{className:s("inline-flex items-center gap-2 rounded-lg p-2",g?"bg-[var(--destructive-background)]/10":z&&"bg-[var(--primary-action)]/10"),children:[jsxRuntime.jsx("span",{className:s("flex min-h-7 min-w-7 shrink-0 items-center justify-center rounded-lg px-1.5 text-xs font-bold",g?"bg-[var(--destructive-background)] text-[var(--destructive-foreground)]":z||P?"bg-[var(--primary-action)] text-white":"bg-[var(--accent-background)] text-[var(--muted-foreground)]"),"aria-hidden":"true",children:g?jsxRuntime.jsx(lucideReact.TriangleAlert,{className:"h-3.5 w-3.5"}):P?jsxRuntime.jsx(lucideReact.Check,{className:"h-3.5 w-3.5"}):n+1}),jsxRuntime.jsx("span",{className:"sr-only",children:g?`Step ${n+1}, error:`:P?`Step ${n+1}, completed:`:`Step ${n+1}:`}),jsxRuntime.jsxs("span",{className:"flex flex-col items-start text-left",children:[jsxRuntime.jsx("span",{className:s(g?"font-semibold text-[var(--destructive-background)]":z&&"font-semibold text-[var(--primary-action)]"),children:e}),c!=null&&c!==false&&jsxRuntime.jsx("span",{className:"text-xs text-[var(--muted-foreground)]",children:c})]})]})]});return g?jsxRuntime.jsxs(j,{delay:300,children:[jsxRuntime.jsx(F,{children:te}),jsxRuntime.jsx($,{side:"top",children:f})]}):te}if(m==="pill")return jsxRuntime.jsx(reactAriaComponents.Tab,{id:a,isDisabled:r,...A,className:reactAriaComponents.composeRenderProps(b,n=>s(V({variant:m,orientation:T}),n)),...v,children:n=>jsxRuntime.jsx("span",{className:s(Ge({visualSize:O}),n.isSelected?"border-[var(--primary-action)] bg-[var(--primary-action)] text-[var(--primary-action-foreground)]":"border-[var(--border)] bg-[var(--content-background)] text-[var(--content-foreground)] hover:bg-[var(--accent-background)]",n.isSelected&&N&&"motion-safe:selection-pulse"),children:e})});if(m==="block"){let n=T==="horizontal";return jsxRuntime.jsx(reactAriaComponents.Tab,{id:a,isDisabled:r,...A,className:reactAriaComponents.composeRenderProps(b,x=>s(V({variant:m,orientation:T}),x)),...v,children:x=>jsxRuntime.jsxs("span",{className:s(Je({visualSize:O}),"relative",x.isSelected?"font-semibold text-[var(--content-foreground)]":"text-[var(--menu-muted)] hover:text-[var(--content-foreground)]"),children:[x.isSelected&&(N&&C?jsxRuntime.jsx(C,{layoutId:`tab-block-indicator-${n?"h":"v"}`,className:"absolute inset-0 rounded-sm bg-[var(--content-background)] shadow-sm",transition:{type:"spring",stiffness:500,damping:30}}):jsxRuntime.jsx("span",{className:"absolute inset-0 rounded-sm bg-[var(--content-background)] shadow-sm"})),jsxRuntime.jsx("span",{className:"relative z-[1] inline-flex items-center gap-2",children:e})]})})}let X=T==="horizontal",Z=X?"absolute bottom-0 left-0 right-0 h-0.5 bg-[var(--primary-action)]":"absolute top-0 bottom-0 left-0 w-0.5 bg-[var(--primary-action)]";return jsxRuntime.jsx(reactAriaComponents.Tab,{id:a,isDisabled:r,...A,className:reactAriaComponents.composeRenderProps(b,n=>s(V({variant:m,orientation:T}),n)),...v,children:n=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[e,m==="default"&&n.isSelected&&(N&&C?jsxRuntime.jsx(C,{layoutId:`tab-indicator-${X?"h":"v"}`,className:Z,transition:{type:"spring",stiffness:500,damping:30}}):jsxRuntime.jsx("span",{className:Z}))]})})}he.displayName="Tab";function Se({children:e,id:a,shouldForceMount:r=false,preserveState:l=false,className:p,...d}){let u=l||r;return typeof e=="function"?jsxRuntime.jsx(reactAriaComponents.TabPanel,{id:a,shouldForceMount:u,className:reactAriaComponents.composeRenderProps(p,i=>s(B(),i)),...d,children:i=>{let c=!i.isInert,f=e({isSelected:c});return l?jsxRuntime.jsx(fe,{mode:c?"visible":"hidden",children:f}):f}}):l?jsxRuntime.jsx(reactAriaComponents.TabPanel,{id:a,shouldForceMount:u,className:reactAriaComponents.composeRenderProps(p,i=>s(B(),i)),...d,children:i=>{let c=!i.isInert;return jsxRuntime.jsx(fe,{mode:c?"visible":"hidden",children:e})}}):jsxRuntime.jsx(reactAriaComponents.TabPanel,{id:a,shouldForceMount:u,className:reactAriaComponents.composeRenderProps(p,i=>s(B(),i)),...d,children:e})}Se.displayName="TabPanel";var We=xe,Xe=ye,Ze=he,et=Se;var at=zod.z.enum(["default","block","pill","stepper"]),ot=zod.z.enum(["line","chevron"]),nt=zod.z.enum(["sm","default","lg"]),Pe=zod.z.enum(["horizontal","vertical"]),we=zod.z.enum(["automatic","manual"]),R=zod.z.union([zod.z.string(),zod.z.number()]),rt=k.extend({variant:at.optional().default("default"),selectedKey:R.optional(),defaultSelectedKey:R.optional(),onSelectionChange:zod.z.custom().optional(),orientation:Pe.optional().default("horizontal"),keyboardActivation:we.optional().default("automatic"),isDisabled:zod.z.boolean().optional().default(false),disabledKeys:zod.z.array(R).optional(),children:zod.z.custom(),animated:zod.z.boolean().optional().default(true),separator:ot.optional().default("line"),visualSize:nt.optional()}),it=k.extend({"aria-label":zod.z.string().optional(),"aria-labelledby":zod.z.string().optional(),children:zod.z.custom()}),st=k.extend({id:R,isDisabled:zod.z.boolean().optional().default(false),href:zod.z.string().optional(),target:zod.z.string().optional(),rel:zod.z.string().optional(),download:zod.z.union([zod.z.string(),zod.z.boolean()]).optional(),completed:zod.z.boolean().optional(),sublabel:zod.z.custom().optional(),errorDescription:zod.z.custom().optional(),children:zod.z.custom()}),lt=k.extend({id:R,shouldForceMount:zod.z.boolean().optional().default(false),preserveState:zod.z.boolean().optional().default(false),children:zod.z.custom()}),Ae=zod.z.enum(["left","right","up","down"]),pt=k.extend({direction:Ae,isDisabled:zod.z.boolean().optional().default(false),onPress:zod.z.custom(),"aria-label":zod.z.string()});exports.KeySchema=R;exports.ScrollArrowDirectionSchema=Ae;exports.ScrollArrowPropsSchema=pt;exports.Tab=Ze;exports.TabList=Xe;exports.TabListPropsSchema=it;exports.TabPanel=et;exports.TabPanelPropsSchema=lt;exports.TabPropsSchema=st;exports.Tabs=We;exports.TabsKeyboardActivationSchema=we;exports.TabsOrientationSchema=Pe;exports.TabsPropsSchema=rt;exports.tabListVariants=G;exports.tabPanelVariants=B;exports.tabVariants=V;//# sourceMappingURL=index.js.map
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utils/cn.ts","../../../src/utils/shouldAnimate.ts","../../../src/hooks/useReducedMotion.ts","../../../src/elements/Tabs/Tabs.tsx","../../../src/schemas/BaseComponentProps.ts","../../../src/elements/Tabs/Tabs.types.ts"],"names":["cn","inputs","twMerge","clsx","shouldAnimate","animated","prefersReducedMotion","QUERY","getInitialState","useReducedMotion","setPrefersReducedMotion","useState","useEffect","mql","handler","event","Activity","ReactActivity","children","mode","jsx","cachedMotionSpan","loadMotionSpan","m","TabsInternalContext","createContext","StepperContext","tabListVariants","cva","tabVariants","tabPillVisualVariants","tabBlockVisualVariants","tabPanelVariants","TabsRoot","variant","selectedKey","defaultSelectedKey","onSelectionChange","orientation","keyboardActivation","isDisabled","disabledKeys","animatedProp","separator","visualSize","className","props","doAnimate","trackedKey","setTrackedKey","handleSelectionChange","key","stepperSelectedKey","effectiveVisualSize","AriaTabs","TabListComponent","useContext","tabKeys","Children","child","isValidElement","AriaTabList","composeRenderProps","TabComponent","id","href","target","rel","download","completed","sublabel","linkProps","stepperCtx","MotionSpan","setMotionSpan","motionLoadedRef","useRef","component","tabIndex","selectedIndex","isFirst","isCompleted","isActive","isVertical","isLast","circleStateClass","labelTextClass","jsxs","AriaTab","Check","ChevronRight","renderProps","blockHorizontal","isHorizontal","indicatorClasses","Fragment","TabPanelComponent","shouldForceMount","preserveState","forceMount","AriaTabPanel","isSelected","content","Tabs","TabList","Tab","TabPanel","BaseComponentPropsSchema","z","TabsVariantSchema","StepperSeparatorSchema","TabsVisualSizeSchema","TabsOrientationSchema","TabsKeyboardActivationSchema","KeySchema","TabsPropsSchema","TabListPropsSchema","TabPropsSchema","TabPanelPropsSchema","ScrollArrowDirectionS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,EAAS,CAMtD,SAAA,CAAWA,KAAAA,CAAE,OAAA,EAAQ,CAAE,QAAA,EAAS,CAIhC,QAAA,CAAUA,MAAE,MAAA,EAAkB,CAAE,QAAA,EAAS,CAGzC,QAAA,CAAUA,KAAAA,CAAE,MAAA,EACd,CAAC,CAAA,CA4BYU,EAAAA,CAAsBX,CAAAA,CAAyB,MAAA,CAAO,CAEjE,GAAIO,CAAAA,CAIJ,gBAAA,CAAkBN,KAAAA,CAAE,OAAA,EAAQ,CAAE,QAAA,EAAS,CAAE,OAAA,CAAQ,KAAK,CAAA,CAKtD,aAAA,CAAeA,KAAAA,CAAE,OAAA,EAAQ,CAAE,UAAS,CAAE,OAAA,CAAQ,KAAK,CAAA,CAGnD,QAAA,CAAUA,KAAAA,CAAE,MAAA,EACd,CAAC,CAAA,CAkBYW,EAAAA,CAA6BX,KAAAA,CAAE,IAAA,CAAK,CAAC,OAAQ,OAAA,CAAS,IAAA,CAAM,MAAM,CAAC,CAAA,CAOnEY,EAAAA,CAAyBb,CAAAA,CAAyB,MAAA,CAAO,CAEpE,SAAA,CAAWY,EAAAA,CAGX,UAAA,CAAYX,KAAAA,CAAE,OAAA,EAAQ,CAAE,QAAA,EAAS,CAAE,OAAA,CAAQ,KAAK,CAAA,CAGhD,OAAA,CAASA,KAAAA,CAAE,MAAA,EAAmB,CAG9B,YAAA,CAAcA,KAAAA,CAAE,MAAA,EAClB,CAAC","file":"index.js","sourcesContent":["/**\n * Class Name Utility\n * Merges Tailwind CSS classes with conflict resolution\n *\n * Combines clsx for conditional classes and tailwind-merge for deduplication\n *\n * @example\n * cn('px-2 py-1', 'px-4') // => 'py-1 px-4' (px-4 overrides px-2)\n * cn('text-red-500', condition && 'text-blue-500') // => conditional application\n */\n\nimport { clsx, type ClassValue } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]): string {\n return twMerge(clsx(inputs));\n}\n","/**\n * Determines whether a component should animate.\n *\n * Returns `false` if:\n * - The `animated` prop is explicitly `false`\n * - The user prefers reduced motion\n *\n * @param animated - The component's `animated` prop value (default: `true`)\n * @param prefersReducedMotion - Whether the user prefers reduced motion\n */\nexport function shouldAnimate(\n animated: boolean | undefined,\n prefersReducedMotion: boolean,\n): boolean {\n if (animated === false) return false;\n if (prefersReducedMotion) return false;\n return true;\n}\n","'use client';\n\nimport { useState, useEffect } from 'react';\n\nconst QUERY = '(prefers-reduced-motion: reduce)';\n\nfunction getInitialState(): boolean {\n if (typeof window === 'undefined') return false;\n return window.matchMedia(QUERY).matches;\n}\n\n/**\n * Detects whether the user prefers reduced motion.\n *\n * - SSR-safe (returns `false` on the server)\n * - Reacts to changes in the OS preference\n * - Cleans up the listener on unmount\n */\nexport function useReducedMotion(): boolean {\n const [prefersReducedMotion, setPrefersReducedMotion] = useState(getInitialState);\n\n useEffect(() => {\n const mql = window.matchMedia(QUERY);\n setPrefersReducedMotion(mql.matches);\n\n const handler = (event: MediaQueryListEvent): void => {\n setPrefersReducedMotion(event.matches);\n };\n\n mql.addEventListener('change', handler);\n return () => mql.removeEventListener('change', handler);\n }, []);\n\n return prefersReducedMotion;\n}\n","'use client';\n\n/**\n * Tabs Component - Implementation\n *\n * Accessible tabbed interface component combining React Aria primitives with ShadCN styling.\n * Follows Themis library patterns with compound component structure and direct named exports.\n *\n * Key Features:\n * - React Aria Tabs for full accessibility (WCAG 2.2 AAA)\n * - CVA variants for orientation styling\n * - React 19.2 Activity API for state preservation (preserveState prop)\n * - Dual keyboard activation modes (automatic/manual)\n * - Support for icons, badges, and link-based tabs\n *\n * @see tabs-prd.md (Full requirements)\n * @see Tabs.types.ts (Zod schemas)\n * @see plan.md (Implementation approach)\n */\n\n// React 19.2 Activity API - may not be available in all builds\n// Import conditionally to support environments where Activity is unavailable\nimport {\n Activity as ReactActivity,\n Children,\n createContext,\n isValidElement,\n useContext,\n useEffect,\n useRef,\n useState,\n type ReactNode,\n type Key,\n type ReactElement,\n} from 'react';\nimport { Check, ChevronRight } from 'lucide-react';\n\n// Activity component with fallback for environments where it's not available\n// The fallback simply renders children directly - no state preservation when Activity unavailable\n// Note: ActivityFallback doesn't actually preserve state; it's just a pass-through\nconst Activity = ReactActivity ?? function ActivityFallback({\n children,\n mode,\n}: {\n children: ReactNode;\n mode: 'visible' | 'hidden';\n}): ReactElement {\n // When Activity is not available, just render children directly\n // mode is ignored in the fallback\n return <div data-activity-mode={mode}>{children}</div>;\n};\nimport {\n Tabs as AriaTabs,\n TabList as AriaTabList,\n Tab as AriaTab,\n TabPanel as AriaTabPanel,\n composeRenderProps,\n type Key as AriaKey,\n} from 'react-aria-components';\nimport { cva } from 'class-variance-authority';\nimport { cn } from '../../utils/cn';\nimport { shouldAnimate } from '../../utils/shouldAnimate';\nimport { useReducedMotion } from '../../hooks/useReducedMotion';\nimport type {\n TabsProps,\n TabsVariant,\n TabsOrientation,\n TabsVisualSize,\n StepperSeparator,\n TabListProps,\n TabProps,\n TabPanelProps,\n} from './Tabs.types';\n\n// ---------------------------------------------------------------------------\n// Motion lazy-loader — avoids hard dep on optional peer\n// ---------------------------------------------------------------------------\n\ntype MotionSpanComponent = React.ComponentType<{\n layoutId?: string;\n className?: string;\n transition?: Record<string, unknown>;\n style?: React.CSSProperties;\n}>;\n\nlet cachedMotionSpan: MotionSpanComponent | null | undefined; // undefined = pending, null = unavailable\n\nfunction loadMotionSpan(): Promise<MotionSpanComponent | null> {\n if (cachedMotionSpan !== undefined) return Promise.resolve(cachedMotionSpan);\n\n return import('motion/react')\n .then((m) => {\n cachedMotionSpan = m.motion.span as unknown as MotionSpanComponent;\n return cachedMotionSpan;\n })\n .catch(() => {\n cachedMotionSpan = null;\n return null;\n });\n}\n\n// ============================================================================\n// Internal Context\n// ============================================================================\n\ninterface TabsContextValue {\n variant: TabsVariant;\n orientation: TabsOrientation;\n /** For stepper variant: tracked selected key from Tabs root */\n stepperSelectedKey?: Key;\n /** Whether the indicator should animate. Default: true */\n animated: boolean;\n /** Stepper separator style. Only applies to horizontal stepper variant. */\n separator: StepperSeparator;\n /** Visual size for Layer 2 (currently consumed only by pill variant) */\n visualSize: TabsVisualSize;\n}\n\nconst TabsInternalContext = createContext<TabsContextValue>({\n variant: 'default',\n orientation: 'horizontal',\n animated: true,\n separator: 'line',\n visualSize: 'sm',\n});\n\n/**\n * Stepper context for tracking tab order.\n * Only used when variant=\"stepper\" to determine completed/active/inactive states.\n */\ninterface StepperContextValue {\n tabKeys: Key[];\n}\n\nconst StepperContext = createContext<StepperContextValue>({\n tabKeys: [],\n});\n\n// ============================================================================\n// CVA Variants\n// ============================================================================\n\n/**\n * TabList CVA variants\n *\n * @see PRD.md FR-002 (TabList Requirements)\n * @see PRD.md DS-001 (Design System - Layout)\n */\nexport const tabListVariants = cva(\n // Base styles\n [\n 'inline-flex items-center text-[var(--menu-muted)]',\n ],\n {\n variants: {\n variant: {\n default: 'border-b border-[var(--border)] bg-transparent rounded-none p-0 gap-0',\n block: 'justify-center rounded-md p-1 bg-[var(--accent-background)]',\n pill: 'gap-2 bg-transparent rounded-none p-0 border-none',\n stepper: 'flex items-center justify-center gap-0 border-none bg-[var(--content-background)] p-2 rounded-none',\n },\n orientation: {\n horizontal: 'flex-row',\n vertical: 'h-auto flex-col w-full',\n },\n // Only the block bar consumes this — its height tracks the visible tab\n // size (Layer 2) while the 44×44px touch targets (Layer 1) overflow it.\n visualSize: {\n sm: '',\n default: '',\n lg: '',\n },\n },\n compoundVariants: [\n { variant: 'block', orientation: 'horizontal', class: 'gap-0' },\n { variant: 'block', orientation: 'horizontal', visualSize: 'sm', class: 'h-9' },\n { variant: 'block', orientation: 'horizontal', visualSize: 'default', class: 'h-11' },\n { variant: 'block', orientation: 'horizontal', visualSize: 'lg', class: 'h-[52px]' },\n { variant: 'block', orientation: 'vertical', class: 'gap-1' },\n { variant: 'default', orientation: 'vertical', class: 'border-b-0 border-l' },\n // Stepper vertical: keep flex-col from orientation base, just add gap\n { variant: 'stepper', orientation: 'vertical', class: 'gap-1' },\n ],\n defaultVariants: {\n variant: 'default',\n orientation: 'horizontal',\n visualSize: 'default',\n },\n }\n);\n\n/**\n * Tab CVA variants\n *\n * @see PRD.md FR-003 (Tab Requirements)\n * @see PRD.md DS-002 (Design System - Tab Styling)\n * @see PRD.md AR-001 (Accessibility - 44×44px touch targets)\n */\nexport const tabVariants = cva(\n // Base styles\n [\n 'inline-flex items-center justify-center gap-2 whitespace-nowrap',\n 'px-3 py-1.5 text-sm font-medium',\n 'ring-offset-[var(--content-background)] transition-colors',\n 'focus-visible:outline-none focus-visible:ring-2',\n 'focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2',\n // States via data attributes\n 'data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n // WCAG 2.2 AAA: 44×44px minimum touch target\n 'min-h-[44px]',\n ],\n {\n variants: {\n variant: {\n default: [\n // 16px horizontal padding (overrides the base px-3) so the first tab's\n // text aligns with surrounding 16px content insets (e.g. PageTitle).\n 'px-4',\n 'rounded-none bg-transparent',\n 'data-[selected]:text-[var(--content-foreground)]',\n 'hover:text-[var(--content-foreground)]',\n ],\n // Block is Layer 1 only — transparent 44×44px touch target. The visible\n // segmented \"card\" is an inner Layer 2 span; see tabBlockVisualVariants.\n block: [\n 'rounded-sm border-none bg-transparent p-0',\n 'hover:bg-transparent',\n ],\n // Pill is Layer 1 only — transparent 44×44px touch target.\n // The visible pill is rendered as an inner Layer 2 span; see tabPillVisualVariants.\n pill: [\n 'rounded-none border-none bg-transparent p-0',\n 'hover:bg-transparent',\n ],\n stepper: [\n 'flex items-center gap-2 rounded-none border-none bg-transparent px-3 py-2',\n ],\n },\n orientation: {\n horizontal: '',\n vertical: 'w-full justify-start',\n },\n },\n compoundVariants: [\n {\n variant: 'default',\n orientation: 'horizontal',\n class: 'relative -mb-px',\n },\n {\n variant: 'default',\n orientation: 'vertical',\n class: 'relative -ml-px',\n },\n ],\n defaultVariants: {\n variant: 'default',\n orientation: 'horizontal',\n },\n }\n);\n\n/**\n * Pill visual (Layer 2) CVA variants\n *\n * The pill variant follows the three-layer architecture:\n * - Layer 1 (AriaTab): transparent 44×44px touch target — see tabVariants pill case\n * - Layer 2 (this CVA): the visible pill, sized via `visualSize`\n * - Layer 3: children inside the visual pill\n *\n * Selected/hover/border colours are applied alongside this CVA in the Tab\n * component because they depend on render-time `isSelected` state.\n */\nexport const tabPillVisualVariants = cva(\n [\n 'inline-flex items-center justify-center gap-2 whitespace-nowrap',\n 'rounded-lg border font-medium transition-colors',\n ],\n {\n variants: {\n visualSize: {\n sm: 'h-7 px-2.5 text-xs gap-1.5',\n default: 'h-9 px-3 text-sm',\n lg: 'h-11 px-4 text-sm',\n },\n },\n defaultVariants: {\n visualSize: 'sm',\n },\n }\n);\n\n/**\n * Block visual (Layer 2) CVA variants\n *\n * The block variant follows the three-layer architecture:\n * - Layer 1 (AriaTab): transparent 44×44px touch target — see tabVariants block case\n * - Layer 2 (this CVA): the visible segmented \"card\", sized via `visualSize`\n * - Layer 3: children inside the visual card\n *\n * Selected/hover colours are applied alongside this CVA in the Tab component\n * because they depend on render-time `isSelected` state.\n */\nexport const tabBlockVisualVariants = cva(\n [\n 'inline-flex items-center justify-center gap-2 whitespace-nowrap',\n 'rounded-sm font-medium transition-colors',\n ],\n {\n variants: {\n visualSize: {\n sm: 'h-7 px-2.5 text-xs gap-1.5',\n default: 'h-9 px-3 text-sm',\n lg: 'h-11 px-4 text-sm',\n },\n },\n defaultVariants: {\n visualSize: 'default',\n },\n }\n);\n\n/**\n * TabPanel CVA variants\n *\n * @see PRD.md FR-004 (TabPanel Requirements)\n */\nexport const tabPanelVariants = cva(\n [\n 'mt-2 ring-offset-[var(--content-background)]',\n 'focus-visible:outline-none focus-visible:ring-2',\n 'focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2',\n ],\n {\n variants: {},\n defaultVariants: {},\n }\n);\n\n// ============================================================================\n// Components\n// ============================================================================\n\n/**\n * Tabs Root Component\n *\n * Container for tabbed interface. Manages selection state and provides\n * context to child components.\n *\n * @see PRD.md FR-001 (Compound Component Pattern)\n * @see PRD.md FR-012 (Controlled Mode)\n * @see PRD.md FR-013 (Uncontrolled Mode)\n *\n * @example\n * // Uncontrolled\n * <Tabs defaultSelectedKey=\"tab1\">\n * <TabList aria-label=\"Navigation\">\n * <Tab id=\"tab1\">Tab 1</Tab>\n * <Tab id=\"tab2\">Tab 2</Tab>\n * </TabList>\n * <TabPanel id=\"tab1\">Content 1</TabPanel>\n * <TabPanel id=\"tab2\">Content 2</TabPanel>\n * </Tabs>\n *\n * @example\n * // Controlled\n * <Tabs selectedKey={selected} onSelectionChange={setSelected}>\n * ...\n * </Tabs>\n */\nfunction TabsRoot({\n children,\n variant = 'default',\n selectedKey,\n defaultSelectedKey,\n onSelectionChange,\n orientation = 'horizontal',\n keyboardActivation = 'automatic',\n isDisabled = false,\n disabledKeys,\n animated: animatedProp,\n separator = 'line',\n visualSize,\n className,\n ...props\n}: TabsProps) {\n const prefersReducedMotion = useReducedMotion();\n const doAnimate = shouldAnimate(animatedProp, prefersReducedMotion);\n // For stepper variant, track the selected key internally so Tab children\n // can determine completed/active/inactive state. React Aria's internal\n // TabListStateContext is not accessible from our Tab wrapper since tabs\n // are rendered via the collection system.\n const [trackedKey, setTrackedKey] = useState<Key | undefined>(\n selectedKey ?? defaultSelectedKey\n );\n\n const handleSelectionChange = (key: Key) => {\n if (variant === 'stepper') {\n setTrackedKey(key);\n }\n onSelectionChange?.(key);\n };\n\n // For controlled mode, use the prop directly\n const stepperSelectedKey = variant === 'stepper'\n ? (selectedKey ?? trackedKey)\n : undefined;\n\n // Default visualSize: 'sm' (28px) for pill, 'default' for everything else.\n // Pill uses three-layer architecture; other variants currently ignore visualSize.\n const effectiveVisualSize: TabsVisualSize =\n visualSize ?? (variant === 'pill' ? 'sm' : 'default');\n\n return (\n <TabsInternalContext.Provider\n value={{\n variant,\n orientation,\n stepperSelectedKey,\n animated: doAnimate,\n separator,\n visualSize: effectiveVisualSize,\n }}\n >\n <AriaTabs\n selectedKey={selectedKey}\n defaultSelectedKey={defaultSelectedKey}\n onSelectionChange={handleSelectionChange as (key: Key) => void}\n orientation={orientation}\n keyboardActivation={keyboardActivation}\n isDisabled={isDisabled}\n disabledKeys={disabledKeys as Iterable<AriaKey> | undefined}\n className={cn(className)}\n {...props}\n >\n {children}\n </AriaTabs>\n </TabsInternalContext.Provider>\n );\n}\n\nTabsRoot.displayName = 'Tabs';\n\n/**\n * TabList Component\n *\n * Container for tab buttons. Uses roving tabindex for keyboard navigation.\n * Receives orientation from parent Tabs via React Aria context.\n *\n * @see PRD.md FR-002 (TabList Requirements)\n * @see PRD.md AR-001 (ARIA Requirements)\n */\nfunction TabListComponent({\n children,\n className,\n ...props\n}: TabListProps) {\n // Orientation comes from context (authoritative) rather than AriaTabList\n // render props, so the orientation-keyed CVA compounds (incl. the block bar\n // height) always match.\n const { variant, orientation, visualSize } = useContext(TabsInternalContext);\n\n // For stepper variant, collect tab keys from children to determine order\n if (variant === 'stepper') {\n // Extract keys from Tab children to determine ordering\n const tabKeys: Key[] = [];\n Children.forEach(children as ReactNode, (child) => {\n if (isValidElement(child) && child.props && typeof (child.props as Record<string, unknown>).id !== 'undefined') {\n tabKeys.push((child.props as Record<string, unknown>).id as Key);\n }\n });\n\n return (\n <StepperContext.Provider value={{ tabKeys }}>\n <AriaTabList\n className={composeRenderProps(className, (className) =>\n cn(\n tabListVariants({ variant, orientation, visualSize }),\n className\n )\n )}\n {...props}\n >\n {children}\n </AriaTabList>\n </StepperContext.Provider>\n );\n }\n\n return (\n <AriaTabList\n className={composeRenderProps(className, (className) =>\n cn(\n tabListVariants({ variant, orientation, visualSize }),\n className\n )\n )}\n {...props}\n >\n {children}\n </AriaTabList>\n );\n}\n\nTabListComponent.displayName = 'TabList';\n\n/**\n * Tab Component\n *\n * Individual tab button. Can render as button or anchor (when href provided).\n * Supports icons and badges as children.\n *\n * @see PRD.md FR-003 (Tab Requirements)\n * @see PRD.md FR-007 (Disabled States)\n * @see PRD.md FR-013 (Icon Support)\n * @see PRD.md FR-014 (Link-based Tabs)\n */\nfunction TabComponent({\n children,\n id,\n isDisabled = false,\n href,\n target,\n rel,\n download,\n completed,\n sublabel,\n className,\n ...props\n}: TabProps) {\n // Warn if icon-only tab without aria-label\n if (process.env.NODE_ENV !== 'production') {\n const hasTextContent =\n typeof children === 'string' ||\n (Array.isArray(children) &&\n children.some((child) => typeof child === 'string'));\n\n if (!hasTextContent && !props['aria-label']) {\n console.warn(\n 'Tabs: Icon-only tabs should have an aria-label for accessibility.'\n );\n }\n }\n\n // Only forward link props when this tab is actually a link. Passing\n // `href={undefined}` makes React Aria spread an empty `href=\"\"` onto the\n // tab's `<div>`, which React rejects (\"An empty string was passed to the\n // href attribute\"). Spreading an empty object for non-link tabs avoids it.\n const linkProps = href !== undefined ? { href, target, rel, download } : {};\n\n const { variant, orientation, stepperSelectedKey, animated: doAnimate, separator, visualSize } = useContext(TabsInternalContext);\n const stepperCtx = useContext(StepperContext);\n\n // Motion.dev component for animated indicator (lazy-loaded)\n const [MotionSpan, setMotionSpan] = useState<MotionSpanComponent | null>(null);\n const motionLoadedRef = useRef(false);\n\n useEffect(() => {\n // 'default' (sliding underline) and 'block' (sliding card) both animate\n // their indicator via a shared-layoutId MotionSpan.\n if ((variant !== 'default' && variant !== 'block') || !doAnimate || motionLoadedRef.current) return;\n motionLoadedRef.current = true;\n loadMotionSpan().then((component) => {\n if (component) setMotionSpan(() => component);\n });\n }, [variant, doAnimate]);\n\n // For stepper variant, render numbered circle with optional connecting line\n if (variant === 'stepper') {\n const tabIndex = stepperCtx.tabKeys.indexOf(id);\n const selectedIndex = stepperSelectedKey !== undefined\n ? stepperCtx.tabKeys.indexOf(stepperSelectedKey)\n : -1;\n const isFirst = tabIndex === 0;\n // Explicit `completed` (when provided) overrides the default index-based\n // inference, so a non-linear flow can mark a later step done while an\n // earlier one is still outstanding.\n const isCompleted = completed !== undefined\n ? completed\n : tabIndex >= 0 && selectedIndex >= 0 && tabIndex < selectedIndex;\n const isActive = tabIndex >= 0 && tabIndex === selectedIndex;\n const isVertical = orientation === 'vertical';\n\n // Vertical stepper matches the Wizard stepper look: round circles with a\n // ring on the active/completed step, a vertical connector between steps, and\n // the label/“Current step” subtitle stacked alongside. (Horizontal keeps the\n // inline numbered-pill look below.)\n if (isVertical) {\n const isLast = tabIndex >= 0 && tabIndex === stepperCtx.tabKeys.length - 1;\n const circleStateClass = isActive || isCompleted\n ? 'bg-[var(--primary)] text-[var(--primary-foreground)] ring-4 ring-[var(--primary)]/25'\n : 'border border-[var(--border)] bg-[var(--content-background)] text-[var(--menu-muted)]';\n const labelTextClass = isActive\n ? 'font-semibold text-[var(--content-foreground)]'\n : isCompleted\n ? 'font-medium text-[var(--content-foreground)]'\n : 'text-[var(--menu-muted)]';\n\n return (\n <AriaTab\n id={id}\n isDisabled={isDisabled}\n {...linkProps}\n className={composeRenderProps(className, (className) =>\n cn(tabVariants({ variant, orientation }), 'items-start gap-0 py-0', className)\n )}\n {...props}\n >\n {/* Indicator column: circle + connector to the next step */}\n <span className=\"flex shrink-0 flex-col items-center\">\n <span\n className={cn(\n 'flex h-9 w-9 shrink-0 items-center justify-center rounded-full text-sm font-semibold transition-colors',\n circleStateClass,\n )}\n aria-hidden=\"true\"\n >\n {isCompleted ? <Check className=\"h-4 w-4\" /> : tabIndex + 1}\n </span>\n {!isLast && (\n <span\n className={cn(\n 'my-0.5 h-5 w-0.5 transition-colors',\n isCompleted ? 'bg-[var(--primary)]' : 'bg-[var(--border)]'\n )}\n aria-hidden=\"true\"\n />\n )}\n </span>\n {/* Visually hidden step number for screen readers */}\n <span className=\"sr-only\">\n {isCompleted ? `Step ${tabIndex + 1}, completed:` : `Step ${tabIndex + 1}:`}\n </span>\n {/* Label (+ optional sublabel stacked beneath) */}\n <span className=\"flex min-h-9 flex-1 flex-col items-start justify-center pl-3 text-left\">\n <span className={cn('text-sm', labelTextClass)}>{children}</span>\n {sublabel !== undefined && sublabel !== null && sublabel !== false && (\n <span className=\"text-xs text-[var(--content-foreground)]\">{sublabel}</span>\n )}\n </span>\n </AriaTab>\n );\n }\n\n return (\n <AriaTab\n id={id}\n isDisabled={isDisabled}\n {...linkProps}\n className={composeRenderProps(className, (className) =>\n cn(\n tabVariants({ variant, orientation }),\n className,\n )\n )}\n {...props}\n >\n {/* Separator before tab (horizontal only, except first) */}\n {!isFirst && !isVertical && (\n separator === 'chevron' ? (\n <ChevronRight\n className=\"h-4 w-4 shrink-0 text-[var(--muted-foreground)]\"\n aria-hidden=\"true\"\n />\n ) : (\n <span\n className=\"h-px w-6 bg-[var(--border)]\"\n aria-hidden=\"true\"\n />\n )\n )}\n {/* Inner wrapper for active highlight (excludes connecting line) */}\n <span\n className={cn(\n 'inline-flex items-center gap-2 rounded-lg p-2',\n isActive && 'bg-[var(--primary-action)]/10',\n )}\n >\n {/* Step circle */}\n <span\n className={cn(\n 'flex min-h-7 min-w-7 shrink-0 items-center justify-center rounded-lg px-1.5 text-xs font-bold',\n isActive\n ? 'bg-[var(--primary-action)] text-white'\n : isCompleted\n ? 'bg-[var(--primary-action)] text-white'\n : 'bg-[var(--accent-background)] text-[var(--muted-foreground)]'\n )}\n aria-hidden=\"true\"\n >\n {isCompleted ? (\n <Check className=\"h-3.5 w-3.5\" />\n ) : (\n tabIndex + 1\n )}\n </span>\n {/* Visually hidden step number for screen readers */}\n <span className=\"sr-only\">\n {isCompleted ? `Step ${tabIndex + 1}, completed:` : `Step ${tabIndex + 1}:`}\n </span>\n {/* Tab label (+ optional sublabel stacked beneath) */}\n <span className=\"flex flex-col items-start text-left\">\n <span className={cn(\n isActive && 'font-semibold text-[var(--primary-action)]',\n )}>{children}</span>\n {sublabel !== undefined && sublabel !== null && sublabel !== false && (\n <span className=\"text-xs text-[var(--muted-foreground)]\">{sublabel}</span>\n )}\n </span>\n </span>\n </AriaTab>\n );\n }\n\n // Pill variant: three-layer architecture.\n // Layer 1 (AriaTab) is a transparent 44×44px touch target; the visible pill\n // is rendered as an inner Layer 2 span sized via the `visualSize` context.\n if (variant === 'pill') {\n return (\n <AriaTab\n id={id}\n isDisabled={isDisabled}\n {...linkProps}\n className={composeRenderProps(className, (className) =>\n cn(tabVariants({ variant, orientation }), className)\n )}\n {...props}\n >\n {(renderProps) => (\n <span\n className={cn(\n tabPillVisualVariants({ visualSize }),\n renderProps.isSelected\n ? 'border-[var(--primary-action)] bg-[var(--primary-action)] text-[var(--primary-action-foreground)]'\n : 'border-[var(--border)] bg-[var(--content-background)] text-[var(--content-foreground)] hover:bg-[var(--accent-background)]',\n // Bump on selection. motion-safe: respects prefers-reduced-motion.\n renderProps.isSelected && doAnimate && 'motion-safe:selection-pulse'\n )}\n >\n {children}\n </span>\n )}\n </AriaTab>\n );\n }\n\n // Block variant: three-layer architecture (mirrors pill).\n // Layer 1 (AriaTab) is a transparent 44×44px touch target that overflows the\n // segmented bar; the visible \"card\" is an inner Layer 2 span sized via the\n // `visualSize` context. The selected card is a shared-layoutId MotionSpan that\n // slides between tabs (same mechanism as the default variant's underline).\n if (variant === 'block') {\n const blockHorizontal = orientation === 'horizontal';\n return (\n <AriaTab\n id={id}\n isDisabled={isDisabled}\n {...linkProps}\n className={composeRenderProps(className, (className) =>\n cn(tabVariants({ variant, orientation }), className)\n )}\n {...props}\n >\n {(renderProps) => (\n <span\n className={cn(\n tabBlockVisualVariants({ visualSize }),\n 'relative',\n renderProps.isSelected\n ? 'font-semibold text-[var(--content-foreground)]'\n : 'text-[var(--menu-muted)] hover:text-[var(--content-foreground)]'\n )}\n >\n {/* Sliding card indicator (behind the label) */}\n {renderProps.isSelected && (\n doAnimate && MotionSpan ? (\n <MotionSpan\n layoutId={`tab-block-indicator-${blockHorizontal ? 'h' : 'v'}`}\n className=\"absolute inset-0 rounded-sm bg-[var(--content-background)] shadow-sm\"\n transition={{ type: 'spring', stiffness: 500, damping: 30 }}\n />\n ) : (\n <span className=\"absolute inset-0 rounded-sm bg-[var(--content-background)] shadow-sm\" />\n )\n )}\n <span className=\"relative z-[1] inline-flex items-center gap-2\">{children}</span>\n </span>\n )}\n </AriaTab>\n );\n }\n\n // Default variant: render with sliding indicator\n const isHorizontal = orientation === 'horizontal';\n const indicatorClasses = isHorizontal\n ? 'absolute bottom-0 left-0 right-0 h-0.5 bg-[var(--primary-action)]'\n : 'absolute top-0 bottom-0 left-0 w-0.5 bg-[var(--primary-action)]';\n\n return (\n <AriaTab\n id={id}\n isDisabled={isDisabled}\n {...linkProps}\n className={composeRenderProps(className, (className) =>\n cn(tabVariants({ variant, orientation }), className)\n )}\n {...props}\n >\n {(renderProps) => (\n <>\n {children}\n {/* Tab indicator — animated slide or instant position */}\n {variant === 'default' && renderProps.isSelected && (\n doAnimate && MotionSpan ? (\n <MotionSpan\n layoutId={`tab-indicator-${isHorizontal ? 'h' : 'v'}`}\n className={indicatorClasses}\n transition={{ type: 'spring', stiffness: 500, damping: 30 }}\n />\n ) : (\n <span className={indicatorClasses} />\n )\n )}\n </>\n )}\n </AriaTab>\n );\n}\n\nTabComponent.displayName = 'Tab';\n\n/**\n * TabPanel Component\n *\n * Content panel associated with a tab. Only the selected panel is visible.\n * Supports preserveState for React Activity state preservation.\n *\n * @see PRD.md FR-004 (TabPanel Requirements)\n * @see PRD.md FR-015 (Force Mount Panels)\n * @see PRD.md FR-016 (React Activity State Preservation)\n *\n * @example\n * // Default behavior - content unmounts when hidden\n * <TabPanel id=\"tab1\">Content</TabPanel>\n *\n * @example\n * // Legacy force mount - keeps content in DOM\n * <TabPanel id=\"tab1\" shouldForceMount>Form with state</TabPanel>\n *\n * @example\n * // React Activity - preserves state with proper effect cleanup\n * <TabPanel id=\"tab1\" preserveState>\n * <FormWithDraft />\n * </TabPanel>\n */\nfunction TabPanelComponent({\n children,\n id,\n shouldForceMount = false,\n preserveState = false,\n className,\n ...props\n}: TabPanelProps) {\n // preserveState takes precedence - both enable force mounting\n const forceMount = preserveState || shouldForceMount;\n\n // If children is a render function (for dynamic content based on selection state),\n // we need to use the render props pattern\n if (typeof children === 'function') {\n return (\n <AriaTabPanel\n id={id}\n shouldForceMount={forceMount}\n className={composeRenderProps(className, (className) =>\n cn(tabPanelVariants(), className)\n )}\n {...props}\n >\n {(renderProps) => {\n // React Aria TabPanelRenderProps includes: state, isInert\n // We derive isSelected from state - if state is undefined, panel is selected\n const isSelected = !renderProps.isInert;\n const content = (\n children as (renderProps: { isSelected: boolean }) => ReactNode\n )({ isSelected });\n\n if (preserveState) {\n return (\n <Activity mode={isSelected ? 'visible' : 'hidden'}>\n {content}\n </Activity>\n );\n }\n\n return content;\n }}\n </AriaTabPanel>\n );\n }\n\n // For static children (not a function), render directly\n // If preserveState is enabled, wrap in Activity\n if (preserveState) {\n return (\n <AriaTabPanel\n id={id}\n shouldForceMount={forceMount}\n className={composeRenderProps(className, (className) =>\n cn(tabPanelVariants(), className)\n )}\n {...props}\n >\n {(renderProps) => {\n const isSelected = !renderProps.isInert;\n return (\n <Activity mode={isSelected ? 'visible' : 'hidden'}>\n {children}\n </Activity>\n );\n }}\n </AriaTabPanel>\n );\n }\n\n // Default: render static children directly\n return (\n <AriaTabPanel\n id={id}\n shouldForceMount={forceMount}\n className={composeRenderProps(className, (className) =>\n cn(tabPanelVariants(), className)\n )}\n {...props}\n >\n {children}\n </AriaTabPanel>\n );\n}\n\nTabPanelComponent.displayName = 'TabPanel';\n\n// ============================================================================\n// Exports\n// ============================================================================\n\n/**\n * Direct named exports (not Object.assign compound pattern)\n *\n * Tabs follows React Aria's direct export pattern because:\n * - Simpler structure (only 4 components vs Dialog's 9)\n * - Better tree-shaking with named exports\n * - Clearer imports: import { Tabs, TabList, Tab, TabPanel } from '...'\n *\n * @see plan.md \"Why Direct Named Exports (Not Object.assign)?\"\n */\nexport const Tabs = TabsRoot;\nexport const TabList = TabListComponent;\nexport const Tab = TabComponent;\nexport const TabPanel = TabPanelComponent;\n\n// Re-export types for convenience\nexport type { TabsProps, TabsVariant, TabsVisualSize, StepperSeparator, TabListProps, TabProps, TabPanelProps };\n","import { z } from 'zod';\n\n/**\n * Base props schema for all Themis components\n * Ensures consistent accessibility and styling APIs across the library\n *\n * @see spec.md FR-009 to FR-014 (Accessibility Requirements)\n * @see constitution.md Principle IV (Accessibility First - WCAG 2.2 AA minimum)\n */\nexport const BaseComponentPropsSchema = z.object({\n // Styling\n className: z.string().optional(),\n\n // React\n children: z.any().optional(), // ReactNode not directly supported by Zod\n id: z.string().optional(),\n\n // Accessibility (WCAG 2.2 AA requirements)\n 'aria-label': z.string().optional(),\n 'aria-labelledby': z.string().optional(),\n 'aria-describedby': z.string().optional(),\n 'aria-live': z.enum(['off', 'polite', 'assertive']).optional(),\n 'aria-hidden': z.boolean().optional(),\n\n // Testing & Development\n 'data-testid': z.string().optional(),\n});\n\nexport type BaseComponentProps = z.infer<typeof BaseComponentPropsSchema>;\n","import { z } from 'zod';\nimport { BaseComponentPropsSchema } from '../../schemas/BaseComponentProps';\nimport type { ReactNode, Key } from 'react';\n\n/**\n * Tab variant schema\n *\n * - 'default': Transparent background with bottom border indicator for active tab\n * - 'block': Segmented control with accent background container and card-style active tab\n * - 'pill': Independent rounded tabs with filled primary-action background when selected\n * - 'stepper': Numbered step circles with connecting lines (free navigation, not a wizard)\n */\nexport const TabsVariantSchema = z.enum(['default', 'block', 'pill', 'stepper']);\nexport type TabsVariant = z.infer<typeof TabsVariantSchema>;\n\n/**\n * Stepper separator style schema\n *\n * - 'line': Horizontal line between steps (default)\n * - 'chevron': Chevron arrow between steps\n *\n * Only applies to horizontal stepper variant.\n */\nexport const StepperSeparatorSchema = z.enum(['line', 'chevron']);\nexport type StepperSeparator = z.infer<typeof StepperSeparatorSchema>;\n\n/**\n * Visual size schema (Layer 2 of three-layer architecture)\n *\n * The outer touch target (Layer 1) always meets the 44×44px WCAG 2.2 AAA minimum;\n * `visualSize` controls the size of the visible element nested inside it.\n *\n * - 'sm': 28px tall — compact (default for pill variant)\n * - 'default': 36px tall — Button-sm equivalent\n * - 'lg': 44px tall — fills the touch target (no transparent gutter)\n *\n * Consumed by the 'pill' and 'block' variants (both three-layer); the 'default'\n * and 'stepper' variants ignore it.\n */\nexport const TabsVisualSizeSchema = z.enum(['sm', 'default', 'lg']);\nexport type TabsVisualSize = z.infer<typeof TabsVisualSizeSchema>;\n\n/**\n * Tab orientation schema\n *\n * @see PRD.md FR-005 (Orientation Support)\n */\nexport const TabsOrientationSchema = z.enum(['horizontal', 'vertical']);\nexport type TabsOrientation = z.infer<typeof TabsOrientationSchema>;\n\n/**\n * Keyboard activation mode schema\n *\n * @see PRD.md FR-006 (Keyboard Activation Modes)\n */\nexport const TabsKeyboardActivationSchema = z.enum(['automatic', 'manual']);\nexport type TabsKeyboardActivation = z.infer<typeof TabsKeyboardActivationSchema>;\n\n/**\n * Key schema for tab identification\n * Supports both string and number keys per React Aria convention\n */\nexport const KeySchema = z.union([z.string(), z.number()]);\n\n/**\n * Tabs root component props schema\n *\n * @see PRD.md FR-001 (Compound Component Pattern)\n * @see PRD.md FR-012 (Controlled Mode)\n * @see PRD.md FR-013 (Uncontrolled Mode)\n */\nexport const TabsPropsSchema = BaseComponentPropsSchema.extend({\n // Visual variant: 'default' (underline), 'block' (segmented), 'pill' (independent rounded tabs), 'stepper' (numbered steps)\n variant: TabsVariantSchema.optional().default('default'),\n\n // Controlled mode: selected tab key\n selectedKey: KeySchema.optional(),\n\n // Uncontrolled mode: default selected tab key\n defaultSelectedKey: KeySchema.optional(),\n\n // Selection change handler\n onSelectionChange: z.custom<(key: Key) => void>().optional(),\n\n // Orientation: horizontal or vertical layout\n orientation: TabsOrientationSchema.optional().default('horizontal'),\n\n // Keyboard activation: automatic (arrows select) or manual (arrows focus, Enter selects)\n keyboardActivation: TabsKeyboardActivationSchema.optional().default('automatic'),\n\n // Disable all tabs\n isDisabled: z.boolean().optional().default(false),\n\n // Keys of tabs to disable individually\n disabledKeys: z.array(KeySchema).optional(),\n\n // Children: TabList and TabPanel components\n children: z.custom<ReactNode>(),\n\n // Animation (ADR 020 - Micro-Interaction Animation System)\n // When true, the tab indicator slides between tabs (default variant only)\n animated: z.boolean().optional().default(true),\n\n // Stepper separator style: 'line' (default) or 'chevron'\n // Only applies to horizontal stepper variant\n separator: StepperSeparatorSchema.optional().default('line'),\n\n // Visual size for Layer 2 in the three-layer architecture\n // Layer 1 (touch target) always meets 44x44px WCAG AAA; this controls Layer 2.\n // Currently consumed only by the 'pill' variant.\n visualSize: TabsVisualSizeSchema.optional(),\n});\n\nexport interface TabsProps {\n className?: string;\n children?: ReactNode;\n id?: string;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n 'aria-describedby'?: string;\n 'aria-live'?: 'off' | 'polite' | 'assertive';\n 'aria-hidden'?: boolean;\n 'data-testid'?: string;\n variant?: TabsVariant;\n selectedKey?: string | number;\n defaultSelectedKey?: string | number;\n onSelectionChange?: (key: Key) => void;\n orientation?: TabsOrientation;\n keyboardActivation?: TabsKeyboardActivation;\n isDisabled?: boolean;\n disabledKeys?: (string | number)[];\n animated?: boolean;\n separator?: StepperSeparator;\n visualSize?: TabsVisualSize;\n}\n\n/**\n * TabList component props schema\n *\n * @see PRD.md FR-002 (TabList Requirements)\n * @see PRD.md AR-001 (ARIA Requirements)\n */\nexport const TabListPropsSchema = BaseComponentPropsSchema.extend({\n // Accessible label (required for accessibility if no aria-labelledby)\n 'aria-label': z.string().optional(),\n\n // Reference to labelling element\n 'aria-labelledby': z.string().optional(),\n\n // Children: Tab components\n children: z.custom<ReactNode>(),\n});\n\nexport interface TabListProps {\n className?: string;\n children?: ReactNode;\n id?: string;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n 'data-testid'?: string;\n}\n\n/**\n * Tab component props schema\n *\n * @see PRD.md FR-003 (Tab Requirements)\n * @see PRD.md FR-007 (Disabled States)\n * @see PRD.md FR-014 (Link-based Tabs)\n */\nexport const TabPropsSchema = BaseComponentPropsSchema.extend({\n // Unique identifier for the tab (required)\n id: KeySchema,\n\n // Disable this specific tab\n isDisabled: z.boolean().optional().default(false),\n\n // Link tab: URL for navigation-style tabs\n href: z.string().optional(),\n\n // Link tab: target attribute\n target: z.string().optional(),\n\n // Link tab: rel attribute\n rel: z.string().optional(),\n\n // Link tab: download attribute\n download: z.union([z.string(), z.boolean()]).optional(),\n\n // Stepper variant only: explicit completed state. When provided, overrides the\n // default index-based inference (a step is \"completed\" if it precedes the\n // selected one). Lets a consumer mark a later step done while an earlier one\n // is still outstanding (e.g. a non-linear blueprint editor).\n completed: z.boolean().optional(),\n\n // Stepper variant only: small secondary label rendered beneath the tab label\n // (e.g. \"Current step\"). Ignored by other variants.\n sublabel: z.custom<ReactNode>().optional(),\n\n // Tab content (text, icons, badges)\n children: z.custom<ReactNode>(),\n});\n\nexport interface TabProps {\n className?: string;\n children?: ReactNode;\n id: string | number;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n 'aria-describedby'?: string;\n 'data-testid'?: string;\n isDisabled?: boolean;\n href?: string;\n target?: string;\n rel?: string;\n download?: string | boolean;\n /** Stepper variant only: explicit completed state, overriding index-based inference. */\n completed?: boolean;\n /** Stepper variant only: small secondary label beneath the tab label (e.g. \"Current step\"). */\n sublabel?: ReactNode;\n}\n\n/**\n * TabPanel component props schema\n *\n * @see PRD.md FR-004 (TabPanel Requirements)\n * @see PRD.md FR-015 (Force Mount Panels)\n * @see PRD.md FR-016 (React Activity State Preservation)\n */\nexport const TabPanelPropsSchema = BaseComponentPropsSchema.extend({\n // Unique identifier matching a Tab id (required)\n id: KeySchema,\n\n // Legacy: Force panel to stay in DOM when hidden\n // Use preserveState instead for proper effect cleanup\n shouldForceMount: z.boolean().optional().default(false),\n\n // React 19.2 Activity: Preserve state with proper effect cleanup\n // When true, wraps content in <Activity> component\n // Effects are cleaned up when hidden, restored when visible\n preserveState: z.boolean().optional().default(false),\n\n // Panel content\n children: z.custom<ReactNode>(),\n});\n\nexport interface TabPanelProps {\n className?: string;\n children?: ReactNode;\n id: string | number;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n 'data-testid'?: string;\n shouldForceMount?: boolean;\n preserveState?: boolean;\n}\n\n/**\n * Scroll arrow direction for overflow handling\n *\n * @see PRD.md FR-010 (Overflow Handling)\n */\nexport const ScrollArrowDirectionSchema = z.enum(['left', 'right', 'up', 'down']);\nexport type ScrollArrowDirection = z.infer<typeof ScrollArrowDirectionSchema>;\n\n/**\n * Internal props for scroll arrow buttons\n * Used by overflow handling implementation\n */\nexport const ScrollArrowPropsSchema = BaseComponentPropsSchema.extend({\n // Scroll direction\n direction: ScrollArrowDirectionSchema,\n\n // Disable when can't scroll further\n isDisabled: z.boolean().optional().default(false),\n\n // Click handler for scrolling\n onPress: z.custom<() => void>(),\n\n // Accessible label\n 'aria-label': z.string(),\n});\n\nexport interface ScrollArrowProps {\n className?: string;\n id?: string;\n 'aria-label': string;\n 'data-testid'?: string;\n direction: ScrollArrowDirection;\n isDisabled?: boolean;\n onPress: () => void;\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/cn.ts","../../../src/elements/Tooltip/Tooltip.tsx","../../../src/schemas/BaseComponentProps.ts","../../../src/utils/shouldAnimate.ts","../../../src/hooks/useReducedMotion.ts","../../../src/elements/Tabs/Tabs.tsx","../../../src/elements/Tabs/Tabs.types.ts"],"names":["cn","inputs","twMerge","clsx","tooltipContentVariants","cva","tooltipArrowVariants","placementToSide","placement","basePlacement","TooltipRoot","children","delay","closeDelay","trigger","isOpen","defaultOpen","onOpenChange","isDisabled","jsx","AriaTooltipTrigger","TooltipTriggerComponent","TooltipContentComponent","side","sideOffset","alignOffset","shouldFlip","showArrow","arrowSize","className","restProps","AriaTooltip","composeRenderProps","renderProps","actualSide","jsxs","Fragment","OverlayArrow","Tooltip","TooltipTrigger","TooltipContent","BaseComponentPropsSchema","z","shouldAnimate","animated","prefersReducedMotion","QUERY","getInitialState","useReducedMotion","setPrefersReducedMotion","useState","useEffect","mql","handler","event","Activity","ReactActivity","mode","cachedMotionSpan","loadMotionSpan","m","TabsInternalContext","createContext","StepperContext","tabListVariants","tabVariants","tabPillVisualVariants","tabBlockVisualVariants","tabPanelVariants","TabsRoot","variant","selectedKey","defaultSelectedKey","onSelectionChange","orientation","keyboardActivation","disabledKeys","animatedProp","separator","visualSize","props","doAnimate","trackedKey","setTrackedKey","handleSelectionChange","key","stepperSelectedKey","effectiveVisualSize","AriaTabs","TabListComponent","useContext","tabKeys","Children","child","isValidElement","AriaTabList","TabComponent","id","href","target","rel","download","completed","sublabel","errorDescription","linkProps","stepperCtx","MotionSpan","setMotionSpan","motionLoadedRef","useRef","component","tabIndex","selectedIndex","isFirst","isCompleted","isActive","isVertical","isErrored","isLast","circleStateClass","labelTextClass","stepTab","AriaTab","TriangleAlert","Check","stepTabHorizontal","ChevronRight","blockHorizontal","isHorizontal","indicatorClasses","TabPanelComponent","shouldForceMount","preserveState","forceMount","AriaTabPanel","isSelected","content","Tabs","TabList","Tab","TabPanel","TabsVariantSchema","StepperSeparatorSchema","TabsVisualSizeSchema","TabsOrientationSchema","TabsKeyboardActivationSchema","KeySchema","TabsPropsSchema","TabListPropsSchema","TabPropsSchema","TabPanelPropsSchema","ScrollArrowDirectionSchema","ScrollArrowPropsSchema"],"mappings":"oTAcO,SAASA,CAAAA,CAAAA,GAAMC,CAAAA,CAA8B,CAClD,OAAOC,qBAAAA,CAAQC,SAAAA,CAAKF,CAAM,CAAC,CAC7B,CCsBO,IAAMG,EAAAA,CAAyBC,0BAAAA,CAEpC,CACE,sDAEA,iEAAA,CAEA,8CAAA,CAEA,8EACF,CAAA,CACA,CACE,QAAA,CAAU,CACR,IAAA,CAAM,CACJ,GAAA,CAAK,CACH,oCAAA,CACA,kDACF,CAAA,CACA,MAAA,CAAQ,CACN,iCAAA,CACA,+CACF,CAAA,CACA,IAAA,CAAM,CACJ,mCAAA,CACA,iDACF,CAAA,CACA,KAAA,CAAO,CACL,mCACA,gDACF,CACF,CACF,CAAA,CACA,gBAAiB,CACf,IAAA,CAAM,KACR,CACF,CACF,CAAA,CASaC,CAAAA,CAAuBD,0BAAAA,CAElC,kCAAA,CACA,CACE,QAAA,CAAU,CACR,IAAA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A,CAAE,OAAA,EAAQ,CAAE,QAAA,EAAS,CAAE,QAAQ,KAAK,CAAA,CAGhD,OAAA,CAASA,KAAAA,CAAE,QAAmB,CAG9B,YAAA,CAAcA,KAAAA,CAAE,MAAA,EAClB,CAAC","file":"index.js","sourcesContent":["/**\n * Class Name Utility\n * Merges Tailwind CSS classes with conflict resolution\n *\n * Combines clsx for conditional classes and tailwind-merge for deduplication\n *\n * @example\n * cn('px-2 py-1', 'px-4') // => 'py-1 px-4' (px-4 overrides px-2)\n * cn('text-red-500', condition && 'text-blue-500') // => conditional application\n */\n\nimport { clsx, type ClassValue } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]): string {\n return twMerge(clsx(inputs));\n}\n","\"use client\";\n\n/**\n * Tooltip Component - Implementation\n *\n * Accessible tooltip component combining React Aria primitives with ShadCN styling.\n * Follows Themis library patterns with compound component structure.\n *\n * @see plan.md (Implementation plan)\n * @see Tooltip.types.ts (Zod schemas)\n * @see tooltip-prd.md (Full requirements)\n */\n\nimport { type ReactElement } from 'react';\nimport {\n TooltipTrigger as AriaTooltipTrigger,\n Tooltip as AriaTooltip,\n OverlayArrow,\n composeRenderProps,\n} from 'react-aria-components';\nimport { cva } from 'class-variance-authority';\nimport { cn } from '../../utils/cn';\nimport type {\n TooltipProps,\n TooltipTriggerProps,\n TooltipContentProps,\n TooltipArrowProps,\n TooltipSide,\n} from './Tooltip.types';\n\n/**\n * CVA Variants for TooltipContent\n *\n * Placement-based animations and high-contrast inverted colors.\n *\n * @see plan.md (CVA Variant Structure)\n * @see tooltip-prd.md US-2 (Configurable Placement)\n */\nexport const tooltipContentVariants = cva(\n // Base styles\n [\n \"z-50 overflow-hidden rounded-md px-3 py-1.5 text-sm\",\n // Inverted colors for high contrast (7:1 ratio)\n \"bg-[var(--content-foreground)] text-[var(--content-background)]\",\n // Entry animation base (motion-safe guarded)\n \"motion-safe:animate-in motion-safe:fade-in-0\",\n // Exit animation\n \"data-[exiting]:motion-safe:animate-out data-[exiting]:motion-safe:fade-out-0\",\n ],\n {\n variants: {\n side: {\n top: [\n \"motion-safe:slide-in-from-bottom-2\",\n \"data-[exiting]:motion-safe:slide-out-to-bottom-2\",\n ],\n bottom: [\n \"motion-safe:slide-in-from-top-2\",\n \"data-[exiting]:motion-safe:slide-out-to-top-2\",\n ],\n left: [\n \"motion-safe:slide-in-from-right-2\",\n \"data-[exiting]:motion-safe:slide-out-to-right-2\",\n ],\n right: [\n \"motion-safe:slide-in-from-left-2\",\n \"data-[exiting]:motion-safe:slide-out-to-left-2\",\n ],\n },\n },\n defaultVariants: {\n side: \"top\",\n },\n }\n);\n\n/**\n * CVA Variants for TooltipArrow\n *\n * Rotation based on placement for correct arrow pointing direction.\n *\n * @see tooltip-prd.md US-2 (Arrow Indicator)\n */\nexport const tooltipArrowVariants = cva(\n // Base arrow styles\n \"fill-[var(--content-foreground)]\",\n {\n variants: {\n side: {\n top: \"rotate-180\",\n bottom: \"rotate-0\",\n left: \"rotate-90\",\n right: \"-rotate-90\",\n },\n },\n defaultVariants: {\n side: \"top\",\n },\n }\n);\n\n/**\n * Map React Aria placement to our side prop\n * React Aria uses placement prop with values like 'top', 'bottom', etc.\n * PlacementAxis can be 'top' | 'bottom' | 'left' | 'right' | null\n */\nfunction placementToSide(placement: string | null | undefined): TooltipSide {\n if (!placement) return 'top';\n // Extract the base placement (e.g., 'top start' -> 'top')\n const basePlacement = placement.split(' ')[0];\n if (basePlacement === 'top' || basePlacement === 'bottom' ||\n basePlacement === 'left' || basePlacement === 'right') {\n return basePlacement;\n }\n return 'top';\n}\n\n/**\n * Tooltip Root Component\n *\n * Manages tooltip open/close state, delays, and trigger behavior.\n * Wraps React Aria's TooltipTrigger with delay configuration.\n *\n * @see tooltip-prd.md US-1 (Basic Usage)\n * @see tooltip-prd.md US-3 (Delay Configuration)\n * @see tooltip-prd.md US-7 (Controlled State)\n */\nfunction TooltipRoot({\n children,\n delay = 700,\n closeDelay = 300,\n trigger = 'hover',\n isOpen,\n defaultOpen = false,\n onOpenChange,\n isDisabled = false,\n}: TooltipProps): ReactElement {\n // React Aria doesn't have a direct trigger mode prop\n // 'focus' mode is achieved by setting delay to a very high value\n // and relying on focus to trigger immediately\n const effectiveDelay = trigger === 'focus' ? 99999999 : delay;\n\n return (\n <AriaTooltipTrigger\n delay={effectiveDelay}\n closeDelay={closeDelay}\n isOpen={isOpen}\n defaultOpen={defaultOpen}\n onOpenChange={onOpenChange}\n isDisabled={isDisabled}\n >\n {children}\n </AriaTooltipTrigger>\n );\n}\n\nTooltipRoot.displayName = 'Tooltip';\n\n/**\n * TooltipTrigger Component\n *\n * Wrapper for the element that triggers the tooltip.\n * The child element must be focusable (or wrapped with Focusable).\n *\n * React Aria's TooltipTrigger automatically applies:\n * - aria-describedby linking to tooltip\n * - Hover and focus event handlers\n *\n * @see tooltip-prd.md US-5 (Non-Button Triggers)\n */\nfunction TooltipTriggerComponent({\n children,\n}: TooltipTriggerProps): ReactElement {\n // React Aria's TooltipTrigger expects the trigger element as a direct child\n // We pass through the child element directly\n return children as ReactElement;\n}\n\nTooltipTriggerComponent.displayName = 'TooltipTrigger';\n\n/**\n * TooltipContent Component\n *\n * The actual tooltip overlay that appears.\n * Supports placement, offset, and optional arrow.\n *\n * @see tooltip-prd.md US-2 (Placement and Arrow)\n * @see tooltip-prd.md Technical Implementation Details\n */\nfunction TooltipContentComponent({\n children,\n side = 'top',\n sideOffset = 4,\n alignOffset = 0,\n shouldFlip = true,\n showArrow = false,\n arrowSize = 8,\n className,\n ...restProps\n}: TooltipContentProps & { 'data-testid'?: string }): ReactElement {\n return (\n <AriaTooltip\n placement={side}\n offset={sideOffset}\n crossOffset={alignOffset}\n shouldFlip={shouldFlip}\n {...restProps}\n className={composeRenderProps(className, (className, renderProps) => {\n // Get actual placement from render props for animation direction\n const actualSide = placementToSide(renderProps.placement);\n return cn(\n tooltipContentVariants({ side: actualSide }),\n className\n );\n })}\n >\n {(renderProps) => {\n const actualSide = placementToSide(renderProps.placement);\n return (\n <>\n {showArrow && (\n <OverlayArrow>\n <svg\n width={arrowSize}\n height={arrowSize}\n viewBox=\"0 0 8 8\"\n className={tooltipArrowVariants({ side: actualSide })}\n data-testid=\"tooltip-arrow\"\n >\n <path d=\"M0 0 L4 4 L8 0\" />\n </svg>\n </OverlayArrow>\n )}\n {children}\n </>\n );\n }}\n </AriaTooltip>\n );\n}\n\nTooltipContentComponent.displayName = 'TooltipContent';\n\n/**\n * TooltipArrow Component\n *\n * Optional arrow component for custom arrow rendering.\n * Automatically positioned based on tooltip placement.\n *\n * Note: This is an alternative to using showArrow prop on TooltipContent.\n * Use this when you need custom arrow styling or rendering.\n *\n * @see tooltip-prd.md US-2 (Arrow Indicator)\n */\nfunction TooltipArrowComponent({\n size = 8,\n className,\n 'data-testid': dataTestId = 'tooltip-arrow',\n ...restProps\n}: TooltipArrowProps & { 'data-testid'?: string }): ReactElement {\n // This component is designed to be used inside TooltipContent\n // The actual positioning is handled by OverlayArrow from React Aria\n return (\n <OverlayArrow>\n {({ placement }) => {\n const side = placementToSide(placement);\n return (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 8 8\"\n className={cn(tooltipArrowVariants({ side }), className)}\n data-testid={dataTestId}\n {...restProps}\n >\n <path d=\"M0 0 L4 4 L8 0\" />\n </svg>\n );\n }}\n </OverlayArrow>\n );\n}\n\nTooltipArrowComponent.displayName = 'TooltipArrow';\n\n/**\n * Export all components\n *\n * Following Themis pattern - export individual components\n * No Object.assign compound pattern for Tooltip since React Aria\n * expects specific component hierarchy.\n */\nexport const Tooltip = TooltipRoot;\nexport const TooltipTrigger = TooltipTriggerComponent;\nexport const TooltipContent = TooltipContentComponent;\nexport const TooltipArrow = TooltipArrowComponent;\n","import { z } from 'zod';\n\n/**\n * Base props schema for all Themis components\n * Ensures consistent accessibility and styling APIs across the library\n *\n * @see spec.md FR-009 to FR-014 (Accessibility Requirements)\n * @see constitution.md Principle IV (Accessibility First - WCAG 2.2 AA minimum)\n */\nexport const BaseComponentPropsSchema = z.object({\n // Styling\n className: z.string().optional(),\n\n // React\n children: z.any().optional(), // ReactNode not directly supported by Zod\n id: z.string().optional(),\n\n // Accessibility (WCAG 2.2 AA requirements)\n 'aria-label': z.string().optional(),\n 'aria-labelledby': z.string().optional(),\n 'aria-describedby': z.string().optional(),\n 'aria-live': z.enum(['off', 'polite', 'assertive']).optional(),\n 'aria-hidden': z.boolean().optional(),\n\n // Testing & Development\n 'data-testid': z.string().optional(),\n});\n\nexport type BaseComponentProps = z.infer<typeof BaseComponentPropsSchema>;\n","/**\n * Determines whether a component should animate.\n *\n * Returns `false` if:\n * - The `animated` prop is explicitly `false`\n * - The user prefers reduced motion\n *\n * @param animated - The component's `animated` prop value (default: `true`)\n * @param prefersReducedMotion - Whether the user prefers reduced motion\n */\nexport function shouldAnimate(\n animated: boolean | undefined,\n prefersReducedMotion: boolean,\n): boolean {\n if (animated === false) return false;\n if (prefersReducedMotion) return false;\n return true;\n}\n","'use client';\n\nimport { useState, useEffect } from 'react';\n\nconst QUERY = '(prefers-reduced-motion: reduce)';\n\nfunction getInitialState(): boolean {\n if (typeof window === 'undefined') return false;\n return window.matchMedia(QUERY).matches;\n}\n\n/**\n * Detects whether the user prefers reduced motion.\n *\n * - SSR-safe (returns `false` on the server)\n * - Reacts to changes in the OS preference\n * - Cleans up the listener on unmount\n */\nexport function useReducedMotion(): boolean {\n const [prefersReducedMotion, setPrefersReducedMotion] = useState(getInitialState);\n\n useEffect(() => {\n const mql = window.matchMedia(QUERY);\n setPrefersReducedMotion(mql.matches);\n\n const handler = (event: MediaQueryListEvent): void => {\n setPrefersReducedMotion(event.matches);\n };\n\n mql.addEventListener('change', handler);\n return () => mql.removeEventListener('change', handler);\n }, []);\n\n return prefersReducedMotion;\n}\n","'use client';\n\n/**\n * Tabs Component - Implementation\n *\n * Accessible tabbed interface component combining React Aria primitives with ShadCN styling.\n * Follows Themis library patterns with compound component structure and direct named exports.\n *\n * Key Features:\n * - React Aria Tabs for full accessibility (WCAG 2.2 AAA)\n * - CVA variants for orientation styling\n * - React 19.2 Activity API for state preservation (preserveState prop)\n * - Dual keyboard activation modes (automatic/manual)\n * - Support for icons, badges, and link-based tabs\n *\n * @see tabs-prd.md (Full requirements)\n * @see Tabs.types.ts (Zod schemas)\n * @see plan.md (Implementation approach)\n */\n\n// React 19.2 Activity API - may not be available in all builds\n// Import conditionally to support environments where Activity is unavailable\nimport {\n Activity as ReactActivity,\n Children,\n createContext,\n isValidElement,\n useContext,\n useEffect,\n useRef,\n useState,\n type ReactNode,\n type Key,\n type ReactElement,\n} from 'react';\nimport { Check, ChevronRight, TriangleAlert } from 'lucide-react';\nimport { Tooltip, TooltipTrigger, TooltipContent } from '../Tooltip';\n\n// Activity component with fallback for environments where it's not available\n// The fallback simply renders children directly - no state preservation when Activity unavailable\n// Note: ActivityFallback doesn't actually preserve state; it's just a pass-through\nconst Activity = ReactActivity ?? function ActivityFallback({\n children,\n mode,\n}: {\n children: ReactNode;\n mode: 'visible' | 'hidden';\n}): ReactElement {\n // When Activity is not available, just render children directly\n // mode is ignored in the fallback\n return <div data-activity-mode={mode}>{children}</div>;\n};\nimport {\n Tabs as AriaTabs,\n TabList as AriaTabList,\n Tab as AriaTab,\n TabPanel as AriaTabPanel,\n composeRenderProps,\n type Key as AriaKey,\n} from 'react-aria-components';\nimport { cva } from 'class-variance-authority';\nimport { cn } from '../../utils/cn';\nimport { shouldAnimate } from '../../utils/shouldAnimate';\nimport { useReducedMotion } from '../../hooks/useReducedMotion';\nimport type {\n TabsProps,\n TabsVariant,\n TabsOrientation,\n TabsVisualSize,\n StepperSeparator,\n TabListProps,\n TabProps,\n TabPanelProps,\n} from './Tabs.types';\n\n// ---------------------------------------------------------------------------\n// Motion lazy-loader — avoids hard dep on optional peer\n// ---------------------------------------------------------------------------\n\ntype MotionSpanComponent = React.ComponentType<{\n layoutId?: string;\n className?: string;\n transition?: Record<string, unknown>;\n style?: React.CSSProperties;\n}>;\n\nlet cachedMotionSpan: MotionSpanComponent | null | undefined; // undefined = pending, null = unavailable\n\nfunction loadMotionSpan(): Promise<MotionSpanComponent | null> {\n if (cachedMotionSpan !== undefined) return Promise.resolve(cachedMotionSpan);\n\n return import('motion/react')\n .then((m) => {\n cachedMotionSpan = m.motion.span as unknown as MotionSpanComponent;\n return cachedMotionSpan;\n })\n .catch(() => {\n cachedMotionSpan = null;\n return null;\n });\n}\n\n// ============================================================================\n// Internal Context\n// ============================================================================\n\ninterface TabsContextValue {\n variant: TabsVariant;\n orientation: TabsOrientation;\n /** For stepper variant: tracked selected key from Tabs root */\n stepperSelectedKey?: Key;\n /** Whether the indicator should animate. Default: true */\n animated: boolean;\n /** Stepper separator style. Only applies to horizontal stepper variant. */\n separator: StepperSeparator;\n /** Visual size for Layer 2 (currently consumed only by pill variant) */\n visualSize: TabsVisualSize;\n}\n\nconst TabsInternalContext = createContext<TabsContextValue>({\n variant: 'default',\n orientation: 'horizontal',\n animated: true,\n separator: 'line',\n visualSize: 'sm',\n});\n\n/**\n * Stepper context for tracking tab order.\n * Only used when variant=\"stepper\" to determine completed/active/inactive states.\n */\ninterface StepperContextValue {\n tabKeys: Key[];\n}\n\nconst StepperContext = createContext<StepperContextValue>({\n tabKeys: [],\n});\n\n// ============================================================================\n// CVA Variants\n// ============================================================================\n\n/**\n * TabList CVA variants\n *\n * @see PRD.md FR-002 (TabList Requirements)\n * @see PRD.md DS-001 (Design System - Layout)\n */\nexport const tabListVariants = cva(\n // Base styles\n [\n 'inline-flex items-center text-[var(--menu-muted)]',\n ],\n {\n variants: {\n variant: {\n default: 'border-b border-[var(--border)] bg-transparent rounded-none p-0 gap-0',\n block: 'justify-center rounded-md p-1 bg-[var(--accent-background)]',\n pill: 'gap-2 bg-transparent rounded-none p-0 border-none',\n stepper: 'flex items-center justify-center gap-0 border-none bg-[var(--content-background)] p-2 rounded-none',\n },\n orientation: {\n horizontal: 'flex-row',\n vertical: 'h-auto flex-col w-full',\n },\n // Only the block bar consumes this — its height tracks the visible tab\n // size (Layer 2) while the 44×44px touch targets (Layer 1) overflow it.\n visualSize: {\n sm: '',\n default: '',\n lg: '',\n },\n },\n compoundVariants: [\n { variant: 'block', orientation: 'horizontal', class: 'gap-0' },\n { variant: 'block', orientation: 'horizontal', visualSize: 'sm', class: 'h-9' },\n { variant: 'block', orientation: 'horizontal', visualSize: 'default', class: 'h-11' },\n { variant: 'block', orientation: 'horizontal', visualSize: 'lg', class: 'h-[52px]' },\n { variant: 'block', orientation: 'vertical', class: 'gap-1' },\n { variant: 'default', orientation: 'vertical', class: 'border-b-0 border-l' },\n // Stepper vertical: keep flex-col from orientation base, just add gap\n { variant: 'stepper', orientation: 'vertical', class: 'gap-1' },\n ],\n defaultVariants: {\n variant: 'default',\n orientation: 'horizontal',\n visualSize: 'default',\n },\n }\n);\n\n/**\n * Tab CVA variants\n *\n * @see PRD.md FR-003 (Tab Requirements)\n * @see PRD.md DS-002 (Design System - Tab Styling)\n * @see PRD.md AR-001 (Accessibility - 44×44px touch targets)\n */\nexport const tabVariants = cva(\n // Base styles\n [\n 'inline-flex items-center justify-center gap-2 whitespace-nowrap',\n 'px-3 py-1.5 text-sm font-medium',\n 'ring-offset-[var(--content-background)] transition-colors',\n 'focus-visible:outline-none focus-visible:ring-2',\n 'focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2',\n // States via data attributes\n 'data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n // WCAG 2.2 AAA: 44×44px minimum touch target\n 'min-h-[44px]',\n ],\n {\n variants: {\n variant: {\n default: [\n // 16px horizontal padding (overrides the base px-3) so the first tab's\n // text aligns with surrounding 16px content insets (e.g. PageTitle).\n 'px-4',\n 'rounded-none bg-transparent',\n 'data-[selected]:text-[var(--content-foreground)]',\n 'hover:text-[var(--content-foreground)]',\n ],\n // Block is Layer 1 only — transparent 44×44px touch target. The visible\n // segmented \"card\" is an inner Layer 2 span; see tabBlockVisualVariants.\n block: [\n 'rounded-sm border-none bg-transparent p-0',\n 'hover:bg-transparent',\n ],\n // Pill is Layer 1 only — transparent 44×44px touch target.\n // The visible pill is rendered as an inner Layer 2 span; see tabPillVisualVariants.\n pill: [\n 'rounded-none border-none bg-transparent p-0',\n 'hover:bg-transparent',\n ],\n stepper: [\n 'flex items-center gap-2 rounded-none border-none bg-transparent px-3 py-2',\n ],\n },\n orientation: {\n horizontal: '',\n vertical: 'w-full justify-start',\n },\n },\n compoundVariants: [\n {\n variant: 'default',\n orientation: 'horizontal',\n class: 'relative -mb-px',\n },\n {\n variant: 'default',\n orientation: 'vertical',\n class: 'relative -ml-px',\n },\n ],\n defaultVariants: {\n variant: 'default',\n orientation: 'horizontal',\n },\n }\n);\n\n/**\n * Pill visual (Layer 2) CVA variants\n *\n * The pill variant follows the three-layer architecture:\n * - Layer 1 (AriaTab): transparent 44×44px touch target — see tabVariants pill case\n * - Layer 2 (this CVA): the visible pill, sized via `visualSize`\n * - Layer 3: children inside the visual pill\n *\n * Selected/hover/border colours are applied alongside this CVA in the Tab\n * component because they depend on render-time `isSelected` state.\n */\nexport const tabPillVisualVariants = cva(\n [\n 'inline-flex items-center justify-center gap-2 whitespace-nowrap',\n 'rounded-lg border font-medium transition-colors',\n ],\n {\n variants: {\n visualSize: {\n sm: 'h-7 px-2.5 text-xs gap-1.5',\n default: 'h-9 px-3 text-sm',\n lg: 'h-11 px-4 text-sm',\n },\n },\n defaultVariants: {\n visualSize: 'sm',\n },\n }\n);\n\n/**\n * Block visual (Layer 2) CVA variants\n *\n * The block variant follows the three-layer architecture:\n * - Layer 1 (AriaTab): transparent 44×44px touch target — see tabVariants block case\n * - Layer 2 (this CVA): the visible segmented \"card\", sized via `visualSize`\n * - Layer 3: children inside the visual card\n *\n * Selected/hover colours are applied alongside this CVA in the Tab component\n * because they depend on render-time `isSelected` state.\n */\nexport const tabBlockVisualVariants = cva(\n [\n 'inline-flex items-center justify-center gap-2 whitespace-nowrap',\n 'rounded-sm font-medium transition-colors',\n ],\n {\n variants: {\n visualSize: {\n sm: 'h-7 px-2.5 text-xs gap-1.5',\n default: 'h-9 px-3 text-sm',\n lg: 'h-11 px-4 text-sm',\n },\n },\n defaultVariants: {\n visualSize: 'default',\n },\n }\n);\n\n/**\n * TabPanel CVA variants\n *\n * @see PRD.md FR-004 (TabPanel Requirements)\n */\nexport const tabPanelVariants = cva(\n [\n 'mt-2 ring-offset-[var(--content-background)]',\n 'focus-visible:outline-none focus-visible:ring-2',\n 'focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2',\n ],\n {\n variants: {},\n defaultVariants: {},\n }\n);\n\n// ============================================================================\n// Components\n// ============================================================================\n\n/**\n * Tabs Root Component\n *\n * Container for tabbed interface. Manages selection state and provides\n * context to child components.\n *\n * @see PRD.md FR-001 (Compound Component Pattern)\n * @see PRD.md FR-012 (Controlled Mode)\n * @see PRD.md FR-013 (Uncontrolled Mode)\n *\n * @example\n * // Uncontrolled\n * <Tabs defaultSelectedKey=\"tab1\">\n * <TabList aria-label=\"Navigation\">\n * <Tab id=\"tab1\">Tab 1</Tab>\n * <Tab id=\"tab2\">Tab 2</Tab>\n * </TabList>\n * <TabPanel id=\"tab1\">Content 1</TabPanel>\n * <TabPanel id=\"tab2\">Content 2</TabPanel>\n * </Tabs>\n *\n * @example\n * // Controlled\n * <Tabs selectedKey={selected} onSelectionChange={setSelected}>\n * ...\n * </Tabs>\n */\nfunction TabsRoot({\n children,\n variant = 'default',\n selectedKey,\n defaultSelectedKey,\n onSelectionChange,\n orientation = 'horizontal',\n keyboardActivation = 'automatic',\n isDisabled = false,\n disabledKeys,\n animated: animatedProp,\n separator = 'line',\n visualSize,\n className,\n ...props\n}: TabsProps) {\n const prefersReducedMotion = useReducedMotion();\n const doAnimate = shouldAnimate(animatedProp, prefersReducedMotion);\n // For stepper variant, track the selected key internally so Tab children\n // can determine completed/active/inactive state. React Aria's internal\n // TabListStateContext is not accessible from our Tab wrapper since tabs\n // are rendered via the collection system.\n const [trackedKey, setTrackedKey] = useState<Key | undefined>(\n selectedKey ?? defaultSelectedKey\n );\n\n const handleSelectionChange = (key: Key) => {\n if (variant === 'stepper') {\n setTrackedKey(key);\n }\n onSelectionChange?.(key);\n };\n\n // For controlled mode, use the prop directly\n const stepperSelectedKey = variant === 'stepper'\n ? (selectedKey ?? trackedKey)\n : undefined;\n\n // Default visualSize: 'sm' (28px) for pill, 'default' for everything else.\n // Pill uses three-layer architecture; other variants currently ignore visualSize.\n const effectiveVisualSize: TabsVisualSize =\n visualSize ?? (variant === 'pill' ? 'sm' : 'default');\n\n return (\n <TabsInternalContext.Provider\n value={{\n variant,\n orientation,\n stepperSelectedKey,\n animated: doAnimate,\n separator,\n visualSize: effectiveVisualSize,\n }}\n >\n <AriaTabs\n selectedKey={selectedKey}\n defaultSelectedKey={defaultSelectedKey}\n onSelectionChange={handleSelectionChange as (key: Key) => void}\n orientation={orientation}\n keyboardActivation={keyboardActivation}\n isDisabled={isDisabled}\n disabledKeys={disabledKeys as Iterable<AriaKey> | undefined}\n className={cn(className)}\n {...props}\n >\n {children}\n </AriaTabs>\n </TabsInternalContext.Provider>\n );\n}\n\nTabsRoot.displayName = 'Tabs';\n\n/**\n * TabList Component\n *\n * Container for tab buttons. Uses roving tabindex for keyboard navigation.\n * Receives orientation from parent Tabs via React Aria context.\n *\n * @see PRD.md FR-002 (TabList Requirements)\n * @see PRD.md AR-001 (ARIA Requirements)\n */\nfunction TabListComponent({\n children,\n className,\n ...props\n}: TabListProps) {\n // Orientation comes from context (authoritative) rather than AriaTabList\n // render props, so the orientation-keyed CVA compounds (incl. the block bar\n // height) always match.\n const { variant, orientation, visualSize } = useContext(TabsInternalContext);\n\n // For stepper variant, collect tab keys from children to determine order\n if (variant === 'stepper') {\n // Extract keys from Tab children to determine ordering\n const tabKeys: Key[] = [];\n Children.forEach(children as ReactNode, (child) => {\n if (isValidElement(child) && child.props && typeof (child.props as Record<string, unknown>).id !== 'undefined') {\n tabKeys.push((child.props as Record<string, unknown>).id as Key);\n }\n });\n\n return (\n <StepperContext.Provider value={{ tabKeys }}>\n <AriaTabList\n className={composeRenderProps(className, (className) =>\n cn(\n tabListVariants({ variant, orientation, visualSize }),\n className\n )\n )}\n {...props}\n >\n {children}\n </AriaTabList>\n </StepperContext.Provider>\n );\n }\n\n return (\n <AriaTabList\n className={composeRenderProps(className, (className) =>\n cn(\n tabListVariants({ variant, orientation, visualSize }),\n className\n )\n )}\n {...props}\n >\n {children}\n </AriaTabList>\n );\n}\n\nTabListComponent.displayName = 'TabList';\n\n/**\n * Tab Component\n *\n * Individual tab button. Can render as button or anchor (when href provided).\n * Supports icons and badges as children.\n *\n * @see PRD.md FR-003 (Tab Requirements)\n * @see PRD.md FR-007 (Disabled States)\n * @see PRD.md FR-013 (Icon Support)\n * @see PRD.md FR-014 (Link-based Tabs)\n */\nfunction TabComponent({\n children,\n id,\n isDisabled = false,\n href,\n target,\n rel,\n download,\n completed,\n sublabel,\n errorDescription,\n className,\n ...props\n}: TabProps) {\n // Warn if icon-only tab without aria-label\n if (process.env.NODE_ENV !== 'production') {\n const hasTextContent =\n typeof children === 'string' ||\n (Array.isArray(children) &&\n children.some((child) => typeof child === 'string'));\n\n if (!hasTextContent && !props['aria-label']) {\n console.warn(\n 'Tabs: Icon-only tabs should have an aria-label for accessibility.'\n );\n }\n }\n\n // Only forward link props when this tab is actually a link. Passing\n // `href={undefined}` makes React Aria spread an empty `href=\"\"` onto the\n // tab's `<div>`, which React rejects (\"An empty string was passed to the\n // href attribute\"). Spreading an empty object for non-link tabs avoids it.\n const linkProps = href !== undefined ? { href, target, rel, download } : {};\n\n const { variant, orientation, stepperSelectedKey, animated: doAnimate, separator, visualSize } = useContext(TabsInternalContext);\n const stepperCtx = useContext(StepperContext);\n\n // Motion.dev component for animated indicator (lazy-loaded)\n const [MotionSpan, setMotionSpan] = useState<MotionSpanComponent | null>(null);\n const motionLoadedRef = useRef(false);\n\n useEffect(() => {\n // 'default' (sliding underline) and 'block' (sliding card) both animate\n // their indicator via a shared-layoutId MotionSpan.\n if ((variant !== 'default' && variant !== 'block') || !doAnimate || motionLoadedRef.current) return;\n motionLoadedRef.current = true;\n loadMotionSpan().then((component) => {\n if (component) setMotionSpan(() => component);\n });\n }, [variant, doAnimate]);\n\n // For stepper variant, render numbered circle with optional connecting line\n if (variant === 'stepper') {\n const tabIndex = stepperCtx.tabKeys.indexOf(id);\n const selectedIndex = stepperSelectedKey !== undefined\n ? stepperCtx.tabKeys.indexOf(stepperSelectedKey)\n : -1;\n const isFirst = tabIndex === 0;\n // Explicit `completed` (when provided) overrides the default index-based\n // inference, so a non-linear flow can mark a later step done while an\n // earlier one is still outstanding.\n const isCompleted = completed !== undefined\n ? completed\n : tabIndex >= 0 && selectedIndex >= 0 && tabIndex < selectedIndex;\n const isActive = tabIndex >= 0 && tabIndex === selectedIndex;\n const isVertical = orientation === 'vertical';\n // Error takes visual precedence over active/completed. Presence of a\n // non-empty errorDescription is what puts the step into the error state.\n const isErrored = errorDescription != null && errorDescription !== false;\n\n // Vertical stepper matches the Wizard stepper look: round circles with a\n // ring on the active/completed step, a vertical connector between steps, and\n // the label/“Current step” subtitle stacked alongside. (Horizontal keeps the\n // inline numbered-pill look below.)\n if (isVertical) {\n const isLast = tabIndex >= 0 && tabIndex === stepperCtx.tabKeys.length - 1;\n // Only the active step gets the ring; completed/errored keep the fill\n // (or destructive fill) without it.\n const circleStateClass = isErrored\n ? cn(\n 'bg-[var(--destructive-background)] text-[var(--destructive-foreground)]',\n isActive && 'ring-4 ring-[var(--destructive-background)]/25',\n )\n : isActive\n ? 'bg-[var(--primary)] text-[var(--primary-foreground)] ring-4 ring-[var(--primary)]/25'\n : isCompleted\n ? 'bg-[var(--primary)] text-[var(--primary-foreground)]'\n : 'border border-[var(--border)] bg-[var(--content-background)] text-[var(--menu-muted)]';\n const labelTextClass = isErrored\n ? 'font-medium text-[var(--destructive-background)]'\n : isActive\n ? 'font-semibold text-[var(--content-foreground)]'\n : isCompleted\n ? 'font-medium text-[var(--content-foreground)]'\n : 'text-[var(--menu-muted)]';\n\n const stepTab = (\n <AriaTab\n id={id}\n isDisabled={isDisabled}\n {...linkProps}\n className={composeRenderProps(className, (className) =>\n cn(tabVariants({ variant, orientation }), 'items-start gap-0 py-0', className)\n )}\n {...props}\n >\n {/* Indicator column: circle + connector to the next step */}\n <span className=\"flex shrink-0 flex-col items-center\">\n <span\n className={cn(\n 'flex h-9 w-9 shrink-0 items-center justify-center rounded-full text-sm font-semibold transition-colors',\n circleStateClass,\n )}\n aria-hidden=\"true\"\n >\n {isErrored ? (\n <TriangleAlert className=\"h-4 w-4\" />\n ) : isCompleted ? (\n <Check className=\"h-4 w-4\" />\n ) : (\n tabIndex + 1\n )}\n </span>\n {!isLast && (\n <span\n className={cn(\n 'my-0.5 h-5 w-0.5 transition-colors',\n isCompleted ? 'bg-[var(--primary)]' : 'bg-[var(--border)]'\n )}\n aria-hidden=\"true\"\n />\n )}\n </span>\n {/* Visually hidden step state for screen readers. The error description\n itself is announced via aria-describedby from the tooltip below. */}\n <span className=\"sr-only\">\n {isErrored\n ? `Step ${tabIndex + 1}, error:`\n : isCompleted\n ? `Step ${tabIndex + 1}, completed:`\n : `Step ${tabIndex + 1}:`}\n </span>\n {/* Label (+ optional sublabel stacked beneath) */}\n <span className=\"flex min-h-9 flex-1 flex-col items-start justify-center pl-3 text-left\">\n <span className={cn('text-sm', labelTextClass)}>{children}</span>\n {sublabel !== undefined && sublabel !== null && sublabel !== false && (\n <span className=\"text-xs text-[var(--content-foreground)]\">{sublabel}</span>\n )}\n </span>\n </AriaTab>\n );\n\n if (isErrored) {\n return (\n <Tooltip delay={300}>\n <TooltipTrigger>{stepTab}</TooltipTrigger>\n <TooltipContent side=\"top\">{errorDescription}</TooltipContent>\n </Tooltip>\n );\n }\n\n return stepTab;\n }\n\n const stepTabHorizontal = (\n <AriaTab\n id={id}\n isDisabled={isDisabled}\n {...linkProps}\n className={composeRenderProps(className, (className) =>\n cn(\n tabVariants({ variant, orientation }),\n className,\n )\n )}\n {...props}\n >\n {/* Separator before tab (horizontal only, except first) */}\n {!isFirst && !isVertical && (\n separator === 'chevron' ? (\n <ChevronRight\n className=\"h-4 w-4 shrink-0 text-[var(--muted-foreground)]\"\n aria-hidden=\"true\"\n />\n ) : (\n <span\n className=\"h-px w-6 bg-[var(--border)]\"\n aria-hidden=\"true\"\n />\n )\n )}\n {/* Inner wrapper for active/error highlight (excludes connecting line) */}\n <span\n className={cn(\n 'inline-flex items-center gap-2 rounded-lg p-2',\n isErrored\n ? 'bg-[var(--destructive-background)]/10'\n : isActive && 'bg-[var(--primary-action)]/10',\n )}\n >\n {/* Step circle */}\n <span\n className={cn(\n 'flex min-h-7 min-w-7 shrink-0 items-center justify-center rounded-lg px-1.5 text-xs font-bold',\n isErrored\n ? 'bg-[var(--destructive-background)] text-[var(--destructive-foreground)]'\n : isActive\n ? 'bg-[var(--primary-action)] text-white'\n : isCompleted\n ? 'bg-[var(--primary-action)] text-white'\n : 'bg-[var(--accent-background)] text-[var(--muted-foreground)]'\n )}\n aria-hidden=\"true\"\n >\n {isErrored ? (\n <TriangleAlert className=\"h-3.5 w-3.5\" />\n ) : isCompleted ? (\n <Check className=\"h-3.5 w-3.5\" />\n ) : (\n tabIndex + 1\n )}\n </span>\n {/* Visually hidden step state for screen readers. The error description\n itself is announced via aria-describedby from the tooltip below. */}\n <span className=\"sr-only\">\n {isErrored\n ? `Step ${tabIndex + 1}, error:`\n : isCompleted\n ? `Step ${tabIndex + 1}, completed:`\n : `Step ${tabIndex + 1}:`}\n </span>\n {/* Tab label (+ optional sublabel stacked beneath) */}\n <span className=\"flex flex-col items-start text-left\">\n <span className={cn(\n isErrored\n ? 'font-semibold text-[var(--destructive-background)]'\n : isActive && 'font-semibold text-[var(--primary-action)]',\n )}>{children}</span>\n {sublabel !== undefined && sublabel !== null && sublabel !== false && (\n <span className=\"text-xs text-[var(--muted-foreground)]\">{sublabel}</span>\n )}\n </span>\n </span>\n </AriaTab>\n );\n\n if (isErrored) {\n return (\n <Tooltip delay={300}>\n <TooltipTrigger>{stepTabHorizontal}</TooltipTrigger>\n <TooltipContent side=\"top\">{errorDescription}</TooltipContent>\n </Tooltip>\n );\n }\n\n return stepTabHorizontal;\n }\n\n // Pill variant: three-layer architecture.\n // Layer 1 (AriaTab) is a transparent 44×44px touch target; the visible pill\n // is rendered as an inner Layer 2 span sized via the `visualSize` context.\n if (variant === 'pill') {\n return (\n <AriaTab\n id={id}\n isDisabled={isDisabled}\n {...linkProps}\n className={composeRenderProps(className, (className) =>\n cn(tabVariants({ variant, orientation }), className)\n )}\n {...props}\n >\n {(renderProps) => (\n <span\n className={cn(\n tabPillVisualVariants({ visualSize }),\n renderProps.isSelected\n ? 'border-[var(--primary-action)] bg-[var(--primary-action)] text-[var(--primary-action-foreground)]'\n : 'border-[var(--border)] bg-[var(--content-background)] text-[var(--content-foreground)] hover:bg-[var(--accent-background)]',\n // Bump on selection. motion-safe: respects prefers-reduced-motion.\n renderProps.isSelected && doAnimate && 'motion-safe:selection-pulse'\n )}\n >\n {children}\n </span>\n )}\n </AriaTab>\n );\n }\n\n // Block variant: three-layer architecture (mirrors pill).\n // Layer 1 (AriaTab) is a transparent 44×44px touch target that overflows the\n // segmented bar; the visible \"card\" is an inner Layer 2 span sized via the\n // `visualSize` context. The selected card is a shared-layoutId MotionSpan that\n // slides between tabs (same mechanism as the default variant's underline).\n if (variant === 'block') {\n const blockHorizontal = orientation === 'horizontal';\n return (\n <AriaTab\n id={id}\n isDisabled={isDisabled}\n {...linkProps}\n className={composeRenderProps(className, (className) =>\n cn(tabVariants({ variant, orientation }), className)\n )}\n {...props}\n >\n {(renderProps) => (\n <span\n className={cn(\n tabBlockVisualVariants({ visualSize }),\n 'relative',\n renderProps.isSelected\n ? 'font-semibold text-[var(--content-foreground)]'\n : 'text-[var(--menu-muted)] hover:text-[var(--content-foreground)]'\n )}\n >\n {/* Sliding card indicator (behind the label) */}\n {renderProps.isSelected && (\n doAnimate && MotionSpan ? (\n <MotionSpan\n layoutId={`tab-block-indicator-${blockHorizontal ? 'h' : 'v'}`}\n className=\"absolute inset-0 rounded-sm bg-[var(--content-background)] shadow-sm\"\n transition={{ type: 'spring', stiffness: 500, damping: 30 }}\n />\n ) : (\n <span className=\"absolute inset-0 rounded-sm bg-[var(--content-background)] shadow-sm\" />\n )\n )}\n <span className=\"relative z-[1] inline-flex items-center gap-2\">{children}</span>\n </span>\n )}\n </AriaTab>\n );\n }\n\n // Default variant: render with sliding indicator\n const isHorizontal = orientation === 'horizontal';\n const indicatorClasses = isHorizontal\n ? 'absolute bottom-0 left-0 right-0 h-0.5 bg-[var(--primary-action)]'\n : 'absolute top-0 bottom-0 left-0 w-0.5 bg-[var(--primary-action)]';\n\n return (\n <AriaTab\n id={id}\n isDisabled={isDisabled}\n {...linkProps}\n className={composeRenderProps(className, (className) =>\n cn(tabVariants({ variant, orientation }), className)\n )}\n {...props}\n >\n {(renderProps) => (\n <>\n {children}\n {/* Tab indicator — animated slide or instant position */}\n {variant === 'default' && renderProps.isSelected && (\n doAnimate && MotionSpan ? (\n <MotionSpan\n layoutId={`tab-indicator-${isHorizontal ? 'h' : 'v'}`}\n className={indicatorClasses}\n transition={{ type: 'spring', stiffness: 500, damping: 30 }}\n />\n ) : (\n <span className={indicatorClasses} />\n )\n )}\n </>\n )}\n </AriaTab>\n );\n}\n\nTabComponent.displayName = 'Tab';\n\n/**\n * TabPanel Component\n *\n * Content panel associated with a tab. Only the selected panel is visible.\n * Supports preserveState for React Activity state preservation.\n *\n * @see PRD.md FR-004 (TabPanel Requirements)\n * @see PRD.md FR-015 (Force Mount Panels)\n * @see PRD.md FR-016 (React Activity State Preservation)\n *\n * @example\n * // Default behavior - content unmounts when hidden\n * <TabPanel id=\"tab1\">Content</TabPanel>\n *\n * @example\n * // Legacy force mount - keeps content in DOM\n * <TabPanel id=\"tab1\" shouldForceMount>Form with state</TabPanel>\n *\n * @example\n * // React Activity - preserves state with proper effect cleanup\n * <TabPanel id=\"tab1\" preserveState>\n * <FormWithDraft />\n * </TabPanel>\n */\nfunction TabPanelComponent({\n children,\n id,\n shouldForceMount = false,\n preserveState = false,\n className,\n ...props\n}: TabPanelProps) {\n // preserveState takes precedence - both enable force mounting\n const forceMount = preserveState || shouldForceMount;\n\n // If children is a render function (for dynamic content based on selection state),\n // we need to use the render props pattern\n if (typeof children === 'function') {\n return (\n <AriaTabPanel\n id={id}\n shouldForceMount={forceMount}\n className={composeRenderProps(className, (className) =>\n cn(tabPanelVariants(), className)\n )}\n {...props}\n >\n {(renderProps) => {\n // React Aria TabPanelRenderProps includes: state, isInert\n // We derive isSelected from state - if state is undefined, panel is selected\n const isSelected = !renderProps.isInert;\n const content = (\n children as (renderProps: { isSelected: boolean }) => ReactNode\n )({ isSelected });\n\n if (preserveState) {\n return (\n <Activity mode={isSelected ? 'visible' : 'hidden'}>\n {content}\n </Activity>\n );\n }\n\n return content;\n }}\n </AriaTabPanel>\n );\n }\n\n // For static children (not a function), render directly\n // If preserveState is enabled, wrap in Activity\n if (preserveState) {\n return (\n <AriaTabPanel\n id={id}\n shouldForceMount={forceMount}\n className={composeRenderProps(className, (className) =>\n cn(tabPanelVariants(), className)\n )}\n {...props}\n >\n {(renderProps) => {\n const isSelected = !renderProps.isInert;\n return (\n <Activity mode={isSelected ? 'visible' : 'hidden'}>\n {children}\n </Activity>\n );\n }}\n </AriaTabPanel>\n );\n }\n\n // Default: render static children directly\n return (\n <AriaTabPanel\n id={id}\n shouldForceMount={forceMount}\n className={composeRenderProps(className, (className) =>\n cn(tabPanelVariants(), className)\n )}\n {...props}\n >\n {children}\n </AriaTabPanel>\n );\n}\n\nTabPanelComponent.displayName = 'TabPanel';\n\n// ============================================================================\n// Exports\n// ============================================================================\n\n/**\n * Direct named exports (not Object.assign compound pattern)\n *\n * Tabs follows React Aria's direct export pattern because:\n * - Simpler structure (only 4 components vs Dialog's 9)\n * - Better tree-shaking with named exports\n * - Clearer imports: import { Tabs, TabList, Tab, TabPanel } from '...'\n *\n * @see plan.md \"Why Direct Named Exports (Not Object.assign)?\"\n */\nexport const Tabs = TabsRoot;\nexport const TabList = TabListComponent;\nexport const Tab = TabComponent;\nexport const TabPanel = TabPanelComponent;\n\n// Re-export types for convenience\nexport type { TabsProps, TabsVariant, TabsVisualSize, StepperSeparator, TabListProps, TabProps, TabPanelProps };\n","import { z } from 'zod';\nimport { BaseComponentPropsSchema } from '../../schemas/BaseComponentProps';\nimport type { ReactNode, Key } from 'react';\n\n/**\n * Tab variant schema\n *\n * - 'default': Transparent background with bottom border indicator for active tab\n * - 'block': Segmented control with accent background container and card-style active tab\n * - 'pill': Independent rounded tabs with filled primary-action background when selected\n * - 'stepper': Numbered step circles with connecting lines (free navigation, not a wizard)\n */\nexport const TabsVariantSchema = z.enum(['default', 'block', 'pill', 'stepper']);\nexport type TabsVariant = z.infer<typeof TabsVariantSchema>;\n\n/**\n * Stepper separator style schema\n *\n * - 'line': Horizontal line between steps (default)\n * - 'chevron': Chevron arrow between steps\n *\n * Only applies to horizontal stepper variant.\n */\nexport const StepperSeparatorSchema = z.enum(['line', 'chevron']);\nexport type StepperSeparator = z.infer<typeof StepperSeparatorSchema>;\n\n/**\n * Visual size schema (Layer 2 of three-layer architecture)\n *\n * The outer touch target (Layer 1) always meets the 44×44px WCAG 2.2 AAA minimum;\n * `visualSize` controls the size of the visible element nested inside it.\n *\n * - 'sm': 28px tall — compact (default for pill variant)\n * - 'default': 36px tall — Button-sm equivalent\n * - 'lg': 44px tall — fills the touch target (no transparent gutter)\n *\n * Consumed by the 'pill' and 'block' variants (both three-layer); the 'default'\n * and 'stepper' variants ignore it.\n */\nexport const TabsVisualSizeSchema = z.enum(['sm', 'default', 'lg']);\nexport type TabsVisualSize = z.infer<typeof TabsVisualSizeSchema>;\n\n/**\n * Tab orientation schema\n *\n * @see PRD.md FR-005 (Orientation Support)\n */\nexport const TabsOrientationSchema = z.enum(['horizontal', 'vertical']);\nexport type TabsOrientation = z.infer<typeof TabsOrientationSchema>;\n\n/**\n * Keyboard activation mode schema\n *\n * @see PRD.md FR-006 (Keyboard Activation Modes)\n */\nexport const TabsKeyboardActivationSchema = z.enum(['automatic', 'manual']);\nexport type TabsKeyboardActivation = z.infer<typeof TabsKeyboardActivationSchema>;\n\n/**\n * Key schema for tab identification\n * Supports both string and number keys per React Aria convention\n */\nexport const KeySchema = z.union([z.string(), z.number()]);\n\n/**\n * Tabs root component props schema\n *\n * @see PRD.md FR-001 (Compound Component Pattern)\n * @see PRD.md FR-012 (Controlled Mode)\n * @see PRD.md FR-013 (Uncontrolled Mode)\n */\nexport const TabsPropsSchema = BaseComponentPropsSchema.extend({\n // Visual variant: 'default' (underline), 'block' (segmented), 'pill' (independent rounded tabs), 'stepper' (numbered steps)\n variant: TabsVariantSchema.optional().default('default'),\n\n // Controlled mode: selected tab key\n selectedKey: KeySchema.optional(),\n\n // Uncontrolled mode: default selected tab key\n defaultSelectedKey: KeySchema.optional(),\n\n // Selection change handler\n onSelectionChange: z.custom<(key: Key) => void>().optional(),\n\n // Orientation: horizontal or vertical layout\n orientation: TabsOrientationSchema.optional().default('horizontal'),\n\n // Keyboard activation: automatic (arrows select) or manual (arrows focus, Enter selects)\n keyboardActivation: TabsKeyboardActivationSchema.optional().default('automatic'),\n\n // Disable all tabs\n isDisabled: z.boolean().optional().default(false),\n\n // Keys of tabs to disable individually\n disabledKeys: z.array(KeySchema).optional(),\n\n // Children: TabList and TabPanel components\n children: z.custom<ReactNode>(),\n\n // Animation (ADR 020 - Micro-Interaction Animation System)\n // When true, the tab indicator slides between tabs (default variant only)\n animated: z.boolean().optional().default(true),\n\n // Stepper separator style: 'line' (default) or 'chevron'\n // Only applies to horizontal stepper variant\n separator: StepperSeparatorSchema.optional().default('line'),\n\n // Visual size for Layer 2 in the three-layer architecture\n // Layer 1 (touch target) always meets 44x44px WCAG AAA; this controls Layer 2.\n // Currently consumed only by the 'pill' variant.\n visualSize: TabsVisualSizeSchema.optional(),\n});\n\nexport interface TabsProps {\n className?: string;\n children?: ReactNode;\n id?: string;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n 'aria-describedby'?: string;\n 'aria-live'?: 'off' | 'polite' | 'assertive';\n 'aria-hidden'?: boolean;\n 'data-testid'?: string;\n variant?: TabsVariant;\n selectedKey?: string | number;\n defaultSelectedKey?: string | number;\n onSelectionChange?: (key: Key) => void;\n orientation?: TabsOrientation;\n keyboardActivation?: TabsKeyboardActivation;\n isDisabled?: boolean;\n disabledKeys?: (string | number)[];\n animated?: boolean;\n separator?: StepperSeparator;\n visualSize?: TabsVisualSize;\n}\n\n/**\n * TabList component props schema\n *\n * @see PRD.md FR-002 (TabList Requirements)\n * @see PRD.md AR-001 (ARIA Requirements)\n */\nexport const TabListPropsSchema = BaseComponentPropsSchema.extend({\n // Accessible label (required for accessibility if no aria-labelledby)\n 'aria-label': z.string().optional(),\n\n // Reference to labelling element\n 'aria-labelledby': z.string().optional(),\n\n // Children: Tab components\n children: z.custom<ReactNode>(),\n});\n\nexport interface TabListProps {\n className?: string;\n children?: ReactNode;\n id?: string;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n 'data-testid'?: string;\n}\n\n/**\n * Tab component props schema\n *\n * @see PRD.md FR-003 (Tab Requirements)\n * @see PRD.md FR-007 (Disabled States)\n * @see PRD.md FR-014 (Link-based Tabs)\n */\nexport const TabPropsSchema = BaseComponentPropsSchema.extend({\n // Unique identifier for the tab (required)\n id: KeySchema,\n\n // Disable this specific tab\n isDisabled: z.boolean().optional().default(false),\n\n // Link tab: URL for navigation-style tabs\n href: z.string().optional(),\n\n // Link tab: target attribute\n target: z.string().optional(),\n\n // Link tab: rel attribute\n rel: z.string().optional(),\n\n // Link tab: download attribute\n download: z.union([z.string(), z.boolean()]).optional(),\n\n // Stepper variant only: explicit completed state. When provided, overrides the\n // default index-based inference (a step is \"completed\" if it precedes the\n // selected one). Lets a consumer mark a later step done while an earlier one\n // is still outstanding (e.g. a non-linear blueprint editor).\n completed: z.boolean().optional(),\n\n // Stepper variant only: small secondary label rendered beneath the tab label\n // (e.g. \"Current step\"). Ignored by other variants.\n sublabel: z.custom<ReactNode>().optional(),\n\n // Stepper variant only: when set, marks this step as errored. The step circle\n // renders in destructive colours with an alert icon (taking precedence over\n // active/completed) and this text appears as a tooltip on hover/focus of the\n // tab. Ignored by other variants.\n errorDescription: z.custom<ReactNode>().optional(),\n\n // Tab content (text, icons, badges)\n children: z.custom<ReactNode>(),\n});\n\nexport interface TabProps {\n className?: string;\n children?: ReactNode;\n id: string | number;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n 'aria-describedby'?: string;\n 'data-testid'?: string;\n isDisabled?: boolean;\n href?: string;\n target?: string;\n rel?: string;\n download?: string | boolean;\n /** Stepper variant only: explicit completed state, overriding index-based inference. */\n completed?: boolean;\n /** Stepper variant only: small secondary label beneath the tab label (e.g. \"Current step\"). */\n sublabel?: ReactNode;\n /**\n * Stepper variant only: when set, marks this step as errored (destructive circle +\n * alert icon, taking precedence over active/completed) and shows this text as a\n * tooltip on hover/focus of the tab. Announced to screen readers via aria-describedby.\n */\n errorDescription?: ReactNode;\n}\n\n/**\n * TabPanel component props schema\n *\n * @see PRD.md FR-004 (TabPanel Requirements)\n * @see PRD.md FR-015 (Force Mount Panels)\n * @see PRD.md FR-016 (React Activity State Preservation)\n */\nexport const TabPanelPropsSchema = BaseComponentPropsSchema.extend({\n // Unique identifier matching a Tab id (required)\n id: KeySchema,\n\n // Legacy: Force panel to stay in DOM when hidden\n // Use preserveState instead for proper effect cleanup\n shouldForceMount: z.boolean().optional().default(false),\n\n // React 19.2 Activity: Preserve state with proper effect cleanup\n // When true, wraps content in <Activity> component\n // Effects are cleaned up when hidden, restored when visible\n preserveState: z.boolean().optional().default(false),\n\n // Panel content\n children: z.custom<ReactNode>(),\n});\n\nexport interface TabPanelProps {\n className?: string;\n children?: ReactNode;\n id: string | number;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n 'data-testid'?: string;\n shouldForceMount?: boolean;\n preserveState?: boolean;\n}\n\n/**\n * Scroll arrow direction for overflow handling\n *\n * @see PRD.md FR-010 (Overflow Handling)\n */\nexport const ScrollArrowDirectionSchema = z.enum(['left', 'right', 'up', 'down']);\nexport type ScrollArrowDirection = z.infer<typeof ScrollArrowDirectionSchema>;\n\n/**\n * Internal props for scroll arrow buttons\n * Used by overflow handling implementation\n */\nexport const ScrollArrowPropsSchema = BaseComponentPropsSchema.extend({\n // Scroll direction\n direction: ScrollArrowDirectionSchema,\n\n // Disable when can't scroll further\n isDisabled: z.boolean().optional().default(false),\n\n // Click handler for scrolling\n onPress: z.custom<() => void>(),\n\n // Accessible label\n 'aria-label': z.string(),\n});\n\nexport interface ScrollArrowProps {\n className?: string;\n id?: string;\n 'aria-label': string;\n 'data-testid'?: string;\n direction: ScrollArrowDirection;\n isDisabled?: boolean;\n onPress: () => void;\n}\n"]}
|