@ynput/ayon-react-components 1.15.3 → 1.15.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.
|
@@ -14,4 +14,4 @@ export interface DefaultItemTemplateProps extends HTMLAttributes<HTMLSpanElement
|
|
|
14
14
|
endContent?: React.ReactNode;
|
|
15
15
|
startContent?: React.ReactNode;
|
|
16
16
|
}
|
|
17
|
-
export declare const DefaultItemTemplate: ({ option, dataKey, labelKey, selected, mixedSelected, value, multiSelect, minSelected, itemClassName, itemStyle, endContent, startContent, ...props }: DefaultItemTemplateProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare const DefaultItemTemplate: ({ option, dataKey, labelKey, selected, mixedSelected, value, multiSelect, minSelected, itemClassName, itemStyle, endContent, startContent, className, ...props }: DefaultItemTemplateProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -10970,10 +10970,11 @@ const ma = Qe(({
|
|
|
10970
10970
|
itemStyle: p,
|
|
10971
10971
|
endContent: f,
|
|
10972
10972
|
startContent: h,
|
|
10973
|
-
|
|
10973
|
+
className: g,
|
|
10974
|
+
...y
|
|
10974
10975
|
}) => /* @__PURE__ */ le(Nd, {
|
|
10975
|
-
...
|
|
10976
|
-
className: $e("option-child", d, {
|
|
10976
|
+
...y,
|
|
10977
|
+
className: $e("option-child", g, d, {
|
|
10977
10978
|
selected: !!(n != null && n.includes(t[o])),
|
|
10978
10979
|
active: i && i.includes(t[o]),
|
|
10979
10980
|
error: !!t.error
|
|
@@ -668,7 +668,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
668
668
|
margin-left: auto;
|
|
669
669
|
margin-right: 4px;
|
|
670
670
|
}
|
|
671
|
-
`,Sp=({option:t,dataKey:o,labelKey:r,selected:n=[],mixedSelected:e=[],value:i,multiSelect:c,minSelected:l=0,itemClassName:d,itemStyle:_,endContent:p,startContent:h,...
|
|
671
|
+
`,Sp=({option:t,dataKey:o,labelKey:r,selected:n=[],mixedSelected:e=[],value:i,multiSelect:c,minSelected:l=0,itemClassName:d,itemStyle:_,endContent:p,startContent:h,className:g,...y})=>le(Hl,{...y,className:$e("option-child",g,d,{selected:!!(n!=null&&n.includes(t[o])),active:i&&i.includes(t[o]),error:!!t.error}),style:_,children:[h,t.icon&&w(Ze,{icon:t.icon}),w("span",{children:t[r]||t[o]}),c&&[...n,...e].includes(t[o])&&n.length>l&&w(Ze,{icon:"close",className:"remove"}),p]}),jl=$.forwardRef(({value:t=[],options:o=[],onChange:r,widthExpand:n,disabled:e,readOnly:i,align:c,isMultiple:l,placeholder:d,emptyIcon:_,emptyMessage:p,size:h,assigneeProps:g,sortBySelected:y=!0,onAssigneeFieldClick:v,selectAllKey:D="__all__",multiSelect:C=!0,multipleOverride:I,disabledValues:F=[],className:E,...A},Y)=>{const U=$.useMemo(()=>o.filter(j=>t.includes(j.name)),[t,o]),z=$.useMemo(()=>[...o].sort((j,V)=>{const H=j.fullName||j.name,J=V.fullName||V.name;return H.localeCompare(J)}),[o]),se={users:U,disabled:e,isMultiple:l,placeholder:d,emptyIcon:_,onClick:v,emptyMessage:p,size:h,align:c,widthExpand:n,...g};if(i)return w(ll,{...se,className:E});const oe=t.length>=o.length;return w(So,{value:t,valueTemplate:(j,V,H)=>w(ll,{...se,users:H&&I?o.filter(J=>V.includes(J.name)):U,value:j,allSelected:!!(oe&&A.onSelectAll)}),options:z,dataKey:"name",disabled:e,itemTemplate:(j,V,H,J,ce)=>w(Fv,{...j,isSelected:H,isSelectedMixed:ce.includes(j.name),selectAll:A.onSelectAll&&D,allSelected:!!(oe&&A.onSelectAll),multiSelect:C}),onChange:(j,V)=>r&&r(j,V),widthExpand:n,align:c,multiSelect:C,isMultiple:l,multipleOverride:I,multiSelectClose:t.length===0,search:!0,searchFields:["fullName","name","email"],ref:Y,sortBySelected:y,selectAllKey:D,missingValueMessage:"Some users no longer exist. Click to remove.",className:E,...A})}),gy=ae.default(jl)`
|
|
672
672
|
button.button {
|
|
673
673
|
width: fit-content;
|
|
674
674
|
}
|