@zvoove/unity-ui 2.43.0 → 2.44.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.
@@ -4141,7 +4141,7 @@ export declare interface TableSectionRow {
4141
4141
  }
4142
4142
 
4143
4143
  export declare const Tabs: {
4144
- <T extends React.ElementType = "button">({ items, activeItem, onChange, hideBorder, itemsAlignment, isSticky, panels, linkComponent: LinkComponent, }: TabsProps<T>): JSX.Element;
4144
+ <T extends React.ElementType = "button">({ items, activeItem, onChange, hideBorder, itemsAlignment, isSticky, panels, panelPadding, linkComponent: LinkComponent, }: TabsProps<T>): JSX.Element;
4145
4145
  displayName: string;
4146
4146
  };
4147
4147
 
@@ -4178,6 +4178,11 @@ export declare interface TabsProps<T extends React.ElementType = 'button'> {
4178
4178
  * The alignment of the tabs.
4179
4179
  */
4180
4180
  itemsAlignment?: 'left' | 'center' | 'right' | 'between' | 'around' | 'evenly';
4181
+ /**
4182
+ * Padding applied to each panel.
4183
+ * @default 'md'
4184
+ */
4185
+ panelPadding?: SpacingKeys;
4181
4186
  }
4182
4187
 
4183
4188
  export declare const TabStepper: {
@@ -4491,7 +4496,7 @@ export declare interface TopBarProps {
4491
4496
  density?: 'default' | '-2' | '-4';
4492
4497
  }
4493
4498
 
4494
- export declare const Typography: ({ children, variant, size, as: AsComponent, color, textAlign, truncate, truncatedBy, textTransform, hyphenate, wrap, ...props }: TypographyProps) => JSX.Element;
4499
+ export declare const Typography: ({ children, variant, size, as: AsComponent, color, textAlign, truncate, truncatedBy, textTransform, hyphenate, wrap, className, ...props }: TypographyProps) => JSX.Element;
4495
4500
 
4496
4501
  declare type TypographyElements = 'p' | 'span' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
4497
4502
 
@@ -4544,8 +4549,9 @@ export declare type TypographyProps<T extends TypographyElements = 'p'> = Omit<R
4544
4549
  */
4545
4550
  truncate?: number;
4546
4551
  /**
4547
- * Whether overflowing text is truncated at word boundaries or individual letters.
4548
- * Use with `truncate`. The `letter` value applies `word-break: break-all`.
4552
+ * Controls whether text wraps at word boundaries or individual letters.
4553
+ * Can be used with or without `truncate`. The `letter` value applies
4554
+ * `word-break: break-all`.
4549
4555
  * @default 'word'
4550
4556
  */
4551
4557
  truncatedBy?: 'word' | 'letter';
@@ -746,8 +746,8 @@ return E(of,{direction:{minimum:"column",mobile:"row"},gap:{minimum:"xs",tablet:
746
746
  /* @__PURE__ */b(qd,{size:"sm",variant:"textSecondary",icon:"first-page",onClick:()=>{s||r||l(1)},disabled:s||r,"aria-label":"First page"}),
747
747
  /* @__PURE__ */b(qd,{size:"sm",variant:"textSecondary",icon:"chevron-left",onClick:()=>{s||r||l(e-1)},disabled:s||r,"aria-label":"Previous page"}),
748
748
  /* @__PURE__ */b(qd,{size:"sm",variant:"textSecondary",icon:"chevron-right",onClick:()=>{c||r||l(e+1)},disabled:c||r,"aria-label":"Next page"}),
749
- /* @__PURE__ */b(qd,{size:"sm",variant:"textSecondary",icon:"last-page",onClick:()=>{c||r||l(a)},disabled:c||r,"aria-label":"Last page"})]})]})},dg=ul({base:["relative","inline-block","group","focus:outline-none","focus-visible:outline-none","focus-visible:ring-none"],variants:{cursorPointer:{true:["cursor-pointer"]},wrapperWidth:{fit:["w-fit"],full:["w-full","min-w-none","max-w-full"]}}}),hg=ul({base:["absolute","z-60","rounded-sm","overflow-hidden","text-body-small","w-fit","bg-surface","text-on-surface","shadow-elevation2","dark:bg-surface-container","dark:shadow-elevation2-dark"],variants:{hasCustomHeight:{true:["flex","flex-col"]},placement:{top:["bottom-full","left-1/2","-translate-x-1/2"],"top-left":["bottom-full","left-0"],"top-right":["bottom-full","right-0","-translate-x-full"],bottom:["top-full","left-1/2","-translate-x-1/2"],"bottom-left":["top-full","left-0"],"bottom-right":["top-full","right-0","-translate-x-full"],left:["right-full","top-1/2","-translate-y-1/2"],right:["left-full","top-1/2","-translate-y-1/2"],"left-top":["right-full","top-none"],"left-bottom":["right-full","bottom-none"],"right-top":["left-full","top-none"],"right-bottom":["left-full","bottom-none"]}}}),pg=ul({base:["absolute","z-[9999]","transition-[opacity,scale]","duration-200","ease-in-out"],variants:{isVisible:{true:["opacity-100","scale-100"],false:["opacity-0","scale-95"]}}}),ug=ul({base:["list-none","p-none","m-none","w-full","overflow-y-auto","min-w-[150px]","relative"],variants:{hasControls:{true:[],false:[]},hasCustomHeight:{true:["flex-1"],false:[]}},compoundVariants:[{hasCustomHeight:!1,hasControls:!0,class:["max-h-[200px]"]},{hasCustomHeight:!1,hasControls:!1,class:["max-h-[320px]"]}],defaultVariants:{hasCustomHeight:!1}}),Hg=ul({base:["px-sm","cursor-pointer","transition-colors","size-full","flex","items-center","justify-between","gap-sm","whitespace-nowrap","focus:outline-none","hover:bg-on-surface/8","focus:bg-on-surface/8","focus-visible:bg-on-surface/8","transition-colors","duration-300"],variants:{isStatic:{true:["cursor-default","hover:bg-transparent","focus:bg-transparent","focus-visible:bg-transparent"]},isSelected:{true:["bg-primary/8","focus:bg-primary/8"]},density:{default:["py-md"],"-2":["py-sm"],"-4":["py-xs"]}}}),gg=ul({base:["transition-colors","font-body!"],variants:{variant:{display:[],body:[],title:[],headline:[],label:[]},size:{sm:[],md:[],lg:[]},textAlign:{left:["text-left"],center:["text-center"],right:["text-right"]},textTransform:{uppercase:["uppercase"],lowercase:["lowercase"],capitalize:["capitalize"]},hyphenate:{true:["hyphens-auto"],false:["hyphens-none"]},color:S,wrap:{false:["whitespace-nowrap"]},truncatedBy:{word:[],letter:["break-all"]}},compoundVariants:[{size:"sm",variant:"display",class:["text-display-small!"]},{size:"md",variant:"display",class:["text-display-medium!"]},{size:"lg",variant:"display",class:["text-display-large!"]},{size:"sm",variant:"body",class:["text-body-small!"]},{size:"md",variant:"body",class:["text-body-medium!"]},{size:"lg",variant:"body",class:["text-body-large!"]},{size:"sm",variant:"title",class:["text-title-small!"]},{size:"md",variant:"title",class:["text-title-medium!"]},{size:"lg",variant:"title",class:["text-title-large!"]},{size:"sm",variant:"headline",class:["text-headline-small!"]},{size:"md",variant:"headline",class:["text-headline-medium!"]},{size:"lg",variant:"headline",class:["text-headline-large!"]},{size:"sm",variant:"label",class:["text-label-small!"]},{size:"md",variant:"label",class:["text-label-medium!"]},{size:"lg",variant:"label",class:["text-label-large!"]}],defaultVariants:{variant:"body",size:"md",truncatedBy:"word"}}),Cg={small:"sm",medium:"md",large:"lg"},fg=e=>(e=>e in Cg)(e)?(ve(!0,`@Typography: size="${e}" is deprecated. Use size="${Cg[e]}" instead. The legacy values will be removed in v3.0.0.`),Cg[e]):e,Vg=({children:e,variant:a="body",size:t="md",as:l="p",color:n="on-surface",textAlign:r="left",truncate:i,truncatedBy:o="word",textTransform:s,hyphenate:c=!0,wrap:m=!0,...d})=>{const h=je(t)??"md",p=fg(h),u=i?{WebkitLineClamp:i,WebkitBoxOrient:"vertical",display:"-webkit-box",overflow:"hidden",textOverflow:"ellipsis"}:{};/* @__PURE__ */
750
- return b(l,{className:gg({variant:a,size:p,color:n,textAlign:r,textTransform:s,hyphenate:c,wrap:m,truncatedBy:o}),...d,style:u,children:e})},Zg=(e,t)=>{if(!t)return e;const l=new RegExp(t,"gi"),n=e.replace(l,'<span class="font-semibold">$&</span>');return a.createElement("span",{dangerouslySetInnerHTML:{__html:n}})},vg=({item:e,density:a,buttonProps:t,commonProps:l,ItemComponent:n,children:r})=>{const[i,o]=v(!1),[s,c]=v({top:0,left:0}),m=Z(null),d=Z(null),p=Z(null),H=Qe(d,i),g=h(()=>{m.current&&clearTimeout(m.current),o(!0)},[]),C=h(()=>{m.current=setTimeout(()=>{o(!1)},150)},[]);return u(()=>()=>{m.current&&clearTimeout(m.current)},[]),u(()=>{if(!i||!d.current)return;const e=()=>{const e=d.current.getBoundingClientRect(),a=p.current?.offsetWidth??200,t=window.innerWidth-e.right>=a+4,l=e.top,n=t?e.right+4:e.left-a-4;c(Je({top:l,left:n},H))};return e(),window.addEventListener("scroll",e,!0),()=>window.removeEventListener("scroll",e,!0)},[i,H]),/* @__PURE__ */E("li",{ref:d,role:"none",onMouseEnter:g,onMouseLeave:C,children:[/* @__PURE__ */b(n,{...t,...l,onClick:e=>{e.preventDefault(),e.stopPropagation()},children:r}),i&&e.subMenuItems&&H&&M(/* @__PURE__ */b("div",{ref:p,className:["absolute","z-9999","rounded-sm","overflow-hidden","bg-surface","text-on-surface","shadow-elevation2","dark:bg-surface-container","dark:shadow-elevation2-dark"].join(" "),style:{top:`${s.top}px`,left:`${s.left}px`},onMouseEnter:g,onMouseLeave:C,children:/* @__PURE__ */b("ul",{className:ug({hasControls:!1,hasCustomHeight:!1}),role:"menu",children:e.subMenuItems.map(e=>e.isDivider?/* @__PURE__ */b("li",{role:"none",className:"my-xs2",children:/* @__PURE__ */b(hH,{...e.dividerProps})},e.id):e.customContent?/* @__PURE__ */b("li",{role:"none",children:/* @__PURE__ */b("div",{className:Hg({density:a,isSelected:!1,isStatic:!0}),children:e.customContent})},e.id):/* @__PURE__ */b("li",{role:"none",children:/* @__PURE__ */b("button",{type:"button",role:"menuitem",tabIndex:0,className:Hg({density:a,isSelected:!1}),onClick:()=>e.onClick?.(),children:/* @__PURE__ */E("span",{className:"flex items-center gap-sm",children:[e.icon&&/* @__PURE__ */b("span",{className:"inline-block align-middle size-lg",children:/* @__PURE__ */b(Hp,{name:e.icon,size:"sm"})}),/* @__PURE__ */b("span",{className:"inline-block align-middle",children:/* @__PURE__ */b(Vg,{as:"span",variant:"body",wrap:!1,children:e.label})})]})})},e.id))})}),H)]})},xg=({innerId:e,placement:a,density:t,selectable:l,showSearch:n,searchPlaceholder:r,allowSelectAll:i,allowClearAll:o,selectAllLabel:s,clearAllLabel:c,noResultsFoundMessage:m,isLoading:d,isLoadingMore:h,queryHighlight:p,filteredItems:u,innerSelectedItem:H,atLeastOneHasIcon:g,menuRef:C,listRef:f,searchInputRef:V,menuItemsRef:Z,searchQuery:v,onSearchChange:x,onItemClick:A,onKeyDown:M,onMenuItemFocus:y,onSelectAll:L,onClearAll:k,onScroll:F,onMouseEnter:N,onMouseLeave:S,onSearchFocus:_,allItemsAreSelected:D,shouldShowClearAll:I,isOpen:T,height:z,minHeight:R,maxHeight:O})=>{const B=je(a),U=je(z),W=je(R),j=je(O);/* @__PURE__ */
749
+ /* @__PURE__ */b(qd,{size:"sm",variant:"textSecondary",icon:"last-page",onClick:()=>{c||r||l(a)},disabled:c||r,"aria-label":"Last page"})]})]})},dg=ul({base:["relative","inline-block","group","focus:outline-none","focus-visible:outline-none","focus-visible:ring-none"],variants:{cursorPointer:{true:["cursor-pointer"]},wrapperWidth:{fit:["w-fit"],full:["w-full","min-w-none","max-w-full"]}}}),hg=ul({base:["absolute","z-60","rounded-sm","overflow-hidden","text-body-small","w-fit","bg-surface","text-on-surface","shadow-elevation2","dark:bg-surface-container","dark:shadow-elevation2-dark"],variants:{hasCustomHeight:{true:["flex","flex-col"]},placement:{top:["bottom-full","left-1/2","-translate-x-1/2"],"top-left":["bottom-full","left-0"],"top-right":["bottom-full","right-0","-translate-x-full"],bottom:["top-full","left-1/2","-translate-x-1/2"],"bottom-left":["top-full","left-0"],"bottom-right":["top-full","right-0","-translate-x-full"],left:["right-full","top-1/2","-translate-y-1/2"],right:["left-full","top-1/2","-translate-y-1/2"],"left-top":["right-full","top-none"],"left-bottom":["right-full","bottom-none"],"right-top":["left-full","top-none"],"right-bottom":["left-full","bottom-none"]}}}),pg=ul({base:["absolute","z-[9999]","transition-[opacity,scale]","duration-200","ease-in-out"],variants:{isVisible:{true:["opacity-100","scale-100"],false:["opacity-0","scale-95"]}}}),ug=ul({base:["list-none","p-none","m-none","w-full","overflow-y-auto","min-w-[150px]","relative"],variants:{hasControls:{true:[],false:[]},hasCustomHeight:{true:["flex-1"],false:[]}},compoundVariants:[{hasCustomHeight:!1,hasControls:!0,class:["max-h-[200px]"]},{hasCustomHeight:!1,hasControls:!1,class:["max-h-[320px]"]}],defaultVariants:{hasCustomHeight:!1}}),Hg=ul({base:["px-sm","cursor-pointer","transition-colors","size-full","flex","items-center","justify-between","gap-sm","whitespace-nowrap","focus:outline-none","hover:bg-on-surface/8","focus:bg-on-surface/8","focus-visible:bg-on-surface/8","transition-colors","duration-300"],variants:{isStatic:{true:["cursor-default","hover:bg-transparent","focus:bg-transparent","focus-visible:bg-transparent"]},isSelected:{true:["bg-primary/8","focus:bg-primary/8"]},density:{default:["py-md"],"-2":["py-sm"],"-4":["py-xs"]}}}),gg=ul({base:["transition-colors","font-body!"],variants:{variant:{display:[],body:[],title:[],headline:[],label:[]},size:{sm:[],md:[],lg:[]},textAlign:{left:["text-left"],center:["text-center"],right:["text-right"]},textTransform:{uppercase:["uppercase"],lowercase:["lowercase"],capitalize:["capitalize"]},hyphenate:{true:["hyphens-auto"],false:["hyphens-none"]},color:S,wrap:{false:["whitespace-nowrap"]},truncatedBy:{word:[],letter:["break-all"]}},compoundVariants:[{size:"sm",variant:"display",class:["text-display-small!"]},{size:"md",variant:"display",class:["text-display-medium!"]},{size:"lg",variant:"display",class:["text-display-large!"]},{size:"sm",variant:"body",class:["text-body-small!"]},{size:"md",variant:"body",class:["text-body-medium!"]},{size:"lg",variant:"body",class:["text-body-large!"]},{size:"sm",variant:"title",class:["text-title-small!"]},{size:"md",variant:"title",class:["text-title-medium!"]},{size:"lg",variant:"title",class:["text-title-large!"]},{size:"sm",variant:"headline",class:["text-headline-small!"]},{size:"md",variant:"headline",class:["text-headline-medium!"]},{size:"lg",variant:"headline",class:["text-headline-large!"]},{size:"sm",variant:"label",class:["text-label-small!"]},{size:"md",variant:"label",class:["text-label-medium!"]},{size:"lg",variant:"label",class:["text-label-large!"]}],defaultVariants:{variant:"body",size:"md",truncatedBy:"word"}}),Cg={small:"sm",medium:"md",large:"lg"},fg=e=>(e=>e in Cg)(e)?(ve(!0,`@Typography: size="${e}" is deprecated. Use size="${Cg[e]}" instead. The legacy values will be removed in v3.0.0.`),Cg[e]):e,Vg=({children:e,variant:a="body",size:t="md",as:l="p",color:n="on-surface",textAlign:r="left",truncate:i,truncatedBy:o="word",textTransform:s,hyphenate:c=!0,wrap:m=!0,className:d,...h})=>{const p=je(t)??"md",u=fg(p),H=i?{WebkitLineClamp:i,WebkitBoxOrient:"vertical",display:"-webkit-box",overflow:"hidden",textOverflow:"ellipsis"}:{};/* @__PURE__ */
750
+ return b(l,{className:gg({variant:a,size:u,color:n,textAlign:r,textTransform:s,hyphenate:c,wrap:m,truncatedBy:o,className:d}),...h,style:H,children:e})},Zg=(e,t)=>{if(!t)return e;const l=new RegExp(t,"gi"),n=e.replace(l,'<span class="font-semibold">$&</span>');return a.createElement("span",{dangerouslySetInnerHTML:{__html:n}})},vg=({item:e,density:a,buttonProps:t,commonProps:l,ItemComponent:n,children:r})=>{const[i,o]=v(!1),[s,c]=v({top:0,left:0}),m=Z(null),d=Z(null),p=Z(null),H=Qe(d,i),g=h(()=>{m.current&&clearTimeout(m.current),o(!0)},[]),C=h(()=>{m.current=setTimeout(()=>{o(!1)},150)},[]);return u(()=>()=>{m.current&&clearTimeout(m.current)},[]),u(()=>{if(!i||!d.current)return;const e=()=>{const e=d.current.getBoundingClientRect(),a=p.current?.offsetWidth??200,t=window.innerWidth-e.right>=a+4,l=e.top,n=t?e.right+4:e.left-a-4;c(Je({top:l,left:n},H))};return e(),window.addEventListener("scroll",e,!0),()=>window.removeEventListener("scroll",e,!0)},[i,H]),/* @__PURE__ */E("li",{ref:d,role:"none",onMouseEnter:g,onMouseLeave:C,children:[/* @__PURE__ */b(n,{...t,...l,onClick:e=>{e.preventDefault(),e.stopPropagation()},children:r}),i&&e.subMenuItems&&H&&M(/* @__PURE__ */b("div",{ref:p,className:["absolute","z-9999","rounded-sm","overflow-hidden","bg-surface","text-on-surface","shadow-elevation2","dark:bg-surface-container","dark:shadow-elevation2-dark"].join(" "),style:{top:`${s.top}px`,left:`${s.left}px`},onMouseEnter:g,onMouseLeave:C,children:/* @__PURE__ */b("ul",{className:ug({hasControls:!1,hasCustomHeight:!1}),role:"menu",children:e.subMenuItems.map(e=>e.isDivider?/* @__PURE__ */b("li",{role:"none",className:"my-xs2",children:/* @__PURE__ */b(hH,{...e.dividerProps})},e.id):e.customContent?/* @__PURE__ */b("li",{role:"none",children:/* @__PURE__ */b("div",{className:Hg({density:a,isSelected:!1,isStatic:!0}),children:e.customContent})},e.id):/* @__PURE__ */b("li",{role:"none",children:/* @__PURE__ */b("button",{type:"button",role:"menuitem",tabIndex:0,className:Hg({density:a,isSelected:!1}),onClick:()=>e.onClick?.(),children:/* @__PURE__ */E("span",{className:"flex items-center gap-sm",children:[e.icon&&/* @__PURE__ */b("span",{className:"inline-block align-middle size-lg",children:/* @__PURE__ */b(Hp,{name:e.icon,size:"sm"})}),/* @__PURE__ */b("span",{className:"inline-block align-middle",children:/* @__PURE__ */b(Vg,{as:"span",variant:"body",wrap:!1,children:e.label})})]})})},e.id))})}),H)]})},xg=({innerId:e,placement:a,density:t,selectable:l,showSearch:n,searchPlaceholder:r,allowSelectAll:i,allowClearAll:o,selectAllLabel:s,clearAllLabel:c,noResultsFoundMessage:m,isLoading:d,isLoadingMore:h,queryHighlight:p,filteredItems:u,innerSelectedItem:H,atLeastOneHasIcon:g,menuRef:C,listRef:f,searchInputRef:V,menuItemsRef:Z,searchQuery:v,onSearchChange:x,onItemClick:A,onKeyDown:M,onMenuItemFocus:y,onSelectAll:L,onClearAll:k,onScroll:F,onMouseEnter:N,onMouseLeave:S,onSearchFocus:_,allItemsAreSelected:D,shouldShowClearAll:I,isOpen:T,height:z,minHeight:R,maxHeight:O})=>{const B=je(a),U=je(z),W=je(R),j=je(O);/* @__PURE__ */
751
751
  return E("div",{ref:C,className:hg({placement:B,hasCustomHeight:!!(U||W||j)}),style:{height:U,minHeight:W,maxHeight:j},onMouseEnter:N,onMouseLeave:S,role:"menu","aria-labelledby":e,tabIndex:-1,children:[(n||i&&!D)&&/* @__PURE__ */E(w,{children:[/* @__PURE__ */E(of,{gap:"xs",padding:"xs",align:"center",onClick:e=>{e.stopPropagation()},children:[n&&/* @__PURE__ */b(GV,{ref:V,label:r,placeholder:r,density:"-4",hideLabel:!0,value:v,onChange:x,onKeyDown:e=>{"ArrowDown"!==e.key&&"ArrowUp"!==e.key&&"Tab"!==e.key||e.stopPropagation()},onFocus:_,clearable:!0}),"multiple"===l&&i&&!d&&!D&&/* @__PURE__ */b(qd,{variant:"text","aria-label":"Select all",size:"md",onClick:L,children:s})]}),/* @__PURE__ */b(hH,{})]}),
752
752
  /* @__PURE__ */E("ul",{id:e,ref:f,className:ug({hasControls:n||i||o,hasCustomHeight:!!(U||W||j)}),role:"none",onScroll:F,children:[d&&/* @__PURE__ */b("li",{role:"none",children:/* @__PURE__ */E(of,{gap:"sm",padding:{x:"sm",y:"md"},children:[
753
753
  /* @__PURE__ */b(Ef,{width:"100%",height:18}),
@@ -796,12 +796,12 @@ return b("label",{htmlFor:g,className:`cursor-pointer ${Z?"w-full":"w-fit"} inli
796
796
  /* @__PURE__ */E("span",{className:$f({checked:e,disabled:a}),children:[/* @__PURE__ */b("input",{id:g,name:l,value:n,type:"checkbox",checked:e,"aria-checked":e,"aria-disabled":a,disabled:a,onChange:f,onKeyDown:a=>{"Space"===a.key&&(a.preventDefault(),a.stopPropagation(),f({target:{checked:e}}))},className:"sr-only",ref:d,tabIndex:a?-1:0,...m}),/* @__PURE__ */E("div",{className:Pf({checked:e,animate:h,disabled:a,withIcons:null!==V}),children:[V&&e&&/* @__PURE__ */b("div",{className:"z-1","data-testid":"icon-on",children:/* @__PURE__ */b(Hp,{name:V.on,size:"2xs"})}),V&&!e&&/* @__PURE__ */b("div",{className:"z-1","data-testid":"icon-off",children:/* @__PURE__ */b(Hp,{name:V.off,size:"2xs"})})]})]}),C&&"right"===s&&/* @__PURE__ */E(Vg,{variant:"body",size:"lg",children:["string"==typeof o&&o,"object"==typeof o&&/* @__PURE__ */b(w,{children:e?o.on:o.off})]})]})})});Xf.displayName="Switch";var Gf=ul({base:["overflow-x-auto"]}),Yf=ul({base:["table-auto","w-full"]}),qf=ul({base:["py-md","px-sm","border-b","border-outline-variant","max-mobile:hidden"],variants:{hasBackgroundColor:{true:["bg-surface-container-low"]}}}),Kf=ul({base:["text-body-medium","not-last:border-b","transition-colors","transition-all","border-outline-variant","[&+tr]:transition-all","[&+tr]:duration-200","[&+tr]:ease-in-out","mobile:hover:bg-surface-container-lowest","max-mobile:block","max-mobile:odd:bg-surface-container-lowest"],variants:{isSubRow:{true:["border-b-0!","hover:bg-transparent"]},isLastWithSubRow:{true:["border-b-0!"]},isOpen:{true:["[&+tr]:border-t","[&+tr]:border-outline-variant"]},isSubRowOpen:{true:["bg-surface-container-lowest"]},isSection:{true:["bg-surface-container-low","cursor-default","mobile:hover:bg-surface-container-low!","max-mobile:odd:bg-surface-container-low!"]},clickable:{true:["cursor-pointer"]}}}),Jf=ul({base:["p-sm","relative","max-mobile:p-xs","max-mobile:inline-flex","max-mobile:w-full","max-mobile:justify-between","max-mobile:before:content-[attr(data-label)]","max-mobile:before:text-label-large","max-mobile:gap-sm"],variants:{variant:{header:["not-last:after:absolute","not-last:after:right-[0px]","not-last:after:top-1/2","not-last:after:-translate-y-1/2","not-last:after:w-px","not-last:after:h-[12px]","not-last:after:bg-outline-variant"],section:["bg-surface-container-low","max-mobile:block!","max-mobile:p-sm!","max-mobile:before:content-none!","max-mobile:gap-0!","max-mobile:justify-start!"]},orderable:{true:["cursor-pointer"]}}}),Qf=ul({base:["absolute","inset-0","z-0","cursor-pointer"],variants:{duplicate:{true:["opacity-0"]}}}),eV=ul({base:["relative","z-10","pointer-events-none","[&_a]:pointer-events-auto","[&_button]:pointer-events-auto","[&_input]:pointer-events-auto","[&_select]:pointer-events-auto","[&_textarea]:pointer-events-auto","[&_label]:pointer-events-auto",'[&_[role~="button"]]:pointer-events-auto','[&_[role~="combobox"]]:pointer-events-auto','[&_[role~="link"]]:pointer-events-auto','[&_[role~="checkbox"]]:pointer-events-auto','[&_[role~="radio"]]:pointer-events-auto','[&_[role~="tab"]]:pointer-events-auto','[&_[role~="switch"]]:pointer-events-auto','[&_[role~="menuitem"]]:pointer-events-auto','[&_[role~="option"]]:pointer-events-auto']}),aV="asc",tV="desc",lV="left",nV="center",rV="right",iV=e=>"object"==typeof e&&null!==e&&"type"in e&&"section"===e.type,oV=e=>{let a="flex-start";return e===rV&&(a="flex-end"),e===nV&&(a="center"),e===lV&&(a="flex-start"),a},sV=["a","button","input","select","textarea","label",'[role~="button"]','[role~="combobox"]','[role~="link"]','[role~="checkbox"]','[role~="radio"]','[role~="tab"]','[role~="switch"]','[role~="menuitem"]','[role~="option"]'].join(", "),cV=(e,a)=>{if(!(e instanceof Element))return!1;const t=e.closest(sV);return Boolean(t&&t!==a)},mV=/* @__PURE__ */new Set(["http:","https:","mailto:","tel:"]),dV=e=>{if("string"!=typeof e)return;const a=e.trim();if(a){try{const e=new URL(a,"https://unity-ui.invalid").protocol;if(!mV.has(e))return}catch{return}return a}},hV=({data:e,columns:t,title:l,subtitle:n,actions:r,filters:i,footer:o,orderBy:s,onOrderByChange:c,emptyState:m,hiddenColumns:d,loading:h=!1,expandedRows:p,headerBackgroundColor:u=!1,onRowClick:H,linkComponent:g="a",getRowLinkProps:C,rowAriaLabel:f})=>{const{isSmallerThan:V}=ge(),Z=t.filter(e=>!d?.includes(e.id)),v=t.some(e=>"type"===e.id);/* @__PURE__ */
797
797
  return E(th,{variant:"outlined",padding:"none",overflow:"hidden",children:[(r||l)&&/* @__PURE__ */E(w,{children:[/* @__PURE__ */E(of,{padding:{y:"xs",x:"md"},direction:{minimum:"column",mobile:"row"},justify:"space-between",align:"center",children:[l?/* @__PURE__ */b(w,{children:l&&/* @__PURE__ */E(of,{gap:"none",padding:{y:"xs"},children:[/* @__PURE__ */b(Vg,{variant:"title",size:"lg",as:"h1",children:l}),n&&/* @__PURE__ */b(Vg,{color:"on-surface-variant",children:n})]})}):/* @__PURE__ */b("div",{}),/* @__PURE__ */b("div",{children:/* @__PURE__ */b(of,{direction:"row",gap:"none",children:r})})]}),/* @__PURE__ */b(hH,{})]}),i&&/* @__PURE__ */E(w,{children:[/* @__PURE__ */b(of,{padding:"md",direction:"row",gap:"sm",align:"center",children:i}),/* @__PURE__ */b(hH,{})]}),
798
798
  /* @__PURE__ */b("div",{className:Gf(),children:/* @__PURE__ */E("table",{className:Yf(),children:[/* @__PURE__ */b("thead",{children:/* @__PURE__ */b("tr",{className:qf({hasBackgroundColor:u}),children:Z.map(e=>/* @__PURE__ */b("th",{className:Jf({variant:"header",orderable:e.orderable}),style:{width:e.width,minWidth:e.minWidth,textAlign:e.align??lV},role:e.orderable?"button":void 0,tabIndex:e.orderable?0:void 0,onClick:()=>{e.orderable&&c?.({columnId:e.id,direction:s?.direction===aV?tV:aV})},children:/* @__PURE__ */E(of,{direction:"row",gap:"xs",align:"center",justify:oV(e.align??lV),children:[/* @__PURE__ */b(Vg,{variant:"label",size:"lg",wrap:!1,as:"span",children:e.label}),e.orderable&&/* @__PURE__ */b(Hp,{name:s?.column===e.id?s.direction===aV?"arrow-up":"arrow-down":"minus",size:"sm",color:"on-surface"})]})},`${e.id}-header`))})}),/* @__PURE__ */b("tbody",{children:h?/* @__PURE__ */b(w,{children:Array.from({length:10}).map((e,a)=>/* @__PURE__ */b("tr",{className:Kf(),children:Z.map(e=>/* @__PURE__ */b("td",{className:Jf(),align:e.align??lV,children:/* @__PURE__ */b(Ef,{width:`${Math.floor(61*Math.random())+40}%`})},`${e.id}-row-loading`))},`row-loading-${a}`))}):e.length>0?e.map((l,n)=>{if(!v&&iV(l))/* @__PURE__ */return b("tr",{className:Kf({isSection:!0}),"data-type":"section-row",children:/* @__PURE__ */b("td",{colSpan:Z.length,className:Jf({variant:"section"}),children:/* @__PURE__ */b(Vg,{variant:"label",size:"lg",as:"span",children:l.label})})},`section-row-${l.id??n}`);const r=l,i=n===e.length-1,o=!!r.expandableRow,s=i&&o,c=p?.includes(r.expandableRow?.id??""),m=((e,a)=>{const t=e,l=e=>a.some(a=>a.id===e);return{onClick:l("onClick")?void 0:t.onClick,href:l("href")?void 0:t.href,to:l("to")?void 0:t.to,target:l("target")?void 0:t.target,rel:l("rel")?void 0:t.rel,linkProps:l("linkProps")?void 0:t.linkProps}})(r,t),d={...C?.(r,n)??{},...m.linkProps??{},...m.href?{href:m.href}:{},...m.to?{to:m.to}:{},...m.target?{target:m.target}:{},...m.rel?{rel:m.rel}:{}},h=((e,a)=>{for(const t of a){const a=e[t.id];if("string"==typeof a&&a.trim())return a}})(r,Z)??f,u=((e,a,t)=>{const l={...e};delete l.children,delete l.className;const n=dV(l.href),r=dV(l.to);n?l.href=n:delete l.href,r?l.to=r:delete l.to;const i=l.href??l.to;if(i)return"a"===a&&(delete l.to,l.href=i),null==l["aria-label"]&&t&&(l["aria-label"]=t),l})(d,g,h),x=Boolean(u),A=Boolean(m.onClick||H||x),M=A?e=>{(e.target instanceof Element&&null!==e.target.closest("[data-table-row-link]")||!cV(e.target,e.currentTarget))&&(m.onClick?.(e),H?.(e,r,n))}:()=>{},w=A&&!x?e=>{cV(e.target,e.currentTarget)||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),e.currentTarget.click())}:()=>{};/* @__PURE__ */
799
- return E(a.Fragment,{children:[/* @__PURE__ */b("tr",{className:Kf({isLastWithSubRow:s&&!c,isSubRowOpen:c,clickable:A}),tabIndex:A&&!x?0:void 0,"aria-label":A&&!x?h:void 0,onClick:M,onKeyDown:w,children:Z.map((e,a)=>{const t=r[e.id];let l;return l="string"==typeof t?/* @__PURE__ */b(Vg,{variant:"body",as:"span",textAlign:V("tablet")?rV:e.align??lV,children:t}):t,/* @__PURE__ */E("td",{className:Jf(),align:e.align??lV,"data-label":e.label,children:[x&&u&&/* @__PURE__ */b(g,{...u,className:Qf({duplicate:a>0}),"data-table-row-link":"true","aria-hidden":a>0||void 0,tabIndex:a>0?-1:void 0}),x?/* @__PURE__ */b("div",{className:eV(),children:l}):l]},`${e.id}-row-${n}`)})},`row-${n}`),r.expandableRow&&/* @__PURE__ */b("tr",{className:Kf({isSubRow:!0,isOpen:p?.includes(r.expandableRow?.id??"")}),"data-type":"expandable-row",children:/* @__PURE__ */b("td",{colSpan:Z.length,align:lV,children:/* @__PURE__ */b(Fh,{isOpen:p?.includes(r.expandableRow?.id??""),children:/* @__PURE__ */b("div",{className:Jf(),children:r.expandableRow.render})})})},r.expandableRow.id?`expandable-row-${r.expandableRow.id}`:`expandable-row-${n}`)]},`row-fragment-${n}`)}):/* @__PURE__ */b("tr",{children:/* @__PURE__ */b("td",{colSpan:Z.length,className:Jf(),align:nV,children:m||/* @__PURE__ */b(Vg,{variant:"body",as:"span",children:"Keine Daten gefunden"})})})})]})}),o&&/* @__PURE__ */E(w,{children:[/* @__PURE__ */b(hH,{}),/* @__PURE__ */b(of,{padding:"md",children:o})]})]})};hV.displayName="Table";var pV=ul({base:["w-full","relative"],variants:{isSticky:{true:["sticky","top-none","z-10"],false:["relative"]}}}),uV=ul({base:["w-full","p-md"],variants:{active:{true:["block"],false:["hidden"]}}}),HV=ul({base:["w-full","relative"],variants:{hasArrows:{true:["px-xl"]},hideBorder:{true:["border-none"],false:["border-b","border-b-surface-container-highest"]},isSticky:{true:["sticky","top-none","bg-surface/50","backdrop-blur","z-10"]}}}),gV=ul({base:["w-full","overflow-x-auto","overflow-y-hidden","scrollbar-hidden ","relative"]}),CV=ul({base:["flex","gap-md","relative"],variants:{hasArrows:{false:["px-xl","w-full"],true:["w-fit"]},itemsAlignment:{left:["justify-start"],center:["justify-center"],right:["justify-end"],between:["justify-between"],around:["justify-around"],evenly:["justify-evenly"]}}}),fV=ul({base:["cursor-pointer","transition-colors","duration-300","px-md","py-sm","whitespace-nowrap"],variants:{active:{false:["hover:bg-on-surface/8"],true:["hover:bg-primary/8"]},activity:{true:["relative","after:absolute","after:bottom-1/2","after:translate-y-1/2","after:right-xs2","after:size-xs","after:shrink-0","after:rounded-full","after:bg-primary"]}}}),VV=ul({base:["absolute","bottom-none","h-[3px]","rounded-t-lg","z-10","bg-primary"],variants:{initial:{true:["transition-none"],false:["transition-[left,width]","duration-300","ease-in-out"]}},defaultVariants:{initial:!1}}),ZV=ul({base:["absolute","top-none","cursor-pointer","h-full","w-xl","flex","items-center","justify-center","z-50","transition-all","duration-300","hover:bg-on-surface/8"],variants:{direction:{left:["left-none"],right:["right-none"]},visible:{true:["opacity-100","pointer-events-auto"],false:["opacity-0","pointer-events-none"]}}}),vV=({item:e,activeItem:a,onChange:t,hasActivity:l,scrollContainerRef:n,tabRefs:r,setTabRef:i,index:s,linkComponent:c="button",isActive:m})=>/* @__PURE__ */o(c,{...e,key:e.id,ref:e=>{i(s,e)},role:"tab","aria-selected":m,"aria-controls":`tab-panel-${e.id}`,onClick:()=>{if(t?.({...e,hasActivity:l}),n.current&&r?.current){const e=r.current[s],a=n.current,t=a.clientWidth,l=e.offsetLeft-t/2+e.offsetWidth/2;a.scrollTo({left:l,behavior:"smooth"})}},className:fV({active:m,activity:l})},/* @__PURE__ */b(of,{direction:"row",align:"center",gap:"sm",children:/* @__PURE__ */E(of,{direction:"top"===e.iconPosition?"column":"row",align:"center",gap:"top"===e.iconPosition?"xs2":"xs",children:[e.icon&&/* @__PURE__ */b(Hp,{name:e.icon,size:"sm",color:m?"primary":"on-surface-variant"}),!e.hideLabel&&/* @__PURE__ */b(Vg,{as:"span",variant:"title",size:"sm",color:e.id===a?"primary":"on-surface-variant",children:e.label})]})})),xV=({items:e,activeItem:a,onChange:t,hideBorder:l=!1,itemsAlignment:n="left",isSticky:r=!0,panels:i,linkComponent:o="button"})=>{const[s,c]=v({left:!1,right:!1}),[m,h]=v({left:0,width:0}),[p,H]=v(!0),g=Z([]),C=Z(null),f=Z(null),V=Z(null),x=()=>{if(V.current){const{scrollLeft:e,scrollWidth:a,clientWidth:t}=V.current;c({left:e>0,right:e<a-t-1})}};u(()=>{const e=V.current;if(e){e.addEventListener("scroll",x);const a=new ResizeObserver(()=>{x()});return a.observe(e),()=>{e.removeEventListener("scroll",x),a.disconnect()}}},[]),u(()=>{const t=e.findIndex(e=>e.id===a),l=g.current[t];if(l){const{offsetLeft:e,offsetWidth:a}=l;p?requestAnimationFrame(()=>{h({left:e+16,width:a-32});const t=setTimeout(()=>{H(!1)},300);return()=>clearTimeout(t)}):h({left:e+16,width:a-32})}},[a,e,s,n,p]),u(()=>{if(f.current&&C.current){const{width:e}=C.current.getBoundingClientRect(),{width:a}=f.current.getBoundingClientRect();a>e&&d(()=>{c({left:!1,right:!0})})}},[f,C,e]);const A=e=>{if(V.current){const{clientWidth:a}=V.current,t=.5*a,l="left"===e?V.current.scrollLeft-t:V.current.scrollLeft+t;V.current.scrollTo({left:l,behavior:"smooth"})}},M=(e,a)=>{g.current&&(g.current[e]=a)};/* @__PURE__ */
800
- return E("div",{className:pV({isSticky:r}),children:[/* @__PURE__ */E("div",{className:HV({hasArrows:s.left||s.right,hideBorder:l,isSticky:r}),ref:C,children:[
801
- /* @__PURE__ */b("button",{className:ZV({direction:"left",visible:s.left}),onClick:()=>A("left"),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||A("left")},"aria-label":"Scroll left",children:/* @__PURE__ */b(Hp,{name:"chevron-left",size:"sm",color:"on-surface-variant"})}),
802
- /* @__PURE__ */b("button",{className:ZV({direction:"right",visible:s.right}),onClick:()=>A("right"),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||A("right")},"aria-label":"Scroll right",children:/* @__PURE__ */b(Hp,{name:"chevron-right",size:"sm",color:"on-surface-variant"})}),
803
- /* @__PURE__ */b("div",{className:gV(),ref:V,children:/* @__PURE__ */E("div",{className:CV({hasArrows:s.left||s.right,itemsAlignment:n}),ref:f,role:"tablist",children:[e.map(({hasActivity:e,...l},n)=>{const r=l.id===a;/* @__PURE__ */
804
- return b(vV,{item:l,activeItem:a,onChange:t,hasActivity:e,index:n,linkComponent:o,isActive:r,scrollContainerRef:V,tabRefs:g,setTabRef:M},l.id)}),/* @__PURE__ */b("div",{className:VV({initial:p}),style:{left:`${m.left}px`,width:`${m.width}px`}})]})})]}),i?.map(e=>/* @__PURE__ */b("div",{className:uV({active:e.id===a}),children:e.children},e.id))]})};xV.displayName="Tabs";var AV={done:{name:"check",color:"on-dark-green"},failed:{name:"close",color:"on-error"},warning:{name:"exclamation-mark",color:"on-dark-warning"}},MV={done:"Erledigt",failed:"Fehlgeschlagen",warning:"Warnung"},wV=ul({base:["relative","w-full"],variants:{isSticky:{true:["sticky","top-none","z-10"],false:["relative"]}}}),bV=ul({base:["relative","w-full"],variants:{bgColor:F,hideBorder:{true:["border-none"],false:["border-b","border-b-surface-container-highest"]},isSticky:{true:["sticky","top-none","z-10"],false:[]}},defaultVariants:{bgColor:"surface-container"}}),EV=ul({base:["relative","w-full","overflow-x-auto","overflow-y-hidden","scrollbar-hidden"]}),yV=ul({base:["relative","flex","gap-none","w-full"],variants:{hasArrows:{false:["w-full"],true:["w-fit"]},itemsAlignment:{left:["justify-start"],center:["justify-center"],right:["justify-end"],spread:["justify-start"]}},defaultVariants:{itemsAlignment:"left"}}),LV=ul({base:["flex","min-w-xl7","overflow-hidden","cursor-pointer","items-center","gap-sm","transition-colors","duration-300","px-md","py-sm","h-[65px]","whitespace-nowrap","border-r","border-r-outline/25","last:border-r-0","group"],variants:{active:{false:["bg-transparent","hover:bg-on-surface/8"],true:["bg-surface","hover:bg-primary/8"]},fill:{true:["flex-1","basis-0","min-w-0"],false:["shrink-0","max-w-[200px]"]}},defaultVariants:{fill:!1}}),kV=ul({base:["flex","min-w-0","flex-1","flex-col","gap-none","overflow-hidden"]}),FV=ul({base:["block","min-w-0","w-full","overflow-hidden"]}),NV=ul({base:["flex","size-xl","shrink-0","items-center","justify-center","rounded-full","border","transition-colors"],variants:{active:{false:[],true:[]},status:{idle:[],done:["border-dark-green","bg-dark-green"],failed:["border-error","bg-error"],warning:["border-dark-warning","bg-dark-warning"]}},compoundVariants:[{status:"idle",active:!1,class:["border-outline-variant","bg-transparent","group-hover:border-primary","group-hover:[&>*]:text-primary!"]},{status:"idle",active:!0,class:["border-primary","bg-primary"]}],defaultVariants:{status:"idle",active:!1}}),SV=ul({base:["absolute","bottom-none","z-10","h-[3px]","rounded-none","bg-primary"],variants:{initial:{true:["transition-none"],false:["transition-[left,width]","duration-300","ease-in-out"]}},defaultVariants:{initial:!1}}),_V=ul({base:["absolute","top-none","z-50","flex","h-full","w-xl5","cursor-pointer","items-center","to-transparent","transition-all","duration-300"],variants:{direction:{left:["left-none","justify-start","pl-xs","bg-gradient-to-r"],right:["right-none","justify-end","pr-xs","bg-gradient-to-l"]},visible:{true:["pointer-events-auto","opacity-100"],false:["pointer-events-none","opacity-0"]},bgColor:{outline:["from-outline"],"outline-variant":["from-outline-variant"],"outline-low":["from-outline-low"],primary:["from-primary"],"primary-container":["from-primary-container"],"primary-fixed":["from-primary-fixed"],"primary-fixed-dim":["from-primary-fixed-dim"],"inverse-primary":["from-inverse-primary"],secondary:["from-secondary"],"secondary-fixed":["from-secondary-fixed"],"secondary-fixed-dim":["from-secondary-fixed-dim"],tertiary:["from-tertiary"],"tertiary-fixed":["from-tertiary-fixed"],"tertiary-fixed-dim":["from-tertiary-fixed-dim"],"tertiary-container":["from-tertiary-container"],surface:["from-surface"],"surface-bright":["from-surface-bright"],"surface-dim":["from-surface-dim"],"surface-variant":["from-surface-variant"],"inverse-surface":["from-inverse-surface"],"surface-container-high":["from-surface-container-high"],"surface-container-highest":["from-surface-container-highest"],"surface-container-low":["from-surface-container-low"],"surface-container-lowest":["from-surface-container-lowest"],"surface-container":["from-surface-container"],"inverse-on-surface":["from-inverse-on-surface"],error:["from-error"],"error-container":["from-error-container"],warning:["from-warning"],"dark-warning":["from-dark-warning"],"warning-container":["from-warning-container"],green:["from-green"],"dark-green":["from-dark-green"],"green-container":["from-green-container"],pink:["from-pink"],"dark-pink":["from-dark-pink"],"pink-container":["from-pink-container"],"steel-blue":["from-steel-blue"],"dark-steel-blue":["from-dark-steel-blue"],"steel-blue-container":["from-steel-blue-container"],yellow:["from-yellow"],"dark-yellow":["from-dark-yellow"],"yellow-container":["from-yellow-container"],scrim:["from-scrim"],background:["from-background"],"primary-hover":["from-primary-hover"],"primary-active":["from-primary-active"],"secondary-container":["from-secondary-container"],"tertiary-container-hover":["from-tertiary-container-hover"],"tertiary-container-active":["from-tertiary-container-active"],"container-neutral":["from-container-neutral"],"container-neutral-hover":["from-container-neutral-hover"],"code-surface":["from-code-surface"],"code-surface-variant":["from-code-surface-variant"]}},defaultVariants:{bgColor:"surface-container"}}),DV=ul({base:["w-full"],variants:{active:{true:["block"],false:["hidden"]},inCard:{true:[],false:["p-md"]}},defaultVariants:{inCard:!1}}),IV=({item:e,index:a,isActive:t,fill:l,hasPanel:n,onChange:r,scrollContainerRef:i,tabRefs:o,setTabRef:s,linkComponent:c,getTabId:m,getPanelId:d})=>{const{id:h,title:p,subtitle:u,status:H="idle",stepNumber:g=a+1,"aria-label":C,...f}=e,V="idle"===H?void 0:AV[H],Z="idle"===H?void 0:MV[H],v=[C??p,C?void 0:u,Z].filter(Boolean).join(", "),x=c??"button";/* @__PURE__ */
799
+ return E(a.Fragment,{children:[/* @__PURE__ */b("tr",{className:Kf({isLastWithSubRow:s&&!c,isSubRowOpen:c,clickable:A}),tabIndex:A&&!x?0:void 0,"aria-label":A&&!x?h:void 0,onClick:M,onKeyDown:w,children:Z.map((e,a)=>{const t=r[e.id];let l;return l="string"==typeof t?/* @__PURE__ */b(Vg,{variant:"body",as:"span",textAlign:V("tablet")?rV:e.align??lV,children:t}):t,/* @__PURE__ */E("td",{className:Jf(),align:e.align??lV,"data-label":e.label,children:[x&&u&&/* @__PURE__ */b(g,{...u,className:Qf({duplicate:a>0}),"data-table-row-link":"true","aria-hidden":a>0||void 0,tabIndex:a>0?-1:void 0}),x?/* @__PURE__ */b("div",{className:eV(),children:l}):l]},`${e.id}-row-${n}`)})},`row-${n}`),r.expandableRow&&/* @__PURE__ */b("tr",{className:Kf({isSubRow:!0,isOpen:p?.includes(r.expandableRow?.id??"")}),"data-type":"expandable-row",children:/* @__PURE__ */b("td",{colSpan:Z.length,align:lV,children:/* @__PURE__ */b(Fh,{isOpen:p?.includes(r.expandableRow?.id??""),children:/* @__PURE__ */b("div",{className:Jf(),children:r.expandableRow.render})})})},r.expandableRow.id?`expandable-row-${r.expandableRow.id}`:`expandable-row-${n}`)]},`row-fragment-${n}`)}):/* @__PURE__ */b("tr",{children:/* @__PURE__ */b("td",{colSpan:Z.length,className:Jf(),align:nV,children:m||/* @__PURE__ */b(Vg,{variant:"body",as:"span",children:"Keine Daten gefunden"})})})})]})}),o&&/* @__PURE__ */E(w,{children:[/* @__PURE__ */b(hH,{}),/* @__PURE__ */b(of,{padding:"md",children:o})]})]})};hV.displayName="Table";var pV=ul({base:["w-full","relative"],variants:{isSticky:{true:["sticky","top-none","z-10"],false:["relative"]}}}),uV=ul({base:["w-full"],variants:{active:{true:["block"],false:["hidden"]},padding:_},defaultVariants:{padding:"md"}}),HV=ul({base:["w-full","relative"],variants:{hasArrows:{true:["px-xl"]},hideBorder:{true:["border-none"],false:["border-b","border-b-surface-container-highest"]},isSticky:{true:["sticky","top-none","bg-surface/50","backdrop-blur","z-10"]}}}),gV=ul({base:["w-full","overflow-x-auto","overflow-y-hidden","scrollbar-hidden ","relative"]}),CV=ul({base:["flex","gap-md","relative"],variants:{hasArrows:{false:["px-xl","w-full"],true:["w-fit"]},itemsAlignment:{left:["justify-start"],center:["justify-center"],right:["justify-end"],between:["justify-between"],around:["justify-around"],evenly:["justify-evenly"]}}}),fV=ul({base:["cursor-pointer","transition-colors","duration-300","px-md","py-sm","whitespace-nowrap"],variants:{active:{false:["hover:bg-on-surface/8"],true:["hover:bg-primary/8"]},activity:{true:["relative","after:absolute","after:bottom-1/2","after:translate-y-1/2","after:right-xs2","after:size-xs","after:shrink-0","after:rounded-full","after:bg-primary"]}}}),VV=ul({base:["absolute","bottom-none","h-[3px]","rounded-t-lg","z-10","bg-primary"],variants:{initial:{true:["transition-none"],false:["transition-[left,width]","duration-300","ease-in-out"]}},defaultVariants:{initial:!1}}),ZV=ul({base:["absolute","top-none","cursor-pointer","h-full","w-xl","flex","items-center","justify-center","z-50","transition-all","duration-300","hover:bg-on-surface/8"],variants:{direction:{left:["left-none"],right:["right-none"]},visible:{true:["opacity-100","pointer-events-auto"],false:["opacity-0","pointer-events-none"]}}}),vV=({item:e,activeItem:a,onChange:t,hasActivity:l,scrollContainerRef:n,tabRefs:r,setTabRef:i,index:s,linkComponent:c="button",isActive:m})=>/* @__PURE__ */o(c,{...e,key:e.id,ref:e=>{i(s,e)},role:"tab","aria-selected":m,"aria-controls":`tab-panel-${e.id}`,onClick:()=>{if(t?.({...e,hasActivity:l}),n.current&&r?.current){const e=r.current[s],a=n.current,t=a.clientWidth,l=e.offsetLeft-t/2+e.offsetWidth/2;a.scrollTo({left:l,behavior:"smooth"})}},className:fV({active:m,activity:l})},/* @__PURE__ */b(of,{direction:"row",align:"center",gap:"sm",children:/* @__PURE__ */E(of,{direction:"top"===e.iconPosition?"column":"row",align:"center",gap:"top"===e.iconPosition?"xs2":"xs",children:[e.icon&&/* @__PURE__ */b(Hp,{name:e.icon,size:"sm",color:m?"primary":"on-surface-variant"}),!e.hideLabel&&/* @__PURE__ */b(Vg,{as:"span",variant:"title",size:"sm",color:e.id===a?"primary":"on-surface-variant",children:e.label})]})})),xV=({items:e,activeItem:a,onChange:t,hideBorder:l=!1,itemsAlignment:n="left",isSticky:r=!0,panels:i,panelPadding:o="md",linkComponent:s="button"})=>{const[c,m]=v({left:!1,right:!1}),[h,p]=v({left:0,width:0}),[H,g]=v(!0),C=Z([]),f=Z(null),V=Z(null),x=Z(null),A=()=>{if(x.current){const{scrollLeft:e,scrollWidth:a,clientWidth:t}=x.current;m({left:e>0,right:e<a-t-1})}};u(()=>{const e=x.current;if(e){e.addEventListener("scroll",A);const a=new ResizeObserver(()=>{A()});return a.observe(e),()=>{e.removeEventListener("scroll",A),a.disconnect()}}},[]),u(()=>{const t=e.findIndex(e=>e.id===a),l=C.current[t];if(l){const{offsetLeft:e,offsetWidth:a}=l;H?requestAnimationFrame(()=>{p({left:e+16,width:a-32});const t=setTimeout(()=>{g(!1)},300);return()=>clearTimeout(t)}):p({left:e+16,width:a-32})}},[a,e,c,n,H]),u(()=>{if(V.current&&f.current){const{width:e}=f.current.getBoundingClientRect(),{width:a}=V.current.getBoundingClientRect();a>e&&d(()=>{m({left:!1,right:!0})})}},[V,f,e]);const M=e=>{if(x.current){const{clientWidth:a}=x.current,t=.5*a,l="left"===e?x.current.scrollLeft-t:x.current.scrollLeft+t;x.current.scrollTo({left:l,behavior:"smooth"})}},w=(e,a)=>{C.current&&(C.current[e]=a)};/* @__PURE__ */
800
+ return E("div",{className:pV({isSticky:r}),children:[/* @__PURE__ */E("div",{className:HV({hasArrows:c.left||c.right,hideBorder:l,isSticky:r}),ref:f,children:[
801
+ /* @__PURE__ */b("button",{className:ZV({direction:"left",visible:c.left}),onClick:()=>M("left"),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||M("left")},"aria-label":"Scroll left",children:/* @__PURE__ */b(Hp,{name:"chevron-left",size:"sm",color:"on-surface-variant"})}),
802
+ /* @__PURE__ */b("button",{className:ZV({direction:"right",visible:c.right}),onClick:()=>M("right"),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||M("right")},"aria-label":"Scroll right",children:/* @__PURE__ */b(Hp,{name:"chevron-right",size:"sm",color:"on-surface-variant"})}),
803
+ /* @__PURE__ */b("div",{className:gV(),ref:x,children:/* @__PURE__ */E("div",{className:CV({hasArrows:c.left||c.right,itemsAlignment:n}),ref:V,role:"tablist",children:[e.map(({hasActivity:e,...l},n)=>{const r=l.id===a;/* @__PURE__ */
804
+ return b(vV,{item:l,activeItem:a,onChange:t,hasActivity:e,index:n,linkComponent:s,isActive:r,scrollContainerRef:x,tabRefs:C,setTabRef:w},l.id)}),/* @__PURE__ */b("div",{className:VV({initial:H}),style:{left:`${h.left}px`,width:`${h.width}px`}})]})})]}),i?.map(e=>/* @__PURE__ */b("div",{className:uV({active:e.id===a,padding:o}),children:e.children},e.id))]})};xV.displayName="Tabs";var AV={done:{name:"check",color:"on-dark-green"},failed:{name:"close",color:"on-error"},warning:{name:"exclamation-mark",color:"on-dark-warning"}},MV={done:"Erledigt",failed:"Fehlgeschlagen",warning:"Warnung"},wV=ul({base:["relative","w-full"],variants:{isSticky:{true:["sticky","top-none","z-10"],false:["relative"]}}}),bV=ul({base:["relative","w-full"],variants:{bgColor:F,hideBorder:{true:["border-none"],false:["border-b","border-b-surface-container-highest"]},isSticky:{true:["sticky","top-none","z-10"],false:[]}},defaultVariants:{bgColor:"surface-container"}}),EV=ul({base:["relative","w-full","overflow-x-auto","overflow-y-hidden","scrollbar-hidden"]}),yV=ul({base:["relative","flex","gap-none","w-full"],variants:{hasArrows:{false:["w-full"],true:["w-fit"]},itemsAlignment:{left:["justify-start"],center:["justify-center"],right:["justify-end"],spread:["justify-start"]}},defaultVariants:{itemsAlignment:"left"}}),LV=ul({base:["flex","min-w-xl7","overflow-hidden","cursor-pointer","items-center","gap-sm","transition-colors","duration-300","px-md","py-sm","h-[65px]","whitespace-nowrap","border-r","border-r-outline/25","last:border-r-0","group"],variants:{active:{false:["bg-transparent","hover:bg-on-surface/8"],true:["bg-surface","hover:bg-primary/8"]},fill:{true:["flex-1","basis-0","min-w-0"],false:["shrink-0","max-w-[200px]"]}},defaultVariants:{fill:!1}}),kV=ul({base:["flex","min-w-0","flex-1","flex-col","gap-none","overflow-hidden"]}),FV=ul({base:["block","min-w-0","w-full","overflow-hidden"]}),NV=ul({base:["flex","size-xl","shrink-0","items-center","justify-center","rounded-full","border","transition-colors"],variants:{active:{false:[],true:[]},status:{idle:[],done:["border-dark-green","bg-dark-green"],failed:["border-error","bg-error"],warning:["border-dark-warning","bg-dark-warning"]}},compoundVariants:[{status:"idle",active:!1,class:["border-outline-variant","bg-transparent","group-hover:border-primary","group-hover:[&>*]:text-primary!"]},{status:"idle",active:!0,class:["border-primary","bg-primary"]}],defaultVariants:{status:"idle",active:!1}}),SV=ul({base:["absolute","bottom-none","z-10","h-[3px]","rounded-none","bg-primary"],variants:{initial:{true:["transition-none"],false:["transition-[left,width]","duration-300","ease-in-out"]}},defaultVariants:{initial:!1}}),_V=ul({base:["absolute","top-none","z-50","flex","h-full","w-xl5","cursor-pointer","items-center","to-transparent","transition-all","duration-300"],variants:{direction:{left:["left-none","justify-start","pl-xs","bg-gradient-to-r"],right:["right-none","justify-end","pr-xs","bg-gradient-to-l"]},visible:{true:["pointer-events-auto","opacity-100"],false:["pointer-events-none","opacity-0"]},bgColor:{outline:["from-outline"],"outline-variant":["from-outline-variant"],"outline-low":["from-outline-low"],primary:["from-primary"],"primary-container":["from-primary-container"],"primary-fixed":["from-primary-fixed"],"primary-fixed-dim":["from-primary-fixed-dim"],"inverse-primary":["from-inverse-primary"],secondary:["from-secondary"],"secondary-fixed":["from-secondary-fixed"],"secondary-fixed-dim":["from-secondary-fixed-dim"],tertiary:["from-tertiary"],"tertiary-fixed":["from-tertiary-fixed"],"tertiary-fixed-dim":["from-tertiary-fixed-dim"],"tertiary-container":["from-tertiary-container"],surface:["from-surface"],"surface-bright":["from-surface-bright"],"surface-dim":["from-surface-dim"],"surface-variant":["from-surface-variant"],"inverse-surface":["from-inverse-surface"],"surface-container-high":["from-surface-container-high"],"surface-container-highest":["from-surface-container-highest"],"surface-container-low":["from-surface-container-low"],"surface-container-lowest":["from-surface-container-lowest"],"surface-container":["from-surface-container"],"inverse-on-surface":["from-inverse-on-surface"],error:["from-error"],"error-container":["from-error-container"],warning:["from-warning"],"dark-warning":["from-dark-warning"],"warning-container":["from-warning-container"],green:["from-green"],"dark-green":["from-dark-green"],"green-container":["from-green-container"],pink:["from-pink"],"dark-pink":["from-dark-pink"],"pink-container":["from-pink-container"],"steel-blue":["from-steel-blue"],"dark-steel-blue":["from-dark-steel-blue"],"steel-blue-container":["from-steel-blue-container"],yellow:["from-yellow"],"dark-yellow":["from-dark-yellow"],"yellow-container":["from-yellow-container"],scrim:["from-scrim"],background:["from-background"],"primary-hover":["from-primary-hover"],"primary-active":["from-primary-active"],"secondary-container":["from-secondary-container"],"tertiary-container-hover":["from-tertiary-container-hover"],"tertiary-container-active":["from-tertiary-container-active"],"container-neutral":["from-container-neutral"],"container-neutral-hover":["from-container-neutral-hover"],"code-surface":["from-code-surface"],"code-surface-variant":["from-code-surface-variant"]}},defaultVariants:{bgColor:"surface-container"}}),DV=ul({base:["w-full"],variants:{active:{true:["block"],false:["hidden"]},inCard:{true:[],false:["p-md"]}},defaultVariants:{inCard:!1}}),IV=({item:e,index:a,isActive:t,fill:l,hasPanel:n,onChange:r,scrollContainerRef:i,tabRefs:o,setTabRef:s,linkComponent:c,getTabId:m,getPanelId:d})=>{const{id:h,title:p,subtitle:u,status:H="idle",stepNumber:g=a+1,"aria-label":C,...f}=e,V="idle"===H?void 0:AV[H],Z="idle"===H?void 0:MV[H],v=[C??p,C?void 0:u,Z].filter(Boolean).join(", "),x=c??"button";/* @__PURE__ */
805
805
  return E(x,{...f,id:m(h),ref:e=>s(a,e),type:"button"===x?"button":void 0,role:"tab",tabIndex:t?0:-1,"aria-label":Z?v:C,"aria-selected":t,"aria-controls":n?d(h):void 0,"data-testid":`tab-stepper-item-${h}`,className:LV({active:t,fill:l}),onClick:()=>{r?.(e);const t=o.current?.[a],l=i.current;if(!t||!l)return;const n=t.offsetLeft-l.clientWidth/2+t.offsetWidth/2;l.scrollTo({left:n,behavior:"smooth"})},children:[/* @__PURE__ */b("span",{className:NV({active:t,status:H}),"data-testid":`tab-stepper-number-${h}`,children:V?/* @__PURE__ */b(Hp,{...V,size:"2xs"}):/* @__PURE__ */b(Vg,{as:"span",color:t?"on-primary":"on-surface-variant",size:"sm",variant:"label",wrap:!1,children:g})}),/* @__PURE__ */E("span",{className:kV(),children:[/* @__PURE__ */b("span",{className:FV(),children:/* @__PURE__ */b(Vg,{as:"span",color:"on-surface","data-testid":`tab-stepper-title-${h}`,size:"sm",truncate:1,variant:"title",wrap:!1,children:p})}),u&&/* @__PURE__ */b("span",{className:FV(),"data-testid":`tab-stepper-subtitle-${h}`,children:/* @__PURE__ */b(Vg,{as:"span",color:"on-surface-variant",size:"sm",truncate:1,variant:"body",wrap:!1,children:u})})]})]})},TV=({items:e,activeItem:a,onChange:t,itemsAlignment:l="left",hideBorder:n=!1,isSticky:r=!0,panels:i,panelCard:o,linkComponent:s="button",bgColor:c="surface-container-lowest"})=>{const m=H().replace(/:/g,""),[d,h]=v({left:!1,right:!1}),[p,g]=v({left:0,width:0}),[f,V]=v(0),[x,A]=v(!0),[M,y]=v(0),L=Z([]),k=Z(null),F=Z(null),N=d.left||d.right,S=We(l,Ce(M))??"left",_=!N&&"spread"===S,D=(e=>{if(e)return!0===e?{}:e})(o),I=new Set(i?.map(e=>e.id)),T=e=>`tab-stepper-tab-${m}-${e}`,z=e=>`tab-stepper-panel-${m}-${e}`;C(()=>{const e=F.current?.clientWidth??0;y(a=>a===e?a:e)},[e]),u(()=>{const e=F.current;if(!e)return;const a=()=>{const{scrollLeft:a,scrollWidth:t,clientWidth:l}=e,n=a>0,r=a<t-l-1;y(e=>e===l?e:l),h(e=>e.left===n&&e.right===r?e:{left:n,right:r})};a(),e.addEventListener("scroll",a);const t="undefined"==typeof ResizeObserver?void 0:new ResizeObserver(()=>{a(),V(e=>e+1)});return t?.observe(e),k.current&&t?.observe(k.current),()=>{e.removeEventListener("scroll",a),t?.disconnect()}},[e]),u(()=>{const t=e.findIndex(e=>e.id===a),l=L.current[t];if(!l)return void g({left:0,width:0});const n=()=>({left:l.offsetLeft,width:l.offsetWidth});if(x){let e;const a=requestAnimationFrame(()=>{g(n()),e=setTimeout(()=>A(!1),300)});return()=>{cancelAnimationFrame(a),e&&clearTimeout(e)}}g(n())},[a,N,x,e,S,f]);const R=e=>{const a=F.current;if(!a)return;const t=.5*a.clientWidth,l="left"===e?a.scrollLeft-t:a.scrollLeft+t;a.scrollTo({left:l,behavior:"smooth"})},O=(e,a)=>{L.current[e]=a},B=/* @__PURE__ */E("div",{className:bV({bgColor:c,hideBorder:n||Boolean(D),isSticky:!D&&r}),children:[
806
806
  /* @__PURE__ */b("button",{type:"button",className:_V({direction:"left",visible:d.left,bgColor:c}),"aria-label":"Scroll left",disabled:!d.left,onClick:()=>R("left"),children:/* @__PURE__ */b(Hp,{name:"chevron-left",size:"sm",color:"on-surface-variant"})}),
807
807
  /* @__PURE__ */b("button",{type:"button",className:_V({direction:"right",visible:d.right,bgColor:c}),"aria-label":"Scroll right",disabled:!d.right,onClick:()=>R("right"),children:/* @__PURE__ */b(Hp,{name:"chevron-right",size:"sm",color:"on-surface-variant"})}),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zvoove/unity-ui",
3
- "version": "2.43.0",
3
+ "version": "2.44.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+ssh://git@github.com/zvoove-org/unity-ui.git"
@@ -46,7 +46,7 @@
46
46
  "build-storybook": "storybook build",
47
47
  "prepare": "husky",
48
48
  "lint": "eslint \"src/**/*.{js,jsx,ts,tsx}\"",
49
- "create": "node bin/cli.mjs create --",
49
+ "create": "node bin/cli.mjs create",
50
50
  "commit": "cz",
51
51
  "generate-skills": "node bin/cli.mjs skills",
52
52
  "profile:designer": "cp profiles/designer.md CLAUDE.active.md && cp profiles/designer.md AGENTS.md && echo '\\n ✅ Switched to designer profile\\n'",