erp-pos-ecommerce-shared 0.2.13 → 0.2.15
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/components.js +12 -6
- package/dist/components.js.map +1 -1
- package/dist/hooks.d.ts +7 -1
- package/dist/hooks.js +8 -1
- package/dist/hooks.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +13 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/components.js
CHANGED
|
@@ -9,7 +9,7 @@ import { modals } from '@mantine/modals';
|
|
|
9
9
|
import { notifications } from '@mantine/notifications';
|
|
10
10
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
11
11
|
import * as z from 'zod';
|
|
12
|
-
import { useMediaQuery } from '@mantine/hooks';
|
|
12
|
+
import { useMediaQuery as useMediaQuery$1 } from '@mantine/hooks';
|
|
13
13
|
import { flexRender, useReactTable, getSortedRowModel, getPaginationRowModel, getCoreRowModel } from '@tanstack/react-table';
|
|
14
14
|
import { ArrowDown, ArrowUp, ArrowUpDown, FileX, X, Search, ChevronUp, ChevronDown, ListFilter, Check, CalendarDays, MoreVertical } from 'lucide-react';
|
|
15
15
|
|
|
@@ -1108,6 +1108,12 @@ var barTextActive = "light-dark(#111827, var(--mantine-color-dark-0))";
|
|
|
1108
1108
|
var defaultHeaderBgColor = "light-dark(var(--mantine-color-gray-0), var(--mantine-color-dark-6))";
|
|
1109
1109
|
var paginationBorder = "light-dark(#e5e5e5, var(--mantine-color-dark-4))";
|
|
1110
1110
|
var paginationSurface = "light-dark(var(--mantine-color-white), var(--mantine-color-dark-6))";
|
|
1111
|
+
var useMediaQuery = () => {
|
|
1112
|
+
const isMobile = useMediaQuery$1("(max-width: 767px)");
|
|
1113
|
+
const isDesktop = useMediaQuery$1("(min-width: 992px)");
|
|
1114
|
+
const isTablet = useMediaQuery$1("(min-width: 768px) and (max-width: 991px)");
|
|
1115
|
+
return { isMobile, isDesktop, isTablet };
|
|
1116
|
+
};
|
|
1111
1117
|
var BottomPagination = ({
|
|
1112
1118
|
total,
|
|
1113
1119
|
pageSize,
|
|
@@ -1115,8 +1121,7 @@ var BottomPagination = ({
|
|
|
1115
1121
|
onPageSizeChange,
|
|
1116
1122
|
onPageIndexChange
|
|
1117
1123
|
}) => {
|
|
1118
|
-
const isMobile = useMediaQuery(
|
|
1119
|
-
const isDesktop = useMediaQuery("(min-width: 992px)");
|
|
1124
|
+
const { isMobile, isDesktop } = useMediaQuery();
|
|
1120
1125
|
const totalPages = Math.ceil(total / pageSize);
|
|
1121
1126
|
const currentPage = pageIndex + 1;
|
|
1122
1127
|
const handlePageChange = (page) => {
|
|
@@ -1376,7 +1381,7 @@ var TableHeader = ({
|
|
|
1376
1381
|
const sortState = header.column.getIsSorted();
|
|
1377
1382
|
const Icon = canSort ? getSortIcon(sortState) : null;
|
|
1378
1383
|
const isHovered = hoveredHeaderId === header.id;
|
|
1379
|
-
return /* @__PURE__ */ jsx(Table.Th, { bg: bgColor, children: /* @__PURE__ */ jsxs(
|
|
1384
|
+
return /* @__PURE__ */ jsx(Table.Th, { bg: bgColor, w: header.getSize(), children: /* @__PURE__ */ jsxs(
|
|
1380
1385
|
UnstyledButton,
|
|
1381
1386
|
{
|
|
1382
1387
|
style: {
|
|
@@ -1453,6 +1458,7 @@ var TableBody = ({
|
|
|
1453
1458
|
row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx(
|
|
1454
1459
|
Table.Td,
|
|
1455
1460
|
{
|
|
1461
|
+
w: cell.column.getSize(),
|
|
1456
1462
|
onClick: () => onRowClick?.(row.original),
|
|
1457
1463
|
children: /* @__PURE__ */ jsx(
|
|
1458
1464
|
Text,
|
|
@@ -1824,7 +1830,7 @@ var FilterSelect = ({
|
|
|
1824
1830
|
children: selectedOption ? selectedOption.label : placeholder
|
|
1825
1831
|
}
|
|
1826
1832
|
) }),
|
|
1827
|
-
/* @__PURE__ */ jsxs(Menu.Dropdown, { style: { boxShadow: "0 0 10px 0 rgba(0, 0, 0, 0.1)" }, children: [
|
|
1833
|
+
/* @__PURE__ */ jsxs(Menu.Dropdown, { style: { boxShadow: "0 0 10px 0 rgba(0, 0, 0, 0.1)", borderRadius: "8px" }, children: [
|
|
1828
1834
|
searchable && /* @__PURE__ */ jsx(
|
|
1829
1835
|
TextInput,
|
|
1830
1836
|
{
|
|
@@ -1836,7 +1842,7 @@ var FilterSelect = ({
|
|
|
1836
1842
|
onChange: (e) => setSearch(e.currentTarget.value)
|
|
1837
1843
|
}
|
|
1838
1844
|
),
|
|
1839
|
-
/* @__PURE__ */ jsx(ScrollArea, {
|
|
1845
|
+
/* @__PURE__ */ jsx(ScrollArea, { mah: 240, scrollbars: "y", type: "always", children: filteredOptions.map((option) => /* @__PURE__ */ jsx(
|
|
1840
1846
|
Menu.Item,
|
|
1841
1847
|
{
|
|
1842
1848
|
leftSection: selectedOption?.value === option.value ? /* @__PURE__ */ jsx(Check, { size: 12 }) : null,
|