@customafk/lunas-ui 0.0.57 → 0.0.58

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.
Files changed (163) hide show
  1. package/README.md +246 -92
  2. package/dist/{button-QTiWGKzL.d.cts → button-D_tzwFGJ.d.cts} +5 -5
  3. package/dist/{button-ChLnQHG9.d.ts → button-NsFoJEG0.d.ts} +3 -3
  4. package/dist/{command-CQ0BKof5.d.ts → command-7NgITO2I.d.ts} +12 -12
  5. package/dist/{command-BkU08119.d.cts → command-HP5LITqM.d.cts} +12 -12
  6. package/dist/data-display/empty.d.cts +2 -2
  7. package/dist/data-display/empty.d.ts +2 -2
  8. package/dist/data-display/statistic.d.cts +2 -2
  9. package/dist/data-display/statistic.d.ts +2 -2
  10. package/dist/{dialog-DBHKJa6T.d.cts → dialog-BciL0byt.d.ts} +12 -12
  11. package/dist/{dialog-Dt7Z19tQ.d.ts → dialog-DdcYSxA2.d.cts} +12 -12
  12. package/dist/dialogs/detail-dialog/component/sidebar.d.cts +30 -30
  13. package/dist/dialogs/detail-dialog/component/sidebar.d.ts +28 -28
  14. package/dist/dialogs/form-dialog.cjs +1 -1
  15. package/dist/dialogs/form-dialog.cjs.map +1 -1
  16. package/dist/dialogs/form-dialog.d.cts +2 -2
  17. package/dist/dialogs/form-dialog.d.ts +2 -2
  18. package/dist/dialogs/form-dialog.js +1 -1
  19. package/dist/dialogs/form-dialog.js.map +1 -1
  20. package/dist/forms/combobox-field.d.cts +2 -2
  21. package/dist/forms/combobox-field.d.ts +2 -2
  22. package/dist/forms/date-field.d.cts +2 -2
  23. package/dist/forms/date-field.d.ts +2 -2
  24. package/dist/forms/form-wrapper.d.cts +2 -2
  25. package/dist/forms/form-wrapper.d.ts +2 -2
  26. package/dist/forms/multi-select-field.d.cts +2 -2
  27. package/dist/forms/multi-select-field.d.ts +2 -2
  28. package/dist/forms/number-field.d.cts +2 -2
  29. package/dist/forms/number-field.d.ts +2 -2
  30. package/dist/forms/password-field.d.cts +2 -2
  31. package/dist/forms/password-field.d.ts +2 -2
  32. package/dist/forms/select-field.cjs +1 -1
  33. package/dist/forms/select-field.d.cts +2 -2
  34. package/dist/forms/select-field.d.ts +2 -2
  35. package/dist/forms/select-field.js +1 -1
  36. package/dist/forms/switch-field.d.cts +2 -2
  37. package/dist/forms/switch-field.d.ts +2 -2
  38. package/dist/forms/text-field.d.cts +2 -2
  39. package/dist/forms/text-field.d.ts +2 -2
  40. package/dist/forms/textarea-field.d.cts +2 -2
  41. package/dist/forms/textarea-field.d.ts +2 -2
  42. package/dist/{input-B8FXpdwz.d.ts → input-B_wIBIc_.d.ts} +3 -3
  43. package/dist/{input-BQYGZywO.d.cts → input-OGFokZXp.d.cts} +3 -3
  44. package/dist/layouts/app-layout/index.d.cts +3 -3
  45. package/dist/layouts/app-layout/index.d.ts +3 -3
  46. package/dist/layouts/flex.d.cts +2 -2
  47. package/dist/layouts/flex.d.ts +2 -2
  48. package/dist/layouts/main/index.d.ts +4 -4
  49. package/dist/select-C7na5CE5.cjs +2 -0
  50. package/dist/select-C7na5CE5.cjs.map +1 -0
  51. package/dist/select-VpccO3h2.js +2 -0
  52. package/dist/select-VpccO3h2.js.map +1 -0
  53. package/dist/{separator-CJHYnmH1.d.ts → separator-BChPwmFZ.d.ts} +3 -3
  54. package/dist/{separator-DJ-8s4B1.d.cts → separator-yyGmy_ba.d.cts} +3 -3
  55. package/dist/table/index.cjs +1 -1
  56. package/dist/table/index.d.cts +2 -2
  57. package/dist/table/index.d.ts +2 -2
  58. package/dist/table/index.js +1 -1
  59. package/dist/{toggle-D5tumZ8L.d.cts → toggle-B_di9jVO.d.cts} +3 -3
  60. package/dist/{toggle-Dd0rFKhT.d.ts → toggle-DPvX-y_y.d.ts} +3 -3
  61. package/dist/{tooltip-BnRE0jV2.d.ts → tooltip--7nev3Bt.d.ts} +6 -6
  62. package/dist/{tooltip-Dkh_dieJ.d.cts → tooltip-DkK1GTLt.d.cts} +6 -6
  63. package/dist/typography/paragraph.d.cts +2 -2
  64. package/dist/typography/paragraph.d.ts +2 -2
  65. package/dist/typography/title.d.cts +2 -2
  66. package/dist/typography/title.d.ts +2 -2
  67. package/dist/ui/alert-dialog.d.cts +12 -12
  68. package/dist/ui/alert-dialog.d.ts +12 -12
  69. package/dist/ui/alert.d.cts +4 -4
  70. package/dist/ui/alert.d.ts +6 -6
  71. package/dist/ui/aspect-ratio.d.cts +2 -2
  72. package/dist/ui/aspect-ratio.d.ts +2 -2
  73. package/dist/ui/avatar.d.cts +4 -4
  74. package/dist/ui/avatar.d.ts +4 -4
  75. package/dist/ui/badge.d.cts +4 -4
  76. package/dist/ui/badge.d.ts +4 -4
  77. package/dist/ui/breadcrumb.d.cts +8 -8
  78. package/dist/ui/breadcrumb.d.ts +8 -8
  79. package/dist/ui/button.d.cts +1 -1
  80. package/dist/ui/button.d.ts +1 -1
  81. package/dist/ui/calendar.d.cts +4 -4
  82. package/dist/ui/calendar.d.ts +4 -4
  83. package/dist/ui/card.d.cts +8 -8
  84. package/dist/ui/card.d.ts +8 -8
  85. package/dist/ui/carousel.d.cts +7 -7
  86. package/dist/ui/carousel.d.ts +7 -7
  87. package/dist/ui/collapsible.d.cts +4 -4
  88. package/dist/ui/collapsible.d.ts +4 -4
  89. package/dist/ui/command.d.cts +2 -2
  90. package/dist/ui/command.d.ts +2 -2
  91. package/dist/ui/context-menu.d.cts +16 -16
  92. package/dist/ui/context-menu.d.ts +16 -16
  93. package/dist/ui/dialog.d.cts +1 -1
  94. package/dist/ui/dialog.d.ts +1 -1
  95. package/dist/ui/dropdown-menu.d.cts +16 -16
  96. package/dist/ui/dropdown-menu.d.ts +16 -16
  97. package/dist/ui/file-uploader.d.cts +2 -2
  98. package/dist/ui/file-uploader.d.ts +2 -2
  99. package/dist/ui/form.d.cts +7 -7
  100. package/dist/ui/form.d.ts +7 -7
  101. package/dist/ui/hover-card.d.cts +4 -4
  102. package/dist/ui/hover-card.d.ts +4 -4
  103. package/dist/ui/input-otp.d.cts +5 -5
  104. package/dist/ui/input-otp.d.ts +5 -5
  105. package/dist/ui/input.d.cts +1 -1
  106. package/dist/ui/input.d.ts +1 -1
  107. package/dist/ui/inputs/search-input.d.cts +3 -3
  108. package/dist/ui/inputs/search-input.d.ts +3 -3
  109. package/dist/ui/label.d.cts +2 -2
  110. package/dist/ui/label.d.ts +2 -2
  111. package/dist/ui/menubar.d.cts +17 -17
  112. package/dist/ui/menubar.d.ts +17 -17
  113. package/dist/ui/multi-select.d.cts +2 -2
  114. package/dist/ui/multi-select.d.ts +2 -2
  115. package/dist/ui/navigation-menu.d.cts +9 -9
  116. package/dist/ui/navigation-menu.d.ts +9 -9
  117. package/dist/ui/pagination.d.cts +9 -9
  118. package/dist/ui/pagination.d.ts +9 -9
  119. package/dist/ui/popover.d.cts +5 -5
  120. package/dist/ui/popover.d.ts +5 -5
  121. package/dist/ui/progress.d.cts +2 -2
  122. package/dist/ui/progress.d.ts +2 -2
  123. package/dist/ui/radio-group.d.cts +3 -3
  124. package/dist/ui/radio-group.d.ts +3 -3
  125. package/dist/ui/resizable.d.cts +4 -4
  126. package/dist/ui/resizable.d.ts +4 -4
  127. package/dist/ui/scroll-area.d.cts +3 -3
  128. package/dist/ui/scroll-area.d.ts +3 -3
  129. package/dist/ui/select.cjs +1 -1
  130. package/dist/ui/select.d.cts +11 -11
  131. package/dist/ui/select.d.ts +11 -11
  132. package/dist/ui/select.js +1 -1
  133. package/dist/ui/separator.d.cts +1 -1
  134. package/dist/ui/separator.d.ts +1 -1
  135. package/dist/ui/sheet.d.cts +9 -9
  136. package/dist/ui/sheet.d.ts +9 -9
  137. package/dist/ui/sidebar.d.cts +30 -30
  138. package/dist/ui/sidebar.d.ts +28 -28
  139. package/dist/ui/skeleton.d.cts +2 -2
  140. package/dist/ui/skeleton.d.ts +2 -2
  141. package/dist/ui/slider.d.cts +2 -2
  142. package/dist/ui/slider.d.ts +2 -2
  143. package/dist/ui/sonner.d.cts +2 -2
  144. package/dist/ui/sonner.d.ts +2 -2
  145. package/dist/ui/switch.d.cts +2 -2
  146. package/dist/ui/switch.d.ts +2 -2
  147. package/dist/ui/table.d.cts +9 -9
  148. package/dist/ui/table.d.ts +9 -9
  149. package/dist/ui/tabs.d.cts +5 -5
  150. package/dist/ui/tabs.d.ts +5 -5
  151. package/dist/ui/textarea.d.cts +2 -2
  152. package/dist/ui/textarea.d.ts +2 -2
  153. package/dist/ui/toggle-group.d.cts +4 -4
  154. package/dist/ui/toggle-group.d.ts +4 -4
  155. package/dist/ui/toggle.d.cts +1 -1
  156. package/dist/ui/toggle.d.ts +1 -1
  157. package/dist/ui/tooltip.d.cts +1 -1
  158. package/dist/ui/tooltip.d.ts +1 -1
  159. package/package.json +1 -1
  160. package/dist/select-BjTQmEN7.js +0 -2
  161. package/dist/select-BjTQmEN7.js.map +0 -1
  162. package/dist/select-BlPiYiG_.cjs +0 -2
  163. package/dist/select-BlPiYiG_.cjs.map +0 -1
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime188 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime99 from "react/jsx-runtime";
2
2
  import { Separator } from "radix-ui";
3
3
 
4
4
  //#region packages/components/ui/separator.d.ts
@@ -7,7 +7,7 @@ declare function Separator$1({
7
7
  orientation,
8
8
  decorative,
9
9
  ...props
10
- }: React.ComponentProps<typeof Separator.Root>): react_jsx_runtime188.JSX.Element;
10
+ }: React.ComponentProps<typeof Separator.Root>): react_jsx_runtime99.JSX.Element;
11
11
  //#endregion
12
12
  export { Separator$1 as Separator };
13
- //# sourceMappingURL=separator-DJ-8s4B1.d.cts.map
13
+ //# sourceMappingURL=separator-yyGmy_ba.d.cts.map
@@ -1,2 +1,2 @@
1
- const e=require(`../chunk-CUT6urMc.cjs`),t=require(`../flex-DHnsdjKn.cjs`);require(`../paragraph-BsEYXIR3.cjs`);const n=require(`../button-ChpGfVjG.cjs`);require(`../input-B8bT3wuo.cjs`);const r=require(`../select-BlPiYiG_.cjs`),i=require(`../dropdown-menu-CIldv8D7.cjs`);require(`../scroll-area-D7O1NyZn.cjs`);const a=require(`../table-Dgk7z91H.cjs`),o=require(`../search-input-BmAoqcee.cjs`),s=require(`../add-new-B9vW0r69.cjs`),c=require(`../refresh-By25Z7zj.cjs`),l=e.__toESM(require(`react`)),u=e.__toESM(require(`@customafk/react-toolkit/utils`)),d=e.__toESM(require(`react/jsx-runtime`)),f=e.__toESM(require(`lucide-react`)),p=e.__toESM(require(`@tanstack/react-table`)),m=e=>{let t=e.getIsPinned();return{left:t===`left`?`${e.getStart(`left`)}px`:void 0,right:t===`right`?`${e.getAfter(`right`)}px`:void 0,position:t?`sticky`:`relative`,width:e.getSize(),zIndex:t?1:0}},h=({column:e})=>{let t=e.getIsSorted(),n={asc:(0,d.jsx)(f.ChevronUp,{className:`shrink-0 opacity-60`,size:16,strokeWidth:2,"aria-hidden":`true`}),desc:(0,d.jsx)(f.ChevronDown,{className:`shrink-0 opacity-60`,size:16,strokeWidth:2,"aria-hidden":`true`})};return t?n[t]:null},g=({column:e})=>{let t=e.columnDef.header;return e.getCanPin()?e.getIsPinned()?(0,d.jsx)(n.Button,{size:`icon`,variant:`ghost`,color:`secondary`,className:`hover:[&_svg]:text-secondary-foreground -mr-1 size-7 shadow-none`,"aria-label":`Unpin ${t} column`,title:`Unpin ${t} column`,onClick:()=>e.pin(!1),children:(0,d.jsx)(f.PinOffIcon,{className:`opacity-60`,size:16,"aria-hidden":`true`})}):(0,d.jsxs)(i.DropdownMenu,{children:[(0,d.jsx)(i.DropdownMenuTrigger,{asChild:!0,children:(0,d.jsx)(n.Button,{size:`icon`,variant:`ghost`,color:`secondary`,className:`size-7 shadow-none`,"aria-label":`Pin options for ${t} column`,title:`Pin options for ${t} column`,children:(0,d.jsx)(f.EllipsisIcon,{className:`opacity-60`,size:16,"aria-hidden":`true`})})}),(0,d.jsxs)(i.DropdownMenuContent,{align:`end`,children:[(0,d.jsxs)(i.DropdownMenuItem,{onClick:()=>e.pin(`left`),children:[(0,d.jsx)(f.ArrowLeftToLineIcon,{size:16,className:`opacity-60`,"aria-hidden":`true`}),`Stick to left`]}),(0,d.jsxs)(i.DropdownMenuItem,{onClick:()=>e.pin(`right`),children:[(0,d.jsx)(f.ArrowRightToLineIcon,{size:16,className:`opacity-60`,"aria-hidden":`true`}),`Stick to right`]})]})]}):null},_=({header:e})=>{let{column:t}=e,n=e=>{t.getCanSort()&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),t.getToggleSortingHandler()?.(e))};return(0,d.jsxs)(`div`,{className:`flex items-center justify-between gap-2 truncate`,children:[!e.isPlaceholder&&(0,d.jsxs)(`div`,{className:(0,u.cn)(t.getCanSort()&&`flex h-full cursor-pointer items-center justify-between gap-2 select-none`),onClick:t.getToggleSortingHandler(),onKeyDown:n,tabIndex:t.getCanSort()?0:void 0,children:[(0,d.jsx)(`span`,{className:`truncate`,children:(0,p.flexRender)(t.columnDef.header,e.getContext())}),(0,d.jsx)(h,{column:t})]}),!e.isPlaceholder&&(0,d.jsx)(g,{column:t})]})},v=({table:e,isLoading:t,onClickRow:n})=>{"use no memo";return(0,d.jsxs)(a.Table,{className:(0,u.cn)(`!w-full`,`table-fixed border-separate border-spacing-0`,`[&_td]:border-border-weak`,`[&_th]:border-border-weak`,`[&_th]:border-b`,`[&_th]:border-b-border-weak`,`[&_tr]:border-none`,`[&_tr:not(:last-child)_td]:border-b`,`[&_tr:not(:last-child)_td]:border-b-border-weak`,`[&_tfoot_td]:border-t`),style:{width:e.getTotalSize()},children:[(0,d.jsx)(a.TableHeader,{className:`sticky top-0 z-10 backdrop-blur-xs`,children:e.getHeaderGroups().map(e=>(0,d.jsx)(a.TableRow,{children:e.headers.map(e=>{let{column:t}=e,n=t.getIsPinned(),r=n===`left`&&t.getIsLastColumn(`left`),i=n===`right`&&t.getIsFirstColumn(`right`);return(0,d.jsx)(a.TableHead,{"data-pinned":n||void 0,"data-last-col":r?`left`:i?`right`:void 0,className:(0,u.cn)(`relative h-9 font-semibold select-none`,`data-pinned:backdrop-blur-xs`,`data-pinned:bg-muted-weak`,`[&>.cursor-col-resize]:last:opacity-0`,`[&[data-pinned][data-last-col]]:border-border-weak`,`[&:not([data-pinned]):has(+[data-pinned])_div.cursor-col-resize:last-child]:opacity-0`,`[&[data-last-col=left]_div.cursor-col-resize:last-child]:opacity-0`,`[&[data-pinned=left][data-last-col=left]]:border-r`,`[&[data-pinned=right]:last-child_div.cursor-col-resize:last-child]:opacity-0`,`[&[data-pinned=right][data-last-col=right]]:border-l`),colSpan:e.colSpan,style:{width:e.getSize(),maxWidth:e.getSize(),...m(e.column)},children:(0,d.jsx)(_,{header:e})},e.id)})},e.id))}),(0,d.jsx)(a.TableBody,{className:(0,u.cn)(t&&`h-36`,e.getRowModel().rows?.length===0&&`h-48`),children:t?(0,d.jsx)(a.TableRow,{className:`absolute top-9 flex h-36 w-full items-center justify-center`,children:(0,d.jsx)(a.TableCell,{children:`loading...`})}):(0,d.jsx)(l.default.Fragment,{children:e.getRowModel().rows?.length?e.getRowModel().rows.map(e=>(0,d.jsx)(a.TableRow,{"data-state":e.getIsSelected()&&`selected`,className:`cursor-pointer border-none focus:outline-none`,onClick:()=>n?.(e?.id||e.original?.id?.toString()||e.original?.uuid||void 0),children:e.getVisibleCells().map(e=>{let{column:t}=e,n=t.getIsPinned(),r=n===`left`&&t.getIsLastColumn(`left`),i=n===`right`&&t.getIsFirstColumn(`right`);return(0,d.jsx)(a.TableCell,{style:{...m(t),width:e.column.getSize(),maxWidth:e.column.getSize()},"data-pinned":n||void 0,"data-last-col":r?`left`:i?`right`:void 0,className:(0,u.cn)(`overflow-hidden py-2.5`,`[&[data-pinned][data-last-col]]:border-border-weak`,`[&[data-pinned=left][data-last-col=left]]:border-r`,`[&[data-pinned=right][data-last-col=right]]:border-l`,`data-pinned:bg-background/90`),children:(0,p.flexRender)(e.column.columnDef.cell,e.getContext())},e.id)})},e.id)):(0,d.jsx)(a.TableRow,{className:`absolute top-9 flex h-36 w-full items-center justify-center`,children:(0,d.jsx)(a.TableCell,{children:(0,d.jsxs)(`div`,{className:`text-muted-foreground flex size-full flex-col items-center justify-center gap-y-8 text-base`,children:[(0,d.jsx)(f.PackagePlusIcon,{size:48,strokeWidth:2}),(0,d.jsx)(`p`,{children:`Thêm dữ liệu để hiển thị`})]})})})})})]})};function y({filteredSelectedRowsLength:e,filteredRowsLength:t,pageSize:i,setPageSize:a,pageIndex:o=0,setPageIndex:s,previousPage:c,nextPage:l,canPreviousPage:u,canNextPage:p,pageCount:m=1}){"use no memo";return(0,d.jsxs)(`div`,{className:`mt-4 flex w-full flex-0 flex-col flex-wrap items-start space-y-2 px-2 sm:flex-row`,children:[(0,d.jsxs)(`div`,{className:`text-text-positive flex-1 text-sm`,children:[e,` of `,t,` row(s) selected.`]}),(0,d.jsxs)(`div`,{className:`flex w-full flex-col flex-wrap items-start space-y-2 sm:w-fit sm:space-y-4`,children:[(0,d.jsxs)(`div`,{className:`flex items-center space-x-2 sm:space-x-4`,children:[(0,d.jsx)(`p`,{className:`sr-only text-sm font-medium sm:not-sr-only sm:mr-4`,children:`Rows per page`}),(0,d.jsxs)(r.Select,{value:`${i}`,onValueChange:e=>{a?.(Number(e))},children:[(0,d.jsx)(r.SelectTrigger,{className:`h-8 w-18`,children:(0,d.jsx)(r.SelectValue,{placeholder:i})}),(0,d.jsx)(r.SelectContent,{side:`top`,children:[10,20,30,40,50].map(e=>(0,d.jsx)(r.SelectItem,{value:`${e}`,children:e},e))})]}),(0,d.jsxs)(`div`,{className:`flex items-center justify-center text-sm font-medium`,children:[`Page `,o+1,` of `,m]})]}),(0,d.jsxs)(`div`,{className:`flex w-full justify-end space-x-2 *:size-9 *:p-0`,children:[(0,d.jsxs)(n.Button,{variant:`outline`,color:`muted`,onClick:()=>s?.(0),disabled:!u,children:[(0,d.jsx)(`span`,{className:`sr-only`,children:`Go to first page`}),(0,d.jsx)(f.ChevronsLeft,{})]}),(0,d.jsxs)(n.Button,{variant:`outline`,color:`muted`,onClick:c,disabled:!u,children:[(0,d.jsx)(`span`,{className:`sr-only`,children:`Go to previous page`}),(0,d.jsx)(f.ChevronLeft,{})]}),(0,d.jsxs)(n.Button,{variant:`outline`,color:`muted`,onClick:l,disabled:!p,children:[(0,d.jsx)(`span`,{className:`sr-only`,children:`Go to next page`}),(0,d.jsx)(f.ChevronRight,{})]}),(0,d.jsxs)(n.Button,{variant:`outline`,color:`muted`,onClick:()=>{s?.(m-1)},disabled:!p,children:[(0,d.jsx)(`span`,{className:`sr-only`,children:`Go to last page`}),(0,d.jsx)(f.ChevronsRight,{})]})]})]})]})}const b=({onAdd:e,onRefresh:n})=>(0,d.jsxs)(t.Flex,{justify:`between`,padding:`none`,width:`full`,className:`flex-0`,children:[(0,d.jsx)(`div`,{className:`max-sm:flex-1`,children:(0,d.jsx)(o.SearchInput,{placeholder:`Search...`})}),(0,d.jsxs)(t.Flex,{wrap:!1,className:`flex-0 px-0`,children:[!!e&&(0,d.jsx)(s.AddNewBtn,{onClick:e}),(0,d.jsx)(c.RefreshBtn,{onClick:n})]})]});function x({data:e,totalCount:n,isLoading:r,columns:i,pagination:a,onAdd:o,onRefresh:s,onClickRow:c,onPaginationChange:u}){"use no memo";let[f,m]=l.default.useState({}),[h,g]=l.default.useState([]),[_,x]=l.default.useState([]),[S,C]=l.default.useState({}),w=l.default.useMemo(()=>({columnPinning:{right:[`actions`,`update`,`delete`]},pagination:{pageIndex:0,pageSize:20}}),[]),T=(0,p.useReactTable)({initialState:w,data:e,columns:i,rowCount:n,columnResizeMode:`onChange`,manualPagination:!0,enableColumnResizing:!1,enableMultiRowSelection:!1,getCoreRowModel:(0,p.getCoreRowModel)(),getPaginationRowModel:(0,p.getPaginationRowModel)(),getSortedRowModel:(0,p.getSortedRowModel)(),getFilteredRowModel:(0,p.getFilteredRowModel)(),getFacetedRowModel:(0,p.getFacetedRowModel)(),getFacetedUniqueValues:(0,p.getFacetedUniqueValues)(),getRowId:e=>e.id||e.uuid,state:{rowSelection:f,sorting:h,columnVisibility:S,columnFilters:_,...a?{pagination:a}:{}},onRowSelectionChange:m,onSortingChange:g,onColumnVisibilityChange:C,onColumnFiltersChange:x,...u?{onPaginationChange:u}:{}});return(0,d.jsxs)(t.Flex,{vertical:!0,wrap:!1,gap:`sm`,align:`start`,className:`size-full overflow-y-auto pt-1`,children:[(0,d.jsx)(b,{onAdd:o,onRefresh:s}),(0,d.jsxs)(t.Flex,{padding:`none`,vertical:!0,wrap:!1,width:`full`,className:`flex-1 overflow-auto pb-4`,children:[(0,d.jsx)(v,{table:T,isLoading:r,onClickRow:c}),(0,d.jsx)(y,{pageSize:T.getState().pagination.pageSize,setPageSize:T.setPageSize,filteredSelectedRowsLength:T.getFilteredSelectedRowModel().rows.length,filteredRowsLength:T.getFilteredRowModel().rows.length,pageIndex:T.getState().pagination.pageIndex,setPageIndex:T.setPageIndex,previousPage:T.previousPage,nextPage:T.nextPage,canPreviousPage:T.getCanPreviousPage(),canNextPage:T.getCanNextPage(),pageCount:T.getPageCount()})]})]})}exports.Table=x;
1
+ const e=require(`../chunk-CUT6urMc.cjs`),t=require(`../flex-DHnsdjKn.cjs`);require(`../paragraph-BsEYXIR3.cjs`);const n=require(`../button-ChpGfVjG.cjs`);require(`../input-B8bT3wuo.cjs`);const r=require(`../select-C7na5CE5.cjs`),i=require(`../dropdown-menu-CIldv8D7.cjs`);require(`../scroll-area-D7O1NyZn.cjs`);const a=require(`../table-Dgk7z91H.cjs`),o=require(`../search-input-BmAoqcee.cjs`),s=require(`../add-new-B9vW0r69.cjs`),c=require(`../refresh-By25Z7zj.cjs`),l=e.__toESM(require(`react`)),u=e.__toESM(require(`@customafk/react-toolkit/utils`)),d=e.__toESM(require(`react/jsx-runtime`)),f=e.__toESM(require(`lucide-react`)),p=e.__toESM(require(`@tanstack/react-table`)),m=e=>{let t=e.getIsPinned();return{left:t===`left`?`${e.getStart(`left`)}px`:void 0,right:t===`right`?`${e.getAfter(`right`)}px`:void 0,position:t?`sticky`:`relative`,width:e.getSize(),zIndex:t?1:0}},h=({column:e})=>{let t=e.getIsSorted(),n={asc:(0,d.jsx)(f.ChevronUp,{className:`shrink-0 opacity-60`,size:16,strokeWidth:2,"aria-hidden":`true`}),desc:(0,d.jsx)(f.ChevronDown,{className:`shrink-0 opacity-60`,size:16,strokeWidth:2,"aria-hidden":`true`})};return t?n[t]:null},g=({column:e})=>{let t=e.columnDef.header;return e.getCanPin()?e.getIsPinned()?(0,d.jsx)(n.Button,{size:`icon`,variant:`ghost`,color:`secondary`,className:`hover:[&_svg]:text-secondary-foreground -mr-1 size-7 shadow-none`,"aria-label":`Unpin ${t} column`,title:`Unpin ${t} column`,onClick:()=>e.pin(!1),children:(0,d.jsx)(f.PinOffIcon,{className:`opacity-60`,size:16,"aria-hidden":`true`})}):(0,d.jsxs)(i.DropdownMenu,{children:[(0,d.jsx)(i.DropdownMenuTrigger,{asChild:!0,children:(0,d.jsx)(n.Button,{size:`icon`,variant:`ghost`,color:`secondary`,className:`size-7 shadow-none`,"aria-label":`Pin options for ${t} column`,title:`Pin options for ${t} column`,children:(0,d.jsx)(f.EllipsisIcon,{className:`opacity-60`,size:16,"aria-hidden":`true`})})}),(0,d.jsxs)(i.DropdownMenuContent,{align:`end`,children:[(0,d.jsxs)(i.DropdownMenuItem,{onClick:()=>e.pin(`left`),children:[(0,d.jsx)(f.ArrowLeftToLineIcon,{size:16,className:`opacity-60`,"aria-hidden":`true`}),`Stick to left`]}),(0,d.jsxs)(i.DropdownMenuItem,{onClick:()=>e.pin(`right`),children:[(0,d.jsx)(f.ArrowRightToLineIcon,{size:16,className:`opacity-60`,"aria-hidden":`true`}),`Stick to right`]})]})]}):null},_=({header:e})=>{let{column:t}=e,n=e=>{t.getCanSort()&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),t.getToggleSortingHandler()?.(e))};return(0,d.jsxs)(`div`,{className:`flex items-center justify-between gap-2 truncate`,children:[!e.isPlaceholder&&(0,d.jsxs)(`div`,{className:(0,u.cn)(t.getCanSort()&&`flex h-full cursor-pointer items-center justify-between gap-2 select-none`),onClick:t.getToggleSortingHandler(),onKeyDown:n,tabIndex:t.getCanSort()?0:void 0,children:[(0,d.jsx)(`span`,{className:`truncate`,children:(0,p.flexRender)(t.columnDef.header,e.getContext())}),(0,d.jsx)(h,{column:t})]}),!e.isPlaceholder&&(0,d.jsx)(g,{column:t})]})},v=({table:e,isLoading:t,onClickRow:n})=>{"use no memo";return(0,d.jsxs)(a.Table,{className:(0,u.cn)(`!w-full`,`table-fixed border-separate border-spacing-0`,`[&_td]:border-border-weak`,`[&_th]:border-border-weak`,`[&_th]:border-b`,`[&_th]:border-b-border-weak`,`[&_tr]:border-none`,`[&_tr:not(:last-child)_td]:border-b`,`[&_tr:not(:last-child)_td]:border-b-border-weak`,`[&_tfoot_td]:border-t`),style:{width:e.getTotalSize()},children:[(0,d.jsx)(a.TableHeader,{className:`sticky top-0 z-10 backdrop-blur-xs`,children:e.getHeaderGroups().map(e=>(0,d.jsx)(a.TableRow,{children:e.headers.map(e=>{let{column:t}=e,n=t.getIsPinned(),r=n===`left`&&t.getIsLastColumn(`left`),i=n===`right`&&t.getIsFirstColumn(`right`);return(0,d.jsx)(a.TableHead,{"data-pinned":n||void 0,"data-last-col":r?`left`:i?`right`:void 0,className:(0,u.cn)(`relative h-9 font-semibold select-none`,`data-pinned:backdrop-blur-xs`,`data-pinned:bg-muted-weak`,`[&>.cursor-col-resize]:last:opacity-0`,`[&[data-pinned][data-last-col]]:border-border-weak`,`[&:not([data-pinned]):has(+[data-pinned])_div.cursor-col-resize:last-child]:opacity-0`,`[&[data-last-col=left]_div.cursor-col-resize:last-child]:opacity-0`,`[&[data-pinned=left][data-last-col=left]]:border-r`,`[&[data-pinned=right]:last-child_div.cursor-col-resize:last-child]:opacity-0`,`[&[data-pinned=right][data-last-col=right]]:border-l`),colSpan:e.colSpan,style:{width:e.getSize(),maxWidth:e.getSize(),...m(e.column)},children:(0,d.jsx)(_,{header:e})},e.id)})},e.id))}),(0,d.jsx)(a.TableBody,{className:(0,u.cn)(t&&`h-36`,e.getRowModel().rows?.length===0&&`h-48`),children:t?(0,d.jsx)(a.TableRow,{className:`absolute top-9 flex h-36 w-full items-center justify-center`,children:(0,d.jsx)(a.TableCell,{children:`loading...`})}):(0,d.jsx)(l.default.Fragment,{children:e.getRowModel().rows?.length?e.getRowModel().rows.map(e=>(0,d.jsx)(a.TableRow,{"data-state":e.getIsSelected()&&`selected`,className:`cursor-pointer border-none focus:outline-none`,onClick:()=>n?.(e?.id||e.original?.id?.toString()||e.original?.uuid||void 0),children:e.getVisibleCells().map(e=>{let{column:t}=e,n=t.getIsPinned(),r=n===`left`&&t.getIsLastColumn(`left`),i=n===`right`&&t.getIsFirstColumn(`right`);return(0,d.jsx)(a.TableCell,{style:{...m(t),width:e.column.getSize(),maxWidth:e.column.getSize()},"data-pinned":n||void 0,"data-last-col":r?`left`:i?`right`:void 0,className:(0,u.cn)(`overflow-hidden py-2.5`,`[&[data-pinned][data-last-col]]:border-border-weak`,`[&[data-pinned=left][data-last-col=left]]:border-r`,`[&[data-pinned=right][data-last-col=right]]:border-l`,`data-pinned:bg-background/90`),children:(0,p.flexRender)(e.column.columnDef.cell,e.getContext())},e.id)})},e.id)):(0,d.jsx)(a.TableRow,{className:`absolute top-9 flex h-36 w-full items-center justify-center`,children:(0,d.jsx)(a.TableCell,{children:(0,d.jsxs)(`div`,{className:`text-muted-foreground flex size-full flex-col items-center justify-center gap-y-8 text-base`,children:[(0,d.jsx)(f.PackagePlusIcon,{size:48,strokeWidth:2}),(0,d.jsx)(`p`,{children:`Thêm dữ liệu để hiển thị`})]})})})})})]})};function y({filteredSelectedRowsLength:e,filteredRowsLength:t,pageSize:i,setPageSize:a,pageIndex:o=0,setPageIndex:s,previousPage:c,nextPage:l,canPreviousPage:u,canNextPage:p,pageCount:m=1}){"use no memo";return(0,d.jsxs)(`div`,{className:`mt-4 flex w-full flex-0 flex-col flex-wrap items-start space-y-2 px-2 sm:flex-row`,children:[(0,d.jsxs)(`div`,{className:`text-text-positive flex-1 text-sm`,children:[e,` of `,t,` row(s) selected.`]}),(0,d.jsxs)(`div`,{className:`flex w-full flex-col flex-wrap items-start space-y-2 sm:w-fit sm:space-y-4`,children:[(0,d.jsxs)(`div`,{className:`flex items-center space-x-2 sm:space-x-4`,children:[(0,d.jsx)(`p`,{className:`sr-only text-sm font-medium sm:not-sr-only sm:mr-4`,children:`Rows per page`}),(0,d.jsxs)(r.Select,{value:`${i}`,onValueChange:e=>{a?.(Number(e))},children:[(0,d.jsx)(r.SelectTrigger,{className:`h-8 w-18`,children:(0,d.jsx)(r.SelectValue,{placeholder:i})}),(0,d.jsx)(r.SelectContent,{side:`top`,children:[10,20,30,40,50].map(e=>(0,d.jsx)(r.SelectItem,{value:`${e}`,children:e},e))})]}),(0,d.jsxs)(`div`,{className:`flex items-center justify-center text-sm font-medium`,children:[`Page `,o+1,` of `,m]})]}),(0,d.jsxs)(`div`,{className:`flex w-full justify-end space-x-2 *:size-9 *:p-0`,children:[(0,d.jsxs)(n.Button,{variant:`outline`,color:`muted`,onClick:()=>s?.(0),disabled:!u,children:[(0,d.jsx)(`span`,{className:`sr-only`,children:`Go to first page`}),(0,d.jsx)(f.ChevronsLeft,{})]}),(0,d.jsxs)(n.Button,{variant:`outline`,color:`muted`,onClick:c,disabled:!u,children:[(0,d.jsx)(`span`,{className:`sr-only`,children:`Go to previous page`}),(0,d.jsx)(f.ChevronLeft,{})]}),(0,d.jsxs)(n.Button,{variant:`outline`,color:`muted`,onClick:l,disabled:!p,children:[(0,d.jsx)(`span`,{className:`sr-only`,children:`Go to next page`}),(0,d.jsx)(f.ChevronRight,{})]}),(0,d.jsxs)(n.Button,{variant:`outline`,color:`muted`,onClick:()=>{s?.(m-1)},disabled:!p,children:[(0,d.jsx)(`span`,{className:`sr-only`,children:`Go to last page`}),(0,d.jsx)(f.ChevronsRight,{})]})]})]})]})}const b=({onAdd:e,onRefresh:n})=>(0,d.jsxs)(t.Flex,{justify:`between`,padding:`none`,width:`full`,className:`flex-0`,children:[(0,d.jsx)(`div`,{className:`max-sm:flex-1`,children:(0,d.jsx)(o.SearchInput,{placeholder:`Search...`})}),(0,d.jsxs)(t.Flex,{wrap:!1,className:`flex-0 px-0`,children:[!!e&&(0,d.jsx)(s.AddNewBtn,{onClick:e}),(0,d.jsx)(c.RefreshBtn,{onClick:n})]})]});function x({data:e,totalCount:n,isLoading:r,columns:i,pagination:a,onAdd:o,onRefresh:s,onClickRow:c,onPaginationChange:u}){"use no memo";let[f,m]=l.default.useState({}),[h,g]=l.default.useState([]),[_,x]=l.default.useState([]),[S,C]=l.default.useState({}),w=l.default.useMemo(()=>({columnPinning:{right:[`actions`,`update`,`delete`]},pagination:{pageIndex:0,pageSize:20}}),[]),T=(0,p.useReactTable)({initialState:w,data:e,columns:i,rowCount:n,columnResizeMode:`onChange`,manualPagination:!0,enableColumnResizing:!1,enableMultiRowSelection:!1,getCoreRowModel:(0,p.getCoreRowModel)(),getPaginationRowModel:(0,p.getPaginationRowModel)(),getSortedRowModel:(0,p.getSortedRowModel)(),getFilteredRowModel:(0,p.getFilteredRowModel)(),getFacetedRowModel:(0,p.getFacetedRowModel)(),getFacetedUniqueValues:(0,p.getFacetedUniqueValues)(),getRowId:e=>e.id||e.uuid,state:{rowSelection:f,sorting:h,columnVisibility:S,columnFilters:_,...a?{pagination:a}:{}},onRowSelectionChange:m,onSortingChange:g,onColumnVisibilityChange:C,onColumnFiltersChange:x,...u?{onPaginationChange:u}:{}});return(0,d.jsxs)(t.Flex,{vertical:!0,wrap:!1,gap:`sm`,align:`start`,className:`size-full overflow-y-auto pt-1`,children:[(0,d.jsx)(b,{onAdd:o,onRefresh:s}),(0,d.jsxs)(t.Flex,{padding:`none`,vertical:!0,wrap:!1,width:`full`,className:`flex-1 overflow-auto pb-4`,children:[(0,d.jsx)(v,{table:T,isLoading:r,onClickRow:c}),(0,d.jsx)(y,{pageSize:T.getState().pagination.pageSize,setPageSize:T.setPageSize,filteredSelectedRowsLength:T.getFilteredSelectedRowModel().rows.length,filteredRowsLength:T.getFilteredRowModel().rows.length,pageIndex:T.getState().pagination.pageIndex,setPageIndex:T.setPageIndex,previousPage:T.previousPage,nextPage:T.nextPage,canPreviousPage:T.getCanPreviousPage(),canNextPage:T.getCanNextPage(),pageCount:T.getPageCount()})]})]})}exports.Table=x;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime176 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime74 from "react/jsx-runtime";
2
2
  import React from "react";
3
3
  import { ColumnDef, PaginationState } from "@tanstack/react-table";
4
4
 
@@ -24,7 +24,7 @@ declare function Table<T extends Record<string, unknown>>({
24
24
  onRefresh,
25
25
  onClickRow,
26
26
  onPaginationChange
27
- }: Props<T>): react_jsx_runtime176.JSX.Element;
27
+ }: Props<T>): react_jsx_runtime74.JSX.Element;
28
28
  //#endregion
29
29
  export { Table };
30
30
  //# sourceMappingURL=index.d.cts.map
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import * as react_jsx_runtime30 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime13 from "react/jsx-runtime";
3
3
  import { ColumnDef, PaginationState } from "@tanstack/react-table";
4
4
 
5
5
  //#region packages/components/table/index.d.ts
@@ -24,7 +24,7 @@ declare function Table<T extends Record<string, unknown>>({
24
24
  onRefresh,
25
25
  onClickRow,
26
26
  onPaginationChange
27
- }: Props<T>): react_jsx_runtime30.JSX.Element;
27
+ }: Props<T>): react_jsx_runtime13.JSX.Element;
28
28
  //#endregion
29
29
  export { Table };
30
30
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,2 @@
1
- import{Flex as e}from"../flex-uJ4bFSYt.js";import"../paragraph-D4klQX4h.js";import{Button as t}from"../button-DL_i4AVi.js";import"../input-OWyLq45f.js";import{Select as n,SelectContent as r,SelectItem as i,SelectTrigger as a,SelectValue as o}from"../select-BjTQmEN7.js";import{DropdownMenu as s,DropdownMenuContent as c,DropdownMenuItem as l,DropdownMenuTrigger as u}from"../dropdown-menu-BF9QbIfo.js";import"../scroll-area-CPQoJKt1.js";import{Table as d,TableBody as f,TableCell as p,TableHead as m,TableHeader as h,TableRow as g}from"../table-goPaI3yw.js";import{SearchInput as _}from"../search-input-Ba8aUECr.js";import{AddNewBtn as v}from"../add-new-B9KK77jE.js";import{RefreshBtn as y}from"../refresh-CMzmHeMf.js";import b from"react";import{cn as x}from"@customafk/react-toolkit/utils";import{jsx as S,jsxs as C}from"react/jsx-runtime";import{ArrowLeftToLineIcon as w,ArrowRightToLineIcon as T,ChevronDown as E,ChevronLeft as D,ChevronRight as O,ChevronUp as k,ChevronsLeft as A,ChevronsRight as j,EllipsisIcon as M,PackagePlusIcon as N,PinOffIcon as P}from"lucide-react";import{flexRender as F,getCoreRowModel as I,getFacetedRowModel as L,getFacetedUniqueValues as R,getFilteredRowModel as z,getPaginationRowModel as B,getSortedRowModel as V,useReactTable as H}from"@tanstack/react-table";const U=e=>{let t=e.getIsPinned();return{left:t===`left`?`${e.getStart(`left`)}px`:void 0,right:t===`right`?`${e.getAfter(`right`)}px`:void 0,position:t?`sticky`:`relative`,width:e.getSize(),zIndex:t?1:0}},W=({column:e})=>{let t=e.getIsSorted(),n={asc:S(k,{className:`shrink-0 opacity-60`,size:16,strokeWidth:2,"aria-hidden":`true`}),desc:S(E,{className:`shrink-0 opacity-60`,size:16,strokeWidth:2,"aria-hidden":`true`})};return t?n[t]:null},G=({column:e})=>{let n=e.columnDef.header;return e.getCanPin()?e.getIsPinned()?S(t,{size:`icon`,variant:`ghost`,color:`secondary`,className:`hover:[&_svg]:text-secondary-foreground -mr-1 size-7 shadow-none`,"aria-label":`Unpin ${n} column`,title:`Unpin ${n} column`,onClick:()=>e.pin(!1),children:S(P,{className:`opacity-60`,size:16,"aria-hidden":`true`})}):C(s,{children:[S(u,{asChild:!0,children:S(t,{size:`icon`,variant:`ghost`,color:`secondary`,className:`size-7 shadow-none`,"aria-label":`Pin options for ${n} column`,title:`Pin options for ${n} column`,children:S(M,{className:`opacity-60`,size:16,"aria-hidden":`true`})})}),C(c,{align:`end`,children:[C(l,{onClick:()=>e.pin(`left`),children:[S(w,{size:16,className:`opacity-60`,"aria-hidden":`true`}),`Stick to left`]}),C(l,{onClick:()=>e.pin(`right`),children:[S(T,{size:16,className:`opacity-60`,"aria-hidden":`true`}),`Stick to right`]})]})]}):null},K=({header:e})=>{let{column:t}=e,n=e=>{t.getCanSort()&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),t.getToggleSortingHandler()?.(e))};return C(`div`,{className:`flex items-center justify-between gap-2 truncate`,children:[!e.isPlaceholder&&C(`div`,{className:x(t.getCanSort()&&`flex h-full cursor-pointer items-center justify-between gap-2 select-none`),onClick:t.getToggleSortingHandler(),onKeyDown:n,tabIndex:t.getCanSort()?0:void 0,children:[S(`span`,{className:`truncate`,children:F(t.columnDef.header,e.getContext())}),S(W,{column:t})]}),!e.isPlaceholder&&S(G,{column:t})]})},q=({table:e,isLoading:t,onClickRow:n})=>{"use no memo";return C(d,{className:x(`!w-full`,`table-fixed border-separate border-spacing-0`,`[&_td]:border-border-weak`,`[&_th]:border-border-weak`,`[&_th]:border-b`,`[&_th]:border-b-border-weak`,`[&_tr]:border-none`,`[&_tr:not(:last-child)_td]:border-b`,`[&_tr:not(:last-child)_td]:border-b-border-weak`,`[&_tfoot_td]:border-t`),style:{width:e.getTotalSize()},children:[S(h,{className:`sticky top-0 z-10 backdrop-blur-xs`,children:e.getHeaderGroups().map(e=>S(g,{children:e.headers.map(e=>{let{column:t}=e,n=t.getIsPinned(),r=n===`left`&&t.getIsLastColumn(`left`),i=n===`right`&&t.getIsFirstColumn(`right`);return S(m,{"data-pinned":n||void 0,"data-last-col":r?`left`:i?`right`:void 0,className:x(`relative h-9 font-semibold select-none`,`data-pinned:backdrop-blur-xs`,`data-pinned:bg-muted-weak`,`[&>.cursor-col-resize]:last:opacity-0`,`[&[data-pinned][data-last-col]]:border-border-weak`,`[&:not([data-pinned]):has(+[data-pinned])_div.cursor-col-resize:last-child]:opacity-0`,`[&[data-last-col=left]_div.cursor-col-resize:last-child]:opacity-0`,`[&[data-pinned=left][data-last-col=left]]:border-r`,`[&[data-pinned=right]:last-child_div.cursor-col-resize:last-child]:opacity-0`,`[&[data-pinned=right][data-last-col=right]]:border-l`),colSpan:e.colSpan,style:{width:e.getSize(),maxWidth:e.getSize(),...U(e.column)},children:S(K,{header:e})},e.id)})},e.id))}),S(f,{className:x(t&&`h-36`,e.getRowModel().rows?.length===0&&`h-48`),children:t?S(g,{className:`absolute top-9 flex h-36 w-full items-center justify-center`,children:S(p,{children:`loading...`})}):S(b.Fragment,{children:e.getRowModel().rows?.length?e.getRowModel().rows.map(e=>S(g,{"data-state":e.getIsSelected()&&`selected`,className:`cursor-pointer border-none focus:outline-none`,onClick:()=>n?.(e?.id||e.original?.id?.toString()||e.original?.uuid||void 0),children:e.getVisibleCells().map(e=>{let{column:t}=e,n=t.getIsPinned(),r=n===`left`&&t.getIsLastColumn(`left`),i=n===`right`&&t.getIsFirstColumn(`right`);return S(p,{style:{...U(t),width:e.column.getSize(),maxWidth:e.column.getSize()},"data-pinned":n||void 0,"data-last-col":r?`left`:i?`right`:void 0,className:x(`overflow-hidden py-2.5`,`[&[data-pinned][data-last-col]]:border-border-weak`,`[&[data-pinned=left][data-last-col=left]]:border-r`,`[&[data-pinned=right][data-last-col=right]]:border-l`,`data-pinned:bg-background/90`),children:F(e.column.columnDef.cell,e.getContext())},e.id)})},e.id)):S(g,{className:`absolute top-9 flex h-36 w-full items-center justify-center`,children:S(p,{children:C(`div`,{className:`text-muted-foreground flex size-full flex-col items-center justify-center gap-y-8 text-base`,children:[S(N,{size:48,strokeWidth:2}),S(`p`,{children:`Thêm dữ liệu để hiển thị`})]})})})})})]})};function J({filteredSelectedRowsLength:e,filteredRowsLength:s,pageSize:c,setPageSize:l,pageIndex:u=0,setPageIndex:d,previousPage:f,nextPage:p,canPreviousPage:m,canNextPage:h,pageCount:g=1}){"use no memo";return C(`div`,{className:`mt-4 flex w-full flex-0 flex-col flex-wrap items-start space-y-2 px-2 sm:flex-row`,children:[C(`div`,{className:`text-text-positive flex-1 text-sm`,children:[e,` of `,s,` row(s) selected.`]}),C(`div`,{className:`flex w-full flex-col flex-wrap items-start space-y-2 sm:w-fit sm:space-y-4`,children:[C(`div`,{className:`flex items-center space-x-2 sm:space-x-4`,children:[S(`p`,{className:`sr-only text-sm font-medium sm:not-sr-only sm:mr-4`,children:`Rows per page`}),C(n,{value:`${c}`,onValueChange:e=>{l?.(Number(e))},children:[S(a,{className:`h-8 w-18`,children:S(o,{placeholder:c})}),S(r,{side:`top`,children:[10,20,30,40,50].map(e=>S(i,{value:`${e}`,children:e},e))})]}),C(`div`,{className:`flex items-center justify-center text-sm font-medium`,children:[`Page `,u+1,` of `,g]})]}),C(`div`,{className:`flex w-full justify-end space-x-2 *:size-9 *:p-0`,children:[C(t,{variant:`outline`,color:`muted`,onClick:()=>d?.(0),disabled:!m,children:[S(`span`,{className:`sr-only`,children:`Go to first page`}),S(A,{})]}),C(t,{variant:`outline`,color:`muted`,onClick:f,disabled:!m,children:[S(`span`,{className:`sr-only`,children:`Go to previous page`}),S(D,{})]}),C(t,{variant:`outline`,color:`muted`,onClick:p,disabled:!h,children:[S(`span`,{className:`sr-only`,children:`Go to next page`}),S(O,{})]}),C(t,{variant:`outline`,color:`muted`,onClick:()=>{d?.(g-1)},disabled:!h,children:[S(`span`,{className:`sr-only`,children:`Go to last page`}),S(j,{})]})]})]})]})}const Y=({onAdd:t,onRefresh:n})=>C(e,{justify:`between`,padding:`none`,width:`full`,className:`flex-0`,children:[S(`div`,{className:`max-sm:flex-1`,children:S(_,{placeholder:`Search...`})}),C(e,{wrap:!1,className:`flex-0 px-0`,children:[!!t&&S(v,{onClick:t}),S(y,{onClick:n})]})]});function X({data:t,totalCount:n,isLoading:r,columns:i,pagination:a,onAdd:o,onRefresh:s,onClickRow:c,onPaginationChange:l}){"use no memo";let[u,d]=b.useState({}),[f,p]=b.useState([]),[m,h]=b.useState([]),[g,_]=b.useState({}),v=b.useMemo(()=>({columnPinning:{right:[`actions`,`update`,`delete`]},pagination:{pageIndex:0,pageSize:20}}),[]),y=H({initialState:v,data:t,columns:i,rowCount:n,columnResizeMode:`onChange`,manualPagination:!0,enableColumnResizing:!1,enableMultiRowSelection:!1,getCoreRowModel:I(),getPaginationRowModel:B(),getSortedRowModel:V(),getFilteredRowModel:z(),getFacetedRowModel:L(),getFacetedUniqueValues:R(),getRowId:e=>e.id||e.uuid,state:{rowSelection:u,sorting:f,columnVisibility:g,columnFilters:m,...a?{pagination:a}:{}},onRowSelectionChange:d,onSortingChange:p,onColumnVisibilityChange:_,onColumnFiltersChange:h,...l?{onPaginationChange:l}:{}});return C(e,{vertical:!0,wrap:!1,gap:`sm`,align:`start`,className:`size-full overflow-y-auto pt-1`,children:[S(Y,{onAdd:o,onRefresh:s}),C(e,{padding:`none`,vertical:!0,wrap:!1,width:`full`,className:`flex-1 overflow-auto pb-4`,children:[S(q,{table:y,isLoading:r,onClickRow:c}),S(J,{pageSize:y.getState().pagination.pageSize,setPageSize:y.setPageSize,filteredSelectedRowsLength:y.getFilteredSelectedRowModel().rows.length,filteredRowsLength:y.getFilteredRowModel().rows.length,pageIndex:y.getState().pagination.pageIndex,setPageIndex:y.setPageIndex,previousPage:y.previousPage,nextPage:y.nextPage,canPreviousPage:y.getCanPreviousPage(),canNextPage:y.getCanNextPage(),pageCount:y.getPageCount()})]})]})}export{X as Table};
1
+ import{Flex as e}from"../flex-uJ4bFSYt.js";import"../paragraph-D4klQX4h.js";import{Button as t}from"../button-DL_i4AVi.js";import"../input-OWyLq45f.js";import{Select as n,SelectContent as r,SelectItem as i,SelectTrigger as a,SelectValue as o}from"../select-VpccO3h2.js";import{DropdownMenu as s,DropdownMenuContent as c,DropdownMenuItem as l,DropdownMenuTrigger as u}from"../dropdown-menu-BF9QbIfo.js";import"../scroll-area-CPQoJKt1.js";import{Table as d,TableBody as f,TableCell as p,TableHead as m,TableHeader as h,TableRow as g}from"../table-goPaI3yw.js";import{SearchInput as _}from"../search-input-Ba8aUECr.js";import{AddNewBtn as v}from"../add-new-B9KK77jE.js";import{RefreshBtn as y}from"../refresh-CMzmHeMf.js";import b from"react";import{cn as x}from"@customafk/react-toolkit/utils";import{jsx as S,jsxs as C}from"react/jsx-runtime";import{ArrowLeftToLineIcon as w,ArrowRightToLineIcon as T,ChevronDown as E,ChevronLeft as D,ChevronRight as O,ChevronUp as k,ChevronsLeft as A,ChevronsRight as j,EllipsisIcon as M,PackagePlusIcon as N,PinOffIcon as P}from"lucide-react";import{flexRender as F,getCoreRowModel as I,getFacetedRowModel as L,getFacetedUniqueValues as R,getFilteredRowModel as z,getPaginationRowModel as B,getSortedRowModel as V,useReactTable as H}from"@tanstack/react-table";const U=e=>{let t=e.getIsPinned();return{left:t===`left`?`${e.getStart(`left`)}px`:void 0,right:t===`right`?`${e.getAfter(`right`)}px`:void 0,position:t?`sticky`:`relative`,width:e.getSize(),zIndex:t?1:0}},W=({column:e})=>{let t=e.getIsSorted(),n={asc:S(k,{className:`shrink-0 opacity-60`,size:16,strokeWidth:2,"aria-hidden":`true`}),desc:S(E,{className:`shrink-0 opacity-60`,size:16,strokeWidth:2,"aria-hidden":`true`})};return t?n[t]:null},G=({column:e})=>{let n=e.columnDef.header;return e.getCanPin()?e.getIsPinned()?S(t,{size:`icon`,variant:`ghost`,color:`secondary`,className:`hover:[&_svg]:text-secondary-foreground -mr-1 size-7 shadow-none`,"aria-label":`Unpin ${n} column`,title:`Unpin ${n} column`,onClick:()=>e.pin(!1),children:S(P,{className:`opacity-60`,size:16,"aria-hidden":`true`})}):C(s,{children:[S(u,{asChild:!0,children:S(t,{size:`icon`,variant:`ghost`,color:`secondary`,className:`size-7 shadow-none`,"aria-label":`Pin options for ${n} column`,title:`Pin options for ${n} column`,children:S(M,{className:`opacity-60`,size:16,"aria-hidden":`true`})})}),C(c,{align:`end`,children:[C(l,{onClick:()=>e.pin(`left`),children:[S(w,{size:16,className:`opacity-60`,"aria-hidden":`true`}),`Stick to left`]}),C(l,{onClick:()=>e.pin(`right`),children:[S(T,{size:16,className:`opacity-60`,"aria-hidden":`true`}),`Stick to right`]})]})]}):null},K=({header:e})=>{let{column:t}=e,n=e=>{t.getCanSort()&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),t.getToggleSortingHandler()?.(e))};return C(`div`,{className:`flex items-center justify-between gap-2 truncate`,children:[!e.isPlaceholder&&C(`div`,{className:x(t.getCanSort()&&`flex h-full cursor-pointer items-center justify-between gap-2 select-none`),onClick:t.getToggleSortingHandler(),onKeyDown:n,tabIndex:t.getCanSort()?0:void 0,children:[S(`span`,{className:`truncate`,children:F(t.columnDef.header,e.getContext())}),S(W,{column:t})]}),!e.isPlaceholder&&S(G,{column:t})]})},q=({table:e,isLoading:t,onClickRow:n})=>{"use no memo";return C(d,{className:x(`!w-full`,`table-fixed border-separate border-spacing-0`,`[&_td]:border-border-weak`,`[&_th]:border-border-weak`,`[&_th]:border-b`,`[&_th]:border-b-border-weak`,`[&_tr]:border-none`,`[&_tr:not(:last-child)_td]:border-b`,`[&_tr:not(:last-child)_td]:border-b-border-weak`,`[&_tfoot_td]:border-t`),style:{width:e.getTotalSize()},children:[S(h,{className:`sticky top-0 z-10 backdrop-blur-xs`,children:e.getHeaderGroups().map(e=>S(g,{children:e.headers.map(e=>{let{column:t}=e,n=t.getIsPinned(),r=n===`left`&&t.getIsLastColumn(`left`),i=n===`right`&&t.getIsFirstColumn(`right`);return S(m,{"data-pinned":n||void 0,"data-last-col":r?`left`:i?`right`:void 0,className:x(`relative h-9 font-semibold select-none`,`data-pinned:backdrop-blur-xs`,`data-pinned:bg-muted-weak`,`[&>.cursor-col-resize]:last:opacity-0`,`[&[data-pinned][data-last-col]]:border-border-weak`,`[&:not([data-pinned]):has(+[data-pinned])_div.cursor-col-resize:last-child]:opacity-0`,`[&[data-last-col=left]_div.cursor-col-resize:last-child]:opacity-0`,`[&[data-pinned=left][data-last-col=left]]:border-r`,`[&[data-pinned=right]:last-child_div.cursor-col-resize:last-child]:opacity-0`,`[&[data-pinned=right][data-last-col=right]]:border-l`),colSpan:e.colSpan,style:{width:e.getSize(),maxWidth:e.getSize(),...U(e.column)},children:S(K,{header:e})},e.id)})},e.id))}),S(f,{className:x(t&&`h-36`,e.getRowModel().rows?.length===0&&`h-48`),children:t?S(g,{className:`absolute top-9 flex h-36 w-full items-center justify-center`,children:S(p,{children:`loading...`})}):S(b.Fragment,{children:e.getRowModel().rows?.length?e.getRowModel().rows.map(e=>S(g,{"data-state":e.getIsSelected()&&`selected`,className:`cursor-pointer border-none focus:outline-none`,onClick:()=>n?.(e?.id||e.original?.id?.toString()||e.original?.uuid||void 0),children:e.getVisibleCells().map(e=>{let{column:t}=e,n=t.getIsPinned(),r=n===`left`&&t.getIsLastColumn(`left`),i=n===`right`&&t.getIsFirstColumn(`right`);return S(p,{style:{...U(t),width:e.column.getSize(),maxWidth:e.column.getSize()},"data-pinned":n||void 0,"data-last-col":r?`left`:i?`right`:void 0,className:x(`overflow-hidden py-2.5`,`[&[data-pinned][data-last-col]]:border-border-weak`,`[&[data-pinned=left][data-last-col=left]]:border-r`,`[&[data-pinned=right][data-last-col=right]]:border-l`,`data-pinned:bg-background/90`),children:F(e.column.columnDef.cell,e.getContext())},e.id)})},e.id)):S(g,{className:`absolute top-9 flex h-36 w-full items-center justify-center`,children:S(p,{children:C(`div`,{className:`text-muted-foreground flex size-full flex-col items-center justify-center gap-y-8 text-base`,children:[S(N,{size:48,strokeWidth:2}),S(`p`,{children:`Thêm dữ liệu để hiển thị`})]})})})})})]})};function J({filteredSelectedRowsLength:e,filteredRowsLength:s,pageSize:c,setPageSize:l,pageIndex:u=0,setPageIndex:d,previousPage:f,nextPage:p,canPreviousPage:m,canNextPage:h,pageCount:g=1}){"use no memo";return C(`div`,{className:`mt-4 flex w-full flex-0 flex-col flex-wrap items-start space-y-2 px-2 sm:flex-row`,children:[C(`div`,{className:`text-text-positive flex-1 text-sm`,children:[e,` of `,s,` row(s) selected.`]}),C(`div`,{className:`flex w-full flex-col flex-wrap items-start space-y-2 sm:w-fit sm:space-y-4`,children:[C(`div`,{className:`flex items-center space-x-2 sm:space-x-4`,children:[S(`p`,{className:`sr-only text-sm font-medium sm:not-sr-only sm:mr-4`,children:`Rows per page`}),C(n,{value:`${c}`,onValueChange:e=>{l?.(Number(e))},children:[S(a,{className:`h-8 w-18`,children:S(o,{placeholder:c})}),S(r,{side:`top`,children:[10,20,30,40,50].map(e=>S(i,{value:`${e}`,children:e},e))})]}),C(`div`,{className:`flex items-center justify-center text-sm font-medium`,children:[`Page `,u+1,` of `,g]})]}),C(`div`,{className:`flex w-full justify-end space-x-2 *:size-9 *:p-0`,children:[C(t,{variant:`outline`,color:`muted`,onClick:()=>d?.(0),disabled:!m,children:[S(`span`,{className:`sr-only`,children:`Go to first page`}),S(A,{})]}),C(t,{variant:`outline`,color:`muted`,onClick:f,disabled:!m,children:[S(`span`,{className:`sr-only`,children:`Go to previous page`}),S(D,{})]}),C(t,{variant:`outline`,color:`muted`,onClick:p,disabled:!h,children:[S(`span`,{className:`sr-only`,children:`Go to next page`}),S(O,{})]}),C(t,{variant:`outline`,color:`muted`,onClick:()=>{d?.(g-1)},disabled:!h,children:[S(`span`,{className:`sr-only`,children:`Go to last page`}),S(j,{})]})]})]})]})}const Y=({onAdd:t,onRefresh:n})=>C(e,{justify:`between`,padding:`none`,width:`full`,className:`flex-0`,children:[S(`div`,{className:`max-sm:flex-1`,children:S(_,{placeholder:`Search...`})}),C(e,{wrap:!1,className:`flex-0 px-0`,children:[!!t&&S(v,{onClick:t}),S(y,{onClick:n})]})]});function X({data:t,totalCount:n,isLoading:r,columns:i,pagination:a,onAdd:o,onRefresh:s,onClickRow:c,onPaginationChange:l}){"use no memo";let[u,d]=b.useState({}),[f,p]=b.useState([]),[m,h]=b.useState([]),[g,_]=b.useState({}),v=b.useMemo(()=>({columnPinning:{right:[`actions`,`update`,`delete`]},pagination:{pageIndex:0,pageSize:20}}),[]),y=H({initialState:v,data:t,columns:i,rowCount:n,columnResizeMode:`onChange`,manualPagination:!0,enableColumnResizing:!1,enableMultiRowSelection:!1,getCoreRowModel:I(),getPaginationRowModel:B(),getSortedRowModel:V(),getFilteredRowModel:z(),getFacetedRowModel:L(),getFacetedUniqueValues:R(),getRowId:e=>e.id||e.uuid,state:{rowSelection:u,sorting:f,columnVisibility:g,columnFilters:m,...a?{pagination:a}:{}},onRowSelectionChange:d,onSortingChange:p,onColumnVisibilityChange:_,onColumnFiltersChange:h,...l?{onPaginationChange:l}:{}});return C(e,{vertical:!0,wrap:!1,gap:`sm`,align:`start`,className:`size-full overflow-y-auto pt-1`,children:[S(Y,{onAdd:o,onRefresh:s}),C(e,{padding:`none`,vertical:!0,wrap:!1,width:`full`,className:`flex-1 overflow-auto pb-4`,children:[S(q,{table:y,isLoading:r,onClickRow:c}),S(J,{pageSize:y.getState().pagination.pageSize,setPageSize:y.setPageSize,filteredSelectedRowsLength:y.getFilteredSelectedRowModel().rows.length,filteredRowsLength:y.getFilteredRowModel().rows.length,pageIndex:y.getState().pagination.pageIndex,setPageIndex:y.setPageIndex,previousPage:y.previousPage,nextPage:y.nextPage,canPreviousPage:y.getCanPreviousPage(),canNextPage:y.getCanNextPage(),pageCount:y.getPageCount()})]})]})}export{X as Table};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime196 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime193 from "react/jsx-runtime";
2
2
  import React from "react";
3
3
  import * as class_variance_authority_types4 from "class-variance-authority/types";
4
4
  import { VariantProps } from "class-variance-authority";
@@ -14,7 +14,7 @@ declare function Toggle$1({
14
14
  variant,
15
15
  size,
16
16
  ...props
17
- }: React.ComponentProps<typeof Toggle.Root> & VariantProps<typeof toggleVariants>): react_jsx_runtime196.JSX.Element;
17
+ }: React.ComponentProps<typeof Toggle.Root> & VariantProps<typeof toggleVariants>): react_jsx_runtime193.JSX.Element;
18
18
  //#endregion
19
19
  export { Toggle$1 as Toggle, toggleVariants };
20
- //# sourceMappingURL=toggle-D5tumZ8L.d.cts.map
20
+ //# sourceMappingURL=toggle-B_di9jVO.d.cts.map
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import * as react_jsx_runtime235 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime230 from "react/jsx-runtime";
3
3
  import { VariantProps } from "class-variance-authority";
4
4
  import { Toggle } from "radix-ui";
5
5
  import * as class_variance_authority_types5 from "class-variance-authority/types";
@@ -14,7 +14,7 @@ declare function Toggle$1({
14
14
  variant,
15
15
  size,
16
16
  ...props
17
- }: React.ComponentProps<typeof Toggle.Root> & VariantProps<typeof toggleVariants>): react_jsx_runtime235.JSX.Element;
17
+ }: React.ComponentProps<typeof Toggle.Root> & VariantProps<typeof toggleVariants>): react_jsx_runtime230.JSX.Element;
18
18
  //#endregion
19
19
  export { Toggle$1 as Toggle, toggleVariants };
20
- //# sourceMappingURL=toggle-Dd0rFKhT.d.ts.map
20
+ //# sourceMappingURL=toggle-DPvX-y_y.d.ts.map
@@ -1,24 +1,24 @@
1
1
  import React from "react";
2
- import * as react_jsx_runtime220 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime164 from "react/jsx-runtime";
3
3
  import { Tooltip } from "radix-ui";
4
4
 
5
5
  //#region packages/components/ui/tooltip.d.ts
6
6
  declare function TooltipProvider({
7
7
  delayDuration,
8
8
  ...props
9
- }: React.ComponentProps<typeof Tooltip.Provider>): react_jsx_runtime220.JSX.Element;
9
+ }: React.ComponentProps<typeof Tooltip.Provider>): react_jsx_runtime164.JSX.Element;
10
10
  declare function Tooltip$1({
11
11
  ...props
12
- }: React.ComponentProps<typeof Tooltip.Root>): react_jsx_runtime220.JSX.Element;
12
+ }: React.ComponentProps<typeof Tooltip.Root>): react_jsx_runtime164.JSX.Element;
13
13
  declare function TooltipTrigger({
14
14
  ...props
15
- }: React.ComponentProps<typeof Tooltip.Trigger>): react_jsx_runtime220.JSX.Element;
15
+ }: React.ComponentProps<typeof Tooltip.Trigger>): react_jsx_runtime164.JSX.Element;
16
16
  declare function TooltipContent({
17
17
  className,
18
18
  sideOffset,
19
19
  children,
20
20
  ...props
21
- }: React.ComponentProps<typeof Tooltip.Content>): react_jsx_runtime220.JSX.Element;
21
+ }: React.ComponentProps<typeof Tooltip.Content>): react_jsx_runtime164.JSX.Element;
22
22
  //#endregion
23
23
  export { Tooltip$1 as Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
24
- //# sourceMappingURL=tooltip-BnRE0jV2.d.ts.map
24
+ //# sourceMappingURL=tooltip--7nev3Bt.d.ts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime205 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime149 from "react/jsx-runtime";
2
2
  import React from "react";
3
3
  import { Tooltip } from "radix-ui";
4
4
 
@@ -6,19 +6,19 @@ import { Tooltip } from "radix-ui";
6
6
  declare function TooltipProvider({
7
7
  delayDuration,
8
8
  ...props
9
- }: React.ComponentProps<typeof Tooltip.Provider>): react_jsx_runtime205.JSX.Element;
9
+ }: React.ComponentProps<typeof Tooltip.Provider>): react_jsx_runtime149.JSX.Element;
10
10
  declare function Tooltip$1({
11
11
  ...props
12
- }: React.ComponentProps<typeof Tooltip.Root>): react_jsx_runtime205.JSX.Element;
12
+ }: React.ComponentProps<typeof Tooltip.Root>): react_jsx_runtime149.JSX.Element;
13
13
  declare function TooltipTrigger({
14
14
  ...props
15
- }: React.ComponentProps<typeof Tooltip.Trigger>): react_jsx_runtime205.JSX.Element;
15
+ }: React.ComponentProps<typeof Tooltip.Trigger>): react_jsx_runtime149.JSX.Element;
16
16
  declare function TooltipContent({
17
17
  className,
18
18
  sideOffset,
19
19
  children,
20
20
  ...props
21
- }: React.ComponentProps<typeof Tooltip.Content>): react_jsx_runtime205.JSX.Element;
21
+ }: React.ComponentProps<typeof Tooltip.Content>): react_jsx_runtime149.JSX.Element;
22
22
  //#endregion
23
23
  export { Tooltip$1 as Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
24
- //# sourceMappingURL=tooltip-Dkh_dieJ.d.cts.map
24
+ //# sourceMappingURL=tooltip-DkK1GTLt.d.cts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime209 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime36 from "react/jsx-runtime";
2
2
 
3
3
  //#region packages/components/typography/paragraph.d.ts
4
4
  type Props = {
@@ -10,7 +10,7 @@ declare const Paragraph: ({
10
10
  variant,
11
11
  className,
12
12
  children
13
- }: Props) => react_jsx_runtime209.JSX.Element;
13
+ }: Props) => react_jsx_runtime36.JSX.Element;
14
14
  //#endregion
15
15
  export { Paragraph };
16
16
  //# sourceMappingURL=paragraph.d.cts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime9 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime11 from "react/jsx-runtime";
2
2
 
3
3
  //#region packages/components/typography/paragraph.d.ts
4
4
  type Props = {
@@ -10,7 +10,7 @@ declare const Paragraph: ({
10
10
  variant,
11
11
  className,
12
12
  children
13
- }: Props) => react_jsx_runtime9.JSX.Element;
13
+ }: Props) => react_jsx_runtime11.JSX.Element;
14
14
  //#endregion
15
15
  export { Paragraph };
16
16
  //# sourceMappingURL=paragraph.d.ts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime23 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime35 from "react/jsx-runtime";
2
2
 
3
3
  //#region packages/components/typography/title.d.ts
4
4
  type Props = {
@@ -10,7 +10,7 @@ declare const Title: ({
10
10
  level,
11
11
  className,
12
12
  children
13
- }: Props) => react_jsx_runtime23.JSX.Element;
13
+ }: Props) => react_jsx_runtime35.JSX.Element;
14
14
  //#endregion
15
15
  export { Title };
16
16
  //# sourceMappingURL=title.d.cts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime15 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime32 from "react/jsx-runtime";
2
2
 
3
3
  //#region packages/components/typography/title.d.ts
4
4
  type Props = {
@@ -10,7 +10,7 @@ declare const Title: ({
10
10
  level,
11
11
  className,
12
12
  children
13
- }: Props) => react_jsx_runtime15.JSX.Element;
13
+ }: Props) => react_jsx_runtime32.JSX.Element;
14
14
  //#endregion
15
15
  export { Title };
16
16
  //# sourceMappingURL=title.d.ts.map
@@ -1,49 +1,49 @@
1
- import * as react_jsx_runtime11 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime38 from "react/jsx-runtime";
2
2
  import React from "react";
3
3
  import { AlertDialog as AlertDialog$1 } from "radix-ui";
4
4
 
5
5
  //#region packages/components/ui/alert-dialog.d.ts
6
6
  declare function AlertDialog({
7
7
  ...props
8
- }: React.ComponentProps<typeof AlertDialog$1.Root>): react_jsx_runtime11.JSX.Element;
8
+ }: React.ComponentProps<typeof AlertDialog$1.Root>): react_jsx_runtime38.JSX.Element;
9
9
  declare function AlertDialogTrigger({
10
10
  ...props
11
- }: React.ComponentProps<typeof AlertDialog$1.Trigger>): react_jsx_runtime11.JSX.Element;
11
+ }: React.ComponentProps<typeof AlertDialog$1.Trigger>): react_jsx_runtime38.JSX.Element;
12
12
  declare function AlertDialogPortal({
13
13
  ...props
14
- }: React.ComponentProps<typeof AlertDialog$1.Portal>): react_jsx_runtime11.JSX.Element;
14
+ }: React.ComponentProps<typeof AlertDialog$1.Portal>): react_jsx_runtime38.JSX.Element;
15
15
  declare function AlertDialogOverlay({
16
16
  className,
17
17
  ...props
18
- }: React.ComponentProps<typeof AlertDialog$1.Overlay>): react_jsx_runtime11.JSX.Element;
18
+ }: React.ComponentProps<typeof AlertDialog$1.Overlay>): react_jsx_runtime38.JSX.Element;
19
19
  declare function AlertDialogContent({
20
20
  className,
21
21
  ...props
22
- }: React.ComponentProps<typeof AlertDialog$1.Content>): react_jsx_runtime11.JSX.Element;
22
+ }: React.ComponentProps<typeof AlertDialog$1.Content>): react_jsx_runtime38.JSX.Element;
23
23
  declare function AlertDialogHeader({
24
24
  className,
25
25
  ...props
26
- }: React.ComponentProps<'div'>): react_jsx_runtime11.JSX.Element;
26
+ }: React.ComponentProps<'div'>): react_jsx_runtime38.JSX.Element;
27
27
  declare function AlertDialogFooter({
28
28
  className,
29
29
  ...props
30
- }: React.ComponentProps<'div'>): react_jsx_runtime11.JSX.Element;
30
+ }: React.ComponentProps<'div'>): react_jsx_runtime38.JSX.Element;
31
31
  declare function AlertDialogTitle({
32
32
  className,
33
33
  ...props
34
- }: React.ComponentProps<typeof AlertDialog$1.Title>): react_jsx_runtime11.JSX.Element;
34
+ }: React.ComponentProps<typeof AlertDialog$1.Title>): react_jsx_runtime38.JSX.Element;
35
35
  declare function AlertDialogDescription({
36
36
  className,
37
37
  ...props
38
- }: React.ComponentProps<typeof AlertDialog$1.Description>): react_jsx_runtime11.JSX.Element;
38
+ }: React.ComponentProps<typeof AlertDialog$1.Description>): react_jsx_runtime38.JSX.Element;
39
39
  declare function AlertDialogAction({
40
40
  className,
41
41
  ...props
42
- }: React.ComponentProps<typeof AlertDialog$1.Action>): react_jsx_runtime11.JSX.Element;
42
+ }: React.ComponentProps<typeof AlertDialog$1.Action>): react_jsx_runtime38.JSX.Element;
43
43
  declare function AlertDialogCancel({
44
44
  className,
45
45
  ...props
46
- }: React.ComponentProps<typeof AlertDialog$1.Cancel>): react_jsx_runtime11.JSX.Element;
46
+ }: React.ComponentProps<typeof AlertDialog$1.Cancel>): react_jsx_runtime38.JSX.Element;
47
47
  //#endregion
48
48
  export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger };
49
49
  //# sourceMappingURL=alert-dialog.d.cts.map
@@ -1,49 +1,49 @@
1
1
  import React from "react";
2
- import * as react_jsx_runtime19 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime17 from "react/jsx-runtime";
3
3
  import { AlertDialog as AlertDialog$1 } from "radix-ui";
4
4
 
5
5
  //#region packages/components/ui/alert-dialog.d.ts
6
6
  declare function AlertDialog({
7
7
  ...props
8
- }: React.ComponentProps<typeof AlertDialog$1.Root>): react_jsx_runtime19.JSX.Element;
8
+ }: React.ComponentProps<typeof AlertDialog$1.Root>): react_jsx_runtime17.JSX.Element;
9
9
  declare function AlertDialogTrigger({
10
10
  ...props
11
- }: React.ComponentProps<typeof AlertDialog$1.Trigger>): react_jsx_runtime19.JSX.Element;
11
+ }: React.ComponentProps<typeof AlertDialog$1.Trigger>): react_jsx_runtime17.JSX.Element;
12
12
  declare function AlertDialogPortal({
13
13
  ...props
14
- }: React.ComponentProps<typeof AlertDialog$1.Portal>): react_jsx_runtime19.JSX.Element;
14
+ }: React.ComponentProps<typeof AlertDialog$1.Portal>): react_jsx_runtime17.JSX.Element;
15
15
  declare function AlertDialogOverlay({
16
16
  className,
17
17
  ...props
18
- }: React.ComponentProps<typeof AlertDialog$1.Overlay>): react_jsx_runtime19.JSX.Element;
18
+ }: React.ComponentProps<typeof AlertDialog$1.Overlay>): react_jsx_runtime17.JSX.Element;
19
19
  declare function AlertDialogContent({
20
20
  className,
21
21
  ...props
22
- }: React.ComponentProps<typeof AlertDialog$1.Content>): react_jsx_runtime19.JSX.Element;
22
+ }: React.ComponentProps<typeof AlertDialog$1.Content>): react_jsx_runtime17.JSX.Element;
23
23
  declare function AlertDialogHeader({
24
24
  className,
25
25
  ...props
26
- }: React.ComponentProps<'div'>): react_jsx_runtime19.JSX.Element;
26
+ }: React.ComponentProps<'div'>): react_jsx_runtime17.JSX.Element;
27
27
  declare function AlertDialogFooter({
28
28
  className,
29
29
  ...props
30
- }: React.ComponentProps<'div'>): react_jsx_runtime19.JSX.Element;
30
+ }: React.ComponentProps<'div'>): react_jsx_runtime17.JSX.Element;
31
31
  declare function AlertDialogTitle({
32
32
  className,
33
33
  ...props
34
- }: React.ComponentProps<typeof AlertDialog$1.Title>): react_jsx_runtime19.JSX.Element;
34
+ }: React.ComponentProps<typeof AlertDialog$1.Title>): react_jsx_runtime17.JSX.Element;
35
35
  declare function AlertDialogDescription({
36
36
  className,
37
37
  ...props
38
- }: React.ComponentProps<typeof AlertDialog$1.Description>): react_jsx_runtime19.JSX.Element;
38
+ }: React.ComponentProps<typeof AlertDialog$1.Description>): react_jsx_runtime17.JSX.Element;
39
39
  declare function AlertDialogAction({
40
40
  className,
41
41
  ...props
42
- }: React.ComponentProps<typeof AlertDialog$1.Action>): react_jsx_runtime19.JSX.Element;
42
+ }: React.ComponentProps<typeof AlertDialog$1.Action>): react_jsx_runtime17.JSX.Element;
43
43
  declare function AlertDialogCancel({
44
44
  className,
45
45
  ...props
46
- }: React.ComponentProps<typeof AlertDialog$1.Cancel>): react_jsx_runtime19.JSX.Element;
46
+ }: React.ComponentProps<typeof AlertDialog$1.Cancel>): react_jsx_runtime17.JSX.Element;
47
47
  //#endregion
48
48
  export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger };
49
49
  //# sourceMappingURL=alert-dialog.d.ts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime36 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime31 from "react/jsx-runtime";
2
2
  import React from "react";
3
3
  import * as class_variance_authority_types1 from "class-variance-authority/types";
4
4
  import { VariantProps } from "class-variance-authority";
@@ -11,15 +11,15 @@ declare function Alert({
11
11
  className,
12
12
  variant,
13
13
  ...props
14
- }: React.ComponentProps<'div'> & VariantProps<typeof alertVariants>): react_jsx_runtime36.JSX.Element;
14
+ }: React.ComponentProps<'div'> & VariantProps<typeof alertVariants>): react_jsx_runtime31.JSX.Element;
15
15
  declare function AlertTitle({
16
16
  className,
17
17
  ...props
18
- }: React.ComponentProps<'div'>): react_jsx_runtime36.JSX.Element;
18
+ }: React.ComponentProps<'div'>): react_jsx_runtime31.JSX.Element;
19
19
  declare function AlertDescription({
20
20
  className,
21
21
  ...props
22
- }: React.ComponentProps<'div'>): react_jsx_runtime36.JSX.Element;
22
+ }: React.ComponentProps<'div'>): react_jsx_runtime31.JSX.Element;
23
23
  //#endregion
24
24
  export { Alert, AlertDescription, AlertTitle };
25
25
  //# sourceMappingURL=alert.d.cts.map
@@ -1,25 +1,25 @@
1
1
  import React from "react";
2
- import * as react_jsx_runtime31 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime28 from "react/jsx-runtime";
3
3
  import { VariantProps } from "class-variance-authority";
4
- import * as class_variance_authority_types1 from "class-variance-authority/types";
4
+ import * as class_variance_authority_types0 from "class-variance-authority/types";
5
5
 
6
6
  //#region packages/components/ui/alert.d.ts
7
7
  declare const alertVariants: (props?: ({
8
8
  variant?: "default" | "destructive" | null | undefined;
9
- } & class_variance_authority_types1.ClassProp) | undefined) => string;
9
+ } & class_variance_authority_types0.ClassProp) | undefined) => string;
10
10
  declare function Alert({
11
11
  className,
12
12
  variant,
13
13
  ...props
14
- }: React.ComponentProps<'div'> & VariantProps<typeof alertVariants>): react_jsx_runtime31.JSX.Element;
14
+ }: React.ComponentProps<'div'> & VariantProps<typeof alertVariants>): react_jsx_runtime28.JSX.Element;
15
15
  declare function AlertTitle({
16
16
  className,
17
17
  ...props
18
- }: React.ComponentProps<'div'>): react_jsx_runtime31.JSX.Element;
18
+ }: React.ComponentProps<'div'>): react_jsx_runtime28.JSX.Element;
19
19
  declare function AlertDescription({
20
20
  className,
21
21
  ...props
22
- }: React.ComponentProps<'div'>): react_jsx_runtime31.JSX.Element;
22
+ }: React.ComponentProps<'div'>): react_jsx_runtime28.JSX.Element;
23
23
  //#endregion
24
24
  export { Alert, AlertDescription, AlertTitle };
25
25
  //# sourceMappingURL=alert.d.ts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime40 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime28 from "react/jsx-runtime";
2
2
  import React from "react";
3
3
  import { AspectRatio as AspectRatio$1 } from "radix-ui";
4
4
 
@@ -6,7 +6,7 @@ import { AspectRatio as AspectRatio$1 } from "radix-ui";
6
6
  declare function AspectRatio({
7
7
  className,
8
8
  ...props
9
- }: React.ComponentProps<typeof AspectRatio$1.Root>): react_jsx_runtime40.JSX.Element;
9
+ }: React.ComponentProps<typeof AspectRatio$1.Root>): react_jsx_runtime28.JSX.Element;
10
10
  //#endregion
11
11
  export { AspectRatio };
12
12
  //# sourceMappingURL=aspect-ratio.d.cts.map
@@ -1,12 +1,12 @@
1
1
  import React from "react";
2
- import * as react_jsx_runtime11 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime16 from "react/jsx-runtime";
3
3
  import { AspectRatio as AspectRatio$1 } from "radix-ui";
4
4
 
5
5
  //#region packages/components/ui/aspect-ratio.d.ts
6
6
  declare function AspectRatio({
7
7
  className,
8
8
  ...props
9
- }: React.ComponentProps<typeof AspectRatio$1.Root>): react_jsx_runtime11.JSX.Element;
9
+ }: React.ComponentProps<typeof AspectRatio$1.Root>): react_jsx_runtime16.JSX.Element;
10
10
  //#endregion
11
11
  export { AspectRatio };
12
12
  //# sourceMappingURL=aspect-ratio.d.ts.map
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime33 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime25 from "react/jsx-runtime";
2
2
  import React from "react";
3
3
  import { Avatar as Avatar$1 } from "radix-ui";
4
4
 
@@ -6,15 +6,15 @@ import { Avatar as Avatar$1 } from "radix-ui";
6
6
  declare function Avatar({
7
7
  className,
8
8
  ...props
9
- }: React.ComponentProps<typeof Avatar$1.Root>): react_jsx_runtime33.JSX.Element;
9
+ }: React.ComponentProps<typeof Avatar$1.Root>): react_jsx_runtime25.JSX.Element;
10
10
  declare function AvatarImage({
11
11
  className,
12
12
  ...props
13
- }: React.ComponentProps<typeof Avatar$1.Image>): react_jsx_runtime33.JSX.Element;
13
+ }: React.ComponentProps<typeof Avatar$1.Image>): react_jsx_runtime25.JSX.Element;
14
14
  declare function AvatarFallback({
15
15
  className,
16
16
  ...props
17
- }: React.ComponentProps<typeof Avatar$1.Fallback>): react_jsx_runtime33.JSX.Element;
17
+ }: React.ComponentProps<typeof Avatar$1.Fallback>): react_jsx_runtime25.JSX.Element;
18
18
  //#endregion
19
19
  export { Avatar, AvatarFallback, AvatarImage };
20
20
  //# sourceMappingURL=avatar.d.cts.map
@@ -1,20 +1,20 @@
1
1
  import React from "react";
2
- import * as react_jsx_runtime12 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime33 from "react/jsx-runtime";
3
3
  import { Avatar as Avatar$1 } from "radix-ui";
4
4
 
5
5
  //#region packages/components/ui/avatar.d.ts
6
6
  declare function Avatar({
7
7
  className,
8
8
  ...props
9
- }: React.ComponentProps<typeof Avatar$1.Root>): react_jsx_runtime12.JSX.Element;
9
+ }: React.ComponentProps<typeof Avatar$1.Root>): react_jsx_runtime33.JSX.Element;
10
10
  declare function AvatarImage({
11
11
  className,
12
12
  ...props
13
- }: React.ComponentProps<typeof Avatar$1.Image>): react_jsx_runtime12.JSX.Element;
13
+ }: React.ComponentProps<typeof Avatar$1.Image>): react_jsx_runtime33.JSX.Element;
14
14
  declare function AvatarFallback({
15
15
  className,
16
16
  ...props
17
- }: React.ComponentProps<typeof Avatar$1.Fallback>): react_jsx_runtime12.JSX.Element;
17
+ }: React.ComponentProps<typeof Avatar$1.Fallback>): react_jsx_runtime33.JSX.Element;
18
18
  //#endregion
19
19
  export { Avatar, AvatarFallback, AvatarImage };
20
20
  //# sourceMappingURL=avatar.d.ts.map
@@ -1,6 +1,6 @@
1
- import * as react_jsx_runtime32 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime34 from "react/jsx-runtime";
2
2
  import React from "react";
3
- import * as class_variance_authority_types0 from "class-variance-authority/types";
3
+ import * as class_variance_authority_types2 from "class-variance-authority/types";
4
4
  import { VariantProps } from "class-variance-authority";
5
5
 
6
6
  //#region packages/components/ui/badge.d.ts
@@ -8,7 +8,7 @@ declare const badgeVariants: (props?: ({
8
8
  color?: "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose" | "zinc" | null | undefined;
9
9
  size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
10
10
  pill?: boolean | null | undefined;
11
- } & class_variance_authority_types0.ClassProp) | undefined) => string;
11
+ } & class_variance_authority_types2.ClassProp) | undefined) => string;
12
12
  type BadgeProps = VariantProps<typeof badgeVariants> & React.ComponentPropsWithoutRef<'div'>;
13
13
  declare function Badge({
14
14
  className,
@@ -16,7 +16,7 @@ declare function Badge({
16
16
  size,
17
17
  pill,
18
18
  ...props
19
- }: BadgeProps): react_jsx_runtime32.JSX.Element;
19
+ }: BadgeProps): react_jsx_runtime34.JSX.Element;
20
20
  //#endregion
21
21
  export { Badge, BadgeProps, badgeVariants };
22
22
  //# sourceMappingURL=badge.d.cts.map