@eztrak/shared 0.16.3 → 0.16.6
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/README.md +119 -3
- package/dist/{chunk-S7ZLXOPF.mjs → chunk-SS3J2WBE.mjs} +149 -50
- package/dist/chunk-SS3J2WBE.mjs.map +1 -0
- package/dist/components/index.d.mts +8 -1
- package/dist/components/index.d.ts +8 -1
- package/dist/components/index.js +135 -39
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +1 -1
- package/dist/index.js +135 -39
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-S7ZLXOPF.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -469,6 +469,121 @@ export function createCellEditorOnSave(invalidate = []) {
|
|
|
469
469
|
|
|
470
470
|
Save is disabled when the value is unchanged (compares as strings so `42` and `"42"` are treated as equal). Pressing Enter while a save is in progress does not submit twice.
|
|
471
471
|
|
|
472
|
+
### Components — Breadcrumbs
|
|
473
|
+
|
|
474
|
+
URL-driven trail for the current page. It reads `useLocation()` from `react-router-dom`, so it must render inside a router. The path is split on `/`, and each segment becomes one crumb. Ancestor crumbs are links. The last crumb is the current page: it is not a link, and it is marked with `aria-current="page"`.
|
|
475
|
+
|
|
476
|
+
On `/events/1q27-crude-coker/coker-ta27/budget` the default trail is:
|
|
477
|
+
|
|
478
|
+
`Events > 1Q27 Crude & Coker > Coker TA27 > Budget`
|
|
479
|
+
|
|
480
|
+
when those segments are labeled with `customTitles`. Without a label, the raw segment is shown.
|
|
481
|
+
|
|
482
|
+
A crumb's label is chosen in this order:
|
|
483
|
+
|
|
484
|
+
1. `routes` — a matching `BreadcrumbRoute` whose full path equals that crumb
|
|
485
|
+
2. `customTitles` — the entry for **that crumb's own segment** (not an earlier segment in the path)
|
|
486
|
+
3. The segment text itself
|
|
487
|
+
|
|
488
|
+
`customIcons` uses the same segment key. An icon on `events` appears only on the Events crumb.
|
|
489
|
+
|
|
490
|
+
The default look is a flat bar: off-white background (`#F7F7F5`), 14px gray ancestor text (`#6B7280`), a 12px chevron (`#9CA3AF`), and a semibold near-black current page (`#111111`). There is no Home crumb unless `showHome` is set. Hover darkens a link without moving it. Keyboard focus draws an outline. Color props are inline styles, so they override the default colors. Class name props still merge for layout and typography.
|
|
491
|
+
|
|
492
|
+
```tsx
|
|
493
|
+
import { Breadcrumbs } from "@eztrak/shared/components";
|
|
494
|
+
|
|
495
|
+
<Breadcrumbs
|
|
496
|
+
customTitles={{
|
|
497
|
+
events: "Events",
|
|
498
|
+
"1q27-crude-coker": "1Q27 Crude & Coker",
|
|
499
|
+
"coker-ta27": "Coker TA27",
|
|
500
|
+
budget: "Budget",
|
|
501
|
+
}}
|
|
502
|
+
/>
|
|
503
|
+
```
|
|
504
|
+
|
|
505
|
+
#### Colors, separator, and icons
|
|
506
|
+
|
|
507
|
+
```tsx
|
|
508
|
+
import { HiCalendar } from "react-icons/hi";
|
|
509
|
+
|
|
510
|
+
<Breadcrumbs
|
|
511
|
+
customTitles={titles}
|
|
512
|
+
customIcons={{ events: <HiCalendar size={14} aria-hidden /> }}
|
|
513
|
+
backgroundColor="#EEF2FF"
|
|
514
|
+
inactiveColor="#4338CA"
|
|
515
|
+
activeColor="#1E1B4B"
|
|
516
|
+
separatorColor="#A5B4FC"
|
|
517
|
+
iconColor="#4338CA"
|
|
518
|
+
/>
|
|
519
|
+
|
|
520
|
+
// Slash instead of the default chevron
|
|
521
|
+
<Breadcrumbs customTitles={titles} separator="/" />
|
|
522
|
+
```
|
|
523
|
+
|
|
524
|
+
Omit `iconColor` and each icon inherits that crumb's text color (gray on ancestors, the active color on the current page).
|
|
525
|
+
|
|
526
|
+
#### Home, static crumbs, and route titles
|
|
527
|
+
|
|
528
|
+
```tsx
|
|
529
|
+
// Prepend Home (links to "/"). Label it with customTitles.home.
|
|
530
|
+
<Breadcrumbs showHome customTitles={{ home: "Dashboard", events: "Events" }} />
|
|
531
|
+
|
|
532
|
+
// Render a segment as text instead of a link
|
|
533
|
+
<Breadcrumbs nonClickablePaths={["coker-ta27"]} customTitles={titles} />
|
|
534
|
+
|
|
535
|
+
// Titles from a route tree. A route title wins over customTitles.
|
|
536
|
+
<Breadcrumbs
|
|
537
|
+
routes={[
|
|
538
|
+
{
|
|
539
|
+
path: "events",
|
|
540
|
+
title: "Events",
|
|
541
|
+
children: [{ path: "budget", title: "Budget" }],
|
|
542
|
+
},
|
|
543
|
+
]}
|
|
544
|
+
/>
|
|
545
|
+
```
|
|
546
|
+
|
|
547
|
+
`nonClickablePaths` matches a segment exactly, or any crumb whose path includes the token.
|
|
548
|
+
|
|
549
|
+
#### Layout hooks
|
|
550
|
+
|
|
551
|
+
```tsx
|
|
552
|
+
<Breadcrumbs
|
|
553
|
+
customTitles={titles}
|
|
554
|
+
prefix={<span>App</span>}
|
|
555
|
+
suffix={<span>Draft</span>}
|
|
556
|
+
containerClassName="px-6"
|
|
557
|
+
linkClassName="uppercase tracking-wide"
|
|
558
|
+
activeClassName="font-bold"
|
|
559
|
+
separatorClassName="mx-1"
|
|
560
|
+
iconClassName="h-4 w-4"
|
|
561
|
+
/>
|
|
562
|
+
```
|
|
563
|
+
|
|
564
|
+
| Prop | Type | Default | Description |
|
|
565
|
+
| --- | --- | --- | --- |
|
|
566
|
+
| `routes` | `BreadcrumbRoute[]` | `[]` | Nested `{ path, title?, children? }` used to title a crumb when the built path matches |
|
|
567
|
+
| `customTitles` | `Record<string, string>` | `{}` | Label for a path segment. Key `home` labels the Home crumb |
|
|
568
|
+
| `customIcons` | `Record<string, ReactNode>` | `{}` | Icon for a path segment. Key `home` icons the Home crumb |
|
|
569
|
+
| `showHome` | `boolean` | `false` | Prepend a Home crumb that links to `/` |
|
|
570
|
+
| `nonClickablePaths` | `string[]` | `[]` | Segments (or path substrings) rendered as text instead of links |
|
|
571
|
+
| `separator` | `ReactNode` | chevron | Node between crumbs. Pass `"/"` or your own icon |
|
|
572
|
+
| `prefix` | `ReactNode` | — | Content before the trail |
|
|
573
|
+
| `suffix` | `ReactNode` | — | Content after the trail |
|
|
574
|
+
| `backgroundColor` | `string` | `"#F7F7F5"` | Bar background |
|
|
575
|
+
| `inactiveColor` | `string` | `"#6B7280"` | Ancestor and non-clickable text |
|
|
576
|
+
| `activeColor` | `string` | `"#111111"` | Current page text |
|
|
577
|
+
| `separatorColor` | `string` | `"#9CA3AF"` | Separator color |
|
|
578
|
+
| `iconColor` | `string` | inherits text | Icon color. Omitted icons use the crumb text color |
|
|
579
|
+
| `iconClassName` | `string` | — | Classes for each crumb icon |
|
|
580
|
+
| `containerClassName` | `string` | — | Classes merged onto the `<nav>` |
|
|
581
|
+
| `linkClassName` | `string` | — | Classes for ancestor and non-clickable crumbs |
|
|
582
|
+
| `activeClassName` | `string` | `"font-semibold"` | Classes for the current page |
|
|
583
|
+
| `separatorClassName` | `string` | — | Classes for the separator |
|
|
584
|
+
|
|
585
|
+
Color props win over text and background utilities in the class name props. Use the class name props for spacing, weight, and case.
|
|
586
|
+
|
|
472
587
|
### Components — ResetFiltersButton
|
|
473
588
|
|
|
474
589
|
Clears all URL search params (`react-router-dom`) in one click. Self-contained — no app `Button` needed.
|
|
@@ -878,6 +993,7 @@ import {
|
|
|
878
993
|
useGridHeight,
|
|
879
994
|
EztrakTabs,
|
|
880
995
|
CustomPagination,
|
|
996
|
+
Breadcrumbs,
|
|
881
997
|
SearchInput,
|
|
882
998
|
DropdownFilter,
|
|
883
999
|
CustomCellEditor,
|
|
@@ -898,7 +1014,7 @@ npm run storybook
|
|
|
898
1014
|
npm run storybook
|
|
899
1015
|
```
|
|
900
1016
|
|
|
901
|
-
Opens on [http://localhost:6006](http://localhost:6006) with stories for `EztrakTabs`, `CustomPagination`, `ResetColumnsButton`, `CustomCellEditor`, and `Loader`.
|
|
1017
|
+
Opens on [http://localhost:6006](http://localhost:6006) with stories for `Breadcrumbs`, `EztrakTabs`, `CustomPagination`, `ResetColumnsButton`, `CustomCellEditor`, and `Loader`.
|
|
902
1018
|
|
|
903
1019
|
## Exports
|
|
904
1020
|
|
|
@@ -907,7 +1023,7 @@ Opens on [http://localhost:6006](http://localhost:6006) with stories for `Eztrak
|
|
|
907
1023
|
| `@eztrak/shared` | Main entry — re-exports utils, hooks, and components |
|
|
908
1024
|
| `@eztrak/shared/utils` | `cn`, `handleApiError`, `confirmationAlert`, `ConfirmationAlertOptions`, `getItem`, `setItem`, `loadUserState`, `saveUserState`, `resetPageParam`, date/format helpers, API error helpers, form field helpers |
|
|
909
1025
|
| `@eztrak/shared/hooks` | `usePaginationUrlSync`, `useGridHeight` |
|
|
910
|
-
| `@eztrak/shared/components` | `EztrakTabs`, `CustomPagination`, `CustomCellEditor`, `SearchInput`, `DropdownFilter`, `ResetFiltersButton`, `TooltipText`, `ToolTip`, `CardSkeleton`, `Modal`, `Loader`, `TableLayoutToolbarControls`, `ResetColumnsButton`, and related types |
|
|
1026
|
+
| `@eztrak/shared/components` | `EztrakTabs`, `CustomPagination`, `Breadcrumbs`, `CustomCellEditor`, `SearchInput`, `DropdownFilter`, `ResetFiltersButton`, `TooltipText`, `ToolTip`, `CardSkeleton`, `Modal`, `Loader`, `TableLayoutToolbarControls`, `ResetColumnsButton`, and related types |
|
|
911
1027
|
| `@eztrak/shared/components/tabs.css` | Default tab styles (CSS variables) |
|
|
912
1028
|
| `@eztrak/shared/components/loader.css` | Loader spinner styles |
|
|
913
1029
|
|
|
@@ -965,7 +1081,7 @@ Keyboard: Arrow keys move between tabs; Home/End jump to first/last enabled tab.
|
|
|
965
1081
|
|
|
966
1082
|
- Node.js 18+
|
|
967
1083
|
- React 18+ (for hooks and components)
|
|
968
|
-
- `react-router-dom` — `CustomPagination`, `SearchInput`, `DropdownFilter`, `ResetFiltersButton`, and `usePaginationUrlSync` (optional peer; install if you use these)
|
|
1084
|
+
- `react-router-dom` — `Breadcrumbs`, `CustomPagination`, `SearchInput`, `DropdownFilter`, `ResetFiltersButton`, and `usePaginationUrlSync` (optional peer; install if you use these)
|
|
969
1085
|
- `react-hot-toast` — toast feedback in `CustomCellEditor` and `handleApiError`
|
|
970
1086
|
- `sweetalert2` — `ResetColumnsButton` and `confirmationAlert`
|
|
971
1087
|
- `react-icons` — `CustomCellEditor`, `SearchInput`, and `Modal`
|
|
@@ -1189,10 +1189,41 @@ function Header({
|
|
|
1189
1189
|
}
|
|
1190
1190
|
|
|
1191
1191
|
// src/components/breadcrumbs/Breadcrumbs.tsx
|
|
1192
|
-
import {
|
|
1192
|
+
import {
|
|
1193
|
+
cloneElement,
|
|
1194
|
+
isValidElement
|
|
1195
|
+
} from "react";
|
|
1193
1196
|
import { Link, useLocation } from "react-router-dom";
|
|
1194
|
-
import { Fragment
|
|
1195
|
-
var
|
|
1197
|
+
import { Fragment, jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1198
|
+
var DEFAULT_BACKGROUND = "#F7F7F5";
|
|
1199
|
+
var DEFAULT_INACTIVE = "#6B7280";
|
|
1200
|
+
var DEFAULT_ACTIVE = "#111111";
|
|
1201
|
+
var DEFAULT_SEPARATOR = "#9CA3AF";
|
|
1202
|
+
var CRUMB_LAYOUT = "inline-flex items-center gap-1.5 whitespace-nowrap leading-5 rounded-sm";
|
|
1203
|
+
var LINK_INTERACTION = "font-normal transition-colors duration-200 motion-reduce:transition-none hover:!text-[color-mix(in_srgb,var(--bc-inactive)_65%,#111111)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[#111111]";
|
|
1204
|
+
function BreadcrumbChevron() {
|
|
1205
|
+
return /* @__PURE__ */ jsx11(
|
|
1206
|
+
"svg",
|
|
1207
|
+
{
|
|
1208
|
+
width: "12",
|
|
1209
|
+
height: "12",
|
|
1210
|
+
viewBox: "0 0 12 12",
|
|
1211
|
+
fill: "none",
|
|
1212
|
+
"aria-hidden": "true",
|
|
1213
|
+
className: "shrink-0",
|
|
1214
|
+
children: /* @__PURE__ */ jsx11(
|
|
1215
|
+
"path",
|
|
1216
|
+
{
|
|
1217
|
+
d: "M4.5 2.5L8 6L4.5 9.5",
|
|
1218
|
+
stroke: "currentColor",
|
|
1219
|
+
strokeWidth: "1.5",
|
|
1220
|
+
strokeLinecap: "round",
|
|
1221
|
+
strokeLinejoin: "round"
|
|
1222
|
+
}
|
|
1223
|
+
)
|
|
1224
|
+
}
|
|
1225
|
+
);
|
|
1226
|
+
}
|
|
1196
1227
|
function asTitleMap(customTitles) {
|
|
1197
1228
|
if (Object.prototype.toString.call(customTitles) !== "[object Object]") {
|
|
1198
1229
|
return {};
|
|
@@ -1222,73 +1253,141 @@ function Breadcrumbs({
|
|
|
1222
1253
|
containerClassName,
|
|
1223
1254
|
linkClassName = "",
|
|
1224
1255
|
separatorClassName = "",
|
|
1225
|
-
separator
|
|
1226
|
-
activeClassName = "font-
|
|
1256
|
+
separator,
|
|
1257
|
+
activeClassName = "font-semibold",
|
|
1227
1258
|
customTitles = {},
|
|
1228
1259
|
customIcons = {},
|
|
1229
1260
|
prefix,
|
|
1230
1261
|
suffix,
|
|
1231
|
-
nonClickablePaths = []
|
|
1262
|
+
nonClickablePaths = [],
|
|
1263
|
+
backgroundColor = DEFAULT_BACKGROUND,
|
|
1264
|
+
inactiveColor = DEFAULT_INACTIVE,
|
|
1265
|
+
activeColor = DEFAULT_ACTIVE,
|
|
1266
|
+
separatorColor = DEFAULT_SEPARATOR,
|
|
1267
|
+
iconColor,
|
|
1268
|
+
iconClassName,
|
|
1269
|
+
showHome = false
|
|
1232
1270
|
}) {
|
|
1233
1271
|
const location = useLocation();
|
|
1234
1272
|
const pathnames = location.pathname.split("/").filter((segment) => segment);
|
|
1235
1273
|
const titles = asTitleMap(customTitles);
|
|
1236
|
-
const inactiveLinkClassName = cn(INACTIVE_LINK_CLASS, linkClassName);
|
|
1237
1274
|
const getTitle = (pathname) => {
|
|
1238
1275
|
const match = findRoute(pathname, routes);
|
|
1239
1276
|
if (match && match.title) {
|
|
1240
1277
|
return match.title;
|
|
1241
1278
|
}
|
|
1242
|
-
const titleKeys = Object.keys(titles);
|
|
1243
|
-
const paramMatch = pathname.split("/").find((segment) => titleKeys.includes(segment)) || "";
|
|
1244
|
-
if (paramMatch && titles[paramMatch]) {
|
|
1245
|
-
return titles[paramMatch];
|
|
1246
|
-
}
|
|
1247
1279
|
const lastParamPath = getLastParam(pathname);
|
|
1280
|
+
if (lastParamPath && titles[lastParamPath]) {
|
|
1281
|
+
return titles[lastParamPath];
|
|
1282
|
+
}
|
|
1248
1283
|
if (lastParamPath) {
|
|
1249
1284
|
return lastParamPath;
|
|
1250
1285
|
}
|
|
1251
1286
|
return pathname;
|
|
1252
1287
|
};
|
|
1253
1288
|
const getIcon = (pathname) => {
|
|
1254
|
-
const
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
return customIcons[matchedSegment];
|
|
1289
|
+
const segment = getLastParam(pathname);
|
|
1290
|
+
if (segment && customIcons[segment]) {
|
|
1291
|
+
return customIcons[segment];
|
|
1258
1292
|
}
|
|
1259
1293
|
return null;
|
|
1260
1294
|
};
|
|
1295
|
+
const crumbs = [];
|
|
1296
|
+
if (showHome) {
|
|
1297
|
+
crumbs.push({
|
|
1298
|
+
key: "home",
|
|
1299
|
+
to: "/",
|
|
1300
|
+
title: titles.home || "Home",
|
|
1301
|
+
icon: customIcons.home ?? null,
|
|
1302
|
+
isCurrent: pathnames.length === 0,
|
|
1303
|
+
isLink: pathnames.length > 0
|
|
1304
|
+
});
|
|
1305
|
+
}
|
|
1306
|
+
pathnames.forEach((segment, index) => {
|
|
1307
|
+
const to = `/${pathnames.slice(0, index + 1).join("/")}`;
|
|
1308
|
+
const isCurrent = index === pathnames.length - 1;
|
|
1309
|
+
const isNonClickable = nonClickablePaths.some(
|
|
1310
|
+
(token) => to.includes(token) || segment === token
|
|
1311
|
+
);
|
|
1312
|
+
crumbs.push({
|
|
1313
|
+
key: to,
|
|
1314
|
+
to,
|
|
1315
|
+
title: getTitle(to),
|
|
1316
|
+
icon: getIcon(to),
|
|
1317
|
+
isCurrent,
|
|
1318
|
+
isLink: !isCurrent && !isNonClickable
|
|
1319
|
+
});
|
|
1320
|
+
});
|
|
1321
|
+
const navStyle = {
|
|
1322
|
+
backgroundColor,
|
|
1323
|
+
"--bc-inactive": inactiveColor
|
|
1324
|
+
};
|
|
1325
|
+
const inactiveClassName = cn(CRUMB_LAYOUT, LINK_INTERACTION, linkClassName);
|
|
1326
|
+
const staticInactiveClassName = cn(CRUMB_LAYOUT, "font-normal", linkClassName);
|
|
1327
|
+
const currentClassName = cn(CRUMB_LAYOUT, activeClassName);
|
|
1328
|
+
const renderCrumb = (crumb) => {
|
|
1329
|
+
const content = /* @__PURE__ */ jsxs8(Fragment, { children: [
|
|
1330
|
+
crumb.icon ? /* @__PURE__ */ jsx11(
|
|
1331
|
+
"span",
|
|
1332
|
+
{
|
|
1333
|
+
className: cn("inline-flex shrink-0 items-center", iconClassName),
|
|
1334
|
+
style: iconColor ? { color: iconColor } : void 0,
|
|
1335
|
+
children: crumb.icon
|
|
1336
|
+
}
|
|
1337
|
+
) : null,
|
|
1338
|
+
crumb.title
|
|
1339
|
+
] });
|
|
1340
|
+
if (crumb.isCurrent) {
|
|
1341
|
+
return /* @__PURE__ */ jsx11(
|
|
1342
|
+
"span",
|
|
1343
|
+
{
|
|
1344
|
+
className: currentClassName,
|
|
1345
|
+
style: { color: activeColor },
|
|
1346
|
+
"aria-current": "page",
|
|
1347
|
+
children: content
|
|
1348
|
+
}
|
|
1349
|
+
);
|
|
1350
|
+
}
|
|
1351
|
+
if (crumb.isLink) {
|
|
1352
|
+
return /* @__PURE__ */ jsx11(
|
|
1353
|
+
Link,
|
|
1354
|
+
{
|
|
1355
|
+
to: crumb.to,
|
|
1356
|
+
className: inactiveClassName,
|
|
1357
|
+
style: { color: inactiveColor },
|
|
1358
|
+
children: content
|
|
1359
|
+
}
|
|
1360
|
+
);
|
|
1361
|
+
}
|
|
1362
|
+
return /* @__PURE__ */ jsx11("span", { className: staticInactiveClassName, style: { color: inactiveColor }, children: content });
|
|
1363
|
+
};
|
|
1261
1364
|
return /* @__PURE__ */ jsxs8(
|
|
1262
|
-
"
|
|
1365
|
+
"nav",
|
|
1263
1366
|
{
|
|
1367
|
+
"aria-label": "Breadcrumb",
|
|
1264
1368
|
className: cn(
|
|
1265
|
-
"flex flex-row gap-2
|
|
1369
|
+
"flex w-full flex-row items-center gap-2 overflow-x-auto px-4 py-3 text-sm leading-5",
|
|
1266
1370
|
containerClassName
|
|
1267
1371
|
),
|
|
1372
|
+
style: navStyle,
|
|
1268
1373
|
children: [
|
|
1269
|
-
prefix
|
|
1270
|
-
/* @__PURE__ */
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
return /* @__PURE__ */ jsxs8(Fragment, { children: [
|
|
1287
|
-
/* @__PURE__ */ jsx11("span", { className: separatorClassName, children: separator }),
|
|
1288
|
-
isLast || isNonClickable ? /* @__PURE__ */ jsx11("span", { className: isLast ? activeClassName : linkClassName, children: crumb }) : /* @__PURE__ */ jsx11(Link, { to, className: inactiveLinkClassName, children: crumb })
|
|
1289
|
-
] }, to);
|
|
1290
|
-
}),
|
|
1291
|
-
suffix && /* @__PURE__ */ jsx11("div", { className: "breadcrumb-suffix", children: suffix })
|
|
1374
|
+
prefix ? /* @__PURE__ */ jsx11("div", { className: "breadcrumb-prefix", children: prefix }) : null,
|
|
1375
|
+
/* @__PURE__ */ jsx11("ol", { className: "flex min-w-0 flex-row flex-nowrap items-center gap-2", children: crumbs.map((crumb, index) => /* @__PURE__ */ jsxs8("li", { className: "inline-flex items-center gap-2", children: [
|
|
1376
|
+
index > 0 ? /* @__PURE__ */ jsx11(
|
|
1377
|
+
"span",
|
|
1378
|
+
{
|
|
1379
|
+
"aria-hidden": "true",
|
|
1380
|
+
className: cn(
|
|
1381
|
+
"inline-flex shrink-0 items-center",
|
|
1382
|
+
separatorClassName
|
|
1383
|
+
),
|
|
1384
|
+
style: { color: separatorColor },
|
|
1385
|
+
children: separator === void 0 ? /* @__PURE__ */ jsx11(BreadcrumbChevron, {}) : isValidElement(separator) ? cloneElement(separator) : separator
|
|
1386
|
+
}
|
|
1387
|
+
) : null,
|
|
1388
|
+
renderCrumb(crumb)
|
|
1389
|
+
] }, crumb.key)) }),
|
|
1390
|
+
suffix ? /* @__PURE__ */ jsx11("div", { className: "breadcrumb-suffix", children: suffix }) : null
|
|
1292
1391
|
]
|
|
1293
1392
|
}
|
|
1294
1393
|
);
|
|
@@ -1301,7 +1400,7 @@ import { Link as Link2, useLocation as useLocation2 } from "react-router-dom";
|
|
|
1301
1400
|
// src/components/tooltip/ToolTip.tsx
|
|
1302
1401
|
import { useId as useId2 } from "react";
|
|
1303
1402
|
import { Tooltip } from "react-tooltip";
|
|
1304
|
-
import { Fragment as
|
|
1403
|
+
import { Fragment as Fragment2, jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1305
1404
|
var defaultTooltipStyle = {
|
|
1306
1405
|
color: "#fff",
|
|
1307
1406
|
borderRadius: "5px",
|
|
@@ -1330,7 +1429,7 @@ function ToolTip({
|
|
|
1330
1429
|
if (disabled || !tooltipText) {
|
|
1331
1430
|
return /* @__PURE__ */ jsx12("span", { className, children });
|
|
1332
1431
|
}
|
|
1333
|
-
return /* @__PURE__ */ jsxs9(
|
|
1432
|
+
return /* @__PURE__ */ jsxs9(Fragment2, { children: [
|
|
1334
1433
|
/* @__PURE__ */ jsx12(
|
|
1335
1434
|
"span",
|
|
1336
1435
|
{
|
|
@@ -1694,7 +1793,7 @@ function Sidebar({
|
|
|
1694
1793
|
}
|
|
1695
1794
|
|
|
1696
1795
|
// src/components/skeleton/CardSkeleton.tsx
|
|
1697
|
-
import { Fragment as
|
|
1796
|
+
import { Fragment as Fragment3, jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1698
1797
|
var DEFAULT_LINE_WIDTHS = ["w-32", "w-48"];
|
|
1699
1798
|
function shouldShowAvatar(variant, showAvatar) {
|
|
1700
1799
|
return showAvatar ?? variant === "profile";
|
|
@@ -1786,7 +1885,7 @@ function CardSkeleton({
|
|
|
1786
1885
|
index
|
|
1787
1886
|
);
|
|
1788
1887
|
});
|
|
1789
|
-
return /* @__PURE__ */ jsx14(
|
|
1888
|
+
return /* @__PURE__ */ jsx14(Fragment3, { children: skeletons });
|
|
1790
1889
|
}
|
|
1791
1890
|
|
|
1792
1891
|
// src/components/tooltip/TooltipText.tsx
|
|
@@ -2287,7 +2386,7 @@ function resolveActions(actions, data, hasPermission, presets) {
|
|
|
2287
2386
|
}
|
|
2288
2387
|
|
|
2289
2388
|
// src/components/row-actions/RowActions.tsx
|
|
2290
|
-
import { Fragment as
|
|
2389
|
+
import { Fragment as Fragment4, jsx as jsx19 } from "react/jsx-runtime";
|
|
2291
2390
|
function runAction(action, data, hide, confirmFn = confirmationAlert) {
|
|
2292
2391
|
if (!action.onClick) {
|
|
2293
2392
|
if (action.closeOnClick) hide?.();
|
|
@@ -2407,7 +2506,7 @@ function RowActions({
|
|
|
2407
2506
|
});
|
|
2408
2507
|
};
|
|
2409
2508
|
if (renderTrigger) {
|
|
2410
|
-
return /* @__PURE__ */ jsx19(
|
|
2509
|
+
return /* @__PURE__ */ jsx19(Fragment4, { children: renderTrigger({
|
|
2411
2510
|
data,
|
|
2412
2511
|
actions: resolved,
|
|
2413
2512
|
hide: () => void 0,
|
|
@@ -2446,7 +2545,7 @@ function RowActions({
|
|
|
2446
2545
|
// src/components/table-error-boundary/TableErrorBoundary.tsx
|
|
2447
2546
|
import { useMemo as useMemo2 } from "react";
|
|
2448
2547
|
import { FaArrowsRotate, FaTriangleExclamation } from "react-icons/fa6";
|
|
2449
|
-
import { Fragment as
|
|
2548
|
+
import { Fragment as Fragment5, jsx as jsx20, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2450
2549
|
var TableErrorBoundary = ({
|
|
2451
2550
|
isError,
|
|
2452
2551
|
isLoading = false,
|
|
@@ -2519,7 +2618,7 @@ var TableErrorBoundary = ({
|
|
|
2519
2618
|
}
|
|
2520
2619
|
);
|
|
2521
2620
|
}
|
|
2522
|
-
return /* @__PURE__ */ jsx20(
|
|
2621
|
+
return /* @__PURE__ */ jsx20(Fragment5, { children });
|
|
2523
2622
|
};
|
|
2524
2623
|
|
|
2525
2624
|
export {
|
|
@@ -2553,4 +2652,4 @@ export {
|
|
|
2553
2652
|
RowActions,
|
|
2554
2653
|
TableErrorBoundary
|
|
2555
2654
|
};
|
|
2556
|
-
//# sourceMappingURL=chunk-
|
|
2655
|
+
//# sourceMappingURL=chunk-SS3J2WBE.mjs.map
|