plume-ui-react 0.12.0 → 0.13.0
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/README.md +1 -1
- package/dist/components/presentation/emptystate/emptystate.mjs +1 -0
- package/dist/components/presentation/emptystate/index.mjs +1 -0
- package/dist/components/presentation/spinner/spinner.mjs +2 -2
- package/dist/components/utility/table/index.mjs +1 -1
- package/dist/components/utility/table/table-empty.mjs +1 -0
- package/dist/components/utility/table/table-state.mjs +1 -0
- package/dist/components/utility/table/table.mjs +1 -1
- package/dist/components/utility/table/use-table-state.mjs +1 -0
- package/dist/index.d.mts +84 -2
- package/dist/index.d.ts +84 -2
- package/dist/index.js +5 -5
- package/dist/index.mjs +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -38,7 +38,7 @@ export function App() {
|
|
|
38
38
|
|
|
39
39
|
## Components
|
|
40
40
|
|
|
41
|
-
`Accordion` (with `AccordionContent`, `AccordionItem` and `AccordionTrigger`), `Badge`, `Breadcrumb` (with `BreadcrumbItem`, `BreadcrumbLink` and `BreadcrumbSeparator`), `Button`, `Card` (with `CardHeader`, `CardBody` and `CardFooter`), `Carousel` (with `CarouselDots`, `CarouselNext`, `CarouselPlayPause`, `CarouselPrev`, `CarouselSlide` and `CarouselSlides`), `Checkbox`, `Chip`, `Collapse`, `DatePicker`, `Dropdown` (with `DropdownItem`, `DropdownLabel`, `DropdownMenu`, `DropdownSeparator` and `DropdownTrigger`), `Field`, `FileUpload`, `Icon`, `Input`, `List` (with `ListDivider`, `ListItem`, `ListItemButton`, `ListItemIcon`, `ListItemText` and `ListSubheader`), `Modal` (with `ModalBody`, `ModalClose`, `ModalContent`, `ModalFooter`, `ModalHeader` and `ModalTrigger`), `Navbar` (with `NavbarBrand`, `NavbarContent`, `NavbarItem` and `NavbarToggle`), `NumberInput`, `Paginator`, `PinInput`, `Popover` (with `PopoverClose`, `PopoverContent` and `PopoverTrigger`), `ProgressBar`, `Radio`, `RadioGroup`, `Rating`, `Select` (with `SelectContent`, `SelectGroup`, `SelectOption`, `SelectTrigger` and `SelectValue`), `Sidebar` (with `SidebarContent`, `SidebarItem`, `SidebarProvider` and `SidebarToggle`), `Skeleton`, `Slider`, `Spinner`, `Stepper` (with `Step`, `StepDescription`, `StepIndicator`, `StepSeparator` and `StepTitle`), `Table` (with `TableBody`, `TableCaption`, `TableCell`, `TableFooter`, `TableHead`, `TableHeader` and `
|
|
41
|
+
`Accordion` (with `AccordionContent`, `AccordionItem` and `AccordionTrigger`), `Badge`, `Breadcrumb` (with `BreadcrumbItem`, `BreadcrumbLink` and `BreadcrumbSeparator`), `Button`, `Card` (with `CardHeader`, `CardBody` and `CardFooter`), `Carousel` (with `CarouselDots`, `CarouselNext`, `CarouselPlayPause`, `CarouselPrev`, `CarouselSlide` and `CarouselSlides`), `Checkbox`, `Chip`, `Collapse`, `DatePicker`, `Dropdown` (with `DropdownItem`, `DropdownLabel`, `DropdownMenu`, `DropdownSeparator` and `DropdownTrigger`), `EmptyState`, `Field`, `FileUpload`, `Icon`, `Input`, `List` (with `ListDivider`, `ListItem`, `ListItemButton`, `ListItemIcon`, `ListItemText` and `ListSubheader`), `Modal` (with `ModalBody`, `ModalClose`, `ModalContent`, `ModalFooter`, `ModalHeader` and `ModalTrigger`), `Navbar` (with `NavbarBrand`, `NavbarContent`, `NavbarItem` and `NavbarToggle`), `NumberInput`, `Paginator`, `PinInput`, `Popover` (with `PopoverClose`, `PopoverContent` and `PopoverTrigger`), `ProgressBar`, `Radio`, `RadioGroup`, `Rating`, `Select` (with `SelectContent`, `SelectGroup`, `SelectOption`, `SelectTrigger` and `SelectValue`), `Sidebar` (with `SidebarContent`, `SidebarItem`, `SidebarProvider` and `SidebarToggle`), `Skeleton`, `Slider`, `Spinner`, `Stepper` (with `Step`, `StepDescription`, `StepIndicator`, `StepSeparator` and `StepTitle`), `Table` (with `TableBody`, `TableCaption`, `TableCell`, `TableEmpty`, `TableFooter`, `TableHead`, `TableHeader`, `TableRow` and the `useTableState` hook), `Tabs` (with `TabList`, `Tab`, `TabPanels` and `TabPanel`), `Textarea`, `ToastProvider` (with the `useToast` hook), `Toggle`, `Tooltip` and `Tree` (with `TreeItem`, `TreeItemGroup` and `TreeItemLabel`).
|
|
42
42
|
|
|
43
43
|
The [documentation site](https://darioegb.github.io/plume-ui-react/) has a live playground, props and examples for each one, plus the color palette, design tokens and framework integration guides.
|
|
44
44
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{forwardRef as E}from"react";import{joinClasses as i}from"../../../overlay/class-names.mjs";var t={emptystate:"_emptystate_1rwkb_13",sm:"_sm_1rwkb_21",md:"_md_1rwkb_27",lg:"_lg_1rwkb_33",outline:"_outline_1rwkb_39",filled:"_filled_1rwkb_43",icon:"_icon_1rwkb_47",title:"_title_1rwkb_52",description:"_description_1rwkb_58",action:"_action_1rwkb_64"};import{jsx as p,jsxs as b}from"react/jsx-runtime";var S=E(({action:o,className:s,classNames:a,description:r,icon:l,size:d="md",style:y,title:m,titleAs:c="div",variant:n="plain",..._},u)=>{let e=n!=="unstyled";return b("div",{className:i(e&&t.emptystate,e&&t[d],e&&t[n],s),"data-plume-emptystate":"",ref:u,style:y,..._,children:[l?p("span",{"aria-hidden":"true",className:i(e&&t.icon,a?.icon),"data-plume-emptystate-icon":"",children:l}):null,m?p(c,{className:i(e&&t.title,a?.title),"data-plume-emptystate-title":"",children:m}):null,r?p("p",{className:i(e&&t.description,a?.description),"data-plume-emptystate-description":"",children:r}):null,o?p("div",{className:i(e&&t.action,a?.action),"data-plume-emptystate-action":"",children:o}):null]})});S.displayName="EmptyState";export{S as EmptyState};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{EmptyState as p}from"./emptystate.mjs";export{p as EmptyState};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{forwardRef as S}from"react";import{colorVar as z}from"../../../theme/index.mjs";var
|
|
1
|
+
import{forwardRef as S}from"react";import{colorVar as z}from"../../../theme/index.mjs";var s={"spinner-border-width":"3px","spinner-border-style":"solid","primary-border-color":"currentColor","border-color":"transparent",spinner:"_spinner_q8rz1_7",spin:"_spin_q8rz1_7",sm:"_sm_q8rz1_18",md:"_md_q8rz1_23",lg:"_lg_q8rz1_28",solid:"_solid_q8rz1_33 _spinner_q8rz1_7",dashed:"_dashed_q8rz1_38 _spinner_q8rz1_7",dotted:"_dotted_q8rz1_43 _spinner_q8rz1_7",double:"_double_q8rz1_48 _spinner_q8rz1_7",loader:"_loader_q8rz1_63",l7:"_l7_q8rz1_1",l5:"_l5_q8rz1_1",l11:"_l11_q8rz1_1",l27:"_l27_q8rz1_1",animloader:"_animloader_q8rz1_1"};import{jsx as c}from"react/jsx-runtime";var u=({color:o,style:t,speed:r,thickness:e})=>({"--spinner-scheme":z(o),...e&&{"--spinner-border-width":`${e}px`},"--spinner-animation-duration":r?.length?r:"1s",...t??{}}),y=S(({color:o="secondary.900",style:t,speed:r,className:e="",thickness:p=3,variant:n="solid",size:i=n!=="unstyled"?"md":void 0,...l},_)=>{let d=i&&(i!=="md"||n==="unstyled")?s[i]:"",a=n!=="unstyled"?s[n]:"",m=`
|
|
2
2
|
${d}
|
|
3
3
|
${a}
|
|
4
4
|
${e}
|
|
5
|
-
`.trim();return c("output",{"aria-label":"loading",className:m,ref:
|
|
5
|
+
`.trim();return c("output",{"aria-label":"loading",className:m,ref:_,style:u({color:o,style:t,speed:r,thickness:p}),...l})});y.displayName="Spinner";export{y as Spinner};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Table as
|
|
1
|
+
import{Table as o}from"./table.mjs";import{TableBody as r}from"./table-body.mjs";import{TableCaption as l}from"./table-caption.mjs";import{TableCell as T}from"./table-cell.mjs";import{TableEmpty as s}from"./table-empty.mjs";import{TableFooter as f}from"./table-footer.mjs";import{TableHead as P}from"./table-head.mjs";import{TableHeader as n}from"./table-header.mjs";import{TableRow as F}from"./table-row.mjs";import{useTableState as C}from"./use-table-state.mjs";export{o as Table,r as TableBody,l as TableCaption,T as TableCell,s as TableEmpty,f as TableFooter,P as TableHead,n as TableHeader,F as TableRow,C as useTableState};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{forwardRef as E}from"react";import{EmptyState as f}from"../../presentation/emptystate/index.mjs";import{jsx as t}from"react/jsx-runtime";var P=E(({action:e,children:a,className:p,classNames:o,colSpan:r=100,description:l,emptyStateClassName:m,icon:s,size:i,style:n,title:y,titleAs:d,variant:c,...b},T)=>t("tr",{"data-plume-table-empty":"",children:t("td",{className:p,colSpan:r,"data-plume-table-empty-cell":"",ref:T,style:n,...b,children:t(f,{action:e,className:m,classNames:o,description:l,icon:s,role:"status",size:i,title:y??a,titleAs:d,variant:c})})}));P.displayName="TableEmpty";export{P as TableEmpty};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var w=n=>n==null||n===""||Array.isArray(n)&&n.length===0,l=n=>n==null;function d(n,e){return typeof n=="number"&&typeof e=="number"?n-e:n instanceof Date&&e instanceof Date?n.getTime()-e.getTime():String(n).localeCompare(String(e),void 0,{numeric:!0,sensitivity:"base"})}var p=n=>typeof n=="string"?n:typeof n=="number"||typeof n=="boolean"||typeof n=="bigint"?String(n):"";function y(n,e){return Array.isArray(e)?e.includes(n):typeof e=="string"?p(n).toLowerCase().includes(e.trim().toLowerCase()):n===e}function R(n,e,a,s){let t=Object.entries(e).filter(([,r])=>!w(r));return t.length===0?[...n]:n.filter(r=>t.every(([o,i])=>{let u=s[o];return u?u(r,i):y(a(r,o),i)}))}function g(n,e,a,s){if(!e)return[...n];let{column:t,direction:r}=e,o=r==="ascending"?1:-1,i=s[t];return[...n].sort((u,b)=>{if(i)return o*i(u,b);let c=a(u,t),f=a(b,t);return l(c)||l(f)?Number(l(c))-Number(l(f)):o*d(c,f)})}function m(n,e){return n?.column!==e?{column:e,direction:"ascending"}:n.direction==="ascending"?{column:e,direction:"descending"}:null}export{d as compareValues,R as filterRows,w as isEmptyFilter,y as matchesFilter,m as nextSort,g as sortRows};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{forwardRef as
|
|
1
|
+
"use client";import{forwardRef as S,useEffect as w,useState as p}from"react";import{joinClasses as f}from"../../../overlay/class-names.mjs";import{Spinner as E}from"../../presentation/spinner/index.mjs";var a={container:"_container_1boml_71",table:"_table_1boml_75",sm:"_sm_1boml_81",md:"_md_1boml_86",lg:"_lg_1boml_91",plain:"_plain_1boml_130",bordered:"_bordered_1boml_145",striped:"_striped_1boml_160"};import{jsx as d,jsxs as O}from"react/jsx-runtime";function L(e){let[r,i]=p(!1);return w(()=>{if(!e)return;let n=()=>i(e.scrollWidth>e.clientWidth||e.scrollHeight>e.clientHeight);if(n(),typeof ResizeObserver>"u")return;let l=new ResizeObserver(n);return l.observe(e),e.firstElementChild&&l.observe(e.firstElementChild),()=>l.disconnect()},[e]),r}var M=S(({"aria-label":e,"aria-labelledby":r,children:i,className:n,containerClassName:l,hoverable:u=!1,loading:o=!1,loadingClassName:c,loadingLabel:_="Loading",maxHeight:b,size:y="md",stickyHeader:T=!1,style:g,variant:m="plain",...v},h)=>{let t=m!=="unstyled",[C,H]=p(null),s=L(C),P=b===void 0?void 0:{maxHeight:b};return O("section",{"aria-label":s?e:void 0,"aria-labelledby":s?r:void 0,className:f(t&&a.container,l),"data-plume-table-container":"",ref:H,style:P,...s&&{tabIndex:0},children:[o?d("div",{"data-plume-table-loading":"",children:d(E,{"aria-label":_,className:c,color:"primary",variant:t?"solid":"unstyled"})}):null,d("table",{"aria-busy":o?!0:void 0,"aria-label":e,"aria-labelledby":r,className:f(t&&a.table,t&&a[m],t&&a[y],n),"data-hoverable":u?"":void 0,"data-loading":o?"":void 0,"data-plume-table":"","data-sticky":T?"":void 0,ref:h,style:g,...v,children:i})]})});M.displayName="Table";export{M as Table};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{useCallback as t,useMemo as d,useState as m}from"react";import{filterRows as $,isEmptyFilter as I,nextSort as ee,sortRows as te}from"./table-state.mjs";var oe=[],w={},se=(l,T)=>l[T],le=l=>String(l.id);function ae({defaultFilters:l,defaultPage:T=1,defaultPageSize:y=10,defaultSort:G=null,filterFns:z=w,getRowId:a=le,getValue:f=se,manual:u=!1,rows:i=oe,sortFns:k=w,total:N}={}){let[n,M]=m(l??w),[H,b]=m(T),[q,A]=m(y),r=q,[E,V]=m(G),o=E,[p,P]=m([]),F=d(()=>u?i:te($(i,n,f,z),o,f,k),[z,n,f,u,i,o,k]),O=u?N??i.length:F.length,C=Math.max(1,Math.ceil(O/r)),c=Math.min(Math.max(1,H),C),h=d(()=>u?[...i]:F.slice((c-1)*r,c*r),[u,c,r,F,i]),_=t(e=>b(Math.max(1,e)),[]),j=t(e=>{A(Math.max(1,e)),b(1)},[]),v=t(e=>{V(e),b(1)},[]),x=t(e=>{v(ee(o,e))},[v,o]),L=t(e=>({onSort:()=>x(e),sort:o?.column===e?o.direction:"none"}),[o,x]),B=t((e,s)=>{M(S=>({...S,[e]:s})),b(1)},[]),D=t(()=>{M(l??w),b(1)},[l]),J=d(()=>Object.values(n).some(e=>!I(e)),[n]),g=d(()=>h.map(a),[a,h]),U=g.filter(e=>p.includes(e)).length,R=g.length>0&&U===g.length,K=t(e=>p.includes(a(e)),[a,p]),Q=t(e=>{let s=a(e);P(S=>S.includes(s)?S.filter(Z=>Z!==s):[...S,s])},[a]),W=t(()=>{P(e=>R?e.filter(s=>!g.includes(s)):[...e,...g.filter(s=>!e.includes(s))])},[R,g]),X=t(()=>P([]),[]),Y=d(()=>({filters:n,page:c,pageSize:r,sort:o}),[n,c,r,o]);return{allSelected:R,clearSelection:X,filters:n,getSortProps:L,hasFilters:J,isSelected:K,page:c,pageCount:C,pageSize:r,params:Y,resetFilters:D,rows:h,selected:p,setFilter:B,setPage:_,setPageSize:j,setSort:v,someSelected:U>0&&!R,sort:o,toggleAll:W,toggleRow:Q,toggleSort:x,total:O}}export{ae as useTableState};
|
package/dist/index.d.mts
CHANGED
|
@@ -563,6 +563,23 @@ interface DropdownTriggerProps {
|
|
|
563
563
|
}
|
|
564
564
|
declare const DropdownTrigger: react.ForwardRefExoticComponent<DropdownTriggerProps & react.RefAttributes<HTMLElement>>;
|
|
565
565
|
|
|
566
|
+
type EmptyStateVariant = 'filled' | 'outline' | 'plain' | 'unstyled';
|
|
567
|
+
type EmptyStatePart = 'action' | 'description' | 'icon' | 'title';
|
|
568
|
+
type EmptyStateTitleTag = 'div' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
569
|
+
interface EmptyStateOwnProps {
|
|
570
|
+
action?: ReactNode;
|
|
571
|
+
classNames?: Partial<Record<EmptyStatePart, string>>;
|
|
572
|
+
description?: ReactNode;
|
|
573
|
+
icon?: ReactNode;
|
|
574
|
+
size?: Size;
|
|
575
|
+
title?: ReactNode;
|
|
576
|
+
titleAs?: EmptyStateTitleTag;
|
|
577
|
+
variant?: EmptyStateVariant;
|
|
578
|
+
}
|
|
579
|
+
type EmptyStateRootAttributes = Pick<HTMLAttributes<HTMLDivElement>, 'aria-label' | 'aria-labelledby' | 'aria-live' | 'hidden' | 'id' | 'role' | 'title'>;
|
|
580
|
+
type EmptyStateProps = Omit<ComponentProps, 'index'> & Omit<EmptyStateRootAttributes, 'title'> & EmptyStateOwnProps;
|
|
581
|
+
declare const EmptyState: react.ForwardRefExoticComponent<Omit<ComponentProps, "index"> & Omit<EmptyStateRootAttributes, "title"> & EmptyStateOwnProps & react.RefAttributes<HTMLDivElement>>;
|
|
582
|
+
|
|
566
583
|
interface FieldOwnProps {
|
|
567
584
|
disabled?: boolean;
|
|
568
585
|
errorText?: ReactNode;
|
|
@@ -1195,7 +1212,7 @@ interface SpinnerOwnProps {
|
|
|
1195
1212
|
variant?: SpinnerVariant;
|
|
1196
1213
|
}
|
|
1197
1214
|
type SpinnerVariant = 'solid' | 'dashed' | 'dotted' | 'double' | 'unstyled';
|
|
1198
|
-
type SpinnerRootAttributes = Pick<HtmlHTMLAttributes<HTMLSpanElement>, 'hidden' | 'id' | 'tabIndex'>;
|
|
1215
|
+
type SpinnerRootAttributes = Pick<HtmlHTMLAttributes<HTMLSpanElement>, 'aria-label' | 'hidden' | 'id' | 'tabIndex'>;
|
|
1199
1216
|
type SpinnerProps = ComponentProps & SpinnerRootAttributes & SpinnerOwnProps;
|
|
1200
1217
|
declare const Spinner: react.ForwardRefExoticComponent<ComponentProps & SpinnerRootAttributes & SpinnerOwnProps & react.RefAttributes<HTMLOutputElement>>;
|
|
1201
1218
|
|
|
@@ -1238,6 +1255,9 @@ type TableVariant = 'plain' | 'bordered' | 'striped' | 'unstyled';
|
|
|
1238
1255
|
interface TableOwnProps {
|
|
1239
1256
|
containerClassName?: string;
|
|
1240
1257
|
hoverable?: boolean;
|
|
1258
|
+
loading?: boolean;
|
|
1259
|
+
loadingClassName?: string;
|
|
1260
|
+
loadingLabel?: string;
|
|
1241
1261
|
maxHeight?: number | string;
|
|
1242
1262
|
size?: Size;
|
|
1243
1263
|
stickyHeader?: boolean;
|
|
@@ -1265,6 +1285,14 @@ type TableCellRootAttributes = Pick<TdHTMLAttributes<HTMLTableCellElement>, 'chi
|
|
|
1265
1285
|
type TableCellProps = Omit<ComponentProps, 'index'> & TableCellRootAttributes & TableCellOwnProps;
|
|
1266
1286
|
declare const TableCell: react.ForwardRefExoticComponent<Omit<ComponentProps, "index"> & TableCellRootAttributes & TableCellOwnProps & react.RefAttributes<HTMLTableCellElement>>;
|
|
1267
1287
|
|
|
1288
|
+
interface TableEmptyOwnProps {
|
|
1289
|
+
colSpan?: number;
|
|
1290
|
+
emptyStateClassName?: string;
|
|
1291
|
+
}
|
|
1292
|
+
type TableEmptyRootAttributes = Pick<TdHTMLAttributes<HTMLTableCellElement>, 'children' | 'hidden' | 'id'>;
|
|
1293
|
+
type TableEmptyProps = Omit<ComponentProps, 'index'> & TableEmptyRootAttributes & Pick<EmptyStateProps, 'action' | 'classNames' | 'description' | 'icon' | 'size' | 'title' | 'titleAs' | 'variant'> & TableEmptyOwnProps;
|
|
1294
|
+
declare const TableEmpty: react.ForwardRefExoticComponent<Omit<ComponentProps, "index"> & TableEmptyRootAttributes & Pick<EmptyStateProps, "size" | "icon" | "title" | "variant" | "classNames" | "action" | "description" | "titleAs"> & TableEmptyOwnProps & react.RefAttributes<HTMLTableCellElement>>;
|
|
1295
|
+
|
|
1268
1296
|
type TableFooterRootAttributes = Pick<HTMLAttributes<HTMLTableSectionElement>, 'children' | 'hidden' | 'id' | 'title'>;
|
|
1269
1297
|
type TableFooterProps = Omit<ComponentProps, 'index'> & TableFooterRootAttributes;
|
|
1270
1298
|
declare const TableFooter: react.ForwardRefExoticComponent<Omit<ComponentProps, "index"> & TableFooterRootAttributes & react.RefAttributes<HTMLTableSectionElement>>;
|
|
@@ -1291,6 +1319,60 @@ type TableRowRootAttributes = Pick<HTMLAttributes<HTMLTableRowElement>, 'childre
|
|
|
1291
1319
|
type TableRowProps = Omit<ComponentProps, 'index'> & TableRowRootAttributes & TableRowOwnProps;
|
|
1292
1320
|
declare const TableRow: react.ForwardRefExoticComponent<Omit<ComponentProps, "index"> & TableRowRootAttributes & TableRowOwnProps & react.RefAttributes<HTMLTableRowElement>>;
|
|
1293
1321
|
|
|
1322
|
+
type TableFilters = Record<string, unknown>;
|
|
1323
|
+
interface TableSort {
|
|
1324
|
+
column: string;
|
|
1325
|
+
direction: Exclude<TableSortDirection, 'none'>;
|
|
1326
|
+
}
|
|
1327
|
+
type TableFilterFn<Row> = (row: Row, value: unknown) => boolean;
|
|
1328
|
+
type TableValueGetter<Row> = (row: Row, column: string) => unknown;
|
|
1329
|
+
|
|
1330
|
+
interface TableParams {
|
|
1331
|
+
filters: TableFilters;
|
|
1332
|
+
page: number;
|
|
1333
|
+
pageSize: number;
|
|
1334
|
+
sort: TableSort | null;
|
|
1335
|
+
}
|
|
1336
|
+
interface UseTableStateOptions<Row> {
|
|
1337
|
+
defaultFilters?: TableFilters;
|
|
1338
|
+
defaultPage?: number;
|
|
1339
|
+
defaultPageSize?: number;
|
|
1340
|
+
defaultSort?: TableSort | null;
|
|
1341
|
+
filterFns?: Record<string, TableFilterFn<Row>>;
|
|
1342
|
+
getRowId?: (row: Row) => string;
|
|
1343
|
+
getValue?: TableValueGetter<Row>;
|
|
1344
|
+
manual?: boolean;
|
|
1345
|
+
rows?: readonly Row[];
|
|
1346
|
+
sortFns?: Record<string, (first: Row, second: Row) => number>;
|
|
1347
|
+
total?: number;
|
|
1348
|
+
}
|
|
1349
|
+
interface UseTableStateResult<Row> {
|
|
1350
|
+
allSelected: boolean;
|
|
1351
|
+
clearSelection: () => void;
|
|
1352
|
+
filters: TableFilters;
|
|
1353
|
+
getSortProps: (column: string) => Pick<TableHeadProps, 'onSort' | 'sort'>;
|
|
1354
|
+
hasFilters: boolean;
|
|
1355
|
+
isSelected: (row: Row) => boolean;
|
|
1356
|
+
page: number;
|
|
1357
|
+
pageCount: number;
|
|
1358
|
+
pageSize: number;
|
|
1359
|
+
params: TableParams;
|
|
1360
|
+
resetFilters: () => void;
|
|
1361
|
+
rows: Row[];
|
|
1362
|
+
selected: string[];
|
|
1363
|
+
setFilter: (column: string, value: unknown) => void;
|
|
1364
|
+
setPage: (page: number) => void;
|
|
1365
|
+
setPageSize: (pageSize: number) => void;
|
|
1366
|
+
setSort: (sort: TableSort | null) => void;
|
|
1367
|
+
someSelected: boolean;
|
|
1368
|
+
sort: TableSort | null;
|
|
1369
|
+
toggleAll: () => void;
|
|
1370
|
+
toggleRow: (row: Row) => void;
|
|
1371
|
+
toggleSort: (column: string) => void;
|
|
1372
|
+
total: number;
|
|
1373
|
+
}
|
|
1374
|
+
declare function useTableState<Row>({ defaultFilters, defaultPage, defaultPageSize, defaultSort, filterFns, getRowId, getValue, manual, rows, sortFns, total: manualTotal, }?: UseTableStateOptions<Row>): UseTableStateResult<Row>;
|
|
1375
|
+
|
|
1294
1376
|
interface TabsOwnProps {
|
|
1295
1377
|
alignment?: TabsAlignment;
|
|
1296
1378
|
colorScheme?: ColorScheme;
|
|
@@ -1473,4 +1555,4 @@ type TreeItemLabelRootAttributes = Pick<HTMLAttributes<HTMLSpanElement>, 'childr
|
|
|
1473
1555
|
type TreeItemLabelProps = Omit<ComponentProps, 'index'> & TreeItemLabelRootAttributes & TreeItemLabelOwnProps;
|
|
1474
1556
|
declare const TreeItemLabel: react.ForwardRefExoticComponent<Omit<ComponentProps, "index"> & TreeItemLabelRootAttributes & TreeItemLabelOwnProps & react.RefAttributes<HTMLSpanElement>>;
|
|
1475
1557
|
|
|
1476
|
-
export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionOwnProps, type AccordionProps, AccordionTrigger, type AccordionTriggerPart, type AccordionTriggerProps, type AccordionVariant, Badge, type BadgeProps, Breadcrumb, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, type BreadcrumbOwnProps, type BreadcrumbProps, BreadcrumbSeparator, type BreadcrumbSeparatorProps, type BreadcrumbVariant, type Breakpoints, Button, type ButtonProps, Card, CardBody, type CardBodyProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, Carousel, CarouselDots, type CarouselDotsProps, CarouselNext, type CarouselNextProps, type CarouselOwnProps, CarouselPlayPause, type CarouselPlayPauseProps, CarouselPrev, type CarouselPrevProps, type CarouselProps, CarouselSlide, type CarouselSlideProps, CarouselSlides, type CarouselSlidesProps, type CarouselVariant, Checkbox, type CheckboxProps, Chip, type ChipPart, type ChipProps, type ChipVariant, Collapse, type CollapseOwnProps, type CollapseProps, type CollapseVariant, type ColorMode, type ColorModeSetting, type ColorPalette, type ColorScheme, type ColorShade, type ComponentProps, DatePicker, type DatePickerConfig, type DatePickerProps, type DateRange, type DeepPartial, Dropdown, DropdownItem, type DropdownItemProps, DropdownLabel, type DropdownLabelProps, DropdownMenu, type DropdownMenuProps, type DropdownProps, DropdownSeparator, type DropdownSeparatorProps, DropdownTrigger, type DropdownTriggerProps, Field, type FieldControlProps, type FieldOrientation, type FieldProps, type FileRejection, type FileRejectionReason, FileUpload, type FileUploadOwnProps, type FileUploadPart, type FileUploadProps, type FileUploadVariant, type FontSizes, type FontWeights, Icon, type IconProps, Input, type InputProps, type LazyLoadedComponent, type LineHeights, List, ListDivider, type ListDividerProps, ListItem, ListItemButton, type ListItemButtonProps, ListItemIcon, type ListItemIconProps, type ListItemProps, ListItemText, type ListItemTextProps, type ListProps, ListSubheader, type ListSubheaderProps, type MaskChangeHandler, Modal, ModalBody, type ModalBodyProps, ModalClose, type ModalCloseProps, ModalContent, type ModalContentProps, ModalFooter, type ModalFooterProps, ModalHeader, type ModalHeaderProps, type ModalProps, ModalTrigger, type ModalTriggerProps, Navbar, NavbarBrand, type NavbarBrandProps, type NavbarBreakpoint, NavbarContent, type NavbarContentProps, NavbarItem, type NavbarItemProps, type NavbarOwnProps, type NavbarProps, NavbarToggle, type NavbarToggleProps, type NavbarVariant, NumberInput, type NumberInputPart, type NumberInputProps, type NumberInputVariant, Paginator, type PaginatorOwnProps, type PaginatorPart, type PaginatorProps, type PaginatorVariant, PinInput, type PinInputProps, type PinInputType, type PinInputVariant, Popover, PopoverClose, type PopoverCloseProps, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, ProgressBar, type ProgressBarProps, type ProgressBarVariant, type Radii, Radio, RadioGroup, type RadioGroupProps, type RadioProps, Rating, type RatingPart, type RatingProps, type RatingVariant, Select, SelectContent, type SelectContentPart, type SelectContentProps, SelectGroup, type SelectGroupProps, SelectOption, type SelectOptionPart, type SelectOptionProps, type SelectProps, SelectTrigger, type SelectTriggerPart, type SelectTriggerProps, SelectValue, type SelectValueProps, type SelectVariant, type SelectedOption, type SemanticColors, type Shade, type ShadeLevel, type Shadows, type Shape, Sidebar, type SidebarBreakpoint, SidebarContent, type SidebarContentProps, SidebarItem, type SidebarItemPart, type SidebarItemProps, type SidebarOwnProps, type SidebarProps, SidebarProvider, type SidebarProviderProps, type SidebarSide, SidebarToggle, type SidebarToggleProps, type SidebarVariant, type Size, type Sizes, Skeleton, type SkeletonProps, type SkeletonShape, type SkeletonVariant, Slider, type SliderMark, type SliderOrientation, type SliderOwnProps, type SliderPart, type SliderProps, type SliderValue, type SliderVariant, type Spaces, Spinner, type SpinnerProps, Step, StepDescription, type StepDescriptionProps, StepIndicator, type StepIndicatorProps, type StepProps, StepSeparator, type StepSeparatorProps, type StepStatus, StepTitle, type StepTitleProps, Stepper, type StepperOrientation, type StepperOwnProps, type StepperProps, type StepperVariant, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, TabPanels, type TabPanelsProps, type TabProps, Table, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, type TableOwnProps, type TableProps, TableRow, type TableRowProps, type TableSortDirection, type TableVariant, Tabs, type TabsProps, Textarea, type TextareaProps, type Theme, type ThemeContextValue, ThemeProvider, type ThemeProviderProps, type ToastAction, type ToastApi, type ToastContent, type ToastIcons, type ToastOptions, type ToastPart, type ToastPosition, ToastProvider, type ToastProviderProps, type ToastStatus, type ToastVariant, Toggle, type ToggleProps, Tooltip, type TooltipProps, Tree, TreeItem, TreeItemGroup, type TreeItemGroupProps, TreeItemLabel, type TreeItemLabelOwnProps, type TreeItemLabelProps, type TreeItemOwnProps, type TreeItemProps, type TreeOwnProps, type TreeProps, type TreeSelection, type TreeVariant, type Typography, type UseClickOutsideProps, type UseDebounceProps, type UseMaskProps, type UseMaskResult, type ZIndeces, applyMask, colorVar, deepMerge, defaultDarkTheme, defaultTheme, formatDate, getContrastColor, getContrastRatio, getDarkenColor, getDateFormatByLanguage, getDateFromDateString, getDateStringByLanguage, getDaysOfWeekByLanguage, getLightenColor, getMonthsByLanguage, lazyLoadContent, themeToCssVars, useClickOutside, useDebounce, useMask, useTheme, useToast, validateFormatDate };
|
|
1558
|
+
export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionOwnProps, type AccordionProps, AccordionTrigger, type AccordionTriggerPart, type AccordionTriggerProps, type AccordionVariant, Badge, type BadgeProps, Breadcrumb, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, type BreadcrumbOwnProps, type BreadcrumbProps, BreadcrumbSeparator, type BreadcrumbSeparatorProps, type BreadcrumbVariant, type Breakpoints, Button, type ButtonProps, Card, CardBody, type CardBodyProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, Carousel, CarouselDots, type CarouselDotsProps, CarouselNext, type CarouselNextProps, type CarouselOwnProps, CarouselPlayPause, type CarouselPlayPauseProps, CarouselPrev, type CarouselPrevProps, type CarouselProps, CarouselSlide, type CarouselSlideProps, CarouselSlides, type CarouselSlidesProps, type CarouselVariant, Checkbox, type CheckboxProps, Chip, type ChipPart, type ChipProps, type ChipVariant, Collapse, type CollapseOwnProps, type CollapseProps, type CollapseVariant, type ColorMode, type ColorModeSetting, type ColorPalette, type ColorScheme, type ColorShade, type ComponentProps, DatePicker, type DatePickerConfig, type DatePickerProps, type DateRange, type DeepPartial, Dropdown, DropdownItem, type DropdownItemProps, DropdownLabel, type DropdownLabelProps, DropdownMenu, type DropdownMenuProps, type DropdownProps, DropdownSeparator, type DropdownSeparatorProps, DropdownTrigger, type DropdownTriggerProps, EmptyState, type EmptyStatePart, type EmptyStateProps, type EmptyStateTitleTag, type EmptyStateVariant, Field, type FieldControlProps, type FieldOrientation, type FieldProps, type FileRejection, type FileRejectionReason, FileUpload, type FileUploadOwnProps, type FileUploadPart, type FileUploadProps, type FileUploadVariant, type FontSizes, type FontWeights, Icon, type IconProps, Input, type InputProps, type LazyLoadedComponent, type LineHeights, List, ListDivider, type ListDividerProps, ListItem, ListItemButton, type ListItemButtonProps, ListItemIcon, type ListItemIconProps, type ListItemProps, ListItemText, type ListItemTextProps, type ListProps, ListSubheader, type ListSubheaderProps, type MaskChangeHandler, Modal, ModalBody, type ModalBodyProps, ModalClose, type ModalCloseProps, ModalContent, type ModalContentProps, ModalFooter, type ModalFooterProps, ModalHeader, type ModalHeaderProps, type ModalProps, ModalTrigger, type ModalTriggerProps, Navbar, NavbarBrand, type NavbarBrandProps, type NavbarBreakpoint, NavbarContent, type NavbarContentProps, NavbarItem, type NavbarItemProps, type NavbarOwnProps, type NavbarProps, NavbarToggle, type NavbarToggleProps, type NavbarVariant, NumberInput, type NumberInputPart, type NumberInputProps, type NumberInputVariant, Paginator, type PaginatorOwnProps, type PaginatorPart, type PaginatorProps, type PaginatorVariant, PinInput, type PinInputProps, type PinInputType, type PinInputVariant, Popover, PopoverClose, type PopoverCloseProps, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, ProgressBar, type ProgressBarProps, type ProgressBarVariant, type Radii, Radio, RadioGroup, type RadioGroupProps, type RadioProps, Rating, type RatingPart, type RatingProps, type RatingVariant, Select, SelectContent, type SelectContentPart, type SelectContentProps, SelectGroup, type SelectGroupProps, SelectOption, type SelectOptionPart, type SelectOptionProps, type SelectProps, SelectTrigger, type SelectTriggerPart, type SelectTriggerProps, SelectValue, type SelectValueProps, type SelectVariant, type SelectedOption, type SemanticColors, type Shade, type ShadeLevel, type Shadows, type Shape, Sidebar, type SidebarBreakpoint, SidebarContent, type SidebarContentProps, SidebarItem, type SidebarItemPart, type SidebarItemProps, type SidebarOwnProps, type SidebarProps, SidebarProvider, type SidebarProviderProps, type SidebarSide, SidebarToggle, type SidebarToggleProps, type SidebarVariant, type Size, type Sizes, Skeleton, type SkeletonProps, type SkeletonShape, type SkeletonVariant, Slider, type SliderMark, type SliderOrientation, type SliderOwnProps, type SliderPart, type SliderProps, type SliderValue, type SliderVariant, type Spaces, Spinner, type SpinnerProps, Step, StepDescription, type StepDescriptionProps, StepIndicator, type StepIndicatorProps, type StepProps, StepSeparator, type StepSeparatorProps, type StepStatus, StepTitle, type StepTitleProps, Stepper, type StepperOrientation, type StepperOwnProps, type StepperProps, type StepperVariant, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, TabPanels, type TabPanelsProps, type TabProps, Table, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, TableEmpty, type TableEmptyProps, type TableFilterFn, type TableFilters, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, type TableOwnProps, type TableParams, type TableProps, TableRow, type TableRowProps, type TableSort, type TableSortDirection, type TableValueGetter, type TableVariant, Tabs, type TabsProps, Textarea, type TextareaProps, type Theme, type ThemeContextValue, ThemeProvider, type ThemeProviderProps, type ToastAction, type ToastApi, type ToastContent, type ToastIcons, type ToastOptions, type ToastPart, type ToastPosition, ToastProvider, type ToastProviderProps, type ToastStatus, type ToastVariant, Toggle, type ToggleProps, Tooltip, type TooltipProps, Tree, TreeItem, TreeItemGroup, type TreeItemGroupProps, TreeItemLabel, type TreeItemLabelOwnProps, type TreeItemLabelProps, type TreeItemOwnProps, type TreeItemProps, type TreeOwnProps, type TreeProps, type TreeSelection, type TreeVariant, type Typography, type UseClickOutsideProps, type UseDebounceProps, type UseMaskProps, type UseMaskResult, type UseTableStateOptions, type UseTableStateResult, type ZIndeces, applyMask, colorVar, deepMerge, defaultDarkTheme, defaultTheme, formatDate, getContrastColor, getContrastRatio, getDarkenColor, getDateFormatByLanguage, getDateFromDateString, getDateStringByLanguage, getDaysOfWeekByLanguage, getLightenColor, getMonthsByLanguage, lazyLoadContent, themeToCssVars, useClickOutside, useDebounce, useMask, useTableState, useTheme, useToast, validateFormatDate };
|
package/dist/index.d.ts
CHANGED
|
@@ -563,6 +563,23 @@ interface DropdownTriggerProps {
|
|
|
563
563
|
}
|
|
564
564
|
declare const DropdownTrigger: react.ForwardRefExoticComponent<DropdownTriggerProps & react.RefAttributes<HTMLElement>>;
|
|
565
565
|
|
|
566
|
+
type EmptyStateVariant = 'filled' | 'outline' | 'plain' | 'unstyled';
|
|
567
|
+
type EmptyStatePart = 'action' | 'description' | 'icon' | 'title';
|
|
568
|
+
type EmptyStateTitleTag = 'div' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
569
|
+
interface EmptyStateOwnProps {
|
|
570
|
+
action?: ReactNode;
|
|
571
|
+
classNames?: Partial<Record<EmptyStatePart, string>>;
|
|
572
|
+
description?: ReactNode;
|
|
573
|
+
icon?: ReactNode;
|
|
574
|
+
size?: Size;
|
|
575
|
+
title?: ReactNode;
|
|
576
|
+
titleAs?: EmptyStateTitleTag;
|
|
577
|
+
variant?: EmptyStateVariant;
|
|
578
|
+
}
|
|
579
|
+
type EmptyStateRootAttributes = Pick<HTMLAttributes<HTMLDivElement>, 'aria-label' | 'aria-labelledby' | 'aria-live' | 'hidden' | 'id' | 'role' | 'title'>;
|
|
580
|
+
type EmptyStateProps = Omit<ComponentProps, 'index'> & Omit<EmptyStateRootAttributes, 'title'> & EmptyStateOwnProps;
|
|
581
|
+
declare const EmptyState: react.ForwardRefExoticComponent<Omit<ComponentProps, "index"> & Omit<EmptyStateRootAttributes, "title"> & EmptyStateOwnProps & react.RefAttributes<HTMLDivElement>>;
|
|
582
|
+
|
|
566
583
|
interface FieldOwnProps {
|
|
567
584
|
disabled?: boolean;
|
|
568
585
|
errorText?: ReactNode;
|
|
@@ -1195,7 +1212,7 @@ interface SpinnerOwnProps {
|
|
|
1195
1212
|
variant?: SpinnerVariant;
|
|
1196
1213
|
}
|
|
1197
1214
|
type SpinnerVariant = 'solid' | 'dashed' | 'dotted' | 'double' | 'unstyled';
|
|
1198
|
-
type SpinnerRootAttributes = Pick<HtmlHTMLAttributes<HTMLSpanElement>, 'hidden' | 'id' | 'tabIndex'>;
|
|
1215
|
+
type SpinnerRootAttributes = Pick<HtmlHTMLAttributes<HTMLSpanElement>, 'aria-label' | 'hidden' | 'id' | 'tabIndex'>;
|
|
1199
1216
|
type SpinnerProps = ComponentProps & SpinnerRootAttributes & SpinnerOwnProps;
|
|
1200
1217
|
declare const Spinner: react.ForwardRefExoticComponent<ComponentProps & SpinnerRootAttributes & SpinnerOwnProps & react.RefAttributes<HTMLOutputElement>>;
|
|
1201
1218
|
|
|
@@ -1238,6 +1255,9 @@ type TableVariant = 'plain' | 'bordered' | 'striped' | 'unstyled';
|
|
|
1238
1255
|
interface TableOwnProps {
|
|
1239
1256
|
containerClassName?: string;
|
|
1240
1257
|
hoverable?: boolean;
|
|
1258
|
+
loading?: boolean;
|
|
1259
|
+
loadingClassName?: string;
|
|
1260
|
+
loadingLabel?: string;
|
|
1241
1261
|
maxHeight?: number | string;
|
|
1242
1262
|
size?: Size;
|
|
1243
1263
|
stickyHeader?: boolean;
|
|
@@ -1265,6 +1285,14 @@ type TableCellRootAttributes = Pick<TdHTMLAttributes<HTMLTableCellElement>, 'chi
|
|
|
1265
1285
|
type TableCellProps = Omit<ComponentProps, 'index'> & TableCellRootAttributes & TableCellOwnProps;
|
|
1266
1286
|
declare const TableCell: react.ForwardRefExoticComponent<Omit<ComponentProps, "index"> & TableCellRootAttributes & TableCellOwnProps & react.RefAttributes<HTMLTableCellElement>>;
|
|
1267
1287
|
|
|
1288
|
+
interface TableEmptyOwnProps {
|
|
1289
|
+
colSpan?: number;
|
|
1290
|
+
emptyStateClassName?: string;
|
|
1291
|
+
}
|
|
1292
|
+
type TableEmptyRootAttributes = Pick<TdHTMLAttributes<HTMLTableCellElement>, 'children' | 'hidden' | 'id'>;
|
|
1293
|
+
type TableEmptyProps = Omit<ComponentProps, 'index'> & TableEmptyRootAttributes & Pick<EmptyStateProps, 'action' | 'classNames' | 'description' | 'icon' | 'size' | 'title' | 'titleAs' | 'variant'> & TableEmptyOwnProps;
|
|
1294
|
+
declare const TableEmpty: react.ForwardRefExoticComponent<Omit<ComponentProps, "index"> & TableEmptyRootAttributes & Pick<EmptyStateProps, "size" | "icon" | "title" | "variant" | "classNames" | "action" | "description" | "titleAs"> & TableEmptyOwnProps & react.RefAttributes<HTMLTableCellElement>>;
|
|
1295
|
+
|
|
1268
1296
|
type TableFooterRootAttributes = Pick<HTMLAttributes<HTMLTableSectionElement>, 'children' | 'hidden' | 'id' | 'title'>;
|
|
1269
1297
|
type TableFooterProps = Omit<ComponentProps, 'index'> & TableFooterRootAttributes;
|
|
1270
1298
|
declare const TableFooter: react.ForwardRefExoticComponent<Omit<ComponentProps, "index"> & TableFooterRootAttributes & react.RefAttributes<HTMLTableSectionElement>>;
|
|
@@ -1291,6 +1319,60 @@ type TableRowRootAttributes = Pick<HTMLAttributes<HTMLTableRowElement>, 'childre
|
|
|
1291
1319
|
type TableRowProps = Omit<ComponentProps, 'index'> & TableRowRootAttributes & TableRowOwnProps;
|
|
1292
1320
|
declare const TableRow: react.ForwardRefExoticComponent<Omit<ComponentProps, "index"> & TableRowRootAttributes & TableRowOwnProps & react.RefAttributes<HTMLTableRowElement>>;
|
|
1293
1321
|
|
|
1322
|
+
type TableFilters = Record<string, unknown>;
|
|
1323
|
+
interface TableSort {
|
|
1324
|
+
column: string;
|
|
1325
|
+
direction: Exclude<TableSortDirection, 'none'>;
|
|
1326
|
+
}
|
|
1327
|
+
type TableFilterFn<Row> = (row: Row, value: unknown) => boolean;
|
|
1328
|
+
type TableValueGetter<Row> = (row: Row, column: string) => unknown;
|
|
1329
|
+
|
|
1330
|
+
interface TableParams {
|
|
1331
|
+
filters: TableFilters;
|
|
1332
|
+
page: number;
|
|
1333
|
+
pageSize: number;
|
|
1334
|
+
sort: TableSort | null;
|
|
1335
|
+
}
|
|
1336
|
+
interface UseTableStateOptions<Row> {
|
|
1337
|
+
defaultFilters?: TableFilters;
|
|
1338
|
+
defaultPage?: number;
|
|
1339
|
+
defaultPageSize?: number;
|
|
1340
|
+
defaultSort?: TableSort | null;
|
|
1341
|
+
filterFns?: Record<string, TableFilterFn<Row>>;
|
|
1342
|
+
getRowId?: (row: Row) => string;
|
|
1343
|
+
getValue?: TableValueGetter<Row>;
|
|
1344
|
+
manual?: boolean;
|
|
1345
|
+
rows?: readonly Row[];
|
|
1346
|
+
sortFns?: Record<string, (first: Row, second: Row) => number>;
|
|
1347
|
+
total?: number;
|
|
1348
|
+
}
|
|
1349
|
+
interface UseTableStateResult<Row> {
|
|
1350
|
+
allSelected: boolean;
|
|
1351
|
+
clearSelection: () => void;
|
|
1352
|
+
filters: TableFilters;
|
|
1353
|
+
getSortProps: (column: string) => Pick<TableHeadProps, 'onSort' | 'sort'>;
|
|
1354
|
+
hasFilters: boolean;
|
|
1355
|
+
isSelected: (row: Row) => boolean;
|
|
1356
|
+
page: number;
|
|
1357
|
+
pageCount: number;
|
|
1358
|
+
pageSize: number;
|
|
1359
|
+
params: TableParams;
|
|
1360
|
+
resetFilters: () => void;
|
|
1361
|
+
rows: Row[];
|
|
1362
|
+
selected: string[];
|
|
1363
|
+
setFilter: (column: string, value: unknown) => void;
|
|
1364
|
+
setPage: (page: number) => void;
|
|
1365
|
+
setPageSize: (pageSize: number) => void;
|
|
1366
|
+
setSort: (sort: TableSort | null) => void;
|
|
1367
|
+
someSelected: boolean;
|
|
1368
|
+
sort: TableSort | null;
|
|
1369
|
+
toggleAll: () => void;
|
|
1370
|
+
toggleRow: (row: Row) => void;
|
|
1371
|
+
toggleSort: (column: string) => void;
|
|
1372
|
+
total: number;
|
|
1373
|
+
}
|
|
1374
|
+
declare function useTableState<Row>({ defaultFilters, defaultPage, defaultPageSize, defaultSort, filterFns, getRowId, getValue, manual, rows, sortFns, total: manualTotal, }?: UseTableStateOptions<Row>): UseTableStateResult<Row>;
|
|
1375
|
+
|
|
1294
1376
|
interface TabsOwnProps {
|
|
1295
1377
|
alignment?: TabsAlignment;
|
|
1296
1378
|
colorScheme?: ColorScheme;
|
|
@@ -1473,4 +1555,4 @@ type TreeItemLabelRootAttributes = Pick<HTMLAttributes<HTMLSpanElement>, 'childr
|
|
|
1473
1555
|
type TreeItemLabelProps = Omit<ComponentProps, 'index'> & TreeItemLabelRootAttributes & TreeItemLabelOwnProps;
|
|
1474
1556
|
declare const TreeItemLabel: react.ForwardRefExoticComponent<Omit<ComponentProps, "index"> & TreeItemLabelRootAttributes & TreeItemLabelOwnProps & react.RefAttributes<HTMLSpanElement>>;
|
|
1475
1557
|
|
|
1476
|
-
export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionOwnProps, type AccordionProps, AccordionTrigger, type AccordionTriggerPart, type AccordionTriggerProps, type AccordionVariant, Badge, type BadgeProps, Breadcrumb, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, type BreadcrumbOwnProps, type BreadcrumbProps, BreadcrumbSeparator, type BreadcrumbSeparatorProps, type BreadcrumbVariant, type Breakpoints, Button, type ButtonProps, Card, CardBody, type CardBodyProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, Carousel, CarouselDots, type CarouselDotsProps, CarouselNext, type CarouselNextProps, type CarouselOwnProps, CarouselPlayPause, type CarouselPlayPauseProps, CarouselPrev, type CarouselPrevProps, type CarouselProps, CarouselSlide, type CarouselSlideProps, CarouselSlides, type CarouselSlidesProps, type CarouselVariant, Checkbox, type CheckboxProps, Chip, type ChipPart, type ChipProps, type ChipVariant, Collapse, type CollapseOwnProps, type CollapseProps, type CollapseVariant, type ColorMode, type ColorModeSetting, type ColorPalette, type ColorScheme, type ColorShade, type ComponentProps, DatePicker, type DatePickerConfig, type DatePickerProps, type DateRange, type DeepPartial, Dropdown, DropdownItem, type DropdownItemProps, DropdownLabel, type DropdownLabelProps, DropdownMenu, type DropdownMenuProps, type DropdownProps, DropdownSeparator, type DropdownSeparatorProps, DropdownTrigger, type DropdownTriggerProps, Field, type FieldControlProps, type FieldOrientation, type FieldProps, type FileRejection, type FileRejectionReason, FileUpload, type FileUploadOwnProps, type FileUploadPart, type FileUploadProps, type FileUploadVariant, type FontSizes, type FontWeights, Icon, type IconProps, Input, type InputProps, type LazyLoadedComponent, type LineHeights, List, ListDivider, type ListDividerProps, ListItem, ListItemButton, type ListItemButtonProps, ListItemIcon, type ListItemIconProps, type ListItemProps, ListItemText, type ListItemTextProps, type ListProps, ListSubheader, type ListSubheaderProps, type MaskChangeHandler, Modal, ModalBody, type ModalBodyProps, ModalClose, type ModalCloseProps, ModalContent, type ModalContentProps, ModalFooter, type ModalFooterProps, ModalHeader, type ModalHeaderProps, type ModalProps, ModalTrigger, type ModalTriggerProps, Navbar, NavbarBrand, type NavbarBrandProps, type NavbarBreakpoint, NavbarContent, type NavbarContentProps, NavbarItem, type NavbarItemProps, type NavbarOwnProps, type NavbarProps, NavbarToggle, type NavbarToggleProps, type NavbarVariant, NumberInput, type NumberInputPart, type NumberInputProps, type NumberInputVariant, Paginator, type PaginatorOwnProps, type PaginatorPart, type PaginatorProps, type PaginatorVariant, PinInput, type PinInputProps, type PinInputType, type PinInputVariant, Popover, PopoverClose, type PopoverCloseProps, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, ProgressBar, type ProgressBarProps, type ProgressBarVariant, type Radii, Radio, RadioGroup, type RadioGroupProps, type RadioProps, Rating, type RatingPart, type RatingProps, type RatingVariant, Select, SelectContent, type SelectContentPart, type SelectContentProps, SelectGroup, type SelectGroupProps, SelectOption, type SelectOptionPart, type SelectOptionProps, type SelectProps, SelectTrigger, type SelectTriggerPart, type SelectTriggerProps, SelectValue, type SelectValueProps, type SelectVariant, type SelectedOption, type SemanticColors, type Shade, type ShadeLevel, type Shadows, type Shape, Sidebar, type SidebarBreakpoint, SidebarContent, type SidebarContentProps, SidebarItem, type SidebarItemPart, type SidebarItemProps, type SidebarOwnProps, type SidebarProps, SidebarProvider, type SidebarProviderProps, type SidebarSide, SidebarToggle, type SidebarToggleProps, type SidebarVariant, type Size, type Sizes, Skeleton, type SkeletonProps, type SkeletonShape, type SkeletonVariant, Slider, type SliderMark, type SliderOrientation, type SliderOwnProps, type SliderPart, type SliderProps, type SliderValue, type SliderVariant, type Spaces, Spinner, type SpinnerProps, Step, StepDescription, type StepDescriptionProps, StepIndicator, type StepIndicatorProps, type StepProps, StepSeparator, type StepSeparatorProps, type StepStatus, StepTitle, type StepTitleProps, Stepper, type StepperOrientation, type StepperOwnProps, type StepperProps, type StepperVariant, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, TabPanels, type TabPanelsProps, type TabProps, Table, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, type TableOwnProps, type TableProps, TableRow, type TableRowProps, type TableSortDirection, type TableVariant, Tabs, type TabsProps, Textarea, type TextareaProps, type Theme, type ThemeContextValue, ThemeProvider, type ThemeProviderProps, type ToastAction, type ToastApi, type ToastContent, type ToastIcons, type ToastOptions, type ToastPart, type ToastPosition, ToastProvider, type ToastProviderProps, type ToastStatus, type ToastVariant, Toggle, type ToggleProps, Tooltip, type TooltipProps, Tree, TreeItem, TreeItemGroup, type TreeItemGroupProps, TreeItemLabel, type TreeItemLabelOwnProps, type TreeItemLabelProps, type TreeItemOwnProps, type TreeItemProps, type TreeOwnProps, type TreeProps, type TreeSelection, type TreeVariant, type Typography, type UseClickOutsideProps, type UseDebounceProps, type UseMaskProps, type UseMaskResult, type ZIndeces, applyMask, colorVar, deepMerge, defaultDarkTheme, defaultTheme, formatDate, getContrastColor, getContrastRatio, getDarkenColor, getDateFormatByLanguage, getDateFromDateString, getDateStringByLanguage, getDaysOfWeekByLanguage, getLightenColor, getMonthsByLanguage, lazyLoadContent, themeToCssVars, useClickOutside, useDebounce, useMask, useTheme, useToast, validateFormatDate };
|
|
1558
|
+
export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionOwnProps, type AccordionProps, AccordionTrigger, type AccordionTriggerPart, type AccordionTriggerProps, type AccordionVariant, Badge, type BadgeProps, Breadcrumb, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, type BreadcrumbOwnProps, type BreadcrumbProps, BreadcrumbSeparator, type BreadcrumbSeparatorProps, type BreadcrumbVariant, type Breakpoints, Button, type ButtonProps, Card, CardBody, type CardBodyProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, Carousel, CarouselDots, type CarouselDotsProps, CarouselNext, type CarouselNextProps, type CarouselOwnProps, CarouselPlayPause, type CarouselPlayPauseProps, CarouselPrev, type CarouselPrevProps, type CarouselProps, CarouselSlide, type CarouselSlideProps, CarouselSlides, type CarouselSlidesProps, type CarouselVariant, Checkbox, type CheckboxProps, Chip, type ChipPart, type ChipProps, type ChipVariant, Collapse, type CollapseOwnProps, type CollapseProps, type CollapseVariant, type ColorMode, type ColorModeSetting, type ColorPalette, type ColorScheme, type ColorShade, type ComponentProps, DatePicker, type DatePickerConfig, type DatePickerProps, type DateRange, type DeepPartial, Dropdown, DropdownItem, type DropdownItemProps, DropdownLabel, type DropdownLabelProps, DropdownMenu, type DropdownMenuProps, type DropdownProps, DropdownSeparator, type DropdownSeparatorProps, DropdownTrigger, type DropdownTriggerProps, EmptyState, type EmptyStatePart, type EmptyStateProps, type EmptyStateTitleTag, type EmptyStateVariant, Field, type FieldControlProps, type FieldOrientation, type FieldProps, type FileRejection, type FileRejectionReason, FileUpload, type FileUploadOwnProps, type FileUploadPart, type FileUploadProps, type FileUploadVariant, type FontSizes, type FontWeights, Icon, type IconProps, Input, type InputProps, type LazyLoadedComponent, type LineHeights, List, ListDivider, type ListDividerProps, ListItem, ListItemButton, type ListItemButtonProps, ListItemIcon, type ListItemIconProps, type ListItemProps, ListItemText, type ListItemTextProps, type ListProps, ListSubheader, type ListSubheaderProps, type MaskChangeHandler, Modal, ModalBody, type ModalBodyProps, ModalClose, type ModalCloseProps, ModalContent, type ModalContentProps, ModalFooter, type ModalFooterProps, ModalHeader, type ModalHeaderProps, type ModalProps, ModalTrigger, type ModalTriggerProps, Navbar, NavbarBrand, type NavbarBrandProps, type NavbarBreakpoint, NavbarContent, type NavbarContentProps, NavbarItem, type NavbarItemProps, type NavbarOwnProps, type NavbarProps, NavbarToggle, type NavbarToggleProps, type NavbarVariant, NumberInput, type NumberInputPart, type NumberInputProps, type NumberInputVariant, Paginator, type PaginatorOwnProps, type PaginatorPart, type PaginatorProps, type PaginatorVariant, PinInput, type PinInputProps, type PinInputType, type PinInputVariant, Popover, PopoverClose, type PopoverCloseProps, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, ProgressBar, type ProgressBarProps, type ProgressBarVariant, type Radii, Radio, RadioGroup, type RadioGroupProps, type RadioProps, Rating, type RatingPart, type RatingProps, type RatingVariant, Select, SelectContent, type SelectContentPart, type SelectContentProps, SelectGroup, type SelectGroupProps, SelectOption, type SelectOptionPart, type SelectOptionProps, type SelectProps, SelectTrigger, type SelectTriggerPart, type SelectTriggerProps, SelectValue, type SelectValueProps, type SelectVariant, type SelectedOption, type SemanticColors, type Shade, type ShadeLevel, type Shadows, type Shape, Sidebar, type SidebarBreakpoint, SidebarContent, type SidebarContentProps, SidebarItem, type SidebarItemPart, type SidebarItemProps, type SidebarOwnProps, type SidebarProps, SidebarProvider, type SidebarProviderProps, type SidebarSide, SidebarToggle, type SidebarToggleProps, type SidebarVariant, type Size, type Sizes, Skeleton, type SkeletonProps, type SkeletonShape, type SkeletonVariant, Slider, type SliderMark, type SliderOrientation, type SliderOwnProps, type SliderPart, type SliderProps, type SliderValue, type SliderVariant, type Spaces, Spinner, type SpinnerProps, Step, StepDescription, type StepDescriptionProps, StepIndicator, type StepIndicatorProps, type StepProps, StepSeparator, type StepSeparatorProps, type StepStatus, StepTitle, type StepTitleProps, Stepper, type StepperOrientation, type StepperOwnProps, type StepperProps, type StepperVariant, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, TabPanels, type TabPanelsProps, type TabProps, Table, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, TableEmpty, type TableEmptyProps, type TableFilterFn, type TableFilters, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, type TableOwnProps, type TableParams, type TableProps, TableRow, type TableRowProps, type TableSort, type TableSortDirection, type TableValueGetter, type TableVariant, Tabs, type TabsProps, Textarea, type TextareaProps, type Theme, type ThemeContextValue, ThemeProvider, type ThemeProviderProps, type ToastAction, type ToastApi, type ToastContent, type ToastIcons, type ToastOptions, type ToastPart, type ToastPosition, ToastProvider, type ToastProviderProps, type ToastStatus, type ToastVariant, Toggle, type ToggleProps, Tooltip, type TooltipProps, Tree, TreeItem, TreeItemGroup, type TreeItemGroupProps, TreeItemLabel, type TreeItemLabelOwnProps, type TreeItemLabelProps, type TreeItemOwnProps, type TreeItemProps, type TreeOwnProps, type TreeProps, type TreeSelection, type TreeVariant, type Typography, type UseClickOutsideProps, type UseDebounceProps, type UseMaskProps, type UseMaskResult, type UseTableStateOptions, type UseTableStateResult, type ZIndeces, applyMask, colorVar, deepMerge, defaultDarkTheme, defaultTheme, formatDate, getContrastColor, getContrastRatio, getDarkenColor, getDateFormatByLanguage, getDateFromDateString, getDateStringByLanguage, getDaysOfWeekByLanguage, getLightenColor, getMonthsByLanguage, lazyLoadContent, themeToCssVars, useClickOutside, useDebounce, useMask, useTableState, useTheme, useToast, validateFormatDate };
|