@ballistix.digital/react-components 0.4.16 → 0.4.18

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/dist/index.js CHANGED
@@ -16878,7 +16878,7 @@ var PanelPaginationNavigation = function (props) {
16878
16878
  component = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("button", __assign({ className: toClassName(styles.button.default, current === min && styles.button.active), onClick: function () { return handleChangeCurrent(min); } }, { children: min })), max >= min + 1 && (jsxRuntime.jsx("button", __assign({ className: toClassName(styles.button.default, current === min + 1 && styles.button.active), onClick: function () { return handleChangeCurrent(min + 1); } }, { children: min + 1 }))), max >= min + 2 && (jsxRuntime.jsx("button", __assign({ className: toClassName(styles.button.default, current === min + 2 && styles.button.active), onClick: function () { return handleChangeCurrent(min + 2); } }, { children: min + 2 })))] }));
16879
16879
  break;
16880
16880
  }
16881
- return (jsxRuntime.jsxs("div", __assign({ className: styles.container }, { children: [jsxRuntime.jsxs("div", __assign({ className: "flex flex-1 justify-between sm:hidden" }, { children: [jsxRuntime.jsx("button", __assign({ className: toClassName(styles.mobile.button, current === min && styles.button.disabled), disabled: current === min, onClick: function () { return handleChangeCurrent(current - 1); } }, { children: "Previous" })), jsxRuntime.jsx("button", __assign({ className: toClassName(styles.mobile.button, current === max && styles.button.disabled), disabled: current === max, onClick: function () { return handleChangeCurrent(current + 1); } }, { children: "Next" }))] })), jsxRuntime.jsxs("div", __assign({ className: styles.desktop.container }, { children: [jsxRuntime.jsx("div", { children: jsxRuntime.jsx("div", __assign({ className: "text-sm text-gray-700" }, { children: children({ min: min, max: max, current: current }) })) }), jsxRuntime.jsx("div", { children: jsxRuntime.jsxs("nav", __assign({ className: styles.desktop.navigation, "aria-label": "Pagination" }, { children: [jsxRuntime.jsxs("button", __assign({ className: toClassName(styles.desktop.leftButton, current === min && styles.button.disabled), disabled: current === min, onClick: function () { return handleChangeCurrent(current - 1); } }, { children: [jsxRuntime.jsx("span", __assign({ className: styles.label }, { children: "Previous" })), jsxRuntime.jsx(solid.ChevronLeftIcon, { className: styles.icon, "aria-hidden": "true" })] })), component, jsxRuntime.jsxs("button", __assign({ className: toClassName(styles.desktop.rightButton, current === max && styles.button.disabled), disabled: current === max || pageType === 'simple', onClick: function () { return handleChangeCurrent(current + 1); } }, { children: [jsxRuntime.jsx("span", __assign({ className: styles.label }, { children: "Next" })), jsxRuntime.jsx(solid.ChevronRightIcon, { className: styles.icon, "aria-hidden": "true" })] }))] })) })] }))] })));
16881
+ return (jsxRuntime.jsxs("div", __assign({ className: styles.container }, { children: [jsxRuntime.jsxs("div", __assign({ className: "flex flex-1 justify-between sm:hidden" }, { children: [jsxRuntime.jsx("button", __assign({ className: toClassName(styles.mobile.button, current === min && styles.button.disabled), disabled: current === min, onClick: function () { return handleChangeCurrent(current - 1); } }, { children: "Previous" })), jsxRuntime.jsx("button", __assign({ className: toClassName(styles.mobile.button, current === max && styles.button.disabled), disabled: current === max, onClick: function () { return handleChangeCurrent(current + 1); } }, { children: "Next" }))] })), jsxRuntime.jsxs("div", __assign({ className: styles.desktop.container }, { children: [jsxRuntime.jsx("div", { children: jsxRuntime.jsx("div", __assign({ className: "text-sm text-gray-700" }, { children: children({ min: min, max: max, current: current }) })) }), jsxRuntime.jsx("div", { children: jsxRuntime.jsxs("nav", __assign({ className: styles.desktop.navigation, "aria-label": "Pagination" }, { children: [jsxRuntime.jsxs("button", __assign({ className: toClassName(styles.desktop.leftButton, current === min && styles.button.disabled), disabled: current === min, onClick: function () { return handleChangeCurrent(current - 1); } }, { children: [jsxRuntime.jsx("span", __assign({ className: styles.label }, { children: "Previous" })), jsxRuntime.jsx(solid.ChevronLeftIcon, { className: styles.icon, "aria-hidden": "true" })] })), component, jsxRuntime.jsxs("button", __assign({ className: toClassName(styles.desktop.rightButton, current === max && styles.button.disabled), disabled: current === max, onClick: function () { return handleChangeCurrent(current + 1); } }, { children: [jsxRuntime.jsx("span", __assign({ className: styles.label }, { children: "Next" })), jsxRuntime.jsx(solid.ChevronRightIcon, { className: styles.icon, "aria-hidden": "true" })] }))] })) })] }))] })));
16882
16882
  };
16883
16883
 
16884
16884
  var base$7 = {
@@ -17047,19 +17047,20 @@ var TableList = function (props) {
17047
17047
  : { container: '!py-1.5 !px-3' }, onClick: function () {
17048
17048
  var sheets = handleCalculateSheets();
17049
17049
  write(sheets, { fileName: 'users-export' });
17050
- } }, { children: jsxRuntime.jsx(outline$2.TableCellsIcon, { className: "w-6 h-6" }) }))] })), jsxRuntime.jsx("div", __assign({ className: styles.body.container }, { children: jsxRuntime.jsx("div", __assign({ className: styles.body.wrapper }, { children: jsxRuntime.jsx("div", __assign({ className: styles.body.content }, { children: jsxRuntime.jsxs("div", __assign({ className: styles.body.styleWrapper }, { children: [isLoading && (jsxRuntime.jsx("div", __assign({ className: "flex flex-col gap-y-2" }, { children: new Array(8).fill(undefined).map(function (index) { return (jsxRuntime.jsx("div", { className: "w-full h-14 rounded-md bg-gray-100 animate-pulse" }, index)); }) }))), !isLoading && (jsxRuntime.jsxs("table", __assign({ className: styles.body.table.container, style: hasStickyHeader ? { borderSpacing: 0 } : {} }, { children: [jsxRuntime.jsx("thead", __assign({ className: styles.body.table.head.container }, { children: table === null || table === void 0 ? void 0 : table.getHeaderGroups().map(function (headerGroup) { return (jsxRuntime.jsx("tr", { children: headerGroup.headers.map(function (header) { return (jsxRuntime.jsxs("th", __assign({ colSpan: header.colSpan, className: toClassName(styles.body.table.head.cell, header.column.getCanSort() && 'cursor-pointer'), onClick: header.column.getToggleSortingHandler() }, { children: [header.isPlaceholder
17051
- ? null
17052
- : reactTable.flexRender(header.column.columnDef.header, header.getContext()), header.column.getCanSort() && (jsxRuntime.jsx("span", __assign({ className: toClassName(styles.sortIndicator.container, header.column.getIsSorted()
17053
- ? styles.sortIndicator.isSorted
17054
- : styles.sortIndicator.isNotSorted) }, { children: jsxRuntime.jsx(outline$2.ChevronDownIcon, { className: toClassName(styles.sortIndicator.icon.container, header.column.getIsSorted() === 'asc' &&
17055
- '-scale-100'), "aria-hidden": "true" }) })))] }), header.id)); }) }, headerGroup.id)); }) })), jsxRuntime.jsx("tbody", __assign({ className: styles.body.table.body.container }, { children: table === null || table === void 0 ? void 0 : table.getRowModel().rows.map(function (row, index) { return (jsxRuntime.jsx("tr", __assign({ className: toClassName(styles.body.table.body.row, isStriped && index % 2 === 0 && 'bg-gray-50') }, { children: row.getVisibleCells().map(function (cell) {
17056
- var _a, _b;
17057
- return (jsxRuntime.jsx("td", __assign({ className: toClassName(styles.body.table.body.cell, hasStickyHeader &&
17058
- index !==
17059
- ((_b = (_a = table === null || table === void 0 ? void 0 : table.getState()) === null || _a === void 0 ? void 0 : _a.pagination) === null || _b === void 0 ? void 0 : _b.pageSize) -
17060
- 1 &&
17061
- 'border-b border-gray-200') }, { children: reactTable.flexRender(cell.column.columnDef.cell, cell.getContext()) }), cell.id));
17062
- }) }), row.id)); }) }))] })))] })) })) })) })), !isLoading && (jsxRuntime.jsx(PanelPaginationNavigation, __assign({ max: page.total, styles: (stylesOverrides === null || stylesOverrides === void 0 ? void 0 : stylesOverrides.components.panelPaginationNavigation)
17050
+ } }, { children: jsxRuntime.jsx(outline$2.TableCellsIcon, { className: "w-6 h-6" }) }))] })), jsxRuntime.jsx("div", __assign({ className: styles.body.container }, { children: jsxRuntime.jsx("div", __assign({ className: styles.body.wrapper }, { children: jsxRuntime.jsx("div", __assign({ className: styles.body.content }, { children: jsxRuntime.jsx("div", __assign({ className: styles.body.styleWrapper }, { children: jsxRuntime.jsxs("table", __assign({ className: styles.body.table.container, style: hasStickyHeader ? { borderSpacing: 0 } : {} }, { children: [jsxRuntime.jsx("thead", __assign({ className: styles.body.table.head.container }, { children: table === null || table === void 0 ? void 0 : table.getHeaderGroups().map(function (headerGroup) { return (jsxRuntime.jsx("tr", { children: headerGroup.headers.map(function (header) { return (jsxRuntime.jsxs("th", __assign({ colSpan: header.colSpan, className: toClassName(styles.body.table.head.cell, header.column.getCanSort() && 'cursor-pointer'), onClick: header.column.getToggleSortingHandler() }, { children: [header.isPlaceholder
17051
+ ? null
17052
+ : reactTable.flexRender(header.column.columnDef.header, header.getContext()), header.column.getCanSort() && (jsxRuntime.jsx("span", __assign({ className: toClassName(styles.sortIndicator.container, header.column.getIsSorted()
17053
+ ? styles.sortIndicator.isSorted
17054
+ : styles.sortIndicator.isNotSorted) }, { children: jsxRuntime.jsx(outline$2.ChevronDownIcon, { className: toClassName(styles.sortIndicator.icon.container, header.column.getIsSorted() === 'asc' &&
17055
+ '-scale-100'), "aria-hidden": "true" }) })))] }), header.id)); }) }, headerGroup.id)); }) })), jsxRuntime.jsxs("tbody", __assign({ className: styles.body.table.body.container }, { children: [isLoading && (jsxRuntime.jsx("div", __assign({ className: "flex flex-col gap-y-2 w-full absolute mt-5" }, { children: new Array(8).fill(undefined).map(function (index) { return (jsxRuntime.jsxs("div", __assign({ className: "flex gap-2" }, { children: [jsxRuntime.jsx("div", { className: "w-20 h-14 rounded-md bg-gray-100 animate-pulse" }), jsxRuntime.jsx("div", { className: "w-full h-14 rounded-md bg-gray-100 animate-pulse" })] }), index)); }) }))), !isLoading &&
17056
+ (table === null || table === void 0 ? void 0 : table.getRowModel().rows.map(function (row, index) { return (jsxRuntime.jsx("tr", __assign({ className: toClassName(styles.body.table.body.row, isStriped && index % 2 === 0 && 'bg-gray-50') }, { children: row.getVisibleCells().map(function (cell) {
17057
+ var _a, _b;
17058
+ return (jsxRuntime.jsx("td", __assign({ className: toClassName(styles.body.table.body.cell, hasStickyHeader &&
17059
+ index !==
17060
+ ((_b = (_a = table === null || table === void 0 ? void 0 : table.getState()) === null || _a === void 0 ? void 0 : _a.pagination) === null || _b === void 0 ? void 0 : _b.pageSize) -
17061
+ 1 &&
17062
+ 'border-b border-gray-200') }, { children: reactTable.flexRender(cell.column.columnDef.cell, cell.getContext()) }), cell.id));
17063
+ }) }), row.id)); }))] }))] })) })) })) })) })), !isLoading && (jsxRuntime.jsx(PanelPaginationNavigation, __assign({ max: page.total, styles: (stylesOverrides === null || stylesOverrides === void 0 ? void 0 : stylesOverrides.components.panelPaginationNavigation)
17063
17064
  ? stylesOverrides === null || stylesOverrides === void 0 ? void 0 : stylesOverrides.components.panelPaginationNavigation
17064
17065
  : { container: 'mt-4' }, onChange: onPaginate }, { children: children })))] })) }));
17065
17066
  };