freemium-ui 2.0.84 → 2.0.85

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/lib/index.cjs.js CHANGED
@@ -16750,7 +16750,7 @@ fill:f.colors.text.semantic[r]
16750
16750
  }),a?.message?e.createElement(Yo,null,a.message," ",g):n,!a?.message&&g),s&&e.createElement(Vo,{
16751
16751
  onClick:()=>{v(!1),t?.()}},e.createElement(ro,{fill:f.colors.text.primary
16752
16752
  }))):null
16753
- },exports.AutoComplete=({initialItems:t=[],disabled:n,id:r,label:o,errorText:a,name:i,placeholder:l,width:c,onChange:s,itemComponent:u,itemToString:d,searchKey:h="q",defaultSelectedItem:f,readOnly:p,itemIdentifier:m="id",isErrored:v,emptyItemsText:g,processFetchData:y,isRequired:b,style:w,url:C,headers:z})=>{
16753
+ },exports.AutoComplete=({items:t=[],disabled:n,id:r,label:o,errorText:a,name:i,placeholder:l,width:c,onChange:s,itemComponent:u,itemToString:d,searchKey:h="q",defaultSelectedItem:f,readOnly:p,itemIdentifier:m="id",isErrored:v,emptyItemsText:g,processFetchData:y,isRequired:b,style:w,url:C,headers:z})=>{
16754
16754
  const M=cr(),[x,E]=e.useState(!1),S=e.useRef(),[_,H]=e.useState(t),D=(e="")=>{
16755
16755
  if(!C)return;const n=new URL(C),r=new URLSearchParams(n.search);r.append(h,e)
16756
16756
  ;const o=`${n.origin}${n.pathname}?${r.toString()}`;E(!0),(async(e,t,n,r,o,a)=>{
@@ -16762,7 +16762,7 @@ E(!1)})).catch((()=>{E(!1)}))},A=e.useCallback(bc((e=>{D(e)
16762
16762
  }),300),[]),{isOpen:L,selectedItem:V,getToggleButtonProps:k,getLabelProps:T,getMenuProps:R,highlightedIndex:P,setInputValue:I,getItemProps:O,getInputProps:N}=Hl({
16763
16763
  id:r,selectedItem:f,items:_,onIsOpenChange:e=>{
16764
16764
  !e.isOpen&&e?.selectedItem&&I(d(e.selectedItem))},onInputValueChange:e=>{
16765
- V?.[m]&&e.inputValue===d(V)?A(""):A(e.inputValue)},
16765
+ V?.[m]&&e.inputValue===d(V)||f?.[m]&&e.inputValue===d(f)?A(""):A(e.inputValue)},
16766
16766
  itemToString:e=>e?d(e,"downshift"):"",onSelectedItemChange:e=>{
16767
16767
  S.current=Cm([e.selectedItem,...S.current??[]],m),s?.(e.selectedItem)}})
16768
16768
  ;e.useEffect((()=>{D("")}),[C]);const F=!n&&!p&&L;return e.createElement(Op,{
package/lib/index.d.ts CHANGED
@@ -326,7 +326,7 @@ interface AutoCompleteProps<T extends DefaultAutoCompleteItem = DefaultAutoCompl
326
326
  /**
327
327
  * The items to be displayed in the AutoComplete
328
328
  */
329
- initialItems?: Array<T>;
329
+ items?: Array<T>;
330
330
  /**
331
331
  * The identifier for the items
332
332
  */
@@ -372,7 +372,7 @@ interface AutoCompleteProps<T extends DefaultAutoCompleteItem = DefaultAutoCompl
372
372
  headers?: AxiosRequestConfig['headers'];
373
373
  }
374
374
 
375
- declare const AutoComplete: <T extends DefaultDropdownItem>({ initialItems, disabled, id, label, errorText, name, placeholder, width, onChange, itemComponent, itemToString, searchKey, defaultSelectedItem, readOnly, itemIdentifier, isErrored, emptyItemsText, processFetchData, isRequired, style, url, headers, }: AutoCompleteProps<T>) => react__default.JSX.Element;
375
+ declare const AutoComplete: <T extends DefaultDropdownItem>({ items, disabled, id, label, errorText, name, placeholder, width, onChange, itemComponent, itemToString, searchKey, defaultSelectedItem, readOnly, itemIdentifier, isErrored, emptyItemsText, processFetchData, isRequired, style, url, headers, }: AutoCompleteProps<T>) => react__default.JSX.Element;
376
376
 
377
377
  type ButtonSizeKey = 'mini' | 'normal' | 'large';
378
378
  type ButtonVariant = 'primary' | 'secondary' | 'danger' | 'link';
package/lib/index.js CHANGED
@@ -3909,7 +3909,7 @@ className:"end-adornment"},i)),a&&t.createElement("div",{className:"end-label"
3909
3909
  ;return t.createElement($m,{dir:o.direction,className:"fui-loader",speed:r,
3910
3910
  size:n})},jm=(e,t)=>{const n={},r=[];return e.forEach((e=>{
3911
3911
  e?.[t]&&(n?.[e[t]]||(n[e[t]]=e,r.push(e[t])))})),r.map((e=>n[e]))
3912
- },Um=({initialItems:e=[],disabled:n,id:r,label:o,errorText:a,name:i,placeholder:l,width:c,onChange:s,itemComponent:u,itemToString:d,searchKey:h="q",defaultSelectedItem:p,readOnly:f,itemIdentifier:m="id",isErrored:v,emptyItemsText:g,processFetchData:y,isRequired:b,style:w,url:C,headers:z})=>{
3912
+ },Um=({items:e=[],disabled:n,id:r,label:o,errorText:a,name:i,placeholder:l,width:c,onChange:s,itemComponent:u,itemToString:d,searchKey:h="q",defaultSelectedItem:p,readOnly:f,itemIdentifier:m="id",isErrored:v,emptyItemsText:g,processFetchData:y,isRequired:b,style:w,url:C,headers:z})=>{
3913
3913
  const M=Hr(),[x,E]=t.useState(!1),S=t.useRef(),[_,H]=t.useState(e),D=(t="")=>{
3914
3914
  if(!C)return;const n=new URL(C),r=new URLSearchParams(n.search);r.append(h,t)
3915
3915
  ;const o=`${n.origin}${n.pathname}?${r.toString()}`;E(!0),(async(e,t,n,r,o,a)=>{
@@ -3921,7 +3921,7 @@ E(!1)})).catch((()=>{E(!1)}))},A=t.useCallback($c((e=>{D(e)
3921
3921
  }),300),[]),{isOpen:L,selectedItem:V,getToggleButtonProps:k,getLabelProps:T,getMenuProps:P,highlightedIndex:I,setInputValue:R,getItemProps:O,getInputProps:N}=Zl({
3922
3922
  id:r,selectedItem:p,items:_,onIsOpenChange:e=>{
3923
3923
  !e.isOpen&&e?.selectedItem&&R(d(e.selectedItem))},onInputValueChange:e=>{
3924
- V?.[m]&&e.inputValue===d(V)?A(""):A(e.inputValue)},
3924
+ V?.[m]&&e.inputValue===d(V)||p?.[m]&&e.inputValue===d(p)?A(""):A(e.inputValue)},
3925
3925
  itemToString:e=>e?d(e,"downshift"):"",onSelectedItemChange:e=>{
3926
3926
  S.current=jm([e.selectedItem,...S.current??[]],m),s?.(e.selectedItem)}})
3927
3927
  ;t.useEffect((()=>{D("")}),[C]);const F=!n&&!f&&L;return t.createElement(im,{
package/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "freemium-ui",
3
- "version": "2.0.84",
3
+ "version": "2.0.85",
4
4
  "description": "React Ui Components for Freemium Apps",
5
5
  "main": "./index.js",
6
6
  "module": "./index.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "freemium-ui",
3
- "version": "2.0.84",
3
+ "version": "2.0.85",
4
4
  "description": "React Ui Components for Freemium Apps",
5
5
  "main": "lib/index.cjs.js",
6
6
  "module": "lib/index.js",