@pezeshk-book/modules 0.2.4 → 0.2.5

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.
@@ -153,7 +153,7 @@ var DefaultDataTable = function (_a) {
153
153
  : flexRender(header.column.columnDef.header, header.getContext()) }))] })) }), header.id)); }) }, headerGroup.id)); }) })), isLoading && !data.length ? (_jsx("tbody", { children: __spreadArray([], new Array(15), true).map(function (_, index) { return (_jsx("tr", __assign({ className: 'h-16' }, { children: table.getFlatHeaders().map(function (cell) {
154
154
  return (_jsx("td", __assign({ className: 'px-1' }, { children: _jsx(Skeleton, { color: 'control', className: '!max-w-full !min-w-full' }) }), cell.id));
155
155
  }) }), "loadingItem_".concat(index))); }) })) : !isLoading && !data.length ? (_jsx("tbody", { children: _jsx("tr", __assign({ className: 'h-48' }, { children: _jsx("td", __assign({ colSpan: table.getFlatHeaders().length }, { children: _jsx(Text, __assign({ typography: 'lg', type: 'bold' }, { children: "\u0627\u0637\u0644\u0627\u0639\u0627\u062A\u06CC \u0628\u0631\u0627\u06CC \u0646\u0645\u0627\u06CC\u0634 \u0648\u062C\u0648\u062F \u0646\u062F\u0627\u0631\u062F!" })) })) })) })) : (_jsx("tbody", { children: table.getRowModel().rows.map(function (row, index) {
156
- return (_jsxs(Fragment, { children: [_jsx(AnimatePresence, __assign({ mode: "wait" }, { children: _jsx(motion.tr, __assign({ initial: { y: 100, opacity: 0 }, animate: { y: 0, opacity: 1 }, exit: { y: -100, opacity: 0 }, transition: { duration: 0.5, delay: index * 0.01 }, className: classNames('h-16 hover:bg-primary-50', row.getIsSelected() && 'bg-slate-200', (visitedRows === null || visitedRows === void 0 ? void 0 : visitedRows.indexOf(row.index)) !== -1 ? 'bg-slate-300' : '') }, { children: row.getVisibleCells().map(function (cell) {
156
+ return (_jsxs(Fragment, { children: [_jsx(AnimatePresence, __assign({ mode: "wait" }, { children: _jsx(motion.tr, __assign({ initial: { y: 100, opacity: 0 }, animate: { y: 0, opacity: 1 }, exit: { y: -100, opacity: 0 }, transition: { duration: 0.5, delay: index * 0.01 }, className: classNames('h-16 hover:bg-primary-50', row.getIsSelected() && 'bg-slate-200', (visitedRows === null || visitedRows === void 0 ? void 0 : visitedRows.indexOf(row.index)) !== -1 ? 'bg-slate-100' : '') }, { children: row.getVisibleCells().map(function (cell) {
157
157
  return (_jsx("td", __assign({ className: 'px-1' }, { children: _jsx(Div, __assign({ className: 'flex-col items-center' }, { children: flexRender(cell.column.columnDef.cell, cell.getContext()) })) }), cell.id));
158
158
  }) }), row ? row.id : 'empty') })), _jsx(AnimatePresence, { children: row.getIsExpanded() && (_jsx(motion.tr, __assign({ initial: { height: 0, opacity: 0 }, animate: { height: 'auto', opacity: 1 }, exit: { height: 0, opacity: 0 }, transition: { duration: 0.5, ease: 'easeInOut' } }, { children: _jsx("td", __assign({ colSpan: row.getVisibleCells().length }, { children: _jsx(motion.div, __assign({ initial: { height: 0, opacity: 0 }, animate: { height: row.getIsExpanded() ? 'auto' : 0, opacity: 1 }, exit: { height: 0, opacity: 0 }, transition: { duration: 0.5, ease: 'easeInOut' }, className: 'flex flex-col overflow-hidden' }, { children: expandedComponent(row.original) })) })) }))) }), _jsx(AnimatePresence, { children: rowExpander.indexOf(row.index) !== -1 && (_jsx(motion.tr, __assign({ initial: { height: 0, opacity: 0 }, animate: { height: 'auto', opacity: 1 }, exit: { height: 0, opacity: 0 }, transition: { duration: 0.5, ease: 'easeInOut' }, className: classNames('bg-primary-50') }, { children: _jsx("td", __assign({ colSpan: row.getVisibleCells().length }, { children: _jsx(motion.div, __assign({ initial: { height: 0, opacity: 0 }, animate: { height: row.getVisibleCells().length ? 'auto' : 0, opacity: 1 }, exit: { height: 0, opacity: 0 }, transition: { duration: 0.5, ease: 'easeInOut' }, className: 'flex flex-col overflow-hidden' }, { children: row.getAllCells().map(function (mobileCell) {
159
159
  if (!mobileCell.column.getIsVisible() && mobileCell.column.id !== 'expander') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pezeshk-book/modules",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "types": "./dist/index.d.ts",
5
5
  "main": "./dist/index.ts",
6
6
  "module": "./dist/index.js",