@jars-labs/jars-components 1.1.1 → 1.1.2
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-XNa-AF32.js → index-CYIjT38s.js} +15 -6
- package/dist/index-CYIjT38s.js.map +1 -0
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.js +1 -1
- package/dist/{lottie-Ber8fy_n.js → lottie-DsKwcNMJ.js} +2 -2
- package/dist/{lottie-Ber8fy_n.js.map → lottie-DsKwcNMJ.js.map} +1 -1
- package/dist/types/Table/Table.d.ts +5 -1
- package/dist/types/Table/Table.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/index-XNa-AF32.js.map +0 -1
|
@@ -183,7 +183,7 @@ var Animation = function (_a) {
|
|
|
183
183
|
var refVector = useRef(null);
|
|
184
184
|
var _b = useState(null), lottie = _b[0], setLottie = _b[1];
|
|
185
185
|
useEffect(function () {
|
|
186
|
-
import('./lottie-
|
|
186
|
+
import('./lottie-DsKwcNMJ.js').then(function (n) { return n.l; }).then(function (Lottie) { return setLottie(Lottie.default); });
|
|
187
187
|
}, []);
|
|
188
188
|
useEffect(function () {
|
|
189
189
|
if (lottie && refVector.current) {
|
|
@@ -1766,8 +1766,13 @@ var Stepper = function (_a) {
|
|
|
1766
1766
|
};
|
|
1767
1767
|
Stepper.displayName = 'Stepper';
|
|
1768
1768
|
|
|
1769
|
-
var styles$2 = {"table":"Table-module_table__7Pagp","tableHeaderCell":"Table-module_tableHeaderCell__Wd4IN","tableRow":"Table-module_tableRow__GzCm4","withCheckbox":"Table-module_withCheckbox__DOucz","empty":"Table-module_empty__Dvxh9","emptyWrapperMessage":"Table-module_emptyWrapperMessage__hWoae","paginationWrapper":"Table-module_paginationWrapper__S88Dr","loaderWrapper":"Table-module_loaderWrapper__Fkp8F","tableWrapper":"Table-module_tableWrapper__ITO0y","disabled":"Table-module_disabled__OcI6u","
|
|
1769
|
+
var styles$2 = {"table":"Table-module_table__7Pagp","shadowNone":"Table-module_shadowNone__d3pD9","shadowSm":"Table-module_shadowSm__RRP3y","shadowMd":"Table-module_shadowMd__xbCpj","tableUnstyled":"Table-module_tableUnstyled__Mc9s5","tableHeaderCell":"Table-module_tableHeaderCell__Wd4IN","tableRow":"Table-module_tableRow__GzCm4","withCheckbox":"Table-module_withCheckbox__DOucz","empty":"Table-module_empty__Dvxh9","disabledOverlay":"Table-module_disabledOverlay__QR6SB","emptyWrapperMessage":"Table-module_emptyWrapperMessage__hWoae","paginationWrapper":"Table-module_paginationWrapper__S88Dr","loaderWrapper":"Table-module_loaderWrapper__Fkp8F","tableWrapper":"Table-module_tableWrapper__ITO0y","disabled":"Table-module_disabled__OcI6u","disabledRow":"Table-module_disabledRow__QKivc"};
|
|
1770
1770
|
|
|
1771
|
+
var shadowClassNames = {
|
|
1772
|
+
none: styles$2.shadowNone,
|
|
1773
|
+
sm: styles$2.shadowSm,
|
|
1774
|
+
md: styles$2.shadowMd,
|
|
1775
|
+
};
|
|
1771
1776
|
/**
|
|
1772
1777
|
*
|
|
1773
1778
|
* Table component that displays data in a table format, with support for pagination and row selection.
|
|
@@ -1782,11 +1787,13 @@ var styles$2 = {"table":"Table-module_table__7Pagp","tableHeaderCell":"Table-mod
|
|
|
1782
1787
|
* @param loading - Whether the table is in a loading state
|
|
1783
1788
|
* @param disabled - Whether the table is disabled
|
|
1784
1789
|
* @param disabledMessage - Message to display when the table is disabled
|
|
1790
|
+
* @param variant - Visual style variant; `unstyled` removes padding, background, shadow, and border radius
|
|
1791
|
+
* @param shadow - Box shadow size; only applies when variant is `default`
|
|
1785
1792
|
* @returns Render table with theme styles
|
|
1786
1793
|
*/
|
|
1787
1794
|
function Table(_a) {
|
|
1788
|
-
var data = _a.data, columns = _a.columns, _b = _a.itemsPerPage, itemsPerPage = _b === undefined ? 10 : _b, totalRecords = _a.totalRecords, currentPage = _a.currentPage, onPageChange = _a.onPageChange, _c = _a.showCheckboxes, showCheckboxes = _c === undefined ? false : _c, onSelectionChange = _a.onSelectionChange, _d = _a.loading, loading = _d === undefined ? false : _d, _e = _a.disabled, disabled = _e === undefined ? false : _e, disabledMessage = _a.disabledMessage;
|
|
1789
|
-
var
|
|
1795
|
+
var data = _a.data, columns = _a.columns, _b = _a.itemsPerPage, itemsPerPage = _b === undefined ? 10 : _b, totalRecords = _a.totalRecords, currentPage = _a.currentPage, onPageChange = _a.onPageChange, _c = _a.showCheckboxes, showCheckboxes = _c === undefined ? false : _c, onSelectionChange = _a.onSelectionChange, _d = _a.loading, loading = _d === undefined ? false : _d, _e = _a.disabled, disabled = _e === undefined ? false : _e, disabledMessage = _a.disabledMessage, _f = _a.variant, variant = _f === undefined ? 'default' : _f, _g = _a.shadow, shadow = _g === undefined ? 'md' : _g;
|
|
1796
|
+
var _h = useState([]), selectedItems = _h[0], setSelectedItems = _h[1];
|
|
1790
1797
|
var renderCell = function (item, column) {
|
|
1791
1798
|
var value = item[column.key];
|
|
1792
1799
|
return column.render ? column.render(value, item) : String(value);
|
|
@@ -1803,7 +1810,9 @@ function Table(_a) {
|
|
|
1803
1810
|
setSelectedItems(newSelectedItems);
|
|
1804
1811
|
onSelectionChange === null || onSelectionChange === undefined ? undefined : onSelectionChange(newSelectedItems);
|
|
1805
1812
|
};
|
|
1806
|
-
return (jsxs(Fragment, { children: [jsxs(Table$1, { className: "".concat(styles$2.table, " ").concat(
|
|
1813
|
+
return (jsxs(Fragment, { children: [jsxs(Table$1, { className: "".concat(styles$2.table, " ").concat(variant === 'unstyled'
|
|
1814
|
+
? styles$2.tableUnstyled
|
|
1815
|
+
: shadowClassNames[shadow], " ").concat(showCheckboxes ? styles$2.withCheckbox : ''), highlightOnHover: true, highlightOnHoverColor: "var(--color-neutral-100)", children: [jsx(Table$1.Thead, { children: jsxs(Table$1.Tr, { children: [showCheckboxes && (jsx(Table$1.Th, { className: styles$2.tableHeaderCell, children: jsx(Checkbox, { checked: selectedItems.length === data.length, onChange: handleSelectAll }) })), columns.map(function (column) { return (jsx(Table$1.Th, { className: styles$2.tableHeaderCell, children: column.header }, column.key)); })] }) }), loading ? (jsx(Table$1.Tbody, { children: jsxs(Table$1.Tr, { children: [jsx(Table$1.Td, { colSpan: columns.length / 2 }), jsx(Table$1.Td, { colSpan: columns.length / 2, className: styles$2.loaderWrapper, children: jsx(Loader, { size: "lg" }) })] }) })) : (jsx(Table$1.Tbody, { children: (data === null || data === undefined ? undefined : data.length) > 0 &&
|
|
1807
1816
|
data.map(function (item, index) { return (jsxs(Table$1.Tr, { className: "".concat(styles$2.tableRow, " ").concat(disabled ? styles$2.disabledRow : ''), onClick: !disabled ? item.handleClick : undefined, children: [showCheckboxes && (jsx(Table$1.Td, { className: styles$2.tableRow, children: jsx(Checkbox, { checked: selectedItems.includes(item), onChange: function () { return handleCheckboxChange(item); } }) })), columns.map(function (column) { return (jsx(Table$1.Td, { className: styles$2.tableRow, children: renderCell(item, column) }, column.key)); })] }, index)); }) })), disabled && (jsx("div", { className: styles$2.disabledOverlay, children: disabledMessage !== null && disabledMessage !== undefined ? disabledMessage : (jsx(Text, { children: "This table is temporarily disabled." })) })), data.length === 0 && !loading && (jsx(Table$1.Tbody, { children: jsx(Table$1.Tr, { children: jsx(Table$1.Td, { colSpan: columns.length + (showCheckboxes ? 1 : 0), className: styles$2.empty, children: jsxs(Flex, { className: styles$2.emptyWrapperMessage, children: [jsx(Text, { variant: "m", weight: "medium", children: "No results match your search or selected filters." }), jsx(Text, { variant: "m", weight: "medium", children: "Please adjust your criteria and try again" })] }) }) }) }))] }), totalRecords > itemsPerPage && (jsx("div", { className: styles$2.paginationWrapper, children: jsx(Pagination, { total: Math.ceil(totalRecords / itemsPerPage), value: currentPage, onChange: onPageChange, disabled: disabled }) }))] }));
|
|
1808
1817
|
}
|
|
1809
1818
|
Table.displayName = 'Table';
|
|
@@ -2113,4 +2122,4 @@ var World = function (_a) {
|
|
|
2113
2122
|
World.displayName = 'World';
|
|
2114
2123
|
|
|
2115
2124
|
export { Attachment as $, Accordion as A, Badge as B, Card as C, DateInput as D, EnterCodeInput as E, FileInput as F, Stepper as G, Tabs as H, IncrementNumber as I, Text as J, Textarea as K, Link as L, Message as M, NavBar as N, ToastContainer as O, Pagination as P, Tooltip as Q, RadioButton as R, SegmentedControl as S, Table as T, AIGenerate as U, AIPrompt as V, AIRedo as W, AISearch as X, Alert as Y, Archive as Z, Arrow as _, AccordionItem as a, AvatarPlaceholder as a0, Bell as a1, Calendar as a2, Camera as a3, Cat as a4, Chat as a5, Check as a6, Chevron as a7, ChevronCollapse as a8, Clock as a9, Plaid as aA, Plus as aB, Refresh as aC, Remove as aD, Search as aE, Shield as aF, StepIndicator as aG, ThreeDots as aH, ThumbsDown as aI, Tick as aJ, Umbrello as aK, Upload as aL, Visa as aM, Warning as aN, World as aO, capitalizeFirstSentenceLetter as aP, Close as aa, Cloud as ab, CloudUpload as ac, CreditCard as ad, Delete as ae, Document as af, Dog as ag, EyeHide as ah, EyeShow as ai, Fingerprint as aj, Google as ak, Grid as al, Hamburger as am, HappyFace as an, House as ao, HouseTime as ap, Identification as aq, Info as ar, Location as as, Mail as at, Menu as au, MenuTouched as av, Notification as aw, Open as ax, Pets as ay, Phone as az, AccordionControl as b, AccordionPanel as c, ActionIcon as d, Animation as e, Autocomplete as f, getDefaultExportFromCjs as g, Avatar as h, badgeVariantMap as i, Button as j, cardStatusVariantMap as k, CardStatus as l, Checkbox as m, Chip as n, Dropdown as o, FileUpload as p, Input as q, LinkModal as r, Loader as s, Modal as t, Multiselect as u, NavBarSide as v, PasswordInput as w, Pill as x, Select as y, StatusBadge as z };
|
|
2116
|
-
//# sourceMappingURL=index-
|
|
2125
|
+
//# sourceMappingURL=index-CYIjT38s.js.map
|