@enonic/ui 0.47.8 → 0.47.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/enonic-ui.es.js
CHANGED
|
@@ -125,8 +125,8 @@ return N(o?hr:Fn,{ref:n,size:14,className:cn("rounded-full transition-highlight"
|
|
|
125
125
|
/* @__PURE__ */N(fa.DefaultContent,{label:r,description:o,metadata:i,icon:a}),
|
|
126
126
|
/* @__PURE__ */N(fa.Right,{children:n})]});_a.displayName="SelectableListItem";const Ua=({className:e,label:t,decorative:n=!1,...r})=>{const o=n?"true":void 0;return t?/* @__PURE__ */N("div",{role:"separator","aria-orientation":"horizontal","aria-hidden":o,className:cn("inline-flex w-full items-baseline gap-2.5",e),...r,children:[
|
|
127
127
|
/* @__PURE__ */N("span",{className:"min-w-0 truncate text-subtle uppercase tracking-wider",children:t}),
|
|
128
|
-
/* @__PURE__ */N("span",{className:"min-w-6 flex-1 border-bdr-subtle border-b"})]}):/* @__PURE__ */N("hr",{"aria-hidden":o,className:cn("w-full border-bdr-subtle",e)})};Ua.displayName="Separator";const Za=M("bg-muted",{variants:{shape:{rectangle:"rounded-sm",circle:"rounded-full"},size:{sm:"",md:"",lg:"",auto:""}},compoundVariants:[{shape:"rectangle",size:"sm",class:"h-4 w-24"},{shape:"rectangle",size:"md",class:"h-5 w-32"},{shape:"rectangle",size:"lg",class:"h-6 w-40"},{shape:"circle",size:"sm",class:"size-6"},{shape:"circle",size:"md",class:"size-8"},{shape:"circle",size:"lg",class:"size-12"}],defaultVariants:{shape:"rectangle",size:"auto"}}),Xa=n(void 0),Ja=({className:e,children:t,...n})=>/* @__PURE__ */N(Xa.Provider,{value:{inGroup:!0},children:/* @__PURE__ */N("div",{className:cn("relative",e),...n,children:t})});Ja.displayName="Skeleton.Group";const Qa=({
|
|
129
|
-
return N("div",{role:"presentation","aria-hidden":"true",className:cn(Za({shape:
|
|
128
|
+
/* @__PURE__ */N("span",{className:"min-w-6 flex-1 border-bdr-subtle border-b"})]}):/* @__PURE__ */N("hr",{"aria-hidden":o,className:cn("w-full border-bdr-subtle",e)})};Ua.displayName="Separator";const Za=M("bg-muted",{variants:{shape:{rectangle:"rounded-sm",circle:"rounded-full"},size:{sm:"",md:"",lg:"",auto:""}},compoundVariants:[{shape:"rectangle",size:"sm",class:"h-4 w-24"},{shape:"rectangle",size:"md",class:"h-5 w-32"},{shape:"rectangle",size:"lg",class:"h-6 w-40"},{shape:"circle",size:"sm",class:"size-6"},{shape:"circle",size:"md",class:"size-8"},{shape:"circle",size:"lg",class:"size-12"}],defaultVariants:{shape:"rectangle",size:"auto"}}),Xa=n(void 0),Ja=({className:e,children:t,...n})=>/* @__PURE__ */N(Xa.Provider,{value:{inGroup:!0},children:/* @__PURE__ */N("div",{className:cn("relative",e),...n,children:t})});Ja.displayName="Skeleton.Group";const Qa=({animated:e=!0,className:t,shape:n="rectangle",size:o="auto",...i})=>{const{inGroup:a}=r(Xa)??{inGroup:!1};/* @__PURE__ */
|
|
129
|
+
return N("div",{role:"presentation","aria-hidden":"true",className:cn(Za({shape:n,size:o}),e&&(a?"animate-skeleton-shimmer":"animate-pulse"),t),...i})};Qa.displayName="Skeleton";const es=Object.assign(Qa,{Group:Ja}),ts=a((e,t)=>{const{value:n,defaultValue:r,onValueChange:o,activationMode:a="automatic",children:c,className:d,...u}=e,m=ee(void 0,"tab"),{registerItem:f,unregisterItem:g,getItems:p,isItemDisabled:b}=tr(),[v,h]=Zn(n,r??"",o),[y,w]=s(v||void 0);br(v,w);const x=i(e=>{h(e),w(e)},[h]),I=l(()=>({baseId:m,value:v,onValueChange:x,activationMode:a,registerItem:f,unregisterItem:g,getItems:p,isItemDisabled:b,active:y,setActive:w}),[m,v,x,a,f,g,p,b,y]);/* @__PURE__ */
|
|
130
130
|
return N(Me,{value:I,children:/* @__PURE__ */N("div",{ref:t,className:cn("flex flex-col",d),...u,children:c})})});ts.displayName="Tab.Root";const ns=a((e,t)=>{const{loop:n=!0,children:r,className:o,...a}=e,s=Ae(),{baseId:l,activationMode:c,getItems:d,isItemDisabled:m,active:f,setActive:g,onValueChange:p}=s,b=gn(t,u(null)),v=i(e=>{"manual"===c&&p(e)},[c,p]),{handleKeyDown:h}=rr({getItems:d,isItemDisabled:m,active:f,setActive:e=>{g(e),"automatic"===c&&e&&p(e)},loop:n,orientation:"horizontal",onSelect:v});
|
|
131
131
|
/* @__PURE__ */
|
|
132
132
|
return N("div",{ref:b,role:"tablist",id:`${l}-list`,className:cn("flex w-full gap-1.5",o),onKeyDown:h,...a,children:r})});ns.displayName="Tab.List";const rs=a(({value:e,disabled:t=!1,children:n,className:r,...o},a)=>{const s=Ae(),{baseId:l,value:d,onValueChange:m,registerItem:f,unregisterItem:g,getItems:p,isItemDisabled:b,active:v,setActive:h}=s,y=u(null),w=gn(a,y),x=`${l}-trigger-${e}`,I=`${l}-panel-${e}`;c(()=>(f(e,t,y.current),()=>g(e)),[e,t,f,g]);const k=d===e,C=i(()=>{t||(m(e),h(e))},[t,m,e,h]),{tabIndex:D}=dr({id:e,active:v,disabled:t,getItems:p,isItemDisabled:b});return c(()=>{v===e&&y.current&&document.activeElement!==y.current&&y.current.focus()},[v,e]),/* @__PURE__ */N("button",{ref:w,type:"button",role:"tab",id:x,"aria-selected":k,"aria-controls":I,"data-state":k?"active":"inactive","data-disabled":t||void 0,disabled:t,tabIndex:D,onClick:C,className:cn("relative inline-flex h-10 flex-1 items-center justify-center gap-1.5","min-w-0 overflow-hidden whitespace-nowrap py-2.5","text-sm text-subtle transition-highlight","cursor-pointer","after:absolute after:inset-x-0 after:bottom-0","after:h-px after:bg-bdr-soft after:transition-all","hover:text-default hover:after:h-0.5","data-[state=active]:font-semibold data-[state=active]:text-default","data-[state=active]:after:h-0.5 data-[state=active]:after:bg-bdr-strong","data-disabled:pointer-events-none data-disabled:opacity-50","focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-ring focus-visible:ring-offset-3 focus-visible:ring-offset-ring-offset",r),...o,children:n})});rs.displayName="Tab.Trigger";const os=a(({icon:e,count:t,error:n,children:r,...o},i)=>/* @__PURE__ */N(rs,{ref:i,...o,children:[e&&/* @__PURE__ */N("span",{className:"shrink-0",children:/* @__PURE__ */N(e,{size:14,strokeWidth:2})}),
|
|
@@ -8,6 +8,7 @@ type SkeletonVariantsProps = VariantProps<typeof skeletonVariants>;
|
|
|
8
8
|
export type SkeletonShape = NonNullable<SkeletonVariantsProps['shape']>;
|
|
9
9
|
export type SkeletonSize = NonNullable<SkeletonVariantsProps['size']>;
|
|
10
10
|
export type SkeletonProps = {
|
|
11
|
+
animated?: boolean;
|
|
11
12
|
className?: string;
|
|
12
13
|
} & SkeletonVariantsProps & ComponentPropsWithoutRef<'div'>;
|
|
13
14
|
export type SkeletonGroupProps = {
|
|
@@ -15,7 +16,7 @@ export type SkeletonGroupProps = {
|
|
|
15
16
|
children?: ReactNode;
|
|
16
17
|
} & ComponentPropsWithoutRef<'div'>;
|
|
17
18
|
export declare const Skeleton: {
|
|
18
|
-
({ className, shape, size, ...props }: SkeletonProps): ReactElement;
|
|
19
|
+
({ animated, className, shape, size, ...props }: SkeletonProps): ReactElement;
|
|
19
20
|
displayName: string;
|
|
20
21
|
} & {
|
|
21
22
|
Group: {
|