@tribepad/themis 1.6.3 → 1.6.4

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 CHANGED
@@ -5,6 +5,14 @@ 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.6.3] - 2026-06-04
9
+
10
+ ### Added
11
+ - **`SearchField` now supports `expandOnFocus` (and `collapsedWidth`).** `SearchField` delegates to `TextField`, which already had expand-on-focus; the props were simply missing from `SearchFieldProps`, so consumers couldn't set them type-safely. With `expandOnFocus`, the field starts at `collapsedWidth` (default `200px`) and expands to full width while focused or non-empty.
12
+
13
+ ### Fixed
14
+ - **`Tabs` — a non-link `Tab` no longer emits an empty `href=""`.** `TabComponent` always forwarded `href`/`target`/`rel`/`download` to the React Aria `Tab`, so a tab without an `href` passed `href={undefined}`, which React Aria spread onto the tab element as `href=""` — React rejects this ("An empty string was passed to the href attribute") and it broke hydration. Link props are now forwarded only when `href` is defined.
15
+
8
16
  ## [1.6.2] - 2026-06-04
9
17
 
10
18
  ### Changed
@@ -40,6 +40,8 @@ export declare const SearchFieldPropsSchema: z.ZodObject<{
40
40
  onClear: z.ZodOptional<z.ZodCustom<() => void, () => void>>;
41
41
  onChange: z.ZodOptional<z.ZodCustom<(value: string) => void, (value: string) => void>>;
42
42
  isIconHidden: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
43
+ expandOnFocus: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
44
+ collapsedWidth: z.ZodDefault<z.ZodOptional<z.ZodString>>;
43
45
  }, z.core.$strip>;
44
46
  export interface SearchFieldProps {
45
47
  className?: string;
@@ -64,6 +66,8 @@ export interface SearchFieldProps {
64
66
  onClear?: () => void;
65
67
  onChange?: (value: string) => void;
66
68
  isIconHidden?: boolean;
69
+ expandOnFocus?: boolean;
70
+ collapsedWidth?: string;
67
71
  }
68
72
  export type SearchFieldSize = SearchFieldProps['size'];
69
73
  //# sourceMappingURL=SearchField.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SearchField.types.d.ts","sourceRoot":"","sources":["../../../src/elements/SearchField/SearchField.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gDAsBN,MAAM,KAAK,IAAI,UAAf,MAAM,KAAK,IAAI;6CAGlB,IAAI,QAAJ,IAAI;gDAGD,MAAM,KAAK,IAAI,UAAf,MAAM,KAAK,IAAI;;iBAI1C,CAAC;AAEH,MAAM,WAAW,gBAAgB;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,IAAI,GAAG,SAAS,GAAG,IAAI,CAAC;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,MAAM,eAAe,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"SearchField.types.d.ts","sourceRoot":"","sources":["../../../src/elements/SearchField/SearchField.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gDAsBN,MAAM,KAAK,IAAI,UAAf,MAAM,KAAK,IAAI;6CAGlB,IAAI,QAAJ,IAAI;gDAGD,MAAM,KAAK,IAAI,UAAf,MAAM,KAAK,IAAI;;;;iBAS1C,CAAC;AAEH,MAAM,WAAW,gBAAgB;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,IAAI,GAAG,SAAS,GAAG,IAAI,CAAC;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,MAAM,eAAe,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC"}
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- 'use strict';var react=require('react'),reactAriaComponents=require('react-aria-components'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),lucideReact=require('lucide-react'),classVarianceAuthority=require('class-variance-authority'),jsxRuntime=require('react/jsx-runtime'),zod=require('zod');function l(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var re="data-[pressed]:scale-[0.97]";var $="hc:data-[hovered]:outline hc:data-[hovered]:outline-2 hc:data-[hovered]:outline-foreground",Y="hc:data-[pressed]:outline hc:data-[pressed]:outline-2 hc:data-[pressed]:outline-offset-1 hc:data-[pressed]:outline-foreground",ie="disabled:pointer-events-none disabled:opacity-50";var W={sm:"h-9",default:"h-10",lg:"h-11"},w={sm:`${W.sm} px-2 text-xs`,default:`${W.default} px-3 text-sm`,lg:`${W.lg} px-4 text-base`},se="min-h-[44px] flex items-center";var le=classVarianceAuthority.cva("inline-flex justify-center min-h-[44px] min-w-[44px] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50",{variants:{fullWidth:{true:"w-full",false:""},inVerticalGroup:{true:"items-stretch",false:"items-center"}},defaultVariants:{fullWidth:false,inVerticalGroup:false}}),de=classVarianceAuthority.cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-normal ring-offset-background motion-safe:transition-transform motion-safe:duration-200 motion-safe:[transition-timing-function:cubic-bezier(0.34,1.56,0.64,1)] motion-reduce:transition-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 relative cursor-pointer",{variants:{variant:{default:"bg-[var(--primary-action)] text-[var(--primary-action-foreground)] shadow-md hover:bg-[var(--primary-action-hover)] hover:-translate-y-1",destructive:"bg-[var(--destructive-background)] text-[var(--destructive-foreground)] hover:bg-[var(--destructive-background-hover,var(--destructive-background))] motion-safe:hover:btn-warn-shake",outline:"border border-[var(--input-border)] bg-[var(--page-background)] hover:bg-[var(--input-border)]",secondary:"bg-[var(--secondary)] text-[var(--secondary-foreground)] hover:bg-[var(--secondary-hover,var(--secondary))]",ghost:"hover:bg-[var(--accent)] hover:text-[var(--accent-foreground)]",link:"text-[var(--text-link)] underline underline-offset-4 hover:bg-[var(--accent)] hover:text-[var(--text-link-hover)]"},fullWidth:{true:"w-full",false:""},visualSize:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3 text-xs",lg:"h-11 rounded-md px-6 text-base",icon:"h-10 w-10",dot:"h-5 w-5 rounded-full p-0 min-h-0 min-w-0"},paywall:{true:"!bg-[var(--paywall)] !text-[var(--paywall-foreground)] hover:!bg-[var(--paywall)]/90 !cursor-not-allowed !border-transparent",false:""}},defaultVariants:{variant:"default",visualSize:"default",paywall:false}});var Re=react.createContext(null);Re.displayName="ButtonGroupContext";function Fe(){return react.useContext(Re)}var Le=react.createContext(null);Le.displayName="ButtonGroupItemContext";function Ve(){return react.useContext(Le)}classVarianceAuthority.cva("inline-flex items-center gap-0",{variants:{orientation:{horizontal:"flex-row",vertical:"flex-col w-full"}},defaultVariants:{orientation:"horizontal"}});var De=classVarianceAuthority.cva("",{variants:{orientation:{horizontal:"min-w-[44px]",vertical:"flex min-h-[44px]"},position:{first:"",middle:"",last:"",only:""}},compoundVariants:[{orientation:"horizontal",position:"first",className:"rounded-r-none border-r-0"},{orientation:"horizontal",position:"middle",className:"rounded-none border-r-0"},{orientation:"horizontal",position:"last",className:"rounded-l-none"},{orientation:"vertical",position:"first",className:"rounded-b-none border-b-0"},{orientation:"vertical",position:"middle",className:"rounded-none border-b-0"},{orientation:"vertical",position:"last",className:"rounded-t-none"}],defaultVariants:{orientation:"horizontal",position:"only"}});classVarianceAuthority.cva("bg-[var(--border)]",{variants:{orientation:{horizontal:"w-px h-6 mx-1",vertical:"h-px w-full my-1"}},defaultVariants:{orientation:"horizontal"}});var B=react.memo(react.forwardRef(({className:e,buttonVisualClassName:t,variant:o,size:n,visualSize:r,fullWidth:u,loading:d=false,loadingText:p="Loading...",shortcut:S,children:x,isDisabled:g,paywall:i=false,paywallRedirect:T,paywallDescription:Q,onPress:J,...G},ee)=>{let I=react.useId(),_=Fe(),M=Ve(),A=o??_?.variant??"default",E=n??_?.size,k=g??_?.isDisabled??false,F=_?.orientation==="vertical",v=u||F,z=M?De({orientation:_?.orientation??"horizontal",position:M.position}):"",N=r??E??"default";return process.env.NODE_ENV!=="production"&&(N==="dot"||N==="icon")&&!G["aria-label"]&&!x&&console.warn('[Button] visualSize="dot" or "icon" requires aria-label when no visible text is provided (WCAG 1.1.1)'),jsxRuntime.jsx(reactAriaComponents.Button,{ref:ee,isDisabled:k||d||void 0,"aria-disabled":i?true:void 0,"aria-describedby":i?I:void 0,onPress:b=>{if(i){T&&window.open(T,"_blank","noopener,noreferrer");return}J?.(b);},className:l(le({fullWidth:v,inVerticalGroup:F}),e),...G,children:b=>jsxRuntime.jsxs("span",{className:l(de({variant:A,visualSize:N,paywall:i,fullWidth:v}),z,t,re,"",$,Y),"data-pressed":b.isPressed||void 0,children:[d&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(lucideReact.Loader2,{className:"motion-safe:animate-spin","aria-hidden":"true"}),jsxRuntime.jsx("span",{className:"sr-only","aria-live":"polite",children:p})]}),!d&&x,i&&jsxRuntime.jsx(lucideReact.Zap,{"data-testid":"zap-icon","aria-hidden":"true",className:"ml-1"}),i&&jsxRuntime.jsxs("span",{id:I,className:"sr-only",children:["Premium feature: ",Q||"Upgrade required to access this feature"]}),b.isFocusVisible&&S&&jsxRuntime.jsx("kbd",{className:"ml-auto hidden text-xs opacity-60 lg:inline",children:S})]})})}));B.displayName="Button";var we=()=>jsxRuntime.jsxs("svg",{"data-testid":"password-toggle-icon-show",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jsxRuntime.jsx("path",{d:"M1 8s3-5 7-5 7 5 7 5-3 5-7 5-7-5-7-5z"}),jsxRuntime.jsx("circle",{cx:"8",cy:"8",r:"2"})]}),Pe=()=>jsxRuntime.jsxs("svg",{"data-testid":"password-toggle-icon-hide",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jsxRuntime.jsx("path",{d:"M10.5 5.5l-5 5"}),jsxRuntime.jsx("path",{d:"M1 8s3-5 7-5c1.5 0 2.8.6 4 1.5M15 8s-1.5 2.5-4 4"}),jsxRuntime.jsx("path",{d:"M3 13l2-2m7-7l2-2"}),jsxRuntime.jsx("circle",{cx:"8",cy:"8",r:"2"})]});var pe=classVarianceAuthority.cva("flex w-full rounded-md border bg-[var(--content-background)] px-3 py-2 text-sm ring-offset-[var(--content-background)] file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-[var(--content-foreground)] placeholder:text-[var(--menu-muted)] transition-all duration-200",{variants:{size:{sm:`${w.sm} py-1`,default:`${w.default} py-2`,lg:`${w.lg} py-3`},state:{default:"border-[var(--input-border)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2",error:"border-[var(--destructive-background)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--destructive-background)] focus-visible:ring-offset-2",success:"border-[var(--success-background)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--success-ring)] focus-visible:ring-offset-2",disabled:"cursor-not-allowed opacity-50",readonly:"cursor-default bg-[var(--content-background)] opacity-70"}},defaultVariants:{size:"default",state:"default"}}),fe=classVarianceAuthority.cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{state:{default:"text-[var(--content-foreground)]",disabled:"opacity-50 cursor-not-allowed"}},defaultVariants:{state:"default"}}),me=classVarianceAuthority.cva("text-sm text-[var(--content-foreground)]"),He=classVarianceAuthority.cva("text-sm text-[var(--destructive-background)] font-medium"),xe=classVarianceAuthority.cva("text-sm text-[var(--success-foreground)] font-medium");function Me({expandOnFocus:e,collapsedWidth:t,value:o,defaultValue:n,userOnFocus:r,userOnBlur:u}){let[d,p]=react.useState(false),S=react.useCallback(i=>{e&&p(true),r?.(i);},[e,r]),x=react.useCallback(i=>{e&&i.target.value===""&&p(false),u?.(i);},[e,u]),g=react.useMemo(()=>e?d||(o!==void 0?o!=="":n!==void 0&&n!=="")?"100%":t:void 0,[e,d,o,n,t]);return {handleFocus:S,handleBlur:x,inputWidth:g}}function ke({disableCopyPaste:e}){let[t,o]=react.useState(false),[n,r]=react.useState("");react.useEffect(()=>{e&&typeof process<"u"&&process.env.NODE_ENV==="development"&&console.warn("[TextField] Copy/paste prevention should only be used for security-critical fields like password confirmation. This feature can break assistive technology workflows and password managers.");},[e]);let u=react.useCallback(d=>{e&&(d.preventDefault(),o(true),r("Pasting is not allowed in this field. Please type your entry."),setTimeout(()=>{o(false),r("");},250));},[e]);return {isShaking:t,screenReaderMessage:n,handlePaste:u}}function ze({type:e,showPasswordToggle:t}){let[o,n]=react.useState(false),r=react.useCallback(()=>{n(d=>!d);},[]),u=react.useMemo(()=>e==="password"&&t&&o?"text":e,[e,t,o]);return {showPassword:o,actualType:u,handlePasswordToggle:r}}var Ct=react.forwardRef(({className:e,state:t="default",children:o,...n},r)=>jsxRuntime.jsx(reactAriaComponents.Label,{ref:r,className:l(fe({state:t}),e),...n,children:o}));Ct.displayName="TextFieldLabel";var Ot=react.forwardRef(({className:e,size:t="default",state:o="default",...n},r)=>jsxRuntime.jsx(reactAriaComponents.Input,{ref:r,className:l(pe({size:t,state:o}),ie,e),...n}));Ot.displayName="TextFieldInput";var Rt=react.forwardRef(({className:e,children:t,...o},n)=>jsxRuntime.jsx(reactAriaComponents.Text,{ref:n,slot:"description",className:l(me(),e),...o,children:t}));Rt.displayName="TextFieldDescription";var We=react.forwardRef(({className:e,children:t,...o},n)=>jsxRuntime.jsx(reactAriaComponents.FieldError,{ref:n,...o,className:l(He(),e),children:t}));We.displayName="TextFieldError";var Ft=react.forwardRef(({className:e,children:t,...o},n)=>jsxRuntime.jsx(reactAriaComponents.Text,{ref:n,slot:"description",className:l(xe(),e),...o,children:t}));Ft.displayName="TextFieldSuccess";var ve=react.forwardRef(({className:e,size:t="default",label:o,labelHint:n,description:r,errorMessage:u,successMessage:d,type:p="text",isRequired:S=false,isReadOnly:x=false,isDisabled:g=false,isInvalid:i=false,isValid:T=false,id:Q,autoComplete:J,disableCopyPaste:G=false,pattern:ee,patternDescription:I,expandOnFocus:_=false,collapsedWidth:M="200px",prefix:A,suffix:E,prefixSize:k=16,suffixSize:F=16,showPasswordToggle:v,isIconHidden:z=false,onSubmit:N,onClear:te,value:L,defaultValue:b,onFocus:qe,onBlur:je,...V},Ke)=>{let he=react.useId(),Qe=react.useId(),Je=Q||Qe,{handleFocus:et,handleBlur:tt,inputWidth:ot}=Me({expandOnFocus:_,collapsedWidth:M,value:L,defaultValue:b,userOnFocus:qe,userOnBlur:je}),{isShaking:nt,screenReaderMessage:Se,handlePaste:rt}=ke({disableCopyPaste:G}),{showPassword:oe,actualType:at,handlePasswordToggle:Ee}=ze({type:p,showPasswordToggle:v}),f=p==="search",[it,be]=react.useState(b??""),D=L!==void 0,h=D?L:it,st=react.useCallback(s=>{D||be(s),V.onChange?.(s);},[D,V]),U=react.useCallback(()=>{D||be(""),V.onChange?.(""),te?.();},[D,V,te]),lt=react.useCallback(s=>{s.key==="Enter"&&N&&N(h),s.key==="Escape"&&h&&(s.preventDefault(),U());},[h,N,U]),dt=react.useMemo(()=>g?"disabled":x?"readonly":i?"error":T?"success":"default",[g,x,i,T]),ct=react.useMemo(()=>g?"disabled":"default",[g]),Te=react.useMemo(()=>r&&I?`${r} ${I}`:r||I,[r,I]),y=react.useMemo(()=>f&&!z&&!A?jsxRuntime.jsx(lucideReact.Search,{className:t==="sm"?"h-3.5 w-3.5":t==="lg"?"h-5 w-5":"h-4 w-4"}):A,[f,z,A,t]),Ie=react.useMemo(()=>{let s={left:12,right:12};if(y){let ne=typeof y=="string"?y.length*8+16:k+16;s.left=ne;}if(p==="password"&&v)s.right=32;else if(f&&h)s.right=44;else if(E){let ne=typeof E=="string"?E.length*8+16:F+16;s.right=ne;}return s},[y,A,E,k,F,p,v,f,h]),_e=react.useMemo(()=>p==="password"&&v?jsxRuntime.jsx(B,{variant:"ghost",visualSize:"icon",onPress:Ee,"aria-label":oe?"Hide password":"Show password",className:"!min-h-0 !min-w-0 h-8 w-8",children:oe?jsxRuntime.jsx(Pe,{}):jsxRuntime.jsx(we,{})}):f&&h?jsxRuntime.jsx(B,{variant:"ghost",visualSize:"icon",onPress:U,"aria-label":"Clear search",className:"!min-h-0 !min-w-0 h-8 w-8",children:jsxRuntime.jsx(lucideReact.X,{className:t==="sm"?"h-3 w-3":t==="lg"?"h-5 w-5":"h-4 w-4"})}):E,[p,v,oe,E,Ee,f,h,t,U]),Ne=p==="password"&&v||f&&!!h;return jsxRuntime.jsxs(reactAriaComponents.TextField,{ref:Ke,className:l("flex flex-col gap-1.5",e),isRequired:S,isReadOnly:x,isDisabled:g,isInvalid:i,value:f?h:L,defaultValue:f?void 0:b,onChange:f?st:void 0,...V,children:[o&&jsxRuntime.jsxs(reactAriaComponents.Label,{className:l(fe({state:ct}),n&&"flex items-baseline justify-between"),children:[jsxRuntime.jsxs("span",{children:[o,S&&jsxRuntime.jsx("span",{className:"ml-1 text-[var(--destructive-background)]","aria-hidden":"true",children:jsxRuntime.jsx("strong",{children:"*"})})]}),n&&jsxRuntime.jsx("span",{className:"text-xs font-normal text-[var(--muted-foreground)]",children:n})]}),Te&&jsxRuntime.jsx(reactAriaComponents.Text,{slot:"description",className:l(me()),children:Te}),jsxRuntime.jsxs("div",{className:l(se,"relative cursor-text motion-safe:transition-colors motion-safe:duration-200"),style:{width:ot},onClick:s=>{s.target===s.currentTarget&&s.currentTarget.querySelector("input")?.focus();},children:[y&&jsxRuntime.jsx("div",{"data-testid":"textfield-prefix",className:"absolute left-3 flex items-center justify-center pointer-events-none text-[var(--content-foreground)]","aria-hidden":"true",children:y}),jsxRuntime.jsx(reactAriaComponents.Input,{type:at,id:Je,className:l(pe({size:t,state:dt}),ie,nt&&"shake"),style:{width:"100%",paddingLeft:`${Ie.left}px`,paddingRight:`${Ie.right}px`},autoComplete:J,pattern:ee,onPaste:rt,onFocus:et,onBlur:tt,onKeyDown:f?lt:void 0,"aria-required":S?"true":void 0,"aria-readonly":x?"true":void 0,"aria-errormessage":i&&u?he:void 0}),_e&&jsxRuntime.jsx("div",{"data-testid":"textfield-suffix",className:l("absolute right-3 flex items-center justify-center text-[var(--content-foreground)]",Ne?"":"pointer-events-none"),"aria-hidden":Ne?void 0:"true",children:_e})]}),T&&d&&!i&&jsxRuntime.jsx(reactAriaComponents.Text,{slot:"description",className:l(xe()),children:d}),i&&u&&jsxRuntime.jsx(We,{id:he,children:u}),Se&&jsxRuntime.jsx("div",{className:"sr-only",role:"status","aria-live":"polite","aria-atomic":"true",children:Se})]})});ve.displayName="TextField";var Ze=react.forwardRef(({label:e,description:t,errorMessage:o,"aria-label":n,"aria-labelledby":r,...u},d)=>(process.env.NODE_ENV!=="production"&&!e&&!n&&!r&&console.warn("[SearchField] Either label, aria-label, or aria-labelledby is required for accessibility (WCAG 1.1.1)"),jsxRuntime.jsx(ve,{ref:d,type:"search",label:e,description:o?void 0:t,errorMessage:o,isInvalid:!!o,"aria-label":e?void 0:n,"aria-labelledby":r,...u})));Ze.displayName="SearchField";var Xe=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 Dt=Xe.extend({size:zod.z.enum(["sm","default","lg"]).optional().default("default"),label:zod.z.string().optional(),description:zod.z.string().optional(),errorMessage:zod.z.string().optional(),isRequired:zod.z.boolean().optional(),isReadOnly:zod.z.boolean().optional(),isDisabled:zod.z.boolean().optional(),placeholder:zod.z.string().optional(),value:zod.z.string().optional(),defaultValue:zod.z.string().optional(),name:zod.z.string().optional(),onSubmit:zod.z.custom().optional(),onClear:zod.z.custom().optional(),onChange:zod.z.custom().optional(),isIconHidden:zod.z.boolean().optional().default(false)});var wt=classVarianceAuthority.cva("group flex flex-col gap-1.5 w-full",{variants:{size:{sm:"",default:"",lg:""}},defaultVariants:{size:"default"}}),Pt=classVarianceAuthority.cva("text-[var(--text-primary)] font-medium",{variants:{size:{sm:"text-xs",default:"text-sm",lg:"text-base"}},defaultVariants:{size:"default"}}),Bt=classVarianceAuthority.cva("text-[var(--muted-foreground)]",{variants:{size:{sm:"text-xs",default:"text-xs",lg:"text-sm"}},defaultVariants:{size:"default"}}),Ht=classVarianceAuthority.cva("text-[var(--destructive-background)]",{variants:{size:{sm:"text-xs",default:"text-xs",lg:"text-sm"}},defaultVariants:{size:"default"}});exports.SearchField=Ze;exports.SearchFieldPropsSchema=Dt;exports.searchFieldDescriptionVariants=Bt;exports.searchFieldErrorVariants=Ht;exports.searchFieldLabelVariants=Pt;exports.searchFieldVariants=wt;//# sourceMappingURL=index.js.map
2
+ 'use strict';var react=require('react'),reactAriaComponents=require('react-aria-components'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),lucideReact=require('lucide-react'),classVarianceAuthority=require('class-variance-authority'),jsxRuntime=require('react/jsx-runtime'),zod=require('zod');function d(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var re="data-[pressed]:scale-[0.97]";var $="hc:data-[hovered]:outline hc:data-[hovered]:outline-2 hc:data-[hovered]:outline-foreground",W="hc:data-[pressed]:outline hc:data-[pressed]:outline-2 hc:data-[pressed]:outline-offset-1 hc:data-[pressed]:outline-foreground",ie="disabled:pointer-events-none disabled:opacity-50";var Y={sm:"h-9",default:"h-10",lg:"h-11"},w={sm:`${Y.sm} px-2 text-xs`,default:`${Y.default} px-3 text-sm`,lg:`${Y.lg} px-4 text-base`},se="min-h-[44px] flex items-center";var le=classVarianceAuthority.cva("inline-flex justify-center min-h-[44px] min-w-[44px] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50",{variants:{fullWidth:{true:"w-full",false:""},inVerticalGroup:{true:"items-stretch",false:"items-center"}},defaultVariants:{fullWidth:false,inVerticalGroup:false}}),de=classVarianceAuthority.cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-normal ring-offset-background motion-safe:transition-transform motion-safe:duration-200 motion-safe:[transition-timing-function:cubic-bezier(0.34,1.56,0.64,1)] motion-reduce:transition-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 relative cursor-pointer",{variants:{variant:{default:"bg-[var(--primary-action)] text-[var(--primary-action-foreground)] shadow-md hover:bg-[var(--primary-action-hover)] hover:-translate-y-1",destructive:"bg-[var(--destructive-background)] text-[var(--destructive-foreground)] hover:bg-[var(--destructive-background-hover,var(--destructive-background))] motion-safe:hover:btn-warn-shake",outline:"border border-[var(--input-border)] bg-[var(--page-background)] hover:bg-[var(--input-border)]",secondary:"bg-[var(--secondary)] text-[var(--secondary-foreground)] hover:bg-[var(--secondary-hover,var(--secondary))]",ghost:"hover:bg-[var(--accent)] hover:text-[var(--accent-foreground)]",link:"text-[var(--text-link)] underline underline-offset-4 hover:bg-[var(--accent)] hover:text-[var(--text-link-hover)]"},fullWidth:{true:"w-full",false:""},visualSize:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3 text-xs",lg:"h-11 rounded-md px-6 text-base",icon:"h-10 w-10",dot:"h-5 w-5 rounded-full p-0 min-h-0 min-w-0"},paywall:{true:"!bg-[var(--paywall)] !text-[var(--paywall-foreground)] hover:!bg-[var(--paywall)]/90 !cursor-not-allowed !border-transparent",false:""}},defaultVariants:{variant:"default",visualSize:"default",paywall:false}});var Fe=react.createContext(null);Fe.displayName="ButtonGroupContext";function Re(){return react.useContext(Fe)}var Le=react.createContext(null);Le.displayName="ButtonGroupItemContext";function Ve(){return react.useContext(Le)}classVarianceAuthority.cva("inline-flex items-center gap-0",{variants:{orientation:{horizontal:"flex-row",vertical:"flex-col w-full"}},defaultVariants:{orientation:"horizontal"}});var De=classVarianceAuthority.cva("",{variants:{orientation:{horizontal:"min-w-[44px]",vertical:"flex min-h-[44px]"},position:{first:"",middle:"",last:"",only:""}},compoundVariants:[{orientation:"horizontal",position:"first",className:"rounded-r-none border-r-0"},{orientation:"horizontal",position:"middle",className:"rounded-none border-r-0"},{orientation:"horizontal",position:"last",className:"rounded-l-none"},{orientation:"vertical",position:"first",className:"rounded-b-none border-b-0"},{orientation:"vertical",position:"middle",className:"rounded-none border-b-0"},{orientation:"vertical",position:"last",className:"rounded-t-none"}],defaultVariants:{orientation:"horizontal",position:"only"}});classVarianceAuthority.cva("bg-[var(--border)]",{variants:{orientation:{horizontal:"w-px h-6 mx-1",vertical:"h-px w-full my-1"}},defaultVariants:{orientation:"horizontal"}});var B=react.memo(react.forwardRef(({className:e,buttonVisualClassName:t,variant:o,size:n,visualSize:r,fullWidth:u,loading:c=false,loadingText:p="Loading...",shortcut:S,children:x,isDisabled:g,paywall:i=false,paywallRedirect:T,paywallDescription:Q,onPress:J,...G},ee)=>{let I=react.useId(),_=Re(),M=Ve(),A=o??_?.variant??"default",E=n??_?.size,k=g??_?.isDisabled??false,R=_?.orientation==="vertical",v=u||R,z=M?De({orientation:_?.orientation??"horizontal",position:M.position}):"",N=r??E??"default";return process.env.NODE_ENV!=="production"&&(N==="dot"||N==="icon")&&!G["aria-label"]&&!x&&console.warn('[Button] visualSize="dot" or "icon" requires aria-label when no visible text is provided (WCAG 1.1.1)'),jsxRuntime.jsx(reactAriaComponents.Button,{ref:ee,isDisabled:k||c||void 0,"aria-disabled":i?true:void 0,"aria-describedby":i?I:void 0,onPress:b=>{if(i){T&&window.open(T,"_blank","noopener,noreferrer");return}J?.(b);},className:d(le({fullWidth:v,inVerticalGroup:R}),e),...G,children:b=>jsxRuntime.jsxs("span",{className:d(de({variant:A,visualSize:N,paywall:i,fullWidth:v}),z,t,re,"",$,W),"data-pressed":b.isPressed||void 0,children:[c&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(lucideReact.Loader2,{className:"motion-safe:animate-spin","aria-hidden":"true"}),jsxRuntime.jsx("span",{className:"sr-only","aria-live":"polite",children:p})]}),!c&&x,i&&jsxRuntime.jsx(lucideReact.Zap,{"data-testid":"zap-icon","aria-hidden":"true",className:"ml-1"}),i&&jsxRuntime.jsxs("span",{id:I,className:"sr-only",children:["Premium feature: ",Q||"Upgrade required to access this feature"]}),b.isFocusVisible&&S&&jsxRuntime.jsx("kbd",{className:"ml-auto hidden text-xs opacity-60 lg:inline",children:S})]})})}));B.displayName="Button";var we=()=>jsxRuntime.jsxs("svg",{"data-testid":"password-toggle-icon-show",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jsxRuntime.jsx("path",{d:"M1 8s3-5 7-5 7 5 7 5-3 5-7 5-7-5-7-5z"}),jsxRuntime.jsx("circle",{cx:"8",cy:"8",r:"2"})]}),Pe=()=>jsxRuntime.jsxs("svg",{"data-testid":"password-toggle-icon-hide",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jsxRuntime.jsx("path",{d:"M10.5 5.5l-5 5"}),jsxRuntime.jsx("path",{d:"M1 8s3-5 7-5c1.5 0 2.8.6 4 1.5M15 8s-1.5 2.5-4 4"}),jsxRuntime.jsx("path",{d:"M3 13l2-2m7-7l2-2"}),jsxRuntime.jsx("circle",{cx:"8",cy:"8",r:"2"})]});var pe=classVarianceAuthority.cva("flex w-full rounded-md border bg-[var(--content-background)] px-3 py-2 text-sm ring-offset-[var(--content-background)] file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-[var(--content-foreground)] placeholder:text-[var(--menu-muted)] transition-all duration-200",{variants:{size:{sm:`${w.sm} py-1`,default:`${w.default} py-2`,lg:`${w.lg} py-3`},state:{default:"border-[var(--input-border)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2",error:"border-[var(--destructive-background)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--destructive-background)] focus-visible:ring-offset-2",success:"border-[var(--success-background)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--success-ring)] focus-visible:ring-offset-2",disabled:"cursor-not-allowed opacity-50",readonly:"cursor-default bg-[var(--content-background)] opacity-70"}},defaultVariants:{size:"default",state:"default"}}),fe=classVarianceAuthority.cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{state:{default:"text-[var(--content-foreground)]",disabled:"opacity-50 cursor-not-allowed"}},defaultVariants:{state:"default"}}),me=classVarianceAuthority.cva("text-sm text-[var(--content-foreground)]"),He=classVarianceAuthority.cva("text-sm text-[var(--destructive-background)] font-medium"),xe=classVarianceAuthority.cva("text-sm text-[var(--success-foreground)] font-medium");function Me({expandOnFocus:e,collapsedWidth:t,value:o,defaultValue:n,userOnFocus:r,userOnBlur:u}){let[c,p]=react.useState(false),S=react.useCallback(i=>{e&&p(true),r?.(i);},[e,r]),x=react.useCallback(i=>{e&&i.target.value===""&&p(false),u?.(i);},[e,u]),g=react.useMemo(()=>e?c||(o!==void 0?o!=="":n!==void 0&&n!=="")?"100%":t:void 0,[e,c,o,n,t]);return {handleFocus:S,handleBlur:x,inputWidth:g}}function ke({disableCopyPaste:e}){let[t,o]=react.useState(false),[n,r]=react.useState("");react.useEffect(()=>{e&&typeof process<"u"&&process.env.NODE_ENV==="development"&&console.warn("[TextField] Copy/paste prevention should only be used for security-critical fields like password confirmation. This feature can break assistive technology workflows and password managers.");},[e]);let u=react.useCallback(c=>{e&&(c.preventDefault(),o(true),r("Pasting is not allowed in this field. Please type your entry."),setTimeout(()=>{o(false),r("");},250));},[e]);return {isShaking:t,screenReaderMessage:n,handlePaste:u}}function ze({type:e,showPasswordToggle:t}){let[o,n]=react.useState(false),r=react.useCallback(()=>{n(c=>!c);},[]),u=react.useMemo(()=>e==="password"&&t&&o?"text":e,[e,t,o]);return {showPassword:o,actualType:u,handlePasswordToggle:r}}var Ct=react.forwardRef(({className:e,state:t="default",children:o,...n},r)=>jsxRuntime.jsx(reactAriaComponents.Label,{ref:r,className:d(fe({state:t}),e),...n,children:o}));Ct.displayName="TextFieldLabel";var Ot=react.forwardRef(({className:e,size:t="default",state:o="default",...n},r)=>jsxRuntime.jsx(reactAriaComponents.Input,{ref:r,className:d(pe({size:t,state:o}),ie,e),...n}));Ot.displayName="TextFieldInput";var Ft=react.forwardRef(({className:e,children:t,...o},n)=>jsxRuntime.jsx(reactAriaComponents.Text,{ref:n,slot:"description",className:d(me(),e),...o,children:t}));Ft.displayName="TextFieldDescription";var Ye=react.forwardRef(({className:e,children:t,...o},n)=>jsxRuntime.jsx(reactAriaComponents.FieldError,{ref:n,...o,className:d(He(),e),children:t}));Ye.displayName="TextFieldError";var Rt=react.forwardRef(({className:e,children:t,...o},n)=>jsxRuntime.jsx(reactAriaComponents.Text,{ref:n,slot:"description",className:d(xe(),e),...o,children:t}));Rt.displayName="TextFieldSuccess";var ve=react.forwardRef(({className:e,size:t="default",label:o,labelHint:n,description:r,errorMessage:u,successMessage:c,type:p="text",isRequired:S=false,isReadOnly:x=false,isDisabled:g=false,isInvalid:i=false,isValid:T=false,id:Q,autoComplete:J,disableCopyPaste:G=false,pattern:ee,patternDescription:I,expandOnFocus:_=false,collapsedWidth:M="200px",prefix:A,suffix:E,prefixSize:k=16,suffixSize:R=16,showPasswordToggle:v,isIconHidden:z=false,onSubmit:N,onClear:te,value:L,defaultValue:b,onFocus:qe,onBlur:je,...V},Ke)=>{let he=react.useId(),Qe=react.useId(),Je=Q||Qe,{handleFocus:et,handleBlur:tt,inputWidth:ot}=Me({expandOnFocus:_,collapsedWidth:M,value:L,defaultValue:b,userOnFocus:qe,userOnBlur:je}),{isShaking:nt,screenReaderMessage:Se,handlePaste:rt}=ke({disableCopyPaste:G}),{showPassword:oe,actualType:at,handlePasswordToggle:Ee}=ze({type:p,showPasswordToggle:v}),f=p==="search",[it,be]=react.useState(b??""),D=L!==void 0,h=D?L:it,st=react.useCallback(s=>{D||be(s),V.onChange?.(s);},[D,V]),U=react.useCallback(()=>{D||be(""),V.onChange?.(""),te?.();},[D,V,te]),lt=react.useCallback(s=>{s.key==="Enter"&&N&&N(h),s.key==="Escape"&&h&&(s.preventDefault(),U());},[h,N,U]),dt=react.useMemo(()=>g?"disabled":x?"readonly":i?"error":T?"success":"default",[g,x,i,T]),ct=react.useMemo(()=>g?"disabled":"default",[g]),Te=react.useMemo(()=>r&&I?`${r} ${I}`:r||I,[r,I]),y=react.useMemo(()=>f&&!z&&!A?jsxRuntime.jsx(lucideReact.Search,{className:t==="sm"?"h-3.5 w-3.5":t==="lg"?"h-5 w-5":"h-4 w-4"}):A,[f,z,A,t]),Ie=react.useMemo(()=>{let s={left:12,right:12};if(y){let ne=typeof y=="string"?y.length*8+16:k+16;s.left=ne;}if(p==="password"&&v)s.right=32;else if(f&&h)s.right=44;else if(E){let ne=typeof E=="string"?E.length*8+16:R+16;s.right=ne;}return s},[y,A,E,k,R,p,v,f,h]),_e=react.useMemo(()=>p==="password"&&v?jsxRuntime.jsx(B,{variant:"ghost",visualSize:"icon",onPress:Ee,"aria-label":oe?"Hide password":"Show password",className:"!min-h-0 !min-w-0 h-8 w-8",children:oe?jsxRuntime.jsx(Pe,{}):jsxRuntime.jsx(we,{})}):f&&h?jsxRuntime.jsx(B,{variant:"ghost",visualSize:"icon",onPress:U,"aria-label":"Clear search",className:"!min-h-0 !min-w-0 h-8 w-8",children:jsxRuntime.jsx(lucideReact.X,{className:t==="sm"?"h-3 w-3":t==="lg"?"h-5 w-5":"h-4 w-4"})}):E,[p,v,oe,E,Ee,f,h,t,U]),Ne=p==="password"&&v||f&&!!h;return jsxRuntime.jsxs(reactAriaComponents.TextField,{ref:Ke,className:d("flex flex-col gap-1.5",e),isRequired:S,isReadOnly:x,isDisabled:g,isInvalid:i,value:f?h:L,defaultValue:f?void 0:b,onChange:f?st:void 0,...V,children:[o&&jsxRuntime.jsxs(reactAriaComponents.Label,{className:d(fe({state:ct}),n&&"flex items-baseline justify-between"),children:[jsxRuntime.jsxs("span",{children:[o,S&&jsxRuntime.jsx("span",{className:"ml-1 text-[var(--destructive-background)]","aria-hidden":"true",children:jsxRuntime.jsx("strong",{children:"*"})})]}),n&&jsxRuntime.jsx("span",{className:"text-xs font-normal text-[var(--muted-foreground)]",children:n})]}),Te&&jsxRuntime.jsx(reactAriaComponents.Text,{slot:"description",className:d(me()),children:Te}),jsxRuntime.jsxs("div",{className:d(se,"relative cursor-text motion-safe:transition-colors motion-safe:duration-200"),style:{width:ot},onClick:s=>{s.target===s.currentTarget&&s.currentTarget.querySelector("input")?.focus();},children:[y&&jsxRuntime.jsx("div",{"data-testid":"textfield-prefix",className:"absolute left-3 flex items-center justify-center pointer-events-none text-[var(--content-foreground)]","aria-hidden":"true",children:y}),jsxRuntime.jsx(reactAriaComponents.Input,{type:at,id:Je,className:d(pe({size:t,state:dt}),ie,nt&&"shake"),style:{width:"100%",paddingLeft:`${Ie.left}px`,paddingRight:`${Ie.right}px`},autoComplete:J,pattern:ee,onPaste:rt,onFocus:et,onBlur:tt,onKeyDown:f?lt:void 0,"aria-required":S?"true":void 0,"aria-readonly":x?"true":void 0,"aria-errormessage":i&&u?he:void 0}),_e&&jsxRuntime.jsx("div",{"data-testid":"textfield-suffix",className:d("absolute right-3 flex items-center justify-center text-[var(--content-foreground)]",Ne?"":"pointer-events-none"),"aria-hidden":Ne?void 0:"true",children:_e})]}),T&&c&&!i&&jsxRuntime.jsx(reactAriaComponents.Text,{slot:"description",className:d(xe()),children:c}),i&&u&&jsxRuntime.jsx(Ye,{id:he,children:u}),Se&&jsxRuntime.jsx("div",{className:"sr-only",role:"status","aria-live":"polite","aria-atomic":"true",children:Se})]})});ve.displayName="TextField";var Ze=react.forwardRef(({label:e,description:t,errorMessage:o,"aria-label":n,"aria-labelledby":r,...u},c)=>(process.env.NODE_ENV!=="production"&&!e&&!n&&!r&&console.warn("[SearchField] Either label, aria-label, or aria-labelledby is required for accessibility (WCAG 1.1.1)"),jsxRuntime.jsx(ve,{ref:c,type:"search",label:e,description:o?void 0:t,errorMessage:o,isInvalid:!!o,"aria-label":e?void 0:n,"aria-labelledby":r,...u})));Ze.displayName="SearchField";var Xe=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 Dt=Xe.extend({size:zod.z.enum(["sm","default","lg"]).optional().default("default"),label:zod.z.string().optional(),description:zod.z.string().optional(),errorMessage:zod.z.string().optional(),isRequired:zod.z.boolean().optional(),isReadOnly:zod.z.boolean().optional(),isDisabled:zod.z.boolean().optional(),placeholder:zod.z.string().optional(),value:zod.z.string().optional(),defaultValue:zod.z.string().optional(),name:zod.z.string().optional(),onSubmit:zod.z.custom().optional(),onClear:zod.z.custom().optional(),onChange:zod.z.custom().optional(),isIconHidden:zod.z.boolean().optional().default(false),expandOnFocus:zod.z.boolean().optional().default(false),collapsedWidth:zod.z.string().optional().default("200px")});var wt=classVarianceAuthority.cva("group flex flex-col gap-1.5 w-full",{variants:{size:{sm:"",default:"",lg:""}},defaultVariants:{size:"default"}}),Pt=classVarianceAuthority.cva("text-[var(--text-primary)] font-medium",{variants:{size:{sm:"text-xs",default:"text-sm",lg:"text-base"}},defaultVariants:{size:"default"}}),Bt=classVarianceAuthority.cva("text-[var(--muted-foreground)]",{variants:{size:{sm:"text-xs",default:"text-xs",lg:"text-sm"}},defaultVariants:{size:"default"}}),Ht=classVarianceAuthority.cva("text-[var(--destructive-background)]",{variants:{size:{sm:"text-xs",default:"text-xs",lg:"text-sm"}},defaultVariants:{size:"default"}});exports.SearchField=Ze;exports.SearchFieldPropsSchema=Dt;exports.searchFieldDescriptionVariants=Bt;exports.searchFieldErrorVariants=Ht;exports.searchFieldLabelVariants=Pt;exports.searchFieldVariants=wt;//# sourceMappingURL=index.js.map
3
3
  //# sourceMappingURL=index.js.map