freemium-ui 2.0.0-beta.18 → 2.0.0-beta.19
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/index.cjs.js +4 -4
- package/index.d.ts +3 -9
- package/index.js +4 -4
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -3565,11 +3565,11 @@ medium:24,big:32},Yf=cn`
|
|
|
3565
3565
|
className:"fui-loader",speed:r,size:n})
|
|
3566
3566
|
},Kf=({type:t="button",...n})=>"button"===t?e.createElement(qf,{...n,
|
|
3567
3567
|
type:"button"}):e.createElement(Zf,{...n,type:"input"}),qf=t=>{
|
|
3568
|
-
const n=qt(),{itemIdentifier:r="id",label:a,id:o,items:i=[],onChange:l,placeholder:c,readOnly:s=!1,disabled:u=!1,isRequired:d=!1,showTick:h=!0,itemToString:p,name:f,itemComponent:m,width:v,className:g,style:y,defaultSelectedItem:b=null,isErrored:w,isMenuLoading:C,errorText:z}=t
|
|
3568
|
+
const n=qt(),{itemIdentifier:r="id",label:a,id:o,items:i=[],onChange:l,placeholder:c,readOnly:s=!1,disabled:u=!1,isRequired:d=!1,showTick:h=!0,itemToString:p,name:f,itemComponent:m,width:v,className:g,style:y,defaultSelectedItem:b=null,isErrored:w,isMenuLoading:C,errorText:z,defaultOpen:M,open:x}=t
|
|
3569
3569
|
;return e.createElement(sd,null,a&&e.createElement(e.Fragment,null,e.createElement(wn,{
|
|
3570
3570
|
className:"input-label","aria-label":a,htmlFor:o
|
|
3571
|
-
},a,d&&e.createElement(zn,null,"*"))),e.createElement(ud,{
|
|
3572
|
-
disabled:u,value:b?.[r]??void 0,onValueChange:e=>{if(s)return
|
|
3571
|
+
},a,d&&e.createElement(zn,null,"*"))),e.createElement(ud,{open:x,defaultOpen:M,
|
|
3572
|
+
name:f,required:d,disabled:u,value:b?.[r]??void 0,onValueChange:e=>{if(s)return
|
|
3573
3573
|
;const t=i.find((t=>t?.[r]===e));l?.(t??null)}},e.createElement(zd,{
|
|
3574
3574
|
className:`SelectTrigger ${g||""}`.trim(),"aria-label":"Food",disabled:u,id:o,
|
|
3575
3575
|
isErrored:!!w,width:v,style:y},e.createElement(hd,{className:"SelectValue",
|
|
@@ -16148,7 +16148,7 @@ transform:"translateY(0px)"},exiting:{opacity:0,transform:`translateY(${e})`}}
|
|
|
16148
16148
|
}(n);return e.createElement(Oj,{styles:o,
|
|
16149
16149
|
transition:`all ${r}ms cubic-bezier(0.4, 0.14, 0.3, 1)`,timeout:{enter:0,exit:r
|
|
16150
16150
|
},...a})},exports.StyledLabel=wn,exports.Table=t=>{
|
|
16151
|
-
const{data:n,columns:a,showFooter:o=!1,infoComponent:i,isLoading:l,isFetching:c,emptyComponent:s,loadingComponent:u,actionComponent:d,headerComponent:h,filterComponent:p,hideTableOnEmpty:f,hideTopPagination:m,hideFilters:v,showTableOnLoading:g,hideLoaderOnTopPagination:y,hideActions:b,count:w,pageIndex:C=0,pageSize:z=20,enablePreviousPage:M,enableNextPage:x,hideColumnSettings:E=!
|
|
16151
|
+
const{data:n,columns:a,showFooter:o=!1,infoComponent:i,isLoading:l,isFetching:c,emptyComponent:s,loadingComponent:u,actionComponent:d,headerComponent:h,filterComponent:p,hideTableOnEmpty:f,hideTopPagination:m,hideFilters:v,showTableOnLoading:g,hideLoaderOnTopPagination:y,hideActions:b,count:w,pageIndex:C=0,pageSize:z=20,enablePreviousPage:M,enableNextPage:x,hideColumnSettings:E=!0,hideBottomPagination:S,rowMenuOptions:_,onPreviousPageClick:H,onNextPageClick:D,disableRowSelect:L,hideSelectAllInTable:V,onSelectAllRows:A,onRowSelect:k,onMenuOptionSelect:T,onRowClick:R,columnOrder:P,setColumnOrder:I,setHiddenColumns:O,hiddenColumns:N,selectedRowIds:F={},setSelectedRowIds:B,dataKey:j="id",cellPropGetter:U,setPageIndex:$,rowPropGetter:Y}=t,W=qt(),[G,K]=e.useState(!v),q={
|
|
16152
16152
|
accessor:(e,t)=>"function"==typeof e?{...t,accessorFn:e}:{...t,accessorKey:e},
|
|
16153
16153
|
display:e=>e,group:e=>e},Z=-1===w||void 0===w,X=e.useMemo((()=>[...L?[]:[{
|
|
16154
16154
|
id:"select",
|
package/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import * as Popover$1 from '@radix-ui/react-popover';
|
|
|
5
5
|
import { PopperContentProps } from '@radix-ui/react-popover';
|
|
6
6
|
import { RadioGroupContextValue, RadioGroupProps as RadioGroupProps$1 } from '@radix-ui/react-radio-group';
|
|
7
7
|
import { CheckboxProps as CheckboxProps$1 } from '@radix-ui/react-checkbox';
|
|
8
|
+
import { SelectProps } from '@radix-ui/react-select';
|
|
8
9
|
import { UseSelectProps, UseComboboxProps, UseMultipleSelectionProps } from 'downshift';
|
|
9
10
|
import * as _radix_ui_react_label from '@radix-ui/react-label';
|
|
10
11
|
import { LabelProps } from '@radix-ui/react-label';
|
|
@@ -350,7 +351,8 @@ type DropdownTypes = 'button' | 'input';
|
|
|
350
351
|
type DefaultDropdownItem = {
|
|
351
352
|
[key: string]: any;
|
|
352
353
|
};
|
|
353
|
-
|
|
354
|
+
type PickedSelectProps = Pick<SelectProps, 'defaultOpen' | 'open' | 'name' | 'disabled' | 'value'>;
|
|
355
|
+
interface DropdownProps<T extends DefaultDropdownItem = DefaultDropdownItem> extends PickedSelectProps {
|
|
354
356
|
/**
|
|
355
357
|
* The items to be displayed in the dropdown
|
|
356
358
|
*/
|
|
@@ -387,14 +389,6 @@ interface DropdownProps<T extends DefaultDropdownItem = DefaultDropdownItem> {
|
|
|
387
389
|
* Is the dropdown read only
|
|
388
390
|
*/
|
|
389
391
|
showTick?: boolean;
|
|
390
|
-
/**
|
|
391
|
-
* Whether disabled select
|
|
392
|
-
*/
|
|
393
|
-
disabled?: boolean;
|
|
394
|
-
/**
|
|
395
|
-
* The name of the dropdown
|
|
396
|
-
*/
|
|
397
|
-
name?: string;
|
|
398
392
|
/**
|
|
399
393
|
* The width of the dropdown
|
|
400
394
|
*/
|
package/index.js
CHANGED
|
@@ -3545,11 +3545,11 @@ medium:24,big:32},gm=Hn`
|
|
|
3545
3545
|
className:"fui-loader",speed:r,size:n})
|
|
3546
3546
|
},wm=({type:e="button",...n})=>"button"===e?t.createElement(Cm,{...n,
|
|
3547
3547
|
type:"button"}):t.createElement(zm,{...n,type:"input"}),Cm=e=>{
|
|
3548
|
-
const n=vn(),{itemIdentifier:r="id",label:a,id:o,items:i=[],onChange:l,placeholder:c,readOnly:s=!1,disabled:u=!1,isRequired:d=!1,showTick:h=!0,itemToString:p,name:f,itemComponent:m,width:v,className:g,style:y,defaultSelectedItem:b=null,isErrored:w,isMenuLoading:C,errorText:z}=e
|
|
3548
|
+
const n=vn(),{itemIdentifier:r="id",label:a,id:o,items:i=[],onChange:l,placeholder:c,readOnly:s=!1,disabled:u=!1,isRequired:d=!1,showTick:h=!0,itemToString:p,name:f,itemComponent:m,width:v,className:g,style:y,defaultSelectedItem:b=null,isErrored:w,isMenuLoading:C,errorText:z,defaultOpen:M,open:x}=e
|
|
3549
3549
|
;return t.createElement(Td,null,a&&t.createElement(t.Fragment,null,t.createElement(Fn,{
|
|
3550
3550
|
className:"input-label","aria-label":a,htmlFor:o
|
|
3551
|
-
},a,d&&t.createElement(jn,null,"*"))),t.createElement(Pd,{
|
|
3552
|
-
disabled:u,value:b?.[r]??void 0,onValueChange:e=>{if(s)return
|
|
3551
|
+
},a,d&&t.createElement(jn,null,"*"))),t.createElement(Pd,{open:x,defaultOpen:M,
|
|
3552
|
+
name:f,required:d,disabled:u,value:b?.[r]??void 0,onValueChange:e=>{if(s)return
|
|
3553
3553
|
;const t=i.find((t=>t?.[r]===e));l?.(t??null)}},t.createElement(Gd,{
|
|
3554
3554
|
className:`SelectTrigger ${g||""}`.trim(),"aria-label":"Food",disabled:u,id:o,
|
|
3555
3555
|
isErrored:!!w,width:v,style:y},t.createElement(Rd,{className:"SelectValue",
|
|
@@ -15325,7 +15325,7 @@ onClick:()=>{a((t=>({...t,[e.id]:!1}))),i((t=>t.filter((t=>t.id!==e.id))))}
|
|
|
15325
15325
|
},t.createElement(Mr,{variant:"secondary"},"Cancel")),t.createElement(Mr,{
|
|
15326
15326
|
onClick:()=>{e.setColumnOrder(o.map((e=>e.id))),e.setColumnVisibility(r)}
|
|
15327
15327
|
},"Update")))},pB=n=>{
|
|
15328
|
-
const{data:r,columns:a,showFooter:o=!1,infoComponent:i,isLoading:l,isFetching:c,emptyComponent:s,loadingComponent:u,actionComponent:d,headerComponent:h,filterComponent:p,hideTableOnEmpty:f,hideTopPagination:m,hideFilters:v,showTableOnLoading:g,hideLoaderOnTopPagination:y,hideActions:b,count:w,pageIndex:C=0,pageSize:z=20,enablePreviousPage:M,enableNextPage:x,hideColumnSettings:S=!
|
|
15328
|
+
const{data:r,columns:a,showFooter:o=!1,infoComponent:i,isLoading:l,isFetching:c,emptyComponent:s,loadingComponent:u,actionComponent:d,headerComponent:h,filterComponent:p,hideTableOnEmpty:f,hideTopPagination:m,hideFilters:v,showTableOnLoading:g,hideLoaderOnTopPagination:y,hideActions:b,count:w,pageIndex:C=0,pageSize:z=20,enablePreviousPage:M,enableNextPage:x,hideColumnSettings:S=!0,hideBottomPagination:E,rowMenuOptions:_,onPreviousPageClick:H,onNextPageClick:D,disableRowSelect:L,hideSelectAllInTable:V,onSelectAllRows:A,onRowSelect:k,onMenuOptionSelect:T,onRowClick:P,columnOrder:I,setColumnOrder:R,setHiddenColumns:O,hiddenColumns:N,selectedRowIds:F={},setSelectedRowIds:B,dataKey:j="id",cellPropGetter:U,setPageIndex:$,rowPropGetter:Y}=n,W=vn(),[G,K]=t.useState(!v),q={
|
|
15329
15329
|
accessor:(e,t)=>"function"==typeof e?{...t,accessorFn:e}:{...t,accessorKey:e},
|
|
15330
15330
|
display:e=>e,group:e=>e},Z=-1===w||void 0===w,X=t.useMemo((()=>[...L?[]:[{
|
|
15331
15331
|
id:"select",
|