@ynput/ayon-react-components 1.1.2 → 1.1.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.
@@ -178,6 +178,7 @@ React keys must be passed directly to JSX without using spread:
178
178
  align-items: center;
179
179
  justify-content: center;
180
180
  min-width: 32px;
181
+ width: fit-content;
181
182
  gap: 4px;
182
183
  display: flex;
183
184
 
@@ -204,7 +205,15 @@ React keys must be passed directly to JSX without using spread:
204
205
  margin-left: 4px;
205
206
  }
206
207
  `}
207
- `,fc=H.forwardRef(({value:r=[],onClick:a,disabled:o,isMultiple:t,placeholder:e,emptyIcon:i="person_add",emptyMessage:c="",size:u=21,...d},_)=>{var f;return x(ug,{onClick:o?void 0:h=>a&&a(h),disabled:o,isMultiple:t&&(!o||!e),...d,ref:_,children:o&&e?x("span",{children:e}):r.length?ke(Oo,{children:[x(pc,{users:r,size:u,gap:-.3,userStyle:{minWidth:u,minHeight:u,maxHeight:u,maxWidth:u}}),r.length<2&&x("span",{className:"name",children:(f=r[0])==null?void 0:f.fullName})]}):ke(Oo,{children:[i&&!t&&x(Et,{icon:i}),c&&x("span",{children:c})]})})}),dg=we.default.span`
208
+
209
+ ${({$align:r})=>r==="left"&&le.css`
210
+ justify-content: flex-start;
211
+ `}
212
+
213
+ ${({$align:r})=>r==="right"&&le.css`
214
+ justify-content: flex-end;
215
+ `}
216
+ `,fc=H.forwardRef(({value:r=[],onClick:a,disabled:o,isMultiple:t,placeholder:e,emptyIcon:i="person_add",emptyMessage:c="",size:u=21,align:d,..._},f)=>{var h;return x(ug,{onClick:o?void 0:v=>a&&a(v),disabled:o,isMultiple:t&&(!o||!e),$align:d,..._,ref:f,children:o&&e?x("span",{children:e}):r.length?ke(Oo,{children:[x(pc,{users:r,size:u,gap:-.3,userStyle:{minWidth:u,minHeight:u,maxHeight:u,maxWidth:u}}),r.length<2&&x("span",{className:"name",children:(h=r[0])==null?void 0:h.fullName})]}):ke(Oo,{children:[i&&!t&&x(Et,{icon:i}),c&&x("span",{children:c})]})})}),dg=we.default.span`
208
217
  cursor: pointer;
209
218
  display: flex;
210
219
  align-items: center;
@@ -585,7 +594,7 @@ function print() { __p += __j.call(arguments, '') }
585
594
  align-items: center;
586
595
  justify-content: flex-start;
587
596
  flex: 1;
588
- `,Ua=({value:r=[],isMultiple:a,dropIcon:o="expand_more",displayIcon:t,onClear:e,clearTooltip:i,onClearNull:c,clearNullTooltip:u,nullPlaceholder:d,children:_,style:f,valueStyle:h,placeholder:v="Select an option...",isOpen:w,className:b,childrenCustom:T})=>{const O=!(r!=null&&r.length);return ke(qv,{style:f,$isOpen:!!w,className:b,children:[O?ke(Oo,{children:[x(f_,{children:x(p_,{style:{opacity:.5},children:r===null?d||"(no value)":c?"(empty list)":v})}),c&&x(Et,{icon:"backspace",onClick:()=>c(null),id:"backspace",className:"control",tabIndex:0,"data-tooltip":u}),e&&x(Et,{icon:"close",onClick:()=>e([]),id:"clear",className:"control",tabIndex:0,"data-tooltip":i})]}):ke(Oo,{children:[ke(f_,{children:[a&&x("span",{children:"Mixed ("}),t&&x(Et,{icon:t}),x(p_,{style:h,children:_}),a&&x("span",{children:")"})]}),c&&x(Et,{icon:"backspace",onClick:()=>c(null),id:"backspace",className:"control",tabIndex:0,"data-tooltip":u}),e&&x(Et,{icon:"close",onClick:()=>e([]),id:"clear",className:"control",tabIndex:0,"data-tooltip":i})]}),T,x(Et,{icon:o,className:"control"})]})},Uv=H.forwardRef(({value:r=[],options:a=[],onChange:o,widthExpand:t,disabled:e,editor:i,align:c,isMultiple:u,placeholder:d,emptyIcon:_,emptyMessage:f,size:h,assigneeProps:v,sortBySelected:w=!0,onAssigneeFieldClick:b,...T},O)=>{const I=H.useMemo(()=>a.filter(N=>r.includes(N.name)),[r,a]),R=H.useMemo(()=>[...a].sort((N,Y)=>{const $=N.fullName||N.name,Q=Y.fullName||Y.name;return $.localeCompare(Q)}),[a]),A={value:I,disabled:e,isMultiple:u,placeholder:d,emptyIcon:_,onClick:b,emptyMessage:f,size:h,...v};return i?x(ra,{value:r,valueTemplate:(N,Y,$)=>x(fc,{...A,value:$?a.filter(Q=>Y.includes(Q.name)):I}),options:R,dataKey:"name",disabled:e,itemTemplate:(N,Y,$)=>x(_g,{...N,isSelected:$}),onChange:N=>o&&o(N.map(Y=>Y.toString())),widthExpand:t,align:c,multiSelect:!!r.length,search:!0,searchFields:["fullName","name","email"],ref:O,sortBySelected:w,...T}):x(fc,{...T,...A})}),Hv=we.default(ra)`
597
+ `,Ua=({value:r=[],isMultiple:a,dropIcon:o="expand_more",displayIcon:t,onClear:e,clearTooltip:i,onClearNull:c,clearNullTooltip:u,nullPlaceholder:d,children:_,style:f,valueStyle:h,placeholder:v="Select an option...",isOpen:w,className:b,childrenCustom:T})=>{const O=!(r!=null&&r.length);return ke(qv,{style:f,$isOpen:!!w,className:b,children:[O?ke(Oo,{children:[x(f_,{children:x(p_,{style:{opacity:.5},children:r===null?d||"(no value)":c?"(empty list)":v})}),c&&x(Et,{icon:"backspace",onClick:()=>c(null),id:"backspace",className:"control",tabIndex:0,"data-tooltip":u}),e&&x(Et,{icon:"close",onClick:()=>e([]),id:"clear",className:"control",tabIndex:0,"data-tooltip":i})]}):ke(Oo,{children:[ke(f_,{children:[a&&x("span",{children:"Mixed ("}),t&&x(Et,{icon:t}),x(p_,{style:h,children:_}),a&&x("span",{children:")"})]}),c&&x(Et,{icon:"backspace",onClick:()=>c(null),id:"backspace",className:"control",tabIndex:0,"data-tooltip":u}),e&&x(Et,{icon:"close",onClick:()=>e([]),id:"clear",className:"control",tabIndex:0,"data-tooltip":i})]}),T,x(Et,{icon:o,className:"control"})]})},Uv=H.forwardRef(({value:r=[],options:a=[],onChange:o,widthExpand:t,disabled:e,readOnly:i,align:c,isMultiple:u,placeholder:d,emptyIcon:_,emptyMessage:f,size:h,assigneeProps:v,sortBySelected:w=!0,onAssigneeFieldClick:b,...T},O)=>{const I=H.useMemo(()=>a.filter(N=>r.includes(N.name)),[r,a]),R=H.useMemo(()=>[...a].sort((N,Y)=>{const $=N.fullName||N.name,Q=Y.fullName||Y.name;return $.localeCompare(Q)}),[a]),A={value:I,disabled:e,isMultiple:u,placeholder:d,emptyIcon:_,onClick:b,emptyMessage:f,size:h,align:c,widthExpand:t,...v};return i?x(fc,{...T,...A}):x(ra,{value:r,valueTemplate:(N,Y,$)=>x(fc,{...A,value:$?a.filter(Q=>Y.includes(Q.name)):I}),options:R,dataKey:"name",disabled:e,itemTemplate:(N,Y,$)=>x(_g,{...N,isSelected:$}),onChange:N=>o&&o(N.map(Y=>Y.toString())),widthExpand:t,align:c,multiSelect:!!r.length,search:!0,searchFields:["fullName","name","email"],ref:O,sortBySelected:w,...T})}),Hv=we.default(ra)`
589
598
  .options {
590
599
  flex-direction: row;
591
600
  width: ${({width:r})=>r?`${r}px`:"100%"};
@@ -2179,6 +2188,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
2179
2188
  border-radius: var(--border-radius-xl);
2180
2189
  background-color: var(--md-sys-color-surface-container);
2181
2190
  `,r0=we.default.img`
2191
+ background-color: var(--md-sys-color-surface-container);
2182
2192
  z-index: 10;
2183
2193
  position: absolute;
2184
2194
  inset: 0;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ynput/ayon-react-components",
3
3
  "private": false,
4
- "version": "1.1.2",
4
+ "version": "1.1.4",
5
5
  "type": "module",
6
6
  "repository": {
7
7
  "type": "git",