@ynput/ayon-react-components 0.3.12 → 0.3.13
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.
|
@@ -5,7 +5,7 @@ export declare const OptionsStyled: import("styled-components").StyledComponent<
|
|
|
5
5
|
$search: boolean;
|
|
6
6
|
$startAnimation: boolean;
|
|
7
7
|
$animationHeight: number;
|
|
8
|
-
$maxHeight
|
|
8
|
+
$maxHeight?: number | undefined;
|
|
9
9
|
}, never>;
|
|
10
10
|
export declare const ListItemStyled: import("styled-components").StyledComponent<"li", any, {
|
|
11
11
|
$focused: boolean;
|
|
@@ -7479,13 +7479,13 @@ const lr = $e((t, e) => /* @__PURE__ */ O("span", {
|
|
|
7479
7479
|
$startAnimation: t,
|
|
7480
7480
|
$animationHeight: e,
|
|
7481
7481
|
$maxHeight: n
|
|
7482
|
-
}) => t ? Fe`
|
|
7482
|
+
}) => n && (t ? Fe`
|
|
7483
7483
|
animation: ${zue(e)} 0.17s ease-in-out forwards;
|
|
7484
7484
|
max-height: ${n}px;
|
|
7485
7485
|
` : Fe`
|
|
7486
7486
|
opacity: 0;
|
|
7487
7487
|
max-height: ${n}px;
|
|
7488
|
-
`}
|
|
7488
|
+
`)}
|
|
7489
7489
|
|
|
7490
7490
|
overflow-y: scroll;
|
|
7491
7491
|
|
|
@@ -7896,8 +7896,8 @@ const lr = $e((t, e) => /* @__PURE__ */ O("span", {
|
|
|
7896
7896
|
startAnimationFinished: d,
|
|
7897
7897
|
setStartAnimationFinished: h,
|
|
7898
7898
|
showOptions: v,
|
|
7899
|
-
dataKey: S,
|
|
7900
|
-
labelKey: T,
|
|
7899
|
+
dataKey: S = "value",
|
|
7900
|
+
labelKey: T = "label",
|
|
7901
7901
|
itemTemplate: R,
|
|
7902
7902
|
value: A,
|
|
7903
7903
|
selected: E,
|
|
@@ -298,13 +298,13 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
298
298
|
}
|
|
299
299
|
|
|
300
300
|
/* play animation on $startAnimation */
|
|
301
|
-
${({$startAnimation:t,$animationHeight:e,$maxHeight:n})=>t?Ee.css`
|
|
301
|
+
${({$startAnimation:t,$animationHeight:e,$maxHeight:n})=>n&&(t?Ee.css`
|
|
302
302
|
animation: ${em(e)} 0.17s ease-in-out forwards;
|
|
303
303
|
max-height: ${n}px;
|
|
304
304
|
`:Ee.css`
|
|
305
305
|
opacity: 0;
|
|
306
306
|
max-height: ${n}px;
|
|
307
|
-
`}
|
|
307
|
+
`)}
|
|
308
308
|
|
|
309
309
|
overflow-y: scroll;
|
|
310
310
|
|
|
@@ -432,7 +432,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
432
432
|
align-items: center;
|
|
433
433
|
justify-content: flex-start;
|
|
434
434
|
flex: 1;
|
|
435
|
-
`,la=({value:t=[],isMultiple:e,dropIcon:n="expand_more",displayIcon:o,onClear:r,children:s,style:l,valueStyle:u,placeholder:_="Select an option...",isOpen:p,className:h})=>{const v=!t.length;return ne(rm,{style:l,isOpen:!!p,className:h,children:[v?O(Tr,{children:!t.length&&O(mf,{children:O(hf,{children:_})})}):ne(Tr,{children:[ne(mf,{children:[e&&O("span",{children:"Multiple ("}),o&&O(Fn,{icon:o}),O(hf,{style:u,children:s}),e&&O("span",{children:")"})]}),r&&O(Fn,{icon:"clear",onClick:r,id:"clear",className:"control",tabIndex:0})]}),O(Fn,{icon:n,className:"control"})]})},om=({message:t,search:e,editable:n,optionsRef:o,minWidth:r,listStyle:s,startAnimation:l,optionsHeight:u,maxHeight:_,startAnimationFinished:p,setStartAnimationFinished:h,showOptions:v,dataKey:S,labelKey:T,itemTemplate:C,value:A,selected:E,usingKeyboard:W,activeIndex:B,searchRef:j,hiddenLength:Y,handleChange:z})=>ne(df,{$message:t||"",$search:!!e||!!n,ref:o,style:{minWidth:r,...s},$startAnimation:l,$animationHeight:u,$maxHeight:_,onAnimationEnd:()=>h(!0),className:"options",children:[v.map(($,q)=>O(sa,{onClick:J=>z($[S],q,J),$focused:W&&B===q,$usingKeyboard:W,$startAnimation:l&&!p&&(e||n||q!==0),tabIndex:0,className:"option",children:C?C($,A.includes($[S]),E.includes($[S]),q):ne(So,{$isSelected:E.includes($[S]),className:"option-child",children:[$.icon&&O(Fn,{icon:$.icon}),O("span",{children:$[T]||$[S]})]})},`${$[S]}-${q}`)),!!Y&&O(sa,{onClick:()=>{var $;return($=j.current)==null?void 0:$.focus()},$focused:!1,$usingKeyboard:!1,$startAnimation:l,className:"option",children:O(So,{$isSelected:!1,className:"option-child hidden",children:O("span",{children:`Search ${Y} more...`})})})]}),am=U.forwardRef(({value:t=[],options:e=[],onChange:n,widthExpand:o,disabled:r,editor:s,align:l,...u},_)=>{const p=U.useMemo(()=>e.filter(h=>t.includes(h.name)),[t,e]);return s?O(ca,{value:t,valueTemplate:()=>O(Vs,{value:p,...u}),options:e,dataKey:"name",disabled:r,itemTemplate:(h,v,S)=>O(Hh,{...h,isSelected:S}),onChange:h=>n&&n(h.map(v=>v.toString())),widthExpand:o,align:l,multiSelect:!0,search:!0,searchFields:["name","fullName","email"],ref:_}):O(Vs,{value:p,...u})}),im=te.default.span`
|
|
435
|
+
`,la=({value:t=[],isMultiple:e,dropIcon:n="expand_more",displayIcon:o,onClear:r,children:s,style:l,valueStyle:u,placeholder:_="Select an option...",isOpen:p,className:h})=>{const v=!t.length;return ne(rm,{style:l,isOpen:!!p,className:h,children:[v?O(Tr,{children:!t.length&&O(mf,{children:O(hf,{children:_})})}):ne(Tr,{children:[ne(mf,{children:[e&&O("span",{children:"Multiple ("}),o&&O(Fn,{icon:o}),O(hf,{style:u,children:s}),e&&O("span",{children:")"})]}),r&&O(Fn,{icon:"clear",onClick:r,id:"clear",className:"control",tabIndex:0})]}),O(Fn,{icon:n,className:"control"})]})},om=({message:t,search:e,editable:n,optionsRef:o,minWidth:r,listStyle:s,startAnimation:l,optionsHeight:u,maxHeight:_,startAnimationFinished:p,setStartAnimationFinished:h,showOptions:v,dataKey:S="value",labelKey:T="label",itemTemplate:C,value:A,selected:E,usingKeyboard:W,activeIndex:B,searchRef:j,hiddenLength:Y,handleChange:z})=>ne(df,{$message:t||"",$search:!!e||!!n,ref:o,style:{minWidth:r,...s},$startAnimation:l,$animationHeight:u,$maxHeight:_,onAnimationEnd:()=>h(!0),className:"options",children:[v.map(($,q)=>O(sa,{onClick:J=>z($[S],q,J),$focused:W&&B===q,$usingKeyboard:W,$startAnimation:l&&!p&&(e||n||q!==0),tabIndex:0,className:"option",children:C?C($,A.includes($[S]),E.includes($[S]),q):ne(So,{$isSelected:E.includes($[S]),className:"option-child",children:[$.icon&&O(Fn,{icon:$.icon}),O("span",{children:$[T]||$[S]})]})},`${$[S]}-${q}`)),!!Y&&O(sa,{onClick:()=>{var $;return($=j.current)==null?void 0:$.focus()},$focused:!1,$usingKeyboard:!1,$startAnimation:l,className:"option",children:O(So,{$isSelected:!1,className:"option-child hidden",children:O("span",{children:`Search ${Y} more...`})})})]}),am=U.forwardRef(({value:t=[],options:e=[],onChange:n,widthExpand:o,disabled:r,editor:s,align:l,...u},_)=>{const p=U.useMemo(()=>e.filter(h=>t.includes(h.name)),[t,e]);return s?O(ca,{value:t,valueTemplate:()=>O(Vs,{value:p,...u}),options:e,dataKey:"name",disabled:r,itemTemplate:(h,v,S)=>O(Hh,{...h,isSelected:S}),onChange:h=>n&&n(h.map(v=>v.toString())),widthExpand:o,align:l,multiSelect:!0,search:!0,searchFields:["name","fullName","email"],ref:_}):O(Vs,{value:p,...u})}),im=te.default.span`
|
|
436
436
|
background-color: var(--color-grey-03);
|
|
437
437
|
border-radius: 3px;
|
|
438
438
|
padding: 2px 4px;
|